sneakoscope 7.0.2 → 7.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (468) hide show
  1. package/README.md +7 -5
  2. package/crates/sks-core/Cargo.lock +1 -1
  3. package/crates/sks-core/Cargo.toml +1 -1
  4. package/dist/bin/sks-dispatch.js +0 -3
  5. package/dist/cli/command-registry.js +0 -2
  6. package/dist/cli/install-helpers-codex-lb-chain.js +24 -2
  7. package/dist/cli/install-helpers-codex-lb-config.js +0 -7
  8. package/dist/cli/install-helpers-codex-lb-selftest-chain.js +0 -3
  9. package/dist/cli/install-helpers-codex-lb-selftest.js +0 -17
  10. package/dist/cli/install-helpers.js +81 -96
  11. package/dist/cli/router.js +0 -22
  12. package/dist/commands/codex-lb.js +176 -22
  13. package/dist/commands/codex.js +3 -8
  14. package/dist/commands/doctor.js +4 -14
  15. package/dist/commands/perf.js +5 -1
  16. package/dist/commands/zellij-slot-column-anchor.js +0 -2
  17. package/dist/commands/zellij-slot-pane.js +0 -7
  18. package/dist/commands/zellij.js +0 -2
  19. package/dist/config/skills-manifest.json +52 -52
  20. package/dist/core/agent-bridge/agent-manifest.js +192 -1
  21. package/dist/core/agent-bridge/agent-mode.js +0 -5
  22. package/dist/core/agent-bridge/host-capability-policy.js +189 -0
  23. package/dist/core/agent-bridge/host-capability-runtime.js +1395 -0
  24. package/dist/core/agent-bridge/mcp-server.js +1 -11
  25. package/dist/core/agents/agent-effort-policy.js +0 -3
  26. package/dist/core/agents/agent-orchestrator.js +0 -4
  27. package/dist/core/agents/agent-proof-evidence.js +0 -2
  28. package/dist/core/agents/agent-runner-ollama.js +0 -3
  29. package/dist/core/agents/agent-scheduler.js +0 -5
  30. package/dist/core/agents/native-cli-worker-runtime.js +5 -17
  31. package/dist/core/agents/work-partition/repo-inventory.js +0 -2
  32. package/dist/core/auto-review.js +0 -13
  33. package/dist/core/bench.js +0 -14
  34. package/dist/core/code-structure.js +0 -3
  35. package/dist/core/codex/agent-config-file-repair.js +0 -8
  36. package/dist/core/codex/codex-cli-update.js +122 -20
  37. package/dist/core/codex/codex-config-eperm-repair.js +0 -4
  38. package/dist/core/codex/codex-config-guard.js +0 -3
  39. package/dist/core/codex/codex-config-readability.js +0 -13
  40. package/dist/core/codex/codex-project-config-policy.js +0 -33
  41. package/dist/core/codex/official-goal-mode.js +0 -2
  42. package/dist/core/codex-app/codex-app-fast-ui-repair.js +5 -7
  43. package/dist/core/codex-app/codex-app-ui-state-snapshot.js +44 -7
  44. package/dist/core/codex-app/sks-menubar.js +0 -1
  45. package/dist/core/codex-app.js +0 -9
  46. package/dist/core/codex-compat/codex-hook-output-builders.js +9 -1
  47. package/dist/core/codex-compat/codex-hook-output-normalizer.js +1 -1
  48. package/dist/core/codex-compat/codex-hook-semantic-validator.js +3 -2
  49. package/dist/core/codex-compat/codex-hook-warning-detector.js +10 -2
  50. package/dist/core/codex-control/codex-lb-launch-recovery.js +0 -3
  51. package/dist/core/codex-control/codex-reliability-shield.js +0 -8
  52. package/dist/core/codex-control/codex-sdk-adapter.js +0 -3
  53. package/dist/core/codex-control/codex-sdk-config-policy.js +0 -2
  54. package/dist/core/codex-control/codex-sdk-env-policy.js +61 -16
  55. package/dist/core/codex-control/codex-task-runner.js +0 -7
  56. package/dist/core/codex-control/codex-thread-registry.js +0 -4
  57. package/dist/core/codex-lb/codex-lb-env.js +118 -20
  58. package/dist/core/codex-lb/codex-lb-tool-catalog.js +0 -4
  59. package/dist/core/codex-lb/codex-lb-tool-output-recovery.js +1 -1
  60. package/dist/core/codex-model-guard.js +0 -14
  61. package/dist/core/codex-native/codex-native-feature-broker.js +67 -22
  62. package/dist/core/codex-native/codex-native-interop-policy.js +81 -9
  63. package/dist/core/codex-native/confined-report-writer.js +21 -0
  64. package/dist/core/codex-native/core-skill-integrity.js +169 -20
  65. package/dist/core/codex-native/project-skill-dedupe.js +55 -13
  66. package/dist/core/codex-native/skill-registry-ledger.js +137 -16
  67. package/dist/core/codex-native/sks-skill-paths.js +185 -0
  68. package/dist/core/codex-runtime/codex-desktop-config-policy.js +0 -2
  69. package/dist/core/commands/agent-bridge-command.js +28 -8
  70. package/dist/core/commands/basic-cli.js +67 -26
  71. package/dist/core/commands/bench-command.js +5 -1
  72. package/dist/core/commands/command-utils.js +0 -5
  73. package/dist/core/commands/image-ux-review-command.js +0 -9
  74. package/dist/core/commands/mad-sks-command.js +0 -38
  75. package/dist/core/commands/naruto-command.js +46 -12
  76. package/dist/core/commands/ppt-command.js +0 -9
  77. package/dist/core/commands/run-command.js +8 -2
  78. package/dist/core/commands/seo-command.js +0 -6
  79. package/dist/core/commands/wiki-command.js +0 -14
  80. package/dist/core/computer-use-live-evidence.js +0 -5
  81. package/dist/core/config/secret-preservation.js +0 -11
  82. package/dist/core/daemon/sksd-hook-daemon-entrypoint.js +0 -2
  83. package/dist/core/daemon/sksd-hook-daemon.js +1 -29
  84. package/dist/core/daemon/sksd-hook-dispatch.js +0 -17
  85. package/dist/core/db-safety.js +0 -7
  86. package/dist/core/doctor/browser-use-repair.js +0 -2
  87. package/dist/core/doctor/doctor-codex-startup-repair.js +0 -3
  88. package/dist/core/doctor/doctor-readiness-matrix.js +12 -0
  89. package/dist/core/doctor/doctor-skill-reconcile.js +32 -0
  90. package/dist/core/doctor/imagegen-repair.js +0 -2
  91. package/dist/core/doctor/mcp-transport-collision-repair.js +0 -3
  92. package/dist/core/doctor/retired-managed-residue-private.js +0 -1
  93. package/dist/core/doctor/supabase-mcp-repair.js +0 -11
  94. package/dist/core/feature-fixture-executor.js +0 -48
  95. package/dist/core/feature-fixtures.js +0 -5
  96. package/dist/core/fsx.js +11 -12
  97. package/dist/core/hooks-runtime/code-pack-freshness-preflight.js +0 -5
  98. package/dist/core/hooks-runtime/hook-context.js +202 -0
  99. package/dist/core/hooks-runtime/hook-io.js +1 -12
  100. package/dist/core/hooks-runtime/light-turn.js +0 -2
  101. package/dist/core/hooks-runtime/naruto-decision-gate.js +4 -1
  102. package/dist/core/hooks-runtime/naruto-terminal-finalization.js +91 -0
  103. package/dist/core/hooks-runtime/official-subagent-lifecycle.js +370 -0
  104. package/dist/core/hooks-runtime/standalone-parent-host-capability.js +98 -0
  105. package/dist/core/hooks-runtime/subagent-context.js +59 -0
  106. package/dist/core/hooks-runtime/subagent-skill-availability-contract.js +29 -0
  107. package/dist/core/hooks-runtime/subagent-skill-availability-evidence.js +195 -0
  108. package/dist/core/hooks-runtime/subagent-skill-availability-guards.js +316 -0
  109. package/dist/core/hooks-runtime/subagent-skill-availability.js +217 -0
  110. package/dist/core/hooks-runtime.js +259 -535
  111. package/dist/core/image-ux-review/codex-app-generated-image-discovery.js +0 -17
  112. package/dist/core/image-ux-review/imagegen-adapter.js +0 -14
  113. package/dist/core/imagegen/imagegen-auth-readiness.js +0 -9
  114. package/dist/core/imagegen/imagegen-capability.js +0 -3
  115. package/dist/core/init/managed-skill-install.js +42 -0
  116. package/dist/core/init/skills.js +247 -74
  117. package/dist/core/init.js +15 -40
  118. package/dist/core/lean-engineering-policy.js +0 -2
  119. package/dist/core/locks/file-lock.js +0 -21
  120. package/dist/core/loops/loop-planner.js +0 -6
  121. package/dist/core/loops/loop-runtime.js +0 -1
  122. package/dist/core/loops/loop-worker-runtime.js +0 -19
  123. package/dist/core/mad-sks/executors/db-write-executor.js +0 -4
  124. package/dist/core/mad-sks/executors/executor-base.js +0 -10
  125. package/dist/core/mad-sks/immutable-harness-guard.js +0 -5
  126. package/dist/core/mad-sks/sql-plane/coordinator.js +0 -5
  127. package/dist/core/mad-sks/sql-plane/ledger.js +0 -4
  128. package/dist/core/mad-sks/sql-plane/lock.js +0 -4
  129. package/dist/core/mad-sks/sql-plane/mcp-executor.js +0 -9
  130. package/dist/core/mad-sks/sql-plane/policy-resolver.js +0 -2
  131. package/dist/core/mad-sks/sql-plane/postconditions.js +0 -4
  132. package/dist/core/mad-sks/sql-plane/recovery.js +0 -2
  133. package/dist/core/mad-sks/sql-plane/runtime-profile.js +0 -8
  134. package/dist/core/managed-assets/managed-assets-manifest.js +1 -7
  135. package/dist/core/mcp-config/health-check.js +10 -3
  136. package/dist/core/migration/migration-transaction-journal.js +0 -8
  137. package/dist/core/mission.js +0 -2
  138. package/dist/core/naruto/naruto-active-pool.js +0 -2
  139. package/dist/core/naruto/naruto-concurrency-governor.js +0 -1
  140. package/dist/core/naruto/naruto-real-write-proof.js +0 -4
  141. package/dist/core/naruto/naruto-write-e2e.js +0 -1
  142. package/dist/core/perf/perf-budget.js +0 -5
  143. package/dist/core/permission-gates.js +0 -2
  144. package/dist/core/pipeline-internals/runtime-core.js +15 -5
  145. package/dist/core/pipeline-internals/runtime-gates.js +0 -12
  146. package/dist/core/preflight/parallel-preflight-engine.js +0 -11
  147. package/dist/core/proof/evidence-collector.js +0 -2
  148. package/dist/core/proof/route-finalizer.js +0 -1
  149. package/dist/core/proof/selftest-proof-fixtures.js +0 -5
  150. package/dist/core/providers/glm/bench/glm-benchmark-runner.js +0 -2
  151. package/dist/core/providers/glm/glm-request-cache.js +0 -3
  152. package/dist/core/providers/glm/naruto/glm-naruto-command.js +0 -1
  153. package/dist/core/providers/glm/naruto/glm-naruto-decomposer.js +0 -1
  154. package/dist/core/providers/glm/naruto/glm-naruto-orchestrator.js +0 -6
  155. package/dist/core/providers/glm/naruto/glm-naruto-trace.js +0 -1
  156. package/dist/core/providers/glm/naruto/glm-naruto-worker-pool.js +0 -1
  157. package/dist/core/providers/glm/naruto/glm-naruto-worktree.js +0 -1
  158. package/dist/core/providers/openrouter/openrouter-secret-store.js +0 -1
  159. package/dist/core/providers/openrouter/openrouter-stream.js +0 -2
  160. package/dist/core/questions.js +3 -3
  161. package/dist/core/release/gate-manifest.js +0 -5
  162. package/dist/core/release/package-size-budget.js +1 -1
  163. package/dist/core/release/release-gate-batch-runner.js +11 -2
  164. package/dist/core/release/release-gate-cache-v2.js +0 -4
  165. package/dist/core/release/release-gate-hermetic-env.js +0 -5
  166. package/dist/core/release-parallel-full-coverage.js +0 -2
  167. package/dist/core/remote/ssh-worker-client.js +0 -3
  168. package/dist/core/research/research-adversarial-review.js +6 -2
  169. package/dist/core/responses-retry-policy.js +0 -10
  170. package/dist/core/retention.js +0 -7
  171. package/dist/core/routes/constants.js +0 -3
  172. package/dist/core/routes.js +89 -15
  173. package/dist/core/safety/command-contract/contracts.js +2 -0
  174. package/dist/core/safety/mutation-guard.js +0 -25
  175. package/dist/core/safety/mutation-ledger.js +0 -9
  176. package/dist/core/safety/requested-scope-contract.js +0 -0
  177. package/dist/core/security/high-risk-contracts.js +0 -1
  178. package/dist/core/skills/core-skill-card.js +0 -0
  179. package/dist/core/skills/core-skill-deployment.js +0 -13
  180. package/dist/core/skills/core-skill-epoch.js +0 -11
  181. package/dist/core/skills/core-skill-meta-update.js +0 -6
  182. package/dist/core/skills/core-skill-patch-apply.js +0 -7
  183. package/dist/core/skills/core-skill-patch.js +0 -8
  184. package/dist/core/skills/core-skill-reflection.js +0 -16
  185. package/dist/core/skills/core-skill-runtime.js +0 -6
  186. package/dist/core/skills/core-skill-scorer.js +0 -7
  187. package/dist/core/skills/core-skill-trainer.js +0 -11
  188. package/dist/core/skills/core-skill-types.js +0 -9
  189. package/dist/core/skills/core-skill-validation.js +0 -5
  190. package/dist/core/skills/rejected-skill-patch-buffer.js +0 -2
  191. package/dist/core/stop-gate/stop-gate-check.js +0 -8
  192. package/dist/core/stop-gate/stop-gate-resolver.js +0 -7
  193. package/dist/core/stop-gate/stop-gate-writer.js +0 -5
  194. package/dist/core/subagents/model-policy.js +0 -7
  195. package/dist/core/subagents/naruto-help-contract.js +1 -1
  196. package/dist/core/subagents/naruto-proof-projection.js +580 -12
  197. package/dist/core/subagents/official-subagent-config.js +0 -8
  198. package/dist/core/subagents/official-subagent-preparation.js +6 -5
  199. package/dist/core/subagents/official-subagent-prompt.js +29 -0
  200. package/dist/core/subagents/official-subagent-runner.js +343 -37
  201. package/dist/core/subagents/subagent-evidence.js +378 -9
  202. package/dist/core/subagents/thread-budget.js +5 -2
  203. package/dist/core/subagents/triwiki-attention.js +0 -4
  204. package/dist/core/subagents/wave-parent-guidance.js +54 -9
  205. package/dist/core/telegram/runtime.js +0 -1
  206. package/dist/core/triwiki/code-index-scanner.js +0 -3
  207. package/dist/core/triwiki/code-pack-head-freshness.js +0 -10
  208. package/dist/core/triwiki/code-pack.js +0 -2
  209. package/dist/core/triwiki/triwiki-cache-key.js +0 -1
  210. package/dist/core/triwiki/triwiki-proof-bank.js +0 -1
  211. package/dist/core/triwiki-attention.js +0 -10
  212. package/dist/core/triwiki-provenance.js +0 -5
  213. package/dist/core/triwiki-runtime.js +0 -12
  214. package/dist/core/triwiki-wrongness/wrongness-ledger.js +0 -7
  215. package/dist/core/triwiki-wrongness/wrongness-schema.js +0 -3
  216. package/dist/core/trust-kernel/trust-report.js +0 -7
  217. package/dist/core/update/update-migration-state.js +21 -39
  218. package/dist/core/update-check.js +2 -14
  219. package/dist/core/version-manager.js +2 -0
  220. package/dist/core/version.js +1 -1
  221. package/dist/core/work-order-ledger.js +0 -17
  222. package/dist/core/zellij/zellij-clipboard-config.js +0 -18
  223. package/dist/core/zellij/zellij-lane-renderer.js +5 -46
  224. package/dist/core/zellij/zellij-lane-runtime.js +0 -1
  225. package/dist/core/zellij/zellij-launcher.js +0 -26
  226. package/dist/core/zellij/zellij-official-subagent-activity.js +0 -5
  227. package/dist/core/zellij/zellij-official-subagent-telemetry.js +0 -5
  228. package/dist/core/zellij/zellij-screen-proof.js +0 -7
  229. package/dist/core/zellij/zellij-slot-column-anchor.js +0 -1
  230. package/dist/core/zellij/zellij-slot-pane-renderer.js +0 -9
  231. package/dist/core/zellij/zellij-slot-telemetry.js +0 -12
  232. package/dist/core/zellij/zellij-ui-mode.js +0 -7
  233. package/dist/core/zellij/zellij-update.js +0 -29
  234. package/dist/core/zellij/zellij-worker-pane-manager.js +0 -39
  235. package/dist/native/sks-menubar/Sources/ProvidersViewController.swift +213 -27
  236. package/dist/native/sks-menubar/Sources/UpdatesViewController.swift +95 -12
  237. package/dist/scripts/agent-message-bus-reader-check.js +0 -1
  238. package/dist/scripts/all-feature-deep-completion-check.js +0 -1
  239. package/dist/scripts/appshots-thread-attachment-discovery-check.js +0 -1
  240. package/dist/scripts/architecture-guard-check.js +0 -1
  241. package/dist/scripts/build-dist.js +0 -1
  242. package/dist/scripts/build-once-runner-check.js +0 -1
  243. package/dist/scripts/canonical-test-runner.js +0 -2
  244. package/dist/scripts/certificate-sla-check.js +0 -1
  245. package/dist/scripts/changelog-check.js +0 -1
  246. package/dist/scripts/check-cli-entrypoint.js +0 -1
  247. package/dist/scripts/check-command-module-budget.js +0 -7
  248. package/dist/scripts/check-feature-quality.js +0 -1
  249. package/dist/scripts/check-legacy-free.js +0 -1
  250. package/dist/scripts/check-pipeline-runtime.js +0 -1
  251. package/dist/scripts/check-runtime-schemas.js +0 -1
  252. package/dist/scripts/codex-0-134-runner-truth-check.js +0 -1
  253. package/dist/scripts/codex-0-137-compat-check.js +0 -1
  254. package/dist/scripts/codex-0138-capability-artifact-check.js +0 -1
  255. package/dist/scripts/codex-0138-capability-check.js +0 -1
  256. package/dist/scripts/codex-0138-doctor-check.js +0 -1
  257. package/dist/scripts/codex-0138-feature-probes-check.js +0 -1
  258. package/dist/scripts/codex-0144-core-real-probes-check.js +0 -1
  259. package/dist/scripts/codex-app-handoff-check.js +0 -1
  260. package/dist/scripts/codex-app-handoff-launch-check.js +0 -1
  261. package/dist/scripts/codex-config-load-probe.js +0 -5
  262. package/dist/scripts/codex-control-all-pipelines-check.js +0 -1
  263. package/dist/scripts/codex-control-event-stream-ledger-check.js +0 -1
  264. package/dist/scripts/codex-control-tool-output-continuity-audit-check.js +0 -1
  265. package/dist/scripts/codex-permission-profiles-check.js +0 -1
  266. package/dist/scripts/codex-plugin-app-template-policy-check.js +0 -1
  267. package/dist/scripts/codex-project-config-policy-splitter-check.js +0 -1
  268. package/dist/scripts/codex-sdk-all-pipelines-check.js +0 -1
  269. package/dist/scripts/codex-sdk-backend-router-check.js +0 -1
  270. package/dist/scripts/codex-sdk-capability-check.js +0 -1
  271. package/dist/scripts/codex-sdk-event-stream-ledger-check.js +0 -1
  272. package/dist/scripts/codex-sdk-real-smoke-check.js +0 -1
  273. package/dist/scripts/concurrent-session-collision-check.js +9 -0
  274. package/dist/scripts/context7-evidence-dedupe-check.js +0 -1
  275. package/dist/scripts/core-skill-card-schema-check.js +0 -11
  276. package/dist/scripts/core-skill-deployment-snapshot-check.js +0 -10
  277. package/dist/scripts/core-skill-heldout-validation-check.js +0 -11
  278. package/dist/scripts/core-skill-no-inference-optimizer-check.js +0 -11
  279. package/dist/scripts/core-skill-patch-check.js +0 -11
  280. package/dist/scripts/core-skill-route-runtime-integration-check.js +0 -11
  281. package/dist/scripts/current-surface-update-e2e-check.js +0 -4
  282. package/dist/scripts/current-upgrade-matrix-check.js +0 -1
  283. package/dist/scripts/dfix-fixture-check.js +0 -1
  284. package/dist/scripts/dfix-patch-handoff-check.js +0 -1
  285. package/dist/scripts/dfix-verification-check.js +0 -1
  286. package/dist/scripts/dfix-verification-recommendation-check.js +0 -1
  287. package/dist/scripts/docs-truthfulness-check.js +3 -3
  288. package/dist/scripts/doctor-fastpath-check.js +0 -1
  289. package/dist/scripts/doctor-fix-proves-codex-read-check.js +0 -11
  290. package/dist/scripts/doctor-fixes-codex-app-fast-ui-check.js +0 -4
  291. package/dist/scripts/doctor-idempotence-check.js +0 -1
  292. package/dist/scripts/doctor-ops-semantics-check.js +0 -1
  293. package/dist/scripts/ensure-bin-executable.js +0 -1
  294. package/dist/scripts/evidence-flagship-coverage-check.js +0 -1
  295. package/dist/scripts/fast-codex-service-tier-proof-check.js +0 -1
  296. package/dist/scripts/fixtures/fake-codex-config-loader.js +0 -5
  297. package/dist/scripts/fsx-hotpath-check.js +0 -1
  298. package/dist/scripts/gate-policy-audit-check.js +1 -1
  299. package/dist/scripts/geo-claim-evidence-check.js +0 -1
  300. package/dist/scripts/geo-cli-blackbox-check.js +0 -1
  301. package/dist/scripts/geo-crawler-policy-check.js +0 -1
  302. package/dist/scripts/git-worktree-diff-envelope-check.js +0 -1
  303. package/dist/scripts/git-worktree-dirty-lock-check.js +0 -1
  304. package/dist/scripts/git-worktree-dirty-main-detection-check.js +0 -1
  305. package/dist/scripts/git-worktree-integration-primary-check.js +0 -1
  306. package/dist/scripts/git-worktree-manifest-append-check.js +0 -1
  307. package/dist/scripts/git-worktree-untracked-diff-check.js +0 -1
  308. package/dist/scripts/high-risk-contracts-check.js +0 -1
  309. package/dist/scripts/hook-latency-budget-check.js +0 -1
  310. package/dist/scripts/hook-latency-quantum-check.js +0 -1
  311. package/dist/scripts/image-artifact-path-contract-check.js +0 -1
  312. package/dist/scripts/imagegen-real-smoke-check.js +0 -1
  313. package/dist/scripts/import-graph-budget-check.js +0 -1
  314. package/dist/scripts/installed-package-smoke-check.js +0 -1
  315. package/dist/scripts/legacy-gate-purge-check.js +0 -1
  316. package/dist/scripts/lib/codex-sdk-gate-lib.js +0 -3
  317. package/dist/scripts/lib/ensure-dist-fresh.js +0 -1
  318. package/dist/scripts/lib/valid-png-fixture.js +0 -1
  319. package/dist/scripts/local-collab-all-pipelines-final-gpt-check.js +0 -1
  320. package/dist/scripts/loop-directive-check-lib.js +0 -1
  321. package/dist/scripts/loop-worker-fixture-child.js +0 -1
  322. package/dist/scripts/mad-preflight-blocks-unreadable-config-check.js +0 -10
  323. package/dist/scripts/mad-sks-sql-plane-lifecycle-hook-decision-check.js +0 -1
  324. package/dist/scripts/mad-sks-sql-plane-result-lifecycle-check.js +0 -1
  325. package/dist/scripts/mcp-plugin-inventory-check.js +0 -1
  326. package/dist/scripts/mcp-tool-naming-parity-check.js +0 -1
  327. package/dist/scripts/model-call-concurrency-check.js +0 -1
  328. package/dist/scripts/mutation-callsite-coverage-check.js +0 -5
  329. package/dist/scripts/naruto-codex-e2e-check.js +0 -1
  330. package/dist/scripts/naruto-worktree-coding-blackbox.js +0 -1
  331. package/dist/scripts/official-subagent-workflow-check.js +3 -1
  332. package/dist/scripts/ops-diagnostics-bundle-check.js +0 -1
  333. package/dist/scripts/packlist-performance-check.js +1 -3
  334. package/dist/scripts/perf-budget-check.js +0 -1
  335. package/dist/scripts/ppt-full-e2e-blackbox-check.js +0 -1
  336. package/dist/scripts/ppt-real-export-adapter-check.js +0 -1
  337. package/dist/scripts/ppt-real-imagegen-smoke-check.js +0 -1
  338. package/dist/scripts/ppt-real-imagegen-wiring-check.js +0 -1
  339. package/dist/scripts/ppt-reexport-rereview-check.js +0 -1
  340. package/dist/scripts/prepublish-fast-check.js +0 -23
  341. package/dist/scripts/prepublish-release-check-or-fast.js +0 -7
  342. package/dist/scripts/probe-memoization-check.js +0 -1
  343. package/dist/scripts/product-design-plugin-routing-check.js +0 -1
  344. package/dist/scripts/project-skill-dedupe-blackbox.js +36 -9
  345. package/dist/scripts/prompt-placeholder-guard-check.js +0 -1
  346. package/dist/scripts/python-codex-sdk-all-pipelines-check.js +0 -3
  347. package/dist/scripts/qa-loop-app-handoff-capability-check.js +0 -1
  348. package/dist/scripts/qa-loop-app-handoff-check.js +0 -1
  349. package/dist/scripts/qa-loop-app-handoff-cli-check.js +0 -1
  350. package/dist/scripts/qa-loop-app-handoff-confirmation-check.js +0 -1
  351. package/dist/scripts/qa-loop-app-handoff-gate-lifecycle-check.js +0 -1
  352. package/dist/scripts/qa-loop-app-handoff-launch-check.js +0 -1
  353. package/dist/scripts/qa-loop-app-handoff-status-lifecycle-check.js +0 -1
  354. package/dist/scripts/qa-loop-budget-policy-check.js +0 -1
  355. package/dist/scripts/qa-loop-effort-escalation-check.js +0 -1
  356. package/dist/scripts/qa-loop-image-path-exposure-check.js +0 -1
  357. package/dist/scripts/qa-loop-image-path-prompt-injection-check.js +0 -1
  358. package/dist/scripts/release-cache-glob-hashing-check.js +0 -1
  359. package/dist/scripts/release-cache-input-classifier-check.js +0 -1
  360. package/dist/scripts/release-cache-neutralization-report-check.js +0 -1
  361. package/dist/scripts/release-cache-version-neutral-fixture-check.js +0 -1
  362. package/dist/scripts/release-check-stamp.js +0 -4
  363. package/dist/scripts/release-dist-freshness-check.js +0 -1
  364. package/dist/scripts/release-full-parallelism-blackbox.js +3 -3
  365. package/dist/scripts/release-gate-batch-runner-check.js +22 -0
  366. package/dist/scripts/release-gate-budget-check.js +0 -6
  367. package/dist/scripts/release-gate-dag-runner-check.js +0 -1
  368. package/dist/scripts/release-latency-slo-check.js +0 -1
  369. package/dist/scripts/release-metadata-1-19-check.js +0 -1
  370. package/dist/scripts/release-metadata-check.js +0 -3
  371. package/dist/scripts/release-parallel-speed-budget-check.js +0 -5
  372. package/dist/scripts/release-proof-truth-check.js +0 -1
  373. package/dist/scripts/release-provenance-check.js +0 -1
  374. package/dist/scripts/release-real-check.js +0 -1
  375. package/dist/scripts/release-runtime-truth-matrix-check.js +0 -1
  376. package/dist/scripts/release-version-truth-check.js +0 -1
  377. package/dist/scripts/research-blueprint-densifier-check.js +0 -1
  378. package/dist/scripts/research-claim-builder-check.js +0 -1
  379. package/dist/scripts/research-complete-package-fixture-check.js +0 -1
  380. package/dist/scripts/research-final-reviewer-blackbox.js +0 -1
  381. package/dist/scripts/responses-retry-policy-centralized-check.js +0 -1
  382. package/dist/scripts/retention-apply-smoke-check.js +0 -1
  383. package/dist/scripts/retention-budget-check.js +0 -1
  384. package/dist/scripts/retention-dry-run-check.js +0 -1
  385. package/dist/scripts/rollback-recovery-smoke-check.js +0 -1
  386. package/dist/scripts/route-intent-regression-check.js +0 -1
  387. package/dist/scripts/runtime-current-terminal-check.js +0 -1
  388. package/dist/scripts/runtime-dist-parity-check.js +0 -1
  389. package/dist/scripts/runtime-no-src-mjs-check.js +0 -1
  390. package/dist/scripts/runtime-proof-summary-check.js +0 -1
  391. package/dist/scripts/runtime-ts-rust-boundary-check.js +0 -15
  392. package/dist/scripts/runtime-ts-source-of-truth-check.js +0 -1
  393. package/dist/scripts/scheduler-batch-dispatch-check.js +0 -1
  394. package/dist/scripts/scheduler-parallel-proof-consistency-check.js +0 -1
  395. package/dist/scripts/scheduler-utilization-integral-check.js +0 -1
  396. package/dist/scripts/search-visibility-gate-lib.js +0 -1
  397. package/dist/scripts/seo-audit-fixture-check.js +0 -1
  398. package/dist/scripts/seo-cli-blackbox-check.js +0 -1
  399. package/dist/scripts/seo-geo-geo-disambiguation-check.js +0 -1
  400. package/dist/scripts/seo-geo-route-identity-check.js +0 -1
  401. package/dist/scripts/seo-geo-skill-rich-content-check.js +0 -1
  402. package/dist/scripts/seo-marketing-truthfulness-check.js +0 -1
  403. package/dist/scripts/seo-metadata-sync-check.js +0 -1
  404. package/dist/scripts/seo-no-mutation-by-default-check.js +0 -1
  405. package/dist/scripts/shared-memory-fixture-check.js +0 -1
  406. package/dist/scripts/side-effect-runtime-report-check.js +0 -1
  407. package/dist/scripts/sizecheck.js +0 -1
  408. package/dist/scripts/sks-1-11-gate-lib.js +0 -1
  409. package/dist/scripts/sks-1-12-real-execution-check-lib.js +0 -1
  410. package/dist/scripts/sks-1-18-gate-lib.js +0 -1
  411. package/dist/scripts/sks-menubar-install-check.js +0 -3
  412. package/dist/scripts/sksd-daemon-check.js +0 -1
  413. package/dist/scripts/super-search-live-smoke-check.js +0 -1
  414. package/dist/scripts/super-search-local-http-smoke-check.js +0 -1
  415. package/dist/scripts/super-search-offline-contract-check.js +0 -1
  416. package/dist/scripts/super-search-provider-interface-check.js +0 -1
  417. package/dist/scripts/triwiki-cache-key-check.js +0 -1
  418. package/dist/scripts/triwiki-proof-bank-blackbox.js +0 -1
  419. package/dist/scripts/triwiki-proof-bank-check.js +0 -1
  420. package/dist/scripts/triwiki-proof-card-check.js +0 -1
  421. package/dist/scripts/trust-fixture-check.js +0 -1
  422. package/dist/scripts/ultra-router-auto-router-check.js +0 -1
  423. package/dist/scripts/update-fastpath-check.js +0 -1
  424. package/dist/scripts/upgrade-migration-matrix-check.js +0 -1
  425. package/dist/scripts/ux-review-extract-wires-real-extractor-check.js +0 -1
  426. package/dist/scripts/ux-review-imagegen-blackbox-check.js +0 -1
  427. package/dist/scripts/ux-review-patch-diff-recheck-check.js +0 -1
  428. package/dist/scripts/ux-review-real-imagegen-smoke-check.js +0 -1
  429. package/dist/scripts/ux-review-run-wires-imagegen-check.js +0 -1
  430. package/dist/scripts/write-build-manifest.js +0 -1
  431. package/dist/scripts/wrongness-fixture-check.js +0 -1
  432. package/dist/scripts/zellij-capability-check.js +0 -1
  433. package/dist/scripts/zellij-developer-controls-check.js +0 -1
  434. package/dist/scripts/zellij-doctor-readiness-check.js +0 -13
  435. package/dist/scripts/zellij-dynamic-pane-lifecycle-check.js +0 -1
  436. package/dist/scripts/zellij-fake-adapter-check.js +0 -1
  437. package/dist/scripts/zellij-initial-main-only-blackbox.js +0 -1
  438. package/dist/scripts/zellij-lane-renderer-check.js +0 -1
  439. package/dist/scripts/zellij-launch-command-truth-check.js +0 -12
  440. package/dist/scripts/zellij-layout-valid-check.js +0 -1
  441. package/dist/scripts/zellij-pane-creation-lock-metrics-check.js +0 -1
  442. package/dist/scripts/zellij-pane-lock-concurrency-blackbox.js +0 -1
  443. package/dist/scripts/zellij-pane-lock-does-not-block-worker-check.js +0 -1
  444. package/dist/scripts/zellij-pane-lock-open-worker-integration-blackbox.js +0 -1
  445. package/dist/scripts/zellij-pane-proof-check.js +0 -1
  446. package/dist/scripts/zellij-qa-app-handoff-status-check.js +0 -1
  447. package/dist/scripts/zellij-real-session-cleanup-check.js +0 -1
  448. package/dist/scripts/zellij-real-session-launch-check.js +0 -1
  449. package/dist/scripts/zellij-right-column-geometry-proof.js +0 -1
  450. package/dist/scripts/zellij-right-column-headless-overflow-check.js +0 -1
  451. package/dist/scripts/zellij-right-column-manager-check.js +0 -1
  452. package/dist/scripts/zellij-screen-proof-check.js +0 -1
  453. package/dist/scripts/zellij-slot-only-ui-check.js +0 -1
  454. package/dist/scripts/zellij-slot-pane-renderer-check.js +0 -1
  455. package/dist/scripts/zellij-slot-pane-stale-detection-check.js +0 -7
  456. package/dist/scripts/zellij-slot-telemetry-incremental-check.js +0 -1
  457. package/dist/scripts/zellij-slot-telemetry-live-flush-check.js +0 -1
  458. package/dist/scripts/zellij-slot-telemetry-performance-check.js +0 -1
  459. package/dist/scripts/zellij-stacked-capability-routing-check.js +0 -1
  460. package/dist/scripts/zellij-stacked-fallback-integration-blackbox.js +0 -1
  461. package/dist/scripts/zellij-stacked-version-matrix-check.js +0 -1
  462. package/dist/scripts/zellij-stacked-version-parser-check.js +0 -1
  463. package/dist/scripts/zellij-ui-design-check.js +0 -12
  464. package/dist/scripts/zellij-update-prompt-matrix-check.js +0 -1
  465. package/dist/scripts/zellij-update-prompt-mode-check.js +0 -1
  466. package/dist/scripts/zellij-update-prompt-safety-check.js +0 -1
  467. package/dist/scripts/zellij-worker-pane-real-ui-blackbox.js +0 -2
  468. package/package.json +1 -1
