sneakoscope 8.1.2 → 8.1.3

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 (255) hide show
  1. package/README.md +90 -54
  2. package/crates/sks-core/Cargo.lock +1 -1
  3. package/crates/sks-core/Cargo.toml +1 -1
  4. package/dist/bin/fast-inline.js +5 -51
  5. package/dist/cli/command-manifest-lite.js +2 -1
  6. package/dist/cli/command-registry.js +2 -1
  7. package/dist/cli/global-mode-router.js +1 -1
  8. package/dist/cli/install-helpers-codex-lb-config.js +112 -914
  9. package/dist/cli/install-helpers-codex-lb-shared.js +3 -44
  10. package/dist/cli/install-helpers-install-support.js +4 -20
  11. package/dist/cli/install-helpers.js +36 -2716
  12. package/dist/cli/router.js +9 -9
  13. package/dist/commands/bridge-command-output.js +111 -0
  14. package/dist/commands/bridge.js +320 -0
  15. package/dist/commands/codex-app.js +39 -123
  16. package/dist/commands/doctor-helpers.js +380 -0
  17. package/dist/commands/doctor-profile.js +3 -0
  18. package/dist/commands/doctor.js +114 -873
  19. package/dist/commands/mad-sks.js +0 -4
  20. package/dist/config/skills-manifest.json +1 -1
  21. package/dist/core/agents/agent-effort-policy.js +11 -21
  22. package/dist/core/agents/agent-recursion-guard.js +26 -0
  23. package/dist/core/agents/agent-runner-codex-exec.js +7 -9
  24. package/dist/core/architecture-hardening/contracts/contracts.js +225 -161
  25. package/dist/core/architecture-hardening/state/state-service.js +49 -13
  26. package/dist/core/auto-review.js +15 -9
  27. package/dist/core/codex/codex-config-guard.js +8 -0
  28. package/dist/core/codex-adapter.js +8 -10
  29. package/dist/core/codex-app/codex-app-fast-ui-repair.js +7 -29
  30. package/dist/core/codex-app/codex-app-launcher.js +10 -12
  31. package/dist/core/codex-app/codex-app-restart.js +10 -12
  32. package/dist/core/codex-app/menubar/constants.js +2 -5
  33. package/dist/core/codex-app/menubar/global-install.js +3 -2
  34. package/dist/core/codex-app/menubar/installer/result.js +23 -0
  35. package/dist/core/codex-app/menubar/installer/runtime.js +28 -0
  36. package/dist/core/codex-app/menubar/installer.js +5 -96
  37. package/dist/core/codex-app/menubar/migration.js +1 -42
  38. package/dist/core/codex-app/openrouter-provider.js +0 -78
  39. package/dist/core/codex-app.js +97 -360
  40. package/dist/core/codex-control/codex-app-server-runtime-env.js +8 -28
  41. package/dist/core/codex-control/codex-current-image-path-real-probe.js +2 -3
  42. package/dist/core/codex-control/codex-current-web-search-probe.js +2 -3
  43. package/dist/core/codex-control/codex-sdk-adapter.js +5 -48
  44. package/dist/core/codex-control/codex-task-runner.js +16 -60
  45. package/dist/core/codex-control/desktop-bridge-launch-guard.js +227 -0
  46. package/dist/core/codex-exec-output-schema.js +11 -13
  47. package/dist/core/codex-lb/bridge-contracts.js +2 -0
  48. package/dist/core/codex-lb/bridge-runtime-validation/capability.js +104 -0
  49. package/dist/core/codex-lb/bridge-runtime-validation/catalog.js +52 -0
  50. package/dist/core/codex-lb/bridge-runtime-validation/shared.js +109 -0
  51. package/dist/core/codex-lb/bridge-runtime-validation/status.js +250 -0
  52. package/dist/core/codex-lb/bridge-runtime-validation.js +106 -0
  53. package/dist/core/codex-lb/capability-runner.js +505 -201
  54. package/dist/core/codex-lb/codex-lb-env.js +179 -12
  55. package/dist/core/codex-lb/combined-catalog/builder.js +86 -0
  56. package/dist/core/codex-lb/combined-catalog/contracts.js +5 -0
  57. package/dist/core/codex-lb/combined-catalog/normalize.js +170 -0
  58. package/dist/core/codex-lb/combined-catalog/persistence.js +207 -0
  59. package/dist/core/codex-lb/combined-catalog/shared.js +12 -0
  60. package/dist/core/codex-lb/combined-catalog/storage.js +171 -0
  61. package/dist/core/codex-lb/combined-catalog.js +12 -0
  62. package/dist/core/codex-lb/desktop-bridge/client.js +4 -1
  63. package/dist/core/codex-lb/desktop-bridge/header-policy.js +48 -63
  64. package/dist/core/codex-lb/desktop-bridge/http-forward.js +115 -83
  65. package/dist/core/codex-lb/desktop-bridge/launchd.js +20 -13
  66. package/dist/core/codex-lb/desktop-bridge/location-rewrite.js +4 -1
  67. package/dist/core/codex-lb/desktop-bridge/security.js +381 -267
  68. package/dist/core/codex-lb/desktop-bridge/server.js +148 -19
  69. package/dist/core/codex-lb/desktop-bridge/state.js +56 -70
  70. package/dist/core/codex-lb/desktop-bridge/types.js +6 -1
  71. package/dist/core/codex-lb/desktop-bridge/websocket-forward.js +281 -106
  72. package/dist/core/codex-lb/desktop-bridge-migration/historical-config.js +245 -0
  73. package/dist/core/codex-lb/desktop-bridge-migration/historical-toml.js +56 -0
  74. package/dist/core/codex-lb/desktop-bridge-migration/metadata.js +73 -0
  75. package/dist/core/codex-lb/desktop-bridge-migration/receipt.js +52 -0
  76. package/dist/core/codex-lb/desktop-bridge-migration/retired-runtime-cleanup.js +106 -0
  77. package/dist/core/codex-lb/desktop-bridge-migration/types.js +1 -0
  78. package/dist/core/codex-lb/desktop-bridge-migration.js +238 -0
  79. package/dist/core/codex-lb/desktop-controller-v3/catalog.js +257 -0
  80. package/dist/core/codex-lb/desktop-controller-v3/diagnostics.js +62 -0
  81. package/dist/core/codex-lb/desktop-controller-v3/lifecycle-commands.js +203 -0
  82. package/dist/core/codex-lb/desktop-controller-v3/live-probes.js +293 -0
  83. package/dist/core/codex-lb/desktop-controller-v3/preflight-probes.js +144 -0
  84. package/dist/core/codex-lb/desktop-controller-v3/provider-commands.js +182 -0
  85. package/dist/core/codex-lb/desktop-controller-v3/shared.js +279 -0
  86. package/dist/core/codex-lb/desktop-controller-v3/status.js +269 -0
  87. package/dist/core/codex-lb/desktop-controller-v3/types.js +1 -0
  88. package/dist/core/codex-lb/desktop-controller-v3/verification.js +89 -0
  89. package/dist/core/codex-lb/desktop-controller-v3.js +67 -0
  90. package/dist/core/codex-lb/desktop-controller.js +2 -1730
  91. package/dist/core/codex-lb/desktop-service.js +462 -627
  92. package/dist/core/codex-lb/migration-receipt.js +560 -118
  93. package/dist/core/codex-lb/probes/auxiliary-surfaces-probe.js +37 -53
  94. package/dist/core/codex-lb/probes/bridge-probe.js +125 -64
  95. package/dist/core/codex-lb/probes/catalog-probe.js +36 -136
  96. package/dist/core/codex-lb/probes/computer-use-probe.js +63 -39
  97. package/dist/core/codex-lb/probes/image-generation-probe.js +98 -41
  98. package/dist/core/codex-lb/probes/probe-evidence.js +32 -33
  99. package/dist/core/codex-lb/probes/voice-realtime-probe.js +69 -43
  100. package/dist/core/codex-lb/provider-credentials/configuration.js +127 -0
  101. package/dist/core/codex-lb/provider-credentials/locks.js +11 -0
  102. package/dist/core/codex-lb/provider-credentials/private-snapshot.js +28 -0
  103. package/dist/core/codex-lb/provider-credentials/removal.js +33 -0
  104. package/dist/core/codex-lb/provider-credentials/resolution.js +59 -0
  105. package/dist/core/codex-lb/provider-credentials/runtime.js +55 -0
  106. package/dist/core/codex-lb/provider-credentials/types.js +1 -0
  107. package/dist/core/codex-lb/provider-credentials/validation-store.js +137 -0
  108. package/dist/core/codex-lb/provider-credentials.js +5 -0
  109. package/dist/core/codex-lb/provider-registry.js +323 -0
  110. package/dist/core/codex-lb/provider-route-policy.js +118 -0
  111. package/dist/core/codex-lb/request-route-resolver.js +172 -0
  112. package/dist/core/codex-lb/route-index.js +148 -0
  113. package/dist/core/codex-lb/trusted-deep-evidence.js +158 -286
  114. package/dist/core/commands/basic-cli.js +1 -1
  115. package/dist/core/commands/check-command.js +3 -10
  116. package/dist/core/commands/gate-result-contract.js +10 -14
  117. package/dist/core/commands/intent-normalization/normalizer.js +1 -1
  118. package/dist/core/commands/mad-sks-command.js +2 -6
  119. package/dist/core/commands/release-command.js +11 -1
  120. package/dist/core/doctor/doctor-readiness-matrix.js +9 -7
  121. package/dist/core/doctor/skill-legacy-surface.js +5 -5
  122. package/dist/core/evidence/v2/evidence-key.js +30 -3
  123. package/dist/core/feature-fixtures.js +8 -1
  124. package/dist/core/feature-registry.js +3 -2
  125. package/dist/core/hooks-runtime/subagent-context.js +15 -1
  126. package/dist/core/hooks-runtime/subagent-skill-availability-contract.js +1 -1
  127. package/dist/core/hooks-runtime/tool-output-quarantine.js +1 -1
  128. package/dist/core/hooks-runtime.js +73 -87
  129. package/dist/core/image-ux-review/imagegen-adapter.js +108 -94
  130. package/dist/core/image-ux-review/real-callout-extractor.js +144 -14
  131. package/dist/core/imagegen/desktop-bridge-imagegen-target.js +77 -0
  132. package/dist/core/imagegen/imagegen-capability.js +43 -151
  133. package/dist/core/init/skills/filesystem.js +89 -0
  134. package/dist/core/init/skills/inventory.js +97 -0
  135. package/dist/core/init/skills/manifest.js +151 -0
  136. package/dist/core/init/skills.js +5 -325
  137. package/dist/core/init.js +0 -63
  138. package/dist/core/install/installed-package-smoke.js +1 -1
  139. package/dist/core/managed-assets/managed-assets-manifest.js +0 -1
  140. package/dist/core/policy/latest-version-guidance.js +15 -2
  141. package/dist/core/preflight/parallel-preflight-engine.js +27 -51
  142. package/dist/core/provider/provider-badge.js +9 -4
  143. package/dist/core/provider/provider-context.js +57 -107
  144. package/dist/core/providers/openrouter/openrouter-account.js +3 -1
  145. package/dist/core/providers/openrouter/openrouter-secret-store.js +91 -22
  146. package/dist/core/release/desktop-bridge-release-evidence.js +457 -0
  147. package/dist/core/release/gate-manifest.js +0 -1
  148. package/dist/core/release/main-push-guard.js +13 -0
  149. package/dist/core/release/main-push-receipt.js +11 -0
  150. package/dist/core/release/physical-release-gates.js +664 -61
  151. package/dist/core/release/publish-preflight.js +3 -3
  152. package/dist/core/release/release-gate-batch-runner.js +19 -6
  153. package/dist/core/release/release-gate-dag.js +33 -6
  154. package/dist/core/release/release-gate-node.js +1 -3
  155. package/dist/core/release/release-gate-output-contract.js +55 -0
  156. package/dist/core/release/release-pack-contract.js +1 -1
  157. package/dist/core/release/release-pack-receipt.js +209 -8
  158. package/dist/core/release/release-real-contract.js +1 -1
  159. package/dist/core/release/stage-publish.js +106 -28
  160. package/dist/core/retention/temp-lease.js +204 -0
  161. package/dist/core/retention.js +18 -195
  162. package/dist/core/routes.js +1 -2
  163. package/dist/core/safety/intent-contract/intent-contract.js +3 -3
  164. package/dist/core/subagents/naruto-host-credentials.js +6 -1
  165. package/dist/core/subagents/official-subagent-config.js +27 -9
  166. package/dist/core/subagents/official-subagent-runner.js +14 -31
  167. package/dist/core/subagents/wave-lifecycle.js +36 -8
  168. package/dist/core/subagents/wave-parent-guidance.js +2 -1
  169. package/dist/core/triwiki/context-graph/compiler/index.js +18 -18
  170. package/dist/core/update/update-migration-state/fast-mode-config.js +172 -0
  171. package/dist/core/update/update-migration-state/session-state-split.js +247 -0
  172. package/dist/core/update/update-migration-state/simple-stages.js +46 -0
  173. package/dist/core/update/update-migration-state.js +4 -481
  174. package/dist/core/version.js +1 -1
  175. package/dist/native/sks-menubar/Sources/OperationCoordinator.swift +28 -4
  176. package/dist/native/sks-menubar/Sources/OperationModels.swift +112 -2
  177. package/dist/native/sks-menubar/Sources/ProviderRouteExplanation.swift +21 -0
  178. package/dist/native/sks-menubar/Sources/ProvidersBridgeCatalog.swift +140 -0
  179. package/dist/native/sks-menubar/Sources/ProvidersOpenRouter.swift +107 -470
  180. package/dist/native/sks-menubar/Sources/ProvidersReliability.swift +27 -197
  181. package/dist/native/sks-menubar/Sources/ProvidersRoutingTruth.swift +335 -269
  182. package/dist/native/sks-menubar/Sources/ProvidersViewController.swift +233 -437
  183. package/dist/native/sks-menubar/Sources/SecureProcessEnvelope.swift +27 -9
  184. package/dist/scripts/canonical-test-runner.js +7 -1
  185. package/dist/scripts/check-runtime-schemas.js +7 -2
  186. package/dist/scripts/codex-sdk-real-smoke-check.js +3 -1
  187. package/dist/scripts/desktop-bridge-capabilities-check.js +123 -0
  188. package/dist/scripts/{codex-lb-desktop-bridge-latency-check.js → desktop-bridge-latency-check.js} +61 -16
  189. package/dist/scripts/desktop-bridge-real-evidence-check.js +64 -0
  190. package/dist/scripts/{codex-lb-desktop-bridge-check.js → desktop-bridge-transport-check.js} +92 -155
  191. package/dist/scripts/desktop-bridge-transport-client.js +116 -0
  192. package/dist/scripts/desktop-bridge-unification-check.js +276 -0
  193. package/dist/scripts/doctor-fixes-codex-app-fast-ui-check.js +12 -8
  194. package/dist/scripts/gate-policy-audit-check.js +52 -2
  195. package/dist/scripts/provider-badge-context-check.js +55 -12
  196. package/dist/scripts/publish-preflight.js +1 -2
  197. package/dist/scripts/release-affected-selector-check.js +1 -2
  198. package/dist/scripts/release-aggressive-resource-governor-check.js +1 -1
  199. package/dist/scripts/release-cache-glob-hashing-check.js +1 -0
  200. package/dist/scripts/release-cache-version-neutral-fixture-check.js +1 -0
  201. package/dist/scripts/release-full-parallelism-blackbox.js +1 -1
  202. package/dist/scripts/release-gate-batch-runner-check.js +9 -0
  203. package/dist/scripts/release-gate-dag-runner-check.js +6 -0
  204. package/dist/scripts/release-gate-dag-runner.js +4 -2
  205. package/dist/scripts/release-metadata-check.js +16 -3
  206. package/dist/scripts/release-pack-receipt.js +29 -6
  207. package/dist/scripts/release-physical-gates-check.js +39 -0
  208. package/dist/scripts/release-real-check.js +7 -5
  209. package/package.json +6 -8
  210. package/release-gates.v2.json +156 -157
  211. package/runtime-required-scripts.json +11 -11
  212. package/schemas/codex/desktop-bridge-status-v3.schema.json +286 -0
  213. package/schemas/codex/desktop-capabilities-v3.schema.json +198 -0
  214. package/schemas/release/release-gate-node.schema.json +2 -3
  215. package/dist/cli/codex-lb-setup-warning-output.js +0 -17
  216. package/dist/cli/install-helpers-codex-lb-chain.js +0 -529
  217. package/dist/commands/codex-lb.js +0 -1232
  218. package/dist/core/architecture-hardening/migration/migration.js +0 -111
  219. package/dist/core/codex-app/auxiliary-oauth-policy.js +0 -36
  220. package/dist/core/codex-app/catalog-compat/catalog-service.js +0 -104
  221. package/dist/core/codex-app/child-policy/child-policy.js +0 -35
  222. package/dist/core/codex-app/desktop-routing-snapshot.js +0 -233
  223. package/dist/core/codex-app/glm-model-profile.js +0 -1
  224. package/dist/core/codex-app/glm-profile-installer.js +0 -191
  225. package/dist/core/codex-app/glm-profile-schema.js +0 -42
  226. package/dist/core/codex-app/multi-provider-router.js +0 -391
  227. package/dist/core/codex-app/openrouter-activate.js +0 -405
  228. package/dist/core/codex-app/openrouter-model-catalog.js +0 -217
  229. package/dist/core/codex-app/provider-child-policy.js +0 -64
  230. package/dist/core/codex-app/provider-mode.js +0 -91
  231. package/dist/core/codex-app/provider-session-policy.js +0 -85
  232. package/dist/core/codex-app/session-policy/session-pinning.js +0 -68
  233. package/dist/core/codex-control/codex-lb-launch-recovery.js +0 -319
  234. package/dist/core/codex-lb/codex-lb-setup.js +0 -293
  235. package/dist/core/codex-lb/codex-lb-tool-catalog.js +0 -456
  236. package/dist/core/codex-lb/codex-lb-tool-output-recovery.js +0 -290
  237. package/dist/core/codex-lb/desktop-center-credentials.js +0 -1083
  238. package/dist/core/codex-lb/desktop-mode.js +0 -32
  239. package/dist/core/codex-lb/desktop-real-evidence.js +0 -168
  240. package/dist/core/codex-lb/legacy-migration.js +0 -576
  241. package/dist/core/codex-lb/native-openai-transport/transport.js +0 -68
  242. package/dist/core/codex-lb/provider-routing/provider-router.js +0 -58
  243. package/dist/core/codex-lb/routing-truth.js +0 -327
  244. package/dist/core/imagegen/codex-lb-imagegen-target.js +0 -92
  245. package/dist/native/sks-menubar/Sources/ProvidersConnectTest.swift +0 -118
  246. package/dist/native/sks-menubar/Sources/ProvidersFastMode.swift +0 -17
  247. package/dist/native/sks-menubar/Sources/ProvidersMultiProvider.swift +0 -331
  248. package/dist/native/sks-menubar/Sources/ProvidersRoleModels.swift +0 -260
  249. package/dist/scripts/codex-lb-catalog-passthrough-check.js +0 -120
  250. package/dist/scripts/codex-lb-desktop-auth-invariant-check.js +0 -169
  251. package/dist/scripts/codex-lb-desktop-capabilities-check.js +0 -287
  252. package/dist/scripts/codex-lb-desktop-real-evidence-check.js +0 -123
  253. package/dist/scripts/codex-lb-fast-mode-truth-check.js +0 -114
  254. package/dist/scripts/codex-lb-fast-ui-preservation-check.js +0 -152
  255. package/dist/scripts/codex-lb-gpt56-fast-profile-check.js +0 -231
