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
@@ -0,0 +1,151 @@
1
+ import crypto from 'node:crypto';
2
+ import fs from 'node:fs';
3
+ import path from 'node:path';
4
+ export function packageDistSnapshot(root, pkg) {
5
+ const distRoot = path.join(root, 'dist');
6
+ if (!fs.existsSync(distRoot))
7
+ return { digest: null, file_count: 0 };
8
+ const entries = packageFileEntries(pkg);
9
+ const files = [];
10
+ collectFiles(distRoot, files);
11
+ const included = files
12
+ .filter((file) => packageFileIncluded(`dist/${path.relative(distRoot, file).split(path.sep).join('/')}`, entries))
13
+ .sort();
14
+ const hash = crypto.createHash('sha256');
15
+ for (const file of included) {
16
+ const rel = path.relative(distRoot, file).split(path.sep).join('/');
17
+ const bytes = fs.readFileSync(file);
18
+ hash.update(rel);
19
+ hash.update('\0');
20
+ hash.update(String(bytes.length));
21
+ hash.update('\0');
22
+ hash.update(crypto.createHash('sha256').update(bytes).digest('hex'));
23
+ hash.update('\0');
24
+ }
25
+ return { digest: hash.digest('hex'), file_count: included.length };
26
+ }
27
+ export function packageFilesSnapshot(root, pkg) {
28
+ const entries = packageFileEntries(pkg);
29
+ const candidates = new Set();
30
+ const missingEntries = [];
31
+ for (const entry of entries) {
32
+ if (entry.negated || hasGlob(entry.pattern))
33
+ continue;
34
+ const full = path.join(root, entry.pattern);
35
+ if (!fs.existsSync(full)) {
36
+ missingEntries.push(entry.pattern);
37
+ continue;
38
+ }
39
+ const stat = fs.statSync(full);
40
+ if (stat.isDirectory()) {
41
+ const found = [];
42
+ collectFiles(full, found);
43
+ for (const file of found)
44
+ candidates.add(path.relative(root, file).split(path.sep).join('/'));
45
+ }
46
+ else if (stat.isFile()) {
47
+ candidates.add(entry.pattern);
48
+ }
49
+ }
50
+ const files = [...candidates].filter((file) => packageFileIncluded(file, entries)).sort();
51
+ const hash = crypto.createHash('sha256');
52
+ for (const entry of missingEntries.sort()) {
53
+ hash.update(entry);
54
+ hash.update('\0missing\0');
55
+ }
56
+ for (const file of files) {
57
+ const bytes = fs.readFileSync(path.join(root, file));
58
+ hash.update(file);
59
+ hash.update('\0');
60
+ hash.update(String(bytes.length));
61
+ hash.update('\0');
62
+ hash.update(crypto.createHash('sha256').update(bytes).digest('hex'));
63
+ hash.update('\0');
64
+ }
65
+ return {
66
+ digest: crypto.createHash('sha256').update(hash.digest('hex')).digest('hex'),
67
+ file_count: files.length,
68
+ missing_entries: missingEntries
69
+ };
70
+ }
71
+ function collectFiles(dir, out) {
72
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
73
+ const file = path.join(dir, entry.name);
74
+ if (entry.isDirectory())
75
+ collectFiles(file, out);
76
+ else if (entry.isFile())
77
+ out.push(file);
78
+ }
79
+ }
80
+ function packageFileEntries(pkg) {
81
+ return (Array.isArray(pkg.files) ? pkg.files : [])
82
+ .map((raw) => {
83
+ const value = String(raw || '').trim();
84
+ const negated = value.startsWith('!');
85
+ const pattern = normalizeRel(negated ? value.slice(1) : value);
86
+ return pattern ? { negated, pattern } : null;
87
+ })
88
+ .filter((entry) => entry !== null);
89
+ }
90
+ function packageFileIncluded(file, entries) {
91
+ let included = false;
92
+ for (const entry of entries) {
93
+ if (matchesPackagePattern(file, entry.pattern))
94
+ included = !entry.negated;
95
+ }
96
+ return included;
97
+ }
98
+ function matchesPackagePattern(file, pattern) {
99
+ const rel = normalizeRel(file);
100
+ const normalized = normalizeRel(pattern);
101
+ if (!rel || !normalized)
102
+ return false;
103
+ if (!hasGlob(normalized))
104
+ return rel === normalized || rel.startsWith(`${normalized}/`);
105
+ const re = globPatternToRegExp(normalized);
106
+ if (re.test(rel))
107
+ return true;
108
+ const parts = rel.split('/');
109
+ parts.pop();
110
+ while (parts.length) {
111
+ if (re.test(parts.join('/')))
112
+ return true;
113
+ parts.pop();
114
+ }
115
+ return false;
116
+ }
117
+ function globPatternToRegExp(pattern) {
118
+ let out = '^';
119
+ for (let i = 0; i < pattern.length; i += 1) {
120
+ const char = pattern[i];
121
+ if (char === '*') {
122
+ if (pattern[i + 1] === '*') {
123
+ if (pattern[i + 2] === '/') {
124
+ out += '(?:[^/]+/)*';
125
+ i += 2;
126
+ }
127
+ else {
128
+ out += '.*';
129
+ i += 1;
130
+ }
131
+ }
132
+ else {
133
+ out += '[^/]*';
134
+ }
135
+ continue;
136
+ }
137
+ if (char === '?') {
138
+ out += '[^/]';
139
+ continue;
140
+ }
141
+ out += char.replace(/[|\\{}()[\]^$+?.]/g, '\\$&');
142
+ }
143
+ return new RegExp(`${out}$`);
144
+ }
145
+ function hasGlob(value) {
146
+ return /[*?]/.test(value);
147
+ }
148
+ function normalizeRel(value) {
149
+ return String(value || '').split(path.sep).join('/').replace(/^\.\/+/, '').replace(/\/+$/, '');
150
+ }
151
+ //# sourceMappingURL=package-dist-snapshot.js.map
@@ -1,2 +1,7 @@
1
1
  export const DEFAULT_MAX_PACK_BYTES = 2414 * 1024;
