@skein-code/cli 0.3.24 → 0.3.26
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 +39 -2
- package/dist/cli.js +1114 -169
- package/dist/cli.js.map +1 -1
- package/docs/ARCHITECTURE.md +32 -11
- package/docs/NEXT_STEPS.md +50 -3
- package/docs/headless-output.schema.json +36 -0
- package/examples/config.yaml +2 -1
- package/package.json +12 -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.26`.
|
|
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.26.tgz`. The verifier writes
|
|
45
|
+
its SHA-256 to `artifacts/package/skein-code-cli-0.3.26.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.
|
|
@@ -138,6 +138,41 @@ the Context Inspector expose the resulting decision without retaining prompt or
|
|
|
138
138
|
source text. Paid same-model task-success A/B remains required before closing
|
|
139
139
|
P0-E or making a provider-billing savings claim.
|
|
140
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
|
+
|
|
153
|
+
### Phase 2: First-run, permission, recovery, review, and headless contracts (complete in 0.3.26)
|
|
154
|
+
|
|
155
|
+
Version `0.3.26` makes the first-run screen explicit that the primary agent
|
|
156
|
+
uses API credentials while provider subscription sessions and signed-in coding
|
|
157
|
+
CLIs remain separate delegated tools. Permission prompts now show the runtime
|
|
158
|
+
policy reason, redacted target, working directory, category risk, and all four
|
|
159
|
+
keyboard outcomes without leaking secrets.
|
|
160
|
+
|
|
161
|
+
The interactive Recovery Center joins last-run status, content-free failure
|
|
162
|
+
repair hints, changed files, checkpoints, diff, audit, rollback, bounded retry,
|
|
163
|
+
and safe resume. `/review` fixes working-tree, commit, or branch scope, forces
|
|
164
|
+
read-only runner capabilities even from Build mode, and injects a redacted
|
|
165
|
+
content-free evidence bundle as ephemeral turn instructions rather than user
|
|
166
|
+
transcript. Pending clarifications must still be answered directly and cannot
|
|
167
|
+
be consumed by a recovery command.
|
|
168
|
+
|
|
169
|
+
JSON and JSONL terminal records follow `docs/headless-output.schema.json` v1
|
|
170
|
+
and carry stable statuses plus exit codes for completed/verified, runtime error,
|
|
171
|
+
needs input, unverified, verification failed, blocked, cancelled, max turns,
|
|
172
|
+
and token budget. Text and TUI surfaces provide matching actionable stop and
|
|
173
|
+
recovery guidance. Responsive list clipping keeps the Recovery Center bounded
|
|
174
|
+
in narrow and short terminals.
|
|
175
|
+
|
|
141
176
|
### P0-D: Repository reuse and calibrated duplication enforcement
|
|
142
177
|
|
|
143
178
|
Version `0.3.14` added the prompt ladder and pre-write `ReuseReceipt`. Version
|
|
@@ -391,6 +426,18 @@ optional subprocess sandbox before any marketplace. Do not load arbitrary plugin
|
|
|
391
426
|
JavaScript in-process; package reusable extensions as data-only Skills/workflows
|
|
392
427
|
plus explicitly trusted MCP servers.
|
|
393
428
|
|
|
429
|
+
### Delivered: bounded long-session continuity and intent sufficiency
|
|
430
|
+
|
|
431
|
+
- Durable sessions now separate a 250k-token context epoch from a 1m-token
|
|
432
|
+
lifetime ceiling. Epoch handoffs retain Contract, failure, changed-file, and
|
|
433
|
+
verification receipts while preserving the complete transcript and session id.
|
|
434
|
+
- The Context inspector and structured session summary expose epoch/lifetime
|
|
435
|
+
state, compaction receipts, and handoff evidence without prompt or source text.
|
|
436
|
+
- Complex ambiguous public-API or UI choices pause as `needs_input`; simple
|
|
437
|
+
requests stay zero-question, repository facts route to inspection, and
|
|
438
|
+
permission approval remains independent. A numbered or custom answer resumes
|
|
439
|
+
the same logical run.
|
|
440
|
+
|
|
394
441
|
### P2: Memory Quality And User Control
|
|
395
442
|
|
|
396
443
|
Keep SQLite as the default durable engine. Improve the lifecycle around the
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://skein.dev/schemas/headless-output-v1.json",
|
|
4
|
+
"title": "Skein headless terminal record v1",
|
|
5
|
+
"description": "The terminal object emitted by --output-format json or as the final line of --output-format stream-json.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schemaVersion", "type", "ok", "status", "exitCode", "reason"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": {"const": 1},
|
|
10
|
+
"type": {"enum": ["result", "session", "final"]},
|
|
11
|
+
"ok": {"type": "boolean"},
|
|
12
|
+
"status": {
|
|
13
|
+
"enum": [
|
|
14
|
+
"completed",
|
|
15
|
+
"verified",
|
|
16
|
+
"needs_input",
|
|
17
|
+
"unverified",
|
|
18
|
+
"verification_failed",
|
|
19
|
+
"blocked",
|
|
20
|
+
"cancelled",
|
|
21
|
+
"max_turns",
|
|
22
|
+
"token_budget",
|
|
23
|
+
"error"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"exitCode": {"type": "integer", "minimum": 0, "maximum": 8},
|
|
27
|
+
"reason": {"type": "string", "minLength": 1},
|
|
28
|
+
"response": {"type": "string"},
|
|
29
|
+
"error": {"type": "string"},
|
|
30
|
+
"session": {"type": "object"},
|
|
31
|
+
"completion": {"type": "object"},
|
|
32
|
+
"context": {"type": "object"},
|
|
33
|
+
"tools": {"type": "array"}
|
|
34
|
+
},
|
|
35
|
+
"additionalProperties": true
|
|
36
|
+
}
|
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.26",
|
|
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,17 @@
|
|
|
16
16
|
},
|
|
17
17
|
"skein": {
|
|
18
18
|
"releaseNotes": [
|
|
19
|
+
"First-run setup now states that the primary agent needs API credentials and that provider subscriptions or signed-in coding CLIs are separate delegated tools",
|
|
20
|
+
"Permission prompts show the policy reason, redacted target, working directory, category risk, and explicit once, session, deny, and stop choices",
|
|
21
|
+
"The Recovery Center joins last-run state, failure repair hints, changed files, checkpoints, diff, audit, rollback, retry, and safe session resume",
|
|
22
|
+
"Read-only review commands pin working-tree, commit, or branch scope and inject a content-free redacted evidence bundle without storing it in the user transcript",
|
|
23
|
+
"JSON and JSONL terminal records now follow the published headless v1 schema with stable completed, verification, input, blocked, cancellation, turn, token, and error exit codes",
|
|
24
|
+
"Short terminal viewports clip long lists without overflow and pending clarifications cannot be consumed by recovery commands",
|
|
25
|
+
"Durable sessions now separate a 250k-token context epoch from a 1m-token lifetime ceiling without changing the session id or deleting transcript history",
|
|
26
|
+
"Content-free epoch handoffs preserve Task Contract criteria, unresolved failure circuits, changed files, and verification receipts across long runs",
|
|
27
|
+
"Intent Sufficiency routes clear requests to execution, repository-inferable gaps to inspection, and genuine product choices to one persisted clarification",
|
|
28
|
+
"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",
|
|
29
|
+
"Successful identical tool calls clear matching historical failure signatures from later epoch handoffs",
|
|
19
30
|
"Context compaction now rebuilds authoritative task, working-state, verification, permission, failure, and artifact facts outside generated narrative",
|
|
20
31
|
"Automatic compaction runs only when three predicted prompt reuses produce positive net token savings while explicit compact commands remain available",
|
|
21
32
|
"Compaction provider usage is included in session totals with separate content-free actual or estimated receipts",
|