package/README.md CHANGED
@@ -22,13 +22,13 @@ Proof-first orchestration for Codex CLI, ChatGPT Desktop, AI coding agents, mult
22
22
  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
23
  <!-- END SKS SEARCH VISIBILITY MARKETING -->
24
24
 
25
- This README documents package **SKS 8.1.2** — its own identity, read from `package.json` and subject to release-gate verification, not advice about what to install.
25
+ This README documents package **SKS 8.1.3** — its own identity, read from `package.json` and subject to release-gate verification, not advice about what to install.
26
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](docs/architecture/context-graph.md) and [docs/PRODUCT-CONTRACT.md](docs/PRODUCT-CONTRACT.md). See [CHANGELOG.md](CHANGELOG.md).
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).
28
28
 
29
- ## What 7.0.0 Ships
29
+ ## What 8.1.3 Ships
30
30
 
31
- | Problem | 7.0.0 behavior |
31
+ | Problem | 8.1.3 behavior |
32
32
  | --- | --- |
33
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
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. |
@@ -36,6 +36,9 @@ Use the official latest stable SKS and Codex CLI releases. The Codex compatibili
36
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
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
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. |
39
42
 
40
43
  ## Install In One Command
41
44
 
@@ -185,11 +188,62 @@ remote change on the operator's behalf.
185
188
 
