@yukino.js/yukino 0.0.10 → 0.0.12
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 +116 -6
- package/dist/a2a-RMMY65QU.js +14 -0
- package/dist/acp-WY6JO5LK.js +14 -0
- package/dist/anthropic-55TYAIKB.js +4 -0
- package/dist/{chunk-3VTVI62N.js → chunk-33HUTVDG.js} +1 -1
- package/dist/chunk-4CLD7LEU.js +5 -0
- package/dist/chunk-5URXBVET.js +4 -0
- package/dist/{chunk-PJBCC26Z.js → chunk-7TZ52NFW.js} +21 -21
- package/dist/chunk-D4MZQCMB.js +59 -0
- package/dist/{chunk-QMHSZVNF.js → chunk-HTLXOBAC.js} +1 -1
- package/dist/{chunk-YCKISDTW.js → chunk-IX65B3M7.js} +3 -3
- package/dist/chunk-OI2W6R6H.js +28 -0
- package/dist/chunk-PWLFGDME.js +4 -0
- package/dist/chunk-SYKQXO6W.js +4 -0
- package/dist/{chunk-YXAUWDYT.js → chunk-V7Q2SA7H.js} +171 -174
- 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-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-EVI3P64R.js → chunk-WL3ML2TB.js} +3 -3
- 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 +370 -339
- package/dist/lib/index.js +783 -568
- package/dist/lib/{openai-Z7PCXN2X.js → openai-54IQOU6Y.js} +4 -4
- package/dist/lib/{providers-XGLNBHO3.js → providers-DPVHJZAX.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-L3JP6JDZ.js +495 -0
- package/dist/main.js +2 -477
- package/dist/{openai-WNPMC64P.js → openai-I2TTMBWK.js} +1 -1
- package/dist/providers-VFEHLGQG.js +4 -0
- package/dist/server-F4PJ3W62.js +4 -0
- package/dist/tool-filter-5WW6YGKC.js +4 -0
- package/package.json +4 -2
- package/dist/a2a-KAUHDZ6C.js +0 -14
- package/dist/acp-ZM5W3XVG.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-RGKIQ2LX.js +0 -4
- package/dist/server-TG5LRHIU.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:
|
|
@@ -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.
|
|
@@ -547,9 +647,11 @@ Use the mouse wheel or trackpad to scroll conversation history in the terminal's
|
|
|
547
647
|
|
|
548
648
|
**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.
|
|
549
649
|
|
|
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.
|
|
651
|
+
|
|
550
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.
|
|
551
653
|
|
|
552
|
-
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).
|
|
553
655
|
|
|
554
656
|
## Library Build
|
|
555
657
|
|
|
@@ -566,7 +668,15 @@ The library entry is terminal-independent by contract: it must never reach `src/
|
|
|
566
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.
|
|
567
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.
|
|
568
670
|
|
|
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
|
|
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.
|
|
672
|
+
|
|
673
|
+
## Terminal Rendering Tests
|
|
674
|
+
|
|
675
|
+
`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
|
+
|
|
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.
|
|
678
|
+
|
|
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.
|
|
570
680
|
|
|
571
681
|
## Pi Capability Comparison
|
|
572
682
|
|