@openrig/cli 0.7.21 → 0.7.23

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 (1101) hide show
  1. package/README.md +7 -7
  2. package/daemon/assets/onboarding/01-world-and-purpose.md +2 -1
  3. package/daemon/assets/onboarding/02-self-and-competent-action.md +6 -0
  4. package/daemon/assets/plugins/openrig/.claude-plugin/plugin.json +1 -1
  5. package/daemon/assets/plugins/openrig/.codex-plugin/plugin.json +1 -1
  6. package/daemon/assets/plugins/openrig/.cursor-plugin/plugin.json +1 -1
  7. package/daemon/assets/plugins/openrig/plugin.json +1 -1
  8. package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
  9. package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
  10. package/daemon/assets/plugins/openrig-core/hooks/claude.json +22 -0
  11. package/daemon/assets/plugins/openrig-core/hooks/scripts/activity-relay.cjs +23 -0
  12. package/daemon/assets/plugins/openrig-core/hooks/scripts/compaction-restore-bridge.cjs +82 -9
  13. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +138 -20
  14. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +110 -35
  15. package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +1 -1
  16. package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +7 -5
  17. package/daemon/assets/plugins/openrig-core/skills/refocusing/scripts/trace-to-root.py +32 -6
  18. package/daemon/assets/skills/rigs/SKILL.md +27 -6
  19. package/daemon/context-packs/help/help.md +12 -0
  20. package/daemon/context-packs/help/manifest.yaml +1 -1
  21. package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
  22. package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +27 -7
  23. package/daemon/context-packs/reference/acp-agents.md +2 -1
  24. package/daemon/context-packs/reference/getting-started.md +129 -13
  25. package/daemon/context-packs/reference/manifest.yaml +1 -1
  26. package/daemon/context-packs/reference/rig-spec.md +210 -7
  27. package/daemon/context-packs/reference/tmux-servers.md +46 -2
  28. package/daemon/context-packs/reference/whats-new.md +167 -5
  29. package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
  30. package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
  31. package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
  32. package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
  33. package/daemon/context-packs/skills/claude-compaction-restore/scripts/precompact-hook.mjs +138 -20
  34. package/daemon/context-packs/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +110 -35
  35. package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
  36. package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
  37. package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
  38. package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
  39. package/daemon/context-packs/skills/core/messaging-the-human/SKILL.md +1 -1
  40. package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +3 -3
  41. package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
  42. package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
  43. package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
  44. package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
  45. package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
  46. package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
  47. package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
  48. package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
  49. package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
  50. package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
  51. package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
  52. package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
  53. package/daemon/context-packs/skills/core/working-with-an-openrig-team/manifest.yaml +1 -1
  54. package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
  55. package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
  56. package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
  57. package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
  58. package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
  59. package/daemon/context-packs/skills/openrig-user/SKILL.md +7 -5
  60. package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
  61. package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
  62. package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
  63. package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
  64. package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
  65. package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
  66. package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
  67. package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
  68. package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
  69. package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
  70. package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
  71. package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
  72. package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
  73. package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
  74. package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
  75. package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
  76. package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
  77. package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
  78. package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
  79. package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
  80. package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
  81. package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
  82. package/daemon/context-packs/skills/refocusing/scripts/trace-to-root.py +32 -6
  83. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
  84. package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
  85. package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
  86. package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
  87. package/daemon/context-packs/world-example/manifest.yaml +1 -1
  88. package/daemon/context-packs/world-public/manifest.yaml +1 -1
  89. package/daemon/dist/adapters/claude-code-adapter.d.ts +14 -1
  90. package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
  91. package/daemon/dist/adapters/claude-code-adapter.js +98 -23
  92. package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
  93. package/daemon/dist/adapters/claude-resume.d.ts +3 -1
  94. package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
  95. package/daemon/dist/adapters/claude-resume.js +35 -11
  96. package/daemon/dist/adapters/claude-resume.js.map +1 -1
  97. package/daemon/dist/adapters/claude-settings-transport.d.ts +10 -0
  98. package/daemon/dist/adapters/claude-settings-transport.d.ts.map +1 -0
  99. package/daemon/dist/adapters/claude-settings-transport.js +95 -0
  100. package/daemon/dist/adapters/claude-settings-transport.js.map +1 -0
  101. package/daemon/dist/adapters/codex-activity-relay.d.ts +6 -0
  102. package/daemon/dist/adapters/codex-activity-relay.d.ts.map +1 -0
  103. package/daemon/dist/adapters/codex-activity-relay.js +29 -0
  104. package/daemon/dist/adapters/codex-activity-relay.js.map +1 -0
  105. package/daemon/dist/adapters/codex-runtime-adapter.d.ts +2 -1
  106. package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
  107. package/daemon/dist/adapters/codex-runtime-adapter.js +30 -17
  108. package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  109. package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts.map +1 -1
  110. package/daemon/dist/adapters/community-harness-runtime-adapter.js +19 -4
  111. package/daemon/dist/adapters/community-harness-runtime-adapter.js.map +1 -1
  112. package/daemon/dist/adapters/pi-recovery-rpc.d.ts +17 -0
  113. package/daemon/dist/adapters/pi-recovery-rpc.d.ts.map +1 -0
  114. package/daemon/dist/adapters/pi-recovery-rpc.js +94 -0
  115. package/daemon/dist/adapters/pi-recovery-rpc.js.map +1 -0
  116. package/daemon/dist/adapters/pi-runner-protocol.d.ts +6 -0
  117. package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -1
  118. package/daemon/dist/adapters/pi-runner-protocol.js.map +1 -1
  119. package/daemon/dist/adapters/pi-runner.d.ts +77 -0
  120. package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
  121. package/daemon/dist/adapters/pi-runner.js +644 -43
  122. package/daemon/dist/adapters/pi-runner.js.map +1 -1
  123. package/daemon/dist/adapters/pi-runtime-adapter.d.ts +6 -0
  124. package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
  125. package/daemon/dist/adapters/pi-runtime-adapter.js +11 -0
  126. package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
  127. package/daemon/dist/adapters/pi-runtime-recovery.d.ts +10 -0
  128. package/daemon/dist/adapters/pi-runtime-recovery.d.ts.map +1 -0
  129. package/daemon/dist/adapters/pi-runtime-recovery.js +82 -0
  130. package/daemon/dist/adapters/pi-runtime-recovery.js.map +1 -0
  131. package/daemon/dist/adapters/replace-file.d.ts +5 -2
  132. package/daemon/dist/adapters/replace-file.d.ts.map +1 -1
  133. package/daemon/dist/adapters/replace-file.js +6 -3
  134. package/daemon/dist/adapters/replace-file.js.map +1 -1
  135. package/daemon/dist/adapters/seat-slice.d.ts +19 -0
  136. package/daemon/dist/adapters/seat-slice.d.ts.map +1 -0
  137. package/daemon/dist/adapters/seat-slice.js +29 -0
  138. package/daemon/dist/adapters/seat-slice.js.map +1 -0
  139. package/daemon/dist/adapters/shell-quote.d.ts +1 -0
  140. package/daemon/dist/adapters/shell-quote.d.ts.map +1 -1
  141. package/daemon/dist/adapters/shell-quote.js +6 -0
  142. package/daemon/dist/adapters/shell-quote.js.map +1 -1
  143. package/daemon/dist/adapters/tmux-exec.d.ts.map +1 -1
  144. package/daemon/dist/adapters/tmux-exec.js +4 -2
  145. package/daemon/dist/adapters/tmux-exec.js.map +1 -1
  146. package/daemon/dist/adapters/tmux.d.ts +78 -13
  147. package/daemon/dist/adapters/tmux.d.ts.map +1 -1
  148. package/daemon/dist/adapters/tmux.js +361 -82
  149. package/daemon/dist/adapters/tmux.js.map +1 -1
  150. package/daemon/dist/build-info.js +3 -3
  151. package/daemon/dist/daemon-shutdown.d.ts +8 -0
  152. package/daemon/dist/daemon-shutdown.d.ts.map +1 -1
  153. package/daemon/dist/daemon-shutdown.js +18 -2
  154. package/daemon/dist/daemon-shutdown.js.map +1 -1
  155. package/daemon/dist/db/all-migrations.d.ts.map +1 -1
  156. package/daemon/dist/db/all-migrations.js +24 -0
  157. package/daemon/dist/db/all-migrations.js.map +1 -1
  158. package/daemon/dist/db/migrate.d.ts +15 -1
  159. package/daemon/dist/db/migrate.d.ts.map +1 -1
  160. package/daemon/dist/db/migrate.js +41 -6
  161. package/daemon/dist/db/migrate.js.map +1 -1
  162. package/daemon/dist/db/migrations/179_remote_control_observations.d.ts +10 -0
  163. package/daemon/dist/db/migrations/179_remote_control_observations.d.ts.map +1 -0
  164. package/daemon/dist/db/migrations/179_remote_control_observations.js +20 -0
  165. package/daemon/dist/db/migrations/179_remote_control_observations.js.map +1 -0
  166. package/daemon/dist/db/migrations/180_session_stop_attempt.d.ts +5 -0
  167. package/daemon/dist/db/migrations/180_session_stop_attempt.d.ts.map +1 -0
  168. package/daemon/dist/db/migrations/180_session_stop_attempt.js +7 -0
  169. package/daemon/dist/db/migrations/180_session_stop_attempt.js.map +1 -0
  170. package/daemon/dist/db/migrations/181_node_keep_alive.d.ts +8 -0
  171. package/daemon/dist/db/migrations/181_node_keep_alive.d.ts.map +1 -0
  172. package/daemon/dist/db/migrations/181_node_keep_alive.js +26 -0
  173. package/daemon/dist/db/migrations/181_node_keep_alive.js.map +1 -0
  174. package/daemon/dist/db/migrations/182_queue_items_blocked_on_index.d.ts +7 -0
  175. package/daemon/dist/db/migrations/182_queue_items_blocked_on_index.d.ts.map +1 -0
  176. package/daemon/dist/db/migrations/182_queue_items_blocked_on_index.js +11 -0
  177. package/daemon/dist/db/migrations/182_queue_items_blocked_on_index.js.map +1 -0
  178. package/daemon/dist/db/migrations/183_queue_items_scan_indexes.d.ts +8 -0
  179. package/daemon/dist/db/migrations/183_queue_items_scan_indexes.d.ts.map +1 -0
  180. package/daemon/dist/db/migrations/183_queue_items_scan_indexes.js +13 -0
  181. package/daemon/dist/db/migrations/183_queue_items_scan_indexes.js.map +1 -0
  182. package/daemon/dist/db/migrations/184_network_requests.d.ts +11 -0
  183. package/daemon/dist/db/migrations/184_network_requests.d.ts.map +1 -0
  184. package/daemon/dist/db/migrations/184_network_requests.js +32 -0
  185. package/daemon/dist/db/migrations/184_network_requests.js.map +1 -0
  186. package/daemon/dist/db/migrations/185_seat_cold_starts.d.ts +9 -0
  187. package/daemon/dist/db/migrations/185_seat_cold_starts.d.ts.map +1 -0
  188. package/daemon/dist/db/migrations/185_seat_cold_starts.js +19 -0
  189. package/daemon/dist/db/migrations/185_seat_cold_starts.js.map +1 -0
  190. package/daemon/dist/db/migrations/186_queue_relayed_answers.d.ts +3 -0
  191. package/daemon/dist/db/migrations/186_queue_relayed_answers.d.ts.map +1 -0
  192. package/daemon/dist/db/migrations/186_queue_relayed_answers.js +5 -0
  193. package/daemon/dist/db/migrations/186_queue_relayed_answers.js.map +1 -0
  194. package/daemon/dist/db/migrations/189_rig_seat_slice.d.ts +5 -0
  195. package/daemon/dist/db/migrations/189_rig_seat_slice.d.ts.map +1 -0
  196. package/daemon/dist/db/migrations/189_rig_seat_slice.js +7 -0
  197. package/daemon/dist/db/migrations/189_rig_seat_slice.js.map +1 -0
  198. package/daemon/dist/db/migrations/190_queue_transfer_staging.d.ts +3 -0
  199. package/daemon/dist/db/migrations/190_queue_transfer_staging.d.ts.map +1 -0
  200. package/daemon/dist/db/migrations/190_queue_transfer_staging.js +20 -0
  201. package/daemon/dist/db/migrations/190_queue_transfer_staging.js.map +1 -0
  202. package/daemon/dist/db/migrations/191_network_binding_providers.d.ts +3 -0
  203. package/daemon/dist/db/migrations/191_network_binding_providers.d.ts.map +1 -0
  204. package/daemon/dist/db/migrations/191_network_binding_providers.js +27 -0
  205. package/daemon/dist/db/migrations/191_network_binding_providers.js.map +1 -0
  206. package/daemon/dist/db/migrations/194_workflow_run_title.d.ts +4 -0
  207. package/daemon/dist/db/migrations/194_workflow_run_title.d.ts.map +1 -0
  208. package/daemon/dist/db/migrations/194_workflow_run_title.js +6 -0
  209. package/daemon/dist/db/migrations/194_workflow_run_title.js.map +1 -0
  210. package/daemon/dist/domain/activity-taxonomy.d.ts +14 -0
  211. package/daemon/dist/domain/activity-taxonomy.d.ts.map +1 -1
  212. package/daemon/dist/domain/activity-taxonomy.js.map +1 -1
  213. package/daemon/dist/domain/agent-activity-store.d.ts +61 -0
  214. package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
  215. package/daemon/dist/domain/agent-activity-store.js +261 -48
  216. package/daemon/dist/domain/agent-activity-store.js.map +1 -1
  217. package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
  218. package/daemon/dist/domain/agent-manifest.js +6 -0
  219. package/daemon/dist/domain/agent-manifest.js.map +1 -1
  220. package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
  221. package/daemon/dist/domain/bootstrap-orchestrator.js +14 -3
  222. package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
  223. package/daemon/dist/domain/claude-compaction-enforcer.d.ts +58 -2
  224. package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
  225. package/daemon/dist/domain/claude-compaction-enforcer.js +142 -9
  226. package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
  227. package/daemon/dist/domain/claude-continuation-launch.d.ts +3 -2
  228. package/daemon/dist/domain/claude-continuation-launch.d.ts.map +1 -1
  229. package/daemon/dist/domain/claude-continuation-launch.js +12 -11
  230. package/daemon/dist/domain/claude-continuation-launch.js.map +1 -1
  231. package/daemon/dist/domain/codex-thread-id.d.ts +20 -2
  232. package/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
  233. package/daemon/dist/domain/codex-thread-id.js +69 -4
  234. package/daemon/dist/domain/codex-thread-id.js.map +1 -1
  235. package/daemon/dist/domain/compaction-restore-notice.d.ts +14 -1
  236. package/daemon/dist/domain/compaction-restore-notice.d.ts.map +1 -1
  237. package/daemon/dist/domain/compaction-restore-notice.js +174 -19
  238. package/daemon/dist/domain/compaction-restore-notice.js.map +1 -1
  239. package/daemon/dist/domain/context-packs/seat-recap-store.d.ts.map +1 -1
  240. package/daemon/dist/domain/context-packs/seat-recap-store.js +20 -3
  241. package/daemon/dist/domain/context-packs/seat-recap-store.js.map +1 -1
  242. package/daemon/dist/domain/continuity-policy-materializer.d.ts.map +1 -1
  243. package/daemon/dist/domain/continuity-policy-materializer.js +11 -3
  244. package/daemon/dist/domain/continuity-policy-materializer.js.map +1 -1
  245. package/daemon/dist/domain/core-app-job.d.ts +4 -4
  246. package/daemon/dist/domain/core-app-job.d.ts.map +1 -1
  247. package/daemon/dist/domain/core-app-job.js +4 -59
  248. package/daemon/dist/domain/core-app-job.js.map +1 -1
  249. package/daemon/dist/domain/current-work.d.ts +12 -0
  250. package/daemon/dist/domain/current-work.d.ts.map +1 -1
  251. package/daemon/dist/domain/current-work.js +4 -0
  252. package/daemon/dist/domain/current-work.js.map +1 -1
  253. package/daemon/dist/domain/escalation-owner.d.ts +3 -0
  254. package/daemon/dist/domain/escalation-owner.d.ts.map +1 -1
  255. package/daemon/dist/domain/escalation-owner.js +9 -3
  256. package/daemon/dist/domain/escalation-owner.js.map +1 -1
  257. package/daemon/dist/domain/execution-candidate-reader.d.ts +3 -0
  258. package/daemon/dist/domain/execution-candidate-reader.d.ts.map +1 -1
  259. package/daemon/dist/domain/execution-candidate-reader.js +8 -2
  260. package/daemon/dist/domain/execution-candidate-reader.js.map +1 -1
  261. package/daemon/dist/domain/existing-rig-restore.d.ts +2 -0
  262. package/daemon/dist/domain/existing-rig-restore.d.ts.map +1 -1
  263. package/daemon/dist/domain/existing-rig-restore.js +11 -1
  264. package/daemon/dist/domain/existing-rig-restore.js.map +1 -1
  265. package/daemon/dist/domain/expected-conversation.js +2 -2
  266. package/daemon/dist/domain/expected-conversation.js.map +1 -1
  267. package/daemon/dist/domain/gateway/slack/inbound.d.ts +3 -1
  268. package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
  269. package/daemon/dist/domain/gateway/slack/inbound.js +56 -11
  270. package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
  271. package/daemon/dist/domain/gateway/slack/message.d.ts +1 -4
  272. package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
  273. package/daemon/dist/domain/gateway/slack/message.js +17 -5
  274. package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
  275. package/daemon/dist/domain/gateway/slack/notice-content-dedup.d.ts +23 -0
  276. package/daemon/dist/domain/gateway/slack/notice-content-dedup.d.ts.map +1 -0
  277. package/daemon/dist/domain/gateway/slack/notice-content-dedup.js +87 -0
  278. package/daemon/dist/domain/gateway/slack/notice-content-dedup.js.map +1 -0
  279. package/daemon/dist/domain/gateway/slack/queue-access.d.ts +7 -1
  280. package/daemon/dist/domain/gateway/slack/queue-access.d.ts.map +1 -1
  281. package/daemon/dist/domain/gateway/slack/queue-access.js +1 -0
  282. package/daemon/dist/domain/gateway/slack/queue-access.js.map +1 -1
  283. package/daemon/dist/domain/gateway/slack/settled-asks.d.ts.map +1 -1
  284. package/daemon/dist/domain/gateway/slack/settled-asks.js +17 -3
  285. package/daemon/dist/domain/gateway/slack/settled-asks.js.map +1 -1
  286. package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +0 -17
  287. package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
  288. package/daemon/dist/domain/gateway/slack/slack-delivery.js +10 -40
  289. package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
  290. package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts +3 -1
  291. package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
  292. package/daemon/dist/domain/gateway/slack/slack-subsystem.js +21 -7
  293. package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
  294. package/daemon/dist/domain/harness-not-started-notice.d.ts +5 -2
  295. package/daemon/dist/domain/harness-not-started-notice.d.ts.map +1 -1
  296. package/daemon/dist/domain/harness-not-started-notice.js +46 -15
  297. package/daemon/dist/domain/harness-not-started-notice.js.map +1 -1
  298. package/daemon/dist/domain/health-passive-ceremony.d.ts.map +1 -1
  299. package/daemon/dist/domain/health-passive-ceremony.js +3 -2
  300. package/daemon/dist/domain/health-passive-ceremony.js.map +1 -1
  301. package/daemon/dist/domain/hosts/read-through.d.ts +1 -1
  302. package/daemon/dist/domain/hosts/read-through.d.ts.map +1 -1
  303. package/daemon/dist/domain/hosts/read-through.js +3 -2
  304. package/daemon/dist/domain/hosts/read-through.js.map +1 -1
  305. package/daemon/dist/domain/hosts/remote-daemon-http.d.ts +2 -0
  306. package/daemon/dist/domain/hosts/remote-daemon-http.d.ts.map +1 -1
  307. package/daemon/dist/domain/hosts/remote-daemon-http.js +1 -1
  308. package/daemon/dist/domain/hosts/remote-daemon-http.js.map +1 -1
  309. package/daemon/dist/domain/hot-potato-enforcer.d.ts +3 -3
  310. package/daemon/dist/domain/hot-potato-enforcer.d.ts.map +1 -1
  311. package/daemon/dist/domain/hot-potato-enforcer.js +2 -2
  312. package/daemon/dist/domain/hot-potato-enforcer.js.map +1 -1
  313. package/daemon/dist/domain/human-questions.d.ts +1 -1
  314. package/daemon/dist/domain/human-questions.d.ts.map +1 -1
  315. package/daemon/dist/domain/human-questions.js +2 -0
  316. package/daemon/dist/domain/human-questions.js.map +1 -1
  317. package/daemon/dist/domain/input-read-diagnostic.js +1 -1
  318. package/daemon/dist/domain/input-read-diagnostic.js.map +1 -1
  319. package/daemon/dist/domain/install-planner.d.ts +8 -0
  320. package/daemon/dist/domain/install-planner.d.ts.map +1 -1
  321. package/daemon/dist/domain/install-planner.js +26 -6
  322. package/daemon/dist/domain/install-planner.js.map +1 -1
  323. package/daemon/dist/domain/keep-alive-supervisor.d.ts +178 -0
  324. package/daemon/dist/domain/keep-alive-supervisor.d.ts.map +1 -0
  325. package/daemon/dist/domain/keep-alive-supervisor.js +523 -0
  326. package/daemon/dist/domain/keep-alive-supervisor.js.map +1 -0
  327. package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.d.ts +6 -0
  328. package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.d.ts.map +1 -1
  329. package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.js +39 -9
  330. package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.js.map +1 -1
  331. package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
  332. package/daemon/dist/domain/mission-control/mission-control-write-contract.js +29 -1
  333. package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
  334. package/daemon/dist/domain/model-divergence/current-generation-record.d.ts +4 -1
  335. package/daemon/dist/domain/model-divergence/current-generation-record.d.ts.map +1 -1
  336. package/daemon/dist/domain/model-divergence/current-generation-record.js +18 -2
  337. package/daemon/dist/domain/model-divergence/current-generation-record.js.map +1 -1
  338. package/daemon/dist/domain/mutation-trace.d.ts +28 -0
  339. package/daemon/dist/domain/mutation-trace.d.ts.map +1 -0
  340. package/daemon/dist/domain/mutation-trace.js +38 -0
  341. package/daemon/dist/domain/mutation-trace.js.map +1 -0
  342. package/daemon/dist/domain/native-resume-probe.d.ts +13 -3
  343. package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
  344. package/daemon/dist/domain/native-resume-probe.js +54 -17
  345. package/daemon/dist/domain/native-resume-probe.js.map +1 -1
  346. package/daemon/dist/domain/network/hub-client.d.ts +30 -1
  347. package/daemon/dist/domain/network/hub-client.d.ts.map +1 -1
  348. package/daemon/dist/domain/network/hub-client.js +62 -9
  349. package/daemon/dist/domain/network/hub-client.js.map +1 -1
  350. package/daemon/dist/domain/network/network-bindings.d.ts +52 -2
  351. package/daemon/dist/domain/network/network-bindings.d.ts.map +1 -1
  352. package/daemon/dist/domain/network/network-bindings.js +217 -23
  353. package/daemon/dist/domain/network/network-bindings.js.map +1 -1
  354. package/daemon/dist/domain/network/network-connector.d.ts +9 -1
  355. package/daemon/dist/domain/network/network-connector.d.ts.map +1 -1
  356. package/daemon/dist/domain/network/network-connector.js +95 -7
  357. package/daemon/dist/domain/network/network-connector.js.map +1 -1
  358. package/daemon/dist/domain/network/network-installations.d.ts.map +1 -1
  359. package/daemon/dist/domain/network/network-installations.js +22 -7
  360. package/daemon/dist/domain/network/network-installations.js.map +1 -1
  361. package/daemon/dist/domain/network/network-provider-removal.d.ts +9 -0
  362. package/daemon/dist/domain/network/network-provider-removal.d.ts.map +1 -0
  363. package/daemon/dist/domain/network/network-provider-removal.js +75 -0
  364. package/daemon/dist/domain/network/network-provider-removal.js.map +1 -0
  365. package/daemon/dist/domain/network/network-requests.d.ts +59 -0
  366. package/daemon/dist/domain/network/network-requests.d.ts.map +1 -0
  367. package/daemon/dist/domain/network/network-requests.js +476 -0
  368. package/daemon/dist/domain/network/network-requests.js.map +1 -0
  369. package/daemon/dist/domain/node-inventory.d.ts +26 -0
  370. package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
  371. package/daemon/dist/domain/node-inventory.js +93 -9
  372. package/daemon/dist/domain/node-inventory.js.map +1 -1
  373. package/daemon/dist/domain/occupant-invalidator.d.ts +1 -1
  374. package/daemon/dist/domain/occupant-invalidator.d.ts.map +1 -1
  375. package/daemon/dist/domain/occupant-invalidator.js +1 -1
  376. package/daemon/dist/domain/occupant-invalidator.js.map +1 -1
  377. package/daemon/dist/domain/outbox-handler.d.ts +11 -0
  378. package/daemon/dist/domain/outbox-handler.d.ts.map +1 -1
  379. package/daemon/dist/domain/outbox-handler.js +20 -0
  380. package/daemon/dist/domain/outbox-handler.js.map +1 -1
  381. package/daemon/dist/domain/package-install-service.d.ts +1 -0
  382. package/daemon/dist/domain/package-install-service.d.ts.map +1 -1
  383. package/daemon/dist/domain/package-install-service.js +1 -0
  384. package/daemon/dist/domain/package-install-service.js.map +1 -1
  385. package/daemon/dist/domain/parked-owner-escalation.d.ts +16 -0
  386. package/daemon/dist/domain/parked-owner-escalation.d.ts.map +1 -0
  387. package/daemon/dist/domain/parked-owner-escalation.js +53 -0
  388. package/daemon/dist/domain/parked-owner-escalation.js.map +1 -0
  389. package/daemon/dist/domain/parked-query.d.ts +6 -0
  390. package/daemon/dist/domain/parked-query.d.ts.map +1 -1
  391. package/daemon/dist/domain/parked-query.js +20 -7
  392. package/daemon/dist/domain/parked-query.js.map +1 -1
  393. package/daemon/dist/domain/permission-stop-observation.d.ts +8 -1
  394. package/daemon/dist/domain/permission-stop-observation.d.ts.map +1 -1
  395. package/daemon/dist/domain/permission-stop-observation.js +19 -2
  396. package/daemon/dist/domain/permission-stop-observation.js.map +1 -1
  397. package/daemon/dist/domain/policies/parked-owner-consumer.d.ts +13 -0
  398. package/daemon/dist/domain/policies/parked-owner-consumer.d.ts.map +1 -1
  399. package/daemon/dist/domain/policies/parked-owner-consumer.js +24 -1
  400. package/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -1
  401. package/daemon/dist/domain/policies/seat-pool.d.ts +15 -1
  402. package/daemon/dist/domain/policies/seat-pool.d.ts.map +1 -1
  403. package/daemon/dist/domain/policies/seat-pool.js +31 -8
  404. package/daemon/dist/domain/policies/seat-pool.js.map +1 -1
  405. package/daemon/dist/domain/process-census.d.ts +5 -1
  406. package/daemon/dist/domain/process-census.d.ts.map +1 -1
  407. package/daemon/dist/domain/process-census.js +20 -11
  408. package/daemon/dist/domain/process-census.js.map +1 -1
  409. package/daemon/dist/domain/profile-resolver.d.ts +7 -1
  410. package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
  411. package/daemon/dist/domain/profile-resolver.js +7 -0
  412. package/daemon/dist/domain/profile-resolver.js.map +1 -1
  413. package/daemon/dist/domain/progress/progress-indexer.d.ts.map +1 -1
  414. package/daemon/dist/domain/progress/progress-indexer.js +11 -0
  415. package/daemon/dist/domain/progress/progress-indexer.js.map +1 -1
  416. package/daemon/dist/domain/project-lifecycle-compiler.d.ts.map +1 -1
  417. package/daemon/dist/domain/project-lifecycle-compiler.js +4 -1
  418. package/daemon/dist/domain/project-lifecycle-compiler.js.map +1 -1
  419. package/daemon/dist/domain/proof/judgments.d.ts +10 -0
  420. package/daemon/dist/domain/proof/judgments.d.ts.map +1 -1
  421. package/daemon/dist/domain/proof/judgments.js +31 -11
  422. package/daemon/dist/domain/proof/judgments.js.map +1 -1
  423. package/daemon/dist/domain/proof/source-watch.js +4 -4
  424. package/daemon/dist/domain/proof/source-watch.js.map +1 -1
  425. package/daemon/dist/domain/provider/claude-interruption.d.ts +6 -0
  426. package/daemon/dist/domain/provider/claude-interruption.d.ts.map +1 -1
  427. package/daemon/dist/domain/provider/claude-interruption.js +18 -0
  428. package/daemon/dist/domain/provider/claude-interruption.js.map +1 -1
  429. package/daemon/dist/domain/provider/codex-limit-banner.d.ts +17 -1
  430. package/daemon/dist/domain/provider/codex-limit-banner.d.ts.map +1 -1
  431. package/daemon/dist/domain/provider/codex-limit-banner.js +38 -5
  432. package/daemon/dist/domain/provider/codex-limit-banner.js.map +1 -1
  433. package/daemon/dist/domain/ps-projection.d.ts +17 -1
  434. package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
  435. package/daemon/dist/domain/ps-projection.js +41 -6
  436. package/daemon/dist/domain/ps-projection.js.map +1 -1
  437. package/daemon/dist/domain/queue-erasure.d.ts +3 -0
  438. package/daemon/dist/domain/queue-erasure.d.ts.map +1 -1
  439. package/daemon/dist/domain/queue-erasure.js +2 -2
  440. package/daemon/dist/domain/queue-erasure.js.map +1 -1
  441. package/daemon/dist/domain/queue-owner.d.ts +5 -0
  442. package/daemon/dist/domain/queue-owner.d.ts.map +1 -1
  443. package/daemon/dist/domain/queue-owner.js +16 -8
  444. package/daemon/dist/domain/queue-owner.js.map +1 -1
  445. package/daemon/dist/domain/queue-read-wait.d.ts +12 -0
  446. package/daemon/dist/domain/queue-read-wait.d.ts.map +1 -0
  447. package/daemon/dist/domain/queue-read-wait.js +43 -0
  448. package/daemon/dist/domain/queue-read-wait.js.map +1 -0
  449. package/daemon/dist/domain/queue-recorded-graph.d.ts +32 -0
  450. package/daemon/dist/domain/queue-recorded-graph.d.ts.map +1 -0
  451. package/daemon/dist/domain/queue-recorded-graph.js +84 -0
  452. package/daemon/dist/domain/queue-recorded-graph.js.map +1 -0
  453. package/daemon/dist/domain/queue-repository.d.ts +143 -8
  454. package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  455. package/daemon/dist/domain/queue-repository.js +689 -59
  456. package/daemon/dist/domain/queue-repository.js.map +1 -1
  457. package/daemon/dist/domain/queue-retention.d.ts +1 -1
  458. package/daemon/dist/domain/queue-retention.d.ts.map +1 -1
  459. package/daemon/dist/domain/queue-retention.js +4 -0
  460. package/daemon/dist/domain/queue-retention.js.map +1 -1
  461. package/daemon/dist/domain/queue-stuck-sweep.d.ts +10 -4
  462. package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
  463. package/daemon/dist/domain/queue-stuck-sweep.js +169 -21
  464. package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
  465. package/daemon/dist/domain/queue-transfer-export.d.ts +75 -0
  466. package/daemon/dist/domain/queue-transfer-export.d.ts.map +1 -0
  467. package/daemon/dist/domain/queue-transfer-export.js +156 -0
  468. package/daemon/dist/domain/queue-transfer-export.js.map +1 -0
  469. package/daemon/dist/domain/queue-transfer-format.d.ts +15 -0
  470. package/daemon/dist/domain/queue-transfer-format.d.ts.map +1 -0
  471. package/daemon/dist/domain/queue-transfer-format.js +32 -0
  472. package/daemon/dist/domain/queue-transfer-format.js.map +1 -0
  473. package/daemon/dist/domain/queue-transfer-parse.d.ts +40 -0
  474. package/daemon/dist/domain/queue-transfer-parse.d.ts.map +1 -0
  475. package/daemon/dist/domain/queue-transfer-parse.js +131 -0
  476. package/daemon/dist/domain/queue-transfer-parse.js.map +1 -0
  477. package/daemon/dist/domain/queue-transfer-review.d.ts +22 -0
  478. package/daemon/dist/domain/queue-transfer-review.d.ts.map +1 -0
  479. package/daemon/dist/domain/queue-transfer-review.js +81 -0
  480. package/daemon/dist/domain/queue-transfer-review.js.map +1 -0
  481. package/daemon/dist/domain/queue-transfer-staging.d.ts +79 -0
  482. package/daemon/dist/domain/queue-transfer-staging.d.ts.map +1 -0
  483. package/daemon/dist/domain/queue-transfer-staging.js +67 -0
  484. package/daemon/dist/domain/queue-transfer-staging.js.map +1 -0
  485. package/daemon/dist/domain/queue-transition-log.js +3 -3
  486. package/daemon/dist/domain/queue-wake-ladder.d.ts +20 -3
  487. package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
  488. package/daemon/dist/domain/queue-wake-ladder.js +299 -41
  489. package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
  490. package/daemon/dist/domain/reconciler.d.ts +27 -2
  491. package/daemon/dist/domain/reconciler.d.ts.map +1 -1
  492. package/daemon/dist/domain/reconciler.js +184 -16
  493. package/daemon/dist/domain/reconciler.js.map +1 -1
  494. package/daemon/dist/domain/refusal-trace.d.ts +15 -0
  495. package/daemon/dist/domain/refusal-trace.d.ts.map +1 -0
  496. package/daemon/dist/domain/refusal-trace.js +23 -0
  497. package/daemon/dist/domain/refusal-trace.js.map +1 -0
  498. package/daemon/dist/domain/relayed-answers.d.ts +80 -0
  499. package/daemon/dist/domain/relayed-answers.d.ts.map +1 -0
  500. package/daemon/dist/domain/relayed-answers.js +8 -0
  501. package/daemon/dist/domain/relayed-answers.js.map +1 -0
  502. package/daemon/dist/domain/remote-control-observations.d.ts +50 -0
  503. package/daemon/dist/domain/remote-control-observations.d.ts.map +1 -0
  504. package/daemon/dist/domain/remote-control-observations.js +72 -0
  505. package/daemon/dist/domain/remote-control-observations.js.map +1 -0
  506. package/daemon/dist/domain/restore-attempt-receipt.d.ts.map +1 -1
  507. package/daemon/dist/domain/restore-attempt-receipt.js +8 -2
  508. package/daemon/dist/domain/restore-attempt-receipt.js.map +1 -1
  509. package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
  510. package/daemon/dist/domain/restore-check-service.js +3 -2
  511. package/daemon/dist/domain/restore-check-service.js.map +1 -1
  512. package/daemon/dist/domain/restore-orchestrator.d.ts +70 -14
  513. package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
  514. package/daemon/dist/domain/restore-orchestrator.js +429 -107
  515. package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
  516. package/daemon/dist/domain/return-route.d.ts +9 -2
  517. package/daemon/dist/domain/return-route.d.ts.map +1 -1
  518. package/daemon/dist/domain/return-route.js +22 -1
  519. package/daemon/dist/domain/return-route.js.map +1 -1
  520. package/daemon/dist/domain/rig-lifecycle-service.d.ts.map +1 -1
  521. package/daemon/dist/domain/rig-lifecycle-service.js +4 -1
  522. package/daemon/dist/domain/rig-lifecycle-service.js.map +1 -1
  523. package/daemon/dist/domain/rig-repository.d.ts +38 -3
  524. package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
  525. package/daemon/dist/domain/rig-repository.js +95 -3
  526. package/daemon/dist/domain/rig-repository.js.map +1 -1
  527. package/daemon/dist/domain/rig-teardown.d.ts +22 -7
  528. package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
  529. package/daemon/dist/domain/rig-teardown.js +108 -24
  530. package/daemon/dist/domain/rig-teardown.js.map +1 -1
  531. package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
  532. package/daemon/dist/domain/rigspec-codec.js +12 -0
  533. package/daemon/dist/domain/rigspec-codec.js.map +1 -1
  534. package/daemon/dist/domain/rigspec-exporter.d.ts +14 -0
  535. package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
  536. package/daemon/dist/domain/rigspec-exporter.js +56 -14
  537. package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
  538. package/daemon/dist/domain/rigspec-instantiator.d.ts +32 -3
  539. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  540. package/daemon/dist/domain/rigspec-instantiator.js +135 -29
  541. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  542. package/daemon/dist/domain/rigspec-preflight.d.ts +4 -1
  543. package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
  544. package/daemon/dist/domain/rigspec-preflight.js +9 -1
  545. package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
  546. package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  547. package/daemon/dist/domain/rigspec-schema.js +30 -4
  548. package/daemon/dist/domain/rigspec-schema.js.map +1 -1
  549. package/daemon/dist/domain/rosters.d.ts +1 -0
  550. package/daemon/dist/domain/rosters.d.ts.map +1 -1
  551. package/daemon/dist/domain/rosters.js +5 -4
  552. package/daemon/dist/domain/rosters.js.map +1 -1
  553. package/daemon/dist/domain/runtime-adapter.d.ts +2 -0
  554. package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
  555. package/daemon/dist/domain/runtime-recovery.d.ts +41 -0
  556. package/daemon/dist/domain/runtime-recovery.d.ts.map +1 -0
  557. package/daemon/dist/domain/runtime-recovery.js +2 -0
  558. package/daemon/dist/domain/runtime-recovery.js.map +1 -0
  559. package/daemon/dist/domain/seat-activity-service.d.ts +37 -1
  560. package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
  561. package/daemon/dist/domain/seat-activity-service.js +160 -7
  562. package/daemon/dist/domain/seat-activity-service.js.map +1 -1
  563. package/daemon/dist/domain/seat-attention-reconciler.d.ts +7 -0
  564. package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
  565. package/daemon/dist/domain/seat-attention-reconciler.js +149 -65
  566. package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
  567. package/daemon/dist/domain/seat-cold-start.d.ts +150 -0
  568. package/daemon/dist/domain/seat-cold-start.d.ts.map +1 -0
  569. package/daemon/dist/domain/seat-cold-start.js +371 -0
  570. package/daemon/dist/domain/seat-cold-start.js.map +1 -0
  571. package/daemon/dist/domain/seat-delivery-guard.d.ts +11 -2
  572. package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
  573. package/daemon/dist/domain/seat-delivery-guard.js +34 -6
  574. package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
  575. package/daemon/dist/domain/seat-identity-reconciler.d.ts +43 -0
  576. package/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
  577. package/daemon/dist/domain/seat-identity-reconciler.js +109 -23
  578. package/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
  579. package/daemon/dist/domain/seat-identity-store.d.ts +5 -3
  580. package/daemon/dist/domain/seat-identity-store.d.ts.map +1 -1
  581. package/daemon/dist/domain/seat-identity-store.js +7 -3
  582. package/daemon/dist/domain/seat-identity-store.js.map +1 -1
  583. package/daemon/dist/domain/seat-launch-environment.d.ts +2 -0
  584. package/daemon/dist/domain/seat-launch-environment.d.ts.map +1 -1
  585. package/daemon/dist/domain/seat-launch-environment.js +9 -1
  586. package/daemon/dist/domain/seat-launch-environment.js.map +1 -1
  587. package/daemon/dist/domain/seat-lifecycle-service.d.ts +17 -0
  588. package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
  589. package/daemon/dist/domain/seat-lifecycle-service.js +180 -23
  590. package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
  591. package/daemon/dist/domain/seat-pool-executor.d.ts +116 -0
  592. package/daemon/dist/domain/seat-pool-executor.d.ts.map +1 -0
  593. package/daemon/dist/domain/seat-pool-executor.js +565 -0
  594. package/daemon/dist/domain/seat-pool-executor.js.map +1 -0
  595. package/daemon/dist/domain/seat-pool-registration.d.ts +93 -0
  596. package/daemon/dist/domain/seat-pool-registration.d.ts.map +1 -0
  597. package/daemon/dist/domain/seat-pool-registration.js +149 -0
  598. package/daemon/dist/domain/seat-pool-registration.js.map +1 -0
  599. package/daemon/dist/domain/seat-pool-slots.d.ts +42 -0
  600. package/daemon/dist/domain/seat-pool-slots.d.ts.map +1 -1
  601. package/daemon/dist/domain/seat-pool-slots.js +51 -0
  602. package/daemon/dist/domain/seat-pool-slots.js.map +1 -1
  603. package/daemon/dist/domain/seat-pool-spec.d.ts +10 -0
  604. package/daemon/dist/domain/seat-pool-spec.d.ts.map +1 -1
  605. package/daemon/dist/domain/seat-pool-spec.js +22 -2
  606. package/daemon/dist/domain/seat-pool-spec.js.map +1 -1
  607. package/daemon/dist/domain/seat-restart-in-place.d.ts +17 -0
  608. package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -1
  609. package/daemon/dist/domain/seat-restart-in-place.js +57 -4
  610. package/daemon/dist/domain/seat-restart-in-place.js.map +1 -1
  611. package/daemon/dist/domain/seat-runtime-home-record.d.ts +8 -0
  612. package/daemon/dist/domain/seat-runtime-home-record.d.ts.map +1 -1
  613. package/daemon/dist/domain/seat-runtime-home-record.js +1 -1
  614. package/daemon/dist/domain/seat-runtime-home-record.js.map +1 -1
  615. package/daemon/dist/domain/session-registry.d.ts +25 -3
  616. package/daemon/dist/domain/session-registry.d.ts.map +1 -1
  617. package/daemon/dist/domain/session-registry.js +47 -6
  618. package/daemon/dist/domain/session-registry.js.map +1 -1
  619. package/daemon/dist/domain/session-transport.d.ts +28 -1
  620. package/daemon/dist/domain/session-transport.d.ts.map +1 -1
  621. package/daemon/dist/domain/session-transport.js +80 -33
  622. package/daemon/dist/domain/session-transport.js.map +1 -1
  623. package/daemon/dist/domain/slices/slice-indexer.d.ts +59 -0
  624. package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
  625. package/daemon/dist/domain/slices/slice-indexer.js +288 -63
  626. package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
  627. package/daemon/dist/domain/slow-op-recorder.d.ts +3 -1
  628. package/daemon/dist/domain/slow-op-recorder.d.ts.map +1 -1
  629. package/daemon/dist/domain/slow-op-recorder.js +7 -1
  630. package/daemon/dist/domain/slow-op-recorder.js.map +1 -1
  631. package/daemon/dist/domain/startup-orchestrator.d.ts +1 -1
  632. package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
  633. package/daemon/dist/domain/startup-orchestrator.js +75 -23
  634. package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
  635. package/daemon/dist/domain/startup-proof.d.ts +6 -0
  636. package/daemon/dist/domain/startup-proof.d.ts.map +1 -1
  637. package/daemon/dist/domain/startup-proof.js +11 -0
  638. package/daemon/dist/domain/startup-proof.js.map +1 -1
  639. package/daemon/dist/domain/startup-submission-evidence.d.ts +2 -0
  640. package/daemon/dist/domain/startup-submission-evidence.d.ts.map +1 -1
  641. package/daemon/dist/domain/startup-submission-evidence.js +31 -3
  642. package/daemon/dist/domain/startup-submission-evidence.js.map +1 -1
  643. package/daemon/dist/domain/stream-intake.d.ts +10 -1
  644. package/daemon/dist/domain/stream-intake.d.ts.map +1 -1
  645. package/daemon/dist/domain/stream-intake.js +27 -0
  646. package/daemon/dist/domain/stream-intake.js.map +1 -1
  647. package/daemon/dist/domain/terminal/herdr-adapter.d.ts +7 -0
  648. package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
  649. package/daemon/dist/domain/terminal/herdr-adapter.js +5 -3
  650. package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
  651. package/daemon/dist/domain/terminal/herdr-follow-view.d.ts +13 -0
  652. package/daemon/dist/domain/terminal/herdr-follow-view.d.ts.map +1 -1
  653. package/daemon/dist/domain/terminal/herdr-follow-view.js +126 -3
  654. package/daemon/dist/domain/terminal/herdr-follow-view.js.map +1 -1
  655. package/daemon/dist/domain/terminal/herdr-viewer.d.ts +10 -0
  656. package/daemon/dist/domain/terminal/herdr-viewer.d.ts.map +1 -1
  657. package/daemon/dist/domain/terminal/herdr-viewer.js +38 -12
  658. package/daemon/dist/domain/terminal/herdr-viewer.js.map +1 -1
  659. package/daemon/dist/domain/terminal/scope-task-terminal-view.d.ts +2 -1
  660. package/daemon/dist/domain/terminal/scope-task-terminal-view.d.ts.map +1 -1
  661. package/daemon/dist/domain/terminal/scope-task-terminal-view.js +80 -38
  662. package/daemon/dist/domain/terminal/scope-task-terminal-view.js.map +1 -1
  663. package/daemon/dist/domain/terminal/terminal-provider.d.ts +2 -0
  664. package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
  665. package/daemon/dist/domain/terminal/terminal-service.d.ts +3 -0
  666. package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
  667. package/daemon/dist/domain/terminal/terminal-service.js +30 -26
  668. package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
  669. package/daemon/dist/domain/terminal/tile-attach.d.ts +22 -0
  670. package/daemon/dist/domain/terminal/tile-attach.d.ts.map +1 -1
  671. package/daemon/dist/domain/terminal/tile-attach.js +71 -0
  672. package/daemon/dist/domain/terminal/tile-attach.js.map +1 -1
  673. package/daemon/dist/domain/terminal/view-composer.d.ts +2 -0
  674. package/daemon/dist/domain/terminal/view-composer.d.ts.map +1 -1
  675. package/daemon/dist/domain/terminal/view-composer.js +4 -2
  676. package/daemon/dist/domain/terminal/view-composer.js.map +1 -1
  677. package/daemon/dist/domain/terminal-server-reachability.d.ts +14 -7
  678. package/daemon/dist/domain/terminal-server-reachability.d.ts.map +1 -1
  679. package/daemon/dist/domain/terminal-server-reachability.js +29 -11
  680. package/daemon/dist/domain/terminal-server-reachability.js.map +1 -1
  681. package/daemon/dist/domain/terminal-server-seats.d.ts +1 -1
  682. package/daemon/dist/domain/terminal-server-seats.d.ts.map +1 -1
  683. package/daemon/dist/domain/terminal-server-seats.js +4 -1
  684. package/daemon/dist/domain/terminal-server-seats.js.map +1 -1
  685. package/daemon/dist/domain/topology/remote-up-leaf.d.ts.map +1 -1
  686. package/daemon/dist/domain/topology/remote-up-leaf.js +41 -2
  687. package/daemon/dist/domain/topology/remote-up-leaf.js.map +1 -1
  688. package/daemon/dist/domain/topology-trace.d.ts +40 -0
  689. package/daemon/dist/domain/topology-trace.d.ts.map +1 -0
  690. package/daemon/dist/domain/topology-trace.js +106 -0
  691. package/daemon/dist/domain/topology-trace.js.map +1 -0
  692. package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
  693. package/daemon/dist/domain/transcript-store.js +12 -1
  694. package/daemon/dist/domain/transcript-store.js.map +1 -1
  695. package/daemon/dist/domain/types.d.ts +111 -14
  696. package/daemon/dist/domain/types.d.ts.map +1 -1
  697. package/daemon/dist/domain/types.js +3 -2
  698. package/daemon/dist/domain/types.js.map +1 -1
  699. package/daemon/dist/domain/user-settings/settings-browser.d.ts.map +1 -1
  700. package/daemon/dist/domain/user-settings/settings-browser.js +6 -2
  701. package/daemon/dist/domain/user-settings/settings-browser.js.map +1 -1
  702. package/daemon/dist/domain/user-settings/settings-store.d.ts +1 -1
  703. package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
  704. package/daemon/dist/domain/user-settings/settings-store.js +26 -0
  705. package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
  706. package/daemon/dist/domain/watchdog-jobs-repository.d.ts +11 -3
  707. package/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -1
  708. package/daemon/dist/domain/watchdog-jobs-repository.js +23 -1
  709. package/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
  710. package/daemon/dist/domain/watchdog-policy-engine.d.ts +35 -1
  711. package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
  712. package/daemon/dist/domain/watchdog-policy-engine.js +99 -23
  713. package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
  714. package/daemon/dist/domain/workflow-instance-store.d.ts +2 -0
  715. package/daemon/dist/domain/workflow-instance-store.d.ts.map +1 -1
  716. package/daemon/dist/domain/workflow-instance-store.js +11 -2
  717. package/daemon/dist/domain/workflow-instance-store.js.map +1 -1
  718. package/daemon/dist/domain/workflow-projector.d.ts +3 -1
  719. package/daemon/dist/domain/workflow-projector.d.ts.map +1 -1
  720. package/daemon/dist/domain/workflow-projector.js +58 -10
  721. package/daemon/dist/domain/workflow-projector.js.map +1 -1
  722. package/daemon/dist/domain/workflow-run-title.d.ts +4 -0
  723. package/daemon/dist/domain/workflow-run-title.d.ts.map +1 -0
  724. package/daemon/dist/domain/workflow-run-title.js +5 -0
  725. package/daemon/dist/domain/workflow-run-title.js.map +1 -0
  726. package/daemon/dist/domain/workflow-runtime.d.ts +4 -0
  727. package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
  728. package/daemon/dist/domain/workflow-runtime.js +45 -14
  729. package/daemon/dist/domain/workflow-runtime.js.map +1 -1
  730. package/daemon/dist/domain/workflow-spec-cache.d.ts +2 -2
  731. package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
  732. package/daemon/dist/domain/workflow-spec-cache.js +20 -1
  733. package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
  734. package/daemon/dist/domain/workflow-types.d.ts +15 -0
  735. package/daemon/dist/domain/workflow-types.d.ts.map +1 -1
  736. package/daemon/dist/domain/workflow-types.js +4 -0
  737. package/daemon/dist/domain/workflow-types.js.map +1 -1
  738. package/daemon/dist/domain/workspace/project-catalog.d.ts +7 -0
  739. package/daemon/dist/domain/workspace/project-catalog.d.ts.map +1 -1
  740. package/daemon/dist/domain/workspace/project-catalog.js +20 -3
  741. package/daemon/dist/domain/workspace/project-catalog.js.map +1 -1
  742. package/daemon/dist/domain/workspace/project-read.d.ts +12 -0
  743. package/daemon/dist/domain/workspace/project-read.d.ts.map +1 -1
  744. package/daemon/dist/domain/workspace/project-read.js +37 -5
  745. package/daemon/dist/domain/workspace/project-read.js.map +1 -1
  746. package/daemon/dist/index.d.ts +2 -2
  747. package/daemon/dist/index.d.ts.map +1 -1
  748. package/daemon/dist/index.js +40 -4
  749. package/daemon/dist/index.js.map +1 -1
  750. package/daemon/dist/queue-transfer-export-surface.d.ts +33 -0
  751. package/daemon/dist/queue-transfer-export-surface.d.ts.map +1 -0
  752. package/daemon/dist/queue-transfer-export-surface.js +13 -0
  753. package/daemon/dist/queue-transfer-export-surface.js.map +1 -0
  754. package/daemon/dist/queue-transfer-staging-surface.d.ts +86 -0
  755. package/daemon/dist/queue-transfer-staging-surface.d.ts.map +1 -0
  756. package/daemon/dist/queue-transfer-staging-surface.js +91 -0
  757. package/daemon/dist/queue-transfer-staging-surface.js.map +1 -0
  758. package/daemon/dist/routes/activity.d.ts +9 -1
  759. package/daemon/dist/routes/activity.d.ts.map +1 -1
  760. package/daemon/dist/routes/activity.js +79 -3
  761. package/daemon/dist/routes/activity.js.map +1 -1
  762. package/daemon/dist/routes/compaction.d.ts.map +1 -1
  763. package/daemon/dist/routes/compaction.js +7 -2
  764. package/daemon/dist/routes/compaction.js.map +1 -1
  765. package/daemon/dist/routes/context-packs.d.ts.map +1 -1
  766. package/daemon/dist/routes/context-packs.js +23 -1
  767. package/daemon/dist/routes/context-packs.js.map +1 -1
  768. package/daemon/dist/routes/events.js +7 -4
  769. package/daemon/dist/routes/events.js.map +1 -1
  770. package/daemon/dist/routes/missions.js +4 -4
  771. package/daemon/dist/routes/missions.js.map +1 -1
  772. package/daemon/dist/routes/network.d.ts +2 -0
  773. package/daemon/dist/routes/network.d.ts.map +1 -1
  774. package/daemon/dist/routes/network.js +62 -1
  775. package/daemon/dist/routes/network.js.map +1 -1
  776. package/daemon/dist/routes/packages.js +2 -0
  777. package/daemon/dist/routes/packages.js.map +1 -1
  778. package/daemon/dist/routes/ps.js +13 -2
  779. package/daemon/dist/routes/ps.js.map +1 -1
  780. package/daemon/dist/routes/queue.d.ts +22 -1
  781. package/daemon/dist/routes/queue.d.ts.map +1 -1
  782. package/daemon/dist/routes/queue.js +250 -69
  783. package/daemon/dist/routes/queue.js.map +1 -1
  784. package/daemon/dist/routes/require-sender-identity.d.ts.map +1 -1
  785. package/daemon/dist/routes/require-sender-identity.js +6 -3
  786. package/daemon/dist/routes/require-sender-identity.js.map +1 -1
  787. package/daemon/dist/routes/rigs.js +2 -0
  788. package/daemon/dist/routes/rigs.js.map +1 -1
  789. package/daemon/dist/routes/seat.d.ts.map +1 -1
  790. package/daemon/dist/routes/seat.js +12 -5
  791. package/daemon/dist/routes/seat.js.map +1 -1
  792. package/daemon/dist/routes/sessions.d.ts.map +1 -1
  793. package/daemon/dist/routes/sessions.js +16 -2
  794. package/daemon/dist/routes/sessions.js.map +1 -1
  795. package/daemon/dist/routes/slices.d.ts.map +1 -1
  796. package/daemon/dist/routes/slices.js +16 -7
  797. package/daemon/dist/routes/slices.js.map +1 -1
  798. package/daemon/dist/routes/startup.d.ts.map +1 -1
  799. package/daemon/dist/routes/startup.js +49 -4
  800. package/daemon/dist/routes/startup.js.map +1 -1
  801. package/daemon/dist/routes/stream.d.ts.map +1 -1
  802. package/daemon/dist/routes/stream.js +9 -0
  803. package/daemon/dist/routes/stream.js.map +1 -1
  804. package/daemon/dist/routes/terminal-ws.js +28 -2
  805. package/daemon/dist/routes/terminal-ws.js.map +1 -1
  806. package/daemon/dist/routes/terminal.d.ts.map +1 -1
  807. package/daemon/dist/routes/terminal.js +3 -2
  808. package/daemon/dist/routes/terminal.js.map +1 -1
  809. package/daemon/dist/routes/transport.d.ts.map +1 -1
  810. package/daemon/dist/routes/transport.js +14 -2
  811. package/daemon/dist/routes/transport.js.map +1 -1
  812. package/daemon/dist/routes/up.js +2 -0
  813. package/daemon/dist/routes/up.js.map +1 -1
  814. package/daemon/dist/routes/watchdog.d.ts +1 -1
  815. package/daemon/dist/routes/watchdog.d.ts.map +1 -1
  816. package/daemon/dist/routes/watchdog.js +7 -2
  817. package/daemon/dist/routes/watchdog.js.map +1 -1
  818. package/daemon/dist/routes/workflow.d.ts.map +1 -1
  819. package/daemon/dist/routes/workflow.js +9 -3
  820. package/daemon/dist/routes/workflow.js.map +1 -1
  821. package/daemon/dist/server.d.ts +7 -0
  822. package/daemon/dist/server.d.ts.map +1 -1
  823. package/daemon/dist/server.js +8 -0
  824. package/daemon/dist/server.js.map +1 -1
  825. package/daemon/dist/startup.d.ts +3 -0
  826. package/daemon/dist/startup.d.ts.map +1 -1
  827. package/daemon/dist/startup.js +226 -17
  828. package/daemon/dist/startup.js.map +1 -1
  829. package/daemon/dist/terminal/TerminalSessionBroker.d.ts +10 -0
  830. package/daemon/dist/terminal/TerminalSessionBroker.d.ts.map +1 -1
  831. package/daemon/dist/terminal/TerminalSessionBroker.js +63 -4
  832. package/daemon/dist/terminal/TerminalSessionBroker.js.map +1 -1
  833. package/daemon/dist/tmux-server-start.d.ts +18 -0
  834. package/daemon/dist/tmux-server-start.d.ts.map +1 -1
  835. package/daemon/dist/tmux-server-start.js +29 -0
  836. package/daemon/dist/tmux-server-start.js.map +1 -1
  837. package/daemon/dist/topology-trace-surface.d.ts +2 -0
  838. package/daemon/dist/topology-trace-surface.d.ts.map +1 -0
  839. package/daemon/dist/topology-trace-surface.js +2 -0
  840. package/daemon/dist/topology-trace-surface.js.map +1 -0
  841. package/daemon/docs/reference/acp-agents.md +2 -1
  842. package/daemon/docs/reference/agent-spec.md +3 -1
  843. package/daemon/docs/reference/agent-startup-guide.md +3 -1
  844. package/daemon/docs/reference/agent-state-taxonomy.md +39 -1
  845. package/daemon/docs/reference/author-contracts.md +4 -0
  846. package/daemon/docs/reference/checked-seat-stop.md +11 -1
  847. package/daemon/docs/reference/claude-status-line.md +7 -0
  848. package/daemon/docs/reference/community-harness-examples/agy/agy-plain.yaml +28 -0
  849. package/daemon/docs/reference/community-harness-examples/agy/agy.yaml +27 -0
  850. package/daemon/docs/reference/community-harness-examples/agy/openrig-agy-launch +81 -0
  851. package/daemon/docs/reference/community-harness-examples/agy/openrig-agy-runner.mjs +667 -0
  852. package/daemon/docs/reference/community-harness-presets.md +78 -0
  853. package/daemon/docs/reference/daemon-http-clients.md +133 -20
  854. package/daemon/docs/reference/gateway-participants.md +6 -0
  855. package/daemon/docs/reference/getting-started.md +129 -13
  856. package/daemon/docs/reference/harness-runner-contract.md +7 -5
  857. package/daemon/docs/reference/help.md +12 -0
  858. package/daemon/docs/reference/hosted-members.md +163 -2
  859. package/daemon/docs/reference/inventory-request-diagnostics.md +22 -0
  860. package/daemon/docs/reference/network-connector.md +112 -4
  861. package/daemon/docs/reference/project-workspace.md +19 -2
  862. package/daemon/docs/reference/queue-erasure.md +1 -1
  863. package/daemon/docs/reference/queue-transfer-export.md +38 -0
  864. package/daemon/docs/reference/queue-transfer-staging.md +39 -0
  865. package/daemon/docs/reference/quickstart.md +4 -4
  866. package/daemon/docs/reference/refocus-channel.md +5 -2
  867. package/daemon/docs/reference/rig-bundle.md +1 -1
  868. package/daemon/docs/reference/rig-spec.md +210 -7
  869. package/daemon/docs/reference/rosters.md +18 -3
  870. package/daemon/docs/reference/sdlc-conventions.md +6 -2
  871. package/daemon/docs/reference/seat-delivery.md +41 -7
  872. package/daemon/docs/reference/seat-pools.md +116 -0
  873. package/daemon/docs/reference/terminal-sessions.md +57 -11
  874. package/daemon/docs/reference/tmux-servers.md +46 -2
  875. package/daemon/docs/reference/whats-new.md +167 -5
  876. package/daemon/specs/agents/shared/skills/core/messaging-the-human/SKILL.md +1 -1
  877. package/dist/build-info.js +3 -3
  878. package/dist/bundle-behaviour.d.ts +1 -1
  879. package/dist/client.d.ts +2 -1
  880. package/dist/client.d.ts.map +1 -1
  881. package/dist/client.js +3 -2
  882. package/dist/client.js.map +1 -1
  883. package/dist/commands/broadcast.d.ts.map +1 -1
  884. package/dist/commands/broadcast.js +89 -8
  885. package/dist/commands/broadcast.js.map +1 -1
  886. package/dist/commands/bundle.js +1 -1
  887. package/dist/commands/bundle.js.map +1 -1
  888. package/dist/commands/chatroom.d.ts +3 -0
  889. package/dist/commands/chatroom.d.ts.map +1 -1
  890. package/dist/commands/chatroom.js +9 -2
  891. package/dist/commands/chatroom.js.map +1 -1
  892. package/dist/commands/config-init-workspace.d.ts +1 -1
  893. package/dist/commands/config.d.ts.map +1 -1
  894. package/dist/commands/config.js +4 -2
  895. package/dist/commands/config.js.map +1 -1
  896. package/dist/commands/daemon.d.ts.map +1 -1
  897. package/dist/commands/daemon.js +24 -19
  898. package/dist/commands/daemon.js.map +1 -1
  899. package/dist/commands/exec.d.ts.map +1 -1
  900. package/dist/commands/exec.js +22 -13
  901. package/dist/commands/exec.js.map +1 -1
  902. package/dist/commands/export.d.ts.map +1 -1
  903. package/dist/commands/export.js +5 -1
  904. package/dist/commands/export.js.map +1 -1
  905. package/dist/commands/gateway.d.ts +4 -0
  906. package/dist/commands/gateway.d.ts.map +1 -1
  907. package/dist/commands/gateway.js +37 -0
  908. package/dist/commands/gateway.js.map +1 -1
  909. package/dist/commands/mcp.d.ts.map +1 -1
  910. package/dist/commands/mcp.js +4 -2
  911. package/dist/commands/mcp.js.map +1 -1
  912. package/dist/commands/network.d.ts.map +1 -1
  913. package/dist/commands/network.js +54 -1
  914. package/dist/commands/network.js.map +1 -1
  915. package/dist/commands/package.d.ts.map +1 -1
  916. package/dist/commands/package.js +10 -0
  917. package/dist/commands/package.js.map +1 -1
  918. package/dist/commands/parked.d.ts.map +1 -1
  919. package/dist/commands/parked.js +12 -6
  920. package/dist/commands/parked.js.map +1 -1
  921. package/dist/commands/project-jev.d.ts +1 -1
  922. package/dist/commands/project-worker.d.ts +3 -3
  923. package/dist/commands/provider.d.ts.map +1 -1
  924. package/dist/commands/provider.js +3 -2
  925. package/dist/commands/provider.js.map +1 -1
  926. package/dist/commands/ps.d.ts +12 -1
  927. package/dist/commands/ps.d.ts.map +1 -1
  928. package/dist/commands/ps.js +43 -10
  929. package/dist/commands/ps.js.map +1 -1
  930. package/dist/commands/queue-export.d.ts +3 -0
  931. package/dist/commands/queue-export.d.ts.map +1 -0
  932. package/dist/commands/queue-export.js +67 -0
  933. package/dist/commands/queue-export.js.map +1 -0
  934. package/dist/commands/queue-import.d.ts +4 -0
  935. package/dist/commands/queue-import.d.ts.map +1 -0
  936. package/dist/commands/queue-import.js +47 -0
  937. package/dist/commands/queue-import.js.map +1 -0
  938. package/dist/commands/queue.d.ts +1 -1
  939. package/dist/commands/queue.d.ts.map +1 -1
  940. package/dist/commands/queue.js +56 -1
  941. package/dist/commands/queue.js.map +1 -1
  942. package/dist/commands/restore.d.ts.map +1 -1
  943. package/dist/commands/restore.js +51 -8
  944. package/dist/commands/restore.js.map +1 -1
  945. package/dist/commands/roster.d.ts +1 -1
  946. package/dist/commands/roster.js +1 -1
  947. package/dist/commands/roster.js.map +1 -1
  948. package/dist/commands/scope.d.ts.map +1 -1
  949. package/dist/commands/scope.js +30 -18
  950. package/dist/commands/scope.js.map +1 -1
  951. package/dist/commands/seat.d.ts.map +1 -1
  952. package/dist/commands/seat.js +26 -2
  953. package/dist/commands/seat.js.map +1 -1
  954. package/dist/commands/send.d.ts.map +1 -1
  955. package/dist/commands/send.js +24 -8
  956. package/dist/commands/send.js.map +1 -1
  957. package/dist/commands/slack.d.ts +1 -1
  958. package/dist/commands/snapshot.d.ts.map +1 -1
  959. package/dist/commands/snapshot.js +29 -10
  960. package/dist/commands/snapshot.js.map +1 -1
  961. package/dist/commands/start.d.ts +14 -0
  962. package/dist/commands/start.d.ts.map +1 -1
  963. package/dist/commands/start.js +203 -110
  964. package/dist/commands/start.js.map +1 -1
  965. package/dist/commands/stream-outcome.d.ts +96 -32
  966. package/dist/commands/stream-outcome.d.ts.map +1 -1
  967. package/dist/commands/stream-outcome.js +25 -2
  968. package/dist/commands/stream-outcome.js.map +1 -1
  969. package/dist/commands/up.d.ts +2 -4
  970. package/dist/commands/up.d.ts.map +1 -1
  971. package/dist/commands/up.js +35 -3
  972. package/dist/commands/up.js.map +1 -1
  973. package/dist/commands/watchdog.js +2 -2
  974. package/dist/commands/watchdog.js.map +1 -1
  975. package/dist/commands/workflow.d.ts.map +1 -1
  976. package/dist/commands/workflow.js +8 -1
  977. package/dist/commands/workflow.js.map +1 -1
  978. package/dist/config-store.d.ts +3 -1
  979. package/dist/config-store.d.ts.map +1 -1
  980. package/dist/config-store.js +27 -1
  981. package/dist/config-store.js.map +1 -1
  982. package/dist/cross-host-executor.d.ts +3 -0
  983. package/dist/cross-host-executor.d.ts.map +1 -1
  984. package/dist/cross-host-executor.js +5 -0
  985. package/dist/cross-host-executor.js.map +1 -1
  986. package/dist/daemon-auto-start.d.ts.map +1 -1
  987. package/dist/daemon-auto-start.js +1 -0
  988. package/dist/daemon-auto-start.js.map +1 -1
  989. package/dist/daemon-lifecycle.d.ts +9 -3
  990. package/dist/daemon-lifecycle.d.ts.map +1 -1
  991. package/dist/daemon-lifecycle.js +109 -37
  992. package/dist/daemon-lifecycle.js.map +1 -1
  993. package/dist/daemon-start-lock.d.ts +38 -3
  994. package/dist/daemon-start-lock.d.ts.map +1 -1
  995. package/dist/daemon-start-lock.js +201 -48
  996. package/dist/daemon-start-lock.js.map +1 -1
  997. package/dist/daemon-transport.d.ts +10 -0
  998. package/dist/daemon-transport.d.ts.map +1 -0
  999. package/dist/daemon-transport.js +89 -0
  1000. package/dist/daemon-transport.js.map +1 -0
  1001. package/dist/decisions/stream-consumer.d.ts +2 -2
  1002. package/dist/lib/bundle-source.d.ts.map +1 -1
  1003. package/dist/lib/bundle-source.js +2 -1
  1004. package/dist/lib/bundle-source.js.map +1 -1
  1005. package/dist/lib/codex-auth.d.ts +1 -1
  1006. package/dist/lib/context-git.d.ts.map +1 -1
  1007. package/dist/lib/context-git.js +8 -3
  1008. package/dist/lib/context-git.js.map +1 -1
  1009. package/dist/lib/scope/progress-edit.d.ts.map +1 -1
  1010. package/dist/lib/scope/progress-edit.js +10 -0
  1011. package/dist/lib/scope/progress-edit.js.map +1 -1
  1012. package/dist/lib/scope/scope-fs.d.ts.map +1 -1
  1013. package/dist/lib/scope/scope-fs.js +13 -10
  1014. package/dist/lib/scope/scope-fs.js.map +1 -1
  1015. package/dist/lib/topology-trace.d.ts +3 -34
  1016. package/dist/lib/topology-trace.d.ts.map +1 -1
  1017. package/dist/lib/topology-trace.js +3 -97
  1018. package/dist/lib/topology-trace.js.map +1 -1
  1019. package/dist/lib/work-install.d.ts +1 -1
  1020. package/dist/local-db.d.ts +2 -0
  1021. package/dist/local-db.d.ts.map +1 -1
  1022. package/dist/local-db.js +14 -11
  1023. package/dist/local-db.js.map +1 -1
  1024. package/dist/long-request-fetch.d.ts +2 -1
  1025. package/dist/long-request-fetch.d.ts.map +1 -1
  1026. package/dist/long-request-fetch.js +39 -35
  1027. package/dist/long-request-fetch.js.map +1 -1
  1028. package/dist/mcp-caller-resolver.d.ts +36 -0
  1029. package/dist/mcp-caller-resolver.d.ts.map +1 -0
  1030. package/dist/mcp-caller-resolver.js +82 -0
  1031. package/dist/mcp-caller-resolver.js.map +1 -0
  1032. package/dist/mcp-http.d.ts +48 -5
  1033. package/dist/mcp-http.d.ts.map +1 -1
  1034. package/dist/mcp-http.js +303 -61
  1035. package/dist/mcp-http.js.map +1 -1
  1036. package/dist/mcp-server.d.ts +31 -3
  1037. package/dist/mcp-server.d.ts.map +1 -1
  1038. package/dist/mcp-server.js +191 -58
  1039. package/dist/mcp-server.js.map +1 -1
  1040. package/dist/mcp-surface.d.ts +8 -0
  1041. package/dist/mcp-surface.d.ts.map +1 -0
  1042. package/dist/mcp-surface.js +5 -0
  1043. package/dist/mcp-surface.js.map +1 -0
  1044. package/dist/node-support.d.ts.map +1 -1
  1045. package/dist/node-support.js +10 -0
  1046. package/dist/node-support.js.map +1 -1
  1047. package/dist/release-surface/extract-surface.d.ts.map +1 -1
  1048. package/dist/release-surface/extract-surface.js +14 -2
  1049. package/dist/release-surface/extract-surface.js.map +1 -1
  1050. package/dist/remote-host-ops.d.ts +3 -0
  1051. package/dist/remote-host-ops.d.ts.map +1 -1
  1052. package/dist/remote-host-ops.js +15 -1
  1053. package/dist/remote-host-ops.js.map +1 -1
  1054. package/dist/snapshot-rig-handle.d.ts +12 -0
  1055. package/dist/snapshot-rig-handle.d.ts.map +1 -0
  1056. package/dist/snapshot-rig-handle.js +39 -0
  1057. package/dist/snapshot-rig-handle.js.map +1 -0
  1058. package/mcp.d.ts +1 -0
  1059. package/mcp.js +1 -0
  1060. package/package.json +8 -5
  1061. package/scripts/check-abi.mjs +15 -0
  1062. package/tui/dist/attention/attention-model.d.ts +1 -1
  1063. package/tui/dist/attention/attention-model.d.ts.map +1 -1
  1064. package/tui/dist/attention/attention-model.js +8 -4
  1065. package/tui/dist/attention/attention-model.js.map +1 -1
  1066. package/tui/dist/attention/source-continuity.d.ts +1 -1
  1067. package/tui/dist/crash-cart/start-daemon.d.ts +20 -0
  1068. package/tui/dist/crash-cart/start-daemon.d.ts.map +1 -1
  1069. package/tui/dist/crash-cart/start-daemon.js +56 -0
  1070. package/tui/dist/crash-cart/start-daemon.js.map +1 -1
  1071. package/tui/dist/execution/execution-model.d.ts +2 -0
  1072. package/tui/dist/execution/execution-model.d.ts.map +1 -1
  1073. package/tui/dist/execution/execution-model.js +27 -5
  1074. package/tui/dist/execution/execution-model.js.map +1 -1
  1075. package/tui/dist/execution/workflow-model.d.ts.map +1 -1
  1076. package/tui/dist/execution/workflow-model.js +2 -1
  1077. package/tui/dist/execution/workflow-model.js.map +1 -1
  1078. package/tui/dist/hydrate.d.ts.map +1 -1
  1079. package/tui/dist/hydrate.js +4 -2
  1080. package/tui/dist/hydrate.js.map +1 -1
  1081. package/tui/dist/main.js +26 -9
  1082. package/tui/dist/main.js.map +1 -1
  1083. package/tui/dist/print-for-copy.d.ts +7 -1
  1084. package/tui/dist/print-for-copy.d.ts.map +1 -1
  1085. package/tui/dist/print-for-copy.js +10 -3
  1086. package/tui/dist/print-for-copy.js.map +1 -1
  1087. package/tui/dist/render.d.ts +2 -0
  1088. package/tui/dist/render.d.ts.map +1 -1
  1089. package/tui/dist/render.js +75 -19
  1090. package/tui/dist/render.js.map +1 -1
  1091. package/tui/dist/socket-copy.d.ts +6 -0
  1092. package/tui/dist/socket-copy.d.ts.map +1 -0
  1093. package/tui/dist/socket-copy.js +13 -0
  1094. package/tui/dist/socket-copy.js.map +1 -0
  1095. package/tui/dist/terminal-safe-text.d.ts +39 -0
  1096. package/tui/dist/terminal-safe-text.d.ts.map +1 -0
  1097. package/tui/dist/terminal-safe-text.js +44 -0
  1098. package/tui/dist/terminal-safe-text.js.map +1 -0
  1099. package/tui/dist/topology/host-label.js +5 -5
  1100. package/tui/dist/topology/host-label.js.map +1 -1
  1101. package/tui/dist/types.d.ts +3 -3
