sneakoscope 10.1.0 → 10.1.2

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.
Files changed (38) hide show
  1. package/README.md +120 -289
  2. package/crates/sks-core/Cargo.lock +1 -1
  3. package/crates/sks-core/Cargo.toml +1 -1
  4. package/dist/cli/command-manifest-lite.js +1 -1
  5. package/dist/cli/command-registry.js +1 -1
  6. package/dist/cli/router.js +1 -1
  7. package/dist/commands/codex-app.js +12 -1
  8. package/dist/config/skills-manifest.json +1 -1
  9. package/dist/core/agent-bridge/async-command.js +119 -0
  10. package/dist/core/agent-bridge/responses-async-runner.js +275 -0
  11. package/dist/core/agent-bridge/responses-transport.js +208 -0
  12. package/dist/core/agents/agent-role-config.js +16 -7
  13. package/dist/core/codex/context-management.js +55 -0
  14. package/dist/core/codex-app/context-management-command.js +38 -0
  15. package/dist/core/codex-control/codex-app-server-v2-client.js +98 -8
  16. package/dist/core/codex-control/codex-sdk-config-policy.js +6 -1
  17. package/dist/core/codex-control/python-codex-sdk-adapter.js +5 -2
  18. package/dist/core/codex-runtime/codex-desktop-config-policy.js +2 -0
  19. package/dist/core/commands/agent-bridge-command.js +13 -1
  20. package/dist/core/fsx.js +25 -3
  21. package/dist/core/image-ux-review/real-callout-extractor.js +2 -0
  22. package/dist/core/init/skills.js +14 -4
  23. package/dist/core/init.js +6 -2
  24. package/dist/core/lean-engineering-policy.js +10 -0
  25. package/dist/core/managed-assets/managed-assets-manifest.js +2 -0
  26. package/dist/core/pipeline-internals/runtime-core.js +32 -25
  27. package/dist/core/responses-stream.js +13 -1
  28. package/dist/core/routes.js +2 -2
  29. package/dist/core/structured-output-adapter.js +2 -0
  30. package/dist/core/subagents/official-subagent-config.js +29 -4
  31. package/dist/core/subagents/official-subagent-prompt.js +2 -1
  32. package/dist/core/version.js +1 -1
  33. package/dist/native/sks-menubar/Sources/MCPServersViewController.swift +5 -4
  34. package/dist/native/sks-menubar/Sources/NativeView.swift +2 -0
  35. package/dist/native/sks-menubar/Sources/OverviewSummary.swift +1 -0
  36. package/dist/native/sks-menubar/Sources/OverviewViewController.swift +4 -2
  37. package/dist/native/sks-menubar/Sources/SettingsViewController.swift +65 -1
  38. package/package.json +5 -3
package/README.md CHANGED
@@ -1,20 +1,14 @@
1
1
  <div align="center">
2
2
 
3
- # Sneakoscope Codex
4
-
5
- **Stop trusting “done.” Make Codex prove it.**
3
+ <img src="docs/assets/sks-logo.svg" alt="Sneakoscope Codex logo" width="120" height="120" />
6
4
 
7
- Proof-first orchestration for Codex CLI, ChatGPT Desktop, AI coding agents, multi-agent workflows, release verification, and the macOS menu bar.
5
+ # Sneakoscope Codex
8
6
 
9
- <p align="center">
10
- <img src="docs/assets/sks-logo.svg" alt="Sneakoscope Codex logo" width="160" height="160" />
11
- </p>
7
+ **Plan, build, and verify with Codex.**
12
8
 