@@ -476,7 +476,6 @@ function readPositiveIntEnv(name, fallback) {
476
476
  return Number.isFinite(parsed) && parsed > 0 ? Math.floor(parsed) : fallback;
477
477
  }
478
478
  function parseJsonObjectFromStdout(stdout) {
479
- /* intentional: best-effort JSON extraction from mixed stdout — each parse attempt below is expected to fail on non-JSON lines, falling through to the next strategy, with null as the final honest outcome */
480
479
  const text = String(stdout || '').trim();
481
480
  const first = text.indexOf('{');
482
481
  const last = text.lastIndexOf('}');
@@ -61,11 +61,6 @@ export async function writePerfBudgetReport(root, budgets, opts = {}) {
61
61
  await writeJsonAtomic(path.join(root, '.sneakoscope', 'reports', 'perf-budget.json'), report);
62
62
  return report;
63
63
  }
64
- // p50_ms/p95_ms are the numbers the budget is judged against, and they must
65
- // be the user-experienced raw wall time. This used to subtract a measured
66
- // node startup baseline, which let a real 171ms command report as 3ms
67
- // (20차 P0-11) — that deduction is gone; these are plain percentiles of the
68
- // measured process wall-clock durations, nothing else.
69
64
  async function measureCommand(root, budget, measuredRuns, timeoutMs) {
70
65
  const durations = [];
71
66
  const exitCodes = [];
@@ -106,8 +106,6 @@ export function madSksCatastrophicSqlExplicitlyRequested({ classification, userI
106
106
  const requirements = madSksCatastrophicSqlLiteralRequirements(classification || {});
107
107
  if (!requirements.length)
108
108
  return { required: false, ok: true, missing: [] };
109
- // The SQL text can be generated by the agent. Only the user's literal request
110
- // or CLI statement counts as explicit catastrophic authorization.
111
109
  const haystack = String(userIntent || '');
112
110
  const missing = requirements.filter((entry) => !entry.pattern.test(haystack)).map((entry) => entry.reason);
113
111
  return {
@@ -25,7 +25,7 @@ import { prepareMadSksSqlPlaneMission } from '../mad-sks/sql-plane/coordinator.j
25
25
  import { MAD_SKS_SQL_PLANE_CAPABILITY_FILE, madSksSqlPlaneRelativePath } from '../mad-sks/sql-plane/paths.js';
26
26
  import { OFFICIAL_SUBAGENT_EXECUTION_STAGE_ID } from '../agents/agent-schema.js';
27
27
  import { normalizeOfficialSubagentPolicy, officialSubagentPipelineStage } from '../agents/agent-plan.js';
28
- import { CODEX_APP_IMAGE_GENERATION_DOC_URL, CODEX_COMPUTER_USE_EVIDENCE_SOURCE, CODEX_COMPUTER_USE_ONLY_POLICY, CODEX_IMAGEGEN_REQUIRED_POLICY, CODEX_WEB_VERIFICATION_POLICY, FROM_CHAT_IMG_CHECKLIST_ARTIFACT, FROM_CHAT_IMG_COVERAGE_ARTIFACT, FROM_CHAT_IMG_QA_LOOP_ARTIFACT, FROM_CHAT_IMG_TEMP_TRIWIKI_ARTIFACT, FROM_CHAT_IMG_TEMP_TRIWIKI_SESSIONS, chatCaptureIntakeText, context7RequirementText, dollarCommand, evidenceMentionsForbiddenBrowserAutomation, hasFromChatImgSignal, hasMadSksSignal, imageUxReviewPipelinePolicyText, pptPipelineAllowlistPolicyText, reflectionRequiredForRoute, reasoningInstruction, routeNeedsContext7, routePrompt, routeReasoning, routeRequiresSubagents, stripDollarCommand, stripMadSksSignal, stripVisibleDecisionAnswerBlocks, subagentExecutionPolicyText, stackCurrentDocsPolicyText, triwikiContextTracking } from '../routes.js';
28
+ import { CODEX_APP_IMAGE_GENERATION_DOC_URL, CODEX_COMPUTER_USE_EVIDENCE_SOURCE, CODEX_COMPUTER_USE_ONLY_POLICY, CODEX_IMAGEGEN_REQUIRED_POLICY, CODEX_WEB_VERIFICATION_POLICY, FROM_CHAT_IMG_CHECKLIST_ARTIFACT, FROM_CHAT_IMG_COVERAGE_ARTIFACT, FROM_CHAT_IMG_QA_LOOP_ARTIFACT, FROM_CHAT_IMG_TEMP_TRIWIKI_ARTIFACT, FROM_CHAT_IMG_TEMP_TRIWIKI_SESSIONS, chatCaptureIntakeText, context7RequirementText, dollarCommand, evidenceMentionsForbiddenBrowserAutomation, explicitManagedSkillNames, hasFromChatImgSignal, hasMadSksSignal, imageUxReviewPipelinePolicyText, managedSkillNamesForPrompt, pptPipelineAllowlistPolicyText, reflectionRequiredForRoute, reasoningInstruction, routeNeedsContext7, routePrompt, routeReasoning, routeRequiresSubagents, stripDollarCommand, stripMadSksSignal, stripVisibleDecisionAnswerBlocks, subagentExecutionPolicyText, stackCurrentDocsPolicyText, triwikiContextTracking } from '../routes.js';
29
29
  import { coreEngineeringDirectiveReferenceText } from '../lean-engineering-policy.js';
30
30
  import { classifyTaskProfile, gateProfileForTask } from '../runtime/task-profile.js';
31
31
  import { chooseVerificationBudget } from '../runtime/verification-budget.js';
@@ -665,7 +665,12 @@ export function goalNativeOnlyContext(prompt, route = routePrompt(prompt)) {
665
665
  }
666
666
  export async function prepareRoute(root, prompt, state = {}, opts = {}) {
667
667
  const cleanPrompt = stripVisibleDecisionAnswerBlocks(prompt);
668
- const route = routePrompt(cleanPrompt);
668
+ const selectedRoute = routePrompt(cleanPrompt);
669
+ const explicitlyInvokedSkills = explicitManagedSkillNames(cleanPrompt);
670
+ const route = selectedRoute ? {
671
+ ...selectedRoute,
672
+ requiredSkills: managedSkillNamesForPrompt(selectedRoute, cleanPrompt)
673
+ } : null;
669
674
  const codexThreadId = String(process.env.CODEX_THREAD_ID || '').trim();
670
675
  const sessionKey = opts.sessionKey || codexThreadId || state?._session_key || null;
671
676
  const madSksAuthorization = hasMadSksSignal(cleanPrompt);
@@ -702,7 +707,7 @@ export async function prepareRoute(root, prompt, state = {}, opts = {}) {
702
707
  if (route.id === 'Naruto' && subagentsRequired)
703
708
  return finish(await prepareNaruto(root, route, task, required, { madSksAuthorization, sessionKey, parentModel: opts.parentModel || null }));
704
709
  if (route.id === 'Naruto')
705
- return finish(await prepareLightRoute(root, parentOwnedProfileRoute(route), task, required, { sessionKey }));
710
+ return finish(await prepareLightRoute(root, parentOwnedProfileRoute(route, explicitlyInvokedSkills), task, required, { sessionKey }));
706
711
  if (route.id === 'Research')
707
712
  return finish(await prepareResearch(root, route, task, required, { sessionKey }));
708
713
  if (route.id === 'AutoResearch')
@@ -718,7 +723,7 @@ export async function prepareRoute(root, prompt, state = {}, opts = {}) {
718
723
  additionalContext: `${promptPipelineContext(prompt, route)}\n\nReasoning: ${reasoning.effort} (${reasoning.reason}); temporary profile ${reasoning.profile}.\nRequired skills: ${route.requiredSkills.join(', ')}.\nOfficial subagents required: ${subagentsRequired ? 'yes' : 'no'}.`
719
724
  });
720
725
  }
721
- function parentOwnedProfileRoute(route) {
726
+ function parentOwnedProfileRoute(route, explicitlyInvokedSkills = []) {
722
727
  return {
723
728
  ...route,
724
729
  id: 'SKS',
@@ -726,7 +731,12 @@ function parentOwnedProfileRoute(route) {
726
731
  mode: 'SKS',
727
732
  route: 'profiled parent-owned execution',
728
733
  description: 'Parent-owned bounded execution selected by the task profile; no subagent workflow is required.',
729
- requiredSkills: ['sks-pipeline-runner', 'sks-prompt-pipeline', 'sks-honest-mode'],
734
+ requiredSkills: Array.from(new Set([
735
+ 'sks-pipeline-runner',
736
+ 'sks-prompt-pipeline',
737
+ 'sks-honest-mode',
738
+ ...explicitlyInvokedSkills
739
+ ])),
730
740
  lifecycle: ['task_profile', 'ownership', 'focused_implementation', 'listed_verification', 'honest_summary'],
731
741
  stopGate: 'honest_mode',
732
742
  coverage_required: false,
@@ -71,13 +71,6 @@ async function reflectionGateStatus(root, state = {}, jsonCache) {
71
71
  }
72
72
  return { ok, missing };
73
73
  }
74
- // The single choke point every route's stop decision passes through
75
- // (hookStop -> evaluateStop). A work-order-ledger.json here means SOME
76
- // code already committed to tracking this mission's work items; once that
77
- // commitment exists, stop must not be allowed while items remain
78
- // unresolved (neither verified nor honestly blocked), or an omission can
79
- // reach "done" silently. Missions with no ledger are unaffected (routes
80
- // that haven't adopted per-item tracking yet, or non-work routes).
81
74
  async function workOrderCoverageGateStatus(root, state = {}) {
82
75
  const id = state?.mission_id;
83
76
  if (!id)
@@ -184,10 +177,6 @@ export async function projectGateStatus(root, state = {}) {
184
177
  };
185
178
  }
186
179
  export async function evaluateStop(root, state, payload, opts = {}) {
187
- // `sks route close` is the explicit terminal control for abandoning or
188
- // superseding a route. Once it has closed the route, stale requirements
189
- // from that route must not re-open native-agent, reflection, or proof gates
190
- // on the next Stop hook invocation.
191
180
  if (state?.route_closed === true) {
192
181
  return {
193
182
  continue: true,
@@ -266,7 +255,6 @@ export async function evaluateStop(root, state, payload, opts = {}) {
266
255
  return complianceBlock(root, state, `SKS no-question run is not done. Continue autonomously, fix failing checks, update ${gate.file || 'the active gate file'}, and do not ask the user.${missing}`, { gate: gate.file || 'active-gate', missing: gate.missing });
267
256
  }
268
257
  if (state?.mission_id && state?.stop_gate && !['none', 'honest_mode', 'clarification-gate'].includes(state.stop_gate)) {
269
- // 4.0.9: Use canonical stop-gate resolver first for NARUTO/GLM_NARUTO routes.
270
258
  const modeUpper = String(state?.mode || '').toUpperCase();
271
259
  const routeUpper = String(state?.route || state?.route_command || '').replace(/^\$/, '').toUpperCase();
272
260
  const narutoFamily = modeUpper === 'NARUTO' || routeUpper === 'NARUTO' || routeUpper === 'GLM_NARUTO';
@@ -31,23 +31,12 @@ export async function runParallelPreflight(checks) {
31
31
  export async function runCodexLaunchPreflight(rootInput = process.cwd(), opts = {}) {
32
32
  const root = path.resolve(rootInput || process.cwd());
33
33
  const reportPath = opts.reportPath || path.join(root, '.sneakoscope', 'reports', 'mad-launch-preflight.json');
34
- // On the interactive launch path the real codex profile is exercised the moment the
35
- // Zellij session opens, so spawning `codex exec` here (up to ~20s, and again inside
36
- // the repair re-inspections) is redundant. launchFast skips ONLY the live-codex probe;
37
- // all filesystem/permission/symlink/ACL/EPERM readability + repair checks still run, so
38
- // the EPERM/tcc_possible/EACCES blockers still fire for unreadable configs
39
- // (codex_cli_config_eperm is probe-only and intentionally not exercised on this path).
40
34
  const probeCodex = opts.launchFast === true ? false : opts.actualCodex !== false;
41
35
  const readonly = await runParallelPreflight([
42
36
  { id: 'codex_config_readability', run: () => inspectCodexConfigReadability(root, { ...opts, codexProbe: probeCodex, actualCodex: probeCodex, writeReport: false }) },
43
37
  { id: 'codex_project_config_policy', run: () => splitCodexProjectConfigPolicy(root, { ...opts, writeReport: false }) },
44
38
  { id: 'codex_lb_tool_output_recovery', run: () => inspectCodexLbToolOutputRecoveryForLaunch(opts) }
45
39
  ]);
46
- // A failed read-only preflight must not invoke the full repair inspector unless
47
- // the operator explicitly requested repair. The repair path re-runs readability
48
- // before and after its work; on macOS ACL/TCC failures those repeated 5s probes
49
- // used to compound into minute-scale `sks --mad` startup delays even though no
50
- // mutation was authorized. Keep the blocker from the first pass and fail fast.
51
40
  const repair = opts.fix === true
52
41
  ? await repairCodexConfigEperm(root, { ...opts, codexProbe: probeCodex, actualCodex: probeCodex, fix: true, writeReport: false })
53
42
  : null;
@@ -4,7 +4,6 @@ import { codexLbMetrics, readCodexLbCircuit } from '../codex-lb-circuit.js';
4
4
  import { imageVoxelSummary } from '../wiki-image/image-voxel-ledger.js';
5
5
  import { wrongnessProofEvidence } from '../triwiki-wrongness/wrongness-proof-linker.js';
6
6
  export async function collectProofEvidence(root = packageRoot()) {
7
- /* intentional: each field below is optional supplementary evidence for the proof report — a missing/unreadable source just omits that field rather than failing the whole collection */
8
7
  return {
9
8
  files: await collectGitFileChanges(root),
10
9
  image_voxels: await imageVoxelSummary(root).catch(() => null),
@@ -23,7 +22,6 @@ export async function collectProofEvidence(root = packageRoot()) {
23
22
  };
24
23
  }
25
24
  async function collectGitFileChanges(root) {
26
- /* intentional: git absent or the status call failing just means no file-change evidence is available, not a collection error */
27
25
  const git = await which('git').catch(() => null);
28
26
  if (!git)
29
27
  return [];
@@ -30,7 +30,6 @@ export async function finalizeRouteWithProof(root, { missionId, route, gateFile
30
30
  status: 'not_collected',
31
31
  reason: err?.message || String(err || 'unknown_error')
32
32
  }));
33
- /* intentional: optional report-enrichment evidence — a read failure here degrades the report, it doesn't invalidate the route decision */
34
33
  const agentEvidence = agents === false ? null : await readAgentProofEvidence(root, missionId).catch(() => null);
35
34
  const wrongnessEvidence = lightweightEvidence ? null : await wrongnessProofEvidence(root, missionId, { route: policy.route }).catch(() => null);
36
35
  const requiresNativeComputerUseLiveEvidence = ['$Computer-Use', '$CU'].includes(String(policy.route || ''));
@@ -26,11 +26,6 @@ export async function writeSelftestRouteProof(root, { missionId, route = '$Narut
26
26
  return writeRouteCompletionProof(root, {
27
27
  missionId,
28
28
  route,
29
- // This fixture writes into a scratch temp directory (see selftestCommand's
30
- // `tmpdir('sks-selftest-')`) that is discarded after the call returns, so trust
31
- // artifacts and post-route retention are pointless here. The production
32
- // post-route path now skips global temp sweeping, but this mock fixture still
33
- // avoids unnecessary trust/retention work before its caller removes the root.
34
29
  lightweightEvidence: true,
35
30
  status: 'mock_only',
36
31
  executionClass: 'mock_fixture',
@@ -38,7 +38,6 @@ export async function runGlmBenchmark(root, args = [], deps = {}) {
38
38
  await fsp.mkdir(benchDir, { recursive: true });
39
39
  const sharedFixture = await createGlmBenchFixture();
40
40
  const cases = [];
41
- // Direct GLM case — does NOT call runGlmNarutoMission
42
41
  const directFixture = await cloneFixture(sharedFixture, 'direct');
43
42
  const directCaseDir = path.join(benchDir, 'cases', 'direct-glm-speed');
44
43
  const directCase = await runGlmDirectBenchCase({
@@ -52,7 +51,6 @@ export async function runGlmBenchmark(root, args = [], deps = {}) {
52
51
  }, deps.runDirect ? { runDirect: deps.runDirect } : {});
53
52
  cases.push(directCase);
54
53
  await cleanupFixture(directFixture);
55
- // Naruto cases — each calls runGlmNarutoMission with different worker counts
56
54
  for (const workers of NARUTO_WORKER_COUNTS) {
57
55
  const narutoFixture = await cloneFixture(sharedFixture, `naruto-${workers}`);
58
56
  const caseDir = path.join(benchDir, 'cases', `glm-naruto-${workers}`);
@@ -8,16 +8,13 @@ export function encodeGlmRequestWithCache(input, cache = defaultEncodedRequestCa
8
8
  const stringify = 'request' in input && input.stringify ? input.stringify : JSON.stringify;
9
9
  const key = 'request' in input && input.cacheKeyParts ? digestRequestCacheKeyParts(input.cacheKeyParts) : digestRequestForCache(request);
10
10
  const hit = cache.get(key);
11
- // Fix 18.2: On cache hit, return stored body without JSON.stringify
12
11
  if (hit) {
13
12
  if (hit.bodyStored) {
14
13
  return { body: hit.body, entry: hit, cacheHit: true };
15
14
  }
16
- // Even for non-stored bodies, skip re-stringifying by computing from request
17
15
  const body = stringify(request);
18
16
  return { body, entry: hit, cacheHit: true };
19
17
  }
20
- // Cache miss: stringify once
21
18
  const body = stringify(request);
22
19
  if (containsSecretLikeContent(body)) {
23
20
  const entry = {
@@ -5,7 +5,6 @@ import { runGlmNarutoBench } from './glm-naruto-bench.js';
5
5
  import { stripGlmSlashModelArgs } from '../glm-profile-resolver.js';
6
6
  export async function glmNarutoCommand(args = []) {
7
7
  if (flag(args, '--bench')) {
8
- // --compare is an alias; the benchmark always compares direct vs Naruto.
9
8
  const result = await runGlmNarutoBench(process.cwd(), args);
10
9
  if (flag(args, '--json'))
11
10
  printJson(result);
@@ -138,7 +138,6 @@ export function validateWorkGraph(graph, isVerifyOnly) {
138
138
  const mutableCount = graph.mutable_shards.length;
139
139
  if (mutableCount === 0)
140
140
  return { ok: false, reason: 'glm_naruto_needs_target_path_context' };
141
- // Check ratio of mutable shards to total shards (excluding verification shards from the denominator)
142
141
  const totalWorkShards = graph.shards.filter(s => s.mutable || s.kind !== 'verification').length;
143
142
  const ratio = totalWorkShards > 0 ? mutableCount / totalWorkShards : 0;
144
143
  if (ratio < GLM_NARUTO_DEFAULTS.patch_worker_ratio) {
@@ -96,7 +96,6 @@ export async function runGlmNarutoMission(input) {
96
96
  }
97
97
  const healthTracker = createProviderHealthTracker();
98
98
  let traceState = createMissionTrace(missionId);
99
- // Wave 1: parallel patch candidate generation
100
99
  const poolResult = await runPatchWorkerPool({
101
100
  apiKey: key.key,
102
101
  missionId,
@@ -130,7 +129,6 @@ export async function runGlmNarutoMission(input) {
130
129
  let schedulerSummary = poolResult.schedulerSummary;
131
130
  const stageMetrics = [...poolResult.stageMetrics];
132
131
  const stageEvents = [...poolResult.stageEvents];
133
- // Repair wave if needed
134
132
  if (failedShardIds.length > 0 && repairWaves < GLM_NARUTO_LIMITS.max_repair_waves) {
135
133
  const repairPlan = planRepairWave({
136
134
  failedEnvelopes: envelopes.filter((e) => e.status === 'gate_failed'),
@@ -168,7 +166,6 @@ export async function runGlmNarutoMission(input) {
168
166
  failedShardIds = [...failedShardIds, ...repairPool.failedShardIds];
169
167
  }
170
168
  }
171
- // 4.0.9: Verifier wave — run parallel verifier workers over gate-passed candidates.
172
169
  let passedEnvelopes = envelopes.filter((e) => e.status === 'gate_passed');
173
170
  let verifierWaveRun = false;
174
171
  if (passedEnvelopes.length > 0 && !input.skipVerifier) {
@@ -222,7 +219,6 @@ export async function runGlmNarutoMission(input) {
222
219
  envelopes = envelopes.map((env) => enrichGlmNarutoCandidateRequirementCoverage({ envelope: env, ledger: requirementLedger }));
223
220
  passedEnvelopes = envelopes.filter((e) => e.status === 'gate_passed');
224
221
  const verifierWarnings = input.skipVerifier && passedEnvelopes.length > 0 ? ['verifier_skipped_by_flag'] : [];
225
- // Build conflict graph and merge plan
226
222
  const conflictMergeStartedMs = Date.now();
227
223
  const nodes = passedEnvelopes.map((env) => ({
228
224
  patch_id: env.worker_id,
@@ -267,7 +263,6 @@ export async function runGlmNarutoMission(input) {
267
263
  selectedPatchIds: preliminarySelectedPatchIds
268
264
  });
269
265
  const selectedPatchIds = requirementCoverageSummary.passed ? preliminarySelectedPatchIds : [];
270
- // Apply winning merge plan
271
266
  let appliedPatches = 0;
272
267
  let applyResult = null;
273
268
  let applyTransaction = null;
@@ -413,7 +408,6 @@ export async function runGlmNarutoMission(input) {
413
408
  parallelismWarnings: parallelismSummary.blockers
414
409
  });
415
410
  await writeGlmNarutoCriticalPathArtifacts({ root: cwd, missionId, metrics: criticalPath }).catch(() => undefined);
416
- // 4.0.9: Write canonical stop-gate artifacts for hook resolution.
417
411
  await writeFinalStopGate({
418
412
  root: cwd,
419
413
  missionId,
@@ -52,7 +52,6 @@ export async function writeMissionArtifacts(input) {
52
52
  await writeJsonAtomic(path.join(dir, 'verification-summary.json'), sanitizeArtifact(input.verificationSummary));
53
53
  if (input.missionResult)
54
54
  await writeJsonAtomic(path.join(dir, 'mission-result.json'), sanitizeArtifact(input.missionResult));
55
- // 4.0.9: Write per-worker patch envelope / request-summary / stream-trace / gate-result artifacts.
56
55
  if (input.envelopes && input.envelopes.length > 0) {
57
56
  const workersDir = path.join(dir, 'workers');
58
57
  await ensureDir(workersDir);
@@ -78,7 +78,6 @@ export async function runPatchWorkerPool(input) {
78
78
  failedShardIds.push(result.value.trace.shard_id);
79
79
  }
80
80
  else {
81
- // rejected promise
82
81
  failedShardIds.push('unknown');
83
82
  }
84
83
  }
@@ -12,7 +12,6 @@ export async function removeWorktree(repoRoot, worktree) {
12
12
  await runGit(repoRoot, ['branch', '-D', worktree.branch]);
13
13
  }
14
14
  catch {
15
- // best-effort cleanup
16
15
  }
17
16
  }
18
17
  export async function applyPatchToWorktree(worktreePath, patch) {
@@ -115,7 +115,6 @@ export async function promptForOpenRouterKeyHidden() {
115
115
  const { stdin, stdout } = await import('node:process');
116
116
  const rl = readline.createInterface({ input: stdin, output: stdout, terminal: true });
117
117
  try {
118
- // Use muted input for hidden key entry
119
118
  let key = '';
120
119
  const escaped = stdout.isTTY
121
120
  ? await new Promise((resolve) => {
@@ -35,12 +35,10 @@ export async function sendOpenRouterChatCompletionStream(input) {
35
35
  const text = await response.text();
36
36
  return { ok: false, error: normalizeOpenRouterError(response.status, text) };
37
37
  }
38
- // Real streaming via ReadableStream reader
39
38
  if (response.body && typeof response.body.getReader === 'function') {
40
39
  const value = await readRealStream(response.body, started, input.idleTimeoutMs);
41
40
  return { ok: true, value: { ...value, request_cache_hit: encoded.cacheHit, request_body_sha256: encoded.entry.bodySha256 } };
42
41
  }
43
- // Fallback: non-streaming response
44
42
  const text = await response.text();
45
43
  const value = parseOpenRouterStreamText(text, started, false);
46
44
  return { ok: true, value: { ...value, request_cache_hit: encoded.cacheHit, request_body_sha256: encoded.entry.bodySha256 } };
@@ -220,7 +220,7 @@ export function inferAnswersForPrompt(prompt, explicitAnswers = {}) {
220
220
  .replace(/\s+/g, ' ')
221
221
  .trim();
222
222
  const version = String(text || '').match(/\bv?(\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?)\b/)?.[1] || null;
223
- const versionWork = /\b(?:versioning\s+bump|version\s+bump|bump\s+(?:the\s+)?version|publish:dry|npm\s+pack)\b/.test(lower)
223
+ const versionWork = /\b(?:versioning\s+bump|version\s+bump|bump\s+(?:the\s+)?version|npm\s+publish\s+--dry-run|npm\s+pack)\b/.test(lower)
224
224
  || /(?:버전|version)[^\n]{0,48}(?:올려|올리|상향|증가|bump|upgrade|publish|배포|출시)/.test(lower)
225
225
  || /(?:올려|올리|상향|증가|bump|upgrade|publish|배포|출시)[^\n]{0,48}(?:버전|version)/.test(lower)
226
226
  || /(?:릴리스|release)[^\n]{0,48}(?:준비|prepare|cut|ship|publish)/.test(lower)
@@ -269,7 +269,7 @@ export function inferAnswersForPrompt(prompt, explicitAnswers = {}) {
269
269
  install: 'SKS 최초 설치와 bootstrap을 한 번에 준비 상태까지 연결한다'
270
270
  };
271
271
  const criteria = {
272
- version: [version ? `version refs are ${version}` : 'version refs advance consistently', 'publish:dry gate passes', 'npm publish is not run'],
272
+ version: [version ? `version refs are ${version}` : 'version refs advance consistently', 'npm publish --dry-run gate passes', 'npm publish is not run'],
273
273
  chat_capture: ['From-Chat-IMG activates chat-image intake only here', 'all visible chat requirements are listed before implementation', `${FROM_CHAT_IMG_COVERAGE_ARTIFACT} maps every customer request, screenshot region, and attachment to work-order item(s)`, `${FROM_CHAT_IMG_CHECKLIST_ARTIFACT} is updated as each request, image match, work item, scoped QA-LOOP, and verification step is completed`, `${FROM_CHAT_IMG_TEMP_TRIWIKI_ARTIFACT} records temporary TriWiki-backed session context with retention metadata`, `${FROM_CHAT_IMG_QA_LOOP_ARTIFACT} proves QA-LOOP ran over the exact customer-request work-order range after implementation`, 'unresolved_items is empty before Naruto completion', 'scoped_qa_loop_completed is true with zero unresolved QA findings', 'Web/browser visual inspection uses Codex Chrome Extension readiness first; native Mac/non-web visual inspection uses Codex Computer Use when available', CODEX_WEB_VERIFICATION_POLICY, CODEX_COMPUTER_USE_ONLY_POLICY, 'client requests follow normal SKS gates and verification'],
274
274
  triwiki_audit: ['TriWiki ingestion, voxel attention, and contract consumption paths are inspected against current code', 'repeat-mistake prevention gaps are fixed in the relevant code path or blocked with evidence', 'regression coverage proves fresh/high-weight mistake memory can influence future missions', 'final status separates supported behavior from anything still unverified'],
275
275
  priority: ['strong feedback raises required_weight', 'request topics are counted in wiki packs', 'future inference uses priority signals'],
@@ -308,7 +308,7 @@ export function inferAnswersForPrompt(prompt, explicitAnswers = {}) {
308
308
  addInferred(inferred, notes, 'DEPENDENCY_CHANGE_ALLOWED', 'no', 'no-new-deps');
309
309
  if (!hasAnswer(explicitAnswers.TEST_SCOPE)) {
310
310
  const releaseLike = versionWork || installWork;
311
- addInferred(inferred, notes, 'TEST_SCOPE', releaseLike ? ['packcheck', 'selftest', 'sizecheck', 'publish:dry'] : ['focused relevant tests or documented justification'], 'tests');
311
+ addInferred(inferred, notes, 'TEST_SCOPE', releaseLike ? ['packcheck', 'selftest', 'sizecheck', 'npm publish --dry-run'] : ['focused relevant tests or documented justification'], 'tests');
312
312
  }
313
313
  if (!hasAnswer(explicitAnswers.MID_RUN_UNKNOWN_POLICY)) {
314
314
  addInferred(inferred, notes, 'MID_RUN_UNKNOWN_POLICY', ['preserve_existing_behavior', 'smallest_reversible_change', 'defer_optional_scope', 'block_only_if_no_safe_path'], 'ladder');
@@ -9,7 +9,6 @@ export const FORBIDDEN_RECURSIVE_GATES = new Set([
9
9
  'publish:npm',
10
10
  'prepublishOnly'
11
11
  ]);
12
- // Gates that always run on a release check regardless of which files changed.
13
12
  export const ALWAYS_ON_GATES = new Set([
14
13
  'release:metadata',
15
14
  'release:readiness',
@@ -40,7 +39,6 @@ export const ALWAYS_ON_GATES = new Set([
40
39
  'release:provenance',
41
40
  'changelog:check'
42
41
  ]);
43
- // Gates that must never be skipped when planning for publish.
44
42
  export const REQUIRED_FOR_PUBLISH = new Set([
45
43
  'release:metadata',
46
44
  'architecture:guard',
@@ -86,7 +84,6 @@ function costFor(id) {
86
84
  }
87
85
  return 'hermetic';
88
86
  }
89
- /** Heuristic mapping from a gate id to the source globs that affect it. */
90
87
  export function affectedGlobsFor(id) {
91
88
  const prefix = id.split(':')[0];
92
89
  switch (prefix) {
@@ -163,7 +160,6 @@ export function buildGateManifest(gateIds) {
163
160
  gates.sort((a, b) => a.id.localeCompare(b.id));
164
161
  return { schema: GATE_MANIFEST_SCHEMA, gates };
165
162
  }
166
- /** Parity between the manifest and the actual release-gate set. */
167
163
  export function validateManifestParity(manifestGateIds, releaseGateIds) {
168
164
  const manifest = new Set(manifestGateIds);
169
165
  const release = new Set(releaseGateIds);
@@ -186,7 +182,6 @@ export function gateMatchesChange(entry, changedFiles) {
186
182
  const regexes = entry.affected_by.map(globToRegExp);
187
183
  return changedFiles.some((file) => regexes.some((re) => re.test(file)));
188
184
  }
189
- /** Select which gates to run given changed files. Always-on gates are always selected. */
190
185
  export function selectGates(gates, changedFiles, opts = {}) {
191
186
  const selected = [];
192
187
  const skipped = [];
@@ -1,2 +1,2 @@
1
- export const DEFAULT_MAX_PACK_BYTES = 2464 * 1024;
1
+ export const DEFAULT_MAX_PACK_BYTES = 2488 * 1024;
2
2
  export const DEFAULT_MAX_UNPACKED_BYTES = 11_141_120;
@@ -1,5 +1,6 @@
1
1
  import { spawn } from 'node:child_process';
2
2
  import path from 'node:path';
3
+ import { performance } from 'node:perf_hooks';
3
4
  import { cleanupReleaseGateHermeticEnv, createReleaseGateHermeticEnv } from './release-gate-hermetic-env.js';
4
5
  import { writeReleaseGateJson } from './release-gate-report.js';
5
6
  import { guardedProcessKill, guardContextForRoute } from '../safety/mutation-guard.js';
@@ -53,7 +54,7 @@ export async function runReleaseGateBatch(root, gates, input = {}) {
53
54
  };
54
55
  }
55
56
  function runOne(root, runId, reportRoot, gate) {
56
- const started = Date.now();
57
+ const started = performance.now();
57
58
  const hermetic = createReleaseGateHermeticEnv({ root, runId, gate, reportRoot });
58
59
  return new Promise((resolve) => {
59
60
  const child = spawn(gate.command, { cwd: root, shell: true, env: hermetic.env, stdio: ['ignore', 'ignore', 'ignore'], detached: process.platform !== 'win32' });
@@ -70,7 +71,15 @@ function runOne(root, runId, reportRoot, gate) {
70
71
  if (timeoutCleanup)
71
72
  await timeoutCleanup;
72
73
  const exitCode = timedOut ? 124 : code;
73
- const result = { id: gate.id, ok: exitCode === 0, exit_code: exitCode, signal, timed_out: timedOut, duration_ms: Date.now() - started, report_dir: hermetic.report_dir };
74
+ const result = {
75
+ id: gate.id,
76
+ ok: exitCode === 0,
77
+ exit_code: exitCode,
78
+ signal,
79
+ timed_out: timedOut,
80
+ duration_ms: Math.max(1, Math.round(performance.now() - started)),
81
+ report_dir: hermetic.report_dir
82
+ };
74
83
  cleanupReleaseGateHermeticEnv(hermetic);
75
84
  resolve(result);
76
85
  })();
@@ -13,8 +13,6 @@ export function releaseGateCacheFile(root) {
13
13
  export function releaseGateProofBankFile(root) {
14
14
  return path.join(root, '.sneakoscope', 'proof-bank', 'gates', 'cache-v2.json');
15
15
  }
16
- // Keep behavior gates reusable across pure version bumps; proof/version gates remain uncached.
17
- // Set SKS_RELEASE_CACHE_VERSION_SENSITIVE=1 to restore version-sensitive hashing.
18
16
  const VERSION_NEUTRAL_CACHE_FILES = new Set([
19
17
  'package.json',
20
18
  'package-lock.json',
@@ -39,8 +37,6 @@ export function releaseGateCacheKey(root, gate) {
39
37
  hash.update(JSON.stringify(gate.preset || []));
40
38
  hashFileIfPresent(hash, path.join(root, 'release-gates.v2.json'));
41
39
  if (versionSensitive || !gate.cache.inputs.length) {
42
- // No declared inputs (or explicitly version-sensitive mode): fall back to
43
- // the conservative global digests so such a gate cannot cache-hit forever.
44
40
  hashFileIfPresent(hash, path.join(root, 'package.json'));
45
41
  hashFileIfPresent(hash, path.join(root, 'dist', 'build-manifest.json'));
46
42
  }
@@ -26,14 +26,9 @@ export function createReleaseGateHermeticEnv(input) {
26
26
  XDG_CACHE_HOME: cacheHome,
27
27
  SKS_DISABLE_REAL_MODEL_CALLS: input.gate.preset.includes('real-check') ? process.env.SKS_DISABLE_REAL_MODEL_CALLS || '0' : '1',
28
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
29
  SKS_SKIP_SKS_MENUBAR_LAUNCH: '1'
32
30
  };
33
31
  if (input.gate.id === 'migration:current-surface-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
32
  delete gateEnv.SKS_UPDATE_MIGRATION_GATE_DISABLED;
38
33
  }
39
34
  else {
@@ -1,8 +1,6 @@
1
1
  import { nowIso } from './fsx.js';
2
2
  import { RELEASE_GATE_CONTRACT_IDS, releaseGateContractSnapshot } from './release/release-gate-contract.js';
3
3
  export const RELEASE_PARALLEL_FULL_COVERAGE_SCHEMA = 'sks.release-parallel-full-coverage.v2';
4
- // Compatibility export: the independent, versioned contract is now the full
5
- // release preset, not a self-authorizing critical subset.
6
4
  export const RELEASE_DAG_CRITICAL_GATES = RELEASE_GATE_CONTRACT_IDS;
7
5
  export function evaluateReleaseParallelFullCoverage(currentGateIds) {
8
6
  const raw = currentGateIds.map(String).filter(Boolean);
@@ -332,9 +332,6 @@ export function buildSshWorkerArgs(machine, projectRoot, projectId) {
332
332
  ];
333
333
  }
334
334
  function isSshRemoteCommandSafePath(value) {
335
- // OpenSSH joins arguments after the host into one command interpreted by the
336
- // remote login shell. Restrict the unquoted dynamic path to shell-neutral
337
- // ASCII bytes so it remains exactly one argument after that serialization.
338
335
  return SSH_REMOTE_COMMAND_SAFE_PATH_RE.test(value);
339
336
  }
340
337
  export function validateSshHostKeyPolicy(configText) {
@@ -262,8 +262,9 @@ async function runOfficialReviewCycle(input, cycle, maxThreads, reviewArtifacts)
262
262
  paths: researchReviewArtifacts(input.plan),
263
263
  description: reviewerTaskDescription(agent, cycle, reviewArtifacts.bundle_sha256)
264
264
  }));
265
+ const goal = reviewGoal(input, cycle, reviewArtifacts);
265
266
  const prompt = buildOfficialSubagentPrompt({
266
- goal: reviewGoal(input, cycle, reviewArtifacts),
267
+ goal,
267
268
  slices,
268
269
  maxThreads,
269
270
  requestedSubagents: slices.length,
@@ -279,6 +280,7 @@ async function runOfficialReviewCycle(input, cycle, maxThreads, reviewArtifacts)
279
280
  });
280
281
  const run = await runWorkflow(input, {
281
282
  root: input.root,
283
+ goal,
282
284
  prompt,
283
285
  requestedSubagents: slices.length,
284
286
  maxThreads,
@@ -364,8 +366,9 @@ async function runOfficialRevisionCycle(input, cycle, maxThreads, objectionIds)
364
366
  'Your thread outcome summary must itself be JSON: {"schema":"sks.research-revision-outcome.v1","status":"revised|blocked","addressed_objection_ids":[],"changed_artifacts":[],"remaining_blockers":[]}.'
365
367
  ].join(' ')
366
368
  };
369
+ const goal = `Revise the Research manuscript in .sneakoscope/missions/${input.plan?.mission_id || ''}/ using review cycle ${cycle}. Preserve source IDs and falsifiability; never claim guaranteed genius, novelty, breakthrough, or publication acceptance.`;
367
370
  const prompt = buildOfficialSubagentPrompt({
368
- goal: `Revise the Research manuscript in .sneakoscope/missions/${input.plan?.mission_id || ''}/ using review cycle ${cycle}. Preserve source IDs and falsifiability; never claim guaranteed genius, novelty, breakthrough, or publication acceptance.`,
371
+ goal,
369
372
  slices: [slice],
370
373
  maxThreads: Math.min(1, maxThreads),
371
374
  requestedSubagents: 1,
@@ -380,6 +383,7 @@ async function runOfficialRevisionCycle(input, cycle, maxThreads, objectionIds)
380
383
  });
381
384
  const run = await runWorkflow(input, {
382
385
  root: input.root,
386
+ goal,
383
387
  prompt,
384
388
  requestedSubagents: 1,
385
389
  maxThreads: 1,
@@ -21,15 +21,6 @@ export function shouldRetryResponsesError(input, policy = DEFAULT_RESPONSES_RETR
21
21
  return true;
22
22
  return false;
23
23
  }
24
- /**
25
- * Run an async operation under the centralized responses retry policy with
26
- * exponential backoff. The operation returns a classification `{ status, code }`
27
- * (HTTP status and/or error code) alongside its `value`; the wrapper retries
28
- * only on policy-retryable statuses/codes (429, 5xx, timeouts, transient
29
- * network errors), records a structured retry log, and otherwise returns the
30
- * last value. A thrown error is classified via `classifyError` (default: read
31
- * `err.code`) and retried the same way; the final attempt re-throws.
32
- */
33
24
  export async function withResponsesRetry(operation, opts = {}) {
34
25
  const policy = opts.policy || DEFAULT_RESPONSES_RETRY_POLICY;
35
26
  const sleep = opts.sleep || ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
@@ -63,6 +54,5 @@ export async function withResponsesRetry(operation, opts = {}) {
63
54
  }
64
55
  if (lastError)
65
56
  throw lastError;
66
- // Exhausted retries on a retryable status without throwing: surface the last attempt.
67
57
  throw new Error('responses_retry_exhausted');
68
58
  }
@@ -957,9 +957,6 @@ async function pruneTerminalSessionRuntimeHomes(root, policy, dryRun, actions, o
957
957
  for (const dir of await collectRuntimeHomeDirs(mission.path)) {
958
958
  if (!isWithin(mission.path, dir))
959
959
  continue;
960
- // A current/recent mission can contain a blocked or failed worker that is
961
- // still resumable. Never delete its runtime home during a general sweep;
962
- // only an explicit after-route cleanup (or explicit override) may do so.
963
960
  if (active && !activeRouteTarget && opts.allowActiveMissionCleanup !== true)
964
961
  continue;
965
962
  const evidence = await runtimeHomeSessionEvidence(dir);
@@ -1217,10 +1214,6 @@ export async function sweepSksTempDirs(root, opts = {}) {
1217
1214
  const projectHash = sha256(realRoot).slice(0, 12);
1218
1215
  const roots = [
1219
1216
  { base: path.join(os.tmpdir(), 'sks-gate'), external: true, shared: true },
1220
- // `managedSksTmpRoot()` is an explicit SKS-owned namespace. Its children
1221
- // are intentionally named by feature prefixes (not by project hash), so
1222
- // ownership, symlink and descendant-activity checks below are the safety
1223
- // boundary for every child in this root.
1224
1217
  { base: managedSksTmpRoot(), external: true, shared: false, canonicalLeaseCleanup: true },
1225
1218
  { base: path.join(os.tmpdir(), `sks-${projectHash}`), external: true, shared: false },
1226
1219
  { base: path.join(root, '.sneakoscope', 'tmp'), external: false, shared: false }
@@ -44,7 +44,4 @@ export const RECOMMENDED_SKILLS = [
44
44
  'sks-reflection',
45
45
  'sks-honest-mode'
46
46
  ];
47
- // Route-level effort names are scheduling intents, not model compatibility
48
- // claims. Actual per-model options come from Codex runtime metadata; SKS never
49
- // derives them from a model slug.
50
47
  export const ALLOWED_REASONING_EFFORTS = new Set(['low', 'medium', 'high', 'xhigh', 'max', 'ultra']);