sneakoscope 6.0.3 → 6.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 (378) hide show
  1. package/README.md +29 -12
  2. package/config/codex-releases/{rust-v0.142.0.json → rust-v0.144.1.json} +6 -6
  3. package/crates/sks-core/Cargo.lock +1 -1
  4. package/crates/sks-core/Cargo.toml +1 -1
  5. package/dist/bin/fast-inline.js +18 -14
  6. package/dist/bin/sks-dispatch.js +2 -4
  7. package/dist/cli/args.js +2 -0
  8. package/dist/cli/command-manifest-lite.js +2 -3
  9. package/dist/cli/command-registry.js +3 -4
  10. package/dist/cli/help-fast.js +1 -1
  11. package/dist/cli/install-helpers.js +348 -763
  12. package/dist/cli/install-tool-helpers.js +287 -0
  13. package/dist/cli/router.js +91 -6
  14. package/dist/commands/codex-lb.js +188 -53
  15. package/dist/commands/codex.js +44 -5
  16. package/dist/commands/doctor.js +302 -46
  17. package/dist/commands/tmux.js +5 -1
  18. package/dist/commands/versioning.js +7 -0
  19. package/dist/commands/zellij-monitor-pane.js +2 -0
  20. package/dist/commands/zellij-viewport-pane.js +3 -1
  21. package/dist/commands/zellij.js +1 -1
  22. package/dist/config/skills-manifest.json +59 -59
  23. package/dist/core/agent-bridge/agent-manifest.js +48 -0
  24. package/dist/core/agents/agent-central-ledger.js +9 -0
  25. package/dist/core/agents/agent-cleanup-executor.js +334 -41
  26. package/dist/core/agents/agent-cleanup.js +20 -1
  27. package/dist/core/agents/agent-command-surface.js +3 -1
  28. package/dist/core/agents/agent-effort-policy.js +30 -38
  29. package/dist/core/agents/agent-janitor.js +9 -10
  30. package/dist/core/agents/agent-namespace-safety.js +56 -0
  31. package/dist/core/agents/agent-orchestrator.js +25 -3
  32. package/dist/core/agents/agent-output-validator.js +1 -1
  33. package/dist/core/agents/agent-plan.js +100 -21
  34. package/dist/core/agents/agent-role-config.js +43 -49
  35. package/dist/core/agents/agent-runner-codex-exec.js +18 -3
  36. package/dist/core/agents/agent-runner-process.js +1 -0
  37. package/dist/core/agents/agent-schema.js +3 -2
  38. package/dist/core/agents/fast-mode-policy.js +3 -5
  39. package/dist/core/agents/native-cli-session-swarm.js +1 -1
  40. package/dist/core/agents/native-worker-backend-router.js +2 -1
  41. package/dist/core/agents/work-partition/repo-inventory.js +68 -7
  42. package/dist/core/agents/zellij-right-lane-cockpit.js +2 -2
  43. package/dist/core/code-structure.js +5 -4
  44. package/dist/core/codex/agent-config-file-repair.js +94 -193
  45. package/dist/core/codex/codex-cli-update.js +723 -0
  46. package/dist/core/codex/codex-config-guard.js +38 -11
  47. package/dist/core/codex/codex-project-config-policy.js +3 -6
  48. package/dist/core/codex/codex-startup-config-postcheck.js +52 -42
  49. package/dist/core/codex-adapter.js +35 -22
  50. package/dist/core/codex-app/codex-agent-role-sync.js +13 -54
  51. package/dist/core/codex-app/codex-app-fast-ui-repair.js +51 -20
  52. package/dist/core/codex-app/codex-app-launcher.js +48 -17
  53. package/dist/core/codex-app/codex-app-restart.js +23 -2
  54. package/dist/core/codex-app/codex-app-ui-state-snapshot.js +11 -3
  55. package/dist/core/codex-app/sks-menubar.js +136 -5
  56. package/dist/core/codex-app.js +35 -14
  57. package/dist/core/codex-compat/codex-hook-warning-detector.js +10 -1
  58. package/dist/core/codex-compat/codex-release-manifest.js +6 -6
  59. package/dist/core/codex-control/codex-0139-doctor-real-probe.js +7 -1
  60. package/dist/core/codex-control/codex-0139-image-path-real-probe.js +29 -12
  61. package/dist/core/codex-control/codex-0139-probe-runner.js +103 -28
  62. package/dist/core/codex-control/codex-0139-real-probe-summary.js +7 -3
  63. package/dist/core/codex-control/codex-0139-real-probes.js +21 -6
  64. package/dist/core/codex-control/codex-0139-sandbox-real-probe.js +39 -13
  65. package/dist/core/codex-control/codex-0139-web-search-probe.js +28 -14
  66. package/dist/core/codex-control/{codex-0142-capability.js → codex-0144-capability.js} +22 -22
  67. package/dist/core/codex-control/codex-0144-collab-agent-real-probe.js +63 -0
  68. package/dist/core/codex-control/codex-lb-launch-recovery.js +278 -0
  69. package/dist/core/codex-control/codex-multi-agent-event-normalizer.js +5 -1
  70. package/dist/core/codex-control/codex-reliability-shield.js +93 -30
  71. package/dist/core/codex-control/codex-sdk-adapter.js +96 -13
  72. package/dist/core/codex-control/codex-sdk-config-policy.js +2 -1
  73. package/dist/core/codex-control/codex-sdk-sandbox-policy.js +6 -3
  74. package/dist/core/codex-control/codex-task-runner.js +62 -9
  75. package/dist/core/codex-control/python-codex-sdk-adapter.js +30 -3
  76. package/dist/core/codex-exec-output-schema.js +35 -6
  77. package/dist/core/codex-lb/codex-lb-env.js +30 -1
  78. package/dist/core/codex-lb/codex-lb-tool-catalog.js +478 -0
  79. package/dist/core/codex-lb/codex-lb-tool-output-recovery.js +291 -0
  80. package/dist/core/codex-native/codex-native-feature-broker.js +31 -38
  81. package/dist/core/codex-native/codex-native-feature-matrix.js +2 -2
  82. package/dist/core/codex-native/codex-native-repair-transaction.js +1 -1
  83. package/dist/core/codex-native/core-skill-manifest.js +8 -4
  84. package/dist/core/codex-native/native-capability-postcheck.js +16 -8
  85. package/dist/core/codex-native/native-capability-repair-matrix.js +76 -27
  86. package/dist/core/codex-plugins/codex-plugin-json.js +67 -21
  87. package/dist/core/codex-plugins/codex-plugin-repair.js +118 -0
  88. package/dist/core/codex-runtime/codex-desktop-config-policy.js +305 -0
  89. package/dist/core/commands/agent-bridge-command.js +23 -2
  90. package/dist/core/commands/agent-command.js +38 -5
  91. package/dist/core/commands/basic-cli.js +77 -30
  92. package/dist/core/commands/command-utils.js +1 -1
  93. package/dist/core/commands/gc-command.js +27 -4
  94. package/dist/core/commands/image-ux-review-command.js +55 -24
  95. package/dist/core/commands/mad-sks-command.js +182 -137
  96. package/dist/core/commands/naruto-command.js +643 -1153
  97. package/dist/core/commands/pipeline-command.js +1 -0
  98. package/dist/core/commands/research-command.js +293 -231
  99. package/dist/core/commands/run-command.js +100 -23
  100. package/dist/core/commands/team-command.js +2 -3
  101. package/dist/core/commands/team-legacy-observe-command.js +94 -359
  102. package/dist/core/commands/wiki-command.js +179 -83
  103. package/dist/core/computer-use-live-evidence.js +166 -3
  104. package/dist/core/computer-use-status.js +5 -2
  105. package/dist/core/daemon/sksd-hook-daemon-entrypoint.js +2 -2
  106. package/dist/core/daemon/sksd-hook-daemon.js +171 -28
  107. package/dist/core/daemon/sksd-hook-dispatch.js +2 -2
  108. package/dist/core/db-safety.js +2 -2
  109. package/dist/core/decision-lattice.js +6 -6
  110. package/dist/core/dfix/verification-selector.js +6 -4
  111. package/dist/core/doctor/browser-use-repair.js +54 -13
  112. package/dist/core/doctor/codex-0139-doctor.js +3 -2
  113. package/dist/core/doctor/codex-startup-config-repair.js +8 -3
  114. package/dist/core/doctor/computer-use-repair.js +28 -39
  115. package/dist/core/doctor/doctor-codex-startup-repair.js +24 -149
  116. package/dist/core/doctor/doctor-context7-repair.js +1 -1
  117. package/dist/core/doctor/doctor-dirty-planner.js +1 -1
  118. package/dist/core/doctor/doctor-native-capability-repair.js +74 -3
  119. package/dist/core/doctor/imagegen-repair.js +47 -12
  120. package/dist/core/doctor/legacy-global-hook-cleanup.js +179 -0
  121. package/dist/core/feature-fixture-executor.js +71 -7
  122. package/dist/core/feature-fixture-runner.js +53 -12
  123. package/dist/core/feature-fixtures.js +47 -14
  124. package/dist/core/feature-registry.js +53 -58
  125. package/dist/core/fsx.js +54 -6
  126. package/dist/core/harness-conflicts.js +19 -10
  127. package/dist/core/hooks-runtime/code-pack-freshness-preflight.js +5 -4
  128. package/dist/core/hooks-runtime/hook-invocation-dedupe.js +147 -0
  129. package/dist/core/hooks-runtime/hook-io.js +14 -4
  130. package/dist/core/hooks-runtime/light-turn.js +70 -0
  131. package/dist/core/hooks-runtime/payload-signals.js +270 -0
  132. package/dist/core/hooks-runtime/team-digest.js +0 -1
  133. package/dist/core/hooks-runtime/tool-output-quarantine.js +93 -0
  134. package/dist/core/hooks-runtime.js +418 -250
  135. package/dist/core/image/image-artifact-path-contract.js +8 -6
  136. package/dist/core/image/image-artifact-registry.js +5 -1
  137. package/dist/core/image-ux-review/imagegen-adapter.js +5 -2
  138. package/dist/core/imagegen/imagegen-capability.js +10 -13
  139. package/dist/core/imagegen/require-imagegen.js +37 -11
  140. package/dist/core/init/skills.js +16 -30
  141. package/dist/core/init.js +144 -36
  142. package/dist/core/managed-assets/managed-assets-manifest.js +417 -14
  143. package/dist/core/mission.js +24 -1
  144. package/dist/core/naruto/naruto-work-graph.js +70 -4
  145. package/dist/core/ops/reporting.js +3 -0
  146. package/dist/core/pipeline-internals/runtime-core.js +578 -180
  147. package/dist/core/pipeline-internals/runtime-gates.js +191 -49
  148. package/dist/core/ppt/style-tokens.js +1 -1
  149. package/dist/core/ppt-review/index.js +1 -1
  150. package/dist/core/ppt-review/slide-exporter.js +23 -17
  151. package/dist/core/ppt-review/slide-imagegen-review.js +1 -1
  152. package/dist/core/ppt-review/slide-issue-extraction.js +4 -2
  153. package/dist/core/preflight/parallel-preflight-engine.js +50 -1
  154. package/dist/core/product-design-plugin.js +2 -2
  155. package/dist/core/proof/route-finalizer.js +1 -1
  156. package/dist/core/proof/route-proof-gate.js +7 -2
  157. package/dist/core/proof-field.js +3 -3
  158. package/dist/core/provider/model-router.js +38 -32
  159. package/dist/core/recallpulse/policy.js +12 -28
  160. package/dist/core/recallpulse.js +11 -6
  161. package/dist/core/release/gate-manifest.js +18 -12
  162. package/dist/core/release/gate-pack-manifest.js +1 -1
  163. package/dist/core/release/npm-pack-proof.js +247 -0
  164. package/dist/core/release/package-dist-snapshot.js +151 -0
  165. package/dist/core/release/package-size-budget.js +5 -0
  166. package/dist/core/release/release-authorization-snapshot.js +115 -0
  167. package/dist/core/release/release-gate-affected-selector.js +15 -3
  168. package/dist/core/release/release-gate-cache-v2.js +30 -0
  169. package/dist/core/release/release-gate-contract.js +161 -0
  170. package/dist/core/release/release-gate-dag.js +44 -3
  171. package/dist/core/release/release-gate-hermetic-env.js +28 -17
  172. package/dist/core/release/release-real-contract.js +496 -0
  173. package/dist/core/release-parallel-full-coverage.js +31 -143
  174. package/dist/core/research/claim-evidence-matrix.js +41 -6
  175. package/dist/core/research/experiment-plan.js +14 -10
  176. package/dist/core/research/falsification.js +9 -2
  177. package/dist/core/research/implementation-blueprint-densifier.js +82 -60
  178. package/dist/core/research/implementation-blueprint.js +32 -26
  179. package/dist/core/research/mock-result.js +122 -11
  180. package/dist/core/research/replication-pack.js +15 -8
  181. package/dist/core/research/research-adversarial-review.js +1068 -0
  182. package/dist/core/research/research-claim-builder.js +69 -17
  183. package/dist/core/research/research-claim-synthesizer.js +343 -0
  184. package/dist/core/research/research-cycle-runner.js +53 -3
  185. package/dist/core/research/research-falsification-runner.js +176 -0
  186. package/dist/core/research/research-final-reviewer.js +44 -125
  187. package/dist/core/research/research-realistic-report.js +14 -6
  188. package/dist/core/research/research-review-artifact-digest.js +66 -0
  189. package/dist/core/research/research-source-evidence.js +144 -0
  190. package/dist/core/research/research-source-layer-catalog.js +68 -0
  191. package/dist/core/research/research-source-ledger-merge.js +250 -12
  192. package/dist/core/research/research-source-shards.js +26 -70
  193. package/dist/core/research/research-stage-runner.js +237 -247
  194. package/dist/core/research/research-super-search.js +184 -0
  195. package/dist/core/research/research-synthesis-prompt.js +20 -1
  196. package/dist/core/research/research-synthesis-writer.js +86 -5
  197. package/dist/core/research/research-work-graph.js +25 -18
  198. package/dist/core/research/source-quality-report.js +21 -0
  199. package/dist/core/research.js +429 -280
  200. package/dist/core/retention/retention-budget.js +25 -6
  201. package/dist/core/retention.js +980 -101
  202. package/dist/core/routes/constants.js +1 -1
  203. package/dist/core/routes/dollar-manifest-lite.js +11 -11
  204. package/dist/core/routes/evidence.js +4 -4
  205. package/dist/core/routes/ppt-policy.js +1 -1
  206. package/dist/core/routes.js +92 -64
  207. package/dist/core/runtime/task-profile.js +66 -0
  208. package/dist/core/runtime/verification-budget.js +12 -0
  209. package/dist/core/secret-redaction.js +4 -0
  210. package/dist/core/security/high-risk-contracts.js +6 -6
  211. package/dist/core/stop-gate/stop-gate-check.js +49 -12
  212. package/dist/core/subagents/agent-catalog.js +215 -0
  213. package/dist/core/subagents/model-policy.js +118 -0
  214. package/dist/core/subagents/naruto-help-contract.js +40 -0
  215. package/dist/core/subagents/official-subagent-config.js +488 -0
  216. package/dist/core/subagents/official-subagent-preparation.js +251 -0
  217. package/dist/core/subagents/official-subagent-prompt.js +137 -0
  218. package/dist/core/subagents/official-subagent-runner.js +129 -0
  219. package/dist/core/subagents/subagent-evidence.js +663 -0
  220. package/dist/core/subagents/terminology.js +16 -0
  221. package/dist/core/subagents/thread-budget.js +21 -0
  222. package/dist/core/subagents/triwiki-attention.js +65 -0
  223. package/dist/core/super-search/runtime-helpers.js +173 -19
  224. package/dist/core/super-search/runtime.js +140 -15
  225. package/dist/core/super-search/source-records.js +49 -8
  226. package/dist/core/team-review-policy.js +15 -0
  227. package/dist/core/triwiki/code-pack.js +8 -2
  228. package/dist/core/triwiki/triwiki-cache-key.js +108 -29
  229. package/dist/core/triwiki/triwiki-module-card.js +1 -1
  230. package/dist/core/triwiki-attention.js +13 -6
  231. package/dist/core/triwiki-provenance.js +274 -0
  232. package/dist/core/triwiki-runtime.js +21 -7
  233. package/dist/core/triwiki-wrongness/wrongness-ledger.js +187 -61
  234. package/dist/core/triwiki-wrongness/wrongness-retrieval.js +11 -2
  235. package/dist/core/triwiki-wrongness/wrongness-trust-policy.js +2 -0
  236. package/dist/core/update-check.js +23 -15
  237. package/dist/core/version-manager.js +51 -1
  238. package/dist/core/version.js +1 -1
  239. package/dist/core/wiki-coordinate.js +128 -12
  240. package/dist/core/work-order-ledger.js +208 -10
  241. package/dist/core/zellij/zellij-command.js +12 -1
  242. package/dist/core/zellij/zellij-dashboard-pane.js +3 -3
  243. package/dist/core/zellij/zellij-fake-adapter.js +3 -1
  244. package/dist/core/zellij/zellij-launcher.js +51 -21
  245. package/dist/core/zellij/zellij-layout-builder.js +14 -5
  246. package/dist/core/zellij/zellij-official-subagent-activity.js +477 -0
  247. package/dist/core/zellij/zellij-official-subagent-telemetry.js +264 -0
  248. package/dist/core/zellij/zellij-pane-proof.js +32 -6
  249. package/dist/core/zellij/zellij-slot-pane-renderer.js +17 -5
  250. package/dist/core/zellij/zellij-slot-telemetry.js +15 -3
  251. package/dist/core/zellij/zellij-ui-mode.js +1 -1
  252. package/dist/core/zellij/zellij-viewport-binder.js +3 -0
  253. package/dist/core/zellij/zellij-worker-pane-manager.js +5 -3
  254. package/dist/scripts/agent-fast-mode-default-check.js +48 -29
  255. package/dist/scripts/agent-role-config-repair-check.js +34 -15
  256. package/dist/scripts/agent-wiki-context-proof-check.js +16 -2
  257. package/dist/scripts/all-feature-deep-completion-check.js +14 -4
  258. package/dist/scripts/architecture-guard-check.js +8 -1
  259. package/dist/scripts/build-dist.js +17 -5
  260. package/dist/scripts/canonical-test-runner.js +188 -0
  261. package/dist/scripts/check-command-module-budget.js +38 -16
  262. package/dist/scripts/check-legacy-free.js +1 -1
  263. package/dist/scripts/check-route-modularity.js +0 -1
  264. package/dist/scripts/check-ts-contracts.js +1 -1
  265. package/dist/scripts/codex-0139-interrupt-agent-check.js +5 -1
  266. package/dist/scripts/{codex-0142-app-server-v2-check.js → codex-0144-app-server-v2-check.js} +11 -10
  267. package/dist/scripts/{codex-0142-binary-identity-check.js → codex-0144-binary-identity-check.js} +4 -4
  268. package/dist/scripts/codex-0144-capability-check.js +21 -0
  269. package/dist/scripts/{codex-0139-real-probes-check.js → codex-0144-core-real-probes-check.js} +19 -5
  270. package/dist/scripts/{codex-0142-doctor-wiring-check.js → codex-0144-doctor-wiring-check.js} +6 -6
  271. package/dist/scripts/{codex-0142-manifest-check.js → codex-0144-manifest-check.js} +11 -3
  272. package/dist/scripts/{codex-0142-policy-check.js → codex-0144-policy-check.js} +2 -2
  273. package/dist/scripts/{codex-0142-thread-store-check.js → codex-0144-thread-store-check.js} +3 -3
  274. package/dist/scripts/codex-app-provider-model-ui-check.js +53 -19
  275. package/dist/scripts/codex-app-ui-preservation-check.js +35 -4
  276. package/dist/scripts/codex-control-all-pipelines-check.js +7 -3
  277. package/dist/scripts/codex-control-side-effect-scope-check.js +2 -2
  278. package/dist/scripts/codex-control-tool-output-continuity-audit-check.js +27 -0
  279. package/dist/scripts/codex-effort-auto-discovery-check.js +1 -1
  280. package/dist/scripts/codex-lb-fast-mode-truth-check.js +1 -0
  281. package/dist/scripts/{codex-lb-gpt55-fast-profile-check.js → codex-lb-gpt56-fast-profile-check.js} +56 -5
  282. package/dist/scripts/codex-model-metadata-check.js +1 -1
  283. package/dist/scripts/codex-native-agent-role-content-check.js +15 -7
  284. package/dist/scripts/codex-native-repair-transaction-check.js +3 -1
  285. package/dist/scripts/codex-sdk-all-pipelines-check.js +7 -4
  286. package/dist/scripts/codex-sdk-research-pipeline-check.js +30 -8
  287. package/dist/scripts/codex-sdk-sandbox-policy-check.js +5 -1
  288. package/dist/scripts/codex-sdk-version-compat-check.js +2 -1
  289. package/dist/scripts/db-route-materialization-check.js +33 -0
  290. package/dist/scripts/dfix-fixture-check.js +1 -1
  291. package/dist/scripts/docs-truthfulness-check.js +4 -2
  292. package/dist/scripts/doctor-codex-startup-repair-check.js +47 -25
  293. package/dist/scripts/doctor-context7-repair-check.js +2 -1
  294. package/dist/scripts/doctor-fix-production-blackbox.js +12 -2
  295. package/dist/scripts/doctor-fixes-codex-app-fast-ui-check.js +34 -7
  296. package/dist/scripts/doctor-imagegen-repair-check.js +14 -4
  297. package/dist/scripts/doctor-startup-config-repair-blackbox.js +9 -3
  298. package/dist/scripts/doctor-startup-config-repair-check.js +13 -3
  299. package/dist/scripts/install-update-preserves-config-check.js +7 -2
  300. package/dist/scripts/legacy-gate-inventory-check.js +7 -5
  301. package/dist/scripts/legacy-strong-inventory-check.js +7 -5
  302. package/dist/scripts/legacy-upgrade-matrix-check.js +4 -4
  303. package/dist/scripts/lib/native-cli-session-swarm-check-lib.js +173 -13
  304. package/dist/scripts/mad-sks-app-ui-no-mutation-check.js +165 -6
  305. package/dist/scripts/managed-role-manifest-parity-check.js +5 -4
  306. package/dist/scripts/mutation-callsite-coverage-check.js +0 -11
  307. package/dist/scripts/naruto-codex-e2e-check.js +14 -7
  308. package/dist/scripts/naruto-shadow-clone-swarm-check.js +4 -201
  309. package/dist/scripts/npm-publish-performance-check.js +20 -12
  310. package/dist/scripts/official-subagent-workflow-check.js +145 -0
  311. package/dist/scripts/package-published-contract-check.js +6 -20
  312. package/dist/scripts/packlist-performance-check.js +17 -3
  313. package/dist/scripts/parallel-verification-engine-check.js +2 -2
  314. package/dist/scripts/postinstall-safe-side-effects-check.js +8 -3
  315. package/dist/scripts/ppt-no-mock-as-real-check.js +3 -1
  316. package/dist/scripts/prepublish-release-check-or-fast.js +23 -86
  317. package/dist/scripts/product-design-plugin-routing-check.js +1 -1
  318. package/dist/scripts/release-affected-selector-check.js +74 -1
  319. package/dist/scripts/release-check-stamp.js +324 -239
  320. package/dist/scripts/release-dag-full-coverage-check.js +7 -15
  321. package/dist/scripts/release-dynamic-presets-check.js +10 -1
  322. package/dist/scripts/release-gate-dag-runner-check.js +3 -3
  323. package/dist/scripts/release-gate-dag-runner.js +35 -11
  324. package/dist/scripts/release-gate-existence-audit.js +1 -2
  325. package/dist/scripts/release-gate-script-parity-check.js +1 -1
  326. package/dist/scripts/release-parallel-full-coverage-check.js +12 -6
  327. package/dist/scripts/release-parallel-speed-budget-check.js +18 -2
  328. package/dist/scripts/release-real-check.js +390 -157
  329. package/dist/scripts/release-registry-check.js +61 -16
  330. package/dist/scripts/release-runtime-truth-matrix-check.js +22 -0
  331. package/dist/scripts/research-blueprint-densifier-check.js +2 -2
  332. package/dist/scripts/research-real-cycle-no-legacy-final-md-check.js +11 -7
  333. package/dist/scripts/route-proof-artifact-structure-check.js +1 -0
  334. package/dist/scripts/search-visibility-gate-lib.js +1 -1
  335. package/dist/scripts/seo-geo-route-identity-check.js +30 -4
  336. package/dist/scripts/sizecheck.js +4 -4
  337. package/dist/scripts/sks-1-11-gate-lib.js +53 -6
  338. package/dist/scripts/sks-3-1-4-directive-check-lib.js +8 -2
  339. package/dist/scripts/sks-3-1-5-directive-check-lib.js +3 -2
  340. package/dist/scripts/sks-3-1-6-directive-check-lib.js +5 -3
  341. package/dist/scripts/sks-menubar-install-check.js +8 -0
  342. package/dist/scripts/sks-uninstall-regression-check.js +1 -1
  343. package/dist/scripts/sksd-daemon-check.js +16 -6
  344. package/dist/scripts/trust-fixture-check.js +32 -10
  345. package/dist/scripts/write-build-manifest.js +2 -1
  346. package/dist/scripts/wrongness-fixture-check.js +1 -1
  347. package/dist/scripts/zellij-layout-valid-check.js +36 -11
  348. package/dist/scripts/zellij-pane-proof-check.js +33 -2
  349. package/dist/scripts/zellij-real-session-cleanup-check.js +122 -2
  350. package/dist/scripts/zellij-real-session-launch-check.js +76 -5
  351. package/dist/scripts/zellij-slot-pane-renderer-check.js +4 -4
  352. package/dist/scripts/zellij-spawn-on-demand-layout-check.js +3 -3
  353. package/docs/demo.tape +1 -1
  354. package/infra-harness-gates.json +1486 -0
  355. package/package.json +32 -19
  356. package/release-gates.v2.json +4060 -0
  357. package/runtime-required-scripts.json +9 -0
  358. package/schemas/codex/{app-server-0.142 → app-server-0.144}/codex_app_server_protocol.v2.schemas.json +1146 -781
  359. package/schemas/codex/codex-0139-real-probe-result.schema.json +39 -5
  360. package/schemas/codex/ppt-slide-issue-ledger.schema.json +2 -1
  361. package/dist/commands/db.js +0 -6
  362. package/dist/core/codex-control/codex-0139-multi-agent-real-probe.js +0 -107
  363. package/dist/core/commands/db-command.js +0 -146
  364. package/dist/core/research/prompt.js +0 -15
  365. package/dist/scripts/agent-native-release-gate.js +0 -274
  366. package/dist/scripts/codex-0142-capability-check.js +0 -21
  367. package/dist/scripts/codex-control-tool-call-sequence-repair-check.js +0 -14
  368. package/dist/scripts/command-performance-scorecard-check.js +0 -204
  369. package/dist/scripts/config-managed-merge-callsite-coverage-check.js +0 -212
  370. package/dist/scripts/dollar-performance-scorecard-check.js +0 -257
  371. package/dist/scripts/gate-timing-check.js +0 -16
  372. package/dist/scripts/ops-maturity-scorecard-check.js +0 -12
  373. package/dist/scripts/performance-baseline-check.js +0 -12
  374. package/dist/scripts/performance-improvement-report-check.js +0 -58
  375. package/dist/scripts/release-parallel-check.js +0 -389
  376. package/dist/scripts/release-runner-efficiency-check.js +0 -15
  377. package/dist/scripts/retention-long-run-smoke-check.js +0 -299
  378. package/docs/assets/sneakoscope-architecture-pipeline.jpg +0 -0
