@yukino.js/yukino 0.0.13-dev → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/README.md +20 -16
  2. package/dist/{a2a-DG2JNM3U.js → a2a-D7KSHNUT.js} +4 -3
  3. package/dist/{acp-DCZDS6FQ.js → acp-W4R5P6CZ.js} +7 -7
  4. package/dist/{anthropic-5BTWVZVT.js → anthropic-DSNN5AE5.js} +1 -1
  5. package/dist/browser/dist/index.html +44 -0
  6. package/dist/browser/dist/static/index.css +2 -0
  7. package/dist/{fe → browser}/dist/static/index.js +48 -48
  8. package/dist/{chunk-4CLD7LEU.js → chunk-A7CJPQC5.js} +1 -1
  9. package/dist/{chunk-COHBT6M7.js → chunk-D2SZ6GQJ.js} +184 -186
  10. package/dist/{chunk-AZQD75PX.js → chunk-GVRZBATW.js} +1 -1
  11. package/dist/{chunk-OI2W6R6H.js → chunk-HWCLMDQF.js} +8 -8
  12. package/dist/{chunk-BDLFNDC4.js → chunk-I356BFD2.js} +1 -1
  13. package/dist/chunk-JDK4YHNF.js +63 -0
  14. package/dist/{chunk-5URXBVET.js → chunk-OREDGNI6.js} +1 -1
  15. package/dist/chunk-T6WQ3Z5J.js +4 -0
  16. package/dist/{chunk-5DK2M7VI.js → chunk-UUWXDH7J.js} +1 -1
  17. package/dist/{chunk-IWMCIYOG.js → chunk-WKSVBXUO.js} +26 -25
  18. package/dist/{chunk-SZXXASVH.js → chunk-Z3EFT645.js} +1 -1
  19. package/dist/lib/{anthropic-AVZIC22O.js → anthropic-TDNNKQMT.js} +4 -4
  20. package/dist/lib/{chunk-O2H6VKKR.js → chunk-56DL5ZYL.js} +2 -2
  21. package/dist/lib/{chunk-TUNZLQLO.js → chunk-BRLCCEU7.js} +1 -1
  22. package/dist/lib/{chunk-EGJKLA2W.js → chunk-EJNKEFE7.js} +2 -2
  23. package/dist/lib/{chunk-XH7D5FLE.js → chunk-IZXMDC5O.js} +3 -3
  24. package/dist/lib/{chunk-QJ32WYQY.js → chunk-UKXGO7AW.js} +264 -324
  25. package/dist/lib/{chunk-GVI5R2DA.js → chunk-WNGF7243.js} +1 -2
  26. package/dist/lib/{chunk-LSI3T24Q.js → chunk-WXR5HNB4.js} +1 -1
  27. package/dist/lib/index.d.ts +118 -298
  28. package/dist/lib/index.js +472 -1235
  29. package/dist/lib/{openai-54IQOU6Y.js → openai-6VYIA7CT.js} +3 -3
  30. package/dist/lib/{providers-MOCB6Y5L.js → providers-UXL5FVF7.js} +2 -2
  31. package/dist/lib/{tool-filter-5Z6UTRRR.js → tool-filter-O6YLSFAS.js} +3 -3
  32. package/dist/{main-IA22XMQR.js → main-FOIMPIOD.js} +232 -223
  33. package/dist/main.js +11 -2
  34. package/dist/{openai-I2TTMBWK.js → openai-7C6BVQ7M.js} +1 -1
  35. package/dist/{providers-DXQRJUIY.js → providers-TH6MQC7V.js} +1 -1
  36. package/dist/{server-QS7CX37F.js → server-TC5GDF6E.js} +1 -1
  37. package/dist/tool-filter-SYH5ZFC2.js +4 -0
  38. package/package.json +6 -6
  39. package/dist/chunk-CW5XFH7H.js +0 -59
  40. package/dist/chunk-UGX62ZSO.js +0 -4
  41. package/dist/fe/dist/index.html +0 -21
  42. package/dist/fe/dist/static/index.css +0 -2
  43. package/dist/tool-filter-KDQMXIDC.js +0 -4
