sneakoscope 9.2.6 → 10.1.0

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 (118) hide show
  1. package/README.md +4 -4
  2. package/config/competitor-scorecard-baseline.json +1 -22
  3. package/config/skills-hash-ledger.v1.json +26 -0
  4. package/crates/sks-core/Cargo.lock +1 -1
  5. package/crates/sks-core/Cargo.toml +1 -1
  6. package/dist/bin/fast-inline.js +57 -8
  7. package/dist/bin/sks-dispatch.js +1 -1
  8. package/dist/cli/router.js +15 -3
  9. package/dist/commands/bridge.js +7 -0
  10. package/dist/commands/doctor.js +6 -1
  11. package/dist/config/skills-manifest.json +51 -24
  12. package/dist/core/agents/agent-effort-policy.js +10 -10
  13. package/dist/core/align/code-navigation-align.js +3 -3
  14. package/dist/core/codex-app/menubar/constants.js +3 -0
  15. package/dist/core/codex-control/codex-model-capabilities.js +20 -22
  16. package/dist/core/codex-control/codex-model-metadata.js +105 -68
  17. package/dist/core/codex-hooks/codex-hook-managed-install.js +4 -2
  18. package/dist/core/codex-lb/bridge-runtime-validation.js +12 -2
  19. package/dist/core/codex-lb/desktop-bridge/security.js +9 -3
  20. package/dist/core/codex-lb/desktop-bridge/server.js +1 -1
  21. package/dist/core/codex-lb/desktop-bridge/state.js +3 -1
  22. package/dist/core/codex-lb/desktop-bridge/upstream-evidence.js +42 -0
  23. package/dist/core/codex-lb/desktop-controller-v3/catalog.js +3 -2
  24. package/dist/core/codex-lb/desktop-controller-v3/lifecycle-commands.js +30 -7
  25. package/dist/core/codex-lb/desktop-controller-v3/shared.js +1 -0
  26. package/dist/core/codex-lb/desktop-controller-v3/status.js +16 -2
  27. package/dist/core/codex-lb/desktop-controller-v3.js +9 -2
  28. package/dist/core/codex-lb/desktop-service.js +10 -3
  29. package/dist/core/codex-lb/request-route-resolver.js +8 -2
  30. package/dist/core/codex-native/core-skill-manifest.js +3 -3
  31. package/dist/core/commands/align-command.js +52 -7
  32. package/dist/core/commands/pipeline-command.js +5 -3
  33. package/dist/core/commands/research-command.js +1 -16
  34. package/dist/core/commands/triwiki-graph-command.js +2 -2
  35. package/dist/core/commands/wiki-command.js +2 -2
  36. package/dist/core/daemon/sksd-hook-daemon-entrypoint.js +1 -1
  37. package/dist/core/daemon/sksd-hook-daemon.js +14 -2
  38. package/dist/core/db-safety.js +22 -3
  39. package/dist/core/doctor/desktop-bridge-catalog-repair.js +27 -45
  40. package/dist/core/doctor/doctor-readiness-matrix.js +23 -4
  41. package/dist/core/doctor/legacy-runtime-data-gc.js +4 -0
  42. package/dist/core/feature-registry.js +0 -1
  43. package/dist/core/hooks-runtime/context-graph-freshness-preflight.js +2 -2
  44. package/dist/core/hooks-runtime/hook-context.js +10 -5
  45. package/dist/core/hooks-runtime.js +22 -16
  46. package/dist/core/init/skills.js +23 -30
  47. package/dist/core/init.js +33 -28
  48. package/dist/core/mad-sks/sql-plane/policy.js +2 -0
  49. package/dist/core/managed-assets/managed-assets-manifest.js +14 -14
  50. package/dist/core/pipeline-internals/runtime-core.js +33 -16
  51. package/dist/core/provider/model-router.js +10 -9
  52. package/dist/core/recallpulse/policy.js +23 -25
  53. package/dist/core/recallpulse.js +7 -63
  54. package/dist/core/release/gate-manifest.js +0 -3
  55. package/dist/core/release/release-gate-contract.js +0 -1
  56. package/dist/core/research/implementation-blueprint-densifier.js +1 -1
  57. package/dist/core/research/mock-result.js +15 -55
  58. package/dist/core/research/research-adversarial-review.js +36 -89
  59. package/dist/core/research/research-claim-synthesizer.js +1 -1
  60. package/dist/core/research/research-falsification-runner.js +1 -1
  61. package/dist/core/research/research-plan-markdown.js +7 -7
  62. package/dist/core/research/research-stage-runner.js +5 -25
  63. package/dist/core/research/research-work-graph.js +2 -3
  64. package/dist/core/research.js +49 -180
  65. package/dist/core/routes/dollar-manifest-lite.js +1 -1
  66. package/dist/core/routes.js +11 -11
  67. package/dist/core/runtime/task-profile.js +1 -1
  68. package/dist/core/search-visibility/marketing.js +3 -6
  69. package/dist/core/subagents/model-policy.js +5 -4
  70. package/dist/core/subagents/naruto-help-contract.js +8 -8
  71. package/dist/core/subagents/naruto-host-credentials.js +8 -6
  72. package/dist/core/subagents/official-subagent-preparation.js +1 -1
  73. package/dist/core/subagents/official-subagent-prompt.js +13 -12
  74. package/dist/core/subagents/official-subagent-runner.js +3 -3
  75. package/dist/core/subagents/role-model-preferences.js +24 -8
  76. package/dist/core/triwiki/code-pack-head-freshness.js +2 -1
  77. package/dist/core/triwiki/context-graph/compiler/cache-key.js +7 -3
  78. package/dist/core/triwiki/context-graph/extractors/evidence/index.js +12 -5
  79. package/dist/core/triwiki/context-graph/extractors/index.js +8 -0
  80. package/dist/core/update/update-migration-state.js +4 -1
  81. package/dist/core/update/update-operation.js +1 -1
  82. package/dist/core/update-check.js +82 -172
  83. package/dist/core/verification-profile.js +99 -0
  84. package/dist/core/version.js +1 -1
  85. package/dist/native/sks-menubar/Sources/AuthPriorityState.swift +66 -0
  86. package/dist/native/sks-menubar/Sources/ControlCenterWindowController.swift +2 -2
  87. package/dist/native/sks-menubar/Sources/ControlKit.swift +2 -3
  88. package/dist/native/sks-menubar/Sources/DiagnosticsViewController.swift +12 -4
  89. package/dist/native/sks-menubar/Sources/MCPServersViewController.swift +1 -1
  90. package/dist/native/sks-menubar/Sources/NativeView.swift +226 -0
  91. package/dist/native/sks-menubar/Sources/OverviewSummary.swift +1 -1
  92. package/dist/native/sks-menubar/Sources/OverviewViewController.swift +51 -206
  93. package/dist/native/sks-menubar/Sources/ProvidersModelExposure.swift +7 -2
  94. package/dist/native/sks-menubar/Sources/ProvidersOpenRouter.swift +22 -13
  95. package/dist/native/sks-menubar/Sources/ProvidersRoutingTruth.swift +5 -2
  96. package/dist/native/sks-menubar/Sources/ProvidersViewController.swift +108 -8
  97. package/dist/native/sks-menubar/Sources/RemoteCodingViewController.swift +3 -5
  98. package/dist/native/sks-menubar/Sources/SettingsViewController.swift +4 -4
  99. package/dist/native/sks-menubar/Sources/SidebarItem.swift +4 -2
  100. package/dist/native/sks-menubar/Sources/UpdatesModels.swift +8 -0
  101. package/dist/native/sks-menubar/Sources/UpdatesViewController.swift +53 -21
  102. package/dist/scripts/all-feature-deep-completion-check.js +0 -1
  103. package/dist/scripts/codex-native-agent-role-content-check.js +5 -3
  104. package/dist/scripts/codex-sdk-backend-router-check.js +2 -3
  105. package/dist/scripts/docs-truthfulness-check.js +1 -32
  106. package/dist/scripts/gate-policy-audit-check.js +0 -6
  107. package/dist/scripts/release-metadata-check.js +0 -1
  108. package/dist/scripts/typed-routing-gate-lib.js +1 -1
  109. package/package.json +3 -7
  110. package/release-gates.v2.json +1 -67
  111. package/runtime-required-scripts.json +0 -10
  112. package/schemas/codex/desktop-bridge-status-v3.schema.json +9 -0
  113. package/dist/core/agents/real-codex-parallel-proof.js +0 -126
  114. package/dist/core/release/gate-cache.js +0 -43
  115. package/dist/core/release/gate-timing.js +0 -104
  116. package/dist/core/release/sla-scheduler.js +0 -21
  117. package/dist/scripts/evidence-flagship-coverage-check.js +0 -53
  118. package/dist/scripts/release-gate-budget-check.js +0 -29
