@skein-code/cli 0.3.25 → 0.3.27
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 +42 -7
- package/dist/cli.js +1411 -162
- package/dist/cli.js.map +1 -1
- package/docs/ARCHITECTURE.md +34 -18
- package/docs/NEXT_STEPS.md +56 -23
- package/docs/PRODUCT_BENCHMARK.md +5 -5
- package/docs/headless-output.schema.json +36 -0
- package/examples/config.yaml +30 -0
- package/package.json +14 -1
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -289,21 +289,37 @@ JavaScript plugins are intentionally unsupported because they would share the
|
|
|
289
289
|
CLI's full filesystem, environment, and process privileges.
|
|
290
290
|
|
|
291
291
|
MCP is the interoperability boundary for external executable capabilities. It
|
|
292
|
-
is disabled by default, removed from untrusted project configuration,
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
292
|
+
is disabled by default, removed from untrusted project configuration, treats
|
|
293
|
+
server annotations as untrusted, and applies argument, schema, result,
|
|
294
|
+
server-count, timeout, and transport limits. A common declarative capability
|
|
295
|
+
vocabulary describes source, version, tools, permission categories, network,
|
|
296
|
+
commands, paths, sensitive fields, background/process-tree effects, and
|
|
297
|
+
completion-evidence support. Tool definitions carry the same source,
|
|
298
|
+
activation, permission, and evidence metadata so `/tools` can distinguish the
|
|
299
|
+
built-in, memory, workflow, agent, and MCP surfaces.
|
|
300
|
+
|
|
301
|
+
Normal chat exposes three bounded controls: `mcp_search` and `mcp_inspect` read
|
|
302
|
+
only local redacted manifests; `mcp_activate` connects only a manifest whose
|
|
303
|
+
workspace-bound SHA-256 fingerprint the user trusted. The model cannot write
|
|
304
|
+
the trust store. Remote discovery stays true-lazy and activation registers at
|
|
305
|
+
most eight query-relevant schemas. Once a manifest names tools, undeclared
|
|
306
|
+
remote schemas are rejected. Disable and revoke decisions persist and unload
|
|
307
|
+
registered adapters. Optional server failures remain isolated; only an
|
|
308
|
+
explicitly required, trusted server is checked during runtime initialization
|
|
309
|
+
and allowed to block it.
|
|
310
|
+
|
|
311
|
+
Every MCP call retains `network` permission even for stdio. Declared write,
|
|
312
|
+
shell, and Git effects add rather than replace permission categories. Sensitive
|
|
313
|
+
argument fields are redacted before terminal, TUI, JSON, or approval events.
|
|
314
|
+
External mutations receive complete change tracking only when Skein created the
|
|
315
|
+
pre-call checkpoint and the server returns that exact id with workspace-valid
|
|
316
|
+
changed files, artifact receipts, and completion evidence. Other mutation
|
|
317
|
+
results set tracking to `unresolved`, preventing an unsupported completion
|
|
318
|
+
claim.
|
|
319
|
+
|
|
320
|
+
A configured stdio server is still an external program with the user's
|
|
321
|
+
operating-system privileges; cwd and environment validation are not a process
|
|
322
|
+
sandbox. Marketplace-style packages must compose data-only Skills, workflows,
|
|
323
|
+
profiles, and explicitly trusted MCP servers rather than load arbitrary code
|
|
324
|
+
into the Skein process. An optional OS/container subprocess sandbox remains a
|
|
325
|
+
future hardening layer.
|
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.27`.
|
|
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.27.tgz`. The verifier writes
|
|
45
|
+
its SHA-256 to `artifacts/package/skein-code-cli-0.3.27.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.
|
|
@@ -99,15 +99,13 @@ firewall policies while requiring complete evidence and recovery coverage.
|
|
|
99
99
|
The replay reports a 36.7% estimated-input reduction; this is a deterministic
|
|
100
100
|
budget measurement, not a provider billing or task-success claim.
|
|
101
101
|
|
|
102
|
-
MCP tool definitions
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
Token Ledger receipts record the deferred count
|
|
108
|
-
|
|
109
|
-
existing boundary, and explicit diagnostics such as `skein mcp status` still
|
|
110
|
-
connect eagerly by design.
|
|
102
|
+
MCP tool definitions use progressive disclosure. Version `0.3.23` exposed a
|
|
103
|
+
compact `mcp_activate` catalog instead of connecting every server, then loaded
|
|
104
|
+
at most eight request-relevant schemas. Version `0.3.27` adds the preceding
|
|
105
|
+
local `mcp_search` and `mcp_inspect` stages plus user-owned fingerprint trust;
|
|
106
|
+
`skein mcp status` is now no-connect. Selected schemas remain stable for the
|
|
107
|
+
current run, Token Ledger receipts record the deferred count, MCP calls retain
|
|
108
|
+
the network boundary, and hidden tool calls remain rejected.
|
|
111
109
|
|
|
112
110
|
Version `0.3.22` normalizes provider-reported cache and reasoning usage across
|
|
113
111
|
streaming and non-streaming OpenAI, Anthropic, and Gemini responses. Token
|
|
@@ -150,6 +148,29 @@ clarification and resume afterward; text, JSON, and JSONL expose the same
|
|
|
150
148
|
`needs_input` state. Real same-model success/token A/B remains an external
|
|
151
149
|
validation gate rather than an implied claim of this release.
|
|
152
150
|
|
|
151
|
+
### Phase 2: First-run, permission, recovery, review, and headless contracts (complete in 0.3.26)
|
|
152
|
+
|
|
153
|
+
Version `0.3.26` makes the first-run screen explicit that the primary agent
|
|
154
|
+
uses API credentials while provider subscription sessions and signed-in coding
|
|
155
|
+
CLIs remain separate delegated tools. Permission prompts now show the runtime
|
|
156
|
+
policy reason, redacted target, working directory, category risk, and all four
|
|
157
|
+
keyboard outcomes without leaking secrets.
|
|
158
|
+
|
|
159
|
+
The interactive Recovery Center joins last-run status, content-free failure
|
|
160
|
+
repair hints, changed files, checkpoints, diff, audit, rollback, bounded retry,
|
|
161
|
+
and safe resume. `/review` fixes working-tree, commit, or branch scope, forces
|
|
162
|
+
read-only runner capabilities even from Build mode, and injects a redacted
|
|
163
|
+
content-free evidence bundle as ephemeral turn instructions rather than user
|
|
164
|
+
transcript. Pending clarifications must still be answered directly and cannot
|
|
165
|
+
be consumed by a recovery command.
|
|
166
|
+
|
|
167
|
+
JSON and JSONL terminal records follow `docs/headless-output.schema.json` v1
|
|
168
|
+
and carry stable statuses plus exit codes for completed/verified, runtime error,
|
|
169
|
+
needs input, unverified, verification failed, blocked, cancelled, max turns,
|
|
170
|
+
and token budget. Text and TUI surfaces provide matching actionable stop and
|
|
171
|
+
recovery guidance. Responsive list clipping keeps the Recovery Center bounded
|
|
172
|
+
in narrow and short terminals.
|
|
173
|
+
|
|
153
174
|
### P0-D: Repository reuse and calibrated duplication enforcement
|
|
154
175
|
|
|
155
176
|
Version `0.3.14` added the prompt ladder and pre-write `ReuseReceipt`. Version
|
|
@@ -391,17 +412,29 @@ Implementation progress:
|
|
|
391
412
|
Team Run compatibility. Parallel writers, external CLI writer mode, cost
|
|
392
413
|
controls, Gemini CLI, and optional tmux/iTerm pane hosts remain next.
|
|
393
414
|
|
|
394
|
-
###
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
415
|
+
### P1: MCP capability trust (complete in 0.3.27)
|
|
416
|
+
|
|
417
|
+
Version `0.3.27` completes local `search → inspect → trust → activate` for MCP.
|
|
418
|
+
Redacted manifests cover source, version, tools, permission categories,
|
|
419
|
+
network, commands, paths, sensitive fields, background/process-tree effects,
|
|
420
|
+
and completion-evidence support. Trust is bound to the exact manifest
|
|
421
|
+
fingerprint and workspace; the model cannot grant it. Persistent disable and
|
|
422
|
+
revoke unload activated schemas. Optional server failures remain isolated and
|
|
423
|
+
only explicitly required servers may block initialization.
|
|
424
|
+
|
|
425
|
+
Declared permissions are additive to the non-removable network boundary, and
|
|
426
|
+
server annotations cannot lower them. A named manifest rejects undeclared
|
|
427
|
+
server-injected tools. Text, JSON, and TUI events redact declared sensitive
|
|
428
|
+
arguments. External mutations stay completion-unresolved unless Skein's own
|
|
429
|
+
checkpoint id, workspace-valid changed files, artifact receipts, and completion
|
|
430
|
+
evidence round-trip successfully. Fixed tests cover malformed schemas,
|
|
431
|
+
injection, trust invalidation, disable/revoke, required degradation, schema
|
|
432
|
+
token savings, and top-tool selection. These are deterministic contract tests,
|
|
433
|
+
not a general real-model accuracy claim.
|
|
434
|
+
|
|
435
|
+
Future extension work may add an optional subprocess sandbox and data-only
|
|
436
|
+
bundles that compose Skills, workflows, profiles, and trusted MCP servers. It
|
|
437
|
+
must not load arbitrary plugin JavaScript in-process.
|
|
405
438
|
|
|
406
439
|
### Delivered: bounded long-session continuity and intent sufficiency
|
|
407
440
|
|
|
@@ -20,12 +20,12 @@ product surfaces.
|
|
|
20
20
|
|
|
21
21
|
| Area | Mainstream signal | Skein today | Product implication |
|
|
22
22
|
| --- | --- | --- | --- |
|
|
23
|
-
| Context | Auggie automatically indexes projects and offers context-aware interactive and print modes. Its MCP Tool Search avoids loading every remote schema up front. See [Auggie overview](https://docs.augmentcode.com/cli/overview) and [integrations](https://docs.augmentcode.com/cli/integrations). | Local BM25/path/symbol retrieval with language-aware chunks, current-file freshness checks, diversity-aware token packing, progressive Skills, and hard token caps.
|
|
23
|
+
| Context | Auggie automatically indexes projects and offers context-aware interactive and print modes. Its MCP Tool Search avoids loading every remote schema up front. See [Auggie overview](https://docs.augmentcode.com/cli/overview) and [integrations](https://docs.augmentcode.com/cli/integrations). | Local BM25/path/symbol retrieval with language-aware chunks, current-file freshness checks, diversity-aware token packing, progressive Skills, and hard token caps. MCP uses local `search → inspect → trust → activate`; remote `listTools` stays lazy and at most eight relevant schemas load. Activation receipts compare eager and selected schema estimates plus the lexical top match. | Keep the deterministic schema/selection fixture and add real-model tool-choice evaluation before claiming general accuracy gains. |
|
|
24
24
|
| Tool result economy | FastCtx argues for structured file/search tools, explicit pagination, bounded output tiers, and persistent background-job logs so the model spends fewer turns on shell mechanics. See the [FastCtx repository](https://github.com/yc-duan/fastctx) and its [LINUX DO introduction](https://linux.do/t/topic/2612425). These are design signals, not independent evidence that every model becomes more accurate. | Native tools already use closed schemas and permission/checkpoint boundaries. Oversized results now use a dynamic token budget, head/tail receipts, source-truncation telemetry, and redacted session-scoped local readback. Single-file UTF-8 reads and foreground-only shell execution remain narrower than FastCtx. | Keep FastCtx optional through MCP instead of duplicating the default kernel. Add measured read/list/search continuation and batch reading before considering persistent background jobs. |
|
|
25
25
|
| Workflow modes | Claude Code documents isolated subagents, agent teams, hooks, code intelligence, Skills, MCP, and plugins in one extension model. See [Claude Code extensions](https://code.claude.com/docs/en/features-overview). Copilot CLI exposes Plan and Autopilot modes. See [Copilot CLI](https://github.com/features/copilot/cli). | Ask and Build modes exist; Ask is read-only but does not produce a named approval-ready plan. | Add an explicit Plan mode. Keep it read-only and require approval before Build. |
|
|
26
26
|
| Code intelligence | Claude Code advertises language-server-backed symbol navigation and live type errors. | Retrieval is lexical/BM25/path/symbol index based; no LSP diagnostics or rename graph. | Add an optional LSP adapter after storage and scheduler foundations. |
|
|
27
27
|
| Parallel work | Claude documents isolated subagents and agent teams; Copilot CLI offers background delegation and fleet-style parallel work. | Routed multi-model councils share bounded reports, observe/guard/strict task-budget policies, reviewer acceptance/revision, and a responsive Team Cockpit. The main agent remains the only writer. | Add worktree-isolated writers, deterministic integration, and conflict/rollback UX without weakening the visible review gate. |
|
|
28
|
-
| Trust and execution | Gemini CLI documents sandboxing and trusted folders; Claude exposes lifecycle hooks and permission events. See the [Gemini CLI repository](https://github.com/google-gemini/gemini-cli) and [Claude hooks](https://code.claude.com/docs/en/hooks). | Category permissions, project trust, checkpoints, hooks,
|
|
28
|
+
| Trust and execution | Gemini CLI documents sandboxing and trusted folders; Claude exposes lifecycle hooks and permission events. See the [Gemini CLI repository](https://github.com/google-gemini/gemini-cli) and [Claude hooks](https://code.claude.com/docs/en/hooks). | Category permissions, project trust, checkpoints, hooks, audit trails, per-manifest MCP trust review, persistent disable/revoke, sensitive-field redaction, and unsupported-mutation evidence degradation are present. Process sandboxing remains incomplete. | Add an optional OS/container sandbox without weakening manifest, permission, or completion-evidence gates. |
|
|
29
29
|
| Collaboration | Auggie supports integrations and conversation export; Copilot supports GitHub-native MCP and shareable workflows. | Session export and resumability are local; no shareable artifact or review bundle. | Add a deterministic redacted session/review bundle before any hosted sharing. |
|
|
30
30
|
| Distribution and recovery | Competitors provide guided installation, auth, update channels, and workflow-specific entry points. | Package/release verification is reproducible; `skein doctor` reports project/user namespace and interrupted-operation state, while shared live-process leases and exclusive mutation leases make migration, rollback, and recovery crash-safe without deleting changed canonical data. | Add capability review and upgrade UX, then define the measured legacy-alias window. |
|
|
31
31
|
|
|
@@ -43,9 +43,9 @@ product surfaces.
|
|
|
43
43
|
quarantining the canonical copy; `--recover` handles interrupted operations;
|
|
44
44
|
`--home` covers user-level state. Shared leases cover live managed writers,
|
|
45
45
|
while namespace mutation requires an exclusive crash-released lease.
|
|
46
|
-
4. **P1 MCP trust hardening:**
|
|
47
|
-
activation telemetry,
|
|
48
|
-
|
|
46
|
+
4. **P1 MCP trust hardening:** per-server review, capability manifests,
|
|
47
|
+
activation telemetry, persistent revoke, and required-server isolation are
|
|
48
|
+
delivered; optional stdio sandboxing remains.
|
|
49
49
|
5. **P1 scheduler and isolation:** retain the shipped task-budget telemetry and
|
|
50
50
|
reviewer loop, then add cancellation propagation, deterministic integration,
|
|
51
51
|
and single-writer/worktree boundaries.
|
|
@@ -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
|
@@ -58,3 +58,33 @@ ui:
|
|
|
58
58
|
color: true
|
|
59
59
|
compact: false
|
|
60
60
|
theme: auto
|
|
61
|
+
|
|
62
|
+
# External capabilities are disabled until both configuration and the separate
|
|
63
|
+
# workspace-bound manifest trust review are explicit. Use:
|
|
64
|
+
# skein mcp search docs
|
|
65
|
+
# skein mcp inspect docs
|
|
66
|
+
# skein mcp trust docs
|
|
67
|
+
# skein mcp activate docs search documentation
|
|
68
|
+
mcp:
|
|
69
|
+
enabled: false
|
|
70
|
+
connectTimeoutMs: 12000
|
|
71
|
+
toolTimeoutMs: 60000
|
|
72
|
+
servers:
|
|
73
|
+
docs:
|
|
74
|
+
enabled: false
|
|
75
|
+
required: false
|
|
76
|
+
transport: http
|
|
77
|
+
url: https://docs.example.com/mcp
|
|
78
|
+
description: Search approved documentation.
|
|
79
|
+
version: 1.0.0
|
|
80
|
+
tools:
|
|
81
|
+
- name: search
|
|
82
|
+
description: Search the approved documentation corpus.
|
|
83
|
+
permissions: [read]
|
|
84
|
+
network: [https://docs.example.com]
|
|
85
|
+
commands: []
|
|
86
|
+
paths: []
|
|
87
|
+
sensitiveFields: [token]
|
|
88
|
+
background: false
|
|
89
|
+
processTree: false
|
|
90
|
+
completionEvidence: none
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skein-code/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.27",
|
|
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,19 @@
|
|
|
16
16
|
},
|
|
17
17
|
"skein": {
|
|
18
18
|
"releaseNotes": [
|
|
19
|
+
"MCP now follows a no-network search and inspect review before explicit workspace-bound manifest trust and lazy activation",
|
|
20
|
+
"Declarative capability manifests expose redacted source, version, tools, permissions, network, command, path, sensitive-field, process, and completion-evidence effects",
|
|
21
|
+
"Persistent disable and revoke unload active remote schemas while manifest fingerprint changes fail closed to untrusted",
|
|
22
|
+
"Server annotations cannot lower local permissions, named manifests reject injected undeclared schemas, and optional server failures remain isolated",
|
|
23
|
+
"Only explicitly required trusted MCP servers may block startup, while status inspection no longer connects optional servers",
|
|
24
|
+
"Sensitive MCP arguments are redacted from terminal, TUI, JSON, and approval events; unsupported external mutations remain completion-unresolved",
|
|
25
|
+
"Explain and review intents expose smaller built-in schema sets, and MCP activation reports deterministic eager-versus-loaded schema estimates plus top-match evidence",
|
|
26
|
+
"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",
|
|
27
|
+
"Permission prompts show the policy reason, redacted target, working directory, category risk, and explicit once, session, deny, and stop choices",
|
|
28
|
+
"The Recovery Center joins last-run state, failure repair hints, changed files, checkpoints, diff, audit, rollback, retry, and safe session resume",
|
|
29
|
+
"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",
|
|
30
|
+
"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",
|
|
31
|
+
"Short terminal viewports clip long lists without overflow and pending clarifications cannot be consumed by recovery commands",
|
|
19
32
|
"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
33
|
"Content-free epoch handoffs preserve Task Contract criteria, unresolved failure circuits, changed files, and verification receipts across long runs",
|
|
21
34
|
"Intent Sufficiency routes clear requests to execution, repository-inferable gaps to inspection, and genuine product choices to one persisted clarification",
|