186
189
  `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.
187
190
 
191
+ ## Desktop Bridge
192
+
193
+ SKS 8.1.3 uses a single local **Desktop Bridge** for managed Codex Desktop and
194
+ CLI routing. ChatGPT OAuth stays in the Codex identity plane. Codex-LB and
195
+ OpenRouter credentials are independent profiles that can be configured and
196
+ validated simultaneously; changing one profile does not remove the other.
197
+
198
+ The bridge uses an atomically activated combined catalog and explicit route
199
+ index. It never guesses a provider from a model name and never silently falls
200
+ back. A missing or ambiguous route is a visible blocker. Provider-bound
201
+ upstream requests strip incoming ChatGPT OAuth authorization; status and
202
+ receipts contain only redacted credential metadata.
203
+
204
+ ```sh
205
+ sks bridge status --json
206
+ sks bridge ensure --json
207
+ sks bridge provider list --json
208
+ sks bridge catalog sync --json
209
+ sks bridge route explain <model> --json
210
+ sks bridge verify --level transport --json
211
+ ```
212
+
213
+ Configure secrets through stdin only:
214
+
215
+ ```sh
216
+ read -r -s codex_lb_key
217
+ printf '\n'
218
+ printf '%s\n' "$codex_lb_key" | \
219
+ sks bridge provider configure codex-lb --host lb.example.com --api-key-stdin --json
220
+ unset codex_lb_key
221
+
222
+ read -r -s openrouter_key
223
+ printf '\n'
224
+ printf '%s\n' "$openrouter_key" | \
225
+ sks bridge provider configure openrouter --api-key-stdin --json
226
+ unset openrouter_key
227
+ ```
228
+
229
+ `sks codex-lb` is removed and returns `unknown_command`; it has no alias.
230
+ Migration recognizes historical SKS-authored routing state only in a private,
231
+ receipt-backed path. Ambiguous user-owned configuration fails closed. Use
232
+ `sks bridge unmanage --confirm --json` or `sks bridge rollback <receipt-id>
233
+ --confirm --json` only for explicit rollback/removal.
234
+
188
235
  ## Naruto Workflow
189
236
 
190
237
  `$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. The parent is GPT-5.6 Sol Max. Tiny mechanical `worker` slices—including clear simple code, configuration, and setup changes—use Luna Max; ordinary UI, logic, backend, and native coding uses Sol High; review, testing, debugging, architecture, integration, security, database, research, release, and other judgment-sensitive work uses Sol Max; long-context scans, long-term memory, large-scale first-draft code processing, and direct Computer Use, Browser/Chrome, or image-generation execution use Terra Max. Mixed execution/judgment work is split when possible, and unsplittable judgment defaults to Sol Max.