package/README.md CHANGED
@@ -22,7 +22,7 @@ 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 9.2.6** — 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 10.1.0** — its own identity, read from `package.json` and subject to release-gate verification, not advice about what to install.
26
26
 
27
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
 
@@ -175,7 +175,7 @@ receipt-backed path. Ambiguous user-owned configuration fails closed. Use
175
175
 
176
176
  ## Naruto Workflow
177
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. 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.
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.
179
179
 
180
180
  Fresh SKS-owned project config enables Codex multi-agent V2 with an effective
181
181
  cap of `agents.max_concurrent_threads_per_session = 256` children and
@@ -187,7 +187,7 @@ warning; it is not an entitlement to spawn 1000 children. Explicit
187
187
  `--agents` and `--max-threads` values above 256 are rejected.
188
188
 
189
189
  Naruto's automatic starting tiers are 4/6/8 children for ordinary work and 16
190
- for mass cheap-model work. After decomposition, either lane may expand to the
190
+ for mass mechanical or exploration work. After decomposition, either lane may expand to the
191
191
  SKS-owned ceiling of 256 independent useful children. Explicit
192
192
  `--agents N` and `--max-threads N` values from 1 through 256 remain
193
193
  authoritative instead of being reduced to those automatic tiers. A first wave
@@ -305,7 +305,7 @@ Adapter rules that keep updates safe:
305
305
  | --- | --- | --- |
