sneakoscope 2.0.14 → 2.0.15

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 (480) 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 +1 -0
  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-plan.js +3 -2
  11. package/dist/core/agents/native-cli-session-swarm.js +118 -0
  12. package/dist/core/agents/native-cli-worker.js +85 -0
  13. package/dist/core/commands/basic-cli.js +1 -1
  14. package/dist/core/commands/command-suggestions.js +1 -1
  15. package/dist/core/commands/mad-db-command.js +106 -0
  16. package/dist/core/commands/mad-sks-command.js +50 -13
  17. package/dist/core/commands/naruto-command.js +81 -1
  18. package/dist/core/commands/research-command.js +13 -1
  19. package/dist/core/commands/team-command.js +25 -1
  20. package/dist/core/db-safety.js +26 -0
  21. package/dist/core/fsx.js +1 -1
  22. package/dist/core/mad-db/mad-db-capability.js +84 -0
  23. package/dist/core/mad-db/mad-db-ledger.js +17 -0
  24. package/dist/core/mad-db/mad-db-policy-resolver.js +46 -0
  25. package/dist/core/pipeline-internals/runtime-core.js +74 -8
  26. package/dist/core/pipeline-internals/runtime-gates.js +44 -0
  27. package/dist/core/proof/route-proof-gate.js +5 -3
  28. package/dist/core/proof/route-proof-policy.js +9 -1
  29. package/dist/core/release/release-gate-affected-selector.js +113 -0
  30. package/dist/core/release/release-gate-batch-runner.js +67 -0
  31. package/dist/core/release/release-gate-dag.js +22 -3
  32. package/dist/core/release/release-gate-resource-governor.js +23 -11
  33. package/dist/core/research/implementation-blueprint-densifier.js +1 -1
  34. package/dist/core/research/implementation-blueprint-markdown.js +1 -1
  35. package/dist/core/research/implementation-blueprint.js +68 -7
  36. package/dist/core/research/research-final-reviewer.js +27 -1
  37. package/dist/core/research/research-handoff.js +69 -5
  38. package/dist/core/research/research-realistic-report.js +162 -0
  39. package/dist/core/research/research-repetition-detector.js +75 -0
  40. package/dist/core/research/research-report-quality.js +27 -5
  41. package/dist/core/research/research-stage-runner.js +40 -13
  42. package/dist/core/research/research-synthesis-prompt.js +52 -0
  43. package/dist/core/research/research-synthesis-writer.js +208 -0
  44. package/dist/core/research.js +60 -48
  45. package/dist/core/routes.js +23 -19
  46. package/dist/core/update/update-notice.js +120 -0
  47. package/dist/core/version.js +1 -1
  48. package/dist/core/zellij/zellij-dashboard-renderer.js +2 -0
  49. package/dist/core/zellij/zellij-slot-column-anchor.js +35 -1
  50. package/dist/core/zellij/zellij-slot-pane-renderer.js +57 -0
  51. package/dist/core/zellij/zellij-slot-telemetry.js +182 -0
  52. package/dist/scripts/release-gate-dag-runner.js +5 -0
  53. package/dist/scripts/release-speed-summary.js +25 -0
  54. package/package.json +52 -5
  55. package/schemas/mad-db/mad-db-capability.schema.json +31 -0
  56. package/schemas/mad-db/mad-db-ledger.schema.json +14 -0
  57. package/schemas/research/implementation-blueprint.schema.json +6 -1
  58. package/schemas/research/research-final-review.schema.json +10 -0
  59. package/schemas/research/research-synthesis-output.schema.json +62 -0
  60. package/schemas/update/update-notice.schema.json +19 -0
  61. package/schemas/zellij/zellij-slot-telemetry.schema.json +89 -0
  62. package/dist/scripts/agent-ast-aware-work-graph-check.js +0 -25
  63. package/dist/scripts/agent-backfill-replenishment-check.js +0 -13
  64. package/dist/scripts/agent-backfill-route-blackbox.js +0 -5
  65. package/dist/scripts/agent-background-terminals-check.js +0 -16
  66. package/dist/scripts/agent-cleanup-command-ux-check.js +0 -12
  67. package/dist/scripts/agent-cleanup-executor-check.js +0 -53
  68. package/dist/scripts/agent-cleanup-executor-v2-check.js +0 -39
  69. package/dist/scripts/agent-cli-options-to-task-graph-check.js +0 -5
  70. package/dist/scripts/agent-codex-app-cockpit-check.js +0 -91
  71. package/dist/scripts/agent-codex-child-overlap-check.js +0 -21
  72. package/dist/scripts/agent-dynamic-cockpit-check.js +0 -10
  73. package/dist/scripts/agent-dynamic-pool-check.js +0 -13
  74. package/dist/scripts/agent-dynamic-pool-route-blackbox.js +0 -5
  75. package/dist/scripts/agent-fast-mode-default-check.js +0 -62
  76. package/dist/scripts/agent-fast-mode-worker-propagation-check.js +0 -7
  77. package/dist/scripts/agent-follow-up-work-schema-check.js +0 -80
  78. package/dist/scripts/agent-goal-mode-propagation-check.js +0 -9
  79. package/dist/scripts/agent-intelligent-work-graph-check.js +0 -25
  80. package/dist/scripts/agent-janitor-check.js +0 -76
  81. package/dist/scripts/agent-main-no-scout-check.js +0 -11
  82. package/dist/scripts/agent-model-authored-patch-envelope-check.js +0 -15
  83. package/dist/scripts/agent-multi-project-isolation-check.js +0 -86
  84. package/dist/scripts/agent-native-cli-session-proof-check.js +0 -7
  85. package/dist/scripts/agent-native-cli-session-swarm-10-check.js +0 -7
  86. package/dist/scripts/agent-native-cli-session-swarm-20-check.js +0 -7
  87. package/dist/scripts/agent-native-cli-session-swarm-check.js +0 -7
  88. package/dist/scripts/agent-no-subagent-scaling-check.js +0 -7
  89. package/dist/scripts/agent-parallel-write-blackbox.js +0 -56
  90. package/dist/scripts/agent-parallel-write-kernel-check.js +0 -103
  91. package/dist/scripts/agent-patch-conflict-rebase-check.js +0 -198
  92. package/dist/scripts/agent-patch-envelope-extraction-check.js +0 -17
  93. package/dist/scripts/agent-patch-proof-check.js +0 -41
  94. package/dist/scripts/agent-patch-proof-runtime-check.js +0 -63
  95. package/dist/scripts/agent-patch-queue-runtime-check.js +0 -36
  96. package/dist/scripts/agent-patch-rollback-check.js +0 -38
  97. package/dist/scripts/agent-patch-rollback-dag-check.js +0 -14
  98. package/dist/scripts/agent-patch-swarm-route-blackbox.js +0 -10
  99. package/dist/scripts/agent-patch-swarm-runtime-check.js +0 -10
  100. package/dist/scripts/agent-patch-swarm-runtime-truth-check.js +0 -76
  101. package/dist/scripts/agent-patch-transaction-journal-check.js +0 -57
  102. package/dist/scripts/agent-patch-verification-dag-check.js +0 -14
  103. package/dist/scripts/agent-proof-contract-reconciled-check.js +0 -5
  104. package/dist/scripts/agent-real-codex-dynamic-smoke-check.js +0 -166
  105. package/dist/scripts/agent-real-codex-dynamic-smoke-v2-check.js +0 -14
  106. package/dist/scripts/agent-real-codex-in-zellij-worker-pane-check.js +0 -229
  107. package/dist/scripts/agent-real-codex-parallel-workers-10-check.js +0 -5
  108. package/dist/scripts/agent-real-codex-parallel-workers-20-check.js +0 -5
  109. package/dist/scripts/agent-real-codex-parallel-workers-5-check.js +0 -5
  110. package/dist/scripts/agent-real-codex-parallel-workers-check.js +0 -5
  111. package/dist/scripts/agent-role-config-repair-check.js +0 -33
  112. package/dist/scripts/agent-rollback-command-check.js +0 -86
  113. package/dist/scripts/agent-route-truth-backfill-check.js +0 -5
  114. package/dist/scripts/agent-scheduler-proof-check.js +0 -13
  115. package/dist/scripts/agent-scheduler-proof-hardening-check.js +0 -22
  116. package/dist/scripts/agent-session-generation-check.js +0 -21
  117. package/dist/scripts/agent-slot-pane-binding-proof-check.js +0 -64
  118. package/dist/scripts/agent-source-intelligence-propagation-check.js +0 -9
  119. package/dist/scripts/agent-strategy-to-lease-wiring-check.js +0 -32
  120. package/dist/scripts/agent-strategy-to-patch-strict-check.js +0 -54
  121. package/dist/scripts/agent-task-graph-expansion-check.js +0 -14
  122. package/dist/scripts/agent-terminal-generations-check.js +0 -23
  123. package/dist/scripts/agent-visual-consistency-check.js +0 -9
  124. package/dist/scripts/agent-wiki-context-proof-check.js +0 -62
  125. package/dist/scripts/agent-worker-backend-router-check.js +0 -63
  126. package/dist/scripts/agent-worker-scout-limited-check.js +0 -17
  127. package/dist/scripts/agent-zellij-dynamic-backfill-panes-check.js +0 -34
  128. package/dist/scripts/agent-zellij-runtime-check.js +0 -84
  129. package/dist/scripts/all-feature-deep-completion-check.js +0 -31
  130. package/dist/scripts/appshots-capability-check.js +0 -18
  131. package/dist/scripts/appshots-evidence-check.js +0 -48
  132. package/dist/scripts/appshots-operator-policy-check.js +0 -25
  133. package/dist/scripts/appshots-privacy-safety-check.js +0 -48
  134. package/dist/scripts/appshots-source-intelligence-check.js +0 -53
  135. package/dist/scripts/appshots-thread-attachment-discovery-check.js +0 -87
  136. package/dist/scripts/appshots-triwiki-voxel-check.js +0 -46
  137. package/dist/scripts/architecture-guard-check.js +0 -55
  138. package/dist/scripts/changelog-check.js +0 -47
  139. package/dist/scripts/codex-0-133-official-compat-report.js +0 -53
  140. package/dist/scripts/codex-0-134-official-compat-report.js +0 -110
  141. package/dist/scripts/codex-0-134-runner-truth-check.js +0 -66
  142. package/dist/scripts/codex-0-135-compat-check.js +0 -57
  143. package/dist/scripts/codex-0-136-compat-check.js +0 -30
  144. package/dist/scripts/codex-0-137-compat-check.js +0 -27
  145. package/dist/scripts/codex-app-fast-ui-preservation-check.js +0 -32
  146. package/dist/scripts/codex-app-provider-badge-check.js +0 -37
  147. package/dist/scripts/codex-app-ui-clobber-guard-check.js +0 -22
  148. package/dist/scripts/codex-app-ui-preservation-check.js +0 -96
  149. package/dist/scripts/codex-control-all-pipelines-check.js +0 -36
  150. package/dist/scripts/codex-control-capability-check.js +0 -10
  151. package/dist/scripts/codex-control-empty-result-retry-check.js +0 -43
  152. package/dist/scripts/codex-control-event-stream-ledger-check.js +0 -10
  153. package/dist/scripts/codex-control-keepalive-no-cot-leak-check.js +0 -14
  154. package/dist/scripts/codex-control-no-legacy-fallback-check.js +0 -31
  155. package/dist/scripts/codex-control-side-effect-scope-check.js +0 -26
  156. package/dist/scripts/codex-control-stream-idle-watchdog-check.js +0 -18
  157. package/dist/scripts/codex-control-structured-output-check.js +0 -11
  158. package/dist/scripts/codex-control-thread-registry-check.js +0 -11
  159. package/dist/scripts/codex-control-tool-call-sequence-repair-check.js +0 -14
  160. package/dist/scripts/codex-environment-scoped-approvals-check.js +0 -10
  161. package/dist/scripts/codex-exec-output-schema-actual-syntax-check.js +0 -33
  162. package/dist/scripts/codex-fast-mode-profile-propagation-check.js +0 -12
  163. package/dist/scripts/codex-history-search-check.js +0 -19
  164. package/dist/scripts/codex-hook-semantic-check.js +0 -15
  165. package/dist/scripts/codex-hook-strict-subset-check.js +0 -61
  166. package/dist/scripts/codex-lb-config-toml-safety-check.js +0 -85
  167. package/dist/scripts/codex-lb-persistence-truth-check.js +0 -96
  168. package/dist/scripts/codex-lb-setup-fixture-check.js +0 -91
  169. package/dist/scripts/codex-lb-setup-truthfulness-check.js +0 -84
  170. package/dist/scripts/codex-legacy-profile-consumers-removed-check.js +0 -24
  171. package/dist/scripts/codex-managed-proxy-env-check.js +0 -17
  172. package/dist/scripts/codex-output-schema-fixture-check.js +0 -25
  173. package/dist/scripts/codex-permission-profiles-check.js +0 -36
  174. package/dist/scripts/codex-plugin-list-json-check.js +0 -8
  175. package/dist/scripts/codex-profile-primary-check.js +0 -13
  176. package/dist/scripts/codex-project-config-policy-splitter-check.js +0 -51
  177. package/dist/scripts/codex-resume-cwd-truth-check.js +0 -17
  178. package/dist/scripts/codex-sdk-all-pipelines-check.js +0 -32
  179. package/dist/scripts/codex-sdk-backend-router-check.js +0 -65
  180. package/dist/scripts/codex-sdk-capability-check.js +0 -11
  181. package/dist/scripts/codex-sdk-core-skill-pipeline-check.js +0 -9
  182. package/dist/scripts/codex-sdk-dfix-pipeline-check.js +0 -9
  183. package/dist/scripts/codex-sdk-event-stream-ledger-check.js +0 -9
  184. package/dist/scripts/codex-sdk-no-legacy-fallback-check.js +0 -33
  185. package/dist/scripts/codex-sdk-qa-pipeline-check.js +0 -8
  186. package/dist/scripts/codex-sdk-real-smoke-check.js +0 -39
  187. package/dist/scripts/codex-sdk-release-review-pipeline-check.js +0 -13
  188. package/dist/scripts/codex-sdk-research-pipeline-check.js +0 -47
  189. package/dist/scripts/codex-sdk-sandbox-policy-check.js +0 -21
  190. package/dist/scripts/codex-sdk-structured-output-check.js +0 -10
  191. package/dist/scripts/codex-sdk-team-naruto-agent-pipeline-check.js +0 -12
  192. package/dist/scripts/codex-sdk-thread-registry-check.js +0 -11
  193. package/dist/scripts/codex-sdk-ux-ppt-review-pipeline-check.js +0 -9
  194. package/dist/scripts/codex-sdk-zellij-pane-binding-check.js +0 -13
  195. package/dist/scripts/codex-thread-runtime-choice-check.js +0 -10
  196. package/dist/scripts/codex-web-adapter-check.js +0 -12
  197. package/dist/scripts/computer-use-live-evidence-check.js +0 -55
  198. package/dist/scripts/computer-use-live-optional-check.js +0 -32
  199. package/dist/scripts/computer-use-policy-check.js +0 -69
  200. package/dist/scripts/computer-use-visual-route-fixture-check.js +0 -37
  201. package/dist/scripts/core-skill-card-schema-check.js +0 -61
  202. package/dist/scripts/core-skill-deployment-snapshot-check.js +0 -54
  203. package/dist/scripts/core-skill-heldout-validation-check.js +0 -49
  204. package/dist/scripts/core-skill-no-inference-optimizer-check.js +0 -75
  205. package/dist/scripts/core-skill-patch-check.js +0 -79
  206. package/dist/scripts/core-skill-promotion-side-effect-ledger-check.js +0 -64
  207. package/dist/scripts/core-skill-rollout-scoring-check.js +0 -72
  208. package/dist/scripts/core-skill-route-runtime-integration-check.js +0 -49
  209. package/dist/scripts/dfix-fast-blackbox-check.js +0 -37
  210. package/dist/scripts/dfix-fast-kernel-check.js +0 -26
  211. package/dist/scripts/dfix-fixture-check.js +0 -6
  212. package/dist/scripts/dfix-parallel-write-blackbox.js +0 -48
  213. package/dist/scripts/dfix-patch-handoff-check.js +0 -13
  214. package/dist/scripts/dfix-patch-swarm-route-blackbox.js +0 -10
  215. package/dist/scripts/dfix-performance-check.js +0 -15
  216. package/dist/scripts/dfix-verification-check.js +0 -9
  217. package/dist/scripts/dfix-verification-recommendation-check.js +0 -15
  218. package/dist/scripts/docs-truthfulness-check.js +0 -61
  219. package/dist/scripts/doctor-codex-doctor-parity-check.js +0 -17
  220. package/dist/scripts/doctor-fix-proves-codex-read-check.js +0 -64
  221. package/dist/scripts/doctor-fix-recovers-corrupted-config-check.js +0 -122
  222. package/dist/scripts/doctor-fixes-codex-app-fast-ui-check.js +0 -39
  223. package/dist/scripts/evidence-fixture-check.js +0 -26
  224. package/dist/scripts/evidence-flagship-coverage-check.js +0 -55
  225. package/dist/scripts/fake-real-proof-policy-v2-check.js +0 -27
  226. package/dist/scripts/fake-vs-real-proof-policy-check.js +0 -14
  227. package/dist/scripts/fast-codex-service-tier-proof-check.js +0 -42
  228. package/dist/scripts/flagship-proof-graph-v2-check.js +0 -48
  229. package/dist/scripts/flagship-proof-graph-v3-check.js +0 -67
  230. package/dist/scripts/flagship-proof-graph-v4-check.js +0 -61
  231. package/dist/scripts/git-precommit-fixture-check.js +0 -41
  232. package/dist/scripts/git-worktree-cache-performance-check.js +0 -25
  233. package/dist/scripts/git-worktree-capability-check.js +0 -27
  234. package/dist/scripts/git-worktree-checkpoint-check.js +0 -20
  235. package/dist/scripts/git-worktree-cleanup-check.js +0 -27
  236. package/dist/scripts/git-worktree-cross-rebase-check.js +0 -39
  237. package/dist/scripts/git-worktree-diff-envelope-check.js +0 -17
  238. package/dist/scripts/git-worktree-diff-export-check.js +0 -43
  239. package/dist/scripts/git-worktree-dirty-lock-check.js +0 -17
  240. package/dist/scripts/git-worktree-dirty-main-detection-check.js +0 -14
  241. package/dist/scripts/git-worktree-integration-primary-check.js +0 -24
  242. package/dist/scripts/git-worktree-integration-primary-runtime-check.js +0 -20
  243. package/dist/scripts/git-worktree-manager-check.js +0 -37
  244. package/dist/scripts/git-worktree-manifest-append-check.js +0 -18
  245. package/dist/scripts/git-worktree-merge-queue-check.js +0 -31
  246. package/dist/scripts/git-worktree-pool-performance-check.js +0 -20
  247. package/dist/scripts/git-worktree-untracked-diff-check.js +0 -18
  248. package/dist/scripts/goal-mode-official-default-check.js +0 -12
  249. package/dist/scripts/gpt-final-arbiter-check.js +0 -63
  250. package/dist/scripts/gpt-final-arbiter-performance-check.js +0 -36
  251. package/dist/scripts/gpt-image-2-request-validator-check.js +0 -35
  252. package/dist/scripts/hooks-0.134-context-parity-check.js +0 -20
  253. package/dist/scripts/hooks-actual-parity-check.js +0 -17
  254. package/dist/scripts/hooks-actual-parity-v2-check.js +0 -21
  255. package/dist/scripts/hooks-latest-schema-check.js +0 -20
  256. package/dist/scripts/hooks-managed-install-fixture-check.js +0 -21
  257. package/dist/scripts/hooks-official-hash-oracle-check.js +0 -35
  258. package/dist/scripts/hooks-official-hash-parity-check.js +0 -17
  259. package/dist/scripts/hooks-subagent-events-check.js +0 -17
  260. package/dist/scripts/hooks-trust-state-check.js +0 -14
  261. package/dist/scripts/image-fidelity-fixture-check.js +0 -24
  262. package/dist/scripts/imagegen-capability-check.js +0 -30
  263. package/dist/scripts/imagegen-real-smoke-check.js +0 -155
  264. package/dist/scripts/install-update-preserves-config-check.js +0 -87
  265. package/dist/scripts/json-schema-recursive-check.js +0 -78
  266. package/dist/scripts/legacy-multiagent-removal-check.js +0 -85
  267. package/dist/scripts/legacy-upgrade-matrix-check.js +0 -300
  268. package/dist/scripts/local-collab-all-pipelines-final-gpt-check.js +0 -21
  269. package/dist/scripts/local-collab-gpt-final-availability-check.js +0 -58
  270. package/dist/scripts/local-collab-no-local-only-final-check.js +0 -27
  271. package/dist/scripts/local-collab-policy-check.js +0 -17
  272. package/dist/scripts/local-collab-worktree-gpt-final-apply-policy-check.js +0 -63
  273. package/dist/scripts/local-llm-all-pipelines-check.js +0 -11
  274. package/dist/scripts/local-llm-cache-performance-check.js +0 -10
  275. package/dist/scripts/local-llm-capability-check.js +0 -14
  276. package/dist/scripts/local-llm-smoke-check.js +0 -23
  277. package/dist/scripts/local-llm-structured-output-check.js +0 -11
  278. package/dist/scripts/local-llm-throughput-check.js +0 -10
  279. package/dist/scripts/local-llm-tool-call-repair-check.js +0 -10
  280. package/dist/scripts/local-llm-warmup-check.js +0 -11
  281. package/dist/scripts/loop-blocker-check.js +0 -15
  282. package/dist/scripts/mad-preflight-blocks-unreadable-config-check.js +0 -35
  283. package/dist/scripts/mad-sks-actual-executor-blackbox.js +0 -5
  284. package/dist/scripts/mad-sks-app-ui-no-mutation-check.js +0 -92
  285. package/dist/scripts/mad-sks-audit-proof-check.js +0 -34
  286. package/dist/scripts/mad-sks-db-executor-check.js +0 -5
  287. package/dist/scripts/mad-sks-executor-proof-graph-check.js +0 -5
  288. package/dist/scripts/mad-sks-fast-mode-propagation-check.js +0 -24
  289. package/dist/scripts/mad-sks-file-write-executor-check.js +0 -5
  290. package/dist/scripts/mad-sks-immutable-harness-check.js +0 -36
  291. package/dist/scripts/mad-sks-no-harness-modification-check.js +0 -25
  292. package/dist/scripts/mad-sks-package-executor-check.js +0 -5
  293. package/dist/scripts/mad-sks-permission-model-check.js +0 -22
  294. package/dist/scripts/mad-sks-rollback-apply-check.js +0 -5
  295. package/dist/scripts/mad-sks-service-executor-check.js +0 -5
  296. package/dist/scripts/mad-sks-shell-executor-check.js +0 -5
  297. package/dist/scripts/mad-sks-write-guard-check.js +0 -28
  298. package/dist/scripts/mad-sks-zellij-default-pane-worker-check.js +0 -37
  299. package/dist/scripts/mad-sks-zellij-launch-check.js +0 -102
  300. package/dist/scripts/mcp-0-134-modernization-check.js +0 -55
  301. package/dist/scripts/mcp-readonly-concurrency-check.js +0 -17
  302. package/dist/scripts/mcp-readonly-runtime-scheduler-check.js +0 -20
  303. package/dist/scripts/mcp-tool-naming-parity-check.js +0 -16
  304. package/dist/scripts/memory-summary-rebuild-check.js +0 -22
  305. package/dist/scripts/mutation-callsite-coverage-check.js +0 -180
  306. package/dist/scripts/naruto-active-pool-check.js +0 -39
  307. package/dist/scripts/naruto-actual-worker-control-plane-check.js +0 -56
  308. package/dist/scripts/naruto-allocation-policy-check.js +0 -33
  309. package/dist/scripts/naruto-allocation-runtime-wiring-check.js +0 -92
  310. package/dist/scripts/naruto-concurrency-governor-check.js +0 -53
  311. package/dist/scripts/naruto-extreme-parallelism-check.js +0 -22
  312. package/dist/scripts/naruto-extreme-parallelism-real-check.js +0 -43
  313. package/dist/scripts/naruto-gpt-final-pack-check.js +0 -34
  314. package/dist/scripts/naruto-orchestrator-runtime-source-check.js +0 -70
  315. package/dist/scripts/naruto-parallel-patch-apply-check.js +0 -41
  316. package/dist/scripts/naruto-readonly-routing-check.js +0 -116
  317. package/dist/scripts/naruto-real-active-pool-check.js +0 -39
  318. package/dist/scripts/naruto-real-active-pool-runtime-check.js +0 -55
  319. package/dist/scripts/naruto-rebalance-policy-check.js +0 -41
  320. package/dist/scripts/naruto-role-distribution-check.js +0 -23
  321. package/dist/scripts/naruto-shadow-clone-swarm-check.js +0 -153
  322. package/dist/scripts/naruto-verification-pool-check.js +0 -36
  323. package/dist/scripts/naruto-work-graph-check.js +0 -24
  324. package/dist/scripts/naruto-worktree-coding-blackbox.js +0 -29
  325. package/dist/scripts/naruto-worktree-coding-check.js +0 -44
  326. package/dist/scripts/naruto-worktree-gpt-final-check.js +0 -45
  327. package/dist/scripts/naruto-worktree-zellij-ui-check.js +0 -28
  328. package/dist/scripts/naruto-zellij-dynamic-right-column-check.js +0 -48
  329. package/dist/scripts/naruto-zellij-massive-ui-check.js +0 -23
  330. package/dist/scripts/non-recursive-pipeline-check.js +0 -68
  331. package/dist/scripts/npm-publish-performance-check.js +0 -65
  332. package/dist/scripts/official-docs-compat-report.js +0 -304
  333. package/dist/scripts/packlist-performance-check.js +0 -83
  334. package/dist/scripts/parallel-verification-engine-check.js +0 -85
  335. package/dist/scripts/postinstall-safe-side-effects-check.js +0 -65
  336. package/dist/scripts/ppt-full-e2e-artifact-graph-check.js +0 -40
  337. package/dist/scripts/ppt-full-e2e-blackbox-check.js +0 -109
  338. package/dist/scripts/ppt-image-voxel-relations-check.js +0 -9
  339. package/dist/scripts/ppt-imagegen-blackbox-check.js +0 -46
  340. package/dist/scripts/ppt-imagegen-review-fixture-check.js +0 -6
  341. package/dist/scripts/ppt-issue-extraction-fixture-check.js +0 -7
  342. package/dist/scripts/ppt-no-mock-as-real-check.js +0 -8
  343. package/dist/scripts/ppt-no-text-fallback-check.js +0 -7
  344. package/dist/scripts/ppt-proof-trust-fixture-check.js +0 -10
  345. package/dist/scripts/ppt-real-export-adapter-check.js +0 -13
  346. package/dist/scripts/ppt-real-imagegen-smoke-check.js +0 -42
  347. package/dist/scripts/ppt-real-imagegen-wiring-check.js +0 -16
  348. package/dist/scripts/ppt-reexport-rereview-check.js +0 -19
  349. package/dist/scripts/ppt-slide-export-fixture-check.js +0 -7
  350. package/dist/scripts/prepublish-fast-check.js +0 -128
  351. package/dist/scripts/priority-full-closure-check.js +0 -12
  352. package/dist/scripts/product-design-auto-install-check.js +0 -119
  353. package/dist/scripts/product-design-plugin-routing-check.js +0 -101
  354. package/dist/scripts/prompt-placeholder-guard-check.js +0 -33
  355. package/dist/scripts/provider-badge-context-check.js +0 -26
  356. package/dist/scripts/provider-context-config-toml-check.js +0 -63
  357. package/dist/scripts/python-codex-sdk-all-pipelines-check.js +0 -47
  358. package/dist/scripts/python-codex-sdk-capability-check.js +0 -75
  359. package/dist/scripts/python-codex-sdk-sandbox-policy-check.js +0 -10
  360. package/dist/scripts/python-codex-sdk-stream-bridge-check.js +0 -12
  361. package/dist/scripts/python-tools-smoke-check.js +0 -71
  362. package/dist/scripts/qa-actual-route-backfill-check.js +0 -5
  363. package/dist/scripts/qa-backfill-route-blackbox.js +0 -5
  364. package/dist/scripts/qa-patch-swarm-route-blackbox.js +0 -10
  365. package/dist/scripts/readme-architecture-imagegen-official-check.js +0 -448
  366. package/dist/scripts/release-cache-glob-hashing-check.js +0 -42
  367. package/dist/scripts/release-dag-full-coverage-check.js +0 -66
  368. package/dist/scripts/release-dist-freshness-check.js +0 -8
  369. package/dist/scripts/release-dynamic-performance-check.js +0 -103
  370. package/dist/scripts/release-gate-budget-check.js +0 -36
  371. package/dist/scripts/release-gate-dag-runner-check.js +0 -17
  372. package/dist/scripts/release-metadata-1-11-check.js +0 -37
  373. package/dist/scripts/release-metadata-1-12-check.js +0 -48
  374. package/dist/scripts/release-metadata-1-13-check.js +0 -53
  375. package/dist/scripts/release-metadata-1-14-check.js +0 -63
  376. package/dist/scripts/release-metadata-1-16-check.js +0 -81
  377. package/dist/scripts/release-metadata-1-17-check.js +0 -51
  378. package/dist/scripts/release-metadata-1-19-check.js +0 -371
  379. package/dist/scripts/release-metadata-check.js +0 -7
  380. package/dist/scripts/release-native-agent-fixture-check.js +0 -41
  381. package/dist/scripts/release-parallel-check.js +0 -374
  382. package/dist/scripts/release-parallel-full-coverage-check.js +0 -13
  383. package/dist/scripts/release-parallel-speed-budget-check.js +0 -84
  384. package/dist/scripts/release-provenance-check.js +0 -150
  385. package/dist/scripts/release-real-check.js +0 -330
  386. package/dist/scripts/release-registry-check.js +0 -344
  387. package/dist/scripts/release-runtime-truth-matrix-check.js +0 -47
  388. package/dist/scripts/release-stability-report-check.js +0 -99
  389. package/dist/scripts/release-version-truth-check.js +0 -134
  390. package/dist/scripts/research-actual-route-backfill-check.js +0 -5
  391. package/dist/scripts/research-backfill-route-blackbox.js +0 -5
  392. package/dist/scripts/research-blueprint-densifier-check.js +0 -21
  393. package/dist/scripts/research-claim-builder-check.js +0 -19
  394. package/dist/scripts/research-complete-package-fixture-check.js +0 -23
  395. package/dist/scripts/research-final-reviewer-blackbox.js +0 -22
  396. package/dist/scripts/research-parallel-source-shards-check.js +0 -22
  397. package/dist/scripts/research-quality-gate-check.js +0 -111
  398. package/dist/scripts/research-real-cycle-no-legacy-final-md-check.js +0 -14
  399. package/dist/scripts/research-short-report-rejection-check.js +0 -46
  400. package/dist/scripts/research-source-ledger-merge-check.js +0 -26
  401. package/dist/scripts/research-stage-cycle-runtime-blackbox.js +0 -24
  402. package/dist/scripts/responses-retry-policy-centralized-check.js +0 -19
  403. package/dist/scripts/retention-cleanup-safety-check.js +0 -155
  404. package/dist/scripts/route-blackbox-realism-check.js +0 -21
  405. package/dist/scripts/route-proof-artifact-structure-check.js +0 -145
  406. package/dist/scripts/runtime-dist-parity-check.js +0 -78
  407. package/dist/scripts/runtime-no-mjs-scripts-check.js +0 -45
  408. package/dist/scripts/runtime-no-src-mjs-check.js +0 -32
  409. package/dist/scripts/runtime-no-tmux-check.js +0 -113
  410. package/dist/scripts/runtime-ts-python-boundary-check.js +0 -59
  411. package/dist/scripts/runtime-ts-rust-boundary-check.js +0 -74
  412. package/dist/scripts/runtime-ts-source-of-truth-check.js +0 -55
  413. package/dist/scripts/safety-check.js +0 -23
  414. package/dist/scripts/shared-memory-fixture-check.js +0 -27
  415. package/dist/scripts/side-effect-runtime-report-check.js +0 -19
  416. package/dist/scripts/side-effect-zero-gate-check.js +0 -226
  417. package/dist/scripts/sks-1-11-fixture-check.js +0 -130
  418. package/dist/scripts/source-intelligence-all-modes-check.js +0 -32
  419. package/dist/scripts/source-intelligence-policy-check.js +0 -13
  420. package/dist/scripts/strategy-adhd-orchestrating-gate-check.js +0 -22
  421. package/dist/scripts/strategy-file-ownership-plan-check.js +0 -18
  422. package/dist/scripts/strategy-parallel-modification-plan-check.js +0 -19
  423. package/dist/scripts/strategy-verification-rollback-dag-check.js +0 -19
  424. package/dist/scripts/team-actual-route-backfill-check.js +0 -5
  425. package/dist/scripts/team-backfill-route-blackbox.js +0 -5
  426. package/dist/scripts/team-parallel-write-blackbox.js +0 -55
  427. package/dist/scripts/team-patch-swarm-route-blackbox.js +0 -10
  428. package/dist/scripts/terminal-keyboard-enhancement-safety-check.js +0 -12
  429. package/dist/scripts/terminal-tui-output-stability-check.js +0 -35
  430. package/dist/scripts/test-no-orphan-dist-imports-check.js +0 -73
  431. package/dist/scripts/trust-fixture-check.js +0 -33
  432. package/dist/scripts/typescript-migration-report.js +0 -78
  433. package/dist/scripts/ultra-router-auto-router-check.js +0 -33
  434. package/dist/scripts/ultra-router-classification-check.js +0 -28
  435. package/dist/scripts/ux-patch-swarm-route-blackbox.js +0 -10
  436. package/dist/scripts/ux-ppt-structured-extraction-check.js +0 -21
  437. package/dist/scripts/ux-review-extract-real-callouts-fixture-check.js +0 -8
  438. package/dist/scripts/ux-review-extract-wires-real-extractor-check.js +0 -15
  439. package/dist/scripts/ux-review-generate-callouts-fixture-check.js +0 -9
  440. package/dist/scripts/ux-review-image-voxel-relations-check.js +0 -31
  441. package/dist/scripts/ux-review-imagegen-blackbox-check.js +0 -67
  442. package/dist/scripts/ux-review-no-fake-callouts-check.js +0 -8
  443. package/dist/scripts/ux-review-no-text-fallback-check.js +0 -25
  444. package/dist/scripts/ux-review-patch-diff-recheck-check.js +0 -20
  445. package/dist/scripts/ux-review-patch-handoff-fixture-check.js +0 -8
  446. package/dist/scripts/ux-review-real-imagegen-smoke-check.js +0 -31
  447. package/dist/scripts/ux-review-real-loop-fixture-check.js +0 -24
  448. package/dist/scripts/ux-review-recapture-recheck-fixture-check.js +0 -8
  449. package/dist/scripts/ux-review-run-wires-imagegen-check.js +0 -11
  450. package/dist/scripts/worker-pane-communication-contract-check.js +0 -54
  451. package/dist/scripts/wrongness-fixture-check.js +0 -65
  452. package/dist/scripts/xai-mcp-capability-check.js +0 -14
  453. package/dist/scripts/zellij-capability-check.js +0 -15
  454. package/dist/scripts/zellij-dashboard-pane-check.js +0 -70
  455. package/dist/scripts/zellij-developer-controls-check.js +0 -20
  456. package/dist/scripts/zellij-doctor-readiness-check.js +0 -63
  457. package/dist/scripts/zellij-dynamic-pane-lifecycle-check.js +0 -21
  458. package/dist/scripts/zellij-first-slot-down-stack-check.js +0 -20
  459. package/dist/scripts/zellij-first-slot-down-stack-real-check.js +0 -356
  460. package/dist/scripts/zellij-initial-main-only-blackbox.js +0 -28
  461. package/dist/scripts/zellij-lane-renderer-check.js +0 -65
  462. package/dist/scripts/zellij-launch-command-truth-check.js +0 -75
  463. package/dist/scripts/zellij-layout-valid-check.js +0 -90
  464. package/dist/scripts/zellij-pane-proof-check.js +0 -59
  465. package/dist/scripts/zellij-real-session-cleanup-check.js +0 -21
  466. package/dist/scripts/zellij-real-session-heartbeat-check.js +0 -49
  467. package/dist/scripts/zellij-real-session-launch-check.js +0 -57
  468. package/dist/scripts/zellij-right-column-headless-overflow-check.js +0 -22
  469. package/dist/scripts/zellij-right-column-manager-check.js +0 -27
  470. package/dist/scripts/zellij-screen-proof-check.js +0 -45
  471. package/dist/scripts/zellij-slot-column-anchor-check.js +0 -66
  472. package/dist/scripts/zellij-slot-only-ui-check.js +0 -26
  473. package/dist/scripts/zellij-slot-pane-renderer-check.js +0 -106
  474. package/dist/scripts/zellij-slot-renderer-proof-semantics-check.js +0 -59
  475. package/dist/scripts/zellij-spawn-on-demand-layout-check.js +0 -40
  476. package/dist/scripts/zellij-ui-design-check.js +0 -105
  477. package/dist/scripts/zellij-worker-pane-manager-check.js +0 -109
  478. package/dist/scripts/zellij-worker-pane-manager-single-owner-check.js +0 -47
  479. package/dist/scripts/zellij-worker-pane-real-ui-blackbox.js +0 -202
  480. package/dist/scripts/zellij-worker-pane-spawn-order-check.js +0 -35
