diff --git a/AGENTS.md b/AGENTS.md index 68cc02418..babd80553 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -64,7 +64,7 @@ Read these when the trigger applies; they are not loaded by default. - **Coding-agent Threads (yui-notify plugin)** → `coding-agents/yui-notify/README.md` - **Checking how a rule is enforced** → `docs/agent-guide/harness-enforcement.md` - **Build / run / find logs** → `docs/agent-guide/build-run.md` -- **Any UI or visual work** → `docs/agent-guide/design-context.md` (+ `PRODUCT.md`, `DESIGN.md`) +- **Any UI or visual work** → `docs/agent-guide/design-context.md` (+ `PRODUCT.md`, `DESIGN.md`, and the file under `docs/agent-guide/design/` for each component the change touches) - **`generate_express` Express cue contract, or the `client_context` prompt-text format sent to the backend** → `docs/reference/client-context.md` - **Adding or changing a tool the client exposes to the backend, or checking what each chat transport carries** → `docs/reference/client-tools.md`, `docs/reference/push-transport.md` - **`POST /signals` envelope, buffering, and delivery rules, and the `/presets//` routes** → `docs/reference/signals-ingress.md` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c37ee23ba..247f52207 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -55,8 +55,10 @@ repositories** and optional — see - **UI: storyboard → review existing → propose → mock → implement.** Storyboard how the user uses the change in the issue, one frame per step of each journey it touches ([`design-context.md`](docs/agent-guide/design-context.md)). Read the existing - `src/ui/` screens plus [`DESIGN.md`](DESIGN.md) and [`PRODUCT.md`](PRODUCT.md) - before any UI work; propose the text structure, get confirmation, build a + `src/ui/` screens plus [`DESIGN.md`](DESIGN.md), the file under + [`docs/agent-guide/design/`](docs/agent-guide/design/) for each component the change touches, + and [`PRODUCT.md`](PRODUCT.md) before any UI work; propose the text structure, get + confirmation, build a standalone mock HTML in [`mocks/`](mocks/README.md), then implement. - **Verify before asking.** Anything observable (UI rendering, DOM state, logs) — verify it yourself and attach the proof to the PR's **Runtime evidence** @@ -202,6 +204,10 @@ A review checks every diff against the rules above and against these traps: - **One source for the contract.** Consumers compile against `src/contract/types.ts`. `configs/motions.json` and `docs/guide/motions.md` change together. +- **The architecture map states today.** `pnpm map:check` checks paths and + shape, not whether a sentence is still true: grep + `docs/agent-guide/architecture/map.js` for every file, symbol and page name + the diff moved, renamed or removed. ## Finding your way diff --git a/DESIGN.md b/DESIGN.md index c26d38ca1..023746362 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -244,177 +244,154 @@ Flat by default. Depth comes from a single soft ambient shadow on the one floati Surfaces are absent at rest and transition in over ~200ms (`--yui-dur`) on an ease-out exponential curve (`cubic-bezier(0.22, 1, 0.36, 1)`), ~140ms (`--yui-dur-fast`) for color shifts; under `prefers-reduced-motion` the slide and scale drop to an opacity-only fade. Implemented CSS lives in `src/ui/`. The main character and the moments she causes may spring or bounce instead (§ Do). -### Speech bubble -The primary floating surface (`surfaces.css`), built in three layers: a positioning wrapper that places, lifts and fades it, a float layer inside the wrapper, and a frame that holds the box and what rides its edges. The box is a Surface panel with no tail and no hard border: Text at the speech size and line-height 1.75 on Surface, gently curved (14px), at least 132px tall (never past the height cap) with 26px of room above the text and 30px below it, a single Float shadow, and the system's *only* sanctioned frosted backdrop (`blur(10px) saturate(1.1)`, for legibility). Under `prefers-reduced-transparency` the frost drops and the box takes Plate. The bubble is bottom-anchored at 16% over the character's lower band so the face stays unobscured and a fixed `min(34ch, 78%)` wide, so what rides the box's edges never moves with its text; the box is height-capped at 34vh, 28vh while the text input is open, never under three lines of speech, scrolls inside, and fades its top once it overflows. A line's own line breaks show. Inline links wear an Amber-soft underline that ignites to full Amber on hover/focus, the link text taking Amber ink. +Each card is a summary; read the Spec file of each component the change touches. -Speech types out at 40 ms per character as its text arrives, in every script, whether the voice is on or off. The voice plays independently. A blinking Amber caret follows the typing, and the box's Hairline swells to Amber-soft while it runs. A click on the box shows the rest of the line at once and leaves the voice playing; the box is its own pointer target while the rest of the bubble passes pointers through to the character. When the line has finished, an Amber-ink ▼ at the box's bottom-right corner nudges 3px on a 1.4 s loop; it marks the end only and pages nothing. While the box shows, the whole dialogue floats, a 3px rise and fall over 6 s. Under `prefers-reduced-motion` the line appears whole, nothing floats or nudges, and the border holds steady. +### Speech bubble -The name plate rides the box's top-left edge, half over it, in both modes: a 30px Plate chip with a Hairline edge and one Float shadow, carrying the character's face (its photo, else a dot in its hue) at 20px, the name, a 6px state dot and the state label. Beside the character it shows with the bubble, reads responding while speech streams, waiting for you with a steady dot while an Ask or Settings request card shows, and thinking while a turn runs, and has no dock button and no drag. A Backlog pill rides the box's bottom-left edge, half over it, mirroring the plate (Plate, a Hairline edge, Text dim at the sub size); it opens the current session's earlier lines in a Plate panel above the box: the user's under "You" and the character's under its name, at the body size in Text dim, oldest first, scrolling inside 12em and opening at the newest, under a Text-mute title at the caption size. The pill hides while the session has no earlier line. The bubble holds while the backlog is open, and every hide closes it. Older sessions stay in the settings History page. +The primary floating surface (`surfaces.css`), built in three layers: a positioning wrapper that places, lifts and fades it, a float layer inside the wrapper, and a frame that holds the box and what rides its edges. -A turn the user started opens the bubble at once with the user's message quoted on its first line: Text-mute text a step under the speech size, led by a "You" label in Text dim at weight 600 (a mic glyph marks a spoken turn), clamped to two lines with an ellipsis and closed by a Hairline when anything follows it. The reply types in below it, and the bubble holds through the turn's filler and takes its dwell once the turn settles; the line hides with the bubble. A turn that fails before any reply drops the line and puts the message back into the composer beside the inline error. A turn she started carries its trigger line in that slot instead, see Trigger line below. Two 1.5rem round buttons ride the top edge outside the box, the pop-out (arrows-out icon) and the dismiss (cross icon): Plate, a Hairline edge, one Float shadow and 0.75rem icons at stroke 2. They sit clear of the text and hold still while the box scrolls. They stay invisible until hovered or focused, and because the bubble passes pointers through for character drag, the buttons are their own pointer targets. Under the speech text the box carries a row of inline links, one per action — an in-place fix such as Connect on an unconfigured backend, Voice server not connected · Reconnect after a reply the voice server could not speak, or the first conversation's Hear the controls and Hear what she can do. The row sits outside the text's scroller, so the actions stay in view while a long line scrolls and add their height to the box; the links wrap to the next line with a 14px gap between them and 2px between the lines. Each wears an inline link's Amber-soft underline that ignites to full Amber, with the text taking Amber ink, on hover and keyboard focus, and a pointer target of its own. A busy action, such as Reconnect while it checks the server, reads in Text mute with no underline and a slow pulse, and takes no click. While the row shows, the bubble holds past its dwell and the dismiss button stays visible as its exit; the actions leave when the speech does. When "keep bubble until dismissed" is on the bubble never fades, and the buttons stay half-lit as its only exit. A message sent with attached Threads shows them under the quoted text as quiet pills, one per Thread: "Thread · title" in Text mute on a Hairline-strong edge, clipped with an ellipsis. +- **Spec:** [`docs/agent-guide/design/speech-bubble.md`](docs/agent-guide/design/speech-bubble.md) +- **Surface:** `src/ui/message` ### Trigger line + The trigger line is the quote slot's first line on a turn she started, in the signal-line style. It names a schedule cue by its time and label, an idle cue by its label, the first meeting, a screen switch, or another character's name. -A bundled turn adds the rest of its members and signal groups as `+N`, as in "09:00 Morning +2". A user turn quotes its message instead, and the reply that follows is the backend's. +- **Spec:** [`docs/agent-guide/design/trigger-line.md`](docs/agent-guide/design/trigger-line.md) +- **Surface:** `src/ui/message` ### Text input -A slim field summoned by hotkey, sliding up from the bottom (`surfaces.css`). Plate, 12px corners, and a transparent inner field set at the speech size with a Text-mute placeholder kept on one line. The field is multi-line. It starts at one line and grows with its content, up to six lines in the character window (growing upward, the bubble lifting with it) and twelve in the message window, then scrolls inside; Enter sends and clears the field, and Shift+Enter breaks the line. Attach, pop-out and send sit on the last line as three equal 2.125rem round icon buttons (paperclip, arrows-out, arrow-up; 1.05rem icons at stroke 1.5): transparent and Text-mute at rest, Amber ink on Amber faint on hover, and pressing in to 94% while clicked. The pop-out, between the field and send, moves speech and the typing session into the message window. While a turn runs, send becomes stop, a filled rounded square in Amber on Amber faint, and the field dims. At rest the border is a Hairline; on `:focus-within` it ignites to an Amber border plus an Amber-soft ring, the design's signature warmth moment. Submit failure shows a Danger inline message, never a side-stripe, and one action link after the message in the speech bubble's link treatment, an Amber-soft underline igniting to full Amber on hover and focus. The action follows the failure: Connect for an unconfigured backend; Change key for a refused key (401 or 403); Check connection for any other 4xx but 429, whose rate-limit line has none; Retry for a stall, and for a drop with no HTTP status or a 5xx. Change key and Check connection open Connection with the key field showing. Retry resends the field's text, edits included, and shows only while the field holds text or attachments; a failed typed turn returns its text to an open, empty field, so Retry has the text to send. Typing clears the message, and Retry stays while the field holds a draft. The unified chat window's composer offers no Retry, and a voice turn's failure goes to the status pill instead. Attached Threads sit in their own row above the image tray: one pill per Thread on an Amber edge, "Thread · title" in Amber ink at the caption size (600), clipped with an ellipsis, then an 18px round × that takes the Hover fill and an Amber-soft focus ring. A message of chips alone sends. + +A slim field summoned by hotkey, sliding up from the bottom (`surfaces.css`). Plate, 12px corners, and a transparent inner field set at the speech size with a Text-mute placeholder kept on one line. The field is multi-line. + +- **Spec:** [`docs/agent-guide/design/text-input.md`](docs/agent-guide/design/text-input.md) +- **Surface:** `src/ui/input` ### Message window -A separate always-on-top window (`message-window.css`) holding the speech bubble and the text input when the surfaces are popped out of the character window. 340px wide, anchored by its top-left corner and grown downward by its content: a name-plate handle, then the bubble, then the input. The plate is the bubble's name plate, here also the window's drag handle, with a hover-revealed dock button (arrows-in icon) that docks the surfaces back into the character window. The dot reads four states: idle — Text mute and dim, no label; waiting, an Ask or Settings request card showing — a "Waiting for you" label and the dot holding still in Text dim; thinking, a turn running with no speech streaming — a "Thinking" label on the plate, the dot breathing Text dim, and the input border slowly swelling to Amber with an Amber-soft ring; responding, speech streaming — a "Responding" label, the dot pulsing Amber, and the bubble border slowly swelling to Amber-soft. Under reduced motion nothing animates and the borders hold steady. The bubble tucks up under the plate's row so the plate rides the box's top-left edge and floats with it, except while the delegation list or the backlog is open; the box is height-capped at twelve lines in this window and keeps the frost, the caret, the scroll cap and the dismiss button on its top edge that it wears in the character window. Docked mode is the character-window layout, whose pop-out button beside the dismiss button pops the surfaces back out. The status pill stays with the character in both modes; the delegation chip follows the surfaces, riding the plate's row as a separate pill to its right while popped out and leaving the character window bare. The plate's row holds the plate and the delegation chip only. -The backend's reasoning shows in the message window alone, as a disclosure under the quoted line at the top of the bubble's box: a Text-mute "Reasoning" summary at the sub size, weight 500, with a chevron that turns a quarter when open, over the text at the body size in Text dim behind a 2px Hairline-strong rule, clipped at six lines and scrolling, with a blinking text cursor while it streams. Its cursor gives way to the speech caret once the reply streams. The disclosure stays closed, also while the reasoning streams: the first reasoning of a turn shows the bubble with the summary even before any speech, holding off the previous reply's dwell until the reasoning ends, and a click on the summary opens it. It closes once the reply lands. When the reasoning ends with no speech streaming or waiting on playback, the bubble takes the usual dwell (or the keep-until-dismissed hold), and hides at once when nothing is left to show, as after a stop mid-reasoning. Only the start of a reasoning stream reveals the bubble, so a dismissed bubble stays down for the rest of that reasoning. +A separate always-on-top window (`message-window.css`) holding the speech bubble and the text input when the surfaces are popped out of the character window. 340px wide, anchored by its top-left corner and grown downward by its content: a name-plate handle, then the bubble, then the input. -### Unified chat window -A frameless, transparent, always-on-top window (`unified-window.css`) holding one 340px column, shown while the Unified chat switch is on and two or more presets are open. The window takes the column's height and stays where it was dragged. Top to bottom: the cast row, one dialogue box, then the composer, 8px apart. +- **Spec:** [`docs/agent-guide/design/message-window.md`](docs/agent-guide/design/message-window.md) +- **Surface:** `src/ui/message` -The cast row is the recipient picker and the window's drag handle: a press on a chip picks, a press on the grip or the row's empty space drags. Each open preset has a cast chip: a 28px Plate pill with a Hairline edge and one Float shadow, carrying the preset's 22px face (its photo, else a dot in a hue taken from its id), the name at the sub size (600) in Text dim and a 6px state dot. Idle, the dot is Text mute at 55%; thinking, it breathes Text dim; talking, it pulses Amber and the chip's edge turns Amber-soft. The hue's lightness and chroma are `--yui-avatar-l` and `--yui-avatar-c` (Dawn 0.5 / 0.12, Hearth 0.78 / 0.12). An everyone chip in the same material, the word alone, follows the cast chips. The chips are one radio group with one tab stop, on the checked chip, else the first: a click picks that recipient and moves focus to the field, and the arrow keys, Home and End move between the chips and pick, focus staying on the row. The checked chip is the pick, else a typed leading `@name`, else, while a send runs, that send's recipient, else the last speaker, else main's preset, else the first open preset; it takes an Amber-soft edge on Amber faint with Text. The chips wrap to a second row when they do not fit. Two 28px rounds in the same material close the row: a grip of six Text-dim dots, which keeps its width however many chips there are, and the ×, which closes the window and turns the Unified chat switch off. While main's attached Threads show, every chip but main's and the everyone chip is disabled: dimmed to 55%, a not-allowed cursor, and skipped by the arrow keys. +### Unified chat window -The box is the message window's dialogue box in flow, and takes no room while it has nothing to show. Its name plate shows the face and the name of the character whose line is showing, without the state dot the cast chip carries, and a press on it drags the window, as in the message window. Lines play one at a time: a character's line waits until the line before it has finished typing, and a window opened mid-line shows from the next line. The user's quote leads with "You → name" or "You → everyone", and drops a leading `@name` that names that recipient; the backend receives the text as typed. The backlog lists the current session's lines of every open character, each led by its speaker or "You → name", the user's without a leading `@name` that names the line's recipient. +A frameless, transparent, always-on-top window (`unified-window.css`) holding one 340px column, shown while the Unified chat switch is on and two or more presets are open. The window takes the column's height and stays where it was dragged. Top to bottom: the cast row, one dialogue box, then the composer, 8px apart. -The composer is the message window's field without the attach button. Its placeholder names the checked chip's recipient ("Say something to Natsume…", "Say something to everyone…"). Typing `@` opens a list above the field, in flow so the window grows to hold it: each open preset with its 14px face, then `@everyone` with its sub-line, the active row on the Selected fill. While any turn runs, send becomes stop, and stop ends every character's turn. Speech goes where Enter sends and its quote carries the mic glyph, and a spoken send that the field's leading `@name` addressed consumes that token, leaving the field's other text; speech that arrives while any turn runs or a line holds or waits for the box lands in the field, unsent, and with barge-in on, starting to speak while a character runs ends every character's turn as stop does. A routed turn that fails shows its error under the field, with its fix action. While the window shows, every character's chat lines go here: the message windows hide, and each character's Separate message window row is locked with a Text-mute reason ("Off while the unified chat window shows"). Notices without a speaker stay in the character's own bubble. While main's attached Threads show, a one-line hint sits above the field on Plate, caption size in Text dim, saying the Threads go to main, the one character who can read them; the @ list offers only main, and a typed `@name` for anyone else is refused with the hint as the field's inline error. +- **Spec:** [`docs/agent-guide/design/unified-chat-window.md`](docs/agent-guide/design/unified-chat-window.md) +- **Surface:** `src/ui/unified` ### Status pill -One pill at the top edge of the character window (`chips/status-pill.css`) carries the three tells above the character: screen capture, voice input and the backend's running tool. While a Rest, a Focus or an active-hours quiet span holds her, it adds a fourth: a still moon with its label, with no dot and no pulse. The label reads "Resting · until 08:00", "Resting" with no end, "Focus · 18 min left" or "Quiet · until 12:00". It is centred at 4.5% from the top, 1.75rem tall and pill-shaped, with a Plate background, a Hairline edge, one Float shadow, Text dim label text at the sub size and weight 500, and 0.9rem line icons at stroke 1.5. It enters and leaves with an opacity fade and a 6px drift over `--yui-dur`. -The pill shows while capture is on, voice input is live, a tool runs or a failed turn's notice holds, and leaves once all settle and nothing holds her. With capture on and nothing else, it holds the capture icon alone, with a steady Amber point on the icon's corner as the always-on privacy cue; clicking the icon opens the settings panel. While voice input is live, a mic icon follows, then a Hairline separator, a dot and the voice state as the label. The dot pulses Amber while listening and transcribing, holds full Amber with a 2px Amber-soft ring once a turn fires, and turns Danger on error. A failed turn the input cannot show (a typed turn whose input has closed, or any spoken turn) puts its condition text on the label as a notice, with the dot holding Danger; a speech-bubble mark leads it when no mic shows. A keyed failure adds one action after the text as an inline link in the speech bubble's link treatment, the underline igniting to full Amber and the link to Amber ink on hover and keyboard focus: Connect, Change key or Check connection, each opening Connection, the last two on the key field. The notice holds for 60 s with an action and 3 s without; a new turn or a click on its action clears it at once. A blocked microphone keeps its voice label and, on macOS, offers Open mic settings in the same place, which opens the Microphone privacy pane, with a Text-mute glyph after the link; a notice or a running tool takes that place first. When the backend sent the server's own text for a failed spoken turn, that text takes the label in place of the state word. It stays on one line and ends in an ellipsis where the pill's width runs out, and the pill widens to the window's width less 1.5rem to give it room. +One pill at the top edge of the character window (`chips/status-pill.css`) carries the three tells above the character: screen capture, voice input and the backend's running tool. While a Rest, a Focus or an active-hours quiet span holds her, it adds a fourth: a still moon with its label, with no dot and no pulse. -While the backend runs a tool, the tool's label takes the segment and the dot pulses Text dim, keeping amber out of work. The mic icon stays and turns Danger itself when voice input is in error. At completion the dot solidifies into an Ok checkmark and holds 1.5 s with the tool's label, then the segment falls back to the voice state or the pill leaves. The capture icon and the notice's action take pointer events; everywhere else clicks pass through to the character. Under reduced motion nothing pulses and the pill fades in place, and the label and dot colour carry every state. +- **Spec:** [`docs/agent-guide/design/status-pill.md`](docs/agent-guide/design/status-pill.md) +- **Surface:** `src/ui/chips` ### Boot-failure notice -A dismissible floating notice (`boot-error.css`) shown when config or VRM loading fails and the transparent window would otherwise stay blank. Plate, Text guidance, and a single Float shadow preserve the legible-on-anything doctrine; a Danger uppercase title names the failure, and a quiet dismiss button removes the notice. -### Character menu -A right-click on the character opens the Character menu around her. The menu draws in its own window, the Character menu window, beside her, and the pet window never changes size for it. It is built without React, as the pet window is. Left click stays the tap gesture, and there is no long-press. Esc, a click outside the menu, a click in another app, or a closing action closes it. It never times out. - -Two pill columns flank her, 88px from her centre, under one shared top. Talk, Rest, Listen and Settings sit on the right. Body, Voice, Pace and More sit on the left. Pills in a column share one width, and the gap between pills is 8px. Near a screen edge, the menu folds to one column on the open side. - -The columns' top is set once when the menu opens, from the tallest list it can show, so swapping lists never moves the columns. It sits at her head, unless that would bring a column within 8px of the window bottom or the work-area bottom, whichever is higher. Then both columns shift up together. - -When the shifted columns would start less than 8px below her window's top, the menu window also reaches above hers. The menu window is hidden when the menu closes. Body ›, Voice ›, Pace › and More › replace their column in place with their list and a "‹ Back" row. A second level never opens as a column outward. +A dismissible floating notice (`boot-error.css`) shown when config or VRM loading fails and the transparent window would otherwise stay blank. Plate, Text guidance, and a single Float shadow preserve the legible-on-anything doctrine; a Danger uppercase title names the failure, and a quiet dismiss button removes the notice. -Each pill is a line glyph and a label of one or two words. Pills follow an 8px grid: 36px tall, with an 18px icon and a 13px label at weight 600. The accessible name is the glossary term, so Rest is named "Do-not-disturb". +- **Spec:** [`docs/agent-guide/design/boot-failure-notice.md`](docs/agent-guide/design/boot-failure-notice.md) +- **Surface:** `src/ui/notices` -The top level holds Talk, Rest ›, Listen, Body ›, Voice ›, Pace ›, Settings and More ›. More holds Threads with its waiting count, Keep bubble, Unified chat, Terminal, Reset chat and Turn off. An item that cannot act in a window is hidden: Listen shows in the main window only, and Turn off shows only in a bound pet window. The Threads chip on the character opens Threads while something waits. +### Character menu -Rest › replaces the right column with its list, and a "‹ Back" row returns to the top level. While a Rest or Focus runs, the list opens with a status row, such as "Resting until 08:00" or "Focus · 18 min left", then End now. The running choice is not listed again. +A right-click on the character opens the Character menu around her. The menu draws in its own window, the Character menu window, beside her, and the pet window never changes size for it. It is built without React, as the pet window is. Left click stays the tap gesture, and there is no long-press. -The choices follow: For 1 hour, Until tonight, Until tomorrow morning, Until I turn it off, a divider, then Focus 25 min and Focus 50 min. Until tonight is not offered from 00:00 to 07:59. No row shows an end time: the Rest pill does, as "Rest · 08:00" or "Focus · 18 min", and "Quiet · 12:00" in a quiet span. +- **Spec:** [`docs/agent-guide/design/character-menu.md`](docs/agent-guide/design/character-menu.md) +- **Surface:** `src/ui/character-menu` -Body › lists her bodies, and Voice › lists the voices, at most five each with the current one always among them, so no list column exceeds seven rows. Each list marks the current choice with a check and ends with a "More…" that opens that settings page. Pace › sets the base pace, which GLOSSARY.md defines: Less, Normal or More. A pick applies at once. The menu then returns to the top level and stays open. Toggles inside More keep More open. Talk, Settings, a trailing "More…", Threads, Terminal and a confirmed Turn off close the menu. +### Settings stage -Reset chat and Turn off morph in place into "Sure?" and "Cancel", with focus on Cancel. +The settings window is her stage. A stage area sits on its left and holds her name and her state. The stage is a column on the window's left, on `--yui-stage-bg`, with the panel beside it. -Focus goes to the first pill when the menu opens, and focus stays inside the menu while it is open. Arrows, Tab and Shift+Tab move in reading order, and Home and End also work. Enter or Space picks. In a second level, ← or Esc goes back, and Esc at the top level closes the menu. Keys act at once, with no motion. The menu adds no global shortcut. +- **Spec:** [`docs/agent-guide/design/settings-stage.md`](docs/agent-guide/design/settings-stage.md) +- **Surface:** `src/ui/settings-stage` -The plate is opaque, with a hairline edge and one Float shadow, and it has no glass. Amber marks ON states and focus only. Both columns enter together from her chest, scaling up from 0.92 as they fade in over 200ms, with no stagger, and her name only fades in. A click outside it or in another app sends everything back toward her chest at once in 140ms, and the window restores after. A right-click on her during that exit takes it back. Esc and a closing pick close it at once. +### Settings row + switch -A list swap by the mouse crossfades. The old column fades out in 140ms, moving 8px away, while the new one fades in over 200ms, moving 8px in: from the right for a list, from the left for Back or a pick that returns to the top level. Under reduced motion the menu only fades, at the same durations. In the transparent pet window, the pills take pointer input, but not those of an old column or of a menu in its exit, and the area around them passes clicks through. +The settings panel (`quick-controls.css`, its controls in `controls.css`) is a rail beside a column of sections. -### Settings stage -The settings window is her stage. A stage area sits on its left and holds her name and her state. The stage is a column on the window's left, on `--yui-stage-bg`, with the panel beside it. Its top is the stage slot: the largest 2:3 box that leaves the foot 80px and the panel 480px, from 373 × 560 to 600 × 900 in whole px, so her 341px input always fits. The column is the slot's width and follows each step of a window resize. The window opens at 1160 × 680 below the title bar, where the slot is 400 × 600, and its minimum is 880 × 640. A panel 480px wide or less takes its narrow layout, and under 680px tall the stage foot folds to one line. The foot names the window's own character, the bound one or else main's, at the title size (600) over her transport and window state in Text mute, in the words of her character header item; folded, the name sits at the head size with the state after a `·`. The stage's tuning values (the stay chance, the last backend emotion's decay, the travel time and the carry distance) have defaults in the `stage` section of `configs/avatar.json`. The backend may also receive an opt-in `settings opened {page}` event, which is off by default and switched in Proactive › Advanced; the backend decides whether she says anything. +- **Spec:** [`docs/agent-guide/design/settings-row-switch.md`](docs/agent-guide/design/settings-row-switch.md) +- **Surface:** `src/ui/quick-controls` -She comes along when the settings window opens, and she returns home when it closes. Her entry comes from the entry family for her last backend emotion, as the table below sets it. Once she is set down she plays one entry clip of the family, picked at random and never the family's last one twice in a row, then idles. By default, after 30 minutes without a new emotion, her emotion decays to neutral. A backend that sends no emotion is always neutral. The client holds this table and computes no mood of its own. +### Plugins page -| Family | Emotions | Entry clips | -|---|---|---| -| Glad | happy, surprised | `excited`, `wave_1`, `peek_in`, `gaow` | -| Plain | neutral, relaxed, curious, thinking, and any emotion no family lists | `wave_3`, `bow`, `peek_in`, `calm`, `peek` | -| Glum | sad, sleepy, embarrassed | `yawn`, `idle_10` | -| Sulking | angry | with a default probability of 60% she stays on the desktop and plays `sulk`, and nothing on the Settings stage explains it; otherwise she comes along and plays `sulk` on the Settings stage | +The Plugins page (`quick-controls/plugins/plugins-page.css`) is two sections, **Installed plugins** then **Available plugins**, over the host's snapshot and the catalog. -On her own monitor within `carry_full_pt`, 1200pt by default, she is carried. The `drag` motion crossfades in, the window holds still for 200ms, then it moves in 600 to 900ms by distance on an ease-in-out curve, slow at the start, faster through the middle, slow again on arrival, with her facing front. Her window's size and her framing ease on the same curve to the slot's and the stage's, her feet on the eased path, so she arrives filling the slot; when she vanishes, or fades under reduced motion, both change while she is hidden. She is set down with no landing bounce, and the next motion crossfades from `drag`. The window is usable at once. Farther away or on another monitor she is picked up the same way, vanishes in a short fade and appears with the landing bounce. Under reduced motion she fades out and fades in, with no pickup. Motion switches blend with the mixer's crossfade; opacity fades only vanish and appear. Reactions use ease-out curves, and motion never blocks input. +- **Spec:** [`docs/agent-guide/design/plugins-page.md`](docs/agent-guide/design/plugins-page.md) +- **Surface:** `src/ui/quick-controls/plugins` -`peek_in` and `peek` play at the panel edge: the stage peek pin holds her hips beyond her window's right edge, 0.06 and 0.12 of her height, eased in during the carry. `peek_in` plays to its end and `peek` hands over to idle at 11.5s, and the pin eases back to the centre over 600ms. Under reduced motion it snaps. +### Quick start -Closing the settings window carries her home to her spot at her desktop size and framing, as she left it, or, when it is far or on another monitor, she vanishes and appears there; she is set down and idles with no clip. Minimizing returns her too, and restoring the window brings her back onto the stage. Losing focus keeps her docked. If her monitor is gone, she lands on the floor line of the nearest monitor. +The Connection page (`connection/connection-page.css`) carries two views under one switch at its top: **Quick start** and **Detailed settings** as the two cells of the panel's neutral segment control, one checked cell holding the tab stop, a click, Space or Enter, or the arrow keys, Home and End choosing between them, exactly one view showing, and the choice lasting while the window is open. -While the settings window is open, she is docked into it as a native child at normal level: her window is the stage slot, her feet on the stage foot's top line, and it follows the slot live as the settings window resizes. She fills the column: the stage frames her by her height alone, head-on, without her wheel zoom, so every model stands about 90% of the column's height. Neither the wheel, Ctrl+wheel nor Shift+drag changes her on the stage, and neither her stored zoom and angle nor a stage size is saved. On macOS she follows the window with no lag, and other apps can cover both windows. Her speech bubble and text input stay with her while she is docked, so the user can talk while changing settings. Closing settings undocks her, and focus returns as it does for any closed window. On Windows she follows the settings window's moves and stays above other windows. +- **Spec:** [`docs/agent-guide/design/quick-start.md`](docs/agent-guide/design/quick-start.md) +- **Surface:** `src/ui/quick-controls/connection` -Whoever moves her owns her. If the user drags her or an agent moves her while she is on the stage, she leaves it and stays where she is dropped, and that settings window does not bring her back until it closes or minimizes. She takes her desktop size back, about her window's bottom centre: at a drag's drop, before the drop settles, and before an agent's move. If the settings window opens while the user drags her or an agent command runs, she stays where she is that time. +### Faces and the photo dialog -She reacts once when she enters a settings page, and again when a shown change (body, voice or pace) appears. Then she idles. Fast page flicks skip the reaction. The other reactions use existing clips. +A preset's face is a circle: its photo, else a dot in a hue taken from its id. A photo shows the square its crop stores, with the preset's hue behind any transparent pixels; a photo with no crop shows centred. -| Page | Reaction | -|---|---| -| Connection | `thinking` | -| Voice | `happy` | -| Persona | `calm` | -| Body | a model spin, done in code | -| History | `thinking` | -| Together | `laugh` | -| Listening | the `curious` emotion | -| Permissions | `cover_eyes` (new clip) while screen watch is off | -| Proactive | Less: `sleepy`; Normal: `idle`; More: `idle_lively` | -| Motion | previews the motion she plays | -| General | a wave clip | +- **Spec:** [`docs/agent-guide/design/faces-and-the-photo-dialog.md`](docs/agent-guide/design/faces-and-the-photo-dialog.md) +- **Surface:** `src/ui/quick-controls/preset/photo-dialog` -### Settings row + switch -The settings panel (`quick-controls.css`, its controls in `controls.css`) is a rail beside a column of sections. The rail is 10rem with text labels: a search field on top, then two titled groups, the edited character's pages (Connection, Voice, Persona, Body, History) under the character's name and every character's pages (Together, Listening and bubble, Permissions, Plugins, Proactive, Motion and desktop, General) under "Every character", each heading in Text mute at the caption size (600), General pinned to the bottom. On the rail Up and Down select the previous and next page, wrapping at the ends, and Home and End the first and last; Left and Right do nothing. While a search is set each rail item shows its match count in Text mute, a page with none dims, a matching row takes the `--yui-selected` fill, and a query opens each fold that holds a match, which clearing the query folds again. A panel at most 30rem wide (the panel at its narrowest, the window at its 880px minimum) turns the rail into 3rem of icons, each page named by its `aria-label` and tooltip, the headings into one Hairline between the groups, and hides the search field; a row's control wrapped under its label spans the row. Each page opens with a Text-mute scope line, "Applies to {name} only" or "Applies to every character", over a 1.25rem title (600, letter-spacing -0.015em); the Connection page hides it while Quick start shows. A section is a 0.875rem title (600) with an optional control or state text at its right, an optional Text-mute note, and one or more groups. A group is one borderless surface (`--yui-group-bg`, 12px corners) whose rows are split by a Hairline. A row is at least 3rem tall with 0.625rem × 0.875rem padding: a 0.8125rem label (500) over a 0.75rem Text-mute sub-line on the left, its control on the right. An add row closes its group with a plus and a text button. The General page opens with the Help section, then the Language row, then the Appearance row, then the Text size row, then Your name. The Appearance row is a three-position segment (Dawn · Hearth · Follow system) in the same segment control as Language, and the Text size row a five-position one (90% · 100% · 112.5% · 125% · 140%) over a sample line at the speech size on a Surface card with a Hairline edge; either choice applies to every open window at once and persists. A segment's cells wrap to a new line when its row has no room. The Proactive page opens with How often she speaks up, a three-position segment (Less · Normal · More) directly on the section, over a 24-hour track of her day: each pace run's word, the greeting marks, and her 24px face at now. A check-in line under the track lists the quiet-for-a-while minutes at the chosen pace, and its marks re-space when the segment changes. A Text-mute foot line says scheduled greetings keep their times at every pace, then a link to Persona › Active hours. Under What she reacts to, each of five source groups (Quiet for a while, Scheduled greetings, Screen changes, Thread reactions, External signals) is a switch row over a fold. While its switch is off the fold's rows dim to half opacity, staying editable, and its summary reads Off in place of the aside, with no off line. The External signals fold holds Thread turns, the listener port and address, and Workflows: an add button that opens a form, and an inline delete confirm that moves focus to Cancel, with its fields on the inset Hairline. Every number row on the page has a 5.5rem field and a 3rem unit slot, except the cue rows' minute fields. Advanced closes the page folded, the speaking-up limit before the urgent one. Selection is neutral: the selected rail item and the checked segment cell take the `--yui-selected` fill with Text at 600, and a checked radio tick fills with Text. The switch (2.25rem track) is the one control that keeps amber, calm and grey when off (`--yui-track`) and a full Amber track with the knob (`--yui-knob`, shadowed in `--yui-knob-shadow`) slid right when on (`aria-checked="true"`). While a plugin's step-1 consent is open its switch stays off: the consent panel under the row is the pending state, and the switch or **Cancel** closes it. A checkbox (`controls/checkbox/`), the Express motion group's master, is drawn as the switch: on and off as the switch's, and a partly-on group (`aria-checked="mixed"`) lights the left half of the track in Amber with the knob at the centre. A slider (`controls/slider/`) is a 4px pill track on `--yui-track` with an Amber fill up to the value and a 14px knob (`--yui-knob`, shadowed in `--yui-knob-shadow`) that stays inside the track's ends; hovering or dragging adds a 4px Amber-faint ring around the knob, and keyboard focus a 2px Amber-soft one. Fields sit on `--yui-field` with a transparent edge at rest, a Hairline on hover, and an Amber border plus an Amber-soft ring on focus. A focused button shows a 2px Amber-soft ring. One tooltip at a time names a control: it opens below the control after a 150 ms hover, or at once when the keyboard moves focus there, and never on a focus the window moves itself (opening, a page request); a press or the pointer leaving closes it, and Escape on the focused control closes the tooltip alone. The Together page carries the Unified chat switch, which lets main open the unified chat window while two or more presets are open, and the Characters list: one row per character with a 28px face, the name over its state in Text mute, and an "On the desktop" switch. Main's switch, and a bound window's own, is locked on; with four on the desktop an off row's switch is disabled and a Text-mute line gives the reason. A control the push transport cannot use stays in place, disabled, with a Text-mute reason under its label and a "Change transport" link in Amber ink. In the settings window the preset row is the character header: one button per character with a 28px face, the name (600) over its transport and window state at the caption size in Text mute; the edited one takes the `--yui-selected` fill, one in no window sits at 55% opacity and stays clickable, and the manage button closes the row. Where a native picker exists, each row of the preset manage list carries a photo button beside rename; it opens the photo dialog, after the picker when the preset has no photo yet. The panel's disclosures are the filler's More phrases, the card's Advanced fields, the Proactive page's Advanced and each source fold on that page, each a chevron summary over its content and closed by default. +### Type dropdown (`yui-select`) -### Plugins page -The Plugins page (`quick-controls/plugins/plugins-page.css`) is two sections, **Installed plugins** then **Available plugins**, over the host's snapshot and the catalog. A section head carries its state text or link at the right at the sub size: **Check for updates** as a link button in Text dim, **Checking…** with its spinner in Text dim, or the result **Updates: n** / **All up to date** in Text mute; the catalog's note and the Installed section's "Tools declared to every character's backend: n" foot sit in Text mute at the sub size. +The shared Select (`controls/select/`, on Base UI's Select) is the type and provider picker in the Connection page's sections and the pace picker of Persona's active hours. -A plugin is one group. Its head is a row with the plugin id as the label, at 0.8125rem and weight 500, beside the source badge — a pill on a Hairline edge with a 0.7rem icon, caption size, weight 500, Text dim — and the version in Text mute at the caption size in tabular figures; the description follows as an ellipsized sub-line on the same row. The switch closes the row. Server lines below it are at least 2.5rem tall: a 7px status dot in Text mute, Ok with an Ok-soft halo when running, Danger with a Danger-faint halo when failed or exited, and at 55% opacity when off; a starting server shows the 7px spinner instead. The server name is body size at weight 500, its state at the sub size in Text mute with the state word in Text dim at 600, the reason in Text dim, and **Retry** or **Restart** as a link button. The hidden-name note is Text mute at the sub size, one line per kind and holder — "Hidden tool a, b: a built-in tool uses this name" or "…: holder uses this name first" — with each hidden name in Text dim at 600. The tools disclosure is a full-width chevron row in Text dim at the sub size and weight 500, its 0.875rem chevron turning a quarter when open, over a list indented 2.05rem: a tool or skill name at the body size and weight 500 over its summary at the sub size in Text mute, with a **Skills** caption in Text mute at weight 600. The log disclosure opens a grid under it: the tail as a scrolling block of at most 8.5rem on `--yui-field` at `--yui-radius-control`, caption size, line-height 1.5, Text dim and tabular figures, and a foot in Text mute at the caption size carrying "Last lines: n" and **Open log folder**. The action row that closes the group holds **Log** on the left, then **Update to v…** or the **Updating…** spinner or a local plugin's folder path in Text mute, and **Delete** or **Remove from list** pushed to the right. **Log**, **Update to v…**, and **Delete** / **Remove from list** are link buttons at the sub size; the **Updating…** spinner and the folder path are plain text. +- **Spec:** [`docs/agent-guide/design/type-dropdown-yui-select.md`](docs/agent-guide/design/type-dropdown-yui-select.md) +- **Surface:** `src/ui/controls/select` -The consent panel opens inside the plugin's group, under its switch row, on the hover fill with 0.875rem padding (0.75rem at the foot). Its step line is two 3px bars on `--yui-track`, the reached one Text dim, with "1 / 2" at the caption size, weight 600, in tabular figures. The question is body size at weight 600. The facts are a two-column grid, 4.5rem of Text-mute labels at the sub size against Text values, holding the source badge with its review note and folder, the version, and the launch command on a `--yui-field` block at `--yui-radius-control`; a panel at most 30rem wide stacks the facts under their labels. A shield line in the Permissions page's shield icon and, for a community or local plugin, a warning line follow at the sub size in Text dim with 0.95rem icons, the community warning in Danger; **Cancel** and **Allow** close the panel as pills, **Allow** in Amber ink on an Amber-soft edge. Step 2 lists the declared tools and skills in the same list, with a Text-mute note that the backend decides whether to call a tool; a failed start shows the failed server lines and **Turn off** / **Keep on** instead. +### Session history accordion -Errors are inline lines on Danger faint at `--yui-radius-control`, sub size, with a 0.85rem warning icon and every word as sent, the plugin's and the host's alike; a **Retry** link at the right takes Danger and an underline. The catalog repeats the plugin row with an **Install** pill on its side or an **Installing…** spinner, and closes with an add row holding a plus and **Add from folder…**; while the catalog loads, two skeleton bars breathe on `--yui-hover` and `--yui-selected` under the loading status. +The settings panel's History page (`quick-controls/history/history-section.css`), a read-only record. The sessions are rows of one group. Each collapsed row carries its start time, the first thing you said (ellipsized) and its message count. The current session sits at the top, open by default, and older ones expand in place on click (`aria-expanded`). -### Quick start -The Connection page (`connection/connection-page.css`) carries two views under one switch at its top: **Quick start** and **Detailed settings** as the two cells of the panel's neutral segment control, one checked cell holding the tab stop, a click, Space or Enter, or the arrow keys, Home and End choosing between them, exactly one view showing, and the choice lasting while the window is open. Detailed settings holds the Connection page's sections under a Text-mute note that the server, model and voice servers are chosen by hand. Quick start (`connection/quick-start/quick-start.css`) is two sections of the panel's rows, what is sent and the daily limit before the key, with the key's label on its own line over the field and a Connect pill; the key field carries an inset Hairline, so it stays visible on Dawn's light group. A note above the sections says that connecting with the key replaces the current server with Google Gemini, on Amber faint at the group's corners, and shows only while a server other than Gemini has its URL set. While the key is read, the field and the pill lock over a Text-mute line led by a dot that pulses, and holds still under reduced motion. A refused key or a failed read on Connect shows a line on Danger faint at `--yui-radius-control`, the sub size in Text with a 0.85rem Danger icon; a refused key adds the key page link. A confirmed key replaces both sections with the connected state: the done line, an Ok check before Text at the body size and weight 500 on `--yui-group-bg` at the group's corners, reading "Key replaced" after a replacement, over a group that holds a Key row (the label Key over its sub-line, and a Change key link button at its right). Change key opens the paste row over the field alone, and its confirmed key writes only the key, leaving the server, the model and the rest as they are. The stored key is checked again each time the connected view shows and when the window regains focus, reusing an answer on the same key from the last minute; a key that the check refuses swaps the done line for the Key rejected line, a Danger-faint line with a warning icon at the body size, which hides the Key row and opens the paste row, with the key page link row above it. While the paste row is open over a key that passed its check, a sub-size Text-mute line, "This key still works.", sits under the field. The connected state then continues with the voice step and then the Help section. The voice step mirrors the key section: its label line, field and Turn on voice pill, with the checking, refused and failed lines spanning the row, and Maybe later as a link button beneath it. Its result lines share the done line's look, one sentence on `--yui-group-bg` at the group's corners. Once a TTS server is set, the step gives way to the configured line, a sentence that voice is on; a confirmed key shows the voice-is-on line in the same place. The Help section holds a third row, First conversation, with a Replay link button beside the two guide rows. Under the STT and TTS sections' rows the same status line carries the server's dot and state: Connected · {host}, Connecting…, the refused key with no action, where Could not reach and did not answer in time add Reconnect, and the chat line's model read adds Reconnect on those two states; a TTS check answered with an error status other than 401 or 403 lights the same Danger dot with "The server returned an error ({status})" and no Reconnect. +- **Spec:** [`docs/agent-guide/design/session-history-accordion.md`](docs/agent-guide/design/session-history-accordion.md) +- **Surface:** `src/ui/quick-controls/history` -### Faces and the photo dialog -A preset's face is a circle: its photo, else a dot in a hue taken from its id. A photo shows the square its crop stores, with the preset's hue behind any transparent pixels; a photo with no crop shows centred. One renderer draws every face, at 36px in the Card section, 28px in the character header and the Characters list, 20px on the name plate, and 14px to 22px in the unified chat window. +### Delegation list -The photo dialog (`photo-dialog.css`) is a modal on the settings window: Panel background, a Hairline edge, the window's corner radius and one Float shadow, over a backdrop in the crop shade. The title, "Photo for name", sits at the title size (600) with a Text-mute caption hint on its baseline. On the left, a 360px stage on the crop stage colour holds the photo under a 300px circle: a 2px ring in the crop ring colour, the rest of the stage under the crop shade. A drag moves the photo, and the circle always stays covered. Under the stage sit a Zoom slider (1× to 7×, its value in tabular figures) and three pills: Fit the face, Whole photo, and Choose another…. On the right, "Where it shows" lists live previews at 36, 28, 22 and 20px with the place each size appears, in Text dim at the sub size. The foot carries Cancel and Use photo, both pills; Use photo is in Amber ink on an Amber-soft edge. A photo that cannot be read shows a Danger line and disables Use photo. Escape closes the dialog only. +The backend's delegated work as rows (`chips/delegation-rows.css`), shared by the chip's popover beside the avatar and the Session section of the settings panel's History page. -### Type dropdown (`yui-select`) -The shared Select (`controls/select/`, on Base UI's Select) is the type and provider picker in the Connection page's sections and the pace picker of Persona's active hours. Its trigger is a button without OS chrome: a `--yui-field` fill with a transparent edge, `--yui-radius-control` corners, the value at the body size cut with an ellipsis, and a chevron data URI in the Text-mute colour (--yui-chevron, one per theme). Hover adds a Hairline, and `:focus-visible` ignites an Amber border plus an Amber-soft ring (the same warmth moment as the text input). A `--single` variant for inert one-option sections is disabled, drops the chevron and the hover Hairline, dims the text to Text dim, and shows a default cursor. +- **Spec:** [`docs/agent-guide/design/delegation-list.md`](docs/agent-guide/design/delegation-list.md) +- **Surface:** `src/ui/chips` -The popup opens over the settings content with the selected item over the trigger: Panel background, a Hairline-strong edge at `--yui-radius-control`, one Float shadow, and a height held to the room in the window. Items sit at the body size; the highlighted one takes the hover fill and the selected one the selected fill at weight 600. Escape closes the popup alone, and a popup closes when the page switches the view that holds it or the rail switches to another page. +### Signal chips -The chat type row's closed trigger shows the short type name as its own text, while the popup carries the long names, which say who keeps the conversation history. A description line under the row follows the selection in the Text-mute sub size and fades in over `--yui-dur-fast`; its one inline link wears the speech bubble's treatment, Text on an Amber-soft underline that ignites to full Amber, with the text taking Amber ink, on hover and keyboard focus. +One pill per signal group in the chip column at the avatar's upper right (`chips/signal-chips.css`), above the delegation chip and in its pill family: a dot in the delivery class's colour (a Danger dot with a pulsing halo for urgent, a steady Amber ring for batched), the source in Text, the label in Text mute, and a cross that dismisses it. -### Session history accordion -The settings panel's History page (`quick-controls/history/history-section.css`), a read-only record. The sessions are rows of one group. Each collapsed row carries its start time, the first thing you said (ellipsized) and its message count. The current session sits at the top, open by default, and older ones expand in place on click (`aria-expanded`). An open session's start time turns 600 and its messages read as a script beneath it: a three-column row per message (speaker · text · time) where the character's name, in Amber ink, is the only amber in the list. A Text-mute footnote on retention and local-only storage follows the group, and the start-fresh row sits in its own group below. +- **Spec:** [`docs/agent-guide/design/signal-chips.md`](docs/agent-guide/design/signal-chips.md) +- **Surface:** `src/ui/chips` -### Delegation list -The backend's delegated work as rows (`chips/delegation-rows.css`), shared by the chip's popover beside the avatar and the Session section of the settings panel's History page. Each row is a dot, an ellipsized title and a tabular-nums time: the dot is Amber while the work runs, Ok once it finished, Danger when it failed and Text mute when the outcome cannot be verified; the time reads the elapsed minutes while running and "Done · 4m ago", "Failed · 4m ago" or "Outcome unverified · 4m ago" after. The character window's popover pins its right edge 8px inside the window's right edge, so the full list stays inside the window at any window width. In the Session section the rows list the client's persisted history as a stacked row of the section's group under the context readout, and a finished row that carries a summary is a chevron disclosure (`aria-expanded`) opening the worker's summary and "Took 12m" underneath; the popover's rows never open. +### Chip column -### Signal chips -One pill per signal group in the chip column at the avatar's upper right (`chips/signal-chips.css`), above the delegation chip and in its pill family: a dot in the delivery class's colour (a Danger dot with a pulsing halo for urgent, a steady Amber ring for batched), the source in Text, the label in Text mute, and a cross that dismisses it. Urgent chips come first, newest first, one row each, and never fold. The batched chips share the next row: the newest one, its cross replaced by "+N", which unfolds the rest in place with their crosses and a Collapse pill after them; past eight rows that list scrolls inside, the urgent chips staying above it. A tap opens the group's details sheet under the column, 18rem wide and pinned 8px inside the window's right edge, moving up only as far as needed to stay 8px inside the window's bottom edge (covering chips or the character if it must) and, when taller than the window minus 8px at top and bottom, capped to that height and scrolling: the source line, the kind, the label, the received time, what YUI said or "Did not speak" in Text-mute italic, and the raw items. One sheet shows at a time and Escape closes it. A batched chip leaves 30 minutes after it arrived; an urgent chip stays until dismissed. A held press folds every signal chip to its dot together with the delegation chip. In a chip column narrower than 9rem the delegation chip stays folded to its dot and count, and a held press's unfold leaves it folded there; in the message window it keeps its label. The urgent dot's halo pulses, not the dot, and the pulse stops under reduced motion. While do-not-disturb is on, the urgent dot does not pulse. +The strip at the avatar's upper right (`surfaces/surfaces.css`) holds, top to bottom, the urgent signal chips, the batched signal row, the Threads chip and the delegation chip. -### Chip column -The strip at the avatar's upper right (`surfaces/surfaces.css`) holds, top to bottom, the urgent signal chips, the batched signal row, the Threads chip and the delegation chip. While the speech bubble, or the shown Ask card or Settings request card, shows, the column slides up over 200ms until its last row ends 8px above that surface's top edge, its top no closer than 8px to the window's top. The rows that still do not fit hide from the bottom up, never an urgent chip, into one "+N" row in the signal pill's look that counts what they hold and takes no clicks; they return once the surface is gone. When the urgent chips leave no room above the surface for the "+N" row, every other row hides and no "+N" row shows. While the Character menu is open, the column fades out over 140ms, takes no clicks, and fades back once the menu has gone. When the column's own width, inside its left padding, is under 9rem (a pet window under 400px), every chip shows only its dot and its count: a signal pill its dot, the grouped batched row its batched total, the Threads chip its count badge and the delegation chip its dot then its count in a signal-pill-tall pill, while the "+N" row keeps its "+N", an open batched list keeps its Collapse pill as a minus, and a tap opens each chip as at full width. The grouped row's accessible name always ends with how many more it holds. Under reduced motion the column moves at once. +- **Spec:** [`docs/agent-guide/design/chip-column.md`](docs/agent-guide/design/chip-column.md) +- **Surface:** `src/ui/surfaces` ### Threads chip -The main character's pill for waiting Threads (`threads/chip/threads-chip.css`), in the chip column between the signal chips and the delegation chip and in their pill family: 32px tall on Plate with a Hairline edge and one Float shadow, Text dim at the sub size (500). It carries the source marks of up to three newest waiting Threads, newest first, as overlapping 22px Panel circles on a Hairline strong edge; the label; and the count as an Amber badge, 20px, Ink at the caption size (600) in tabular figures. A source outside the known table shows its first letter as the mark and its raw name. In a narrow column the label ellipsizes first. In a chip column narrower than 9rem the chip shows only the count, so it stays inside the window. The chip hides while nothing waits and its edge turns Amber-soft on hover. When a Thread or a request starts waiting it wiggles once, a damped rotation of −7° → 6° → −4° → 2° → 0 over 520ms; it never pulses, and under reduced motion it holds still. While do-not-disturb is on, an arrival does not wiggle it. A held press folds it with the other chips to its newest mark and the count (the count alone in a chip column narrower than 9rem). A tap opens the Threads window. The chip hides while the window is open. -### Threads window -A frameless window (`threads/window/`) that moves on its own and is not kept on top: other apps can cover it. Its first open places it 12px beside the main character's window on the side with more free screen, kept 12px inside the work area. After that it reopens at the frame it was left at; a frame no longer on a monitor moves into the work area of the nearest one. Dragging the head moves it, and the frame is remembered once the move settles. One panel fills it inside a transparent 8px margin: the Threads base at 98.5% opacity, a Hairline edge, the floating 14px corners and one Float shadow. It grows out of the chip: the panel clipped from a chip-sized pill at its edge nearest the chip to its own rect over 280ms, then the content fades in over 120ms. When the main character opens it for a Thread reaction, the content's fade runs beside a jelly: the panel stretches wide, then tall, then settles about its top edge over 560ms, never past the 8px margin. A user's open grows without it. An open while it shows brings it to the front without the grow. When she raises it for a Thread reaction, the panel hops 8px up, dips 3px and settles over 480ms, inside the margin. Closing (×, Escape) fades the content out over 90ms and shrinks the panel back over 220ms before the window hides. Blur leaves it open. Under reduced motion it shows and hides at once. - -Its edges (8px) and corners (14px) resize it, with resize cursors, from an 880 × 680px panel by default down to 360 × 420px and up to the work area less 12px on every side; a work area too small for the minimum gives it the work area less 12px. While a resize lasts, a pill at the panel's centre reads the panel's size and layout ("640 × 560 · Medium") in Text mute on Threads head, tabular figures, with a Hairline edge. The size is remembered with the frame, never below the minimum. +The main character's pill for waiting Threads (`threads/chip/threads-chip.css`), in the chip column between the signal chips and the delegation chip and in their pill family: 32px tall on Plate with a Hairline edge and one Float shadow, Text dim at the sub size (500). -The head, on Threads head, is the drag handle with a grab cursor and holds a sidebar toggle, the title at the title size, the waiting count in Text dim, the Thread turns button, and a round × button. The Thread turns button is a 30px pill of a 15px bell and "Thread turns: {level}" at the sub size (500): a Hairline edge in Text dim while Thread turns is Off, else an Amber-soft edge in Amber ink. It opens a 280px popover under it, right-aligned with it, on Threads base with a Hairline strong edge, 12px corners and one Float shadow: a Text-mute caption (600), the three levels as radio rows (a 12px tick that fills with Text, the level at the body size (500) over a Text-mute caption line, the checked row on the Selected fill), and a Text-mute foot note. Opening focuses the checked row, the arrow keys move between the rows and wrap at the ends, and a pick, Escape or a click outside closes it; while it shows, ↑ ↓ leave the list alone. While External signals is off its rows are disabled and the foot note gives the reason. Below a Hairline, the panel's width picks the layout. Wide (720px and up), a list pane on Threads side sits beside the thread pane, a third of the panel between 264px and 360px until the user drags its edge. The edge is a window splitter with an 8px col-resize hit area whose line turns Amber on hover and drag, and keyboard focus shows the window's focus ring; a drag or Left and Right in 16px steps set the width between 220px and half the panel, at most 480px, for both tabs, and a double-click returns to the default. The width is remembered, and a narrower window narrows the list within the same range. The list pane's Waiting / All segment carries both counts, the checked one on the Selected fill; its keys, and the kind select's, stay with it rather than moving through the rows. Under it, one kind select opens a popup in the page that lists every source with its count under the filter; a zero count is disabled unless it is the selected kind. It is a 36px field with a Text mute edge and the theme chevron inside a 44px hit area. The rows put waiting Threads first, then the newest. Each row is one line of the source mark and name, the state word and the relative time, then the title at the head size (600) on two lines at most, then the label on one ellipsized line in Text mute. The state word is Amber ink when the Thread needs the user, Danger on failure and Ok when done. The selected row takes the Selected fill. ↑ and ↓ move through the rows. A panel under 440px drops the label line. +- **Spec:** [`docs/agent-guide/design/threads-chip.md`](docs/agent-guide/design/threads-chip.md) +- **Surface:** `src/ui/threads/chip` -The toggle and ⌃⌘S collapse the wide list pane to a 56px rail at once, and the choice is remembered; a width change never writes it. Medium (520–719px) shows the rail, and the toggle lays the full list pane over the thread pane with one Float shadow, sliding 8px in as it fades in over 160ms; a selection, Escape or a click outside closes it. Narrow (under 520px) shows one pane at a time, a List button on the source line leading back from the thread, with no rail or toggle. Escape closes that overlay before the window. Under reduced motion each change is instant. +### Threads window -The rail on Threads side holds the same Waiting / All segment, stacked: Waiting as a question-bubble mark over its count in Amber ink and All as an inbox-tray mark over the total, the checked one on the Selected fill, each named and tipped by its count. Under it, a funnel mark (the source's mark once a kind is picked) is the kind select's trigger. Then one 40px button per row of the list: its source mark, an Amber dot while it waits, the selected one on the Selected fill, and the title and state in its tooltip and accessible name. +A frameless window (`threads/window/`) that moves on its own and is not kept on top: other apps can cover it. Its first open places it 12px beside the main character's window on the side with more free screen, kept 12px inside the work area. -The thread pane reads first. Its head shows the source, state, title and label. On a waiting Thread the source line ends in a Mark read button, a check mark and its word at the sub size in Text dim with a Hairline strong edge. A read Thread's state word drops Amber ink for Text dim. A pane under 560px tightens its paddings. A pane under 440px tall drops the label line. The transcript scrolls on its own, holds at its newest entry, and takes the height: each entry's speaker and time at the sub size, then the text at the speech size, line-height 1.8, rendered as Markdown (headings, lists, tables, quotes, code, links and https images) that keeps its own line breaks, with code spans on Selected and fenced code on Threads head; the text fills the pane's width. The user's own entries are dimmed and set off by a Hairline. The pane has no answer field: the user acts on a Thread by telling the character. Every Thread's source line also ends in Attach to chat, in the same treatment; while the Thread's chip is in main's input it reads Attached on an Amber edge over Amber faint in Amber ink. +- **Spec:** [`docs/agent-guide/design/threads-window.md`](docs/agent-guide/design/threads-window.md) +- **Surface:** `src/ui/threads/window` ### Relation glyph and relation line -How a character stands toward the user and toward each other preset, under the preset row of the settings panel (`quick-controls/preset/preset.css`). The relation glyph is five steps on one axis: two 8px × 4px segments each side of a 2px centre notch, the side the sign and the length the strength. Unlit segments sit on `--yui-track`; a lit one fills in Text dim from the notch outward. Only the far ends carry colour: the outer left segment of a hostile relation in Danger and the outer right segment of a close one in Amber. Neutral lights no segment and raises the notch to Text. A target not rated yet lights no segment and keeps the notch Text mute. The number behind the band is never shown on a chip; the Relations section's slider shows it. - -The relation line sits under the preset row, after the edit note in the settings window: one pill chip per target the window's preset has rated, the user first as "you" and then the rated presets by strength, close first, each a glyph and the target's name in Text mute at the sub size. The line is one row. A rated target whose preset window is closed, and every chip but "you" past the line's width, folds into a trailing `+N` chip that unfolds the folded chips in place, wrapping the line, and the line stays unfolded until the chip is pressed again. While the Relations switch is off the line is hidden. While this preset has no record, the line holds one Text-mute sentence ("No one rated yet") instead of chips. - -Hovering or focusing a relation opens the reasons card under it, clamped inside the preset header: a card on the panel surface with a Hairline strong edge and one Float shadow, holding "natsume: **warm** to you", an external engine's note in italic Text dim when the record has one, and the last three reasons newest first, each a direction chevron, the reason, and a tabular-nums age (`40min`, `3h`, `2d`). Escape closes the card and leaves the panel open. -The Relations section of the Body page sets the window's preset's relations by hand; the Relations switch is a row of the Together page. Its Text-mute note says the change is logged as set by you, outside the daily cap. Its group holds one row per target: "you" and every other preset, rated rows in the line's order, then a stronger Hairline (`--yui-edge-strong`), then the targets not rated yet in registry order, their glyph at 60%. A row is the glyph and the name over a sub-line (the band word, the last reason or "set by you", and its age; "Not rated yet" for an unrated target), and on the right a −20 to 20 slider with the gain slider's knob over a 2px centre tick, and the value as a signed tabular number (`+9`, `−6`, `0`). The slider's fill grows from the centre: Amber on the positive side, Text dim on the negative side, Danger on the negative side while the band is hostile. Dragging previews the glyph, the band word, the number and the fill; releasing commits the value. A panel at most 30rem wide wraps the slider under the label. While the switch is off the group and the note hide, and one Text-mute sentence says relations are off for every character. +How a character stands toward the user and toward each other preset, under the preset row of the settings panel (`quick-controls/preset/preset.css`). The relation glyph is five steps on one axis: two 8px × 4px segments each side of a 2px centre notch, the side the sign and the length the strength. -When the window's preset changes a relation, the glyph's new segments grow from the notch, a segment it gives up keeps its colour at 40% for 400ms and then drains, and the target's name flashes to Text and settles over about a second; a newly rated target fades in. Under reduced motion nothing scales: segments, ghosts and the card change by opacity or at once. +- **Spec:** [`docs/agent-guide/design/relation-glyph-and-relation-line.md`](docs/agent-guide/design/relation-glyph-and-relation-line.md) +- **Surface:** `src/ui/quick-controls/preset/relations` ### Named Rules **The One-Pulse Rule.** Of the status dots in the character window, only the status pill's dot pulses, and an urgent signal chip's dot while that chip shows: the signal needs the user now. The capture point and the delegation chip's dot hold still, and their state reads from colour and label. The Threads chip never pulses; it wiggles once when a Thread or a request starts waiting. While do-not-disturb is on, an urgent chip's dot holds still as well. diff --git a/docs/agent-guide/design-context.md b/docs/agent-guide/design-context.md index c34a45d65..56c0274c0 100644 --- a/docs/agent-guide/design-context.md +++ b/docs/agent-guide/design-context.md @@ -1,6 +1,6 @@ # YUI — Design Context -Before any UI/visual work, read [`PRODUCT.md`](../../PRODUCT.md) + [`DESIGN.md`](../../DESIGN.md). The impeccable skill (`/impeccable`) uses these as its canonical source. +Before any UI/visual work, read [`PRODUCT.md`](../../PRODUCT.md) + [`DESIGN.md`](../../DESIGN.md), and the file under [`docs/agent-guide/design/`](design/) for each component the change touches. The impeccable skill (`/impeccable`) uses these as its canonical source. > **Workflow (mandatory):** ① Storyboard how the user uses the change, in the issue: one frame per step of each journey it touches (what the user sees, what they do, what shows next), failure paths included; a one-step change is one frame, and a frame where the character moves or performs adds its beats (the real render, the duration, the hand-over to the next beat as a cut or a crossfade with its ms, and whether input works), ② Review existing UI surfaces (`src/ui/`, `DESIGN.md`, `PRODUCT.md`) to align style and patterns, ③ Propose the UI structure/layout to the user in text for confirmation, ④ Create a **standalone mock HTML** that plays the storyboard frame by frame at the windows' real sizes (the pet window 400×600) for visual approval, then ⑤ Proceed to implementation. diff --git a/docs/agent-guide/design/boot-failure-notice.md b/docs/agent-guide/design/boot-failure-notice.md new file mode 100644 index 000000000..4247bbb76 --- /dev/null +++ b/docs/agent-guide/design/boot-failure-notice.md @@ -0,0 +1,2 @@ +# Boot-failure notice +A dismissible floating notice (`boot-error.css`) shown when config or VRM loading fails and the transparent window would otherwise stay blank. Plate, Text guidance, and a single Float shadow preserve the legible-on-anything doctrine; a Danger uppercase title names the failure, and a quiet dismiss button removes the notice. diff --git a/docs/agent-guide/design/character-menu.md b/docs/agent-guide/design/character-menu.md new file mode 100644 index 000000000..aa80cb8b0 --- /dev/null +++ b/docs/agent-guide/design/character-menu.md @@ -0,0 +1,26 @@ +# Character menu +A right-click on the character opens the Character menu around her. The menu draws in its own window, the Character menu window, beside her, and the pet window never changes size for it. It is built without React, as the pet window is. Left click stays the tap gesture, and there is no long-press. Esc, a click outside the menu, a click in another app, or a closing action closes it. It never times out. + +Two pill columns flank her, 88px from her centre, under one shared top. Talk, Rest, Listen and Settings sit on the right. Body, Voice, Pace and More sit on the left. Pills in a column share one width, and the gap between pills is 8px. Near a screen edge, the menu folds to one column on the open side. + +The columns' top is set once when the menu opens, from the tallest list it can show, so swapping lists never moves the columns. It sits at her head, unless that would bring a column within 8px of the window bottom or the work-area bottom, whichever is higher. Then both columns shift up together. + +When the shifted columns would start less than 8px below her window's top, the menu window also reaches above hers. The menu window is hidden when the menu closes. Body ›, Voice ›, Pace › and More › replace their column in place with their list and a "‹ Back" row. A second level never opens as a column outward. + +Each pill is a line glyph and a label of one or two words. Pills follow an 8px grid: 36px tall, with an 18px icon and a 13px label at weight 600. The accessible name is the glossary term, so Rest is named "Do-not-disturb". + +The top level holds Talk, Rest ›, Listen, Body ›, Voice ›, Pace ›, Settings and More ›. More holds Threads with its waiting count, Keep bubble, Unified chat, Terminal, Reset chat and Turn off. An item that cannot act in a window is hidden: Listen shows in the main window only, and Turn off shows only in a bound pet window. The Threads chip on the character opens Threads while something waits. + +Rest › replaces the right column with its list, and a "‹ Back" row returns to the top level. While a Rest or Focus runs, the list opens with a status row, such as "Resting until 08:00" or "Focus · 18 min left", then End now. The running choice is not listed again. + +The choices follow: For 1 hour, Until tonight, Until tomorrow morning, Until I turn it off, a divider, then Focus 25 min and Focus 50 min. Until tonight is not offered from 00:00 to 07:59. No row shows an end time: the Rest pill does, as "Rest · 08:00" or "Focus · 18 min", and "Quiet · 12:00" in a quiet span. + +Body › lists her bodies, and Voice › lists the voices, at most five each with the current one always among them, so no list column exceeds seven rows. Each list marks the current choice with a check and ends with a "More…" that opens that settings page. Pace › sets the base pace, which GLOSSARY.md defines: Less, Normal or More. A pick applies at once. The menu then returns to the top level and stays open. Toggles inside More keep More open. Talk, Settings, a trailing "More…", Threads, Terminal and a confirmed Turn off close the menu. + +Reset chat and Turn off morph in place into "Sure?" and "Cancel", with focus on Cancel. + +Focus goes to the first pill when the menu opens, and focus stays inside the menu while it is open. Arrows, Tab and Shift+Tab move in reading order, and Home and End also work. Enter or Space picks. In a second level, ← or Esc goes back, and Esc at the top level closes the menu. Keys act at once, with no motion. The menu adds no global shortcut. + +The plate is opaque, with a hairline edge and one Float shadow, and it has no glass. Amber marks ON states and focus only. Both columns enter together from her chest, scaling up from 0.92 as they fade in over 200ms, with no stagger, and her name only fades in. A click outside it or in another app sends everything back toward her chest at once in 140ms, and the window restores after. A right-click on her during that exit takes it back. Esc and a closing pick close it at once. + +A list swap by the mouse crossfades. The old column fades out in 140ms, moving 8px away, while the new one fades in over 200ms, moving 8px in: from the right for a list, from the left for Back or a pick that returns to the top level. Under reduced motion the menu only fades, at the same durations. In the transparent pet window, the pills take pointer input, but not those of an old column or of a menu in its exit, and the area around them passes clicks through. diff --git a/docs/agent-guide/design/chip-column.md b/docs/agent-guide/design/chip-column.md new file mode 100644 index 000000000..04afc1b05 --- /dev/null +++ b/docs/agent-guide/design/chip-column.md @@ -0,0 +1,2 @@ +# Chip column +The strip at the avatar's upper right (`surfaces/surfaces.css`) holds, top to bottom, the urgent signal chips, the batched signal row, the Threads chip and the delegation chip. While the speech bubble, or the shown Ask card or Settings request card, shows, the column slides up over 200ms until its last row ends 8px above that surface's top edge, its top no closer than 8px to the window's top. The rows that still do not fit hide from the bottom up, never an urgent chip, into one "+N" row in the signal pill's look that counts what they hold and takes no clicks; they return once the surface is gone. When the urgent chips leave no room above the surface for the "+N" row, every other row hides and no "+N" row shows. While the Character menu is open, the column fades out over 140ms, takes no clicks, and fades back once the menu has gone. When the column's own width, inside its left padding, is under 9rem (a pet window under 400px), every chip shows only its dot and its count: a signal pill its dot, the grouped batched row its batched total, the Threads chip its count badge and the delegation chip its dot then its count in a signal-pill-tall pill, while the "+N" row keeps its "+N", an open batched list keeps its Collapse pill as a minus, and a tap opens each chip as at full width. The grouped row's accessible name always ends with how many more it holds. Under reduced motion the column moves at once. diff --git a/docs/agent-guide/design/delegation-list.md b/docs/agent-guide/design/delegation-list.md new file mode 100644 index 000000000..e62c37469 --- /dev/null +++ b/docs/agent-guide/design/delegation-list.md @@ -0,0 +1,2 @@ +# Delegation list +The backend's delegated work as rows (`chips/delegation-rows.css`), shared by the chip's popover beside the avatar and the Session section of the settings panel's History page. Each row is a dot, an ellipsized title and a tabular-nums time: the dot is Amber while the work runs, Ok once it finished, Danger when it failed and Text mute when the outcome cannot be verified; the time reads the elapsed minutes while running and "Done · 4m ago", "Failed · 4m ago" or "Outcome unverified · 4m ago" after. The character window's popover pins its right edge 8px inside the window's right edge, so the full list stays inside the window at any window width. In the Session section the rows list the client's persisted history as a stacked row of the section's group under the context readout, and a finished row that carries a summary is a chevron disclosure (`aria-expanded`) opening the worker's summary and "Took 12m" underneath; the popover's rows never open. diff --git a/docs/agent-guide/design/faces-and-the-photo-dialog.md b/docs/agent-guide/design/faces-and-the-photo-dialog.md new file mode 100644 index 000000000..1c8d5925e --- /dev/null +++ b/docs/agent-guide/design/faces-and-the-photo-dialog.md @@ -0,0 +1,4 @@ +# Faces and the photo dialog +A preset's face is a circle: its photo, else a dot in a hue taken from its id. A photo shows the square its crop stores, with the preset's hue behind any transparent pixels; a photo with no crop shows centred. One renderer draws every face, at 36px in the Card section, 28px in the character header and the Characters list, 20px on the name plate, and 14px to 22px in the unified chat window. + +The photo dialog (`photo-dialog.css`) is a modal on the settings window: Panel background, a Hairline edge, the window's corner radius and one Float shadow, over a backdrop in the crop shade. The title, "Photo for name", sits at the title size (600) with a Text-mute caption hint on its baseline. On the left, a 360px stage on the crop stage colour holds the photo under a 300px circle: a 2px ring in the crop ring colour, the rest of the stage under the crop shade. A drag moves the photo, and the circle always stays covered. Under the stage sit a Zoom slider (1× to 7×, its value in tabular figures) and three pills: Fit the face, Whole photo, and Choose another…. On the right, "Where it shows" lists live previews at 36, 28, 22 and 20px with the place each size appears, in Text dim at the sub size. The foot carries Cancel and Use photo, both pills; Use photo is in Amber ink on an Amber-soft edge. A photo that cannot be read shows a Danger line and disables Use photo. Escape closes the dialog only. diff --git a/docs/agent-guide/design/message-window.md b/docs/agent-guide/design/message-window.md new file mode 100644 index 000000000..ae2193ba0 --- /dev/null +++ b/docs/agent-guide/design/message-window.md @@ -0,0 +1,4 @@ +# Message window +A separate always-on-top window (`message-window.css`) holding the speech bubble and the text input when the surfaces are popped out of the character window. 340px wide, anchored by its top-left corner and grown downward by its content: a name-plate handle, then the bubble, then the input. The plate is the bubble's name plate, here also the window's drag handle, with a hover-revealed dock button (arrows-in icon) that docks the surfaces back into the character window. The dot reads four states: idle — Text mute and dim, no label; waiting, an Ask or Settings request card showing — a "Waiting for you" label and the dot holding still in Text dim; thinking, a turn running with no speech streaming — a "Thinking" label on the plate, the dot breathing Text dim, and the input border slowly swelling to Amber with an Amber-soft ring; responding, speech streaming — a "Responding" label, the dot pulsing Amber, and the bubble border slowly swelling to Amber-soft. Under reduced motion nothing animates and the borders hold steady. The bubble tucks up under the plate's row so the plate rides the box's top-left edge and floats with it, except while the delegation list or the backlog is open; the box is height-capped at twelve lines in this window and keeps the frost, the caret, the scroll cap and the dismiss button on its top edge that it wears in the character window. Docked mode is the character-window layout, whose pop-out button beside the dismiss button pops the surfaces back out. The status pill stays with the character in both modes; the delegation chip follows the surfaces, riding the plate's row as a separate pill to its right while popped out and leaving the character window bare. The plate's row holds the plate and the delegation chip only. + +The backend's reasoning shows in the message window alone, as a disclosure under the quoted line at the top of the bubble's box: a Text-mute "Reasoning" summary at the sub size, weight 500, with a chevron that turns a quarter when open, over the text at the body size in Text dim behind a 2px Hairline-strong rule, clipped at six lines and scrolling, with a blinking text cursor while it streams. Its cursor gives way to the speech caret once the reply streams. The disclosure stays closed, also while the reasoning streams: the first reasoning of a turn shows the bubble with the summary even before any speech, holding off the previous reply's dwell until the reasoning ends, and a click on the summary opens it. It closes once the reply lands. When the reasoning ends with no speech streaming or waiting on playback, the bubble takes the usual dwell (or the keep-until-dismissed hold), and hides at once when nothing is left to show, as after a stop mid-reasoning. Only the start of a reasoning stream reveals the bubble, so a dismissed bubble stays down for the rest of that reasoning. diff --git a/docs/agent-guide/design/plugins-page.md b/docs/agent-guide/design/plugins-page.md new file mode 100644 index 000000000..8c61cab2a --- /dev/null +++ b/docs/agent-guide/design/plugins-page.md @@ -0,0 +1,8 @@ +# Plugins page +The Plugins page (`quick-controls/plugins/plugins-page.css`) is two sections, **Installed plugins** then **Available plugins**, over the host's snapshot and the catalog. A section head carries its state text or link at the right at the sub size: **Check for updates** as a link button in Text dim, **Checking…** with its spinner in Text dim, or the result **Updates: n** / **All up to date** in Text mute; the catalog's note and the Installed section's "Tools declared to every character's backend: n" foot sit in Text mute at the sub size. + +A plugin is one group. Its head is a row with the plugin id as the label, at 0.8125rem and weight 500, beside the source badge — a pill on a Hairline edge with a 0.7rem icon, caption size, weight 500, Text dim — and the version in Text mute at the caption size in tabular figures; the description follows as an ellipsized sub-line on the same row. The switch closes the row. Server lines below it are at least 2.5rem tall: a 7px status dot in Text mute, Ok with an Ok-soft halo when running, Danger with a Danger-faint halo when failed or exited, and at 55% opacity when off; a starting server shows the 7px spinner instead. The server name is body size at weight 500, its state at the sub size in Text mute with the state word in Text dim at 600, the reason in Text dim, and **Retry** or **Restart** as a link button. The hidden-name note is Text mute at the sub size, one line per kind and holder — "Hidden tool a, b: a built-in tool uses this name" or "…: holder uses this name first" — with each hidden name in Text dim at 600. The tools disclosure is a full-width chevron row in Text dim at the sub size and weight 500, its 0.875rem chevron turning a quarter when open, over a list indented 2.05rem: a tool or skill name at the body size and weight 500 over its summary at the sub size in Text mute, with a **Skills** caption in Text mute at weight 600. The log disclosure opens a grid under it: the tail as a scrolling block of at most 8.5rem on `--yui-field` at `--yui-radius-control`, caption size, line-height 1.5, Text dim and tabular figures, and a foot in Text mute at the caption size carrying "Last lines: n" and **Open log folder**. The action row that closes the group holds **Log** on the left, then **Update to v…** or the **Updating…** spinner or a local plugin's folder path in Text mute, and **Delete** or **Remove from list** pushed to the right. **Log**, **Update to v…**, and **Delete** / **Remove from list** are link buttons at the sub size; the **Updating…** spinner and the folder path are plain text. + +The consent panel opens inside the plugin's group, under its switch row, on the hover fill with 0.875rem padding (0.75rem at the foot). Its step line is two 3px bars on `--yui-track`, the reached one Text dim, with "1 / 2" at the caption size, weight 600, in tabular figures. The question is body size at weight 600. The facts are a two-column grid, 4.5rem of Text-mute labels at the sub size against Text values, holding the source badge with its review note and folder, the version, and the launch command on a `--yui-field` block at `--yui-radius-control`; a panel at most 30rem wide stacks the facts under their labels. A shield line in the Permissions page's shield icon and, for a community or local plugin, a warning line follow at the sub size in Text dim with 0.95rem icons, the community warning in Danger; **Cancel** and **Allow** close the panel as pills, **Allow** in Amber ink on an Amber-soft edge. Step 2 lists the declared tools and skills in the same list, with a Text-mute note that the backend decides whether to call a tool; a failed start shows the failed server lines and **Turn off** / **Keep on** instead. + +Errors are inline lines on Danger faint at `--yui-radius-control`, sub size, with a 0.85rem warning icon and every word as sent, the plugin's and the host's alike; a **Retry** link at the right takes Danger and an underline. The catalog repeats the plugin row with an **Install** pill on its side or an **Installing…** spinner, and closes with an add row holding a plus and **Add from folder…**; while the catalog loads, two skeleton bars breathe on `--yui-hover` and `--yui-selected` under the loading status. diff --git a/docs/agent-guide/design/quick-start.md b/docs/agent-guide/design/quick-start.md new file mode 100644 index 000000000..3adcaf8e4 --- /dev/null +++ b/docs/agent-guide/design/quick-start.md @@ -0,0 +1,2 @@ +# Quick start +The Connection page (`connection/connection-page.css`) carries two views under one switch at its top: **Quick start** and **Detailed settings** as the two cells of the panel's neutral segment control, one checked cell holding the tab stop, a click, Space or Enter, or the arrow keys, Home and End choosing between them, exactly one view showing, and the choice lasting while the window is open. Detailed settings holds the Connection page's sections under a Text-mute note that the server, model and voice servers are chosen by hand. Quick start (`connection/quick-start/quick-start.css`) is two sections of the panel's rows, what is sent and the daily limit before the key, with the key's label on its own line over the field and a Connect pill; the key field carries an inset Hairline, so it stays visible on Dawn's light group. A note above the sections says that connecting with the key replaces the current server with Google Gemini, on Amber faint at the group's corners, and shows only while a server other than Gemini has its URL set. While the key is read, the field and the pill lock over a Text-mute line led by a dot that pulses, and holds still under reduced motion. A refused key or a failed read on Connect shows a line on Danger faint at `--yui-radius-control`, the sub size in Text with a 0.85rem Danger icon; a refused key adds the key page link. A confirmed key replaces both sections with the connected state: the done line, an Ok check before Text at the body size and weight 500 on `--yui-group-bg` at the group's corners, reading "Key replaced" after a replacement, over a group that holds a Key row (the label Key over its sub-line, and a Change key link button at its right). Change key opens the paste row over the field alone, and its confirmed key writes only the key, leaving the server, the model and the rest as they are. The stored key is checked again each time the connected view shows and when the window regains focus, reusing an answer on the same key from the last minute; a key that the check refuses swaps the done line for the Key rejected line, a Danger-faint line with a warning icon at the body size, which hides the Key row and opens the paste row, with the key page link row above it. While the paste row is open over a key that passed its check, a sub-size Text-mute line, "This key still works.", sits under the field. The connected state then continues with the voice step and then the Help section. The voice step mirrors the key section: its label line, field and Turn on voice pill, with the checking, refused and failed lines spanning the row, and Maybe later as a link button beneath it. Its result lines share the done line's look, one sentence on `--yui-group-bg` at the group's corners. Once a TTS server is set, the step gives way to the configured line, a sentence that voice is on; a confirmed key shows the voice-is-on line in the same place. The Help section holds a third row, First conversation, with a Replay link button beside the two guide rows. Under the STT and TTS sections' rows the same status line carries the server's dot and state: Connected · {host}, Connecting…, the refused key with no action, where Could not reach and did not answer in time add Reconnect, and the chat line's model read adds Reconnect on those two states; a TTS check answered with an error status other than 401 or 403 lights the same Danger dot with "The server returned an error ({status})" and no Reconnect. diff --git a/docs/agent-guide/design/relation-glyph-and-relation-line.md b/docs/agent-guide/design/relation-glyph-and-relation-line.md new file mode 100644 index 000000000..fa79555b0 --- /dev/null +++ b/docs/agent-guide/design/relation-glyph-and-relation-line.md @@ -0,0 +1,10 @@ +# Relation glyph and relation line +How a character stands toward the user and toward each other preset, under the preset row of the settings panel (`quick-controls/preset/preset.css`). The relation glyph is five steps on one axis: two 8px × 4px segments each side of a 2px centre notch, the side the sign and the length the strength. Unlit segments sit on `--yui-track`; a lit one fills in Text dim from the notch outward. Only the far ends carry colour: the outer left segment of a hostile relation in Danger and the outer right segment of a close one in Amber. Neutral lights no segment and raises the notch to Text. A target not rated yet lights no segment and keeps the notch Text mute. The number behind the band is never shown on a chip; the Relations section's slider shows it. + +The relation line sits under the preset row, after the edit note in the settings window: one pill chip per target the window's preset has rated, the user first as "you" and then the rated presets by strength, close first, each a glyph and the target's name in Text mute at the sub size. The line is one row. A rated target whose preset window is closed, and every chip but "you" past the line's width, folds into a trailing `+N` chip that unfolds the folded chips in place, wrapping the line, and the line stays unfolded until the chip is pressed again. While the Relations switch is off the line is hidden. While this preset has no record, the line holds one Text-mute sentence ("No one rated yet") instead of chips. + +Hovering or focusing a relation opens the reasons card under it, clamped inside the preset header: a card on the panel surface with a Hairline strong edge and one Float shadow, holding "natsume: **warm** to you", an external engine's note in italic Text dim when the record has one, and the last three reasons newest first, each a direction chevron, the reason, and a tabular-nums age (`40min`, `3h`, `2d`). Escape closes the card and leaves the panel open. + +The Relations section of the Body page sets the window's preset's relations by hand; the Relations switch is a row of the Together page. Its Text-mute note says the change is logged as set by you, outside the daily cap. Its group holds one row per target: "you" and every other preset, rated rows in the line's order, then a stronger Hairline (`--yui-edge-strong`), then the targets not rated yet in registry order, their glyph at 60%. A row is the glyph and the name over a sub-line (the band word, the last reason or "set by you", and its age; "Not rated yet" for an unrated target), and on the right a −20 to 20 slider with the gain slider's knob over a 2px centre tick, and the value as a signed tabular number (`+9`, `−6`, `0`). The slider's fill grows from the centre: Amber on the positive side, Text dim on the negative side, Danger on the negative side while the band is hostile. Dragging previews the glyph, the band word, the number and the fill; releasing commits the value. A panel at most 30rem wide wraps the slider under the label. While the switch is off the group and the note hide, and one Text-mute sentence says relations are off for every character. + +When the window's preset changes a relation, the glyph's new segments grow from the notch, a segment it gives up keeps its colour at 40% for 400ms and then drains, and the target's name flashes to Text and settles over about a second; a newly rated target fades in. Under reduced motion nothing scales: segments, ghosts and the card change by opacity or at once. diff --git a/docs/agent-guide/design/session-history-accordion.md b/docs/agent-guide/design/session-history-accordion.md new file mode 100644 index 000000000..5329c5dfb --- /dev/null +++ b/docs/agent-guide/design/session-history-accordion.md @@ -0,0 +1,2 @@ +# Session history accordion +The settings panel's History page (`quick-controls/history/history-section.css`), a read-only record. The sessions are rows of one group. Each collapsed row carries its start time, the first thing you said (ellipsized) and its message count. The current session sits at the top, open by default, and older ones expand in place on click (`aria-expanded`). An open session's start time turns 600 and its messages read as a script beneath it: a three-column row per message (speaker · text · time) where the character's name, in Amber ink, is the only amber in the list. A Text-mute footnote on retention and local-only storage follows the group, and the start-fresh row sits in its own group below. diff --git a/docs/agent-guide/design/settings-row-switch.md b/docs/agent-guide/design/settings-row-switch.md new file mode 100644 index 000000000..c2fcc3998 --- /dev/null +++ b/docs/agent-guide/design/settings-row-switch.md @@ -0,0 +1,2 @@ +# Settings row + switch +The settings panel (`quick-controls.css`, its controls in `controls.css`) is a rail beside a column of sections. The rail is 10rem with text labels: a search field on top, then two titled groups, the edited character's pages (Connection, Voice, Persona, Body, History) under the character's name and every character's pages (Together, Listening and bubble, Permissions, Plugins, Proactive, Motion and desktop, General) under "Every character", each heading in Text mute at the caption size (600), General pinned to the bottom. On the rail Up and Down select the previous and next page, wrapping at the ends, and Home and End the first and last; Left and Right do nothing. While a search is set each rail item shows its match count in Text mute, a page with none dims, a matching row takes the `--yui-selected` fill, and a query opens each fold that holds a match, which clearing the query folds again. A panel at most 30rem wide (the panel at its narrowest, the window at its 880px minimum) turns the rail into 3rem of icons, each page named by its `aria-label` and tooltip, the headings into one Hairline between the groups, and hides the search field; a row's control wrapped under its label spans the row. Each page opens with a Text-mute scope line, "Applies to {name} only" or "Applies to every character", over a 1.25rem title (600, letter-spacing -0.015em); the Connection page hides it while Quick start shows. A section is a 0.875rem title (600) with an optional control or state text at its right, an optional Text-mute note, and one or more groups. A group is one borderless surface (`--yui-group-bg`, 12px corners) whose rows are split by a Hairline. A row is at least 3rem tall with 0.625rem × 0.875rem padding: a 0.8125rem label (500) over a 0.75rem Text-mute sub-line on the left, its control on the right. An add row closes its group with a plus and a text button. The General page opens with the Help section, then the Language row, then the Appearance row, then the Text size row, then Your name. The Appearance row is a three-position segment (Dawn · Hearth · Follow system) in the same segment control as Language, and the Text size row a five-position one (90% · 100% · 112.5% · 125% · 140%) over a sample line at the speech size on a Surface card with a Hairline edge; either choice applies to every open window at once and persists. A segment's cells wrap to a new line when its row has no room. The Proactive page opens with How often she speaks up, a three-position segment (Less · Normal · More) directly on the section, over a 24-hour track of her day: each pace run's word, the greeting marks, and her 24px face at now. A check-in line under the track lists the quiet-for-a-while minutes at the chosen pace, and its marks re-space when the segment changes. A Text-mute foot line says scheduled greetings keep their times at every pace, then a link to Persona › Active hours. Under What she reacts to, each of five source groups (Quiet for a while, Scheduled greetings, Screen changes, Thread reactions, External signals) is a switch row over a fold. While its switch is off the fold's rows dim to half opacity, staying editable, and its summary reads Off in place of the aside, with no off line. The External signals fold holds Thread turns, the listener port and address, and Workflows: an add button that opens a form, and an inline delete confirm that moves focus to Cancel, with its fields on the inset Hairline. Every number row on the page has a 5.5rem field and a 3rem unit slot, except the cue rows' minute fields. Advanced closes the page folded, the speaking-up limit before the urgent one. Selection is neutral: the selected rail item and the checked segment cell take the `--yui-selected` fill with Text at 600, and a checked radio tick fills with Text. The switch (2.25rem track) is the one control that keeps amber, calm and grey when off (`--yui-track`) and a full Amber track with the knob (`--yui-knob`, shadowed in `--yui-knob-shadow`) slid right when on (`aria-checked="true"`). While a plugin's step-1 consent is open its switch stays off: the consent panel under the row is the pending state, and the switch or **Cancel** closes it. A checkbox (`controls/checkbox/`), the Express motion group's master, is drawn as the switch: on and off as the switch's, and a partly-on group (`aria-checked="mixed"`) lights the left half of the track in Amber with the knob at the centre. A slider (`controls/slider/`) is a 4px pill track on `--yui-track` with an Amber fill up to the value and a 14px knob (`--yui-knob`, shadowed in `--yui-knob-shadow`) that stays inside the track's ends; hovering or dragging adds a 4px Amber-faint ring around the knob, and keyboard focus a 2px Amber-soft one. Fields sit on `--yui-field` with a transparent edge at rest, a Hairline on hover, and an Amber border plus an Amber-soft ring on focus. A focused button shows a 2px Amber-soft ring. One tooltip at a time names a control: it opens below the control after a 150 ms hover, or at once when the keyboard moves focus there, and never on a focus the window moves itself (opening, a page request); a press or the pointer leaving closes it, and Escape on the focused control closes the tooltip alone. The Together page carries the Unified chat switch, which lets main open the unified chat window while two or more presets are open, and the Characters list: one row per character with a 28px face, the name over its state in Text mute, and an "On the desktop" switch. Main's switch, and a bound window's own, is locked on; with four on the desktop an off row's switch is disabled and a Text-mute line gives the reason. A control the push transport cannot use stays in place, disabled, with a Text-mute reason under its label and a "Change transport" link in Amber ink. In the settings window the preset row is the character header: one button per character with a 28px face, the name (600) over its transport and window state at the caption size in Text mute; the edited one takes the `--yui-selected` fill, one in no window sits at 55% opacity and stays clickable, and the manage button closes the row. Where a native picker exists, each row of the preset manage list carries a photo button beside rename; it opens the photo dialog, after the picker when the preset has no photo yet. The panel's disclosures are the filler's More phrases, the card's Advanced fields, the Proactive page's Advanced and each source fold on that page, each a chevron summary over its content and closed by default. diff --git a/docs/agent-guide/design/settings-stage.md b/docs/agent-guide/design/settings-stage.md new file mode 100644 index 000000000..a5b75a75b --- /dev/null +++ b/docs/agent-guide/design/settings-stage.md @@ -0,0 +1,37 @@ +# Settings stage +The settings window is her stage. A stage area sits on its left and holds her name and her state. The stage is a column on the window's left, on `--yui-stage-bg`, with the panel beside it. Its top is the stage slot: the largest 2:3 box that leaves the foot 80px and the panel 480px, from 373 × 560 to 600 × 900 in whole px, so her 341px input always fits. The column is the slot's width and follows each step of a window resize. The window opens at 1160 × 680 below the title bar, where the slot is 400 × 600, and its minimum is 880 × 640. A panel 480px wide or less takes its narrow layout, and under 680px tall the stage foot folds to one line. The foot names the window's own character, the bound one or else main's, at the title size (600) over her transport and window state in Text mute, in the words of her character header item; folded, the name sits at the head size with the state after a `·`. The stage's tuning values (the stay chance, the last backend emotion's decay, the travel time and the carry distance) have defaults in the `stage` section of `configs/avatar.json`. The backend may also receive an opt-in `settings opened {page}` event, which is off by default and switched in Proactive › Advanced; the backend decides whether she says anything. + +She comes along when the settings window opens, and she returns home when it closes. Her entry comes from the entry family for her last backend emotion, as the table below sets it. Once she is set down she plays one entry clip of the family, picked at random and never the family's last one twice in a row, then idles. By default, after 30 minutes without a new emotion, her emotion decays to neutral. A backend that sends no emotion is always neutral. The client holds this table and computes no mood of its own. + +| Family | Emotions | Entry clips | +|---|---|---| +| Glad | happy, surprised | `excited`, `wave_1`, `peek_in`, `gaow` | +| Plain | neutral, relaxed, curious, thinking, and any emotion no family lists | `wave_3`, `bow`, `peek_in`, `calm`, `peek` | +| Glum | sad, sleepy, embarrassed | `yawn`, `idle_10` | +| Sulking | angry | with a default probability of 60% she stays on the desktop and plays `sulk`, and nothing on the Settings stage explains it; otherwise she comes along and plays `sulk` on the Settings stage | + +On her own monitor within `carry_full_pt`, 1200pt by default, she is carried. The `drag` motion crossfades in, the window holds still for 200ms, then it moves in 600 to 900ms by distance on an ease-in-out curve, slow at the start, faster through the middle, slow again on arrival, with her facing front. Her window's size and her framing ease on the same curve to the slot's and the stage's, her feet on the eased path, so she arrives filling the slot; when she vanishes, or fades under reduced motion, both change while she is hidden. She is set down with no landing bounce, and the next motion crossfades from `drag`. The window is usable at once. Farther away or on another monitor she is picked up the same way, vanishes in a short fade and appears with the landing bounce. Under reduced motion she fades out and fades in, with no pickup. Motion switches blend with the mixer's crossfade; opacity fades only vanish and appear. Reactions use ease-out curves, and motion never blocks input. + +`peek_in` and `peek` play at the panel edge: the stage peek pin holds her hips beyond her window's right edge, 0.06 and 0.12 of her height, eased in during the carry. `peek_in` plays to its end and `peek` hands over to idle at 11.5s, and the pin eases back to the centre over 600ms. Under reduced motion it snaps. + +Closing the settings window carries her home to her spot at her desktop size and framing, as she left it, or, when it is far or on another monitor, she vanishes and appears there; she is set down and idles with no clip. Minimizing returns her too, and restoring the window brings her back onto the stage. Losing focus keeps her docked. If her monitor is gone, she lands on the floor line of the nearest monitor. + +While the settings window is open, she is docked into it as a native child at normal level: her window is the stage slot, her feet on the stage foot's top line, and it follows the slot live as the settings window resizes. She fills the column: the stage frames her by her height alone, head-on, without her wheel zoom, so every model stands about 90% of the column's height. Neither the wheel, Ctrl+wheel nor Shift+drag changes her on the stage, and neither her stored zoom and angle nor a stage size is saved. On macOS she follows the window with no lag, and other apps can cover both windows. Her speech bubble and text input stay with her while she is docked, so the user can talk while changing settings. Closing settings undocks her, and focus returns as it does for any closed window. On Windows she follows the settings window's moves and stays above other windows. + +Whoever moves her owns her. If the user drags her or an agent moves her while she is on the stage, she leaves it and stays where she is dropped, and that settings window does not bring her back until it closes or minimizes. She takes her desktop size back, about her window's bottom centre: at a drag's drop, before the drop settles, and before an agent's move. If the settings window opens while the user drags her or an agent command runs, she stays where she is that time. + +She reacts once when she enters a settings page, and again when a shown change (body, voice or pace) appears. Then she idles. Fast page flicks skip the reaction. The other reactions use existing clips. + +| Page | Reaction | +|---|---| +| Connection | `thinking` | +| Voice | `happy` | +| Persona | `calm` | +| Body | a model spin, done in code | +| History | `thinking` | +| Together | `laugh` | +| Listening | the `curious` emotion | +| Permissions | `cover_eyes` (new clip) while screen watch is off | +| Proactive | Less: `sleepy`; Normal: `idle`; More: `idle_lively` | +| Motion | previews the motion she plays | +| General | a wave clip | diff --git a/docs/agent-guide/design/signal-chips.md b/docs/agent-guide/design/signal-chips.md new file mode 100644 index 000000000..b03c97736 --- /dev/null +++ b/docs/agent-guide/design/signal-chips.md @@ -0,0 +1,2 @@ +# Signal chips +One pill per signal group in the chip column at the avatar's upper right (`chips/signal-chips.css`), above the delegation chip and in its pill family: a dot in the delivery class's colour (a Danger dot with a pulsing halo for urgent, a steady Amber ring for batched), the source in Text, the label in Text mute, and a cross that dismisses it. Urgent chips come first, newest first, one row each, and never fold. The batched chips share the next row: the newest one, its cross replaced by "+N", which unfolds the rest in place with their crosses and a Collapse pill after them; past eight rows that list scrolls inside, the urgent chips staying above it. A tap opens the group's details sheet under the column, 18rem wide and pinned 8px inside the window's right edge, moving up only as far as needed to stay 8px inside the window's bottom edge (covering chips or the character if it must) and, when taller than the window minus 8px at top and bottom, capped to that height and scrolling: the source line, the kind, the label, the received time, what YUI said or "Did not speak" in Text-mute italic, and the raw items. One sheet shows at a time and Escape closes it. A batched chip leaves 30 minutes after it arrived; an urgent chip stays until dismissed. A held press folds every signal chip to its dot together with the delegation chip. In a chip column narrower than 9rem the delegation chip stays folded to its dot and count, and a held press's unfold leaves it folded there; in the message window it keeps its label. The urgent dot's halo pulses, not the dot, and the pulse stops under reduced motion. While do-not-disturb is on, the urgent dot does not pulse. diff --git a/docs/agent-guide/design/speech-bubble.md b/docs/agent-guide/design/speech-bubble.md new file mode 100644 index 000000000..0abb25f80 --- /dev/null +++ b/docs/agent-guide/design/speech-bubble.md @@ -0,0 +1,8 @@ +# Speech bubble +The primary floating surface (`surfaces.css`), built in three layers: a positioning wrapper that places, lifts and fades it, a float layer inside the wrapper, and a frame that holds the box and what rides its edges. The box is a Surface panel with no tail and no hard border: Text at the speech size and line-height 1.75 on Surface, gently curved (14px), at least 132px tall (never past the height cap) with 26px of room above the text and 30px below it, a single Float shadow, and the system's *only* sanctioned frosted backdrop (`blur(10px) saturate(1.1)`, for legibility). Under `prefers-reduced-transparency` the frost drops and the box takes Plate. The bubble is bottom-anchored at 16% over the character's lower band so the face stays unobscured and a fixed `min(34ch, 78%)` wide, so what rides the box's edges never moves with its text; the box is height-capped at 34vh, 28vh while the text input is open, never under three lines of speech, scrolls inside, and fades its top once it overflows. A line's own line breaks show. Inline links wear an Amber-soft underline that ignites to full Amber on hover/focus, the link text taking Amber ink. + +Speech types out at 40 ms per character as its text arrives, in every script, whether the voice is on or off. The voice plays independently. A blinking Amber caret follows the typing, and the box's Hairline swells to Amber-soft while it runs. A click on the box shows the rest of the line at once and leaves the voice playing; the box is its own pointer target while the rest of the bubble passes pointers through to the character. When the line has finished, an Amber-ink ▼ at the box's bottom-right corner nudges 3px on a 1.4 s loop; it marks the end only and pages nothing. While the box shows, the whole dialogue floats, a 3px rise and fall over 6 s. Under `prefers-reduced-motion` the line appears whole, nothing floats or nudges, and the border holds steady. + +The name plate rides the box's top-left edge, half over it, in both modes: a 30px Plate chip with a Hairline edge and one Float shadow, carrying the character's face (its photo, else a dot in its hue) at 20px, the name, a 6px state dot and the state label. Beside the character it shows with the bubble, reads responding while speech streams, waiting for you with a steady dot while an Ask or Settings request card shows, and thinking while a turn runs, and has no dock button and no drag. A Backlog pill rides the box's bottom-left edge, half over it, mirroring the plate (Plate, a Hairline edge, Text dim at the sub size); it opens the current session's earlier lines in a Plate panel above the box: the user's under "You" and the character's under its name, at the body size in Text dim, oldest first, scrolling inside 12em and opening at the newest, under a Text-mute title at the caption size. The pill hides while the session has no earlier line. The bubble holds while the backlog is open, and every hide closes it. Older sessions stay in the settings History page. + +A turn the user started opens the bubble at once with the user's message quoted on its first line: Text-mute text a step under the speech size, led by a "You" label in Text dim at weight 600 (a mic glyph marks a spoken turn), clamped to two lines with an ellipsis and closed by a Hairline when anything follows it. The reply types in below it, and the bubble holds through the turn's filler and takes its dwell once the turn settles; the line hides with the bubble. A turn that fails before any reply drops the line and puts the message back into the composer beside the inline error. A turn she started carries its trigger line in that slot instead, see Trigger line (`trigger-line.md`). Two 1.5rem round buttons ride the top edge outside the box, the pop-out (arrows-out icon) and the dismiss (cross icon): Plate, a Hairline edge, one Float shadow and 0.75rem icons at stroke 2. They sit clear of the text and hold still while the box scrolls. They stay invisible until hovered or focused, and because the bubble passes pointers through for character drag, the buttons are their own pointer targets. Under the speech text the box carries a row of inline links, one per action — an in-place fix such as Connect on an unconfigured backend, Voice server not connected · Reconnect after a reply the voice server could not speak, or the first conversation's Hear the controls and Hear what she can do. The row sits outside the text's scroller, so the actions stay in view while a long line scrolls and add their height to the box; the links wrap to the next line with a 14px gap between them and 2px between the lines. Each wears an inline link's Amber-soft underline that ignites to full Amber, with the text taking Amber ink, on hover and keyboard focus, and a pointer target of its own. A busy action, such as Reconnect while it checks the server, reads in Text mute with no underline and a slow pulse, and takes no click. While the row shows, the bubble holds past its dwell and the dismiss button stays visible as its exit; the actions leave when the speech does. When "keep bubble until dismissed" is on the bubble never fades, and the buttons stay half-lit as its only exit. A message sent with attached Threads shows them under the quoted text as quiet pills, one per Thread: "Thread · title" in Text mute on a Hairline-strong edge, clipped with an ellipsis. diff --git a/docs/agent-guide/design/status-pill.md b/docs/agent-guide/design/status-pill.md new file mode 100644 index 000000000..6de404adf --- /dev/null +++ b/docs/agent-guide/design/status-pill.md @@ -0,0 +1,6 @@ +# Status pill +One pill at the top edge of the character window (`chips/status-pill.css`) carries the three tells above the character: screen capture, voice input and the backend's running tool. While a Rest, a Focus or an active-hours quiet span holds her, it adds a fourth: a still moon with its label, with no dot and no pulse. The label reads "Resting · until 08:00", "Resting" with no end, "Focus · 18 min left" or "Quiet · until 12:00". It is centred at 4.5% from the top, 1.75rem tall and pill-shaped, with a Plate background, a Hairline edge, one Float shadow, Text dim label text at the sub size and weight 500, and 0.9rem line icons at stroke 1.5. It enters and leaves with an opacity fade and a 6px drift over `--yui-dur`. + +The pill shows while capture is on, voice input is live, a tool runs or a failed turn's notice holds, and leaves once all settle and nothing holds her. With capture on and nothing else, it holds the capture icon alone, with a steady Amber point on the icon's corner as the always-on privacy cue; clicking the icon opens the settings panel. While voice input is live, a mic icon follows, then a Hairline separator, a dot and the voice state as the label. The dot pulses Amber while listening and transcribing, holds full Amber with a 2px Amber-soft ring once a turn fires, and turns Danger on error. A failed turn the input cannot show (a typed turn whose input has closed, or any spoken turn) puts its condition text on the label as a notice, with the dot holding Danger; a speech-bubble mark leads it when no mic shows. A keyed failure adds one action after the text as an inline link in the speech bubble's link treatment, the underline igniting to full Amber and the link to Amber ink on hover and keyboard focus: Connect, Change key or Check connection, each opening Connection, the last two on the key field. The notice holds for 60 s with an action and 3 s without; a new turn or a click on its action clears it at once. A blocked microphone keeps its voice label and, on macOS, offers Open mic settings in the same place, which opens the Microphone privacy pane, with a Text-mute glyph after the link; a notice or a running tool takes that place first. When the backend sent the server's own text for a failed spoken turn, that text takes the label in place of the state word. It stays on one line and ends in an ellipsis where the pill's width runs out, and the pill widens to the window's width less 1.5rem to give it room. + +While the backend runs a tool, the tool's label takes the segment and the dot pulses Text dim, keeping amber out of work. The mic icon stays and turns Danger itself when voice input is in error. At completion the dot solidifies into an Ok checkmark and holds 1.5 s with the tool's label, then the segment falls back to the voice state or the pill leaves. The capture icon and the notice's action take pointer events; everywhere else clicks pass through to the character. Under reduced motion nothing pulses and the pill fades in place, and the label and dot colour carry every state. diff --git a/docs/agent-guide/design/text-input.md b/docs/agent-guide/design/text-input.md new file mode 100644 index 000000000..0612f2fd4 --- /dev/null +++ b/docs/agent-guide/design/text-input.md @@ -0,0 +1,2 @@ +# Text input +A slim field summoned by hotkey, sliding up from the bottom (`surfaces.css`). Plate, 12px corners, and a transparent inner field set at the speech size with a Text-mute placeholder kept on one line. The field is multi-line. It starts at one line and grows with its content, up to six lines in the character window (growing upward, the bubble lifting with it) and twelve in the message window, then scrolls inside; Enter sends and clears the field, and Shift+Enter breaks the line. Attach, pop-out and send sit on the last line as three equal 2.125rem round icon buttons (paperclip, arrows-out, arrow-up; 1.05rem icons at stroke 1.5): transparent and Text-mute at rest, Amber ink on Amber faint on hover, and pressing in to 94% while clicked. The pop-out, between the field and send, moves speech and the typing session into the message window. While a turn runs, send becomes stop, a filled rounded square in Amber on Amber faint, and the field dims. At rest the border is a Hairline; on `:focus-within` it ignites to an Amber border plus an Amber-soft ring, the design's signature warmth moment. Submit failure shows a Danger inline message, never a side-stripe, and one action link after the message in the speech bubble's link treatment, an Amber-soft underline igniting to full Amber on hover and focus. The action follows the failure: Connect for an unconfigured backend; Change key for a refused key (401 or 403); Check connection for any other 4xx but 429, whose rate-limit line has none; Retry for a stall, and for a drop with no HTTP status or a 5xx. Change key and Check connection open Connection with the key field showing. Retry resends the field's text, edits included, and shows only while the field holds text or attachments; a failed typed turn returns its text to an open, empty field, so Retry has the text to send. Typing clears the message, and Retry stays while the field holds a draft. The unified chat window's composer offers no Retry, and a voice turn's failure goes to the status pill instead. Attached Threads sit in their own row above the image tray: one pill per Thread on an Amber edge, "Thread · title" in Amber ink at the caption size (600), clipped with an ellipsis, then an 18px round × that takes the Hover fill and an Amber-soft focus ring. A message of chips alone sends. diff --git a/docs/agent-guide/design/threads-chip.md b/docs/agent-guide/design/threads-chip.md new file mode 100644 index 000000000..3ab48f38b --- /dev/null +++ b/docs/agent-guide/design/threads-chip.md @@ -0,0 +1,2 @@ +# Threads chip +The main character's pill for waiting Threads (`threads/chip/threads-chip.css`), in the chip column between the signal chips and the delegation chip and in their pill family: 32px tall on Plate with a Hairline edge and one Float shadow, Text dim at the sub size (500). It carries the source marks of up to three newest waiting Threads, newest first, as overlapping 22px Panel circles on a Hairline strong edge; the label; and the count as an Amber badge, 20px, Ink at the caption size (600) in tabular figures. A source outside the known table shows its first letter as the mark and its raw name. In a narrow column the label ellipsizes first. In a chip column narrower than 9rem the chip shows only the count, so it stays inside the window. The chip hides while nothing waits and its edge turns Amber-soft on hover. When a Thread or a request starts waiting it wiggles once, a damped rotation of −7° → 6° → −4° → 2° → 0 over 520ms; it never pulses, and under reduced motion it holds still. While do-not-disturb is on, an arrival does not wiggle it. A held press folds it with the other chips to its newest mark and the count (the count alone in a chip column narrower than 9rem). A tap opens the Threads window. The chip hides while the window is open. diff --git a/docs/agent-guide/design/threads-window.md b/docs/agent-guide/design/threads-window.md new file mode 100644 index 000000000..5d65b11d8 --- /dev/null +++ b/docs/agent-guide/design/threads-window.md @@ -0,0 +1,12 @@ +# Threads window +A frameless window (`threads/window/`) that moves on its own and is not kept on top: other apps can cover it. Its first open places it 12px beside the main character's window on the side with more free screen, kept 12px inside the work area. After that it reopens at the frame it was left at; a frame no longer on a monitor moves into the work area of the nearest one. Dragging the head moves it, and the frame is remembered once the move settles. One panel fills it inside a transparent 8px margin: the Threads base at 98.5% opacity, a Hairline edge, the floating 14px corners and one Float shadow. It grows out of the chip: the panel clipped from a chip-sized pill at its edge nearest the chip to its own rect over 280ms, then the content fades in over 120ms. When the main character opens it for a Thread reaction, the content's fade runs beside a jelly: the panel stretches wide, then tall, then settles about its top edge over 560ms, never past the 8px margin. A user's open grows without it. An open while it shows brings it to the front without the grow. When she raises it for a Thread reaction, the panel hops 8px up, dips 3px and settles over 480ms, inside the margin. Closing (×, Escape) fades the content out over 90ms and shrinks the panel back over 220ms before the window hides. Blur leaves it open. Under reduced motion it shows and hides at once. + +Its edges (8px) and corners (14px) resize it, with resize cursors, from an 880 × 680px panel by default down to 360 × 420px and up to the work area less 12px on every side; a work area too small for the minimum gives it the work area less 12px. While a resize lasts, a pill at the panel's centre reads the panel's size and layout ("640 × 560 · Medium") in Text mute on Threads head, tabular figures, with a Hairline edge. The size is remembered with the frame, never below the minimum. + +The head, on Threads head, is the drag handle with a grab cursor and holds a sidebar toggle, the title at the title size, the waiting count in Text dim, the Thread turns button, and a round × button. The Thread turns button is a 30px pill of a 15px bell and "Thread turns: {level}" at the sub size (500): a Hairline edge in Text dim while Thread turns is Off, else an Amber-soft edge in Amber ink. It opens a 280px popover under it, right-aligned with it, on Threads base with a Hairline strong edge, 12px corners and one Float shadow: a Text-mute caption (600), the three levels as radio rows (a 12px tick that fills with Text, the level at the body size (500) over a Text-mute caption line, the checked row on the Selected fill), and a Text-mute foot note. Opening focuses the checked row, the arrow keys move between the rows and wrap at the ends, and a pick, Escape or a click outside closes it; while it shows, ↑ ↓ leave the list alone. While External signals is off its rows are disabled and the foot note gives the reason. Below a Hairline, the panel's width picks the layout. Wide (720px and up), a list pane on Threads side sits beside the thread pane, a third of the panel between 264px and 360px until the user drags its edge. The edge is a window splitter with an 8px col-resize hit area whose line turns Amber on hover and drag, and keyboard focus shows the window's focus ring; a drag or Left and Right in 16px steps set the width between 220px and half the panel, at most 480px, for both tabs, and a double-click returns to the default. The width is remembered, and a narrower window narrows the list within the same range. The list pane's Waiting / All segment carries both counts, the checked one on the Selected fill; its keys, and the kind select's, stay with it rather than moving through the rows. Under it, one kind select opens a popup in the page that lists every source with its count under the filter; a zero count is disabled unless it is the selected kind. It is a 36px field with a Text mute edge and the theme chevron inside a 44px hit area. The rows put waiting Threads first, then the newest. Each row is one line of the source mark and name, the state word and the relative time, then the title at the head size (600) on two lines at most, then the label on one ellipsized line in Text mute. The state word is Amber ink when the Thread needs the user, Danger on failure and Ok when done. The selected row takes the Selected fill. ↑ and ↓ move through the rows. A panel under 440px drops the label line. + +The toggle and ⌃⌘S collapse the wide list pane to a 56px rail at once, and the choice is remembered; a width change never writes it. Medium (520–719px) shows the rail, and the toggle lays the full list pane over the thread pane with one Float shadow, sliding 8px in as it fades in over 160ms; a selection, Escape or a click outside closes it. Narrow (under 520px) shows one pane at a time, a List button on the source line leading back from the thread, with no rail or toggle. Escape closes that overlay before the window. Under reduced motion each change is instant. + +The rail on Threads side holds the same Waiting / All segment, stacked: Waiting as a question-bubble mark over its count in Amber ink and All as an inbox-tray mark over the total, the checked one on the Selected fill, each named and tipped by its count. Under it, a funnel mark (the source's mark once a kind is picked) is the kind select's trigger. Then one 40px button per row of the list: its source mark, an Amber dot while it waits, the selected one on the Selected fill, and the title and state in its tooltip and accessible name. + +The thread pane reads first. Its head shows the source, state, title and label. On a waiting Thread the source line ends in a Mark read button, a check mark and its word at the sub size in Text dim with a Hairline strong edge. A read Thread's state word drops Amber ink for Text dim. A pane under 560px tightens its paddings. A pane under 440px tall drops the label line. The transcript scrolls on its own, holds at its newest entry, and takes the height: each entry's speaker and time at the sub size, then the text at the speech size, line-height 1.8, rendered as Markdown (headings, lists, tables, quotes, code, links and https images) that keeps its own line breaks, with code spans on Selected and fenced code on Threads head; the text fills the pane's width. The user's own entries are dimmed and set off by a Hairline. The pane has no answer field: the user acts on a Thread by telling the character. Every Thread's source line also ends in Attach to chat, in the same treatment; while the Thread's chip is in main's input it reads Attached on an Amber edge over Amber faint in Amber ink. diff --git a/docs/agent-guide/design/trigger-line.md b/docs/agent-guide/design/trigger-line.md new file mode 100644 index 000000000..1e9063fff --- /dev/null +++ b/docs/agent-guide/design/trigger-line.md @@ -0,0 +1,4 @@ +# Trigger line +The trigger line is the quote slot's first line on a turn she started, in the signal-line style. It names a schedule cue by its time and label, an idle cue by its label, the first meeting, a screen switch, or another character's name. + +A bundled turn adds the rest of its members and signal groups as `+N`, as in "09:00 Morning +2". A user turn quotes its message instead, and the reply that follows is the backend's. diff --git a/docs/agent-guide/design/type-dropdown-yui-select.md b/docs/agent-guide/design/type-dropdown-yui-select.md new file mode 100644 index 000000000..1a96399e6 --- /dev/null +++ b/docs/agent-guide/design/type-dropdown-yui-select.md @@ -0,0 +1,6 @@ +# Type dropdown (`yui-select`) +The shared Select (`controls/select/`, on Base UI's Select) is the type and provider picker in the Connection page's sections and the pace picker of Persona's active hours. Its trigger is a button without OS chrome: a `--yui-field` fill with a transparent edge, `--yui-radius-control` corners, the value at the body size cut with an ellipsis, and a chevron data URI in the Text-mute colour (--yui-chevron, one per theme). Hover adds a Hairline, and `:focus-visible` ignites an Amber border plus an Amber-soft ring (the same warmth moment as the text input). A `--single` variant for inert one-option sections is disabled, drops the chevron and the hover Hairline, dims the text to Text dim, and shows a default cursor. + +The popup opens over the settings content with the selected item over the trigger: Panel background, a Hairline-strong edge at `--yui-radius-control`, one Float shadow, and a height held to the room in the window. Items sit at the body size; the highlighted one takes the hover fill and the selected one the selected fill at weight 600. Escape closes the popup alone, and a popup closes when the page switches the view that holds it or the rail switches to another page. + +The chat type row's closed trigger shows the short type name as its own text, while the popup carries the long names, which say who keeps the conversation history. A description line under the row follows the selection in the Text-mute sub size and fades in over `--yui-dur-fast`; its one inline link wears the speech bubble's treatment, Text on an Amber-soft underline that ignites to full Amber, with the text taking Amber ink, on hover and keyboard focus. diff --git a/docs/agent-guide/design/unified-chat-window.md b/docs/agent-guide/design/unified-chat-window.md new file mode 100644 index 000000000..9e6a10343 --- /dev/null +++ b/docs/agent-guide/design/unified-chat-window.md @@ -0,0 +1,8 @@ +# Unified chat window +A frameless, transparent, always-on-top window (`unified-window.css`) holding one 340px column, shown while the Unified chat switch is on and two or more presets are open. The window takes the column's height and stays where it was dragged. Top to bottom: the cast row, one dialogue box, then the composer, 8px apart. + +The cast row is the recipient picker and the window's drag handle: a press on a chip picks, a press on the grip or the row's empty space drags. Each open preset has a cast chip: a 28px Plate pill with a Hairline edge and one Float shadow, carrying the preset's 22px face (its photo, else a dot in a hue taken from its id), the name at the sub size (600) in Text dim and a 6px state dot. Idle, the dot is Text mute at 55%; thinking, it breathes Text dim; talking, it pulses Amber and the chip's edge turns Amber-soft. The hue's lightness and chroma are `--yui-avatar-l` and `--yui-avatar-c` (Dawn 0.5 / 0.12, Hearth 0.78 / 0.12). An everyone chip in the same material, the word alone, follows the cast chips. The chips are one radio group with one tab stop, on the checked chip, else the first: a click picks that recipient and moves focus to the field, and the arrow keys, Home and End move between the chips and pick, focus staying on the row. The checked chip is the pick, else a typed leading `@name`, else, while a send runs, that send's recipient, else the last speaker, else main's preset, else the first open preset; it takes an Amber-soft edge on Amber faint with Text. The chips wrap to a second row when they do not fit. Two 28px rounds in the same material close the row: a grip of six Text-dim dots, which keeps its width however many chips there are, and the ×, which closes the window and turns the Unified chat switch off. While main's attached Threads show, every chip but main's and the everyone chip is disabled: dimmed to 55%, a not-allowed cursor, and skipped by the arrow keys. + +The box is the message window's dialogue box in flow, and takes no room while it has nothing to show. Its name plate shows the face and the name of the character whose line is showing, without the state dot the cast chip carries, and a press on it drags the window, as in the message window. Lines play one at a time: a character's line waits until the line before it has finished typing, and a window opened mid-line shows from the next line. The user's quote leads with "You → name" or "You → everyone", and drops a leading `@name` that names that recipient; the backend receives the text as typed. The backlog lists the current session's lines of every open character, each led by its speaker or "You → name", the user's without a leading `@name` that names the line's recipient. + +The composer is the message window's field without the attach button. Its placeholder names the checked chip's recipient ("Say something to Natsume…", "Say something to everyone…"). Typing `@` opens a list above the field, in flow so the window grows to hold it: each open preset with its 14px face, then `@everyone` with its sub-line, the active row on the Selected fill. While any turn runs, send becomes stop, and stop ends every character's turn. Speech goes where Enter sends and its quote carries the mic glyph, and a spoken send that the field's leading `@name` addressed consumes that token, leaving the field's other text; speech that arrives while any turn runs or a line holds or waits for the box lands in the field, unsent, and with barge-in on, starting to speak while a character runs ends every character's turn as stop does. A routed turn that fails shows its error under the field, with its fix action. While the window shows, every character's chat lines go here: the message windows hide, and each character's Separate message window row is locked with a Text-mute reason ("Off while the unified chat window shows"). Notices without a speaker stay in the character's own bubble. While main's attached Threads show, a one-line hint sits above the field on Plate, caption size in Text dim, saying the Threads go to main, the one character who can read them; the @ list offers only main, and a typed `@name` for anyone else is refused with the hint as the field's inline error. diff --git a/docs/agent-guide/project-structure.md b/docs/agent-guide/project-structure.md index 0e0e3e1d8..1cc377e11 100644 --- a/docs/agent-guide/project-structure.md +++ b/docs/agent-guide/project-structure.md @@ -14,8 +14,10 @@ ## Directory Map +A source file's description is its first-line comment. + ``` -YUI/ +YUI/ # The repository: the app, the Rust shell, the plugins, the integrations, and the docs index.html # Vite entry settings.html # Settings-window Vite entry devtools.html # Developer Tools Vite entry @@ -23,7 +25,6 @@ YUI/ unified.html # Unified-chat-window Vite entry threads.html # Threads-window Vite entry character-menu.html # Character-menu-window Vite entry - vite.config.ts # Dev port YUI_DEV_PORT|1420, strictPort, host 127.0.0.1, backend proxy plugin biome.json # Format and lint config (curated rule set) scripts/ # Summarised: dev launchers (dev-port.mjs, tauri-dev.mjs for tauri:dev, dev-auto.mjs) and their shared package-manager.mjs helper, dev-backend-proxy.mjs, release.sh, worktree-setup.sh, rust-lines.sh (code and test line counts of a Rust file), architecture-map-base.mjs (writes the map of origin/main beside the data file for the viewer's Compare view), and ci/ (test-guard.sh, gates.sh, architecture-map.mjs, command-paths.mjs, css-selectors.mjs, logger-namespace.mjs) configs/ # Runtime-loaded config (no hardcoding) @@ -38,1027 +39,231 @@ YUI/ persona.json # Default card per UI language (en/ja/ko), the framing sentence, and the {{user}} fallback word emotion_text/ # Emoji voice-tag vocabulary, loaded only when tts_provider is irodori (emotion_text/irodori.json) public/motions/ # VRMA motion assets - src/ + src/ # The client source, in import order: contract, config, renderer, settings, io, dispatcher, ambient, ui, app, and windows app/ # Composes the pet window from the layers below - bootstrap-configured.ts # Pet window's config-derived bootstrap: runs the turn core and the pet-only wirings in order and drains their teardowns - csp-violation.ts # Logs every Content-Security-Policy violation the window reports - disposers.ts # Shared teardown bag: registers teardowns at creation sites and drains them LIFO active-hours/ # One pet window's active hours: the proactive gap and idle cue scale, and what holds her turns: Rest and quiet spans - window-active-hours.ts # Scales the gap and idle cue minutes by the base pace times the current span's pace; rest() is the running Rest, Focus or quiet span card-io/ # The card's file steps bound to a preset registry - import-preset.ts # The import a card section runs: native file step, copied voice registration, VRM list entry, preset creation, and rollback - wire-card-io.ts # The card's import, export, thumbnail, photo pick, and preset creation ports relations/ # This window's relations wiring - wire-relations.ts # rate_relation's open-preset targets and the ingress relations RPC, over the window's store turn/ # The path of a turn: sources, voice, and push - turn-core.ts # The chat turn every backend-facing window runs: voice, dispatcher, STT, VRM load, vocabulary, push transport, stop, and submit - wire-dispatcher.ts # Turn feed, backend caller, guardrails, pacer, and the dispatcher - report-turn-failure.ts # Where a failed user turn shows: the open input, or a notice on the status pill - wire-sources.ts # The dispatcher's utterance sources, built and started - wire-waiting.ts # The rows yui.waiting reads: the dispatcher's waiting list and the signal buffers, peeked without a drain - wire-card.ts # The card module bound to the window's stores, preset, UI language, and config - wire-greeting.ts # The greeting after a session reset, and the reset announcement each window's Start fresh makes - wire-first-conversation.ts # After Quick start connects, and on its Replay: the greeting on an empty session, then the input and the controls hint with the two guides - ask-queue.ts # The window's Ask queue: the push socket's Asks and the Settings requests, shown oldest first, the user's pick sent to the owner of the one shown - settings-request.ts # A yui_run write's allow paths as one Settings request in the Ask queue, answered with a decision, no answer, or busy when one is already open - wire-yui-run.ts # Builds the ports a yui_run script reaches from this window's stores, Ask queue, selections and Tauri commands - session-reset-announcer.ts # What a window's Start fresh announces: the bridge event, then this pet window's own greeting vocabulary/ # The express vocabulary every consumer declares - wire-vocabulary.ts # The emotion_text table load, the derived vocabulary, and its change announcements push/ # Push socket wiring and its stores - delegation-chip-mount.ts # The delegation chip's lazy mount and its suppression port - playback.ts # Reports a failed turn's end to the push socket as a playback frame - wire-push.ts # Push socket frames into turns, the stop button, and the push mode chip - push-stores.ts # The push socket, its chat id, and the delegations and reasoning stores its frames feed voice/ # Voice input and speech playback wiring - wire-voice.ts # The voice-input and turn-voice wiring; a bound window builds no capture - wire-voice-pipeline.ts # Wires filler, TTS, and speech playback to the turn lifecycle - speak-turn.ts # The speech turn behind TurnOutput: thinking guard and motion hold, filler availability, failure asides, barge-in - unified-voice.ts # Main's speech while the unified chat window shows, and the user speaking answered like a stop - wire-synth-failure-notice.ts # The first synth failure per pet window run: the bubble's Choose another action, opening the Voice page stage/ # What is bound to the pet window's stage and overlay - stage-renderer.ts # The renderer on the stage with its persisted camera and idle throttle, plus Tier 1 liveliness, for the pet window - wire-gestures.ts # Pointer gestures on the stage: taps, pats, the window drag, and the camera orbit - wire-window-sources.ts # The Tauri window drop and resize sources, the avatar RPC executor, and keep-on-screen - wire-window-geometry.ts # The per-window saved size and position: written after the OS drag ends and a Ctrl+wheel resize, applied once at boot - wire-locomotion.ts # Travel frame, the five locomotion loops, and the window sources composed into one handle, held still per holder - wire-come-along.ts # Her own settings window's stage slots and close into the come-along, and the stage ask at boot - wire-pet-stage.ts # Stage wheel zoom, the persisted camera and throttle flow, and the feet-follow input anchor - wire-summon.ts # Peek state and exit triggers, tray summon, and the global summon hotkey - wire-stage.ts # Click-through hit-test and cursor-gaze wiring over the stage dev/ # DEV-only console handles - wire-dev-globals.ts # The DEV console and global handles for inspection and firing dispatcher events cross-window/ # State the windows share - wire-cross-window.ts # Per-window sync for the pet, settings, and devtools windows - wire-window-sync.ts # Settings broadcast, guardrail overrides, and the shared cross-window sync core + dnd/ # Do-not-disturb wiring: the root marker that holds the urgent chip's pulse, and the tray's Do Not Disturb check controls/ # The pet window's summonable control surface - wire-pet-controls.ts # The popped-out surfaces' settings asks and the cue locale sync - wire-devtools-request.ts # Main's pet window opens Developer Tools when the settings window asks - wire-help-guide.ts # Guide requests the settings window sends over the bridge, submitted as user turns settings/ # Selections and conversation state applied to the running app - config-defaults.ts # The quick-controls getters over the bundled config, shared by the pet and settings windows - conversation-stores.ts # Constructs the shared io/chat conversation stores each window owns and disposes - dev-key-fallback.ts # The VITE_YUI_*_KEY build-time key values, read in dev builds only - window-stores.ts # Creates the settings and conversation store bags and the preset registry of the pet and settings windows and registers each store's teardown - window-vrm-selection.ts # The store-only VRM selection of a window without a renderer - wire-window-settings.ts # The settings side the settings window uses: stores, theme, config, voices, settings-window sync, the mirrored push socket and the reset announcer - wire-avatar.ts # VRM and speaker selection stores, their swap and import flows, the voice-list refresh on override commits, and the avatar config applied at boot - wire-config.ts # The config store over the bundled configs, the runtime key stores, the live endpoint/guardrail merges, and the reload/watch wiring - wire-cue-locale-sync.ts # Reseeds untouched built-in cues when the display language changes - wire-preset.ts # Sends a preset switch over the settings bridge and reloads each unbound window into it, after the pet window stops its turn; a bound window only rereads the list signal-chips/ # The signal chips beside the avatar - wire-signal-chips.ts # The signal chips on every transport, sharing the delegation chip's fold store threads-reaction/ # Main's Thread reactions: the Threads client, the Threads window, the chip's taps, presence, speech, the turn pipeline, the stage and the renderer - wire-thread-reactions.ts # Wires the thread reaction in main; a window without a Threads client wires nothing threads-attach/ # Main's attached Threads, wired by the chat turn in main's window only - attached-threads.ts # The list: each Thread once, toggled, dropped by the Threads a send carried, and a failed send's put back - wire-threads-attach.ts # The Threads window's toggles and the chips' × into the list, the list into every composer and out to the Threads window, a send's drop threads-chip/ # Main's ways into the Threads window: the chip, the tray's Terminal item and a bound Character menu's requests - wire-threads-chip.ts # The chip from the store's snapshots, on the shared fold store, opening the Threads window and reporting its taps - wire-threads-open-requests.ts # The tray's Terminal item and a bound Character menu's request, opening the Threads window on their tab pet-windows/ # Windows bound to one preset: the shared open list, their lifecycle, and the windows each one opens - pet-window-role.ts # The entry main composes: the registry and open list a window owns, the orphan check, and main's reconcile or a bound window's self-close - companion-window.ts # A companion window's boot: the orphan and owner checks, its own live key, and its teardown on a close request; the pet window's wait for its companions - wire-pet-windows-sync.ts # The open list in every window: a local edit out over yui://pet-windows-changed, a remote one reloaded from storage - wire-pet-windows-reconcile.ts # Main's reconcile: prunes the list and live keys, then opens each wanted preset that has no window - wire-preset-ids-sync.ts # Main publishes the registry's preset ids to the shell, so a prefixed ingress route can tell a closed window from an unknown id - wire-bound-window.ts # A bound pet window's live key, its companions closed first, and its store teardown and close when its preset leaves the list - close-if-orphan.ts # Closes a bound window whose preset is no longer in the registry message/ # The message window's wiring, and the character's name both windows' plates and backlogs show - wire-message-surface-ops.ts # Draws each surface op from the pet window onto the surfaces, which the plate follows - character-name.ts # In the pet window: the character's effective name, the card's while the built-in preset is unnamed, else the preset's - mirrored-name.ts # In the message window: the character's name as the pet window last sent it - wire-plate-name.ts # The plate's character name and the bound preset's face, or the active preset's when unbound unified/ # The unified chat window's wiring - wire-unified-window.ts # Main opens the window while it shows and destroys it otherwise - wire-unified-close.ts # The window closing itself turns the Unified chat switch off character-menu/ # The Character menu: its pet-window side and the Character menu window's side - wire-character-menu.ts # The pet window's right-click on her, and the menu window's picks and closes received back - pet-menu-opener.ts # Asks the menu window to open with her placement and state, holds her while it shows, marks the chip column, and lets her go on close - read-menu-placement.ts # Her window's frame, its monitor's work area, and her head, name and chest points for the menu - character-menu-ports.ts # The menu's actions over the stores and openers the pet window has: Rest, Listen, Body, Voice, Pace, Keep bubble, Unified chat, Reset chat, Threads, Turn off - wire-character-menu-window.ts # The menu window's wiring: its theme and language, and the session fed by the bridge's open, state and close requests - menu-window-session.ts # The menu window's open sessions: places and shows the menu beside each open's pet window, reports shown and closed, and hides it threads-window/ # The Threads window's wiring - wire-threads-window.ts # Snapshots into the view, read marks to the store, main's attached Threads into the pane and its Attach to chat back, the frame store into placement and resize, the list choice, the open request, theme and language - threads-placement.ts # The window's frame: beside main's pet window the first time, its stored frame after that, its head's native drag, and the frame saved once a move settles - threads-presence.ts # One open or close at a time: show and grow, or focus or raise without focus while shown; shrink and hide, then the closed report, and the presented report for an automatic request - threads-resize.ts # A handle drag into the window's box, applied at most once a frame, the frame saved after the last apply settings-window/ # The settings window's wiring - wire-settings-window.ts # Stores, config, cross-window sync, and the settings panel remounted on locale change, bound to the query's preset when it names one, and editing the preset `?edit=` names - edit-target-url.ts # The settings URL with its `edit` param set to the picked preset, or dropped for the window's own, and its `page` and `focus` params set to the requested page and field - wire-settings-page.ts # Takes the URL's page and focus, and answers an opener's page request: switches to the opener's character, then selects the page and focuses the field it names - wire-voice-mirror.ts # Mirrors the voice toggle to the pet window and the pet window's voice state back; main only - logger.ts # Namespaced frontend logger with a runtime level - tauri-env.ts # Tauri runtime detection windows/ # One entry file per window, loaded by the matching HTML file - main.ts # Pet window: config load, renderer, dispatcher, and the I/O graph - settings-main.ts # Settings window: mounts the settings window wiring, with the companion guard when the query binds a preset - devtools-main.ts # Developer Tools window - message-main.ts # Message window: the bubble, input, and plate, with the companion guard when the query binds a preset - unified-main.ts # Unified chat window: the frameless 340 px column, the speech stream into its box, and the composer that routes a message - threads-main.ts # Threads window: boots the Threads window wiring - character-menu-main.ts # Character menu window: boots its wiring with the frame, the hit-test and the bridge - styles.css # Pet-window base stylesheet - vite-env.d.ts # Vite client types and build-time env declarations contract/ # TS contract types — the wire schema source of truth - types.ts # Wire schema source of truth for the YUI to backend contract - index.ts # Contract barrel builtin-client-tools.json # Built-in client tool names; the MCP host's name conflict rule reads them and a Vitest test checks them against the tool registry config/ # Config load, validate, reactive store, hot-reload, and the runtime URL resolver - load.ts # configs/*.json loader and validation, fail-loud - asset-url.ts # Bundled asset paths and imported user files to runtime-fetchable URLs - store.ts # Reactive config snapshot with hot-reload and change subscriptions - emotion-text.ts # Per-provider emotion_text emoji table loader - tts-provider.ts # The tts_provider values and the Irodori default for an unset one - secrets.ts # The secret provider and the key-name constants - validators/ + validators/ # The bundled configs' validators: the avatar sections, the persona card, and the other config files' shapes avatar/ # Validates avatar.json, one file per section - index.ts # Router: the early throws, section calls in order, and the result - types.ts # The avatar.json config types - helpers.ts # Shared issue-recording field readers and unknown-key check - available.ts # The available VRM manifest - framing.ts # The fit-to-bounds camera - hit-test.ts # Click-through polling and the alpha cut - tap.ts # Tap regions and touch cues - peek.ts # Side-peek geometry - walk.ts # Floor stroll and window-top stroll - fall.ts # Drag-release fall and monitor descent - climb.ts # Ambient window climb - jump.ts # Window-to-window flight - gestures.ts # Drag-hold duration and gesture cues - gaze.ts # Cursor tracking angles and damping - emotion-registry.ts # Validates the emotion registry against the emotion enum - endpoints.ts # Validates endpoint URLs and models; an empty value leaves the feature off - filler.ts # The filler.json phrase-pool and loop-timing types and their validation - guardrails.ts # The guardrails.json debounce, rate-limit, and attachment-cap types and their validation - hotkeys.ts # The hotkeys.json summon-accelerator type and its validation - motions.ts # Validates the motion registry persona/ # The card type, the V1/V2/V3 card reader, the V2 export envelope, and the persona.json validation - persona.ts # The persona.json card, framing sentence, and user fallback validation - read-card.ts # The V1, V2, and V3 card reader with its issues - types.ts # A card's Tavern Card V2 shape, its limits, and the persona config type - serialize-card.ts # The card as a chara_card_v2 envelope for export - screen.ts # The screen.json type and the validation of its frontmost-transition thresholds - shared.ts # Shared ConfigError plus issue-recording helpers renderer/ # three.js + VRM rendering - index.ts # three.js and VRM output layer: scene, rAF loop, VRM load and hot-swap - types.ts # Renderer options, per-frame tick context, and the Renderer surface - apply-directive.ts # Pure routing of a control envelope into the emotion and motion sinks - frame-gate.ts # Pure idle and active frame-throttle decision - frame-loop.ts # The rAF loop with its clock, hidden-document pause, and idle-throttle gate - landing.ts # Her landing bounce on the canvas after a sit, about the live seat - pin-controller.ts # Stateful perch and peek pin apply layer - vrm-loading.ts # VRM optimisation of a loaded glTF and the display-name read - vrm-participant.ts # The per-frame lifecycle every VRM-bound sub-controller implements camera/ # Camera framing, zoom, and orbit state - camera-fit.ts # Pure fit-to-bounds framing math - pixel-ratio.ts # Pure devicePixelRatio clamp - rig.ts # Fit-to-bounds framing, wheel zoom, the eased orbit polar, and the travel view window - view-window.ts # Draws the reference-size framing at an offset inside a parked canvas geometry/ # Silhouette hit-testing and read-only model probes hit/ # Alpha-silhouette hit-testing, stage coordinates, and tap regions - alpha-hit-test.ts # CPU-side low-res silhouette grab, its sampling and its bounds - hit-test.ts # Pure helpers for the alpha silhouette predicate and its bounds - stage-coords.ts # Client CSS px to stage-local coordinate conversion - tap-region.ts # Classifies a tap point into a body region probe/ # Read-only model probes, anchor projection, and perch math - perch-geometry.ts # Pure math for the window-sit perch - project-anchor.ts # Projects the world feet point into canvas pixels - screen-probes.ts # Read-only screen probes of the loaded model: feet anchor, width, seat and tap points, hand anchors, pixels per metre motion/ # Clip scheduling, variant swaps, and clip processing clip/ # Clip cache, mirroring, and root-motion processing - clip-library.ts # Per-VRM .vrma clip cache: load, mirror, root-lock detrend, dead-clip memo, crossfade clone - dead-clips.ts # Warn-once memo of VRMA paths whose load failed for good - mirror-clip.ts # Mirrors a clip across the YZ plane - recenter-root-motion.ts # Strips baked horizontal drift from VRMA root motion - self-crossfade.ts # Clip-cache key composition and playback clip selection playback/ # Motion scheduling, variant swaps, and mixer playback - fallback.ts # Idle-fallback decision for a motion whose clip fails to load - cycle-dwell.ts # Single-timer scheduler for a cycle motion's variant swap - motion-controller.ts # Pure motion scheduling and variant-resolution state machine - motion-playback.ts # Mixer-driven motion playback: controller decisions, action crossfade, finish → next, idle baseline - motion-start-generation.ts # Tracks which asynchronous motion start owns mixer playback - perch-hold.ts # Held-posture suppression and baseline rules yaw/ # Root-yaw easing math and its per-frame apply - body-yaw.ts # Pure easing math for the root yaw a stroll turns by - root-yaw.ts # Eased root yaw the ambient stroll turns the character by, written onto the model's base rotation each frame + grounding/ # Grounding: the per-frame floor height, the sole points, and the sole offset expression/ # Emotion, mouth, and gaze apply layers over the face - ease-emotion.ts # Eases the expression back to neutral when playback ends - emotion-crossfade.ts # Stateful VRM-expression crossfade apply layer - emotion-resolver.ts # Pure expression lookup and fallback-chain traversal - mouth-lipsync.ts # Amplitude-only mouth state machine and expression describe helper gaze/ # Cursor-gaze math and its three.js apply layer - bone-pitch.ts # Sign that turns a downward head pitch into a normalized bone's local rotation.x - cursor-gaze.ts # Stateful three.js apply layer for cursor head and eye tracking - gaze-tracker.ts # Pure cursor-gaze zone curve and angle damping dispatcher/ # Event bus + classify, guardrail, route - dispatcher.ts # The router that enforces the firing-is-not-judgment boundary - core/ - classify.ts # Pure tier, target and waiting-class classification of a bus envelope, plus the paced-source table - event-bus.ts # Priority queue collecting every speech-candidate event - guardrails.ts # Debounce on arrival, then the rate limit's canSpend and spend - addressed-chain.ts # The chain cap: how many addressed turns a window takes in a row without a user turn - paced-pipeline-busy.ts # The pipeline-busy predicate composed with the proactive gap - proactive-pacer.ts # The proactive gap after a turn that every proactive source shares - turn-gate.ts # The cross-window Web Lock a turn holds from its backend call to the end of its playback - waiting-list.ts # Self-started candidates that cannot speak now, ranked by class then age, with the keep rules - waiting-release.ts # What one free slot sends: the admissible entries and drained signal groups as one envelope - admission.ts # Which holds keep a candidate from going out now: Rest, the proactive gap, presence and the spend check - tier1/ - directive.ts # Pure tier-1 control directive for sit, drop, peek and pat events - render.ts # Tier-1 rendering: local directives, posture ledger, pin targets, and the tap-emotion revert - turn/ - turn.ts # Turn identity ledger and the single definition of over - turn-output.ts # Speech lifecycle port between the backend caller and the voice pipeline - push-turn.ts # Push-turn ids the user stopped, so their late frames drop whole, and the wait for a sent turn to finish - quoted-turn.ts # The admitted turn the bubble quotes: the user's message, a signal turn's source lines, or a trigger line, at its first utterance - trigger-line.ts # The line a turn she started shows: its own trigger or a waited member's, with +N for the rest of a bundle - signal-lines.ts # A trigger's signal groups as source lines, urgent first - render-turn.ts # Plays a finished backend turn that arrived as a render frame on the push socket - turn-feed.ts # Shared tool-status and reasoning consumer for every transport - backend/ - backend-caller.ts # Sends a tier-2 event to backend judgment and streams the reply - push-call.ts # Push transport path of a turn: frame send and the wait for its turn_end - settle-reply.ts # Settles a finished reply: directive render, cue routing, speech gate - stream-attempt.ts # One stream attempt of a turn: stream events to the speech pipeline and the verdict on how it ended - turn-recording.ts # Records a sent turn into the transcript, the context history, and the turn-record log - request-input.ts # Pure encoders for a turn's Responses input: post-history and client_context blocks, user item, and the items before it - turn-outcome.ts # How a backend call settled - background-marker.ts # Placeholder user-content text for a turn with no real user utterance - idle-watchdog.ts # Idle-gap watchdog over the backend event stream and its two timeout budgets - context-builder.ts # Builds the per-turn client context, with waited items and the do-not-disturb line, and image attachments - client-context-text.ts # Renders a client context into the plain-line prompt block - previous-turn.ts # Persisted record of how the last turn that tried to speak ended - sources/ - user-input-source.ts # Normalises typed text and STT results into bus envelopes + core/ # The dispatcher's shared machinery: the event bus, classification, admission, guardrails, the proactive pacer, the turn gate, and the waiting list + tier1/ # Tier 1: the local control directives and their rendering, with no backend involved + turn/ # The turn's shared state: identity, output, the quoted trigger, push-stop, and the render of a finished turn + backend/ # The backend side of a turn: the caller, the stream attempt, the client context, and how the reply settles and records + sources/ # The firing sources: typed and spoken user input, and each surface's self-started candidates inbox/ # The inbox-push firing sources - buffered-inbox-source.ts # Shared presence-gated core for the inbox-push firing sources - signals-source.ts # Grouped signals-ingress firing source; batched groups leave through drain() at the dispatcher's release idle-tick/ # Idle-gap, clock-time, milestone, and screen firing sources - proactive-source.ts # Idle-gap proactive firing source - schedule-source.ts # Clock-time schedule firing source; a cue is marked fired only once its turn ends ok - milestone-source.ts # Once-per-day first-activity milestone firing source - screen-source.ts # Frontmost-app transition firing source with a dwell state machine gesture/ # Tap, drag-hold, and window-drop firing sources - tap-source.ts # Turns taps on the character into bus envelopes - drag-hold-source.ts # Fires one proactive.drag_held candidate per sustained drag window-drop/ # Drag-release perch settle, armed-perch poll, and placement - window-drop-source.ts # Drag-release settle composing the perch watch and placement - perch-watch.ts # Armed perch and peek state with the occlusion-aware detach poll - perch-follow.ts # Carries a seated character with her host window as it moves or resizes - placement.ts # Programmatic placement of the character on a named window addressed/ # The character-addressed firing source and the speaking half - addressed-source.ts # Turns a character-addressed bridge event for this preset into the addressed.character candidate - addressed-producer.ts # Emits the character-addressed event for this window's reply once its turn is over routed/ # The unified chat window's messages arriving as user turns - routed-user-source.ts # Submits a user-turn-routed event naming this preset as a user turn with its send id and mention - user-turn-done.ts # Reports user-turn-done for a closed or dropped turn's send id + threads/ # The Threads firing source: a snapshot diff's signal groups and the Threads that left input-required ambient/ # Backend-independent local liveliness and movement come-along/ # Her come-along onto the settings stage - come-along.ts # One settings window's session: the pickup and ease-in-out carry onto the slot at its size, the dock and entry clip, following the slot, the carry home at her desktop size, and a drag or agent move letting her go with her size back - entry-pick.ts # Picks her entry clip from the Entry family of her last backend emotion - stage-frame.ts # Her window's frame on the slot, resized about its bottom centre, and eased along a carry liveliness/ # Tier 1 idle-life engine and its cue math - tier1.ts # Tier 1 ambient engine: blink, idle sway, breath, look-around - cues.ts # Pure, side-effect-free cue math for Tier 1 locomotion/ # Movement loops: stroll, perch, climb, jump, fall, and sit transitions walk/ # Floor stroll - walker.ts # Floor stroll along the monitor's work-area bottom - wire-walk.ts # Walker start and teardown, and the reflex-turn stroll cancel perch/ # Window-top perch and jump - percher.ts # Perched dwell, stroll, and sit-back-down on a foreign window top - jumper.ts # Jump across to an adjacent window top - wire-perch.ts # Percher and jumper start and teardown climb/ # Window and screen-edge climb - climber.ts # Climb up a window or screen edge, dwell, and climb back down - climb-geometry.ts # Pure wall geometry and the climb and descent target picks - wire-climb.ts # Climber start, enable latch, and teardown fall/ # Fall to the surface below - faller.ts # Fall to the first surface below a character left in mid-air - wire-fall.ts # Faller start, the fall switch, and landing events travel/ # Travel frame shared by the stroll, fall, and climb - wire-travel-frame.ts # Real-window travel frame wiring hold/ # Who holds her still - holds.ts # The holders and what each hold declares: an abort, ending on a drag, keeping her geometry, pausing keep-on-screen - sitter.ts # Seat transitions: crossfade and eased window move - clip-leg.ts # A window leg paced by an in-place clip threads-reaction/ # Thread reactions: the count-edge and long-wait thresholds, and the reaction when she is free - reaction-thresholds.ts # The waiting count's rising edge and the per-Thread long wait that start a reaction without a chip tap - thread-reaction.ts # Runs a reaction on a chip tap, the count edge or a long wait when she is free: the filler line, the window open or raise without focus, her seat on it, and the expression settings/ # Persisted user settings, one store per setting, grouped by the part of the app they configure - persisted-store.ts # Shared bootstrap, notify, reload, and localStorage core for the settings stores - settings-stores.ts # Constructs and synchronises the persisted user-setting stores appearance/ # The window theme - theme-settings.ts # The dawn, hearth, or system theme under yui.theme backend/ # What the backend connection uses - agent-settings.ts # Reasoning effort, the preset's card (null means the UI language's default), and the send switch - agent-notify-settings.ts # Agent-notification enabled flag and listener port - api-key-settings.ts # Generic API-key override store behind the chat, STT, and TTS key settings - chat-id-settings.ts # Conversation id this installation sends in every push hello - endpoints-settings.ts # User-editable endpoint and model overrides - guardrails-settings.ts # User-editable guardrail rate-limit caps - workflow-settings.ts # Workflow entry list and URL validation cues/ # Proactive and schedule cue lists - cue-list-settings.ts # Shared on/off flag plus editable cue list behind the schedule and proactive stores - proactive-settings.ts # Idle-gap proactive cue list and its on/off flag - proactive-seeds.ts # Per-locale default proactive cues seeded on a first run - schedule-settings.ts # Clock-time schedule cue list and its on/off flag - schedule-seeds.ts # Per-locale default schedule cues seeded on a first run active-hours/ # Each character's active-hours spans and the card's spans they fall back to - spans.ts # Span and pace rules: the four paces, their gap factors, and which span holds a minute - card-active-hours.ts # The card's extensions.yui.active_hours, the spans in use, and the export transform - active-hours-settings.ts # The per-character store of edited spans under yui.active-hours - base-pace-settings.ts # The device-wide base pace under yui.base-pace, multiplied into each pet window's span pace rest/ # The Rest record under yui.dnd: a choice and its end, the choices offered at a time, and the state every surface reads - rest-settings.ts # The device-wide Rest store: the running choice, its start and end, and the stored record's parse - rest-choices.ts # The six Rest choices, the Focus predicate, and the running Rest state - rest-end.ts # When each choice ends, which choices are offered at a time, and the local clock and minutes helpers - rest-state.ts # What holds her turns at an instant: a running Rest or Focus, else an active-hours quiet span capture/ # Screen watching and screenshots - screen-settings.ts # User-editable screen-watch thresholds - screenshot-settings.ts # Screenshot enabled state and source presence/ # The user's last presence - last-together-settings.ts # The device-wide last present tick under yui.last-together, written at most once a minute; the milestone payload's last_together reads it agent-access/ # The settings a backend agent may read and change through yui_run, and the tier each row takes - rows.ts # The exposed settings rows: path, label, type, range, and the direct or allow tier - document.ts # Reads the exposed settings as one document, and applies the direct rows of a JSON merge patch and returns the allow changes - paths.ts # Dotted-path reads and writes over the settings document - validate.ts # The store probe a row's value passes before it is written avatar/ # Camera, motion, and lip-sync - camera-settings.ts # Camera zoom and orbit viewpoint - camera-gestures.ts # Maps orbit moves and pinch ratios onto the camera store - express-motion-settings.ts # Curates the motion vocabulary the agent may choose from - idle-motion-settings.ts # Selects which ambient idle variants may play - lipsync-settings.ts # Lip-sync gain voice/ # Filler speech and voice activity detection - card-filler.ts # The card's extensions.yui.filler pools, and the transforms around it - filler-settings.ts # Filler phrase pools and behaviour flags - readings-settings.ts # Device-wide reading dictionary: the raw surface=reading text as typed - vad-settings.ts # VAD silence window preset/ # Presets: which keys belong to one, the active one, the registry, and the windows bound to one - preset-keys.ts # The per-preset key list and where a key lives under a given preset - active-preset.ts # The registry's stored shape and the id a window resolves its keys under: the preset query, else the active preset - bound-preset.ts # The page queries that bind a window to one preset (`?preset=`), name the preset a settings window edits (`?edit=`), and the page it opens on (`?page=`) - preset-registry.ts # Preset list and active preset under yui.presets: create, rename (everyone, here and all are refused), remove, activate, setThumbnail (with crop) - photo-crop.ts # A photo's crop area as ratios, its validator, and the default, whole-photo and face framings - import-card-preset.ts # Creates a preset from an imported card and rolls it back on any failure - pet-windows.ts # The desired open set under yui.windows, the open presets with names, and the live key each window holds under yui.live-window.