sneakoscope 2.0.14 → 2.0.16

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 (491) hide show
  1. package/README.md +6 -3
  2. package/crates/sks-core/Cargo.lock +1 -1
  3. package/crates/sks-core/Cargo.toml +1 -1
  4. package/crates/sks-core/src/main.rs +1 -1
  5. package/dist/.sks-build-stamp.json +4 -4
  6. package/dist/bin/sks.js +1 -1
  7. package/dist/cli/command-registry.js +2 -1
  8. package/dist/commands/mad-db.js +5 -0
  9. package/dist/commands/zellij-slot-pane.js +3 -1
  10. package/dist/core/agents/agent-orchestrator.js +66 -3
  11. package/dist/core/agents/agent-plan.js +3 -2
  12. package/dist/core/agents/agent-scheduler.js +204 -86
  13. package/dist/core/agents/agent-schema.js +1 -1
  14. package/dist/core/agents/native-cli-session-swarm.js +199 -15
  15. package/dist/core/agents/native-cli-worker.js +85 -0
  16. package/dist/core/agents/parallel-runtime-proof.js +217 -0
  17. package/dist/core/codex-control/codex-task-runner.js +32 -4
  18. package/dist/core/codex-control/model-call-concurrency.js +106 -0
  19. package/dist/core/commands/basic-cli.js +1 -1
  20. package/dist/core/commands/command-suggestions.js +1 -1
  21. package/dist/core/commands/mad-db-command.js +106 -0
  22. package/dist/core/commands/mad-sks-command.js +50 -13
  23. package/dist/core/commands/naruto-command.js +128 -5
  24. package/dist/core/commands/research-command.js +13 -1
  25. package/dist/core/commands/team-command.js +23 -175
  26. package/dist/core/db-safety.js +55 -1
  27. package/dist/core/fsx.js +1 -1
  28. package/dist/core/git/git-worktree-capability.js +18 -0
  29. package/dist/core/git/git-worktree-manager.js +80 -0
  30. package/dist/core/git/git-worktree-pool.js +4 -0
  31. package/dist/core/mad-db/mad-db-capability.js +116 -0
  32. package/dist/core/mad-db/mad-db-ledger.js +31 -0
  33. package/dist/core/mad-db/mad-db-policy-resolver.js +48 -0
  34. package/dist/core/naruto/naruto-concurrency-governor.js +14 -1
  35. package/dist/core/pipeline-internals/runtime-core.js +74 -8
  36. package/dist/core/pipeline-internals/runtime-gates.js +44 -0
  37. package/dist/core/proof/route-proof-gate.js +5 -3
  38. package/dist/core/proof/route-proof-policy.js +9 -1
  39. package/dist/core/release/release-gate-affected-selector.js +113 -0
  40. package/dist/core/release/release-gate-batch-runner.js +67 -0
  41. package/dist/core/release/release-gate-dag.js +22 -3
  42. package/dist/core/release/release-gate-resource-governor.js +23 -11
  43. package/dist/core/research/implementation-blueprint-densifier.js +1 -1
  44. package/dist/core/research/implementation-blueprint-markdown.js +1 -1
  45. package/dist/core/research/implementation-blueprint.js +68 -7
  46. package/dist/core/research/research-final-reviewer.js +27 -1
  47. package/dist/core/research/research-handoff.js +69 -5
  48. package/dist/core/research/research-realistic-report.js +162 -0
  49. package/dist/core/research/research-repetition-detector.js +75 -0
  50. package/dist/core/research/research-report-quality.js +27 -5
  51. package/dist/core/research/research-stage-runner.js +40 -13
  52. package/dist/core/research/research-synthesis-prompt.js +52 -0
  53. package/dist/core/research/research-synthesis-writer.js +208 -0
  54. package/dist/core/research.js +60 -48
  55. package/dist/core/routes.js +23 -19
  56. package/dist/core/update/update-notice.js +120 -0
  57. package/dist/core/version.js +1 -1
  58. package/dist/core/zellij/zellij-dashboard-renderer.js +2 -0
  59. package/dist/core/zellij/zellij-slot-column-anchor.js +35 -1
  60. package/dist/core/zellij/zellij-slot-pane-renderer.js +57 -0
  61. package/dist/core/zellij/zellij-slot-telemetry.js +237 -0
  62. package/dist/scripts/release-gate-dag-runner.js +5 -0
  63. package/dist/scripts/release-speed-summary.js +27 -0
  64. package/package.json +76 -5
  65. package/schemas/agents/parallel-runtime-proof.schema.json +48 -0
  66. package/schemas/mad-db/mad-db-capability.schema.json +31 -0
  67. package/schemas/mad-db/mad-db-ledger.schema.json +14 -0
  68. package/schemas/research/implementation-blueprint.schema.json +6 -1
  69. package/schemas/research/research-final-review.schema.json +10 -0
  70. package/schemas/research/research-synthesis-output.schema.json +62 -0
  71. package/schemas/update/update-notice.schema.json +19 -0
  72. package/schemas/zellij/zellij-slot-telemetry.schema.json +89 -0
  73. package/dist/scripts/agent-ast-aware-work-graph-check.js +0 -25
  74. package/dist/scripts/agent-backfill-replenishment-check.js +0 -13
  75. package/dist/scripts/agent-backfill-route-blackbox.js +0 -5
  76. package/dist/scripts/agent-background-terminals-check.js +0 -16
  77. package/dist/scripts/agent-cleanup-command-ux-check.js +0 -12
  78. package/dist/scripts/agent-cleanup-executor-check.js +0 -53
  79. package/dist/scripts/agent-cleanup-executor-v2-check.js +0 -39
  80. package/dist/scripts/agent-cli-options-to-task-graph-check.js +0 -5
  81. package/dist/scripts/agent-codex-app-cockpit-check.js +0 -91
  82. package/dist/scripts/agent-codex-child-overlap-check.js +0 -21
  83. package/dist/scripts/agent-dynamic-cockpit-check.js +0 -10
  84. package/dist/scripts/agent-dynamic-pool-check.js +0 -13
  85. package/dist/scripts/agent-dynamic-pool-route-blackbox.js +0 -5
  86. package/dist/scripts/agent-fast-mode-default-check.js +0 -62
  87. package/dist/scripts/agent-fast-mode-worker-propagation-check.js +0 -7
  88. package/dist/scripts/agent-follow-up-work-schema-check.js +0 -80
  89. package/dist/scripts/agent-goal-mode-propagation-check.js +0 -9
  90. package/dist/scripts/agent-intelligent-work-graph-check.js +0 -25
  91. package/dist/scripts/agent-janitor-check.js +0 -76
  92. package/dist/scripts/agent-main-no-scout-check.js +0 -11
  93. package/dist/scripts/agent-model-authored-patch-envelope-check.js +0 -15
  94. package/dist/scripts/agent-multi-project-isolation-check.js +0 -86
  95. package/dist/scripts/agent-native-cli-session-proof-check.js +0 -7
  96. package/dist/scripts/agent-native-cli-session-swarm-10-check.js +0 -7
  97. package/dist/scripts/agent-native-cli-session-swarm-20-check.js +0 -7
  98. package/dist/scripts/agent-native-cli-session-swarm-check.js +0 -7
  99. package/dist/scripts/agent-no-subagent-scaling-check.js +0 -7
  100. package/dist/scripts/agent-parallel-write-blackbox.js +0 -56
  101. package/dist/scripts/agent-parallel-write-kernel-check.js +0 -103
  102. package/dist/scripts/agent-patch-conflict-rebase-check.js +0 -198
  103. package/dist/scripts/agent-patch-envelope-extraction-check.js +0 -17
  104. package/dist/scripts/agent-patch-proof-check.js +0 -41
  105. package/dist/scripts/agent-patch-proof-runtime-check.js +0 -63
  106. package/dist/scripts/agent-patch-queue-runtime-check.js +0 -36
  107. package/dist/scripts/agent-patch-rollback-check.js +0 -38
  108. package/dist/scripts/agent-patch-rollback-dag-check.js +0 -14
  109. package/dist/scripts/agent-patch-swarm-route-blackbox.js +0 -10
  110. package/dist/scripts/agent-patch-swarm-runtime-check.js +0 -10
  111. package/dist/scripts/agent-patch-swarm-runtime-truth-check.js +0 -76
  112. package/dist/scripts/agent-patch-transaction-journal-check.js +0 -57
  113. package/dist/scripts/agent-patch-verification-dag-check.js +0 -14
  114. package/dist/scripts/agent-proof-contract-reconciled-check.js +0 -5
  115. package/dist/scripts/agent-real-codex-dynamic-smoke-check.js +0 -166
  116. package/dist/scripts/agent-real-codex-dynamic-smoke-v2-check.js +0 -14
  117. package/dist/scripts/agent-real-codex-in-zellij-worker-pane-check.js +0 -229
  118. package/dist/scripts/agent-real-codex-parallel-workers-10-check.js +0 -5
  119. package/dist/scripts/agent-real-codex-parallel-workers-20-check.js +0 -5
  120. package/dist/scripts/agent-real-codex-parallel-workers-5-check.js +0 -5
  121. package/dist/scripts/agent-real-codex-parallel-workers-check.js +0 -5
  122. package/dist/scripts/agent-role-config-repair-check.js +0 -33
  123. package/dist/scripts/agent-rollback-command-check.js +0 -86
  124. package/dist/scripts/agent-route-truth-backfill-check.js +0 -5
  125. package/dist/scripts/agent-scheduler-proof-check.js +0 -13
  126. package/dist/scripts/agent-scheduler-proof-hardening-check.js +0 -22
  127. package/dist/scripts/agent-session-generation-check.js +0 -21
  128. package/dist/scripts/agent-slot-pane-binding-proof-check.js +0 -64
  129. package/dist/scripts/agent-source-intelligence-propagation-check.js +0 -9
  130. package/dist/scripts/agent-strategy-to-lease-wiring-check.js +0 -32
  131. package/dist/scripts/agent-strategy-to-patch-strict-check.js +0 -54
  132. package/dist/scripts/agent-task-graph-expansion-check.js +0 -14
  133. package/dist/scripts/agent-terminal-generations-check.js +0 -23
  134. package/dist/scripts/agent-visual-consistency-check.js +0 -9
  135. package/dist/scripts/agent-wiki-context-proof-check.js +0 -62
  136. package/dist/scripts/agent-worker-backend-router-check.js +0 -63
  137. package/dist/scripts/agent-worker-scout-limited-check.js +0 -17
  138. package/dist/scripts/agent-zellij-dynamic-backfill-panes-check.js +0 -34
  139. package/dist/scripts/agent-zellij-runtime-check.js +0 -84
  140. package/dist/scripts/all-feature-deep-completion-check.js +0 -31
  141. package/dist/scripts/appshots-capability-check.js +0 -18
  142. package/dist/scripts/appshots-evidence-check.js +0 -48
  143. package/dist/scripts/appshots-operator-policy-check.js +0 -25
  144. package/dist/scripts/appshots-privacy-safety-check.js +0 -48
  145. package/dist/scripts/appshots-source-intelligence-check.js +0 -53
  146. package/dist/scripts/appshots-thread-attachment-discovery-check.js +0 -87
  147. package/dist/scripts/appshots-triwiki-voxel-check.js +0 -46
  148. package/dist/scripts/architecture-guard-check.js +0 -55
  149. package/dist/scripts/changelog-check.js +0 -47
  150. package/dist/scripts/codex-0-133-official-compat-report.js +0 -53
  151. package/dist/scripts/codex-0-134-official-compat-report.js +0 -110
  152. package/dist/scripts/codex-0-134-runner-truth-check.js +0 -66
  153. package/dist/scripts/codex-0-135-compat-check.js +0 -57
  154. package/dist/scripts/codex-0-136-compat-check.js +0 -30
  155. package/dist/scripts/codex-0-137-compat-check.js +0 -27
  156. package/dist/scripts/codex-app-fast-ui-preservation-check.js +0 -32
  157. package/dist/scripts/codex-app-provider-badge-check.js +0 -37
  158. package/dist/scripts/codex-app-ui-clobber-guard-check.js +0 -22
  159. package/dist/scripts/codex-app-ui-preservation-check.js +0 -96
  160. package/dist/scripts/codex-control-all-pipelines-check.js +0 -36
  161. package/dist/scripts/codex-control-capability-check.js +0 -10
  162. package/dist/scripts/codex-control-empty-result-retry-check.js +0 -43
  163. package/dist/scripts/codex-control-event-stream-ledger-check.js +0 -10
  164. package/dist/scripts/codex-control-keepalive-no-cot-leak-check.js +0 -14
  165. package/dist/scripts/codex-control-no-legacy-fallback-check.js +0 -31
  166. package/dist/scripts/codex-control-side-effect-scope-check.js +0 -26
  167. package/dist/scripts/codex-control-stream-idle-watchdog-check.js +0 -18
  168. package/dist/scripts/codex-control-structured-output-check.js +0 -11
  169. package/dist/scripts/codex-control-thread-registry-check.js +0 -11
  170. package/dist/scripts/codex-control-tool-call-sequence-repair-check.js +0 -14
  171. package/dist/scripts/codex-environment-scoped-approvals-check.js +0 -10
  172. package/dist/scripts/codex-exec-output-schema-actual-syntax-check.js +0 -33
  173. package/dist/scripts/codex-fast-mode-profile-propagation-check.js +0 -12
  174. package/dist/scripts/codex-history-search-check.js +0 -19
  175. package/dist/scripts/codex-hook-semantic-check.js +0 -15
  176. package/dist/scripts/codex-hook-strict-subset-check.js +0 -61
  177. package/dist/scripts/codex-lb-config-toml-safety-check.js +0 -85
  178. package/dist/scripts/codex-lb-persistence-truth-check.js +0 -96
  179. package/dist/scripts/codex-lb-setup-fixture-check.js +0 -91
  180. package/dist/scripts/codex-lb-setup-truthfulness-check.js +0 -84
  181. package/dist/scripts/codex-legacy-profile-consumers-removed-check.js +0 -24
  182. package/dist/scripts/codex-managed-proxy-env-check.js +0 -17
  183. package/dist/scripts/codex-output-schema-fixture-check.js +0 -25
  184. package/dist/scripts/codex-permission-profiles-check.js +0 -36
  185. package/dist/scripts/codex-plugin-list-json-check.js +0 -8
  186. package/dist/scripts/codex-profile-primary-check.js +0 -13
  187. package/dist/scripts/codex-project-config-policy-splitter-check.js +0 -51
  188. package/dist/scripts/codex-resume-cwd-truth-check.js +0 -17
  189. package/dist/scripts/codex-sdk-all-pipelines-check.js +0 -32
  190. package/dist/scripts/codex-sdk-backend-router-check.js +0 -65
  191. package/dist/scripts/codex-sdk-capability-check.js +0 -11
  192. package/dist/scripts/codex-sdk-core-skill-pipeline-check.js +0 -9
  193. package/dist/scripts/codex-sdk-dfix-pipeline-check.js +0 -9
  194. package/dist/scripts/codex-sdk-event-stream-ledger-check.js +0 -9
  195. package/dist/scripts/codex-sdk-no-legacy-fallback-check.js +0 -33
  196. package/dist/scripts/codex-sdk-qa-pipeline-check.js +0 -8
  197. package/dist/scripts/codex-sdk-real-smoke-check.js +0 -39
  198. package/dist/scripts/codex-sdk-release-review-pipeline-check.js +0 -13
  199. package/dist/scripts/codex-sdk-research-pipeline-check.js +0 -47
  200. package/dist/scripts/codex-sdk-sandbox-policy-check.js +0 -21
  201. package/dist/scripts/codex-sdk-structured-output-check.js +0 -10
  202. package/dist/scripts/codex-sdk-team-naruto-agent-pipeline-check.js +0 -12
  203. package/dist/scripts/codex-sdk-thread-registry-check.js +0 -11
  204. package/dist/scripts/codex-sdk-ux-ppt-review-pipeline-check.js +0 -9
  205. package/dist/scripts/codex-sdk-zellij-pane-binding-check.js +0 -13
  206. package/dist/scripts/codex-thread-runtime-choice-check.js +0 -10
  207. package/dist/scripts/codex-web-adapter-check.js +0 -12
  208. package/dist/scripts/computer-use-live-evidence-check.js +0 -55
  209. package/dist/scripts/computer-use-live-optional-check.js +0 -32
  210. package/dist/scripts/computer-use-policy-check.js +0 -69
  211. package/dist/scripts/computer-use-visual-route-fixture-check.js +0 -37
  212. package/dist/scripts/core-skill-card-schema-check.js +0 -61
  213. package/dist/scripts/core-skill-deployment-snapshot-check.js +0 -54
  214. package/dist/scripts/core-skill-heldout-validation-check.js +0 -49
  215. package/dist/scripts/core-skill-no-inference-optimizer-check.js +0 -75
  216. package/dist/scripts/core-skill-patch-check.js +0 -79
  217. package/dist/scripts/core-skill-promotion-side-effect-ledger-check.js +0 -64
  218. package/dist/scripts/core-skill-rollout-scoring-check.js +0 -72
  219. package/dist/scripts/core-skill-route-runtime-integration-check.js +0 -49
  220. package/dist/scripts/dfix-fast-blackbox-check.js +0 -37
  221. package/dist/scripts/dfix-fast-kernel-check.js +0 -26
  222. package/dist/scripts/dfix-fixture-check.js +0 -6
  223. package/dist/scripts/dfix-parallel-write-blackbox.js +0 -48
  224. package/dist/scripts/dfix-patch-handoff-check.js +0 -13
  225. package/dist/scripts/dfix-patch-swarm-route-blackbox.js +0 -10
  226. package/dist/scripts/dfix-performance-check.js +0 -15
  227. package/dist/scripts/dfix-verification-check.js +0 -9
  228. package/dist/scripts/dfix-verification-recommendation-check.js +0 -15
  229. package/dist/scripts/docs-truthfulness-check.js +0 -61
  230. package/dist/scripts/doctor-codex-doctor-parity-check.js +0 -17
  231. package/dist/scripts/doctor-fix-proves-codex-read-check.js +0 -64
  232. package/dist/scripts/doctor-fix-recovers-corrupted-config-check.js +0 -122
  233. package/dist/scripts/doctor-fixes-codex-app-fast-ui-check.js +0 -39
  234. package/dist/scripts/evidence-fixture-check.js +0 -26
  235. package/dist/scripts/evidence-flagship-coverage-check.js +0 -55
  236. package/dist/scripts/fake-real-proof-policy-v2-check.js +0 -27
  237. package/dist/scripts/fake-vs-real-proof-policy-check.js +0 -14
  238. package/dist/scripts/fast-codex-service-tier-proof-check.js +0 -42
  239. package/dist/scripts/flagship-proof-graph-v2-check.js +0 -48
  240. package/dist/scripts/flagship-proof-graph-v3-check.js +0 -67
  241. package/dist/scripts/flagship-proof-graph-v4-check.js +0 -61
  242. package/dist/scripts/git-precommit-fixture-check.js +0 -41
  243. package/dist/scripts/git-worktree-cache-performance-check.js +0 -25
  244. package/dist/scripts/git-worktree-capability-check.js +0 -27
  245. package/dist/scripts/git-worktree-checkpoint-check.js +0 -20
  246. package/dist/scripts/git-worktree-cleanup-check.js +0 -27
  247. package/dist/scripts/git-worktree-cross-rebase-check.js +0 -39
  248. package/dist/scripts/git-worktree-diff-envelope-check.js +0 -17
  249. package/dist/scripts/git-worktree-diff-export-check.js +0 -43
  250. package/dist/scripts/git-worktree-dirty-lock-check.js +0 -17
  251. package/dist/scripts/git-worktree-dirty-main-detection-check.js +0 -14
  252. package/dist/scripts/git-worktree-integration-primary-check.js +0 -24
  253. package/dist/scripts/git-worktree-integration-primary-runtime-check.js +0 -20
  254. package/dist/scripts/git-worktree-manager-check.js +0 -37
  255. package/dist/scripts/git-worktree-manifest-append-check.js +0 -18
  256. package/dist/scripts/git-worktree-merge-queue-check.js +0 -31
  257. package/dist/scripts/git-worktree-pool-performance-check.js +0 -20
  258. package/dist/scripts/git-worktree-untracked-diff-check.js +0 -18
  259. package/dist/scripts/goal-mode-official-default-check.js +0 -12
  260. package/dist/scripts/gpt-final-arbiter-check.js +0 -63
  261. package/dist/scripts/gpt-final-arbiter-performance-check.js +0 -36
  262. package/dist/scripts/gpt-image-2-request-validator-check.js +0 -35
  263. package/dist/scripts/hooks-0.134-context-parity-check.js +0 -20
  264. package/dist/scripts/hooks-actual-parity-check.js +0 -17
  265. package/dist/scripts/hooks-actual-parity-v2-check.js +0 -21
  266. package/dist/scripts/hooks-latest-schema-check.js +0 -20
  267. package/dist/scripts/hooks-managed-install-fixture-check.js +0 -21
  268. package/dist/scripts/hooks-official-hash-oracle-check.js +0 -35
  269. package/dist/scripts/hooks-official-hash-parity-check.js +0 -17
  270. package/dist/scripts/hooks-subagent-events-check.js +0 -17
  271. package/dist/scripts/hooks-trust-state-check.js +0 -14
  272. package/dist/scripts/image-fidelity-fixture-check.js +0 -24
  273. package/dist/scripts/imagegen-capability-check.js +0 -30
  274. package/dist/scripts/imagegen-real-smoke-check.js +0 -155
  275. package/dist/scripts/install-update-preserves-config-check.js +0 -87
  276. package/dist/scripts/json-schema-recursive-check.js +0 -78
  277. package/dist/scripts/legacy-multiagent-removal-check.js +0 -85
  278. package/dist/scripts/legacy-upgrade-matrix-check.js +0 -300
  279. package/dist/scripts/local-collab-all-pipelines-final-gpt-check.js +0 -21
  280. package/dist/scripts/local-collab-gpt-final-availability-check.js +0 -58
  281. package/dist/scripts/local-collab-no-local-only-final-check.js +0 -27
  282. package/dist/scripts/local-collab-policy-check.js +0 -17
  283. package/dist/scripts/local-collab-worktree-gpt-final-apply-policy-check.js +0 -63
  284. package/dist/scripts/local-llm-all-pipelines-check.js +0 -11
  285. package/dist/scripts/local-llm-cache-performance-check.js +0 -10
  286. package/dist/scripts/local-llm-capability-check.js +0 -14
  287. package/dist/scripts/local-llm-smoke-check.js +0 -23
  288. package/dist/scripts/local-llm-structured-output-check.js +0 -11
  289. package/dist/scripts/local-llm-throughput-check.js +0 -10
  290. package/dist/scripts/local-llm-tool-call-repair-check.js +0 -10
  291. package/dist/scripts/local-llm-warmup-check.js +0 -11
  292. package/dist/scripts/loop-blocker-check.js +0 -15
  293. package/dist/scripts/mad-preflight-blocks-unreadable-config-check.js +0 -35
  294. package/dist/scripts/mad-sks-actual-executor-blackbox.js +0 -5
  295. package/dist/scripts/mad-sks-app-ui-no-mutation-check.js +0 -92
  296. package/dist/scripts/mad-sks-audit-proof-check.js +0 -34
  297. package/dist/scripts/mad-sks-db-executor-check.js +0 -5
  298. package/dist/scripts/mad-sks-executor-proof-graph-check.js +0 -5
  299. package/dist/scripts/mad-sks-fast-mode-propagation-check.js +0 -24
  300. package/dist/scripts/mad-sks-file-write-executor-check.js +0 -5
  301. package/dist/scripts/mad-sks-immutable-harness-check.js +0 -36
  302. package/dist/scripts/mad-sks-no-harness-modification-check.js +0 -25
  303. package/dist/scripts/mad-sks-package-executor-check.js +0 -5
  304. package/dist/scripts/mad-sks-permission-model-check.js +0 -22
  305. package/dist/scripts/mad-sks-rollback-apply-check.js +0 -5
  306. package/dist/scripts/mad-sks-service-executor-check.js +0 -5
  307. package/dist/scripts/mad-sks-shell-executor-check.js +0 -5
  308. package/dist/scripts/mad-sks-write-guard-check.js +0 -28
  309. package/dist/scripts/mad-sks-zellij-default-pane-worker-check.js +0 -37
  310. package/dist/scripts/mad-sks-zellij-launch-check.js +0 -102
  311. package/dist/scripts/mcp-0-134-modernization-check.js +0 -55
  312. package/dist/scripts/mcp-readonly-concurrency-check.js +0 -17
  313. package/dist/scripts/mcp-readonly-runtime-scheduler-check.js +0 -20
  314. package/dist/scripts/mcp-tool-naming-parity-check.js +0 -16
  315. package/dist/scripts/memory-summary-rebuild-check.js +0 -22
  316. package/dist/scripts/mutation-callsite-coverage-check.js +0 -180
  317. package/dist/scripts/naruto-active-pool-check.js +0 -39
  318. package/dist/scripts/naruto-actual-worker-control-plane-check.js +0 -56
  319. package/dist/scripts/naruto-allocation-policy-check.js +0 -33
  320. package/dist/scripts/naruto-allocation-runtime-wiring-check.js +0 -92
  321. package/dist/scripts/naruto-concurrency-governor-check.js +0 -53
  322. package/dist/scripts/naruto-extreme-parallelism-check.js +0 -22
  323. package/dist/scripts/naruto-extreme-parallelism-real-check.js +0 -43
  324. package/dist/scripts/naruto-gpt-final-pack-check.js +0 -34
  325. package/dist/scripts/naruto-orchestrator-runtime-source-check.js +0 -70
  326. package/dist/scripts/naruto-parallel-patch-apply-check.js +0 -41
  327. package/dist/scripts/naruto-readonly-routing-check.js +0 -116
  328. package/dist/scripts/naruto-real-active-pool-check.js +0 -39
  329. package/dist/scripts/naruto-real-active-pool-runtime-check.js +0 -55
  330. package/dist/scripts/naruto-rebalance-policy-check.js +0 -41
  331. package/dist/scripts/naruto-role-distribution-check.js +0 -23
  332. package/dist/scripts/naruto-shadow-clone-swarm-check.js +0 -153
  333. package/dist/scripts/naruto-verification-pool-check.js +0 -36
  334. package/dist/scripts/naruto-work-graph-check.js +0 -24
  335. package/dist/scripts/naruto-worktree-coding-blackbox.js +0 -29
  336. package/dist/scripts/naruto-worktree-coding-check.js +0 -44
  337. package/dist/scripts/naruto-worktree-gpt-final-check.js +0 -45
  338. package/dist/scripts/naruto-worktree-zellij-ui-check.js +0 -28
  339. package/dist/scripts/naruto-zellij-dynamic-right-column-check.js +0 -48
  340. package/dist/scripts/naruto-zellij-massive-ui-check.js +0 -23
  341. package/dist/scripts/non-recursive-pipeline-check.js +0 -68
  342. package/dist/scripts/npm-publish-performance-check.js +0 -65
  343. package/dist/scripts/official-docs-compat-report.js +0 -304
  344. package/dist/scripts/packlist-performance-check.js +0 -83
  345. package/dist/scripts/parallel-verification-engine-check.js +0 -85
  346. package/dist/scripts/postinstall-safe-side-effects-check.js +0 -65
  347. package/dist/scripts/ppt-full-e2e-artifact-graph-check.js +0 -40
  348. package/dist/scripts/ppt-full-e2e-blackbox-check.js +0 -109
  349. package/dist/scripts/ppt-image-voxel-relations-check.js +0 -9
  350. package/dist/scripts/ppt-imagegen-blackbox-check.js +0 -46
  351. package/dist/scripts/ppt-imagegen-review-fixture-check.js +0 -6
  352. package/dist/scripts/ppt-issue-extraction-fixture-check.js +0 -7
  353. package/dist/scripts/ppt-no-mock-as-real-check.js +0 -8
  354. package/dist/scripts/ppt-no-text-fallback-check.js +0 -7
  355. package/dist/scripts/ppt-proof-trust-fixture-check.js +0 -10
  356. package/dist/scripts/ppt-real-export-adapter-check.js +0 -13
  357. package/dist/scripts/ppt-real-imagegen-smoke-check.js +0 -42
  358. package/dist/scripts/ppt-real-imagegen-wiring-check.js +0 -16
  359. package/dist/scripts/ppt-reexport-rereview-check.js +0 -19
  360. package/dist/scripts/ppt-slide-export-fixture-check.js +0 -7
  361. package/dist/scripts/prepublish-fast-check.js +0 -128
  362. package/dist/scripts/priority-full-closure-check.js +0 -12
  363. package/dist/scripts/product-design-auto-install-check.js +0 -119
  364. package/dist/scripts/product-design-plugin-routing-check.js +0 -101
  365. package/dist/scripts/prompt-placeholder-guard-check.js +0 -33
  366. package/dist/scripts/provider-badge-context-check.js +0 -26
  367. package/dist/scripts/provider-context-config-toml-check.js +0 -63
  368. package/dist/scripts/python-codex-sdk-all-pipelines-check.js +0 -47
  369. package/dist/scripts/python-codex-sdk-capability-check.js +0 -75
  370. package/dist/scripts/python-codex-sdk-sandbox-policy-check.js +0 -10
  371. package/dist/scripts/python-codex-sdk-stream-bridge-check.js +0 -12
  372. package/dist/scripts/python-tools-smoke-check.js +0 -71
  373. package/dist/scripts/qa-actual-route-backfill-check.js +0 -5
  374. package/dist/scripts/qa-backfill-route-blackbox.js +0 -5
  375. package/dist/scripts/qa-patch-swarm-route-blackbox.js +0 -10
  376. package/dist/scripts/readme-architecture-imagegen-official-check.js +0 -448
  377. package/dist/scripts/release-cache-glob-hashing-check.js +0 -42
  378. package/dist/scripts/release-dag-full-coverage-check.js +0 -66
  379. package/dist/scripts/release-dist-freshness-check.js +0 -8
  380. package/dist/scripts/release-dynamic-performance-check.js +0 -103
  381. package/dist/scripts/release-gate-budget-check.js +0 -36
  382. package/dist/scripts/release-gate-dag-runner-check.js +0 -17
  383. package/dist/scripts/release-metadata-1-11-check.js +0 -37
  384. package/dist/scripts/release-metadata-1-12-check.js +0 -48
  385. package/dist/scripts/release-metadata-1-13-check.js +0 -53
  386. package/dist/scripts/release-metadata-1-14-check.js +0 -63
  387. package/dist/scripts/release-metadata-1-16-check.js +0 -81
  388. package/dist/scripts/release-metadata-1-17-check.js +0 -51
  389. package/dist/scripts/release-metadata-1-19-check.js +0 -371
  390. package/dist/scripts/release-metadata-check.js +0 -7
  391. package/dist/scripts/release-native-agent-fixture-check.js +0 -41
  392. package/dist/scripts/release-parallel-check.js +0 -374
  393. package/dist/scripts/release-parallel-full-coverage-check.js +0 -13
  394. package/dist/scripts/release-parallel-speed-budget-check.js +0 -84
  395. package/dist/scripts/release-provenance-check.js +0 -150
  396. package/dist/scripts/release-real-check.js +0 -330
  397. package/dist/scripts/release-registry-check.js +0 -344
  398. package/dist/scripts/release-runtime-truth-matrix-check.js +0 -47
  399. package/dist/scripts/release-stability-report-check.js +0 -99
  400. package/dist/scripts/release-version-truth-check.js +0 -134
  401. package/dist/scripts/research-actual-route-backfill-check.js +0 -5
  402. package/dist/scripts/research-backfill-route-blackbox.js +0 -5
  403. package/dist/scripts/research-blueprint-densifier-check.js +0 -21
  404. package/dist/scripts/research-claim-builder-check.js +0 -19
  405. package/dist/scripts/research-complete-package-fixture-check.js +0 -23
  406. package/dist/scripts/research-final-reviewer-blackbox.js +0 -22
  407. package/dist/scripts/research-parallel-source-shards-check.js +0 -22
  408. package/dist/scripts/research-quality-gate-check.js +0 -111
  409. package/dist/scripts/research-real-cycle-no-legacy-final-md-check.js +0 -14
  410. package/dist/scripts/research-short-report-rejection-check.js +0 -46
  411. package/dist/scripts/research-source-ledger-merge-check.js +0 -26
  412. package/dist/scripts/research-stage-cycle-runtime-blackbox.js +0 -24
  413. package/dist/scripts/responses-retry-policy-centralized-check.js +0 -19
  414. package/dist/scripts/retention-cleanup-safety-check.js +0 -155
  415. package/dist/scripts/route-blackbox-realism-check.js +0 -21
  416. package/dist/scripts/route-proof-artifact-structure-check.js +0 -145
  417. package/dist/scripts/runtime-dist-parity-check.js +0 -78
  418. package/dist/scripts/runtime-no-mjs-scripts-check.js +0 -45
  419. package/dist/scripts/runtime-no-src-mjs-check.js +0 -32
  420. package/dist/scripts/runtime-no-tmux-check.js +0 -113
  421. package/dist/scripts/runtime-ts-python-boundary-check.js +0 -59
  422. package/dist/scripts/runtime-ts-rust-boundary-check.js +0 -74
  423. package/dist/scripts/runtime-ts-source-of-truth-check.js +0 -55
  424. package/dist/scripts/safety-check.js +0 -23
  425. package/dist/scripts/shared-memory-fixture-check.js +0 -27
  426. package/dist/scripts/side-effect-runtime-report-check.js +0 -19
  427. package/dist/scripts/side-effect-zero-gate-check.js +0 -226
  428. package/dist/scripts/sks-1-11-fixture-check.js +0 -130
  429. package/dist/scripts/source-intelligence-all-modes-check.js +0 -32
  430. package/dist/scripts/source-intelligence-policy-check.js +0 -13
  431. package/dist/scripts/strategy-adhd-orchestrating-gate-check.js +0 -22
  432. package/dist/scripts/strategy-file-ownership-plan-check.js +0 -18
  433. package/dist/scripts/strategy-parallel-modification-plan-check.js +0 -19
  434. package/dist/scripts/strategy-verification-rollback-dag-check.js +0 -19
  435. package/dist/scripts/team-actual-route-backfill-check.js +0 -5
  436. package/dist/scripts/team-backfill-route-blackbox.js +0 -5
  437. package/dist/scripts/team-parallel-write-blackbox.js +0 -55
  438. package/dist/scripts/team-patch-swarm-route-blackbox.js +0 -10
  439. package/dist/scripts/terminal-keyboard-enhancement-safety-check.js +0 -12
  440. package/dist/scripts/terminal-tui-output-stability-check.js +0 -35
  441. package/dist/scripts/test-no-orphan-dist-imports-check.js +0 -73
  442. package/dist/scripts/trust-fixture-check.js +0 -33
  443. package/dist/scripts/typescript-migration-report.js +0 -78
  444. package/dist/scripts/ultra-router-auto-router-check.js +0 -33
  445. package/dist/scripts/ultra-router-classification-check.js +0 -28
  446. package/dist/scripts/ux-patch-swarm-route-blackbox.js +0 -10
  447. package/dist/scripts/ux-ppt-structured-extraction-check.js +0 -21
  448. package/dist/scripts/ux-review-extract-real-callouts-fixture-check.js +0 -8
  449. package/dist/scripts/ux-review-extract-wires-real-extractor-check.js +0 -15
  450. package/dist/scripts/ux-review-generate-callouts-fixture-check.js +0 -9
  451. package/dist/scripts/ux-review-image-voxel-relations-check.js +0 -31
  452. package/dist/scripts/ux-review-imagegen-blackbox-check.js +0 -67
  453. package/dist/scripts/ux-review-no-fake-callouts-check.js +0 -8
  454. package/dist/scripts/ux-review-no-text-fallback-check.js +0 -25
  455. package/dist/scripts/ux-review-patch-diff-recheck-check.js +0 -20
  456. package/dist/scripts/ux-review-patch-handoff-fixture-check.js +0 -8
  457. package/dist/scripts/ux-review-real-imagegen-smoke-check.js +0 -31
  458. package/dist/scripts/ux-review-real-loop-fixture-check.js +0 -24
  459. package/dist/scripts/ux-review-recapture-recheck-fixture-check.js +0 -8
  460. package/dist/scripts/ux-review-run-wires-imagegen-check.js +0 -11
  461. package/dist/scripts/worker-pane-communication-contract-check.js +0 -54
  462. package/dist/scripts/wrongness-fixture-check.js +0 -65
  463. package/dist/scripts/xai-mcp-capability-check.js +0 -14
  464. package/dist/scripts/zellij-capability-check.js +0 -15
  465. package/dist/scripts/zellij-dashboard-pane-check.js +0 -70
  466. package/dist/scripts/zellij-developer-controls-check.js +0 -20
  467. package/dist/scripts/zellij-doctor-readiness-check.js +0 -63
  468. package/dist/scripts/zellij-dynamic-pane-lifecycle-check.js +0 -21
  469. package/dist/scripts/zellij-first-slot-down-stack-check.js +0 -20
  470. package/dist/scripts/zellij-first-slot-down-stack-real-check.js +0 -356
  471. package/dist/scripts/zellij-initial-main-only-blackbox.js +0 -28
  472. package/dist/scripts/zellij-lane-renderer-check.js +0 -65
  473. package/dist/scripts/zellij-launch-command-truth-check.js +0 -75
  474. package/dist/scripts/zellij-layout-valid-check.js +0 -90
  475. package/dist/scripts/zellij-pane-proof-check.js +0 -59
  476. package/dist/scripts/zellij-real-session-cleanup-check.js +0 -21
  477. package/dist/scripts/zellij-real-session-heartbeat-check.js +0 -49
  478. package/dist/scripts/zellij-real-session-launch-check.js +0 -57
  479. package/dist/scripts/zellij-right-column-headless-overflow-check.js +0 -22
  480. package/dist/scripts/zellij-right-column-manager-check.js +0 -27
  481. package/dist/scripts/zellij-screen-proof-check.js +0 -45
  482. package/dist/scripts/zellij-slot-column-anchor-check.js +0 -66
  483. package/dist/scripts/zellij-slot-only-ui-check.js +0 -26
  484. package/dist/scripts/zellij-slot-pane-renderer-check.js +0 -106
  485. package/dist/scripts/zellij-slot-renderer-proof-semantics-check.js +0 -59
  486. package/dist/scripts/zellij-spawn-on-demand-layout-check.js +0 -40
  487. package/dist/scripts/zellij-ui-design-check.js +0 -105
  488. package/dist/scripts/zellij-worker-pane-manager-check.js +0 -109
  489. package/dist/scripts/zellij-worker-pane-manager-single-owner-check.js +0 -47
  490. package/dist/scripts/zellij-worker-pane-real-ui-blackbox.js +0 -202
  491. package/dist/scripts/zellij-worker-pane-spawn-order-check.js +0 -35