13
9
  [![npm version](https://img.shields.io/npm/v/sneakoscope?color=cb3837&logo=npm)](https://www.npmjs.com/package/sneakoscope)
14
10
  [![node](https://img.shields.io/badge/node-%3E%3D20.11-339933?logo=node.js&logoColor=white)](#requirements)
15
- [![license](https://img.shields.io/badge/license-MIT-blue)](#license)
16
-
17
- ![SKS architecture pipeline](https://raw.githubusercontent.com/mandarange/Sneakoscope-Codex/main/docs/assets/sneakoscope-architecture-pipeline.jpg)
11
+ [![license](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
18
12
 
19
13
  </div>
20
14
 
@@ -22,339 +16,176 @@ Proof-first orchestration for Codex CLI, ChatGPT Desktop, AI coding agents, mult
22
16
  Sneakoscope Codex (`sks`) is an open-source trust layer for Codex CLI and ChatGPT Desktop. It coordinates bounded AI coding agents, records machine-verifiable evidence, preserves project memory, and blocks release claims that are not supported by current tests or artifacts. Search visibility outcomes are measured separately; SKS does not promise rankings or traffic.
23
17
  <!-- END SKS SEARCH VISIBILITY MARKETING -->
24
18
 
25
- This README documents package **SKS 10.1.0** its own identity, read from `package.json` and subject to release-gate verification, not advice about what to install.
26
-
27
- Use the official latest stable SKS and Codex CLI releases. The Codex compatibility SSOT is always the **current latest stable** host; capability probes measure what that host can actually do. Product docs do not crown a fixed `0.x.y` string as SSOT (release pins and schema directories are measured artifacts for the current package, not a permanent product version claim). Menu Bar / Center induce updates to the latest stable build. Run `sks update-check` for what is installed and read the capability report for what is supported. Install SSOT is npm `sneakoscope@latest`; PATH `sks` and Menu Bar stamped generation must match that version or gates fail. It resolves managed SKS skills from the authoritative global install, preserves a runnable Naruto child slot when `max_threads=2`, and keeps Menu Bar repair transactional so stamped generations remain verifiable. Naruto uses stable opt-in multi-agent V2 when the host exposes it (Codex official multi-agent wrap-only; SKS does not reimplement a parallel runtime). Local code search is mode-separated (`sks search files|text|structure|symbol|context`); `context` is answered by the compiled TriWiki Context Graph (`context-graph.json` is exhaustive authority; `context-pack.json` and managed `AGENTS.md` are bounded projections) — see [docs/architecture/context-graph.md](https://github.com/mandarange/Sneakoscope-Codex/blob/main/docs/architecture/context-graph.md) and [docs/PRODUCT-CONTRACT.md](https://github.com/mandarange/Sneakoscope-Codex/blob/main/docs/PRODUCT-CONTRACT.md). See [CHANGELOG.md](https://github.com/mandarange/Sneakoscope-Codex/blob/main/CHANGELOG.md).
19
+ Current package: **SKS 10.1.2**. Install the latest stable release from npm.
28
20
 
29
- ## What 8.3.1 Ships
21
+ [Quick start](#install-in-one-command) · [Commands](#everyday-commands) · [SKS Center](#sks-center-macos) · [Documentation](#documentation) · [Changelog](CHANGELOG.md)
30
22
 
31
- | Problem | 8.3.1 behavior |
32
- | --- | --- |
33
- | Overview mixed Menu Bar, installed SKS, and cached registry versions | Each value is labeled by authority, stale or unavailable probes remain explicit, and Refresh forces a bounded update-status refresh. |
34
- | Naruto stopped creating children after its first wave | The root parent records settled waves, recovers open-thread capacity, rescans the ready DAG, and can launch later direct-child waves under the same workflow run. |
35
- | Most delegated work drifted to Sol Max | Read-heavy discovery uses Terra Max, ordinary implementation uses Sol High, and Sol Max is reserved for focused high-risk or final judgment slices. |
36
- | Goal creation started a second SKS-owned mission and loop | Codex native Goal is the only persisted owner; create/edit objectives are detailed and bounded, while SKS writes no Goal state or fallback loop. |
37
- | Global instructions accumulated duplicated route rules and forced synthetic tests | One Core Engineering Directive anchors all work, route-specific details stay with their route, and verification targets normal behavior, meaningful boundaries, and plausible failures. |
38
- | GUI-launched status commands could hang or contaminate real update state during tests | Menu Bar commands use a safe HOME cwd, closed stdin, and timeouts; update fixtures use isolated HOME and cache paths. |
39
- | Codex routing was split across legacy provider paths | One local Desktop Bridge is the managed routing runtime; Codex-LB and OpenRouter are simultaneous credential profiles. |
40
- | Requests could be coupled to a provider mode or weak model heuristic | The combined catalog's explicit route index resolves provider/model pairs with `fallback: none`; missing or ambiguous routes block. |
41
- | Transport verification was confused with deep evidence | Capability v3 records scope, stage, requested level, execution, and readiness separately; unattempted deep work is not a transport failure. |
42
- | The Menu Bar could terminate with Codex and miss the next Codex launch | A launchd-resident observer remains alive, follows Codex visibility without terminating, and migrates the legacy quit preference. |
43
- | A partial Provider repair could look successful because the CLI exited zero | The Center validates the structured command status, records partial repair as needing action, and shows capability issues before verified diagnostic rows. |
44
-
45
- ## Install In One Command
23
+ ## Install in one command
46
24
 
47
25
  ```sh
48
26
  npm exec --yes --package=sneakoscope@latest -- sneakoscope install --yes
49
27
  ```
50
28
 
51
- The explicit `@latest` tag prevents a local package or stale npx cache from silently choosing an older installer. The installer verifies the registry tag, installs the exact version carried by that package, runs the exact installed entrypoint's `doctor --fix`, and succeeds only when the first `sks` on `PATH` targets that entrypoint and reports the same version. An older or same-version shadow prefix that still wins is reported as a blocker with a recoverable prior-version command. The plugin marketplace path is also prepared through `plugins/sks/.codex-plugin/plugin.json`.
29
+ The installer resolves the latest release, installs it globally, runs setup and
30
+ Doctor, and checks that `sks` on your PATH points to the installed version.
52
31
 
53
- For package-managed installs:
54
-
55
- The npm lifecycle is non-mutating outside the installed package by default:
56
- it restores only the package-local build stamp and prints the explicit setup
57
- commands. To intentionally run the legacy bootstrap during installation, set
58
- `SKS_POSTINSTALL_BOOTSTRAP=1`; `SKS_POSTINSTALL_NO_BOOTSTRAP=1` remains the
59
- stronger safety override.
32
+ To set up a project, run this from its root, then open it in Codex:
60
33
 
61
34
  ```sh
62
- npm install --global sneakoscope@latest
63
- node "$(npm root --global)/sneakoscope/dist/bin/sks.js" bootstrap --yes
64
- node "$(npm root --global)/sneakoscope/dist/bin/sks.js" doctor --fix
65
- sks --version
35
+ sks bootstrap --yes
66
36
  ```
67
37
 
68
- The two setup calls intentionally use the entrypoint under the npm global root.
69
- The final `sks --version` must report that same package version; if it does not,
70
- an older prefix still precedes the new npm bin directory on `PATH`.
71
-
72
- The SKS menu bar shows the installed Codex CLI version and latest known version. An `⬆` marker appears when an update is available; **Update Codex CLI Now** uses native `codex update` when the selected CLI advertises it, otherwise it verifies the installation provenance and invokes the matching official standalone-installer, npm-global, or Homebrew-cask update method. If the method cannot be verified, it fails closed instead of guessing. Control Center updates keep the active UI alive until the operation receipt is durable, then relaunch the companion out of process. This is an explicit global tool mutation. **Run sks doctor --fix** performs the global-only menu repair flow without treating the user's home directory as a project.
38
+ ## What SKS adds
73
39
 
74
- **Manage MCP Servers…** opens a native macOS manager for the global `~/.codex/config.toml`. It can add remote URL or local stdio servers, enable/disable existing entries, remove entries after confirmation, and refresh the current state. Mutations are lock-protected, backed up, TOML-validated, and written with mode `0600`; configured environment values and command arguments are never rendered in the list. Changes apply to new Codex sessions. The same plumbing is available through the canonical `sks mcp config list|get|add|edit|duplicate|enable|disable|remove|test|login|logout|backups|restore` surface for diagnostics and automation.
40
+ | Capability | What you get |
41
+ | --- | --- |
42
+ | Focused execution | Small tasks stay lightweight; independent work can use official Codex subagents with parent-owned integration. |
43
+ | Project context | TriWiki indexes repository code and supplies bounded context that can be checked against source. |
44
+ | Verification | Tests, diagnostics, and release evidence support completion claims. Security and data-integrity checks stay in place. |
45
+ | Native controls | SKS Center brings connections, updates, MCP servers, and diagnostics together on macOS. |
46
+ | Consistent setup | `sks update` installs the latest release, runs Doctor, and reconciles SKS-managed files and legacy assets. |
75
47
 
76
- ### Recommended remote companion: Paseo
48
+ The default `essential` profile avoids repetitive completion rituals. `strict`
49
+ adds stronger completion requirements. See [Essential Trust](docs/essential-trust.md).
77
50
 
78
- For remote and cross-device coding, Sneakoscope officially recommends
79
- [Paseo](https://paseo.sh/docs). Start with the Paseo desktop app. For a
80
- headless machine, install and launch the official CLI:
51
+ With Codex-LB connected, `sks agent-bridge async --prompt "Check SKS status while
52
+ explaining what the check covers" --tools status --json` runs native Astra Async
53
+ tool calling with selected read-only SKS tools, using WebSocket first and safe
54
+ HTTP fallback. See [Astra guidance](docs/astra-guidance.md)
55
+ for setup boundaries and reported execution evidence.
81
56
 
82
- ```sh
83
- npm install -g @getpaseo/cli
84
- paseo
85
- ```
57
+ ## Everyday commands
86
58
 
87
- Install and authenticate Codex CLI before using it through Paseo. Paseo runs
88
- the existing provider CLI, so your Codex subscription, configuration, skills,
89
- and MCP servers remain owned by Codex rather than copied into Sneakoscope.
59
+ SKS enables experimental Astra context management by default during setup and
60
+ repair. Turn it off in **SKS Center Settings → Astra context management**, or
61
+ use `sks codex-app context-management off`. Updates preserve an explicit opt-out.
62
+ Start a new task after changing the setting. Availability depends on a supported
63
+ Codex client and eligible ChatGPT sign-in; API-key and custom-provider sessions
64
+ may not activate it. See [OpenAI's context management guidance](https://learn.chatgpt.com/docs/models#experimental-context-management).
90
65
 
91
- From this repository, start Codex in the current workspace with:
66
+ Use these inside a Codex conversation:
92
67
 
93
- ```sh
94
- paseo run --provider codex "Review this repository"
95
- ```
68
+ | Command | Purpose |
69
+ | --- | --- |
70
+ | `$sks-plan "task"` | Create a plan without editing product code. |
71
+ | `$sks-work` | Execute the latest plan. |
72
+ | `$sks-naruto "task"` | Run an official subagent workflow. |
73
+ | `$sks-review` | Review the current changes. |
74
+ | `$sks-help` | Explore available SKS workflows. |
96
75
 
97
- For an isolated branch-backed worktree based on `main`, use:
76
+ Use these in your terminal:
98
77
 
99
78
  ```sh
100
- paseo run --new-workspace worktree --worktree-mode branch-off --new-branch paseo-task --base main "Implement the task"
79
+ sks --help
80
+ sks status --json
81
+ sks review --staged
82
+ sks doctor --json
83
+ sks update-check
84
+ sks update
101
85
  ```
102
86
 
103
- The committed `paseo.json` prepares each new worktree with
104
- `npm ci --ignore-scripts` followed by `npm run build:clean`. It also exposes
105
- these named repository actions through Paseo:
106
-
107
- | Paseo script | Repository command |
108
- | --- | --- |
109
- | `build` | `npm run build` |
110
- | `typecheck` | `npm run typecheck` |
111
- | `test` | `npm run test` |
112
- | `release-check` | `npm run release:check:affected` |
113
- | `release-confidence` | `npm run release:check:confidence` |
87
+ `sks update` runs setup reconciliation even when the package is already current.
88
+ It preserves user-authored configuration and cleans up recognized SKS-owned
89
+ legacy assets. If a check needs attention, follow its reported recovery action
90
+ in your terminal.
114
91
 
115
- Paseo is an independent project, not bundled with or operated by Sneakoscope.
116
- Sneakoscope maintains only this repository's `paseo.json` and usage guidance;
117
- Paseo installation, authentication, pairing, relay operation, security, and
118
- product support remain with Paseo and its official documentation.
92
+ ## SKS Center (macOS)
119
93
 
120
- ## The Front Door
94
+ Open **SKS Control Center** from the SKS menu bar.
121
95
 
122
- | Command | What it does |
96
+ | Page | Use it to |
123
97
  | --- | --- |
124
- | `$sks-plan "task"` | Planning only. Writes `.sneakoscope/plans/<slug>.md`; no code edits. |
125
- | Explicit `$sks-work` | Executes the latest plan through evidence-gated SKS work. Ordinary prose containing “work” is not treated as this alias. |
126
- | `$sks-naruto "task"` | Runs the Codex official subagent workflow with parent-owned integration and evidence. |
127
- | `$sks-mad-sks` / `sks mad-sks` | Single high-risk MAD route for scoped permission widening plus SQL-plane execution, including read-back proof and profile closure. |
128
- | `$sks-review` / `sks review --staged` | Reviews diffs with `evidence: machine` findings sorted above `evidence: llm`. |
98
+ | Overview | Check local health and find the next action. |
99
+ | Connections | Connect Codex-LB or OpenRouter, choose authentication priority, and manage exposed models. |
100
+ | Updates | Check and update SKS and Codex CLI, with operation progress and recovery details. |
101
+ | MCP Servers | Manage server configuration, health checks, and authentication. |
102
+ | Diagnostics | Inspect issues and run targeted checks. |
103
+ | Settings | Configure lifecycle behavior, notifications, and advanced options. |
104
+ | Remote Coding | Find the independent [Paseo companion](https://paseo.sh/docs) and its setup guidance. |
129
105
 
130
- `sks --mad` now prioritizes the interactive ready path: independent macOS config probes run concurrently, failed read-only preflight does not repeat mutation-capable repair inspection, and verified Codex evidence is reused. Existing unreadable or malformed config still blocks safely; pass an explicit repair flag such as `--repair-config` when repair is intended.
106
+ Connection controls appear first. Model catalogs, bridge diagnostics, and
107
+ advanced settings expand when you need them.
131
108
 
132
109
  ## Desktop Bridge
133
110
 
134
- SKS 8.2.0 uses a single local **Desktop Bridge** for managed Codex Desktop and
135
- CLI routing. ChatGPT OAuth stays in the Codex identity plane. Codex-LB and
136
- OpenRouter credentials are independent profiles that can be configured and
137
- validated simultaneously; changing one profile does not remove the other.
111
+ One local bridge manages routing for independent **Codex-LB** and **OpenRouter**
112
+ profiles. ChatGPT sign-in remains owned by Codex. Provider choices and existing
113
+ session pins remain authoritative; unavailable routes are reported explicitly.
138
114
 
139
- The bridge uses an atomically activated combined catalog and explicit route
140
- index. It never guesses a provider from a model name and never silently falls
141
- back. A missing or ambiguous route is a visible blocker. Provider-bound
142
- upstream requests strip incoming ChatGPT OAuth authorization; status and
143
- receipts contain only redacted credential metadata.
115
+ In **Connections**, turn on **Prefer Codex-LB** to use the saved Codex-LB
116
+ connection first for eligible models. The switch distinguishes a saved preference
117
+ from connection readiness: **on but unavailable** means setup needs attention.
118
+ Turning it off restores the configured official-model routing preference.
144
119
 
145
- ```sh
146
- sks bridge status --json
147
- sks bridge ensure --json
148
- sks bridge provider list --json
149
- sks bridge catalog sync --json
150
- sks bridge route explain <model> --json
151
- sks bridge verify --level transport --json
152
- ```
153
-
154
- Configure secrets through stdin only:
120
+ The same controls are available from the CLI:
155
121
 
156
122
  ```sh
157
- read -r -s codex_lb_key
158
- printf '\n'
159
- printf '%s\n' "$codex_lb_key" | \
160
- sks bridge provider configure codex-lb --host lb.example.com --api-key-stdin --json
161
- unset codex_lb_key
162
-
163
- read -r -s openrouter_key
164
- printf '\n'
165
- printf '%s\n' "$openrouter_key" | \
166
- sks bridge provider configure openrouter --api-key-stdin --json
167
- unset openrouter_key
123
+ sks bridge auth-priority status --json
124
+ sks bridge auth-priority on --json
125
+ sks bridge auth-priority off --json
126
+ sks bridge status --json
127
+ sks bridge route explain gpt-6-astra --json
168
128
  ```
169
129
 
170
- `sks codex-lb` is removed and returns `unknown_command`; it has no alias.
171
- Migration recognizes historical SKS-authored routing state only in a private,
172
- receipt-backed path. Ambiguous user-owned configuration fails closed. Use
173
- `sks bridge unmanage --confirm --json` or `sks bridge rollback <receipt-id>
174
- --confirm --json` only for explicit rollback/removal.
175
-
176
- ## Naruto Workflow
177
-
178
- `$sks-naruto` and `sks naruto run "task" --agents 8 --max-threads 12` use Codex official subagents. Standalone and Codex App tasks that request project-host database, spreadsheet, or render tools require the non-persistent `--trusted-project` flag after the operator reviews the checkout; an App session ID scopes evidence but does not grant trust. A standalone parent defaults to GPT-6 Astra Max; an active Codex task keeps its selected model. Tiny mechanical `worker` slices—including clear simple code, configuration, and setup changes—use Luna Max; ordinary UI, logic, backend, and native coding uses Astra High; review, testing, debugging, architecture, integration, security, database, research, release, and other judgment-sensitive work uses Astra Max; long-context scans, long-term memory, large-scale first-draft code processing, and direct Computer Use, Browser/Chrome, or image-generation execution use Astra Medium. Mixed execution/judgment work is split when possible, and unsplittable judgment defaults to Astra Max.
130
+ Enter credentials through the native connection dialog or the CLI's
131
+ `--api-key-stdin` option. See the [provider guide](docs/codex-lb.md) for
132
+ configuration, transport checks, and recovery commands.
179
133
 
180
- Fresh SKS-owned project config enables Codex multi-agent V2 with an effective
181
- cap of `agents.max_concurrent_threads_per_session = 256` children and
182
- `features.multi_agent_v2.max_concurrent_threads_per_session = 257` total
183
- threads, `max_depth = 1`, and `interrupt_message = true`. Nested delegation
184
- remains forbidden. An existing user-owned persisted preference of 1000 is
185
- preserved on disk but normalized at runtime to 256/257 with an explicit
186
- warning; it is not an entitlement to spawn 1000 children. Explicit
187
- `--agents` and `--max-threads` values above 256 are rejected.
134
+ ## Naruto workflow
188
135
 
189
- Naruto's automatic starting tiers are 4/6/8 children for ordinary work and 16
190
- for mass mechanical or exploration work. After decomposition, either lane may expand to the
191
- SKS-owned ceiling of 256 independent useful children. Explicit
192
- `--agents N` and `--max-threads N` values from 1 through 256 remain
193
- authoritative instead of being reduced to those automatic tiers. A first wave
194
- may reach 256 child slots only when independent ready work, disjoint ownership,
195
- verifier/tool capacity, and the external Codex/session host all permit it;
196
- otherwise Naruto records the exact active limiter and reuses returned capacity
197
- in later waves.
136
+ SKS uses official Codex subagents. The parent owns decomposition, integration,
137
+ and final verification; children receive bounded tasks and do not spawn children.
198
138
 
199
- `SKS_NARUTO_REMOTE_API_PARALLEL_BUDGET` declares a lower remote provider/API
200
- parallel-request budget for the governor. It cannot raise a lower external-host
201
- or session limit. The official Codex lane does not impose a local CPU/RAM or
202
- unmeasured API-default clamp; it follows an explicit provider budget and a
203
- measured host cap. The 256 ceiling is structural, not a recommendation or proof
204
- that 256 live agents were load-tested on the current host. The four GPT-5.6
205
- model profiles are routing lanes, not an agent-count limit.
206
-
207
- Gates are task-profile aware: greetings and answer-only turns create no mission gate; tiny work gets minimal verification; parallel work gets scoped ownership and verification; high-risk work keeps the full safety gates. `SubagentStart`/`SubagentStop` prove lifecycle only. Completion also requires `subagent-parent-summary.json` with one trustworthy structured outcome per thread, correlated with `subagent-events.jsonl` and `subagent-evidence.json`.
208
-
209
- Every installed Codex hook runs one common Naruto decision gate. The gate records `none`, `generic_naruto`, or `route_owned`: Answer, DFix, Wiki, Computer Use, Goal, and simple Git/control turns stay lightweight; ordinary non-trivial work defaults to two independent official subagents; critical work spanning at least three risk domains may use three. Research, AutoResearch, and QA-Loop retain their own exact orchestration contracts instead of receiving a second generic fan-out. Explicit `--agents N` remains authoritative.
210
-
211
- SKS installs twenty-five narrow project custom agents, including native AppKit, toolchain, protocol, runtime-reliability, TriWiki-evidence, long-context, Computer Use, Browser/Chrome, and image-generation specialists. Delegation prompts inject at most the three roles recommended for the current goal rather than serializing the full catalog, so expanding role coverage does not serialize the full inventory into every prompt. TriWiki context is also bounded and query-aware: ordinary work receives up to four trust/hydration anchors and complex, parallel, or high-risk work receives up to six, with source hydration required before relying on lower-trust hints. Official event evidence and the parent verdict—not display state—determine completion.
212
-
213
- Official subagent requests use `--agents`; removed scheduler, pool, backend, and model flags fail closed.
214
-
215
- ## Embedding SKS In Another Agent System
216
-
217
- For Bridge-managed routing, the bridge owns provider selection and credential
218
- isolation; adapters must not write a competing global routing configuration.
219
- ChatGPT OAuth remains Codex-owned, while provider secrets stay inside their
220
- bridge profiles. An adapter can still run Naruto normally:
139
+ | Work | Managed model | Effort |
140
+ | --- | --- | --- |
141
+ | Tiny mechanical tasks | GPT-5.6 Luna | max |
142
+ | Exploration, large-context reads, and direct tool operation | GPT-6 Astra | medium |
143
+ | Implementation | GPT-6 Astra | high |
144
+ | Review, debugging, and focused judgment | GPT-6 Astra | max |
221
145
 
222
- ```sh
223
- sks naruto run "task" --agents 2 --json
224
- ```
146
+ An active Codex task keeps the user's selected main model, effort, and service
147
+ tier. Codex native `/goal` remains the persisted goal owner. Parallelism depends
148
+ on useful independent work and the host's available capacity.
225
149
 
226
- | Surface | Flag | Effect |
227
- | --- | --- | --- |
228
- | Parent model / effort | `--parent-model`, `--parent-effort` | Overrides the parent policy when the current host allows it. |
229
- | Subagent model / effort | `--subagent-model`, `--subagent-effort` | Overrides the default subagent policy when the current host allows it. |
230
- | Bridge state | `sks bridge status --json` | Returns secret-free routing/readiness state for the host to inspect. |
231
-
232
- Guarantees this contract makes:
233
-
234
- - **SKS never logs or serializes bridge credentials.** Provider operations accept
235
- secrets through stdin and record only redacted metadata.
236
- - **Ambiguous routing blocks the run.** SKS does not silently select another
237
- profile, provider, or model when a requested route cannot be resolved.
238
- - **Bridge state is not live proof.** Real provider/OAuth/Desktop evidence must
239
- be collected separately for a release claim.
240
-
241
- ### Designing an adapter that wraps SKS without fighting it
242
-
243
- The rule that keeps an adapter conflict-free: **let SKS own the mission, the evidence, and the gates; let the host own the credential, the model policy, and the workspace.** Cross that line — by patching `dist/`, writing `.sneakoscope/` yourself, or re-implementing the gate DAG — and every SKS update breaks you.
244
-
245
- ```ts
246
- // acas/adapters/sks.ts — one process boundary, no dist patching.
247
- import { execFile } from 'node:child_process'
248
- import { promisify } from 'node:util'
249
-
250
- const run = promisify(execFile)
251
-
252
- export interface SksMissionRequest {
253
- workspace: string // host owns the checkout
254
- task: string
255
- agents?: number
256
- tenant: {
257
- parentModel?: string
258
- subagentModel?: string
259
- }
260
- }
261
-
262
- export async function runSksMission(request: SksMissionRequest) {
263
- const { stdout } = await run('sks', [
264
- 'naruto', 'run', request.task,
265
- '--json',
266
- ...(request.agents ? ['--agents', String(request.agents)] : []),
267
- ...(request.tenant.parentModel ? [`--parent-model=${request.tenant.parentModel}`] : []),
268
- ...(request.tenant.subagentModel ? [`--subagent-model=${request.tenant.subagentModel}`] : [])
269
- ], {
270
- cwd: request.workspace,
271
- maxBuffer: 64 * 1024 * 1024
272
- })
273
- // SKS answers with its own result schema; treat it as the source of truth for
274
- // status and evidence rather than re-deriving success from stdout text.
275
- return JSON.parse(stdout)
276
- }
277
- ```
150
+ See the [Naruto guide](docs/naruto.md) for explicit agent counts, role preferences,
151
+ trust boundaries, and completion evidence.
278
152
 
279
- Then read the outcome through SKS's own surfaces instead of inferring it:
153
+ ## Project context
280
154
 
281
155
  ```sh
282
- sks naruto proof --json # completion proof, blockers, evidence links
283
- sks triwiki graph-status --fast --json # is the compiled graph usable right now (no git, no spawn)
284
- sks search context "..." --json # evidence-backed context with reason paths
156
+ sks align run
157
+ sks search context "How does authentication routing work?" --json
158
+ sks wiki validate .sneakoscope/wiki/context-pack.json --json
285
159
  ```
286
160
 
287
- `graph-status --fast` is the probe to poll from a host loop: it reads the stored
288
- artifacts only, so it costs no subprocess, and it reports which staleness reasons
289
- it could not evaluate rather than returning a `fresh` that means less than it
290
- looks. Drop `--fast` when you want the full git-aware verdict.
161
+ `align` rebuilds the repository navigation graph and its context projections.
162
+ These are generated local caches; refresh them after material changes. See the
163
+ [Context Graph guide](docs/architecture/context-graph.md) for source lookup and
164
+ freshness semantics.
291
165
 
292
- Adapter rules that keep updates safe:
293
-
294
- 1. **One process boundary.** Shell out to the `sks` CLI with `--json`. Do not import SKS internals; they are not a published API and they move.
295
- 2. **Never patch `dist/`.** A local patch is overwritten by every install and is asserted against by release gates. If a behaviour you need is missing, it belongs behind a flag like the ones above.
296
- 3. **Host owns the workspace, SKS owns `.sneakoscope/`.** Write your own state anywhere else; treat `.sneakoscope/` as SKS-owned and read-only from outside.
297
- 4. **Do not write routing state.** Use `sks bridge` for explicit profile and route operations; keep provider secrets out of adapter argv, logs, and local state.
298
- 5. **Let the gates fail.** A blocked mission with blockers is a correct answer. Do not retry it with safety flags off, and do not treat `--trusted-project` as a default — it is an operator decision about a reviewed checkout.
299
- 6. **Do not pin a version in your own docs or error strings.** Ask for the official latest stable release and read the capability report; SKS enforces this on itself with the `latest-version:guidance` gate.
300
- 7. **Parallelism advice is advisory.** `sks naruto` decides its own wave shape; if you plan slices yourself, check them against the graph advisory rather than assuming disjointness.
301
-
302
- ## Why Not Just An LLM Reviewer?
303
-
304
- | Question | Oracle-style LLM review | SKS gate/review |
305
- | --- | --- | --- |
306
- | Did tests/typecheck fail? | Another model may say so. | Machine check output is tagged `evidence: machine`. |
307
- | Are findings ranked? | Usually one blended opinion. | Machine evidence sorts before LLM findings. |
308
- | Can work stop? | The model decides. | Safety gates decide (`essential`, default: a finished turn finishes; `strict` adds Stop gates, Completion Proof, and Honest Mode). |
309
- | Can I inspect agent-thread progress? | Usually no runtime UI. | Use the official Codex subagent/thread surfaces and their proof artifacts. |
310
-
311
- ## Demo
312
-
313
- The reproducible VHS script lives at [docs/demo.tape](https://github.com/mandarange/Sneakoscope-Codex/blob/main/docs/demo.tape).
314
-
315
- ```sh
316
- vhs docs/demo.tape
317
- ```
166
+ ## Requirements
318
167
 
319
- It shows the current quickstart flow: one-line install, `$sks-plan`, `sks review`, `sks status --json`, and an official `$sks-naruto` subagent run.
168
+ - Node.js **20.11 or newer** and npm.
169
+ - Git for repository workflows and reviews.
170
+ - The latest stable Codex CLI or supported desktop host; capabilities are checked at runtime.
171
+ - macOS for the native menu bar and Center. Linux and Windows CLI support is best-effort.
320
172
 
321
- ## Proof Surfaces
173
+ ## Documentation
322
174
 
323
- - Official subagents: `sks naruto run "task" --agents 14 --max-threads 12 [--trusted-project] --json`
324
- - Review report: `.sneakoscope/reports/review-report.json`
325
- - Harness benchmark: `.sneakoscope/reports/harness-benchmark.json`
326
- - Project memory: `sks memory build`
327
- - Codebase index/pack for LLM context: `sks align run` (wiki/pack rebuild SSOT; `sks wiki refresh --code` aliases into align), `sks wiki validate --json`
328
- - Native capability repair: `sks doctor --fix` (imagegen/Computer Use/Browser Use), `.sneakoscope/reports/native-capability-readiness.json`
329
- - Desktop Bridge: `sks bridge status --json`, `sks bridge route explain <model> --json`, and `sks bridge verify --level transport --json` report service, explicit routing, and staged transport truth. A configured profile or catalog is not routing proof, and a missing route never silently falls back.
330
- - Agent bridge for any agent system: `sks mcp-server`, `sks agent-bridge setup`, `SKS_AGENT_MODE=1` — see [docs/AGENT-BRIDGE.md](https://github.com/mandarange/Sneakoscope-Codex/blob/main/docs/AGENT-BRIDGE.md)
331
- - Release gates: `npm run release:check:affected` for ordinary change-aware verification and `npm run release:check:confidence` for the final local confidence pass. Release claims still require target-bound real evidence for macOS lifecycle, OAuth preservation, both provider profiles, WebSocket protocol/frame truth, and deep artifacts; Paseo installation or pairing is not SKS release evidence, and documentation and fixtures do not satisfy protected gates.
332
- - Direct npm publication: run `npm run release:check:full` (it creates the current clean-HEAD pack receipt), then publish from a clean `main` checkout that exactly matches `origin/main`. The Git release tag may be created afterward, and stage-only physical receipts do not block this direct path. The staged/OIDC workflow still requires all four source-bound physical receipts, exact tag proof, and its authenticated review gates.
333
- - Release evidence boundaries: [docs/release-readiness.md](https://github.com/mandarange/Sneakoscope-Codex/blob/main/docs/release-readiness.md), [docs/release-proof-truth.md](https://github.com/mandarange/Sneakoscope-Codex/blob/main/docs/release-proof-truth.md), and [CHANGELOG.md](https://github.com/mandarange/Sneakoscope-Codex/blob/main/CHANGELOG.md). Local configuration, fixtures, and diagnostics are not live release proof.
334
- - Image generation review routes require Codex App `$imagegen`/`gpt-image-2` evidence with recorded output hashes; direct API fallback and mock fixtures do not satisfy full route gates.
175
+ - [Product contract](docs/PRODUCT-CONTRACT.md) supported surfaces and ownership.
176
+ - [Essential Trust](docs/essential-trust.md) — verification profiles and safety boundaries.
177
+ - [Astra guidance](docs/astra-guidance.md) — how SKS applies the official model recommendations.
178
+ - [Agent Bridge](docs/AGENT-BRIDGE.md) integrate through the CLI or MCP interface.
179
+ - [Release readiness](docs/release-readiness.md) build, verify, and publish a release.
180
+ - [Release evidence](docs/release-proof-truth.md) what each verification result proves.
181
+ - [Changelog](CHANGELOG.md) changes by version.
335
182
 
336
- ## Requirements
183
+ For development: `npm ci --ignore-scripts`, then `npm run build`.
184
+ Use `npm run typecheck` and `npm test` to verify changes; follow the release guide
185
+ before publication.
337
186
 
338
- - Node.js `>=20.11`
339
- - Git for diff/review and release proof
340
- - macOS optional: menu bar integration and `/usr/bin/open`
341
- - The menubar icon shows and hides itself automatically as the Codex desktop app launches/quits; set `quit_with_codex: true` in `~/.codex/sks-menubar/config.json` to have the menubar fully quit with Codex instead of just hiding (default `false`).
342
- - Native input dialogs and the bridge CLI pass provider secrets via `--api-key-stdin`, never a visible Terminal command or process argument.
343
- - Codex Desktop keeps `~/.codex/auth.json` byte/semantic-preserved. Desktop Bridge strips incoming OAuth authorization before either provider upstream request.
344
- - Providers displays one bridge runtime, two independent profile rows, a combined catalog, explicit routes, and a scoped capability matrix. A status row is not a claim that a credential, WebSocket frame, or deep feature has been proven live.
345
- - Migration recognizes historical SKS-authored values privately, writes a redacted receipt, and fails closed on user-owned/ambiguous configuration. It does not reactivate a legacy mode or create a legacy directory.
346
- - `sks bridge unmanage --confirm` and `sks bridge rollback <receipt-id> --confirm` are explicit recovery actions; neither deletes newer credentials or OAuth state.
347
- - The provider services remain independently operated. SKS never deploys them, changes remote credentials, or silently substitutes one profile for another.
348
- - Full release proof remains `not-run-real` until fresh target-bound evidence covers the real Desktop service/UI, OAuth preservation, both provider profiles, staged WebSocket verification, and each claimed deep artifact.
349
- - Update installs stop and verify every prior Menu Bar process before replacement, rebuild the companion from the newly installed SKS package, bootstrap it, and require exactly one running process whose version probe equals the current package version.
350
- - The menubar dropdown's `View Last Log` item opens the most recent background action's log file, so you don't need to keep a Terminal window open to see command output.
351
- - `Manage MCP Servers…` provides a resizable native table and add/remove/enable/disable controls for global Codex MCP configuration. Secret environment values and command arguments are accepted through native dialogs/stdin but omitted from list output and logs.
352
- - `sks menubar status --json` reports a `codex_sync` object with `bundle_id`, `codex_running`, and `icon_visible_expected` to show Codex-lifecycle detection state.
353
- - The menu displays the installed Codex CLI version, adds an `⬆` status icon when `sks codex update-status` sees a newer release, runs the official self-updater through `Update Codex CLI Now`, and exposes `Run sks doctor --fix` as a background repair action.
354
- - **Codex Fast** is labeled as the official 1.5× Codex speed option, with a verified service-tier status row and direct On/Off actions. Center explains that ChatGPT-sign-in GPT-5.6/GPT-5.5 use 2.5× Standard credits and GPT-5.4 uses 2×, while API-key token pricing and API Priority processing are separate. Model selection, Codex-Spark, and reasoning effort remain independent; status failures render as unavailable with neither choice falsely selected.
355
- - If Codex shows `[No tool output found for custom tool call ...]`, retry or recover in the same thread when possible; move to a new task only if recovery fails. SKS never rewrites session JSONL or fabricates a successful tool output.
356
- - Product naming triangle: **Sneakoscope Codex** (product) / **`sks`** (CLI) / **`sneakoscope`** (npm). Official hosts are Codex CLI and ChatGPT Desktop equally; Cursor and other editors are best-effort only. macOS is fully supported (CLI + Menu Bar/Center); Linux/Windows are CLI best-effort. Product UI/docs language SSOT is English. Support: GitHub Issues. Contract ledger: [docs/AMBIGUITY-RESOLUTIONS.md](https://github.com/mandarange/Sneakoscope-Codex/blob/main/docs/AMBIGUITY-RESOLUTIONS.md) and [docs/PRODUCT-CONTRACT.md](https://github.com/mandarange/Sneakoscope-Codex/blob/main/docs/PRODUCT-CONTRACT.md).
187
+ Questions or bugs? [Open an issue](https://github.com/mandarange/Sneakoscope-Codex/issues).
357
188
 
358
189
  ## License
359
190
 
360
- MIT
191
+ [MIT](LICENSE)
@@ -259,7 +259,7 @@ dependencies = [
259
259
 
260
260
  [[package]]
261
261
  name = "sks-core"
262
- version = "10.1.0"
262
+ version = "10.1.2"
263
263
  dependencies = [
264
264
  "globset",
265
265
  "grep-matcher",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "sks-core"
3
- version = "10.1.0"
3
+ version = "10.1.2"
4
4
  edition = "2021"
5
5
 
6
6
  [dependencies]
@@ -95,7 +95,7 @@ const COMMAND_MANIFEST_LITE_BASE = [
95
95
  { name: 'perf', summary: 'Run performance checks', maturity: 'beta' },
96
96
  { name: 'bench', summary: 'Run core trust-kernel benchmark budgets', maturity: 'beta' },
97
97
  { name: 'mcp-server', summary: 'Run a stdio MCP server exposing SKS commands as tools for MCP-capable agent hosts', maturity: 'beta', skipMigrationGate: true, allowedDuringActiveRoute: true },
98
- { name: 'agent-bridge', summary: 'Publish the agent-bridge manifest and print host registration snippets for external agent systems', maturity: 'beta', readonly: true, diagnostic: true }
98
+ { name: 'agent-bridge', summary: 'Register SKS tools or run read-only tools with native Astra async calling', maturity: 'beta', readonly: true, diagnostic: true }
99
99
  ];
100
100
  const SAFE_COMMAND_CONTRACT_LITE = {
101
101
  risk: 'R2',
@@ -247,7 +247,7 @@ const COMMAND_DEFINITIONS = {
247
247
  allowedDuringActiveRoute: true,
248
248
  activeRoutePolicy: 'always'
249
249
  }),
250
- 'agent-bridge': readOnly(entry('beta', 'Publish the agent-bridge manifest and print host registration snippets for external agent systems', 'dist/core/commands/agent-bridge-command.js', subcommand(() => import('../core/commands/agent-bridge-command.js'), 'agentBridgeCommand', 'dist/core/commands/agent-bridge-command.js', 'setup')))
250
+ 'agent-bridge': readOnly(entry('beta', 'Register SKS tools or run read-only tools with native Astra async calling', 'dist/core/commands/agent-bridge-command.js', subcommand(() => import('../core/commands/agent-bridge-command.js'), 'agentBridgeCommand', 'dist/core/commands/agent-bridge-command.js', 'setup')))
251
251
  };
252
252
  const COMMANDS_WITH_LEGACY_CONTRACT_OVERRIDES = applyCommandContractOverrides(COMMAND_DEFINITIONS, {
253
253
  align: { latency: 'long', supportsJson: true, inputProfile: 'json-only' },
@@ -302,7 +302,7 @@ export function safeReadOnlySubcommand(command, args) {
302
302
  if (command === 'mcp' && sub === 'config' && ['list', 'test', 'backups', 'show'].includes(nested)) {
303
303
  return !args.some((arg) => ['--fix', '--yes', '-y', '--write', '--apply', '--execute', '--force', '--real'].includes(String(arg)));
304
304
  }
305
- if (command === 'codex-app' && sub === 'context-1m' && (nested === 'status' || nested === '' || nested.startsWith('--'))) {
305
+ if (command === 'codex-app' && ['context-1m', 'context-management'].includes(sub) && (nested === 'status' || nested === '' || nested.startsWith('--'))) {
306
306
  return !args.some((arg) => ['--fix', '--yes', '-y', '--write', '--apply', '--execute', '--force', '--real'].includes(String(arg)));
307
307
  }
308
308
  if (command === 'remote' && ['readiness', 'status', 'show'].includes(sub)) {
@@ -14,6 +14,17 @@ import { restartCodexApp } from '../core/codex-app/codex-app-restart.js';
14
14
  import { resetRoleModelPreference, roleModelPreferencesStatus, setRoleModelPreference } from '../core/subagents/role-model-preferences.js';
15
15
  export async function run(_command, args = []) {
16
16
  const action = args[0] || 'check';
17
+ if (action === 'context-management') {
18
+ const { contextManagementCommand } = await import('../core/codex-app/context-management-command.js');
19
+ const result = await contextManagementCommand(args.slice(1));
20
+ if (flag(args, '--json'))
21
+ printJson(result);
22
+ else
23
+ console.log(`${result.ok ? (result.enabled ? 'Enabled' : 'Disabled') : 'Unavailable'}: ${result.message}`);
24
+ if (!result.ok)
25
+ process.exitCode = 1;
26
+ return;
27
+ }
17
28
  if (action === 'restart')
18
29
  return printCodexAppResult(args, await restartCodexApp());
19
30
  if (action === 'context-1m') {
@@ -137,7 +148,7 @@ export async function run(_command, args = []) {
137
148
  process.exitCode = 1;
138
149
  return;
139
150
  }
140
- console.error('Usage: sks codex-app check|status|restart|context-1m [status|on|off] [--no-restart]|harness-matrix|skill-sync|agent-role-sync|init-deep|hook-lifecycle|execution-profile|role-models|set-role-model --role <name> [--provider <id>] --model <catalog-slug> --reasoning <effort>|reset-role-model --role <name>|product-design [--check-only]|ensure-product-design|chrome-extension|pat status|remote-control [--json]');
151
+ console.error('Usage: sks codex-app check|status|restart|context-management [status|on|off]|context-1m [status|on|off] [--no-restart]|harness-matrix|skill-sync|agent-role-sync|init-deep|hook-lifecycle|execution-profile|role-models|set-role-model --role <name> [--provider <id>] --model <catalog-slug> --reasoning <effort>|reset-role-model --role <name>|product-design [--check-only]|ensure-product-design|chrome-extension|pat status|remote-control [--json]');
141
152
  console.error('Provider routing moved to: sks bridge provider configure|validate|enable; sks bridge catalog sync; sks bridge route set-default.');
142
153
  process.exitCode = 1;
143
154
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schema": "sks.skills-manifest.v1",
3
- "package_version": "10.1.0",
3
+ "package_version": "10.1.2",
4
4
  "skills": [
5
5
  {
6
6
  "canonical_name": "sks",