2
+ // 6.1.2 measured 11,016,751 unpacked bytes after the final official custom-
3
+ // agent catalog, Super Search provenance validation, and live Zellij activity
4
+ // reader were included. Keep a narrow 10.53125 MiB ceiling shared by every
5
+ // package-size gate; packed bytes remain under the existing 2414 KiB limit.
6
+ export const DEFAULT_MAX_UNPACKED_BYTES = 11_042_816;
2
7
  //# sourceMappingURL=package-size-budget.js.map
@@ -0,0 +1,115 @@
1
+ import { spawnSync } from 'node:child_process';
2
+ import crypto from 'node:crypto';
3
+ import fs from 'node:fs';
4
+ import path from 'node:path';
5
+ import { packageDistSnapshot, packageFilesSnapshot } from './package-dist-snapshot.js';
6
+ export const RELEASE_AUTHORIZATION_SNAPSHOT_KEYS = Object.freeze([
7
+ 'git_commit',
8
+ 'source_digest',
9
+ 'source_file_count',
10
+ 'package_files_sha256',
11
+ 'package_file_count',
12
+ 'release_gate_sha256',
13
+ 'dist_build_sha256',
14
+ 'dist_file_count'
15
+ ]);
16
+ export function releaseAuthorizationSnapshot(root, pkg) {
17
+ const source = releaseSourceSnapshot(root);
18
+ const packageFiles = packageFilesSnapshot(root, pkg);
19
+ const dist = packageDistSnapshot(root, pkg);
20
+ return {
21
+ git_commit: gitCommit(root),
22
+ package_files_sha256: packageFiles.digest,
23
+ package_file_count: packageFiles.file_count,
24
+ dist_build_sha256: dist.digest,
25
+ dist_file_count: dist.file_count,
26
+ release_gate_sha256: releaseGateHash(root, pkg),
27
+ source_digest: source.digest,
28
+ source_file_count: source.file_count
29
+ };
30
+ }
31
+ export function sameReleaseAuthorizationSnapshot(left, right) {
32
+ return RELEASE_AUTHORIZATION_SNAPSHOT_KEYS.every((key) => left?.[key] === right?.[key]);
33
+ }
34
+ function gitCommit(root) {
35
+ const result = spawnSync('git', ['rev-parse', 'HEAD'], { cwd: root, encoding: 'utf8' });
36
+ return result.status === 0 ? result.stdout.trim() : null;
37
+ }
38
+ function releaseGateHash(root, pkg) {
39
+ const manifests = ['release-gates.v2.json', 'infra-harness-gates.json'].map((rel) => {
40
+ const file = path.join(root, rel);
41
+ return fs.existsSync(file) ? `${rel}\0${fs.readFileSync(file, 'utf8')}` : `${rel}\0missing`;
42
+ }).join('\0');
43
+ return sha256(`${pkg.scripts?.['release:check'] || ''}\0${pkg.scripts?.['prepublishOnly'] || ''}\0${manifests}`);
44
+ }
45
+ function releaseSourceSnapshot(root) {
46
+ const files = gitFiles(root).filter(releaseRelevant).sort();
47
+ const hash = crypto.createHash('sha256');
48
+ for (const file of files) {
49
+ const full = path.join(root, file);
50
+ let stat;
51
+ try {
52
+ stat = fs.statSync(full);
53
+ }
54
+ catch {
55
+ continue;
56
+ }
57
+ if (!stat.isFile())
58
+ continue;
59
+ const bytes = fs.readFileSync(full);
60
+ hash.update(file);
61
+ hash.update('\0');
62
+ hash.update(String(bytes.length));
63
+ hash.update('\0');
64
+ hash.update(sha256(bytes));
65
+ hash.update('\0');
66
+ }
67
+ return { digest: hash.digest('hex'), file_count: files.length };
68
+ }
69
+ function gitFiles(root) {
70
+ const result = spawnSync('git', ['ls-files', '-z', '--cached', '--others', '--exclude-standard'], {
71
+ cwd: root,
72
+ encoding: 'utf8',
73
+ maxBuffer: 64 * 1024 * 1024
74
+ });
75
+ if (result.status !== 0)
76
+ throw new Error(`unable_to_list_release_files:${result.stderr || result.stdout}`);
77
+ return result.stdout.split('\0').filter(Boolean);
78
+ }
79
+ function releaseRelevant(file) {
80
+ if (!file || file.startsWith('.sneakoscope/') || file.startsWith('.codex/') || file.startsWith('.agents/'))
81
+ return false;
82
+ if (file.startsWith('node_modules/') || file.startsWith('dist/') || file.startsWith('coverage/'))
83
+ return false;
84
+ if (file.startsWith('crates/sks-core/target/'))
85
+ return false;
86
+ if (/\.tgz$|\.log$/i.test(file))
87
+ return false;
88
+ if (/^(package|package-lock)\.json$/.test(file))
89
+ return true;
90
+ if (file === 'release-gates.v2.json' || file === 'infra-harness-gates.json' || file === 'runtime-required-scripts.json')
91
+ return true;
92
+ if (file === '.npmignore' || file === '.npmrc' || file === 'LICENSE')
93
+ return true;
94
+ if (file.startsWith('config/'))
95
+ return true;
96
+ if (/^tsconfig.*\.json$/.test(file))
97
+ return true;
98
+ if (/^(README|CHANGELOG|LICENSE)(\.md)?$/i.test(file))
99
+ return true;
100
+ return [
101
+ '.github/workflows/',
102
+ 'bin/',
103
+ 'src/',
104
+ 'scripts/',
105
+ 'test/',
106
+ 'docs/',
107
+ 'schemas/',
108
+ 'crates/sks-core/Cargo.',
109
+ 'crates/sks-core/src/'
110
+ ].some((prefix) => file.startsWith(prefix));
111
+ }
112
+ function sha256(value) {
113
+ return crypto.createHash('sha256').update(value).digest('hex');
114
+ }
115
+ //# sourceMappingURL=release-authorization-snapshot.js.map
@@ -63,7 +63,7 @@ function gateSelectionReason(gate, changedFiles, preset) {
63
63
  return 'release_gate_system_changed';
64
64
  }