@@ -48,6 +48,15 @@ function rigNotFound(handle) {
48
48
  const message = `Rig '${handle}' not found: no rig has that name or id`;
49
49
  return errorResult(JSON.stringify({ error: message }), "rig_not_found", message);
50
50
  }
51
+ /** GET /api/queue/list's page marker (#3572): the limit the daemon applied, and whether more rows matched than it
52
+ * returned. null from a daemon that doesn't send it, or without an explicit 0 or 1, which says nothing either way. */
53
+ function queueListPage(headers) {
54
+ const limit = headers?.get("X-OpenRig-Limit");
55
+ const truncated = headers?.get("X-OpenRig-Truncated");
56
+ if (!limit || !/^\d+$/.test(limit) || (truncated !== "0" && truncated !== "1"))
57
+ return null;
58
+ return { limit: Number(limit), truncated: truncated === "1" };
59
+ }
51
60
  /** structuredContent is an object, so a list comes back as { items }. */
52
61
  function structured(data) {
53
62
  if (data && typeof data === "object" && !Array.isArray(data))
@@ -155,6 +164,10 @@ function takesRequestsOf(member) {
155
164
  ...(member.takes_requests_note ? { takesRequestsNote: member.takes_requests_note } : {}),
156
165
  ...(member.takes_requests_problem ? { takesRequestsProblem: member.takes_requests_problem } : {}) };
157
166
  }
