@yukino.js/yukino 0.0.9 → 0.0.10
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 +178 -6
- package/dist/a2a-KAUHDZ6C.js +14 -0
- package/dist/acp-ZM5W3XVG.js +14 -0
- package/dist/anthropic-CQUMQFUK.js +4 -0
- package/dist/{seatbelt-FU3EQ42H.js → bwrap-LVIPV72Q.js} +1 -1
- package/dist/chunk-3VTVI62N.js +4 -0
- package/dist/chunk-CH7VZVG4.js +4 -0
- package/dist/chunk-F6WFTAOT.js +59 -0
- package/dist/chunk-I74AL3PF.js +5 -0
- package/dist/chunk-KJJYW5IY.js +4 -0
- package/dist/chunk-LCWNSYZU.js +4 -0
- package/dist/chunk-MQAQBW7F.js +35 -0
- package/dist/{chunk-BQGLVWJ2.js → chunk-PJBCC26Z.js} +25 -24
- package/dist/chunk-QMHSZVNF.js +4 -0
- package/dist/chunk-R567WVDL.js +90 -0
- package/dist/{chunk-SQ26ASOB.js → chunk-YCKISDTW.js} +3 -3
- package/dist/chunk-YXAUWDYT.js +1012 -0
- package/dist/chunk-ZPL2YHQU.js +5 -0
- package/dist/{esm-4KOJC56H.js → esm-YOQPBF42.js} +31 -31
- package/dist/lib/{anthropic-XFZKSPOX.js → anthropic-7HQY42TP.js} +5 -4
- package/dist/lib/bwrap-V6MFP7PT.js +7 -0
- package/dist/lib/chunk-55LKYMVV.js +68 -0
- package/dist/lib/chunk-AUU4RKMV.js +628 -0
- package/dist/lib/{chunk-KUA7U27R.js → chunk-EATSQNOB.js} +81 -37
- package/dist/lib/{chunk-LHIQSMGD.js → chunk-EVI3P64R.js} +69 -4
- package/dist/lib/{chunk-7EWMQYVH.js → chunk-JXZ5KIUV.js} +19 -4
- package/dist/lib/{chunk-MGPT7DWP.js → chunk-KC54MV5H.js} +10 -5
- package/dist/lib/{chunk-RY7EXVHD.js → chunk-OCGX3ISG.js} +36 -410
- package/dist/lib/chunk-Q6B6TAR3.js +4618 -0
- package/dist/lib/{chunk-MFEAVGDX.js → chunk-VXHBKGZW.js} +99 -306
- package/dist/lib/chunk-XDGZMZ2B.js +402 -0
- package/dist/lib/index.d.ts +2881 -2352
- package/dist/lib/index.js +6197 -6953
- package/dist/lib/{openai-QSDLFAKO.js → openai-Z7PCXN2X.js} +4 -4
- package/dist/lib/{providers-TL72PZZD.js → providers-XGLNBHO3.js} +3 -3
- package/dist/lib/seatbelt-2OE46ZE7.js +7 -0
- package/dist/lib/{tool-filter-F4S25GMJ.js → tool-filter-GVVYY5QO.js} +4 -4
- package/dist/main.js +212 -203
- package/dist/openai-WNPMC64P.js +34 -0
- package/dist/providers-RGKIQ2LX.js +4 -0
- package/dist/{bwrap-BZ7Q2A5B.js → seatbelt-UO7HGD4Z.js} +1 -1
- package/dist/server-TG5LRHIU.js +4 -0
- package/dist/slim-Q56GHZZP.js +11 -0
- package/dist/tool-filter-BTQ7WTHR.js +4 -0
- package/package.json +11 -10
- package/dist/a2a-C65LD3SC.js +0 -14
- package/dist/acp-SNG4K2LG.js +0 -14
- package/dist/anthropic-E7KF3CEK.js +0 -4
- package/dist/chunk-4RUACBRP.js +0 -5
- package/dist/chunk-COBTQXCB.js +0 -88
- package/dist/chunk-GTWPLFAN.js +0 -38
- package/dist/chunk-HZFKNHPB.js +0 -4
- package/dist/chunk-KILUTRHM.js +0 -4
- package/dist/chunk-NAQRFHUX.js +0 -4
- package/dist/chunk-PP5WWNTV.js +0 -4
- package/dist/chunk-QEUO5B7I.js +0 -1033
- package/dist/lib/bwrap-STOJ4TEH.js +0 -7
- package/dist/lib/chunk-K532PPI6.js +0 -307
- package/dist/lib/chunk-MLKGABMK.js +0 -9
- package/dist/lib/chunk-Q3EV2REC.js +0 -260
- package/dist/lib/seatbelt-MRJ25UBQ.js +0 -7
- package/dist/openai-XNFC4DJ2.js +0 -34
- package/dist/providers-XEORRTYK.js +0 -4
- package/dist/server-35JMM5JU.js +0 -4
- package/dist/tool-filter-XZ7I6KU7.js +0 -4
package/README.md
CHANGED
|
@@ -14,15 +14,34 @@ Beyond interactive use, Yukino supports a non-interactive print mode for scripti
|
|
|
14
14
|
|
|
15
15
|
- Multi-provider LLM support with Anthropic (Anthropic Messages), OpenAI (OpenAI Responses), and OpenAI-compatible (OpenAI Chat Completions) protocols
|
|
16
16
|
- Interactive terminal UI with streaming text, thinking indicators, and tool execution display
|
|
17
|
-
- Built-in tool set: ReadFile, WriteFile, EditFile, Bash, PowerShell, Glob, Grep, WebFetch, ComputerUse, ToolSearch, McpCall, EnterWorktree, ExitWorktree, ExitPlanMode, the TaskCreate/TaskGet/TaskList/TaskUpdate
|
|
17
|
+
- Built-in tool set: ReadFile, WriteFile, EditFile, Bash, PowerShell, Glob, Grep, WebFetch, WebSearch, LSP, ComputerUse, ToolSearch, McpCall, EnterWorktree, ExitWorktree, ExitPlanMode, Goal, the TaskCreate/TaskGet/TaskList/TaskUpdate and TodoWrite tracking tools, plus Agent, LoadSkill, InstallSkill, AskUserQuestion, SyntheticOutput, TeamCreate, SendMessage, TeamDelete, TaskOutput, and TaskStop
|
|
18
18
|
- MCP (Model Context Protocol) server integration for extending the tool set with external services
|
|
19
19
|
- Permission system with four modes: default, acceptEdits, plan (read-only), and bypassPermissions
|
|
20
20
|
- Sandbox support for isolated command execution (bwrap on Linux, seatbelt on macOS)
|
|
21
21
|
- Human-in-the-loop approval dialogs for file writes and shell commands, driven by permission mode and allow/deny rules
|
|
22
|
+
- Tool completion events stream as calls finish; conversation history and session logs retain the original call order
|
|
23
|
+
- Asynchronous text reads and batched file edits with overlap validation and preserved line endings
|
|
24
|
+
- Home-relative tool paths (`~` and `~/...`) resolve consistently in file tools, search, LSP, and permission checks
|
|
25
|
+
- Grep and Glob bound their result bodies to 50 KiB and honor cancellation; Grep shortens long matching lines at UTF-8 boundaries and explains how to read the full text
|
|
26
|
+
- Image reads detect the actual format, including files without an image extension
|
|
27
|
+
- Transient provider failures use bounded, interruptible retries before visible output; incomplete responses cannot execute pending tools
|
|
28
|
+
|
|
29
|
+
`EditFile` accepts `file_path` and a non-empty `edits` array. Each entry contains `old_string`, `new_string`, and optional `replace_all`. All entries match the original file, and validation completes before the file is written once. Use one call for disjoint changes in the same file:
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"file_path": "src/example.ts",
|
|
34
|
+
"edits": [
|
|
35
|
+
{ "old_string": "const first = 1;", "new_string": "const first = 2;" },
|
|
36
|
+
{ "old_string": "const second = 3;", "new_string": "const second = 4;" }
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
```
|
|
22
40
|
|
|
23
41
|
### Conversation and Memory
|
|
24
42
|
|
|
25
43
|
- Session persistence with JSONL-based storage for cross-session resume
|
|
44
|
+
- Session-local persistent goals with automatic continuation, explicit pause/resume, token budgets, and completion/blocker audits
|
|
26
45
|
- Automatic context compaction when conversations approach the model's context window
|
|
27
46
|
- Long-term memory extraction and recall across sessions (disable with `enable_memory: false` in `~/.yukino/config.yaml`)
|
|
28
47
|
- Instructions files for persistent guidance: user-global `~/.yukino/AGENTS.md`, plus `AGENTS.md` and `.yukino/AGENTS.md` in every directory from the git root down to the working directory, with `@include` expansion
|
|
@@ -31,10 +50,13 @@ Beyond interactive use, Yukino supports a non-interactive print mode for scripti
|
|
|
31
50
|
|
|
32
51
|
- Skill catalog with two-tier loading: user-global (~/.agents/skills/) and project-level (.agents/skills/), where the project level wins on a name collision
|
|
33
52
|
- Hot-reload support for skills edited on disk
|
|
53
|
+
- Recursive discovery of grouped skills, with cycle protection and discovery stopping at each declared skill root
|
|
34
54
|
- Inline and fork execution modes for skills
|
|
35
55
|
- Slash command system with built-in commands and user-defined commands from two tiers: user-global (~/.yukino/commands/) and project-level (.yukino/commands/), where the project level wins on a name collision
|
|
36
56
|
- Skill installation from a local path or a raw SKILL.md URL
|
|
37
57
|
|
|
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.
|
|
59
|
+
|
|
38
60
|
### Agent Orchestration
|
|
39
61
|
|
|
40
62
|
- Subagent spawning with built-in agent types: general-purpose, plan (read-only architect), explore (read-only code explorer)
|
|
@@ -90,8 +112,8 @@ Print, remote, ACP, and A2A modes require at least one configured provider; the
|
|
|
90
112
|
|
|
91
113
|
```yaml
|
|
92
114
|
# Initial permission mode. Enum: default (ask per write/command) | acceptEdits (auto-approve
|
|
93
|
-
# file edits) |
|
|
94
|
-
#
|
|
115
|
+
# file edits) | bypassPermissions (approve everything).
|
|
116
|
+
# Other values fall back to default. Shift+Tab cycles these modes; only /plan enters plan mode.
|
|
95
117
|
permission_mode: bypassPermissions
|
|
96
118
|
|
|
97
119
|
# Model providers. At least one is required.
|
|
@@ -210,6 +232,10 @@ hooks:
|
|
|
210
232
|
on_error: ignore
|
|
211
233
|
```
|
|
212
234
|
|
|
235
|
+
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
|
+
|
|
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 implement Claude Code's domain proxy or read-deny policy, and does not wrap PowerShell, LSP, or MCP executables.
|
|
238
|
+
|
|
213
239
|
Provider fields:
|
|
214
240
|
|
|
215
241
|
| Field | Required | Description |
|
|
@@ -248,7 +274,7 @@ Expressions that fail to compile or throw at runtime (syntax errors, misspelled
|
|
|
248
274
|
|
|
249
275
|
### Telemetry
|
|
250
276
|
|
|
251
|
-
Telemetry is disabled by default and is configured only through environment variables. Yukino does not send prompts, model output, thinking content, tool arguments, tool results, file paths, API keys, or raw session IDs. Session identifiers included in traces are hashed.
|
|
277
|
+
Telemetry is disabled by default and is configured only through environment variables. Yukino's OpenTelemetry and Langfuse instrumentation does not send prompts, model output, thinking content, tool arguments, tool results, file paths, API keys, or raw session IDs. Session identifiers included in traces are hashed. Sentry separately sends exception diagnostics as described below.
|
|
252
278
|
|
|
253
279
|
#### OpenTelemetry
|
|
254
280
|
|
|
@@ -303,6 +329,8 @@ Langfuse tracing is enabled when both `LANGFUSE_PUBLIC_KEY` and `LANGFUSE_SECRET
|
|
|
303
329
|
|
|
304
330
|
Sentry is enabled when `SENTRY_DSN` is set. It reports process-level errors only; performance tracing remains handled by OpenTelemetry.
|
|
305
331
|
|
|
332
|
+
Before export, Yukino removes request bodies and cookies, redacts credential fields, bearer tokens, and known secret environment values, and replaces home-directory prefixes. Cancellation errors are ignored. Exception messages and stack diagnostics remain available for debugging; this filtering does not classify every possible secret embedded in arbitrary error text.
|
|
333
|
+
|
|
306
334
|
| Variable | Purpose |
|
|
307
335
|
| -------------------- | --------------------------------------------------- |
|
|
308
336
|
| `SENTRY_DSN` | Sentry project DSN. |
|
|
@@ -335,6 +363,75 @@ Each entry takes `command`/`args`/`env` (stdio) or `url`/`headers` with `type` o
|
|
|
335
363
|
|
|
336
364
|
After editing `.mcp.json` or `config.yaml`, use `/mcp reload` in the UI to re-read both sources. Unchanged connections stay live, removed servers disconnect, new servers connect, and servers whose settings changed restart.
|
|
337
365
|
|
|
366
|
+
### Language servers (LSP)
|
|
367
|
+
|
|
368
|
+
Configure installed stdio language servers in `~/.yukino/config.yaml`. Servers start lazily on the first matching query; Yukino does not install or download them. The first configured server matching the file extension is selected, with one server per working directory and configuration name.
|
|
369
|
+
|
|
370
|
+
```yaml
|
|
371
|
+
lsp_servers:
|
|
372
|
+
- name: typescript
|
|
373
|
+
command: typescript-language-server
|
|
374
|
+
args: ["--stdio"]
|
|
375
|
+
languages:
|
|
376
|
+
.ts: typescript
|
|
377
|
+
.tsx: typescriptreact
|
|
378
|
+
.js: javascript
|
|
379
|
+
.jsx: javascriptreact
|
|
380
|
+
timeout_ms: 15000
|
|
381
|
+
# Optional: env, initialization_options, settings
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
`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.
|
|
385
|
+
|
|
386
|
+
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.
|
|
387
|
+
|
|
388
|
+
### Tasks, TODOs, and background work
|
|
389
|
+
|
|
390
|
+
Task tracking and task execution are separate:
|
|
391
|
+
|
|
392
|
+
- `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
|
+
- `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
|
+
- 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 `.yukino/tasks/`, 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
|
+
- `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
|
+
|
|
398
|
+
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.
|
|
399
|
+
|
|
400
|
+
### Worker lifecycle
|
|
401
|
+
|
|
402
|
+
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.
|
|
403
|
+
|
|
404
|
+
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
|
+
|
|
406
|
+
Persistent teammates intentionally become idle after each turn, matching Claude Code's teammate lifecycle. 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
|
+
|
|
408
|
+
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
|
+
|
|
410
|
+
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
|
+
|
|
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; there is no Exa integration or paid-provider fallback. 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. The Exa-specific `type` argument has been removed. 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
|
+
|
|
414
|
+
`WebFetch` cancels discarded response bodies and honors cancellation even for cached pages. Direct HTTP/HTTPS access, including project intranet endpoints, remains supported.
|
|
415
|
+
|
|
416
|
+
### Persistent goals
|
|
417
|
+
|
|
418
|
+
`/goal <objective>` sets a goal and starts work. `/goal` or `/goal status` reports its state. The goal is stored in the session JSONL, survives compaction and `/resume`, and follows conversation checkpoint rewind. `/clear` starts a separate session. Merely reopening a session does not start unattended work.
|
|
419
|
+
|
|
420
|
+
```text
|
|
421
|
+
/goal --budget 100000 Implement the feature and verify every acceptance criterion
|
|
422
|
+
/goal pause
|
|
423
|
+
/goal resume
|
|
424
|
+
/goal replace --budget 150000 Finish the revised objective
|
|
425
|
+
/goal complete
|
|
426
|
+
/goal clear
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
After a normal model turn ends, an active goal starts another turn. Pending user input takes priority; Plan mode, interruption, and provider failures do not trigger automatic continuation. Pause and clear controls take effect during streaming without cancelling the current request. The model's `Goal` tool can inspect the goal or report completion/blockage; only the user can set, replace, pause, or resume it. Completion requires evidence for the whole objective. The same blocker must be recorded on three consecutive goal turns, once per turn, before continuation stops. Resuming a blocked goal starts a fresh audit.
|
|
430
|
+
|
|
431
|
+
The optional token budget counts input, output, cache-read, and cache-creation tokens for the main conversation's model requests during the goal run, including its final response. Delegated agents, memory selection, and compaction summaries are outside this counter. An in-flight request can exceed the budget; once reported, no new substantive tools or model requests run. Yukino prints the stored status without spending additional tokens on a budget summary. An exhausted goal requires explicit replacement with a new budget. The 150-turn limit requires `/goal continue` to reset it. Active time excludes idle, paused, and process-restart intervals.
|
|
432
|
+
|
|
433
|
+
TUI, Remote/ACP/A2A, and print mode share this goal loop. `yukino -p "/goal <objective>"` creates a goal for that invocation's new session. Print mode control queries finish without a model call; invalid commands return a nonzero exit code, and stream JSON retains its final `result` event.
|
|
434
|
+
|
|
338
435
|
## Usage
|
|
339
436
|
|
|
340
437
|
### Interactive UI Mode
|
|
@@ -356,10 +453,13 @@ The form saves to `~/.yukino/config.yaml`, retaining existing providers and othe
|
|
|
356
453
|
```bash
|
|
357
454
|
yukino -p "explain this codebase"
|
|
358
455
|
yukino -p "fix the failing test" --output-format stream-json
|
|
456
|
+
yukino -p -- "--flag-like prompt text"
|
|
359
457
|
```
|
|
360
458
|
|
|
361
459
|
The -p flag sends a single prompt, runs the agent loop, and prints the result to stdout (`text` by default, or one JSON line per event with `--output-format stream-json`). Print mode intentionally bypasses permission prompts, so only run it on trusted prompts. Useful for scripting and CI pipelines.
|
|
362
460
|
|
|
461
|
+
JSONL output includes incremental `stream_text` and `thinking_text`, tool lifecycle events paired by `tool_id`, cache usage, retry/compaction events, completion events, and a final `result`. SIGINT and SIGTERM cancel owned background tasks and retain exit codes 130 and 143. Put options before `--`; tokens after it are prompt data.
|
|
462
|
+
|
|
363
463
|
### Remote Mode (Browser UI)
|
|
364
464
|
|
|
365
465
|
```bash
|
|
@@ -409,6 +509,7 @@ Inside the UI, these commands are available:
|
|
|
409
509
|
| /skills reload | Hot-reload skills from disk |
|
|
410
510
|
| /skill <name> [args] | Run a skill by name (shorthand for `/<name> [args]`; `/skill reload` routes to `/skills reload`) |
|
|
411
511
|
| /plan | Enter plan mode (read-only investigation) |
|
|
512
|
+
| /goal [args] | Set or view a persistent goal; pause, resume, replace, complete, clear, or continue after the turn limit |
|
|
412
513
|
| /compact | Force conversation compaction |
|
|
413
514
|
| /clear | Reset the session and clear the terminal |
|
|
414
515
|
| /resume [id] | List or restore a previous session |
|
|
@@ -421,16 +522,30 @@ Inside the UI, these commands are available:
|
|
|
421
522
|
| /code-review | Open the code review form for workspace, branch-range, or commit review |
|
|
422
523
|
| /quit | Exit the application |
|
|
423
524
|
|
|
525
|
+
### User Bash Commands
|
|
526
|
+
|
|
527
|
+
Start the main terminal input with `!` or `!!` to execute Bash directly, without calling the model. Like Pi, `! 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
|
+
|
|
529
|
+
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
|
+
|
|
531
|
+
Commands can run while the model is streaming, with at most one user command at a time. Completed results wait until the current model turn or compaction finishes before entering session history and model context, preserving tool-call/result ordering. Esc or Ctrl+C cancels the user command first without stopping the model or background agents. New idle chat turns and slash commands wait for it to finish. User commands cannot be moved to the background with Ctrl+B and never produce model-facing task notifications.
|
|
532
|
+
|
|
424
533
|
### Keyboard Shortcuts
|
|
425
534
|
|
|
426
535
|
| Key | Action |
|
|
427
536
|
| --------- | ----------------------------------------------------------------------------------- |
|
|
428
537
|
| Ctrl+C | Clear input or interrupt streaming (first press), exit app (second press within 2s) |
|
|
429
538
|
| Ctrl+O | Toggle full vs. truncated tool output |
|
|
430
|
-
|
|
|
539
|
+
| ↓ | On the last input line, view all teammates and background subagents |
|
|
431
540
|
| Ctrl+B | Move running foreground Bash/PowerShell tasks to the background |
|
|
432
541
|
| Ctrl+V | Paste a clipboard image (Alt+V on Windows) |
|
|
433
|
-
| Shift+Tab | Cycle
|
|
542
|
+
| Shift+Tab | Cycle default → acceptEdits → bypassPermissions; exit plan to default |
|
|
543
|
+
|
|
544
|
+
Press ↓ on the last visual row of the input to view all teammates and background subagents, including while the foreground agent is streaming. Completion menus and prompt-history navigation take precedence. Enter opens an agent's details, Escape returns or closes the list, and the unsent draft and cursor are preserved. Teammate spawn cards scroll with the transcript like background subagent cards; current progress is available in the Agents list.
|
|
545
|
+
|
|
546
|
+
Use the mouse wheel or trackpad to scroll conversation history in the terminal's native scrollback. Drag to select text and use the terminal's copy/paste shortcuts. Up/Down navigates completion menus, visual input rows, and prompt history; Down after restoring the draft opens the Agents list. Home/End and Ctrl+A/E move to the start/end of the input line. PageUp/PageDown behavior follows the terminal's own scrollback bindings.
|
|
547
|
+
|
|
548
|
+
**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.
|
|
434
549
|
|
|
435
550
|
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.
|
|
436
551
|
|
|
@@ -452,3 +567,60 @@ The library entry is terminal-independent by contract: it must never reach `src/
|
|
|
452
567
|
- **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.
|
|
453
568
|
|
|
454
569
|
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.
|
|
570
|
+
|
|
571
|
+
## Pi Capability Comparison
|
|
572
|
+
|
|
573
|
+
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.
|
|
574
|
+
|
|
575
|
+
| Shared capability | Pi reference | Yukino outcome |
|
|
576
|
+
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
577
|
+
| 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. |
|
|
578
|
+
| 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. |
|
|
579
|
+
| 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. |
|
|
580
|
+
| 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. |
|
|
581
|
+
| 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. |
|
|
582
|
+
| 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. |
|
|
583
|
+
| 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. |
|
|
584
|
+
| 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. |
|
|
585
|
+
| 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. |
|
|
586
|
+
| 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. |
|
|
587
|
+
| 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. |
|
|
588
|
+
| 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. |
|
|
589
|
+
| 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. |
|
|
590
|
+
| 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. |
|
|
591
|
+
| 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. |
|
|
592
|
+
| 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. |
|
|
593
|
+
|
|
594
|
+
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.
|
|
595
|
+
|
|
596
|
+
### Yukino Features Without a Direct Counterpart in the Reviewed Package
|
|
597
|
+
|
|
598
|
+
- 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.
|
|
599
|
+
- 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.
|
|
600
|
+
- Built-in read-only LSP queries and ComputerUse actions with provider-specific response handling.
|
|
601
|
+
- Cross-session memory extraction, recall, and consolidation, beyond per-session instructions and compaction.
|
|
602
|
+
- 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.
|
|
603
|
+
- 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.
|
|
604
|
+
- Agent-run OpenTelemetry/Langfuse instrumentation and Sentry reporting. A Sentry MCP configuration example in Pi is a tool connection, not application error instrumentation.
|
|
605
|
+
|
|
606
|
+
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.
|
|
607
|
+
|
|
608
|
+
## Claude Code Capability Comparison
|
|
609
|
+
|
|
610
|
+
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.
|
|
611
|
+
|
|
612
|
+
| Capability | Claude Code reference | Defects fixed or capability added | Yukino design retained |
|
|
613
|
+
| ------------------------------------ | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
614
|
+
| 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. |
|
|
615
|
+
| 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. |
|
|
616
|
+
| 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. |
|
|
617
|
+
| 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. |
|
|
618
|
+
| 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. |
|
|
619
|
+
| 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. |
|
|
620
|
+
| 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. |
|
|
621
|
+
| 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. |
|
|
622
|
+
| 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. |
|
|
623
|
+
| 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. |
|
|
624
|
+
| 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. |
|
|
625
|
+
|
|
626
|
+
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.
|