sneakoscope 2.0.18 โ 3.0.1
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 +127 -71
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/crates/sks-core/src/main.rs +1 -1
- package/dist/.sks-build-stamp.json +4 -4
- package/dist/bin/sks.js +1 -1
- package/dist/commands/mad-sks.js +2 -0
- package/dist/commands/zellij.js +58 -1
- package/dist/core/agents/agent-scheduler.js +32 -24
- package/dist/core/agents/native-cli-session-swarm.js +22 -2
- package/dist/core/codex-app/codex-app-handoff.js +30 -9
- package/dist/core/codex-app/codex-app-launcher.js +103 -0
- package/dist/core/codex-control/codex-0138-capability.js +42 -4
- package/dist/core/codex-control/codex-0139-capability.js +102 -0
- package/dist/core/codex-control/codex-model-capabilities.js +25 -4
- package/dist/core/codex-control/codex-model-metadata.js +91 -0
- package/dist/core/codex-plugins/codex-plugin-cache.js +38 -0
- package/dist/core/codex-plugins/codex-plugin-diff.js +73 -0
- package/dist/core/codex-plugins/codex-plugin-json.js +35 -11
- package/dist/core/commands/mad-sks-command.js +8 -0
- package/dist/core/commands/naruto-command.js +29 -0
- package/dist/core/commands/qa-loop-command.js +41 -6
- package/dist/core/fsx.js +1 -1
- package/dist/core/image/image-artifact-path-contract.js +2 -0
- package/dist/core/image/image-artifact-registry.js +33 -0
- package/dist/core/image-ux-review/imagegen-adapter.js +27 -16
- package/dist/core/pipeline-internals/runtime-core.js +4 -2
- package/dist/core/qa-loop/qa-loop-app-handoff-confirmation.js +51 -0
- package/dist/core/qa-loop/qa-loop-budget-policy.js +1 -1
- package/dist/core/qa-loop.js +44 -3
- package/dist/core/release/release-gate-cache-v2.js +47 -5
- package/dist/core/usage/codex-account-usage.js +77 -16
- package/dist/core/version.js +1 -1
- package/dist/core/zellij/zellij-slot-pane-renderer.js +5 -2
- package/dist/core/zellij/zellij-slot-telemetry.js +65 -12
- package/dist/core/zellij/zellij-ui-mode.js +8 -1
- package/dist/core/zellij/zellij-update.js +307 -0
- package/dist/core/zellij/zellij-worker-pane-manager.js +211 -145
- package/package.json +23 -2
- package/dist/core/naruto/naruto-work-stealing.js +0 -11
- package/dist/core/zellij/zellij-right-column-layout-proof.js +0 -42
package/README.md
CHANGED
|
@@ -1,10 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# ๐ญ Sneakoscope Codex
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**Proof-first Codex orchestration โ massive parallel agent swarms you can actually watch, audit, and trust.**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
[](https://www.npmjs.com/package/sneakoscope)
|
|
8
|
+
[](#requirements)
|
|
9
|
+
[](#license)
|
|
10
|
+
[](#mad-zellij-launch)
|
|
11
|
+
|
|
12
|
+
`npm i -g sneakoscope` โ `sks --mad` โ watch up to **100 shadow-clone workers** code in parallel,<br/>each in a live Zellij pane, every claim backed by Completion Proof.
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
Sneakoscope Codex (`sks`) is a Codex CLI/App harness that makes repeatable Codex work **auditable**. It does not try to clone every other harness. It focuses on one thing relentlessly: Codex work becomes visual-evidence-bound, safety-gated, and reproducible through Completion Proof.
|
|
19
|
+
|
|
20
|
+
| | What you get |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| ๐ฅ **`$Naruto` swarm** | Up to 100 parallel clone workers behind a hardware-safe concurrency governor, lease-based parallel writes, and a scheduler that backfills idle slots while runnable work remains |
|
|
23
|
+
| ๐ฅ๏ธ **Live Zellij cockpit** | Workers stack vertically as native Zellij stacked panes; each pane streams heartbeat, current file, tool events, and stdout tails every second |
|
|
24
|
+
| ๐งพ **Completion Proof** | Every serious route ends with schema-backed proof artifacts โ no "trust me, it's done" |
|
|
25
|
+
| ๐ก๏ธ **Safety gates** | DB/migration/destructive operations stay gated, 190+ release gate scripts, Honest Mode |
|
|
26
|
+
| ๐ผ๏ธ **Visual evidence** | Image Voxel TriWiki plus `$imagegen`/`gpt-image-2`-bound visual review flows |
|
|
27
|
+
|
|
28
|
+

|
|
8
29
|
|
|
9
30
|
## LLM Init Prompt for Hermes / OpenClaw Agent Builders
|
|
10
31
|
|
|
@@ -12,22 +33,20 @@ SKS does not try to clone every other harness. It focuses on one thing: making C
|
|
|
12
33
|
Set up this agent project with Sneakoscope Codex. Use [[mandarange/Sneakoscope-Codex](https://github.com/mandarange/Sneakoscope-Codex)] as the repo reference and [npm i -g sneakoscope] as the recommended global install command, then run the appropriate `sks` setup, doctor, Codex App, and proof checks for this repo. Keep generated SKS state out of source control unless documented, and record every version-facing change in CHANGELOG.md.
|
|
13
34
|
```
|
|
14
35
|
|
|
15
|
-
|
|
36
|
+
## ๐ Current Release
|
|
16
37
|
|
|
17
|
-
|
|
38
|
+
SKS **3.0.1** tracks Codex CLI `rust-v0.139.0`: capability detection for code-mode web search, preserved `oneOf`/`allOf` tool schemas, plugin marketplace `source`/cached catalog, the `-P` sandbox profile alias, and the multi-agent v2 `interrupt_agent` rename (accepted alongside `close_agent` in cockpit event classification). See [docs/codex-0.139-compat.md](docs/codex-0.139-compat.md).
|
|
18
39
|
|
|
19
|
-
SKS
|
|
40
|
+
SKS 3.0.0 was the parallel-runtime stabilization release. The whole live-swarm experience โ what you actually *see* while 5, 20, or 100 workers run โ was rebuilt and proven end-to-end.
|
|
20
41
|
|
|
21
|
-
What changed:
|
|
42
|
+
What changed in 3.0.0:
|
|
22
43
|
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
- Codex
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
- Codex account token usage can be recorded from an app-server usage endpoint, and QA budget policy reduces remote concurrency near limits while preserving GPT final review.
|
|
30
|
-
- Naruto final pass status now depends on the parallel runtime proof, and Mad-DB post-tool lifecycle recording handles MCP `isError` failures.
|
|
44
|
+
- **Slot panes are finally alive.** The watch renderer froze for entire missions because the telemetry snapshot cache never invalidated; snapshot reads are now mtime-aware, multi-process flushes merge instead of clobbering each other, and the disk `updated_at` stays authoritative for stale detection.
|
|
45
|
+
- **One SLOTS column, vertical stack.** Concurrent workers used to race anchor creation and split the screen into N side-by-side columns. Anchor + worker pane creation is serialized per session, and workers join a native Zellij stacked-pane group (`new-pane --stacked`, opt out with `SKS_ZELLIJ_WORKER_STACKED=0`).
|
|
46
|
+
- **Live renderer is the default worker pane.** `full-debug` showed nothing until worker exit (workers run with `--json`); the default `compact-slots` renderer streams heartbeat, current file, tool events, and stdout tails every second.
|
|
47
|
+
- **Zellij stays current like Codex does.** `sks --mad` / `sks naruto run` offer a `[Y/n]` upgrade to the latest stable Zellij (GitHub releases lookup, 6h cache), plus an explicit `sks zellij update [--yes]` subcommand and `SKS_SKIP_ZELLIJ_UPDATE` escape.
|
|
48
|
+
- **Faster, honest dispatch.** Scheduler batch telemetry writes run concurrently per batch instead of serializing two file writes per worker; naruto backpressure throttling (50%/25% under host pressure) is reported in the run header instead of staying silent.
|
|
49
|
+
- **Wired, not decorative.** The naruto finalizer gate and the agent message bus now run in production paths; dead swarm code (`naruto-work-stealing`, `zellij-right-column-layout-proof`) was removed.
|
|
31
50
|
|
|
32
51
|
Quick checks:
|
|
33
52
|
|
|
@@ -62,7 +81,7 @@ npm run codex-control:all-pipelines
|
|
|
62
81
|
|
|
63
82
|
Broader release checks still live behind `npm run release:check`. Detailed release history is in [CHANGELOG.md](CHANGELOG.md), and release readiness is tracked in [docs/release-readiness.md](docs/release-readiness.md).
|
|
64
83
|
|
|
65
|
-
## Parallelism, UX, And Integrations
|
|
84
|
+
## ๐ฅ Parallelism, UX, And Integrations
|
|
66
85
|
|
|
67
86
|
- **Extreme parallel fan-out (`$Naruto` / native agents).** Each clone is a separate CLI worker that spends almost all of its wall-clock awaiting the Codex API, so live concurrency scales by **memory and the provider rate limit, not CPU cores** โ a capable host can run up to 100 workers in parallel. The 429/rate-limit backoff is handled by the centralized responses retry policy. Tune it with `SKS_NARUTO_MAX_CONCURRENCY` (hard cap, 1โ100), `SKS_NARUTO_GB_PER_WORKER` (memory budget per worker), and `SKS_NARUTO_MIN_CONCURRENCY` (low-free-memory floor).
|
|
68
87
|
|
|
@@ -88,7 +107,7 @@ Broader release checks still live behind `npm run release:check`. Detailed relea
|
|
|
88
107
|
|
|
89
108
|
- **CLI-only SKS update notices.** Codex App hooks no longer stop normal work to ask for an SKS update. CLI launch surfaces such as `sks --mad` print a non-blocking latest-version notice, `sks update-check` / `sks update check` show the explicit status, and `sks doctor --fix` runs the guarded global SKS update path before repair.
|
|
90
109
|
|
|
91
|
-
## Retention And Cleanup
|
|
110
|
+
## ๐งน Retention And Cleanup
|
|
92
111
|
|
|
93
112
|
SKS keeps durable learning context separate from disposable route work files. Durable context includes `.sneakoscope/memory/**`, shared TriWiki records, `.sneakoscope/wiki/context-pack.json`, wrongness memory, image voxels, avoidance rules, route Completion Proof, trust reports, evidence indexes, reflections, and agent proof summaries. These files are treated as the long-term learning and audit chain.
|
|
94
113
|
|
|
@@ -103,68 +122,105 @@ npm run retention:cleanup-safety
|
|
|
103
122
|
|
|
104
123
|
The cleanup contract is policy-backed in `.sneakoscope/policy.json`, but the default posture is now immediate cleanup for short-lived temp files while preserving long-term SKS learning and proof artifacts.
|
|
105
124
|
|
|
106
|
-
## Documentation
|
|
125
|
+
## ๐ Documentation
|
|
126
|
+
|
|
127
|
+
<details>
|
|
128
|
+
<summary><b>Core concepts & architecture</b> โ proof, trust, pipeline design</summary>
|
|
107
129
|
|
|
108
130
|
- Completion Proof: [docs/completion-proof.md](docs/completion-proof.md)
|
|
109
|
-
- TypeScript architecture: [docs/typescript-architecture.md](docs/typescript-architecture.md)
|
|
110
131
|
- Trust Kernel: [docs/trust-kernel.md](docs/trust-kernel.md)
|
|
132
|
+
- Pipeline architecture: [docs/pipeline-architecture.md](docs/pipeline-architecture.md)
|
|
133
|
+
- TypeScript architecture: [docs/typescript-architecture.md](docs/typescript-architecture.md)
|
|
134
|
+
- Runtime truth matrix: [docs/runtime-truth-matrix.md](docs/runtime-truth-matrix.md)
|
|
135
|
+
- Fake vs real proof policy: [docs/fake-vs-real-proof-policy.md](docs/fake-vs-real-proof-policy.md)
|
|
136
|
+
- Core dominance: [docs/core-dominance.md](docs/core-dominance.md)
|
|
137
|
+
- Permission kernel: [docs/permission-kernel.md](docs/permission-kernel.md)
|
|
138
|
+
- Immutable harness guard: [docs/immutable-harness-guard.md](docs/immutable-harness-guard.md)
|
|
139
|
+
- Package boundary: [docs/package-boundary.md](docs/package-boundary.md)
|
|
140
|
+
- Managed paths: [docs/managed-paths.md](docs/managed-paths.md)
|
|
141
|
+
- Performance budgets: [docs/performance-budgets.md](docs/performance-budgets.md)
|
|
142
|
+
- Route finalization: [docs/route-finalization.md](docs/route-finalization.md)
|
|
143
|
+
- Rust accelerator: [docs/rust-accelerator.md](docs/rust-accelerator.md)
|
|
144
|
+
|
|
145
|
+
</details>
|
|
146
|
+
|
|
147
|
+
<details>
|
|
148
|
+
<summary><b>Agents & parallelism</b> โ Naruto swarm, worker panes, parallel writes</summary>
|
|
149
|
+
|
|
150
|
+
- Naruto massive parallel swarm: [docs/naruto.md](docs/naruto.md)
|
|
151
|
+
- Native Agent Kernel: [docs/native-agent-kernel.md](docs/native-agent-kernel.md)
|
|
152
|
+
- Native agent engines: [docs/native-agent-engines.md](docs/native-agent-engines.md)
|
|
153
|
+
- Native CLI Session Swarm: [docs/native-cli-session-swarm.md](docs/native-cli-session-swarm.md)
|
|
154
|
+
- No-subagent scaling: [docs/no-subagent-scaling.md](docs/no-subagent-scaling.md)
|
|
155
|
+
- Parallel write agents: [docs/parallel-write-agents.md](docs/parallel-write-agents.md)
|
|
156
|
+
- Agent patch queue: [docs/agent-patch-queue.md](docs/agent-patch-queue.md)
|
|
157
|
+
- Strategy-first parallel write: [docs/strategy-first-parallel-write.md](docs/strategy-first-parallel-write.md)
|
|
158
|
+
- Intelligent work graph: [docs/intelligent-work-graph.md](docs/intelligent-work-graph.md)
|
|
159
|
+
- Agent terminal lanes: [docs/agent-terminal-lanes.md](docs/agent-terminal-lanes.md)
|
|
160
|
+
- Agent cleanup executor: [docs/agent-cleanup-executor.md](docs/agent-cleanup-executor.md)
|
|
161
|
+
- MCP readOnly scheduler: [docs/mcp-readonly-scheduler.md](docs/mcp-readonly-scheduler.md)
|
|
162
|
+
- MAD-SKS: [docs/mad-sks.md](docs/mad-sks.md)
|
|
163
|
+
- MAD-SKS rollback: [docs/mad-sks-rollback.md](docs/mad-sks-rollback.md)
|
|
164
|
+
- ADHD orchestration gate: [docs/adhd-orchestrating-gate.md](docs/adhd-orchestrating-gate.md)
|
|
165
|
+
- Zellij migration: [docs/migration/tmux-to-zellij.md](docs/migration/tmux-to-zellij.md)
|
|
166
|
+
|
|
167
|
+
</details>
|
|
168
|
+
|
|
169
|
+
<details>
|
|
170
|
+
<summary><b>Memory & learning</b> โ TriWiki, wrongness memory, fixtures</summary>
|
|
171
|
+
|
|
111
172
|
- TriWiki Wrongness Memory: [docs/triwiki-wrongness-memory.md](docs/triwiki-wrongness-memory.md)
|
|
112
|
-
- Git collaboration: [docs/git-collaboration.md](docs/git-collaboration.md)
|
|
113
|
-
- Git hygiene: [docs/git-hygiene.md](docs/git-hygiene.md)
|
|
114
173
|
- Shared TriWiki: [docs/shared-triwiki.md](docs/shared-triwiki.md)
|
|
115
174
|
- Shared Wrongness Memory: [docs/shared-wrongness-memory.md](docs/shared-wrongness-memory.md)
|
|
116
|
-
- Git policy: [docs/git-policy.md](docs/git-policy.md)
|
|
117
175
|
- Wrongness Learning Loop: [docs/wrongness-learning-loop.md](docs/wrongness-learning-loop.md)
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
176
|
+
- Image Voxel TriWiki: [docs/image-voxel-ledger.md](docs/image-voxel-ledger.md)
|
|
177
|
+
- Image Wrongness: [docs/image-wrongness.md](docs/image-wrongness.md)
|
|
178
|
+
- Feature fixtures: [docs/feature-fixtures.md](docs/feature-fixtures.md)
|
|
179
|
+
|
|
180
|
+
</details>
|
|
181
|
+
|
|
182
|
+
<details>
|
|
183
|
+
<summary><b>Codex integration</b> โ App, CLI compat, codex-lb, hooks</summary>
|
|
184
|
+
|
|
125
185
|
- Codex App: [docs/codex-app.md](docs/codex-app.md)
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
-
|
|
186
|
+
- Codex CLI compatibility: [docs/codex-cli-compat.md](docs/codex-cli-compat.md)
|
|
187
|
+
- Codex official Goal mode: [docs/codex-official-goal-mode.md](docs/codex-official-goal-mode.md)
|
|
188
|
+
- Codex App Hooks/PAT: [docs/hooks-pat.md](docs/hooks-pat.md)
|
|
189
|
+
- codex-lb: [docs/codex-lb.md](docs/codex-lb.md)
|
|
129
190
|
- Source Intelligence Layer: [docs/source-intelligence-layer.md](docs/source-intelligence-layer.md)
|
|
130
191
|
- X AI / Context7 / Codex Web policy: [docs/xai-context7-codex-web-policy.md](docs/xai-context7-codex-web-policy.md)
|
|
131
192
|
- Main no-Scout / worker Scout policy: [docs/main-no-scout-worker-scout-policy.md](docs/main-no-scout-worker-scout-policy.md)
|
|
132
|
-
- Agent terminal lanes: [docs/agent-terminal-lanes.md](docs/agent-terminal-lanes.md)
|
|
133
|
-
- Zellij migration: [docs/migration/tmux-to-zellij.md](docs/migration/tmux-to-zellij.md)
|
|
134
193
|
- Real Codex dynamic smoke: [docs/real-codex-dynamic-smoke.md](docs/real-codex-dynamic-smoke.md)
|
|
135
|
-
- Agent cleanup executor: [docs/agent-cleanup-executor.md](docs/agent-cleanup-executor.md)
|
|
136
|
-
- Intelligent work graph: [docs/intelligent-work-graph.md](docs/intelligent-work-graph.md)
|
|
137
|
-
- Fake vs real proof policy: [docs/fake-vs-real-proof-policy.md](docs/fake-vs-real-proof-policy.md)
|
|
138
|
-
- Runtime truth matrix: [docs/runtime-truth-matrix.md](docs/runtime-truth-matrix.md)
|
|
139
|
-
- ADHD orchestration gate: [docs/adhd-orchestrating-gate.md](docs/adhd-orchestrating-gate.md)
|
|
140
|
-
- Strategy-first parallel write: [docs/strategy-first-parallel-write.md](docs/strategy-first-parallel-write.md)
|
|
141
194
|
- Appshots pipeline: [docs/appshots-pipeline.md](docs/appshots-pipeline.md)
|
|
142
195
|
- Appshots thread attachments: [docs/appshots-thread-attachments.md](docs/appshots-thread-attachments.md)
|
|
143
|
-
- MCP readOnly scheduler: [docs/mcp-readonly-scheduler.md](docs/mcp-readonly-scheduler.md)
|
|
144
|
-
- Parallel write agents: [docs/parallel-write-agents.md](docs/parallel-write-agents.md)
|
|
145
|
-
- Agent patch queue: [docs/agent-patch-queue.md](docs/agent-patch-queue.md)
|
|
146
|
-
- Native CLI Session Swarm: [docs/native-cli-session-swarm.md](docs/native-cli-session-swarm.md)
|
|
147
|
-
- No-subagent scaling: [docs/no-subagent-scaling.md](docs/no-subagent-scaling.md)
|
|
148
196
|
- Fast mode default and `$Fast-On`/`$Fast-Off` toggles: [docs/fast-mode-default.md](docs/fast-mode-default.md)
|
|
149
|
-
|
|
150
|
-
|
|
197
|
+
|
|
198
|
+
</details>
|
|
199
|
+
|
|
200
|
+
<details>
|
|
201
|
+
<summary><b>Git & collaboration</b></summary>
|
|
202
|
+
|
|
203
|
+
- Git collaboration: [docs/git-collaboration.md](docs/git-collaboration.md)
|
|
204
|
+
- Git hygiene: [docs/git-hygiene.md](docs/git-hygiene.md)
|
|
205
|
+
- Git policy: [docs/git-policy.md](docs/git-policy.md)
|
|
206
|
+
|
|
207
|
+
</details>
|
|
208
|
+
|
|
209
|
+
<details>
|
|
210
|
+
<summary><b>Quality & release</b> โ gates, E2E, migrations, gaps</summary>
|
|
211
|
+
|
|
212
|
+
- Release readiness: [docs/release-readiness.md](docs/release-readiness.md)
|
|
151
213
|
- Release parallel full coverage: [docs/release-parallel-full-coverage.md](docs/release-parallel-full-coverage.md)
|
|
152
214
|
- Priority closure P0-P4: [docs/priority-closure-p0-p4.md](docs/priority-closure-p0-p4.md)
|
|
153
|
-
-
|
|
154
|
-
-
|
|
155
|
-
- Route finalization: [docs/route-finalization.md](docs/route-finalization.md)
|
|
156
|
-
- Feature fixtures: [docs/feature-fixtures.md](docs/feature-fixtures.md)
|
|
157
|
-
- Managed paths: [docs/managed-paths.md](docs/managed-paths.md)
|
|
215
|
+
- Black-box package tests: [docs/black-box-package-tests.md](docs/black-box-package-tests.md)
|
|
216
|
+
- Hermetic E2E: [docs/testing-hermetic-e2e.md](docs/testing-hermetic-e2e.md)
|
|
158
217
|
- Rollback: [docs/rollback.md](docs/rollback.md)
|
|
159
218
|
- Known gaps: [docs/known-gaps.md](docs/known-gaps.md)
|
|
160
|
-
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
- Rust accelerator: [docs/rust-accelerator.md](docs/rust-accelerator.md)
|
|
164
|
-
- Codex App Hooks/PAT: [docs/hooks-pat.md](docs/hooks-pat.md)
|
|
165
|
-
- codex-lb: [docs/codex-lb.md](docs/codex-lb.md)
|
|
219
|
+
- Migration 1.18.7 to 1.18.8: [docs/migration-1.18.7-to-1.18.8.md](docs/migration-1.18.7-to-1.18.8.md)
|
|
220
|
+
|
|
221
|
+
</details>
|
|
166
222
|
|
|
167
|
-
## 60-
|
|
223
|
+
## โก 60-Second Start
|
|
168
224
|
|
|
169
225
|
Recommended install: use the global npm package so `sks` and the Codex App `$` skills are refreshed together.
|
|
170
226
|
|
|
@@ -183,13 +239,13 @@ sks selftest --mock
|
|
|
183
239
|
sks rust smoke --json
|
|
184
240
|
```
|
|
185
241
|
|
|
186
|
-
## Three
|
|
242
|
+
## ๐ค Three Core Promises
|
|
187
243
|
|
|
188
244
|
1. Completion Proof for every serious route
|
|
189
245
|
2. Image Voxel TriWiki anchors and relations for every visual route
|
|
190
246
|
3. Route contracts, evidence indexes, wrongness memory, trust reports, Codex App, codex-lb, hooks, Rust fallback parity, DB, route modularity, and generated fixtures verified by release gates
|
|
191
247
|
|
|
192
|
-
## Install
|
|
248
|
+
## ๐ฆ Install
|
|
193
249
|
|
|
194
250
|
Recommended path:
|
|
195
251
|
|
|
@@ -234,7 +290,7 @@ sks commit --json
|
|
|
234
290
|
sks selftest --mock
|
|
235
291
|
```
|
|
236
292
|
|
|
237
|
-
## What Sneakoscope Adds
|
|
293
|
+
## ๐ What Sneakoscope Adds
|
|
238
294
|
|
|
239
295
|
`sks` adds a Zellij-backed Codex CLI runtime, Codex App `$` commands, Team/QA/PPT/Research/DB/GX/Wiki routes, OpenClaw and Hermes skill generation, Context7-gated current docs, TriWiki context packs, DB safety, design SSOT policy, skill dreaming, release checks, and Honest Mode.
|
|
240
296
|
|
|
@@ -270,7 +326,7 @@ Project setup writes shared `.gitignore` entries for generated SKS files: `.snea
|
|
|
270
326
|
|
|
271
327
|
During npm postinstall, SKS installs generated Codex App skills and tries `skills add MohtashamMurshid/getdesign` when the `skills` CLI is available. Design work still flows through one authority: `design.md`.
|
|
272
328
|
|
|
273
|
-
## Terminal CLI Usage
|
|
329
|
+
## ๐ป Terminal CLI Usage
|
|
274
330
|
|
|
275
331
|
Use terminal commands when you want to inspect, set up, verify, or start a CLI-first workspace.
|
|
276
332
|
|
|
@@ -478,7 +534,7 @@ $PPT create a customer proposal deck as HTML/PDF
|
|
|
478
534
|
|
|
479
535
|
`$PPT` seals presentation context before artifact work and grounds design in `design.md`, getdesign inputs, and source material. The route loads `imagegen`; when the sealed deck needs generated raster assets or generated slide visual critique, use Codex App `$imagegen`/`gpt-image-2` and record the real output path in the PPT image/review ledgers.
|
|
480
536
|
|
|
481
|
-
## Codex App Usage
|
|
537
|
+
## ๐งฉ Codex App Usage
|
|
482
538
|
|
|
483
539
|
Sneakoscope has two surfaces:
|
|
484
540
|
|
|
@@ -562,7 +618,7 @@ SKS does not install Git pre-commit hooks. Release metadata is changed only by e
|
|
|
562
618
|
|
|
563
619
|
TriWiki is intentionally sparse: `sks wiki sweep` records demote, soft-forget, archive, delete, promote-to-skill, and promote-to-rule candidates instead of injecting every old claim into future prompts. `sks harness fixture` validates the broader Harness Growth Factory contract: deliberate forgetting fixtures, skill card metadata, experiment schema, tool-error taxonomy, permission profiles, MultiAgentV2 defaults, and tmux cockpit view coverage. `sks code-structure scan` flags handwritten files above 1000/2000/3000-line thresholds so new logic can be extracted before command files become harder to maintain.
|
|
564
620
|
|
|
565
|
-
## OpenClaw And Hermes Agent Usage
|
|
621
|
+
## ๐ค OpenClaw And Hermes Agent Usage
|
|
566
622
|
|
|
567
623
|
Sneakoscope can generate an OpenClaw skill package for agents that need to operate SKS-enabled repositories.
|
|
568
624
|
|
|
@@ -600,7 +656,7 @@ SKS_HERMES=1 sks dollar-commands --json
|
|
|
600
656
|
SKS_HERMES=1 sks status --json
|
|
601
657
|
```
|
|
602
658
|
|
|
603
|
-
## Prompt `$` Commands
|
|
659
|
+
## ๐ฌ Prompt `$` Commands
|
|
604
660
|
|
|
605
661
|
Use these inside Codex App or another agent prompt. They are prompt commands, not terminal commands.
|
|
606
662
|
|
|
@@ -608,7 +664,7 @@ Common prompts: `$Team`, `$From-Chat-IMG`, `$with-local-llm-on`, `$with-local-ll
|
|
|
608
664
|
|
|
609
665
|
`$MAD-DB` is the prompt-visible Mad-DB alias for one-cycle DB break-glass work. It maps to the same guarded MAD-SKS permission route, while the terminal lifecycle remains `sks mad-db status|enable|revoke`; it is not a permanent DB unlock and catastrophic DB safeguards remain active.
|
|
610
666
|
|
|
611
|
-
## Common Workflows
|
|
667
|
+
## ๐ Common Workflows
|
|
612
668
|
|
|
613
669
|
First install:
|
|
614
670
|
|
|
@@ -637,7 +693,7 @@ sks wiki refresh
|
|
|
637
693
|
sks wiki validate .sneakoscope/wiki/context-pack.json
|
|
638
694
|
```
|
|
639
695
|
|
|
640
|
-
## Safety Model
|
|
696
|
+
## ๐ก๏ธ Safety Model
|
|
641
697
|
|
|
642
698
|
Sneakoscope intentionally treats these as high-risk:
|
|
643
699
|
|
|
@@ -649,7 +705,7 @@ Sneakoscope intentionally treats these as high-risk:
|
|
|
649
705
|
|
|
650
706
|
By default, SKS favors inspection, local files, branch-safe changes, explicit confirmation for destructive DB operations, and completion claims backed by tests or artifacts.
|
|
651
707
|
|
|
652
|
-
## Troubleshooting
|
|
708
|
+
## ๐ง Troubleshooting
|
|
653
709
|
|
|
654
710
|
### `sks` points to an old version
|
|
655
711
|
|
|
@@ -735,7 +791,7 @@ sks wiki validate .sneakoscope/wiki/context-pack.json
|
|
|
735
791
|
|
|
736
792
|
Finalization requires evidence, valid Team cleanup artifacts, reflection when required, and Honest Mode.
|
|
737
793
|
|
|
738
|
-
## Development And Release
|
|
794
|
+
## ๐๏ธ Development And Release
|
|
739
795
|
|
|
740
796
|
Run local checks:
|
|
741
797
|
|
|
@@ -4,7 +4,7 @@ use std::io::{self, Read, Seek, SeekFrom};
|
|
|
4
4
|
fn main() {
|
|
5
5
|
let mut args = std::env::args().skip(1);
|
|
6
6
|
match args.next().as_deref() {
|
|
7
|
-
Some("--version") => println!("sks-rs
|
|
7
|
+
Some("--version") => println!("sks-rs 3.0.1"),
|
|
8
8
|
Some("compact-info") => {
|
|
9
9
|
let mut input = String::new();
|
|
10
10
|
let _ = io::stdin().read_to_string(&mut input);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "sks.dist-build-stamp.v1",
|
|
3
3
|
"package_name": "sneakoscope",
|
|
4
|
-
"package_version": "
|
|
5
|
-
"source_digest": "
|
|
6
|
-
"source_file_count":
|
|
7
|
-
"built_at_source_time":
|
|
4
|
+
"package_version": "3.0.1",
|
|
5
|
+
"source_digest": "5c97e638daf3eab1aeac1eaa644b771787a9d8cfd1a9756e7ab4e76a7aba523e",
|
|
6
|
+
"source_file_count": 2265,
|
|
7
|
+
"built_at_source_time": 1781080652355
|
|
8
8
|
}
|
package/dist/bin/sks.js
CHANGED
package/dist/commands/mad-sks.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { madHighCommand } from '../core/commands/mad-sks-command.js';
|
|
2
2
|
import { ensureMadLaunchDependencies, formatMadLaunchDependencyAction, maybePromptCodexUpdateForLaunch, maybePromptCodexLbSetupForLaunch, maybePromptSksUpdateForLaunch } from '../cli/install-helpers.js';
|
|
3
|
+
import { maybePromptZellijUpdateForLaunch } from '../core/zellij/zellij-update.js';
|
|
3
4
|
import { PACKAGE_VERSION } from '../core/fsx.js';
|
|
4
5
|
export async function run(_command, args = []) {
|
|
5
6
|
return madHighCommand(['--mad-sks', ...args], {
|
|
6
7
|
maybePromptSksUpdateForLaunch,
|
|
7
8
|
maybePromptCodexUpdateForLaunch,
|
|
9
|
+
maybePromptZellijUpdateForLaunch,
|
|
8
10
|
ensureMadLaunchDependencies,
|
|
9
11
|
printDepsInstallAction: (action) => console.error(formatMadLaunchDependencyAction(action)),
|
|
10
12
|
maybePromptCodexLbSetupForLaunch,
|
package/dist/commands/zellij.js
CHANGED
|
@@ -4,6 +4,7 @@ import { projectRoot, readJson } from '../core/fsx.js';
|
|
|
4
4
|
import { flag } from '../cli/args.js';
|
|
5
5
|
import { printJson } from '../cli/output.js';
|
|
6
6
|
import { checkZellijCapability } from '../core/zellij/zellij-capability.js';
|
|
7
|
+
import { checkZellijUpdateNotice, upgradeZellijToLatest } from '../core/zellij/zellij-update.js';
|
|
7
8
|
import { runZellij } from '../core/zellij/zellij-command.js';
|
|
8
9
|
import { appendZellijLaneCommand, normalizeZellijSlot } from '../core/zellij/zellij-lane-runtime.js';
|
|
9
10
|
import { buildZellijDashboardSnapshot, renderZellijDashboardText } from '../core/zellij/zellij-dashboard-renderer.js';
|
|
@@ -22,6 +23,8 @@ export async function run(_command = 'zellij', args = []) {
|
|
|
22
23
|
const root = await projectRoot();
|
|
23
24
|
if (sub === 'help')
|
|
24
25
|
return printHelp(json);
|
|
26
|
+
if (sub === 'update' || sub === 'upgrade')
|
|
27
|
+
return zellijUpdate(args, json);
|
|
25
28
|
if (sub === 'repair')
|
|
26
29
|
return zellijRepair(root, args, json);
|
|
27
30
|
if (sub === 'dispatch' || sub === 'send')
|
|
@@ -73,6 +76,58 @@ async function zellijStatus(root, args, json) {
|
|
|
73
76
|
if (!result.ok)
|
|
74
77
|
process.exitCode = 1;
|
|
75
78
|
}
|
|
79
|
+
async function zellijUpdate(args, json) {
|
|
80
|
+
const apply = flag(args, '--yes') || flag(args, '-y') || flag(args, '--apply');
|
|
81
|
+
const notice = await checkZellijUpdateNotice({});
|
|
82
|
+
if (!apply || !notice.update_available) {
|
|
83
|
+
const result = {
|
|
84
|
+
schema: 'sks.zellij-update-command.v1',
|
|
85
|
+
subcommand: 'update',
|
|
86
|
+
ok: !notice.error,
|
|
87
|
+
mode: apply ? 'apply' : 'check',
|
|
88
|
+
current_version: notice.current_version,
|
|
89
|
+
latest_version: notice.latest_version,
|
|
90
|
+
update_available: notice.update_available,
|
|
91
|
+
zellij_missing: notice.zellij_missing,
|
|
92
|
+
source: notice.source,
|
|
93
|
+
upgrade_command: notice.upgrade_command,
|
|
94
|
+
message: notice.message,
|
|
95
|
+
next_actions: notice.update_available ? ['Apply with: sks zellij update --yes'] : [],
|
|
96
|
+
error: notice.error || null
|
|
97
|
+
};
|
|
98
|
+
if (json)
|
|
99
|
+
printJson(result);
|
|
100
|
+
else {
|
|
101
|
+
console.log(notice.message);
|
|
102
|
+
if (notice.update_available)
|
|
103
|
+
console.log('Apply with: sks zellij update --yes');
|
|
104
|
+
}
|
|
105
|
+
if (notice.error && !notice.latest_version)
|
|
106
|
+
process.exitCode = 1;
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
const upgraded = await upgradeZellijToLatest({});
|
|
110
|
+
const result = {
|
|
111
|
+
schema: 'sks.zellij-update-command.v1',
|
|
112
|
+
subcommand: 'update',
|
|
113
|
+
ok: upgraded.status === 'upgraded' || upgraded.status === 'installed' || upgraded.status === 'noop',
|
|
114
|
+
mode: 'apply',
|
|
115
|
+
status: upgraded.status,
|
|
116
|
+
before_version: upgraded.before_version,
|
|
117
|
+
after_version: upgraded.after_version,
|
|
118
|
+
latest_version: upgraded.latest_version,
|
|
119
|
+
command: upgraded.command,
|
|
120
|
+
error: upgraded.error || null
|
|
121
|
+
};
|
|
122
|
+
if (json)
|
|
123
|
+
printJson(result);
|
|
124
|
+
else if (result.ok)
|
|
125
|
+
console.log(`Zellij ${upgraded.before_version || 'unknown'} -> ${upgraded.after_version || upgraded.latest_version || 'latest'} (${upgraded.command})`);
|
|
126
|
+
else
|
|
127
|
+
console.log(`Zellij update ${upgraded.status}: ${upgraded.error || upgraded.command}`);
|
|
128
|
+
if (!result.ok)
|
|
129
|
+
process.exitCode = 1;
|
|
130
|
+
}
|
|
76
131
|
async function zellijFocusWorker(root, args, json) {
|
|
77
132
|
const missionId = resolveMissionId(root, readOption(args, '--mission', readOption(args, '--mission-id', 'latest') || 'latest') || 'latest');
|
|
78
133
|
const slotId = normalizeZellijSlot(readOption(args, '--slot', positionalAfter(args, 'focus-worker') || 'slot-001'));
|
|
@@ -265,9 +320,10 @@ function printHelp(json) {
|
|
|
265
320
|
schema: ZELLIJ_COMMAND_SCHEMA,
|
|
266
321
|
subcommand: 'help',
|
|
267
322
|
ok: true,
|
|
268
|
-
usage: 'sks zellij status|repair|dispatch|send|focus-worker|worker-logs|dashboard|close-drained [--json]',
|
|
323
|
+
usage: 'sks zellij status|update|repair|dispatch|send|focus-worker|worker-logs|dashboard|close-drained [--json]',
|
|
269
324
|
subcommands: {
|
|
270
325
|
status: 'Report Zellij runtime capability and interactive-route readiness.',
|
|
326
|
+
update: 'Check the latest stable Zellij release; apply the upgrade with --yes (Homebrew).',
|
|
271
327
|
repair: 'Explain how to install/repair Zellij (no automatic install).',
|
|
272
328
|
dispatch: 'Append a nonblocking JSONL command for a lane; optionally write to a reconciled pane id with --write-pane.',
|
|
273
329
|
send: 'Alias for dispatch.',
|
|
@@ -283,6 +339,7 @@ function printHelp(json) {
|
|
|
283
339
|
else {
|
|
284
340
|
console.log('sks zellij โ inspect and repair the Zellij interactive runtime');
|
|
285
341
|
console.log(' sks zellij status [--require-real] [--json]');
|
|
342
|
+
console.log(' sks zellij update [--yes] [--json]');
|
|
286
343
|
console.log(' sks zellij repair [--explain] [--json]');
|
|
287
344
|
console.log(' sks zellij dispatch --mission M --slot slot-001 --text "..." [--write-pane] [--json]');
|
|
288
345
|
console.log(' sks zellij focus-worker slot-001 [--mission M] [--json]');
|
|
@@ -144,30 +144,38 @@ export async function runAgentScheduler(input) {
|
|
|
144
144
|
batch_id: batchId,
|
|
145
145
|
meta: { launch_count: launches.length, active_count_before: active.size }
|
|
146
146
|
}).catch(() => undefined);
|
|
147
|
+
// Telemetry appends run concurrently across launches (per-slot ordering
|
|
148
|
+
// preserved inside each async chain). Awaiting these file writes in
|
|
149
|
+
// series before each dispatch serialized worker launch by 2 disk writes
|
|
150
|
+
// per slot โ with 20 slots that is 40 sequential appends before the last
|
|
151
|
+
// worker even started.
|
|
152
|
+
const dispatchTelemetryWrites = [];
|
|
147
153
|
for (const launch of launches) {
|
|
148
154
|
const { slot, openedSlot, generation, agent, workItem } = launch;
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
155
|
+
dispatchTelemetryWrites.push((async () => {
|
|
156
|
+
await appendParallelRuntimeEvent(input.root, input.missionId, {
|
|
157
|
+
event_type: 'slot_reserved',
|
|
158
|
+
slot_id: slot.slot_id,
|
|
159
|
+
generation_index: generation.generation_index,
|
|
160
|
+
session_id: generation.session_id,
|
|
161
|
+
pid: null,
|
|
162
|
+
backend: 'scheduler',
|
|
163
|
+
placement: 'unknown',
|
|
164
|
+
batch_id: batchId,
|
|
165
|
+
meta: { work_item_id: workItem.id }
|
|
166
|
+
}).catch(() => undefined);
|
|
167
|
+
await appendParallelRuntimeEvent(input.root, input.missionId, {
|
|
168
|
+
event_type: 'worker_launch_invoked',
|
|
169
|
+
slot_id: slot.slot_id,
|
|
170
|
+
generation_index: generation.generation_index,
|
|
171
|
+
session_id: generation.session_id,
|
|
172
|
+
pid: null,
|
|
173
|
+
backend: 'scheduler',
|
|
174
|
+
placement: 'unknown',
|
|
175
|
+
batch_id: batchId,
|
|
176
|
+
meta: { work_item_id: workItem.id }
|
|
177
|
+
}).catch(() => undefined);
|
|
178
|
+
})());
|
|
171
179
|
const promise = Promise.resolve()
|
|
172
180
|
.then(() => input.launchSession({ agent, workItem, generation, slot: openedSlot, queue, state }))
|
|
173
181
|
.then((result) => ({
|
|
@@ -212,14 +220,14 @@ export async function runAgentScheduler(input) {
|
|
|
212
220
|
accumulateActiveSlotTime();
|
|
213
221
|
active.set(generation.session_id, { slot_id: slot.slot_id, work_item_id: workItem.id, session_id: generation.session_id, promise });
|
|
214
222
|
}
|
|
223
|
+
await Promise.all(dispatchTelemetryWrites);
|
|
215
224
|
await appendAgentWorkQueueEvent(input.root, 'batch_work_items_dispatched', {
|
|
216
225
|
batch_id: batchId,
|
|
217
226
|
launch_count: launches.length,
|
|
218
227
|
session_ids: launches.map((launch) => launch.generation.session_id),
|
|
219
228
|
work_item_ids: launches.map((launch) => launch.workItem.id)
|
|
220
229
|
});
|
|
221
|
-
|
|
222
|
-
await appendAgentWorkQueueEvent(input.root, 'work_item_dispatched', { work_item_id: launch.workItem.id, session_id: launch.generation.session_id, slot_id: launch.slot.slot_id });
|
|
230
|
+
await Promise.all(launches.map((launch) => appendAgentWorkQueueEvent(input.root, 'work_item_dispatched', { work_item_id: launch.workItem.id, session_id: launch.generation.session_id, slot_id: launch.slot.slot_id })));
|
|
223
231
|
if (backfill) {
|
|
224
232
|
const firstLaunch = launches[0];
|
|
225
233
|
const refillLatencyMs = Math.max(0, Date.now() - backfill.closed_at_ms);
|
|
@@ -11,6 +11,7 @@ import { buildZellijSlotPaneCommand } from '../zellij/zellij-slot-pane-renderer.
|
|
|
11
11
|
import { resolveZellijWorkerPaneUiMode } from '../zellij/zellij-ui-mode.js';
|
|
12
12
|
import { appendZellijSlotTelemetry } from '../zellij/zellij-slot-telemetry.js';
|
|
13
13
|
import { appendParallelRuntimeEvent } from './parallel-runtime-proof.js';
|
|
14
|
+
import { appendAgentMessage } from './agent-message-bus.js';
|
|
14
15
|
export const NATIVE_CLI_SESSION_SWARM_SCHEMA = 'sks.agent-native-cli-session-swarm.v1';
|
|
15
16
|
export function createNativeCliSessionSwarmRecorder(root, input) {
|
|
16
17
|
return new NativeCliSessionSwarmRecorder(root, input);
|
|
@@ -625,6 +626,15 @@ class NativeCliSessionSwarmRecorder {
|
|
|
625
626
|
log_tail: input.logTail || '',
|
|
626
627
|
blockers: input.blockers || []
|
|
627
628
|
}).catch(() => undefined);
|
|
629
|
+
if (input.eventType === 'worker_completed' || input.eventType === 'worker_failed') {
|
|
630
|
+
await appendAgentMessage(this.root, {
|
|
631
|
+
from: String(ctx.agent?.slot_id || ctx.agent?.id || 'worker'),
|
|
632
|
+
session_id: ctx.agent?.session_id == null ? '' : String(ctx.agent.session_id),
|
|
633
|
+
to: 'orchestrator',
|
|
634
|
+
type: input.eventType,
|
|
635
|
+
body: input.logTail || input.eventType
|
|
636
|
+
}).catch(() => undefined);
|
|
637
|
+
}
|
|
628
638
|
const parallelEvent = mapTelemetryToParallelEvent(input.eventType);
|
|
629
639
|
if (parallelEvent) {
|
|
630
640
|
await appendParallelRuntimeEvent(this.root, this.input.missionId, {
|
|
@@ -653,6 +663,12 @@ class NativeCliSessionSwarmRecorder {
|
|
|
653
663
|
summary() {
|
|
654
664
|
const closed = this.records.filter((row) => row.status === 'closed');
|
|
655
665
|
const processIds = this.records.map((row) => row.pid).filter((pid) => Number.isFinite(Number(pid)));
|
|
666
|
+
// Both pane-backed primitives count as zellij pane worker sessions: the
|
|
667
|
+
// worker command can run inside the pane (full-debug) or headless behind a
|
|
668
|
+
// live slot renderer pane (compact-slots default). Counting only the
|
|
669
|
+
// former under-reported pane sessions as 0 in the default UI mode.
|
|
670
|
+
const paneBackedRecords = this.records.filter((row) => row.scaling_primitive === 'native_cli_process_in_zellij_worker_pane'
|
|
671
|
+
|| row.scaling_primitive === 'native_cli_process_with_zellij_slot_renderer');
|
|
656
672
|
return {
|
|
657
673
|
schema: NATIVE_CLI_SESSION_SWARM_SCHEMA,
|
|
658
674
|
generated_at: nowIso(),
|
|
@@ -660,8 +676,12 @@ class NativeCliSessionSwarmRecorder {
|
|
|
660
676
|
mission_id: this.input.missionId,
|
|
661
677
|
route: this.input.route,
|
|
662
678
|
backend: this.input.backend,
|
|
663
|
-
scaling_primitive: this.records.some((row) => row.scaling_primitive === 'native_cli_process_in_zellij_worker_pane')
|
|
664
|
-
|
|
679
|
+
scaling_primitive: this.records.some((row) => row.scaling_primitive === 'native_cli_process_in_zellij_worker_pane')
|
|
680
|
+
? 'native_cli_process_in_zellij_worker_pane'
|
|
681
|
+
: paneBackedRecords.length
|
|
682
|
+
? 'native_cli_process_with_zellij_slot_renderer'
|
|
683
|
+
: 'native_cli_process',
|
|
684
|
+
zellij_pane_worker_sessions: paneBackedRecords.length,
|
|
665
685
|
requested_agents: this.input.requestedAgents,
|
|
666
686
|
target_active_slots: this.input.targetActiveSlots,
|
|
667
687
|
spawned_worker_process_count: this.records.length,
|