package/README.md CHANGED
@@ -16,7 +16,7 @@ Set up this agent project with Sneakoscope Codex. Use [[mandarange/Sneakoscope-C
16
16
 
17
17
  ## Current Release
18
18
 
19
- SKS **2.0.14** is the public-ready research runtime stabilization release. It upgrades Research from a quality-contract package into a real stage-aware runtime with parallel source shards, source-ledger merge, claim matrix builder, repository-aware implementation blueprint, Codex/GPT final reviewer, and blackbox gates while preserving the 2.0.13 research artifact contract.
19
+ SKS **2.0.15** is the ultra-stabilized Research synthesis release. It keeps the 2.0.14 stage-aware runtime, then hardens final synthesis so non-mock Research uses an evidence-bound Codex/GPT writer, rejects repeated or template-like reports, records source/claim density, and produces handoffs that Team or Naruto can consume directly.
20
20
 
21
21
  What changed:
22
22
 
@@ -44,6 +44,9 @@ What changed:
44
44
  - Zellij proof now links `pane_id`, `slot_id`, `generation_index`, `session_id`, `sdk_thread_id`, provider, and `service_tier`.
45
45
  - Production runtime scripts are TypeScript source under `src/scripts` and build to `dist/scripts`; Python remains optional diagnostics under `pytools`.
46
46
  - Release gates include `codex-control:*`, `ultra-router:*`, `codex-sdk:*`, Codex App Fast UI preservation, provider badges, Zellij spawn-on-demand, slot/pane binding, release truth, and real smoke checks.
47
+ - Research synthesis is now evidence-bound in non-mock runs; deterministic report generation is mock/fallback only.
48
+ - Research quality checks reject repeated paragraphs, template-like prose, low source density, low claim density, and thin implementation sections.
49
+ - Research handoffs now include context, key claims, evidence summary, blueprint sections, parallel work items, acceptance tests, rollback, and source appendix for `$Team` or `$Naruto`.
47
50
 
48
51
  Quick checks:
49
52
 
@@ -466,7 +469,7 @@ sks code-structure scan --json
466
469
 
467
470
  `sks research` prepares a named genius-lens agent council, requires every agent to run at `xhigh`, records one literal `Eureka!` idea per agent, runs an evidence-bound debate, and creates `research-source-skill.md` as a route-local source collection skill before synthesis. Research is not a code-change route: real runs may write only their own mission artifacts under `.sneakoscope/missions/<id>/`, and source/package/docs/config mutations block the run with `research-code-mutation-blocker.json`. The required Research persona lenses are Einstein Agent, Feynman Agent, Turing Agent, von Neumann Agent, and Skeptic Agent; they are cognitive roles, not impersonations, and `agent-ledger.json` must include `display_name`, `persona`, `persona_boundary`, `reasoning_effort`, falsifiers, cheap probes, and `challenge_or_response`. Normal Research is not a fixed three-cycle flow: it repeats source gathering, Eureka ideas, debate, falsification, and synthesis pressure until every agent records final agreement, or pauses at the explicit max-cycle safety cap with an unpassed gate. `debate-ledger.json` must include `consensus_iterations`, `unanimous_consensus`, and per-agent agreements; `research-gate.json` cannot pass until unanimous consensus is true for all agents. Normal Research is intentionally allowed to take one or two hours when the problem needs it; `--mock` is only for selftests or dry harness checks, and a real run blocks with `research-blocker.json` instead of silently substituting mock output when the Codex execution path is unavailable. The source layer contract separates latest papers, official/government or leading-institution sources, standards/primary docs, current news such as BBC/CNN/GDELT-style sources, public discourse such as X/Reddit, developer/practitioner knowledge such as Stack Overflow/GitHub, traditional background sources, and counterevidence/fact-checking; `source-ledger.json` must record layer coverage, source quality, blockers, citations, and cross-layer triangulation. Context7 is optional for `$Research` and only becomes relevant when the research topic specifically depends on package, API, framework, or SDK documentation. Research runs require `research-report.md`, `research-paper.md`, `genius-opinion-summary.md`, `research-source-skill.md`, `source-ledger.json`, `agent-ledger.json`, `debate-ledger.json`, `novelty-ledger.json`, `falsification-ledger.json`, and `research-gate.json` so they stay source-backed, adversarially checked, falsifiable, paper-ready, and clear about every agent lens opinion. `research status` reports source entries, source-layer coverage, triangulation checks, counterevidence, xhigh agent count, Eureka moments, debate exchanges, consensus iterations, unanimous consensus, paper presence/sections, genius-opinion summary coverage, agent findings, and falsification cases alongside the gate.
468
471
 
469
- In 2.0.14, Research also writes a quality contract and handoff package: `research-quality-contract.json`, parallel `research/cycle-N/source-shards/*.json`, `source-ledger.json`, `claim-evidence-matrix.json`, `source-quality-report.json`, `implementation-blueprint.json`/`.md`, `team-handoff-goal.md`, `experiment-plan.json`/`.md`, `replication-pack.json`, `research-work-graph.json`, `research-final-review.static.json`, `research-final-review.codex.json`, and `research-final-review.json`. The default gate requires 12 total sources, 5 source layers, 2 counterevidence sources, 8 key claims, 6 triangulated claims, 8 blueprint sections, 4 falsification cases, 5 experiment steps, a 2200-word report, and approved static plus Codex/GPT final review before `research-gate.json` can pass. See `docs/research-pipeline.md`, `docs/research-artifacts.md`, and `docs/research-implementation-handoff.md`.
472
+ In 2.0.15, Research also writes a quality contract and handoff package: `research-quality-contract.json`, parallel `research/cycle-N/source-shards/*.json`, `source-ledger.json`, `claim-evidence-matrix.json`, `source-quality-report.json`, `research-synthesis-output.json`, `implementation-blueprint.json`/`.md`, `team-handoff-goal.md`, `experiment-plan.json`/`.md`, `replication-pack.json`, `research-work-graph.json`, `research-final-review.static.json`, `research-final-review.codex.json`, and `research-final-review.json`. The default gate requires 12 total sources, 5 source layers, 2 counterevidence sources, 8 key claims, 6 triangulated claims, 8 blueprint sections, 4 falsification cases, 5 experiment steps, a 2200-word report, approved static plus Codex/GPT final review, and anti-template/source-density report quality before `research-gate.json` can pass. See `docs/research-pipeline.md`, `docs/research-artifacts.md`, and `docs/research-implementation-handoff.md`.
470
473
 
471
474
  `sks recallpulse` is the 0.8.0 report-only RecallPulse utility. It writes `recallpulse-decision.json`, `mission-status-ledger.json`, `route-proof-capsule.json`, `evidence-envelope.json`, `recallpulse-governance-report.json`, `recallpulse-task-goal-ledger.json`, and `recallpulse-eval-report.json` for the current mission. RecallPulse does not replace route gates, Honest Mode, DB safety, imagegen evidence, or TriWiki validation; it records cache hits, hydration needs, duplicate suppression, route-governance risks, and final-summary-ready durable status so later releases can promote only measured improvements. Checklist updates are sequential: every `Txxx` row is treated as a child `$Goal` checkpoint, and `sks recallpulse checklist ... --task T001 --apply` refuses out-of-order checks unless explicitly overridden.
472
475
 
@@ -756,7 +759,7 @@ npm run release:check
756
759
  npm run publish:dry
757
760
  ```
758
761
 
759
- `release:check` runs the current 1.21.x release-closure DAG, writes a source digest stamp under `.sneakoscope/reports/`, then refreshes release readiness so publish commands can verify the same stamp. The DAG preserves the 1.18 baseline gates and adds Codex 0.136 compatibility, inherited Codex 0.135/0.134 runner truth, patch swarm runtime truth, transaction journaling, serial conflict rebase, strict strategy-to-patch proof, rollback command proof, Native CLI Session Swarm 5/10/20-process proof, Real Worker Backend Router proof, Codex child overlap proof, model-authored patch-envelope separation, Zellij layout/pane/screen/socket-dir proof, no-subagent-scaling proof, Fast mode default/worker/Codex/MAD propagation proof, Appshots attachment provenance, MCP runtime overlap evidence, task graph expansion, schema-bound follow-up work, actual Agent/Team/Research/QA route blackboxes, scheduler proof hardening, Source Intelligence propagation, and Goal mode propagation checks. Broader live gates remain explicit scripts such as `release:real-check`; real Codex patch smoke, real Codex parallel worker proof, and real Zellij proof are optional unless their `SKS_REQUIRE_REAL_*` or `SKS_REQUIRE_ZELLIJ=1` environment variables are set. Generate the human-readable registry with `sks features inventory --write-docs`. Plain `npm publish` uses the `latest` dist-tag. npm's `prepublishOnly` verifies the fresh release stamp instead of rerunning the full gate, and `prepack` only rebuilds `dist`; publish no longer repeats the expensive release suite during packaging. `npm run publish:dry` remains the explicit dry-run helper.
762
+ `release:check` runs the change-aware affected release gate for ordinary local checks. Publish readiness uses `release:check:full`, which runs the full release DAG and writes a source digest stamp under `.sneakoscope/reports/` so publish commands can verify the same source/dist state. The DAG preserves the 1.18 baseline gates and adds Codex 0.136 compatibility, inherited Codex 0.135/0.134 runner truth, patch swarm runtime truth, transaction journaling, serial conflict rebase, strict strategy-to-patch proof, rollback command proof, Native CLI Session Swarm 5/10/20-process proof, Real Worker Backend Router proof, Codex child overlap proof, model-authored patch-envelope separation, Zellij layout/pane/screen/socket-dir proof, no-subagent-scaling proof, Fast mode default/worker/Codex/MAD propagation proof, Appshots attachment provenance, MCP runtime overlap evidence, task graph expansion, schema-bound follow-up work, actual Agent/Team/Research/QA route blackboxes, scheduler proof hardening, Source Intelligence propagation, Goal mode propagation checks, slot telemetry, update notice, MAD-DB, and Naruto SSOT gates. Broader live gates remain explicit scripts such as `release:real-check`; real Codex patch smoke, real Codex parallel worker proof, and real Zellij proof are optional unless their `SKS_REQUIRE_REAL_*` or `SKS_REQUIRE_ZELLIJ=1` environment variables are set. Generate the human-readable registry with `sks features inventory --write-docs`. Plain `npm publish` uses the `latest` dist-tag. npm's `prepublishOnly` and `npm run publish:dry` both run `release:check:full`, verify the fresh stamp, and then run provenance/registry checks before the real or dry-run publish step.
760
763
 
761
764
  Version bumps are manual. Run `sks versioning bump` only when preparing release metadata; SKS will not create `.git/hooks/pre-commit` or auto-bump during ordinary commits.
762
765
 
@@ -76,7 +76,7 @@ dependencies = [
76
76
 
77
77
  [[package]]
78
78
  name = "sks-core"
79
- version = "2.0.14"
79
+ version = "2.0.15"
80
80
  dependencies = [
81
81
  "serde_json",
82
82
  ]
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "sks-core"
3
- version = "2.0.14"
3
+ version = "2.0.15"
4
4
  edition = "2021"
5
5
 
6
6
  [dependencies]
@@ -4,7 +4,7 @@ use std::io::{self, Read, Seek, SeekFrom};
4
4
  fn main() {
5
5
  let mut args = std::env::args().skip(1);
6
6
  match args.next().as_deref() {
7
- Some("--version") => println!("sks-rs 2.0.14"),
7
+ Some("--version") => println!("sks-rs 2.0.15"),
8
8
  Some("compact-info") => {
9
9
  let mut input = String::new();
10
10
  let _ = io::stdin().read_to_string(&mut input);
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schema": "sks.dist-build-stamp.v1",
3
3
  "package_name": "sneakoscope",
4
- "package_version": "2.0.14",
5
- "source_digest": "e559602363886e06dc0d079905dacbaddcadccd0617447573f90240aa9b8f2f4",
6
- "source_file_count": 2104,
7
- "built_at_source_time": 1780852294757
4
+ "package_version": "2.0.15",
5
+ "source_digest": "18f7432c59dd0bbd8090697c2cd4e0c4681d05923e3086f4a96cdc4e0b420280",
6
+ "source_file_count": 2160,
7
+ "built_at_source_time": 1780893056447
8
8
  }
package/dist/bin/sks.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- const FAST_PACKAGE_VERSION = '2.0.14';
2
+ const FAST_PACKAGE_VERSION = '2.0.15';
3
3
  const args = process.argv.slice(2);
4
4
  try {
5
5
  if (args[0] === '--agent' && args[1] === 'worker') {
@@ -109,6 +109,7 @@ export const COMMANDS = {
109
109
  zellij: entry('beta', 'Inspect Zellij runtime status and explain repair (no auto-install)', 'dist/commands/zellij.js', directCommand(() => import('../commands/zellij.js'), 'dist/commands/zellij.js')),
110
110
  mad: entry('beta', 'MAD-SKS Zellij permission launcher', 'dist/commands/mad-sks.js', directCommand(() => import('../commands/mad-sks.js'), 'dist/commands/mad-sks.js')),
111
111
  'mad-sks': entry('beta', 'MAD-SKS scoped permission modifier', 'dist/commands/mad-sks.js', directCommand(() => import('../commands/mad-sks.js'), 'dist/commands/mad-sks.js')),
112
+ 'mad-db': entry('beta', 'Create or inspect one-cycle Mad-DB break-glass capability tokens', 'dist/commands/mad-db.js', directCommand(() => import('../commands/mad-db.js'), 'dist/commands/mad-db.js')),
112
113
  'auto-review': entry('beta', 'Manage auto-review profile', 'dist/commands/auto-review.js', directCommand(() => import('../commands/auto-review.js'), 'dist/commands/auto-review.js')),
113
114
  autoreview: entry('beta', 'Alias for auto-review', 'dist/commands/auto-review.js', directCommand(() => import('../commands/auto-review.js'), 'dist/commands/auto-review.js')),
114
115
  'dollar-commands': entry('stable', 'List Codex App dollar commands', 'dist/core/commands/basic-cli.js', basicArgs('dollarCommandsCommand')),
@@ -0,0 +1,5 @@
1
+ import { madDbCommand } from '../core/commands/mad-db-command.js';
2
+ export async function run(_command = 'mad-db', args = []) {
3
+ return madDbCommand(args);
4
+ }
5
+ //# sourceMappingURL=mad-db.js.map
@@ -1,6 +1,8 @@
1
1
  import { renderZellijSlotPaneFromArtifacts } from '../core/zellij/zellij-slot-pane-renderer.js';
2
2
  export async function run(_command = 'zellij-slot-pane', args = []) {
3
3
  const artifactDir = readOption(args, '--artifact-dir', process.cwd()) || process.cwd();
4
+ const artifactRoot = readOption(args, '--artifact-root', artifactDir) || artifactDir;
5
+ const missionId = readOption(args, '--mission', '') || '';
4
6
  const slotId = readOption(args, '--slot', 'slot-001') || 'slot-001';
5
7
  const generationIndex = Number(readOption(args, '--generation', '1') || 1);
6
8
  const backend = readOption(args, '--backend', null);
@@ -9,7 +11,7 @@ export async function run(_command = 'zellij-slot-pane', args = []) {
9
11
  const watch = hasFlag(args, '--watch');
10
12
  const intervalMs = Math.max(250, Number(readOption(args, '--interval-ms', '1000') || 1000));
11
13
  for (;;) {
12
- const text = await renderZellijSlotPaneFromArtifacts({ artifactDir, slotId, generationIndex, backend, role, mode });
14
+ const text = await renderZellijSlotPaneFromArtifacts({ artifactDir, artifactRoot, missionId, slotId, generationIndex, backend, role, mode });
13
15
  process.stdout.write('\x1Bc' + text + '\n');
14
16
  if (!watch)
15
17
  break;
@@ -1,6 +1,7 @@
1
1
  import { AGENT_INTAKE_STAGE_ID, DEFAULT_AGENT_COUNT } from './agent-schema.js';
2
2
  const AGENT_REQUIRED_ROUTE_KEYS = new Set([
3
- 'team', '$team', 'research', '$research', 'autoresearch', '$autoresearch', 'qa-loop', '$qa-loop', 'review', '$review', 'release-review', '$release-review'
3
+ 'team', '$team', 'naruto', '$naruto', 'shadowclone', '$shadowclone', 'shadow-clone', '$shadow-clone', 'kagebunshin', '$kagebunshin', 'kage-bunshin', '$kage-bunshin',
4
+ 'research', '$research', 'autoresearch', '$autoresearch', 'qa-loop', '$qa-loop', 'review', '$review', 'release-review', '$release-review'
4
5
  ]);
5
6
  function routeKey(route) {
6
7
  return String(route?.id || route?.command || route?.name || route || '').trim().toLowerCase();
@@ -14,7 +15,7 @@ export function routeRequiresAgentIntake(route, input = {}) {
14
15
  if (AGENT_REQUIRED_ROUTE_KEYS.has(key))
15
16
  return true;
16
17
  const task = String(input.task || '');
17
- return /\$(Team|Research|AutoResearch|QA-LOOP|Review|Release-Review)\b/i.test(task);
18
+ return /\$(Team|Naruto|ShadowClone|Kagebunshin|Research|AutoResearch|QA-LOOP|Review|Release-Review)\b/i.test(task);
18
19
  }
19
20
  export function normalizeAgentPolicy(route, task = '', input = {}) {
20
21
  const required = routeRequiresAgentIntake(route, { task, ...(typeof input === 'object' && input ? input : {}) });
@@ -9,6 +9,7 @@ import { closeWorkerInRightColumn, recordHeadlessWorkerInRightColumn } from '../
9
9
  import { resolveProviderContext } from '../provider/provider-context.js';
10
10
  import { buildZellijSlotPaneCommand } from '../zellij/zellij-slot-pane-renderer.js';
11
11
  import { resolveZellijUiMode } from '../zellij/zellij-ui-mode.js';
12
+ import { appendZellijSlotTelemetry } from '../zellij/zellij-slot-telemetry.js';
12
13
  export const NATIVE_CLI_SESSION_SWARM_SCHEMA = 'sks.agent-native-cli-session-swarm.v1';
13
14
  export function createNativeCliSessionSwarmRecorder(root, input) {
14
15
  return new NativeCliSessionSwarmRecorder(root, input);
@@ -112,6 +113,12 @@ class NativeCliSessionSwarmRecorder {
112
113
  ? this.reserveVisibleZellijPane(ctx.opts, String(ctx.agent.session_id || ctx.agent.id || `${Date.now()}:${Math.random()}`))
113
114
  : null;
114
115
  const useZellijPane = Boolean(zellijReservation);
116
+ await this.telemetry(ctx, {
117
+ eventType: 'slot_reserved',
118
+ status: placement === 'zellij-pane' && !useZellijPane ? 'headless' : 'queued',
119
+ artifacts: [intakeRel, heartbeatRel, resultRel],
120
+ logTail: `placement=${placement}`
121
+ });
115
122
  if (useZellijPane) {
116
123
  stdout.end();
117
124
  stderr.end();
@@ -130,6 +137,12 @@ class NativeCliSessionSwarmRecorder {
130
137
  if (placement === 'zellij-pane' && ctx.opts.zellijPaneWorker !== false && !useZellijPane) {
131
138
  record.worker_placement = 'headless';
132
139
  record.headless_reason = `visible_pane_cap:${this.zellijVisiblePaneCap(ctx.opts)}`;
140
+ await this.telemetry(ctx, {
141
+ eventType: 'headless_overflow',
142
+ status: 'headless',
143
+ artifacts: [intakeRel, heartbeatRel, resultRel],
144
+ logTail: record.headless_reason
145
+ });
133
146
  await recordHeadlessWorkerInRightColumn({
134
147
  root: this.root,
135
148
  projectRoot: ctx.opts.projectRoot || this.input.projectRoot || ctx.opts.cwd,
@@ -162,6 +175,12 @@ class NativeCliSessionSwarmRecorder {
162
175
  record.pid = child.pid || null;
163
176
  record.process_id = child.pid || null;
164
177
  record.status = 'running';
178
+ await this.telemetry(ctx, {
179
+ eventType: 'worker_spawned',
180
+ status: 'launching',
181
+ artifacts: [intakeRel, heartbeatRel, resultRel, stdoutRel, stderrRel],
182
+ logTail: `pid=${child.pid || 'unknown'}`
183
+ });
165
184
  if (child.pid)
166
185
  this.active.add(child.pid);
167
186
  this.maxObserved = Math.max(this.maxObserved, this.active.size);
@@ -194,6 +213,13 @@ class NativeCliSessionSwarmRecorder {
194
213
  const parsed = await readJson(path.join(this.root, resultRel), null).catch(() => null);
195
214
  if (!parsed) {
196
215
  record.blockers = ['native_cli_worker_result_missing'];
216
+ await this.telemetry(ctx, {
217
+ eventType: 'worker_failed',
218
+ status: 'failed',
219
+ artifacts: [stdoutRel, stderrRel],
220
+ blockers: record.blockers,
221
+ logTail: 'Native CLI worker result missing.'
222
+ });
197
223
  await this.record(record);
198
224
  return validateAgentWorkerResult({
199
225
  mission_id: this.input.missionId,
@@ -218,6 +244,13 @@ class NativeCliSessionSwarmRecorder {
218
244
  });
219
245
  record.status = result.status === 'done' ? 'closed' : result.status;
220
246
  record.blockers = result.blockers || [];
247
+ await this.telemetry(ctx, {
248
+ eventType: result.status === 'done' ? 'worker_completed' : 'worker_failed',
249
+ status: result.status === 'done' ? 'completed' : 'failed',
250
+ artifacts: result.artifacts || [],
251
+ blockers: result.blockers || [],
252
+ logTail: result.summary || ''
253
+ });
221
254
  await this.record(record);
222
255
  return result;
223
256
  }
@@ -250,6 +283,12 @@ class NativeCliSessionSwarmRecorder {
250
283
  SKS_ZELLIJ_SESSION_NAME: sessionName
251
284
  };
252
285
  const role = String(input.ctx.agent.naruto_role || input.ctx.agent.role || input.ctx.agent.persona_id || 'worker');
286
+ await this.telemetry(input.ctx, {
287
+ eventType: 'slot_reserved',
288
+ status: 'queued',
289
+ artifacts: [path.join(input.workerDirRel, 'worker-intake.json'), input.heartbeatRel, input.resultRel],
290
+ logTail: `zellij=${sessionName}`
291
+ });
253
292
  const workerCommand = uiMode === 'full-debug'
254
293
  ? buildPaneWorkerCommand({
255
294
  args: input.args,
@@ -346,11 +385,25 @@ class NativeCliSessionSwarmRecorder {
346
385
  input.record.slot_visualization = uiMode === 'full-debug' ? 'worker-command-pane' : 'zellij-slot-pane-renderer';
347
386
  input.record.status = launchBlockers.length ? 'failed' : 'running';
348
387
  input.record.blockers = launchBlockers;
388
+ await this.telemetry(input.ctx, {
389
+ eventType: 'worker_spawned',
390
+ status: launchBlockers.length ? 'failed' : 'launching',
391
+ artifacts: [input.resultRel, input.heartbeatRel, input.stdoutRel, input.stderrRel, path.join(input.workerDirRel, 'zellij-worker-pane.json')],
392
+ blockers: launchBlockers,
393
+ logTail: paneRecord.pane_title || ''
394
+ });
349
395
  await this.record(input.record);
350
396
  if (launchBlockers.length) {
351
397
  this.active.delete(activeToken);
352
398
  input.record.closed_at = nowIso();
353
399
  input.record.status = 'failed';
400
+ await this.telemetry(input.ctx, {
401
+ eventType: 'worker_failed',
402
+ status: 'failed',
403
+ artifacts: [input.stdoutRel, input.stderrRel, path.join(input.workerDirRel, 'zellij-worker-pane.json')],
404
+ blockers: launchBlockers,
405
+ logTail: 'Zellij worker pane launch failed.'
406
+ });
354
407
  await this.record(input.record);
355
408
  return validateAgentWorkerResult({
356
409
  mission_id: this.input.missionId,
@@ -384,6 +437,12 @@ class NativeCliSessionSwarmRecorder {
384
437
  await this.record(input.record);
385
438
  }
386
439
  await waitForWorkerHeartbeat(path.join(this.root, input.heartbeatRel), Number(process.env.SKS_ZELLIJ_WORKER_HEARTBEAT_TIMEOUT_MS || 30000));
440
+ await this.telemetry(input.ctx, {
441
+ eventType: 'heartbeat',
442
+ status: 'running',
443
+ artifacts: [input.heartbeatRel],
444
+ logTail: await tailFile(path.join(this.root, input.heartbeatRel), 600)
445
+ });
387
446
  await appendJsonl(path.join(this.root, input.workerDirRel, 'zellij-worker-pane-events.jsonl'), {
388
447
  schema: 'sks.zellij-worker-pane-event.v1',
389
448
  ts: nowIso(),
@@ -426,6 +485,12 @@ class NativeCliSessionSwarmRecorder {
426
485
  session_id: input.ctx.agent.session_id,
427
486
  result_path: input.resultRel
428
487
  });
488
+ await this.telemetry(input.ctx, {
489
+ eventType: 'artifact_written',
490
+ status: 'verifying',
491
+ artifacts: [input.resultRel],
492
+ logTail: parsed.summary || 'worker result written'
493
+ });
429
494
  }
430
495
  input.record.pid = Number(workerProcessReport?.pid || processRun?.pid) || null;
431
496
  input.record.process_id = input.record.pid;
@@ -458,6 +523,13 @@ class NativeCliSessionSwarmRecorder {
458
523
  input.record.zellij_worker_pane_closed_at = paneRecord.closed_at;
459
524
  await this.record(input.record);
460
525
  if (!parsed) {
526
+ await this.telemetry(input.ctx, {
527
+ eventType: 'worker_failed',
528
+ status: 'failed',
529
+ artifacts: [input.stdoutRel, input.stderrRel, path.join(input.workerDirRel, 'zellij-worker-pane.json')],
530
+ blockers: input.record.blockers,
531
+ logTail: 'Zellij pane worker result timed out.'
532
+ });
461
533
  return validateAgentWorkerResult({
462
534
  mission_id: this.input.missionId,
463
535
  agent_id: input.ctx.agent.id,
@@ -475,6 +547,13 @@ class NativeCliSessionSwarmRecorder {
475
547
  goal_mode_ref: input.ctx.agent.goal_mode_ref || null
476
548
  });
477
549
  }
550
+ await this.telemetry(input.ctx, {
551
+ eventType: parsed.status === 'done' ? 'worker_completed' : 'worker_failed',
552
+ status: parsed.status === 'done' ? 'completed' : 'failed',
553
+ artifacts: [...new Set([...(Array.isArray(parsed.artifacts) ? parsed.artifacts : []), input.stdoutRel, input.stderrRel, path.join(input.workerDirRel, 'zellij-worker-pane.json')])],
554
+ blockers: input.record.blockers,
555
+ logTail: parsed.summary || ''
556
+ });
478
557
  return validateAgentWorkerResult({
479
558
  ...parsed,
480
559
  blockers: input.record.blockers,
@@ -493,6 +572,28 @@ class NativeCliSessionSwarmRecorder {
493
572
  this.records.push(record);
494
573
  await this.persist();
495
574
  }
575
+ async telemetry(ctx, input) {
576
+ await appendZellijSlotTelemetry(this.root, {
577
+ schema: 'sks.zellij-slot-telemetry-event.v1',
578
+ ts: nowIso(),
579
+ mission_id: this.input.missionId,
580
+ slot_id: String(ctx.agent?.slot_id || ctx.agent?.id || 'slot-001'),
581
+ generation_index: Number(ctx.agent?.generation_index || 1),
582
+ worker_id: String(ctx.agent?.id || ctx.agent?.slot_id || 'worker'),
583
+ event_type: input.eventType,
584
+ status: input.status,
585
+ role: String(ctx.agent?.naruto_role || ctx.agent?.role || ctx.agent?.persona_id || ctx.agent?.id || 'worker'),
586
+ backend: this.input.backend,
587
+ service_tier: this.input.fastModePolicy.service_tier,
588
+ worktree_id: ctx.agent?.worktree?.id || ctx.slice?.worktree?.id || null,
589
+ worktree_path: ctx.agent?.worktree?.path || ctx.slice?.worktree?.path || null,
590
+ task_title: String(ctx.slice?.description || ctx.slice?.title || ctx.slice?.id || 'worker task'),
591
+ current_file: firstString([ctx.slice?.write_paths?.[0], ctx.slice?.readonly_paths?.[0], ctx.slice?.input_files?.[0]]) || null,
592
+ artifact_paths: input.artifacts || [],
593
+ log_tail: input.logTail || '',
594
+ blockers: input.blockers || []
595
+ }).catch(() => undefined);
596
+ }
496
597
  async persist() {
497
598
  this.writeLock = this.writeLock.catch(() => undefined).then(async () => {
498
599
  await writeJsonAtomic(path.join(this.root, 'agent-native-cli-session-swarm.json'), this.summary());
@@ -656,6 +757,23 @@ function normalizeWorkerWorktree(value) {
656
757
  main_repo_root: value?.main_repo_root == null ? null : String(value.main_repo_root)
657
758
  };
658
759
  }
760
+ function firstString(values) {
761
+ for (const value of values) {
762
+ const text = String(value || '').trim();
763
+ if (text)
764
+ return text;
765
+ }
766
+ return null;
767
+ }
768
+ async function tailFile(file, max) {
769
+ try {
770
+ const text = await fs.promises.readFile(file, 'utf8');
771
+ return text.length > max ? text.slice(-max) : text;
772
+ }
773
+ catch {
774
+ return '';
775
+ }
776
+ }
659
777
  async function waitForChildExit(child, exitPromise, timeoutMs) {
660
778
  let timer = null;
661
779
  const timeout = new Promise((resolve) => {
@@ -4,6 +4,7 @@ import { scanAgentTextForRecursion } from './agent-recursion-guard.js';
4
4
  import { validateAgentWorkerResult } from './agent-worker-pipeline.js';
5
5
  import { resolveFastModePolicy } from './fast-mode-policy.js';
6
6
  import { runNativeWorkerBackendRouter } from './native-worker-backend-router.js';
7
+ import { appendZellijSlotTelemetry } from '../zellij/zellij-slot-telemetry.js';
7
8
  export const NATIVE_CLI_WORKER_SCHEMA = 'sks.native-cli-worker.v1';
8
9
  export async function runNativeCliWorkerFromArgs(args = []) {
9
10
  const parsed = parseNativeCliWorkerArgs(args);
@@ -85,6 +86,14 @@ export async function runNativeCliWorker(input = {}) {
85
86
  strategy_refs: slice.strategy_refs || intake.strategy_refs || null,
86
87
  no_recursive_orchestrator_guard: guard.ok
87
88
  });
89
+ await workerTelemetry(agentRoot, intake, agent, slice, {
90
+ eventType: 'task_started',
91
+ status: 'running',
92
+ backend,
93
+ serviceTier: policy.service_tier,
94
+ artifacts: [path.join(workerDirRel, 'worker-intake.json'), heartbeatRel],
95
+ logTail: String(slice.description || slice.title || slice.id || 'worker task started')
96
+ });
88
97
  await appendJsonl(path.resolve(agentRoot, heartbeatRel), {
89
98
  schema: 'sks.native-cli-worker-heartbeat.v1',
90
99
  ts: nowIso(),
@@ -96,6 +105,14 @@ export async function runNativeCliWorker(input = {}) {
96
105
  fast_mode: policy.fast_mode,
97
106
  service_tier: policy.service_tier
98
107
  });
108
+ await workerTelemetry(agentRoot, intake, agent, slice, {
109
+ eventType: 'heartbeat',
110
+ status: 'running',
111
+ backend,
112
+ serviceTier: policy.service_tier,
113
+ artifacts: [heartbeatRel],
114
+ logTail: 'worker heartbeat started'
115
+ });
99
116
  await writeJsonAtomic(path.join(workerDir, 'worker-fast-mode.json'), {
100
117
  schema: 'sks.native-cli-worker-fast-mode.v1',
101
118
  generated_at: nowIso(),
@@ -131,6 +148,14 @@ export async function runNativeCliWorker(input = {}) {
131
148
  proof_level: routed.report.proof_level,
132
149
  envelopes: patchEnvelopes
133
150
  });
151
+ await workerTelemetry(agentRoot, intake, agent, slice, {
152
+ eventType: 'patch_candidate',
153
+ status: 'running',
154
+ backend,
155
+ serviceTier: policy.service_tier,
156
+ artifacts: [patchRel],
157
+ logTail: `patch envelopes ${patchEnvelopes.length}`
158
+ });
134
159
  }
135
160
  else {
136
161
  noPatchReason = {
@@ -145,6 +170,15 @@ export async function runNativeCliWorker(input = {}) {
145
170
  blockers: Array.isArray(slice.write_paths) && slice.write_paths.length && backend !== 'fake' ? ['write_capable_no_patch_envelope'] : []
146
171
  };
147
172
  await writeJsonAtomic(path.join(workerDir, 'worker-no-patch-reason.json'), noPatchReason);
173
+ await workerTelemetry(agentRoot, intake, agent, slice, {
174
+ eventType: 'artifact_written',
175
+ status: 'running',
176
+ backend,
177
+ serviceTier: policy.service_tier,
178
+ artifacts: [path.join(workerDirRel, 'worker-no-patch-reason.json')],
179
+ blockers: noPatchReason.blockers || [],
180
+ logTail: noPatchReason.reason
181
+ });
148
182
  }
149
183
  const minRuntimeMs = Number(intake.min_runtime_ms || input.minRuntimeMs || 0);
150
184
  if (Number.isFinite(minRuntimeMs) && minRuntimeMs > 0)
@@ -226,6 +260,15 @@ export async function runNativeCliWorker(input = {}) {
226
260
  recursion_guard: { ok: guard.ok, violations: guard.violations }
227
261
  });
228
262
  await writeJsonAtomic(path.resolve(agentRoot, resultRel), result);
263
+ await workerTelemetry(agentRoot, intake, agent, slice, {
264
+ eventType: result.status === 'done' ? 'worker_completed' : 'worker_failed',
265
+ status: result.status === 'done' ? 'completed' : 'failed',
266
+ backend,
267
+ serviceTier: policy.service_tier,
268
+ artifacts: result.artifacts || [],
269
+ blockers: result.blockers || [],
270
+ logTail: result.summary || ''
271
+ });
229
272
  await writeJsonAtomic(path.join(workerDir, 'worker-session-proof.json'), {
230
273
  schema: 'sks.native-cli-worker-session-proof.v1',
231
274
  generated_at: nowIso(),
@@ -260,6 +303,15 @@ export async function runNativeCliWorker(input = {}) {
260
303
  session_id: agent.session_id,
261
304
  status: result.status
262
305
  });
306
+ await workerTelemetry(agentRoot, intake, agent, slice, {
307
+ eventType: 'heartbeat',
308
+ status: result.status === 'done' ? 'completed' : 'failed',
309
+ backend,
310
+ serviceTier: policy.service_tier,
311
+ artifacts: [heartbeatRel, resultRel],
312
+ blockers: result.blockers || [],
313
+ logTail: 'worker heartbeat finished'
314
+ });
263
315
  await writeJsonAtomic(path.join(workerDir, 'worker-terminal-close-report.json'), {
264
316
  schema: 'sks.native-cli-worker-terminal-close-report.v1',
265
317
  generated_at: nowIso(),
@@ -317,4 +369,37 @@ function normalizeWorkerWorktree(value) {
317
369
  main_repo_root: value?.main_repo_root == null ? null : String(value.main_repo_root)
318
370
  };
319
371
  }
372
+ async function workerTelemetry(agentRoot, intake, agent, slice, input) {
373
+ const missionId = String(intake.mission_id || intake.parent_mission_id || '');
374
+ if (!missionId)
375
+ return;
376
+ await appendZellijSlotTelemetry(agentRoot, {
377
+ schema: 'sks.zellij-slot-telemetry-event.v1',
378
+ ts: nowIso(),
379
+ mission_id: missionId,
380
+ slot_id: String(agent.slot_id || agent.id || 'slot-001'),
381
+ generation_index: Number(agent.generation_index || 1),
382
+ worker_id: String(agent.id || agent.slot_id || 'worker'),
383
+ event_type: input.eventType,
384
+ status: input.status,
385
+ role: String(agent.naruto_role || agent.role || agent.persona_id || agent.id || 'worker'),
386
+ backend: input.backend,
387
+ service_tier: input.serviceTier,
388
+ worktree_id: agent.worktree?.id || slice.worktree?.id || intake.worktree?.id || null,
389
+ worktree_path: agent.worktree?.path || slice.worktree?.path || intake.worktree?.path || null,
390
+ task_title: String(slice.description || slice.title || slice.id || 'worker task'),
391
+ current_file: firstString([slice.write_paths?.[0], slice.readonly_paths?.[0], slice.input_files?.[0]]) || null,
392
+ artifact_paths: input.artifacts || [],
393
+ log_tail: input.logTail || '',
394
+ blockers: input.blockers || []
395
+ }).catch(() => undefined);
396
+ }
397
+ function firstString(values) {
398
+ for (const value of values) {
399
+ const text = String(value || '').trim();
400
+ if (text)
401
+ return text;
402
+ }
403
+ return null;
404
+ }
320
405
  //# sourceMappingURL=native-cli-worker.js.map
@@ -101,7 +101,7 @@ export function quickstartCommand() {
101
101
  sks dollar-commands
102
102
  sks all-features selftest --mock --execute-fixtures --strict-artifacts --json
103
103
 
104
- For implementation work, use Codex App prompt routes such as $Team, $Goal, $QA-LOOP, $Image-UX-Review, and $Computer-Use.`);
104
+ For implementation work, use Codex App prompt routes such as $Naruto, $Goal, $QA-LOOP, $Image-UX-Review, and $Computer-Use.`);
105
105
  }
106
106
  export async function updateCheckCommand(args = []) {
107
107
  const result = await runSksUpdateCheck();
@@ -1,7 +1,7 @@
1
1
  export const COMMAND_SUGGESTIONS_SCHEMA = 'sks.command-suggestions.v1';
2
2
  export function suggestSksCommands(input) {
3
3
  const query = String(input || '').toLowerCase();
4
- const commands = ['$Team', '$Goal', '$DFix', '$QA-LOOP', '$Research', '$PPT', '$Image-UX-Review', '$Computer-Use'];
4
+ const commands = ['$Naruto', '$Goal', '$DFix', '$QA-LOOP', '$Research', '$PPT', '$Image-UX-Review', '$Computer-Use'];
5
5
  const suggestions = commands.filter((command) => command.toLowerCase().includes(query.replace(/^\$/, ''))).slice(0, 8);
6
6
  return {
7
7
  schema: COMMAND_SUGGESTIONS_SCHEMA,
@@ -0,0 +1,106 @@
1
+ import { initProject } from '../init.js';
2
+ import { createMission, findLatestMission, setCurrent } from '../mission.js';
3
+ import { exists, sksRoot } from '../fsx.js';
4
+ import path from 'node:path';
5
+ import { createMadDbCapability, isMadDbCapabilityActive, MAD_DB_ACK, readMadDbCapability, resolveMadDbMissionId, revokeMadDbCapability } from '../mad-db/mad-db-capability.js';
6
+ export async function madDbCommand(args = []) {
7
+ const action = String(args[0] && !String(args[0]).startsWith('--') ? args[0] : 'status');
8
+ const rest = action === args[0] ? args.slice(1) : args;
9
+ const root = await sksRoot();
10
+ if (!(await exists(path.join(root, '.sneakoscope'))))
11
+ await initProject(root, {});
12
+ if (action === 'enable')
13
+ return enableMadDb(root, rest);
14
+ if (action === 'revoke')
15
+ return revokeMadDb(root, rest);
16
+ if (action === 'status')
17
+ return statusMadDb(root, rest);
18
+ console.error('Usage: sks mad-db enable --ack "I AUTHORIZE ONE-CYCLE DB BREAK-GLASS" [--mission latest|new|M-...] | status | revoke');
19
+ process.exitCode = 1;
20
+ }
21
+ async function enableMadDb(root, args) {
22
+ const json = hasFlag(args, '--json');
23
+ const ack = readOption(args, '--ack', '');
24
+ if (ack !== MAD_DB_ACK) {
25
+ const result = { schema: 'sks.mad-db-command.v1', ok: false, action: 'enable', reason: 'ack_phrase_required', required_ack: MAD_DB_ACK };
26
+ if (json)
27
+ return console.log(JSON.stringify(result, null, 2));
28
+ console.error(`Mad-DB enable blocked. Required --ack ${JSON.stringify(MAD_DB_ACK)}`);
29
+ process.exitCode = 2;
30
+ return result;
31
+ }
32
+ const requestedMission = readOption(args, '--mission', 'latest');
33
+ let missionId = requestedMission === 'new' ? null : await resolveMadDbMissionId(root, {}, requestedMission);
34
+ if (!missionId) {
35
+ const created = await createMission(root, { mode: 'mad-db', prompt: 'sks mad-db enable one-cycle DB break-glass' });
36
+ missionId = created.id;
37
+ }
38
+ const capability = await createMadDbCapability(root, {
39
+ missionId,
40
+ ack,
41
+ cwd: process.cwd(),
42
+ ttlMs: Number(readOption(args, '--ttl-ms', String(2 * 60 * 60 * 1000)))
43
+ });
44
+ await setCurrent(root, {
45
+ mission_id: missionId,
46
+ route: 'MadDB',
47
+ route_command: '$MAD-DB',
48
+ mode: 'MADDB',
49
+ phase: 'MADDB_ONE_CYCLE_CAPABILITY_ACTIVE',
50
+ mad_db_active: true,
51
+ mad_db_cycle_id: capability.cycle_id,
52
+ mad_db_capability_file: 'mad-db-capability.json',
53
+ mad_db_ack_phrase: 'accepted',
54
+ stop_gate: 'mad-db-capability.json'
55
+ });
56
+ const result = { schema: 'sks.mad-db-command.v1', ok: true, action: 'enable', mission_id: missionId, capability };
57
+ if (json)
58
+ return console.log(JSON.stringify(result, null, 2));
59
+ console.log(`Mad-DB one-cycle capability active for ${missionId}; expires ${capability.expires_at}.`);
60
+ return result;
61
+ }
62
+ async function statusMadDb(root, args) {
63
+ const json = hasFlag(args, '--json');
64
+ const missionId = await resolveMadDbMissionId(root, {}, readOption(args, '--mission', 'latest'));
65
+ const capability = missionId ? await readMadDbCapability(root, missionId) : null;
66
+ const result = {
67
+ schema: 'sks.mad-db-command.v1',
68
+ ok: true,
69
+ action: 'status',
70
+ mission_id: missionId,
71
+ active: isMadDbCapabilityActive(capability),
72
+ capability
73
+ };
74
+ if (json)
75
+ return console.log(JSON.stringify(result, null, 2));
76
+ if (!missionId || !capability)
77
+ console.log('Mad-DB: no capability found.');
78
+ else
79
+ console.log(`Mad-DB: ${result.active ? 'active' : 'inactive'} for ${missionId}; consumed=${capability.consumed}; expires=${capability.expires_at}.`);
80
+ return result;
81
+ }
82
+ async function revokeMadDb(root, args) {
83
+ const json = hasFlag(args, '--json');
84
+ const missionId = await resolveMadDbMissionId(root, {}, readOption(args, '--mission', 'latest')) || await findLatestMission(root);
85
+ const revoked = missionId ? await revokeMadDbCapability(root, missionId, readOption(args, '--reason', 'operator_revoked')) : null;
86
+ await setCurrent(root, { mad_db_active: false, phase: 'MADDB_REVOKED' });
87
+ const result = { schema: 'sks.mad-db-command.v1', ok: Boolean(revoked), action: 'revoke', mission_id: missionId, capability: revoked };
88
+ if (json)
89
+ return console.log(JSON.stringify(result, null, 2));
90
+ if (!revoked)
91
+ console.log('Mad-DB: no capability to revoke.');
92
+ else
93
+ console.log(`Mad-DB capability revoked for ${missionId}.`);
94
+ return result;
95
+ }
96
+ function hasFlag(args, flag) {
97
+ return args.includes(flag);
98
+ }
99
+ function readOption(args, name, fallback) {
100
+ const index = args.indexOf(name);
101
+ if (index >= 0 && args[index + 1] && !String(args[index + 1]).startsWith('--'))
102
+ return String(args[index + 1]);
103
+ const prefixed = args.find((arg) => String(arg).startsWith(name + '='));
104
+ return prefixed ? prefixed.slice(name.length + 1) : fallback;
105
+ }
106
+ //# sourceMappingURL=mad-db-command.js.map