sneakoscope 4.8.6 → 5.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 (390) hide show
  1. package/README.md +51 -726
  2. package/bench/tasks/t01-off-by-one/repo/package.json +9 -0
  3. package/bench/tasks/t01-off-by-one/repo/src/pagination.js +5 -0
  4. package/bench/tasks/t01-off-by-one/repo/test.js +5 -0
  5. package/bench/tasks/t01-off-by-one/task.json +13 -0
  6. package/bench/tasks/t02-signature-cochange/repo/package.json +9 -0
  7. package/bench/tasks/t02-signature-cochange/repo/src/admin.js +5 -0
  8. package/bench/tasks/t02-signature-cochange/repo/src/audit.js +5 -0
  9. package/bench/tasks/t02-signature-cochange/repo/src/labels.js +3 -0
  10. package/bench/tasks/t02-signature-cochange/repo/src/profile.js +5 -0
  11. package/bench/tasks/t02-signature-cochange/repo/test.js +9 -0
  12. package/bench/tasks/t02-signature-cochange/task.json +12 -0
  13. package/bench/tasks/t03-type-puzzle/repo/package.json +9 -0
  14. package/bench/tasks/t03-type-puzzle/repo/src/config.js +4 -0
  15. package/bench/tasks/t03-type-puzzle/repo/test.js +6 -0
  16. package/bench/tasks/t03-type-puzzle/task.json +13 -0
  17. package/bench/tasks/t04-refactor-preserve/repo/package.json +9 -0
  18. package/bench/tasks/t04-refactor-preserve/repo/src/cart.js +8 -0
  19. package/bench/tasks/t04-refactor-preserve/repo/test.js +4 -0
  20. package/bench/tasks/t04-refactor-preserve/task.json +12 -0
  21. package/bench/tasks/t05-performance/repo/package.json +9 -0
  22. package/bench/tasks/t05-performance/repo/src/pairs.js +9 -0
  23. package/bench/tasks/t05-performance/repo/test.js +11 -0
  24. package/bench/tasks/t05-performance/task.json +12 -0
  25. package/bench/tasks/t06-mistake-rule/repo/package.json +9 -0
  26. package/bench/tasks/t06-mistake-rule/repo/src/loader.js +6 -0
  27. package/bench/tasks/t06-mistake-rule/repo/test.js +7 -0
  28. package/bench/tasks/t06-mistake-rule/task.json +12 -0
  29. package/config/bench-baseline.json +7 -0
  30. package/crates/sks-core/Cargo.lock +1 -1
  31. package/crates/sks-core/Cargo.toml +1 -1
  32. package/crates/sks-core/src/main.rs +1 -1
  33. package/dist/bin/install.js +35 -0
  34. package/dist/bin/sks.js +1 -1
  35. package/dist/cli/cli-theme.js +51 -0
  36. package/dist/cli/command-registry.js +75 -42
  37. package/dist/cli/help-fast.js +18 -8
  38. package/dist/cli/insane-search-command.js +36 -8
  39. package/dist/cli/install-helpers.js +147 -47
  40. package/dist/cli/router.js +58 -2
  41. package/dist/commands/codex-lb.js +6 -4
  42. package/dist/commands/doctor.js +146 -8
  43. package/dist/commands/proof.js +6 -3
  44. package/dist/commands/zellij-monitor-pane.js +25 -0
  45. package/dist/commands/zellij-slot-pane.js +39 -2
  46. package/dist/commands/zellij-viewport-pane.js +56 -0
  47. package/dist/commands/zellij.js +55 -2
  48. package/dist/config/skills-manifest.json +493 -0
  49. package/dist/core/agents/agent-conflict-graph.js +5 -0
  50. package/dist/core/agents/agent-lease.js +5 -0
  51. package/dist/core/agents/agent-ledger-schemas.js +1 -0
  52. package/dist/core/agents/agent-lifecycle.js +86 -35
  53. package/dist/core/agents/agent-orchestrator.js +287 -72
  54. package/dist/core/agents/agent-output-validator.js +14 -3
  55. package/dist/core/agents/agent-patch-queue-store.js +108 -4
  56. package/dist/core/agents/agent-patch-queue.js +10 -3
  57. package/dist/core/agents/agent-patch-schema.js +13 -0
  58. package/dist/core/agents/agent-proof-evidence.js +6 -1
  59. package/dist/core/agents/agent-runner-fake.js +40 -0
  60. package/dist/core/agents/agent-scheduler.js +2 -3
  61. package/dist/core/agents/agent-worker-pipeline.js +36 -2
  62. package/dist/core/agents/codex-exec-worker-adapter.js +2 -0
  63. package/dist/core/agents/native-cli-session-swarm.js +30 -13
  64. package/dist/core/agents/native-cli-worker.js +2 -1
  65. package/dist/core/agents/native-worker-backend-router.js +58 -1
  66. package/dist/core/auto-review.js +25 -4
  67. package/dist/core/codex/agent-config-file-repair.js +15 -2
  68. package/dist/core/codex/codex-config-eperm-repair.js +8 -2
  69. package/dist/core/codex/codex-config-guard.js +289 -0
  70. package/dist/core/codex/codex-config-toml.js +122 -0
  71. package/dist/core/codex/codex-project-config-policy.js +59 -7
  72. package/dist/core/codex-app/sks-menubar.js +780 -122
  73. package/dist/core/codex-app.js +1 -0
  74. package/dist/core/codex-control/codex-fake-sdk-adapter.js +6 -4
  75. package/dist/core/codex-control/codex-sdk-config-policy.js +2 -1
  76. package/dist/core/codex-control/codex-sdk-env-policy.js +1 -1
  77. package/dist/core/codex-control/codex-task-runner.js +32 -14
  78. package/dist/core/codex-control/python-codex-sdk-adapter.js +4 -1
  79. package/dist/core/codex-control/schemas/agent-worker-result.schema.js +12 -3
  80. package/dist/core/codex-hooks/codex-hook-managed-install.js +5 -0
  81. package/dist/core/codex-hooks/codex-hook-state-writer.js +70 -11
  82. package/dist/core/codex-hooks/codex-hook-trust-doctor.js +2 -2
  83. package/dist/core/codex-lb/codex-lb-env.js +20 -1
  84. package/dist/core/codex-lb/codex-lb-setup.js +2 -5
  85. package/dist/core/codex-native/skill-registry-ledger.js +24 -5
  86. package/dist/core/commands/basic-cli.js +21 -2
  87. package/dist/core/commands/check-command.js +37 -5
  88. package/dist/core/commands/command-utils.js +22 -2
  89. package/dist/core/commands/computer-use-command.js +62 -7
  90. package/dist/core/commands/db-command.js +31 -5
  91. package/dist/core/commands/fast-mode-command.js +39 -11
  92. package/dist/core/commands/gate-result-contract.js +43 -0
  93. package/dist/core/commands/gates-command.js +6 -1
  94. package/dist/core/commands/gc-command.js +29 -2
  95. package/dist/core/commands/goal-command.js +9 -2
  96. package/dist/core/commands/gx-command.js +79 -7
  97. package/dist/core/commands/image-ux-review-command.js +188 -13
  98. package/dist/core/commands/mad-db-command.js +85 -176
  99. package/dist/core/commands/mad-sks-command.js +248 -34
  100. package/dist/core/commands/menubar-command.js +146 -0
  101. package/dist/core/commands/naruto-command.js +64 -10
  102. package/dist/core/commands/pipeline-command.js +21 -2
  103. package/dist/core/commands/plan-command.js +76 -0
  104. package/dist/core/commands/ppt-command.js +159 -24
  105. package/dist/core/commands/qa-loop-command.js +6 -2
  106. package/dist/core/commands/release-command.js +55 -2
  107. package/dist/core/commands/research-command.js +1 -1
  108. package/dist/core/commands/review-command.js +217 -0
  109. package/dist/core/commands/route-command.js +62 -0
  110. package/dist/core/commands/route-success-helpers.js +59 -0
  111. package/dist/core/commands/run-command.js +19 -7
  112. package/dist/core/commands/seo-command.js +49 -1
  113. package/dist/core/commands/status-command.js +21 -1
  114. package/dist/core/commands/team-legacy-observe-command.js +221 -3
  115. package/dist/core/commands/ui-command.js +161 -0
  116. package/dist/core/commands/uninstall-command.js +312 -0
  117. package/dist/core/db-safety.js +7 -3
  118. package/dist/core/doctor/codex-startup-config-repair.js +14 -3
  119. package/dist/core/doctor/confirm-repair.js +27 -0
  120. package/dist/core/doctor/context7-mcp-repair.js +35 -7
  121. package/dist/core/doctor/doctor-codex-startup-repair.js +10 -3
  122. package/dist/core/doctor/doctor-context7-repair.js +17 -4
  123. package/dist/core/doctor/doctor-dirty-planner.js +27 -9
  124. package/dist/core/doctor/doctor-native-capability-repair.js +12 -2
  125. package/dist/core/doctor/doctor-readiness-matrix.js +27 -2
  126. package/dist/core/doctor/doctor-repair-postcheck.js +4 -0
  127. package/dist/core/doctor/doctor-transaction.js +21 -5
  128. package/dist/core/doctor/doctor-zellij-repair.js +1 -0
  129. package/dist/core/doctor/imagegen-repair.js +161 -0
  130. package/dist/core/doctor/supabase-mcp-repair.js +23 -5
  131. package/dist/core/feature-fixture-runner.js +2 -2
  132. package/dist/core/feature-fixtures.js +65 -37
  133. package/dist/core/feature-registry.js +106 -3
  134. package/dist/core/fsx.js +91 -2
  135. package/dist/core/hooks-runtime/skill-reconcile-preflight.js +43 -0
  136. package/dist/core/hooks-runtime.js +86 -46
  137. package/dist/core/image-ux-review/imagegen-adapter.js +48 -11
  138. package/dist/core/image-ux-review.js +16 -0
  139. package/dist/core/imagegen/imagegen-capability.js +11 -5
  140. package/dist/core/imagegen/require-imagegen.js +57 -0
  141. package/dist/core/init/skills.js +271 -14
  142. package/dist/core/init.js +13 -10
  143. package/dist/core/mad-db/mad-db-coordinator.js +96 -20
  144. package/dist/core/mad-db/mad-db-policy.js +12 -10
  145. package/dist/core/mad-sks/executors/executor-base.js +8 -2
  146. package/dist/core/mad-sks/executors/index.js +4 -0
  147. package/dist/core/mad-sks/executors/sql-plane-executor.js +194 -0
  148. package/dist/core/mission.js +138 -5
  149. package/dist/core/naruto/naruto-active-pool.js +84 -30
  150. package/dist/core/naruto/naruto-backpressure.js +5 -1
  151. package/dist/core/naruto/naruto-real-worker-child.js +10 -0
  152. package/dist/core/naruto/naruto-real-worker-runtime.js +9 -7
  153. package/dist/core/naruto/naruto-role-policy.js +3 -0
  154. package/dist/core/naruto/naruto-task-hints.js +10 -0
  155. package/dist/core/naruto/naruto-work-graph.js +8 -2
  156. package/dist/core/naruto/naruto-work-item.js +6 -0
  157. package/dist/core/naruto/resource-pressure-monitor.js +33 -15
  158. package/dist/core/naruto/solution-tournament.js +101 -0
  159. package/dist/core/permission-gates.js +30 -0
  160. package/dist/core/pipeline-internals/runtime-core.js +72 -222
  161. package/dist/core/pipeline-internals/runtime-gates.js +140 -24
  162. package/dist/core/ppt-review/index.js +6 -1
  163. package/dist/core/ppt-review/slide-imagegen-review.js +75 -10
  164. package/dist/core/ppt.js +70 -2
  165. package/dist/core/proof/auto-finalize.js +70 -11
  166. package/dist/core/proof/proof-schema.js +2 -0
  167. package/dist/core/proof/route-adapter.js +5 -1
  168. package/dist/core/proof/route-finalizer.js +8 -5
  169. package/dist/core/proof/selftest-proof-fixtures.js +18 -5
  170. package/dist/core/proof/validation.js +2 -0
  171. package/dist/core/provider/model-router.js +53 -0
  172. package/dist/core/questions.js +1 -1
  173. package/dist/core/recallpulse.js +1 -1
  174. package/dist/core/release/gate-manifest.js +2 -2
  175. package/dist/core/release/release-gate-affected-selector.js +3 -10
  176. package/dist/core/release/release-gate-batch-runner.js +4 -2
  177. package/dist/core/release/release-gate-cache-v2.js +27 -14
  178. package/dist/core/release/release-gate-dag.js +6 -1
  179. package/dist/core/release/release-gate-hermetic-env.js +10 -0
  180. package/dist/core/release/release-gate-node.js +3 -0
  181. package/dist/core/release/release-gate-resource-governor.js +1 -0
  182. package/dist/core/retention.js +89 -4
  183. package/dist/core/routes/constants.js +1 -1
  184. package/dist/core/routes/diagnostic-allowlist.js +55 -0
  185. package/dist/core/routes.js +83 -33
  186. package/dist/core/safety/mutation-guard.js +5 -1
  187. package/dist/core/skill-forge.js +9 -4
  188. package/dist/core/stop-gate/gate-evaluator.js +102 -0
  189. package/dist/core/stop-gate/stop-gate-check.js +26 -4
  190. package/dist/core/stop-gate/stop-gate-resolver.js +19 -3
  191. package/dist/core/stop-gate/stop-gate-writer.js +20 -1
  192. package/dist/core/team-dag.js +12 -465
  193. package/dist/core/team-dashboard-renderer.js +13 -94
  194. package/dist/core/team-live.js +68 -804
  195. package/dist/core/triwiki/agents-md-projector.js +184 -0
  196. package/dist/core/triwiki-wrongness/wrongness-schema.js +3 -1
  197. package/dist/core/trust-kernel/trust-kernel-schema.js +1 -0
  198. package/dist/core/trust-kernel/trust-report.js +1 -1
  199. package/dist/core/trust-kernel/trust-status.js +2 -0
  200. package/dist/core/ui/dashboard-html.js +111 -0
  201. package/dist/core/update/update-migration-state.js +383 -42
  202. package/dist/core/update-check.js +201 -78
  203. package/dist/core/verification/diff-quality.js +100 -0
  204. package/dist/core/verification/impact-scan.js +164 -0
  205. package/dist/core/verification/machine-feedback.js +146 -0
  206. package/dist/core/verification/mistake-rule-compiler.js +195 -0
  207. package/dist/core/version.js +1 -1
  208. package/dist/core/zellij/zellij-layout-builder.js +44 -16
  209. package/dist/core/zellij/zellij-monitor-renderer.js +53 -0
  210. package/dist/core/zellij/zellij-self-heal.js +27 -32
  211. package/dist/core/zellij/zellij-slot-pane-renderer.js +162 -153
  212. package/dist/core/zellij/zellij-slot-telemetry.js +2 -0
  213. package/dist/core/zellij/zellij-theme.js +67 -0
  214. package/dist/core/zellij/zellij-ui-mode.js +16 -0
  215. package/dist/core/zellij/zellij-viewport-binder.js +59 -0
  216. package/dist/core/zellij/zellij-worker-pane-manager.js +53 -5
  217. package/dist/scripts/agent-patch-swarm-gate-lib.js +2 -2
  218. package/dist/scripts/build-dist.js +8 -0
  219. package/dist/scripts/check-feature-quality.js +2 -2
  220. package/dist/scripts/cli-output-consistency-check.js +57 -0
  221. package/dist/scripts/codex-lb-fast-ui-preservation-check.js +106 -0
  222. package/dist/scripts/codex-lb-gpt55-fast-profile-check.js +105 -0
  223. package/dist/scripts/codex-lb-missing-env-regression.js +2 -3
  224. package/dist/scripts/codex-project-config-policy-merge-regression.js +3 -3
  225. package/dist/scripts/coding-bench-check.js +136 -0
  226. package/dist/scripts/concurrent-session-collision-check.js +67 -0
  227. package/dist/scripts/docs-truthfulness-check.js +1 -1
  228. package/dist/scripts/doctor-imagegen-repair-check.js +62 -0
  229. package/dist/scripts/ensure-bin-executable.js +11 -3
  230. package/dist/scripts/gate-policy-audit-check.js +130 -0
  231. package/dist/scripts/harness-benchmark-check.js +104 -0
  232. package/dist/scripts/hook-latency-budget-check.js +45 -0
  233. package/dist/scripts/legacy-update-e2e-check.js +228 -0
  234. package/dist/scripts/lib/codex-sdk-gate-lib.js +2 -2
  235. package/dist/scripts/lib/real-codex-parallel-gate.js +2 -2
  236. package/dist/scripts/loop-directive-check-lib.js +1 -1
  237. package/dist/scripts/mad-db-command-check.js +11 -8
  238. package/dist/scripts/mad-db-real-supabase-e2e.js +2 -2
  239. package/dist/scripts/mad-db-route-identity-check.js +8 -6
  240. package/dist/scripts/mad-db-safety-conflict-matrix-check.js +31 -8
  241. package/dist/scripts/mad-db-skill-policy-snapshot-check.js +4 -5
  242. package/dist/scripts/mad-sks-zellij-default-pane-worker-check.js +3 -2
  243. package/dist/scripts/mad-sks-zellij-launch-check.js +1 -1
  244. package/dist/scripts/naruto-zellij-dynamic-right-column-check.js +7 -7
  245. package/dist/scripts/parallel-claim-enforcement-check.js +14 -5
  246. package/dist/scripts/ppt-real-imagegen-wiring-check.js +5 -1
  247. package/dist/scripts/project-skill-dedupe-check.js +23 -5
  248. package/dist/scripts/proof-root-cause-policy-check.js +2 -0
  249. package/dist/scripts/release-affected-selector-check.js +2 -2
  250. package/dist/scripts/release-cache-glob-hashing-check.js +1 -0
  251. package/dist/scripts/release-dag-full-coverage-check.js +13 -4
  252. package/dist/scripts/release-gate-dag-runner-check.js +10 -2
  253. package/dist/scripts/release-gate-dag-runner.js +22 -0
  254. package/dist/scripts/release-gate-existence-audit.js +2 -1
  255. package/dist/scripts/release-gate-planner.js +2 -1
  256. package/dist/scripts/release-gate-script-parity-check.js +1 -1
  257. package/dist/scripts/release-metadata-1-19-check.js +2 -1
  258. package/dist/scripts/release-readiness-report.js +38 -7
  259. package/dist/scripts/release-stability-report-check.js +12 -8
  260. package/dist/scripts/search-visibility-gate-lib.js +2 -2
  261. package/dist/scripts/seo-geo-feature-fixture-quality-check.js +1 -1
  262. package/dist/scripts/skills-manifest-continuity-check.js +46 -0
  263. package/dist/scripts/sks-1-11-gate-lib.js +8 -6
  264. package/dist/scripts/sks-menubar-install-check.js +87 -21
  265. package/dist/scripts/sks-uninstall-regression-check.js +54 -0
  266. package/dist/scripts/uninstall-inventory-check.js +3 -0
  267. package/dist/scripts/ux-review-real-loop-fixture-check.js +9 -4
  268. package/dist/scripts/ux-review-run-wires-imagegen-check.js +4 -0
  269. package/dist/scripts/zellij-layout-valid-check.js +18 -11
  270. package/dist/scripts/zellij-right-column-geometry-proof.js +2 -4
  271. package/dist/scripts/zellij-slot-pane-renderer-check.js +9 -9
  272. package/dist/scripts/zellij-slot-pane-stale-detection-check.js +3 -4
  273. package/dist/scripts/zellij-slot-pane-telemetry-renderer-check.js +3 -2
  274. package/dist/scripts/zellij-slot-telemetry-renderer-check.js +4 -2
  275. package/dist/scripts/zellij-spawn-on-demand-layout-check.js +8 -2
  276. package/dist/scripts/zellij-viewport-binder-check.js +9 -0
  277. package/docs/assets/sneakoscope-architecture-pipeline.jpg +0 -0
  278. package/docs/demo.tape +28 -0
  279. package/package.json +70 -3
  280. package/schemas/codex/completion-proof.schema.json +3 -2
  281. package/schemas/release/release-gate-node.schema.json +2 -1
  282. package/dist/scripts/agent-backfill-route-blackbox.js +0 -5
  283. package/dist/scripts/agent-dynamic-pool-route-blackbox.js +0 -5
  284. package/dist/scripts/agent-parallel-write-blackbox.js +0 -56
  285. package/dist/scripts/agent-patch-swarm-route-blackbox.js +0 -10
  286. package/dist/scripts/agent-route-blackbox-lib.js +0 -132
  287. package/dist/scripts/blackbox-command-import-smoke.js +0 -143
  288. package/dist/scripts/blackbox-global-shim.js +0 -77
  289. package/dist/scripts/blackbox-matrix.js +0 -70
  290. package/dist/scripts/blackbox-npx-one-shot.js +0 -69
  291. package/dist/scripts/blackbox-pack-install.js +0 -174
  292. package/dist/scripts/brand-neutrality-zero-leakage-blackbox.js +0 -4
  293. package/dist/scripts/build-once-runner-blackbox.js +0 -34
  294. package/dist/scripts/codex-0140-integration-blackbox.js +0 -13
  295. package/dist/scripts/codex-agent-type-blackbox.js +0 -4
  296. package/dist/scripts/codex-app-harness-blackbox.js +0 -4
  297. package/dist/scripts/codex-app-skill-agent-blackbox.js +0 -4
  298. package/dist/scripts/codex-hook-approval-blackbox.js +0 -4
  299. package/dist/scripts/codex-init-deep-directory-local-blackbox.js +0 -4
  300. package/dist/scripts/codex-native-feature-broker-blackbox.js +0 -4
  301. package/dist/scripts/codex-native-pattern-analysis-blackbox.js +0 -4
  302. package/dist/scripts/codex-native-read-repair-split-blackbox.js +0 -55
  303. package/dist/scripts/codex-native-reference-cache-blackbox.js +0 -41
  304. package/dist/scripts/core-skill-integrity-blackbox.js +0 -33
  305. package/dist/scripts/dfix-fast-blackbox-check.js +0 -37
  306. package/dist/scripts/dfix-parallel-write-blackbox.js +0 -48
  307. package/dist/scripts/dfix-patch-swarm-route-blackbox.js +0 -10
  308. package/dist/scripts/doctor-context7-mcp-repair-blackbox.js +0 -16
  309. package/dist/scripts/doctor-dirty-repair-blackbox.js +0 -22
  310. package/dist/scripts/doctor-dirty-semantic-blackbox.js +0 -8
  311. package/dist/scripts/doctor-fix-production-blackbox.js +0 -26
  312. package/dist/scripts/doctor-native-capability-repair-blackbox.js +0 -39
  313. package/dist/scripts/doctor-startup-config-repair-blackbox.js +0 -13
  314. package/dist/scripts/doctor-supabase-mcp-repair-blackbox.js +0 -14
  315. package/dist/scripts/doctor-transaction-engine-blackbox.js +0 -28
  316. package/dist/scripts/doctor-zellij-fix-blackbox.js +0 -4
  317. package/dist/scripts/doctor-zellij-no-homebrew-blackbox.js +0 -4
  318. package/dist/scripts/doctor-zellij-upgrade-blackbox.js +0 -4
  319. package/dist/scripts/gate-pack-runner-blackbox.js +0 -27
  320. package/dist/scripts/gate-pack-v2-blackbox.js +0 -18
  321. package/dist/scripts/geo-cli-blackbox-check.js +0 -18
  322. package/dist/scripts/loop-collision-blackbox.js +0 -3
  323. package/dist/scripts/loop-concurrency-oversubscription-blackbox.js +0 -3
  324. package/dist/scripts/loop-fixture-production-misuse-blackbox.js +0 -3
  325. package/dist/scripts/loop-kill-interrupt-real-blackbox.js +0 -3
  326. package/dist/scripts/loop-merge-strategy-blackbox.js +0 -3
  327. package/dist/scripts/loop-mesh-production-e2e-blackbox.js +0 -3
  328. package/dist/scripts/loop-side-effect-blackbox.js +0 -3
  329. package/dist/scripts/mad-db-operation-lifecycle-blackbox.js +0 -29
  330. package/dist/scripts/mad-sks-actual-executor-blackbox.js +0 -5
  331. package/dist/scripts/mad-zellij-headless-fallback-blackbox.js +0 -4
  332. package/dist/scripts/mad-zellij-self-heal-blackbox.js +0 -4
  333. package/dist/scripts/naruto-loop-mesh-blackbox.js +0 -3
  334. package/dist/scripts/naruto-real-parallelism-blackbox.js +0 -307
  335. package/dist/scripts/naruto-worktree-coding-blackbox.js +0 -29
  336. package/dist/scripts/parallel-runtime-real-blackbox.js +0 -44
  337. package/dist/scripts/pipeline-codex-native-doctor-mad-routing-real-blackbox.js +0 -77
  338. package/dist/scripts/pipeline-codex-native-e2e-blackbox.js +0 -13
  339. package/dist/scripts/pipeline-codex-native-image-routing-real-blackbox.js +0 -50
  340. package/dist/scripts/pipeline-codex-native-loop-routing-real-blackbox.js +0 -74
  341. package/dist/scripts/pipeline-codex-native-qa-routing-real-blackbox.js +0 -51
  342. package/dist/scripts/pipeline-codex-native-research-routing-real-blackbox.js +0 -45
  343. package/dist/scripts/pipeline-execution-profile-routing-blackbox.js +0 -4
  344. package/dist/scripts/postinstall-global-doctor-blackbox.js +0 -12
  345. package/dist/scripts/ppt-full-e2e-blackbox-check.js +0 -109
  346. package/dist/scripts/ppt-imagegen-blackbox-check.js +0 -46
  347. package/dist/scripts/project-skill-dedupe-blackbox.js +0 -36
  348. package/dist/scripts/qa-backfill-route-blackbox.js +0 -5
  349. package/dist/scripts/qa-patch-swarm-route-blackbox.js +0 -10
  350. package/dist/scripts/release-full-parallelism-blackbox.js +0 -41
  351. package/dist/scripts/release-triwiki-first-runner-blackbox.js +0 -48
  352. package/dist/scripts/release-wiring-3110-blackbox.js +0 -27
  353. package/dist/scripts/release-wiring-3112-blackbox.js +0 -17
  354. package/dist/scripts/release-wiring-3113-blackbox.js +0 -17
  355. package/dist/scripts/research-backfill-route-blackbox.js +0 -5
  356. package/dist/scripts/research-final-reviewer-blackbox.js +0 -70
  357. package/dist/scripts/research-stage-cycle-runtime-blackbox.js +0 -40
  358. package/dist/scripts/research-synthesis-writer-blackbox.js +0 -24
  359. package/dist/scripts/route-blackbox-realism-check.js +0 -21
  360. package/dist/scripts/scheduler-resource-claim-blackbox.js +0 -24
  361. package/dist/scripts/seo-cli-blackbox-check.js +0 -18
  362. package/dist/scripts/sks-3110-all-feature-regression-blackbox.js +0 -116
  363. package/dist/scripts/sks-3112-all-feature-regression-blackbox.js +0 -29
  364. package/dist/scripts/sks-3113-all-feature-regression-blackbox.js +0 -17
  365. package/dist/scripts/sks-400-all-feature-regression-blackbox.js +0 -21
  366. package/dist/scripts/sks-400-extreme-parallel-blackbox.js +0 -8
  367. package/dist/scripts/sks-400-five-minute-blackbox.js +0 -9
  368. package/dist/scripts/sks-400-legacy-purge-blackbox.js +0 -8
  369. package/dist/scripts/sks-401-all-feature-regression-blackbox.js +0 -46
  370. package/dist/scripts/sks-401-five-minute-actual-blackbox.js +0 -23
  371. package/dist/scripts/sks-402-all-feature-regression-blackbox.js +0 -9
  372. package/dist/scripts/sks-402-five-minute-real-blackbox.js +0 -22
  373. package/dist/scripts/sksd-warm-cache-blackbox.js +0 -12
  374. package/dist/scripts/supabase-secret-preservation-blackbox.js +0 -29
  375. package/dist/scripts/team-backfill-route-blackbox.js +0 -5
  376. package/dist/scripts/team-parallel-write-blackbox.js +0 -55
  377. package/dist/scripts/team-patch-swarm-route-blackbox.js +0 -10
  378. package/dist/scripts/triwiki-affected-graph-blackbox.js +0 -28
  379. package/dist/scripts/triwiki-proof-bank-blackbox.js +0 -30
  380. package/dist/scripts/triwiki-proof-bank-lock-blackbox.js +0 -7
  381. package/dist/scripts/update-preserves-supabase-keys-blackbox.js +0 -27
  382. package/dist/scripts/ux-patch-swarm-route-blackbox.js +0 -10
  383. package/dist/scripts/ux-review-imagegen-blackbox-check.js +0 -67
  384. package/dist/scripts/zellij-initial-main-only-blackbox.js +0 -28
  385. package/dist/scripts/zellij-pane-lock-concurrency-blackbox.js +0 -80
  386. package/dist/scripts/zellij-pane-lock-open-worker-integration-blackbox.js +0 -137
  387. package/dist/scripts/zellij-self-heal-typed-blackbox.js +0 -4
  388. package/dist/scripts/zellij-slot-telemetry-real-blackbox.js +0 -20
  389. package/dist/scripts/zellij-stacked-fallback-integration-blackbox.js +0 -81
  390. package/dist/scripts/zellij-worker-pane-real-ui-blackbox.js +0 -202
