@openrig/cli 0.5.7 → 0.5.9

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 (947) hide show
  1. package/daemon/assets/claude-statusline-context.cjs +1 -0
  2. package/daemon/assets/plugins/openrig-core/README.md +1 -1
  3. package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +25 -2
  4. package/daemon/assets/plugins/openrig-core/skills/agent-operated-software/SKILL.md +92 -0
  5. package/daemon/assets/plugins/openrig-core/skills/agent-operated-workflows/SKILL.md +79 -0
  6. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +95 -8
  7. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +9 -1
  8. package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +2 -2
  9. package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +4 -2
  10. package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +12 -16
  11. package/daemon/assets/plugins/openrig-core/skills/software-for-agents/SKILL.md +11 -179
  12. package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
  13. package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +98 -29
  14. package/daemon/context-packs/skills/agent-operated-software/SKILL.md +92 -0
  15. package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +10 -0
  16. package/daemon/context-packs/skills/agent-operated-workflows/SKILL.md +79 -0
  17. package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +10 -0
  18. package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
  19. package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
  20. package/daemon/context-packs/skills/claude-compaction-restore/scripts/precompact-hook.mjs +95 -8
  21. package/daemon/context-packs/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +9 -1
  22. package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
  23. package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
  24. package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
  25. package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
  26. package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
  27. package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
  28. package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
  29. package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
  30. package/daemon/context-packs/skills/core/openrig-skills/SKILL.md +4 -2
  31. package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
  32. package/daemon/context-packs/skills/core/openrig-upgrade/SKILL.md +189 -343
  33. package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +11 -3
  34. package/daemon/context-packs/skills/core/openrig-upgrade/scripts/backup-sqlite.mjs +62 -0
  35. package/daemon/context-packs/skills/core/openrig-upgrade/scripts/inspect-upgrade.mjs +40 -0
  36. package/daemon/context-packs/skills/core/openrig-upgrade/scripts/migrate-telemetry-state-0.5.9.mjs +1419 -0
  37. package/daemon/context-packs/skills/core/openrig-upgrade/scripts/refresh-managed-plugin.mjs +151 -0
  38. package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
  39. package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
  40. package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
  41. package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
  42. package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
  43. package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
  44. package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
  45. package/daemon/context-packs/skills/forming-an-openrig-mental-model/SKILL.md +2 -2
  46. package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
  47. package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
  48. package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
  49. package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
  50. package/daemon/context-packs/skills/openrig-user/SKILL.md +12 -16
  51. package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
  52. package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
  53. package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
  54. package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
  55. package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
  56. package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
  57. package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
  58. package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
  59. package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
  60. package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
  61. package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
  62. package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
  63. package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
  64. package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
  65. package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
  66. package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
  67. package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
  68. package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
  69. package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
  70. package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
  71. package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
  72. package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
  73. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
  74. package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
  75. package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
  76. package/daemon/context-packs/skills/software-for-agents/SKILL.md +11 -179
  77. package/daemon/context-packs/skills/software-for-agents/manifest.yaml +3 -3
  78. package/daemon/context-packs/world-example/manifest.yaml +1 -1
  79. package/daemon/context-packs/world-example/your-world.md +1 -1
  80. package/daemon/context-packs/world-public/build-your-world.md +19 -0
  81. package/daemon/context-packs/world-public/claims.yaml +5 -1
  82. package/daemon/context-packs/world-public/manifest.yaml +40 -1
  83. package/daemon/context-packs/world-public/verify-world.sh +25 -9
  84. package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
  85. package/daemon/dist/adapters/claude-code-adapter.js +4 -2
  86. package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
  87. package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
  88. package/daemon/dist/adapters/codex-runtime-adapter.js +249 -2
  89. package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  90. package/daemon/dist/adapters/tmux.d.ts +6 -5
  91. package/daemon/dist/adapters/tmux.d.ts.map +1 -1
  92. package/daemon/dist/adapters/tmux.js +29 -12
  93. package/daemon/dist/adapters/tmux.js.map +1 -1
  94. package/daemon/dist/build-info.js +3 -3
  95. package/daemon/dist/db/all-migrations.d.ts +1 -1
  96. package/daemon/dist/db/all-migrations.d.ts.map +1 -1
  97. package/daemon/dist/db/all-migrations.js +5 -1
  98. package/daemon/dist/db/all-migrations.js.map +1 -1
  99. package/daemon/dist/db/migrations/046_seat_identity_verdicts.d.ts +8 -5
  100. package/daemon/dist/db/migrations/046_seat_identity_verdicts.d.ts.map +1 -1
  101. package/daemon/dist/db/migrations/046_seat_identity_verdicts.js +8 -5
  102. package/daemon/dist/db/migrations/046_seat_identity_verdicts.js.map +1 -1
  103. package/daemon/dist/db/migrations/078_idle_gate_fired_condition.d.ts +17 -0
  104. package/daemon/dist/db/migrations/078_idle_gate_fired_condition.d.ts.map +1 -0
  105. package/daemon/dist/db/migrations/078_idle_gate_fired_condition.js +21 -0
  106. package/daemon/dist/db/migrations/078_idle_gate_fired_condition.js.map +1 -0
  107. package/daemon/dist/db/migrations/079_workflow_lifecycle_parallel.d.ts +8 -0
  108. package/daemon/dist/db/migrations/079_workflow_lifecycle_parallel.d.ts.map +1 -0
  109. package/daemon/dist/db/migrations/079_workflow_lifecycle_parallel.js +50 -0
  110. package/daemon/dist/db/migrations/079_workflow_lifecycle_parallel.js.map +1 -0
  111. package/daemon/dist/domain/active-occupant.d.ts +12 -1
  112. package/daemon/dist/domain/active-occupant.d.ts.map +1 -1
  113. package/daemon/dist/domain/active-occupant.js +61 -0
  114. package/daemon/dist/domain/active-occupant.js.map +1 -1
  115. package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
  116. package/daemon/dist/domain/bootstrap-orchestrator.js +8 -1
  117. package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
  118. package/daemon/dist/domain/bundle-context-packs-router.d.ts +3 -3
  119. package/daemon/dist/domain/bundle-context-packs-router.d.ts.map +1 -1
  120. package/daemon/dist/domain/bundle-skills-router.d.ts +3 -0
  121. package/daemon/dist/domain/bundle-skills-router.d.ts.map +1 -1
  122. package/daemon/dist/domain/bundle-skills-router.js +5 -1
  123. package/daemon/dist/domain/bundle-skills-router.js.map +1 -1
  124. package/daemon/dist/domain/claim-service.d.ts +2 -0
  125. package/daemon/dist/domain/claim-service.d.ts.map +1 -1
  126. package/daemon/dist/domain/claim-service.js +33 -12
  127. package/daemon/dist/domain/claim-service.js.map +1 -1
  128. package/daemon/dist/domain/context-packs/context-pack-library-service.d.ts.map +1 -1
  129. package/daemon/dist/domain/context-packs/context-pack-library-service.js +9 -1
  130. package/daemon/dist/domain/context-packs/context-pack-library-service.js.map +1 -1
  131. package/daemon/dist/domain/context-packs/context-pack-types.d.ts +25 -0
  132. package/daemon/dist/domain/context-packs/context-pack-types.d.ts.map +1 -1
  133. package/daemon/dist/domain/context-packs/context-pack-types.js +3 -1
  134. package/daemon/dist/domain/context-packs/context-pack-types.js.map +1 -1
  135. package/daemon/dist/domain/context-packs/manifest-parser.d.ts.map +1 -1
  136. package/daemon/dist/domain/context-packs/manifest-parser.js +143 -3
  137. package/daemon/dist/domain/context-packs/manifest-parser.js.map +1 -1
  138. package/daemon/dist/domain/context-packs/profile-composer.d.ts +22 -1
  139. package/daemon/dist/domain/context-packs/profile-composer.d.ts.map +1 -1
  140. package/daemon/dist/domain/context-packs/profile-composer.js +105 -40
  141. package/daemon/dist/domain/context-packs/profile-composer.js.map +1 -1
  142. package/daemon/dist/domain/context-usage-store.d.ts +4 -0
  143. package/daemon/dist/domain/context-usage-store.d.ts.map +1 -1
  144. package/daemon/dist/domain/context-usage-store.js +8 -4
  145. package/daemon/dist/domain/context-usage-store.js.map +1 -1
  146. package/daemon/dist/domain/crash-cart-conductor.d.ts +13 -0
  147. package/daemon/dist/domain/crash-cart-conductor.d.ts.map +1 -1
  148. package/daemon/dist/domain/crash-cart-conductor.js +3 -1
  149. package/daemon/dist/domain/crash-cart-conductor.js.map +1 -1
  150. package/daemon/dist/domain/current-work.d.ts +73 -0
  151. package/daemon/dist/domain/current-work.d.ts.map +1 -0
  152. package/daemon/dist/domain/current-work.js +225 -0
  153. package/daemon/dist/domain/current-work.js.map +1 -0
  154. package/daemon/dist/domain/execution-view.d.ts.map +1 -1
  155. package/daemon/dist/domain/execution-view.js +344 -13
  156. package/daemon/dist/domain/execution-view.js.map +1 -1
  157. package/daemon/dist/domain/gateway/human-registry.d.ts +3 -2
  158. package/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
  159. package/daemon/dist/domain/gateway/human-registry.js +113 -18
  160. package/daemon/dist/domain/gateway/human-registry.js.map +1 -1
  161. package/daemon/dist/domain/instance-initialization.d.ts +25 -0
  162. package/daemon/dist/domain/instance-initialization.d.ts.map +1 -0
  163. package/daemon/dist/domain/instance-initialization.js +81 -0
  164. package/daemon/dist/domain/instance-initialization.js.map +1 -0
  165. package/daemon/dist/domain/lifecycle-manifest.d.ts +19 -0
  166. package/daemon/dist/domain/lifecycle-manifest.d.ts.map +1 -0
  167. package/daemon/dist/domain/lifecycle-manifest.js +73 -0
  168. package/daemon/dist/domain/lifecycle-manifest.js.map +1 -0
  169. package/daemon/dist/domain/model-divergence/current-generation-record.d.ts +36 -36
  170. package/daemon/dist/domain/model-divergence/current-generation-record.d.ts.map +1 -1
  171. package/daemon/dist/domain/model-divergence/current-generation-record.js +104 -135
  172. package/daemon/dist/domain/model-divergence/current-generation-record.js.map +1 -1
  173. package/daemon/dist/domain/model-divergence/effective-model-readers.d.ts +3 -2
  174. package/daemon/dist/domain/model-divergence/effective-model-readers.d.ts.map +1 -1
  175. package/daemon/dist/domain/model-divergence/effective-model-readers.js +7 -5
  176. package/daemon/dist/domain/model-divergence/effective-model-readers.js.map +1 -1
  177. package/daemon/dist/domain/native-process-lineage.d.ts +10 -0
  178. package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -0
  179. package/daemon/dist/domain/native-process-lineage.js +86 -0
  180. package/daemon/dist/domain/native-process-lineage.js.map +1 -0
  181. package/daemon/dist/domain/native-resume-probe.js +12 -1
  182. package/daemon/dist/domain/native-resume-probe.js.map +1 -1
  183. package/daemon/dist/domain/node-inventory.d.ts +2 -0
  184. package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
  185. package/daemon/dist/domain/node-inventory.js +3 -1
  186. package/daemon/dist/domain/node-inventory.js.map +1 -1
  187. package/daemon/dist/domain/node-launcher.d.ts +3 -0
  188. package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
  189. package/daemon/dist/domain/node-launcher.js +21 -8
  190. package/daemon/dist/domain/node-launcher.js.map +1 -1
  191. package/daemon/dist/domain/pane-binding-observation.d.ts +22 -0
  192. package/daemon/dist/domain/pane-binding-observation.d.ts.map +1 -0
  193. package/daemon/dist/domain/pane-binding-observation.js +54 -0
  194. package/daemon/dist/domain/pane-binding-observation.js.map +1 -0
  195. package/daemon/dist/domain/policies/idle-gate-qitem.d.ts +5 -5
  196. package/daemon/dist/domain/policies/idle-gate-qitem.d.ts.map +1 -1
  197. package/daemon/dist/domain/policies/idle-gate-qitem.js +130 -22
  198. package/daemon/dist/domain/policies/idle-gate-qitem.js.map +1 -1
  199. package/daemon/dist/domain/policies/parked-owner-consumer.js +1 -1
  200. package/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -1
  201. package/daemon/dist/domain/policies/types.d.ts +12 -0
  202. package/daemon/dist/domain/policies/types.d.ts.map +1 -1
  203. package/daemon/dist/domain/policies/workflow-keepalive.d.ts.map +1 -1
  204. package/daemon/dist/domain/policies/workflow-keepalive.js +16 -2
  205. package/daemon/dist/domain/policies/workflow-keepalive.js.map +1 -1
  206. package/daemon/dist/domain/profile-resolver.d.ts +12 -0
  207. package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
  208. package/daemon/dist/domain/profile-resolver.js +60 -0
  209. package/daemon/dist/domain/profile-resolver.js.map +1 -1
  210. package/daemon/dist/domain/project-lifecycle-compiler.d.ts +35 -0
  211. package/daemon/dist/domain/project-lifecycle-compiler.d.ts.map +1 -0
  212. package/daemon/dist/domain/project-lifecycle-compiler.js +190 -0
  213. package/daemon/dist/domain/project-lifecycle-compiler.js.map +1 -0
  214. package/daemon/dist/domain/provider/claude-usage-reader.d.ts +1 -1
  215. package/daemon/dist/domain/provider/claude-usage-reader.d.ts.map +1 -1
  216. package/daemon/dist/domain/provider/claude-usage-reader.js +28 -18
  217. package/daemon/dist/domain/provider/claude-usage-reader.js.map +1 -1
  218. package/daemon/dist/domain/queue-repository.d.ts +42 -3
  219. package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  220. package/daemon/dist/domain/queue-repository.js +177 -16
  221. package/daemon/dist/domain/queue-repository.js.map +1 -1
  222. package/daemon/dist/domain/queue-retention.d.ts +3 -4
  223. package/daemon/dist/domain/queue-retention.d.ts.map +1 -1
  224. package/daemon/dist/domain/queue-retention.js +5 -8
  225. package/daemon/dist/domain/queue-retention.js.map +1 -1
  226. package/daemon/dist/domain/queue-transition-log.d.ts +28 -0
  227. package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
  228. package/daemon/dist/domain/queue-transition-log.js +124 -0
  229. package/daemon/dist/domain/queue-transition-log.js.map +1 -1
  230. package/daemon/dist/domain/queue-wake-repository.d.ts +19 -0
  231. package/daemon/dist/domain/queue-wake-repository.d.ts.map +1 -1
  232. package/daemon/dist/domain/queue-wake-repository.js +33 -0
  233. package/daemon/dist/domain/queue-wake-repository.js.map +1 -1
  234. package/daemon/dist/domain/reconciler.d.ts.map +1 -1
  235. package/daemon/dist/domain/reconciler.js +4 -1
  236. package/daemon/dist/domain/reconciler.js.map +1 -1
  237. package/daemon/dist/domain/rehydrate-eligibility.d.ts +11 -1
  238. package/daemon/dist/domain/rehydrate-eligibility.d.ts.map +1 -1
  239. package/daemon/dist/domain/rehydrate-eligibility.js +34 -0
  240. package/daemon/dist/domain/rehydrate-eligibility.js.map +1 -1
  241. package/daemon/dist/domain/restore-attempt-receipt.d.ts +34 -0
  242. package/daemon/dist/domain/restore-attempt-receipt.d.ts.map +1 -0
  243. package/daemon/dist/domain/restore-attempt-receipt.js +59 -0
  244. package/daemon/dist/domain/restore-attempt-receipt.js.map +1 -0
  245. package/daemon/dist/domain/restore-orchestrator.d.ts +66 -24
  246. package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
  247. package/daemon/dist/domain/restore-orchestrator.js +184 -26
  248. package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
  249. package/daemon/dist/domain/restore-plan-preview.js +2 -2
  250. package/daemon/dist/domain/restore-plan-preview.js.map +1 -1
  251. package/daemon/dist/domain/restore-topology.d.ts +14 -0
  252. package/daemon/dist/domain/restore-topology.d.ts.map +1 -0
  253. package/daemon/dist/domain/restore-topology.js +27 -0
  254. package/daemon/dist/domain/restore-topology.js.map +1 -0
  255. package/daemon/dist/domain/rig-lifecycle-service.d.ts.map +1 -1
  256. package/daemon/dist/domain/rig-lifecycle-service.js +9 -0
  257. package/daemon/dist/domain/rig-lifecycle-service.js.map +1 -1
  258. package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
  259. package/daemon/dist/domain/rigspec-exporter.js +2 -0
  260. package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
  261. package/daemon/dist/domain/rigspec-instantiator.d.ts +34 -9
  262. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  263. package/daemon/dist/domain/rigspec-instantiator.js +131 -84
  264. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  265. package/daemon/dist/domain/rigspec-preflight.d.ts +8 -0
  266. package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
  267. package/daemon/dist/domain/rigspec-preflight.js +4 -0
  268. package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
  269. package/daemon/dist/domain/rigspec-schema.d.ts +5 -1
  270. package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  271. package/daemon/dist/domain/rigspec-schema.js +41 -2
  272. package/daemon/dist/domain/rigspec-schema.js.map +1 -1
  273. package/daemon/dist/domain/seat-attention-reconciler.d.ts +55 -2
  274. package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
  275. package/daemon/dist/domain/seat-attention-reconciler.js +246 -16
  276. package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
  277. package/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
  278. package/daemon/dist/domain/seat-identity-reconciler.js +15 -6
  279. package/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
  280. package/daemon/dist/domain/seat-lifecycle-service.d.ts +47 -1
  281. package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
  282. package/daemon/dist/domain/seat-lifecycle-service.js +525 -29
  283. package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
  284. package/daemon/dist/domain/session-registry.d.ts +8 -1
  285. package/daemon/dist/domain/session-registry.d.ts.map +1 -1
  286. package/daemon/dist/domain/session-registry.js +19 -0
  287. package/daemon/dist/domain/session-registry.js.map +1 -1
  288. package/daemon/dist/domain/session-transport.d.ts +5 -0
  289. package/daemon/dist/domain/session-transport.d.ts.map +1 -1
  290. package/daemon/dist/domain/session-transport.js +33 -7
  291. package/daemon/dist/domain/session-transport.js.map +1 -1
  292. package/daemon/dist/domain/skill-catalog.d.ts +81 -0
  293. package/daemon/dist/domain/skill-catalog.d.ts.map +1 -0
  294. package/daemon/dist/domain/skill-catalog.js +827 -0
  295. package/daemon/dist/domain/skill-catalog.js.map +1 -0
  296. package/daemon/dist/domain/skill-discovery.d.ts +3 -0
  297. package/daemon/dist/domain/skill-discovery.d.ts.map +1 -1
  298. package/daemon/dist/domain/skill-discovery.js +1 -1
  299. package/daemon/dist/domain/skill-discovery.js.map +1 -1
  300. package/daemon/dist/domain/snapshot-capture.d.ts +4 -1
  301. package/daemon/dist/domain/snapshot-capture.d.ts.map +1 -1
  302. package/daemon/dist/domain/snapshot-capture.js +41 -3
  303. package/daemon/dist/domain/snapshot-capture.js.map +1 -1
  304. package/daemon/dist/domain/snapshot-repository.d.ts +15 -1
  305. package/daemon/dist/domain/snapshot-repository.d.ts.map +1 -1
  306. package/daemon/dist/domain/snapshot-repository.js +103 -1
  307. package/daemon/dist/domain/snapshot-repository.js.map +1 -1
  308. package/daemon/dist/domain/startup-orchestrator.d.ts +2 -0
  309. package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
  310. package/daemon/dist/domain/startup-orchestrator.js +12 -0
  311. package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
  312. package/daemon/dist/domain/system-world.d.ts +45 -0
  313. package/daemon/dist/domain/system-world.d.ts.map +1 -0
  314. package/daemon/dist/domain/system-world.js +123 -0
  315. package/daemon/dist/domain/system-world.js.map +1 -0
  316. package/daemon/dist/domain/telemetry-state-paths.d.ts +7 -0
  317. package/daemon/dist/domain/telemetry-state-paths.d.ts.map +1 -0
  318. package/daemon/dist/domain/telemetry-state-paths.js +20 -0
  319. package/daemon/dist/domain/telemetry-state-paths.js.map +1 -0
  320. package/daemon/dist/domain/topology-defaults-installer.d.ts +4 -2
  321. package/daemon/dist/domain/topology-defaults-installer.d.ts.map +1 -1
  322. package/daemon/dist/domain/topology-defaults-installer.js +27 -0
  323. package/daemon/dist/domain/topology-defaults-installer.js.map +1 -1
  324. package/daemon/dist/domain/types.d.ts +103 -4
  325. package/daemon/dist/domain/types.d.ts.map +1 -1
  326. package/daemon/dist/domain/types.js.map +1 -1
  327. package/daemon/dist/domain/up-command-router.d.ts.map +1 -1
  328. package/daemon/dist/domain/up-command-router.js +19 -0
  329. package/daemon/dist/domain/up-command-router.js.map +1 -1
  330. package/daemon/dist/domain/user-settings/settings-store.d.ts +8 -3
  331. package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
  332. package/daemon/dist/domain/user-settings/settings-store.js +65 -29
  333. package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
  334. package/daemon/dist/domain/watchdog-jobs-repository.d.ts +9 -0
  335. package/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -1
  336. package/daemon/dist/domain/watchdog-jobs-repository.js +15 -2
  337. package/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
  338. package/daemon/dist/domain/watchdog-policy-engine.d.ts +14 -23
  339. package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
  340. package/daemon/dist/domain/watchdog-policy-engine.js +91 -226
  341. package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
  342. package/daemon/dist/domain/workflow-boot-sweep.d.ts.map +1 -1
  343. package/daemon/dist/domain/workflow-boot-sweep.js +20 -6
  344. package/daemon/dist/domain/workflow-boot-sweep.js.map +1 -1
  345. package/daemon/dist/domain/workflow-instance-store.d.ts +33 -1
  346. package/daemon/dist/domain/workflow-instance-store.d.ts.map +1 -1
  347. package/daemon/dist/domain/workflow-instance-store.js +127 -2
  348. package/daemon/dist/domain/workflow-instance-store.js.map +1 -1
  349. package/daemon/dist/domain/workflow-keepalive-arming.d.ts +7 -5
  350. package/daemon/dist/domain/workflow-keepalive-arming.d.ts.map +1 -1
  351. package/daemon/dist/domain/workflow-keepalive-arming.js +27 -16
  352. package/daemon/dist/domain/workflow-keepalive-arming.js.map +1 -1
  353. package/daemon/dist/domain/workflow-projector.d.ts +6 -2
  354. package/daemon/dist/domain/workflow-projector.d.ts.map +1 -1
  355. package/daemon/dist/domain/workflow-projector.js +271 -2
  356. package/daemon/dist/domain/workflow-projector.js.map +1 -1
  357. package/daemon/dist/domain/workflow-runtime.d.ts +62 -2
  358. package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
  359. package/daemon/dist/domain/workflow-runtime.js +334 -18
  360. package/daemon/dist/domain/workflow-runtime.js.map +1 -1
  361. package/daemon/dist/domain/workflow-spec-cache.d.ts +9 -1
  362. package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
  363. package/daemon/dist/domain/workflow-spec-cache.js +85 -0
  364. package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
  365. package/daemon/dist/domain/workflow-types.d.ts +38 -1
  366. package/daemon/dist/domain/workflow-types.d.ts.map +1 -1
  367. package/daemon/dist/domain/workflow-types.js.map +1 -1
  368. package/daemon/dist/domain/workflow-validator.d.ts.map +1 -1
  369. package/daemon/dist/domain/workflow-validator.js +20 -3
  370. package/daemon/dist/domain/workflow-validator.js.map +1 -1
  371. package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts +38 -9
  372. package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts.map +1 -1
  373. package/daemon/dist/domain/workspace/default-workspace-scaffold.js +93 -347
  374. package/daemon/dist/domain/workspace/default-workspace-scaffold.js.map +1 -1
  375. package/daemon/dist/index.d.ts.map +1 -1
  376. package/daemon/dist/index.js +13 -0
  377. package/daemon/dist/index.js.map +1 -1
  378. package/daemon/dist/instance-initialization-surface.d.ts +3 -0
  379. package/daemon/dist/instance-initialization-surface.d.ts.map +1 -0
  380. package/daemon/dist/instance-initialization-surface.js +3 -0
  381. package/daemon/dist/instance-initialization-surface.js.map +1 -0
  382. package/daemon/dist/project-lifecycle-surface.d.ts +3 -0
  383. package/daemon/dist/project-lifecycle-surface.d.ts.map +1 -0
  384. package/daemon/dist/project-lifecycle-surface.js +3 -0
  385. package/daemon/dist/project-lifecycle-surface.js.map +1 -0
  386. package/daemon/dist/routes/bundles.js +10 -9
  387. package/daemon/dist/routes/bundles.js.map +1 -1
  388. package/daemon/dist/routes/config.d.ts.map +1 -1
  389. package/daemon/dist/routes/config.js +27 -49
  390. package/daemon/dist/routes/config.js.map +1 -1
  391. package/daemon/dist/routes/context-packs.d.ts.map +1 -1
  392. package/daemon/dist/routes/context-packs.js +114 -16
  393. package/daemon/dist/routes/context-packs.js.map +1 -1
  394. package/daemon/dist/routes/crash-cart.js +3 -0
  395. package/daemon/dist/routes/crash-cart.js.map +1 -1
  396. package/daemon/dist/routes/queue.d.ts.map +1 -1
  397. package/daemon/dist/routes/queue.js +51 -10
  398. package/daemon/dist/routes/queue.js.map +1 -1
  399. package/daemon/dist/routes/rigs.js +22 -4
  400. package/daemon/dist/routes/rigs.js.map +1 -1
  401. package/daemon/dist/routes/rigspec.d.ts.map +1 -1
  402. package/daemon/dist/routes/rigspec.js +46 -2
  403. package/daemon/dist/routes/rigspec.js.map +1 -1
  404. package/daemon/dist/routes/seat.js +21 -1
  405. package/daemon/dist/routes/seat.js.map +1 -1
  406. package/daemon/dist/routes/sessions.js +16 -6
  407. package/daemon/dist/routes/sessions.js.map +1 -1
  408. package/daemon/dist/routes/snapshots.d.ts.map +1 -1
  409. package/daemon/dist/routes/snapshots.js +41 -3
  410. package/daemon/dist/routes/snapshots.js.map +1 -1
  411. package/daemon/dist/routes/up.js +22 -4
  412. package/daemon/dist/routes/up.js.map +1 -1
  413. package/daemon/dist/routes/watchdog.d.ts.map +1 -1
  414. package/daemon/dist/routes/watchdog.js +7 -6
  415. package/daemon/dist/routes/watchdog.js.map +1 -1
  416. package/daemon/dist/routes/workflow.d.ts.map +1 -1
  417. package/daemon/dist/routes/workflow.js +104 -39
  418. package/daemon/dist/routes/workflow.js.map +1 -1
  419. package/daemon/dist/server.d.ts +2 -0
  420. package/daemon/dist/server.d.ts.map +1 -1
  421. package/daemon/dist/server.js +1 -0
  422. package/daemon/dist/server.js.map +1 -1
  423. package/daemon/dist/skill-loadout-surface.d.ts +3 -0
  424. package/daemon/dist/skill-loadout-surface.d.ts.map +1 -0
  425. package/daemon/dist/skill-loadout-surface.js +2 -0
  426. package/daemon/dist/skill-loadout-surface.js.map +1 -0
  427. package/daemon/dist/startup.d.ts.map +1 -1
  428. package/daemon/dist/startup.js +88 -71
  429. package/daemon/dist/startup.js.map +1 -1
  430. package/daemon/dist/system-world-surface.d.ts +2 -0
  431. package/daemon/dist/system-world-surface.d.ts.map +1 -0
  432. package/daemon/dist/system-world-surface.js +2 -0
  433. package/daemon/dist/system-world-surface.js.map +1 -0
  434. package/daemon/docs/reference/agent-spec.md +33 -0
  435. package/daemon/docs/reference/chain-file-convention.md +17 -12
  436. package/daemon/docs/reference/getting-started.md +2 -1
  437. package/daemon/docs/reference/instance-layout.md +106 -0
  438. package/daemon/docs/reference/mission-install.md +12 -2
  439. package/daemon/docs/reference/project-workspace.md +66 -40
  440. package/daemon/docs/reference/release-boundary.md +29 -5
  441. package/daemon/docs/reference/sdlc-conventions.md +6 -0
  442. package/daemon/specs/agents/shared/skills/core/openrig-skills/SKILL.md +4 -2
  443. package/daemon/specs/agents/shared/skills/core/openrig-upgrade/SKILL.md +189 -343
  444. package/daemon/specs/agents/shared/skills/core/openrig-upgrade/scripts/backup-sqlite.mjs +62 -0
  445. package/daemon/specs/agents/shared/skills/core/openrig-upgrade/scripts/inspect-upgrade.mjs +40 -0
  446. package/daemon/specs/agents/shared/skills/core/openrig-upgrade/scripts/migrate-telemetry-state-0.5.9.mjs +1419 -0
  447. package/daemon/specs/agents/shared/skills/core/openrig-upgrade/scripts/refresh-managed-plugin.mjs +151 -0
  448. package/daemon/specs/rigs/preview/product-team/topology/instance/CRAFT.md +4 -4
  449. package/daemon/specs/rigs/preview/product-team/topology/rig/ORCHESTRATION-CRAFT.md +3 -3
  450. package/dist/build-info.js +3 -3
  451. package/dist/commands/config-init-workspace.d.ts +4 -23
  452. package/dist/commands/config-init-workspace.d.ts.map +1 -1
  453. package/dist/commands/config-init-workspace.js +14 -576
  454. package/dist/commands/config-init-workspace.js.map +1 -1
  455. package/dist/commands/config.d.ts.map +1 -1
  456. package/dist/commands/config.js +6 -4
  457. package/dist/commands/config.js.map +1 -1
  458. package/dist/commands/context.d.ts.map +1 -1
  459. package/dist/commands/context.js +167 -15
  460. package/dist/commands/context.js.map +1 -1
  461. package/dist/commands/daemon.d.ts.map +1 -1
  462. package/dist/commands/daemon.js +16 -0
  463. package/dist/commands/daemon.js.map +1 -1
  464. package/dist/commands/import.d.ts.map +1 -1
  465. package/dist/commands/import.js +27 -1
  466. package/dist/commands/import.js.map +1 -1
  467. package/dist/commands/launch.d.ts.map +1 -1
  468. package/dist/commands/launch.js +51 -4
  469. package/dist/commands/launch.js.map +1 -1
  470. package/dist/commands/restore.d.ts.map +1 -1
  471. package/dist/commands/restore.js +43 -3
  472. package/dist/commands/restore.js.map +1 -1
  473. package/dist/commands/scope.d.ts.map +1 -1
  474. package/dist/commands/scope.js +169 -79
  475. package/dist/commands/scope.js.map +1 -1
  476. package/dist/commands/seat.d.ts.map +1 -1
  477. package/dist/commands/seat.js +30 -0
  478. package/dist/commands/seat.js.map +1 -1
  479. package/dist/commands/skill.d.ts.map +1 -1
  480. package/dist/commands/skill.js +61 -0
  481. package/dist/commands/skill.js.map +1 -1
  482. package/dist/commands/snapshot.d.ts.map +1 -1
  483. package/dist/commands/snapshot.js +4 -2
  484. package/dist/commands/snapshot.js.map +1 -1
  485. package/dist/commands/start.d.ts.map +1 -1
  486. package/dist/commands/start.js +3 -0
  487. package/dist/commands/start.js.map +1 -1
  488. package/dist/commands/up.d.ts.map +1 -1
  489. package/dist/commands/up.js +3 -0
  490. package/dist/commands/up.js.map +1 -1
  491. package/dist/commands/walk.d.ts.map +1 -1
  492. package/dist/commands/walk.js +3 -0
  493. package/dist/commands/walk.js.map +1 -1
  494. package/dist/commands/watchdog.d.ts.map +1 -1
  495. package/dist/commands/watchdog.js +51 -3
  496. package/dist/commands/watchdog.js.map +1 -1
  497. package/dist/commands/workflow-render.d.ts +31 -0
  498. package/dist/commands/workflow-render.d.ts.map +1 -1
  499. package/dist/commands/workflow-render.js +84 -6
  500. package/dist/commands/workflow-render.js.map +1 -1
  501. package/dist/commands/workflow.d.ts.map +1 -1
  502. package/dist/commands/workflow.js +96 -8
  503. package/dist/commands/workflow.js.map +1 -1
  504. package/dist/config-store.d.ts +9 -4
  505. package/dist/config-store.d.ts.map +1 -1
  506. package/dist/config-store.js +67 -30
  507. package/dist/config-store.js.map +1 -1
  508. package/dist/daemon-lifecycle.d.ts +8 -15
  509. package/dist/daemon-lifecycle.d.ts.map +1 -1
  510. package/dist/daemon-lifecycle.js +24 -31
  511. package/dist/daemon-lifecycle.js.map +1 -1
  512. package/dist/front-door.d.ts.map +1 -1
  513. package/dist/front-door.js +16 -4
  514. package/dist/front-door.js.map +1 -1
  515. package/dist/lib/scope/mission-composition.d.ts +16 -0
  516. package/dist/lib/scope/mission-composition.d.ts.map +1 -0
  517. package/dist/lib/scope/mission-composition.js +110 -0
  518. package/dist/lib/scope/mission-composition.js.map +1 -0
  519. package/dist/lib/scope/scope-fs.d.ts +5 -0
  520. package/dist/lib/scope/scope-fs.d.ts.map +1 -1
  521. package/dist/lib/scope/scope-fs.js +34 -4
  522. package/dist/lib/scope/scope-fs.js.map +1 -1
  523. package/dist/lib/topology-trace.d.ts +3 -2
  524. package/dist/lib/topology-trace.d.ts.map +1 -1
  525. package/dist/lib/topology-trace.js +12 -2
  526. package/dist/lib/topology-trace.js.map +1 -1
  527. package/dist/lib/work-install.d.ts +17 -0
  528. package/dist/lib/work-install.d.ts.map +1 -1
  529. package/dist/lib/work-install.js +111 -34
  530. package/dist/lib/work-install.js.map +1 -1
  531. package/node_modules/@openrig/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
  532. package/node_modules/@openrig/daemon/dist/adapters/claude-code-adapter.js +4 -2
  533. package/node_modules/@openrig/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
  534. package/node_modules/@openrig/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
  535. package/node_modules/@openrig/daemon/dist/adapters/codex-runtime-adapter.js +249 -2
  536. package/node_modules/@openrig/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  537. package/node_modules/@openrig/daemon/dist/adapters/tmux.d.ts +6 -5
  538. package/node_modules/@openrig/daemon/dist/adapters/tmux.d.ts.map +1 -1
  539. package/node_modules/@openrig/daemon/dist/adapters/tmux.js +29 -12
  540. package/node_modules/@openrig/daemon/dist/adapters/tmux.js.map +1 -1
  541. package/node_modules/@openrig/daemon/dist/build-info.js +3 -3
  542. package/node_modules/@openrig/daemon/dist/db/all-migrations.d.ts +1 -1
  543. package/node_modules/@openrig/daemon/dist/db/all-migrations.d.ts.map +1 -1
  544. package/node_modules/@openrig/daemon/dist/db/all-migrations.js +5 -1
  545. package/node_modules/@openrig/daemon/dist/db/all-migrations.js.map +1 -1
  546. package/node_modules/@openrig/daemon/dist/db/migrations/046_seat_identity_verdicts.d.ts +8 -5
  547. package/node_modules/@openrig/daemon/dist/db/migrations/046_seat_identity_verdicts.d.ts.map +1 -1
  548. package/node_modules/@openrig/daemon/dist/db/migrations/046_seat_identity_verdicts.js +8 -5
  549. package/node_modules/@openrig/daemon/dist/db/migrations/046_seat_identity_verdicts.js.map +1 -1
  550. package/node_modules/@openrig/daemon/dist/db/migrations/078_idle_gate_fired_condition.d.ts +17 -0
  551. package/node_modules/@openrig/daemon/dist/db/migrations/078_idle_gate_fired_condition.d.ts.map +1 -0
  552. package/node_modules/@openrig/daemon/dist/db/migrations/078_idle_gate_fired_condition.js +21 -0
  553. package/node_modules/@openrig/daemon/dist/db/migrations/078_idle_gate_fired_condition.js.map +1 -0
  554. package/node_modules/@openrig/daemon/dist/db/migrations/079_workflow_lifecycle_parallel.d.ts +8 -0
  555. package/node_modules/@openrig/daemon/dist/db/migrations/079_workflow_lifecycle_parallel.d.ts.map +1 -0
  556. package/node_modules/@openrig/daemon/dist/db/migrations/079_workflow_lifecycle_parallel.js +50 -0
  557. package/node_modules/@openrig/daemon/dist/db/migrations/079_workflow_lifecycle_parallel.js.map +1 -0
  558. package/node_modules/@openrig/daemon/dist/domain/active-occupant.d.ts +12 -1
  559. package/node_modules/@openrig/daemon/dist/domain/active-occupant.d.ts.map +1 -1
  560. package/node_modules/@openrig/daemon/dist/domain/active-occupant.js +61 -0
  561. package/node_modules/@openrig/daemon/dist/domain/active-occupant.js.map +1 -1
  562. package/node_modules/@openrig/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
  563. package/node_modules/@openrig/daemon/dist/domain/bootstrap-orchestrator.js +8 -1
  564. package/node_modules/@openrig/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
  565. package/node_modules/@openrig/daemon/dist/domain/bundle-context-packs-router.d.ts +3 -3
  566. package/node_modules/@openrig/daemon/dist/domain/bundle-context-packs-router.d.ts.map +1 -1
  567. package/node_modules/@openrig/daemon/dist/domain/bundle-skills-router.d.ts +3 -0
  568. package/node_modules/@openrig/daemon/dist/domain/bundle-skills-router.d.ts.map +1 -1
  569. package/node_modules/@openrig/daemon/dist/domain/bundle-skills-router.js +5 -1
  570. package/node_modules/@openrig/daemon/dist/domain/bundle-skills-router.js.map +1 -1
  571. package/node_modules/@openrig/daemon/dist/domain/claim-service.d.ts +2 -0
  572. package/node_modules/@openrig/daemon/dist/domain/claim-service.d.ts.map +1 -1
  573. package/node_modules/@openrig/daemon/dist/domain/claim-service.js +33 -12
  574. package/node_modules/@openrig/daemon/dist/domain/claim-service.js.map +1 -1
  575. package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-library-service.d.ts.map +1 -1
  576. package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-library-service.js +9 -1
  577. package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-library-service.js.map +1 -1
  578. package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.d.ts +25 -0
  579. package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.d.ts.map +1 -1
  580. package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.js +3 -1
  581. package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.js.map +1 -1
  582. package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.d.ts.map +1 -1
  583. package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.js +143 -3
  584. package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.js.map +1 -1
  585. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.d.ts +22 -1
  586. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.d.ts.map +1 -1
  587. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.js +105 -40
  588. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.js.map +1 -1
  589. package/node_modules/@openrig/daemon/dist/domain/context-usage-store.d.ts +4 -0
  590. package/node_modules/@openrig/daemon/dist/domain/context-usage-store.d.ts.map +1 -1
  591. package/node_modules/@openrig/daemon/dist/domain/context-usage-store.js +8 -4
  592. package/node_modules/@openrig/daemon/dist/domain/context-usage-store.js.map +1 -1
  593. package/node_modules/@openrig/daemon/dist/domain/crash-cart-conductor.d.ts +13 -0
  594. package/node_modules/@openrig/daemon/dist/domain/crash-cart-conductor.d.ts.map +1 -1
  595. package/node_modules/@openrig/daemon/dist/domain/crash-cart-conductor.js +3 -1
  596. package/node_modules/@openrig/daemon/dist/domain/crash-cart-conductor.js.map +1 -1
  597. package/node_modules/@openrig/daemon/dist/domain/current-work.d.ts +73 -0
  598. package/node_modules/@openrig/daemon/dist/domain/current-work.d.ts.map +1 -0
  599. package/node_modules/@openrig/daemon/dist/domain/current-work.js +225 -0
  600. package/node_modules/@openrig/daemon/dist/domain/current-work.js.map +1 -0
  601. package/node_modules/@openrig/daemon/dist/domain/execution-view.d.ts.map +1 -1
  602. package/node_modules/@openrig/daemon/dist/domain/execution-view.js +344 -13
  603. package/node_modules/@openrig/daemon/dist/domain/execution-view.js.map +1 -1
  604. package/node_modules/@openrig/daemon/dist/domain/gateway/human-registry.d.ts +3 -2
  605. package/node_modules/@openrig/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
  606. package/node_modules/@openrig/daemon/dist/domain/gateway/human-registry.js +113 -18
  607. package/node_modules/@openrig/daemon/dist/domain/gateway/human-registry.js.map +1 -1
  608. package/node_modules/@openrig/daemon/dist/domain/instance-initialization.d.ts +25 -0
  609. package/node_modules/@openrig/daemon/dist/domain/instance-initialization.d.ts.map +1 -0
  610. package/node_modules/@openrig/daemon/dist/domain/instance-initialization.js +81 -0
  611. package/node_modules/@openrig/daemon/dist/domain/instance-initialization.js.map +1 -0
  612. package/node_modules/@openrig/daemon/dist/domain/lifecycle-manifest.d.ts +19 -0
  613. package/node_modules/@openrig/daemon/dist/domain/lifecycle-manifest.d.ts.map +1 -0
  614. package/node_modules/@openrig/daemon/dist/domain/lifecycle-manifest.js +73 -0
  615. package/node_modules/@openrig/daemon/dist/domain/lifecycle-manifest.js.map +1 -0
  616. package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.d.ts +36 -36
  617. package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.d.ts.map +1 -1
  618. package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.js +104 -135
  619. package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.js.map +1 -1
  620. package/node_modules/@openrig/daemon/dist/domain/model-divergence/effective-model-readers.d.ts +3 -2
  621. package/node_modules/@openrig/daemon/dist/domain/model-divergence/effective-model-readers.d.ts.map +1 -1
  622. package/node_modules/@openrig/daemon/dist/domain/model-divergence/effective-model-readers.js +7 -5
  623. package/node_modules/@openrig/daemon/dist/domain/model-divergence/effective-model-readers.js.map +1 -1
  624. package/node_modules/@openrig/daemon/dist/domain/native-process-lineage.d.ts +10 -0
  625. package/node_modules/@openrig/daemon/dist/domain/native-process-lineage.d.ts.map +1 -0
  626. package/node_modules/@openrig/daemon/dist/domain/native-process-lineage.js +86 -0
  627. package/node_modules/@openrig/daemon/dist/domain/native-process-lineage.js.map +1 -0
  628. package/node_modules/@openrig/daemon/dist/domain/native-resume-probe.js +12 -1
  629. package/node_modules/@openrig/daemon/dist/domain/native-resume-probe.js.map +1 -1
  630. package/node_modules/@openrig/daemon/dist/domain/node-inventory.d.ts +2 -0
  631. package/node_modules/@openrig/daemon/dist/domain/node-inventory.d.ts.map +1 -1
  632. package/node_modules/@openrig/daemon/dist/domain/node-inventory.js +3 -1
  633. package/node_modules/@openrig/daemon/dist/domain/node-inventory.js.map +1 -1
  634. package/node_modules/@openrig/daemon/dist/domain/node-launcher.d.ts +3 -0
  635. package/node_modules/@openrig/daemon/dist/domain/node-launcher.d.ts.map +1 -1
  636. package/node_modules/@openrig/daemon/dist/domain/node-launcher.js +21 -8
  637. package/node_modules/@openrig/daemon/dist/domain/node-launcher.js.map +1 -1
  638. package/node_modules/@openrig/daemon/dist/domain/pane-binding-observation.d.ts +22 -0
  639. package/node_modules/@openrig/daemon/dist/domain/pane-binding-observation.d.ts.map +1 -0
  640. package/node_modules/@openrig/daemon/dist/domain/pane-binding-observation.js +54 -0
  641. package/node_modules/@openrig/daemon/dist/domain/pane-binding-observation.js.map +1 -0
  642. package/node_modules/@openrig/daemon/dist/domain/policies/idle-gate-qitem.d.ts +5 -5
  643. package/node_modules/@openrig/daemon/dist/domain/policies/idle-gate-qitem.d.ts.map +1 -1
  644. package/node_modules/@openrig/daemon/dist/domain/policies/idle-gate-qitem.js +130 -22
  645. package/node_modules/@openrig/daemon/dist/domain/policies/idle-gate-qitem.js.map +1 -1
  646. package/node_modules/@openrig/daemon/dist/domain/policies/parked-owner-consumer.js +1 -1
  647. package/node_modules/@openrig/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -1
  648. package/node_modules/@openrig/daemon/dist/domain/policies/types.d.ts +12 -0
  649. package/node_modules/@openrig/daemon/dist/domain/policies/types.d.ts.map +1 -1
  650. package/node_modules/@openrig/daemon/dist/domain/policies/workflow-keepalive.d.ts.map +1 -1
  651. package/node_modules/@openrig/daemon/dist/domain/policies/workflow-keepalive.js +16 -2
  652. package/node_modules/@openrig/daemon/dist/domain/policies/workflow-keepalive.js.map +1 -1
  653. package/node_modules/@openrig/daemon/dist/domain/profile-resolver.d.ts +12 -0
  654. package/node_modules/@openrig/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
  655. package/node_modules/@openrig/daemon/dist/domain/profile-resolver.js +60 -0
  656. package/node_modules/@openrig/daemon/dist/domain/profile-resolver.js.map +1 -1
  657. package/node_modules/@openrig/daemon/dist/domain/project-lifecycle-compiler.d.ts +35 -0
  658. package/node_modules/@openrig/daemon/dist/domain/project-lifecycle-compiler.d.ts.map +1 -0
  659. package/node_modules/@openrig/daemon/dist/domain/project-lifecycle-compiler.js +190 -0
  660. package/node_modules/@openrig/daemon/dist/domain/project-lifecycle-compiler.js.map +1 -0
  661. package/node_modules/@openrig/daemon/dist/domain/provider/claude-usage-reader.d.ts +1 -1
  662. package/node_modules/@openrig/daemon/dist/domain/provider/claude-usage-reader.d.ts.map +1 -1
  663. package/node_modules/@openrig/daemon/dist/domain/provider/claude-usage-reader.js +28 -18
  664. package/node_modules/@openrig/daemon/dist/domain/provider/claude-usage-reader.js.map +1 -1
  665. package/node_modules/@openrig/daemon/dist/domain/queue-repository.d.ts +42 -3
  666. package/node_modules/@openrig/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  667. package/node_modules/@openrig/daemon/dist/domain/queue-repository.js +177 -16
  668. package/node_modules/@openrig/daemon/dist/domain/queue-repository.js.map +1 -1
  669. package/node_modules/@openrig/daemon/dist/domain/queue-retention.d.ts +3 -4
  670. package/node_modules/@openrig/daemon/dist/domain/queue-retention.d.ts.map +1 -1
  671. package/node_modules/@openrig/daemon/dist/domain/queue-retention.js +5 -8
  672. package/node_modules/@openrig/daemon/dist/domain/queue-retention.js.map +1 -1
  673. package/node_modules/@openrig/daemon/dist/domain/queue-transition-log.d.ts +28 -0
  674. package/node_modules/@openrig/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
  675. package/node_modules/@openrig/daemon/dist/domain/queue-transition-log.js +124 -0
  676. package/node_modules/@openrig/daemon/dist/domain/queue-transition-log.js.map +1 -1
  677. package/node_modules/@openrig/daemon/dist/domain/queue-wake-repository.d.ts +19 -0
  678. package/node_modules/@openrig/daemon/dist/domain/queue-wake-repository.d.ts.map +1 -1
  679. package/node_modules/@openrig/daemon/dist/domain/queue-wake-repository.js +33 -0
  680. package/node_modules/@openrig/daemon/dist/domain/queue-wake-repository.js.map +1 -1
  681. package/node_modules/@openrig/daemon/dist/domain/reconciler.d.ts.map +1 -1
  682. package/node_modules/@openrig/daemon/dist/domain/reconciler.js +4 -1
  683. package/node_modules/@openrig/daemon/dist/domain/reconciler.js.map +1 -1
  684. package/node_modules/@openrig/daemon/dist/domain/rehydrate-eligibility.d.ts +11 -1
  685. package/node_modules/@openrig/daemon/dist/domain/rehydrate-eligibility.d.ts.map +1 -1
  686. package/node_modules/@openrig/daemon/dist/domain/rehydrate-eligibility.js +34 -0
  687. package/node_modules/@openrig/daemon/dist/domain/rehydrate-eligibility.js.map +1 -1
  688. package/node_modules/@openrig/daemon/dist/domain/restore-attempt-receipt.d.ts +34 -0
  689. package/node_modules/@openrig/daemon/dist/domain/restore-attempt-receipt.d.ts.map +1 -0
  690. package/node_modules/@openrig/daemon/dist/domain/restore-attempt-receipt.js +59 -0
  691. package/node_modules/@openrig/daemon/dist/domain/restore-attempt-receipt.js.map +1 -0
  692. package/node_modules/@openrig/daemon/dist/domain/restore-orchestrator.d.ts +66 -24
  693. package/node_modules/@openrig/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
  694. package/node_modules/@openrig/daemon/dist/domain/restore-orchestrator.js +184 -26
  695. package/node_modules/@openrig/daemon/dist/domain/restore-orchestrator.js.map +1 -1
  696. package/node_modules/@openrig/daemon/dist/domain/restore-plan-preview.js +2 -2
  697. package/node_modules/@openrig/daemon/dist/domain/restore-plan-preview.js.map +1 -1
  698. package/node_modules/@openrig/daemon/dist/domain/restore-topology.d.ts +14 -0
  699. package/node_modules/@openrig/daemon/dist/domain/restore-topology.d.ts.map +1 -0
  700. package/node_modules/@openrig/daemon/dist/domain/restore-topology.js +27 -0
  701. package/node_modules/@openrig/daemon/dist/domain/restore-topology.js.map +1 -0
  702. package/node_modules/@openrig/daemon/dist/domain/rig-lifecycle-service.d.ts.map +1 -1
  703. package/node_modules/@openrig/daemon/dist/domain/rig-lifecycle-service.js +9 -0
  704. package/node_modules/@openrig/daemon/dist/domain/rig-lifecycle-service.js.map +1 -1
  705. package/node_modules/@openrig/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
  706. package/node_modules/@openrig/daemon/dist/domain/rigspec-exporter.js +2 -0
  707. package/node_modules/@openrig/daemon/dist/domain/rigspec-exporter.js.map +1 -1
  708. package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.d.ts +34 -9
  709. package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  710. package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.js +131 -84
  711. package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  712. package/node_modules/@openrig/daemon/dist/domain/rigspec-preflight.d.ts +8 -0
  713. package/node_modules/@openrig/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
  714. package/node_modules/@openrig/daemon/dist/domain/rigspec-preflight.js +4 -0
  715. package/node_modules/@openrig/daemon/dist/domain/rigspec-preflight.js.map +1 -1
  716. package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.d.ts +5 -1
  717. package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  718. package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.js +41 -2
  719. package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.js.map +1 -1
  720. package/node_modules/@openrig/daemon/dist/domain/seat-attention-reconciler.d.ts +55 -2
  721. package/node_modules/@openrig/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
  722. package/node_modules/@openrig/daemon/dist/domain/seat-attention-reconciler.js +246 -16
  723. package/node_modules/@openrig/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
  724. package/node_modules/@openrig/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
  725. package/node_modules/@openrig/daemon/dist/domain/seat-identity-reconciler.js +15 -6
  726. package/node_modules/@openrig/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
  727. package/node_modules/@openrig/daemon/dist/domain/seat-lifecycle-service.d.ts +47 -1
  728. package/node_modules/@openrig/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
  729. package/node_modules/@openrig/daemon/dist/domain/seat-lifecycle-service.js +525 -29
  730. package/node_modules/@openrig/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
  731. package/node_modules/@openrig/daemon/dist/domain/session-registry.d.ts +8 -1
  732. package/node_modules/@openrig/daemon/dist/domain/session-registry.d.ts.map +1 -1
  733. package/node_modules/@openrig/daemon/dist/domain/session-registry.js +19 -0
  734. package/node_modules/@openrig/daemon/dist/domain/session-registry.js.map +1 -1
  735. package/node_modules/@openrig/daemon/dist/domain/session-transport.d.ts +5 -0
  736. package/node_modules/@openrig/daemon/dist/domain/session-transport.d.ts.map +1 -1
  737. package/node_modules/@openrig/daemon/dist/domain/session-transport.js +33 -7
  738. package/node_modules/@openrig/daemon/dist/domain/session-transport.js.map +1 -1
  739. package/node_modules/@openrig/daemon/dist/domain/skill-catalog.d.ts +81 -0
  740. package/node_modules/@openrig/daemon/dist/domain/skill-catalog.d.ts.map +1 -0
  741. package/node_modules/@openrig/daemon/dist/domain/skill-catalog.js +827 -0
  742. package/node_modules/@openrig/daemon/dist/domain/skill-catalog.js.map +1 -0
  743. package/node_modules/@openrig/daemon/dist/domain/skill-discovery.d.ts +3 -0
  744. package/node_modules/@openrig/daemon/dist/domain/skill-discovery.d.ts.map +1 -1
  745. package/node_modules/@openrig/daemon/dist/domain/skill-discovery.js +1 -1
  746. package/node_modules/@openrig/daemon/dist/domain/skill-discovery.js.map +1 -1
  747. package/node_modules/@openrig/daemon/dist/domain/snapshot-capture.d.ts +4 -1
  748. package/node_modules/@openrig/daemon/dist/domain/snapshot-capture.d.ts.map +1 -1
  749. package/node_modules/@openrig/daemon/dist/domain/snapshot-capture.js +41 -3
  750. package/node_modules/@openrig/daemon/dist/domain/snapshot-capture.js.map +1 -1
  751. package/node_modules/@openrig/daemon/dist/domain/snapshot-repository.d.ts +15 -1
  752. package/node_modules/@openrig/daemon/dist/domain/snapshot-repository.d.ts.map +1 -1
  753. package/node_modules/@openrig/daemon/dist/domain/snapshot-repository.js +103 -1
  754. package/node_modules/@openrig/daemon/dist/domain/snapshot-repository.js.map +1 -1
  755. package/node_modules/@openrig/daemon/dist/domain/startup-orchestrator.d.ts +2 -0
  756. package/node_modules/@openrig/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
  757. package/node_modules/@openrig/daemon/dist/domain/startup-orchestrator.js +12 -0
  758. package/node_modules/@openrig/daemon/dist/domain/startup-orchestrator.js.map +1 -1
  759. package/node_modules/@openrig/daemon/dist/domain/system-world.d.ts +45 -0
  760. package/node_modules/@openrig/daemon/dist/domain/system-world.d.ts.map +1 -0
  761. package/node_modules/@openrig/daemon/dist/domain/system-world.js +123 -0
  762. package/node_modules/@openrig/daemon/dist/domain/system-world.js.map +1 -0
  763. package/node_modules/@openrig/daemon/dist/domain/telemetry-state-paths.d.ts +7 -0
  764. package/node_modules/@openrig/daemon/dist/domain/telemetry-state-paths.d.ts.map +1 -0
  765. package/node_modules/@openrig/daemon/dist/domain/telemetry-state-paths.js +20 -0
  766. package/node_modules/@openrig/daemon/dist/domain/telemetry-state-paths.js.map +1 -0
  767. package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.d.ts +4 -2
  768. package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.d.ts.map +1 -1
  769. package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.js +27 -0
  770. package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.js.map +1 -1
  771. package/node_modules/@openrig/daemon/dist/domain/types.d.ts +103 -4
  772. package/node_modules/@openrig/daemon/dist/domain/types.d.ts.map +1 -1
  773. package/node_modules/@openrig/daemon/dist/domain/types.js.map +1 -1
  774. package/node_modules/@openrig/daemon/dist/domain/up-command-router.d.ts.map +1 -1
  775. package/node_modules/@openrig/daemon/dist/domain/up-command-router.js +19 -0
  776. package/node_modules/@openrig/daemon/dist/domain/up-command-router.js.map +1 -1
  777. package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.d.ts +8 -3
  778. package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
  779. package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.js +65 -29
  780. package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
  781. package/node_modules/@openrig/daemon/dist/domain/watchdog-jobs-repository.d.ts +9 -0
  782. package/node_modules/@openrig/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -1
  783. package/node_modules/@openrig/daemon/dist/domain/watchdog-jobs-repository.js +15 -2
  784. package/node_modules/@openrig/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
  785. package/node_modules/@openrig/daemon/dist/domain/watchdog-policy-engine.d.ts +14 -23
  786. package/node_modules/@openrig/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
  787. package/node_modules/@openrig/daemon/dist/domain/watchdog-policy-engine.js +91 -226
  788. package/node_modules/@openrig/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
  789. package/node_modules/@openrig/daemon/dist/domain/workflow-boot-sweep.d.ts.map +1 -1
  790. package/node_modules/@openrig/daemon/dist/domain/workflow-boot-sweep.js +20 -6
  791. package/node_modules/@openrig/daemon/dist/domain/workflow-boot-sweep.js.map +1 -1
  792. package/node_modules/@openrig/daemon/dist/domain/workflow-instance-store.d.ts +33 -1
  793. package/node_modules/@openrig/daemon/dist/domain/workflow-instance-store.d.ts.map +1 -1
  794. package/node_modules/@openrig/daemon/dist/domain/workflow-instance-store.js +127 -2
  795. package/node_modules/@openrig/daemon/dist/domain/workflow-instance-store.js.map +1 -1
  796. package/node_modules/@openrig/daemon/dist/domain/workflow-keepalive-arming.d.ts +7 -5
  797. package/node_modules/@openrig/daemon/dist/domain/workflow-keepalive-arming.d.ts.map +1 -1
  798. package/node_modules/@openrig/daemon/dist/domain/workflow-keepalive-arming.js +27 -16
  799. package/node_modules/@openrig/daemon/dist/domain/workflow-keepalive-arming.js.map +1 -1
  800. package/node_modules/@openrig/daemon/dist/domain/workflow-projector.d.ts +6 -2
  801. package/node_modules/@openrig/daemon/dist/domain/workflow-projector.d.ts.map +1 -1
  802. package/node_modules/@openrig/daemon/dist/domain/workflow-projector.js +271 -2
  803. package/node_modules/@openrig/daemon/dist/domain/workflow-projector.js.map +1 -1
  804. package/node_modules/@openrig/daemon/dist/domain/workflow-runtime.d.ts +62 -2
  805. package/node_modules/@openrig/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
  806. package/node_modules/@openrig/daemon/dist/domain/workflow-runtime.js +334 -18
  807. package/node_modules/@openrig/daemon/dist/domain/workflow-runtime.js.map +1 -1
  808. package/node_modules/@openrig/daemon/dist/domain/workflow-spec-cache.d.ts +9 -1
  809. package/node_modules/@openrig/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
  810. package/node_modules/@openrig/daemon/dist/domain/workflow-spec-cache.js +85 -0
  811. package/node_modules/@openrig/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
  812. package/node_modules/@openrig/daemon/dist/domain/workflow-types.d.ts +38 -1
  813. package/node_modules/@openrig/daemon/dist/domain/workflow-types.d.ts.map +1 -1
  814. package/node_modules/@openrig/daemon/dist/domain/workflow-types.js.map +1 -1
  815. package/node_modules/@openrig/daemon/dist/domain/workflow-validator.d.ts.map +1 -1
  816. package/node_modules/@openrig/daemon/dist/domain/workflow-validator.js +20 -3
  817. package/node_modules/@openrig/daemon/dist/domain/workflow-validator.js.map +1 -1
  818. package/node_modules/@openrig/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts +38 -9
  819. package/node_modules/@openrig/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts.map +1 -1
  820. package/node_modules/@openrig/daemon/dist/domain/workspace/default-workspace-scaffold.js +93 -347
  821. package/node_modules/@openrig/daemon/dist/domain/workspace/default-workspace-scaffold.js.map +1 -1
  822. package/node_modules/@openrig/daemon/dist/index.d.ts.map +1 -1
  823. package/node_modules/@openrig/daemon/dist/index.js +13 -0
  824. package/node_modules/@openrig/daemon/dist/index.js.map +1 -1
  825. package/node_modules/@openrig/daemon/dist/instance-initialization-surface.d.ts +3 -0
  826. package/node_modules/@openrig/daemon/dist/instance-initialization-surface.d.ts.map +1 -0
  827. package/node_modules/@openrig/daemon/dist/instance-initialization-surface.js +3 -0
  828. package/node_modules/@openrig/daemon/dist/instance-initialization-surface.js.map +1 -0
  829. package/node_modules/@openrig/daemon/dist/project-lifecycle-surface.d.ts +3 -0
  830. package/node_modules/@openrig/daemon/dist/project-lifecycle-surface.d.ts.map +1 -0
  831. package/node_modules/@openrig/daemon/dist/project-lifecycle-surface.js +3 -0
  832. package/node_modules/@openrig/daemon/dist/project-lifecycle-surface.js.map +1 -0
  833. package/node_modules/@openrig/daemon/dist/routes/bundles.js +10 -9
  834. package/node_modules/@openrig/daemon/dist/routes/bundles.js.map +1 -1
  835. package/node_modules/@openrig/daemon/dist/routes/config.d.ts.map +1 -1
  836. package/node_modules/@openrig/daemon/dist/routes/config.js +27 -49
  837. package/node_modules/@openrig/daemon/dist/routes/config.js.map +1 -1
  838. package/node_modules/@openrig/daemon/dist/routes/context-packs.d.ts.map +1 -1
  839. package/node_modules/@openrig/daemon/dist/routes/context-packs.js +114 -16
  840. package/node_modules/@openrig/daemon/dist/routes/context-packs.js.map +1 -1
  841. package/node_modules/@openrig/daemon/dist/routes/crash-cart.js +3 -0
  842. package/node_modules/@openrig/daemon/dist/routes/crash-cart.js.map +1 -1
  843. package/node_modules/@openrig/daemon/dist/routes/queue.d.ts.map +1 -1
  844. package/node_modules/@openrig/daemon/dist/routes/queue.js +51 -10
  845. package/node_modules/@openrig/daemon/dist/routes/queue.js.map +1 -1
  846. package/node_modules/@openrig/daemon/dist/routes/rigs.js +22 -4
  847. package/node_modules/@openrig/daemon/dist/routes/rigs.js.map +1 -1
  848. package/node_modules/@openrig/daemon/dist/routes/rigspec.d.ts.map +1 -1
  849. package/node_modules/@openrig/daemon/dist/routes/rigspec.js +46 -2
  850. package/node_modules/@openrig/daemon/dist/routes/rigspec.js.map +1 -1
  851. package/node_modules/@openrig/daemon/dist/routes/seat.js +21 -1
  852. package/node_modules/@openrig/daemon/dist/routes/seat.js.map +1 -1
  853. package/node_modules/@openrig/daemon/dist/routes/sessions.js +16 -6
  854. package/node_modules/@openrig/daemon/dist/routes/sessions.js.map +1 -1
  855. package/node_modules/@openrig/daemon/dist/routes/snapshots.d.ts.map +1 -1
  856. package/node_modules/@openrig/daemon/dist/routes/snapshots.js +41 -3
  857. package/node_modules/@openrig/daemon/dist/routes/snapshots.js.map +1 -1
  858. package/node_modules/@openrig/daemon/dist/routes/up.js +22 -4
  859. package/node_modules/@openrig/daemon/dist/routes/up.js.map +1 -1
  860. package/node_modules/@openrig/daemon/dist/routes/watchdog.d.ts.map +1 -1
  861. package/node_modules/@openrig/daemon/dist/routes/watchdog.js +7 -6
  862. package/node_modules/@openrig/daemon/dist/routes/watchdog.js.map +1 -1
  863. package/node_modules/@openrig/daemon/dist/routes/workflow.d.ts.map +1 -1
  864. package/node_modules/@openrig/daemon/dist/routes/workflow.js +104 -39
  865. package/node_modules/@openrig/daemon/dist/routes/workflow.js.map +1 -1
  866. package/node_modules/@openrig/daemon/dist/server.d.ts +2 -0
  867. package/node_modules/@openrig/daemon/dist/server.d.ts.map +1 -1
  868. package/node_modules/@openrig/daemon/dist/server.js +1 -0
  869. package/node_modules/@openrig/daemon/dist/server.js.map +1 -1
  870. package/node_modules/@openrig/daemon/dist/skill-loadout-surface.d.ts +3 -0
  871. package/node_modules/@openrig/daemon/dist/skill-loadout-surface.d.ts.map +1 -0
  872. package/node_modules/@openrig/daemon/dist/skill-loadout-surface.js +2 -0
  873. package/node_modules/@openrig/daemon/dist/skill-loadout-surface.js.map +1 -0
  874. package/node_modules/@openrig/daemon/dist/startup.d.ts.map +1 -1
  875. package/node_modules/@openrig/daemon/dist/startup.js +88 -71
  876. package/node_modules/@openrig/daemon/dist/startup.js.map +1 -1
  877. package/node_modules/@openrig/daemon/dist/system-world-surface.d.ts +2 -0
  878. package/node_modules/@openrig/daemon/dist/system-world-surface.d.ts.map +1 -0
  879. package/node_modules/@openrig/daemon/dist/system-world-surface.js +2 -0
  880. package/node_modules/@openrig/daemon/dist/system-world-surface.js.map +1 -0
  881. package/node_modules/@openrig/daemon/package.json +17 -1
  882. package/package.json +2 -1
  883. package/tui/dist/commands/registry.d.ts.map +1 -1
  884. package/tui/dist/commands/registry.js +10 -1
  885. package/tui/dist/commands/registry.js.map +1 -1
  886. package/tui/dist/daemon-client.d.ts +13 -0
  887. package/tui/dist/daemon-client.d.ts.map +1 -1
  888. package/tui/dist/daemon-client.js +19 -0
  889. package/tui/dist/daemon-client.js.map +1 -1
  890. package/tui/dist/demo-data.d.ts.map +1 -1
  891. package/tui/dist/demo-data.js +65 -9
  892. package/tui/dist/demo-data.js.map +1 -1
  893. package/tui/dist/detail.d.ts +9 -0
  894. package/tui/dist/detail.d.ts.map +1 -1
  895. package/tui/dist/detail.js.map +1 -1
  896. package/tui/dist/execution/execution-model.d.ts +25 -0
  897. package/tui/dist/execution/execution-model.d.ts.map +1 -0
  898. package/tui/dist/execution/execution-model.js +881 -0
  899. package/tui/dist/execution/execution-model.js.map +1 -0
  900. package/tui/dist/hydrate.d.ts +3 -2
  901. package/tui/dist/hydrate.d.ts.map +1 -1
  902. package/tui/dist/hydrate.js +70 -8
  903. package/tui/dist/hydrate.js.map +1 -1
  904. package/tui/dist/input.d.ts +12 -0
  905. package/tui/dist/input.d.ts.map +1 -1
  906. package/tui/dist/input.js +31 -8
  907. package/tui/dist/input.js.map +1 -1
  908. package/tui/dist/live.d.ts +10 -0
  909. package/tui/dist/live.d.ts.map +1 -1
  910. package/tui/dist/live.js +34 -1
  911. package/tui/dist/live.js.map +1 -1
  912. package/tui/dist/main.js +57 -7
  913. package/tui/dist/main.js.map +1 -1
  914. package/tui/dist/navigator.d.ts.map +1 -1
  915. package/tui/dist/navigator.js +10 -6
  916. package/tui/dist/navigator.js.map +1 -1
  917. package/tui/dist/render.d.ts.map +1 -1
  918. package/tui/dist/render.js +605 -153
  919. package/tui/dist/render.js.map +1 -1
  920. package/tui/dist/scopes/scopes-model.d.ts +15 -8
  921. package/tui/dist/scopes/scopes-model.d.ts.map +1 -1
  922. package/tui/dist/scopes/scopes-model.js +218 -44
  923. package/tui/dist/scopes/scopes-model.js.map +1 -1
  924. package/tui/dist/sections.js +2 -2
  925. package/tui/dist/sections.js.map +1 -1
  926. package/tui/dist/socket-server.d.ts +13 -0
  927. package/tui/dist/socket-server.d.ts.map +1 -1
  928. package/tui/dist/socket-server.js +24 -0
  929. package/tui/dist/socket-server.js.map +1 -1
  930. package/tui/dist/state.d.ts.map +1 -1
  931. package/tui/dist/state.js +35 -8
  932. package/tui/dist/state.js.map +1 -1
  933. package/tui/dist/stylize.d.ts.map +1 -1
  934. package/tui/dist/stylize.js +23 -29
  935. package/tui/dist/stylize.js.map +1 -1
  936. package/tui/dist/theme.d.ts +1 -1
  937. package/tui/dist/theme.d.ts.map +1 -1
  938. package/tui/dist/theme.js +5 -4
  939. package/tui/dist/theme.js.map +1 -1
  940. package/tui/dist/types.d.ts +117 -1
  941. package/tui/dist/types.d.ts.map +1 -1
  942. package/tui/dist/visual-layout.d.ts +6 -0
  943. package/tui/dist/visual-layout.d.ts.map +1 -0
  944. package/tui/dist/visual-layout.js +8 -0
  945. package/tui/dist/visual-layout.js.map +1 -0
  946. package/ui/dist/assets/{index-B_wqzP0D.js → index-wyX378xb.js} +15 -15
  947. package/ui/dist/index.html +1 -1
