@skein-code/cli 0.3.23 → 0.3.25
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 -2
- package/dist/cli.js +1041 -187
- package/dist/cli.js.map +1 -1
- package/docs/ARCHITECTURE.md +32 -11
- package/docs/NEXT_STEPS.md +41 -3
- package/examples/config.yaml +2 -1
- package/package.json +10 -1
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -36,20 +36,23 @@
|
|
|
36
36
|
1. Resolve `@path` mentions inside configured workspace roots.
|
|
37
37
|
2. Classify the task evidence surface and ask the local context engine for
|
|
38
38
|
task-relevant spans under an adaptive budget capped by configuration.
|
|
39
|
-
3.
|
|
39
|
+
3. Run the Intent Sufficiency Gate. Clear requests execute; repository-derived
|
|
40
|
+
gaps route to inspection; only user-owned product choices create a persisted
|
|
41
|
+
`needs_input` state. Shell/Git/network approval remains a separate policy.
|
|
42
|
+
4. Combine product rules, project rules, retrieved spans, mentions, current plan,
|
|
40
43
|
and conversation history.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
5. Call the model with the tools allowed by the current mode.
|
|
45
|
+
6. Evaluate every requested tool against workspace and permission policy.
|
|
46
|
+
7. Create a checkpoint before the first mutation in a tool batch.
|
|
47
|
+
8. Execute tools, emit events, and append their grounded results to the model
|
|
45
48
|
conversation.
|
|
46
|
-
|
|
49
|
+
9. Record a bounded, content-free token receipt for the model request and
|
|
47
50
|
persist actual provider counters separately from local estimates.
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
10. Continue until the model returns a final response or the turn limit is hit.
|
|
52
|
+
11. Before the first substantive write, run the warning-only repository reuse
|
|
50
53
|
gate. It binds current candidate/read evidence to the request, index
|
|
51
54
|
generation, and change sequence without retaining source text.
|
|
52
|
-
|
|
55
|
+
12. Capture content-free TS/JS function fingerprints from that pre-write index
|
|
53
56
|
generation. After the write succeeds, compare only newly added or at least
|
|
54
57
|
1.5x-expanded functions before refreshing changed index paths. Exact
|
|
55
58
|
normalized hashes identify Type-1/2 clones; winnowed 10-token shingles and
|
|
@@ -57,15 +60,33 @@
|
|
|
57
60
|
matrix calibrates threshold 0.55: unsuppressed Type-1/2 matches block the
|
|
58
61
|
existing completion gate, while Type-3 remains warning-only. Type-4 semantic
|
|
59
62
|
equivalence is explicitly outside this deterministic contract.
|
|
60
|
-
|
|
63
|
+
13. Run configured verification commands after changes. The completion gate accepts
|
|
61
64
|
only current successful test, typecheck, lint, build, check, or `git diff
|
|
62
65
|
--check` evidence recorded after the last mutation. An early final response
|
|
63
66
|
receives one bounded recovery turn; the runtime persists `verified`,
|
|
64
67
|
`unverified`, or `verification_failed` instead of trusting completion claims
|
|
65
68
|
in model text.
|
|
66
|
-
|
|
69
|
+
14. Persist the outcome and expose the same status through the TUI, text, JSON,
|
|
67
70
|
and JSONL surfaces.
|
|
68
71
|
|
|
72
|
+
## Long-session epoch ledger
|
|
73
|
+
|
|
74
|
+
A user-visible session has two different token boundaries:
|
|
75
|
+
|
|
76
|
+
- `agent.maxEpochTokens` (default 250,000) bounds one internal reasoning epoch.
|
|
77
|
+
- `agent.maxSessionTokens` (default 1,000,000) is the hard lifetime ceiling
|
|
78
|
+
across every epoch and resume.
|
|
79
|
+
|
|
80
|
+
Crossing the epoch boundary never clears lifetime usage or changes the session
|
|
81
|
+
id. The runner optionally compacts only when predicted reuse has positive net
|
|
82
|
+
savings, then persists a content-free handoff containing the Task Contract
|
|
83
|
+
criterion states and evidence references, unresolved failure circuits, changed
|
|
84
|
+
files, and last-run verification receipts. The next epoch starts with zero
|
|
85
|
+
epoch usage while the transcript and lifetime ledger remain intact. Generated
|
|
86
|
+
narrative is fallible; deterministic handoff facts and fresh tool evidence keep
|
|
87
|
+
precedence. Epochs, pending clarification, and their public reason codes are
|
|
88
|
+
backward-compatible optional session fields and contain no hidden reasoning.
|
|
89
|
+
|
|
69
90
|
## Interactive startup gate
|
|
70
91
|
|
|
71
92
|
New interactive sessions establish local context readiness before creating or
|
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.25`.
|
|
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.25.tgz`. The verifier writes
|
|
45
|
+
its SHA-256 to `artifacts/package/skein-code-cli-0.3.25.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.
|
|
@@ -124,6 +124,32 @@ the model explicitly calls `mcp_activate` for a configured server. The release
|
|
|
124
124
|
does not add per-server trust scopes, provider billing A/B, or Context
|
|
125
125
|
Compaction 2.0.
|
|
126
126
|
|
|
127
|
+
Version `0.3.24` completes the Context Compaction 2.0 engineering slice. Each
|
|
128
|
+
handoff rebuilds a deterministic facts envelope from the Task Contract,
|
|
129
|
+
working state, changed files, last-run verification, permission and failure
|
|
130
|
+
audit, retained artifact handles, and bounded older user corrections. Generated
|
|
131
|
+
narrative is fallible and optional; empty or contradictory output cannot erase
|
|
132
|
+
the authoritative facts, and the complete transcript remains persisted.
|
|
133
|
+
Automatic compaction calls the provider only when three predicted future prompt
|
|
134
|
+
reuses yield positive net estimated savings; explicit `/compact` remains a
|
|
135
|
+
manual override. Provider-reported or locally estimated compaction usage is
|
|
136
|
+
included in session totals and a separate content-free receipt. JSON/JSONL and
|
|
137
|
+
the Context Inspector expose the resulting decision without retaining prompt or
|
|
138
|
+
source text. Paid same-model task-success A/B remains required before closing
|
|
139
|
+
P0-E or making a provider-billing savings claim.
|
|
140
|
+
|
|
141
|
+
Version `0.3.25` separates one user-visible session into bounded internal
|
|
142
|
+
context epochs and a hard lifetime token ceiling. Epoch rotation preserves the
|
|
143
|
+
same session id and complete transcript while carrying content-free Contract,
|
|
144
|
+
unresolved-failure, changed-file, and verification evidence; an identical
|
|
145
|
+
successful tool call clears its recovered failure from future handoffs. The
|
|
146
|
+
Intent Sufficiency Gate sends clear requests directly to execution, routes
|
|
147
|
+
repository-inferable gaps to inspection, and persists one keyboard-answerable
|
|
148
|
+
question only for genuine user-owned product choices. TUI queues pause during
|
|
149
|
+
clarification and resume afterward; text, JSON, and JSONL expose the same
|
|
150
|
+
`needs_input` state. Real same-model success/token A/B remains an external
|
|
151
|
+
validation gate rather than an implied claim of this release.
|
|
152
|
+
|
|
127
153
|
### P0-D: Repository reuse and calibrated duplication enforcement
|
|
128
154
|
|
|
129
155
|
Version `0.3.14` added the prompt ladder and pre-write `ReuseReceipt`. Version
|
|
@@ -377,6 +403,18 @@ optional subprocess sandbox before any marketplace. Do not load arbitrary plugin
|
|
|
377
403
|
JavaScript in-process; package reusable extensions as data-only Skills/workflows
|
|
378
404
|
plus explicitly trusted MCP servers.
|
|
379
405
|
|
|
406
|
+
### Delivered: bounded long-session continuity and intent sufficiency
|
|
407
|
+
|
|
408
|
+
- Durable sessions now separate a 250k-token context epoch from a 1m-token
|
|
409
|
+
lifetime ceiling. Epoch handoffs retain Contract, failure, changed-file, and
|
|
410
|
+
verification receipts while preserving the complete transcript and session id.
|
|
411
|
+
- The Context inspector and structured session summary expose epoch/lifetime
|
|
412
|
+
state, compaction receipts, and handoff evidence without prompt or source text.
|
|
413
|
+
- Complex ambiguous public-API or UI choices pause as `needs_input`; simple
|
|
414
|
+
requests stay zero-question, repository facts route to inspection, and
|
|
415
|
+
permission approval remains independent. A numbered or custom answer resumes
|
|
416
|
+
the same logical run.
|
|
417
|
+
|
|
380
418
|
### P2: Memory Quality And User Control
|
|
381
419
|
|
|
382
420
|
Keep SQLite as the default durable engine. Improve the lifecycle around the
|
package/examples/config.yaml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skein-code/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.25",
|
|
4
4
|
"description": "A context-first, model-agnostic coding agent with an auditable terminal workspace.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,6 +16,15 @@
|
|
|
16
16
|
},
|
|
17
17
|
"skein": {
|
|
18
18
|
"releaseNotes": [
|
|
19
|
+
"Durable sessions now separate a 250k-token context epoch from a 1m-token lifetime ceiling without changing the session id or deleting transcript history",
|
|
20
|
+
"Content-free epoch handoffs preserve Task Contract criteria, unresolved failure circuits, changed files, and verification receipts across long runs",
|
|
21
|
+
"Intent Sufficiency routes clear requests to execution, repository-inferable gaps to inspection, and genuine product choices to one persisted clarification",
|
|
22
|
+
"TUI and headless output expose epoch, lifetime, and needs-input state; queued follow-ups pause and resume after keyboard clarification instead of becoming accidental answers",
|
|
23
|
+
"Successful identical tool calls clear matching historical failure signatures from later epoch handoffs",
|
|
24
|
+
"Context compaction now rebuilds authoritative task, working-state, verification, permission, failure, and artifact facts outside generated narrative",
|
|
25
|
+
"Automatic compaction runs only when three predicted prompt reuses produce positive net token savings while explicit compact commands remain available",
|
|
26
|
+
"Compaction provider usage is included in session totals with separate content-free actual or estimated receipts",
|
|
27
|
+
"Empty or lossy narratives cannot erase deterministic facts, and the complete persisted transcript remains unchanged",
|
|
19
28
|
"Normal chat startup now exposes a compact mcp_activate catalog instead of eagerly connecting MCP servers",
|
|
20
29
|
"MCP activation connects one selected server, discovers remote tools, and loads at most eight relevant schemas",
|
|
21
30
|
"Explicit MCP diagnostics can still connect eagerly while all MCP activation and remote calls remain network operations",
|