@skein-code/cli 0.3.11 → 0.3.13
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 +19 -1
- package/dist/cli.js +764 -168
- package/dist/cli.js.map +1 -1
- package/docs/ARCHITECTURE.md +28 -4
- package/docs/NEXT_STEPS.md +23 -19
- package/package.json +4 -4
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
## Agent turn
|
|
35
35
|
|
|
36
36
|
1. Resolve `@path` mentions inside configured workspace roots.
|
|
37
|
-
2.
|
|
38
|
-
|
|
37
|
+
2. Classify the task evidence surface and ask the local context engine for
|
|
38
|
+
task-relevant spans under an adaptive budget capped by configuration.
|
|
39
39
|
3. Combine product rules, project rules, retrieved spans, mentions, current plan,
|
|
40
40
|
and conversation history.
|
|
41
41
|
4. Call the model with the tools allowed by the current mode.
|
|
@@ -43,8 +43,10 @@
|
|
|
43
43
|
6. Create a checkpoint before the first mutation in a tool batch.
|
|
44
44
|
7. Execute tools, emit events, and append their grounded results to the model
|
|
45
45
|
conversation.
|
|
46
|
-
8.
|
|
47
|
-
|
|
46
|
+
8. Record a bounded, content-free token receipt for the model request and
|
|
47
|
+
persist actual provider counters separately from local estimates.
|
|
48
|
+
9. Continue until the model returns a final response or the turn limit is hit.
|
|
49
|
+
10. Run configured verification commands after changes. The completion gate accepts
|
|
48
50
|
only current successful test, typecheck, lint, build, check, or `git diff
|
|
49
51
|
--check` evidence recorded after the last mutation. An early final response
|
|
50
52
|
receives one bounded recovery turn; the runtime persists `verified`,
|
|
@@ -73,6 +75,12 @@ stay in a retry/exit state and occur before an empty session is persisted.
|
|
|
73
75
|
Headless runs retain non-animated lazy indexing so structured automation does
|
|
74
76
|
not acquire terminal-only behavior.
|
|
75
77
|
|
|
78
|
+
Known mutations take a narrower path: the runner validates tool-reported
|
|
79
|
+
`changedFiles`, marks them dirty, targeted-upserts or deletes only those paths,
|
|
80
|
+
and atomically persists the new generation before returning the tool result.
|
|
81
|
+
Manifest reconciliation additionally compares ctime, closing same-size changes
|
|
82
|
+
whose mtime is restored without hashing every source file on an empty query.
|
|
83
|
+
|
|
76
84
|
### Prompt layers
|
|
77
85
|
|
|
78
86
|
The runner keeps the cacheable system prefix separate from mutable task state:
|
|
@@ -116,6 +124,22 @@ are reconciled against storage before the readback tool can be exposed. Deleting
|
|
|
116
124
|
a session removes its artifact directory. Session JSON and JSONL events carry
|
|
117
125
|
only receipts and bounded previews, never artifact contents.
|
|
118
126
|
|
|
127
|
+
## Token ledger and adaptive retrieval
|
|
128
|
+
|
|
129
|
+
Each model request appends a maximum-256-entry token ledger to its session. A
|
|
130
|
+
receipt contains only a request ID, turn, timestamp, partition counts, actual
|
|
131
|
+
provider counters when present, measurement source, loaded tool names, and
|
|
132
|
+
retrieval selection metadata. It never contains prompt text, workspace rules,
|
|
133
|
+
source snippets, tool schemas, arguments, results, or credentials. Legacy
|
|
134
|
+
sessions without provenance remain readable and are labelled `unknown` rather
|
|
135
|
+
than being reported as actual usage.
|
|
136
|
+
|
|
137
|
+
The local context ceiling is allocated by task shape: 2k for focused evidence,
|
|
138
|
+
4k for ordinary work, 8k for cross-module or repository-wide work, and 12k only
|
|
139
|
+
for explicitly exhaustive multi-part work. Each receipt reports its reason and
|
|
140
|
+
the number of candidate, selected, overlapping, and budget-capped spans. These
|
|
141
|
+
are estimated provider-neutral planning values, not billing claims.
|
|
142
|
+
|
|
119
143
|
## Local context selection
|
|
120
144
|
|
|
121
145
|
The context boundary is deliberately in-process and local:
|
package/docs/NEXT_STEPS.md
CHANGED
|
@@ -9,7 +9,7 @@ one of the milestones below.
|
|
|
9
9
|
|
|
10
10
|
- Product name: `Skein`; primary executable: `skein`.
|
|
11
11
|
- Compatibility executables: `mosaic` and `mosaic-code`.
|
|
12
|
-
- Current repository version: `0.3.
|
|
12
|
+
- Current repository version: `0.3.13`.
|
|
13
13
|
- Runtime requirement: Node.js `>=22.16.0` (the runtime uses unflagged
|
|
14
14
|
`node:sqlite` with FTS5, and current CLI/build dependencies require this
|
|
15
15
|
Node 22 baseline).
|
|
@@ -41,16 +41,16 @@ npm audit --omit=dev
|
|
|
41
41
|
npm run release:verify -- --output-dir artifacts/package
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
The latest verified package is `skein-code-cli-0.3.
|
|
45
|
-
its SHA-256 to `artifacts/package/skein-code-cli-0.3.
|
|
44
|
+
The latest verified package is `skein-code-cli-0.3.13.tgz`. The verifier writes
|
|
45
|
+
its SHA-256 to `artifacts/package/skein-code-cli-0.3.13.tgz.sha256`, and CI
|
|
46
46
|
retains the checksum beside the package metadata. The checksum is deliberately
|
|
47
47
|
not copied into this packaged document because doing so would change the
|
|
48
48
|
archive it describes.
|
|
49
49
|
|
|
50
|
-
The final verification included a fresh install
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
The final verification included a fresh install for all three executable
|
|
51
|
+
aliases. PTY coverage included 20, 24 ASCII, 40, 80, 120 columns and a 40x10
|
|
52
|
+
short-height case. The current full-suite count is recorded from the latest
|
|
53
|
+
`npm run check` in the release evidence.
|
|
54
54
|
|
|
55
55
|
## Recommended Order
|
|
56
56
|
|
|
@@ -78,13 +78,12 @@ Implementation notes:
|
|
|
78
78
|
- `npm run release:verify` reproduces the package from source, installs it into
|
|
79
79
|
an isolated prefix, rejects packaged local state, and exercises `skein`,
|
|
80
80
|
`mosaic`, and `mosaic-code`.
|
|
81
|
-
- The `main` branch rule requires the strict `check` status. Version 0.3.
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
shape.
|
|
81
|
+
- The `main` branch rule requires the strict `check` status. Version 0.3.13
|
|
82
|
+
retains v0.3.12's privacy-safe per-request token ledger and adaptive budgets,
|
|
83
|
+
then adds targeted known-change index refresh, ctime freshness reconciliation,
|
|
84
|
+
and bounded no-progress search recovery. Session telemetry stores counts,
|
|
85
|
+
tool names, selection decisions, and hashes, never prompt, source, schema,
|
|
86
|
+
argument, or tool-result content.
|
|
88
87
|
Its tag, GitHub verification, and npm publication use the same source commit.
|
|
89
88
|
|
|
90
89
|
### P1: Skein Storage Namespace And Migration
|
|
@@ -148,9 +147,10 @@ Implementation progress:
|
|
|
148
147
|
|
|
149
148
|
### P1: Local Context Engine Reliability And Benchmarking
|
|
150
149
|
|
|
151
|
-
Keep retrieval local and measurable as the repository grows.
|
|
152
|
-
|
|
153
|
-
|
|
150
|
+
Keep retrieval local and measurable as the repository grows. Content hashes,
|
|
151
|
+
generation-keyed query caching, overlap-aware packing, adaptive budgets, and
|
|
152
|
+
targeted known-change refresh are now implemented. The next retrieval slice is
|
|
153
|
+
language adapters and the expanded multilingual benchmark.
|
|
154
154
|
|
|
155
155
|
Definition of done:
|
|
156
156
|
|
|
@@ -167,8 +167,12 @@ Implementation progress:
|
|
|
167
167
|
- The public `pack/search/index/status` boundary is now a pure local façade.
|
|
168
168
|
- Legacy external configuration is stripped at the config schema boundary and
|
|
169
169
|
no external executable or database is probed by the CLI.
|
|
170
|
-
-
|
|
171
|
-
|
|
170
|
+
- Tool-reported creates, updates, and deletes refresh only affected paths and
|
|
171
|
+
atomically persist before the next turn in TUI or headless mode.
|
|
172
|
+
- Size/mtime/ctime reconciliation closes the direct-new-query zero-hit window;
|
|
173
|
+
repeated empty or unchanged searches stop through the recovery circuit.
|
|
174
|
+
- Remaining work is broader language adapters and production-scale benchmark
|
|
175
|
+
calibration; the reproducible benchmark pipeline already exists.
|
|
172
176
|
|
|
173
177
|
### P1: Multi-Agent Scheduler And Team UX
|
|
174
178
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skein-code/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.13",
|
|
4
4
|
"description": "A context-first, model-agnostic coding agent with an auditable terminal workspace.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
},
|
|
17
17
|
"skein": {
|
|
18
18
|
"releaseNotes": [
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
19
|
+
"Known tool changes refresh only their affected local-index paths before the next model turn",
|
|
20
|
+
"File ctime closes same-size and restored-mtime zero-hit freshness gaps without full-content scans",
|
|
21
|
+
"Repeated empty or unchanged search calls stop through the existing recovery circuit"
|
|
22
22
|
]
|
|
23
23
|
},
|
|
24
24
|
"bin": {
|