@@ -0,0 +1,881 @@
1
+ import { detailPage, listItem, sectionRule } from "../detail.js";
2
+ import { scopeContractLines, scopeIdentityLines } from "../scopes/scopes-model.js";
3
+ const INDETERMINATE = "INDETERMINATE";
4
+ const RUNGS = ["locked", "built", "reviewed", "folded", "adopted"];
5
+ /** Ordinary words for the ladder rungs. */
6
+ const RUNG_WORD = { locked: "spec locked", built: "built", reviewed: "reviewed", folded: "merged", adopted: "live" };
7
+ function record(value) {
8
+ return value != null && typeof value === "object" && !Array.isArray(value)
9
+ ? value
10
+ : {};
11
+ }
12
+ function str(value, fallback = "?") {
13
+ return typeof value === "string" && value !== "" ? value : value == null ? fallback : String(value);
14
+ }
15
+ function shortSha(value) {
16
+ return typeof value === "string" ? value.slice(0, 9) : "?";
17
+ }
18
+ function clock(iso) {
19
+ return typeof iso === "string" && iso.length >= 19 ? `${iso.slice(11, 19)}Z` : "";
20
+ }
21
+ function clip(text, room) {
22
+ return text.length > room ? `${text.slice(0, Math.max(room - 1, 0))}…` : text;
23
+ }
24
+ /** Keep lifecycle commands complete in the scrollable pane. Shell continuations make the
25
+ * visual wrap usable as one command instead of turning the hidden suffix into guesswork. */
26
+ function shellWords(command) {
27
+ const words = [];
28
+ let word = "";
29
+ let quote = null;
30
+ let escaped = false;
31
+ for (const char of command) {
32
+ if (escaped) {
33
+ word += char;
34
+ escaped = false;
35
+ }
36
+ else if (char === "\\" && quote !== "'") {
37
+ word += char;
38
+ escaped = true;
39
+ }
40
+ else if ((char === "'" || char === '"') && (quote === null || quote === char)) {
41
+ word += char;
42
+ quote = quote === char ? null : char;
43
+ }
44
+ else if (/\s/.test(char) && quote === null) {
45
+ if (word)
46
+ words.push(word);
47
+ word = "";
48
+ }
49
+ else {
50
+ word += char;
51
+ }
52
+ }
53
+ if (word)
54
+ words.push(word);
55
+ return words;
56
+ }
57
+ function quoteShell(value) {
58
+ return `'${value.replace(/'/g, `'"'"'`)}'`;
59
+ }
60
+ /** Split only words emitted by the daemon's shellQuote helper. A continuation directly
61
+ * between adjacent quoted chunks is one shell argument; option-to-option continuations
62
+ * retain a separating space. */
63
+ function splitQuotedWord(word, maxWidth) {
64
+ if (!word.startsWith("'") || !word.endsWith("'"))
65
+ return null;
66
+ const value = word.slice(1, -1).replaceAll(`'"'"'`, "'");
67
+ if (quoteShell(value) !== word)
68
+ return null;
69
+ const chunks = [];
70
+ let chunk = "";
71
+ for (const char of value) {
72
+ if (chunk && quoteShell(chunk + char).length > maxWidth) {
73
+ chunks.push(quoteShell(chunk));
74
+ chunk = char;
75
+ }
76
+ else {
77
+ chunk += char;
78
+ }
79
+ }
80
+ chunks.push(quoteShell(chunk));
81
+ return chunks;
82
+ }
83
+ function actionLines(action, width) {
84
+ const firstIndent = " action ";
85
+ const nextIndent = " ";
86
+ const room = Math.max(width, 24);
87
+ const parts = shellWords(action);
88
+ const lines = [];
89
+ let current = `${firstIndent}${parts.shift() ?? ""}`;
90
+ for (let index = 0; index < parts.length; index++) {
91
+ const part = parts[index];
92
+ const more = index < parts.length - 1;
93
+ if (current && `${current} ${part}${more ? " \\" : ""}`.length <= room) {
94
+ current += ` ${part}`;
95
+ continue;
96
+ }
97
+ if (current)
98
+ lines.push({ text: `${current} \\` });
99
+ const chunks = splitQuotedWord(part, room - 2);
100
+ if (chunks && `${nextIndent}${part}${more ? " \\" : ""}`.length > room) {
101
+ for (let chunkIndex = 0; chunkIndex < chunks.length - 1; chunkIndex++) {
102
+ lines.push({ text: `${chunks[chunkIndex]}\\` });
103
+ }
104
+ const last = chunks[chunks.length - 1];
105
+ if (more) {
106
+ lines.push({ text: `${last} \\` });
107
+ current = "";
108
+ }
109
+ else {
110
+ current = last;
111
+ }
112
+ }
113
+ else {
114
+ current = `${nextIndent}${part}`;
115
+ }
116
+ }
117
+ if (current)
118
+ lines.push({ text: current });
119
+ return lines;
120
+ }
121
+ function fitSegs(parts, width) {
122
+ const out = [];
123
+ let room = Math.max(0, width);
124
+ for (const part of parts) {
125
+ if (room <= 0)
126
+ break;
127
+ if (part.text.length <= room) {
128
+ out.push(part);
129
+ room -= part.text.length;
130
+ continue;
131
+ }
132
+ out.push({ ...part, text: room === 1 ? "…" : `${part.text.slice(0, room - 1)}…` });
133
+ room = 0;
134
+ }
135
+ return out;
136
+ }
137
+ function semantic(parts, width, action) {
138
+ const segs = fitSegs(parts, width);
139
+ return { text: segs.map((part) => part.text).join(""), segs, ...(action ? { action } : {}) };
140
+ }
141
+ function semanticAction(parts, action, width) {
142
+ const suffix = { text: " (open ▸)", token: "accent", bold: true };
143
+ const body = fitSegs(parts, Math.max(0, width - suffix.text.length));
144
+ return semantic([...body, suffix], width, action);
145
+ }
146
+ function stateToken(word) {
147
+ if (word === "working" || word === "done" || word === "active")
148
+ return "ok";
149
+ if (word === "needs input" || word === "blocked" || word === "parked")
150
+ return "warn";
151
+ if (word === "failed")
152
+ return "error";
153
+ return "dim";
154
+ }
155
+ function open(key) {
156
+ return { type: "execution-open", key };
157
+ }
158
+ /** A drillable row. The text is clamped so the open affordance always survives the pane
159
+ * width; the full facts live one drill away. */
160
+ function actionRow(text, action, width = Number.MAX_SAFE_INTEGER) {
161
+ return { text: ` ${clip(text, Math.max(width - 13, 24))} (open ▸)`, action };
162
+ }
163
+ function row(text, key, width = Number.MAX_SAFE_INTEGER) {
164
+ return actionRow(text, open(key), width);
165
+ }
166
+ function rungCell(ladder, rung) {
167
+ const cell = record(ladder[rung]);
168
+ const basis = str(cell["basis"], "basis unavailable");
169
+ if (rung === "built") {
170
+ const sha = cell["candidate_sha"];
171
+ return { value: sha, basis, state: typeof sha === "string" && sha !== INDETERMINATE ? "yes" : "undetermined" };
172
+ }
173
+ const value = cell["value"];
174
+ return { value, basis, state: value === true ? "yes" : value === false ? "no" : "undetermined" };
175
+ }
176
+ /** Highest rung actually confirmed (true / built sha), 0 = nothing confirmed. */
177
+ function reachedRank(cells) {
178
+ for (let i = RUNGS.length - 1; i >= 0; i--)
179
+ if (cells[RUNGS[i]].state === "yes")
180
+ return i + 1;
181
+ return 0;
182
+ }
183
+ /** The evidence fact in words: the highest confirmed rung, or the reason nothing is. */
184
+ function evidenceText(cells, rank) {
185
+ if (rank === 0)
186
+ return cells.built.state === "undetermined" ? "no candidate recorded" : "nothing confirmed";
187
+ const rung = RUNGS[rank - 1];
188
+ return rung === "built" ? `built ${shortSha(cells.built.value)}` : RUNG_WORD[rung];
189
+ }
190
+ function sliceName(scope, dir) {
191
+ const raw = scope?.displayName ?? dir;
192
+ // the id column already says which slice; "Slice 04 — " in front of the name is noise
193
+ return raw.replace(/^slice\s+\d+\s*[—–-]\s*/i, "").trim() || dir;
194
+ }
195
+ function sliceFacts(execution, scopes) {
196
+ const missionScopes = scopes?.find((item) => item.mission === execution.mission);
197
+ const seq = execution.q2_sequencing ?? [];
198
+ const care = execution.q3_care ?? [];
199
+ const lanes = execution.q1_lanes ?? [];
200
+ const parks = execution.q5_park ?? [];
201
+ return (execution.q4_ladder ?? []).map((ladder, index) => {
202
+ const id = str(ladder["slice_id"] ?? ladder["dir"]);
203
+ const dir = str(ladder["dir"], id);
204
+ const cells = Object.fromEntries(RUNGS.map((rung) => [rung, rungCell(ladder, rung)]));
205
+ const seqIndex = seq.findIndex((item) => item["slice_id"] === id || item["dir"] === dir);
206
+ const scope = missionScopes?.slices.find((slice) => slice.id === id || slice.dirName === dir) ?? null;
207
+ const lane = lanes.find((candidate) => candidate["slice"] === id) ?? null;
208
+ return {
209
+ id,
210
+ dir,
211
+ name: sliceName(scope, dir),
212
+ order: seqIndex >= 0 ? seqIndex : seq.length + index,
213
+ ladder,
214
+ cells,
215
+ rank: reachedRank(cells),
216
+ sequencing: seqIndex >= 0 ? seq[seqIndex] : null,
217
+ care: care.find((item) => item["slice_id"] === id) ?? null,
218
+ scope,
219
+ lane,
220
+ park: lane ? parks.find((item) => item["qitem_id"] === lane["qitem_id"]) ?? null : null,
221
+ };
222
+ }).sort((a, b) => a.order - b.order);
223
+ }
224
+ /** blocked_on_rows entries are `{ qitem_id, blocked_on }` — the slice's own row and the row it
225
+ * waits on. Render the relation, never the object. */
226
+ function blockerText(rows, lead = "row") {
227
+ if (!Array.isArray(rows) || rows.length === 0)
228
+ return "";
229
+ return rows
230
+ .map((entry) => {
231
+ if (typeof entry === "string")
232
+ return entry;
233
+ const r = record(entry);
234
+ const own = str(r["qitem_id"], "?");
235
+ const blocker = str(r["blocked_on"], "?");
236
+ return lead === "blocker" ? `waits on ${blocker} · own row ${own}` : `${own} waits on ${blocker}`;
237
+ })
238
+ .join("; ");
239
+ }
240
+ /** Declared work state — the slice file's own status word, verbatim. */
241
+ function declaredText(slice) {
242
+ return slice.scope?.status?.trim().toLowerCase() || "no declared status";
243
+ }
244
+ function seatShort(seat) {
245
+ const full = str(seat, "");
246
+ return full.includes("@") ? full.slice(0, full.indexOf("@")) : full;
247
+ }
248
+ /** A live problem on the slice, in words, or null. Elapsed time alone is never a verdict. */
249
+ function problemText(slice) {
250
+ const activity = record(slice.lane?.["activity"]);
251
+ const needs = record(activity["needs_input"]);
252
+ if (Number(needs["count"] ?? 0) > 0)
253
+ return `needs input: ${str(needs["reason"], String(needs["count"]))}`;
254
+ const blocked = blockerText(slice.sequencing?.["blocked_on_rows"], "blocker");
255
+ if (blocked)
256
+ return blocked.split(" · own row ")[0];
257
+ const pickup = slice.park?.["pickup_state"];
258
+ if (slice.park && pickup !== "working") {
259
+ const age = slice.park["age_minutes"] != null ? ` ${String(slice.park["age_minutes"])} min` : "";
260
+ return `${str(pickup, INDETERMINATE)}${age}`;
261
+ }
262
+ return null;
263
+ }
264
+ /** The one state word a person scans: a live problem, live activity, else the declared status. */
265
+ function stateWord(slice) {
266
+ const problem = problemText(slice);
267
+ if (problem)
268
+ return problem.startsWith("needs input") ? "needs input" : problem.startsWith("waits on") ? "blocked" : problem.split(" ")[0];
269
+ if (slice.lane)
270
+ return str(record(slice.lane["activity"])["activity"], "claimed");
271
+ return declaredText(slice);
272
+ }
273
+ function proofText(scope) {
274
+ if (!scope)
275
+ return null;
276
+ if (scope.proof.total === 0)
277
+ return "no proof contract";
278
+ return `proof ${scope.proof.paired} of ${scope.proof.total}`;
279
+ }
280
+ function assigneeText(slice) {
281
+ if (!slice.lane)
282
+ return null;
283
+ const activity = record(slice.lane["activity"]);
284
+ const by = str(activity["decided_by"], "");
285
+ return `${seatShort(slice.lane["seat"])}${by ? ` (${by})` : ""}`;
286
+ }
287
+ /** What unlocks next, only when the projection actually says so. */
288
+ function nextText(slice) {
289
+ const seq = slice.sequencing;
290
+ if (!seq)
291
+ return null;
292
+ if (seq["next_up"] === true)
293
+ return "ready to start";
294
+ if (blockerText(seq["blocked_on_rows"]))
295
+ return null; // the problem column carries it
296
+ if (slice.lane || slice.rank >= 4 || declaredText(slice) === "done")
297
+ return null;
298
+ const deps = seq["depends_on"];
299
+ if (Array.isArray(deps) && deps.length > 0)
300
+ return `after ${deps.map(String).join(", ")}`;
301
+ return null;
302
+ }
303
+ function waveOf(slice) {
304
+ const wave = slice.care?.["build_wave"];
305
+ return typeof wave === "string" && wave !== INDETERMINATE ? wave : "no wave declared";
306
+ }
307
+ // ---- rows ----------------------------------------------------------------------
308
+ function sliceAction(execution, slice) {
309
+ void execution;
310
+ return open(`slice:${slice.id}`);
311
+ }
312
+ function countWords(slices) {
313
+ const counts = new Map();
314
+ for (const slice of slices)
315
+ counts.set(stateWord(slice), (counts.get(stateWord(slice)) ?? 0) + 1);
316
+ return [...counts.entries()].sort((a, b) => b[1] - a[1]).map(([word, n]) => `${n} ${word}`).join(", ");
317
+ }
318
+ function waveTitle(wave, members) {
319
+ return `WAVE ${wave} · ${members.length} slice${members.length === 1 ? "" : "s"} · ${countWords(members)}`;
320
+ }
321
+ function stateMark(word) {
322
+ if (word === "working")
323
+ return "●";
324
+ if (word === "needs input")
325
+ return "◐";
326
+ if (word === "blocked")
327
+ return "⚑";
328
+ if (word === "done")
329
+ return "✓";
330
+ if (word === "failed")
331
+ return "✕";
332
+ return "○";
333
+ }
334
+ function padCell(text, width) {
335
+ const value = clip(text, width);
336
+ return value + " ".repeat(Math.max(0, width - value.length));
337
+ }
338
+ function graphNode(slice, width) {
339
+ const inside = width - 2;
340
+ const title = ` ${slice.id} `;
341
+ const topTail = `${"─".repeat(Math.max(0, inside - title.length - 1))}┐`;
342
+ const nameText = padCell(` ${slice.name}`, inside);
343
+ const state = `${stateMark(stateWord(slice))} ${stateWord(slice)}`;
344
+ const owner = assigneeText(slice);
345
+ const ownerRoom = Math.max(0, inside - 1 - state.length);
346
+ const rawOwner = owner ? ` · ${owner}` : "";
347
+ const ownerText = ownerRoom > 0 ? clip(rawOwner, ownerRoom) : "";
348
+ const statusPad = " ".repeat(Math.max(0, inside - 1 - state.length - ownerText.length));
349
+ return [
350
+ semantic([{ text: "┌─", token: "chrome" }, { text: title, token: "accentBright", bold: true }, { text: topTail, token: "chrome" }], width),
351
+ semantic([{ text: "│", token: "chrome" }, { text: nameText, token: "bright" }, { text: "│", token: "chrome" }], width),
352
+ semantic([
353
+ { text: "│ ", token: "chrome" },
354
+ { text: state, token: stateToken(stateWord(slice)), bold: true },
355
+ { text: ownerText, token: "dim" },
356
+ { text: statusPad },
357
+ { text: "│", token: "chrome" },
358
+ ], width),
359
+ semantic([{ text: `└${"─".repeat(inside)}┘`, token: "chrome" }], width),
360
+ ];
361
+ }
362
+ function graphChunk(execution, members, width) {
363
+ const gap = 2;
364
+ const perRow = width >= 108 ? 3 : 2;
365
+ const nodeWidth = Math.min(34, Math.max(18, Math.floor((width - gap * (Math.min(perRow, members.length) - 1)) / Math.min(perRow, members.length))));
366
+ const out = [];
367
+ for (let start = 0; start < members.length; start += perRow) {
368
+ const chunk = members.slice(start, start + perRow);
369
+ const boxes = chunk.map((slice) => graphNode(slice, nodeWidth));
370
+ const zones = chunk.map((slice, index) => ({
371
+ start: index * (nodeWidth + gap),
372
+ end: index * (nodeWidth + gap) + nodeWidth,
373
+ action: sliceAction(execution, slice),
374
+ }));
375
+ for (let line = 0; line < 4; line += 1) {
376
+ const segs = boxes.flatMap((box, index) => [
377
+ ...(index > 0 ? [{ text: " ".repeat(gap) }] : []),
378
+ ...(box[line].segs ?? [{ text: box[line].text }]),
379
+ ]);
380
+ out.push({ text: segs.map((seg) => seg.text).join(""), segs, zones });
381
+ }
382
+ const centers = chunk.map((_, index) => index * (nodeWidth + gap) + Math.floor(nodeWidth / 2));
383
+ const busWidth = Math.min(width, chunk.length * nodeWidth + Math.max(0, chunk.length - 1) * gap);
384
+ const stubs = Array.from({ length: busWidth }, () => " ");
385
+ for (const center of centers)
386
+ if (center < stubs.length)
387
+ stubs[center] = "│";
388
+ out.push({ text: stubs.join("").trimEnd() });
389
+ if (chunk.length === 1) {
390
+ const arrow = Array.from({ length: busWidth }, () => " ");
391
+ if (centers[0] < arrow.length)
392
+ arrow[centers[0]] = "▼";
393
+ out.push(semantic([{ text: arrow.join("").trimEnd(), token: "chrome" }], width));
394
+ continue;
395
+ }
396
+ const bus = Array.from({ length: busWidth }, () => " ");
397
+ const lo = centers[0] ?? 0;
398
+ const hi = centers.at(-1) ?? lo;
399
+ for (let x = lo; x <= hi && x < bus.length; x += 1)
400
+ bus[x] = "━";
401
+ for (const center of centers)
402
+ if (center < bus.length)
403
+ bus[center] = "┴";
404
+ const mid = Math.floor((lo + hi) / 2);
405
+ if (mid < bus.length)
406
+ bus[mid] = centers.includes(mid) ? "┼" : "┬";
407
+ out.push(semantic([{ text: bus.join("").trimEnd(), token: "chrome" }], width));
408
+ const arrow = Array.from({ length: busWidth }, () => " ");
409
+ if (mid < arrow.length)
410
+ arrow[mid] = "▼";
411
+ out.push(semantic([{ text: arrow.join("").trimEnd(), token: "chrome" }], width));
412
+ }
413
+ return out;
414
+ }
415
+ function waveRows(execution, wave, members, width) {
416
+ const title = waveTitle(wave, members);
417
+ const header = semantic([
418
+ { text: "━ ", token: "chrome" },
419
+ { text: title, token: "bright", bold: true },
420
+ { text: ` ${"━".repeat(width)}`, token: "chrome" },
421
+ ], width);
422
+ if (width < 70)
423
+ return [
424
+ { text: "" }, header,
425
+ ...members.map((slice) => semanticAction([
426
+ { text: `${stateMark(stateWord(slice))} ${stateWord(slice).padEnd(11)}`, token: stateToken(stateWord(slice)), bold: true },
427
+ { text: `${slice.id} `, token: "accentBright" },
428
+ { text: slice.name, token: "bright" },
429
+ ], sliceAction(execution, slice), width)),
430
+ ];
431
+ return [
432
+ { text: "" }, header, ...graphChunk(execution, members, width),
433
+ ];
434
+ }
435
+ function collectIndeterminate(execution, slices) {
436
+ const groups = new Map();
437
+ const add = (where, member, basis) => {
438
+ if (typeof basis !== "string")
439
+ return;
440
+ const key = `${where}|${basis}`;
441
+ const existing = groups.get(key) ?? { basis, where, members: [] };
442
+ if (!existing.members.includes(member))
443
+ existing.members.push(member);
444
+ groups.set(key, existing);
445
+ };
446
+ // Only the FIRST undetermined rung is a blind spot; every rung above it is undetermined
447
+ // as a consequence and would repeat the same fact.
448
+ for (const slice of slices) {
449
+ const first = RUNGS.find((rung) => slice.cells[rung].state === "undetermined");
450
+ if (first)
451
+ add(RUNG_WORD[first], slice.id, slice.cells[first].basis);
452
+ }
453
+ for (const lane of execution.q1_lanes ?? []) {
454
+ const activity = record(lane["activity"]);
455
+ if (activity["activity"] === INDETERMINATE)
456
+ add("activity", str(lane["slice"] ?? lane["qitem_id"], "lane"), activity["basis"]);
457
+ }
458
+ return [...groups.values()].sort((a, b) => b.members.length - a.members.length);
459
+ }
460
+ function evidenceDetail(execution, slices, width) {
461
+ const gitBasis = str(record(execution.sources?.["git"])["basis"], "(no git source cell)");
462
+ const lines = [
463
+ { text: `${execution.mission} · evidence gap · derived ${clock(execution.derived_at) || "?"}` },
464
+ { text: "" },
465
+ { text: " Declared state comes from each slice file. Evidence rungs come from the daemon's" },
466
+ { text: " execution projection, which needs a reachable repository to confirm reviewed, merged" },
467
+ { text: " and live. Unconfirmed is not waiting work and not done; it is unknown." },
468
+ { text: "" },
469
+ sectionRule("repository source", width),
470
+ { text: ` git: ${gitBasis}` },
471
+ ];
472
+ for (const item of collectIndeterminate(execution, slices)) {
473
+ lines.push({ text: "" }, sectionRule(`${item.where} unconfirmed for ${item.members.length} slice${item.members.length === 1 ? "" : "s"}`, width));
474
+ lines.push({ text: ` basis: ${item.basis}` });
475
+ for (const member of item.members)
476
+ lines.push(listItem(member, open(`slice:${member}`)));
477
+ }
478
+ lines.push({ text: "" }, row("projection sources and derivation bases", "sources", width), { text: "" }, back());
479
+ return lines;
480
+ }
481
+ // ---- overview ----------------------------------------------------------------------
482
+ function overviewLines(execution, scopes, width) {
483
+ const slices = sliceFacts(execution, scopes);
484
+ const live = slices.filter((slice) => stateWord(slice) === "working").length;
485
+ const problems = slices.filter((slice) => problemText(slice)).length;
486
+ const build = shortSha(record(execution.sources?.["build_info"])["commit"]);
487
+ const now = slices.filter((slice) => stateWord(slice) === "working").map((slice) => slice.id);
488
+ const needsHuman = slices.filter((slice) => problemText(slice));
489
+ const done = slices.filter((slice) => declaredText(slice) === "done").length;
490
+ const next = slices.find((slice) => nextText(slice) === "ready to start");
491
+ const unknown = slices.filter((slice) => RUNGS.some((rung) => slice.cells[rung].state === "undetermined")).length;
492
+ const missionState = problems > 0 ? "NEEDS ATTENTION" : live > 0 ? "ACTIVE" : done === slices.length && slices.length > 0 ? "COMPLETE" : "QUIET";
493
+ const missionToken = problems > 0 ? "warn" : live > 0 || missionState === "COMPLETE" ? "ok" : "dim";
494
+ const nowText = now.length ? now.join(", ") : "no live slice";
495
+ const nextValue = next ? `${next.id} · ready to start` : "no sequenced next transition";
496
+ const progress = `${done}/${slices.length} declared done · ${live} working${problems ? ` · ${problems} with a problem` : ""}`;
497
+ const fact = (label, value, token) => semantic([
498
+ { text: ` ${label.padEnd(10)}`, token: "dim", bold: true },
499
+ { text: value, token },
500
+ ], width);
501
+ const narrowFact = (label, value, token) => [
502
+ semantic([{ text: ` ${label}`, token: "dim", bold: true }], width),
503
+ semantic([{ text: ` ${value}`, token }], width),
504
+ ];
505
+ const lines = [semantic([
506
+ { text: execution.mission, token: "accentBright", bold: true },
507
+ { text: " · ", token: "chrome" },
508
+ { text: missionState, token: missionToken, bold: true },
509
+ { text: " · ", token: "chrome" },
510
+ { text: `${slices.length} slice${slices.length === 1 ? "" : "s"}`, token: "bright" },
511
+ ], width)];
512
+ if (width < 70) {
513
+ lines.push(...narrowFact("NOW", nowText, now.length ? "ok" : "dim"));
514
+ lines.push(...narrowFact("NEXT", nextValue, next ? "accentBright" : "dim"));
515
+ lines.push(...narrowFact("PROGRESS", progress, "bright"));
516
+ }
517
+ else {
518
+ lines.push(fact("NOW", nowText, now.length ? "ok" : "dim"));
519
+ lines.push(fact("NEXT", nextValue, next ? "accentBright" : "dim"));
520
+ lines.push(fact("PROGRESS", progress, "bright"));
521
+ }
522
+ if (needsHuman.length) {
523
+ const first = needsHuman[0];
524
+ lines.push(semanticAction([
525
+ { text: " ⚑ NEEDS HUMAN ", token: "warn", bold: true },
526
+ { text: `${needsHuman.map((slice) => slice.id).join(", ")} · ${problemText(first)}`, token: "bright" },
527
+ ], sliceAction(execution, first), width));
528
+ }
529
+ const provenanceAction = unknown > 0 ? open("evidence") : open("sources");
530
+ const provenance = width < 70 && unknown > 0
531
+ ? [{ text: " provenance · ", token: "dim" }, { text: `evidence gap ${unknown}/${slices.length}`, token: "warn" }]
532
+ : [
533
+ { text: " provenance ", token: "dim" },
534
+ { text: "·", token: "chrome" },
535
+ { text: ` ${clock(execution.derived_at) || "?"} · build ${build}`, token: "dim" },
536
+ ...(unknown > 0 ? [
537
+ { text: " · ", token: "chrome" },
538
+ { text: `evidence gap ${unknown}/${slices.length} unknown`, token: "warn" },
539
+ ] : []),
540
+ ];
541
+ lines.push(semanticAction(provenance, provenanceAction, width));
542
+ lines.push(...lifecycleLines(execution, width));
543
+ const waves = new Map();
544
+ for (const slice of slices)
545
+ waves.set(waveOf(slice), [...(waves.get(waveOf(slice)) ?? []), slice]);
546
+ for (const [wave, members] of waves)
547
+ lines.push(...waveRows(execution, wave, members, width));
548
+ if (slices.length === 0)
549
+ lines.push({ text: " (no slices on this mission)" });
550
+ return lines;
551
+ }
552
+ function lifecycleLines(execution, width) {
553
+ const instances = execution.lifecycle_instances ?? [];
554
+ if (instances.length === 0)
555
+ return [];
556
+ const lines = [{ text: "" }, sectionRule(`LIFECYCLE · ${instances.length} instance${instances.length === 1 ? "" : "s"}`, width)];
557
+ for (const raw of instances) {
558
+ const instance = record(raw);
559
+ const instanceId = str(instance["instance_id"], INDETERMINATE);
560
+ lines.push({ text: ` ${instanceId} · ${str(instance["status"], INDETERMINATE)} · key ${str(instance["operation_key"], INDETERMINATE)}` });
561
+ const packets = Array.isArray(instance["frontier_packets"]) ? instance["frontier_packets"] : [];
562
+ for (const rawPacket of packets) {
563
+ const packet = record(rawPacket);
564
+ lines.push({ text: clip(` ▸ ${str(packet["step_id"], INDETERMINATE)} · ${str(packet["owner"], INDETERMINATE)} · ${str(packet["queue_state"], INDETERMINATE)} · packet ${str(packet["packet_id"], INDETERMINATE)}`, width) });
565
+ if (packet["blocked_on"])
566
+ lines.push({ text: clip(` blocked on ${str(packet["blocked_on"])}`, width) });
567
+ lines.push(...actionLines(str(packet["targeted_action"], INDETERMINATE), width));
568
+ }
569
+ const failures = Array.isArray(instance["failure_occurrences"]) ? instance["failure_occurrences"] : [];
570
+ for (const rawFailure of failures) {
571
+ const failure = record(rawFailure);
572
+ if (failure["status"] !== "unresolved")
573
+ continue;
574
+ lines.push({ text: clip(` ▲ ${str(failure["step_id"], INDETERMINATE)} · occurrence ${str(failure["occurrence_id"], INDETERMINATE)}${failure["failure_reason"] ? ` · ${str(failure["failure_reason"])}` : ""}`, width) });
575
+ lines.push(...actionLines(str(failure["targeted_action"], INDETERMINATE), width));
576
+ }
577
+ const unknowns = Array.isArray(instance["unknowns"]) ? instance["unknowns"] : [];
578
+ for (const unknown of unknowns)
579
+ lines.push({ text: clip(` ? ${str(unknown, INDETERMINATE)}`, width) });
580
+ }
581
+ return lines;
582
+ }
583
+ function waveDetail(execution, scopes, width, key) {
584
+ const wave = key.slice("group:wave:".length);
585
+ const slices = sliceFacts(execution, scopes);
586
+ const members = slices.filter((slice) => waveOf(slice) === wave);
587
+ if (members.length === 0)
588
+ return null;
589
+ return [
590
+ { text: `${execution.mission} · wave ${wave} · all ${members.length} rows` },
591
+ ...waveRows(execution, wave, members, width),
592
+ { text: "" },
593
+ back(),
594
+ ];
595
+ }
596
+ // ---- drill pages -------------------------------------------------------------
597
+ function back() {
598
+ return { text: " esc back · ⏎ open · : command bar" };
599
+ }
600
+ function laneKey(lane) {
601
+ return `lane:${str(lane["qitem_id"], "unknown")}`;
602
+ }
603
+ function card(title, rows, width) {
604
+ const w = Math.max(28, width);
605
+ const label = ` ${title} `;
606
+ const top = `┌─${label}${"─".repeat(Math.max(0, w - label.length - 3))}┐`;
607
+ return [
608
+ { text: clip(top, w) },
609
+ ...rows.map((item) => {
610
+ const suffix = item.action ? " (open ▸)" : "";
611
+ const value = clip(item.text.trim(), Math.max(1, w - 4 - suffix.length));
612
+ return { ...item, text: `│ ${padCell(value + suffix, w - 4)} │` };
613
+ }),
614
+ { text: `└${"─".repeat(w - 2)}┘` },
615
+ ];
616
+ }
617
+ function cardField(label, value, action) {
618
+ return { text: `${`${label}:`.padEnd(13)} ${value}`, ...(action ? { action } : {}) };
619
+ }
620
+ function wrapWords(text, width) {
621
+ const room = Math.max(1, width);
622
+ const out = [];
623
+ let line = "";
624
+ for (const raw of text.split(/\s+/).filter(Boolean)) {
625
+ let word = raw;
626
+ while (word.length > room) {
627
+ if (line) {
628
+ out.push(line);
629
+ line = "";
630
+ }
631
+ out.push(word.slice(0, room));
632
+ word = word.slice(room);
633
+ }
634
+ if (!word)
635
+ continue;
636
+ if (!line)
637
+ line = word;
638
+ else if (line.length + word.length + 1 <= room)
639
+ line += ` ${word}`;
640
+ else {
641
+ out.push(line);
642
+ line = word;
643
+ }
644
+ }
645
+ if (line)
646
+ out.push(line);
647
+ return out.length ? out : [""];
648
+ }
649
+ function wrappedCardField(label, value, width) {
650
+ const prefix = `${`${label}:`.padEnd(13)} `;
651
+ const continuation = " ".repeat(prefix.length);
652
+ const firstRoom = Math.max(8, width - 4 - prefix.length);
653
+ const chunks = wrapWords(value, firstRoom);
654
+ return chunks.map((chunk, index) => ({ text: `${index === 0 ? prefix : continuation}${chunk}` }));
655
+ }
656
+ function touchedRows(detail, width) {
657
+ if (!detail)
658
+ return [cardField("served data", "slice detail not loaded for this selection")];
659
+ const latest = new Map();
660
+ for (const event of detail.story.events)
661
+ if (event.actorSession)
662
+ latest.set(event.actorSession, event);
663
+ if (latest.size === 0)
664
+ return [cardField("actors", "none in the served slice event history")];
665
+ const limit = width < 70 ? 1 : 3;
666
+ const shown = [...latest.entries()].sort((a, b) => b[1].ts.localeCompare(a[1].ts)).slice(0, limit);
667
+ return [
668
+ ...shown.flatMap(([actor, event]) => [
669
+ ...wrappedCardField("actor", actor, width),
670
+ ...wrappedCardField("last change", `${clock(event.ts) || event.ts} · ${event.kind}${event.qitemId ? ` · ${event.qitemId}` : ""}`, width),
671
+ ]),
672
+ cardField("history", `${latest.size} served actor${latest.size === 1 ? "" : "s"} · latest ${shown.length} shown`),
673
+ ];
674
+ }
675
+ function rulingRows(detail, width) {
676
+ if (!detail)
677
+ return [cardField("served data", "slice detail not loaded for this selection")];
678
+ const latest = [...detail.decisions.rows].sort((a, b) => b.ts.localeCompare(a.ts))[0];
679
+ if (!latest)
680
+ return [cardField("decision", "none in the served slice decision history")];
681
+ return [
682
+ ...wrappedCardField("actor", `${latest.actor} · ${clock(latest.ts) || latest.ts} · ${latest.verb}`, width),
683
+ ...wrappedCardField("qitem", latest.qitemId, width),
684
+ ...wrappedCardField("decision", latest.reason ?? "no decision reason served", width),
685
+ cardField("history", `${detail.decisions.rows.length} served decision${detail.decisions.rows.length === 1 ? "" : "s"} · latest shown`),
686
+ ];
687
+ }
688
+ function sliceDetail(execution, slices, id, width, richDetail, scopeOpts = { collapseReqs: false, narrative: false }) {
689
+ const slice = slices.find((item) => item.id === id || item.dir === id);
690
+ if (!slice)
691
+ return null;
692
+ const detail = richDetail?.name === slice.dir ? richDetail : null;
693
+ const activity = record(slice.lane?.["activity"]);
694
+ const needs = problemText(slice);
695
+ const deps = Array.isArray(slice.sequencing?.["depends_on"]) ? slice.sequencing["depends_on"].map(String) : [];
696
+ const unlocks = slices.filter((candidate) => {
697
+ const candidateDeps = candidate.sequencing?.["depends_on"];
698
+ return Array.isArray(candidateDeps) && candidateDeps.map(String).includes(slice.id);
699
+ }).map((candidate) => candidate.id);
700
+ const ownership = [
701
+ cardField("seat", slice.lane ? str(slice.lane["seat"]) : "none — no claimed lane", slice.lane ? open(laneKey(slice.lane)) : undefined),
702
+ cardField("activity", slice.lane ? str(activity["activity"], INDETERMINATE) : "not assigned"),
703
+ cardField("decided by", slice.lane ? str(activity["decided_by"] ?? activity["basis"], "basis unavailable") : "—"),
704
+ cardField("changed", slice.lane ? str(activity["changed_at"], "—") : "—"),
705
+ ];
706
+ const evidence = [];
707
+ for (const rung of RUNGS) {
708
+ const cell = slice.cells[rung];
709
+ const value = rung === "built" ? (cell.state === "yes" ? shortSha(cell.value) : "undetermined") : cell.state;
710
+ evidence.push(cardField(RUNG_WORD[rung], `${value} · ${cell.basis}`));
711
+ }
712
+ const legs = record(slice.ladder["reviewed"])["legs"];
713
+ if (Array.isArray(legs))
714
+ for (const leg of legs) {
715
+ const l = record(leg);
716
+ evidence.push(cardField("review leg", `${str(l["verdict"], "?")} · ${str(l["artifact_type"], "?")} · ${str(l["path"])}`));
717
+ }
718
+ const typedRows = slice.lane ? [
719
+ cardField("qitem", str(slice.lane["qitem_id"]), open(laneKey(slice.lane))),
720
+ cardField("pickup", str(record(slice.lane["pickup"])["state"], str(slice.park?.["pickup_state"], INDETERMINATE))),
721
+ cardField("needs input", Number(record(activity["needs_input"])["count"] ?? 0) > 0 ? str(record(activity["needs_input"])["reason"], "input") : "none"),
722
+ cardField("repo join", `${str(slice.lane["worktree_path"], INDETERMINATE)} · ${str(slice.lane["branch"], INDETERMINATE)}`),
723
+ ] : [cardField("rows", "none — no typed queue row for this slice")];
724
+ if (slice.park)
725
+ typedRows.push(cardField("park", `${str(slice.park["pickup_state"], INDETERMINATE)} · wake ${str(slice.park["wake_target"], "none armed")}`));
726
+ const dependencies = [
727
+ cardField("wave", waveOf(slice)),
728
+ cardField("depends on", deps.join(", ") || "none"),
729
+ cardField("unlocks", unlocks.join(", ") || "none"),
730
+ cardField("next", nextText(slice) ?? "no next transition derived"),
731
+ cardField("blocked on", blockerText(slice.sequencing?.["blocked_on_rows"]) || "none"),
732
+ ];
733
+ const source = record(slice.sequencing?.["source"]);
734
+ const sourceRows = [
735
+ cardField("spec", str(source["spec_path"], "not named")),
736
+ cardField("arrangement", str(source["arrangement_path"], "not named")),
737
+ cardField("wave map", str(source["wave_map_row"], "not named")),
738
+ ];
739
+ const identity = slice.scope
740
+ ? scopeIdentityLines(slice.scope, execution.mission, width)
741
+ : [
742
+ { text: clip(`${slice.id} · ${slice.name} · ${stateMark(stateWord(slice))} ${stateWord(slice)} · wave ${waveOf(slice)}`, width) },
743
+ ];
744
+ const authored = slice.scope
745
+ ? scopeContractLines(slice.scope, { ...scopeOpts, width })
746
+ : [{ text: "" }, ...card("AUTHORED CONTRACT", [cardField("state", "scope detail not served")], width)];
747
+ return [
748
+ ...identity,
749
+ { text: "" }, ...card("OWNERSHIP", ownership, width),
750
+ { text: "" }, ...card("TOUCHED", touchedRows(detail, width), width),
751
+ { text: "" }, ...card(`EVIDENCE · declared ${declaredText(slice)} · ${evidenceText(slice.cells, slice.rank)}`, evidence, width),
752
+ { text: "" }, ...card("RULING", rulingRows(detail, width), width),
753
+ { text: "" }, ...card("NEEDS YOU", [cardField("state", needs ?? "none on current projection")], width),
754
+ { text: "" }, ...card("TYPED ROWS", typedRows, width),
755
+ { text: "" }, ...card("DEPENDENCIES", dependencies, width),
756
+ ...authored,
757
+ { text: "" }, ...card("SOURCES", sourceRows, width),
758
+ { text: "" }, back(),
759
+ ];
760
+ }
761
+ function laneDetail(execution, key) {
762
+ const lane = (execution.q1_lanes ?? []).find((item) => laneKey(item) === key);
763
+ const park = (execution.q5_park ?? []).find((item) => `lane:${str(item["qitem_id"])}` === key || `park:${str(item["qitem_id"])}` === key);
764
+ if (!lane && !park)
765
+ return null;
766
+ const activity = record(lane?.["activity"]);
767
+ const needs = record(activity["needs_input"]);
768
+ const sections = [];
769
+ if (lane) {
770
+ sections.push({
771
+ title: "lane",
772
+ fields: [
773
+ { label: "qitem", value: str(lane["qitem_id"]) },
774
+ { label: "slice", value: str(lane["slice"]), link: open(`slice:${str(lane["slice"])}`) },
775
+ { label: "seat", value: str(lane["seat"]) },
776
+ { label: "activity", value: str(activity["activity"], INDETERMINATE) },
777
+ { label: "decided by", value: str(activity["decided_by"] ?? activity["basis"], "basis unavailable") },
778
+ { label: "changed", value: str(activity["changed_at"], "—") },
779
+ { label: "needs input", value: Number(needs["count"] ?? 0) > 0 ? `${str(needs["count"])} · ${str(needs["reason"], "input")}` : "none" },
780
+ { label: "pickup", value: str(record(lane["pickup"])["state"], INDETERMINATE) },
781
+ { label: "oracle", value: str(activity["source"], "(not named)") },
782
+ ],
783
+ });
784
+ sections.push({
785
+ title: `repo join${lane["fragile_join"] === true ? " · FRAGILE" : ""}`,
786
+ fields: [
787
+ { label: "worktree", value: str(lane["worktree_path"], INDETERMINATE) },
788
+ { label: "branch", value: str(lane["branch"], INDETERMINATE) },
789
+ { label: "head", value: str(lane["head_sha"], INDETERMINATE) },
790
+ { label: "join basis", value: str(lane["join_basis"], "(not named)") },
791
+ ],
792
+ });
793
+ }
794
+ if (park) {
795
+ sections.push({
796
+ title: "pickup · park row",
797
+ fields: [
798
+ { label: "qitem", value: str(park["qitem_id"]) },
799
+ { label: "pickup", value: str(park["pickup_state"], INDETERMINATE) },
800
+ { label: "kind", value: str(park["park_kind"], "indeterminate") },
801
+ { label: "basis", value: str(park["park_kind_basis"], "(not named)") },
802
+ { label: "wake", value: str(park["wake_target"], "none armed") },
803
+ { label: "age", value: park["age_minutes"] != null ? `${String(park["age_minutes"])} min since claim` : "—" },
804
+ ...(park["pickup_evidence"] ? [{ label: "evidence", value: str(park["pickup_evidence"]) }] : []),
805
+ ],
806
+ });
807
+ }
808
+ const heading = lane ? `lane ${str(lane["slice"])} · ${str(lane["seat"])}` : `row ${str(park?.["qitem_id"])}`;
809
+ return [...detailPage({ text: heading }, sections), { text: "" }, back()];
810
+ }
811
+ function sourcesDetail(execution) {
812
+ const lines = [{ text: `sources behind ${execution.mission} · derived ${clock(execution.derived_at) || "?"}` }];
813
+ for (const [name, raw] of Object.entries(execution.sources ?? {})) {
814
+ const cell = record(raw);
815
+ lines.push({ text: "" });
816
+ lines.push(sectionRule(name));
817
+ for (const [field, value] of Object.entries(cell))
818
+ lines.push({ text: ` ${`${field}:`.padEnd(12)} ${str(value, "—")}` });
819
+ if (Object.keys(cell).length === 0)
820
+ lines.push({ text: ` ${str(raw, "—")}` });
821
+ }
822
+ lines.push({ text: "" });
823
+ lines.push(back());
824
+ return lines;
825
+ }
826
+ export function executionContentLines(execution, scopes, readErrors, opened, width = 96, pending = false, sliceDetailRead, scopeOpts = { collapseReqs: false, narrative: false }) {
827
+ if (!execution) {
828
+ const failure = readErrors.find((entry) => entry.startsWith("execution:"));
829
+ // three different truths, never one message: the read failed (named), the read has
830
+ // not answered yet (pending), or it answered with no execution row at all.
831
+ if (failure)
832
+ return [sectionRule("ATTENTION 1", width), { text: ` execution projection unavailable — ${failure}` }];
833
+ if (pending)
834
+ return [{ text: " execution projection: read pending — the first daemon read has not answered yet (honest-empty, not fabricated)" }];
835
+ return [sectionRule("ATTENTION 1", width), { text: " execution projection served no row — no active mission resolved on the daemon" }];
836
+ }
837
+ if (opened) {
838
+ const slices = sliceFacts(execution, scopes);
839
+ const page = opened === "sources"
840
+ ? sourcesDetail(execution)
841
+ : opened === "evidence"
842
+ ? evidenceDetail(execution, slices, width)
843
+ : opened.startsWith("group:wave:")
844
+ ? waveDetail(execution, scopes, width, opened)
845
+ : opened.startsWith("slice:")
846
+ ? sliceDetail(execution, slices, opened.slice("slice:".length), width, sliceDetailRead, scopeOpts)
847
+ : opened.startsWith("lane:") || opened.startsWith("park:")
848
+ ? laneDetail(execution, opened)
849
+ : null;
850
+ return page ?? [{ text: ` ${opened} is not in the current snapshot (it may have closed or been re-derived)` }, { text: "" }, back()];
851
+ }
852
+ return overviewLines(execution, scopes, width);
853
+ }
854
+ /** Compact source-grounded execution strip embedded in the existing rich SCOPES
855
+ * slice detail. Missing projection/slice data stays explicit instead of being inferred. */
856
+ export function executionSliceStripLines(execution, sliceId, sliceDir, width = 96, declared) {
857
+ if (!execution)
858
+ return [{ text: "" }, sectionRule("EXECUTION · not loaded", width), { text: " mission execution projection not loaded for this selection" }];
859
+ const slice = sliceFacts(execution, undefined).find((item) => item.id === sliceId || item.dir === sliceDir);
860
+ if (!slice)
861
+ return [{ text: "" }, sectionRule("EXECUTION · not in projection", width), { text: " slice absent from the mission execution projection" }];
862
+ const activity = record(slice.lane?.["activity"]);
863
+ const problem = problemText(slice);
864
+ const unconfirmed = RUNGS.filter((rung) => slice.cells[rung].state === "undetermined").map((rung) => RUNG_WORD[rung]);
865
+ const evidence = `${evidenceText(slice.cells, slice.rank)}${unconfirmed.length ? ` · ${unconfirmed.join(" / ")} unconfirmed (${slice.cells[RUNGS.find((rung) => slice.cells[rung].state === "undetermined")].basis})` : ""}`;
866
+ const liveWord = slice.lane ? str(activity["activity"], "claimed") : "no claimed lane";
867
+ const declaredWord = declared?.trim().toLowerCase() || "no declared status";
868
+ const next = declaredWord === "done" && !slice.lane
869
+ ? "none — declared done"
870
+ : nextText(slice) ?? (slice.lane ? "in progress on the lane above" : "nothing the projection can sequence");
871
+ return [
872
+ { text: "" },
873
+ sectionRule(`EXECUTION · ${problem ? stateWord(slice) : liveWord} · wave ${waveOf(slice)}`, width),
874
+ { text: ` declared ${declaredWord} (slice file)` },
875
+ actionRow(`evidence ${evidence}`, open("evidence"), width),
876
+ { text: ` assignment ${slice.lane ? `${str(slice.lane["seat"])} · ${str(activity["activity"], INDETERMINATE)} (${str(activity["decided_by"], "?")})` : "none — no claimed lane"}`, ...(slice.lane ? { action: open(laneKey(slice.lane)) } : {}) },
877
+ { text: ` next ${next}` },
878
+ { text: ` problem ${problem ?? "none on the projection's current surfaces"}` },
879
+ ];
880
+ }
881
+ //# sourceMappingURL=execution-model.js.map