191
238
 
192
- Fresh SKS-owned project config enables Codex 0.145+ multi-agent V2 with `agents.max_concurrent_threads_per_session = 256`, `features.multi_agent_v2.max_concurrent_threads_per_session = 257`, `max_depth = 1`, and `interrupt_message = true`. Nested delegation remains forbidden. Explicit user-owned limits are preserved, while legacy SKS-owned 12/13 defaults migrate to 256/257.
239
+ Fresh SKS-owned project config enables Codex multi-agent V2 with an effective
240
+ cap of `agents.max_concurrent_threads_per_session = 256` children and
241
+ `features.multi_agent_v2.max_concurrent_threads_per_session = 257` total
242
+ threads, `max_depth = 1`, and `interrupt_message = true`. Nested delegation
243
+ remains forbidden. An existing user-owned persisted preference of 1000 is
244
+ preserved on disk but normalized at runtime to 256/257 with an explicit
245
+ warning; it is not an entitlement to spawn 1000 children. Explicit
246
+ `--agents` and `--max-threads` values above 256 are rejected.
193
247
 
194
248
  Naruto's automatic starting tiers are 4/6/8 children for ordinary work and 16
195
249
  for mass cheap-model work. After decomposition, either lane may expand to the
@@ -219,32 +273,29 @@ Official subagent requests use `--agents`; removed scheduler, pool, backend, and
219
273
 
