sneakoscope 8.0.2 → 8.0.4

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 (376) hide show
  1. package/README.md +150 -37
  2. package/config/skills-hash-ledger.v1.json +1 -1
  3. package/crates/sks-core/Cargo.lock +1 -1
  4. package/crates/sks-core/Cargo.toml +1 -1
  5. package/dist/bin/fast-inline.js +55 -27
  6. package/dist/bin/install.js +6 -32
  7. package/dist/bin/sks-dispatch.js +1 -1
  8. package/dist/cli/args.js +0 -2
  9. package/dist/cli/cli-theme.js +18 -9
  10. package/dist/cli/command-manifest-lite.js +6 -6
  11. package/dist/cli/command-registry.js +6 -6
  12. package/dist/cli/feature-commands.js +9 -7
  13. package/dist/cli/install-helpers-codex-lb-chain.js +198 -7
  14. package/dist/cli/install-helpers-codex-lb-config.js +78 -10
  15. package/dist/cli/install-helpers-install-support.js +9 -6
  16. package/dist/cli/install-helpers.js +101 -49
  17. package/dist/cli/install-tool-helpers.js +2 -82
  18. package/dist/cli/output.js +6 -1
  19. package/dist/cli/router.js +101 -2
  20. package/dist/commands/codex-lb.js +119 -19
  21. package/dist/commands/doctor-profile.js +1 -1
  22. package/dist/commands/doctor.js +727 -144
  23. package/dist/commands/mad-sks.js +1 -5
  24. package/dist/config/skills-manifest.json +4 -2
  25. package/dist/core/agents/agent-codex-cockpit.js +0 -3
  26. package/dist/core/agents/agent-effort-policy.js +5 -5
  27. package/dist/core/agents/agent-janitor.js +0 -20
  28. package/dist/core/agents/agent-orchestrator.js +9 -56
  29. package/dist/core/agents/agent-output-validator.js +2 -3
  30. package/dist/core/agents/agent-patch-schema.js +2 -2
  31. package/dist/core/agents/agent-proof-evidence.js +0 -65
  32. package/dist/core/agents/agent-recursion-guard.js +1 -1
  33. package/dist/core/agents/agent-runner-codex-exec.js +5 -3
  34. package/dist/core/agents/agent-scheduler.js +327 -85
  35. package/dist/core/agents/agent-schema.js +1 -1
  36. package/dist/core/agents/agent-trust-report.js +0 -36
  37. package/dist/core/agents/agent-worker-pipeline.js +0 -1
  38. package/dist/core/agents/fast-mode-policy.js +1 -3
  39. package/dist/core/agents/native-cli-worker-runtime-proof.js +1 -1
  40. package/dist/core/agents/native-cli-worker-runtime.js +69 -647
  41. package/dist/core/agents/native-cli-worker.js +6 -7
  42. package/dist/core/agents/native-worker-backend-router.js +2 -32
  43. package/dist/core/agents/no-subagent-scaling-policy.js +1 -1
  44. package/dist/core/agents/parallel-runtime-proof.js +1 -6
  45. package/dist/core/agents/runtime-proof-summary.js +1 -35
  46. package/dist/core/architecture-hardening/contracts/contracts.js +193 -0
  47. package/dist/core/architecture-hardening/migration/migration.js +111 -0
  48. package/dist/core/architecture-hardening/state/state-service.js +155 -0
  49. package/dist/core/artifact-schemas.js +0 -3
  50. package/dist/core/codex/codex-config-guard.js +238 -52
  51. package/dist/core/codex-adapter.js +5 -3
  52. package/dist/core/codex-app/auxiliary-oauth-policy.js +36 -0
  53. package/dist/core/codex-app/catalog-compat/catalog-service.js +104 -0
  54. package/dist/core/codex-app/child-policy/child-policy.js +35 -0
  55. package/dist/core/codex-app/codex-app-handoff.js +0 -1
  56. package/dist/core/codex-app/codex-hook-lifecycle.js +1 -1
  57. package/dist/core/codex-app/codex-init-deep.js +1 -1
  58. package/dist/core/codex-app/menubar/app-bundle.js +2 -0
  59. package/dist/core/codex-app/menubar/constants.js +14 -1
  60. package/dist/core/codex-app/menubar/global-install.js +288 -0
  61. package/dist/core/codex-app/menubar/installer.js +79 -14
  62. package/dist/core/codex-app/menubar/launch-agent.js +267 -45
  63. package/dist/core/codex-app/menubar/paths.js +3 -0
  64. package/dist/core/codex-app/menubar/rollback.js +55 -7
  65. package/dist/core/codex-app/menubar/status.js +75 -4
  66. package/dist/core/codex-app/provider-child-policy.js +64 -0
  67. package/dist/core/codex-app/provider-mode.js +91 -0
  68. package/dist/core/codex-app/provider-operation-stages.js +20 -0
  69. package/dist/core/codex-app/provider-session-policy.js +85 -0
  70. package/dist/core/codex-app/session-policy/session-pinning.js +68 -0
  71. package/dist/core/codex-app.js +3 -2
  72. package/dist/core/codex-control/codex-0139-image-path-real-probe.js +3 -1
  73. package/dist/core/codex-control/codex-0139-web-search-probe.js +3 -1
  74. package/dist/core/codex-control/codex-app-server-runtime-env.js +13 -4
  75. package/dist/core/codex-control/codex-app-server-v2-client.js +3 -3
  76. package/dist/core/codex-control/codex-control-proof.js +0 -1
  77. package/dist/core/codex-control/codex-task-runner.js +1 -4
  78. package/dist/core/codex-exec-output-schema.js +4 -1
  79. package/dist/core/codex-lb/codex-lb-env.js +63 -72
  80. package/dist/core/codex-lb/codex-lb-setup.js +15 -2
  81. package/dist/core/codex-lb/desktop-bridge/header-policy.js +6 -0
  82. package/dist/core/codex-lb/desktop-bridge/http-forward.js +48 -6
  83. package/dist/core/codex-lb/desktop-bridge/security.js +134 -0
  84. package/dist/core/codex-lb/desktop-bridge/server.js +9 -3
  85. package/dist/core/codex-lb/desktop-bridge/state.js +26 -6
  86. package/dist/core/codex-lb/desktop-bridge/types.js +1 -0
  87. package/dist/core/codex-lb/desktop-center-credentials.js +517 -58
  88. package/dist/core/codex-lb/desktop-controller.js +177 -56
  89. package/dist/core/codex-lb/desktop-service.js +179 -40
  90. package/dist/core/codex-lb/legacy-migration.js +1 -3
  91. package/dist/core/codex-lb/native-openai-transport/transport.js +68 -0
  92. package/dist/core/codex-lb/probes/cli-image-tool-probe.js +1 -1
  93. package/dist/core/codex-lb/provider-routing/provider-router.js +58 -0
  94. package/dist/core/codex-lb/routing-truth.js +327 -0
  95. package/dist/core/codex-native/codex-native-feature-broker.js +4 -0
  96. package/dist/core/codex-native/codex-native-pattern-analysis.js +1 -2
  97. package/dist/core/codex-native/core-skill-manifest.js +1 -1
  98. package/dist/core/codex-plugins/codex-plugin-json.js +26 -6
  99. package/dist/core/codex-plugins/codex-plugin-repair.js +32 -6
  100. package/dist/core/commands/basic-cli.js +9 -7
  101. package/dist/core/commands/computer-use-command.js +1 -1
  102. package/dist/core/commands/image-ux-review-command.js +16 -9
  103. package/dist/core/commands/install-package-command.js +105 -0
  104. package/dist/core/commands/intent-normalization/normalizer.js +96 -0
  105. package/dist/core/commands/mad-sks-command.js +23 -274
  106. package/dist/core/commands/mad-sks-headless.js +11 -30
  107. package/dist/core/commands/naruto-command.js +0 -25
  108. package/dist/core/commands/qa-loop-command.js +104 -22
  109. package/dist/core/commands/remote-command.js +2 -2
  110. package/dist/core/commands/research-command.js +10 -5
  111. package/dist/core/commands/telegram-command.js +407 -0
  112. package/dist/core/config-adopt/config-adopt-command.js +35 -0
  113. package/dist/core/config-adopt/config-adopt.js +346 -0
  114. package/dist/core/config-adopt/index.js +3 -0
  115. package/dist/core/doctor/command-alias-cleanup.js +4 -1
  116. package/dist/core/doctor/current-project-guidance-nested.js +37 -6
  117. package/dist/core/doctor/current-project-guidance.js +15 -9
  118. package/dist/core/doctor/doctor-dirty-planner.js +1 -4
  119. package/dist/core/doctor/doctor-readiness-matrix.js +15 -18
  120. package/dist/core/doctor/retired-managed-residue-private.js +4 -3
  121. package/dist/core/doctor/retired-managed-residue-runtime.js +2 -2
  122. package/dist/core/doctor/skill-legacy-surface.js +11 -10
  123. package/dist/core/doctor/sks-menubar-doctor.js +4 -0
  124. package/dist/core/evaluation.js +0 -19
  125. package/dist/core/evidence/v2/evidence-key.js +105 -0
  126. package/dist/core/feature-fixtures.js +12 -7
  127. package/dist/core/feature-registry.js +52 -21
  128. package/dist/core/hooks-runtime/hook-context.js +9 -0
  129. package/dist/core/hooks-runtime/managed-skill-admission.js +54 -4
  130. package/dist/core/hooks-runtime/official-subagent-lifecycle.js +69 -52
  131. package/dist/core/hooks-runtime/stop-finalization.js +226 -0
  132. package/dist/core/hooks-runtime/stop-repeat-guard.js +21 -2
  133. package/dist/core/hooks-runtime/subagent-skill-availability-contract.js +2 -2
  134. package/dist/core/hooks-runtime/subagent-skill-availability-evidence.js +3 -3
  135. package/dist/core/hooks-runtime/subagent-skill-availability-guards.js +43 -5
  136. package/dist/core/hooks-runtime/subagent-skill-availability.js +64 -30
  137. package/dist/core/hooks-runtime/subagent-stop-hook.js +15 -2
  138. package/dist/core/hooks-runtime.js +179 -212
  139. package/dist/core/image/reference-evidence/reference-registry.js +145 -0
  140. package/dist/core/image-ux-review/imagegen-adapter.js +21 -9
  141. package/dist/core/image-ux-review/reference-policy/reference-policy.js +9 -0
  142. package/dist/core/imagegen/codex-lb-imagegen-target.js +8 -0
  143. package/dist/core/imagegen/imagegen-capability.js +59 -2
  144. package/dist/core/imagegen/require-imagegen.js +2 -2
  145. package/dist/core/init/skills.js +17 -3
  146. package/dist/core/init.js +3 -3
  147. package/dist/core/install/installed-package-smoke.js +23 -5
  148. package/dist/core/json/canonical.js +9 -0
  149. package/dist/core/locks/file-lock.js +0 -1
  150. package/dist/core/loops/loop-continuation-enforcer.js +65 -7
  151. package/dist/core/loops/loop-decomposer.js +0 -1
  152. package/dist/core/loops/loop-gate-runner.js +65 -4
  153. package/dist/core/loops/loop-gate-selector.js +0 -2
  154. package/dist/core/loops/loop-proof-validation.js +38 -0
  155. package/dist/core/loops/loop-risk-classifier.js +1 -1
  156. package/dist/core/loops/loop-runtime.js +14 -2
  157. package/dist/core/loops/loop-scheduler.js +7 -2
  158. package/dist/core/loops/loop-worker-runtime.js +0 -15
  159. package/dist/core/loops/loop-worktree-runtime.js +52 -4
  160. package/dist/core/managed-assets/managed-assets-manifest.js +14 -14
  161. package/dist/core/naruto/hardware-capacity-probe.js +9 -6
  162. package/dist/core/naruto/naruto-active-pool.js +2 -14
  163. package/dist/core/naruto/naruto-concurrency-governor.js +71 -31
  164. package/dist/core/naruto/naruto-loop-worker-router.js +0 -2
  165. package/dist/core/naruto/naruto-verification-dag.js +0 -1
  166. package/dist/core/naruto/naruto-write-e2e.js +1 -2
  167. package/dist/core/naruto/resource-pressure-monitor.js +0 -4
  168. package/dist/core/observability/architecture-hardening/safe-projection.js +65 -0
  169. package/dist/core/perf/import-graph-budget.js +0 -1
  170. package/dist/core/perf/release-latency-slo.js +3 -2
  171. package/dist/core/preflight/parallel-preflight-engine.js +2 -15
  172. package/dist/core/product-design-app-server.js +13 -1
  173. package/dist/core/proof/fake-real-proof-policy.js +2 -17
  174. package/dist/core/proof/route-proof-gate.js +2 -10
  175. package/dist/core/proof/route-proof-policy.js +1 -1
  176. package/dist/core/proof/runtime-evidence-policy.js +185 -0
  177. package/dist/core/proof/runtime-truth-matrix.js +64 -39
  178. package/dist/core/proof/validation.js +27 -11
  179. package/dist/core/provider/provider-context.js +18 -2
  180. package/dist/core/providers/openrouter/openrouter-account.js +3 -2
  181. package/dist/core/python-tools/python-tool-runner.js +1 -1
  182. package/dist/core/qa-loop/qa-execution-control.js +57 -0
  183. package/dist/core/questions.js +1 -1
  184. package/dist/core/release/extreme-parallel-scheduler.js +0 -3
  185. package/dist/core/release/gate-manifest.js +3 -7
  186. package/dist/core/release/gate-pack-manifest.js +3 -7
  187. package/dist/core/release/package-size-budget.js +2 -2
  188. package/dist/core/release/physical-release-gates.js +189 -0
  189. package/dist/core/release/publish-preflight.js +113 -0
  190. package/dist/core/release/release-gate-affected-selector.js +0 -2
  191. package/dist/core/release/release-gate-batch-runner.js +1 -1
  192. package/dist/core/release/release-gate-node.js +0 -1
  193. package/dist/core/release/release-gate-resource-governor.js +0 -1
  194. package/dist/core/release/release-pack-receipt.js +5 -8
  195. package/dist/core/release/release-real-contract.js +0 -6
  196. package/dist/core/release/resource-class-budget.js +0 -1
  197. package/dist/core/release/stage-publish.js +178 -36
  198. package/dist/core/research/research-adversarial-review.js +103 -9
  199. package/dist/core/research.js +1 -1
  200. package/dist/core/retention.js +0 -1
  201. package/dist/core/routes/constants.js +1 -1
  202. package/dist/core/routes/diagnostic-allowlist.js +0 -1
  203. package/dist/core/routes/dollar-manifest-lite.js +1 -1
  204. package/dist/core/routes.js +46 -15
  205. package/dist/core/runtime/execution-control.js +226 -0
  206. package/dist/core/runtime/progress-recovery/progress-recovery.js +89 -0
  207. package/dist/core/runtime/task-profile.js +10 -4
  208. package/dist/core/runtime/verification-budget.js +10 -1
  209. package/dist/core/safety/intent-contract/intent-contract.js +94 -0
  210. package/dist/core/safety/mutation-guard.js +0 -2
  211. package/dist/core/safety/mutation-ledger.js +0 -2
  212. package/dist/core/safety/requested-scope-contract.js +0 -0
  213. package/dist/core/search-visibility/discovery.js +1 -1
  214. package/dist/core/search-visibility/index.js +12 -0
  215. package/dist/core/search-visibility/verifier.js +112 -3
  216. package/dist/core/security/private-credential-file.js +209 -0
  217. package/dist/core/session/project-namespace.js +0 -5
  218. package/dist/core/skills/skill-agent-metadata.js +1 -3
  219. package/dist/core/strategy/adhd-orchestrating-gate.js +0 -1
  220. package/dist/core/subagents/agent-catalog.js +19 -34
  221. package/dist/core/subagents/model-policy.js +65 -24
  222. package/dist/core/subagents/naruto-help-contract.js +8 -8
  223. package/dist/core/subagents/naruto-host-credentials.js +13 -0
  224. package/dist/core/subagents/official-subagent-config.js +16 -6
  225. package/dist/core/subagents/official-subagent-preparation.js +35 -16
  226. package/dist/core/subagents/official-subagent-prompt.js +7 -7
  227. package/dist/core/subagents/official-subagent-runner.js +27 -4
  228. package/dist/core/subagents/role-model-preferences.js +1 -1
  229. package/dist/core/subagents/thread-budget.js +19 -12
  230. package/dist/core/subagents/wave-lifecycle.js +18 -6
  231. package/dist/core/telegram/access.js +58 -0
  232. package/dist/core/telegram/client.js +157 -0
  233. package/dist/core/telegram/confirmation.js +37 -0
  234. package/dist/core/telegram/doctor.js +154 -0
  235. package/dist/core/telegram/index.js +9 -0
  236. package/dist/core/telegram/keychain.js +317 -0
  237. package/dist/core/telegram/liveness.js +118 -0
  238. package/dist/core/telegram/poller.js +90 -0
  239. package/dist/core/telegram/redaction.js +15 -0
  240. package/dist/core/telegram/state-lock.js +416 -0
  241. package/dist/core/telegram/types.js +1 -0
  242. package/dist/core/text/strings.js +3 -0
  243. package/dist/core/triwiki/context-graph/store/evidence-write-lock.js +29 -0
  244. package/dist/core/triwiki/context-graph/store/fragment-cache.js +24 -0
  245. package/dist/core/triwiki/context-graph/store/snapshot-store.js +69 -21
  246. package/dist/core/triwiki/triwiki-gate-impact-map.js +2 -2
  247. package/dist/core/triwiki/triwiki-module-card.js +1 -2
  248. package/dist/core/update/installed-cli-resolution.js +170 -0
  249. package/dist/core/update/update-diagnostics.js +52 -0
  250. package/dist/core/update/update-migration-state.js +30 -12
  251. package/dist/core/update/update-operation.js +2 -1
  252. package/dist/core/update/update-stage-diagnostics.js +38 -0
  253. package/dist/core/update/update-status.js +2 -9
  254. package/dist/core/update-check.js +279 -91
  255. package/dist/core/version.js +1 -1
  256. package/dist/native/sks-menubar/Sources/AppDelegate.swift +19 -1
  257. package/dist/native/sks-menubar/Sources/AppIdentity.swift +7 -0
  258. package/dist/native/sks-menubar/Sources/ControlCenterWindowController.swift +6 -2
  259. package/dist/native/sks-menubar/Sources/OperationCoordinator.swift +159 -92
  260. package/dist/native/sks-menubar/Sources/OperationModels.swift +389 -0
  261. package/dist/native/sks-menubar/Sources/OverviewViewController.swift +57 -0
  262. package/dist/native/sks-menubar/Sources/ProcessClient.swift +3 -1
  263. package/dist/native/sks-menubar/Sources/ProvidersConnectTest.swift +115 -0
  264. package/dist/native/sks-menubar/Sources/ProvidersFastMode.swift +17 -0
  265. package/dist/native/sks-menubar/Sources/ProvidersMultiProvider.swift +3 -0
  266. package/dist/native/sks-menubar/Sources/ProvidersOpenRouter.swift +58 -17
  267. package/dist/native/sks-menubar/Sources/ProvidersReliability.swift +302 -0
  268. package/dist/native/sks-menubar/Sources/ProvidersRoleModels.swift +5 -0
  269. package/dist/native/sks-menubar/Sources/ProvidersRoutingTruth.swift +190 -0
  270. package/dist/native/sks-menubar/Sources/ProvidersViewController.swift +158 -126
  271. package/dist/native/sks-menubar/Sources/RemoteCodingViewController.swift +462 -26
  272. package/dist/native/sks-menubar/Sources/SKSKeychainStore.swift +344 -0
  273. package/dist/native/sks-menubar/Sources/SecureProcessEnvelope.swift +27 -0
  274. package/dist/native/sks-menubar/Sources/SingletonInstanceGuard.swift +328 -0
  275. package/dist/native/sks-menubar/Sources/StatusItemController.swift +10 -2
  276. package/dist/native/sks-menubar/Sources/TelegramPrivateFileStore.swift +498 -0
  277. package/dist/native/sks-menubar/Sources/TelegramPrivateFileSupport.swift +236 -0
  278. package/dist/native/sks-menubar/Sources/TelegramProcessGateway.swift +454 -0
  279. package/dist/native/sks-menubar/Sources/TelegramRuntimeSupport.swift +56 -0
  280. package/dist/native/sks-menubar/Sources/TelegramStateLock.swift +448 -0
  281. package/dist/native/sks-menubar/Sources/TelegramSupport.swift +187 -0
  282. package/dist/native/sks-menubar/Sources/TelegramTransport.swift +499 -0
  283. package/dist/native/sks-menubar/Sources/main.swift +15 -1
  284. package/dist/scripts/all-feature-deep-completion-check.js +5 -1
  285. package/dist/scripts/check-publish-tag.js +56 -0
  286. package/dist/scripts/codex-lb-fast-mode-truth-check.js +10 -3
  287. package/dist/scripts/codex-lb-fast-ui-preservation-check.js +12 -3
  288. package/dist/scripts/codex-lb-gpt56-fast-profile-check.js +4 -2
  289. package/dist/scripts/codex-native-agent-role-content-check.js +3 -3
  290. package/dist/scripts/codex-native-gate-lib.js +14 -7
  291. package/dist/scripts/current-command-surface-check.js +7 -7
  292. package/dist/scripts/current-surface-update-e2e-check.js +4 -3
  293. package/dist/scripts/current-upgrade-matrix-check.js +5 -24
  294. package/dist/scripts/docs-truthfulness-check.js +17 -13
  295. package/dist/scripts/gate-lib.js +0 -2
  296. package/dist/scripts/gate-policy-audit-check.js +3 -2
  297. package/dist/scripts/harness-benchmark-check.js +1 -1
  298. package/dist/scripts/init-deep-backup-retention-check.js +1 -1
  299. package/dist/scripts/lib/codex-sdk-gate-lib.js +1 -2
  300. package/dist/scripts/loop-directive-check-lib.js +28 -38
  301. package/dist/scripts/mad-sks-app-ui-no-mutation-check.js +14 -180
  302. package/dist/scripts/mad-sks-launch-sql-plane-boundary-check.js +2 -11
  303. package/dist/scripts/official-subagent-workflow-check.js +1 -1
  304. package/dist/scripts/packlist-performance-check.js +1 -2
  305. package/dist/scripts/prepublish-release-check-or-fast.js +32 -0
  306. package/dist/scripts/publish-preflight.js +12 -0
  307. package/dist/scripts/release-affected-selector-check.js +2 -2
  308. package/dist/scripts/release-gate-batch-runner-check.js +2 -2
  309. package/dist/scripts/release-metadata-check.js +8 -12
  310. package/dist/scripts/release-real-check.js +2 -54
  311. package/dist/scripts/runtime-domain-gate-lib.js +2 -96
  312. package/dist/scripts/runtime-proof-summary-check.js +2 -6
  313. package/dist/scripts/search-visibility-gate-lib.js +0 -1
  314. package/dist/scripts/sks-cli-gate-lib.js +1 -1
  315. package/dist/scripts/typed-routing-gate-lib.js +7 -59
  316. package/docs/demo.tape +1 -1
  317. package/infra-harness-gates.json +1 -1456
  318. package/package.json +10 -7
  319. package/release-gates.v2.json +0 -1
  320. package/schemas/agents/parallel-runtime-proof.schema.json +0 -2
  321. package/schemas/codex/agent-result.schema.json +0 -6
  322. package/schemas/naruto/naruto-concurrency-governor.schema.json +1 -3
  323. package/schemas/release/release-gate-node.schema.json +1 -1
  324. package/dist/commands/zellij-lane.js +0 -22
  325. package/dist/commands/zellij-monitor-pane.js +0 -26
  326. package/dist/commands/zellij-slot-column-anchor.js +0 -22
  327. package/dist/commands/zellij-slot-pane.js +0 -80
  328. package/dist/commands/zellij-viewport-pane.js +0 -57
  329. package/dist/commands/zellij.js +0 -422
  330. package/dist/core/agents/agent-runner-zellij.js +0 -164
  331. package/dist/core/agents/agent-slot-pane-binding-proof.js +0 -96
  332. package/dist/core/agents/parallel-write-fixture.js +0 -305
  333. package/dist/core/agents/worker-pane-communication-contract.js +0 -100
  334. package/dist/core/agents/zellij-lane-supervisor.js +0 -428
  335. package/dist/core/agents/zellij-right-lane-cockpit.js +0 -66
  336. package/dist/core/doctor/doctor-zellij-repair.js +0 -40
  337. package/dist/core/ops/upgrade-migration-fixtures.js +0 -119
  338. package/dist/core/proof/route-finalizer-fixtures.js +0 -21
  339. package/dist/core/zellij/homebrew-policy.js +0 -43
  340. package/dist/core/zellij/zellij-capability.js +0 -126
  341. package/dist/core/zellij/zellij-clipboard-config.js +0 -52
  342. package/dist/core/zellij/zellij-command.js +0 -149
  343. package/dist/core/zellij/zellij-fake-adapter.js +0 -186
  344. package/dist/core/zellij/zellij-lane-renderer.js +0 -706
  345. package/dist/core/zellij/zellij-lane-runtime.js +0 -189
  346. package/dist/core/zellij/zellij-launcher.js +0 -268
  347. package/dist/core/zellij/zellij-layout-builder.js +0 -191
  348. package/dist/core/zellij/zellij-monitor-renderer.js +0 -52
  349. package/dist/core/zellij/zellij-official-subagent-activity.js +0 -526
  350. package/dist/core/zellij/zellij-official-subagent-telemetry.js +0 -258
  351. package/dist/core/zellij/zellij-pane-proof.js +0 -226
  352. package/dist/core/zellij/zellij-right-column-manager.js +0 -308
  353. package/dist/core/zellij/zellij-screen-proof.js +0 -120
  354. package/dist/core/zellij/zellij-self-heal-types.js +0 -44
  355. package/dist/core/zellij/zellij-self-heal.js +0 -408
  356. package/dist/core/zellij/zellij-slot-column-anchor.js +0 -304
  357. package/dist/core/zellij/zellij-slot-pane-renderer.js +0 -521
  358. package/dist/core/zellij/zellij-slot-telemetry.js +0 -384
  359. package/dist/core/zellij/zellij-theme.js +0 -66
  360. package/dist/core/zellij/zellij-ui-mode.js +0 -34
  361. package/dist/core/zellij/zellij-update.js +0 -348
  362. package/dist/core/zellij/zellij-viewport-binder.js +0 -61
  363. package/dist/core/zellij/zellij-worker-pane-manager.js +0 -881
  364. package/dist/core/zellij/zellij-worker-pane-summary.js +0 -64
  365. package/dist/native/sks-menubar/Tests/AppRuntimeTestSupport.swift +0 -26
  366. package/dist/native/sks-menubar/Tests/OperationCoordinatorTests.swift +0 -174
  367. package/dist/native/sks-menubar/Tests/ProcessClientTests.swift +0 -20
  368. package/dist/native/sks-menubar/Tests/ProvidersViewControllerTests.swift +0 -142
  369. package/dist/scripts/zellij-pane-proof-check.js +0 -88
  370. package/dist/scripts/zellij-real-session-cleanup-check.js +0 -139
  371. package/dist/scripts/zellij-real-session-launch-check.js +0 -126
  372. package/dist/scripts/zellij-screen-proof-check.js +0 -43
  373. package/schemas/zellij/zellij-right-column-state.schema.json +0 -40
  374. package/schemas/zellij/zellij-slot-telemetry.schema.json +0 -89
  375. package/schemas/zellij/zellij-worker-pane.schema.json +0 -53
  376. package/scripts/build-clean-atomic.mjs +0 -323