167
+ /** A network participant's roster entry: it records which client its participant uses (or why that value isn't used), or
168
+ * that it takes no requests. Its agent runs elsewhere and reaches the team through this hub, so the hub's terminal for
169
+ * its seat is no evidence of the agent's state. */
170
+ const networkParticipant = (entry) => entry.participant !== undefined || entry.participantProblem !== undefined || entry.takesRequests !== undefined;
158
171
  /** The rows a hosted member's latest ring is read from. */
159
172
  const PRESENCE_ROWS = 50;
160
173
  /** The newest ring among a seat's rows, by its attempt time. Rows for another seat (a daemon that ignored the filter) don't count. */
@@ -446,7 +459,8 @@ function scopeFor(access, seatOf) {
446
459
  * cus-<id>-caller@<rig>). v1 marks no seat as a caller, so for a grant without team/list an item from a seat of this
447
460
  * shape is never the team's question to it, and it can't hand a task to one. The shape only refuses; it never grants
448
461
  * anything, and a grant with team/list doesn't read it. */
449
- const CALLER_SHAPED = /^cus-[^@]+-[^@]+@[^@]+$/;
462
+ // Choose the first eligible hyphen; keeping it out of the prefix repetition prevents repeated splits.
463
+ export const CALLER_SHAPED = /^cus-[^@][^@-]*-[^@]+@[^@]+$/;
450
464
  /** OpenRig's own tags that decide what a person asked about a row sees of its body: what Slack ingestion records about where
451
465
  * the row came from and which parts of its body OpenRig wrote (the sender's channel, the attachments block, the body's
452
466
  * digest), and `gate`, which with `workflow` marks a workflow's internal sign-off so the person's post shows its summary in
@@ -459,8 +473,16 @@ const OPENRIG_PROVENANCE_TAG = /^(?:founder-slack|inbound|shared-channel|gate)$|
459
473
  * address (never team-internal items, other callers' items between themselves, or an external address's items to
460
474
  * another seat), change only the items addressed to its own seat (with the claim and update pairs), follow a handed-on
461
475
  * item only where it came back to it, and read the artifacts of its own items under its named roots. */