220
274
  ## Embedding SKS In Another Agent System
221
275
 
222
- By default SKS owns the credential: it pins `model_provider="openai"` and `forced_login_method="chatgpt"`, so an operator's interactive ChatGPT session authenticates the run and it cannot drift onto another provider unnoticed.
223
-
224
- That default is wrong for an unattended host. An orchestrator that already holds and rotates a customer's OpenAI-compatible credential — a local codex-lb endpoint, OpenRouter, any `env_key` provider block cannot log in interactively on every node, and forcing `chatgpt` makes Codex treat an `auth_mode="apikey"` session as a hard logout and delete `auth.json`. **Host mode** hands that decision back.
276
+ For Bridge-managed routing, the bridge owns provider selection and credential
277
+ isolation; adapters must not write a competing global routing configuration.
278
+ ChatGPT OAuth remains Codex-owned, while provider secrets stay inside their
279
+ bridge profiles. An adapter can still run Naruto normally:
225
280
 
226
281
  ```sh
227
- sks naruto run "task" \
228
- --auth-mode=host \
229
- --model-provider=codex-lb \
230
- --provider-env-key=CODEX_LB_API_KEY
282
+ sks naruto run "task" --agents 2 --json
231
283
  ```
232
284
 
233
- | Surface | Flag | Environment | Effect |
234
- | --- | --- | --- | --- |
235
- | Who authenticates | `--auth-mode=host` | `SKS_NARUTO_AUTH_MODE=host` | SKS injects neither `model_provider` nor `forced_login_method`; Codex uses your `config.toml` provider block |
236
- | Which provider block | `--model-provider=<name>` | `SKS_NARUTO_MODEL_PROVIDER` | Names a `[model_providers.<name>]` block. Host mode only |
237
- | Which credential variable | `--provider-env-key=<NAME>` | `SKS_NARUTO_PROVIDER_ENV_KEY` | Forwards exactly that variable to the child so the block's `env_key` resolves. Host mode only |
238
- | Release the login only | `--no-forced-login-method` | `SKS_NARUTO_FORCED_LOGIN_METHOD=none` | Keeps the SKS provider, drops the forced ChatGPT login |
239
- | Parent model / effort | `--parent-model`, `--parent-effort` | `SKS_NARUTO_PARENT_MODEL`, `SKS_NARUTO_PARENT_EFFORT` | Overrides the built-in parent policy; GPT-5.6 parents remain Sol/Terra/Luna Max-only as applicable |
240
- | Subagent model / effort | `--subagent-model`, `--subagent-effort` | `SKS_NARUTO_SUBAGENT_MODEL`, `SKS_NARUTO_SUBAGENT_EFFORT` | Overrides the default subagent policy; GPT-5.6 Luna/Terra require Max and Sol requires High or Max |
285
+ | Surface | Flag | Effect |
286
+ | --- | --- | --- |
287
+ | Parent model / effort | `--parent-model`, `--parent-effort` | Overrides the parent policy when the current host allows it. |
288
+ | Subagent model / effort | `--subagent-model`, `--subagent-effort` | Overrides the default subagent policy when the current host allows it. |
289
+ | Bridge state | `sks bridge status --json` | Returns secret-free routing/readiness state for the host to inspect. |
241
290
 
242
291
  Guarantees this contract makes:
243
292
 
244
- - **SKS never reads, stores, forwards to a third party, or logs your credential.** It forwards one named environment variable to the Codex child and records only that variable's *name* in receipts. Values of secret-shaped variables are redacted from captured output.
245
- - **A malformed or policy-invalid value blocks the run.** An unknown auth mode, a provider name with a space, an effort tier that is not `minimal|low|medium|high|max`, a GPT-5.6 Luna/Terra effort other than Max, or a `--provider-env-key` that is absent from the environment all fail before mission state is written. SKS never quietly falls back to its own credential — that surprise is the failure mode this contract exists to prevent.
246
- - **Mixed configurations are refused.** Naming a provider while SKS still forces a ChatGPT login would authenticate one way and bill another, so it is a blocker rather than a silent precedence rule.
247
- - **The default is unchanged.** Managed mode still pins the ChatGPT login, and the real-credential smoke gate still proves it.
293
+ - **SKS never logs or serializes bridge credentials.** Provider operations accept
294
+ secrets through stdin and record only redacted metadata.
295
+ - **Ambiguous routing blocks the run.** SKS does not silently select another
296
+ profile, provider, or model when a requested route cannot be resolved.
297
+ - **Bridge state is not live proof.** Real provider/OAuth/Desktop evidence must
298
+ be collected separately for a release claim.
248
299
 
249
300
  ### Designing an adapter that wraps SKS without fighting it
250
301
 
