@openrig/cli 0.7.24 → 0.7.26

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 (1037) hide show
  1. package/README.md +7 -7
  2. package/daemon/assets/claude-hook-bridge.cjs +151 -37
  3. package/daemon/assets/claude-hook-bridge.d.cts +9 -2
  4. package/daemon/assets/claude-permission-policies.cjs +22 -1
  5. package/daemon/assets/claude-permission-policies.d.cts +2 -0
  6. package/daemon/assets/claude-statusline-context.cjs +14 -0
  7. package/daemon/assets/claude-team-permissions.cjs +54 -6
  8. package/daemon/assets/guidance/openrig-context-entry.md +4 -5
  9. package/daemon/assets/guidance/openrig-start.md +3 -0
  10. package/daemon/assets/plugins/openrig/.claude-plugin/plugin.json +2 -2
  11. package/daemon/assets/plugins/openrig/.codex-plugin/plugin.json +1 -1
  12. package/daemon/assets/plugins/openrig/.cursor-plugin/plugin.json +1 -1
  13. package/daemon/assets/plugins/openrig/README.md +33 -18
  14. package/daemon/assets/plugins/openrig/hooks/scripts/claude-hook-bridge.cjs +151 -37
  15. package/daemon/assets/plugins/openrig/plugin.json +1 -1
  16. package/daemon/assets/plugins/openrig/scripts/run-rig.cjs +16 -13
  17. package/daemon/assets/plugins/openrig/skills/working-with-an-openrig-team/SKILL.md +32 -19
  18. package/daemon/assets/plugins/openrig-codex/.codex-plugin/plugin.json +1 -1
  19. package/daemon/assets/plugins/openrig-codex/hooks/scripts/claude-hook-bridge.cjs +151 -37
  20. package/daemon/assets/plugins/openrig-codex/skills/working-with-an-openrig-team/SKILL.md +32 -19
  21. package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
  22. package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
  23. package/daemon/assets/plugins/openrig-core/hooks/scripts/permission-answer.cjs +3 -2
  24. package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +47 -14
  25. package/daemon/assets/plugins/openrig-core/skills/session-compaction-and-restore/SKILL.md +5 -2
  26. package/daemon/assets/skills/rigs/SKILL.md +99 -34
  27. package/daemon/assets/skills/rigs/references/installing-for-someone.md +1 -1
  28. package/daemon/context-packs/help/help.md +9 -0
  29. package/daemon/context-packs/help/manifest.yaml +1 -1
  30. package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
  31. package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +179 -25
  32. package/daemon/context-packs/reference/getting-started.md +73 -11
  33. package/daemon/context-packs/reference/manifest.yaml +1 -1
  34. package/daemon/context-packs/reference/rig-spec.md +218 -23
  35. package/daemon/context-packs/reference/whats-new.md +190 -14
  36. package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
  37. package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
  38. package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
  39. package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
  40. package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
  41. package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
  42. package/daemon/context-packs/skills/core/cross-host-rig-commands/SKILL.md +9 -1
  43. package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
  44. package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
  45. package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
  46. package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
  47. package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
  48. package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
  49. package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
  50. package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
  51. package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
  52. package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
  53. package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
  54. package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
  55. package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
  56. package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
  57. package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
  58. package/daemon/context-packs/skills/core/working-with-an-openrig-team/SKILL.md +32 -19
  59. package/daemon/context-packs/skills/core/working-with-an-openrig-team/manifest.yaml +1 -1
  60. package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
  61. package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
  62. package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
  63. package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
  64. package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
  65. package/daemon/context-packs/skills/openrig-user/SKILL.md +47 -14
  66. package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
  67. package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
  68. package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
  69. package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
  70. package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
  71. package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
  72. package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
  73. package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
  74. package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
  75. package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
  76. package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
  77. package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
  78. package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
  79. package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
  80. package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
  81. package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
  82. package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
  83. package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
  84. package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
  85. package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
  86. package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
  87. package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
  88. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
  89. package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
  90. package/daemon/context-packs/skills/session-compaction-and-restore/SKILL.md +5 -2
  91. package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
  92. package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
  93. package/daemon/context-packs/world-example/manifest.yaml +1 -1
  94. package/daemon/context-packs/world-public/manifest.yaml +1 -1
  95. package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
  96. package/daemon/dist/adapters/claude-code-adapter.js +25 -8
  97. package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
  98. package/daemon/dist/adapters/claude-resume.d.ts +2 -0
  99. package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
  100. package/daemon/dist/adapters/claude-resume.js +44 -8
  101. package/daemon/dist/adapters/claude-resume.js.map +1 -1
  102. package/daemon/dist/adapters/codex-resume.d.ts +3 -0
  103. package/daemon/dist/adapters/codex-resume.d.ts.map +1 -1
  104. package/daemon/dist/adapters/codex-resume.js +7 -3
  105. package/daemon/dist/adapters/codex-resume.js.map +1 -1
  106. package/daemon/dist/adapters/codex-runtime-adapter.d.ts +49 -4
  107. package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
  108. package/daemon/dist/adapters/codex-runtime-adapter.js +238 -25
  109. package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  110. package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts +12 -5
  111. package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts.map +1 -1
  112. package/daemon/dist/adapters/community-harness-runtime-adapter.js +15 -5
  113. package/daemon/dist/adapters/community-harness-runtime-adapter.js.map +1 -1
  114. package/daemon/dist/adapters/kernel-authority.d.ts +2 -2
  115. package/daemon/dist/adapters/kernel-authority.d.ts.map +1 -1
  116. package/daemon/dist/adapters/kernel-authority.js +5 -3
  117. package/daemon/dist/adapters/kernel-authority.js.map +1 -1
  118. package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
  119. package/daemon/dist/adapters/pi-runner.js +9 -0
  120. package/daemon/dist/adapters/pi-runner.js.map +1 -1
  121. package/daemon/dist/adapters/pi-session-cwd.d.ts +26 -0
  122. package/daemon/dist/adapters/pi-session-cwd.d.ts.map +1 -0
  123. package/daemon/dist/adapters/pi-session-cwd.js +89 -0
  124. package/daemon/dist/adapters/pi-session-cwd.js.map +1 -0
  125. package/daemon/dist/adapters/shell-quote.d.ts +2 -0
  126. package/daemon/dist/adapters/shell-quote.d.ts.map +1 -1
  127. package/daemon/dist/adapters/shell-quote.js +43 -0
  128. package/daemon/dist/adapters/shell-quote.js.map +1 -1
  129. package/daemon/dist/adapters/tmux-credential-env.d.ts +15 -2
  130. package/daemon/dist/adapters/tmux-credential-env.d.ts.map +1 -1
  131. package/daemon/dist/adapters/tmux-credential-env.js +82 -2
  132. package/daemon/dist/adapters/tmux-credential-env.js.map +1 -1
  133. package/daemon/dist/adapters/tmux-exec.d.ts.map +1 -1
  134. package/daemon/dist/adapters/tmux-exec.js +2 -6
  135. package/daemon/dist/adapters/tmux-exec.js.map +1 -1
  136. package/daemon/dist/adapters/tmux.d.ts +31 -1
  137. package/daemon/dist/adapters/tmux.d.ts.map +1 -1
  138. package/daemon/dist/adapters/tmux.js +104 -8
  139. package/daemon/dist/adapters/tmux.js.map +1 -1
  140. package/daemon/dist/attention-surface.d.ts +5 -0
  141. package/daemon/dist/attention-surface.d.ts.map +1 -1
  142. package/daemon/dist/attention-surface.js.map +1 -1
  143. package/daemon/dist/bind-plan-surface.d.ts +3 -0
  144. package/daemon/dist/bind-plan-surface.d.ts.map +1 -0
  145. package/daemon/dist/bind-plan-surface.js +5 -0
  146. package/daemon/dist/bind-plan-surface.js.map +1 -0
  147. package/daemon/dist/build-info.js +3 -3
  148. package/daemon/dist/db/all-migrations.d.ts +4 -1
  149. package/daemon/dist/db/all-migrations.d.ts.map +1 -1
  150. package/daemon/dist/db/all-migrations.js +30 -393
  151. package/daemon/dist/db/all-migrations.js.map +1 -1
  152. package/daemon/dist/db/migrations/187_provider_account_refs.d.ts +8 -0
  153. package/daemon/dist/db/migrations/187_provider_account_refs.d.ts.map +1 -0
  154. package/daemon/dist/db/migrations/187_provider_account_refs.js +25 -0
  155. package/daemon/dist/db/migrations/187_provider_account_refs.js.map +1 -0
  156. package/daemon/dist/db/migrations/188_provider_account_assignments.d.ts +14 -0
  157. package/daemon/dist/db/migrations/188_provider_account_assignments.d.ts.map +1 -0
  158. package/daemon/dist/db/migrations/188_provider_account_assignments.js +45 -0
  159. package/daemon/dist/db/migrations/188_provider_account_assignments.js.map +1 -0
  160. package/daemon/dist/db/migrations/191_queue_transfer_activation.d.ts +3 -0
  161. package/daemon/dist/db/migrations/191_queue_transfer_activation.d.ts.map +1 -0
  162. package/daemon/dist/db/migrations/191_queue_transfer_activation.js +49 -0
  163. package/daemon/dist/db/migrations/191_queue_transfer_activation.js.map +1 -0
  164. package/daemon/dist/db/migrations/191_seat_reap_state.d.ts +3 -0
  165. package/daemon/dist/db/migrations/191_seat_reap_state.d.ts.map +1 -0
  166. package/daemon/dist/db/migrations/191_seat_reap_state.js +19 -0
  167. package/daemon/dist/db/migrations/191_seat_reap_state.js.map +1 -0
  168. package/daemon/dist/db/migrations/197_session_agent_activity_hooks.d.ts +3 -0
  169. package/daemon/dist/db/migrations/197_session_agent_activity_hooks.d.ts.map +1 -0
  170. package/daemon/dist/db/migrations/197_session_agent_activity_hooks.js +9 -0
  171. package/daemon/dist/db/migrations/197_session_agent_activity_hooks.js.map +1 -0
  172. package/daemon/dist/db/migrations/200_context_configured_budget.d.ts +3 -0
  173. package/daemon/dist/db/migrations/200_context_configured_budget.d.ts.map +1 -0
  174. package/daemon/dist/db/migrations/200_context_configured_budget.js +5 -0
  175. package/daemon/dist/db/migrations/200_context_configured_budget.js.map +1 -0
  176. package/daemon/dist/db/migrations/200_seat_cold_start_standby_stop.d.ts +3 -0
  177. package/daemon/dist/db/migrations/200_seat_cold_start_standby_stop.d.ts.map +1 -0
  178. package/daemon/dist/db/migrations/200_seat_cold_start_standby_stop.js +5 -0
  179. package/daemon/dist/db/migrations/200_seat_cold_start_standby_stop.js.map +1 -0
  180. package/daemon/dist/db/migrations/200_sessions_earlier_handover_origin.d.ts +11 -0
  181. package/daemon/dist/db/migrations/200_sessions_earlier_handover_origin.d.ts.map +1 -0
  182. package/daemon/dist/db/migrations/200_sessions_earlier_handover_origin.js +34 -0
  183. package/daemon/dist/db/migrations/200_sessions_earlier_handover_origin.js.map +1 -0
  184. package/daemon/dist/db/migrations/201_queue_transitions_archive_actor_index.d.ts +7 -0
  185. package/daemon/dist/db/migrations/201_queue_transitions_archive_actor_index.d.ts.map +1 -0
  186. package/daemon/dist/db/migrations/201_queue_transitions_archive_actor_index.js +12 -0
  187. package/daemon/dist/db/migrations/201_queue_transitions_archive_actor_index.js.map +1 -0
  188. package/daemon/dist/db/migrations/201_roster_event_index.d.ts +4 -0
  189. package/daemon/dist/db/migrations/201_roster_event_index.d.ts.map +1 -0
  190. package/daemon/dist/db/migrations/201_roster_event_index.js +9 -0
  191. package/daemon/dist/db/migrations/201_roster_event_index.js.map +1 -0
  192. package/daemon/dist/db/migrations/202_network_requester_questions.d.ts +4 -0
  193. package/daemon/dist/db/migrations/202_network_requester_questions.d.ts.map +1 -0
  194. package/daemon/dist/db/migrations/202_network_requester_questions.js +10 -0
  195. package/daemon/dist/db/migrations/202_network_requester_questions.js.map +1 -0
  196. package/daemon/dist/db/migrations/203_outbox_runner_receipts_index.d.ts +3 -0
  197. package/daemon/dist/db/migrations/203_outbox_runner_receipts_index.d.ts.map +1 -0
  198. package/daemon/dist/db/migrations/203_outbox_runner_receipts_index.js +22 -0
  199. package/daemon/dist/db/migrations/203_outbox_runner_receipts_index.js.map +1 -0
  200. package/daemon/dist/domain/activity-taxonomy.d.ts +16 -5
  201. package/daemon/dist/domain/activity-taxonomy.d.ts.map +1 -1
  202. package/daemon/dist/domain/activity-taxonomy.js +30 -5
  203. package/daemon/dist/domain/activity-taxonomy.js.map +1 -1
  204. package/daemon/dist/domain/agent-activity-store.d.ts +4 -0
  205. package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
  206. package/daemon/dist/domain/agent-activity-store.js +21 -0
  207. package/daemon/dist/domain/agent-activity-store.js.map +1 -1
  208. package/daemon/dist/domain/agent-images/agent-image-destination.d.ts +15 -0
  209. package/daemon/dist/domain/agent-images/agent-image-destination.d.ts.map +1 -0
  210. package/daemon/dist/domain/agent-images/agent-image-destination.js +79 -0
  211. package/daemon/dist/domain/agent-images/agent-image-destination.js.map +1 -0
  212. package/daemon/dist/domain/agent-images/agent-image-library-service.d.ts.map +1 -1
  213. package/daemon/dist/domain/agent-images/agent-image-library-service.js +9 -1
  214. package/daemon/dist/domain/agent-images/agent-image-library-service.js.map +1 -1
  215. package/daemon/dist/domain/bootstrap-orchestrator.d.ts +4 -3
  216. package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
  217. package/daemon/dist/domain/bootstrap-orchestrator.js +55 -11
  218. package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
  219. package/daemon/dist/domain/bundle-content-routing.d.ts +7 -0
  220. package/daemon/dist/domain/bundle-content-routing.d.ts.map +1 -1
  221. package/daemon/dist/domain/bundle-content-routing.js +20 -15
  222. package/daemon/dist/domain/bundle-content-routing.js.map +1 -1
  223. package/daemon/dist/domain/claude-compaction-enforcer.d.ts +40 -1
  224. package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
  225. package/daemon/dist/domain/claude-compaction-enforcer.js +101 -11
  226. package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
  227. package/daemon/dist/domain/claude-continuation-launch.d.ts +19 -2
  228. package/daemon/dist/domain/claude-continuation-launch.d.ts.map +1 -1
  229. package/daemon/dist/domain/claude-continuation-launch.js +143 -3
  230. package/daemon/dist/domain/claude-continuation-launch.js.map +1 -1
  231. package/daemon/dist/domain/claude-managed-launch.d.ts +22 -5
  232. package/daemon/dist/domain/claude-managed-launch.d.ts.map +1 -1
  233. package/daemon/dist/domain/claude-managed-launch.js +41 -5
  234. package/daemon/dist/domain/claude-managed-launch.js.map +1 -1
  235. package/daemon/dist/domain/claude-permission-rules.d.ts +3 -1
  236. package/daemon/dist/domain/claude-permission-rules.d.ts.map +1 -1
  237. package/daemon/dist/domain/claude-permission-rules.js +8 -7
  238. package/daemon/dist/domain/claude-permission-rules.js.map +1 -1
  239. package/daemon/dist/domain/claude-seat-token.d.ts +25 -1
  240. package/daemon/dist/domain/claude-seat-token.d.ts.map +1 -1
  241. package/daemon/dist/domain/claude-seat-token.js +56 -9
  242. package/daemon/dist/domain/claude-seat-token.js.map +1 -1
  243. package/daemon/dist/domain/codex-auth.d.ts +34 -0
  244. package/daemon/dist/domain/codex-auth.d.ts.map +1 -1
  245. package/daemon/dist/domain/codex-auth.js +212 -0
  246. package/daemon/dist/domain/codex-auth.js.map +1 -1
  247. package/daemon/dist/domain/codex-member-permissions.d.ts +17 -0
  248. package/daemon/dist/domain/codex-member-permissions.d.ts.map +1 -1
  249. package/daemon/dist/domain/codex-member-permissions.js +80 -0
  250. package/daemon/dist/domain/codex-member-permissions.js.map +1 -1
  251. package/daemon/dist/domain/community-harness-launch-result.d.ts +9 -0
  252. package/daemon/dist/domain/community-harness-launch-result.d.ts.map +1 -1
  253. package/daemon/dist/domain/community-harness-launch-result.js +14 -2
  254. package/daemon/dist/domain/community-harness-launch-result.js.map +1 -1
  255. package/daemon/dist/domain/community-harness-presets.d.ts +15 -0
  256. package/daemon/dist/domain/community-harness-presets.d.ts.map +1 -1
  257. package/daemon/dist/domain/community-harness-presets.js +82 -48
  258. package/daemon/dist/domain/community-harness-presets.js.map +1 -1
  259. package/daemon/dist/domain/compaction-restore-notice.d.ts +33 -5
  260. package/daemon/dist/domain/compaction-restore-notice.d.ts.map +1 -1
  261. package/daemon/dist/domain/compaction-restore-notice.js +221 -48
  262. package/daemon/dist/domain/compaction-restore-notice.js.map +1 -1
  263. package/daemon/dist/domain/context-usage-store.d.ts +1 -0
  264. package/daemon/dist/domain/context-usage-store.d.ts.map +1 -1
  265. package/daemon/dist/domain/context-usage-store.js +34 -3
  266. package/daemon/dist/domain/context-usage-store.js.map +1 -1
  267. package/daemon/dist/domain/crash-cart-detect.d.ts +7 -0
  268. package/daemon/dist/domain/crash-cart-detect.d.ts.map +1 -1
  269. package/daemon/dist/domain/crash-cart-detect.js +10 -5
  270. package/daemon/dist/domain/crash-cart-detect.js.map +1 -1
  271. package/daemon/dist/domain/crash-cart-discovery.d.ts +9 -16
  272. package/daemon/dist/domain/crash-cart-discovery.d.ts.map +1 -1
  273. package/daemon/dist/domain/crash-cart-discovery.js +22 -40
  274. package/daemon/dist/domain/crash-cart-discovery.js.map +1 -1
  275. package/daemon/dist/domain/crash-cart-emit.d.ts +1 -1
  276. package/daemon/dist/domain/crash-cart-emit.d.ts.map +1 -1
  277. package/daemon/dist/domain/crash-cart-emit.js +4 -0
  278. package/daemon/dist/domain/crash-cart-emit.js.map +1 -1
  279. package/daemon/dist/domain/current-park-arm.d.ts +2 -0
  280. package/daemon/dist/domain/current-park-arm.d.ts.map +1 -1
  281. package/daemon/dist/domain/current-park-arm.js +5 -0
  282. package/daemon/dist/domain/current-park-arm.js.map +1 -1
  283. package/daemon/dist/domain/current-work.d.ts +16 -4
  284. package/daemon/dist/domain/current-work.d.ts.map +1 -1
  285. package/daemon/dist/domain/current-work.js +3 -6
  286. package/daemon/dist/domain/current-work.js.map +1 -1
  287. package/daemon/dist/domain/cwd-resolution.d.ts +12 -1
  288. package/daemon/dist/domain/cwd-resolution.d.ts.map +1 -1
  289. package/daemon/dist/domain/cwd-resolution.js +39 -2
  290. package/daemon/dist/domain/cwd-resolution.js.map +1 -1
  291. package/daemon/dist/domain/draft-aware-delivery.d.ts +17 -2
  292. package/daemon/dist/domain/draft-aware-delivery.d.ts.map +1 -1
  293. package/daemon/dist/domain/draft-aware-delivery.js +98 -9
  294. package/daemon/dist/domain/draft-aware-delivery.js.map +1 -1
  295. package/daemon/dist/domain/draft-held-reoffer.d.ts +61 -0
  296. package/daemon/dist/domain/draft-held-reoffer.d.ts.map +1 -0
  297. package/daemon/dist/domain/draft-held-reoffer.js +143 -0
  298. package/daemon/dist/domain/draft-held-reoffer.js.map +1 -0
  299. package/daemon/dist/domain/execution-view.d.ts +20 -0
  300. package/daemon/dist/domain/execution-view.d.ts.map +1 -1
  301. package/daemon/dist/domain/execution-view.js +50 -16
  302. package/daemon/dist/domain/execution-view.js.map +1 -1
  303. package/daemon/dist/domain/gateway/destination-resolver.d.ts +10 -2
  304. package/daemon/dist/domain/gateway/destination-resolver.d.ts.map +1 -1
  305. package/daemon/dist/domain/gateway/destination-resolver.js +26 -3
  306. package/daemon/dist/domain/gateway/destination-resolver.js.map +1 -1
  307. package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
  308. package/daemon/dist/domain/gateway/slack/inbound.js +5 -4
  309. package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
  310. package/daemon/dist/domain/gateway/slack/queue-access.js +1 -1
  311. package/daemon/dist/domain/gateway/slack/queue-access.js.map +1 -1
  312. package/daemon/dist/domain/generated-file-hygiene.d.ts.map +1 -1
  313. package/daemon/dist/domain/generated-file-hygiene.js +35 -2
  314. package/daemon/dist/domain/generated-file-hygiene.js.map +1 -1
  315. package/daemon/dist/domain/graph-projection.d.ts +7 -1
  316. package/daemon/dist/domain/graph-projection.d.ts.map +1 -1
  317. package/daemon/dist/domain/graph-projection.js +2 -0
  318. package/daemon/dist/domain/graph-projection.js.map +1 -1
  319. package/daemon/dist/domain/health-context-samples.d.ts +23 -0
  320. package/daemon/dist/domain/health-context-samples.d.ts.map +1 -0
  321. package/daemon/dist/domain/health-context-samples.js +113 -0
  322. package/daemon/dist/domain/health-context-samples.js.map +1 -0
  323. package/daemon/dist/domain/health-detectors.d.ts +3 -0
  324. package/daemon/dist/domain/health-detectors.d.ts.map +1 -1
  325. package/daemon/dist/domain/health-detectors.js +8 -7
  326. package/daemon/dist/domain/health-detectors.js.map +1 -1
  327. package/daemon/dist/domain/home-isolation.d.ts.map +1 -1
  328. package/daemon/dist/domain/home-isolation.js +21 -8
  329. package/daemon/dist/domain/home-isolation.js.map +1 -1
  330. package/daemon/dist/domain/hook-bridge.d.ts +7 -5
  331. package/daemon/dist/domain/hook-bridge.d.ts.map +1 -1
  332. package/daemon/dist/domain/hook-bridge.js +12 -11
  333. package/daemon/dist/domain/hook-bridge.js.map +1 -1
  334. package/daemon/dist/domain/kernel-boot-tracker.d.ts +7 -5
  335. package/daemon/dist/domain/kernel-boot-tracker.d.ts.map +1 -1
  336. package/daemon/dist/domain/kernel-boot-tracker.js +11 -6
  337. package/daemon/dist/domain/kernel-boot-tracker.js.map +1 -1
  338. package/daemon/dist/domain/kernel-boot.d.ts.map +1 -1
  339. package/daemon/dist/domain/kernel-boot.js +6 -2
  340. package/daemon/dist/domain/kernel-boot.js.map +1 -1
  341. package/daemon/dist/domain/kernel-hook-review.d.ts +10 -2
  342. package/daemon/dist/domain/kernel-hook-review.d.ts.map +1 -1
  343. package/daemon/dist/domain/kernel-hook-review.js +18 -4
  344. package/daemon/dist/domain/kernel-hook-review.js.map +1 -1
  345. package/daemon/dist/domain/managed-restore-read-access.d.ts +6 -2
  346. package/daemon/dist/domain/managed-restore-read-access.d.ts.map +1 -1
  347. package/daemon/dist/domain/managed-restore-read-access.js +35 -4
  348. package/daemon/dist/domain/managed-restore-read-access.js.map +1 -1
  349. package/daemon/dist/domain/mission-control/audit-browse.d.ts.map +1 -1
  350. package/daemon/dist/domain/mission-control/audit-browse.js +1 -0
  351. package/daemon/dist/domain/mission-control/audit-browse.js.map +1 -1
  352. package/daemon/dist/domain/mission-control/mission-control-action-log.d.ts +3 -1
  353. package/daemon/dist/domain/mission-control/mission-control-action-log.d.ts.map +1 -1
  354. package/daemon/dist/domain/mission-control/mission-control-action-log.js +7 -0
  355. package/daemon/dist/domain/mission-control/mission-control-action-log.js.map +1 -1
  356. package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts +3 -0
  357. package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
  358. package/daemon/dist/domain/mission-control/mission-control-write-contract.js +56 -13
  359. package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
  360. package/daemon/dist/domain/mission-control/notification-adapter-from-env.d.ts +8 -0
  361. package/daemon/dist/domain/mission-control/notification-adapter-from-env.d.ts.map +1 -0
  362. package/daemon/dist/domain/mission-control/notification-adapter-from-env.js +17 -0
  363. package/daemon/dist/domain/mission-control/notification-adapter-from-env.js.map +1 -0
  364. package/daemon/dist/domain/model-divergence/codex-thread-homes.d.ts +12 -0
  365. package/daemon/dist/domain/model-divergence/codex-thread-homes.d.ts.map +1 -0
  366. package/daemon/dist/domain/model-divergence/codex-thread-homes.js +19 -0
  367. package/daemon/dist/domain/model-divergence/codex-thread-homes.js.map +1 -0
  368. package/daemon/dist/domain/native-process-arguments.d.ts +6 -3
  369. package/daemon/dist/domain/native-process-arguments.d.ts.map +1 -1
  370. package/daemon/dist/domain/native-process-arguments.js +56 -23
  371. package/daemon/dist/domain/native-process-arguments.js.map +1 -1
  372. package/daemon/dist/domain/native-resume-probe.d.ts +9 -0
  373. package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
  374. package/daemon/dist/domain/native-resume-probe.js +15 -1
  375. package/daemon/dist/domain/native-resume-probe.js.map +1 -1
  376. package/daemon/dist/domain/network/hub-client.d.ts +14 -4
  377. package/daemon/dist/domain/network/hub-client.d.ts.map +1 -1
  378. package/daemon/dist/domain/network/hub-client.js +26 -9
  379. package/daemon/dist/domain/network/hub-client.js.map +1 -1
  380. package/daemon/dist/domain/network/network-connector.d.ts +2 -0
  381. package/daemon/dist/domain/network/network-connector.d.ts.map +1 -1
  382. package/daemon/dist/domain/network/network-connector.js +162 -16
  383. package/daemon/dist/domain/network/network-connector.js.map +1 -1
  384. package/daemon/dist/domain/network/network-requests.d.ts +4 -1
  385. package/daemon/dist/domain/network/network-requests.d.ts.map +1 -1
  386. package/daemon/dist/domain/network/network-requests.js +141 -14
  387. package/daemon/dist/domain/network/network-requests.js.map +1 -1
  388. package/daemon/dist/domain/node-inventory.d.ts +47 -0
  389. package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
  390. package/daemon/dist/domain/node-inventory.js +270 -158
  391. package/daemon/dist/domain/node-inventory.js.map +1 -1
  392. package/daemon/dist/domain/node-launcher.d.ts +1 -0
  393. package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
  394. package/daemon/dist/domain/node-launcher.js +13 -5
  395. package/daemon/dist/domain/node-launcher.js.map +1 -1
  396. package/daemon/dist/domain/outbox-handler.d.ts +66 -0
  397. package/daemon/dist/domain/outbox-handler.d.ts.map +1 -1
  398. package/daemon/dist/domain/outbox-handler.js +117 -8
  399. package/daemon/dist/domain/outbox-handler.js.map +1 -1
  400. package/daemon/dist/domain/pane-cutover.d.ts +6 -2
  401. package/daemon/dist/domain/pane-cutover.d.ts.map +1 -1
  402. package/daemon/dist/domain/pane-cutover.js +14 -4
  403. package/daemon/dist/domain/pane-cutover.js.map +1 -1
  404. package/daemon/dist/domain/parked-owner-escalation.d.ts +1 -0
  405. package/daemon/dist/domain/parked-owner-escalation.d.ts.map +1 -1
  406. package/daemon/dist/domain/parked-owner-escalation.js +3 -1
  407. package/daemon/dist/domain/parked-owner-escalation.js.map +1 -1
  408. package/daemon/dist/domain/parked-query.js +1 -1
  409. package/daemon/dist/domain/parked-query.js.map +1 -1
  410. package/daemon/dist/domain/permission-account.d.ts.map +1 -1
  411. package/daemon/dist/domain/permission-account.js +20 -1
  412. package/daemon/dist/domain/permission-account.js.map +1 -1
  413. package/daemon/dist/domain/policies/idle-gate-qitem.d.ts +1 -0
  414. package/daemon/dist/domain/policies/idle-gate-qitem.d.ts.map +1 -1
  415. package/daemon/dist/domain/policies/idle-gate-qitem.js +1 -0
  416. package/daemon/dist/domain/policies/idle-gate-qitem.js.map +1 -1
  417. package/daemon/dist/domain/policies/parked-owner-consumer.d.ts +21 -0
  418. package/daemon/dist/domain/policies/parked-owner-consumer.d.ts.map +1 -1
  419. package/daemon/dist/domain/policies/parked-owner-consumer.js +185 -26
  420. package/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -1
  421. package/daemon/dist/domain/policies/seat-pool.d.ts +2 -1
  422. package/daemon/dist/domain/policies/seat-pool.d.ts.map +1 -1
  423. package/daemon/dist/domain/policies/seat-pool.js.map +1 -1
  424. package/daemon/dist/domain/policies/workflow-keepalive.d.ts +1 -0
  425. package/daemon/dist/domain/policies/workflow-keepalive.d.ts.map +1 -1
  426. package/daemon/dist/domain/policies/workflow-keepalive.js +4 -1
  427. package/daemon/dist/domain/policies/workflow-keepalive.js.map +1 -1
  428. package/daemon/dist/domain/profile-resolver.d.ts +2 -0
  429. package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
  430. package/daemon/dist/domain/profile-resolver.js +10 -4
  431. package/daemon/dist/domain/profile-resolver.js.map +1 -1
  432. package/daemon/dist/domain/project-lifecycle-compiler.d.ts.map +1 -1
  433. package/daemon/dist/domain/project-lifecycle-compiler.js +35 -1
  434. package/daemon/dist/domain/project-lifecycle-compiler.js.map +1 -1
  435. package/daemon/dist/domain/proof/judgments.d.ts +7 -0
  436. package/daemon/dist/domain/proof/judgments.d.ts.map +1 -1
  437. package/daemon/dist/domain/proof/judgments.js +18 -10
  438. package/daemon/dist/domain/proof/judgments.js.map +1 -1
  439. package/daemon/dist/domain/provider/assignment-apply.d.ts +85 -0
  440. package/daemon/dist/domain/provider/assignment-apply.d.ts.map +1 -0
  441. package/daemon/dist/domain/provider/assignment-apply.js +270 -0
  442. package/daemon/dist/domain/provider/assignment-apply.js.map +1 -0
  443. package/daemon/dist/domain/provider/assignment-plan.d.ts +150 -0
  444. package/daemon/dist/domain/provider/assignment-plan.d.ts.map +1 -0
  445. package/daemon/dist/domain/provider/assignment-plan.js +218 -0
  446. package/daemon/dist/domain/provider/assignment-plan.js.map +1 -0
  447. package/daemon/dist/domain/provider/claude-seat-switch.d.ts +1 -1
  448. package/daemon/dist/domain/provider/claude-seat-switch.d.ts.map +1 -1
  449. package/daemon/dist/domain/provider/claude-seat-switch.js +37 -6
  450. package/daemon/dist/domain/provider/claude-seat-switch.js.map +1 -1
  451. package/daemon/dist/domain/provider/provider-account-assignments.d.ts +64 -0
  452. package/daemon/dist/domain/provider/provider-account-assignments.d.ts.map +1 -0
  453. package/daemon/dist/domain/provider/provider-account-assignments.js +75 -0
  454. package/daemon/dist/domain/provider/provider-account-assignments.js.map +1 -0
  455. package/daemon/dist/domain/provider/provider-account-refs.d.ts +91 -0
  456. package/daemon/dist/domain/provider/provider-account-refs.d.ts.map +1 -0
  457. package/daemon/dist/domain/provider/provider-account-refs.js +164 -0
  458. package/daemon/dist/domain/provider/provider-account-refs.js.map +1 -0
  459. package/daemon/dist/domain/provider/provider-collect.d.ts +3 -1
  460. package/daemon/dist/domain/provider/provider-collect.d.ts.map +1 -1
  461. package/daemon/dist/domain/provider/provider-collect.js +2 -0
  462. package/daemon/dist/domain/provider/provider-collect.js.map +1 -1
  463. package/daemon/dist/domain/provider/provider-service-impl.d.ts +43 -1
  464. package/daemon/dist/domain/provider/provider-service-impl.d.ts.map +1 -1
  465. package/daemon/dist/domain/provider/provider-service-impl.js +376 -20
  466. package/daemon/dist/domain/provider/provider-service-impl.js.map +1 -1
  467. package/daemon/dist/domain/provider/provider-service.d.ts +82 -6
  468. package/daemon/dist/domain/provider/provider-service.d.ts.map +1 -1
  469. package/daemon/dist/domain/provider/provider-types.d.ts +40 -1
  470. package/daemon/dist/domain/provider/provider-types.d.ts.map +1 -1
  471. package/daemon/dist/domain/provider/usage-across-hosts.d.ts.map +1 -1
  472. package/daemon/dist/domain/provider/usage-across-hosts.js +13 -1
  473. package/daemon/dist/domain/provider/usage-across-hosts.js.map +1 -1
  474. package/daemon/dist/domain/ps-projection.d.ts +5 -3
  475. package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
  476. package/daemon/dist/domain/ps-projection.js +10 -3
  477. package/daemon/dist/domain/ps-projection.js.map +1 -1
  478. package/daemon/dist/domain/queue-display.d.ts +7 -0
  479. package/daemon/dist/domain/queue-display.d.ts.map +1 -0
  480. package/daemon/dist/domain/queue-display.js +20 -0
  481. package/daemon/dist/domain/queue-display.js.map +1 -0
  482. package/daemon/dist/domain/queue-owner.d.ts +4 -2
  483. package/daemon/dist/domain/queue-owner.d.ts.map +1 -1
  484. package/daemon/dist/domain/queue-owner.js +7 -5
  485. package/daemon/dist/domain/queue-owner.js.map +1 -1
  486. package/daemon/dist/domain/queue-repository.d.ts +104 -24
  487. package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  488. package/daemon/dist/domain/queue-repository.js +600 -89
  489. package/daemon/dist/domain/queue-repository.js.map +1 -1
  490. package/daemon/dist/domain/queue-stuck-sweep.d.ts +4 -0
  491. package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
  492. package/daemon/dist/domain/queue-stuck-sweep.js +1890 -1817
  493. package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
  494. package/daemon/dist/domain/queue-transfer-activation.d.ts +28 -0
  495. package/daemon/dist/domain/queue-transfer-activation.d.ts.map +1 -0
  496. package/daemon/dist/domain/queue-transfer-activation.js +187 -0
  497. package/daemon/dist/domain/queue-transfer-activation.js.map +1 -0
  498. package/daemon/dist/domain/queue-transfer-mapping.d.ts +31 -0
  499. package/daemon/dist/domain/queue-transfer-mapping.d.ts.map +1 -0
  500. package/daemon/dist/domain/queue-transfer-mapping.js +33 -0
  501. package/daemon/dist/domain/queue-transfer-mapping.js.map +1 -0
  502. package/daemon/dist/domain/queue-transfer-operation.d.ts +24 -0
  503. package/daemon/dist/domain/queue-transfer-operation.d.ts.map +1 -0
  504. package/daemon/dist/domain/queue-transfer-operation.js +41 -0
  505. package/daemon/dist/domain/queue-transfer-operation.js.map +1 -0
  506. package/daemon/dist/domain/queue-transfer-parse.d.ts +8 -0
  507. package/daemon/dist/domain/queue-transfer-parse.d.ts.map +1 -1
  508. package/daemon/dist/domain/queue-transfer-parse.js +16 -6
  509. package/daemon/dist/domain/queue-transfer-parse.js.map +1 -1
  510. package/daemon/dist/domain/queue-transfer-records.d.ts +160 -0
  511. package/daemon/dist/domain/queue-transfer-records.d.ts.map +1 -0
  512. package/daemon/dist/domain/queue-transfer-records.js +94 -0
  513. package/daemon/dist/domain/queue-transfer-records.js.map +1 -0
  514. package/daemon/dist/domain/queue-transfer-recovery.d.ts +40 -0
  515. package/daemon/dist/domain/queue-transfer-recovery.d.ts.map +1 -0
  516. package/daemon/dist/domain/queue-transfer-recovery.js +136 -0
  517. package/daemon/dist/domain/queue-transfer-recovery.js.map +1 -0
  518. package/daemon/dist/domain/queue-transfer-relinquish.d.ts +70 -0
  519. package/daemon/dist/domain/queue-transfer-relinquish.d.ts.map +1 -0
  520. package/daemon/dist/domain/queue-transfer-relinquish.js +204 -0
  521. package/daemon/dist/domain/queue-transfer-relinquish.js.map +1 -0
  522. package/daemon/dist/domain/queue-transfer-review.d.ts +1 -0
  523. package/daemon/dist/domain/queue-transfer-review.d.ts.map +1 -1
  524. package/daemon/dist/domain/queue-transfer-review.js +15 -13
  525. package/daemon/dist/domain/queue-transfer-review.js.map +1 -1
  526. package/daemon/dist/domain/queue-transfer-staging.d.ts +14 -0
  527. package/daemon/dist/domain/queue-transfer-staging.d.ts.map +1 -1
  528. package/daemon/dist/domain/queue-transfer-staging.js +9 -1
  529. package/daemon/dist/domain/queue-transfer-staging.js.map +1 -1
  530. package/daemon/dist/domain/queue-transfer-write.d.ts +14 -0
  531. package/daemon/dist/domain/queue-transfer-write.d.ts.map +1 -0
  532. package/daemon/dist/domain/queue-transfer-write.js +42 -0
  533. package/daemon/dist/domain/queue-transfer-write.js.map +1 -0
  534. package/daemon/dist/domain/queue-transition-log.d.ts +8 -0
  535. package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
  536. package/daemon/dist/domain/queue-transition-log.js +27 -14
  537. package/daemon/dist/domain/queue-transition-log.js.map +1 -1
  538. package/daemon/dist/domain/queue-waiting.d.ts +10 -1
  539. package/daemon/dist/domain/queue-waiting.d.ts.map +1 -1
  540. package/daemon/dist/domain/queue-waiting.js +20 -14
  541. package/daemon/dist/domain/queue-waiting.js.map +1 -1
  542. package/daemon/dist/domain/queue-wake-ladder.d.ts +10 -3
  543. package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
  544. package/daemon/dist/domain/queue-wake-ladder.js +60 -23
  545. package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
  546. package/daemon/dist/domain/queue-wake-repository.d.ts +1 -0
  547. package/daemon/dist/domain/queue-wake-repository.d.ts.map +1 -1
  548. package/daemon/dist/domain/queue-wake-repository.js +21 -19
  549. package/daemon/dist/domain/queue-wake-repository.js.map +1 -1
  550. package/daemon/dist/domain/receiver-context.d.ts +3 -2
  551. package/daemon/dist/domain/receiver-context.d.ts.map +1 -1
  552. package/daemon/dist/domain/receiver-context.js +5 -4
  553. package/daemon/dist/domain/receiver-context.js.map +1 -1
  554. package/daemon/dist/domain/reconciler.d.ts +2 -0
  555. package/daemon/dist/domain/reconciler.d.ts.map +1 -1
  556. package/daemon/dist/domain/reconciler.js +17 -1
  557. package/daemon/dist/domain/reconciler.js.map +1 -1
  558. package/daemon/dist/domain/relayed-answers.d.ts +1 -0
  559. package/daemon/dist/domain/relayed-answers.d.ts.map +1 -1
  560. package/daemon/dist/domain/relayed-answers.js.map +1 -1
  561. package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
  562. package/daemon/dist/domain/restore-check-service.js +9 -3
  563. package/daemon/dist/domain/restore-check-service.js.map +1 -1
  564. package/daemon/dist/domain/restore-orchestrator.d.ts +7 -0
  565. package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
  566. package/daemon/dist/domain/restore-orchestrator.js +54 -14
  567. package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
  568. package/daemon/dist/domain/return-route.d.ts +4 -0
  569. package/daemon/dist/domain/return-route.d.ts.map +1 -1
  570. package/daemon/dist/domain/return-route.js +13 -0
  571. package/daemon/dist/domain/return-route.js.map +1 -1
  572. package/daemon/dist/domain/rig-mode/operating-posture.d.ts +3 -0
  573. package/daemon/dist/domain/rig-mode/operating-posture.d.ts.map +1 -1
  574. package/daemon/dist/domain/rig-mode/operating-posture.js +27 -8
  575. package/daemon/dist/domain/rig-mode/operating-posture.js.map +1 -1
  576. package/daemon/dist/domain/rig-status-compose.d.ts +3 -0
  577. package/daemon/dist/domain/rig-status-compose.d.ts.map +1 -1
  578. package/daemon/dist/domain/rig-status-compose.js +4 -1
  579. package/daemon/dist/domain/rig-status-compose.js.map +1 -1
  580. package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
  581. package/daemon/dist/domain/rig-teardown.js +3 -2
  582. package/daemon/dist/domain/rig-teardown.js.map +1 -1
  583. package/daemon/dist/domain/rigspec-exporter.d.ts +2 -0
  584. package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
  585. package/daemon/dist/domain/rigspec-exporter.js +38 -2
  586. package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
  587. package/daemon/dist/domain/rigspec-instantiator.d.ts +4 -1
  588. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  589. package/daemon/dist/domain/rigspec-instantiator.js +32 -13
  590. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  591. package/daemon/dist/domain/rigspec-preflight.d.ts +3 -0
  592. package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
  593. package/daemon/dist/domain/rigspec-preflight.js +25 -7
  594. package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
  595. package/daemon/dist/domain/roster-ready-notice.d.ts +1 -1
  596. package/daemon/dist/domain/roster-ready-notice.d.ts.map +1 -1
  597. package/daemon/dist/domain/roster-ready-notice.js +2 -1
  598. package/daemon/dist/domain/roster-ready-notice.js.map +1 -1
  599. package/daemon/dist/domain/runner-permissions.d.ts +3 -2
  600. package/daemon/dist/domain/runner-permissions.d.ts.map +1 -1
  601. package/daemon/dist/domain/runner-permissions.js +30 -19
  602. package/daemon/dist/domain/runner-permissions.js.map +1 -1
  603. package/daemon/dist/domain/runtime-adapter.d.ts +2 -0
  604. package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
  605. package/daemon/dist/domain/runtime-adapter.js.map +1 -1
  606. package/daemon/dist/domain/scope/manifest-editor.d.ts +35 -0
  607. package/daemon/dist/domain/scope/manifest-editor.d.ts.map +1 -0
  608. package/daemon/dist/domain/scope/manifest-editor.js +197 -0
  609. package/daemon/dist/domain/scope/manifest-editor.js.map +1 -0
  610. package/daemon/dist/domain/scope/mission-frontmatter.d.ts +9 -0
  611. package/daemon/dist/domain/scope/mission-frontmatter.d.ts.map +1 -0
  612. package/daemon/dist/domain/scope/mission-frontmatter.js +36 -0
  613. package/daemon/dist/domain/scope/mission-frontmatter.js.map +1 -0
  614. package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
  615. package/daemon/dist/domain/seat-activity-service.js +53 -20
  616. package/daemon/dist/domain/seat-activity-service.js.map +1 -1
  617. package/daemon/dist/domain/seat-cold-start.d.ts +8 -2
  618. package/daemon/dist/domain/seat-cold-start.d.ts.map +1 -1
  619. package/daemon/dist/domain/seat-cold-start.js +75 -19
  620. package/daemon/dist/domain/seat-cold-start.js.map +1 -1
  621. package/daemon/dist/domain/seat-delivery-guard.d.ts +6 -1
  622. package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
  623. package/daemon/dist/domain/seat-delivery-guard.js +23 -2
  624. package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
  625. package/daemon/dist/domain/seat-evidence.d.ts +13 -0
  626. package/daemon/dist/domain/seat-evidence.d.ts.map +1 -0
  627. package/daemon/dist/domain/seat-evidence.js +29 -0
  628. package/daemon/dist/domain/seat-evidence.js.map +1 -0
  629. package/daemon/dist/domain/seat-handover-service.d.ts +5 -1
  630. package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
  631. package/daemon/dist/domain/seat-handover-service.js +49 -35
  632. package/daemon/dist/domain/seat-handover-service.js.map +1 -1
  633. package/daemon/dist/domain/seat-lifecycle-service.d.ts +26 -6
  634. package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
  635. package/daemon/dist/domain/seat-lifecycle-service.js +108 -17
  636. package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
  637. package/daemon/dist/domain/seat-pool-dispatch-guard.d.ts +28 -0
  638. package/daemon/dist/domain/seat-pool-dispatch-guard.d.ts.map +1 -0
  639. package/daemon/dist/domain/seat-pool-dispatch-guard.js +123 -0
  640. package/daemon/dist/domain/seat-pool-dispatch-guard.js.map +1 -0
  641. package/daemon/dist/domain/seat-pool-executor.d.ts +64 -3
  642. package/daemon/dist/domain/seat-pool-executor.d.ts.map +1 -1
  643. package/daemon/dist/domain/seat-pool-executor.js +993 -102
  644. package/daemon/dist/domain/seat-pool-executor.js.map +1 -1
  645. package/daemon/dist/domain/seat-pool-slots.d.ts +90 -2
  646. package/daemon/dist/domain/seat-pool-slots.d.ts.map +1 -1
  647. package/daemon/dist/domain/seat-pool-slots.js +88 -3
  648. package/daemon/dist/domain/seat-pool-slots.js.map +1 -1
  649. package/daemon/dist/domain/seat-pool-spec.d.ts +4 -1
  650. package/daemon/dist/domain/seat-pool-spec.d.ts.map +1 -1
  651. package/daemon/dist/domain/seat-pool-spec.js +14 -2
  652. package/daemon/dist/domain/seat-pool-spec.js.map +1 -1
  653. package/daemon/dist/domain/seat-reaper-eligibility.d.ts +34 -0
  654. package/daemon/dist/domain/seat-reaper-eligibility.d.ts.map +1 -0
  655. package/daemon/dist/domain/seat-reaper-eligibility.js +30 -0
  656. package/daemon/dist/domain/seat-reaper-eligibility.js.map +1 -0
  657. package/daemon/dist/domain/seat-reaper-events.d.ts +31 -0
  658. package/daemon/dist/domain/seat-reaper-events.d.ts.map +1 -0
  659. package/daemon/dist/domain/seat-reaper-events.js +2 -0
  660. package/daemon/dist/domain/seat-reaper-events.js.map +1 -0
  661. package/daemon/dist/domain/seat-reaper-service.d.ts +59 -0
  662. package/daemon/dist/domain/seat-reaper-service.d.ts.map +1 -0
  663. package/daemon/dist/domain/seat-reaper-service.js +311 -0
  664. package/daemon/dist/domain/seat-reaper-service.js.map +1 -0
  665. package/daemon/dist/domain/seat-reaper-settings.d.ts +14 -0
  666. package/daemon/dist/domain/seat-reaper-settings.d.ts.map +1 -0
  667. package/daemon/dist/domain/seat-reaper-settings.js +32 -0
  668. package/daemon/dist/domain/seat-reaper-settings.js.map +1 -0
  669. package/daemon/dist/domain/seat-reaper-store.d.ts +19 -0
  670. package/daemon/dist/domain/seat-reaper-store.d.ts.map +1 -0
  671. package/daemon/dist/domain/seat-reaper-store.js +45 -0
  672. package/daemon/dist/domain/seat-reaper-store.js.map +1 -0
  673. package/daemon/dist/domain/seat-reaper-workspace.d.ts +4 -0
  674. package/daemon/dist/domain/seat-reaper-workspace.d.ts.map +1 -0
  675. package/daemon/dist/domain/seat-reaper-workspace.js +43 -0
  676. package/daemon/dist/domain/seat-reaper-workspace.js.map +1 -0
  677. package/daemon/dist/domain/seat-restart-in-place.d.ts +11 -3
  678. package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -1
  679. package/daemon/dist/domain/seat-restart-in-place.js +39 -48
  680. package/daemon/dist/domain/seat-restart-in-place.js.map +1 -1
  681. package/daemon/dist/domain/seat-runtime-switch-service.d.ts.map +1 -1
  682. package/daemon/dist/domain/seat-runtime-switch-service.js +5 -7
  683. package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -1
  684. package/daemon/dist/domain/seat-skill-storage.d.ts.map +1 -1
  685. package/daemon/dist/domain/seat-skill-storage.js +27 -5
  686. package/daemon/dist/domain/seat-skill-storage.js.map +1 -1
  687. package/daemon/dist/domain/seat-standby.d.ts +13 -0
  688. package/daemon/dist/domain/seat-standby.d.ts.map +1 -0
  689. package/daemon/dist/domain/seat-standby.js +21 -0
  690. package/daemon/dist/domain/seat-standby.js.map +1 -0
  691. package/daemon/dist/domain/seat-startup-text.d.ts +159 -0
  692. package/daemon/dist/domain/seat-startup-text.d.ts.map +1 -0
  693. package/daemon/dist/domain/seat-startup-text.js +200 -0
  694. package/daemon/dist/domain/seat-startup-text.js.map +1 -0
  695. package/daemon/dist/domain/seat-status-service.d.ts +18 -0
  696. package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
  697. package/daemon/dist/domain/seat-status-service.js +25 -5
  698. package/daemon/dist/domain/seat-status-service.js.map +1 -1
  699. package/daemon/dist/domain/seat-structural-activity-service.d.ts +7 -0
  700. package/daemon/dist/domain/seat-structural-activity-service.d.ts.map +1 -1
  701. package/daemon/dist/domain/seat-structural-activity-service.js +16 -1
  702. package/daemon/dist/domain/seat-structural-activity-service.js.map +1 -1
  703. package/daemon/dist/domain/session-registry.d.ts +15 -3
  704. package/daemon/dist/domain/session-registry.d.ts.map +1 -1
  705. package/daemon/dist/domain/session-registry.js +52 -5
  706. package/daemon/dist/domain/session-registry.js.map +1 -1
  707. package/daemon/dist/domain/session-transport.d.ts +12 -5
  708. package/daemon/dist/domain/session-transport.d.ts.map +1 -1
  709. package/daemon/dist/domain/session-transport.js +129 -18
  710. package/daemon/dist/domain/session-transport.js.map +1 -1
  711. package/daemon/dist/domain/shared-conversation.d.ts.map +1 -1
  712. package/daemon/dist/domain/shared-conversation.js +3 -1
  713. package/daemon/dist/domain/shared-conversation.js.map +1 -1
  714. package/daemon/dist/domain/slices/slice-indexer.d.ts +2 -2
  715. package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
  716. package/daemon/dist/domain/slices/slice-indexer.js +4 -15
  717. package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
  718. package/daemon/dist/domain/snapshot-capture.d.ts +4 -1
  719. package/daemon/dist/domain/snapshot-capture.d.ts.map +1 -1
  720. package/daemon/dist/domain/snapshot-capture.js +14 -18
  721. package/daemon/dist/domain/snapshot-capture.js.map +1 -1
  722. package/daemon/dist/domain/snapshot-repository.d.ts +37 -0
  723. package/daemon/dist/domain/snapshot-repository.d.ts.map +1 -1
  724. package/daemon/dist/domain/snapshot-repository.js +68 -0
  725. package/daemon/dist/domain/snapshot-repository.js.map +1 -1
  726. package/daemon/dist/domain/startup-orchestrator.d.ts +8 -20
  727. package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
  728. package/daemon/dist/domain/startup-orchestrator.js +94 -27
  729. package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
  730. package/daemon/dist/domain/startup-submission-evidence.d.ts +4 -1
  731. package/daemon/dist/domain/startup-submission-evidence.d.ts.map +1 -1
  732. package/daemon/dist/domain/startup-submission-evidence.js +12 -1
  733. package/daemon/dist/domain/startup-submission-evidence.js.map +1 -1
  734. package/daemon/dist/domain/successor-session-launcher.d.ts +9 -5
  735. package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
  736. package/daemon/dist/domain/successor-session-launcher.js +17 -6
  737. package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
  738. package/daemon/dist/domain/terminal/earlier-tile-attach-0724.d.ts +2 -0
  739. package/daemon/dist/domain/terminal/earlier-tile-attach-0724.d.ts.map +1 -0
  740. package/daemon/dist/domain/terminal/earlier-tile-attach-0724.js +54 -0
  741. package/daemon/dist/domain/terminal/earlier-tile-attach-0724.js.map +1 -0
  742. package/daemon/dist/domain/terminal/herdr-app-provider.d.ts +28 -3
  743. package/daemon/dist/domain/terminal/herdr-app-provider.d.ts.map +1 -1
  744. package/daemon/dist/domain/terminal/herdr-app-provider.js +216 -52
  745. package/daemon/dist/domain/terminal/herdr-app-provider.js.map +1 -1
  746. package/daemon/dist/domain/terminal/herdr-app-state.d.ts +7 -2
  747. package/daemon/dist/domain/terminal/herdr-app-state.d.ts.map +1 -1
  748. package/daemon/dist/domain/terminal/herdr-app-state.js.map +1 -1
  749. package/daemon/dist/domain/terminal/terminal-provider.d.ts +17 -0
  750. package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
  751. package/daemon/dist/domain/terminal/tile-attach.d.ts +4 -4
  752. package/daemon/dist/domain/terminal/tile-attach.d.ts.map +1 -1
  753. package/daemon/dist/domain/terminal/tile-attach.js +14 -8
  754. package/daemon/dist/domain/terminal/tile-attach.js.map +1 -1
  755. package/daemon/dist/domain/types.d.ts +71 -4
  756. package/daemon/dist/domain/types.d.ts.map +1 -1
  757. package/daemon/dist/domain/types.js.map +1 -1
  758. package/daemon/dist/domain/usage-samples-store.d.ts.map +1 -1
  759. package/daemon/dist/domain/usage-samples-store.js.map +1 -1
  760. package/daemon/dist/domain/user-settings/settings-store.d.ts +1 -1
  761. package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
  762. package/daemon/dist/domain/user-settings/settings-store.js +45 -2
  763. package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
  764. package/daemon/dist/domain/view-projector.d.ts.map +1 -1
  765. package/daemon/dist/domain/view-projector.js +5 -2
  766. package/daemon/dist/domain/view-projector.js.map +1 -1
  767. package/daemon/dist/domain/watchdog-delivery.d.ts +3 -0
  768. package/daemon/dist/domain/watchdog-delivery.d.ts.map +1 -1
  769. package/daemon/dist/domain/watchdog-delivery.js +26 -4
  770. package/daemon/dist/domain/watchdog-delivery.js.map +1 -1
  771. package/daemon/dist/domain/watchdog-history-log.d.ts +10 -0
  772. package/daemon/dist/domain/watchdog-history-log.d.ts.map +1 -1
  773. package/daemon/dist/domain/watchdog-history-log.js +35 -1
  774. package/daemon/dist/domain/watchdog-history-log.js.map +1 -1
  775. package/daemon/dist/domain/watchdog-job-update.d.ts.map +1 -1
  776. package/daemon/dist/domain/watchdog-job-update.js +29 -4
  777. package/daemon/dist/domain/watchdog-job-update.js.map +1 -1
  778. package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
  779. package/daemon/dist/domain/watchdog-policy-engine.js +4 -1
  780. package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
  781. package/daemon/dist/domain/watchdog-scheduler.d.ts +4 -0
  782. package/daemon/dist/domain/watchdog-scheduler.d.ts.map +1 -1
  783. package/daemon/dist/domain/watchdog-scheduler.js +14 -0
  784. package/daemon/dist/domain/watchdog-scheduler.js.map +1 -1
  785. package/daemon/dist/domain/workflow-role-context.d.ts.map +1 -1
  786. package/daemon/dist/domain/workflow-role-context.js +1 -0
  787. package/daemon/dist/domain/workflow-role-context.js.map +1 -1
  788. package/daemon/dist/domain/workflow-role-resolver.d.ts +3 -0
  789. package/daemon/dist/domain/workflow-role-resolver.d.ts.map +1 -1
  790. package/daemon/dist/domain/workflow-role-resolver.js +12 -6
  791. package/daemon/dist/domain/workflow-role-resolver.js.map +1 -1
  792. package/daemon/dist/domain/workspace/project-catalog.d.ts +7 -0
  793. package/daemon/dist/domain/workspace/project-catalog.d.ts.map +1 -1
  794. package/daemon/dist/domain/workspace/project-catalog.js +16 -9
  795. package/daemon/dist/domain/workspace/project-catalog.js.map +1 -1
  796. package/daemon/dist/domain/workspace/project-registration.d.ts +5 -1
  797. package/daemon/dist/domain/workspace/project-registration.d.ts.map +1 -1
  798. package/daemon/dist/domain/workspace/project-registration.js +11 -7
  799. package/daemon/dist/domain/workspace/project-registration.js.map +1 -1
  800. package/daemon/dist/index.d.ts +3 -0
  801. package/daemon/dist/index.d.ts.map +1 -1
  802. package/daemon/dist/index.js +14 -4
  803. package/daemon/dist/index.js.map +1 -1
  804. package/daemon/dist/middleware/auth-bearer-token.d.ts +8 -12
  805. package/daemon/dist/middleware/auth-bearer-token.d.ts.map +1 -1
  806. package/daemon/dist/middleware/auth-bearer-token.js +18 -36
  807. package/daemon/dist/middleware/auth-bearer-token.js.map +1 -1
  808. package/daemon/dist/queue-transfer-records-surface.d.ts +6 -0
  809. package/daemon/dist/queue-transfer-records-surface.d.ts.map +1 -0
  810. package/daemon/dist/queue-transfer-records-surface.js +6 -0
  811. package/daemon/dist/queue-transfer-records-surface.js.map +1 -0
  812. package/daemon/dist/rig-lookup-surface.d.ts +2 -0
  813. package/daemon/dist/rig-lookup-surface.d.ts.map +1 -0
  814. package/daemon/dist/rig-lookup-surface.js +5 -0
  815. package/daemon/dist/rig-lookup-surface.js.map +1 -0
  816. package/daemon/dist/routes/activity.d.ts.map +1 -1
  817. package/daemon/dist/routes/activity.js +4 -3
  818. package/daemon/dist/routes/activity.js.map +1 -1
  819. package/daemon/dist/routes/attention.d.ts.map +1 -1
  820. package/daemon/dist/routes/attention.js +3 -1
  821. package/daemon/dist/routes/attention.js.map +1 -1
  822. package/daemon/dist/routes/compaction.d.ts.map +1 -1
  823. package/daemon/dist/routes/compaction.js +2 -0
  824. package/daemon/dist/routes/compaction.js.map +1 -1
  825. package/daemon/dist/routes/mission-control.d.ts.map +1 -1
  826. package/daemon/dist/routes/mission-control.js +2 -1
  827. package/daemon/dist/routes/mission-control.js.map +1 -1
  828. package/daemon/dist/routes/missions.d.ts +3 -6
  829. package/daemon/dist/routes/missions.d.ts.map +1 -1
  830. package/daemon/dist/routes/missions.js +42 -76
  831. package/daemon/dist/routes/missions.js.map +1 -1
  832. package/daemon/dist/routes/network.d.ts.map +1 -1
  833. package/daemon/dist/routes/network.js +19 -1
  834. package/daemon/dist/routes/network.js.map +1 -1
  835. package/daemon/dist/routes/provider.d.ts.map +1 -1
  836. package/daemon/dist/routes/provider.js +156 -5
  837. package/daemon/dist/routes/provider.js.map +1 -1
  838. package/daemon/dist/routes/queue-transfer.d.ts +9 -0
  839. package/daemon/dist/routes/queue-transfer.d.ts.map +1 -0
  840. package/daemon/dist/routes/queue-transfer.js +109 -0
  841. package/daemon/dist/routes/queue-transfer.js.map +1 -0
  842. package/daemon/dist/routes/queue.d.ts.map +1 -1
  843. package/daemon/dist/routes/queue.js +80 -51
  844. package/daemon/dist/routes/queue.js.map +1 -1
  845. package/daemon/dist/routes/rigs.js +3 -0
  846. package/daemon/dist/routes/rigs.js.map +1 -1
  847. package/daemon/dist/routes/rigspec.d.ts.map +1 -1
  848. package/daemon/dist/routes/rigspec.js +4 -0
  849. package/daemon/dist/routes/rigspec.js.map +1 -1
  850. package/daemon/dist/routes/seat.d.ts.map +1 -1
  851. package/daemon/dist/routes/seat.js +19 -3
  852. package/daemon/dist/routes/seat.js.map +1 -1
  853. package/daemon/dist/routes/terminal-ws.d.ts +0 -5
  854. package/daemon/dist/routes/terminal-ws.d.ts.map +1 -1
  855. package/daemon/dist/routes/terminal-ws.js +0 -6
  856. package/daemon/dist/routes/terminal-ws.js.map +1 -1
  857. package/daemon/dist/routes/transport.js +1 -1
  858. package/daemon/dist/routes/transport.js.map +1 -1
  859. package/daemon/dist/scope-manifest-surface.d.ts +4 -0
  860. package/daemon/dist/scope-manifest-surface.d.ts.map +1 -0
  861. package/daemon/dist/scope-manifest-surface.js +4 -0
  862. package/daemon/dist/scope-manifest-surface.js.map +1 -0
  863. package/daemon/dist/server.d.ts +2 -1
  864. package/daemon/dist/server.d.ts.map +1 -1
  865. package/daemon/dist/server.js +6 -6
  866. package/daemon/dist/server.js.map +1 -1
  867. package/daemon/dist/startup.d.ts.map +1 -1
  868. package/daemon/dist/startup.js +126 -61
  869. package/daemon/dist/startup.js.map +1 -1
  870. package/daemon/docs/reference/agent-startup-guide.md +26 -4
  871. package/daemon/docs/reference/agent-state-taxonomy.md +22 -1
  872. package/daemon/docs/reference/claude-status-line.md +28 -0
  873. package/daemon/docs/reference/community-harness-examples/hermes/hermes.yaml +3 -0
  874. package/daemon/docs/reference/community-harness-examples/hermes/openrig-hermes-launch +10 -0
  875. package/daemon/docs/reference/community-harness-presets.md +79 -8
  876. package/daemon/docs/reference/daemon-http-clients.md +49 -2
  877. package/daemon/docs/reference/getting-started.md +73 -11
  878. package/daemon/docs/reference/harness-runner-contract.md +12 -4
  879. package/daemon/docs/reference/help.md +9 -0
  880. package/daemon/docs/reference/herdr-app.md +45 -4
  881. package/daemon/docs/reference/hosted-members.md +1 -1
  882. package/daemon/docs/reference/network-connector.md +66 -1
  883. package/daemon/docs/reference/pi-tool-selection-recovery.md +13 -29
  884. package/daemon/docs/reference/queue-transfer-activation.md +89 -0
  885. package/daemon/docs/reference/queue-transfer-staging.md +1 -1
  886. package/daemon/docs/reference/quickstart.md +4 -4
  887. package/daemon/docs/reference/refocus-channel.md +21 -0
  888. package/daemon/docs/reference/rig-bundle.md +25 -0
  889. package/daemon/docs/reference/rig-spec.md +218 -23
  890. package/daemon/docs/reference/scoped-operating-posture.md +6 -1
  891. package/daemon/docs/reference/sdlc-conventions.md +10 -4
  892. package/daemon/docs/reference/seat-delivery.md +108 -12
  893. package/daemon/docs/reference/seat-node-targeting.md +2 -2
  894. package/daemon/docs/reference/seat-pools.md +181 -18
  895. package/daemon/docs/reference/seat-scaling.md +137 -0
  896. package/daemon/docs/reference/whats-new.md +190 -14
  897. package/daemon/specs/agents/development/implementer/guidance/role.md +11 -0
  898. package/daemon/specs/agents/development/qa/guidance/role.md +5 -0
  899. package/daemon/specs/agents/shared/skills/core/cross-host-rig-commands/SKILL.md +9 -1
  900. package/daemon/specs/agents/shared/skills/core/working-with-an-openrig-team/SKILL.md +32 -19
  901. package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +8 -3
  902. package/dist/build-info.js +3 -3
  903. package/dist/cli-error.d.ts +2 -0
  904. package/dist/cli-error.d.ts.map +1 -1
  905. package/dist/cli-error.js +25 -8
  906. package/dist/cli-error.js.map +1 -1
  907. package/dist/client.d.ts +1 -0
  908. package/dist/client.d.ts.map +1 -1
  909. package/dist/client.js +13 -0
  910. package/dist/client.js.map +1 -1
  911. package/dist/commands/auth.d.ts.map +1 -1
  912. package/dist/commands/auth.js +52 -1
  913. package/dist/commands/auth.js.map +1 -1
  914. package/dist/commands/config.d.ts.map +1 -1
  915. package/dist/commands/config.js +3 -0
  916. package/dist/commands/config.js.map +1 -1
  917. package/dist/commands/crash-cart.d.ts.map +1 -1
  918. package/dist/commands/crash-cart.js +65 -17
  919. package/dist/commands/crash-cart.js.map +1 -1
  920. package/dist/commands/daemon.d.ts +7 -20
  921. package/dist/commands/daemon.d.ts.map +1 -1
  922. package/dist/commands/daemon.js +117 -46
  923. package/dist/commands/daemon.js.map +1 -1
  924. package/dist/commands/doctor.d.ts +26 -0
  925. package/dist/commands/doctor.d.ts.map +1 -1
  926. package/dist/commands/doctor.js +148 -2
  927. package/dist/commands/doctor.js.map +1 -1
  928. package/dist/commands/import.d.ts +5 -0
  929. package/dist/commands/import.d.ts.map +1 -1
  930. package/dist/commands/import.js +24 -4
  931. package/dist/commands/import.js.map +1 -1
  932. package/dist/commands/mcp.d.ts.map +1 -1
  933. package/dist/commands/mcp.js +4 -2
  934. package/dist/commands/mcp.js.map +1 -1
  935. package/dist/commands/network.d.ts +4 -0
  936. package/dist/commands/network.d.ts.map +1 -1
  937. package/dist/commands/network.js +78 -10
  938. package/dist/commands/network.js.map +1 -1
  939. package/dist/commands/provider.d.ts +5 -1
  940. package/dist/commands/provider.d.ts.map +1 -1
  941. package/dist/commands/provider.js +427 -17
  942. package/dist/commands/provider.js.map +1 -1
  943. package/dist/commands/ps.d.ts +16 -1
  944. package/dist/commands/ps.d.ts.map +1 -1
  945. package/dist/commands/ps.js +35 -4
  946. package/dist/commands/ps.js.map +1 -1
  947. package/dist/commands/queue-transfer.d.ts +10 -0
  948. package/dist/commands/queue-transfer.d.ts.map +1 -0
  949. package/dist/commands/queue-transfer.js +140 -0
  950. package/dist/commands/queue-transfer.js.map +1 -0
  951. package/dist/commands/queue.d.ts.map +1 -1
  952. package/dist/commands/queue.js +20 -6
  953. package/dist/commands/queue.js.map +1 -1
  954. package/dist/commands/scope.d.ts.map +1 -1
  955. package/dist/commands/scope.js +258 -17
  956. package/dist/commands/scope.js.map +1 -1
  957. package/dist/commands/seat.d.ts.map +1 -1
  958. package/dist/commands/seat.js +132 -23
  959. package/dist/commands/seat.js.map +1 -1
  960. package/dist/commands/setup.d.ts +34 -0
  961. package/dist/commands/setup.d.ts.map +1 -1
  962. package/dist/commands/setup.js +111 -18
  963. package/dist/commands/setup.js.map +1 -1
  964. package/dist/commands/terminal.d.ts +11 -0
  965. package/dist/commands/terminal.d.ts.map +1 -1
  966. package/dist/commands/terminal.js +10 -7
  967. package/dist/commands/terminal.js.map +1 -1
  968. package/dist/config-store.d.ts +9 -1
  969. package/dist/config-store.d.ts.map +1 -1
  970. package/dist/config-store.js +46 -0
  971. package/dist/config-store.js.map +1 -1
  972. package/dist/daemon-lifecycle.d.ts +53 -2
  973. package/dist/daemon-lifecycle.d.ts.map +1 -1
  974. package/dist/daemon-lifecycle.js +500 -192
  975. package/dist/daemon-lifecycle.js.map +1 -1
  976. package/dist/daemon-reachability.js +2 -2
  977. package/dist/daemon-reachability.js.map +1 -1
  978. package/dist/daemon-start-lock.d.ts +28 -0
  979. package/dist/daemon-start-lock.d.ts.map +1 -1
  980. package/dist/daemon-start-lock.js +107 -13
  981. package/dist/daemon-start-lock.js.map +1 -1
  982. package/dist/lib/seat-activity.d.ts +4 -1
  983. package/dist/lib/seat-activity.d.ts.map +1 -1
  984. package/dist/lib/seat-activity.js +4 -3
  985. package/dist/lib/seat-activity.js.map +1 -1
  986. package/dist/mcp-server.d.ts +2 -2
  987. package/dist/mcp-server.d.ts.map +1 -1
  988. package/dist/mcp-server.js +126 -27
  989. package/dist/mcp-server.js.map +1 -1
  990. package/dist/process-liveness.d.ts +21 -0
  991. package/dist/process-liveness.d.ts.map +1 -0
  992. package/dist/process-liveness.js +43 -0
  993. package/dist/process-liveness.js.map +1 -0
  994. package/dist/remote-host-ops.d.ts +1 -1
  995. package/dist/remote-host-ops.d.ts.map +1 -1
  996. package/dist/remote-host-ops.js +3 -14
  997. package/dist/remote-host-ops.js.map +1 -1
  998. package/dist/system-preflight.d.ts +9 -0
  999. package/dist/system-preflight.d.ts.map +1 -1
  1000. package/dist/system-preflight.js +27 -8
  1001. package/dist/system-preflight.js.map +1 -1
  1002. package/dist/tmux-health.d.ts +10 -1
  1003. package/dist/tmux-health.d.ts.map +1 -1
  1004. package/dist/tmux-health.js +31 -2
  1005. package/dist/tmux-health.js.map +1 -1
  1006. package/package.json +4 -2
  1007. package/scripts/check-abi.mjs +18 -2
  1008. package/tui/dist/attention/attention-model.d.ts +1 -1
  1009. package/tui/dist/attention/attention-model.d.ts.map +1 -1
  1010. package/tui/dist/attention/attention-model.js +6 -0
  1011. package/tui/dist/attention/attention-model.js.map +1 -1
  1012. package/tui/dist/daemon-client.d.ts +21 -2
  1013. package/tui/dist/daemon-client.d.ts.map +1 -1
  1014. package/tui/dist/daemon-client.js +36 -5
  1015. package/tui/dist/daemon-client.js.map +1 -1
  1016. package/tui/dist/hydrate.d.ts.map +1 -1
  1017. package/tui/dist/hydrate.js +6 -2
  1018. package/tui/dist/hydrate.js.map +1 -1
  1019. package/tui/dist/main.js +11 -8
  1020. package/tui/dist/main.js.map +1 -1
  1021. package/tui/dist/terminals/open-window.d.ts +9 -3
  1022. package/tui/dist/terminals/open-window.d.ts.map +1 -1
  1023. package/tui/dist/terminals/open-window.js +22 -4
  1024. package/tui/dist/terminals/open-window.js.map +1 -1
  1025. package/tui/dist/terminals/terminal-model.d.ts +3 -0
  1026. package/tui/dist/terminals/terminal-model.d.ts.map +1 -1
  1027. package/tui/dist/terminals/terminal-model.js +6 -1
  1028. package/tui/dist/terminals/terminal-model.js.map +1 -1
  1029. package/tui/dist/topology/glyphs.d.ts.map +1 -1
  1030. package/tui/dist/topology/glyphs.js +11 -1
  1031. package/tui/dist/topology/glyphs.js.map +1 -1
  1032. package/tui/dist/topology/graph-types.d.ts +8 -0
  1033. package/tui/dist/topology/graph-types.d.ts.map +1 -1
  1034. package/tui/dist/types.d.ts +3 -2
  1035. package/tui/dist/types.d.ts.map +1 -1
  1036. package/ui/dist/assets/{index-DG_7XFcL.js → index-D7OUklzs.js} +148 -148
  1037. package/ui/dist/index.html +1 -1