@@ -4,10 +4,13 @@ import fs from 'node:fs';
4
4
  import os from 'node:os';
5
5
  import path from 'node:path';
6
6
  import { fileURLToPath } from 'node:url';
7
+ import { readCurrentNpmPackProof } from '../core/release/npm-pack-proof.js';
7
8
  const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', '..');
8
9
  const expectedRegistry = 'https://registry.npmjs.org/';
9
10
  const requireUnpublished = process.argv.includes('--require-unpublished');
10
11
  const requirePublishAuth = process.argv.includes('--require-publish-auth');
12
+ const requirePackProof = process.argv.includes('--require-pack-proof');
13
+ const publishAuthMode = String(process.env.SKS_PUBLISH_AUTH_MODE || 'token').trim().toLowerCase();
11
14
  const skipNetwork = process.env.SKS_SKIP_REGISTRY_NETWORK_CHECK === '1';
12
15
  const npmBin = process.platform === 'win32' ? 'npm.cmd' : 'npm';
13
16
  function fail(message, detail = '') {
@@ -135,21 +138,10 @@ function checkLockfile(pkg) {
135
138
  }
136
139
  }
137
140
  function checkPackedMetadata(pkg) {
138
- const env = npmRegistryReadEnv({
139
- npm_config_cache: process.env.SKS_RELEASE_NPM_CACHE || path.join(os.tmpdir(), 'sneakoscope-npm-cache')
140
- });
141
- const result = run(npmBin, ['pack', '--dry-run', '--json', '--ignore-scripts', '--registry', expectedRegistry], { env });
142
- if (result.status !== 0)
143
- fail('npm pack dry-run failed', `${result.stdout || ''}\n${result.stderr || ''}`);
144
- let info;
145
- try {
146
- info = JSON.parse(result.stdout)[0];
147
- }
148
- catch {
149
- fail('npm pack dry-run returned non-json output', result.stdout || '');
150
- }
151
- if (!info)
152
- fail('npm pack dry-run returned no package metadata');
141
+ const packProof = readCurrentNpmPackProof(root);
142
+ if (!packProof.ok || !packProof.proof)
143
+ fail('current npm pack proof is required', packProof.blockers.join('\n'));
144
+ const info = packProof.proof.info;
153
145
  if (info.name !== pkg.name || info.version !== pkg.version) {
154
146
  fail('packed package metadata differs from package.json', `pack: ${info.name || 'missing'}@${info.version || 'missing'}\npackage.json: ${pkg.name}@${pkg.version}`);
155
147
  }
@@ -219,6 +211,13 @@ function isBackfillTag(value) {
219
211
  return /^backfill(?:[-_][a-z0-9.-]+)?$/i.test(String(value || ''));
220
212
  }
221
213
  function checkPublishAuth(pkg) {
214
+ if (publishAuthMode === 'trusted-publisher') {
215
+ checkTrustedPublisherAuth(pkg);
216
+ return;
217
+ }
218
+ if (publishAuthMode !== 'token') {
219
+ fail('unsupported npm publish auth mode', `SKS_PUBLISH_AUTH_MODE=${publishAuthMode}`);
220
+ }
222
221
  if (skipNetwork) {
223
222
  fail('publish auth check cannot run when SKS_SKIP_REGISTRY_NETWORK_CHECK=1 is set');
224
223
  }
@@ -261,6 +260,48 @@ function checkPublishAuth(pkg) {
261
260
  fs.writeFileSync(out, `${JSON.stringify(report, null, 2)}\n`);
262
261
  console.log(`Publish auth check passed: ${pkg.name}@${pkg.version} as ${user}.`);
263
262
  }
263
+ function checkTrustedPublisherAuth(pkg) {
264
+ const expectedRepository = githubRepositorySlug(pkg);
265
+ const workflowRef = String(process.env.GITHUB_WORKFLOW_REF || '');
266
+ const blockers = [
267
+ process.env.GITHUB_ACTIONS === 'true' ? null : 'github_actions_environment_missing',
268
+ process.env.GITHUB_REF === 'refs/heads/main' ? null : 'trusted_publish_ref_not_main',
269
+ process.env.GITHUB_REPOSITORY === expectedRepository ? null : 'trusted_publish_repository_mismatch',
270
+ workflowRef.includes(`${expectedRepository}/.github/workflows/publish-npm.yml@refs/heads/main`)
271
+ ? null
272
+ : 'trusted_publish_workflow_ref_mismatch',
273
+ process.env.ACTIONS_ID_TOKEN_REQUEST_URL ? null : 'oidc_request_url_missing',
274
+ process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN ? null : 'oidc_request_token_missing'
275
+ ].filter(Boolean);
276
+ if (blockers.length > 0) {
277
+ fail('npm trusted-publisher environment is incomplete', `${blockers.join('\n')}\nUse the manual publish-npm.yml workflow on refs/heads/main with id-token: write.`);
278
+ }
279
+ const report = {
280
+ schema: 'sks.release-publish-auth.v1',
281
+ ok: true,
282
+ package: pkg.name,
283
+ version: pkg.version,
284
+ registry: expectedRegistry,
285
+ auth_mode: 'trusted-publisher',
286
+ github_repository: expectedRepository,
287
+ github_ref: process.env.GITHUB_REF,
288
+ workflow_file: 'publish-npm.yml',
289
+ oidc_environment_present: true,
290
+ identity_verified_by_registry_at_publish: false,
291
+ generated_at: new Date().toISOString()
292
+ };
293
+ const out = path.join(root, '.sneakoscope', 'reports', 'release-publish-auth.json');
294
+ fs.mkdirSync(path.dirname(out), { recursive: true });
295
+ fs.writeFileSync(out, `${JSON.stringify(report, null, 2)}\n`);
296
+ console.log(`Trusted-publisher environment check passed: ${pkg.name}@${pkg.version} from ${expectedRepository}.`);
297
+ }
298
+ function githubRepositorySlug(pkg) {
299
+ const repository = typeof pkg.repository === 'string' ? pkg.repository : pkg.repository?.url;
300
+ const match = String(repository || '').match(/github\.com[/:]([^/]+\/[^/#]+?)(?:\.git)?$/i);
301
+ if (!match?.[1])
302
+ fail('package.json repository must identify the GitHub trusted-publisher repository');
303
+ return match[1].replace(/\.git$/i, '');
304
+ }
264
305
  function publishAuthRepairInstructions(pkg, authHints) {
265
306
  const lines = [];
266
307
  if (authHints.length > 0) {
@@ -364,7 +405,11 @@ const pkg = readJson('package.json');
364
405
  checkPackagePublishConfig(pkg);
365
406
  checkRootNpmrc(pkg);
366
407
  checkLockfile(pkg);
367
- checkPackedMetadata(pkg);
408
+ if (skipNetwork && (requireUnpublished || requirePublishAuth)) {
409
+ fail('registry network checks cannot be skipped for publish-authorizing validation');
410
+ }
411
+ if (requirePackProof)
412
+ checkPackedMetadata(pkg);
368
413
  checkPublishedVersion(pkg);
369
414
  if (requirePublishAuth)
370
415
  checkPublishAuth(pkg);
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+ // @ts-nocheck
3
+ import fs from 'node:fs';
4
+ import path from 'node:path';
5
+ import { buildRuntimeTruthMatrix, writeRuntimeTruthMatrix } from '../core/proof/runtime-truth-matrix.js';
6
+ import { assertGate, emitGate, root } from './sks-1-18-gate-lib.js';
7
+ const pkg = JSON.parse(fs.readFileSync(path.join(root, 'package.json'), 'utf8'));
8
+ const matrix = await buildRuntimeTruthMatrix({
9
+ root,
10
+ releaseVersion: String(pkg.version || '')
11
+ });
12
+ await writeRuntimeTruthMatrix(root, matrix);
13
+ assertGate(matrix.ok === true, 'runtime truth matrix contains blocking evidence', {
14
+ blockers: matrix.blockers,
15
+ required_rows: matrix.rows.filter((row) => row.required_mode)
16
+ });
17
+ emitGate('release:runtime-truth-matrix', {
18
+ report: `.sneakoscope/reports/runtime-truth-matrix-${pkg.version}.json`,
19
+ rows: matrix.rows.length,
20
+ priorities: matrix.priorities
21
+ });
22
+ //# sourceMappingURL=release-runtime-truth-matrix-check.js.map
@@ -12,10 +12,10 @@ const plan = await research.writeResearchPlan(dir, 'blueprint densifier blackbox
12
12
  const graph = workGraph.buildResearchWorkGraph(plan);
13
13
  await cycleRunner.runResearchCycle({ root: process.cwd(), dir, plan, graph, cycle: 1, backend: 'mock', timeoutMs: 120000, maxParallelStages: 4, mock: true });
14
14
  const blueprint = JSON.parse(fs.readFileSync(path.join(dir, 'implementation-blueprint.json'), 'utf8'));
15
- assertGate(blueprint.repository_aware === true, 'blueprint must be repository-aware', blueprint);
15
+ assertGate(blueprint.repository_aware === true || (blueprint.domain_research === true && blueprint.handoff_route === 'research_validation'), 'blueprint must preserve either a repository-aware implementation boundary or an explicit domain-research validation boundary', blueprint);
16
16
  assertGate((blueprint.existing_files || []).length > 0, 'blueprint must list concrete existing files', blueprint);
17
17
  assertGate((blueprint.sections || []).length >= 8, 'blueprint must keep required sections', blueprint);
18
- assertGate((blueprint.test_commands || []).some((cmd) => String(cmd).includes('research:stage-cycle-runtime-blackbox')), 'blueprint must include concrete test commands', blueprint);
18
+ assertGate((blueprint.test_commands || []).some((cmd) => /^(?:procedure:|npm |node |cargo )/.test(String(cmd))), 'blueprint must include concrete verification commands or procedures', blueprint);
19
19
  assertGate(fs.existsSync(path.join(dir, 'team-handoff-goal.md')), 'team handoff goal must exist');
20
20
  emitGate('research:blueprint-densifier', { dir, sections: blueprint.sections.length, files: blueprint.existing_files.length });
21
21
  //# sourceMappingURL=research-blueprint-densifier-check.js.map
@@ -3,12 +3,16 @@
3
3
  import { assertGate, emitGate, readText } from './sks-1-18-gate-lib.js';
4
4
  const source = readText('src/core/commands/research-command.ts');
5
5
  const defaultIndex = source.indexOf('const cycleResult = await runResearchCycle({');
6
- const legacyIndex = source.indexOf('const legacyResearchCycle');
7
- const legacyExecIndex = source.indexOf('runCodexExec({');
8
6
  assertGate(defaultIndex > 0, 'default research run must call runResearchCycle with object input');
9
- assertGate(source.includes('--legacy-research-cycle'), 'legacy research cycle flag must exist');
10
- assertGate(source.includes('SKS_RESEARCH_LEGACY_CYCLE'), 'legacy research cycle env flag must exist');
11
- assertGate(source.includes('legacy_final_md_loop'), 'legacy final.md loop must be explicitly marked');
12
- assertGate(legacyExecIndex > legacyIndex, 'runCodexExec final.md path must live after legacy gate');
13
- emitGate('research:real-cycle-no-legacy-final-md', { defaultIndex, legacyIndex, legacyExecIndex });
7
+ for (const removed of ['SKS_RESEARCH_LEGACY_CYCLE', 'legacy_final_md_loop', 'runCodexExec({', 'runNativeAgentOrchestrator']) {
8
+ assertGate(!source.includes(removed), `legacy Research runtime token must be absent: ${removed}`);
9
+ }
10
+ assertGate(source.includes('REMOVED_RESEARCH_RUNTIME_FLAGS')
11
+ && source.includes('Unsupported legacy Research runtime option:'), 'removed Research flags must fail closed');
12
+ for (const removedFlag of ['--legacy-research-cycle', '--native-proof-only']) {
13
+ assertGate(source.includes(removedFlag), `removed Research flag blocker missing: ${removedFlag}`);
14
+ }
15
+ assertGate(source.includes("source_acquisition: 'super-search'"), 'Research run must record Super Search acquisition');
16
+ assertGate(source.includes("reviewer_workflow: 'official_codex_subagent'"), 'Research run must record official subagent review');
17
+ emitGate('research:real-cycle-no-legacy-final-md', { defaultIndex, legacy_runtime_removed: true, official_subagents: true, super_search: true });
14
18
  //# sourceMappingURL=research-real-cycle-no-legacy-final-md-check.js.map
@@ -69,6 +69,7 @@ async function runNegativeFixture() {
69
69
  mission_id: mission,
70
70
  status: 'verified',
71
71
  route: '$Team',
72
+ execution_class: 'real',
72
73
  summary: { files_changed: 0, commands_run: 0, tests_passed: 0, tests_failed: 0, manual_review_required: false },
73
74
  evidence: {
74
75
  agents: {
@@ -36,7 +36,7 @@ export function makeSearchVisibilityFixture(name = 'search-visibility', options
36
36
  }
37
37
  export function runSks(args, options = {}) {
38
38
  const result = spawnSync(process.execPath, [path.join(root, 'dist', 'bin', 'sks.js'), ...args], {
39
- cwd: root,
39
+ cwd: options.cwd || root,
40
40
  encoding: 'utf8',
41
41
  stdio: 'pipe',
42
42
  env: {
@@ -1,12 +1,38 @@
1
1
  #!/usr/bin/env node
2
2
  // @ts-nocheck
3
- import { assertGate, emitGate, runSksJson } from './search-visibility-gate-lib.js';
4
- const seo = runSksJson(['run', '$SEO-GEO-OPTIMIZER SEO audit this fixture', '--execute', '--json']).json;
5
- const geo = runSksJson(['run', '$SEO-GEO-OPTIMIZER Generative Engine Optimization audit AI search visibility', '--execute', '--json']).json;
3
+ import fs from 'node:fs';
4
+ import path from 'node:path';
5
+ import { assertGate, emitGate, makeSearchVisibilityFixture, runSksJson } from './search-visibility-gate-lib.js';
6
+ const fixture = makeSearchVisibilityFixture('seo-geo-route-identity');
7
+ fs.mkdirSync(path.join(fixture, '.sneakoscope'), { recursive: true });
8
+ let seo;
9
+ let geo;
10
+ let seoMissionIsolated = false;
11
+ let geoMissionIsolated = false;
12
+ const cleanupFixture = () => fs.rmSync(fixture, { recursive: true, force: true });
13
+ process.once('exit', cleanupFixture);
14
+ try {
15
+ seo = runSksJson(['run', '$SEO-GEO-OPTIMIZER SEO audit this fixture', '--execute', '--json'], { cwd: fixture }).json;
16
+ seoMissionIsolated = fs.existsSync(path.join(fixture, '.sneakoscope', 'missions', seo.mission_id));
17
+ geo = runSksJson(['run', '$SEO-GEO-OPTIMIZER Generative Engine Optimization audit AI search visibility', '--execute', '--json'], { cwd: fixture }).json;
18
+ geoMissionIsolated = fs.existsSync(path.join(fixture, '.sneakoscope', 'missions', geo.mission_id));
19
+ }
20
+ finally {
21
+ cleanupFixture();
22
+ process.removeListener('exit', cleanupFixture);
23
+ }
6
24
  const seoText = JSON.stringify(seo);
7
25
  const geoText = JSON.stringify(geo);
26
+ assertGate(seoMissionIsolated && geoMissionIsolated, 'SEO/GEO route identity missions must stay inside the hermetic fixture', {
27
+ fixture,
28
+ seo_mission_id: seo.mission_id,
29
+ geo_mission_id: geo.mission_id,
30
+ seo_mission_isolated: seoMissionIsolated,
31
+ geo_mission_isolated: geoMissionIsolated
32
+ });
8
33
  assertGate(/\$SEO-GEO-OPTIMIZER/.test(seoText) && /sks seo-geo-optimizer/.test(seoText) && /--mode seo/.test(seoText), 'sks run --execute must preserve unified optimizer route and execute seo mode path', seo);
9
34
  assertGate(/\$SEO-GEO-OPTIMIZER/.test(geoText) && /sks seo-geo-optimizer/.test(geoText) && /--mode geo/.test(geoText), 'sks run --execute must preserve unified optimizer route and execute geo mode path', geo);
10
35
  assertGate(!/\$AutoResearch/.test(seoText) && !/\$AutoResearch/.test(geoText), 'SEO/GEO route identity must not collapse into AutoResearch', { seo, geo });
11
- emitGate('seo-geo:route-identity', { seo_status: seo.status, geo_status: geo.status });
36
+ assertGate(!fs.existsSync(fixture), 'SEO/GEO route identity fixture must be removed after the check', { fixture });
37
+ emitGate('seo-geo:route-identity', { seo_status: seo.status, geo_status: geo.status, hermetic_fixture_removed: true });
12
38
  //# sourceMappingURL=seo-geo-route-identity-check.js.map
@@ -5,11 +5,11 @@ import fs from 'node:fs';
5
5
  import os from 'node:os';
6
6
  import path from 'node:path';
7
7
  import { fileURLToPath } from 'node:url';
8
- import { DEFAULT_MAX_PACK_BYTES } from '../core/release/package-size-budget.js';
8
+ import { DEFAULT_MAX_PACK_BYTES, DEFAULT_MAX_UNPACKED_BYTES } from '../core/release/package-size-budget.js';
9
9
  const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', '..');
10
10
  const limits = {
11
11
  packedBytes: Number(process.env.SKS_MAX_PACK_BYTES || DEFAULT_MAX_PACK_BYTES),
12
- unpackedBytes: Number(process.env.SKS_MAX_UNPACKED_BYTES || 10 * 1024 * 1024),
12
+ unpackedBytes: Number(process.env.SKS_MAX_UNPACKED_BYTES || DEFAULT_MAX_UNPACKED_BYTES),
13
13
  packFiles: Number(process.env.SKS_MAX_PACK_FILES || 2100),
14
14
  trackedFileBytes: Number(process.env.SKS_MAX_TRACKED_FILE_BYTES || 384 * 1024)
15
15
  };
@@ -20,8 +20,8 @@ const trackedFileSizeAllowlist = new Set([
20
20
  'release-gates.v2.json',
21
21
  // Generated Codex App Server protocol schemas; handwritten sources remain
22
22
  // subject to the 384 KiB split-review limit.
23
- 'schemas/codex/app-server-0.142/codex_app_server_protocol.schemas.json',
24
- 'schemas/codex/app-server-0.142/codex_app_server_protocol.v2.schemas.json'
23
+ 'schemas/codex/app-server-0.144/codex_app_server_protocol.schemas.json',
24
+ 'schemas/codex/app-server-0.144/codex_app_server_protocol.v2.schemas.json'
25
25
  ]);
26
26
  const npmBin = process.platform === 'win32' ? 'npm.cmd' : 'npm';
27
27
  function fail(message, detail = '') {
@@ -4,7 +4,11 @@ import fs from 'node:fs';
4
4
  import path from 'node:path';
5
5
  import { spawnSync } from 'node:child_process';
6
6
  import { fileURLToPath } from 'node:url';
7
+ import { tmpdir } from '../core/fsx.js';
7
8
  export const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', '..');
9
+ const fixtureMissionRoots = new Map();
10
+ const fixtureRoots = new Set();
11
+ let fixtureCleanupRegistered = false;
8
12
  export function assertGate(condition, message, detail = {}) {
9
13
  if (condition)
10
14
  return;
@@ -14,14 +18,15 @@ export function assertGate(condition, message, detail = {}) {
14
18
  export function emitGate(name, detail = {}) {
15
19
  console.log(JSON.stringify({ schema: 'sks.release-gate.v1', ok: true, gate: name, ...detail }, null, 2));
16
20
  }
17
- export function runSksJson(args) {
21
+ export function runSksJson(args, options = {}) {
18
22
  const entrypoint = path.join(root, 'dist', 'bin', 'sks.js');
19
23
  assertGate(fs.existsSync(entrypoint), 'dist entrypoint missing; run npm run build first', { entrypoint });
24
+ const mappedMissionRoot = args.map((arg) => fixtureMissionRoots.get(String(arg))).find(Boolean);
20
25
  const result = spawnSync(process.execPath, [entrypoint, ...args], {
21
- cwd: root,
26
+ cwd: options.cwd || mappedMissionRoot || root,
22
27
  encoding: 'utf8',
23
28
  timeout: Number(process.env.SKS_GATE_TIMEOUT_MS || 120_000),
24
- env: { ...process.env, SKS_SKIP_NPM_FRESHNESS_CHECK: '1', CI: 'true' }
29
+ env: { ...process.env, SKS_SKIP_NPM_FRESHNESS_CHECK: '1', CI: 'true', ...(options.env || {}) }
25
30
  });
26
31
  let parsed = null;
27
32
  try {
@@ -36,7 +41,10 @@ export function runSksJson(args) {
36
41
  return { ...parsed, _process_status: result.status, _stderr_tail: String(result.stderr || '').slice(-600) };
37
42
  }
38
43
  export function runPptReview(action = 'review') {
39
- const json = runSksJson(['ppt', 'fixture', '--mock', '--json']);
44
+ const json = runHermeticRouteFixture('ppt', ['ppt', 'fixture', '--mock', '--json'], {
45
+ SKS_TEST_FAKE_IMAGEGEN: '1',
46
+ SKS_TEST_FAKE_EXTRACTOR: '1'
47
+ });
40
48
  const proof = readMissionJson(json.mission_id, 'completion-proof.json');
41
49
  const review = json.artifacts || json.imagegen_review || {};
42
50
  json.proof_evidence = proof.evidence?.ppt_review || json.artifacts?.proof_evidence || {};
@@ -54,7 +62,7 @@ export function runPptReview(action = 'review') {
54
62
  return json;
55
63
  }
56
64
  export function runDfixFixture() {
57
- const json = runSksJson(['dfix', 'fixture', '--json']);
65
+ const json = runHermeticRouteFixture('dfix', ['dfix', 'fixture', '--json']);
58
66
  json.gate = json.gate || json.artifacts?.gate;
59
67
  assertGate(json.ok === true, 'dfix fixture blocked', json);
60
68
  assertGate(json.gate?.passed === true, 'dfix gate did not pass', json.gate);
@@ -66,7 +74,8 @@ export function runUxFixture() {
66
74
  return json;
67
75
  }
68
76
  export function missionFile(missionId, file) {
69
- return path.join(root, '.sneakoscope', 'missions', missionId, file);
77
+ const missionRoot = fixtureMissionRoots.get(missionId) || root;
78
+ return path.join(missionRoot, '.sneakoscope', 'missions', missionId, file);
70
79
  }
71
80
  export function readMissionJson(missionId, file) {
72
81
  const absolute = missionFile(missionId, file);
@@ -77,4 +86,42 @@ export function hasRelationType(missionId, type) {
77
86
  const ledger = readMissionJson(missionId, 'image-voxel-ledger.json');
78
87
  return (ledger.relations || []).some((relation) => relation.type === type);
79
88
  }
89
+ function createHermeticRouteFixtureRoot(label) {
90
+ const fixtureRoot = tmpdir(`${label}-release-fixture-`);
91
+ fs.writeFileSync(path.join(fixtureRoot, 'package.json'), `${JSON.stringify({ name: `sks-${label}-release-fixture`, private: true })}\n`);
92
+ fixtureRoots.add(fixtureRoot);
93
+ if (!fixtureCleanupRegistered) {
94
+ fixtureCleanupRegistered = true;
95
+ process.once('exit', () => {
96
+ for (const candidate of fixtureRoots)
97
+ fs.rmSync(candidate, { recursive: true, force: true });
98
+ });
99
+ }
100
+ return fixtureRoot;
101
+ }
102
+ function runHermeticRouteFixture(label, args, env = {}) {
103
+ const fixtureRoot = createHermeticRouteFixtureRoot(label);
104
+ const fixtureHome = path.join(fixtureRoot, 'home');
105
+ const json = runSksJson(args, {
106
+ cwd: fixtureRoot,
107
+ env: {
108
+ HOME: fixtureHome,
109
+ CODEX_HOME: path.join(fixtureHome, '.codex'),
110
+ SKS_GLOBAL_ROOT: path.join(fixtureHome, '.sneakoscope-global'),
111
+ TMPDIR: fixtureRoot,
112
+ TMP: fixtureRoot,
113
+ TEMP: fixtureRoot,
114
+ PWD: fixtureRoot,
115
+ SKS_TEST_ISOLATION: '1',
116
+ SKS_UPDATE_MIGRATION_GATE_DISABLED: '1',
117
+ NODE_ENV: 'test',
118
+ CI: 'true',
119
+ ...env
120
+ }
121
+ });
122
+ if (json.mission_id)
123
+ fixtureMissionRoots.set(json.mission_id, fixtureRoot);
124
+ json.fixture_root = fixtureRoot;
125
+ return json;
126
+ }
80
127
  //# sourceMappingURL=sks-1-11-gate-lib.js.map
@@ -122,9 +122,15 @@ async function codexAppGate(id) {
122
122
  }
123
123
  if (id === 'codex-app:agent-role-sync') {
124
124
  const mod = await importDist('core/codex-app/codex-agent-role-sync.js');
125
- const report = await mod.syncCodexAgentRoles({ root: rootDir, codexHome: path.join(rootDir, 'codex-home'), apply: true, agentTypeSupported: true });
125
+ const manifest = await importDist('core/managed-assets/managed-assets-manifest.js');
126
+ const codexHome = path.join(rootDir, 'codex-home');
127
+ const report = await mod.syncCodexAgentRoles({ root: rootDir, codexHome, apply: true, agentTypeSupported: true });
128
+ const expectedRoles = manifest.MANAGED_OFFICIAL_SUBAGENT_ROLES.map((role) => role.codex_name);
126
129
  assertGate(report.fallback === 'agent_type', 'agent role sync should use agent_type when supported', report);
127
- return emitGate(id, { roles: report.directive_roles.length });
130
+ assertGate(report.directive_roles.length === 0 && report.official_roles.join(',') === expectedRoles.join(','), 'agent role sync must expose the official project custom-agent catalog', report);
131
+ assertGate(manifest.MANAGED_OFFICIAL_SUBAGENT_ROLES.every((role) => fs.existsSync(path.join(rootDir, '.codex', 'agents', role.filename))), 'official project agent catalog missing', report);
132
+ assertGate(!fs.existsSync(path.join(codexHome, 'agents')), 'agent role sync must not create global directive roles', report);
133
+ return emitGate(id, { roles: report.official_roles.length });
128
134
  }
129
135
  if (id === 'codex-app:init-deep') {
130
136
  const mod = await importDist('core/codex-app/codex-init-deep.js');
@@ -267,8 +267,9 @@ async function richContentGate(id) {
267
267
  const mod = await importDist('core/codex-app/codex-agent-role-sync.js');
268
268
  const codexHome = path.join(rootDir, 'codex-home');
269
269
  const report = await mod.syncCodexAgentRoles({ root: rootDir, codexHome, apply: true });
270
- const role = fs.readFileSync(path.join(codexHome, 'agents', 'sks-checker.toml'), 'utf8');
271
- assertGate(/SKS managed \d+\.\d+\.\d+ directive role/.test(role) && role.includes('Execution role strategy'), 'managed agent role must include rich directive content', { role, report });
270
+ const role = fs.readFileSync(path.join(rootDir, '.codex', 'agents', 'expert.toml'), 'utf8');
271
+ assertGate(role.includes('model = "gpt-5.6-sol"') && role.includes('Do not spawn another subagent.'), 'official expert role must include Sol Max and no-nesting instructions', { role, report });
272
+ assertGate(!fs.existsSync(path.join(codexHome, 'agents')), 'rich-content sync must not create global directive roles', report);
272
273
  emitGate(id, { roles: report.created.length });
273
274
  }
274
275
  finally {
@@ -278,9 +278,11 @@ async function agentRoleContent(id) {
278
278
  try {
279
279
  const tmp = await tempRoot(id);
280
280
  const mod = await importDist('core/codex-app/codex-agent-role-sync.js');
281
- const report = await mod.syncCodexAgentRoles({ root: tmp, codexHome: path.join(tmp, 'codex-home'), apply: true });
282
- const role = fs.readFileSync(path.join(tmp, 'codex-home', 'agents', 'sks-implementer.toml'), 'utf8');
283
- assertGate(role.includes('Bounded ownership') && role.includes('Maker/checker separation') && role.includes('Required proof artifacts'), 'agent role content incomplete', { role, report });
281
+ const codexHome = path.join(tmp, 'codex-home');
282
+ const report = await mod.syncCodexAgentRoles({ root: tmp, codexHome, apply: true });
283
+ const role = fs.readFileSync(path.join(tmp, '.codex', 'agents', 'worker.toml'), 'utf8');
284
+ assertGate(role.includes('model = "gpt-5.6-luna"') && role.includes('Work only on the exact slice assigned by the parent agent.'), 'official worker role content incomplete', { role, report });
285
+ assertGate(!fs.existsSync(path.join(codexHome, 'agents')), 'agent role content gate must not create global directive roles', report);
284
286
  }
285
287
  finally {
286
288
  restoreEnv(previous);
@@ -92,6 +92,7 @@ const hasVisibleStatusSource = generatedSource.includes('NSStatusItem.variableLe
92
92
  && generatedSource.includes('configureStatusButton(button, title: state.title)')
93
93
  && generatedSource.includes('SKS ⚠')
94
94
  && generatedSource.includes('SKS ↑')
95
+ && generatedSource.includes('SKS ⬆')
95
96
  && generatedSource.includes('SKS ⋯')
96
97
  && generatedSource.includes('Timer.scheduledTimer(withTimeInterval: 30.0');
97
98
  const hasBackgroundReadonlyActions = generatedSource.includes('runSksBackground(["codex-lb", "fast-check"]')
@@ -99,6 +100,10 @@ const hasBackgroundReadonlyActions = generatedSource.includes('runSksBackground(
99
100
  && generatedSource.includes('runSksBackground(["fast-mode", "off", "--json"]')
100
101
  && generatedSource.includes('runSksSilent(["fast-mode", "status", "--json"]')
101
102
  && generatedSource.includes('runSksBackground(["update", "check"]')
103
+ && generatedSource.includes('runSksSilent(args)')
104
+ && generatedSource.includes('["codex", "update-status", "--json"]')
105
+ && generatedSource.includes('runSksBackground(["codex", "update", "--json"]')
106
+ && generatedSource.includes('runSksBackground(["doctor", "--fix", "--global-only", "--json"]')
102
107
  && generatedSource.includes('display notification')
103
108
  && !generatedSource.includes('runSksInTerminal')
104
109
  && !generatedSource.includes('runInTerminal');
@@ -170,6 +175,9 @@ const expectedMenuItems = [
170
175
  'Fast Check',
171
176
  'SKS Version Check',
172
177
  'Update SKS Now',
178
+ 'Codex CLI Version',
179
+ 'Update Codex CLI Now',
180
+ 'Run sks doctor --fix',
173
181
  'View Last Log'
174
182
  ];
175
183
  const missingExpectedItems = expectedMenuItems.filter((item) => !result.menu_items.includes(item));
@@ -17,7 +17,7 @@ await writeText(path.join(home, '.codex', 'config.toml'), [
17
17
  'default_profile = "sks-fast-high"',
18
18
  'service_tier = "fast"',
19
19
  '[profiles.sks-fast-high]',
20
- 'model = "gpt-5.5"',
20
+ 'model = "gpt-5.6-terra"',
21
21
  '[user.fast_mode]',
22
22
  'enabled = true',
23
23
  '[mcp_servers.user]',
@@ -1,9 +1,19 @@
1
1
  // @ts-nocheck
2
- import { assertGate, emitGate, importDist, root } from './sks-1-18-gate-lib.js';
2
+ import fs from 'node:fs/promises';
3
+ import os from 'node:os';
4
+ import path from 'node:path';
5
+ import { assertGate, emitGate, importDist } from './sks-1-18-gate-lib.js';
3
6
  const mod = await importDist('core/daemon/sksd-client.js');
4
- const state = mod.runSksdClient(root, 'status');
5
- const start = mod.runSksdClient(root, 'start');
6
- assertGate(state.schema === 'sks.sksd-state.v1', 'sksd status schema mismatch', state);
7
- assertGate(start.protocol_ok === true && start.status === 'running', 'sksd start must record protocol-ready state', start);
8
- emitGate('sksd:daemon', { status: start.status });
7
+ const fixtureRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-sksd-daemon-check-'));
8
+ try {
9
+ const state = mod.runSksdClient(fixtureRoot, 'status');
10
+ const start = mod.runSksdClient(fixtureRoot, 'start');
11
+ assertGate(state.schema === 'sks.sksd-state.v1', 'sksd status schema mismatch', state);
12
+ assertGate(start.protocol_ok === true && start.status === 'running', 'sksd start must record protocol-ready state', start);
13
+ assertGate(start.build_proof_ready === false, 'hermetic sksd protocol fixture must not build or mutate the source checkout', start);
14
+ emitGate('sksd:daemon', { status: start.status, hermetic_fixture: true, build_started: false });
15
+ }
16
+ finally {
17
+ await fs.rm(fixtureRoot, { recursive: true, force: true });
18
+ }
9
19
  //# sourceMappingURL=sksd-daemon-check.js.map
@@ -5,6 +5,9 @@ import os from 'node:os';
5
5
  import path from 'node:path';
6
6
  import { runProcess } from '../core/fsx.js';
7
7
  const root = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-trust-fixture-'));
8
+ const home = path.join(root, '.home');
9
+ const globalRoot = path.join(root, '.sneakoscope-global');
10
+ await fs.mkdir(path.join(home, '.codex'), { recursive: true });
8
11
  await fs.writeFile(path.join(root, 'package.json'), '{"private":true,"name":"sks-trust-fixture"}\n');
9
12
  await runProcess('git', ['init', '-q'], {
10
13
  cwd: root,
@@ -16,18 +19,21 @@ const sks = path.join(process.cwd(), 'dist', 'bin', 'sks.js');
16
19
  const run = await runJson(root, sks, ['run', 'fixture', '--mock', '--json'], { allowNonZero: true });
17
20
  const trust = await runJson(root, sks, ['trust', 'validate', run.mission_id, '--json'], { allowNonZero: true });
18
21
  const issues = [...new Set([...(run.trust_report?.issues || []), ...(trust.issues || [])])];
19
- const ok = run.ok === false
20
- && run.status === 'mock_only'
21
- && run.trust_status === 'blocked'
22
- && trust.status === 'blocked'
23
- && issues.includes('agent_gate_not_passed');
22
+ const fakeSuccessBlocked = run.ok === false && run.status === 'mock_only';
23
+ const runTrustStatus = String(run.trust_status || '');
24
+ const trustStatus = String(trust.status || '');
25
+ const ok = fakeSuccessBlocked
26
+ && ['blocked', 'mock_only'].includes(runTrustStatus)
27
+ && ['blocked', 'mock_only'].includes(trustStatus)
28
+ && trust.ok !== true;
24
29
  console.log(JSON.stringify({
25
30
  schema: 'sks.trust-fixture-check.v1',
26
31
  ok,
27
32
  mission_id: run.mission_id,
28
33
  run_status: run.status,
29
- trust_status: trust.status,
30
- fake_success_blocked: run.ok === false && run.status === 'mock_only',
34
+ run_trust_status: runTrustStatus,
35
+ trust_status: trustStatus,
36
+ fake_success_blocked: fakeSuccessBlocked,
31
37
  issues
32
38
  }, null, 2));
33
39
  if (!ok)
@@ -35,12 +41,28 @@ if (!ok)
35
41
  async function runJson(rootDir, sksBin, args, opts = {}) {
36
42
  const result = await runProcess(process.execPath, [sksBin, ...args], {
37
43
  cwd: rootDir,
38
- timeoutMs: 60_000,
44
+ timeoutMs: 120_000,
39
45
  maxOutputBytes: 512 * 1024,
40
- env: { SKS_SKIP_NPM_FRESHNESS_CHECK: '1', CI: 'true' }
46
+ env: {
47
+ HOME: home,
48
+ CODEX_HOME: path.join(home, '.codex'),
49
+ SKS_GLOBAL_ROOT: globalRoot,
50
+ SKS_TEST_ISOLATION: '1',
51
+ SKS_UPDATE_MIGRATION_GATE_DISABLED: '1',
52
+ SKS_SKIP_NPM_FRESHNESS_CHECK: '1',
53
+ CI: 'true'
54
+ }
41
55
  });
42
56
  if (result.code !== 0 && opts.allowNonZero !== true)
43
57
  throw new Error(`${args.join(' ')} failed: ${result.stderr || result.stdout}`);
44
- return JSON.parse(result.stdout);
58
+ if (!result.stdout.trim()) {
59
+ throw new Error(`${args.join(' ')} returned no JSON: exit=${result.code} timed_out=${result.timedOut} stderr=${result.stderr}`);
60
+ }
61
+ try {
62
+ return JSON.parse(result.stdout);
63
+ }
64
+ catch (err) {
65
+ throw new Error(`${args.join(' ')} returned invalid JSON: ${err instanceof Error ? err.message : String(err)} stdout=${result.stdout.slice(-2000)} stderr=${result.stderr.slice(-2000)}`);
66
+ }
45
67
  }
46
68
  //# sourceMappingURL=trust-fixture-check.js.map
@@ -5,6 +5,7 @@ import fsp from 'node:fs/promises';
5
5
  import path from 'node:path';
6
6
  import crypto from 'node:crypto';
7
7
  import { fileURLToPath } from 'node:url';
8
+ import { writeTextAtomic } from '../core/fsx.js';
8
9
  import { writeDistFreshStamp, sourceSnapshot } from './lib/ensure-dist-fresh.js';
9
10
  const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', '..');
10
11
  const pkg = JSON.parse(fs.readFileSync(path.join(root, 'package.json'), 'utf8'));
@@ -22,7 +23,7 @@ const compiledDtsCount = sorted.filter((f) => f.endsWith('.d.ts')).length;
22
23
  const source = sourceSnapshot();
23
24
  const distStamp = writeDistFreshStamp();
24
25
  const srcMjsRuntimeFiles = await collectSrcMjsRuntimeFiles();
25
- await fsp.writeFile(path.join(distRoot, 'build-manifest.json'), `${JSON.stringify({
26
+ await writeTextAtomic(path.join(distRoot, 'build-manifest.json'), `${JSON.stringify({
26
27
  schema: 'sks.dist-build.v2',
27
28
  version: pkg.version,
28
29
  package_version: pkg.version,
@@ -23,7 +23,7 @@ await ledger.recordDbSafetyMismatchWrongness(root, {
23
23
  mission_id: 'M-fixture',
24
24
  expected: 'blocked',
25
25
  actual: 'safe',
26
- command: 'sks db check --sql "DROP TABLE users"',
26
+ command: '$DB internal safety check: DROP TABLE users',
27
27
  sql: 'DROP TABLE users'
28
28
  });
29
29
  await ledger.recordHookPolicyMismatchWrongness(root, {