@@ -262,9 +313,6 @@ export interface SksMissionRequest {
262
313
  task: string
263
314
  agents?: number
264
315
  tenant: {
265
- providerBlock: string // [model_providers.<name>] the host wrote into config.toml
266
- credentialEnvKey: string // env var the block's env_key points at
267
- credential: string // held by the host; never persisted by SKS
268
316
  parentModel?: string
269
317
  subagentModel?: string
270
318
  }
@@ -275,20 +323,10 @@ export async function runSksMission(request: SksMissionRequest) {
275
323
  'naruto', 'run', request.task,
276
324
  '--json',
277
325
  ...(request.agents ? ['--agents', String(request.agents)] : []),
278
- // Host owns authentication and model policy.
279
- '--auth-mode=host',
280
- `--model-provider=${request.tenant.providerBlock}`,
281
- `--provider-env-key=${request.tenant.credentialEnvKey}`,
282
326
  ...(request.tenant.parentModel ? [`--parent-model=${request.tenant.parentModel}`] : []),
283
327
  ...(request.tenant.subagentModel ? [`--subagent-model=${request.tenant.subagentModel}`] : [])
284
328
  ], {
285
329
  cwd: request.workspace,
286
- env: {
287
- ...process.env,
288
- // The one variable the provider block resolves. Scope it to this call
289
- // rather than exporting it process-wide.
290
- [request.tenant.credentialEnvKey]: request.tenant.credential
291
- },
292
330
  maxBuffer: 64 * 1024 * 1024
293
331
  })
294
332
  // SKS answers with its own result schema; treat it as the source of truth for
@@ -315,7 +353,7 @@ Adapter rules that keep updates safe:
315
353
  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.
316
354
  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.
317
355
  3. **Host owns the workspace, SKS owns `.sneakoscope/`.** Write your own state anywhere else; treat `.sneakoscope/` as SKS-owned and read-only from outside.
318
- 4. **Pass credentials per invocation, not per machine.** A per-call `env` entry keeps one tenant's key out of another tenant's run.
356
+ 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.
319
357
  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.
320
358
  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.
321
359
  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.
@@ -331,7 +369,7 @@ Adapter rules that keep updates safe:
331
369
 
332
370
  ## Demo
333
371
 
334
- The reproducible VHS script lives at [docs/demo.tape](docs/demo.tape).
372
+ The reproducible VHS script lives at [docs/demo.tape](https://github.com/mandarange/Sneakoscope-Codex/blob/main/docs/demo.tape).
335
373
 
336
374
  ```sh
337
375
  vhs docs/demo.tape
@@ -347,11 +385,11 @@ It shows the current quickstart flow: one-line install, `$sks-plan`, `sks review
347
385
  - Project memory: `sks memory build`
348
386
  - Codebase index/pack for LLM context: `sks align run` (wiki/pack rebuild SSOT; `sks wiki refresh --code` aliases into align), `sks wiki validate --json`
349
387
  - Native capability repair: `sks doctor --fix` (imagegen/Computer Use/Browser Use), `.sneakoscope/reports/native-capability-readiness.json`
350
- - codex-lb continuity: `sks codex-lb status --json` verifies the selected proxy's unauthenticated `/health` `X-App-Version`. Tool-heavy continuation requires a codex-lb deployment that reports the capability; use the official latest stable release. Older or unverified deployments block setup, doctor, and launch instead of silently falling back. A selected route is green only after one measured request records the destination host, gateway-key authentication class, measurement time, and latency; config presence alone is not routing proof.
351
- - Agent bridge for any agent system: `sks mcp-server`, `sks agent-bridge setup`, `SKS_AGENT_MODE=1` — see [docs/AGENT-BRIDGE.md](docs/AGENT-BRIDGE.md)
352
- - Release gates: `npm run release:check:affected` for ordinary change-aware verification and `npm run release:check:confidence` for the final local confidence pass. Evidence for the 8.1.0 physical checklist includes a successful prior-to-8.1.0 resolved-CLI upgrade, a 5,001-directory update scan, exactly one running Menu Bar process at the current package version, one measured real codex-lb request to the selected remote host, and one Telegram command/reply E2E over cellular.
353
- - Release preparation: typecheck, one clean build, focused tests, affected/confidence gates, all four source-bound physical receipts, then `npm publish --dry-run --json --registry https://registry.npmjs.org/ --tag latest --access public`. The dry-run does not publish or require release tags; real staging/publication remains a separate authenticated maintainer workflow.
354
- - Release readiness notes: [docs/release-readiness.md](docs/release-readiness.md) and [CHANGELOG.md](CHANGELOG.md)
388
+ - 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.
389
+ - 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)
390
+ - 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; documentation and fixtures do not satisfy those gates.
391
+ - 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 five source-bound physical receipts, exact tag proof, and its authenticated review gates.
392
+ - 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.
355
393
  - 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.
356
394
 
357
395
  ## Requirements
@@ -360,15 +398,13 @@ It shows the current quickstart flow: one-line install, `$sks-plan`, `sks review
360
398
  - Git for diff/review and release proof
361
399
  - macOS optional: menu bar integration and `/usr/bin/open`
362
400
  - 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`).