@@ -1,4 +1,6 @@
1
- import { recordedRunner, sessionCommunityRunnerSelect } from "./session-registry.js";
1
+ import { isRosterReadyNotice } from "./roster-ready-notice.js";
2
+ import { OPENRIG_SENDER } from "../lib/pane-envelope.js";
3
+ import { recordedActivityHooks, recordedRunner, sessionActivityHooksSelect, sessionCommunityRunnerSelect } from "./session-registry.js";
2
4
  import { configuredAccount } from "./configured-account.js";
3
5
  import { restoreOutcomesByIntendedNode } from "./restore-topology.js";
4
6
  import { physicalSessionName } from "./session-registry.js";
@@ -6,6 +8,7 @@ import fs from "node:fs";
6
8
  import { decodeTime } from "ulid";
7
9
  import { resolveActiveOccupantRow } from "./active-occupant.js";
8
10
  import { identityVerdictConfirmsSessionMissing, identityVerdictConfirmsExecutorStopped, identityVerdictDownranksRunning } from "./types.js";
11
+ import { isShellForeground } from "./shell-classifier.js";
9
12
  import { resolveSeatEffort } from "./seat-effort.js";
10
13
  import { SeatIdentityStore } from "./seat-identity-store.js";
11
14
  import { buildOrientedMap } from "./startup-proof.js";