@@ -1,448 +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 { createHash } from 'node:crypto';
7
- import { execFileSync } from 'node:child_process';
8
- import { writeTextAtomic } from '../core/fsx.js';
9
- const root = process.cwd();
10
- const args = process.argv.slice(2);
11
- const reportPath = path.join(root, '.sneakoscope', 'reports', 'readme-architecture-imagegen-attempt-1.18.8.json');
12
- const promptPath = path.join(root, '.sneakoscope', 'reports', 'readme-architecture-imagegen-prompt-1.18.8.txt');
13
- const assetPath = path.join(root, 'docs', 'assets', 'sneakoscope-architecture-pipeline.jpg');
14
- const promptOnly = hasFlag('--print-prompt') || hasFlag('--prompt-only');
15
- const suppliedOutput = String(argValue('--output', process.env.SKS_CODEX_APP_IMAGEGEN_OUTPUT || '')).trim();
16
- const suppliedModel = String(argValue('--model', process.env.SKS_CODEX_APP_IMAGEGEN_MODEL || 'gpt-image-2')).trim();
17
- const suppliedSurface = String(argValue('--surface', process.env.SKS_CODEX_APP_IMAGEGEN_SURFACE || 'codex_app_imagegen')).trim();
18
- const suppliedOutputId = String(argValue('--output-id', process.env.SKS_CODEX_APP_IMAGEGEN_OUTPUT_ID || '')).trim() || null;
19
- const suppliedCreatedAt = String(argValue('--created-at', process.env.SKS_CODEX_APP_IMAGEGEN_CREATED_AT || '')).trim() || null;
20
- const autoPickLatest = hasFlag('--auto-pick-latest') || String(process.env.SKS_CODEX_APP_IMAGEGEN_AUTOPICK_LATEST || '').trim() === '1';
21
- const waitMs = nonNegativeInt(argValue('--wait-ms', process.env.SKS_CODEX_APP_IMAGEGEN_WAIT_MS), 0);
22
- const pollMs = Math.max(50, nonNegativeInt(argValue('--poll-ms', process.env.SKS_CODEX_APP_IMAGEGEN_POLL_MS), 1000));
23
- const hostToolExposed = String(process.env.SKS_CODEX_APP_IMAGEGEN_TOOL_EXPOSED || '').trim() === '1';
24
- const codexHome = String(process.env.CODEX_HOME || path.join(os.homedir(), '.codex'));
25
- const generatedImagesRoot = path.join(codexHome, 'generated_images');
26
- const promptExistedBeforeRun = fs.existsSync(promptPath);
27
- const codexFeatureEvidence = detectCodexImageGenerationFeature();
28
- const prompt = `Use case: infographic-diagram
29
- Asset type: README architecture hero image for Sneakoscope Codex
30
- Primary request: Use ChatGPT Images 2.0 / GPT Image 2.0 with gpt-image-2 to generate a polished, abstract architecture flow summary image for SKS 1.18.8.
31
- Content intent: Show Codex App, SKS runtime, Team/Goal routing, MAD-SKS scoped permission widening, gpt-image-2 image evidence, validation gates, and release readiness as connected layers.
32
- Visual constraints: 16:9 or wide landscape, premium technical product style, no logos, no mascot, no tiny unreadable text, no fake UI screenshots, no dark stock-photo look, no placeholder glyph soup.
33
- Output requirement: real Codex App $imagegen/gpt-image-2 raster output. Save the selected output path, then run:
34
- SKS_CODEX_APP_IMAGEGEN_OUTPUT=<path> SKS_CODEX_APP_IMAGEGEN_MODEL=gpt-image-2 SKS_CODEX_APP_IMAGEGEN_SURFACE=codex_app_imagegen npm run imagegen:readme-architecture
35
- Use the selected file directly under $CODEX_HOME/generated_images; moved or copied files are not accepted as provenance evidence.
36
- `;
37
- await fs.promises.mkdir(path.dirname(reportPath), { recursive: true });
38
- const promptWrite = await ensurePromptContract();
39
- const promptMeta = await textArtifactMeta(promptPath, promptWrite);
40
- const previousAsset = await imageMeta(assetPath).catch((err) => ({
41
- ok: false,
42
- path: assetPath,
43
- error: err instanceof Error ? err.message : String(err)
44
- }));
45
- let generatedImagesAudit = await scanGeneratedImages(generatedImagesRoot);
46
- let autoPickedOutput = null;
47
- let waitResult = null;
48
- if (promptOnly) {
49
- const report = baseReport({
50
- ok: true,
51
- status: 'prompt_ready',
52
- blocker: null,
53
- prompt_path: relative(promptPath),
54
- setup_guidance: 'Paste this prompt into Codex App $imagegen. After a real gpt-image-2 output appears under $CODEX_HOME/generated_images, rerun this script with --output <path> or --auto-pick-latest when exactly one current candidate exists.',
55
- previous_asset: previousAsset,
56
- existing_asset_overwritten: false
57
- });
58
- await writeReport(report);
59
- console.log(JSON.stringify({ ...report, prompt }, null, 2));
60
- process.exit(0);
61
- }
62
- if (promptWrite.changed && suppliedOutput) {
63
- const report = baseReport({
64
- ok: false,
65
- status: 'blocked',
66
- blocker: 'prompt_contract_changed_regenerate_image_required',
67
- prompt_path: relative(promptPath),
68
- setup_guidance: 'The README architecture image prompt changed. Regenerate with Codex App $imagegen/gpt-image-2 using the updated prompt artifact, then rerun this script.',
69
- previous_asset: previousAsset,
70
- existing_asset_overwritten: false
71
- });
72
- await writeReport(report);
73
- console.log(JSON.stringify(report, null, 2));
74
- process.exit(1);
75
- }
76
- autoPickedOutput = !suppliedOutput && autoPickLatest ? autoPickCurrentGeneratedImage(generatedImagesAudit) : null;
77
- if (!suppliedOutput && !autoPickedOutput && waitMs > 0) {
78
- waitResult = await waitForCurrentGeneratedImage(waitMs, pollMs);
79
- generatedImagesAudit = waitResult.audit;
80
- autoPickedOutput = waitResult.output;
81
- }
82
- const effectiveOutput = suppliedOutput || autoPickedOutput?.absolute_path || '';
83
- if (!effectiveOutput) {
84
- const blocker = missingOutputBlocker(generatedImagesAudit);
85
- const report = baseReport({
86
- ok: false,
87
- status: 'blocked',
88
- blocker,
89
- prompt_path: relative(promptPath),
90
- setup_guidance: blocker === 'official_codex_app_imagegen_output_ambiguous'
91
- ? 'Multiple current generated_images candidates exist. Rerun with SKS_CODEX_APP_IMAGEGEN_OUTPUT pointing at the selected Codex App $imagegen/gpt-image-2 raster file.'
92
- : 'Invoke Codex App $imagegen/gpt-image-2 with the prompt artifact, then rerun this script with SKS_CODEX_APP_IMAGEGEN_OUTPUT pointing at the generated raster file or SKS_CODEX_APP_IMAGEGEN_AUTOPICK_LATEST=1 when exactly one current candidate exists.',
93
- previous_asset: previousAsset,
94
- existing_asset_overwritten: false
95
- });
96
- await writeReport(report);
97
- console.log(JSON.stringify(report, null, 2));
98
- process.exitCode = 1;
99
- }
100
- else {
101
- const sourcePath = path.resolve(root, effectiveOutput);
102
- const source = await imageMeta(sourcePath).catch((err) => ({
103
- ok: false,
104
- path: sourcePath,
105
- error: err instanceof Error ? err.message : String(err)
106
- }));
107
- const validation = validateSource(source, suppliedModel, suppliedSurface);
108
- if (!validation.ok) {
109
- const report = baseReport({
110
- ok: false,
111
- status: 'blocked',
112
- blocker: 'official_codex_app_imagegen_output_invalid',
113
- prompt_path: relative(promptPath),
114
- validation,
115
- supplied_output: source,
116
- previous_asset: previousAsset,
117
- existing_asset_overwritten: false
118
- });
119
- await writeReport(report);
120
- console.log(JSON.stringify(report, null, 2));
121
- process.exitCode = 1;
122
- }
123
- else {
124
- await fs.promises.copyFile(sourcePath, assetPath);
125
- const updatedAsset = await imageMeta(assetPath);
126
- const report = baseReport({
127
- ok: true,
128
- status: 'replaced',
129
- blocker: null,
130
- prompt_path: relative(promptPath),
131
- validation,
132
- supplied_output: source,
133
- previous_asset: previousAsset,
134
- updated_asset: updatedAsset,
135
- existing_asset_overwritten: true
136
- });
137
- await writeReport(report);
138
- console.log(JSON.stringify(report, null, 2));
139
- }
140
- }
141
- async function ensurePromptContract() {
142
- if (!promptExistedBeforeRun) {
143
- await writeTextAtomic(promptPath, prompt);
144
- return { changed: true, reason: 'created' };
145
- }
146
- const existing = await fs.promises.readFile(promptPath, 'utf8').catch(() => null);
147
- if (existing !== prompt) {
148
- await writeTextAtomic(promptPath, prompt);
149
- return { changed: true, reason: 'refreshed_prompt_changed' };
150
- }
151
- return { changed: false, reason: 'unchanged' };
152
- }
153
- async function waitForCurrentGeneratedImage(timeoutMs, intervalMs) {
154
- const startedAt = Date.now();
155
- let audit = generatedImagesAudit;
156
- let output = autoPickCurrentGeneratedImage(audit);
157
- while (!output && Date.now() - startedAt < timeoutMs) {
158
- await sleep(Math.min(intervalMs, Math.max(0, timeoutMs - (Date.now() - startedAt))));
159
- audit = await scanGeneratedImages(generatedImagesRoot);
160
- output = autoPickCurrentGeneratedImage(audit);
161
- }
162
- return {
163
- waited_ms: Date.now() - startedAt,
164
- timeout_ms: timeoutMs,
165
- poll_ms: intervalMs,
166
- timed_out: !output,
167
- output,
168
- audit
169
- };
170
- }
171
- function sleep(ms) {
172
- return new Promise((resolve) => setTimeout(resolve, ms));
173
- }
174
- function missingOutputBlocker(audit) {
175
- if ((autoPickLatest || waitMs > 0) && Number(audit?.current_request_candidate_count || 0) > 1) {
176
- return 'official_codex_app_imagegen_output_ambiguous';
177
- }
178
- return 'official_codex_app_imagegen_output_missing';
179
- }
180
- function nonNegativeInt(value, fallback) {
181
- const parsed = Number.parseInt(String(value ?? ''), 10);
182
- return Number.isFinite(parsed) && parsed >= 0 ? parsed : fallback;
183
- }
184
- function baseReport(extra) {
185
- return {
186
- schema: 'sks.readme-architecture-imagegen-attempt.v1',
187
- generated_at: new Date().toISOString(),
188
- requested_asset: 'docs/assets/sneakoscope-architecture-pipeline.jpg',
189
- model: 'gpt-image-2',
190
- skill_surface: 'Official Codex App $imagegen/gpt-image-2 required; API/codex-lb fallback is non-Codex evidence',
191
- codex_app_image_generation_feature_detected: codexFeatureEvidence.image_generation === true,
192
- codex_app_image_generation_feature_evidence: codexFeatureEvidence,
193
- codex_app_builtin_tool_exposed_to_this_turn: hostToolExposed,
194
- codex_app_builtin_tool_exposure_source: hostToolExposed
195
- ? 'SKS_CODEX_APP_IMAGEGEN_TOOL_EXPOSED=1'
196
- : 'not exposed to this script/tool context; only an actual Codex App $imagegen output can satisfy replacement evidence',
197
- official_docs_checked: [
198
- 'https://developers.openai.com/codex/app/features#image-generation',
199
- 'https://deploymentsafety.openai.com/chatgpt-images-2-0',
200
- 'https://openai.com/index/introducing-chatgpt-images-2-0/',
201
- 'https://developers.openai.com/api/docs/guides/image-generation',
202
- 'https://developers.openai.com/api/docs/guides/tools-image-generation?lang=javascript',
203
- 'https://developers.openai.com/api/docs/models/gpt-image-2'
204
- ],
205
- input_contract: {
206
- env_output: 'SKS_CODEX_APP_IMAGEGEN_OUTPUT',
207
- env_model: 'SKS_CODEX_APP_IMAGEGEN_MODEL=gpt-image-2',
208
- env_surface: 'SKS_CODEX_APP_IMAGEGEN_SURFACE=codex_app_imagegen',
209
- env_output_id: 'SKS_CODEX_APP_IMAGEGEN_OUTPUT_ID optional_metadata_only',
210
- env_created_at: 'SKS_CODEX_APP_IMAGEGEN_CREATED_AT optional_metadata_only',
211
- env_auto_pick_latest: 'SKS_CODEX_APP_IMAGEGEN_AUTOPICK_LATEST=1 optional_after_prompt_generated_images_pick',
212
- env_wait_ms: 'SKS_CODEX_APP_IMAGEGEN_WAIT_MS optional_wait_for_after_prompt_generated_images_candidate',
213
- env_poll_ms: 'SKS_CODEX_APP_IMAGEGEN_POLL_MS optional_wait_poll_interval',
214
- cli_prompt_only: '--print-prompt or --prompt-only',
215
- cli_output: '--output <path>',
216
- cli_model: '--model gpt-image-2',
217
- cli_surface: '--surface codex_app_imagegen',
218
- cli_auto_pick_latest: '--auto-pick-latest',
219
- cli_wait_ms: '--wait-ms <milliseconds>',
220
- cli_poll_ms: '--poll-ms <milliseconds>',
221
- output_id: suppliedOutputId,
222
- created_at: suppliedCreatedAt,
223
- prompt_only: promptOnly,
224
- auto_pick_latest: autoPickLatest,
225
- auto_pick_result: autoPickedOutput,
226
- wait_ms: waitMs,
227
- poll_ms: pollMs,
228
- wait_result: waitResult,
229
- moved_outputs_accepted: false,
230
- api_or_codex_lb_fallback_allowed: false
231
- },
232
- prompt_contract: promptMeta,
233
- codex_generated_images_audit: generatedImagesAudit,
234
- ...extra
235
- };
236
- }
237
- function autoPickCurrentGeneratedImage(audit) {
238
- const candidates = Array.isArray(audit.current_request_candidates) ? audit.current_request_candidates : [];
239
- if (candidates.length !== 1)
240
- return null;
241
- return candidates[0];
242
- }
243
- function hasFlag(name) {
244
- return args.includes(name);
245
- }
246
- function argValue(name, fallback = '') {
247
- const exactIndex = args.indexOf(name);
248
- if (exactIndex >= 0 && exactIndex + 1 < args.length)
249
- return args[exactIndex + 1];
250
- const prefix = `${name}=`;
251
- const found = args.find((arg) => String(arg).startsWith(prefix));
252
- return found ? String(found).slice(prefix.length) : fallback;
253
- }
254
- function detectCodexImageGenerationFeature() {
255
- try {
256
- const stdout = execFileSync('codex', ['features', 'list'], { encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] });
257
- const imageLine = stdout.split(/\r?\n/).find((line) => /^image_generation\s+/i.test(line.trim())) || '';
258
- return {
259
- checked: true,
260
- detector: 'codex features list',
261
- image_generation: /\bstable\b\s+true\b/i.test(imageLine),
262
- image_generation_line: imageLine || null
263
- };
264
- }
265
- catch (err) {
266
- return {
267
- checked: true,
268
- detector: 'codex features list',
269
- image_generation: false,
270
- error: err instanceof Error ? err.message : String(err)
271
- };
272
- }
273
- }
274
- function validateSource(source, model, surface) {
275
- const blockers = [];
276
- const sourceUnderGeneratedImages = source.absolute_path
277
- ? source.absolute_path.startsWith(`${path.resolve(generatedImagesRoot)}${path.sep}`)
278
- : false;
279
- if (source.ok !== true)
280
- blockers.push('source_image_missing_or_unreadable');
281
- if (model !== 'gpt-image-2')
282
- blockers.push('model_must_be_gpt_image_2');
283
- if (surface !== 'codex_app_imagegen')
284
- blockers.push('surface_must_be_codex_app_imagegen');
285
- if (!sourceUnderGeneratedImages)
286
- blockers.push('codex_app_output_must_reside_under_generated_images');
287
- const createdAtMs = suppliedCreatedAt ? Date.parse(suppliedCreatedAt) : null;
288
- if (suppliedCreatedAt && !Number.isFinite(createdAtMs))
289
- blockers.push('codex_app_created_at_must_be_iso8601');
290
- if (sourceUnderGeneratedImages && Number(source.mtime_ms || 0) < Number(promptMeta.mtime_ms || 0))
291
- blockers.push('generated_image_older_than_prompt_contract');
292
- if (!['jpeg', 'png', 'webp'].includes(String(source.format || '')))
293
- blockers.push('unsupported_image_format');
294
- if (Number(source.width || 0) < 1000 || Number(source.height || 0) < 600)
295
- blockers.push('image_too_small_for_readme_architecture_asset');
296
- return {
297
- ok: blockers.length === 0,
298
- blockers,
299
- required_surface: 'codex_app_imagegen',
300
- required_model: 'gpt-image-2',
301
- generated_images_root: generatedImagesRoot,
302
- source_under_generated_images: sourceUnderGeneratedImages,
303
- output_id_present: Boolean(suppliedOutputId),
304
- created_at_present: Boolean(suppliedCreatedAt),
305
- created_at_ms: Number.isFinite(createdAtMs) ? createdAtMs : null,
306
- prompt_mtime: promptMeta.mtime,
307
- min_dimensions: { width: 1000, height: 600 }
308
- };
309
- }
310
- async function imageMeta(file) {
311
- const stats = await fs.promises.stat(file);
312
- const dims = await imageDimensions(file);
313
- return {
314
- ok: true,
315
- path: relative(file),
316
- absolute_path: path.resolve(file),
317
- sha256: await sha256File(file),
318
- bytes: stats.size,
319
- mtime: stats.mtime.toISOString(),
320
- mtime_ms: stats.mtimeMs,
321
- ...dims
322
- };
323
- }
324
- async function textArtifactMeta(file, promptWrite = null) {
325
- const stats = await fs.promises.stat(file);
326
- return {
327
- path: relative(file),
328
- absolute_path: path.resolve(file),
329
- sha256: await sha256File(file),
330
- bytes: stats.size,
331
- mtime: stats.mtime.toISOString(),
332
- mtime_ms: stats.mtimeMs,
333
- existed_before_run: promptExistedBeforeRun,
334
- write: promptWrite
335
- };
336
- }
337
- async function writeReport(report) {
338
- await writeTextAtomic(reportPath, `${JSON.stringify(report, null, 2)}\n`);
339
- }
340
- async function sha256File(file) {
341
- return new Promise((resolve, reject) => {
342
- const hash = createHash('sha256');
343
- const input = fs.createReadStream(file);
344
- input.on('error', reject);
345
- input.on('data', (chunk) => hash.update(chunk));
346
- input.on('end', () => resolve(hash.digest('hex')));
347
- });
348
- }
349
- async function imageDimensions(file) {
350
- const handle = await fs.promises.open(file, 'r');
351
- try {
352
- const header = Buffer.alloc(32);
353
- const { bytesRead } = await handle.read(header, 0, header.length, 0);
354
- if (bytesRead >= 24 && header.slice(0, 8).equals(Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]))) {
355
- return { width: header.readUInt32BE(16), height: header.readUInt32BE(20), format: 'png' };
356
- }
357
- if (bytesRead >= 12 && header.slice(0, 4).toString('ascii') === 'RIFF' && header.slice(8, 12).toString('ascii') === 'WEBP') {
358
- return await webpDimensions(file);
359
- }
360
- if (bytesRead >= 10 && header[0] === 0xff && header[1] === 0xd8)
361
- return await jpegDimensions(file);
362
- return { width: null, height: null, format: 'unknown' };
363
- }
364
- finally {
365
- await handle.close().catch(() => { });
366
- }
367
- }
368
- async function jpegDimensions(file) {
369
- const buf = await fs.promises.readFile(file);
370
- let offset = 2;
371
- while (offset < buf.length) {
372
- if (buf[offset] !== 0xff)
373
- break;
374
- const marker = buf.readUInt8(offset + 1);
375
- const length = buf.readUInt16BE(offset + 2);
376
- if (marker >= 0xc0 && marker <= 0xc3) {
377
- return { width: buf.readUInt16BE(offset + 7), height: buf.readUInt16BE(offset + 5), format: 'jpeg' };
378
- }
379
- offset += 2 + length;
380
- }
381
- return { width: null, height: null, format: 'jpeg' };
382
- }
383
- async function webpDimensions(file) {
384
- const buf = await fs.promises.readFile(file);
385
- const chunk = buf.slice(12, 16).toString('ascii');
386
- if (chunk === 'VP8X' && buf.length >= 30) {
387
- return {
388
- width: 1 + buf.readUIntLE(24, 3),
389
- height: 1 + buf.readUIntLE(27, 3),
390
- format: 'webp'
391
- };
392
- }
393
- if (chunk === 'VP8 ' && buf.length >= 30) {
394
- return { width: buf.readUInt16LE(26) & 0x3fff, height: buf.readUInt16LE(28) & 0x3fff, format: 'webp' };
395
- }
396
- return { width: null, height: null, format: 'webp' };
397
- }
398
- async function scanGeneratedImages(rootDir) {
399
- const files = await listGeneratedImageFiles(rootDir).catch(() => []);
400
- const rows = [];
401
- for (const file of files) {
402
- const stats = await fs.promises.stat(file).catch(() => null);
403
- if (!stats)
404
- continue;
405
- rows.push({
406
- path: relative(file),
407
- absolute_path: path.resolve(file),
408
- mtime: stats.mtime.toISOString(),
409
- mtime_ms: stats.mtimeMs,
410
- bytes: stats.size
411
- });
412
- }
413
- rows.sort((a, b) => b.mtime_ms - a.mtime_ms);
414
- const currentRequestCandidates = rows.filter((row) => Number(row.mtime_ms || 0) >= Number(promptMeta.mtime_ms || 0));
415
- return {
416
- root: rootDir,
417
- total_png_candidates: rows.length,
418
- latest_candidates: rows.slice(0, 5).map(({ mtime_ms, ...row }) => row),
419
- current_request_candidates: currentRequestCandidates.slice(0, 5),
420
- current_request_candidate_count: currentRequestCandidates.length,
421
- latest_is_current_request_output: currentRequestCandidates.length > 0 && rows[0]?.absolute_path === currentRequestCandidates[0]?.absolute_path,
422
- auto_pick_latest_available: currentRequestCandidates.length === 1,
423
- note: 'Existing files under generated_images are discoverable, but SKS does not treat them as this README replacement unless the user provides SKS_CODEX_APP_IMAGEGEN_OUTPUT or opts into SKS_CODEX_APP_IMAGEGEN_AUTOPICK_LATEST=1 with exactly one generated_images candidate newer than the prompt contract.'
424
- };
425
- }
426
- async function listGeneratedImageFiles(rootDir) {
427
- const out = [];
428
- const entries = await fs.promises.readdir(rootDir, { withFileTypes: true });
429
- for (const entry of entries) {
430
- const first = path.join(rootDir, entry.name);
431
- if (entry.isDirectory()) {
432
- const nested = await fs.promises.readdir(first, { withFileTypes: true }).catch(() => []);
433
- for (const child of nested) {
434
- if (child.isFile() && /\.(png|jpe?g|webp)$/i.test(child.name))
435
- out.push(path.join(first, child.name));
436
- }
437
- }
438
- else if (entry.isFile() && /\.(png|jpe?g|webp)$/i.test(entry.name)) {
439
- out.push(first);
440
- }
441
- }
442
- return out;
443
- }
444
- function relative(file) {
445
- const rel = path.relative(root, path.resolve(file));
446
- return rel.startsWith('..') ? path.resolve(file) : rel;
447
- }
448
- //# sourceMappingURL=readme-architecture-imagegen-official-check.js.map
@@ -1,42 +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 { assertGate, emitGate } from './sks-1-18-gate-lib.js';
7
- import { expandGlob, releaseGateCacheKey } from '../core/release/release-gate-cache-v2.js';
8
- const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-cache-glob-'));
9
- fs.mkdirSync(path.join(tmp, 'src/core/release'), { recursive: true });
10
- fs.writeFileSync(path.join(tmp, 'package.json'), JSON.stringify({ version: '0.0.0' }));
11
- fs.writeFileSync(path.join(tmp, 'release-gates.v2.json'), JSON.stringify({ schema: 'sks.release-gates.v2', gates: [] }));
12
- fs.writeFileSync(path.join(tmp, 'src/core/release/a.ts'), 'a');
13
- const gate = {
14
- id: 'release:cache-glob-hashing-fixture',
15
- command: 'node fixture',
16
- deps: [],
17
- resource: ['cpu-light'],
18
- side_effect: 'hermetic',
19
- timeout_ms: 1000,
20
- cache: { enabled: true, inputs: ['src/core/release/**'] },
21
- isolation: { home: 'temp', codex_home: 'temp', report_dir: 'per-gate' },
22
- preset: ['release']
23
- };
24
- const before = releaseGateCacheKey(tmp, gate);
25
- const expandedBefore = expandGlob(tmp, 'src/core/release/**');
26
- fs.writeFileSync(path.join(tmp, 'src/core/release/b.ts'), 'b');
27
- const afterAdd = releaseGateCacheKey(tmp, gate);
28
- fs.writeFileSync(path.join(tmp, 'src/core/release/a.ts'), 'changed');
29
- const afterChange = releaseGateCacheKey(tmp, gate);
30
- const expandedAfter = expandGlob(tmp, 'src/core/release/**');
31
- const report = {
32
- schema: 'sks.release-cache-glob-hashing-check.v1',
33
- ok: expandedBefore.length === 1 && expandedAfter.length === 2 && before !== afterAdd && afterAdd !== afterChange,
34
- expanded_before: expandedBefore.map((file) => path.basename(file)),
35
- expanded_after: expandedAfter.map((file) => path.basename(file)),
36
- before,
37
- after_add: afterAdd,
38
- after_change: afterChange
39
- };
40
- assertGate(report.ok, 'release cache key must hash recursive glob file paths and contents', report);
41
- emitGate('release:cache-glob-hashing', report);
42
- //# sourceMappingURL=release-cache-glob-hashing-check.js.map
@@ -1,66 +0,0 @@
1
- #!/usr/bin/env node
2
- // @ts-nocheck
3
- import fs from 'node:fs';
4
- import path from 'node:path';
5
- import { assertGate, emitGate, root } from './sks-1-18-gate-lib.js';
6
- const pkg = JSON.parse(fs.readFileSync(path.join(root, 'package.json'), 'utf8'));
7
- const manifest = JSON.parse(fs.readFileSync(path.join(root, 'release-gates.v2.json'), 'utf8'));
8
- const legacy = String(pkg.scripts['release:check:legacy'] || '');
9
- const legacyIds = [...new Set([...legacy.matchAll(/npm run ([^\s&]+)/g)].map((match) => match[1]).filter((id) => pkg.scripts[id]))];
10
- const allowlist = new Map([
11
- ['release:check:parallel', 'legacy aggregate superseded by release-gates.v2 DAG'],
12
- ['codex-app:fast-ui-preservation', 'Codex App UI real-environment preservation gate'],
13
- ['codex-control:keepalive-no-cot-leak', 'long-running remote keepalive/debug gate'],
14
- ['zellij:real-session-heartbeat', 'real Zellij heartbeat covered by release:real-check'],
15
- ['publish:packlist-performance', 'publish/package performance gate'],
16
- ['release:dynamic-performance', 'performance budget gate covered by release:parallel-speed-budget']
17
- ]);
18
- const gateIds = new Set(manifest.gates.map((gate) => gate.id));
19
- const releasePresetIds = new Set(manifest.gates.filter((gate) => Array.isArray(gate.preset) && gate.preset.includes('release')).map((gate) => gate.id));
20
- const requiredReleasePresetIds = [
21
- 'zellij:first-slot-down-stack',
22
- 'zellij:slot-renderer-proof-semantics',
23
- 'naruto:allocation-policy',
24
- 'naruto:rebalance-policy',
25
- 'naruto:allocation-runtime-wiring',
26
- 'naruto:actual-worker-control-plane',
27
- 'naruto:orchestrator-runtime-source',
28
- 'git:worktree-checkpoint',
29
- 'git:worktree-cross-rebase',
30
- 'local-collab:worktree-gpt-final-apply-policy',
31
- 'release:cache-glob-hashing',
32
- 'release:dag-full-coverage',
33
- 'research:quality-contract',
34
- 'research:claim-matrix',
35
- 'research:source-quality-report',
36
- 'research:implementation-blueprint',
37
- 'research:experiment-plan',
38
- 'research:replication-pack',
39
- 'research:final-reviewer',
40
- 'research:work-graph',
41
- 'research:short-report-rejection',
42
- 'research:complete-package-fixture',
43
- 'research:stage-cycle-runtime-blackbox',
44
- 'research:final-reviewer-blackbox',
45
- 'codex-sdk:research-pipeline'
46
- ];
47
- const missing = legacyIds.filter((id) => !gateIds.has(id) && !allowlist.has(id));
48
- const missingRequiredReleasePreset = requiredReleasePresetIds.filter((id) => !gateIds.has(id) || !releasePresetIds.has(id));
49
- const allowed = legacyIds.filter((id) => allowlist.has(id)).map((id) => ({ id, reason: allowlist.get(id) }));
50
- const coverage = legacyIds.length ? (legacyIds.length - missing.length) / legacyIds.length : 1;
51
- const schemaComplete = manifest.gates.every((gate) => gate.id && gate.command && Array.isArray(gate.deps) && Array.isArray(gate.resource) && gate.side_effect && gate.timeout_ms && gate.cache && gate.isolation && Array.isArray(gate.preset));
52
- const report = {
53
- schema: 'sks.release-dag-full-coverage-check.v1',
54
- ok: missing.length === 0 && missingRequiredReleasePreset.length === 0 && coverage >= 0.95 && schemaComplete,
55
- legacy_gate_count: legacyIds.length,
56
- v2_gate_count: manifest.gates.length,
57
- coverage,
58
- missing,
59
- required_release_preset_ids: requiredReleasePresetIds,
60
- missing_required_release_preset: missingRequiredReleasePreset,
61
- allowed,
62
- schema_complete: schemaComplete
63
- };
64
- assertGate(report.ok, 'release-gates.v2 must cover legacy hermetic release gates', report);
65
- emitGate('release:dag-full-coverage', report);
66
- //# sourceMappingURL=release-dag-full-coverage-check.js.map
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env node
2
- // @ts-nocheck
3
- import { ensureDistFresh } from './lib/ensure-dist-fresh.js';
4
- const report = ensureDistFresh({ rebuild: process.env.SKS_RELEASE_DIST_FRESHNESS_NO_REBUILD !== '1' });
5
- console.log(JSON.stringify(report, null, 2));
6
- if (!report.ok)
7
- process.exitCode = 1;
8
- //# sourceMappingURL=release-dist-freshness-check.js.map
@@ -1,103 +0,0 @@
1
- #!/usr/bin/env node
2
- // @ts-nocheck
3
- import fs from 'node:fs';
4
- import path from 'node:path';
5
- import { assertGate, emitGate, importDist, root } from './sks-1-18-gate-lib.js';
6
- const { selectGates } = await importDist('core/release/gate-manifest.js');
7
- const { buildGateManifest } = await importDist('core/release/gate-manifest.js');
8
- const manifest = loadDynamicManifest();
9
- const t0 = Date.now();
10
- const docsOnly = summarize(['docs/release-readiness.md']);
11
- const zellijOnly = summarize(['src/core/zellij/zellij-capability.ts']);
12
- const coreSkillOnly = summarize(['src/core/skills/core-skill-deployment.ts']);
13
- const currentReport = readJson('.sneakoscope/reports/release-check-dynamic-execute.json', null);
14
- const durationMs = Date.now() - t0;
15
- const report = {
16
- schema: 'sks.release-dynamic-performance.v1',
17
- ok: true,
18
- duration_ms: durationMs,
19
- gate_count: manifest.gates.length,
20
- current: currentReport ? {
21
- selected_count: currentReport.selected?.length || 0,
22
- executed_count: currentReport.executed?.length || 0,
23
- cache_hits: currentReport.cache_hits?.length || 0,
24
- skipped_count: currentReport.skipped?.length || 0,
25
- mode: currentReport.mode || null
26
- } : null,
27
- fixtures: {
28
- docs_only: docsOnly,
29
- zellij_only: zellijOnly,
30
- core_skill_only: coreSkillOnly
31
- },
32
- warnings: durationMs > 30_000 ? ['dynamic_performance_check_over_budget'] : []
33
- };
34
- report.ok = docsOnly.heavy_selected === 0
35
- && zellijOnly.selected.every((id) => id.startsWith('zellij:') || alwaysOn(id) || scopedRuntimeBoundary(id))
36
- && coreSkillOnly.selected.every((id) => id.startsWith('core-skill:') || alwaysOn(id) || scopedRuntimeBoundary(id))
37
- && docsOnly.selected_count < manifest.gates.length;
38
- const out = path.join(root, '.sneakoscope', 'reports', 'release-dynamic-performance.json');
39
- fs.mkdirSync(path.dirname(out), { recursive: true });
40
- fs.writeFileSync(out, `${JSON.stringify(report, null, 2)}\n`);
41
- assertGate(report.ok, 'dynamic release performance fixtures failed', report);
42
- emitGate('release:dynamic-performance', {
43
- gates: manifest.gates.length,
44
- docs_only_selected: docsOnly.selected_count,
45
- zellij_only_selected: zellijOnly.selected_count,
46
- core_skill_only_selected: coreSkillOnly.selected_count,
47
- duration_ms: durationMs
48
- });
49
- function summarize(changedFiles) {
50
- const plan = selectGates(manifest.gates, changedFiles, { publish: false });
51
- const selected = plan.selected.map((gate) => gate.id);
52
- return {
53
- changed_files: changedFiles,
54
- selected,
55
- selected_count: selected.length,
56
- skipped_count: plan.skipped.length,
57
- heavy_selected: plan.selected.filter((gate) => gate.cost === 'heavy' || gate.cost === 'real').length
58
- };
59
- }
60
- function alwaysOn(id) {
61
- return manifest.gates.some((gate) => gate.id === id && gate.always_on_release === true);
62
- }
63
- function scopedRuntimeBoundary(id) {
64
- return id === 'runtime:no-mjs-scripts' || id === 'runtime:ts-python-boundary';
65
- }
66
- function readJson(rel, fallback) {
67
- try {
68
- return JSON.parse(fs.readFileSync(path.join(root, rel), 'utf8'));
69
- }
70
- catch {
71
- return fallback;
72
- }
73
- }
74
- function loadDynamicManifest() {
75
- const v2Path = path.join(root, 'release-gates.v2.json');
76
- if (fs.existsSync(v2Path)) {
77
- const parsed = JSON.parse(fs.readFileSync(v2Path, 'utf8'));
78
- const releaseNodes = (Array.isArray(parsed.gates) ? parsed.gates : []).filter((gate) => Array.isArray(gate.preset) && gate.preset.includes('release'));
79
- const byId = new Map(releaseNodes.map((gate) => [gate.id, gate]));
80
- const dynamic = buildGateManifest(releaseNodes.map((gate) => gate.id));
81
- return {
82
- schema: 'sks.release-gate-manifest.v1.from-v2',
83
- gates: dynamic.gates.map((entry) => {
84
- const node = byId.get(entry.id);
85
- const resource = Array.isArray(node?.resource) ? node.resource.join(',') : '';
86
- return {
87
- ...entry,
88
- affected_by: usefulCacheInputs(node?.cache?.inputs, entry.affected_by),
89
- cost: node?.side_effect === 'real-env' || resource.includes('real') ? 'real' : entry.cost
90
- };
91
- })
92
- };
93
- }
94
- return JSON.parse(fs.readFileSync(path.join(root, 'release-gates.json'), 'utf8'));
95
- }
96
- function usefulCacheInputs(inputs, fallback) {
97
- if (!Array.isArray(inputs) || !inputs.length)
98
- return fallback;
99
- if (inputs.some((input) => ['src/**', 'package.json', 'release-gates.v2.json', 'schemas/**'].includes(input)))
100
- return fallback;
101
- return inputs;
102
- }
103
- //# sourceMappingURL=release-dynamic-performance-check.js.map