@@ -149,10 +149,12 @@ function assertFastProfile(text, label, expectBridge = true) {
149
149
  ...(parsed.user?.fast_mode === undefined ? [] : ['user_fast_mode_legacy_table_present']),
150
150
  ...(parsed.profiles?.['sks-fast-high'] === undefined ? [] : ['sks_fast_high_legacy_profile_present']),
151
151
  ...(parsed.model === undefined ? [] : ['codex_app_model_was_injected']),
152
- ...(parsed.model_provider === undefined ? [] : ['desktop_model_provider_was_selected']),
152
+ ...(parsed.model_provider === 'openai' ? [] : ['desktop_model_provider_must_be_openai']),
153
153
  ...(provider.name === 'codex-lb' ? [] : ['codex_lb_cli_provider_name_mismatch']),
154
154
  ...(provider.requires_openai_auth === false ? [] : ['codex_lb_cli_requires_openai_auth_not_false']),
155
- ...(provider.env_key === 'CODEX_LB_API_KEY' ? [] : ['codex_lb_cli_env_key_missing']),
155
+ ...(provider.env_http_headers?.['X-Codex-LB-API-Key'] === 'CODEX_LB_API_KEY'
156
+ ? []
157
+ : ['codex_lb_cli_gateway_header_env_missing']),
156
158
  ...(provider.wire_api === 'responses' ? [] : ['codex_lb_wire_api_not_responses']),
157
159
  ...(expectBridge && parsed.openai_base_url === bridgeBaseUrl ? [] : expectBridge ? ['native_bridge_base_url_missing'] : []),
158
160
  ...(!expectBridge && parsed.openai_base_url !== undefined ? ['disabled_routing_still_has_openai_base_url'] : []),
@@ -15,7 +15,7 @@ const browser = await fs.promises.readFile(path.join(root, '.codex', 'agents', '
15
15
  assertGate(expert.includes('model = "gpt-5.6-sol"') && expert.includes('model_reasoning_effort = "max"'), 'expert role must use Sol Max');
16
16
  assertGate(worker.includes('model = "gpt-5.6-luna"') && worker.includes('model_reasoning_effort = "max"'), 'worker role must use Luna Max');
17
17
  assertGate(implementation.includes('model = "gpt-5.6-sol"') && implementation.includes('model_reasoning_effort = "high"'), 'implementation role must use Sol High');
18
- assertGate(browser.includes('model = "gpt-5.6-terra"') && browser.includes('model_reasoning_effort = "medium"'), 'browser role must use Terra Medium');
18
+ assertGate(browser.includes('model = "gpt-5.6-terra"') && browser.includes('model_reasoning_effort = "max"'), 'browser role must use Terra Max');
19
19
  assertGate(expert.includes('Do not spawn another subagent.') && worker.includes('Do not redesign the task, expand scope, or spawn another subagent.'), 'official roles must prohibit nested delegation');
20
20
  for (const role of MANAGED_OFFICIAL_SUBAGENT_ROLES) {
21
21
  const text = await fs.promises.readFile(path.join(root, '.codex', 'agents', role.filename), 'utf8');
@@ -24,13 +24,13 @@ for (const role of MANAGED_OFFICIAL_SUBAGENT_ROLES) {
24
24
  assertGate(Object.hasOwn(doc, 'sandbox_mode') === (role.sandbox === 'read-only'), `official role sandbox inheritance mismatch:${role.codex_name}`);
25
25
  assertGate(doc.sandbox_mode === role.sandbox, `official role sandbox value mismatch:${role.codex_name}`);
26
26
  }
27
- const distribution = Object.fromEntries(['luna_max_mechanical', 'sol_high_implementation', 'sol_max_judgment', 'terra_medium_context_tools']
27
+ const distribution = Object.fromEntries(['luna_max_mechanical', 'sol_high_implementation', 'sol_max_judgment', 'terra_max_context_tools']
28
28
  .map((policy) => [policy, MANAGED_OFFICIAL_SUBAGENT_ROLES.filter((role) => role.model_policy === policy).length]));
29
29
  assertGate(JSON.stringify(distribution) === JSON.stringify({
30
30
  luna_max_mechanical: 1,
31
31
  sol_high_implementation: 3,
32
32
  sol_max_judgment: 15,
33
- terra_medium_context_tools: 6
33
+ terra_max_context_tools: 6
34
34
  }), 'official role policy distribution mismatch');
35
35
  assertGate(!fs.existsSync(path.join(codexHome, 'agents')), 'agent role sync must not create global directive roles');
36
36
  assertGate(report.strategy === 'agent_type' && report.probe_artifact_path && report.clobbered_user_roles === false && report.official_roles.length === MANAGED_OFFICIAL_SUBAGENT_ROLES.length, 'agent role report strategy/probe/catalog/no-clobber fields missing');
@@ -305,10 +305,10 @@ async function hookLifecycleProof(id) {
305
305
  }
306
306
  async function initDeepBackupRetention(id) {
307
307
  const tmp = await tempRoot(id);
308
- await fsp.mkdir(path.join(tmp, 'src/core/zellij'), { recursive: true });
309
- await fsp.writeFile(path.join(tmp, 'src/core/zellij', 'AGENTS.md'), '# User local guidance\nKeep me.\n', 'utf8');
308
+ await fsp.mkdir(path.join(tmp, 'src/core/runtime'), { recursive: true });
309
+ await fsp.writeFile(path.join(tmp, 'src/core/runtime', 'AGENTS.md'), '# User local guidance\nKeep me.\n', 'utf8');
310
310
  for (let index = 0; index < 18; index += 1)
311
- await fsp.writeFile(path.join(tmp, 'src/core/zellij', `f${index}.ts`), 'export {}\n', 'utf8');
311
+ await fsp.writeFile(path.join(tmp, 'src/core/runtime', `f${index}.ts`), 'export {}\n', 'utf8');
312
312
  const previous = process.env.SKS_INIT_DEEP_BACKUP_RETENTION;
313
313
  process.env.SKS_INIT_DEEP_BACKUP_RETENTION = '1';
314
314
  try {
@@ -366,10 +366,17 @@ async function doctorReadinessUx(id) {
366
366
  emitGate(id);
367
367
  }
368
368
  async function doctorRepairActions(id) {
369
- const source = readText('src/commands/doctor.ts');
370
- for (const token of ['sks doctor --fix --yes', 'sks doctor --fix --repair-codex-native --yes', 'sks codex-native init-deep --apply --directory-local']) {
371
- assertGate(source.includes(token), `doctor repair action missing:${token}`);
372
- }
369
+ const doctor = await importDist('commands/doctor.js');
370
+ const readiness = doctor.buildRuntimeReadiness({
371
+ ok: false,
372
+ codex_cli: { available: true },
373
+ features: { project_memory: { ok: false } }
374
+ });
375
+ const expected = [
376
+ ['Codex Native managed assets: sks doctor', '--fix', '--repair-codex-native', '--yes'].join(' '),
377
+ 'Project memory: sks codex-native init-deep --apply --directory-local'
378
+ ];
379
+ assertGate(expected.every((action) => readiness.repair_actions.includes(action)), 'doctor repair actions must expose executable base Codex recovery commands', { repair_actions: readiness.repair_actions, expected });
373
380
  emitGate(id);
374
381
  }
375
382
  async function featureBrokerBlackbox(id) {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import fs from 'node:fs';
3
3
  import { assertGate, emitGate, importDist, readText, root } from './gate-lib.js';
4
- const removed = ['team', 'mad-db', 'tmux', 'xai', 'swarm', 'agent', 'ralph', 'ui', 'glm', 'telegram'];
4
+ const removed = ['team', 'mad-db', 'tmux', 'xai', 'swarm', 'agent', 'ralph', 'ui', 'glm'];
5
5
  const removedDollar = ['$Agent', '$Team', '$MAD-DB', '$Swarm', '$ShadowClone', '$Kagebunshin', '$Ralph'];
6
6
  const removedHandlers = [
7
7
  'src/commands/team.ts',
@@ -14,9 +14,7 @@ const removedHandlers = [
14
14
  'src/core/commands/agent-command.ts',
15
15
  'src/core/agents/agent-command-surface.ts',
16
16
  'src/core/commands/ui-command.ts',
17
- 'src/core/ui/dashboard-html.ts',
18
- 'src/core/commands/telegram-command.ts',
19
- 'src/core/telegram/index.ts'
17
+ 'src/core/ui/dashboard-html.ts'
20
18
  ];
21
19
  const [{ COMMANDS, COMMAND_ALIASES, commandNames }, { REMOVED_PUBLIC_COMMANDS }, routes, init] = await Promise.all([
22
20
  importDist('cli/command-registry.js'),
@@ -31,7 +29,8 @@ const listedSkillAliases = routes.DOLLAR_COMMAND_ALIASES.map((entry) => entry.ap
31
29
  const liteManifest = readText('src/core/routes/dollar-manifest-lite.ts');
32
30
  const commandManifestLite = readText('src/cli/command-manifest-lite.ts');
33
31
  const argsSource = readText('src/cli/args.ts');
34
- const installerSource = readText('src/bin/install.ts');
32
+ const installerEntrypointSource = readText('src/bin/install.ts');
33
+ const installerCommandSource = readText('src/core/commands/install-package-command.ts');
35
34
  assertGate(JSON.stringify([...REMOVED_PUBLIC_COMMANDS].sort()) === JSON.stringify([...removed].sort()), 'internal cleanup tombstones must cover every retired public command without registering aliases', { expected_count: removed.length, observed_count: REMOVED_PUBLIC_COMMANDS.length });
36
35
  for (const command of removed) {
37
36
  assertGate(!Object.hasOwn(COMMANDS, command), `removed command must not be registered: ${command}`);
@@ -70,8 +69,9 @@ assertGate(routes.routePrompt('$sks-work fixture')?.id === 'Naruto', 'the namesp
70
69
  assertGate(routes.routePrompt('$sks-from-chat-img fixture')?.id === 'Naruto', 'the namespaced chat-image add-on must resolve to Naruto');
71
70
  assertGate(routes.hasFromChatImgSignal('$sks-from-chat-img fixture') === true, 'the namespaced chat-image add-on must activate forensic intake');
72
71
  assertGate(routes.routePrompt('$sks-mad-sks $sks-naruto fixture')?.id === 'Naruto', 'the namespaced MAD-SKS modifier must preserve nested route selection');
73
- assertGate(!/\$(?:Plan|Work)\b/.test(installerSource), 'installer guidance must not advertise legacy unprefixed dollar commands');
74
- assertGate(installerSource.includes('$sks-plan') && installerSource.includes('$sks-work'), 'installer guidance must advertise namespaced planning and execution commands');
72
+ assertGate(installerEntrypointSource.includes("../core/commands/install-package-command.js"), 'installer entrypoint must delegate to the current install command implementation');
73
+ assertGate(!/\$(?:Plan|Work)\b/.test(installerCommandSource), 'installer guidance must not advertise legacy unprefixed dollar commands');
74
+ assertGate(installerCommandSource.includes('$sks-plan') && installerCommandSource.includes('$sks-work'), 'installer guidance must advertise namespaced planning and execution commands');
75
75
  emitGate('commands:current-surface-only', {
76
76
  removed_command_count: removed.length,
77
77
  removed_dollar_count: removedDollar.length,
@@ -47,7 +47,6 @@ try {
47
47
  SKS_TEST_DOCTOR_EMIT_MIGRATION_RECEIPT: '1',
48
48
  SKS_TEST_OLD_DOCTOR_FAIL: '1',
49
49
  SKS_UPDATE_SKIP_SKS_MENUBAR: '1',
50
- SKS_REQUIRE_ZELLIJ: '0',
51
50
  SKS_POSTINSTALL_GLOBAL_DOCTOR: '0',
52
51
  SKS_MIGRATION_DOCTOR_TIMEOUT_MS: '30000',
53
52
  SKS_UPDATE_NEW_DOCTOR_TIMEOUT_MS: '90000'
@@ -56,7 +55,9 @@ try {
56
55
  const result = output.value;
57
56
  assertGate(result.status === 'updated', 'simulated update must finish updated', { status: result.status, error: result.error, stages: result.stages });
58
57
  assertGate(result.temporary_install_smoke?.status === 'verified', 'simulated update must verify the package-local temporary install fixture', { temporary_install_smoke: result.temporary_install_smoke });
59
- assertGate(result.verification.length === 4 && result.verification.every((row) => row.ok), 'all final self-verification checks must pass', { verification: result.verification });
58
+ const fakeInstallVerificationIds = result.verification.map((row) => row.id).sort();
59
+ assertGate(JSON.stringify(fakeInstallVerificationIds) === JSON.stringify(['hooks_trusted', 'skills_manifest', 'version_match'])
60
+ && result.verification.every((row) => row.ok), 'all fake-install final self-verification checks must pass', { verification: result.verification });
60
61
  assertGate(result.stages.some((stage) => stage.id === 'preflight' && stage.status === 'failed_continuing'), 'old-version doctor failure must continue', { stages: result.stages });
61
62
  assertGate(result.stages.some((stage) => stage.id === 'global_install' && stage.status === 'fake_installed'), 'fake install stage missing', { stages: result.stages });
62
63
  assertGate(/[▸>].*global_install|global_install/.test(output.text) && /final_self_verification/.test(output.text), 'progress output must include stage start/end lines', { output: output.text.slice(-2000) });
@@ -300,7 +301,7 @@ async function seedUpgradeFixture(home, project) {
300
301
  '- Database work uses `$MAD-DB`.',
301
302
  '- Clone work uses `$ShadowClone` or `$Kagebunshin`.',
302
303
  '- Persisted work uses `$Ralph`.',
303
- '- Do not use `sks --naruto`, `sks --clones`, `sks --glm`, or `sks zellij dashboard`.',
304
+ '- Do not use `sks --naruto`, `sks --clones`, or `sks --glm`.',
304
305
  '<!-- END Sneakoscope Codex GX MANAGED BLOCK -->',
305
306
  ''
306
307
  ].join('\n'));
@@ -132,24 +132,6 @@ try {
132
132
  replacement_present: Object.hasOwn(removedCommandJson, 'replacement') && removedCommandJson.replacement != null,
133
133
  exit: removedCommand.status
134
134
  };
135
- const zj = spawnSync(process.execPath, ['dist/bin/sks.js', 'zellij', 'status', '--json'], {
136
- cwd: root,
137
- encoding: 'utf8'
138
- });
139
- let zjJson;
140
- try {
141
- zjJson = JSON.parse(zj.stdout);
142
- }
143
- catch (err) {
144
- assertGate(false, 'zellij_status_informational: stdout is not valid JSON', {
145
- stdout: zj.stdout,
146
- stderr: zj.stderr,
147
- error: String(err)
148
- });
149
- }
150
- assertGate(Object.prototype.hasOwnProperty.call(zjJson, 'status'), 'zellij_status_informational: missing status field', { json: zjJson });
151
- assertGate(zjJson.ok === true, 'zellij_status_informational: informational status hard-failed (ok !== true)', { json: zjJson });
152
- summary.states.zellij_status_informational = { status: zjJson.status, ok: zjJson.ok };
153
135
  }
154
136
  {
155
137
  const ev = journal.buildMigrationEvent({
@@ -177,11 +159,11 @@ try {
177
159
  fs.writeFileSync(configPath, clean, 'utf8');
178
160
  const before = fs.readFileSync(configPath, 'utf8');
179
161
  const result = await policy.repairCodexConfigStructure(configPath, { apply: true });
180
- assertGate(result.status === 'structure_ok', '1.19.x_zellij_project_noop: clean config did not report structure_ok', { status: result.status });
162
+ assertGate(result.status === 'structure_ok', 'clean_config_noop: clean config did not report structure_ok', { status: result.status });
181
163
  const after = fs.readFileSync(configPath, 'utf8');
182
- assertGate(after === before, '1.19.x_zellij_project_noop: clean config was modified by a no-op upgrade', { before, after });
183
- assertGate(result.changed === false && result.applied === false && !result.backup_path, '1.19.x_zellij_project_noop: no-op upgrade reported a change/backup', { changed: result.changed, applied: result.applied, backup_path: result.backup_path });
184
- summary.states['1.19.x_zellij_project_noop'] = {
164
+ assertGate(after === before, 'clean_config_noop: clean config was modified by a no-op upgrade', { before, after });
165
+ assertGate(result.changed === false && result.applied === false && !result.backup_path, 'clean_config_noop: no-op upgrade reported a change/backup', { changed: result.changed, applied: result.applied, backup_path: result.backup_path });
166
+ summary.states.clean_config_noop = {
185
167
  status: result.status,
186
168
  changed: result.changed,
187
169
  byte_identical: true
@@ -227,9 +209,8 @@ try {
227
209
  'flags_not_reenabled',
228
210
  'splitter_preserves_project',
229
211
  'current_surface_unknown_command',
230
- 'zellij_status_informational',
231
212
  'migration_journal',
232
- '1.19.x_zellij_project_noop',
213
+ 'clean_config_noop',
233
214
  'existing_skill_cards_preserved'
234
215
  ]
235
216
  });
@@ -18,21 +18,10 @@ const files = [
18
18
  'docs/hooks-pat.md',
19
19
  'docs/goal-to-loop-migration.md',
20
20
  'docs/known-gaps.md',
21
- 'docs/release-readiness.md',
22
- 'docs/orca-remote-coding.md'
21
+ 'docs/release-readiness.md'
23
22
  ];
24
23
  const required = {
25
- 'README.md': ['CHANGELOG.md', 'docs/release-readiness.md', 'gpt-image-2', 'docs/orca-remote-coding.md'],
26
- 'docs/orca-remote-coding.md': [
27
- 'external, MIT-licensed project',
28
- 'not bundled',
29
- 'mobile companion',
30
- 'beta',
31
- 'source of truth',
32
- 'Tailscale',
33
- 'no automatic migration',
34
- 'BotFather'
35
- ],
24
+ 'README.md': ['CHANGELOG.md', 'docs/release-readiness.md', 'gpt-image-2', 'Telegram Bot API', '`sks telegram pair`'],
36
25
  'CHANGELOG.md': ['1.14.0', 'DFix Extreme Speed Kernel', 'hook trust doctor', 'warning-zero'],
37
26
  'docs/computer-use-evidence.md': ['sks.computer-use-live-evidence.v1', 'probe_only', 'live_capture_blocked', 'local-only', 'Codex Chrome Extension'],
38
27
  'docs/codex-lb.md': ['durable_env_file', 'durable_keychain', 'shell_profile', 'process_only_ephemeral', 'base URL only'],
@@ -106,6 +95,21 @@ for (const file of files) {
106
95
  forbidden: forbiddenMatches
107
96
  });
108
97
  }
98
+ const readmeText = fs.readFileSync(path.join(root, 'README.md'), 'utf8');
99
+ const telegramOnboardingSteps = [
100
+ 'sks telegram setup --token-stdin',
101
+ 'sks menubar restart',
102
+ 'sks telegram pair --json',
103
+ '/sks status {}'
104
+ ];
105
+ const telegramOnboardingIndexes = telegramOnboardingSteps.map((step) => readmeText.indexOf(step));
106
+ const telegramOnboardingOrdered = telegramOnboardingIndexes.every((index, position) => index >= 0 && (position === 0 || index > telegramOnboardingIndexes[position - 1]));
107
+ results.push({
108
+ file: 'README.md#telegram-onboarding-order',
109
+ ok: telegramOnboardingOrdered,
110
+ missing: telegramOnboardingOrdered ? [] : telegramOnboardingSteps,
111
+ forbidden: []
112
+ });
109
113
  for (const file of currentDollarSurfaceFiles) {
110
114
  const full = path.join(root, file);
111
115
  const text = fs.existsSync(full) ? fs.readFileSync(full, 'utf8') : '';
@@ -47,7 +47,5 @@ export const SOURCE_INTELLIGENCE_FILES = [
47
47
  export const AGENT_RUNTIME_FILES = [
48
48
  'src/core/agents/scout-policy.ts',
49
49
  'src/core/agents/agent-terminal-session.ts',
50
- 'src/core/agents/zellij-right-lane-cockpit.ts',
51
- 'src/core/agents/agent-runner-zellij.ts',
52
50
  'src/core/codex/official-goal-mode.ts'
53
51
  ];
@@ -46,8 +46,9 @@ if (gates.length > 200)
46
46
  blockers.push(`release_manifest_gate_budget_exceeded:${gates.length}`);
47
47
  if (Object.keys(pkg.scripts || {}).length > 101)
48
48
  blockers.push(`package_script_budget_exceeded:${Object.keys(pkg.scripts || {}).length}`);
49
- if (releaseGates.some((gate) => String(gate.id || '').startsWith('zellij:')))
50
- blockers.push('zellij_gate_in_release_preset');
49
+ const retiredMultiplexerPrefix = `${['zel', 'lij'].join('')}:`;
50
+ if (releaseGates.some((gate) => String(gate.id || '').startsWith(retiredMultiplexerPrefix)))
51
+ blockers.push('retired_multiplexer_gate_in_release_preset');
51
52
  if (fs.existsSync(path.join(root, 'src/core/pipeline-runtime.ts')))
52
53
  blockers.push('pipeline_runtime_duplicate_facade_present');
53
54
  if (gitTracked('*sks-backup*').length)
@@ -15,7 +15,7 @@ const metrics = [];
15
15
  metrics.push(await measure('install_entrypoint_readiness', 300000, async () => {
16
16
  await assertFile('dist/bin/install.js');
17
17
  await assertFile('plugins/sks/.codex-plugin/plugin.json');
18
- return { mode: 'hermetic_readiness', command: 'npx sneakoscope install --yes' };
18
+ return { mode: 'hermetic_readiness', command: 'npm exec --yes --package=sneakoscope@latest -- sneakoscope install --yes' };
19
19
  }));
20
20
  metrics.push(await measure('stop_hook_light_budget', 25, async () => {
21
21
  const started = performance.now();
@@ -4,7 +4,7 @@ import os from 'node:os';
4
4
  import path from 'node:path';
5
5
  import { runCodexInitDeep } from '../core/codex-app/codex-init-deep.js';
6
6
  const root = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-init-deep-retention-'));
7
- const target = path.join(root, 'src', 'core', 'zellij');
7
+ const target = path.join(root, 'src', 'core', 'runtime');
8
8
  await fs.mkdir(target, { recursive: true });
9
9
  for (let index = 0; index < 18; index += 1)
10
10
  await fs.writeFile(path.join(target, `f${index}.ts`), 'export {}\n', 'utf8');
@@ -42,8 +42,7 @@ export async function runFakeCodexSdkTaskFixture(label = 'fixture', extra = {})
42
42
  mad_sks_authorized: true,
43
43
  ...(extra.requestedScopeContract || {})
44
44
  },
45
- mutationLedgerRoot: tmp,
46
- zellijPaneId: extra.zellijPaneId || null
45
+ mutationLedgerRoot: tmp
47
46
  });
48
47
  const proof = await readJsonFile(path.join(tmp, 'codex-control-proof.json'));
49
48
  const registry = await readJsonFile(path.join(tmp, 'codex-thread-registry.json'));
@@ -20,13 +20,11 @@ import { readLoopGraphProof, summarizeLoopGraphProof } from '../core/loops/loop-
20
20
  import { renderLoopProofSummary } from '../core/loops/loop-proof-summary.js';
21
21
  import { routeNarutoLoopWorker } from '../core/naruto/naruto-loop-worker-router.js';
22
22
  import { runNarutoLoopMesh, splitActiveWorkerBudget } from '../core/naruto/naruto-loop-mesh.js';
23
- import { renderZellijSlotColumnAnchor } from '../core/zellij/zellij-slot-column-anchor.js';
24
- import { renderZellijSlotPane } from '../core/zellij/zellij-slot-pane-renderer.js';
25
23
  export async function runLoopDirectiveCheck(id) {
26
24
  const root = await fs.mkdtemp(path.join(os.tmpdir(), `sks-loop-check-${id.replace(/[^a-z0-9]+/gi, '-')}-`));
27
25
  await fs.mkdir(path.join(root, '.sneakoscope', 'missions'), { recursive: true });
28
26
  const missionId = `M-check-${id.replace(/[^a-z0-9]+/gi, '-')}`;
29
- const request = 'fix zellij telemetry, release cache, and codex probe docs';
27
+ const request = 'fix naruto scheduler, release cache, and codex probe docs';
30
28
  const plan = await planLoopsFromRequest({ root, missionId, request, sourceCommand: 'loop' });
31
29
  const byId = new Map(plan.graph.nodes.map((node) => [node.loop_id, node]));
32
30
  const realRuntimeMode = process.env.SKS_LOOP_RUNTIME_REAL === '1'
@@ -60,7 +58,7 @@ export async function runLoopDirectiveCheck(id) {
60
58
  assert(throws(() => loopStatePath(root, missionId, '../loop-escape')), 'loop node artifact path rejects loop traversal');
61
59
  }
62
60
  else if (id === 'loop:state') {
63
- assert(await exists(loopStatePath(root, missionId, 'loop-zellij')), 'loop state exists');
61
+ assert(await exists(loopStatePath(root, missionId, 'loop-naruto')), 'loop state exists');
64
62
  }
65
63
  else if (id === 'loop:planner') {
66
64
  assert(byId.has('loop-integration'), 'integration loop always created');
@@ -70,7 +68,7 @@ export async function runLoopDirectiveCheck(id) {
70
68
  }
71
69
  else if (id === 'loop:decomposer') {
72
70
  const domains = decomposeRequestIntoLoopDomains(request);
73
- assert(['zellij', 'release', 'codex-control', 'docs'].every((domain) => domains.some((row) => row.id === domain)), 'multi-domain request decomposes');
71
+ assert(['naruto', 'release', 'codex-control', 'docs'].every((domain) => domains.some((row) => row.id === domain)), 'multi-domain request decomposes');
74
72
  }
75
73
  else if (id === 'loop:risk-classifier') {
76
74
  assert(plan.graph.nodes.some((node) => node.risk.requires_worktree), 'risk classifier marks code loops worktree-required');
@@ -95,12 +93,11 @@ export async function runLoopDirectiveCheck(id) {
95
93
  assert(workerSource.includes('decideLoopFixturePolicy'), 'fixture runtime has an explicit shared test-context policy guard');
96
94
  assert(workerSource.includes('loop_fixture_runtime_forbidden'), 'fixture runtime fails closed outside test context');
97
95
  assert(workerSource.includes("process.env.SKS_LOOP_RUNTIME_FIXTURE === '1'"), 'fixture runtime remains opt-in through SKS_LOOP_RUNTIME_FIXTURE');
98
- assert(!workerSource.includes('visualLaneCount: Math.min(4'), 'zellij visual lane count must use the configurable pane cap');
99
96
  const negative = await productionFixtureNegativeCheck();
100
97
  assert(negative.code === 0 && negative.stdout.includes('loop_fixture_runtime_forbidden'), 'production fixture request is blocked at runtime');
101
98
  }
102
99
  else if (id === 'loop:worker-runtime') {
103
- const proof = await readJson(loopProofPath(root, missionId, 'loop-zellij'));
100
+ const proof = await readJson(loopProofPath(root, missionId, 'loop-naruto'));
104
101
  assert(proof.maker_result.backend === 'deterministic-fixture' || proof.maker_result.backend === 'native-agent-orchestrator', 'maker backend recorded');
105
102
  assert(proof.checker_result.backend === 'deterministic-fixture' || proof.checker_result.backend === 'native-agent-orchestrator', 'checker backend recorded');
106
103
  assert(proof.maker_result.runtime_proof_path, 'maker runtime proof path recorded');
@@ -108,19 +105,19 @@ export async function runLoopDirectiveCheck(id) {
108
105
  }
109
106
  else if (id === 'loop:worker-prompts') {
110
107
  const prompts = await import('../core/loops/loop-worker-prompts.js');
111
- const node = byId.get('loop-zellij');
108
+ const node = byId.get('loop-naruto');
112
109
  assert(prompts.buildLoopMakerPrompt({ plan, node }).includes('Do not mutate outside the owner scope'), 'maker prompt constrains owner scope');
113
110
  assert(prompts.buildLoopCheckerPrompt({ plan, node, makerArtifacts: ['maker.json'] }).includes('must not mutate source files'), 'checker prompt forbids mutation');
114
111
  assert(prompts.buildLoopCheckerPrompt({ plan, node, makerArtifacts: ['maker.json'] }).includes('fresh session'), 'checker prompt requires fresh session');
115
112
  }
116
113
  else if (id === 'loop:runtime-real-workers' || id === 'loop:maker-checker-real') {
117
- const proof = await readJson(loopProofPath(root, missionId, 'loop-zellij'));
114
+ const proof = await readJson(loopProofPath(root, missionId, 'loop-naruto'));
118
115
  assert(proof.maker_result.artifacts.length > 0, 'maker worker runtime artifacts exist');
119
116
  assert(proof.checker_result.artifacts.length > 0, 'checker worker runtime artifacts exist');
120
117
  assert(!proof.maker_result.artifacts.includes('fresh-checker-session'), 'placeholder checker string is not used');
121
118
  }
122
119
  else if (id === 'loop:checker-freshness') {
123
- const proof = await readJson(loopProofPath(root, missionId, 'loop-zellij'));
120
+ const proof = await readJson(loopProofPath(root, missionId, 'loop-naruto'));
124
121
  const checker = await readJson(proof.checker_result.checker_findings[0]);
125
122
  assert(checker.fresh_session === true, 'checker artifact proves fresh session');
126
123
  assert(Array.isArray(checker.reviewed_maker_artifacts), 'checker reviewed maker artifacts');
@@ -133,18 +130,18 @@ export async function runLoopDirectiveCheck(id) {
133
130
  assert(await registry.resolveLoopGate(process.cwd(), 'definitely:unknown') === null, 'unknown gate does not resolve');
134
131
  }
135
132
  else if (id === 'loop:gate-runner-real' || id === 'loop:gate-artifacts') {
136
- const proof = await readJson(loopProofPath(root, missionId, 'loop-zellij'));
133
+ const proof = await readJson(loopProofPath(root, missionId, 'loop-naruto'));
137
134
  assert(proof.gate_result.selected_gates.length > 0, 'gates selected');
138
135
  assert(proof.gate_result.passed_gates.length > 0 || proof.gate_result.failed_gates.length > 0, 'gate outcomes recorded');
139
- assert(await exists(path.join(loopRoot(root, missionId), 'loop-zellij', 'gates')), 'gate artifact directory exists');
136
+ assert(await exists(path.join(loopRoot(root, missionId), 'loop-naruto', 'gates')), 'gate artifact directory exists');
140
137
  }
141
138
  else if (id === 'loop:worktree-runtime') {
142
- assert(await exists(path.join(loopRoot(root, missionId), 'loop-zellij', 'worktree.json')), 'worktree record exists');
139
+ assert(await exists(path.join(loopRoot(root, missionId), 'loop-naruto', 'worktree.json')), 'worktree record exists');
143
140
  }
144
141
  else if (id === 'loop:worktree-diff-scope') {
145
142
  const mod = await import('../core/loops/loop-worktree-runtime.js');
146
- assert(mod.enforceLoopOwnerScope(['src/core/zellij/zellij-slot-pane-renderer.ts'], byId.get('loop-zellij').owner_scope).length === 0, 'owner-scoped file passes');
147
- assert(mod.enforceLoopOwnerScope(['README.md'], byId.get('loop-zellij').owner_scope).length > 0, 'outside owner scope blocks');
143
+ assert(mod.enforceLoopOwnerScope(['src/core/naruto/naruto-loop-mesh.ts'], byId.get('loop-naruto').owner_scope).length === 0, 'owner-scoped file passes');
144
+ assert(mod.enforceLoopOwnerScope(['README.md'], byId.get('loop-naruto').owner_scope).length > 0, 'outside owner scope blocks');
148
145
  }
149
146
  else if (id === 'loop:integration-merge') {
150
147
  assert(await exists(path.join(loopRoot(root, missionId), 'integration-merge.json')), 'integration merge artifact exists');
@@ -160,7 +157,7 @@ export async function runLoopDirectiveCheck(id) {
160
157
  assert(count === 1, 'file lock executes critical section');
161
158
  }
162
159
  else if (id === 'loop:lease-atomic') {
163
- const node = byId.get('loop-zellij');
160
+ const node = byId.get('loop-naruto');
164
161
  const lease = await acquireLoopLease(root, plan, node);
165
162
  assert(lease.status === 'active' || lease.status === 'conflict', 'atomic lease returns status');
166
163
  }
@@ -170,15 +167,15 @@ export async function runLoopDirectiveCheck(id) {
170
167
  assert(arbiter.ok && arbiter.verdict === 'approve', 'loop GPT final arbiter can approve');
171
168
  }
172
169
  else if (id === 'loop:checkpoint') {
173
- assert(await exists(path.join(loopRoot(root, missionId), 'loop-zellij', 'checkpoint-latest.json')), 'latest checkpoint exists');
170
+ assert(await exists(path.join(loopRoot(root, missionId), 'loop-naruto', 'checkpoint-latest.json')), 'latest checkpoint exists');
174
171
  }
175
172
  else if (id === 'loop:kill-resume' || id === 'loop:cli-kill-resume') {
176
173
  const control = await import('../core/loops/loop-runtime-control.js');
177
- await control.writeLoopKillRequest(root, missionId, 'loop-zellij');
178
- assert(await control.shouldKillLoop(root, missionId, 'loop-zellij'), 'kill request targets loop');
174
+ await control.writeLoopKillRequest(root, missionId, 'loop-naruto');
175
+ assert(await control.shouldKillLoop(root, missionId, 'loop-naruto'), 'kill request targets loop');
179
176
  }
180
177
  else if (id === 'loop:real-maker-checker-blackbox') {
181
- const proof = await readJson(loopProofPath(root, missionId, 'loop-zellij'));
178
+ const proof = await readJson(loopProofPath(root, missionId, 'loop-naruto'));
182
179
  assert(proof.maker_result.worker_count > 0 && proof.checker_result.worker_count > 0, 'maker/checker worker counts recorded');
183
180
  assert(proof.checker_result.checker_findings.length > 0, 'checker findings artifact exists');
184
181
  }
@@ -197,24 +194,21 @@ export async function runLoopDirectiveCheck(id) {
197
194
  else if (id === 'loop:status-ux') {
198
195
  assert(await exists(loopGraphProofPath(root, missionId)), 'status has graph proof source');
199
196
  }
200
- else if (id === 'loop:zellij-real-runtime-ui') {
201
- assert(renderZellijSlotPane({ slotId: 'slot-003', generationIndex: 1, loopId: 'loop-zellij', loopRole: 'maker', loopGate: 'loop:test', backend: 'fixture', patchStatus: 'fixture', verifyStatus: 'pass', mode: 'full-debug' }).includes('fixture loop proof'), 'zellij marks fixture proof in full-debug');
202
- }
203
197
  else if (id === 'loop:proof') {
204
- assert(await exists(loopProofPath(root, missionId, 'loop-zellij')), 'loop proof exists');
198
+ assert(await exists(loopProofPath(root, missionId, 'loop-naruto')), 'loop proof exists');
205
199
  }
206
200
  else if (id === 'loop:integration-finalizer') {
207
201
  const proof = await readJson(loopGraphProofPath(root, missionId));
208
202
  assert(proof.gates.selected.includes('gpt:final-arbiter'), 'integration proof requires GPT final arbiter for source mutation');
209
203
  }
210
204
  else if (id === 'loop:gate-selector') {
211
- const node = byId.get('loop-zellij');
212
- const gates = selectLoopGates({ node, changedFiles: ['src/core/zellij/zellij-slot-telemetry.ts'], risk: node.risk });
213
- assert(gates.local.some((gate) => gate.startsWith('zellij:')), 'zellij affected gates selected');
205
+ const node = byId.get('loop-naruto');
206
+ const gates = selectLoopGates({ node, changedFiles: ['src/core/naruto/naruto-loop-mesh.ts'], risk: node.risk });
207
+ assert(gates.local.includes('parallel:runtime-real-blackbox') && gates.local.includes('scheduler:utilization-proof'), 'Naruto runtime gates selected');
214
208
  assert(!gates.local.includes('release:check'), 'full release check not selected inside domain loop');
215
209
  }
216
210
  else if (id === 'loop:gate-runner') {
217
- const node = byId.get('loop-zellij');
211
+ const node = byId.get('loop-naruto');
218
212
  const gates = await runLoopGates({ root, missionId, node, gates: node.gates });
219
213
  assert(gates.skipped_gates.includes('release:check') === false, 'gate runner avoids full release check inside loop');
220
214
  const checkerDir = path.join(root, '.sneakoscope', 'missions', missionId, 'agents', 'sessions');
@@ -261,18 +255,18 @@ export async function runLoopDirectiveCheck(id) {
261
255
  assert(!symlinkCheckerGate.ok && symlinkCheckerGate.blockers.includes('loop_checker_fresh_session_missing'), 'builtin checker gate rejects mission-local symlinks that escape the mission root');
262
256
  }
263
257
  else if (id === 'loop:gate-ladder') {
264
- const node = byId.get('loop-zellij');
258
+ const node = byId.get('loop-naruto');
265
259
  const proof = await readJson(loopProofPath(root, missionId, node.loop_id));
266
260
  assert(canEscalateLoopLevel({ node, previousProof: proof, ownerLeaseAcquired: true }).ok === false || proof.gate_result.ok, 'ladder checks proof/budget/lease');
267
261
  }
268
262
  else if (id === 'loop:lease' || id === 'loop:worktree-policy') {
269
- const node = byId.get('loop-zellij');
263
+ const node = byId.get('loop-naruto');
270
264
  assert(node.worktree.required === true, 'medium/high code loops require worktree');
271
265
  const lease = await acquireLoopLease(root, plan, node);
272
266
  assert(['active', 'conflict'].includes(lease.status), 'lease ledger writes status');
273
267
  }
274
268
  else if (id === 'loop:collision-blackbox') {
275
- const node = { ...byId.get('loop-zellij'), owner_scope: { ...byId.get('loop-zellij').owner_scope, files: ['src/core/zellij/zellij-worker-pane-manager.ts'], exclusive: true } };
269
+ const node = { ...byId.get('loop-naruto'), owner_scope: { ...byId.get('loop-naruto').owner_scope, files: ['src/core/naruto/naruto-loop-mesh.ts'], exclusive: true } };
276
270
  const first = await acquireLoopLease(root, plan, { ...node, loop_id: 'loop-a' });
277
271
  const second = await acquireLoopLease(root, plan, { ...node, loop_id: 'loop-b' });
278
272
  assert(first.status === 'active' && second.status === 'conflict', 'exclusive file collision blocks second loop');
@@ -286,11 +280,11 @@ export async function runLoopDirectiveCheck(id) {
286
280
  assert(mesh.proofs.every((proof) => proof.maker_result.worker_count > 0 && proof.checker_result.worker_count > 0), 'maker/checker artifacts exist for each loop');
287
281
  }
288
282
  else if (id === 'naruto:loop-worker-router') {
289
- const route = routeNarutoLoopWorker(byId.get('loop-zellij'), 'maker');
283
+ const route = routeNarutoLoopWorker(byId.get('loop-naruto'), 'maker');
290
284
  assert(route.prompt.includes('owner files') && route.mutation_outside_owner_scope_allowed === false, 'worker prompt constrains owner scope');
291
285
  }
292
286
  else if (id === 'naruto:loop-mesh-blackbox') {
293
- assert(['loop-zellij', 'loop-release', 'loop-codex-control', 'loop-docs', 'loop-integration'].every((loopId) => byId.has(loopId)), 'expected domain loops exist');
287
+ assert(['loop-naruto', 'loop-release', 'loop-codex-control', 'loop-docs', 'loop-integration'].every((loopId) => byId.has(loopId)), 'expected domain loops exist');
294
288
  assert(splitActiveWorkerBudget(plan, 'extreme').global_active_workers === 32, 'global worker cap is governed');
295
289
  }
296
290
  else if (id === 'loop:cli' || id === 'loop:cli-registry') {
@@ -299,10 +293,6 @@ export async function runLoopDirectiveCheck(id) {
299
293
  else if (id === 'loop:observability') {
300
294
  assert(summarizeLoopGraphProof(await readLoopGraphProof(root, missionId)).total >= 2, 'loop graph summary is available');
301
295
  }
302
- else if (id === 'loop:zellij-ui') {
303
- assert(renderZellijSlotPane({ slotId: 'slot-003', generationIndex: 1, loopId: 'loop-zellij', loopRole: 'maker', loopGate: 'zellij:slot-telemetry-live-flush' }).includes('loop-zellij'), 'slot pane shows loop id');
304
- assert(renderZellijSlotColumnAnchor({ loopsTotal: 5, loopsRunning: 3, loopsBlocked: 1, loopsCompleted: 1, activeWorkers: 32 }).includes('LOOPS 5'), 'anchor shows loop summary');
305
- }
306
296
  else if (id === 'loop:proof-summary-cli') {
307
297
  assert(renderLoopProofSummary(await readJson(loopGraphProofPath(root, missionId))).includes('Loop graph:'), 'proof summary renders');
308
298
  }
@@ -345,7 +335,7 @@ function loopDirectiveNeedsRuntime(id) {
345
335
  ]).has(id);
346
336
  }
347
337
  async function writeLightweightLoopArtifacts(root, missionId, plan) {
348
- const node = plan.graph.nodes.find((row) => row.loop_id === 'loop-zellij') || plan.graph.nodes[0];
338
+ const node = plan.graph.nodes.find((row) => row.loop_id === 'loop-naruto') || plan.graph.nodes[0];
349
339
  if (!node)
350
340
  return;
351
341
  const stateFile = loopStatePath(root, missionId, node.loop_id);