@@ -30,6 +33,8 @@ import { sessionCommunityHarnessSelect } from "./session-registry.js";
30
33
  import { claudeMcpArgs, readSeatClaudeMcp } from "./claude-mcp.js";
31
34
  import { isLaunchWrapperRuntime, parseStoredLaunchWrapper } from "./launch-wrapper.js";
32
35
  import { shellQuote } from "../adapters/shell-quote.js";
36
+ import { readStandbyStop } from "./seat-standby.js";
37
+ import { resolveSeatKind, seatProcessOwner } from "./seat-kinds.js";
33
38
  // -- Helpers --
34
39
  function readCustomPolicyCached(target, cache) {
35
40
  if (cache.has(target)) {
@@ -228,6 +233,16 @@ function computeRecoveryGuidance(input) {
228
233
  function deriveNodeKind(runtime) {
229
234
  return runtime === "terminal" ? "infrastructure" : "agent";
230
235
  }
236
+ /** NodeInventoryEntry.agentLiveness, from the applicable stored verdict: a running agent seat whose current identity check saw
237
+ * a shell in the foreground and didn't verify its agent. Undefined otherwise, and while its startup is still pending: a launch
238
+ * marks the session running on its default shell before the agent starts there. */
239
+ function deriveAgentLiveness(runtime, sessionStatus, startupStatus, verdict) {
240
+ const command = verdict?.evidence.observedCommand?.trim().toLowerCase();
241
+ if (!runtime || sessionStatus !== "running" || startupStatus === "pending" || deriveNodeKind(runtime) !== "agent"
242
+ || !verdict || verdict.verdict === "verified" || !command || !isShellForeground(command))
243
+ return undefined;
244
+ return { state: "not_verified", reason: "shell_foreground", command: command.replace(/^-/, ""), observedAt: verdict.observedAt };
245
+ }
231
246
  /**
232
247
  * Derives per-node lifecycle state from session/restore truth plus the rig's latest
233
248
  * usable snapshot.
@@ -467,7 +482,8 @@ function mapStatus(status) {
467
482
  return "n-a";
468
483
  }
469
484
  function deriveHeldReason(db, rigId, nodeId, sessionStatus) {
470
- if (sessionStatus === "running")
485
+ // A seat attached from an outside program (rig attach) isn't held back from a launch, as it wasn't while its record read running.
486
+ if (sessionStatus === "running" || sessionStatus === "attached")
471
487
  return null;
472
488
  const heldRow = db.prepare("SELECT seq, payload FROM events WHERE node_id = ? AND type = 'node.held' ORDER BY seq DESC LIMIT 1").get(nodeId);
473
489
  if (!heldRow)
@@ -729,6 +745,7 @@ function runInventoryRowQuery(db, whereClause, orderClause, params) {
729
745
  s.status as session_status,
730
746
  ${sessionCommunityHarnessSelect(db)} as session_community_harness,
731
747
  ${sessionCommunityRunnerSelect(db)} as session_community_runner,
748
+ ${sessionActivityHooksSelect(db)} as session_community_hooks,
732
749
  s.intentionally_stopped,
733
750
  ${sessionStopAttemptSelect} as stop_attempt,
734
751
  s.startup_status,
@@ -802,7 +819,13 @@ function buildInventoryItem(db, row, ctx) {
802
819
  // Keep registry history intact; only an applicable, explicit absence changes
803
820
  // the current status. Unavailable tmux and process mismatches are not absence.
804
821
  const paneExited = row.session_status === "running" && identityVerdict?.reason === "pane_exited";
805
- const sessionStatus = paneExited ? "exited"
822
+ // A seat joined with `rig attach` runs in someone else's program (seat-kinds: no inbound transport, an external process
823
+ // owner), so OpenRig can't see whether it runs: a stored running, or a detached a tmux probe once wrote, isn't its state.
824
+ // It reads attached, with liveness unknown and its own newest queue action as the only evidence.
825
+ const externallyAttached = row.binding_attachment_type != null
826
+ && seatProcessOwner(resolveSeatKind(row.binding_attachment_type)) === "external"
827
+ && (row.session_status === "running" || row.session_status === "detached");
828
+ const sessionStatus = externallyAttached ? "attached" : paneExited ? "exited"
806
829
  : row.session_status === "running" && identityVerdictConfirmsSessionMissing(identityVerdict) ? "detached" : row.session_status;
807
830
  const startupStatus = paneExited || (sessionStatus === "running" && identityVerdictDownranksRunning(identityVerdict?.verdict))
808
831
  ? "attention_required" : row.startup_status;
@@ -816,14 +839,17 @@ function buildInventoryItem(db, row, ctx) {
816
839
  // a row recorded before attempts were kept has none), the session reads exited or superseded, and no binding is left.
817
840
  const stopConfirmed = row.intentionally_stopped === 1 && row.stop_attempt === null
818
841
  && (row.session_status === "exited" || row.session_status === "superseded") && row.binding_id === null;
819
- const lifecycleState = keepAliveIncident?.exhausted && sessionStatus !== "running" ? "attention_required" : deriveNodeLifecycleState({
820
- sessionStatus,
821
- startupStatus,
822
- restoreOutcome,
823
- nodeId: row.node_id,
824
- usableSnapshot,
825
- identityVerdict: identityVerdict?.verdict ?? null,
826
- });
842
+ const standbyStopped = row.intentionally_stopped === 1 && row.session_status === "exited" && readStandbyStop(db, row.node_id) !== null;
843
+ const lifecycleState = keepAliveIncident?.exhausted && sessionStatus !== "running" ? "attention_required"
844
+ : externallyAttached && startupStatus !== "attention_required" && restoreOutcome !== "attention_required" ? "unknown" : deriveNodeLifecycleState({
845
+ sessionStatus,
846
+ startupStatus,
847
+ restoreOutcome,
848
+ nodeId: row.node_id,
849
+ usableSnapshot,
850
+ identityVerdict: identityVerdict?.verdict ?? null,
851
+ });
852
+ const agentLiveness = deriveAgentLiveness(row.runtime, sessionStatus, startupStatus, identityVerdict);
827
853
  const entry = {
828
854
  nodeId: row.node_id,
829
855
  rigId: row.rig_id,
@@ -840,15 +866,17 @@ function buildInventoryItem(db, row, ctx) {
840
866
  nodeKind: deriveNodeKind(row.runtime),
841
867
  runtime: row.runtime,
842
868
  configuredAccount: configuredAccount(row.runtime, Boolean(row.has_claude_token_ref), row.claude_token_ref, row.account_home),
843
- ...(communityHarnessOf(row.session_community_harness, row.runtime) ? { communityHarness: communityHarnessLabel(row.runtime, undefined, { resumeType: row.resume_type, resumeToken: row.resume_token, resumeProvenance: row.resume_provenance ?? null, runner: recordedRunner(row.session_community_runner) }) } : {}),
869
+ ...(communityHarnessOf(row.session_community_harness, row.runtime) ? { communityHarness: communityHarnessLabel(row.runtime, undefined, { resumeType: row.resume_type, resumeToken: row.resume_token, resumeProvenance: row.resume_provenance ?? null, runner: recordedRunner(row.session_community_runner), activityHooks: recordedActivityHooks(row.session_community_hooks) }) } : {}),
844
870
  ...(launchWrapper ? { launchWrapper } : {}),
845
871
  sessionStatus,
846
872
  storedSessionStatus: row.session_status,
873
+ ...(externallyAttached ? { externalAttachment: { liveness: "unknown", ...lastOwnQueueAction(db, row.session_name) } } : {}),
847
874
  // An explicit down records a failed start's rolled-back session without changing its superseded status.
848
875
  intentionallyStopped: stopConfirmed,
876
+ ...(standbyStopped ? { standbyStopped: true } : {}),
849
877
  // #2940: a stop recorded but not confirmed yet (the session not yet gone, the daemon lost mid-stop, or a request
850
878
  // recorded on a row already exited or superseded that no probe has proven absent: its attempt is still set).
851
- ...(row.intentionally_stopped === 1 && !stopConfirmed ? { stopRequested: true } : {}),
879
+ ...(row.intentionally_stopped === 1 && !stopConfirmed && !standbyStopped ? { stopRequested: true } : {}),
852
880
  // #2940: the seat declares keep_alive (absent = off, so other seats' output is unchanged).
853
881
  ...(row.keep_alive === 1 ? { keepAlive: true } : {}),
854
882
  ...(keepAliveIncident ? { keepAliveIncident } : {}),
@@ -909,6 +937,7 @@ function buildInventoryItem(db, row, ctx) {
909
937
  // OPR.0.4.3.19 — the liveness identity verdict (third axis). null when
910
938
  // never observed; carries evidence on mismatch/missing.
911
939
  identityVerdict,
940
+ ...(agentLiveness ? { agentLiveness } : {}),
912
941
  heldReason: deriveHeldReason(db, row.rig_id, row.node_id, sessionStatus),
913
942
  ...(row.handover_at ? startedWithoutRequired(db, row.node_id, row.session_id) : {}),
914
943
  };
@@ -1293,6 +1322,25 @@ export function seatNeedsAttention(entry, activity, arbitratedNeedsInput = null,
1293
1322
  || entry.latestError != null
1294
1323
  || (entry.startedWithoutRequired?.length ?? 0) > 0;
1295
1324
  }
1325
+ /** The newest queue transition a seat wrote itself (a claim, note or handoff): for a seat attached from an outside program,
1326
+ * the one sign OpenRig has that it's working. It reads the live history and the archive retention moves finished work to
1327
+ * (one indexed row from each), so an archived action still counts. Null when it has written none; "unavailable" when its
1328
+ * history couldn't be read, so a failed read never reads as none. */
1329
+ function lastOwnQueueAction(db, session) {
1330
+ if (!session)
1331
+ return { lastOwnQueueAction: null, lastOwnQueueActionRead: "read" };
1332
+ try {
1333
+ const newest = ["queue_transitions", "queue_transitions_archive"]
1334
+ .map((table) => db.prepare(`SELECT transition_id, ts, qitem_id, state FROM ${table} WHERE actor_session = ? ORDER BY transition_id DESC LIMIT 1`)
1335
+ .get(session))
1336
+ .filter((row) => row !== undefined)
1337
+ .sort((a, b) => b.transition_id - a.transition_id)[0];
1338
+ return { lastOwnQueueAction: newest ? { at: newest.ts, qitemId: newest.qitem_id, state: newest.state } : null, lastOwnQueueActionRead: "read" };
1339
+ }
1340
+ catch {
1341
+ return { lastOwnQueueAction: null, lastOwnQueueActionRead: "unavailable" };
1342
+ }
1343
+ }
1296
1344
  /**
1297
1345
  * An explicit hold on a never-launched seat with no outstanding queue work.
1298
1346
  *
@@ -1331,7 +1379,7 @@ export function retainedProviderFailure(store, seat, newest) {
1331
1379
  }
1332
1380
  /** The pane's own interactive prompts: a picker or question, and a permission or confirmation. A draft in the input
1333
1381
  * box is not one. */
1334
- const NATIVE_PROMPT_REASONS = new Set(["selection_prompt", "permission_prompt"]);
1382
+ const NATIVE_PROMPT_REASONS = new Set(["selection_prompt", "permission_prompt", "hook_trust_gate"]);
1335
1383
  /**
1336
1384
  * The served activity for a seat with a current Claude authentication or billing failure (`retainedProviderFailure`):
1337
1385
  * that hook, ahead of the cached pane reading, so the row shows the reason it counts for attention. Only a native prompt from a
@@ -1490,28 +1538,53 @@ export function deriveCanonicalFromEntry(entry) {
1490
1538
  return deriveCanonicalSessionName(pod, member, entry.rigName);
1491
1539
  }
1492
1540
  export function readAssignedWorkBySession(db) {
1493
- const rows = db.prepare(`
1494
- SELECT destination_session,
1495
- COUNT(*) as assigned_count,
1496
- SUM(CASE WHEN state = 'pending' THEN 1 ELSE 0 END) as pending_count,
1497
- SUM(CASE WHEN state = 'in-progress' THEN 1 ELSE 0 END) as in_progress_count,
1498
- SUM(CASE WHEN state = 'blocked' THEN 1 ELSE 0 END) as blocked_count
1499
- FROM queue_items
1500
- WHERE state IN ('pending', 'in-progress', 'blocked')
1501
- GROUP BY destination_session
1502
- `).all();
1503
- const out = new Map();
1504
- for (const r of rows) {
1505
- const address = physicalSessionName(db, r.destination_session);
1506
- const prior = out.get(address);
1507
- out.set(address, {
1508
- assignedWorkCount: (prior?.assignedWorkCount ?? 0) + r.assigned_count,
1509
- pendingWorkCount: (prior?.pendingWorkCount ?? 0) + r.pending_count,
1510
- inProgressWorkCount: (prior?.inProgressWorkCount ?? 0) + r.in_progress_count,
1511
- blockedWorkCount: (prior?.blockedWorkCount ?? 0) + r.blocked_count,
1512
- });
1513
- }
1514
- return out;
1541
+ // The aggregate and notice subtraction must observe one snapshot, including with another connection writing.
1542
+ return db.transaction(() => {
1543
+ const rows = db.prepare(`
1544
+ SELECT destination_session,
1545
+ COUNT(*) as assigned_count,
1546
+ SUM(CASE WHEN state = 'pending' THEN 1 ELSE 0 END) as pending_count,
1547
+ SUM(CASE WHEN state = 'in-progress' THEN 1 ELSE 0 END) as in_progress_count,
1548
+ SUM(CASE WHEN state = 'blocked' THEN 1 ELSE 0 END) as blocked_count
1549
+ FROM queue_items
1550
+ WHERE state IN ('pending', 'in-progress', 'blocked')
1551
+ GROUP BY destination_session
1552
+ `).all();
1553
+ // Keep ordinary work aggregated in SQLite. Only OpenRig-authored candidates need the shared classifier;
1554
+ // a matching sender alone does not make a row informational.
1555
+ const byDestination = new Map(rows.map(row => [row.destination_session, row]));
1556
+ const candidates = db.prepare(`SELECT qitem_id, source_session, destination_session, state FROM queue_items
1557
+ WHERE state IN ('pending', 'in-progress', 'blocked') AND source_session = ?`)
1558
+ .iterate(OPENRIG_SENDER);
1559
+ for (const row of candidates) {
1560
+ if (!isRosterReadyNotice(row))
1561
+ continue;
1562
+ const counts = byDestination.get(row.destination_session);
1563
+ if (!counts)
1564
+ continue; // A candidate without an aggregate destination must not affect another destination.
1565
+ counts.assigned_count--;
1566
+ if (row.state === "pending")
1567
+ counts.pending_count--;
1568
+ else if (row.state === "in-progress")
1569
+ counts.in_progress_count--;
1570
+ else
1571
+ counts.blocked_count--;
1572
+ }
1573
+ const out = new Map();
1574
+ for (const r of rows) {
1575
+ if (r.assigned_count === 0)
1576
+ continue;
1577
+ const address = physicalSessionName(db, r.destination_session);
1578
+ const prior = out.get(address);
1579
+ out.set(address, {
1580
+ assignedWorkCount: (prior?.assignedWorkCount ?? 0) + r.assigned_count,
1581
+ pendingWorkCount: (prior?.pendingWorkCount ?? 0) + r.pending_count,
1582
+ inProgressWorkCount: (prior?.inProgressWorkCount ?? 0) + r.in_progress_count,
1583
+ blockedWorkCount: (prior?.blockedWorkCount ?? 0) + r.blocked_count,
1584
+ });
1585
+ }
1586
+ return out;
1587
+ })();
1515
1588
  }
1516
1589
  /**
1517
1590
  * The capture-free answer from a seat's newest hook and its cached pane reading, before motion is applied, or `null`
@@ -1521,8 +1594,11 @@ export function readAssignedWorkBySession(db) {
1521
1594
  export function hookOrPaneActivity(hookActivity, structural,
1522
1595
  /** A positive idle hook gives way to a current complete idle frame (D2). */
1523
1596
  idleYieldsToFrame = false, runtime) {
1524
- // Running/needs_input hooks keep their meaning.
1525
- if (hookActivity && hookActivity.state !== "unknown" && !(hookActivity.state === "idle" && idleYieldsToFrame)) {
1597
+ // A current hook-review menu can follow Stop without posting another lifecycle hook. Only a capture begun after
1598
+ // that idle hook replaces it; running/needs_input hooks keep their meaning. The structural cache owns freshness.
1599
+ const newerHookReview = runtime === "codex" && structural?.state === "attention" && structural.reason === "hook_trust_gate"
1600
+ && Date.parse(structural.captureStartedAt ?? "") > Date.parse(hookActivity?.eventAt ?? "");
1601
+ if (hookActivity && hookActivity.state !== "unknown" && !(hookActivity.state === "idle" && (idleYieldsToFrame || newerHookReview))) {
1526
1602
  return { source: "hook", activity: hookActivity };
1527
1603
  }
1528
1604
  // A typed provider-interruption row (Codex at_limit or Claude StopFailure/rate_limit) is positive evidence
@@ -1560,6 +1636,156 @@ idleYieldsToFrame = false, runtime) {
1560
1636
  }
1561
1637
  return null;
1562
1638
  }
1639
+ /** A seat's activity now from a live hook, else the cached pane reading (hookOrPaneActivity), without terminal motion.
1640
+ * Capture-free. Prompt wakes read it; readSeatActivityAsRigPs adds the motion rig ps applies. */
1641
+ export function readCurrentSeatActivity(sources, sessionName) {
1642
+ const runtime = sources.runtimeOf(sessionName);
1643
+ const structural = sources.structural.getStructuralActivity(sessionName);
1644
+ const resolved = hookOrPaneActivity(sources.hooks.getLatestForNode({ sessionName,
1645
+ order: runtime === "claude-code" ? "source" : "arrival" }), structural, false, runtime);
1646
+ return { activity: resolved?.activity ?? null, runtime, structural };
1647
+ }
1648
+ /** A seat's activity as rig ps shows it, capture-free: the hook and the cached pane reading, with the cached terminal
1649
+ * motion lifting idle or unknown to running (capturelessSeatActivity), and the same placeholder for a seat with
1650
+ * neither. The provider plan and apply read it for each seat. One rig ps step isn't applied: rig ps reads an idle seat
1651
+ * as unknown when the identity reconciler's verdict says its tmux couldn't be reached (unseenIdleIsUnknown); here such
1652
+ * a seat still reads idle. */
1653
+ export function readSeatActivityAsRigPs(sources, sessionName) {
1654
+ const now = sources.now?.() ?? new Date();
1655
+ const runtime = sources.runtimeOf(sessionName);
1656
+ const hookActivity = sources.hooks.getLatestForNode({ sessionName, now, order: runtime === "claude-code" ? "source" : "arrival" });
1657
+ const { activity, withMotion } = capturelessSeatActivity({ sessionName, runtime, hookActivity,
1658
+ structural: sources.structural.getStructuralActivity(sessionName), motion: sources.motion.getSeatActivity(sessionName), now,
1659
+ providerFailure: retainedProviderFailure(sources.hooks, { sessionName, runtime, now }, hookActivity) });
1660
+ return activity ?? withMotion({ state: "unknown", reason: "no_runtime_hook", evidenceSource: "session_registry",
1661
+ sampledAt: now.toISOString(), evidence: null, fallback: true });
1662
+ }
1663
+ /**
1664
+ * A seat's activity from what the daemon already holds, capture-free, the way rig ps reads it: its newest hook, the
1665
+ * cached pane reading and the cached terminal motion (needs_input > running > MOTION > idle / unknown). `activity` is
1666
+ * null when there is no hook and no pane verdict; `withMotion` lifts whatever the caller falls back to then.
1667
+ */
1668
+ export function capturelessSeatActivity(input) {
1669
+ const { sessionName, runtime, hookActivity, structural, motion } = input;
1670
+ const sampledAt = input.now;
1671
+ /**
1672
+ * Freshness is decided HERE, at read time, from the RAW `lastActivityAt` against the request
1673
+ * clock — NEVER from the cached `isActiveWithinWindow` boolean alone.
1674
+ *
1675
+ * WHY (dev50-guard HOLD on 29ad1b2b9): `SeatActivityService.pollSeat` returns null on a tmux
1676
+ * error BEFORE it replaces or deletes the cached record, and `pollAllRunningTmuxSeats` only
1677
+ * evicts seats that are no longer running in the DB. A seat still marked running whose tmux read
1678
+ * keeps failing therefore KEEPS its last observation forever — including a `true`. Trusting that
1679
+ * boolean turned an UNAVAILABLE observation into an affirmative liveness claim: ACTIVITY would
1680
+ * report `running` indefinitely after the instrument went dark.
1681
+ *
1682
+ * That is this ladder's own no-fabrication rule broken in the unwatched direction. Three guards
1683
+ * below stop motion inventing `idle` from silence; none of them stopped a dead cache inventing
1684
+ * `running`. A silent seat and a seat we can no longer SEE are different states, and only the
1685
+ * raw timestamp distinguishes them.
1686
+ *
1687
+ * Fail CLOSED when the fact cannot be aged (absent or unparseable): an un-ageable affirmative is
1688
+ * indistinguishable from a long-dead one, so it must not become a liveness claim.
1689
+ *
1690
+ * The seat's OWN `silenceWindowSeconds` is the threshold — the same one the service used at poll
1691
+ * time. No second threshold is invented here. A negative age (raw fact slightly ahead of the
1692
+ * request clock) still reads live, preserving pollSeat's deliberate clock-skew tolerance.
1693
+ */
1694
+ const motionRunning = (() => {
1695
+ if (motion?.isActiveWithinWindow !== true)
1696
+ return false;
1697
+ const rawMs = motion.lastActivityAt ? Date.parse(motion.lastActivityAt) : Number.NaN;
1698
+ if (!Number.isFinite(rawMs))
1699
+ return false;
1700
+ const ageSeconds = (sampledAt.getTime() - rawMs) / 1000;
1701
+ return ageSeconds < motion.silenceWindowSeconds;
1702
+ })();
1703
+ /**
1704
+ * ACTIVITY D1+D2 — precedence below, except for a current typed usage limit:
1705
+ *
1706
+ * needs_input > running > MOTION > idle / unknown
1707
+ *
1708
+ * A current, target-bound complete idle frame is the narrow idle exception to motion below.
1709
+ * An explicitly unsupported client version also retains unknown rather than inferring work from redraws.
1710
+ * A generic footer or old idle capture is not completed-idle evidence; D2 remains unchanged.
1711
+ * Live motion otherwise UPGRADES a verdict of `idle` or `unknown`; it never touches `needs_input` or an
1712
+ * already-`running` verdict, and it never MANUFACTURES `idle`. That asymmetry is the whole
1713
+ * safety argument, and it is what each half of the defect needs:
1714
+ *
1715
+ * D1 (Codex → unknown) is COVERAGE. A Codex seat has no hook, and the structural matcher is
1716
+ * Claude-shaped over a fixed 8-line tail window, so a tall Codex footer pushes the real work
1717
+ * line out of view and the seat falls to `unknown`. Motion is a fact about bytes on the pane,
1718
+ * so it covers every runtime without a matcher per provider — the treadmill this avoids.
1719
+ * D2 (Claude → idle) is PRECEDENCE. A seat that Stopped and then RESUMED still carries the
1720
+ * stale positive `idle` hook as its latest, and the old early-return handed that back as
1721
+ * authoritative before anything else was consulted. A perfect motion source placed further
1722
+ * down the ladder would still have lost to it. Motion has to outrank a POSITIVE idle hook,
1723
+ * not merely an absent one.
1724
+ *
1725
+ * Why `needs_input` outranks motion: motion cannot tell "working" from "waiting at a prompt" —
1726
+ * any per-second redraw keeps the window fresh. If motion outranked a needs_input TEXT verdict,
1727
+ * a seat asking for permission would be relabelled `running`, and the parking watch would step
1728
+ * over the one seat that is actually blocked.
1729
+ *
1730
+ * Why motion never yields `idle`: a silent window is not evidence of a quiet agent (a seat can
1731
+ * think for a long time without printing). Deriving `idle` from silence would satisfy
1732
+ * "not unknown" by relabelling the default, which is the closed union rotting rather than the
1733
+ * signal improving. Silence therefore leaves the prior verdict exactly as it was.
1734
+ */
1735
+ const withMotion = (activity, currentIdleFrame = false) => {
1736
+ if (!motionRunning || activity.reason === "unrecognized_client_version" || (currentIdleFrame && activity.state === "idle"))
1737
+ return activity;
1738
+ if (activity.state !== "idle" && activity.state !== "unknown")
1739
+ return activity;
1740
+ return {
1741
+ state: "running",
1742
+ reason: "window_activity_motion",
1743
+ evidenceSource: "terminal_activity",
1744
+ sampledAt: motion.lastObservedAt,
1745
+ // The RAW `#{window_activity}` timestamp that earned the verdict — a reader can age it
1746
+ // against their own clock and see for themselves why this seat reads running.
1747
+ evidence: motion.lastActivityAt ?? null,
1748
+ runtime: runtime ?? null,
1749
+ };
1750
+ };
1751
+ const lift = (activity) => withMotion(activity);
1752
+ // Reuse the existing cached capture. Only a complete supported idle frame, bound to this
1753
+ // target and started in a later second than the last write, distinguishes idle redraw from resumed work.
1754
+ // window_activity has second precision: same-second ordering is unknown. Poll/completion time is not write time.
1755
+ const capturedMs = Date.parse(structural?.idleFrame?.captureStartedAt ?? "");
1756
+ const motionMs = Date.parse(motion?.lastActivityAt ?? "");
1757
+ const currentIdleFrame = structural?.state === "agent_idle"
1758
+ && structural.idleFrame?.sessionName === sessionName
1759
+ && structural.idleFrame?.runtime === runtime
1760
+ && Number.isFinite(capturedMs) && capturedMs <= sampledAt.getTime()
1761
+ && sampledAt.getTime() - capturedMs < DEFAULT_STRUCTURAL_STALE_MS
1762
+ && (!motionRunning || (Number.isFinite(motionMs)
1763
+ && Math.floor(capturedMs / 1000) > Math.floor(motionMs / 1000)));
1764
+ // A current Claude auth or billing failure stands over the pane reading and motion, as a limit does (#3571).
1765
+ const providerFailure = providerFailureActivity(input.providerFailure, structural, runtime);
1766
+ if (providerFailure)
1767
+ return { activity: providerFailure, withMotion: lift };
1768
+ // An idle hook alone still yields to motion (D2); when a current complete idle frame exists, report
1769
+ // that frame's provenance instead.
1770
+ const resolved = hookOrPaneActivity(hookActivity, structural, motionRunning && (currentIdleFrame || structural?.reason === "unrecognized_client_version"), runtime);
1771
+ if (resolved?.source === "hook")
1772
+ return { activity: withMotion(resolved.activity), withMotion: lift };
1773
+ if (resolved?.source === "limit")
1774
+ return { activity: resolved.activity, withMotion: lift };
1775
+ if (resolved?.source === "pane")
1776
+ return { activity: withMotion(resolved.activity, currentIdleFrame), withMotion: lift };
1777
+ // No positive hook and no structural verdict. A stale/unknown hook, if one exists, is delivered
1778
+ // HONESTLY as-is (unknown/stale) — never upgraded to a quiet-seat verdict on arrival age alone.
1779
+ // Live motion DOES upgrade it. A demoted hook is not exotic: a seat whose agent process lacks the
1780
+ // relay's launch environment (for example, relaunched outside the product launcher without
1781
+ // OPENRIG_RUNTIME or an occupant generation) posts no new hooks, so its newest stored hook can be
1782
+ // an old one from a prior tenure, read as generation_mismatch. Product-launched seats carry the
1783
+ // generation and post resolvable hooks. Where a hook is demoted, it — not a positive idle one —
1784
+ // is what stands between a working seat and a truthful label.
1785
+ if (hookActivity)
1786
+ return { activity: withMotion(hookActivity), withMotion: lift };
1787
+ return { activity: null, withMotion: lift };
1788
+ }
1563
1789
  export async function attachAgentActivity(entries, deps) {
1564
1790
  const sampledAt = deps.now ?? new Date();
1565
1791
  const captureFallback = deps.captureFallback ?? false;
@@ -1582,135 +1808,21 @@ export async function attachAgentActivity(entries, deps) {
1582
1808
  const motion = entry.canonicalSessionName
1583
1809
  ? deps.seatActivity?.getSeatActivity(entry.canonicalSessionName) ?? null
1584
1810
  : null;
1585
- /**
1586
- * Freshness is decided HERE, at read time, from the RAW `lastActivityAt` against the request
1587
- * clock — NEVER from the cached `isActiveWithinWindow` boolean alone.
1588
- *
1589
- * WHY (dev50-guard HOLD on 29ad1b2b9): `SeatActivityService.pollSeat` returns null on a tmux
1590
- * error BEFORE it replaces or deletes the cached record, and `pollAllRunningTmuxSeats` only
1591
- * evicts seats that are no longer running in the DB. A seat still marked running whose tmux read
1592
- * keeps failing therefore KEEPS its last observation forever — including a `true`. Trusting that
1593
- * boolean turned an UNAVAILABLE observation into an affirmative liveness claim: ACTIVITY would
1594
- * report `running` indefinitely after the instrument went dark.
1595
- *
1596
- * That is this ladder's own no-fabrication rule broken in the unwatched direction. Three guards
1597
- * below stop motion inventing `idle` from silence; none of them stopped a dead cache inventing
1598
- * `running`. A silent seat and a seat we can no longer SEE are different states, and only the
1599
- * raw timestamp distinguishes them.
1600
- *
1601
- * Fail CLOSED when the fact cannot be aged (absent or unparseable): an un-ageable affirmative is
1602
- * indistinguishable from a long-dead one, so it must not become a liveness claim.
1603
- *
1604
- * The seat's OWN `silenceWindowSeconds` is the threshold — the same one the service used at poll
1605
- * time. No second threshold is invented here. A negative age (raw fact slightly ahead of the
1606
- * request clock) still reads live, preserving pollSeat's deliberate clock-skew tolerance.
1607
- */
1608
- const motionRunning = (() => {
1609
- if (motion?.isActiveWithinWindow !== true)
1610
- return false;
1611
- const rawMs = motion.lastActivityAt ? Date.parse(motion.lastActivityAt) : Number.NaN;
1612
- if (!Number.isFinite(rawMs))
1613
- return false;
1614
- const ageSeconds = (sampledAt.getTime() - rawMs) / 1000;
1615
- return ageSeconds < motion.silenceWindowSeconds;
1616
- })();
1617
- /**
1618
- * ACTIVITY D1+D2 — precedence below, except for a current typed usage limit:
1619
- *
1620
- * needs_input > running > MOTION > idle / unknown
1621
- *
1622
- * A current, target-bound complete idle frame is the narrow idle exception to motion below.
1623
- * An explicitly unsupported client version also retains unknown rather than inferring work from redraws.
1624
- * A generic footer or old idle capture is not completed-idle evidence; D2 remains unchanged.
1625
- * Live motion otherwise UPGRADES a verdict of `idle` or `unknown`; it never touches `needs_input` or an
1626
- * already-`running` verdict, and it never MANUFACTURES `idle`. That asymmetry is the whole
1627
- * safety argument, and it is what each half of the defect needs:
1628
- *
1629
- * D1 (Codex → unknown) is COVERAGE. A Codex seat has no hook, and the structural matcher is
1630
- * Claude-shaped over a fixed 8-line tail window, so a tall Codex footer pushes the real work
1631
- * line out of view and the seat falls to `unknown`. Motion is a fact about bytes on the pane,
1632
- * so it covers every runtime without a matcher per provider — the treadmill this avoids.
1633
- * D2 (Claude → idle) is PRECEDENCE. A seat that Stopped and then RESUMED still carries the
1634
- * stale positive `idle` hook as its latest, and the old early-return handed that back as
1635
- * authoritative before anything else was consulted. A perfect motion source placed further
1636
- * down the ladder would still have lost to it. Motion has to outrank a POSITIVE idle hook,
1637
- * not merely an absent one.
1638
- *
1639
- * Why `needs_input` outranks motion: motion cannot tell "working" from "waiting at a prompt" —
1640
- * any per-second redraw keeps the window fresh. If motion outranked a needs_input TEXT verdict,
1641
- * a seat asking for permission would be relabelled `running`, and the parking watch would step
1642
- * over the one seat that is actually blocked.
1643
- *
1644
- * Why motion never yields `idle`: a silent window is not evidence of a quiet agent (a seat can
1645
- * think for a long time without printing). Deriving `idle` from silence would satisfy
1646
- * "not unknown" by relabelling the default, which is the closed union rotting rather than the
1647
- * signal improving. Silence therefore leaves the prior verdict exactly as it was.
1648
- */
1649
- const withMotion = (activity, currentIdleFrame = false) => {
1650
- if (!motionRunning || activity.reason === "unrecognized_client_version" || (currentIdleFrame && activity.state === "idle"))
1651
- return activity;
1652
- if (activity.state !== "idle" && activity.state !== "unknown")
1653
- return activity;
1654
- return {
1655
- state: "running",
1656
- reason: "window_activity_motion",
1657
- evidenceSource: "terminal_activity",
1658
- sampledAt: motion.lastObservedAt,
1659
- // The RAW `#{window_activity}` timestamp that earned the verdict — a reader can age it
1660
- // against their own clock and see for themselves why this seat reads running.
1661
- evidence: motion.lastActivityAt ?? null,
1662
- runtime: entry.runtime ?? null,
1663
- };
1664
- };
1665
1811
  const hookActivity = entry.canonicalSessionName ? deps.activityStore?.getLatestForNode({
1666
1812
  nodeId: entry.nodeId,
1667
1813
  sessionName: entry.canonicalSessionName,
1668
1814
  now: sampledAt,
1669
1815
  order: entry.runtime === "claude-code" ? "source" : "arrival",
1670
1816
  }) : null;
1671
- // Reuse the existing cached capture. Only a complete supported idle frame, bound to this
1672
- // target and started in a later second than the last write, distinguishes idle redraw from resumed work.
1673
- // window_activity has second precision: same-second ordering is unknown. Poll/completion time is not write time.
1674
1817
  const structural = entry.canonicalSessionName
1675
1818
  ? deps.structuralActivity?.getStructuralActivity(entry.canonicalSessionName) ?? null
1676
1819
  : null;
1677
- const capturedMs = Date.parse(structural?.idleFrame?.captureStartedAt ?? "");
1678
- const motionMs = Date.parse(motion?.lastActivityAt ?? "");
1679
- const currentIdleFrame = structural?.state === "agent_idle"
1680
- && structural.idleFrame?.sessionName === entry.canonicalSessionName
1681
- && structural.idleFrame?.runtime === entry.runtime
1682
- && Number.isFinite(capturedMs) && capturedMs <= sampledAt.getTime()
1683
- && sampledAt.getTime() - capturedMs < DEFAULT_STRUCTURAL_STALE_MS
1684
- && (!motionRunning || (Number.isFinite(motionMs)
1685
- && Math.floor(capturedMs / 1000) > Math.floor(motionMs / 1000)));
1686
- // A current Claude auth or billing failure stands over the pane reading and motion, as a limit does (#3571).
1687
- const providerFailure = providerFailureActivity(retainedProviderFailure(deps.activityStore, { nodeId: entry.nodeId,
1688
- sessionName: entry.canonicalSessionName, runtime: entry.runtime, now: sampledAt }, hookActivity), structural, entry.runtime);
1689
- if (providerFailure)
1690
- return { ...entry, agentActivity: providerFailure };
1691
- // An idle hook alone still yields to motion (D2); when a current complete idle frame exists, report
1692
- // that frame's provenance instead.
1693
- const resolved = hookOrPaneActivity(hookActivity, structural, motionRunning && (currentIdleFrame || structural?.reason === "unrecognized_client_version"), entry.runtime);
1694
- if (resolved?.source === "hook")
1695
- return { ...entry, agentActivity: withMotion(resolved.activity) };
1696
- if (resolved?.source === "limit")
1697
- return { ...entry, agentActivity: resolved.activity };
1698
- if (resolved?.source === "pane")
1699
- return { ...entry, agentActivity: withMotion(resolved.activity, currentIdleFrame) };
1700
- // No positive hook and no structural verdict. A stale/unknown hook, if one exists, is delivered
1701
- // HONESTLY as-is (unknown/stale) — never upgraded to a quiet-seat verdict on arrival age alone.
1702
- // Live motion DOES upgrade it. A demoted hook is not exotic: a seat whose agent process lacks the
1703
- // relay's launch environment (for example, relaunched outside the product launcher without
1704
- // OPENRIG_RUNTIME or an occupant generation) posts no new hooks, so its newest stored hook can be
1705
- // an old one from a prior tenure, read as generation_mismatch. Product-launched seats carry the
1706
- // generation and post resolvable hooks. Where a hook is demoted, it — not a positive idle one —
1707
- // is what stands between a working seat and a truthful label.
1708
- if (hookActivity) {
1709
- return {
1710
- ...entry,
1711
- agentActivity: withMotion(hookActivity),
1712
- };
1713
- }
1820
+ const { activity, withMotion } = capturelessSeatActivity({ sessionName: entry.canonicalSessionName ?? "", runtime: entry.runtime,
1821
+ hookActivity, structural, motion, now: sampledAt,
1822
+ providerFailure: retainedProviderFailure(deps.activityStore, { nodeId: entry.nodeId, sessionName: entry.canonicalSessionName,
1823
+ runtime: entry.runtime, now: sampledAt }, hookActivity) });
1824
+ if (activity)
1825
+ return { ...entry, agentActivity: activity };
1714
1826
  if (!captureFallback) {
1715
1827
  // CHEAP DEFAULT — no per-node tmux capture. A hook-less seat's pane-heuristic needs_input
1716
1828
  // still requires ?full/?refresh; running now comes from the capture-FREE motion read above,