@yukino.js/yukino 0.0.11 → 0.0.13-dev
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.
- package/README.md +111 -68
- package/dist/a2a-DG2JNM3U.js +14 -0
- package/dist/acp-DCZDS6FQ.js +14 -0
- package/dist/anthropic-5BTWVZVT.js +4 -0
- package/dist/chunk-4CLD7LEU.js +5 -0
- package/dist/{chunk-QMHSZVNF.js → chunk-5DK2M7VI.js} +1 -1
- package/dist/chunk-5URXBVET.js +4 -0
- package/dist/{chunk-3VTVI62N.js → chunk-AZQD75PX.js} +1 -1
- package/dist/{chunk-WH5FUZXY.js → chunk-BDLFNDC4.js} +3 -3
- package/dist/{chunk-TPEUG7AU.js → chunk-COHBT6M7.js} +161 -155
- package/dist/chunk-CW5XFH7H.js +59 -0
- package/dist/{chunk-YWTRNPNR.js → chunk-IWMCIYOG.js} +21 -21
- package/dist/chunk-OI2W6R6H.js +28 -0
- package/dist/chunk-SZXXASVH.js +4 -0
- package/dist/chunk-UGX62ZSO.js +4 -0
- package/dist/chunk-W4GMCNWF.js +65 -0
- package/dist/lib/{anthropic-7HQY42TP.js → anthropic-AVZIC22O.js} +5 -5
- package/dist/lib/bwrap-JS5GRKWY.js +7 -0
- package/dist/lib/{chunk-QQ2V5EX3.js → chunk-EGJKLA2W.js} +3 -3
- package/dist/lib/{chunk-AUU4RKMV.js → chunk-GVI5R2DA.js} +47 -29
- package/dist/lib/{chunk-XDGZMZ2B.js → chunk-LSI3T24Q.js} +2 -2
- package/dist/lib/{chunk-EATSQNOB.js → chunk-O2H6VKKR.js} +3 -3
- package/dist/lib/{chunk-55LKYMVV.js → chunk-OFDOP6I2.js} +2 -2
- package/dist/lib/{chunk-JXZ5KIUV.js → chunk-PCZ63WQL.js} +1 -1
- package/dist/lib/{chunk-Q6B6TAR3.js → chunk-QJ32WYQY.js} +120 -152
- package/dist/lib/{chunk-VXHBKGZW.js → chunk-TUNZLQLO.js} +12 -13
- package/dist/lib/{chunk-OCGX3ISG.js → chunk-XH7D5FLE.js} +4 -4
- package/dist/lib/{chunk-KC54MV5H.js → chunk-XLRV26YW.js} +1 -1
- package/dist/lib/index.d.ts +380 -351
- package/dist/lib/index.js +925 -638
- package/dist/lib/{openai-Z7PCXN2X.js → openai-54IQOU6Y.js} +4 -4
- package/dist/lib/{providers-GOU5DD3X.js → providers-MOCB6Y5L.js} +3 -3
- package/dist/lib/seatbelt-LDM6UB6N.js +7 -0
- package/dist/lib/{tool-filter-GVVYY5QO.js → tool-filter-5Z6UTRRR.js} +4 -4
- package/dist/main-IA22XMQR.js +494 -0
- package/dist/main.js +2 -487
- package/dist/{openai-WNPMC64P.js → openai-I2TTMBWK.js} +1 -1
- package/dist/providers-DXQRJUIY.js +4 -0
- package/dist/server-QS7CX37F.js +4 -0
- package/dist/tool-filter-KDQMXIDC.js +4 -0
- package/package.json +2 -2
- package/dist/a2a-WKGEGTP6.js +0 -14
- package/dist/acp-W2I7T2NT.js +0 -14
- package/dist/anthropic-CQUMQFUK.js +0 -4
- package/dist/chunk-CH7VZVG4.js +0 -4
- package/dist/chunk-F6WFTAOT.js +0 -59
- package/dist/chunk-R567WVDL.js +0 -90
- package/dist/chunk-ZPL2YHQU.js +0 -5
- package/dist/lib/bwrap-V6MFP7PT.js +0 -7
- package/dist/lib/seatbelt-2OE46ZE7.js +0 -7
- package/dist/providers-CMCKMYGG.js +0 -4
- package/dist/server-OQ5XVSZY.js +0 -4
- package/dist/tool-filter-BTQ7WTHR.js +0 -4
package/README.md
CHANGED
|
@@ -44,15 +44,15 @@ Beyond interactive use, Yukino supports a non-interactive print mode for scripti
|
|
|
44
44
|
- Session-local persistent goals with automatic continuation, explicit pause/resume, token budgets, and completion/blocker audits
|
|
45
45
|
- Automatic context compaction when conversations approach the model's context window
|
|
46
46
|
- Long-term memory extraction and recall across sessions (disable with `enable_memory: false` in `~/.yukino/config.yaml`)
|
|
47
|
-
- Instructions files for persistent guidance: user-global `~/.yukino/AGENTS.md`, plus `AGENTS.md`
|
|
47
|
+
- Instructions files for persistent guidance: user-global `~/.yukino/AGENTS.md`, plus `AGENTS.md` in every directory from the git root down to the working directory, with `@include` expansion
|
|
48
48
|
|
|
49
49
|
### Skills and Commands
|
|
50
50
|
|
|
51
|
-
- Skill catalog
|
|
51
|
+
- Skill catalog loading from `~/.agents/skills/`, `~/.yukino/skills/`, and project `.agents/skills/`, in increasing priority
|
|
52
52
|
- Hot-reload support for skills edited on disk
|
|
53
53
|
- Recursive discovery of grouped skills, with cycle protection and discovery stopping at each declared skill root
|
|
54
54
|
- Inline and fork execution modes for skills
|
|
55
|
-
- Slash command system with built-in commands and
|
|
55
|
+
- Slash command system with built-in commands and global prompt templates from `~/.yukino/prompts/`
|
|
56
56
|
- Skill installation from a local path or a raw SKILL.md URL
|
|
57
57
|
|
|
58
58
|
Command templates support quoted positional arguments (`$1`, `$2`, ...), `$@`, defaults such as `${1:-main}`, and slices such as `${@:2:3}`. `$ARGUMENTS` preserves the original argument text, including quotes and spacing. Substitution runs once, so placeholder text inside an argument stays literal. A template without a placeholder appends the original arguments.
|
|
@@ -96,12 +96,112 @@ irm https://raw.githubusercontent.com/hangtiancheng/yukino-code/main/install.ps1
|
|
|
96
96
|
|
|
97
97
|
Both installers write a default `~/.yukino/config.yaml` if none exists, verify Node.js >= 20, and support uninstall / pinned-version / dist-tag options (see their `--help` / `-Help` output).
|
|
98
98
|
|
|
99
|
+
Update a global npm, yarn, or pnpm installation with:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
yukino update
|
|
103
|
+
yukino --version
|
|
104
|
+
```
|
|
105
|
+
|
|
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
|
+
|
|
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
|
+
|
|
99
110
|
Or run directly from the monorepo:
|
|
100
111
|
|
|
101
112
|
```bash
|
|
102
113
|
pnpm dev
|
|
103
114
|
```
|
|
104
115
|
|
|
116
|
+
## Storage
|
|
117
|
+
|
|
118
|
+
Yukino stores its configuration and runtime state under `~/.yukino`. The current directory (`cwd`) determines where tools execute and which project `/resume` opens. It does not determine the storage root. Directories are created when their features are used.
|
|
119
|
+
|
|
120
|
+
```text
|
|
121
|
+
~/.yukino/
|
|
122
|
+
├── config.yaml
|
|
123
|
+
├── AGENTS.md
|
|
124
|
+
├── permissions.yaml
|
|
125
|
+
├── prompt_history.jsonl
|
|
126
|
+
├── command_usage.json
|
|
127
|
+
├── prompts/
|
|
128
|
+
│ └── <command>.md
|
|
129
|
+
├── agents/
|
|
130
|
+
│ └── <agent>.md
|
|
131
|
+
├── skills/
|
|
132
|
+
│ └── <skill>/SKILL.md
|
|
133
|
+
├── memory/
|
|
134
|
+
│ ├── MEMORY.md
|
|
135
|
+
│ └── <memory>.md
|
|
136
|
+
├── projects/
|
|
137
|
+
│ └── <project-key>/
|
|
138
|
+
│ ├── permissions.yaml
|
|
139
|
+
│ └── memory/
|
|
140
|
+
│ ├── MEMORY.md
|
|
141
|
+
│ └── <memory>.md
|
|
142
|
+
├── sessions/
|
|
143
|
+
│ ├── <project-key>/
|
|
144
|
+
│ │ └── <session-id>.jsonl
|
|
145
|
+
│ └── artifacts/
|
|
146
|
+
│ └── <session-id>/
|
|
147
|
+
│ ├── tasks.json
|
|
148
|
+
│ ├── file-history/
|
|
149
|
+
│ │ ├── snapshots.json
|
|
150
|
+
│ │ ├── <file-backup>
|
|
151
|
+
│ │ └── <clipboard-image>.png
|
|
152
|
+
│ └── tool-results/
|
|
153
|
+
│ ├── <tool-call-id>.txt
|
|
154
|
+
│ └── shell-<random>.output
|
|
155
|
+
├── plans/
|
|
156
|
+
│ └── <slug>.md
|
|
157
|
+
├── logs/
|
|
158
|
+
│ └── <session-id>.jsonl
|
|
159
|
+
├── crash.log
|
|
160
|
+
├── teams/
|
|
161
|
+
│ └── <project-key>/<team>/
|
|
162
|
+
│ ├── config.json
|
|
163
|
+
│ ├── tasks.json
|
|
164
|
+
│ ├── inboxes/<member>.json
|
|
165
|
+
│ └── logs/<session-id>.jsonl
|
|
166
|
+
└── worktrees/
|
|
167
|
+
└── <repository-key>/<slug>/
|
|
168
|
+
└── <Git working tree>
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Global resources
|
|
172
|
+
|
|
173
|
+
`config.yaml` contains provider and application settings. `AGENTS.md` supplies global instructions. `permissions.yaml` supplies global permission rules; project rules are stored separately under `projects/`.
|
|
174
|
+
|
|
175
|
+
`prompts/` contains user slash-command templates, `agents/` contains agent definitions that can override built-in definitions, and `skills/` contains skills installed by `InstallSkill`. Skill discovery also reads standard `~/.agents/skills/` and project `.agents/skills/`, in this order: global standard skills, global Yukino skills, then project standard skills. Later entries override earlier names. Project `AGENTS.md` and `.mcp.json` remain ordinary project resources.
|
|
176
|
+
|
|
177
|
+
`prompt_history.jsonl` shares typed input across all projects and retains the latest 10,000 entries. Both loading and writing enforce this limit, and consecutive duplicate inputs are stored once. `command_usage.json` shares command usage counts. Neither file is split by project. `memory/` stores user memories shared across projects, while `plans/` stores plan documents; each live session tracks its active plan path. `logs/` contains main-process logs and `crash.log` records process exits and failures.
|
|
178
|
+
|
|
179
|
+
### Project namespaces and resume
|
|
180
|
+
|
|
181
|
+
A project key is the lowercase hexadecimal SHA-256 of the canonical absolute `cwd`. Canonicalization resolves symlinks, so aliases of the same directory share a namespace. Distinct directories, including subdirectories and worktree directories, have distinct namespaces. Renaming or moving a project changes its key.
|
|
182
|
+
|
|
183
|
+
`sessions/<project-key>/` contains conversation JSONL files, compaction records, and goal state. `/resume` lists sessions only from the current directory's namespace. `projects/<project-key>/memory/` stores project memories, and `projects/<project-key>/permissions.yaml` stores remembered project permission rules. Teams use the same directory-based project key under `teams/`.
|
|
184
|
+
|
|
185
|
+
For example, starting Yukino in `/workspace/repo/app` and in `/workspace/other` produces different session lists and project memories, while both use the same input history and global prompt templates.
|
|
186
|
+
|
|
187
|
+
### Session artifacts and teams
|
|
188
|
+
|
|
189
|
+
`sessions/artifacts/<session-id>/` groups data owned by one session. `tasks.json` stores the private task list and its next-ID counter. `file-history/` stores rewind snapshots, original file backups, and clipboard images. `tool-results/` stores complete tool output and shell capture files. Session IDs are generated independently of the current directory, so artifacts keep their path when the executing agent switches directories.
|
|
190
|
+
|
|
191
|
+
Session cleanup removes conversations inactive for more than 30 days together with their artifact directories. Logs older than 30 days are cleaned separately. Shell output falls back to an operating-system temporary file if session storage is unavailable.
|
|
192
|
+
|
|
193
|
+
Each `teams/<project-key>/<team>/` contains team membership and process metadata in `config.json`, the shared task board in `tasks.json`, one JSON mailbox per member in `inboxes/`, and teammate logs in `logs/`. The private session task list and the team task board use separate files.
|
|
194
|
+
|
|
195
|
+
### Git worktrees
|
|
196
|
+
|
|
197
|
+
Every Yukino-created worktree is stored at `~/.yukino/worktrees/<repository-key>/<slug>/`. The repository key uses the same SHA-256 algorithm as project keys, applied to the canonical Git repository root rather than the caller's subdirectory. Calls from different subdirectories of the same repository therefore place worktrees together. Different repositories have separate directories even when they use the same slug.
|
|
198
|
+
|
|
199
|
+
For example, a worktree named `fix-login` created from `/workspace/repo/app` is placed in `~/.yukino/worktrees/<SHA-256 of /workspace/repo>/fix-login/`, with branch `worktree-fix-login`. Yukino returns the absolute worktree path to the caller. Git's own worktree metadata remains in the repository's Git directory; `git worktree list` shows the registered paths.
|
|
200
|
+
|
|
201
|
+
Global configuration, prompts, agent definitions, and installed skills are shared directly with the worktree. Standard project `.agents` resources are copied into it. No project `.yukino` settings are copied. Starting a session in the worktree uses that worktree directory's own project namespace for resume, memory, and permissions.
|
|
202
|
+
|
|
203
|
+
Yukino does not read or create a project `.yukino` directory. Existing project-local state is not automatically migrated; it must be moved to the corresponding global paths before it can be resumed.
|
|
204
|
+
|
|
105
205
|
## Configuration
|
|
106
206
|
|
|
107
207
|
Yukino reads a single global YAML configuration file:
|
|
@@ -234,7 +334,7 @@ hooks:
|
|
|
234
334
|
|
|
235
335
|
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.
|
|
236
336
|
|
|
237
|
-
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
|
|
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.
|
|
238
338
|
|
|
239
339
|
Provider fields:
|
|
240
340
|
|
|
@@ -340,7 +440,7 @@ Before export, Yukino removes request bodies and cookies, redacts credential fie
|
|
|
340
440
|
|
|
341
441
|
### Project-level MCP servers (.mcp.json)
|
|
342
442
|
|
|
343
|
-
In addition to `mcp_servers` in `config.yaml`, Yukino reads a project-level `.mcp.json` from the working directory, using the
|
|
443
|
+
In addition to `mcp_servers` in `config.yaml`, Yukino reads a project-level `.mcp.json` from the working directory, using the following format:
|
|
344
444
|
|
|
345
445
|
```json
|
|
346
446
|
{
|
|
@@ -392,7 +492,7 @@ Task tracking and task execution are separate:
|
|
|
392
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.
|
|
393
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`.
|
|
394
494
|
- 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.
|
|
395
|
-
- Interactive/Remote/ACP private lists persist per session in
|
|
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.
|
|
396
496
|
- `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.
|
|
397
497
|
|
|
398
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.
|
|
@@ -403,13 +503,13 @@ Ordinary subagents run once. On completion, failure, or interruption, the host w
|
|
|
403
503
|
|
|
404
504
|
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.
|
|
405
505
|
|
|
406
|
-
Persistent teammates
|
|
506
|
+
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.
|
|
407
507
|
|
|
408
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.
|
|
409
509
|
|
|
410
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.
|
|
411
511
|
|
|
412
|
-
`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
|
|
512
|
+
`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.
|
|
413
513
|
|
|
414
514
|
`WebFetch` cancels discarded response bodies and honors cancellation even for cached pages. Direct HTTP/HTTPS access, including project intranet endpoints, remains supported.
|
|
415
515
|
|
|
@@ -524,7 +624,7 @@ Inside the UI, these commands are available:
|
|
|
524
624
|
|
|
525
625
|
### User Bash Commands
|
|
526
626
|
|
|
527
|
-
Start the main terminal input with `!` or `!!` to execute Bash directly, without calling the model.
|
|
627
|
+
Start the main terminal input with `!` or `!!` to execute Bash directly, without calling the model. `! git status` includes the command and result in the next model context; `!! pnpm test` excludes both from model context. Commands are literal shell input: `@` references, slash commands, and skills are not expanded. Plan feedback and other dialogs do not interpret these prefixes.
|
|
528
628
|
|
|
529
629
|
The command runs in the current workspace with Yukino's Bash timeout and output limits. Output appears while it runs, and Ctrl+O expands the tool card. Results retain at most the last 2,000 lines / 50 KiB; larger output is saved to a file whose path appears in the result. Prompt history supports recalling commands. Both modes persist their cards for `/resume` and checkpoint rewind, while `!!` results remain excluded when rebuilding model context. Agent permission modes (including Plan) do not restrict commands explicitly entered by the user; an enabled OS sandbox still applies and fails closed if unavailable.
|
|
530
630
|
|
|
@@ -551,7 +651,7 @@ Terminal resizing redraws the live area without clearing or replaying completed
|
|
|
551
651
|
|
|
552
652
|
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.
|
|
553
653
|
|
|
554
|
-
Pasting an image saves it as a PNG under
|
|
654
|
+
Pasting an image saves it as a PNG under `~/.yukino/sessions/artifacts/<session-id>/file-history/`. Its placeholder expands to a cwd-relative `@` reference on submit and loads as an inline image block. Linux requires `wl-clipboard` (Wayland) or `xclip` (X11).
|
|
555
655
|
|
|
556
656
|
## Library Build
|
|
557
657
|
|
|
@@ -568,7 +668,7 @@ The library entry is terminal-independent by contract: it must never reach `src/
|
|
|
568
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.
|
|
569
669
|
- **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.
|
|
570
670
|
|
|
571
|
-
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
|
|
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.
|
|
572
672
|
|
|
573
673
|
## Terminal Rendering Tests
|
|
574
674
|
|
|
@@ -577,60 +677,3 @@ In a long-lived host process, prefer the composable modules (`Agent`, `ToolRegis
|
|
|
577
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.
|
|
578
678
|
|
|
579
679
|
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.
|
|
580
|
-
|
|
581
|
-
## Pi Capability Comparison
|
|
582
|
-
|
|
583
|
-
The reference is the local Pi checkout at commit `200387122ca450d6387f033949423114a270b96c`. This comparison includes the coding-agent package, its extension examples and experimental modes, and its TUI dependency. It distinguishes shared behavior from Yukino's product choices; it does not describe every package or third-party extension in Pi's ecosystem.
|
|
584
|
-
|
|
585
|
-
| Shared capability | Pi reference | Yukino outcome |
|
|
586
|
-
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
587
|
-
| Text and image reads | [read tool](../../submodule/pi/packages/coding-agent/src/core/tools/read.ts) | Async, cancellable reads; image format detection now also works without image extensions. Keep zero-based offsets, numbered text output, and read-state tracking. |
|
|
588
|
-
| Batched edits and writes | [edit tool](../../submodule/pi/packages/coding-agent/src/core/tools/edit.ts) | Preserve disjoint-edit validation, fuzzy matching, BOM/CRLF, mutation queues, and stale-file checks. Writes now use async I/O and recheck cancellation and file state after directory creation. |
|
|
589
|
-
| Search | [grep tool](../../submodule/pi/packages/coding-agent/src/core/tools/grep.ts) | Add UTF-8 byte limits, long-line previews, accurate truncation notices, and cancellation. Preserve Unicode matching, hidden-file discovery, traversal bounds, and Glob's modification-time ordering. |
|
|
590
|
-
| Path handling | [path utilities](../../submodule/pi/packages/coding-agent/src/core/tools/path-utils.ts) | Resolve home-relative paths through one helper shared with permissions, preventing checks and execution from targeting different files. |
|
|
591
|
-
| Bash and PowerShell | [tools](../../submodule/pi/packages/coding-agent/src/core/tools) | Existing process-tree cancellation, output limits, spill/readback, and shutdown tests retained. Yukino's explicit background tasks, timeout backgrounding, and TaskOutput are intentional differences. |
|
|
592
|
-
| Model streaming and recovery | [agent session](../../submodule/pi/packages/coding-agent/src/core/agent-session.ts) | Classify HTTP 408/5xx separately; share bounded retries for network/server/rate-limit failures. Preserve deterministic error handling and partial output without replaying already-visible content. Reject streams without a completion event. |
|
|
593
|
-
| Context compaction | [compaction](../../submodule/pi/packages/coding-agent/src/core/compaction/compaction.ts) | Retry transient summary failures, discard partial attempts, require successful completion, and preserve history on failure. Existing tool-pair boundaries and resumable compaction records remain protected. |
|
|
594
|
-
| Sessions and rewind | [session manager](../../submodule/pi/packages/coding-agent/src/core/session-manager.ts) | Retain JSONL locks, malformed-record recovery, compaction replay, multimedia restoration, expiry, and file-history rewind. Pi's session tree and Yukino's linear log/file snapshots are different designs. |
|
|
595
|
-
| Skills | [skill discovery](../../submodule/pi/packages/coding-agent/src/core/skills.ts) | Discover nested groups, stop at skill roots, guard symlink cycles, and watch grouping directories for additions. Preserve project-over-user precedence, explicitly declared hidden roots, and inline/fork execution. |
|
|
596
|
-
| Prompt commands | [prompt templates](../../submodule/pi/packages/coding-agent/src/core/prompt-templates.ts) | Add BOM support, quoted positional arguments, defaults, slices, and single-pass substitution. Preserve raw `$ARGUMENTS` and built-in command routing. |
|
|
597
|
-
| Instructions, settings, models | [resource loader](../../submodule/pi/packages/coding-agent/src/core/resource-loader.ts) | Retain instruction hierarchy/includes, provider selection, model discovery, thinking controls, and configuration validation. YAML configuration and precedence rules remain Yukino choices. |
|
|
598
|
-
| MCP | [MCP integration](../../submodule/pi/packages/coding-agent/src/extensions/mcp) | Retain transport, pagination, structured content, cancellation, connection cleanup, transactional reload, and cache-aware tool loading. User MCP configuration wins over project configuration by design. |
|
|
599
|
-
| Hooks and permissions | [extensions](../../submodule/pi/packages/coding-agent/examples/extensions) | Preserve Yukino's configured hook lifecycle, permission modes, plan locks, and inherited child boundaries. Pi's permission-gate and sandbox examples supply relevant ideas, not a replacement for these policies. |
|
|
600
|
-
| TUI, resizing, scrolling | [ScrollView](../../submodule/pi/packages/tui/src/components/scroll-view.ts) | Keep bottom-follow/manual reading position and responsive composer/cursor behavior. Batch thinking with text, cancel stale refreshes, and sanitize raw terminal controls/expand tabs before display measurements. |
|
|
601
|
-
| Print/JSON and embedding | [print mode](../../submodule/pi/packages/coding-agent/src/modes/print-mode.ts) | Emit incremental JSONL and pair same-name tools by call ID. Preserve signal exit codes and cancel children during result waits. Keep the terminal-independent library build contract. |
|
|
602
|
-
| Subagents and planning | [subagent example](../../submodule/pi/packages/coding-agent/examples/extensions/subagent), [durable](../../submodule/pi/packages/coding-agent/src/experimental/durable/README.md), [vacation](../../submodule/pi/packages/coding-agent/src/experimental/vacation/README.md) | Pi has relevant implementations. Retain Yukino's foreground concurrency, background notifications, child permissions, and lifecycle ownership; these are not capabilities wholly absent from Pi. |
|
|
603
|
-
|
|
604
|
-
Regression coverage includes concurrent same-file mutations and tool-result ordering, permission inheritance and plan locks, cancelled/failed streams and compaction, session recovery and rewind, MCP lifecycle, subagent/team cleanup, terminal widths/heights and cursor positions, bottom-follow/manual scrolling, and Remote/ACP/A2A boundaries. Passing automated checks establishes coverage of these contracts; real terminal behavior still depends on the emulator and terminal capabilities.
|
|
605
|
-
|
|
606
|
-
### Yukino Features Without a Direct Counterpart in the Reviewed Package
|
|
607
|
-
|
|
608
|
-
- Persistent leader/teammate workflows combining shared task ownership, file mailboxes, coordinator tool filtering, teammate plan approval, and in-process/tmux/iTerm backends. Pi has subagents, parallel durable tasks, and an experimental coordinator that routes server messages; those do not provide this same team workflow.
|
|
609
|
-
- Native ACP and A2A protocol hosts, and the bundled browser chat application. Pi's RPC/experimental server architecture remains useful as a reference for shared streaming and lifecycle concerns.
|
|
610
|
-
- Built-in read-only LSP queries and ComputerUse actions with provider-specific response handling.
|
|
611
|
-
- Cross-session memory extraction, recall, and consolidation, beyond per-session instructions and compaction.
|
|
612
|
-
- Structured code-review selection, validated findings, relocation/filtering, reports, and revision workflows. Pi's reviewer-agent example overlaps with review delegation, rather than this full pipeline.
|
|
613
|
-
- Built-in WebSearch and WebFetch tools. Pi can add web capabilities through MCP, extensions, or shell tools; that differs from these built-in tool implementations.
|
|
614
|
-
- Agent-run OpenTelemetry/Langfuse instrumentation and Sentry reporting. A Sentry MCP configuration example in Pi is a tool connection, not application error instrumentation.
|
|
615
|
-
|
|
616
|
-
Some further Yukino integrations have partial references: four permission modes with read-before-edit/stale-file gates and parent/child plan locks; file snapshots and persisted conversation rewind; and worktree creation/cleanup owned by agent tasks. Pi has permission/sandbox and git-checkpoint examples and can operate inside worktrees. Those are useful references, but they do not implement the same combined contracts. OAuth/model breadth, a session-tree UI, and Pi's extension/package ecosystem are Pi capabilities outside the shared surface audited here.
|
|
617
|
-
|
|
618
|
-
## Claude Code Capability Comparison
|
|
619
|
-
|
|
620
|
-
This audit uses the local checkout at `/Users/user/Downloads/claude-code`, revision `77a7934e15d69da13879112ed7db695c9ee7a52a`. References below are paths inside that checkout. Findings concern the inspected implementation, including its fork-specific integrations, rather than every released Claude Code version. Existing correct behavior is retained; a different product contract alone is not a defect.
|
|
621
|
-
|
|
622
|
-
| Capability | Claude Code reference | Defects fixed or capability added | Yukino design retained |
|
|
623
|
-
| ------------------------------------ | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
624
|
-
| Predefined/fork/background subagents | `docs/agent/sub-agents.mdx`, `docs/features/fork-subagent.md`, builtin `AgentTool` | Explicit foreground requests now override a predefined background default; role frontmatter accepts BOM; invalid background types fail explicitly. | Fork selection, parallel foreground reads/delegation, serialized conflicting mutations, inherited permissions, owned background cleanup, and independent task lists remain. |
|
|
625
|
-
| Plan | `docs/safety/plan-mode.mdx`, builtin `ExitPlanModeTool` | Plan paths belong to each checker/session instead of global process state. Exit checks the calling agent's live mode and its own non-empty plan, preventing cross-session reuse and empty approvals. | `/plan` remains user-controlled. Plan/explore roles remain locked read-only; teammate implementation still requires the leader's matching approval. Resume starts with a fresh plan owner. |
|
|
626
|
-
| Persistent goals | `src/services/goal`, `src/hooks/useGoalContinuation.ts`, builtin `GoalTool` | Added `/goal`, persisted session state, continuation, budgets, active time, completion and consecutive blocker audits, clear tombstones, resume/rewind reload, and host command handling. | User steering takes priority. No auto-run in Plan mode, after interruption/error, or merely on startup. Replacement and continuation-limit reset are explicit user actions. Budget reports use stored state without another model call. |
|
|
627
|
-
| OS sandbox | `src/utils/sandbox/sandbox-adapter.ts` | Print, Remote/ACP/A2A, and separate teammates now receive sandbox configuration; relative write roots resolve against command cwd; owned Bash backends are disposed. | Native Seatbelt/bubblewrap wrappers fail closed. Bash-only write confinement and a network boolean remain a deliberately smaller policy than Claude's proxy/domain/read restrictions. Permission bypass does not bypass the OS wrapper. |
|
|
628
|
-
| Checkpoints | `src/utils/fileHistory.ts` | Capture a checkpoint before the first agent request, including failed/interrupted first runs. Rewind compares binary bytes rather than decoded strings. | Persistent linear conversation/file snapshots, transcript coordinates, deletion recovery, partial-failure retry, and edited-worktree retention remain. Checkpoints cover Yukino-managed file edits, not arbitrary shell or desktop side effects. |
|
|
629
|
-
| Agent teams | `src/utils/teammateMailbox.ts`, builtin `SendMessageTool`, `src/utils/swarm/backends` | Invalid mailbox data now fails explicitly and preserves the original file instead of silently overwriting it as an empty inbox; failed atomic writes clean up temporary files. | Shared task claims/dependencies/owners use cross-process locks; request IDs and leader-only plan approval, coordinator filtering, persistent idle teammates, and in-process/tmux/iTerm backends remain. Separate processes retain PID/liveness/shutdown handling. |
|
|
630
|
-
| LSP | `src/services/lsp`, builtin `LSPTool` | A2A now forwards the configured language servers, matching other hosts. | Read-only queries, UTF-16 positions, request queueing, cancellation, document versions, server restart, and rejection of server-initiated edits remain. LSP/MCP executables are trusted local programs outside the Bash sandbox. |
|
|
631
|
-
| ComputerUse | `src/utils/computerUse/computerUseLock.ts`, builtin computer-use tools | Add a cross-process device lock per call/action batch, release it on exit/failure, and release Linux modifiers even after cancellation or partial key-down failure. | Coordinate conversion, screenshot/zoom handling, platform helpers, permissions, and provider safety/output handling remain. The lock protects an action batch; it is not Claude's full turn/session lease. |
|
|
632
|
-
| Long-term memory | `src/services/extractMemories`, `src/memdir/findRelevantMemories.ts`, `src/services/autoDream` | Failed/partial extraction and incomplete/cancelled recall cannot publish partial model selections. Recall deduplicates valid paths and enforces the five-memory limit. | Project/user scopes, index limits, origin metadata, permissions, extraction throttling, consolidation lock and rollback remain. Yukino's scheduling/storage contracts are independent of Claude's cloud/team memory services. |
|
|
633
|
-
| WebSearch/WebFetch | builtin `WebSearchTool`, `WebFetchTool`, Bing search adapter | Use Bing public-page search without a paid search API, decode result redirects, and retain validated domain filters. Report blocked or unrecognized pages as errors. WebFetch cancels unused bodies, rechecks cancellation, and refreshes replacement cache entries. | Search and direct HTTP/HTTPS fetch remain independent of the model provider. Local result filtering can return fewer hits; intranet fetches remain supported. Search returns snippets; use WebFetch for page content. No model summarizer is imposed. |
|
|
634
|
-
| Observability | `src/utils/telemetry/instrumentation.ts`, `src/services/langfuse`, `src/utils/sentry.ts` | Sentry export strips request bodies/cookies, scrubs credential fields and known secrets/home prefixes, and ignores cancellation errors. | Optional environment-controlled OTel/Langfuse/Sentry integrations, parent/child spans, cache-token and duration metrics, hashed session IDs, bounded flushing, and content-free OTel/Langfuse instrumentation remain. The reviewed Claude checkout does include Langfuse. |
|
|
635
|
-
|
|
636
|
-
Regression checks exercise goal state/continuation and print/remote commands, foreground/background delegation, plan isolation and locks, native sandbox argument generation and unavailable-backend rejection, shared task/approval/mailbox lifecycles, binary checkpoints, LSP transport, ComputerUse contention and modifier cleanup, memory failure paths, web cancellation/domain filtering, and telemetry redaction. Real native OS confinement, desktop permissions, and tmux/iTerm UI behavior still require platform-specific execution; mocked tool tests do not establish those live integrations.
|