306
306
  | Did tests/typecheck fail? | Another model may say so. | Machine check output is tagged `evidence: machine`. |
307
307
  | Are findings ranked? | Usually one blended opinion. | Machine evidence sorts before LLM findings. |
308
- | Can work stop? | The model decides. | Stop gates, Completion Proof, and Honest Mode decide. |
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
309
  | Can I inspect agent-thread progress? | Usually no runtime UI. | Use the official Codex subagent/thread surfaces and their proof artifacts. |
310
310
 
311
311
  ## Demo
@@ -27,26 +27,9 @@
27
27
  {
28
28
  "id": "installed-package-smoke",
29
29
  "path": ".sneakoscope/reports/installed-package-smoke.json"
30
- },
31
- {
32
- "id": "release-gate-timing",
33
- "path": ".sneakoscope/reports/gate-timing.json"
34
- }
35
- ],
36
- "parallel_isolation": [
37
- {
38
- "id": "parallel-runtime-proof",
39
- "path": ".sneakoscope/reports/parallel-production-smoke.json"
40
- },
41
- {
42
- "id": "worktree-runtime",
43
- "path": ".sneakoscope/reports/parallel-production-smoke.json"
44
- },
45
- {
46
- "id": "patch-merge-proof",
47
- "path": ".sneakoscope/reports/parallel-production-smoke.json"
48
30
  }
49
31
  ],
