@skein-code/cli 0.3.11 → 0.3.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 +11 -1
- package/dist/cli.js +484 -142
- package/dist/cli.js.map +1 -1
- package/docs/ARCHITECTURE.md +22 -4
- package/docs/NEXT_STEPS.md +9 -10
- 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`,
|
|
@@ -116,6 +118,22 @@ are reconciled against storage before the readback tool can be exposed. Deleting
|
|
|
116
118
|
a session removes its artifact directory. Session JSON and JSONL events carry
|
|
117
119
|
only receipts and bounded previews, never artifact contents.
|
|
118
120
|
|
|
121
|
+
## Token ledger and adaptive retrieval
|
|
122
|
+
|
|
123
|
+
Each model request appends a maximum-256-entry token ledger to its session. A
|
|
124
|
+
receipt contains only a request ID, turn, timestamp, partition counts, actual
|
|
125
|
+
provider counters when present, measurement source, loaded tool names, and
|
|
126
|
+
retrieval selection metadata. It never contains prompt text, workspace rules,
|
|
127
|
+
source snippets, tool schemas, arguments, results, or credentials. Legacy
|
|
128
|
+
sessions without provenance remain readable and are labelled `unknown` rather
|
|
129
|
+
than being reported as actual usage.
|
|
130
|
+
|
|
131
|
+
The local context ceiling is allocated by task shape: 2k for focused evidence,
|
|
132
|
+
4k for ordinary work, 8k for cross-module or repository-wide work, and 12k only
|
|
133
|
+
for explicitly exhaustive multi-part work. Each receipt reports its reason and
|
|
134
|
+
the number of candidate, selected, overlapping, and budget-capped spans. These
|
|
135
|
+
are estimated provider-neutral planning values, not billing claims.
|
|
136
|
+
|
|
119
137
|
## Local context selection
|
|
120
138
|
|
|
121
139
|
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.12`.
|
|
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,8 +41,8 @@ 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.12.tgz`. The verifier writes
|
|
45
|
+
its SHA-256 to `artifacts/package/skein-code-cli-0.3.12.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.
|
|
@@ -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.12
|
|
82
|
+
adds privacy-safe per-request token receipts, actual-versus-estimated usage
|
|
83
|
+
provenance, prompt partition accounting, and adaptive 2k/4k/8k/12k local
|
|
84
|
+
retrieval budgets. Session telemetry stores counts, tool names, selection
|
|
85
|
+
decisions, and discard reasons, never prompt, source, schema, argument, or
|
|
86
|
+
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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skein-code/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.12",
|
|
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
|
+
"Each model request records privacy-safe token partitions and actual-versus-estimated provenance",
|
|
20
|
+
"Local retrieval now selects focused, standard, broad, or maximum evidence budgets",
|
|
21
|
+
"Terminal and JSON diagnostics expose budget decisions without storing prompt or source content"
|
|
22
22
|
]
|
|
23
23
|
},
|
|
24
24
|
"bin": {
|