363
- - Native input dialogs (API keys, codex-lb setup) pass secrets to `sks` via `--api-key-stdin` instead of a visible Terminal window or process arguments.
364
- - Codex Desktop keeps `~/.codex/auth.json` byte-preserved. **Use codex-lb** atomically stores the provider definition and active top-level selection and resolves its separate gateway key from the owner-only `0600` env file; while selected, requests must not consume the stored ChatGPT OAuth identity. Turning codex-lb off returns to the official OAuth path. Keychain requests fail closed until a dedicated signed helper is available.
365
- - Explicit codex-lb setup/reconfiguration migrates the retired generic `sks-codex-lb` Keychain item only after the replacement owner-only store is verified, deletes only the exact legacy account, and proves absence by readback. If cleanup cannot be proved, the replacement store is retained and the provider key should be rotated.
366
- - Providers exposes atomic **Use codex-lb** / **Use ChatGPT OAuth** selection plus shared RoutingTruth. A green codex-lb state requires one measured request to the configured remote base URL; the Menu Bar and Doctor render the same host, authentication class, measurement time, and latency.
367
- - The retired dual-auth compatibility mode is detected only for safe migration. It cannot be activated or reported ready because it would require a global GUI secret.
368
- - Authentication and routing modes do not toggle Codex App's native model picker, Fast, image, Browser Use, Computer Use, voice, plugins/apps, or other built-in surfaces. Capability status describes measured evidence for the codex-lb data path, not permission to use a native feature.
369
- - `sks update`, setup, repair, and routing changes preserve OAuth, user model/reasoning/Fast settings, unknown catalog fields, and unrelated provider configuration. Legacy shared-auth routing requires explicit `sks codex-lb migrate-legacy-desktop --restart-app`; without a real restart and post-restart identity check it cannot finalize a migration receipt.
370
- - The remote codex-lb service remains independently hosted and operated. SKS uses only the configured URL and gateway key; it does not deploy, restart, or change credentials on that host.
371
- - Full release proof blocks with `real_required_missing` until fresh trust-anchored evidence covers the real Desktop feature/lifecycle matrix, one measured gateway-key request to the selected separately hosted codex-lb instance, and the other-Mac runtime; fixtures and configuration cannot satisfy that boundary.
401
+ - Native input dialogs and the bridge CLI pass provider secrets via `--api-key-stdin`, never a visible Terminal command or process argument.
402
+ - Codex Desktop keeps `~/.codex/auth.json` byte/semantic-preserved. Desktop Bridge strips incoming OAuth authorization before either provider upstream request.
403
+ - 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.
404
+ - 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.
405
+ - `sks bridge unmanage --confirm` and `sks bridge rollback <receipt-id> --confirm` are explicit recovery actions; neither deletes newer credentials or OAuth state.
406
+ - The provider services remain independently operated. SKS never deploys them, changes remote credentials, or silently substitutes one profile for another.
407
+ - 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.
372
408
  - 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.
373
409
  - Telegram remote control uses one bounded long-poller inside that same Menu Bar process. Release evidence must include a real cellular command/reply round trip; `getMe`, a local fixture, or a configured token alone cannot satisfy the E2E gate.
374
410
  - 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.