@@ -1,70 +0,0 @@
1
- #!/usr/bin/env node
2
- // @ts-nocheck
3
- import fs from 'node:fs';
4
- import path from 'node:path';
5
- import { spawnSync } from 'node:child_process';
6
- const contract = process.argv.includes('--contract') || process.env.SKS_REAL_BLACKBOX_MATRIX === '0';
7
- const real = !contract;
8
- const root = process.cwd();
9
- const rows = [
10
- row('npm_pack_local_tarball', 'blackbox:pack-install', ['npm_pack']),
11
- row('temp_npm_install', 'blackbox:pack-install', ['npm_install_tarball']),
12
- row('npx_one_shot', 'blackbox:npx', ['npm_exec_one_shot_version', 'npm_exec_one_shot_root']),
13
- row('global_shim_temp_prefix', 'blackbox:global-shim', ['npm_install_global_prefix', 'global_shim_version']),
14
- row('fresh_home', 'blackbox:pack-install', ['npx_sks_root_json']),
15
- row('project_local_install', 'blackbox:pack-install', ['npx_sks_setup_local_only']),
16
- row('packed_run_execute', 'blackbox:pack-install', ['npx_sks_run_execute_mock']),
17
- row('no_git_repo_directory', 'blackbox:pack-install', ['npx_sks_root_json']),
18
- row('read_only_project_directory', 'blackbox:pack-install', ['npx_sks_root_json'], { optional: true }),
19
- row('path_with_spaces', 'blackbox:pack-install', ['npx_sks_root_json']),
20
- row('korean_unicode_path', 'blackbox:pack-install', ['npx_sks_root_json'])
21
- ];
22
- if (real) {
23
- for (const script of ['blackbox:pack-install', 'blackbox:npx', 'blackbox:global-shim']) {
24
- const result = spawnSync('npm', ['run', script, '--', '--json'], { cwd: root, encoding: 'utf8', stdio: 'pipe' });
25
- const parsed = parseJsonFromStdout(result.stdout);
26
- for (const item of rows.filter((entry) => entry.script === script)) {
27
- const labelsOk = item.required_step_labels.length
28
- ? item.required_step_labels.every((label) => parsed?.steps?.some((step) => step.label === label && step.ok))
29
- : result.status === 0;
30
- item.ok = item.optional ? true : (result.status === 0 && labelsOk);
31
- item.status = item.ok ? (item.optional && !labelsOk ? 'verified_partial' : 'verified') : 'blocked';
32
- item.stderr_tail = String(result.stderr || '').slice(-500);
33
- item.duration_ms = parsed?.steps?.filter((step) => item.required_step_labels.includes(step.label)).reduce((sum, step) => sum + Number(step.duration_ms || 0), 0) || null;
34
- }
35
- }
36
- }
37
- const report = {
38
- schema: 'sks.blackbox-matrix.v2',
39
- ok: rows.every((entry) => entry.ok),
40
- mode: real ? 'real' : 'contract',
41
- rows
42
- };
43
- const out = path.join(root, '.sneakoscope', 'reports', 'blackbox-matrix.json');
44
- fs.mkdirSync(path.dirname(out), { recursive: true });
45
- fs.writeFileSync(out, `${JSON.stringify(report, null, 2)}\n`);
46
- console.log(JSON.stringify({ ...report, report_path: out }, null, 2));
47
- if (!report.ok)
48
- process.exitCode = 1;
49
- function row(id, script, requiredStepLabels = [], extra = {}) {
50
- return {
51
- id,
52
- script,
53
- required_step_labels: requiredStepLabels,
54
- ok: !real,
55
- status: real ? 'pending' : 'verified_partial',
56
- command: script,
57
- note: real ? 'runs the selected package blackbox script in real mode' : 'contract quick mode; release gate uses real mode',
58
- ...extra
59
- };
60
- }
61
- function parseJsonFromStdout(stdout = '') {
62
- try {
63
- const start = String(stdout).indexOf('{');
64
- return start >= 0 ? JSON.parse(String(stdout).slice(start)) : null;
65
- }
66
- catch {
67
- return null;
68
- }
69
- }
70
- //# sourceMappingURL=blackbox-matrix.js.map
@@ -1,69 +0,0 @@
1
- #!/usr/bin/env node
2
- // @ts-nocheck
3
- import fs from 'node:fs';
4
- import os from 'node:os';
5
- import path from 'node:path';
6
- import { spawnSync } from 'node:child_process';
7
- import { fileURLToPath } from 'node:url';
8
- const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', '..');
9
- const json = process.argv.includes('--json');
10
- const dryRun = process.argv.includes('--dry-run');
11
- const keep = process.argv.includes('--keep');
12
- const npmBin = process.platform === 'win32' ? 'npm.cmd' : 'npm';
13
- const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-blackbox-npx-'));
14
- const cache = path.join(tmp, 'npm-cache');
15
- const prefix = path.join(tmp, 'prefix');
16
- const steps = [];
17
- function run(label, cmd, args, options = {}) {
18
- const result = dryRun
19
- ? { status: 0, signal: null, stdout: '', stderr: '' }
20
- : spawnSync(cmd, args, {
21
- cwd: options.cwd || root,
22
- encoding: 'utf8',
23
- timeout: options.timeout || 120_000,
24
- env: childNpmEnv(options.env)
25
- });
26
- const row = {
27
- label,
28
- command: [cmd, ...args].join(' '),
29
- cwd: options.cwd || root,
30
- status: result.status,
31
- ok: result.status === 0,
32
- stdout_bytes: Buffer.byteLength(result.stdout || ''),
33
- stderr_bytes: Buffer.byteLength(result.stderr || ''),
34
- stderr_tail: String(result.stderr || '').slice(-800)
35
- };
36
- steps.push(row);
37
- return { ...row, stdout: result.stdout || '', stderr: result.stderr || '' };
38
- }
39
- function childNpmEnv(extra = {}) {
40
- const env = { ...process.env, npm_config_cache: cache, npm_config_prefix: prefix, SKS_SKIP_NPM_FRESHNESS_CHECK: '1', CI: 'true', ...extra };
41
- delete env.npm_config_dry_run;
42
- delete env.NPM_CONFIG_DRY_RUN;
43
- return env;
44
- }
45
- let tarball = dryRun ? path.join(tmp, 'sneakoscope-0.0.0.tgz') : null;
46
- const pack = run('npm_pack', npmBin, ['pack', '--json', '--ignore-scripts', '--pack-destination', tmp, '--registry', 'https://registry.npmjs.org/']);
47
- if (pack.ok && !dryRun) {
48
- const info = JSON.parse(pack.stdout)[0];
49
- tarball = path.join(tmp, info.filename);
50
- }
51
- if (pack.ok)
52
- run('npm_exec_one_shot_version', npmBin, ['exec', '--yes', '--package', tarball, '--', 'sks', '--version'], { cwd: tmp });
53
- if (steps.at(-1)?.ok)
54
- run('npm_exec_one_shot_root', npmBin, ['exec', '--yes', '--package', tarball, '--', 'sks', 'root', '--json'], { cwd: tmp });
55
- if (steps.at(-1)?.ok)
56
- run('npm_exec_one_shot_selftest', npmBin, ['exec', '--yes', '--package', tarball, '--', 'sks', 'selftest', '--mock'], { cwd: tmp, timeout: 180_000 });
57
- if (!keep)
58
- fs.rmSync(tmp, { recursive: true, force: true });
59
- const result = { schema: 'sks.blackbox-npx-one-shot.v1', ok: steps.every((step) => step.ok), dry_run: dryRun, temp_root: keep ? tmp : null, steps };
60
- if (json)
61
- console.log(JSON.stringify(result, null, 2));
62
- else {
63
- console.log(`Blackbox npx one-shot: ${result.ok ? 'ok' : 'blocked'}${dryRun ? ' (dry-run)' : ''}`);
64
- for (const step of steps)
65
- console.log(`- ${step.ok ? 'ok' : 'blocked'} ${step.label}`);
66
- }
67
- if (!result.ok)
68
- process.exitCode = 1;
69
- //# sourceMappingURL=blackbox-npx-one-shot.js.map
@@ -1,174 +0,0 @@
1
- #!/usr/bin/env node
2
- // @ts-nocheck
3
- import fs from 'node:fs';
4
- import os from 'node:os';
5
- import path from 'node:path';
6
- import { spawnSync } from 'node:child_process';
7
- import { fileURLToPath } from 'node:url';
8
- const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', '..');
9
- const json = process.argv.includes('--json');
10
- const dryRun = process.argv.includes('--dry-run');
11
- const keep = process.argv.includes('--keep');
12
- const npmBin = process.platform === 'win32' ? 'npm.cmd' : 'npm';
13
- const npxBin = process.platform === 'win32' ? 'npx.cmd' : 'npx';
14
- const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-blackbox-pack-install-'));
15
- const cache = path.join(tmp, 'npm-cache');
16
- const prefix = path.join(tmp, 'prefix');
17
- const consumer = path.join(tmp, 'consumer');
18
- fs.mkdirSync(consumer, { recursive: true });
19
- fs.writeFileSync(path.join(consumer, 'package.json'), `${JSON.stringify({ name: 'sks-blackbox-consumer', private: true, version: '0.0.0' }, null, 2)}\n`);
20
- const steps = [];
21
- function spawnStep(label, cmd, args, options = {}) {
22
- const result = dryRun
23
- ? { status: 0, signal: null, stdout: '', stderr: '' }
24
- : spawnSync(cmd, args, {
25
- cwd: options.cwd || root,
26
- encoding: 'utf8',
27
- timeout: options.timeout || 120_000,
28
- env: childNpmEnv(options.env)
29
- });
30
- return {
31
- label,
32
- command: [cmd, ...args].join(' '),
33
- cwd: options.cwd || root,
34
- status: result.status,
35
- ok: result.status === 0,
36
- stdout_bytes: Buffer.byteLength(result.stdout || ''),
37
- stderr_bytes: Buffer.byteLength(result.stderr || ''),
38
- stdout_tail: String(result.stdout || '').slice(-800),
39
- stderr_tail: String(result.stderr || '').slice(-800),
40
- stdout: result.stdout || '',
41
- stderr: result.stderr || ''
42
- };
43
- }
44
- function childNpmEnv(extra = {}) {
45
- const env = { ...process.env, npm_config_cache: cache, npm_config_prefix: prefix, SKS_SKIP_NPM_FRESHNESS_CHECK: '1', CI: 'true', ...extra };
46
- delete env.npm_config_dry_run;
47
- delete env.NPM_CONFIG_DRY_RUN;
48
- return env;
49
- }
50
- function run(label, cmd, args, options = {}) {
51
- const row = spawnStep(label, cmd, args, options);
52
- steps.push(recordStep(row));
53
- return row;
54
- }
55
- function runWithRetry(label, cmd, args, options = {}) {
56
- const attempts = Math.max(1, Number(options.attempts || 2));
57
- const attemptRows = [];
58
- for (let index = 0; index < attempts; index += 1) {
59
- if (index > 0)
60
- cleanupInstallAttempt(options.cwd || root);
61
- const row = spawnStep(label, cmd, args, options);
62
- attemptRows.push(row);
63
- if (row.ok || dryRun) {
64
- const final = { ...row, label, attempts: index + 1, retry_count: index, attempts_log: attemptRows.map(compactAttempt) };
65
- steps.push(recordStep(final));
66
- return final;
67
- }
68
- }
69
- const last = attemptRows.at(-1);
70
- const final = { ...last, label, attempts, retry_count: attempts - 1, attempts_log: attemptRows.map(compactAttempt) };
71
- steps.push(recordStep(final));
72
- return final;
73
- }
74
- function recordStep(row) {
75
- const { stdout, stderr, ...recorded } = row;
76
- return recorded;
77
- }
78
- function compactAttempt(row) {
79
- return {
80
- status: row.status,
81
- ok: row.ok,
82
- stdout_bytes: row.stdout_bytes,
83
- stderr_bytes: row.stderr_bytes,
84
- stdout_tail: row.stdout_tail,
85
- stderr_tail: row.stderr_tail
86
- };
87
- }
88
- function cleanupInstallAttempt(cwd) {
89
- if (dryRun)
90
- return;
91
- for (const rel of ['node_modules', 'package-lock.json']) {
92
- fs.rmSync(path.join(cwd, rel), { recursive: true, force: true });
93
- }
94
- }
95
- let tarball = dryRun ? path.join(tmp, 'sneakoscope-0.0.0.tgz') : null;
96
- const pack = run('npm_pack', npmBin, ['pack', '--json', '--ignore-scripts', '--pack-destination', tmp, '--registry', 'https://registry.npmjs.org/']);
97
- if (pack.ok && !dryRun) {
98
- const info = JSON.parse(pack.stdout || '[]')[0];
99
- tarball = path.join(tmp, info.filename);
100
- }
101
- if (pack.ok)
102
- runWithRetry('npm_install_tarball', npmBin, ['install', '--no-audit', '--no-fund', tarball], { cwd: consumer, attempts: 2 });
103
- if (steps.at(-1)?.ok)
104
- run('npx_sks_version', npxBin, ['sks', '--version'], { cwd: consumer });
105
- if (steps.at(-1)?.ok)
106
- run('npx_sks_root_json', npxBin, ['sks', 'root', '--json'], { cwd: consumer });
107
- if (steps.at(-1)?.ok)
108
- run('npx_sks_setup_local_only', npxBin, ['sks', 'setup', '--local-only', '--json'], { cwd: consumer });
109
- if (steps.at(-1)?.ok)
110
- run('npx_sks_selftest_mock', npxBin, ['sks', 'selftest', '--mock'], { cwd: consumer, timeout: 180_000 });
111
- if (steps.at(-1)?.ok)
112
- run('npx_sks_run_execute_mock', npxBin, ['sks', 'run', 'blackbox execute fixture', '--execute', '--mock', '--json'], { cwd: consumer, timeout: 180_000 });
113
- if (steps.at(-1)?.ok)
114
- run('npx_sks_agent_mock', npxBin, ['sks', 'agent', 'run', 'blackbox native agent fixture', '--mock', '--json'], { cwd: consumer, timeout: 180_000 });
115
- let qaMissionId = null;
116
- if (steps.at(-1)?.ok) {
117
- const qaPrepare = run('npx_sks_qa_loop_prepare', npxBin, ['sks', 'qa-loop', 'prepare', 'blackbox API QA', '--json'], { cwd: consumer, timeout: 180_000 });
118
- try {
119
- qaMissionId = JSON.parse(qaPrepare.stdout).mission_id || null;
120
- }
121
- catch { }
122
- }
123
- if (steps.at(-1)?.ok)
124
- run('npx_sks_qa_loop_run_mock', npxBin, ['sks', 'qa-loop', 'run', qaMissionId || 'latest', '--mock', '--json'], { cwd: consumer, timeout: 180_000 });
125
- if (steps.at(-1)?.ok) {
126
- const proofFile = dryRun ? '<dry-run>' : latestCompletionProof(consumer);
127
- steps.push({
128
- label: 'verify_completion_proof_exists',
129
- command: 'fs.existsSync(.sneakoscope/missions/<latest>/completion-proof.json)',
130
- cwd: consumer,
131
- status: proofFile ? 0 : 1,
132
- ok: Boolean(proofFile),
133
- stdout_bytes: 0,
134
- stderr_bytes: 0,
135
- stderr_tail: proofFile || 'completion-proof.json missing'
136
- });
137
- }
138
- const result = { schema: 'sks.blackbox-pack-install.v1', ok: steps.every((step) => step.ok), dry_run: dryRun, temp_root: keep ? tmp : null, steps };
139
- if (!result.ok)
140
- result.temp_root = tmp;
141
- if (!keep && result.ok)
142
- fs.rmSync(tmp, { recursive: true, force: true });
143
- if (json)
144
- console.log(JSON.stringify(result, null, 2));
145
- else {
146
- console.log(`Blackbox pack install: ${result.ok ? 'ok' : 'blocked'}${dryRun ? ' (dry-run)' : ''}`);
147
- for (const step of steps) {
148
- console.log(`- ${step.ok ? 'ok' : 'blocked'} ${step.label}${step.attempts ? ` attempts=${step.attempts}` : ''}`);
149
- if (!step.ok && step.stderr_tail)
150
- console.log(` stderr_tail: ${step.stderr_tail.replace(/\n/g, '\\n')}`);
151
- if (!step.ok && step.stdout_tail)
152
- console.log(` stdout_tail: ${step.stdout_tail.replace(/\n/g, '\\n')}`);
153
- }
154
- if (!result.ok)
155
- console.log(`temp_root: ${tmp}`);
156
- }
157
- if (!result.ok)
158
- process.exitCode = 1;
159
- function latestCompletionProof(rootDir) {
160
- const missions = path.join(rootDir, '.sneakoscope', 'missions');
161
- if (!fs.existsSync(missions))
162
- return null;
163
- const ids = fs.readdirSync(missions, { withFileTypes: true })
164
- .filter((entry) => entry.isDirectory() && entry.name.startsWith('M-'))
165
- .map((entry) => entry.name)
166
- .sort();
167
- for (const id of ids.reverse()) {
168
- const proof = path.join(missions, id, 'completion-proof.json');
169
- if (fs.existsSync(proof))
170
- return proof;
171
- }
172
- return null;
173
- }
174
- //# sourceMappingURL=blackbox-pack-install.js.map
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import { runDirective316Gate } from './sks-3-1-6-directive-check-lib.js';
3
- await runDirective316Gate('brand-neutrality:zero-leakage-blackbox');
4
- //# sourceMappingURL=brand-neutrality-zero-leakage-blackbox.js.map
@@ -1,34 +0,0 @@
1
- import fs from 'node:fs/promises';
2
- import path from 'node:path';
3
- import { assertGate, emitGate, makeTempRoot, writeText } from './sks-3-1-8-check-lib.js';
4
- import { importDist } from './sks-1-18-gate-lib.js';
5
- const tmp = await makeTempRoot('sks-build-once-');
6
- await writeText(path.join(tmp, 'package.json'), JSON.stringify({
7
- version: '4.0.2',
8
- scripts: {
9
- 'build:clean': 'node build.mjs',
10
- 'build:incremental': 'node build.mjs'
11
- }
12
- }, null, 2));
13
- await writeText(path.join(tmp, 'package-lock.json'), JSON.stringify({ name: 'fixture', version: '4.0.2', lockfileVersion: 3, packages: { '': { version: '4.0.2' } } }, null, 2));
14
- await writeText(path.join(tmp, 'tsconfig.json'), JSON.stringify({ compilerOptions: { outDir: 'dist' } }, null, 2));
15
- await writeText(path.join(tmp, 'src/index.ts'), 'export const value = 1;\n');
16
- await writeText(path.join(tmp, 'build.mjs'), "import fs from 'node:fs'; fs.mkdirSync('dist/bin',{recursive:true}); fs.writeFileSync('dist/bin/sks.js','#!/usr/bin/env node\\n');\n");
17
- const mod = await importDist('core/build/build-once-runner.js');
18
- const first = mod.runBuildOnce({ root: tmp, mode: 'clean', force: true });
19
- const second = mod.runBuildOnce({ root: tmp, mode: 'incremental' });
20
- await writeText(path.join(tmp, 'src/index.ts'), 'export const value = 2;\n');
21
- const third = mod.runBuildOnce({ root: tmp, mode: 'incremental' });
22
- await writeText(path.join(tmp, 'build.mjs'), "import fs from 'node:fs'; fs.mkdirSync('dist/bin',{recursive:true});\n");
23
- await fs.rm(path.join(tmp, 'dist', 'bin', 'sks.js'), { force: true });
24
- const broken = mod.runBuildOnce({ root: tmp, mode: 'incremental', force: true });
25
- await writeText(path.join(tmp, 'build.mjs'), "import fs from 'node:fs'; fs.mkdirSync('dist/bin',{recursive:true}); fs.writeFileSync('dist/bin/sks.js','#!/usr/bin/env node\\n');\n");
26
- await writeText(path.join(tmp, 'package-lock.json'), JSON.stringify({ name: 'fixture', version: '4.0.2', lockfileVersion: 3, packages: { '': { version: '4.0.2' } }, changed: true }, null, 2));
27
- const lockChanged = mod.runBuildOnce({ root: tmp, mode: 'incremental' });
28
- assertGate(first.ok === true && first.reused === false, 'clean build must write an initial proof', first);
29
- assertGate(second.ok === true && second.reused === true, 'second unchanged incremental run must reuse proof', second);
30
- assertGate(third.ok === true && third.reused === false && third.source_hash !== first.source_hash, 'source edit must invalidate proof', { first, third });
31
- assertGate(broken.ok === false && broken.blockers.some((item) => item.includes('dist_target_missing:dist/bin/sks.js')), 'missing dist/bin/sks.js must fail proof', broken);
32
- assertGate(lockChanged.ok === true && lockChanged.package_lock_hash !== third.package_lock_hash, 'package-lock change must invalidate proof', { third, lockChanged });
33
- emitGate('build-once:runner-blackbox', { first: first.ok, reused: second.reused, broken: broken.ok });
34
- //# sourceMappingURL=build-once-runner-blackbox.js.map
@@ -1,13 +0,0 @@
1
- #!/usr/bin/env node
2
- import { assertGate, emitGate } from './sks-1-18-gate-lib.js';
3
- import { detectCodex0140Capability } from '../core/codex-control/codex-0140-capability.js';
4
- process.env.SKS_CODEX_0140_FAKE = '1';
5
- process.env.SKS_CODEX_VERSION_FAKE = 'codex-cli 0.140.0';
6
- process.env.SKS_CODEX_0140_PROBE = '1';
7
- const report = await detectCodex0140Capability({ codexBin: 'codex' });
8
- assertGate(report.ok === true && Object.values(report.features).every(Boolean), 'Codex 0.140 integration blackbox requires every fixture feature', report);
9
- assertGate(Object.values(report.feature_states).every((state) => state.supported === true && state.certainty === 'fixture'), 'Codex 0.140 integration blackbox requires explicit fixture feature states', report);
10
- assertGate(Object.keys(report.feature_certainty).length === Object.keys(report.features).length, 'Codex 0.140 integration blackbox requires per-feature certainty coverage', report);
11
- assertGate(JSON.stringify(report).includes('SUPABASE_ACCESS_TOKEN') === false, 'Codex 0.140 blackbox must not serialize secret env values', report);
12
- emitGate('codex:0140-integration-blackbox', { feature_count: Object.keys(report.features).length });
13
- //# sourceMappingURL=codex-0140-integration-blackbox.js.map
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import { runDirective315Gate } from './sks-3-1-5-directive-check-lib.js';
3
- await runDirective315Gate('codex-app:agent-type-blackbox');
4
- //# sourceMappingURL=codex-agent-type-blackbox.js.map
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import { runDirective314Gate } from './sks-3-1-4-directive-check-lib.js';
3
- await runDirective314Gate('codex-app:harness-blackbox');
4
- //# sourceMappingURL=codex-app-harness-blackbox.js.map
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import { runDirective314Gate } from './sks-3-1-4-directive-check-lib.js';
3
- await runDirective314Gate('codex-app:skill-agent-blackbox');
4
- //# sourceMappingURL=codex-app-skill-agent-blackbox.js.map
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import { runDirective315Gate } from './sks-3-1-5-directive-check-lib.js';
3
- await runDirective315Gate('codex-app:hook-approval-blackbox');
4
- //# sourceMappingURL=codex-hook-approval-blackbox.js.map
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import { runDirective315Gate } from './sks-3-1-5-directive-check-lib.js';
3
- await runDirective315Gate('codex-app:init-deep-directory-local-blackbox');
4
- //# sourceMappingURL=codex-init-deep-directory-local-blackbox.js.map
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import { runDirective316Gate } from './sks-3-1-6-directive-check-lib.js';
3
- await runDirective316Gate('codex-native:feature-broker-blackbox');
4
- //# sourceMappingURL=codex-native-feature-broker-blackbox.js.map
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import { runDirective316Gate } from './sks-3-1-6-directive-check-lib.js';
3
- await runDirective316Gate('codex-native:pattern-analysis-blackbox');
4
- //# sourceMappingURL=codex-native-pattern-analysis-blackbox.js.map
@@ -1,55 +0,0 @@
1
- #!/usr/bin/env node
2
- import fs from 'node:fs/promises';
3
- import path from 'node:path';
4
- import { buildCodexNativeFeatureMatrix } from '../core/codex-native/codex-native-feature-broker.js';
5
- import { repairCodexNativeManagedAssets } from '../core/codex-native/codex-native-repair-transaction.js';
6
- import { createCodexNativeRuntimeFixture, withFixtureEnv } from './codex-native-runtime-e2e-fixture.js';
7
- const fixture = await createCodexNativeRuntimeFixture({
8
- hook: 'approved',
9
- agentType: 'supported',
10
- appHandoff: true,
11
- imagePathExposure: true,
12
- mcpCandidates: true,
13
- codeModeWebSearch: true
14
- });
15
- const previous = process.env.CODEX_HOME;
16
- process.env.CODEX_HOME = path.join(fixture.root, 'codex-home');
17
- try {
18
- await withFixtureEnv(fixture, async () => {
19
- await buildCodexNativeFeatureMatrix({ root: fixture.root, mode: 'read-only' });
20
- assertGate(!(await exists(path.join(fixture.root, 'codex-home', 'skills'))), 'read-only matrix created skills');
21
- assertGate(!(await exists(path.join(fixture.root, 'codex-home', 'agents'))), 'read-only matrix created agent roles');
22
- const repair = await repairCodexNativeManagedAssets({ root: fixture.root, requestedBy: 'manual', yes: true });
23
- assertGate(repair.repaired.some((row) => row.asset === 'skills'), 'repair transaction did not include skills', repair);
24
- assertGate(await exists(path.join(fixture.root, 'codex-home', 'skills')), 'repair transaction did not create managed skills');
25
- assertGate(await exists(path.join(fixture.root, 'codex-home', 'agents')), 'repair transaction did not create managed agent roles');
26
- const matrixAfter = await buildCodexNativeFeatureMatrix({ root: fixture.root, mode: 'read-only' });
27
- assertGate(matrixAfter.features.skill_sync.ok === true || matrixAfter.features.agent_roles.ok === true, 'post-repair read-only matrix did not reflect managed assets', matrixAfter);
28
- });
29
- }
30
- finally {
31
- if (previous === undefined)
32
- delete process.env.CODEX_HOME;
33
- else
34
- process.env.CODEX_HOME = previous;
35
- }
36
- emitGate('codex-native:read-repair-split-blackbox');
37
- async function exists(file) {
38
- try {
39
- await fs.stat(file);
40
- return true;
41
- }
42
- catch {
43
- return false;
44
- }
45
- }
46
- function assertGate(condition, message, detail = {}) {
47
- if (condition)
48
- return;
49
- console.error(JSON.stringify({ ok: false, message, detail }, null, 2));
50
- process.exit(1);
51
- }
52
- function emitGate(gate) {
53
- console.log(JSON.stringify({ schema: 'sks.release-gate.v1', ok: true, gate }, null, 2));
54
- }
55
- //# sourceMappingURL=codex-native-read-repair-split-blackbox.js.map
@@ -1,41 +0,0 @@
1
- #!/usr/bin/env node
2
- import fs from 'node:fs/promises';
3
- import os from 'node:os';
4
- import path from 'node:path';
5
- import { runProcess } from '../core/fsx.js';
6
- import { ensureCodexNativeReferenceSnapshot } from '../core/codex-native/codex-native-reference-cache.js';
7
- import { analyzeCodexNativeReferenceSource } from '../core/codex-native/codex-native-reference-source.js';
8
- const missing = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-reference-cache-missing-'));
9
- const missingReport = await ensureCodexNativeReferenceSnapshot({ root: missing, offline: true });
10
- assertGate(missingReport.ok === false && missingReport.blockers.includes('source_snapshot_missing'), 'offline no-cache scenario must report source_snapshot_missing', missingReport);
11
- const missingEvidence = await analyzeCodexNativeReferenceSource({ root: missing, writeReport: false });
12
- assertGate(missingEvidence.blockers.includes('source_snapshot_missing') && missingEvidence.evidence.length === 0, 'missing cache must not hallucinate evidence', missingEvidence);
13
- const reused = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-reference-cache-reused-'));
14
- await fs.mkdir(path.join(reused, '.sneakoscope', 'cache', 'codex-native-reference'), { recursive: true });
15
- await fs.writeFile(path.join(reused, '.sneakoscope', 'cache', 'codex-native-reference', 'README.md'), 'npx plugin hook agent_type fallback AGENTS.md doctor MCP managed proof\n', 'utf8');
16
- const reusedReport = await ensureCodexNativeReferenceSnapshot({ root: reused, offline: true });
17
- assertGate(reusedReport.ok === true && reusedReport.refreshed === false, 'offline existing cache should be reused', reusedReport);
18
- const source = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-reference-source-'));
19
- await fs.writeFile(path.join(source, 'README.md'), 'npx plugin hook agent_type fallback AGENTS.md doctor MCP managed proof\n', 'utf8');
20
- await runProcess('git', ['init'], { cwd: source, timeoutMs: 10_000, maxOutputBytes: 64 * 1024 });
21
- await runProcess('git', ['add', 'README.md'], { cwd: source, timeoutMs: 10_000, maxOutputBytes: 64 * 1024 });
22
- await runProcess('git', ['-c', 'user.email=sks@example.invalid', '-c', 'user.name=SKS', 'commit', '-m', 'fixture'], { cwd: source, timeoutMs: 10_000, maxOutputBytes: 64 * 1024 });
23
- const refreshedRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-reference-cache-refresh-'));
24
- const refreshed = await ensureCodexNativeReferenceSnapshot({ root: refreshedRoot, sourceUrl: source, refresh: true });
25
- const serialized = JSON.stringify(refreshed);
26
- assertGate(refreshed.ok === true && refreshed.refreshed === true && typeof refreshed.source_sha === 'string', 'refresh from local git source should record source sha', refreshed);
27
- assertGate(!serialized.includes(source), 'cache report leaked raw source URL/path', refreshed);
28
- const evidence = await analyzeCodexNativeReferenceSource({ root: refreshedRoot, writeReport: true });
29
- const docs = await fs.readFile(path.join(refreshedRoot, 'docs', 'codex-native-patterns.md'), 'utf8');
30
- assertGate(!JSON.stringify(evidence).includes(source) && !docs.includes(source), 'reference evidence/docs leaked raw source URL/path', { evidence, docs });
31
- emitGate('codex-native:reference-cache-blackbox');
32
- function assertGate(condition, message, detail = {}) {
33
- if (condition)
34
- return;
35
- console.error(JSON.stringify({ ok: false, message, detail }, null, 2));
36
- process.exit(1);
37
- }
38
- function emitGate(gate) {
39
- console.log(JSON.stringify({ schema: 'sks.release-gate.v1', ok: true, gate }, null, 2));
40
- }
41
- //# sourceMappingURL=codex-native-reference-cache-blackbox.js.map
@@ -1,33 +0,0 @@
1
- #!/usr/bin/env node
2
- import fs from 'node:fs/promises';
3
- import path from 'node:path';
4
- import { assertGate, emitGate, makeTempRoot, writeText, writeUserSkill } from './sks-3-1-8-check-lib.js';
5
- import { syncCoreSkillsIntegrity } from '../core/codex-native/core-skill-integrity.js';
6
- import { buildSksCoreSkillManifest, renderCoreSkillTemplate } from '../core/codex-native/core-skill-manifest.js';
7
- import { initProject } from '../core/init.js';
8
- const root = await makeTempRoot('sks-core-blackbox-');
9
- const skillsRoot = path.join(root, '.agents', 'skills');
10
- const expectedSkillCount = buildSksCoreSkillManifest('1970-01-01T00:00:00.000Z').skills.length;
11
- const first = await syncCoreSkillsIntegrity({ root, apply: true, skillsRoot });
12
- const second = await syncCoreSkillsIntegrity({ root, apply: true, skillsRoot });
13
- await writeText(path.join(skillsRoot, 'research', 'SKILL.md'), `${renderCoreSkillTemplate('research')}\nmutated\n`);
14
- const third = await syncCoreSkillsIntegrity({ root, apply: true, skillsRoot });
15
- const restoredText = await fs.readFile(path.join(skillsRoot, 'research', 'SKILL.md'), 'utf8');
16
- const userRoot = path.join(root, 'user-skills');
17
- await writeUserSkill(root, 'user-skills', 'research', 'research');
18
- const user = await syncCoreSkillsIntegrity({ root, apply: true, skillsRoot: userRoot });
19
- const setupRoot = await makeTempRoot('sks-core-setup-blackbox-');
20
- const setup = await initProject(setupRoot, { force: true, installScope: 'project', localOnly: true, globalCommand: 'sks' });
21
- const setupIntegrity = await syncCoreSkillsIntegrity({ root: setupRoot, apply: false, skillsRoot: path.join(setupRoot, '.agents', 'skills') });
22
- await writeText(path.join(setupRoot, '.agents', 'skills', 'loop', 'SKILL.md'), `${renderCoreSkillTemplate('loop')}\nmutated by setup blackbox\n`);
23
- const setupRestore = await initProject(setupRoot, { force: true, installScope: 'project', localOnly: true, globalCommand: 'sks' });
24
- const restoredSetupText = await fs.readFile(path.join(setupRoot, '.agents', 'skills', 'loop', 'SKILL.md'), 'utf8');
25
- assertGate(first.installed.length === expectedSkillCount, 'blackbox A: first sync installs missing core skills', first);
26
- assertGate(second.installed.length === 0 && second.restored.length === 0, 'blackbox B: second sync changes nothing', second);
27
- assertGate(third.restored.length === 1 && restoredText === renderCoreSkillTemplate('research'), 'blackbox C: managed drift restored exactly', third);
28
- assertGate(user.skipped_user_authored.length === 1, 'blackbox D: user skill is not overwritten', user);
29
- assertGate(setup.skill_install?.core_skill_integrity?.installed_count > 0, 'blackbox E: setup installs core skills through integrity sync', setup.skill_install);
30
- assertGate(setupIntegrity.restored.length === 0 && setupIntegrity.skipped_user_authored.length === 0, 'blackbox F: setup-produced core skills are current', setupIntegrity);
31
- assertGate(setupRestore.skill_install?.core_skill_integrity?.restored_count > 0 && restoredSetupText === renderCoreSkillTemplate('loop'), 'blackbox G: setup restores managed core drift through integrity sync', setupRestore.skill_install);
32
- emitGate('core-skill:integrity-blackbox');
33
- //# sourceMappingURL=core-skill-integrity-blackbox.js.map
@@ -1,37 +0,0 @@
1
- #!/usr/bin/env node
2
- // @ts-nocheck
3
- import fs from 'node:fs';
4
- import os from 'node:os';
5
- import path from 'node:path';
6
- import { spawnSync } from 'node:child_process';
7
- import { emitGate } from './sks-1-12-real-execution-check-lib.js';
8
- const root = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-dfix-fast-blackbox-'));
9
- fs.mkdirSync(path.join(root, '.sneakoscope'), { recursive: true });
10
- fs.writeFileSync(path.join(root, 'package.json'), JSON.stringify({
11
- private: true,
12
- type: 'module',
13
- scripts: {
14
- test: 'node test.mjs',
15
- 'test:unit': 'node test.mjs',
16
- 'dfix:fixture': 'node test.mjs',
17
- 'dfix:verification': 'node test.mjs'
18
- }
19
- }, null, 2));
20
- fs.writeFileSync(path.join(root, 'value.js'), 'export const value = "bad";\n');
21
- fs.writeFileSync(path.join(root, 'test.mjs'), 'import { value } from "./value.js"; if (value !== "good") throw new Error("expected good");\n');
22
- const sks = path.join(process.cwd(), 'dist', 'bin', 'sks.js');
23
- const env = { ...process.env, SKS_DISABLE_UPDATE_CHECK: '1' };
24
- const diagnose = run(root, sks, ['dfix', 'diagnose', 'fix value', '--file', 'value.js', '--error', 'AssertionError: expected good at value.js:1', '--json'], env);
25
- const mission = JSON.parse(diagnose.stdout).mission_id;
26
- const patch = run(root, sks, ['dfix', 'patch', mission, '--file', 'value.js', '--find', 'bad', '--replace', 'good', '--apply', '--json'], env);
27
- const verify = run(root, sks, ['dfix', 'verify', mission, '--command', 'node test.mjs', '--verify-auto', '--json'], env);
28
- const ok = diagnose.status === 0 && patch.status === 0 && verify.status === 0 && fs.readFileSync(path.join(root, 'value.js'), 'utf8').includes('"good"');
29
- console.log(JSON.stringify({ schema: 'sks.dfix-fast-blackbox-check.v1', ok, mission_id: mission, root }, null, 2));
30
- if (!ok)
31
- process.exitCode = 1;
32
- else
33
- emitGate('dfix:blackbox-fast', { mission_id: mission });
34
- function run(cwd, bin, args, env) {
35
- return spawnSync(process.execPath, [bin, ...args], { cwd, env, encoding: 'utf8', timeout: 30_000 });
36
- }
37
- //# sourceMappingURL=dfix-fast-blackbox-check.js.map
@@ -1,48 +0,0 @@
1
- #!/usr/bin/env node
2
- // @ts-nocheck
3
- import fs from 'node:fs';
4
- import os from 'node:os';
5
- import path from 'node:path';
6
- import { spawnSync } from 'node:child_process';
7
- import { assertGate, emitGate, importDist, root } from './sks-1-18-gate-lib.js';
8
- const applyMod = await importDist('core/agents/agent-patch-apply-worker.js');
9
- const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-dfix-patch-'));
10
- fs.writeFileSync(path.join(tmp, 'copy.txt'), 'old label\n');
11
- const envelope = {
12
- schema: 'sks.agent-patch-envelope.v1',
13
- agent_id: 'dfix-fast-lane',
14
- session_id: 'dfix-session',
15
- slot_id: 'dfix-slot',
16
- generation_index: 1,
17
- lease_id: 'lease:dfix-fast-lane:copy.txt',
18
- operations: [{ op: 'replace', path: 'copy.txt', search: 'old label', replace: 'new label' }]
19
- };
20
- const applied = await applyMod.applyAgentPatchEnvelope(tmp, envelope);
21
- const dfixFile = path.join(tmp, 'dfix-route.txt');
22
- fs.writeFileSync(dfixFile, 'old label\n');
23
- const diagnose = spawnSync(process.execPath, ['dist/bin/sks.js', 'dfix', 'diagnose', 'dfix parallel write route fixture', '--file', dfixFile, '--json'], { cwd: root, encoding: 'utf8', maxBuffer: 1024 * 1024 });
24
- const diagnoseJson = parseJson(diagnose.stdout);
25
- const plan = diagnoseJson?.mission_id
26
- ? spawnSync(process.execPath, ['dist/bin/sks.js', 'dfix', 'plan', diagnoseJson.mission_id, '--file', dfixFile, '--write-mode', 'parallel', '--apply-patches', '--dry-run-patches', '--max-write-agents', '1', '--json'], { cwd: root, encoding: 'utf8', maxBuffer: 1024 * 1024 })
27
- : { status: 1, stdout: '', stderr: 'diagnose mission missing' };
28
- const planJson = parseJson(plan.stdout);
29
- const routePolicy = planJson?.patch_plan?.route_parallel_write || null;
30
- const report = { schema: 'sks.dfix-parallel-write-blackbox.v1', ok: applied.ok && diagnose.status === 0 && plan.status === 0 && routePolicy?.route_level_flags_wired === true, applied, route_command: { diagnose_status: diagnose.status, plan_status: plan.status, mission_id: diagnoseJson?.mission_id || null, route_policy: routePolicy, stderr_tail: `${diagnose.stderr || ''}${plan.stderr || ''}`.slice(-2000) } };
31
- const out = path.join(root, '.sneakoscope', 'reports', 'dfix-parallel-write-blackbox.json');
32
- fs.mkdirSync(path.dirname(out), { recursive: true });
33
- fs.writeFileSync(out, `${JSON.stringify(report, null, 2)}\n`);
34
- assertGate(applied.ok === true, 'DFix parallel write blackbox patch failed', report);
35
- assertGate(fs.readFileSync(path.join(tmp, 'copy.txt'), 'utf8') === 'new label\n', 'DFix parallel write blackbox content mismatch', report);
36
- assertGate(routePolicy?.write_mode === 'parallel', 'DFix route must record --write-mode parallel', report);
37
- assertGate(routePolicy?.apply_patches === true, 'DFix route must record --apply-patches', report);
38
- assertGate(routePolicy?.dry_run_patches === true, 'DFix route must record --dry-run-patches', report);
39
- emitGate('dfix:parallel-write-blackbox', { changed_files: applied.changed_files.length });
40
- function parseJson(text) {
41
- try {
42
- return JSON.parse(text);
43
- }
44
- catch {
45
- return null;
46
- }
47
- }
48
- //# sourceMappingURL=dfix-parallel-write-blackbox.js.map