32
+ "parallel_isolation": [],
50
33
  "speed_performance": [
51
34
  {
52
35
  "id": "perf-budget",
@@ -55,10 +38,6 @@
55
38
  {
56
39
  "id": "hook-latency-quantum",
57
40
  "path": ".sneakoscope/reports/hook-latency-quantum.json"
58
- },
59
- {
60
- "id": "gate-timing",
61
- "path": ".sneakoscope/reports/gate-timing.json"
62
41
  }
63
42
  ],
64
43
  "install_operations": [
@@ -4,6 +4,7 @@
4
4
  {
5
5
  "canonical_name": "sks",
6
6
  "trusted_sha256": [
7
+ "905fc5472d36f0780b56f0e09404f42ea20293b1a4615d2050b7db3043231dbd",
7
8
  "6d90142f3617a8ae92d9af8cb2fc18ab58a7d0070868504e1fe89e0effc305a5",
8
9
  "5b17aeb1484e9e2b3791bff6dcb175f30857f47e71b36eb0340e575385e8e82b"
9
10
  ]
@@ -18,6 +19,8 @@
18
19
  {
19
20
  "canonical_name": "sks-answer",
20
21
  "trusted_sha256": [
22
+ "f3f84bc126da78789e4495b6c13019e9848c462211f1d86fa3e7929487b584c9",
23
+ "0e461537093215960734aaeafdccb125d2c3ca139dab5db8548d5c0bdd14d652",
21
24
  "3056ac543fa074868c7023097fdcb042d7175ab557d8e18cb7d92ce872785452",
22
25
  "bc8e2fc157b6c9819d32bb0a41bdf7f599a07693df18b0d80aa0ba103594f6eb"
23
26
  ]
@@ -25,6 +28,7 @@
25
28
  {
26
29
  "canonical_name": "sks-autoresearch",
27
30
  "trusted_sha256": [
31
+ "50e8c569cc9da4ba774581b27ca34824d65576641f7d7861f301c9315cd07432",
28
32
  "0b0a626be3b2e4f80462b721787287350af08ccdf8e952b8eb563a294a8cb777",
29
33
  "42602109bc1bf36b28a9acd0c458ab6c3b87f412c2710052e1c65a1f7b0cfeb8"
30
34
  ]
@@ -65,6 +69,8 @@
65
69
  {
66
70
  "canonical_name": "sks-computer-use-fast",
67
71
  "trusted_sha256": [
72
+ "b5dafeb7c22d63f34a9015ce83f897f15ef0eb80b0f0f1107c2f86957681d916",
73
+ "1d191ed0f9490fc320dd17b871ca556fa5835bfb372c38b62f3985e3369f685a",
68
74
  "57e4c1d04ae785b0a53711e53210f2ddabd6131041b97edb4b6d99f18b24155e",
69
75
  "b270d82e4057934d7f92ed4241d4ae86e22d0a9a08bceba1aa179d7535bda042",
70
76
  "b8736b2621398dfc85f7a2ff35d7a2fc728db0dfc0e964de69aebff93b5ed897"
@@ -73,6 +79,7 @@
73
79
  {
74
80
  "canonical_name": "sks-context7-docs",
75
81
  "trusted_sha256": [
82
+ "38007921cb842c63fee24306584439c9d766cea999141b731765938791bee841",
76
83
  "694cdfab8ee25c86d906b0eab5064c067dd05d9be9a8c1beec67f843ab602a42",
77
84
  "f3618fa72800899ffbe1686bed6bc888997bfb007a14f0e17c9a26178d55262a"
78
85
  ]
@@ -80,6 +87,7 @@
80
87
  {
81
88
  "canonical_name": "sks-cu",
82
89
  "trusted_sha256": [
90
+ "50a16e4fb21d5d3be6d8dc716475b642aea8033414e0b4929730a2b32f8062e3",
83
91
  "be9a3eb7197483693f354e5f7e5a8eb2c0dc0209597cea53479e2e803ad39479",
84
92
  "fc6ed807d0299dd56441738d9388787b1dd857dab9bb4c31a11f7d9b90b424d0",
85
93
  "da480ba03208d4888df1e97bbec6d80d608dafad0e33c2b1c72266e1860476a8"
@@ -88,6 +96,7 @@
88
96
  {
89
97
  "canonical_name": "sks-db",
90
98
  "trusted_sha256": [
99
+ "61f696ec7c95a024eea664bb28a8a969e1360ddd4bd73053d293bc79665f910b",
91
100
  "65ecf818f21a5c36865619bcb1f542ead7ab2974c5c7c3488ac7b4037b9c85d6",
92
101
  "e3912adaf37f9be002b012c89c18ff987c9cd16ea2445600c834fa39a5bf865a"
93
102
  ]
@@ -129,6 +138,7 @@
129
138
  {
130
139
  "canonical_name": "sks-fast-mode",
131
140
  "trusted_sha256": [
141
+ "ea6a5da45a3a8065dc3b78be1cabc864a963c685ae3084323471280ef03917a5",
132
142
  "0d42a799afc84d74bfe8c5855ab85adce0e945a10a10514b4d7e4b8c90eb16b6",
133
143
  "257daa08de3807d47c0941ac21ef1f89af2f7f670b0c34059d3234a5a8bfb36b"
134
144
  ]
@@ -143,6 +153,7 @@
143
153
  {
144
154
  "canonical_name": "sks-fast-on",
145
155
  "trusted_sha256": [
156
+ "b64e4a7afb45db1731f52a0ed29ef1edec7e5538cc81561f75bb715d37455a6e",
146
157
  "d136b65559bb87e22bb5818a065dfa7ec94ac21aa445f492a4fc70f92a364eff",
147
158
  "0355482a0baf32d8ac2131bdd88fb5fed5a3a9ea7ab82f12e26075bc8ea8c724"
148
159
  ]
@@ -165,6 +176,7 @@
165
176
  {
166
177
  "canonical_name": "sks-goal",
167
178
  "trusted_sha256": [
179
+ "5ab1ac18fc265c375bae92ff23ddbd80c378484d6629c378f0e9270e660ded11",
168
180
  "867544877ac04df6e0232d6d425797e7fab2cceff9a7176a3c9e61f8c4a416d7",
169
181
  "0db0c58e72c0d58b24163371efe7a647c67d5d232020b2b4ed2557f19fe648d7"
170
182
  ]
@@ -172,6 +184,7 @@
172
184
  {
173
185
  "canonical_name": "sks-gx",
174
186
  "trusted_sha256": [
187
+ "165974015298362c9dac6d97b71c9865f42174a649dd85fe2e97ade6c6fd7c77",
175
188
  "53a9e538812e79549d0dfa7ae9da6b3d95672281d9b601ecd55f7d5ac64fcd44",
176
189
  "55b7d535a5978077462eb4c71226b9fdc772094f91ca336830315de10666e85e"
177
190
  ]
@@ -207,6 +220,7 @@
207
220
  {
208
221
  "canonical_name": "sks-honest-mode",
209
222
  "trusted_sha256": [
223
+ "4a0722737a837b0de895b7c950da216a8641922e4da53d6b9c1681b957340e82",
210
224
  "d1216afadecd4d9c85a2fb54bd31ee77ba45f8071f43bb0e21305c5fcd870095",
211
225
  "4543d942cac510b1a23e2e842f944d033087bbc761f6abc4a27d0a015bf22235"
212
226
  ]
@@ -221,6 +235,7 @@
221
235
  {
222
236
  "canonical_name": "sks-hproof-evidence-bind",
223
237
  "trusted_sha256": [
238
+ "fe9cc94d027e161d12509af86aa39616ac76efe53d049a8bb90fddcdd1e7a7b5",
224
239
  "9629257ef1b78b13b503ad1033f500ea8ef898fb74ba50d78a2a72143b7ead4f",
225
240
  "fa20989183324964b5527742c0b1f593eacfcd3090b1707fb7c52258cdf62637"
226
241
  ]
@@ -267,6 +282,7 @@
267
282
  {
268
283
  "canonical_name": "sks-naruto",
269
284
  "trusted_sha256": [
285
+ "a1219f6dbad9c8c185953125ef0b8dccf081aa01efb8e8acaa543c6214ac049c",
270
286
  "d0d5968e78ac25e1d3e588735de1ddbcf149cfb3165edebca5dec1ed7c7a5c46",
271
287
  "34222c72e4e1ead3584907f4d905444b7de820283ee7348018f110d5e6b04461",
272
288
  "f8e808622e222b4ad7dcb2907e5f06a890db83139ae443ec6c8c33781dfa3e37",
@@ -283,6 +299,8 @@
283
299
  {
284
300
  "canonical_name": "sks-pipeline-runner",
285
301
  "trusted_sha256": [
302
+ "fd06dfb27be41e5ffec3e3ec8c5362289f5919cf2afa9da5ab6b97e7baa4a0ac",
303
+ "66e105773b8e042eec5d5679b97b7cb305cad8d45671034907fbfa728fc4d68a",
286
304
  "020ba4da2f96bcda23cee4596b1e790816780178f1917dee748ff4b289cba0e5",
287
305
  "ffcbe0ea4b585e3d2886f1d9fa7a3b88706aaf42182fb177b2371b76beb0ddcd"
288
306
  ]
@@ -297,6 +315,7 @@
297
315
  {
298
316
  "canonical_name": "sks-ppt",
299
317
  "trusted_sha256": [
318
+ "1d4de05afd42ee5739c0ed925af9e0ac4785fc746e659c60d3d908d465e6386c",
300
319
  "02e8a0758ec6d056ce9851a5a4505b1d32e302e730be3eb169a41392a5d6b2e2",
301
320
  "329fc6ee24bb04478b18fb6ccd3691cd7cbb50e1b77ca7b6136383d00b3b0bb4"
302
321
  ]
@@ -304,6 +323,7 @@
304
323
  {
305
324
  "canonical_name": "sks-prompt-pipeline",
306
325
  "trusted_sha256": [
326
+ "e7c8ef56d38fdc4879c983f7d6706f26fc1cf0a60c508836bd628e815700bcc3",
307
327
  "480c8afffafa9d52c483a963b4b8fafdffc0a47cd6d2efd3fb6d7924c11832c5",
308
328
  "5dc8524de9bad66cef133ea5ff2a8052331bd12a7ec85695f727d0d2c8523145"
309
329
  ]
@@ -317,6 +337,8 @@
317
337
  {
318
338
  "canonical_name": "sks-reasoning-router",
319
339
  "trusted_sha256": [
340
+ "da0ddb58adc68ddeebdb9c45bf111c26eaa64d3e9dffe1dd39d7f30b943b8b88",
341
+ "1595beabf2d31397217311fa1323bd62c801cf6c87db9029ff544c457efec8bb",
320
342
  "a7d879d157c6d5b6b81a67dba7b5b731ac18ea986841fe1ab2cafbd6623481c3",
321
343
  "dc0b8c6a4093269c2c36b58432b25409704d06fea8ca558f43b598625ca0d9de"
322
344
  ]
@@ -324,6 +346,7 @@
324
346
  {
325
347
  "canonical_name": "sks-reflection",
326
348
  "trusted_sha256": [
349
+ "d5b6e80644a55a50b60961fe3aa5ae342fd035b39605a07d13dcc82fb0f0149c",
327
350
  "5013cefe58746a23e998bd83dedf2c4de9270010297be6fc0c0f0ae2aae73fb8",
328
351
  "4ba8b2778d1d37c25c89f1a97ce3ce5602c39138425e1f4af4a91e840a961670"
329
352
  ]
@@ -338,6 +361,7 @@
338
361
  {
339
362
  "canonical_name": "sks-research",
340
363
  "trusted_sha256": [
364
+ "8903022e98fa470cd764f7c8d1b28d4f996d6daf146260f20548acbe1276c55a",
341
365
  "2e96f95315d99b645d4171ba4648d9f9218ec3e98dcd6d363b5de522d2e1bfe3"
342
366
  ]
343
367
  },
@@ -377,6 +401,7 @@
377
401
  {
378
402
  "canonical_name": "sks-turbo-context-pack",
379
403
  "trusted_sha256": [
404
+ "7e46ced781acf7de50db07ccbf801f76b9b1717e21b683a8008d089b62b54456",
380
405
  "c02745666f6d9485c538876e77509209ecf5f481d1d7bed36e312eea60688f06",
381
406
  "d94bb85ea836e55c5b2b0df237821cf97b3d2ec6bfe697c97525f3fa5807b200"
382
407
  ]
@@ -384,6 +409,7 @@
384
409
  {
385
410
  "canonical_name": "sks-wiki",
386
411
  "trusted_sha256": [
412
+ "a6b3cf12e88b413073525c146aa27287557536b5a48eade83b87a11d8f371c72",
387
413
  "460a7dd5498fbf68697da64d6a56122ca088607edea8f815eea54aca580895fe",
388
414
  "b49e0bbe6163e8673b9d2d34a43f8ec130ac7032cacabe17e6fece6182f96be0",
389
415
  "16b2b813d202ca51d2ea4fe0da918eddf9494db7ab1356352d4188a5da3496b1"
@@ -259,7 +259,7 @@ dependencies = [
259
259
 
260
260
  [[package]]
261
261
  name = "sks-core"
262
- version = "9.2.6"
262
+ version = "10.1.0"
263
263
  dependencies = [
264
264
  "globset",
265
265
  "grep-matcher",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "sks-core"
3
- version = "9.2.6"
3
+ version = "10.1.0"
4
4
  edition = "2021"
5
5
 
6
6
  [dependencies]
@@ -11,9 +11,63 @@ function rootJsonFastInline(fs, cwd = process.cwd()) {
11
11
  using_global_root: !project
12
12
  })}\n`);
13
13
  }
14
+ async function fastDesktopBridgeUpstreamEvidence(home) {
15
+ const notChecked = (reason) => ({
16
+ section: { schema: 'sks.desktop-bridge-fast-status.v1', status: 'not_checked', reason, secret_stores_read: false },
17
+ warnings: [], nextActions: [],
18
+ });
19
+ try {
20
+ const getBuiltinModule = process.getBuiltinModule;
21
+ const fs = typeof getBuiltinModule === 'function' ? getBuiltinModule('node:fs') : await import('node:fs');
22
+ const runtime = joinPath(joinPath(home, '.codex'), 'sks');
23
+ const statePath = joinPath(runtime, 'desktop-bridge-state.json');
24
+ if (!fs.existsSync(statePath))
25
+ return notChecked('bridge_state_missing');
26
+ const state = JSON.parse(fs.readFileSync(statePath, 'utf8'));
27
+ const startedAt = typeof state.started_at === 'string' ? state.started_at : null;
28
+ const logPath = joinPath(joinPath(runtime, 'logs'), 'desktop-bridge.out.log');
29
+ const { BRIDGE_LOG_TAIL_BYTES, UNREACHABLE_UPSTREAM_RECOVERY_ACTION, detectUnreachableUpstreamEvidence } = await import('../core/codex-lb/desktop-bridge/upstream-evidence.js');
30
+ let tail = '';
31
+ if (fs.existsSync(logPath)) {
32
+ const handle = fs.openSync(logPath, 'r');
33
+ try {
34
+ const size = fs.fstatSync(handle).size;
35
+ const start = Math.max(0, size - BRIDGE_LOG_TAIL_BYTES);
36
+ const buffer = Buffer.alloc(size - start);
37
+ fs.readSync(handle, buffer, 0, buffer.length, start);
38
+ tail = buffer.toString('utf8');
39
+ }
40
+ finally {
41
+ fs.closeSync(handle);
42
+ }
43
+ }
44
+ const code = detectUnreachableUpstreamEvidence(tail, startedAt, Date.now());
45
+ const blockers = code ? [`desktop_bridge_upstream_unreachable:${code}`] : [];
46
+ return {
47
+ section: {
48
+ schema: 'sks.desktop-bridge-fast-status.v1',
49
+ status: code ? 'upstream_unreachable_evidence' : 'log_evidence_clear',
50
+ reason: 'fast_readonly_json_log_evidence',
51
+ secret_stores_read: false,
52
+ serving_pid: typeof state.pid === 'number' ? state.pid : null,
53
+ started_at: startedAt,
54
+ blockers,
55
+ recovery_actions: code ? [UNREACHABLE_UPSTREAM_RECOVERY_ACTION] : [],
56
+ },
57
+ warnings: blockers,
58
+ nextActions: code ? [UNREACHABLE_UPSTREAM_RECOVERY_ACTION] : [],
59
+ };
60
+ }
61
+ catch {
62
+ return notChecked('evidence_read_failed');
63
+ }
64
+ }
14
65
  async function doctorJsonFastInline(input = {}) {
15
66
  const startedAt = Date.now();
16
67
  const write = input.write || ((text) => process.stdout.write(text));
68
+ const env = input.processEnv || process.env;
69
+ const home = input.home || env.HOME || env.USERPROFILE || process.cwd();
70
+ const bridge = await fastDesktopBridgeUpstreamEvidence(home);
17
71
  write(`${JSON.stringify({
18
72
  schema: 'sks.doctor-status.v3',
19
73
  elapsed_ms: Math.max(0, Date.now() - startedAt),
@@ -23,7 +77,7 @@ async function doctorJsonFastInline(input = {}) {
23
77
  deep_diagnostics_skipped: true,
24
78
  deep_ok: null,
25
79
  not_counted_as_full_doctor: true,
26
- next_actions: ['Run sks doctor --full --json for deep diagnostics.'],
80
+ next_actions: ['Run sks doctor --full --json for deep diagnostics.', ...bridge.nextActions],
27
81
  fast_path: true,
28
82
  profile: 'fast-readonly',
29
83
  root: process.cwd(),
@@ -40,13 +94,8 @@ async function doctorJsonFastInline(input = {}) {
40
94
  },
41
95
  doctor_fix_transaction: null,
42
96
  blockers: [],
43
- warnings: ['fast_readonly_doctor_skipped_optional_deep_diagnostics'],
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
49
- }
97
+ warnings: ['fast_readonly_doctor_skipped_optional_deep_diagnostics', ...bridge.warnings],
98
+ desktop_bridge: bridge.section
50
99
  }, null, 2)}\n`);
51
100
  }
52
101
  async function narutoHelpJsonFastInline() {
@@ -27,7 +27,7 @@ async function runSks(args) {
27
27
  const { hookUserPromptSubmitPerfInline } = await import('./fast-inline.js');
28
28
  await hookUserPromptSubmitPerfInline();
29
29
  }
30
- else if (args[0] === 'hook' && args[1] && process.env.SKS_HOOK_DAEMON === '1') {
30
+ else if (args[0] === 'hook' && args[1] && (await import('../core/verification-profile.js')).hookDaemonEnabled()) {
31
31
  const { hookDaemonInline } = await import('../core/daemon/sksd-hook-dispatch.js');
32
32
  await hookDaemonInline(args[1]);
33
33
  }
@@ -354,10 +354,14 @@ export function safeActiveRouteContinuation(command, args, state = {}) {
354
354
  && (requestedMission === String(state.mission_id) || requestedMission === 'latest');
355
355
  }
356
356
  if (command === 'align') {
357
- if (activeRoute !== 'ALIGN' || !['run', 'proof'].includes(subcommand))
357
+ if (!['run', 'proof'].includes(subcommand))
358
358
  return false;
359
- const requestedMission = String(args[1] || '').trim();
360
- return Boolean(state.mission_id) && requestedMission === String(state.mission_id);
359
+ const requestedMission = firstPositionalAfterSubcommand(args);
360
+ if (activeRoute === 'ALIGN') {
361
+ return Boolean(state.mission_id)
362
+ && (!requestedMission || requestedMission === 'latest' || requestedMission === String(state.mission_id));
363
+ }
364
+ return subcommand === 'run' && !requestedMission;
361
365
  }
362
366
  const expectedRoutes = new Map([
363
367
  ['research', ['RESEARCH']],
@@ -381,6 +385,14 @@ export function safeActiveRouteContinuation(command, args, state = {}) {
381
385
  const requestedMission = String(args[1] || '').trim();
382
386
  return Boolean(state.mission_id) && (requestedMission === String(state.mission_id) || requestedMission === 'latest');
383
387
  }
388
+ function firstPositionalAfterSubcommand(args) {
389
+ for (const arg of args.slice(1)) {
390
+ const value = String(arg || '').trim();
391
+ if (value && !value.startsWith('-'))
392
+ return value;
393
+ }
394
+ return '';
395
+ }
384
396
  function optionValue(args, names) {
385
397
  for (let index = 0; index < args.length; index += 1) {
386
398
  const arg = String(args[index] || '');
@@ -17,6 +17,7 @@ export function usage(command = 'bridge') {
17
17
  return [
18
18
  `Usage: sks ${command} status [--json]`,
19
19
  ` sks ${command} ensure|repair [--json]`,
20
+ ` sks ${command} auth-priority status|on|off [--json]`,
20
21
  ` sks ${command} verify --level shallow|transport|deep [--strict|--require-ready] [--json]`,
21
22
  ` sks ${command} provider list [--json]`,
22
23
  ` sks ${command} provider configure codex-lb --host <host> --api-key-stdin [--json]`,
@@ -113,6 +114,12 @@ async function parseInvocation(args, io) {
113
114
  const json = parsed.flags.has('--json');
114
115
  const strict = parsed.flags.has('--strict') || parsed.flags.has('--require-ready');
115
116
  const base = { json, strict, secrets: [] };
117
+ if (area === 'auth-priority' && target === undefined && (action === 'status' || action === 'on' || action === 'off')) {
118
+ allowOnly(parsed, ['--json'], []);
119
+ return { ...base, request: action === 'status'
120
+ ? { operation: 'auth-priority.status' }
121
+ : { operation: 'auth-priority.set', enabled: action === 'on' }, label: 'Codex-LB authentication priority' };
122
+ }
116
123
  if (area === 'status' && action === undefined) {
117
124
  allowOnly(parsed, ['--json'], []);
118
125
  return { ...base, request: { operation: 'status' }, label: 'Desktop Bridge status' };
@@ -73,6 +73,11 @@ export async function inspectDoctorDesktopBridgeStatus(input = {}, deps = {}) {
73
73
  ? (status.readiness.blockers || []).map(String).filter(Boolean)
74
74
  : [];
75
75
  const recoveryActions = (status.recovery_actions || []).map(String).filter(Boolean);
76
+ const warnings = (status.readiness.warnings || []).map(String).filter(Boolean);
77
+ if (expected && status.readiness.ready !== true && status.readiness.state === 'degraded' && blockers.length === 0) {
78
+ warnings.push('desktop_bridge_readiness_degraded:transport_unverified_for_current_process');
79
+ recoveryActions.push('Run `sks bridge verify --level transport` (or `sks doctor --fix`, which re-verifies after its repair) to bind a transport diagnostic to the serving bridge.');
80
+ }
76
81
  if (expected && status.management?.managed === true) {
77
82
  const evidence = await (deps.desktopBridgeUpstreamEvidenceImpl || readDesktopBridgeUnreachableUpstreamEvidence)(home).catch(() => null);
78
83
  if (evidence) {
@@ -89,7 +94,7 @@ export async function inspectDoctorDesktopBridgeStatus(input = {}, deps = {}) {
89
94
  status,
90
95
  providers: status.providers,
91
96
  blockers,
92
- warnings: (status.readiness.warnings || []).map(String).filter(Boolean),
97
+ warnings,
93
98
  recovery_actions: recoveryActions
94
99
  };
95
100
  }