package/README.md CHANGED
@@ -6,7 +6,7 @@ Yukino is a terminal-based AI coding agent. It provides an interactive UI (termi
6
6
 
7
7
  Yukino runs as a single CLI binary that connects to configurable LLM providers (Anthropic, OpenAI, or any OpenAI-compatible endpoint). It renders a rich terminal interface using React and Ink, giving you streaming responses, tool execution feedback, permission prompts, and slash commands in a single pane.
8
8
 
9
- Beyond interactive use, Yukino supports a non-interactive print mode for scripting, a remote mode that serves a browser-based chat UI over WebSocket, an ACP (Agent Client Protocol) mode for editor integration, an A2A (Agent2Agent) server mode for agent-to-agent integration, and team coordination where one leader agent manages multiple teammates (in-process, or as separate processes in tmux/iTerm panes) working in parallel.
9
+ Beyond interactive use, Yukino supports a non-interactive print mode for scripting, a remote mode that serves a browser-based chat UI over WebSocket, an ACP (Agent Client Protocol) mode for editor integration, an A2A (Agent2Agent) server mode for agent-to-agent integration, and team coordination where one leader agent manages multiple teammates running in the same process and working in parallel.
10
10
 
11
11
  ## Features
12
12
 
@@ -100,12 +100,13 @@ Update a global npm, yarn, or pnpm installation with:
100
100
 
101
101
  ```bash
102
102
  yukino update
103
+ yukino update --tag=canary
103
104
  yukino --version
104
105
  ```
105
106
 
106
- The command checks npm's `latest` release and installs that exact version using the package manager that provides the current installation. Both one-line installers use npm, so their installations support `yukino update` too. Source checkouts must be updated from the repository.
107
+ The command checks npm's `latest` dist-tag by default. Use `--tag=canary` (or `--tag canary`) to check another dist-tag. If its version is newer according to SemVer, the command installs that exact version using the package manager that provides the current installation. For example, `0.0.14-canary` is newer than `0.0.13-dev`. Equal or older versions are not installed. Both one-line installers use npm, so their installations support `yukino update` too. Source checkouts must be updated from the repository.
107
108
 
108
- The TUI checks for a newer release asynchronously and shows a `yukino update` hint when one is available. Network errors do not interrupt the UI. Set `YUKINO_SKIP_VERSION_CHECK=1` to disable automatic checks; explicit `yukino update` still checks for updates.
109
+ The TUI checks npm's `latest` dist-tag for a newer release asynchronously and shows a `yukino update` hint on entry when one is available. The hint disappears after the first input submission or when a session is resumed; late check results stay hidden during the conversation. Available updates are shown again on the last line of the exit summary. Network errors do not interrupt the UI. Set `YUKINO_SKIP_VERSION_CHECK=1` to disable automatic checks; explicit `yukino update` still checks for updates.
109
110
 
110
111
  Or run directly from the monorepo:
111
112
 
@@ -334,7 +335,7 @@ hooks:
334
335
 
335
336
  Main agents, subagents, and teammates use the same path sandbox policy: read-only tools can access paths outside the working directory without path approval. Writes outside the agent's working directory, the system temp directory, or an explicitly allowed root require approval unless an explicit allow rule applies. `bypassPermissions` disables this path sandbox; switching back restores it. Explicit deny/ask rules and an agent's own plan approval lock still apply. The OS-level Bash sandbox is separate and remains controlled by the `sandbox` configuration or the TUI's `/sandbox` command.
336
337
 
337
- Sandbox configuration applies to TUI, print, Remote/ACP/A2A, and separate teammate hosts. Enabling it fails closed when the native backend is unavailable. `bypassPermissions` does not disable it. Relative allow/deny write paths resolve against the command's execution directory; home-relative paths use the same resolver as file tools. The policy confines Bash writes and optionally disables all network access; it does not wrap PowerShell, LSP, or MCP executables.
338
+ Sandbox configuration applies to TUI, print, Remote/ACP/A2A, and in-process teammates. Enabling it fails closed when the native backend is unavailable. `bypassPermissions` does not disable it. Relative allow/deny write paths resolve against the command's execution directory; home-relative paths use the same resolver as file tools. The policy confines Bash writes and optionally disables all network access; it does not wrap PowerShell, LSP, or MCP executables.
338
339
 
339
340
  Provider fields:
340
341
 
@@ -483,31 +484,34 @@ lsp_servers:
483
484
 
484
485
  `LSP` supports definition, references, hover, document/workspace symbols, implementation, type definition, call hierarchy preparation and incoming/outgoing calls, and diagnostics. Input positions are 1-based UTF-16; returned ranges follow the [LSP specification](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/) (0-based UTF-16). File content is synchronized before queries. A push-diagnostics response with `pending: true` means no current report arrived within the bounded wait, not that the file has no errors. Servers without versioned diagnostic notifications cannot guarantee detection of delayed stale reports.
485
486
 
486
- The tool requests only read-only operations and rejects server-requested workspace edits and commands. Configured executables are trusted local programs, like stdio MCP servers: they run with the user's OS privileges, outside the Bash OS sandbox. Configure only servers you trust. Queries honor Yukino's read-tool permission rules; parent Plan mode, child permission inheritance, plan locks, and leader approval semantics are unchanged. Servers are shut down at host exit, with forced process-tree cleanup if necessary.
487
+ The tool requests only read-only operations and rejects server-requested workspace edits and commands. Configured executables are trusted local programs, like stdio MCP servers: they run with the user's OS privileges, outside the Bash OS sandbox. Configure only servers you trust. Queries honor Yukino's read-tool permission rules and the agent's effective permission mode. Servers are shut down at host exit, with forced process-tree cleanup if necessary.
487
488
 
488
489
  ### Tasks, TODOs, and background work
489
490
 
490
491
  Task tracking and task execution are separate:
491
492
 
492
- - `TaskCreate`, `TaskGet`, `TaskList`, and `TaskUpdate` share one interface: `subject`, `description`, `taskId`, `owner`, `activeForm`, `metadata`, `addBlocks`, and `addBlockedBy`. Without a team they operate on the leader's private list; with a team they operate on the shared board, including in coordinator mode. Ordinary subagents and forks always get independent private lists. Task creation does not launch work; assigning a shared task notifies its owner.
493
- - `TodoWrite` atomically replaces the private checklist, never the shared board. Without a team it operates on the same items as the private Task tools. Include every item to retain and reuse returned IDs to preserve metadata, ownership, priority, and links. An empty list clears it. New items omit `id`; titles use `subject`.
493
+ - Interactive terminal, Remote, and ACP sessions expose `TaskCreate`, `TaskGet`, `TaskList`, and `TaskUpdate`; non-interactive print (`-p`) and A2A sessions expose `TodoWrite`. These interfaces are mutually exclusive. Creating or restoring a team switches a non-interactive leader to shared Task tools; deleting the team restores its private TODO interface and list. Teammates always use shared Task tools. Ordinary subagents and forks inherit the parent's available interface with independent private lists.
494
+ - `TaskCreate`, `TaskGet`, `TaskList`, and `TaskUpdate` share one interface: `subject`, `description`, `taskId`, `owner`, `activeForm`, `metadata`, `addBlocks`, and `addBlockedBy`. Without a team they operate on the leader's private list; with a team they operate on the shared board, including in coordinator mode. Task creation does not launch work; assigning a shared task notifies its owner.
495
+ - `TodoWrite` atomically replaces the private checklist using the same task model, statuses, IDs, persistence, and dependency validation as the private Task tools. Include every item to retain and reuse returned IDs to preserve metadata, ownership, priority, and links. An empty list clears it; completing every item retains them. New items omit `id`; titles use `subject`. The result contains `todos` and a `progress` string. Task mutations and `TaskList` report the same `TODO completed/total` count; only completed items contribute to the numerator.
494
496
  - Statuses are `pending`, `in_progress`, `completed`, `blocked`, and `cancelled`; `TaskUpdate` also accepts `deleted`. Dependencies must already exist; forward references, self-dependencies, and cycles are rejected. Starting blocked work fails atomically. Only completed dependencies unblock work; cancelled dependencies remain unresolved until explicitly removed. Metadata updates merge keys; null removes a key. Shared task claim, ownership checks, dependency changes, and status updates run under one cross-process lock. Teammates automatically claim tasks when marking them in progress, cannot take another worker's task, and cannot start a second task while one is already in progress. The leader can explicitly reassign work; stop its old worker before reassignment if it is still executing.
495
- - Interactive/Remote/ACP private lists persist per session in `~/.yukino/sessions/artifacts/<session-id>/tasks.json`, with a stored next-ID counter so deleting or clearing items never reuses IDs on resume. Shared boards use project-scoped team storage. Corrupt or inconsistent stores fail explicitly, without migration, auto-repair, or stale-state fallback. Storage and tool schemas have changed; old task files are not supported. Print mode's private checklist lasts for that invocation. The terminal displays compact private TODO progress, including blocked and cancelled items. When every item is completed, the progress line hides after five seconds without deleting tasks or resetting IDs. Adding or reopening an unfinished item shows it again and cancels the pending hide.
497
+ - Interactive/Remote/ACP/A2A private lists persist per session in `~/.yukino/sessions/artifacts/<session-id>/tasks.json`, with a stored next-ID counter so deleting or clearing items never reuses IDs on resume. Shared boards use project-scoped team storage. Corrupt or inconsistent stores fail explicitly, without migration, auto-repair, or stale-state fallback. Storage and tool schemas have changed; old task files are not supported. Print mode's private checklist lasts for that invocation. The terminal's TODO progress follows the same private list or shared board as its Task tools, including teammate updates, blocked items, and cancelled items. When every item is completed, the progress line hides after five seconds without deleting tasks or resetting IDs. Adding or reopening an unfinished item shows it again and cancels the pending hide. Switching sessions or boards starts a fresh completion countdown.
496
498
  - `Agent` executes delegated work. Background Agent/Bash/PowerShell invocations return runtime task IDs, distinct from TODO IDs. `TaskOutput` inspects one of these IDs or waits once (`wait: true`, `timeout_ms: 0..60000`). It does not consume automatic completion notifications or stop a task on timeout. Prefer notifications over polling. `TaskStop` remains the explicit cancellation mechanism.
497
499
 
498
- The common built-in registry is used by terminal, print, Remote/ACP/A2A, and separate teammate hosts. Delegation, coordinator, and per-agent tool restrictions still filter that registry.
500
+ The common built-in registry is used by terminal, print, Remote/ACP/A2A, and in-process teammates. Delegation, coordinator, and per-agent tool restrictions still filter that registry.
499
501
 
500
502
  ### Worker lifecycle
501
503
 
502
- Ordinary subagents run once. On completion, failure, or interruption, the host waits for their owned background commands to stop and releases their scoped tool registry. Parent-owned LSP/MCP tools are borrowed, not shut down by a child. Finished background results remain available for notifications and `TaskOutput`, with bounded retention after delivery; cancellation callbacks are discarded when runners settle. A fork cannot create or replace teams, approve teammate plans, or stop parent-owned work.
504
+ Ordinary subagents run once. On completion, failure, or interruption, the host waits for their owned background commands to stop and releases their scoped tool registry. Parent-owned LSP/MCP tools are borrowed, not shut down by a child. Finished background results remain available for notifications and `TaskOutput`, with bounded retention after delivery; cancellation callbacks are discarded when runners settle. A fork cannot create or replace teams, or stop parent-owned work.
503
505
 
504
506
  An explicit `run_in_background: false` overrides a predefined agent's `background: true`; when omitted, the definition supplies the default. Forks default to foreground execution. Role files accept a UTF-8 BOM before frontmatter. Delegated agents cannot manage the main session's persistent goal.
505
507
 
506
508
  Persistent teammates become idle after each turn. They keep conversation and private checklist context for follow-up assignments, but must send findings with `SendMessage`; final text is not automatically forwarded to the leader. They exit on explicit shutdown, cancellation, failure, or loss of the leader. Exit clears live permission/cancellation references, releases owned tools, and resets unfinished owned tasks to unassigned/pending. Completed and cancelled records remain intact. Teammate task ownership is not released merely because a turn becomes idle.
507
509
 
508
- The team retains at most 200 terminated member summaries; running and idle members are never evicted. Fully cleaned-up failed/stopped member names can be reused. Agent definitions inherit the parent's live permission mode; `permission_mode` in role frontmatter accepts only `plan` to enforce an immutable read-only role, not a permission override. `max_turns` must be a positive integer. Built-in explore uses the selected parent model unless explicitly overridden.
510
+ The team retains at most 200 terminated member summaries; running and idle members are never evicted. Fully cleaned-up failed/stopped member names can be reused. Agent definitions support `permission_mode: default | acceptEdits | plan | bypassPermissions`. Omitted modes inherit the parent's live mode. Parent `acceptEdits` and `bypassPermissions` override configured child modes; a child cannot enable bypass unless the parent already uses it. Child mode changes never change the parent. Plan mode blocks mutations, even through allow rules or sandbox auto-allow, except the declared plan file and internal coordination tools. `max_turns` must be a positive integer. Built-in explore uses the selected parent model unless explicitly overridden.
509
511
 
510
- Separate teammate processes register their PID for liveness checks and handle SIGINT, SIGTERM, and SIGHUP through the same cleanup path. The leader reclaims tasks after detecting a dead worker, including on restore. Tmux/iTerm workers receive a shutdown grace period; an iTerm worker that remains alive is terminated by its registered PID. Edited worktrees are retained for explicit integration, not deleted as part of runtime cleanup. Starting an Agent under a different team name never implicitly destroys another existing team.
512
+ Teammates run only in-process and route permission requests through the main session. Requests identify the agent and working directory; remembered permission patterns apply to all agents in the project. When its effective mode is `plan`, a teammate requested with `plan_mode_required` submits its plan at turn completion; the runtime automatically approves it without leader review and resumes in the leader's current mode (`default` when the leader remains in `plan`). Plan approval does not authorize subsequent tool calls. Stopped teammates release their task ownership; restored sessions mark old runtimes inactive and reclaim unfinished work. Edited worktrees are retained for explicit integration, not deleted as part of runtime cleanup. Starting an Agent under a different team name never implicitly destroys another existing team.
513
+
514
+ Bash and PowerShell commands recognized by `isSafeCommand` can run in parallel. Unrecognized commands and file mutations share a process-wide FIFO queue keyed by canonical working directory, so agents in the same workspace cannot perform these operations simultaneously. Independent worktree directories have independent queues. Queued operations can be cancelled and recheck permissions before starting. Background commands hold their workspace slot until the tracked shell exits; moving a command to the background does not release it.
511
515
 
512
516
  `WebSearch` directly requests Bing's public search pages and extracts organic result titles, source URLs, and snippets. It requires no search API key, subscription, or paid search API. Bing receives the query, requested result count, and market selection, together with ordinary HTTP request information. Requests are cancellable, limited to 25 seconds and 2 MiB, and model output is capped at 100,000 characters. Bing may return fewer results than requested. Network failures, rate limits, CAPTCHA, and unrecognized page layouts are reported as tool errors, distinct from an explicit empty search. `allowed_domains` and `blocked_domains` are mutually exclusive hostname lists, applied locally to decoded result URLs with exact-host/subdomain matching. Filtering can reduce the number of results; it does not ask Bing to search again. No session ID, provider/model, or workspace metadata is transmitted. Never include private source code or secrets in queries; treat results as untrusted content and cite source URLs. Use `WebFetch` to read a source page; search snippets are not full-page content.
513
517
 
@@ -647,7 +651,7 @@ Use the mouse wheel or trackpad to scroll conversation history in the terminal's
647
651
 
648
652
  **Design tradeoff:** Yukino uses the terminal's primary screen, with fullscreen/alternate-screen rendering and mouse capture removed. Completed messages are appended to native scrollback, preserving normal selection, copying, pasting, and wheel/trackpad history scrolling without translating scrolling into prompt-history navigation. Yukino gives up its own conversation viewport, scrollbar, click-to-latest indicator, and conversation-navigation key bindings. Scrolling and whether new output follows the bottom are controlled by the terminal; the input and footer scroll out of view while reading older history. The live area remains responsive and shows the tail of running output; the complete assistant response is printed when it finishes. Ctrl+O reprints the current transcript with expanded/collapsed details, and resume/rewind prints the restored transcript; earlier printed lines remain terminal history. Scrollback retention, selection behavior, copy/paste shortcuts, and selection stability during live redraws depend on the terminal.
649
653
 
650
- Terminal resizing redraws the live area without clearing or replaying completed messages, preserving the terminal's native reading position and scrollback anchors. Historical output keeps its printed line breaks and uses the terminal's own reflow; previously printed cards are not rebuilt or stretched to fill a wider terminal. Background padding does not add extra wrapped rows when the terminal narrows. The input, status, live text, running tool cards, and newly completed messages use the current width. Resize redraws are coalesced, and the live area stays out of native width reflow so transient tool output and Working borders do not enter scrollback.
654
+ Terminal resizing redraws the live area without clearing or replaying completed messages, preserving the terminal's native reading position and scrollback anchors. Historical output keeps its printed line breaks and uses the terminal's own reflow; previously printed cards are not rebuilt or stretched to fill a wider terminal. Completed Markdown tables use labeled records (`Column: value`) so narrowing the terminal preserves their meaning without breaking grid borders. Streaming tables use a grid with wrapped cells, switching to labeled records when the columns cannot fit their widest characters. Background padding does not add extra wrapped rows when the terminal narrows. The input, status, live text, running tool cards, and newly completed messages use the current width. Resize redraws are coalesced. Apple Terminal's reflowed live rows and cleared gaps are tracked so repeated width and height changes restore the input and footer without leaving old status lines behind.
651
655
 
652
656
  Pastes longer than 10 lines or 1,000 characters collapse to `[paste #1 +124 lines]` or `[paste #1 1234 chars]`. Clipboard images appear as `[Image #1]`. Arrow keys move across each placeholder as a unit, and Backspace/Delete remove it as a unit. Placeholders survive dialog switches; submitting restores the full text and image attachments.
653
657
 
@@ -665,15 +669,15 @@ Besides the `yukino` CLI, the package ships a library entry for embedding Yukino
665
669
  The library entry is terminal-independent by contract: it must never reach `src/ui/**` or a ui-only dependency, so a host without a TTY (a server, an editor extension, a test harness) can import it. `pnpm build` enforces that contract:
666
670
 
667
671
  - **ui-only dependency ban** — the `ban-ui-only-deps` plugin in `tsup.config.ts` fails the build when a bundle-reachable module imports one of the ui-only packages (`ink`, `react`, `chalk`, `ansi-escapes`, …) or a path inside `src/ui`. The list is declared once in `tsup.config.ts` and re-derived from the actual import sites by `tests/build-guards.test.ts`, which fails if the two drift apart.
668
- - **`react` is banned, `react-dom` never appears** — the barrel does not re-export `src/ui/**`, so `react` is reached exclusively from the terminal layer; `react-dom` is imported only by the standalone browser bundle (`src/remote/fe`, built separately via `pnpm build:fe`), which is not part of the library graph.
672
+ - **`react` is banned, `react-dom` never appears** — the barrel does not re-export `src/ui/**`, so `react` is reached exclusively from the terminal layer; `react-dom` is imported only by the standalone browser bundle (`src/remote/browser`, built separately via `pnpm build:browser`), which is not part of the library graph.
669
673
  - **Ambiguous export scan** — once the bundle is written, the build runs the TypeScript ambiguous-export check (`TS2308`) over the library graph. A name exported by two `export *` sources is dropped by the bundler without any warning; the scan turns that into a build failure instead of a quietly smaller public API.
670
674
 
671
- In a long-lived host process, prefer the composable modules (`Agent`, `ToolRegistry`, …) over the process-level entry points (`print-mode`, `recover`, `teammate`), which own process lifecycle — `recover` installs crash logging to `~/.yukino/crash.log` and calls `process.exit()`, and `print-mode` exits on invalid flags.
675
+ In a long-lived host process, prefer the composable modules (`Agent`, `ToolRegistry`, …) over the process-level entry points (`print-mode`, `recover`), which own process lifecycle — `recover` installs crash logging to `~/.yukino/crash.log` and calls `process.exit()`, and `print-mode` exits on invalid flags.
672
676
 
673
677
  ## Terminal Rendering Tests
674
678
 
675
679
  `tests/helpers/virtual-terminal.ts` connects real Ink input/output streams to `@xterm/headless`. The Unicode 11 addon matches VS Code's default terminal width policy. Output bytes go directly to the emulator, and write callbacks complete after parsing; await `waitUntilRenderFlush()` for Ink renders or the fixture's `flush()` for direct writes before inspecting the buffer.
676
680
 
677
- Run `pnpm exec vitest run tests/ui-cursor.test.ts tests/ui-terminal-resize.test.ts tests/terminal-output.test.ts` to check terminal cells, CJK and emoji widths, combining characters, cursor placement, ANSI colors, fragmented UTF-8 output, native scrollback anchors, and resize redraws. These tests exercise the primary screen without mouse capture. The emulator does not validate font rendering, pixel appearance, native selection, or OS clipboard behavior; those still need testing in the target terminal. Unicode width policies, especially for complex emoji sequences, can differ between terminals.
681
+ Run `pnpm exec vitest run tests/ui-cursor.test.ts tests/ui-terminal-resize.test.ts tests/terminal-output.test.ts tests/ui-rendering.test.ts` to check terminal cells, CJK and emoji widths, combining characters, cursor placement, ANSI colors, fragmented UTF-8 output, native scrollback anchors, resize redraws, and table layouts. The Apple Terminal resize fixture preserves rows below the caret when shrinking height, matching its behavior rather than xterm's deletion of those rows. These tests exercise the primary screen without mouse capture. The emulator does not validate font rendering, pixel appearance, native selection, or OS clipboard behavior; those still need testing in the target terminal. Unicode width policies, especially for complex emoji sequences, can differ between terminals.
678
682
 
679
683
  Runtime text measurement stays on `string-width`, which already uses `get-east-asian-width` and handles ANSI stripping and grapheme clusters. The xterm packages are development dependencies.