65
65
  if (changedFiles.some((file) => isCodexCurrentFile(file))) {
66
- if (gate.id.startsWith('codex:0142') || gate.id === 'release:codex-current' || gate.id.startsWith('codex-control:') || gate.id.startsWith('codex-sdk:'))
66
+ if (gate.id.startsWith('codex:0144') || gate.id.startsWith('codex-control:') || gate.id.startsWith('codex-sdk:'))
67
67
  return 'codex_current_surface_changed';
68
68
  }
69
69
  const matchingReleaseScript = changedFiles.some((file) => releaseScriptGateCandidates(file).includes(gate.id) || (file.startsWith('src/scripts/release-') && gateCommandReferencesScript(gate, file)));
@@ -113,8 +113,8 @@ function selectionResult(all, selected, changedFiles, mode, reasons, skipped) {
113
113
  }
114
114
  };
115
115
  }
116
- function resolveChangedFiles(root, changedSince) {
117
- const base = changedSince === 'auto' ? 'HEAD' : changedSince;
116
+ export function resolveChangedFiles(root, changedSince) {
117
+ const base = changedSince === 'auto' ? autoChangedFilesBase(root) : changedSince;
118
118
  const args = base === 'HEAD'
119
119
  ? ['diff', '--name-only', 'HEAD']
120
120
  : ['diff', '--name-only', String(base)];
@@ -126,6 +126,18 @@ function resolveChangedFiles(root, changedSince) {
126
126
  ].map((file) => file.trim()).filter(Boolean);
127
127
  return [...new Set(files)].sort();
128
128
  }
129
+ function autoChangedFilesBase(root) {
130
+ const upstream = spawnSync('git', ['rev-parse', '--abbrev-ref', '--symbolic-full-name', '@{upstream}'], {
131
+ cwd: root,
132
+ encoding: 'utf8'
133
+ });
134
+ const upstreamRef = upstream.status === 0 ? String(upstream.stdout || '').trim() : '';
135
+ if (!upstreamRef)
136
+ return 'HEAD';
137
+ const mergeBase = spawnSync('git', ['merge-base', 'HEAD', upstreamRef], { cwd: root, encoding: 'utf8' });
138
+ const base = mergeBase.status === 0 ? String(mergeBase.stdout || '').trim() : '';
139
+ return base || 'HEAD';
140
+ }
129
141
  function gateCommandReferencesScript(gate, file) {
130
142
  const base = file.replace(/\\/g, '/').split('/').pop()?.replace(/\.(ts|tsx)$/, '') || '';
131
143
  if (!base)
@@ -5,6 +5,7 @@ import { normalizeReleaseCacheInputForBehavior } from './release-cache-key.js';
5
5
  import { computeTriWikiCacheKey } from '../triwiki/triwiki-cache-key.js';
6
6
  import { createTriWikiProofCard } from '../triwiki/triwiki-proof-card.js';
7
7
  import { readReusableTriWikiProofCard, writeTriWikiProofCard } from '../triwiki/triwiki-proof-bank.js';
8
+ import { readCurrentNpmPackGateArtifacts } from './npm-pack-proof.js';
8
9
  export const RELEASE_GATE_CACHE_V2_SCHEMA = 'sks.release-gate-cache.v2';
9
10
  export function releaseGateCacheFile(root) {
10
11
  return path.join(root, '.sneakoscope', 'reports', 'release-gates', 'cache-v2.json');
@@ -139,6 +140,18 @@ export function readReleaseGateCacheRecord(root, gate) {
139
140
  const key = releaseGateCacheKey(root, gate);
140
141
  const proof = readReusableTriWikiProofCard({ root, subjectId: gate.id, cacheKey: key });
141
142
  if (proof.hit && proof.card) {
143
+ const artifactBlockers = releaseGateCacheArtifactBlockers(root, gate);
144
+ if (artifactBlockers.length) {
145
+ writeReleaseCacheBridgeReport(root, {
146
+ gate_id: gate.id,
147
+ cache_key: key,
148
+ bridge: 'triwiki-to-release-v2',
149
+ source: proof.path || null,
150
+ duration_ms: Math.max(0, Math.floor(Number(proof.card.duration_ms) || 0)),
151
+ disagreement: `required_artifact_invalid:${artifactBlockers.join(',')}`
152
+ });
153
+ return null;
154
+ }
142
155
  writeReleaseCacheBridgeReport(root, {
143
156
  gate_id: gate.id,
144
157
  cache_key: key,
@@ -161,6 +174,18 @@ export function readReleaseGateCacheRecord(root, gate) {
161
174
  const record = readCacheRecord(file, key);
162
175
  if (!record || record.ok !== true)
163
176
  continue;
177
+ const artifactBlockers = releaseGateCacheArtifactBlockers(root, gate);
178
+ if (artifactBlockers.length) {
179
+ writeReleaseCacheBridgeReport(root, {
180
+ gate_id: gate.id,
181
+ cache_key: key,
182
+ bridge: 'release-v2-to-triwiki',
183
+ source: file,
184
+ duration_ms: Math.max(0, Math.floor(Number(record.duration_ms) || 0)),
185
+ disagreement: `required_artifact_invalid:${artifactBlockers.join(',')}`
186
+ });
187
+ return null;
188
+ }
164
189
  writeTriWikiProofFromReleaseCacheRecord(root, gate, key, record, file);
165
190
  writeReleaseCacheBridgeReport(root, {
166
191
  gate_id: gate.id,
@@ -182,6 +207,11 @@ export function readReleaseGateCacheRecord(root, gate) {
182
207
  }
183
208
  return null;
184
209
  }
210
+ function releaseGateCacheArtifactBlockers(root, gate) {
211
+ if (!['publish:packlist-performance', 'package:published-contract'].includes(gate.id))
212
+ return [];
213
+ return readCurrentNpmPackGateArtifacts(root).blockers;
214
+ }
185
215
  export function writeReleaseGateCacheHit(root, gate, durationMs = 0) {
186
216
  const key = releaseGateCacheKey(root, gate);
187
217
  const record = {
@@ -0,0 +1,161 @@
1
+ import crypto from 'node:crypto';
2
+ export const RELEASE_GATE_CONTRACT_SCHEMA = 'sks.release-gate-contract.v1';
3
+ export const RELEASE_GATE_CONTRACT_IDS = Object.freeze([
4
+ 'agent:message-bus-reader',
5
+ 'all-features:deep-completion',
6
+ 'appshots:thread-attachment-discovery',
7
+ 'architecture:guard',
8
+ 'certificate:sla',
9
+ 'codex-app:agent-role-comprehensive',
10
+ 'codex-app:execution-profile',
11
+ 'codex-app:fast-ui-preservation',
12
+ 'codex-app:handoff',
13
+ 'codex-control:all-pipelines',
14
+ 'codex-control:event-stream-ledger',
15
+ 'codex-lb:comprehensive',
16
+ 'codex-native:agent-role-content',
17
+ 'codex-native:feature-broker-comprehensive',
18
+ 'codex-native:hook-lifecycle-proof',
19
+ 'codex-plugin:app-template-policy',
20
+ 'codex-sdk:all-pipelines',
21
+ 'codex-sdk:integration-comprehensive',
22
+ 'codex:0.134-runner-truth',
23
+ 'codex:0.137-compat',
24
+ 'codex:0138-capability-comprehensive',
25
+ 'codex:0138-doctor',
26
+ 'codex:0144:app-server-v2',
27
+ 'codex:0144:binary-identity',
28
+ 'codex:0144:capability',
29
+ 'codex:0144:manifest',
30
+ 'codex:0144:policy',
31
+ 'codex:0144:thread-store',
32
+ 'codex:app-handoff-comprehensive',
33
+ 'codex:product-design-plugin-routing',
34
+ 'config:managed-merge',
35
+ 'context7:evidence-dedupe',
36
+ 'core-skill:card-schema-deployment-snapshot',
37
+ 'core-skill:heldout-validation',
38
+ 'core-skill:no-inference-optimizer',
39
+ 'core-skill:patch',
40
+ 'core-skill:route-runtime-integration',
41
+ 'dfix:fixture',
42
+ 'dfix:patch-handoff',
43
+ 'dfix:patch-swarm-route-blackbox',
44
+ 'dfix:verification',
45
+ 'dfix:verification-recommendation',
46
+ 'docs:truthfulness',
47
+ 'doctor:codex-app-harness',
48
+ 'doctor:fix-proves-codex-read',
49
+ 'doctor:fixes-codex-app-fast-ui',
50
+ 'evidence:flagship-coverage',
51
+ 'fast:codex-service-tier-proof',
52
+ 'geo:comprehensive',
53
+ 'git-collaboration:e2e',
54
+ 'git:worktree-checkpoint-rebase-sync',
55
+ 'git:worktree-diff-apply-pipeline',
56
+ 'git:worktree-diff-envelope',
57
+ 'git:worktree-dirty-lock',
58
+ 'git:worktree-dirty-main-detection',
59
+ 'git:worktree-manifest-append',
60
+ 'goal:artifact-compat',
61
+ 'hook:latency-budget',
62
+ 'hooks:concurrent-session-collision',
63
+ 'image:artifact-path-contract',
64
+ 'init-deep:backup-retention',
65
+ 'legacy:gate-inventory',
66
+ 'legacy:gate-purge',
67
+ 'legacy:strong-inventory',
68
+ 'legacy:update-e2e',
69
+ 'local-collab:all-pipelines-final-gpt',
70
+ 'loop-integration-finalizer-check',
71
+ 'mad-db:capability',
72
+ 'mad-db:command',
73
+ 'mad-db:mad-command',
74
+ 'mad-db:operation-lifecycle',
75
+ 'mad-sks:app-ui-no-mutation',
76
+ 'mad:preflight-blocks-unreadable-config',
77
+ 'mcp:plugin-inventory',
78
+ 'migration:upgrade-safety',
79
+ 'model-call:concurrency',
80
+ 'naruto:canonical-stop-gate',
81
+ 'naruto:worktree-coding:blackbox',
82
+ 'native-capability:repair-matrix',
83
+ 'native:image-generation-repair',
84
+ 'package:published-contract',
85
+ 'pipeline:codex-native-routing-comprehensive',
86
+ 'policy:gate-audit',
87
+ 'ppt:full-e2e-blackbox',
88
+ 'ppt:real-export-adapter',
89
+ 'ppt:real-imagegen-wiring',
90
+ 'ppt:reexport-rereview',
91
+ 'probes:memoization',
92
+ 'prompt:placeholder-guard',
93
+ 'proof:root-cause-policy',
94
+ 'provider:badge-context',
95
+ 'publish:packlist-performance',
96
+ 'python-sdk:all-pipelines',
97
+ 'qa-loop:comprehensive-verification',
98
+ 'release:aggressive-resource-governor',
99
+ 'release:batch-runner-comprehensive',
100
+ 'release:cache-key-comprehensive',
101
+ 'release:dag-runner',
102
+ 'release:gate-budget',
103
+ 'release:gate-selection-comprehensive',
104
+ 'release:metadata-current',
105
+ 'release:parallel-speed-budget',
106
+ 'release:proof-truth',
107
+ 'release:provenance',
108
+ 'release:runtime-truth-matrix',
109
+ 'research:claim-builder-blueprint-comprehensive',
110
+ 'research:complete-package-final-review-comprehensive',
111
+ 'research:execution-profile-routing',
112
+ 'responses:retry-policy-centralized',
113
+ 'runtime:proof-summary',
114
+ 'safety:mutation-callsite-coverage',
115
+ 'scheduler:comprehensive',
116
+ 'schema:check',
117
+ 'secret:preservation',
118
+ 'seo-geo:route-identity-comprehensive',
119
+ 'seo-geo:skill-rich-content',
120
+ 'seo:comprehensive',
121
+ 'shared-memory:check',
122
+ 'side-effect:runtime-report',
123
+ 'skill:name-canonicalizer',
124
+ 'sksd:daemon',
125
+ 'super-search:provider-interface',
126
+ 'test:code-index-agent-bridge-regression',
127
+ 'test:codex-runtime-recovery',
128
+ 'test:commands-regression',
129
+ 'test:core-root-regression',
130
+ 'test:dfix-ppt-gate',
131
+ 'test:mad-sks-regression',
132
+ 'test:menubar-doctor',
133
+ 'test:official-subagent-policy',
134
+ 'test:proof-stop-gate',
135
+ 'test:triwiki-voxel-integrity',
136
+ 'triwiki:cache-key',
137
+ 'triwiki:proof-comprehensive',
138
+ 'trust:check',
139
+ 'type-surface:codex-app',
140
+ 'typecheck',
141
+ 'ultra-router:auto-router',
142
+ 'ux-review:extract-wires-real-extractor',
143
+ 'ux-review:imagegen-blackbox',
144
+ 'ux-review:patch-diff-recheck',
145
+ 'ux-review:run-wires-imagegen',
146
+ 'wrongness:check'
147
+ ]);
148
+ export function releaseGateContractSnapshot() {
149
+ const ids = [...RELEASE_GATE_CONTRACT_IDS];
150
+ const sha256 = crypto
151
+ .createHash('sha256')
152
+ .update(`${RELEASE_GATE_CONTRACT_SCHEMA}\n${ids.join('\n')}\n`)
153
+ .digest('hex');
154
+ return {
155
+ schema: RELEASE_GATE_CONTRACT_SCHEMA,
156
+ ids,
157
+ count: ids.length,
158
+ sha256
159
+ };
160
+ }
161
+ //# sourceMappingURL=release-gate-contract.js.map
@@ -24,13 +24,45 @@ export function loadReleaseGateManifest(root, file = 'release-gates.v2.json') {
24
24
  }
25
25
  return validation.manifest;
26
26
  }
27
+ export function selectReleaseGateClosure(manifest, requestedGateIds) {
28
+ const requested = [...new Set([...requestedGateIds].map(String).filter(Boolean))];
29
+ const byId = new Map(manifest.gates.map((gate) => [gate.id, gate]));
30
+ const unknown = requested.filter((id) => !byId.has(id)).sort();
31
+ if (unknown.length)
32
+ throw new Error(`release_gate_only_selection_unknown:${unknown.join(',')}`);
33
+ const selected = new Set();
34
+ const visiting = new Set();
35
+ const stack = [];
36
+ const visit = (id) => {
37
+ if (selected.has(id))
38
+ return;
39
+ if (visiting.has(id)) {
40
+ const cycleStart = stack.indexOf(id);
41
+ const cycle = [...stack.slice(Math.max(0, cycleStart)), id];
42
+ throw new Error(`release_gate_only_selection_dependency_cycle:${cycle.join('->')}`);
43
+ }
44
+ const gate = byId.get(id);
45
+ if (!gate)
46
+ throw new Error(`release_gate_only_selection_missing_dependency:${stack.at(-1) || 'requested'}:${id}`);
47
+ visiting.add(id);
48
+ stack.push(id);
49
+ for (const dep of gate.deps || [])
50
+ visit(dep);
51
+ stack.pop();
52
+ visiting.delete(id);
53
+ selected.add(id);
54
+ };
55
+ for (const id of requested)
56
+ visit(id);
57
+ return manifest.gates.filter((gate) => selected.has(gate.id));
58
+ }
27
59
  export async function runReleaseGateDag(input) {
28
60
  const root = path.resolve(input.root);
29
61
  const preset = input.preset || 'release';
30
62
  const manifest = loadReleaseGateManifest(root);
31
63
  const onlyGateIds = new Set((input.onlyGateIds || []).map(String).filter(Boolean));
32
64
  const presetGates = onlyGateIds.size
33
- ? manifest.gates.filter((gate) => onlyGateIds.has(gate.id))
65
+ ? selectReleaseGateClosure(manifest, onlyGateIds)
34
66
  : selectReleaseGatePreset(manifest, preset);
35
67
  const forceFullSelection = input.full === true || onlyGateIds.size > 0;
36
68
  const affected = (preset === 'affected' || preset === 'fast' || preset === 'confidence') && !forceFullSelection
@@ -57,6 +89,11 @@ export async function runReleaseGateDag(input) {
57
89
  const affectedExternalSatisfiedDeps = affected.selection.mode === 'affected'
58
90
  ? new Set(selected.flatMap((gate) => gate.deps || []).filter((dep) => !selectedIds.has(dep)))
59
91
  : new Set();
92
+ const missingSelectedDeps = selected.flatMap((gate) => (gate.deps || [])
93
+ .filter((dep) => !selectedIds.has(dep) && !affectedExternalSatisfiedDeps.has(dep))
94
+ .map((dep) => `${gate.id}->${dep}`));
95
+ if (missingSelectedDeps.length)
96
+ throw new Error(`release_gate_selection_missing_dependencies:${[...new Set(missingSelectedDeps)].sort().join(',')}`);
60
97
  const runId = `rg-${new Date().toISOString().replace(/[:.]/g, '-')}-${process.pid}`;
61
98
  const retentionBefore = await pruneOldReleaseGateRunDirs(root);
62
99
  await sweepSksTempDirs(root, { maxAgeHours: 24 }).catch(() => null);
@@ -131,6 +168,7 @@ export async function runReleaseGateDag(input) {
131
168
  failures,
132
169
  affected_graph: affectedGraph,
133
170
  completion_certificate: completionCertificate,
171
+ release_authorization_snapshot: input.releaseAuthorizationSnapshot || null,
134
172
  triwiki_affected_graph: triwikiGraph,
135
173
  triwiki_selection_used: triwikiSelectionUsed,
136
174
  triwiki_selected_gates: triwikiGraph ? selected.map((gate) => gate.id) : [],
@@ -266,7 +304,10 @@ export async function runReleaseGateDag(input) {
266
304
  }
267
305
  export function selectReleaseGatePreset(manifest, preset) {
268
306
  const effectivePreset = preset === 'affected' || preset === 'fast' || preset === 'confidence' ? 'release' : preset;
269
- return manifest.gates.filter((gate) => gate.preset.includes(effectivePreset));
307
+ const selected = manifest.gates.filter((gate) => gate.preset.includes(effectivePreset));
308
+ if (!selected.length)
309
+ throw new Error(`release_gate_preset_empty_or_unknown:${preset}`);
310
+ return selected;
270
311
  }
271
312
  function buildAffectedGraph(input) {
272
313
  return {
@@ -407,7 +448,7 @@ function tail(value, limit = 1200) {
407
448
  return value.length > limit ? value.slice(-limit) : value;
408
449
  }
409
450
  export async function pruneOldReleaseGateRunDirs(root, opts = {}) {
410
- const keep = Math.max(1, Math.floor(Number(opts.keep ?? process.env.SKS_RELEASE_GATE_RUN_RETENTION ?? 20) || 20));
451
+ const keep = Math.max(1, Math.floor(Number(opts.keep ?? process.env.SKS_RELEASE_GATE_RUN_RETENTION ?? 5) || 5));
411
452
  const preserveRunId = opts.preserveRunId || null;
412
453
  const base = path.join(root, '.sneakoscope', 'reports', 'release-gates');
413
454
  const report = {
@@ -12,26 +12,37 @@ export function createReleaseGateHermeticEnv(input) {
12
12
  fs.mkdirSync(codexHome, { recursive: true });
13
13
  fs.mkdirSync(cacheHome, { recursive: true });
14
14
  fs.mkdirSync(reportDir, { recursive: true });
15
- const migrationGateDisabled = input.gate.id === 'legacy:update-e2e' ? undefined : '1';
15
+ const gateEnv = {
16
+ ...process.env,
17
+ SKS_GATE_ID: input.gate.id,
18
+ SKS_GATE_RUN_ID: input.runId,
19
+ SKS_REPORT_DIR: reportDir,
20
+ SKS_TMP_DIR: tmpRoot,
21
+ TMPDIR: tmpRoot,
22
+ TMP: tmpRoot,
23
+ TEMP: tmpRoot,
24
+ HOME: input.gate.isolation.home === 'temp' ? home : process.env.HOME,
25
+ CODEX_HOME: input.gate.isolation.codex_home === 'temp' ? codexHome : process.env.CODEX_HOME,
26
+ XDG_CACHE_HOME: cacheHome,
27
+ SKS_DISABLE_REAL_MODEL_CALLS: input.gate.preset.includes('real-check') ? process.env.SKS_DISABLE_REAL_MODEL_CALLS || '0' : '1',
28
+ SKS_DISABLE_GLOBAL_CONFIG_MUTATION: '1',
29
+ // Gates must never spawn a real GUI menu bar status item into the user's
30
+ // live session. Belt to the temp-path launch guard in installSksMenuBar.
31
+ SKS_SKIP_SKS_MENUBAR_LAUNCH: '1'
32
+ };
33
+ if (input.gate.id === 'legacy:update-e2e') {
34
+ // This gate exercises the migration path itself. An ambient disable flag
35
+ // from the parent Codex/SKS process must not turn the fixture into a false
36
+ // successful skip.
37
+ delete gateEnv.SKS_UPDATE_MIGRATION_GATE_DISABLED;
38
+ }
39
+ else {
40
+ gateEnv.SKS_UPDATE_MIGRATION_GATE_DISABLED = '1';
41
+ }
16
42
  return {
17
43
  tmp_dir: tmpRoot,
18
44
  report_dir: reportDir,
19
- env: {
20
- ...process.env,
21
- SKS_GATE_ID: input.gate.id,
22
- SKS_GATE_RUN_ID: input.runId,
23
- SKS_REPORT_DIR: reportDir,
24
- SKS_TMP_DIR: tmpRoot,
25
- HOME: input.gate.isolation.home === 'temp' ? home : process.env.HOME,
26
- CODEX_HOME: input.gate.isolation.codex_home === 'temp' ? codexHome : process.env.CODEX_HOME,
27
- XDG_CACHE_HOME: cacheHome,
28
- ...(migrationGateDisabled ? { SKS_UPDATE_MIGRATION_GATE_DISABLED: migrationGateDisabled } : {}),
29
- SKS_DISABLE_REAL_MODEL_CALLS: input.gate.preset.includes('real-check') ? process.env.SKS_DISABLE_REAL_MODEL_CALLS || '0' : '1',
30
- SKS_DISABLE_GLOBAL_CONFIG_MUTATION: '1',
31
- // Gates must never spawn a real GUI menu bar status item into the user's
32
- // live session. Belt to the temp-path launch guard in installSksMenuBar.
33
- SKS_SKIP_SKS_MENUBAR_LAUNCH: '1'
34
- }
45
+ env: gateEnv
35
46
  };
36
47
  }
37
48
  export function cleanupReleaseGateHermeticEnv(env) {