@@ -377,7 +413,7 @@ It shows the current quickstart flow: one-line install, `$sks-plan`, `sks review
377
413
  - 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.
378
414
  - **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.
379
415
  - 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.
380
- - 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](docs/AMBIGUITY-RESOLUTIONS.md) and [docs/PRODUCT-CONTRACT.md](docs/PRODUCT-CONTRACT.md).
416
+ - 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).
381
417
 
382
418
  ## License
383
419
 
@@ -259,7 +259,7 @@ dependencies = [
259
259
 
260
260
  [[package]]
261
261
  name = "sks-core"
262
- version = "8.1.2"
262
+ version = "8.1.3"
263
263
  dependencies = [
264
264
  "globset",
265
265
  "grep-matcher",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "sks-core"
3
- version = "8.1.2"
3
+ version = "8.1.3"
4
4
  edition = "2021"
5
5
 
6
6
  [dependencies]
@@ -13,7 +13,6 @@ function rootJsonFastInline(fs, cwd = process.cwd()) {
13
13
  }
14
14
  async function doctorJsonFastInline(input = {}) {
15
15
  const startedAt = Date.now();
16
- const secretResolution = await inspectCodexLbSecretResolutionFastInline(input);
17
16
  const write = input.write || ((text) => process.stdout.write(text));
18
17
  write(`${JSON.stringify({
19
18
  schema: 'sks.doctor-status.v3',
@@ -42,8 +41,11 @@ async function doctorJsonFastInline(input = {}) {
42
41
  doctor_fix_transaction: null,
43
42
  blockers: [],
44
43
  warnings: ['fast_readonly_doctor_skipped_optional_deep_diagnostics'],
45
- codex_lb: {
46
- secret_resolution: secretResolution
44
+ desktop_bridge: {
45
+ schema: 'sks.desktop-bridge-fast-status.v1',
46
+ status: 'not_checked',
47
+ reason: 'fast_readonly_json',
48
+ secret_stores_read: false
47
49
  }
48
50
  }, null, 2)}\n`);
49
51
  }
@@ -105,54 +107,6 @@ function findProjectRootSync(fs, start) {
105
107
  dir = parent;
106
108
  }
107
109
  }
108
- async function inspectCodexLbSecretResolutionFastInline(input) {
109
- const processEnv = input.processEnv || process.env;
110
- const home = input.home || processEnv.HOME || processEnv.USERPROFILE || process.cwd();
111
- const codexHome = joinPath(home, '.codex');
112
- const envPath = joinPath(codexHome, 'sks-codex-lb.env');
113
- const metadataPath = joinPath(codexHome, 'sks-codex-lb.json');
114
- const [{ inspectConfinedPath }, { readPrivateCredentialFile }] = await Promise.all([
115
- import('../core/managed-path-safety.js'),
116
- import('../core/security/private-credential-file.js')
117
- ]);
118
- let envFilePresent = false;
119
- let envFilePrivate = false;
120
- try {
121
- const inspected = await inspectConfinedPath(codexHome, envPath);
122
- envFilePresent = inspected.exists;
123
- const expectedUid = typeof process.getuid === 'function' ? process.getuid() : null;
124
- envFilePrivate = inspected.exists
125
- && !inspected.leafSymlink
126
- && inspected.stat?.isFile() === true
127
- && (inspected.stat.mode & 0o777) === 0o600
128
- && (expectedUid === null || inspected.stat.uid === expectedUid);
129
- }
130
- catch {
131
- envFilePresent = false;
132
- }
133
- let metadataValid = false;
134
- if (envFilePrivate) {
135
- try {
136
- const snapshot = await readPrivateCredentialFile(codexHome, metadataPath, 'codex_lb_metadata', { maxBytes: 64 * 1024 });
137
- const metadata = JSON.parse(snapshot.bytes.toString('utf8'));
138
- metadataValid = metadata?.schema === 'sks.codex-lb-metadata.v1'
139
- && /^[a-f0-9]{64}$/.test(String(metadata?.api_key?.sha256 || '').trim().toLowerCase())
140
- && Boolean(String(metadata?.base_url || '').trim());
141
- }
142
- catch {
143
- metadataValid = false;
144
- }
145
- }
146
- const processKeyPresent = Boolean(String(processEnv.CODEX_LB_API_KEY || '').trim());
147
- const source = envFilePrivate && metadataValid ? 'env-file' : processKeyPresent ? 'process.env' : 'missing';
148
- return {
149
- source,
150
- path: source === 'env-file' || envFilePresent ? envPath : null,
151
- prompt_risk: (input.platform || process.platform) === 'darwin'
152
- ? 'unknown_keychain_not_probed'
153
- : 'none'
154
- };
155
- }
156
110
  function fsInline() {
157
111
  return process.getBuiltinModule?.('node:fs') || require('node:fs');
158
112
  }
@@ -36,7 +36,7 @@ const COMMAND_MANIFEST_LITE_BASE = [
36
36
  { name: 'codex', summary: 'Check Codex CLI compatibility and vendored hook schemas', maturity: 'beta', skipMigrationGate: true },
37
37
  { name: 'codex-app', summary: 'Check Codex App readiness', maturity: 'beta', skipMigrationGate: true },
38
38
  { name: 'codex-native', summary: 'Inspect Codex Native broker and routing readiness', maturity: 'beta' },
39
- { name: 'codex-lb', summary: 'Inspect codex-lb status and circuit health', maturity: 'beta', skipMigrationGate: true },
39
+ { name: 'bridge', summary: 'Manage the single Desktop Bridge runtime, provider profiles, catalog, and routes', maturity: 'beta', skipMigrationGate: true },
40
40
  { name: 'menubar', summary: 'Inspect/install/restart/uninstall SKS menu bar', maturity: 'beta', skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
41
41
  { name: 'remote', summary: 'Inspect official Remote readiness and run the proof-aware SSH stdio worker', maturity: 'beta' },
42
42
  { name: 'telegram', summary: 'Pair and inspect the Telegram remote-control transport', maturity: 'beta', skipMigrationGate: true },
@@ -112,6 +112,7 @@ const COMMAND_CONTRACT_OVERRIDES_LITE = {
112
112
  cleanup: { risk: 'R3', latency: 'long', supportsJson: true, remoteAllowed: false, inputProfile: 'json-only' },
113
113
  autoresearch: { latency: 'long' },
114
114
  bench: { latency: 'long' },
115
+ bridge: { risk: 'R3', latency: 'long', supportsJson: true, remoteAllowed: false, inputProfile: 'json-only' },
115
116
  check: { risk: 'R1', latency: 'long' },
116
117
  'commit-and-push': { risk: 'R3' },
117
118
  'computer-use': { latency: 'long' },
@@ -184,7 +184,7 @@ const COMMAND_DEFINITIONS = {
184
184
  codex: skipMigrationGate(entry('beta', 'Check Codex CLI compatibility and vendored hook schemas', 'dist/commands/codex.js', directCommand(() => import('../commands/codex.js'), 'dist/commands/codex.js'))),
185
185
  'codex-app': skipMigrationGate(entry('beta', 'Check Codex App readiness', 'dist/commands/codex-app.js', directCommand(() => import('../commands/codex-app.js'), 'dist/commands/codex-app.js'))),
186
186
  'codex-native': entry('beta', 'Inspect Codex Native broker and routing readiness', 'dist/commands/codex-native.js', directCommand(() => import('../commands/codex-native.js'), 'dist/commands/codex-native.js')),
187
- 'codex-lb': skipMigrationGate(entry('beta', 'Inspect codex-lb status and circuit health', 'dist/commands/codex-lb.js', directCommand(() => import('../commands/codex-lb.js'), 'dist/commands/codex-lb.js'))),
187
+ bridge: skipMigrationGate(entry('beta', 'Manage the single Desktop Bridge runtime, provider profiles, catalog, and routes', 'dist/commands/bridge.js', directCommand(() => import('../commands/bridge.js'), 'dist/commands/bridge.js'))),
188
188
  menubar: activeRouteDiagnostic(entry('beta', 'Inspect/install/restart/uninstall SKS menu bar', 'dist/core/commands/menubar-command.js', subcommand(() => import('../core/commands/menubar-command.js'), 'menubarCommand', 'dist/core/commands/menubar-command.js', 'status'))),
189
189
  remote: entry('beta', 'Inspect official Remote readiness and run the proof-aware SSH stdio worker', 'dist/core/commands/remote-command.js', argsCommand(() => import('../core/commands/remote-command.js'), 'remoteCommand', 'dist/core/commands/remote-command.js')),
190
190
  telegram: skipMigrationGate(entry('beta', 'Pair and inspect the Telegram remote-control transport', 'dist/core/commands/telegram-command.js', argsCommand(() => import('../core/commands/telegram-command.js'), 'telegramCommand', 'dist/core/commands/telegram-command.js'))),
@@ -256,6 +256,7 @@ const COMMANDS_WITH_LEGACY_CONTRACT_OVERRIDES = applyCommandContractOverrides(CO
256
256
  cleanup: { risk: 'R3', latency: 'long', supportsJson: true, remoteAllowed: false, inputProfile: 'json-only' },
257
257
  autoresearch: { latency: 'long' },
258
258
  bench: { latency: 'long' },
259
+ bridge: { risk: 'R3', latency: 'long', supportsJson: true, remoteAllowed: false, inputProfile: 'json-only' },
259
260
  check: { risk: 'R1', latency: 'long' },
260
261
  'commit-and-push': { risk: 'R3' },
261
262
  'computer-use': { latency: 'long' },
@@ -44,6 +44,6 @@ export function glmWithoutMadResult() {
44
44
  status: 'blocked',
45
45
  mode: 'glm',
46
46
  reason: 'glm_mad_removed',
47
- hint: 'use SKS Center Providers or sks codex-app use-openrouter --model <id>'
47
+ hint: 'use sks bridge provider configure|validate|enable, sks bridge catalog sync, and sks bridge route set-default'
48
48
  };
49
49
  }