476
+ function externalRigNames(access, seat) {
477
+ const peers = access.external?.peerSeats;
478
+ if (peers === undefined)
479
+ return access.rigs;
480
+ return [...new Set([seat, ...peers].filter((value) => !!value)
481
+ .map(value => value.slice(value.lastIndexOf("@") + 1)))];
482
+ }
462
483
  function externalScope(access, seatOf) {
463
- const rigs = new Set(access.rigs);
484
+ const rigs = new Set(externalRigNames(access, seatOf()));
485
+ const peers = access.external?.peerSeats;
464
486
  // team/list makes the caller one of its rigs' participants: it may reach another connected assistant's seat.
465
487
  const participant = access.external?.objects.team?.includes("list") === true;
466
488
  const caller = (value) => typeof value === "string" && value !== "" && value === seatOf();
@@ -471,7 +493,8 @@ function externalScope(access, seatOf) {
471
493
  const parts = value.split("@");
472
494
  return parts.length === 2 && parts[0] !== "" && parts[1] !== "external" && rigs.has(parts[1]);
473
495
  };
474
- const team = (value) => member(value) && !caller(value) && (participant || !CALLER_SHAPED.test(value));
496
+ const team = (value) => typeof value === "string" && !caller(value)
497
+ && (peers !== undefined ? peers.includes(value) : member(value) && (participant || !CALLER_SHAPED.test(value)));
475
498
  // An external address as a source (<local>@external), matched by its shape, not a registry check: a registered person's
476
499
  // id, a scheme-prefixed ref and a shared channel's address (which its unregistered writers post under) all match. The
477
500
  // boundary is the exact destination: only an item addressed to the caller's own seat is reached this way, and show and
@@ -519,9 +542,10 @@ function outOfScope(what, hint) {
519
542
  }
520
543
  /** A new create the grant service's fair-use limit holds back: nothing was written, and it says when to retry with the same
521
544
  * id. `unread`: whether an earlier create with this id was saved couldn't be read. */
522
- function fairUseRetryLater(qitemId, retryAfterSeconds, unread) {
545
+ function fairUseRetryLater(qitemId, retryAfterSeconds, unread, generic = false) {
523
546
  const earlier = unread ? ` Whether an earlier attempt with this id was saved is unknown: check rig_queue_show with qitemId ${qitemId} before retrying.` : "";
524
- const message = `OpenRig: this account has reached its fair-use limit for new work just now. Nothing was created by this call.${earlier}`
547
+ const reason = generic ? "this connection is waiting before accepting new work" : "this account has reached its fair-use limit for new work just now";
548
+ const message = `OpenRig: ${reason}. Nothing was created by this call.${earlier}`
525
549
  + ` Retry after ${retryAfterSeconds} seconds with the same qitemId ${qitemId}. Work you already have continues as usual: read, claim, answer and`
526
550
  + " close it, and to reply to an item addressed to you, put the reply in its resolution when you close it.";
527
551
  return errorResult(message, "fair_use_retry_later", message, { retryable: true, retryAfterSeconds, qitemId, outcome: "not_written", ...(unread ? { earlierAttempt: "unknown" } : {}) });
@@ -613,6 +637,8 @@ const EXTERNAL_TOOLS = {
613
637
  artifact: { read: "rig_artifact_read" },
614
638
  question: { read: "rig_question_list", answer: "rig_question_answer" },
615
639
  };
640
+ /** The person a caller's grant names: an external grant's, or a token-file grant's own binding. */
641
+ const personOf = (access) => access?.external ? access.external.person : access?.person;
616
642
  /** A person tool (access class `person`) acts for the person an external grant names, so a grant without a person isn't
617
643
  * offered it, whatever its objects say. The caller's seat is never taken for a person. */
618
644
  const personTool = (tool) => MCP_OPERATIONS.some((op) => op.tool === tool && op.access === "person");
@@ -770,16 +796,38 @@ function externalInboxInstructions(tools) {
770
796
  `Items addressed to your seat are yours${tools.has("rig_queue_list") ? ": rig_queue_list with owned set lists them" : ""}. For each, claim it (rig_queue_claim), do it, then close it done with closure reason no-follow-on and the answer in resolution (rig_queue_update); the sender reads that answer on the same item. A message is an item too: read it and close it done, with your reply in resolution when it needs one; its sender reads that reply on the same item. Nothing promises to wake you, so check your items again.`,
771
797
  ].join("\n");
772
798
  }
799
+ /** For a token-file grant bound to a person: the same rule as an external grant's person, beside the member's instructions. */
800
+ const FILE_PERSON_INSTRUCTION = "This connection is bound to a person: the team's questions to them are in rig_question_list. Submit only the answer they explicitly give you, with rig_question_answer (the qitemId, the revision you showed them, and the options they chose or exactly what they typed), and never choose for them.";
801
+ function offeredTools(access) {
802
+ const operations = new Map(MCP_OPERATIONS.map(op => [op.tool, op]));
803
+ const external = access?.external ? externalTools(access.external) : null;
804
+ return (tool) => {
805
+ const operation = operations.get(tool);
806
+ if (access?.readOnly && operation?.effect !== "read")
807
+ return false;
808
+ if (external)
809
+ return external.has(tool);
810
+ if (operation?.access === "person")
811
+ return Boolean(access?.person);
812
+ if (!access || access.owner)
813
+ return true;
814
+ return operation?.access === "work" || (operation?.access === "workspace" && access.workspace);
815
+ };
816
+ }
773
817
  function instructionsFor(access, frontDoor = false) {
774
- if (!access?.external)
775
- return frontDoor ? FRONT_DOOR_INSTRUCTIONS : INSTRUCTIONS;
818
+ if (access?.readOnly)
819
+ return ["This connection offers read operations only.", ...sharedInstructions(offeredTools(access))].join("\n");
820
+ if (!access?.external) {
821
+ const base = frontDoor ? FRONT_DOOR_INSTRUCTIONS : INSTRUCTIONS;
822
+ return access?.person ? `${base}\n${FILE_PERSON_INSTRUCTION}` : base;
823
+ }
776
824
  const tools = externalTools(access.external);
777
825
  const workflow = tools.has("rig_queue_claim") && tools.has("rig_queue_update") ? externalInboxInstructions(tools)
778
826
  : tools.has("rig_question_list") || tools.has("rig_question_answer") ? EXTERNAL_PERSON_INSTRUCTIONS : EXTERNAL_INSTRUCTIONS;
779
827
  // Only a grant with team/list may reach another connected assistant's seat, and it lists the team with rig_team.
780
828
  const instructions = tools.has("rig_queue_create")
781
829
  ? `${workflow}\n${askWhichAssistant(tools.has("rig_team"), false)}` : workflow;
782
- return tools.has("rig_team") ? `Discover the team this grant connects you to by calling rig_team without rigId. A sole granted rig is selected automatically; with several, it returns the granted names to choose from.\n${instructions}` : instructions;
830
+ return tools.has("rig_team") ? `Discover the team this grant connects you to by calling rig_team without rigId. A sole granted rig is selected automatically; with several, it returns the granted names to choose from. A network participant's status is its presence.checkIn, not sessionStatus.\n${instructions}` : instructions;
783
831
  }
784
832
  /** The seats of `rigName` that `name` names, each as its actual session: its node's canonical session, or the
785
833
  * pod-member form while the node has no session yet. A name matches, in this order, a seat's session's own name before
@@ -789,15 +837,19 @@ function instructionsFor(access, frontDoor = false) {
789
837
  * seat the caller can't address never decides or shadows one it can. No topology relationship, name convention for a
790
838
  * lead, caller identity or task history supplies a seat. Throws when the rig isn't one active rig here or its node list
791
839
  * can't be read. */
792
- async function namedSeats(client, rigName, name, addressable) {
840
+ async function namedSeats(client, rigName, name, addressable, exactPeers = false) {
841
+ return seatsNamed(await addressableSeats(client, rigName, addressable, exactPeers), name);
842
+ }
843
+ /** The seats of `rigName` the caller may address, as namedSeats reads them from one read of the node list. Throws when the
844
+ * rig isn't one active rig here or its node list can't be read. */
845
+ async function addressableSeats(client, rigName, addressable, exactPeers = false) {
793
846
  const rig = await resolveRigHandle(client, rigName, { strict: true });
794
847
  if (rig.kind !== "resolved")
795
848
  throw new Error(`rig ${rigName} isn't one active rig here`);
796
849
  const nodes = await client.get(`/api/rigs/${encodeURIComponent(rig.id)}/nodes`);
797
850
  if (nodes.status !== 200 || !Array.isArray(nodes.data))
798
851
  throw new Error(`the node list for ${rigName} answered HTTP ${nodes.status}`);
799
- const wanted = seatSlug(name);
800
- const [byOwn, byPodMember, bySlug] = [new Set(), new Set(), new Set()];
852
+ const seats = [];
801
853
  for (const entry of nodes.data) {
802
854
  const { logicalId, rigName: inRig, canonicalSessionName } = (entry ?? {});
803
855
  if (typeof logicalId !== "string" || inRig !== rigName)
@@ -812,19 +864,42 @@ async function namedSeats(client, rigName, name, addressable) {
812
864
  if (dot === -1 && !recorded)
813
865
  continue;
814
866
  const podMember = dot === -1 ? null : `${logicalId.slice(0, dot)}-${logicalId.slice(dot + 1)}`;
815
- const session = recorded ?? `${podMember}@${rigName}`;
816
- const own = session.slice(0, -(rigName.length + 1));
817
- if (!addressable(session))
867
+ const logical = podMember === null ? null : `${podMember}@${rigName}`;
868
+ // Only an explicit peer profile can select a logical alias beside an out-of-scope canonical session.
869
+ // Legacy rig-scoped grants keep their canonical-session filtering.
870
+ const session = (recorded && !exactPeers ? [recorded] : [recorded, logical])
871
+ .find((name) => name !== null && addressable(name));
872
+ if (!session)
818
873
  continue;
819
- if (name === own)
820
- byOwn.add(session);
821
- else if (name === podMember)
822
- byPodMember.add(session);
823
- else if (wanted !== "" && wanted === seatSlug(own))
824
- bySlug.add(session);
874
+ seats.push({ session, own: session.slice(0, -(rigName.length + 1)), podMember, member: dot === -1 ? null : logicalId.slice(dot + 1) });
875
+ }
876
+ return seats;
877
+ }
878
+ /** The seats `name` names among `seats`, by namedSeats' rule. */
879
+ function seatsNamed(seats, name) {
880
+ const wanted = seatSlug(name);
881
+ const [byOwn, byPodMember, bySlug] = [new Set(), new Set(), new Set()];
882
+ for (const seat of seats) {
883
+ if (name === seat.own)
884
+ byOwn.add(seat.session);
885
+ else if (name === seat.podMember)
886
+ byPodMember.add(seat.session);
887
+ else if (wanted !== "" && wanted === seatSlug(seat.own))
888
+ bySlug.add(seat.session);
825
889
  }
826
890
  return [...(byOwn.size > 0 ? byOwn : byPodMember.size > 0 ? byPodMember : bySlug)];
827
891
  }
892
+ /** For a name that names no seat, the seats whose member name it is, compared as slugs: a seat's logical id's member, or,
893
+ * for a seat the grant service named cus-<id>-<connection>, that connection. It only corrects a refusal: nothing is
894
+ * written to any of them. */
895
+ function seatsWithMemberName(seats, name) {
896
+ const wanted = seatSlug(name);
897
+ if (wanted === "")
898
+ return [];
899
+ const connection = (own) => /^cus-[^-]+-(.+)$/.exec(own)?.[1] ?? null;
900
+ return [...new Set(seats.filter((seat) => [seat.member, connection(seat.own)]
901
+ .some((part) => part !== null && seatSlug(part) === wanted)).map((seat) => seat.session))];
902
+ }
828
903
  /** A seat name as a slug: lowercase, with each run of other characters a single hyphen. */
829
904
  const seatSlug = (name) => name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
830
905
  /**
@@ -899,10 +974,20 @@ export function mintUnknownSender() {
899
974
  * @returns McpServer instance (not yet connected to a transport)
900
975
  */
901
976
  export function createMcpServer(client, options = {}) {
977
+ const coreInstructions = instructionsFor(options.access, options.frontDoor === true);
978
+ const introduction = options.instructions?.introduction;
902
979
  const server = new McpServer({
903
980
  name: "openrig",
904
981
  version: CLI_VERSION,
905
- }, { instructions: instructionsFor(options.access, options.frontDoor === true) });
982
+ }, { instructions: introduction ? `${coreInstructions}\n\n${introduction}` : coreInstructions });
983
+ server.registerResource("openrig-coordination", "openrig://reference/coordination", { mimeType: "text/plain" }, async (uri) => ({
984
+ contents: [{ uri: uri.href, mimeType: "text/plain", text: coreInstructions }],
985
+ }));
986
+ for (const { uri, name, mimeType, text } of options.instructions?.resources ?? []) {
987
+ server.registerResource(name, new URL(uri).toString(), { mimeType }, async (requested) => ({
988
+ contents: [{ uri: requested.href, mimeType, text }],
989
+ }));
990
+ }
906
991
  const { access } = options;
907
992
  const clientFactory = options.clientFactory ?? ((url) => new DaemonClient(url));
908
993
  const hostRegistryLoader = options.hostRegistryLoader ?? loadHostRegistry;
@@ -1008,20 +1093,7 @@ export function createMcpServer(client, options = {}) {
1008
1093
  return `[Unknown sender ${unknownSender}: this app has no OpenRig seat (${why}).${said ? ` Its MCP client says it is ${said}.` : ""}`
1009
1094
  + (kind === "task" ? " There's no return address: it follows this by its task id.]" : " There's no return address.]");
1010
1095
  };
1011
- const accessClass = new Map(MCP_OPERATIONS.map((op) => [op.tool, op.access]));
1012
- // A local caller (no access) is offered every tool; an authenticated one, its class's; an external caller, its
1013
- // grant's pairs.
1014
- const external = access?.external ? externalTools(access.external) : null;
1015
- const offered = (tool) => {
1016
- if (external)
1017
- return external.has(tool);
1018
- const kind = accessClass.get(tool);
1019
- if (kind === "person")
1020
- return false;
1021
- if (!access || access.owner)
1022
- return true;
1023
- return kind === "work" || (kind === "workspace" && access.workspace);
1024
- };
1096
+ const offered = offeredTools(access);
1025
1097
  const scope = access && !access.owner ? scopeFor(access, seatOf) : null;
1026
1098
  /** A tool's title and plain opening for a connected assistant (an external grant), whose client shows a person these;
1027
1099
  * rig_whoami's are true for every caller, so it has them everywhere. Another caller keeps the tool's own text, which
@@ -1031,7 +1103,10 @@ export function createMcpServer(client, options = {}) {
1031
1103
  const plain = PLAIN_WORDING[tool];
1032
1104
  if (!plain || !(access?.external || tool === "rig_whoami") || !description.startsWith(plain.replaces))
1033
1105
  return { description, annotations };
1034
- return { title: plain.title, description: plain.with + description.slice(plain.replaces.length), annotations: { ...annotations, title: plain.title } };
1106
+ const network = tool === "rig_team" && options.principalSource === "grant-service";
1107
+ const title = network ? "Show my network" : plain.title;
1108
+ const opening = network ? plain.with.replace("on your team", "on your network") : plain.with;
1109
+ return { title, description: opening + description.slice(plain.replaces.length), annotations: { ...annotations, title } };
1035
1110
  };
1036
1111
  const caller = access ? { authenticated: true, principal: access.principal } : { authenticated: false, identity: "declared" };
1037
1112
  /** For an authenticated non-owner: the error for an item it can't reach (or can't read), else null. `owner` asks
@@ -1596,11 +1671,11 @@ export function createMcpServer(client, options = {}) {
1596
1671
  // another rig's destination. An explicit destination continues through the existing path below.
1597
1672
  if (!scope?.destination(destination))
1598
1673
  return outOfScope("Configured task destination");
1599
- // The receiver is exactly one seat this connection may address, and the item goes to that seat's actual session.
1674
+ // The receiver is exactly one seat this connection may address, using its in-scope canonical or logical address.
1600
1675
  const at = destination.lastIndexOf("@");
1601
1676
  let seats;
1602
1677
  try {
1603
- seats = await namedSeats(client, destination.slice(at + 1), destination.slice(0, at), (seat) => scope?.destination(seat) === true);
1678
+ seats = await namedSeats(client, destination.slice(at + 1), destination.slice(0, at), (seat) => scope?.destination(seat) === true, access.external.peerSeats !== undefined);
1604
1679
  }
1605
1680
  catch {
1606
1681
  return unavailable();
@@ -1624,9 +1699,16 @@ export function createMcpServer(client, options = {}) {
1624
1699
  // refused before the team is read, so the answer doesn't say whether such a seat exists.
1625
1700
  if (named !== "" && !scope?.destination(`${named}@${rigName}`))
1626
1701
  return outOfScope(`Destination ${named}`, omitHint);
1627
- let reachable;
1702
+ let reachable = [];
1703
+ // For a name that names no seat: the seats it may address whose member name it is, which the refusal names.
1704
+ let near = [];
1628
1705
  try {
1629
- reachable = named === "" ? [] : await namedSeats(client, rigName, named, (seat) => scope?.destination(seat) === true);
1706
+ if (named !== "") {
1707
+ const seats = await addressableSeats(client, rigName, (seat) => scope?.destination(seat) === true, access.external.peerSeats !== undefined);
1708
+ reachable = seatsNamed(seats, named);
1709
+ if (reachable.length === 0)
1710
+ near = seatsWithMemberName(seats, named);
1711
+ }
1630
1712
  }
1631
1713
  catch {
1632
1714
  const message = "This connection's team couldn't be read just now, so nothing was written. Try again.";
@@ -1638,9 +1720,12 @@ export function createMcpServer(client, options = {}) {
1638
1720
  }
1639
1721
  // A seat it may not address reads as no seat at all, so a hidden seat's name says nothing about it.
1640
1722
  if (reachable.length === 0) {
1641
- const where = offered("rig_team") ? " rig_team lists the seats you can reach and their names." : " Check the name the person gave.";
1723
+ // A correction, never a send: one seat with that member name is named in full, several are named as ambiguous.
1724
+ const where = near.length === 1 ? ` Use ${near[0]}: its member name is '${named}'.`
1725
+ : near.length > 1 ? ` Several seats here have that member name, so it's ambiguous: ${near.join(", ")}. Pass the one you mean.`
1726
+ : offered("rig_team") ? " rig_team lists the seats you can reach and their names." : " Check the name the person gave.";
1642
1727
  const message = `No seat here is named '${named}', so nothing was written.${where}${omitHint ? ` ${omitHint}` : ""}`;
1643
- return errorResult(message, "destination_not_found", message);
1728
+ return errorResult(message, "destination_not_found", message, near.length > 0 ? { candidates: near } : {});
1644
1729
  }
1645
1730
  destination = reachable[0];
1646
1731
  }
@@ -1667,12 +1752,14 @@ export function createMcpServer(client, options = {}) {
1667
1752
  const id = qitemId ?? `qitem-${new Date().toISOString().replace(/\D/g, "").slice(0, 14)}-${randomBytes(8).toString("hex")}`;
1668
1753
  // The grant service's fair-use limit holds back new work only. A retry of a create that already landed isn't new
1669
1754
  // work: the daemon answers it from the stored row, so it goes through as before.
1670
- const throttle = access?.external?.throttle;
1755
+ const delay = access?.newWorkRetryAfterMs;
1756
+ const throttle = delay === undefined ? access?.external?.throttle
1757
+ : delay > 0 ? { retryAfterSeconds: Math.min(600, Math.max(1, Math.ceil(delay / 1000))) } : undefined;
1671
1758
  if (throttle) {
1672
1759
  let landed = false;
1673
1760
  if (qitemId) {
1674
1761
  try {
1675
- const existing = await client.get(`/api/queue/${encodeURIComponent(qitemId)}`);
1762
+ const existing = await hostGet(target, `/api/queue/${encodeURIComponent(qitemId)}`);
1676
1763
  landed = existing.status < 400 ? true : existing.status === 404 ? false : undefined;
1677
1764
  }
1678
1765
  catch {
@@ -1680,7 +1767,7 @@ export function createMcpServer(client, options = {}) {
1680
1767
  }
1681
1768
  }
1682
1769
  if (landed !== true)
1683
- return fairUseRetryLater(id, throttle.retryAfterSeconds, landed === undefined);
1770
+ return fairUseRetryLater(id, throttle.retryAfterSeconds, landed === undefined, delay !== undefined);
1684
1771
  }
1685
1772
  // With no seat, the task goes to its destination as from the unknown sender, with the note at the top of its body.
1686
1773
  const note = unknownSenderNote("task");
@@ -1719,19 +1806,36 @@ export function createMcpServer(client, options = {}) {
1719
1806
  ...worded("rig_queue_show", "Read one queue item and its transitions. For a task you handed off, this is where its answer is: the state, the closure reason and target, the notes the assignee recorded, and evidenceRef when it names an artifact (read it with rig_artifact_read). When the item was handed on, successor names the next item (on another host: its id and host); follow it with rig_queue_show. null means none was found. A revision names the work it revises in chainOfRecord. The item's sourceSession is who created it, and each transition's actorSession and identityPrincipal (with its grant) name who made that change, not necessarily you; for an external connection, viewer is you (this connection), and createdBy and each transition's actor say whether that one is you (you: null when no principal was recorded to tell). host needs the daemon's owner (the stdio server, an HTTP owner token, or unauthenticated loopback), not an ordinary scoped grant.", READ_ONLY),
1720
1807
  inputSchema: z.object({
1721
1808
  qitemId: z.string().describe("The qitemId returned by rig_queue_create (or any queue item)"),
1809
+ waitSeconds: z.number().int().min(0).max(50).optional().describe("Wait at most this many seconds while this item is pending or in-progress. Omitted or 0 reads immediately. Other states return immediately; no successor is followed. At the bound, waited names a timeout, not completion."),
1722
1810
  host: z.string().min(1).optional().describe("Act on a REGISTERED remote host's daemon instead of this one (rig host list shows the hosts; as --host on the matching rig verb); a write there names this server's seat (rig_whoami) as its sender, as a local write does"),
1723
1811
  }),
1724
- }, async ({ qitemId, host }) => {
1812
+ }, async ({ qitemId, host, waitSeconds }, ctx) => {
1725
1813
  try {
1726
1814
  const target = hostTarget(host);
1727
1815
  if ("content" in target)
1728
1816
  return target;
1729
1817
  const id = encodeURIComponent(qitemId);
1730
- const item = await hostGet(target, `/api/queue/${id}`);
1818
+ let item = await hostGet(target, `/api/queue/${id}`);
1731
1819
  if (item.status >= 400)
1732
1820
  return mapResult(item);
1733
1821
  if (scope && !scope.item(item.data))
1734
1822
  return outOfScope(`Item ${qitemId}`);
1823
+ let waited;
1824
+ if (waitSeconds && ["pending", "in-progress"].includes(String(structured(item.data).state))) {
1825
+ // Scope is checked before parking and again after: the item may have changed parties while waiting.
1826
+ // Only this call gets a longer deadline; the client's ordinary five-second default stays intact.
1827
+ item = await hostGet(target, `/api/queue/${id}?waitSeconds=${waitSeconds}`, {
1828
+ timeoutMs: waitSeconds * 1000 + WAIT_FOR_IDLE_REQUEST_OVERHEAD_MS,
1829
+ signal: options.requestSignal ? AbortSignal.any([ctx.mcpReq.signal, options.requestSignal]) : ctx.mcpReq.signal,
1830
+ });
1831
+ if (item.status >= 400)
1832
+ return mapResult(item);
1833
+ if (scope && !scope.item(item.data))
1834
+ return outOfScope(`Item ${qitemId}`);
1835
+ const { waited: marker, ...row } = structured(item.data);
1836
+ waited = marker;
1837
+ item = { ...item, data: row };
1838
+ }
1735
1839
  const transitions = await hostGet(target, `/api/queue/${id}/transitions`);
1736
1840
  if (transitions.status >= 400)
1737
1841
  return mapResult(transitions);
@@ -1745,7 +1849,7 @@ export function createMcpServer(client, options = {}) {
1745
1849
  const data = view
1746
1850
  ? labelActors({ item: projectForExternal(shownItem, view), transitions: Array.isArray(transitions.data) ? transitions.data.map((t) => projectForExternal(t, view)) : transitions.data }, { seat: seatOf() ?? null, principal: access?.principal ?? null, grant: access?.external?.grant?.id ?? null })
1747
1851
  : { item: shownItem, transitions: transitions.data };
1748
- return mapResult({ status: 200, data: { ...data, ...(handedOn ? { successor } : {}) } }, undefined, { structured: true });
1852
+ return mapResult({ status: 200, data: { ...data, ...(handedOn ? { successor } : {}), ...(waited ? { waited } : {}) } }, undefined, { structured: true });
1749
1853
  }
1750
1854
  catch (err) {
1751
1855
  return caught(err);
@@ -1826,6 +1930,13 @@ export function createMcpServer(client, options = {}) {
1826
1930
  params.set("handedOffFrom", handedOffFrom);
1827
1931
  params.set("limit", String(limit ?? 100));
1828
1932
  const res = await hostGet(target, `/api/queue/list?${params.toString()}`);
1933
+ // Keep pagination metadata beside the items without adding text to the JSON payload read by existing clients.
1934
+ // A daemon that doesn't send a page marker leaves the result as it was.
1935
+ const page = res.status < 400 ? queueListPage(res.headers) : null;
1936
+ const paged = (result) => !page || result.isError ? result : {
1937
+ ...result,
1938
+ structuredContent: { ...result.structuredContent, limit: page.limit, truncated: page.truncated },
1939
+ };
1829
1940
  const ignored = res.status < 400 ? ignoredFilter(res.data, { since, handedOffFrom, tags }) : null;
1830
1941
  if (ignored) {
1831
1942
  const message = `The daemon didn't apply ${ignored}, so this list isn't filtered by it; it needs a newer daemon.`;
@@ -1835,18 +1946,19 @@ export function createMcpServer(client, options = {}) {
1835
1946
  if (scope && res.status < 400 && Array.isArray(res.data)) {
1836
1947
  const view = externalView(scope);
1837
1948
  const rows = res.data.filter((row) => scope.item(row)).map(withoutDaemonLinkedRows);
1838
- const result = mapResult({ ...res, data: view ? rows.map((row) => projectForExternal(row, view)) : rows }, undefined, { structured: true });
1949
+ const result = paged(mapResult({ ...res, data: view ? rows.map((row) => projectForExternal(row, view)) : rows }, undefined, { structured: true }));
1839
1950
  // An external caller's empty inbox says so in a line its assistant can repeat, naming the team as the person
1840
1951
  // knows it. The rows keep their shape; the line rides beside them, only when nothing narrowed the list. The
1841
1952
  // default list holds open items only, so its empty answer says no open requests, never none at all.
1842
1953
  const inbox = access?.external && (owned || mine) && !destination && !source && !state && tags.length === 0 && !since && !handedOffFrom;
1843
- if (!inbox || rows.length > 0)
1954
+ // A cut page can't say that nothing is addressed to the caller.
1955
+ if (!inbox || rows.length > 0 || page?.truncated)
1844
1956
  return result;
1845
1957
  const team = teamPhrase(rosterTeamName(rostersFolder(), sessionName.split("@")[1] ?? "").name);
1846
1958
  const message = `No ${all ? "" : "open "}requests are addressed to you on ${team}.`;
1847
1959
  return { ...result, content: [...result.content, { type: "text", text: message }], structuredContent: { ...result.structuredContent, message } };
1848
1960
  }
1849
- return mapResult(res, undefined, { structured: true });
1961
+ return paged(mapResult(res, undefined, { structured: true }));
1850
1962
  }
1851
1963
  catch (err) {
1852
1964
  return caught(err);
@@ -2042,7 +2154,7 @@ export function createMcpServer(client, options = {}) {
2042
2154
  // 27. rig_team — a rig's seats and its lead
2043
2155
  if (offered("rig_team"))
2044
2156
  server.registerTool("rig_team", {
2045
- ...worded("rig_team", "Show a rig's team. For an external grant, omit rigId to use its sole rig or see its granted names to choose from. The answer includes its lead, the rig's one delegates_to root (the seat that delegates to others and that nothing delegates to: the seat to delegate to), and each seat's pod, role, runtime, delegation (reportsTo, delegatesTo) and activity as the daemon reports it. Activity the daemon doesn't know reads unknown, never idle. hostedMembers are the rig's members that live outside a terminal (roster entries marked hosted): their authored capabilities and limits, with no pane and activity unknown. rig.displayName and a member's label, where a roster authors them, are the names the person knows them by. An entry with takesRequests: false is one whose owner says it takes no requests (takesRequestsNote says why): work sent to it is written, and isn't expected to be picked up. An entry's participant.app and participant.kind, where a roster records them, are which client it uses (such as chatgpt or claude-code) and what kind of participant it is, as the service that gave it access recorded them; absent is unknown, and a seat's own kind is its node kind. Where the daemon names no single lead and exactly one roster entry declares lead_of, lead is that entry with declared: true and its team: the team's entry point for new work, not a manager of others' work, and nothing escalates to it.", READ_ONLY),
2157
+ ...worded("rig_team", "Show a rig's team. For an external grant, omit rigId to use its sole rig or see its granted names to choose from. The answer includes its lead, the rig's one delegates_to root (the seat that delegates to others and that nothing delegates to: the seat to delegate to), and each seat's pod, role, runtime, delegation (reportsTo, delegatesTo) and activity as the daemon reports it. Activity the daemon doesn't know reads unknown, never idle. hostedMembers are the rig's members that live outside a terminal (roster entries marked hosted): their authored capabilities and limits, with no pane and activity unknown. rig.displayName and a member's label, where a roster authors them, are the names the person knows them by. An entry with takesRequests: false is one whose owner says it takes no requests (takesRequestsNote says why): work sent to it is written, and isn't expected to be picked up. An entry's participant.app and participant.kind, where a roster records them, are which client it uses (such as chatgpt or claude-code) and what kind of participant it is, as the service that gave it access recorded them; absent is unknown, and a seat's own kind is its node kind. A network participant's seat (its entry has participant, participantProblem or takesRequests) reads sessionStatus remote and activity unknown: its agent runs elsewhere, so its contact is presence.checkIn, and its pickup is a claim on a row. Where the daemon names no single lead and exactly one roster entry declares lead_of, lead is that entry with declared: true and its team: the team's entry point for new work, not a manager of others' work, and nothing escalates to it.", READ_ONLY),
2046
2158
  inputSchema: z.object({
2047
2159
  rigId: z.string().optional().describe("Rig name or id. A connection from outside the rig (an external grant) usually leaves this out, and the tool finds its team; if it passes one, it must be the granted rig's name, never its id or the team's display name."),
2048
2160
  }),
@@ -2054,7 +2166,7 @@ export function createMcpServer(client, options = {}) {
2054
2166
  const message = "Pass a rig name or identifier as rigId.";
2055
2167
  return errorResult(message, "rig_required", message);
2056
2168
  }
2057
- const rigs = [...new Set(access.rigs)];
2169
+ const rigs = [...new Set(externalRigNames(access, seatOf()))];
2058
2170
  if (rigs.length !== 1)
2059
2171
  return mapResult({ status: 200, data: { rigs,
2060
2172
  message: rigs.length ? "Choose one of this grant's rigs and pass its name as rigId." : "This grant names no rigs; ask the connection operator to check its scope." } }, undefined, { structured: true });
@@ -2084,6 +2196,24 @@ export function createMcpServer(client, options = {}) {
2084
2196
  const inventory = Array.isArray(nodes.data) ? nodes.data : [];
2085
2197
  // A node is a seat whether or not it has a session yet: its address derives from its logical id (pod.member).
2086
2198
  const logicalAddress = (logicalId) => typeof logicalId === "string" ? `${logicalId.replace(".", "-")}@${rigName}` : null;
2199
+ const exactPeers = access?.external?.peerSeats !== undefined;
2200
+ if (exactPeers) {
2201
+ const selected = view.seats.flatMap(seat => {
2202
+ const address = logicalAddress(seat.logicalId);
2203
+ const name = scope?.names?.(seat.session) ? seat.session : address && scope?.names?.(address) ? address : null;
2204
+ return name ? [{ ...seat, session: name }] : [];
2205
+ });
2206
+ const ids = new Set(selected.map(seat => seat.logicalId));
2207
+ const links = (value) => Array.isArray(value) ? value.filter(id => ids.has(id)) : [];
2208
+ view.seats = selected.map(seat => ({ ...seat, reportsTo: links(seat.reportsTo), delegatesTo: links(seat.delegatesTo) }));
2209
+ const lead = view.lead;
2210
+ if (lead) {
2211
+ const visible = selected.find(seat => seat.logicalId === lead.logicalId || seat.session === lead.session);
2212
+ view.lead = visible ? { ...lead, session: visible.session } : null;
2213
+ if (!visible)
2214
+ view.leadNote = "The rig's lead is outside this connection's peer scope.";
2215
+ }
2216
+ }
2087
2217
  const nodeSeats = new Set(inventory.flatMap((seat) => [seat.canonicalSessionName, logicalAddress(seat.logicalId)])
2088
2218
  .filter((name) => typeof name === "string"));
2089
2219
  // An external caller's own seat, under any name it's matched by: its session's name or its logical address, the
@@ -2121,7 +2251,7 @@ export function createMcpServer(client, options = {}) {
2121
2251
  const note = hosted.note ? { hostedMembersNote: hosted.note } : {};
2122
2252
  // A declared entry point names the lead only where the daemon names no single lead; a lead it names always wins.
2123
2253
  // One per seat (either of its names) and team: the same seat declaring two teams is two declarations.
2124
- const resolved = (hosted.declaredLeads ?? []).map((d) => ({ ...d, logicalId: inventory.find((seat) => seat.canonicalSessionName === d.session || logicalAddress(seat.logicalId) === d.session)?.logicalId ?? null }));
2254
+ const resolved = (hosted.declaredLeads ?? []).filter(d => !exactPeers || scope?.names?.(d.session)).map((d) => ({ ...d, logicalId: inventory.find((seat) => seat.canonicalSessionName === d.session || logicalAddress(seat.logicalId) === d.session)?.logicalId ?? null }));
2125
2255
  const declaredSeat = (d) => d.logicalId ?? d.session;
2126
2256
  const led = declaredLead(view, resolved.filter((d, i) => resolved.findIndex((e) => declaredSeat(e) === declaredSeat(d) && e.team === d.team) === i), !!hosted.note);
2127
2257
  // The names a person knows the team by are for a person's assistant on an external grant; an internal caller's
@@ -2133,13 +2263,16 @@ export function createMcpServer(client, options = {}) {
2133
2263
  const seats = view.seats.map((seat) => {
2134
2264
  const address = logicalAddress(seat.logicalId);
2135
2265
  const entry = hosted.seats.get(seat.session) ?? (address ? hosted.seats.get(address) : undefined);
2136
- const merged = entry ? { ...seat, ...entry } : seat;
2266
+ // A network participant reads remote, with its activity unknown: its contact is presence.checkIn (and lastCallAt),
2267
+ // and its pickup is a claim on a row. Absent or stale contact doesn't make it stopped.
2268
+ const remote = entry && networkParticipant(entry) ? { sessionStatus: "remote", activity: "unknown" } : {};
2269
+ const merged = entry ? { ...seat, ...entry, ...remote } : seat;
2137
2270
  if (!ownNames.has(merged.session) && !(address && ownNames.has(address)))
2138
2271
  return merged;
2139
2272
  const { activity: _activity, sessionStatus: _status, ...identity } = merged;
2140
2273
  return identity;
2141
2274
  });
2142
- const hostedMembers = hosted.members.map((member) => {
2275
+ const hostedMembers = hosted.members.filter(member => !exactPeers || scope?.names?.(member.session)).map((member) => {
2143
2276
  if (!ownNames.has(member.session))
2144
2277
  return member;
2145
2278
  const { activity: _activity, ...identity } = member;
@@ -2303,7 +2436,7 @@ export function createMcpServer(client, options = {}) {
2303
2436
  // them are what Steering shows them as answerable, read from Steering's own view of them, and answered through
2304
2437
  // Steering's write path (answer for an ask, resolve for a park), as them, through their own client. The caller's seat
2305
2438
  // is only the route the answer came by.
2306
- const person = access?.external?.person;
2439
+ const person = personOf(access);
2307
2440
  const personAddress = person ? `${person}@external` : undefined;
2308
2441
  const answerable = async () => {
2309
2442
  const res = await client.get(`/api/attention?view=${encodeURIComponent(person ?? "")}`);
@@ -2431,7 +2564,7 @@ export function createMcpServer(client, options = {}) {
2431
2564
  }
2432
2565
  // The route the answer came by, recorded beside it: never the person, and never the caller's own judgment.
2433
2566
  const grant = access?.external?.grant;
2434
- const route = { route: "external-assistant", assistantSeat: seatOf(), principal: access?.principal, ...(grant ? { grant: grant.id, grantVersion: grant.version } : {}), person: personAddress };
2567
+ const route = { route: access?.external ? "external-assistant" : "file-grant", assistantSeat: seatOf(), principal: access?.principal, ...(grant ? { grant: grant.id, grantVersion: grant.version } : {}), person: personAddress };
2435
2568
  // One operation per submission, one id per step: a retry of the same answer to the same revision is recognised by
2436
2569
  // these ids, never by equal answers.
2437
2570
  const operation = `assistant:${createHash("sha256").update(JSON.stringify([grant?.id ?? access?.principal, qitemId, revision, choices ?? null, words ?? null])).digest("hex").slice(0, 24)}`;