@openrig/cli 0.7.2 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (737) hide show
  1. package/README.md +5 -5
  2. package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
  3. package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
  4. package/daemon/assets/plugins/openrig-core/hooks/claude.json +11 -0
  5. package/daemon/assets/plugins/openrig-core/hooks/scripts/activity-relay.cjs +13 -9
  6. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +2 -2
  7. package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +37 -3
  8. package/daemon/assets/plugins/openrig-core/skills/queue-handoff/SKILL.md +4 -0
  9. package/daemon/context-packs/help/help.md +6 -3
  10. package/daemon/context-packs/help/manifest.yaml +1 -1
  11. package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
  12. package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +100 -15
  13. package/daemon/context-packs/reference/getting-started.md +12 -8
  14. package/daemon/context-packs/reference/manifest.yaml +1 -1
  15. package/daemon/context-packs/reference/rig-spec.md +89 -3
  16. package/daemon/context-packs/reference/whats-new.md +109 -282
  17. package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
  18. package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
  19. package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
  20. package/daemon/context-packs/skills/claude-compaction-restore/SKILL.md +2 -2
  21. package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
  22. package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
  23. package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
  24. package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
  25. package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
  26. package/daemon/context-packs/skills/core/messaging-the-human/SKILL.md +37 -3
  27. package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
  28. package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
  29. package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
  30. package/daemon/context-packs/skills/core/openrig-herdr/SKILL.md +5 -2
  31. package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
  32. package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
  33. package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
  34. package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
  35. package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
  36. package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
  37. package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
  38. package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
  39. package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
  40. package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
  41. package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
  42. package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
  43. package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
  44. package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
  45. package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
  46. package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
  47. package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
  48. package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
  49. package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
  50. package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
  51. package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
  52. package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
  53. package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
  54. package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
  55. package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
  56. package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
  57. package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
  58. package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
  59. package/daemon/context-packs/skills/process/agent-browser/SKILL.md +1 -1
  60. package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
  61. package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
  62. package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
  63. package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
  64. package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
  65. package/daemon/context-packs/skills/process/systematic-debugging/root-cause-tracing.md +1 -1
  66. package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
  67. package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
  68. package/daemon/context-packs/skills/queue-handoff/SKILL.md +4 -0
  69. package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
  70. package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
  71. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
  72. package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
  73. package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
  74. package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
  75. package/daemon/context-packs/world-example/manifest.yaml +1 -1
  76. package/daemon/context-packs/world-public/manifest.yaml +1 -1
  77. package/daemon/dist/adapters/claude-code-adapter.d.ts +1 -0
  78. package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
  79. package/daemon/dist/adapters/claude-code-adapter.js +17 -4
  80. package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
  81. package/daemon/dist/adapters/claude-resume.d.ts +1 -1
  82. package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
  83. package/daemon/dist/adapters/claude-resume.js +18 -6
  84. package/daemon/dist/adapters/claude-resume.js.map +1 -1
  85. package/daemon/dist/adapters/codex-resume.d.ts +2 -1
  86. package/daemon/dist/adapters/codex-resume.d.ts.map +1 -1
  87. package/daemon/dist/adapters/codex-resume.js +20 -8
  88. package/daemon/dist/adapters/codex-resume.js.map +1 -1
  89. package/daemon/dist/adapters/codex-runtime-adapter.d.ts +10 -1
  90. package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
  91. package/daemon/dist/adapters/codex-runtime-adapter.js +381 -50
  92. package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  93. package/daemon/dist/adapters/pi-openrouter-charge.d.ts.map +1 -1
  94. package/daemon/dist/adapters/pi-openrouter-charge.js +3 -0
  95. package/daemon/dist/adapters/pi-openrouter-charge.js.map +1 -1
  96. package/daemon/dist/adapters/pi-resume.js +1 -1
  97. package/daemon/dist/adapters/pi-resume.js.map +1 -1
  98. package/daemon/dist/adapters/pi-runner-protocol.d.ts +3 -3
  99. package/daemon/dist/adapters/pi-runner-protocol.js +2 -2
  100. package/daemon/dist/adapters/pi-runner.d.ts +1 -1
  101. package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
  102. package/daemon/dist/adapters/pi-runner.js +13 -4
  103. package/daemon/dist/adapters/pi-runner.js.map +1 -1
  104. package/daemon/dist/adapters/tmux-server.d.ts +0 -3
  105. package/daemon/dist/adapters/tmux-server.d.ts.map +1 -1
  106. package/daemon/dist/adapters/tmux-server.js +0 -5
  107. package/daemon/dist/adapters/tmux-server.js.map +1 -1
  108. package/daemon/dist/adapters/tmux.d.ts +13 -0
  109. package/daemon/dist/adapters/tmux.d.ts.map +1 -1
  110. package/daemon/dist/adapters/tmux.js +62 -4
  111. package/daemon/dist/adapters/tmux.js.map +1 -1
  112. package/daemon/dist/attention-surface.d.ts +16 -1
  113. package/daemon/dist/attention-surface.d.ts.map +1 -1
  114. package/daemon/dist/attention-surface.js.map +1 -1
  115. package/daemon/dist/build-info.js +3 -3
  116. package/daemon/dist/context-pack-taxonomy-surface.js +1 -1
  117. package/daemon/dist/context-pack-taxonomy-surface.js.map +1 -1
  118. package/daemon/dist/db/all-migrations.d.ts.map +1 -1
  119. package/daemon/dist/db/all-migrations.js +4 -0
  120. package/daemon/dist/db/all-migrations.js.map +1 -1
  121. package/daemon/dist/db/migrations/137_node_codex_permissions.d.ts +3 -0
  122. package/daemon/dist/db/migrations/137_node_codex_permissions.d.ts.map +1 -0
  123. package/daemon/dist/db/migrations/137_node_codex_permissions.js +7 -0
  124. package/daemon/dist/db/migrations/137_node_codex_permissions.js.map +1 -0
  125. package/daemon/dist/db/migrations/140_identity_principal.d.ts +12 -0
  126. package/daemon/dist/db/migrations/140_identity_principal.d.ts.map +1 -0
  127. package/daemon/dist/db/migrations/140_identity_principal.js +20 -0
  128. package/daemon/dist/db/migrations/140_identity_principal.js.map +1 -0
  129. package/daemon/dist/domain/active-occupant.js +1 -1
  130. package/daemon/dist/domain/active-occupant.js.map +1 -1
  131. package/daemon/dist/domain/agent-activity-store.d.ts +1 -1
  132. package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
  133. package/daemon/dist/domain/agent-activity-store.js +5 -3
  134. package/daemon/dist/domain/agent-activity-store.js.map +1 -1
  135. package/daemon/dist/domain/agent-resolver.js +1 -1
  136. package/daemon/dist/domain/agent-resolver.js.map +1 -1
  137. package/daemon/dist/domain/bind-plan.js +1 -1
  138. package/daemon/dist/domain/bind-plan.js.map +1 -1
  139. package/daemon/dist/domain/bootstrap-orchestrator.js +1 -1
  140. package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
  141. package/daemon/dist/domain/bundle-skills-router.js +2 -2
  142. package/daemon/dist/domain/bundle-skills-router.js.map +1 -1
  143. package/daemon/dist/domain/codex-member-permissions.d.ts +56 -0
  144. package/daemon/dist/domain/codex-member-permissions.d.ts.map +1 -0
  145. package/daemon/dist/domain/codex-member-permissions.js +140 -0
  146. package/daemon/dist/domain/codex-member-permissions.js.map +1 -0
  147. package/daemon/dist/domain/codex-owned-plugin-trust.d.ts.map +1 -1
  148. package/daemon/dist/domain/codex-owned-plugin-trust.js +2 -1
  149. package/daemon/dist/domain/codex-owned-plugin-trust.js.map +1 -1
  150. package/daemon/dist/domain/context-packs/context-pack-library-service.js +2 -2
  151. package/daemon/dist/domain/context-packs/context-pack-library-service.js.map +1 -1
  152. package/daemon/dist/domain/current-restore-snapshot.d.ts +8 -0
  153. package/daemon/dist/domain/current-restore-snapshot.d.ts.map +1 -0
  154. package/daemon/dist/domain/current-restore-snapshot.js +26 -0
  155. package/daemon/dist/domain/current-restore-snapshot.js.map +1 -0
  156. package/daemon/dist/domain/draft-aware-delivery.js +1 -1
  157. package/daemon/dist/domain/draft-aware-delivery.js.map +1 -1
  158. package/daemon/dist/domain/execution-candidate-reader.d.ts +16 -0
  159. package/daemon/dist/domain/execution-candidate-reader.d.ts.map +1 -0
  160. package/daemon/dist/domain/execution-candidate-reader.js +77 -0
  161. package/daemon/dist/domain/execution-candidate-reader.js.map +1 -0
  162. package/daemon/dist/domain/execution-view.d.ts.map +1 -1
  163. package/daemon/dist/domain/execution-view.js +16 -6
  164. package/daemon/dist/domain/execution-view.js.map +1 -1
  165. package/daemon/dist/domain/feed-perspective.d.ts +14 -0
  166. package/daemon/dist/domain/feed-perspective.d.ts.map +1 -0
  167. package/daemon/dist/domain/feed-perspective.js +36 -0
  168. package/daemon/dist/domain/feed-perspective.js.map +1 -0
  169. package/daemon/dist/domain/gateway/channel-operations.d.ts +1 -1
  170. package/daemon/dist/domain/gateway/channel-operations.d.ts.map +1 -1
  171. package/daemon/dist/domain/gateway/destination-resolver.d.ts +6 -0
  172. package/daemon/dist/domain/gateway/destination-resolver.d.ts.map +1 -1
  173. package/daemon/dist/domain/gateway/destination-resolver.js +8 -1
  174. package/daemon/dist/domain/gateway/destination-resolver.js.map +1 -1
  175. package/daemon/dist/domain/gateway/human-registry.d.ts +11 -4
  176. package/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
  177. package/daemon/dist/domain/gateway/human-registry.js +36 -5
  178. package/daemon/dist/domain/gateway/human-registry.js.map +1 -1
  179. package/daemon/dist/domain/gateway/operator-delivery-engine.d.ts.map +1 -1
  180. package/daemon/dist/domain/gateway/operator-delivery-engine.js +5 -2
  181. package/daemon/dist/domain/gateway/operator-delivery-engine.js.map +1 -1
  182. package/daemon/dist/domain/gateway/participants.d.ts +180 -0
  183. package/daemon/dist/domain/gateway/participants.d.ts.map +1 -0
  184. package/daemon/dist/domain/gateway/participants.js +434 -0
  185. package/daemon/dist/domain/gateway/participants.js.map +1 -0
  186. package/daemon/dist/domain/gateway/slack/inbound-admission.d.ts +2 -2
  187. package/daemon/dist/domain/gateway/slack/inbound-admission.d.ts.map +1 -1
  188. package/daemon/dist/domain/gateway/slack/inbound-admission.js +73 -6
  189. package/daemon/dist/domain/gateway/slack/inbound-admission.js.map +1 -1
  190. package/daemon/dist/domain/gateway/slack/inbound.d.ts +18 -1
  191. package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
  192. package/daemon/dist/domain/gateway/slack/inbound.js +27 -11
  193. package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
  194. package/daemon/dist/domain/gateway/slack/message.d.ts +2 -0
  195. package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
  196. package/daemon/dist/domain/gateway/slack/message.js +14 -6
  197. package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
  198. package/daemon/dist/domain/gateway/slack/open-asks.d.ts +50 -0
  199. package/daemon/dist/domain/gateway/slack/open-asks.d.ts.map +1 -0
  200. package/daemon/dist/domain/gateway/slack/open-asks.js +215 -0
  201. package/daemon/dist/domain/gateway/slack/open-asks.js.map +1 -0
  202. package/daemon/dist/domain/gateway/slack/outbound-driver.d.ts +2 -0
  203. package/daemon/dist/domain/gateway/slack/outbound-driver.d.ts.map +1 -1
  204. package/daemon/dist/domain/gateway/slack/outbound-driver.js +1 -0
  205. package/daemon/dist/domain/gateway/slack/outbound-driver.js.map +1 -1
  206. package/daemon/dist/domain/gateway/slack/queue-access.d.ts +15 -1
  207. package/daemon/dist/domain/gateway/slack/queue-access.d.ts.map +1 -1
  208. package/daemon/dist/domain/gateway/slack/queue-access.js +98 -29
  209. package/daemon/dist/domain/gateway/slack/queue-access.js.map +1 -1
  210. package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
  211. package/daemon/dist/domain/gateway/slack/slack-delivery.js +1 -0
  212. package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
  213. package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
  214. package/daemon/dist/domain/gateway/slack/slack-subsystem.js +59 -4
  215. package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
  216. package/daemon/dist/domain/gateway/slack/state-store.d.ts +3 -0
  217. package/daemon/dist/domain/gateway/slack/state-store.d.ts.map +1 -1
  218. package/daemon/dist/domain/gateway/slack/state-store.js +18 -0
  219. package/daemon/dist/domain/gateway/slack/state-store.js.map +1 -1
  220. package/daemon/dist/domain/hosted-wake.d.ts +19 -0
  221. package/daemon/dist/domain/hosted-wake.d.ts.map +1 -0
  222. package/daemon/dist/domain/hosted-wake.js +56 -0
  223. package/daemon/dist/domain/hosted-wake.js.map +1 -0
  224. package/daemon/dist/domain/hot-potato-enforcer.d.ts +1 -1
  225. package/daemon/dist/domain/kernel-boot.d.ts +10 -4
  226. package/daemon/dist/domain/kernel-boot.d.ts.map +1 -1
  227. package/daemon/dist/domain/kernel-boot.js +14 -7
  228. package/daemon/dist/domain/kernel-boot.js.map +1 -1
  229. package/daemon/dist/domain/mission-control/mission-control-read-layer.d.ts.map +1 -1
  230. package/daemon/dist/domain/mission-control/mission-control-read-layer.js +3 -1
  231. package/daemon/dist/domain/mission-control/mission-control-read-layer.js.map +1 -1
  232. package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts +16 -0
  233. package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
  234. package/daemon/dist/domain/mission-control/mission-control-write-contract.js +64 -16
  235. package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
  236. package/daemon/dist/domain/native-permission-store.d.ts +3 -2
  237. package/daemon/dist/domain/native-permission-store.d.ts.map +1 -1
  238. package/daemon/dist/domain/native-permission-store.js +14 -1
  239. package/daemon/dist/domain/native-permission-store.js.map +1 -1
  240. package/daemon/dist/domain/native-resume-probe.d.ts +9 -0
  241. package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
  242. package/daemon/dist/domain/native-resume-probe.js +37 -2
  243. package/daemon/dist/domain/native-resume-probe.js.map +1 -1
  244. package/daemon/dist/domain/node-inventory.d.ts +2 -2
  245. package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
  246. package/daemon/dist/domain/node-inventory.js +10 -5
  247. package/daemon/dist/domain/node-inventory.js.map +1 -1
  248. package/daemon/dist/domain/node-launcher.d.ts +5 -0
  249. package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
  250. package/daemon/dist/domain/node-launcher.js +35 -1
  251. package/daemon/dist/domain/node-launcher.js.map +1 -1
  252. package/daemon/dist/domain/outbox-handler.d.ts +3 -0
  253. package/daemon/dist/domain/outbox-handler.d.ts.map +1 -1
  254. package/daemon/dist/domain/outbox-handler.js +10 -4
  255. package/daemon/dist/domain/outbox-handler.js.map +1 -1
  256. package/daemon/dist/domain/permission-account.d.ts.map +1 -1
  257. package/daemon/dist/domain/permission-account.js +44 -9
  258. package/daemon/dist/domain/permission-account.js.map +1 -1
  259. package/daemon/dist/domain/permission-drift-observer.js +1 -1
  260. package/daemon/dist/domain/permission-drift-observer.js.map +1 -1
  261. package/daemon/dist/domain/policies/artifact-pool-helpers.d.ts +3 -1
  262. package/daemon/dist/domain/policies/artifact-pool-helpers.d.ts.map +1 -1
  263. package/daemon/dist/domain/policies/artifact-pool-helpers.js +1 -1
  264. package/daemon/dist/domain/policies/artifact-pool-helpers.js.map +1 -1
  265. package/daemon/dist/domain/policies/delivery-digest-flush.d.ts +6 -2
  266. package/daemon/dist/domain/policies/delivery-digest-flush.d.ts.map +1 -1
  267. package/daemon/dist/domain/policies/delivery-digest-flush.js +34 -9
  268. package/daemon/dist/domain/policies/delivery-digest-flush.js.map +1 -1
  269. package/daemon/dist/domain/policies/edge-artifact-required.d.ts.map +1 -1
  270. package/daemon/dist/domain/policies/edge-artifact-required.js +3 -0
  271. package/daemon/dist/domain/policies/edge-artifact-required.js.map +1 -1
  272. package/daemon/dist/domain/policies/quiet-release.d.ts +14 -0
  273. package/daemon/dist/domain/policies/quiet-release.d.ts.map +1 -1
  274. package/daemon/dist/domain/policies/quiet-release.js +13 -2
  275. package/daemon/dist/domain/policies/quiet-release.js.map +1 -1
  276. package/daemon/dist/domain/profile-resolution-worker.d.ts +1 -1
  277. package/daemon/dist/domain/profile-resolution-worker.d.ts.map +1 -1
  278. package/daemon/dist/domain/profile-resolution-worker.js +5 -5
  279. package/daemon/dist/domain/profile-resolution-worker.js.map +1 -1
  280. package/daemon/dist/domain/provider/claude-interruption.d.ts +3 -0
  281. package/daemon/dist/domain/provider/claude-interruption.d.ts.map +1 -0
  282. package/daemon/dist/domain/provider/claude-interruption.js +5 -0
  283. package/daemon/dist/domain/provider/claude-interruption.js.map +1 -0
  284. package/daemon/dist/domain/provider/host-usage-rollup.js +18 -8
  285. package/daemon/dist/domain/provider/host-usage-rollup.js.map +1 -1
  286. package/daemon/dist/domain/provider/provider-signals.d.ts +12 -5
  287. package/daemon/dist/domain/provider/provider-signals.d.ts.map +1 -1
  288. package/daemon/dist/domain/provider/provider-signals.js +31 -8
  289. package/daemon/dist/domain/provider/provider-signals.js.map +1 -1
  290. package/daemon/dist/domain/provider/reactive-tap.d.ts +4 -4
  291. package/daemon/dist/domain/provider/reactive-tap.d.ts.map +1 -1
  292. package/daemon/dist/domain/provider/reactive-tap.js +20 -4
  293. package/daemon/dist/domain/provider/reactive-tap.js.map +1 -1
  294. package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
  295. package/daemon/dist/domain/ps-projection.js +3 -2
  296. package/daemon/dist/domain/ps-projection.js.map +1 -1
  297. package/daemon/dist/domain/queue-destination-check.d.ts +5 -0
  298. package/daemon/dist/domain/queue-destination-check.d.ts.map +1 -1
  299. package/daemon/dist/domain/queue-destination-check.js +5 -1
  300. package/daemon/dist/domain/queue-destination-check.js.map +1 -1
  301. package/daemon/dist/domain/queue-repository.d.ts +38 -6
  302. package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  303. package/daemon/dist/domain/queue-repository.js +115 -33
  304. package/daemon/dist/domain/queue-repository.js.map +1 -1
  305. package/daemon/dist/domain/queue-retention.d.ts.map +1 -1
  306. package/daemon/dist/domain/queue-retention.js +4 -2
  307. package/daemon/dist/domain/queue-retention.js.map +1 -1
  308. package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
  309. package/daemon/dist/domain/queue-stuck-sweep.js +35 -0
  310. package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
  311. package/daemon/dist/domain/queue-transition-log.d.ts +6 -0
  312. package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
  313. package/daemon/dist/domain/queue-transition-log.js +11 -2
  314. package/daemon/dist/domain/queue-transition-log.js.map +1 -1
  315. package/daemon/dist/domain/queue-wake-ladder.d.ts +1 -1
  316. package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
  317. package/daemon/dist/domain/queue-wake-ladder.js +2 -1
  318. package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
  319. package/daemon/dist/domain/reconciler.d.ts +2 -0
  320. package/daemon/dist/domain/reconciler.d.ts.map +1 -1
  321. package/daemon/dist/domain/reconciler.js +5 -2
  322. package/daemon/dist/domain/reconciler.js.map +1 -1
  323. package/daemon/dist/domain/restore-orchestrator.d.ts +21 -2
  324. package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
  325. package/daemon/dist/domain/restore-orchestrator.js +182 -43
  326. package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
  327. package/daemon/dist/domain/restore-plan-preview.d.ts +27 -1
  328. package/daemon/dist/domain/restore-plan-preview.d.ts.map +1 -1
  329. package/daemon/dist/domain/restore-plan-preview.js +51 -29
  330. package/daemon/dist/domain/restore-plan-preview.js.map +1 -1
  331. package/daemon/dist/domain/review/compose.js +1 -1
  332. package/daemon/dist/domain/review/compose.js.map +1 -1
  333. package/daemon/dist/domain/review/gather.d.ts +11 -0
  334. package/daemon/dist/domain/review/gather.d.ts.map +1 -1
  335. package/daemon/dist/domain/review/gather.js +65 -27
  336. package/daemon/dist/domain/review/gather.js.map +1 -1
  337. package/daemon/dist/domain/rig-expansion-service.d.ts.map +1 -1
  338. package/daemon/dist/domain/rig-expansion-service.js +1 -0
  339. package/daemon/dist/domain/rig-expansion-service.js.map +1 -1
  340. package/daemon/dist/domain/rig-repository.d.ts +1 -0
  341. package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
  342. package/daemon/dist/domain/rig-repository.js +15 -0
  343. package/daemon/dist/domain/rig-repository.js.map +1 -1
  344. package/daemon/dist/domain/rig-teardown.d.ts +3 -0
  345. package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
  346. package/daemon/dist/domain/rig-teardown.js +3 -0
  347. package/daemon/dist/domain/rig-teardown.js.map +1 -1
  348. package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
  349. package/daemon/dist/domain/rigspec-codec.js +4 -0
  350. package/daemon/dist/domain/rigspec-codec.js.map +1 -1
  351. package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
  352. package/daemon/dist/domain/rigspec-exporter.js +12 -1
  353. package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
  354. package/daemon/dist/domain/rigspec-instantiator.d.ts +2 -0
  355. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  356. package/daemon/dist/domain/rigspec-instantiator.js +150 -128
  357. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  358. package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  359. package/daemon/dist/domain/rigspec-schema.js +24 -1
  360. package/daemon/dist/domain/rigspec-schema.js.map +1 -1
  361. package/daemon/dist/domain/rosters.d.ts +46 -0
  362. package/daemon/dist/domain/rosters.d.ts.map +1 -0
  363. package/daemon/dist/domain/rosters.js +80 -0
  364. package/daemon/dist/domain/rosters.js.map +1 -0
  365. package/daemon/dist/domain/runtime-adapter.d.ts +4 -0
  366. package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
  367. package/daemon/dist/domain/runtime-adapter.js +2 -0
  368. package/daemon/dist/domain/runtime-adapter.js.map +1 -1
  369. package/daemon/dist/domain/scope/dot-id.js +2 -2
  370. package/daemon/dist/domain/scope/dot-id.js.map +1 -1
  371. package/daemon/dist/domain/scope/scaffold-placeholder.d.ts +1 -1
  372. package/daemon/dist/domain/scope/scaffold-placeholder.js +1 -1
  373. package/daemon/dist/domain/scope/scope-audit.js +1 -1
  374. package/daemon/dist/domain/scope/scope-audit.js.map +1 -1
  375. package/daemon/dist/domain/scope/types.d.ts.map +1 -1
  376. package/daemon/dist/domain/scope/types.js +2 -3
  377. package/daemon/dist/domain/scope/types.js.map +1 -1
  378. package/daemon/dist/domain/seat-attention-reconciler.d.ts +2 -0
  379. package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
  380. package/daemon/dist/domain/seat-attention-reconciler.js +10 -1
  381. package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
  382. package/daemon/dist/domain/seat-handover-service.d.ts +7 -1
  383. package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
  384. package/daemon/dist/domain/seat-handover-service.js +89 -4
  385. package/daemon/dist/domain/seat-handover-service.js.map +1 -1
  386. package/daemon/dist/domain/seat-lifecycle-service.d.ts +23 -8
  387. package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
  388. package/daemon/dist/domain/seat-lifecycle-service.js +153 -12
  389. package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
  390. package/daemon/dist/domain/seat-restart-in-place.d.ts +2 -2
  391. package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -1
  392. package/daemon/dist/domain/seat-restart-in-place.js +2 -2
  393. package/daemon/dist/domain/seat-restart-in-place.js.map +1 -1
  394. package/daemon/dist/domain/seat-runtime-switch-service.d.ts +9 -2
  395. package/daemon/dist/domain/seat-runtime-switch-service.d.ts.map +1 -1
  396. package/daemon/dist/domain/seat-runtime-switch-service.js +53 -5
  397. package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -1
  398. package/daemon/dist/domain/seat-status-service.d.ts +1 -0
  399. package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
  400. package/daemon/dist/domain/seat-status-service.js +11 -0
  401. package/daemon/dist/domain/seat-status-service.js.map +1 -1
  402. package/daemon/dist/domain/seat-structural-activity-service.js +1 -1
  403. package/daemon/dist/domain/seat-structural-activity-service.js.map +1 -1
  404. package/daemon/dist/domain/session-registry.d.ts +2 -0
  405. package/daemon/dist/domain/session-registry.d.ts.map +1 -1
  406. package/daemon/dist/domain/session-registry.js +3 -1
  407. package/daemon/dist/domain/session-registry.js.map +1 -1
  408. package/daemon/dist/domain/session-transport.d.ts +45 -1
  409. package/daemon/dist/domain/session-transport.d.ts.map +1 -1
  410. package/daemon/dist/domain/session-transport.js +205 -29
  411. package/daemon/dist/domain/session-transport.js.map +1 -1
  412. package/daemon/dist/domain/shared-history-selection.d.ts +34 -0
  413. package/daemon/dist/domain/shared-history-selection.d.ts.map +1 -0
  414. package/daemon/dist/domain/shared-history-selection.js +74 -0
  415. package/daemon/dist/domain/shared-history-selection.js.map +1 -0
  416. package/daemon/dist/domain/skill-library-discovery.js +2 -2
  417. package/daemon/dist/domain/skill-library-discovery.js.map +1 -1
  418. package/daemon/dist/domain/slices/slice-indexer.d.ts +4 -4
  419. package/daemon/dist/domain/slices/slice-indexer.js +17 -17
  420. package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
  421. package/daemon/dist/domain/snapshot-capture.d.ts +1 -0
  422. package/daemon/dist/domain/snapshot-capture.d.ts.map +1 -1
  423. package/daemon/dist/domain/snapshot-capture.js +43 -1
  424. package/daemon/dist/domain/snapshot-capture.js.map +1 -1
  425. package/daemon/dist/domain/startup-orchestrator.d.ts +2 -16
  426. package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
  427. package/daemon/dist/domain/startup-orchestrator.js +15 -64
  428. package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
  429. package/daemon/dist/domain/startup-submission-evidence.d.ts +32 -0
  430. package/daemon/dist/domain/startup-submission-evidence.d.ts.map +1 -1
  431. package/daemon/dist/domain/startup-submission-evidence.js +60 -0
  432. package/daemon/dist/domain/startup-submission-evidence.js.map +1 -1
  433. package/daemon/dist/domain/successor-session-launcher.d.ts +1 -0
  434. package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
  435. package/daemon/dist/domain/successor-session-launcher.js +1 -0
  436. package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
  437. package/daemon/dist/domain/terminal/task-terminal-view.d.ts +50 -0
  438. package/daemon/dist/domain/terminal/task-terminal-view.d.ts.map +1 -0
  439. package/daemon/dist/domain/terminal/task-terminal-view.js +227 -0
  440. package/daemon/dist/domain/terminal/task-terminal-view.js.map +1 -0
  441. package/daemon/dist/domain/terminal/terminal-provider.d.ts +9 -0
  442. package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
  443. package/daemon/dist/domain/terminal/terminal-provider.js +0 -15
  444. package/daemon/dist/domain/terminal/terminal-provider.js.map +1 -1
  445. package/daemon/dist/domain/terminal/terminal-service.d.ts +7 -2
  446. package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
  447. package/daemon/dist/domain/terminal/terminal-service.js +25 -3
  448. package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
  449. package/daemon/dist/domain/toml-tables.d.ts +20 -0
  450. package/daemon/dist/domain/toml-tables.d.ts.map +1 -0
  451. package/daemon/dist/domain/toml-tables.js +101 -0
  452. package/daemon/dist/domain/toml-tables.js.map +1 -0
  453. package/daemon/dist/domain/types.d.ts +32 -0
  454. package/daemon/dist/domain/types.d.ts.map +1 -1
  455. package/daemon/dist/domain/types.js.map +1 -1
  456. package/daemon/dist/domain/usage-series.d.ts.map +1 -1
  457. package/daemon/dist/domain/usage-series.js +17 -3
  458. package/daemon/dist/domain/usage-series.js.map +1 -1
  459. package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
  460. package/daemon/dist/domain/user-settings/settings-store.js +5 -6
  461. package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
  462. package/daemon/dist/domain/view-projector.d.ts +1 -0
  463. package/daemon/dist/domain/view-projector.d.ts.map +1 -1
  464. package/daemon/dist/domain/view-projector.js +15 -2
  465. package/daemon/dist/domain/view-projector.js.map +1 -1
  466. package/daemon/dist/domain/workflow-human-destination.d.ts.map +1 -1
  467. package/daemon/dist/domain/workflow-human-destination.js +5 -3
  468. package/daemon/dist/domain/workflow-human-destination.js.map +1 -1
  469. package/daemon/dist/domain/workflow-projector.d.ts +1 -0
  470. package/daemon/dist/domain/workflow-projector.d.ts.map +1 -1
  471. package/daemon/dist/domain/workflow-projector.js +19 -3
  472. package/daemon/dist/domain/workflow-projector.js.map +1 -1
  473. package/daemon/dist/domain/workflow-runtime.d.ts +2 -2
  474. package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
  475. package/daemon/dist/domain/workflow-runtime.js +6 -4
  476. package/daemon/dist/domain/workflow-runtime.js.map +1 -1
  477. package/daemon/dist/gateway-human-registry-surface.d.ts +1 -0
  478. package/daemon/dist/gateway-human-registry-surface.d.ts.map +1 -1
  479. package/daemon/dist/gateway-human-registry-surface.js +1 -0
  480. package/daemon/dist/gateway-human-registry-surface.js.map +1 -1
  481. package/daemon/dist/index.d.ts.map +1 -1
  482. package/daemon/dist/index.js +6 -3
  483. package/daemon/dist/index.js.map +1 -1
  484. package/daemon/dist/lib/pane-envelope.d.ts +4 -0
  485. package/daemon/dist/lib/pane-envelope.d.ts.map +1 -1
  486. package/daemon/dist/lib/pane-envelope.js +1 -1
  487. package/daemon/dist/lib/pane-envelope.js.map +1 -1
  488. package/daemon/dist/rosters-surface.d.ts +2 -0
  489. package/daemon/dist/rosters-surface.d.ts.map +1 -0
  490. package/daemon/dist/rosters-surface.js +4 -0
  491. package/daemon/dist/rosters-surface.js.map +1 -0
  492. package/daemon/dist/routes/activity.js +1 -1
  493. package/daemon/dist/routes/activity.js.map +1 -1
  494. package/daemon/dist/routes/agent-images.d.ts.map +1 -1
  495. package/daemon/dist/routes/agent-images.js +10 -0
  496. package/daemon/dist/routes/agent-images.js.map +1 -1
  497. package/daemon/dist/routes/attention.d.ts.map +1 -1
  498. package/daemon/dist/routes/attention.js +15 -3
  499. package/daemon/dist/routes/attention.js.map +1 -1
  500. package/daemon/dist/routes/bundles.js +1 -1
  501. package/daemon/dist/routes/bundles.js.map +1 -1
  502. package/daemon/dist/routes/gateway.d.ts.map +1 -1
  503. package/daemon/dist/routes/gateway.js +42 -0
  504. package/daemon/dist/routes/gateway.js.map +1 -1
  505. package/daemon/dist/routes/hosts.d.ts.map +1 -1
  506. package/daemon/dist/routes/hosts.js +5 -2
  507. package/daemon/dist/routes/hosts.js.map +1 -1
  508. package/daemon/dist/routes/mission-control.d.ts.map +1 -1
  509. package/daemon/dist/routes/mission-control.js +5 -1
  510. package/daemon/dist/routes/mission-control.js.map +1 -1
  511. package/daemon/dist/routes/plugins.js +1 -1
  512. package/daemon/dist/routes/plugins.js.map +1 -1
  513. package/daemon/dist/routes/queue.d.ts.map +1 -1
  514. package/daemon/dist/routes/queue.js +41 -14
  515. package/daemon/dist/routes/queue.js.map +1 -1
  516. package/daemon/dist/routes/require-sender-identity.d.ts +26 -0
  517. package/daemon/dist/routes/require-sender-identity.d.ts.map +1 -1
  518. package/daemon/dist/routes/require-sender-identity.js +54 -0
  519. package/daemon/dist/routes/require-sender-identity.js.map +1 -1
  520. package/daemon/dist/routes/rigs.js +2 -0
  521. package/daemon/dist/routes/rigs.js.map +1 -1
  522. package/daemon/dist/routes/runtime-switch-custody.js +1 -1
  523. package/daemon/dist/routes/scope-audit.js +1 -1
  524. package/daemon/dist/routes/scope-audit.js.map +1 -1
  525. package/daemon/dist/routes/seat.d.ts.map +1 -1
  526. package/daemon/dist/routes/seat.js +49 -15
  527. package/daemon/dist/routes/seat.js.map +1 -1
  528. package/daemon/dist/routes/sessions.js +15 -3
  529. package/daemon/dist/routes/sessions.js.map +1 -1
  530. package/daemon/dist/routes/skills.js +1 -1
  531. package/daemon/dist/routes/skills.js.map +1 -1
  532. package/daemon/dist/routes/slices.js +1 -1
  533. package/daemon/dist/routes/slices.js.map +1 -1
  534. package/daemon/dist/routes/startup.d.ts.map +1 -1
  535. package/daemon/dist/routes/startup.js +269 -3
  536. package/daemon/dist/routes/startup.js.map +1 -1
  537. package/daemon/dist/routes/transcripts.js +2 -2
  538. package/daemon/dist/routes/transcripts.js.map +1 -1
  539. package/daemon/dist/routes/transport.d.ts.map +1 -1
  540. package/daemon/dist/routes/transport.js +21 -6
  541. package/daemon/dist/routes/transport.js.map +1 -1
  542. package/daemon/dist/routes/workflow.js +1 -1
  543. package/daemon/dist/routes/workflow.js.map +1 -1
  544. package/daemon/dist/startup.d.ts.map +1 -1
  545. package/daemon/dist/startup.js +17 -2
  546. package/daemon/dist/startup.js.map +1 -1
  547. package/daemon/dist/terminal/TerminalSessionBroker.d.ts +18 -2
  548. package/daemon/dist/terminal/TerminalSessionBroker.d.ts.map +1 -1
  549. package/daemon/dist/terminal/TerminalSessionBroker.js +55 -9
  550. package/daemon/dist/terminal/TerminalSessionBroker.js.map +1 -1
  551. package/daemon/dist/terminal/window-pin.d.ts +41 -0
  552. package/daemon/dist/terminal/window-pin.d.ts.map +1 -0
  553. package/daemon/dist/terminal/window-pin.js +103 -0
  554. package/daemon/dist/terminal/window-pin.js.map +1 -0
  555. package/daemon/docs/reference/a2a-agents.md +16 -4
  556. package/daemon/docs/reference/agent-startup-guide.md +34 -2
  557. package/daemon/docs/reference/agent-state-taxonomy.md +7 -0
  558. package/daemon/docs/reference/claude-status-line.md +42 -0
  559. package/daemon/docs/reference/community-harness-examples/hermes/config.yaml.example +2 -1
  560. package/daemon/docs/reference/community-harness-examples/hermes/hermes.yaml +1 -1
  561. package/daemon/docs/reference/community-harness-presets.md +83 -3
  562. package/daemon/docs/reference/gateway-participants.md +165 -0
  563. package/daemon/docs/reference/getting-started.md +12 -8
  564. package/daemon/docs/reference/help.md +6 -3
  565. package/daemon/docs/reference/hosted-members.md +110 -0
  566. package/daemon/docs/reference/quickstart.md +13 -1
  567. package/daemon/docs/reference/rig-spec.md +89 -3
  568. package/daemon/docs/reference/rosters.md +6 -0
  569. package/daemon/docs/reference/seat-delivery.md +10 -1
  570. package/daemon/docs/reference/seat-node-targeting.md +17 -0
  571. package/daemon/docs/reference/slack-app-setup.md +20 -2
  572. package/daemon/docs/reference/terminal-sessions.md +45 -0
  573. package/daemon/docs/reference/whats-new.md +109 -282
  574. package/daemon/specs/agents/shared/skills/core/messaging-the-human/SKILL.md +37 -3
  575. package/daemon/specs/agents/shared/skills/core/openrig-herdr/SKILL.md +5 -2
  576. package/daemon/specs/agents/shared/skills/process/agent-browser/SKILL.md +1 -1
  577. package/daemon/specs/agents/shared/skills/process/systematic-debugging/root-cause-tracing.md +1 -1
  578. package/dist/build-info.js +3 -3
  579. package/dist/client.d.ts +20 -0
  580. package/dist/client.d.ts.map +1 -1
  581. package/dist/client.js +57 -26
  582. package/dist/client.js.map +1 -1
  583. package/dist/commands/acp.js +1 -1
  584. package/dist/commands/capture.d.ts +27 -0
  585. package/dist/commands/capture.d.ts.map +1 -1
  586. package/dist/commands/capture.js +62 -4
  587. package/dist/commands/capture.js.map +1 -1
  588. package/dist/commands/daemon.d.ts.map +1 -1
  589. package/dist/commands/daemon.js +6 -1
  590. package/dist/commands/daemon.js.map +1 -1
  591. package/dist/commands/doctor.d.ts +9 -1
  592. package/dist/commands/doctor.d.ts.map +1 -1
  593. package/dist/commands/doctor.js +18 -2
  594. package/dist/commands/doctor.js.map +1 -1
  595. package/dist/commands/down.d.ts.map +1 -1
  596. package/dist/commands/down.js +3 -0
  597. package/dist/commands/down.js.map +1 -1
  598. package/dist/commands/export.d.ts.map +1 -1
  599. package/dist/commands/export.js +10 -5
  600. package/dist/commands/export.js.map +1 -1
  601. package/dist/commands/gateway.d.ts.map +1 -1
  602. package/dist/commands/gateway.js +309 -23
  603. package/dist/commands/gateway.js.map +1 -1
  604. package/dist/commands/mcp.d.ts.map +1 -1
  605. package/dist/commands/mcp.js +58 -14
  606. package/dist/commands/mcp.js.map +1 -1
  607. package/dist/commands/queue.d.ts.map +1 -1
  608. package/dist/commands/queue.js +30 -10
  609. package/dist/commands/queue.js.map +1 -1
  610. package/dist/commands/rig-mode.d.ts +1 -2
  611. package/dist/commands/rig-mode.d.ts.map +1 -1
  612. package/dist/commands/rig-mode.js +2 -2
  613. package/dist/commands/rig-mode.js.map +1 -1
  614. package/dist/commands/roster.d.ts +7 -27
  615. package/dist/commands/roster.d.ts.map +1 -1
  616. package/dist/commands/roster.js +17 -52
  617. package/dist/commands/roster.js.map +1 -1
  618. package/dist/commands/scope.d.ts.map +1 -1
  619. package/dist/commands/scope.js +12 -4
  620. package/dist/commands/scope.js.map +1 -1
  621. package/dist/commands/seat.d.ts.map +1 -1
  622. package/dist/commands/seat.js +76 -5
  623. package/dist/commands/seat.js.map +1 -1
  624. package/dist/commands/send.d.ts +3 -0
  625. package/dist/commands/send.d.ts.map +1 -1
  626. package/dist/commands/send.js +16 -18
  627. package/dist/commands/send.js.map +1 -1
  628. package/dist/commands/setup.d.ts.map +1 -1
  629. package/dist/commands/setup.js +10 -2
  630. package/dist/commands/setup.js.map +1 -1
  631. package/dist/commands/skill.js +1 -1
  632. package/dist/commands/skill.js.map +1 -1
  633. package/dist/commands/slack.d.ts +10 -0
  634. package/dist/commands/slack.d.ts.map +1 -1
  635. package/dist/commands/slack.js +70 -2
  636. package/dist/commands/slack.js.map +1 -1
  637. package/dist/commands/start.d.ts.map +1 -1
  638. package/dist/commands/start.js +3 -6
  639. package/dist/commands/start.js.map +1 -1
  640. package/dist/commands/terminal.js +1 -1
  641. package/dist/commands/terminal.js.map +1 -1
  642. package/dist/commands/whoami.d.ts.map +1 -1
  643. package/dist/commands/whoami.js +2 -1
  644. package/dist/commands/whoami.js.map +1 -1
  645. package/dist/config-store.d.ts.map +1 -1
  646. package/dist/config-store.js +3 -2
  647. package/dist/config-store.js.map +1 -1
  648. package/dist/daemon-lifecycle.d.ts +5 -1
  649. package/dist/daemon-lifecycle.d.ts.map +1 -1
  650. package/dist/daemon-lifecycle.js +13 -2
  651. package/dist/daemon-lifecycle.js.map +1 -1
  652. package/dist/fetch-with-timeout.d.ts.map +1 -1
  653. package/dist/fetch-with-timeout.js +3 -1
  654. package/dist/fetch-with-timeout.js.map +1 -1
  655. package/dist/lib/scope/dot-id.js +2 -2
  656. package/dist/lib/scope/dot-id.js.map +1 -1
  657. package/dist/lib/scope/scaffold-placeholder.d.ts +1 -1
  658. package/dist/lib/scope/scaffold-placeholder.js +1 -1
  659. package/dist/lib/scope/scope-audit.js +1 -1
  660. package/dist/lib/scope/scope-audit.js.map +1 -1
  661. package/dist/lib/scope/types.d.ts.map +1 -1
  662. package/dist/lib/scope/types.js +2 -3
  663. package/dist/lib/scope/types.js.map +1 -1
  664. package/dist/long-request-fetch.d.ts +9 -0
  665. package/dist/long-request-fetch.d.ts.map +1 -0
  666. package/dist/long-request-fetch.js +48 -0
  667. package/dist/long-request-fetch.js.map +1 -0
  668. package/dist/mcp-http.d.ts +38 -2
  669. package/dist/mcp-http.d.ts.map +1 -1
  670. package/dist/mcp-http.js +303 -36
  671. package/dist/mcp-http.js.map +1 -1
  672. package/dist/mcp-presence.d.ts +14 -0
  673. package/dist/mcp-presence.d.ts.map +1 -0
  674. package/dist/mcp-presence.js +50 -0
  675. package/dist/mcp-presence.js.map +1 -0
  676. package/dist/mcp-server.d.ts +12 -2
  677. package/dist/mcp-server.d.ts.map +1 -1
  678. package/dist/mcp-server.js +620 -204
  679. package/dist/mcp-server.js.map +1 -1
  680. package/dist/release-surface/affected-skills.d.ts.map +1 -1
  681. package/dist/release-surface/affected-skills.js +1 -2
  682. package/dist/release-surface/affected-skills.js.map +1 -1
  683. package/dist/remote-host-ops.d.ts +1 -0
  684. package/dist/remote-host-ops.d.ts.map +1 -1
  685. package/dist/remote-host-ops.js +2 -2
  686. package/dist/remote-host-ops.js.map +1 -1
  687. package/dist/rig-handle.d.ts +1 -0
  688. package/dist/rig-handle.d.ts.map +1 -1
  689. package/dist/rig-handle.js +9 -0
  690. package/dist/rig-handle.js.map +1 -1
  691. package/dist/tmux-health.d.ts +26 -0
  692. package/dist/tmux-health.d.ts.map +1 -1
  693. package/dist/tmux-health.js +42 -0
  694. package/dist/tmux-health.js.map +1 -1
  695. package/package.json +5 -2
  696. package/tui/dist/attention/attention-model.d.ts +19 -0
  697. package/tui/dist/attention/attention-model.d.ts.map +1 -1
  698. package/tui/dist/attention/attention-model.js +38 -6
  699. package/tui/dist/attention/attention-model.js.map +1 -1
  700. package/tui/dist/commands/registry.d.ts.map +1 -1
  701. package/tui/dist/commands/registry.js +4 -1
  702. package/tui/dist/commands/registry.js.map +1 -1
  703. package/tui/dist/daemon-client.d.ts +15 -9
  704. package/tui/dist/daemon-client.d.ts.map +1 -1
  705. package/tui/dist/daemon-client.js +21 -12
  706. package/tui/dist/daemon-client.js.map +1 -1
  707. package/tui/dist/demo-data.js +17 -17
  708. package/tui/dist/demo-data.js.map +1 -1
  709. package/tui/dist/hydrate.d.ts +1 -1
  710. package/tui/dist/hydrate.d.ts.map +1 -1
  711. package/tui/dist/hydrate.js +37 -11
  712. package/tui/dist/hydrate.js.map +1 -1
  713. package/tui/dist/live-events.js +1 -1
  714. package/tui/dist/live-events.js.map +1 -1
  715. package/tui/dist/main.js +34 -10
  716. package/tui/dist/main.js.map +1 -1
  717. package/tui/dist/page-read.js +1 -1
  718. package/tui/dist/page-read.js.map +1 -1
  719. package/tui/dist/render.d.ts +6 -0
  720. package/tui/dist/render.d.ts.map +1 -1
  721. package/tui/dist/render.js +57 -7
  722. package/tui/dist/render.js.map +1 -1
  723. package/tui/dist/state.d.ts.map +1 -1
  724. package/tui/dist/state.js +5 -1
  725. package/tui/dist/state.js.map +1 -1
  726. package/tui/dist/terminals/open-window.d.ts +8 -3
  727. package/tui/dist/terminals/open-window.d.ts.map +1 -1
  728. package/tui/dist/terminals/open-window.js +21 -6
  729. package/tui/dist/terminals/open-window.js.map +1 -1
  730. package/tui/dist/terminals/terminal-model.d.ts +1 -1
  731. package/tui/dist/terminals/terminal-model.d.ts.map +1 -1
  732. package/tui/dist/terminals/terminal-model.js +1 -1
  733. package/tui/dist/terminals/terminal-model.js.map +1 -1
  734. package/tui/dist/types.d.ts +10 -1
  735. package/tui/dist/types.d.ts.map +1 -1
  736. package/ui/dist/assets/{index-DLP1ipGq.js → index-DV0UNxFw.js} +1 -1
  737. package/ui/dist/index.html +1 -1
@@ -2,7 +2,8 @@ import { PROMPT_ALERT_TAG, readWakeLadderBackstop } from "./queue-wake-ladder.js
2
2
  import { withUrgentLine } from "./urgent-line.js";
3
3
  import { quietCustodyBackstop, quietHoldCustody } from "./quiet-hold-custody.js";
4
4
  import { createHash } from "node:crypto";
5
- import { loadHumanRegistry, resolveRegisteredHumanAddress, slackSubscriptionFor, withHumanAlertTag } from "./gateway/human-registry.js";
5
+ import { loadHumanRegistry, registeredPeople, resolveRegisteredHumanAddress, slackSubscriptionFor, withHumanAlertTag } from "./gateway/human-registry.js";
6
+ import { sharedChannelAddresses } from "./gateway/participants.js";
6
7
  import { resolveExternal } from "./gateway/external-admission.js";
7
8
  import { QueueTransitionLog } from "./queue-transition-log.js";
8
9
  import { WAKE_INTENT_PREFIX } from "./outbox-handler.js";
@@ -15,9 +16,13 @@ import { getSelfHostId } from "./hosts/fanout-contract.js";
15
16
  import { parseSessionName, isHumanSeatSessionRef } from "./session-name.js";
16
17
  import { parseReplyToChoice, formatReplyToChoice, describeReplyToFallback, REPLY_TO_CHOICE_ACTOR } from "./reply-to-choice.js";
17
18
  import { classifyDestination } from "./gateway/destination-resolver.js";
19
+ import { join } from "node:path";
20
+ import { SettingsStore } from "./user-settings/settings-store.js";
21
+ import { hostedWakeFor } from "./rosters.js";
22
+ import { ringHostedWake } from "./hosted-wake.js";
18
23
  import { effectiveGateRoles } from "./gate-predicate.js";
19
24
  import { computeClosureRequiredAt, validateClosure, } from "./hot-potato-enforcer.js";
20
- import { isHumanSeatSession, validateHumanPark, validateHumanRoute } from "./human-route-enforcer.js";
25
+ import { validateHumanPark, validateHumanRoute } from "./human-route-enforcer.js";
21
26
  import { QueueWakeRepository, USAGE_LIMIT_BLOCKER_TAG, } from "./queue-wake-repository.js";
22
27
  import { WatchdogJobsRepository } from "./watchdog-jobs-repository.js";
23
28
  import { armQueueWait, backOffQueueWait, refreshQueueWaits, evaluateQueueWait, retargetQueueWait, isQueueWait } from "./queue-wait-backoff.js";
@@ -69,6 +74,8 @@ const AUTO_UNPARK_WAKE_TAG = "queue:auto-unpark:blocker";
69
74
  * handoff: it keeps that source when it's replayed later. Send, broadcast, queue create and the cross-host forward never
70
75
  * set it from a request; the trusted local outbox recorder (/api/queue/outbox/record) accepts caller tags by design. */
71
76
  const WAKE_TRIGGER_OPENRIG_TAG = "queue:wake-trigger:openrig";
77
+ /** On a wake intent whose ring a hosted member's trigger accepted: recovery doesn't ring that intent again. */
78
+ const HOSTED_WAKE_ACCEPTED_TAG = "queue:hosted-wake-accepted";
72
79
  const AUTO_UNPARK_BLOCKER_TAG_PREFIX = "queue:auto-unpark:blocker-ref:";
73
80
  /** The actor on the transition routeToFallback writes; the row's own history is how a later reroute finds the line it wrote. */
74
81
  const FALLBACK_ACTOR = "system:queue-fallback";
@@ -100,7 +107,7 @@ export function presentedNudgeResult(wireResult, claimedAt) {
100
107
  return wireResult;
101
108
  }
102
109
  /**
103
- * 0.5.1-54 DR-1 (classifier fold, PM ruling qitem-20260811163927-74493d76) — classify a create-path
110
+ * 0.5.1-54 DR-1 (classifier fold, PM ruling) — classify a create-path
104
111
  * nudge FAILURE so the surfaced count becomes ACTIONABLE (constraint iii). Two classes:
105
112
  * - "permanent-topology": the destination is not resolvable on THIS daemon (the nudge can never
106
113
  * succeed here — a local-registry lookup reporting "not found" for a seat that lives on another
@@ -109,7 +116,7 @@ export function presentedNudgeResult(wireResult, claimedAt) {
109
116
  * - "transient": a live, resolvable seat that refused THIS attempt (busy at an interactive prompt) or
110
117
  * the attempt timed out — the only class a future bounded re-attempt (DR-2, held n=1) would touch.
111
118
  * - "unknown": a failure whose text matches NEITHER known pattern. NOT silently defaulted to transient
112
- * (ship-block ruling qitem-20260811170941-5eadb968): defaulting would assert "a live seat refused
119
+ * (ship-block ruling): defaulting would assert "a live seat refused
113
120
  * this attempt" for a string that only means "did not match the permanent pattern" — two different
114
121
  * claims. An unknown must read as unknown (the same rule the ACTIVITY hookless=unknown ruling names);
115
122
  * a default that collapses unknown into a known class is the exact sin, mirrored.
@@ -131,6 +138,11 @@ export function classifyNudgeFailure(lastNudgeResult) {
131
138
  return "unknown";
132
139
  }
133
140
  export const QUEUE_PRIORITIES = ["routine", "urgent", "critical"];
141
+ /** `principal:v1` marks only the transitions that record the request's own action. What that action sets off elsewhere
142
+ * (a successor's wake intent, a parked row released, a blocker moved) carries the seat's stamp, transport:v1. */
143
+ function sideEffectProvenance(provenance) {
144
+ return provenance === "principal:v1" ? "transport:v1" : provenance ?? null;
145
+ }
134
146
  /** Adds the handoff-successor and updated-since filters both list paths share. */
135
147
  function pushFollowThroughFilters(opts, conditions, params) {
136
148
  if (opts?.handedOffFrom) {
@@ -146,6 +158,17 @@ function pushFollowThroughFilters(opts, conditions, params) {
146
158
  export function defaultParkWakeMessage(qitemId) {
147
159
  return `Wake timer fired for parked qitem ${qitemId}. Resume the recorded continuation and update the row.`;
148
160
  }
161
+ /** A hosted member's trigger, from the authored rosters (`<workspace.root>/rosters`) on this host. Null when it declares
162
+ * none, or when the rosters or this host's id can't be read: the member then stays unroutable, and its person is told. */
163
+ function defaultHostedWake(destination) {
164
+ try {
165
+ const root = new SettingsStore().resolveOne("workspace.root").value;
166
+ return typeof root === "string" && root ? hostedWakeFor(destination, join(root, "rosters"), getSelfHostId()) : null;
167
+ }
168
+ catch {
169
+ return null;
170
+ }
171
+ }
149
172
  export class QueueRepositoryError extends Error {
150
173
  code;
151
174
  meta;
@@ -447,6 +470,11 @@ export class QueueRepository {
447
470
  hasTransitionProvenanceColumn;
448
471
  hasOwnerNotificationColumns;
449
472
  loadHumanRegistryFn;
473
+ /** Registered shared channels (0.7.3): `<id>@external` participants whose rows post to their Slack channel. */
474
+ sharedChannelsFn;
475
+ /** A hosted member's trigger, from the authored rosters on this host. */
476
+ hostedWakeFn;
477
+ hostedWakeFetch;
450
478
  /** OPR.0.4.6.WF3 FR-6 — injected by startup (never imported): the
451
479
  * workflow domain's is-live-frontier-packet predicate. */
452
480
  workflowFrontierPredicate;
@@ -463,6 +491,9 @@ export class QueueRepository {
463
491
  this.resolveOccupantGeneration = opts?.resolveOccupantGeneration;
464
492
  this.resolveSessionAddresses = opts?.resolveSessionAddresses ?? ((name) => [name]);
465
493
  this.loadHumanRegistryFn = opts?.loadHumanRegistry ?? (() => loadHumanRegistry());
494
+ this.sharedChannelsFn = opts?.sharedChannels ?? (() => sharedChannelAddresses());
495
+ this.hostedWakeFn = opts?.hostedWake ?? defaultHostedWake;
496
+ this.hostedWakeFetch = opts?.hostedWakeFetch;
466
497
  this.hasTargetRepoColumn = detectQueueColumn(db, "target_repo");
467
498
  this.hasSummaryColumn = detectQueueColumn(db, "summary");
468
499
  this.hasHumanIntentColumn = detectQueueColumn(db, "human_intent");
@@ -486,7 +517,7 @@ export class QueueRepository {
486
517
  // check BEFORE LIMIT. LIKE / GLOB patterns are supersets that
487
518
  // would let malformed rows (e.g., 'human-@kernel' — empty name
488
519
  // segment) occupy the LIMIT window and hide valid attention items
489
- // behind them (guard re-verify-3 qitem-20260518193005 BLOCKER 1).
520
+ // behind them (guard re-verify-3 BLOCKER 1).
490
521
  // better-sqlite3 db.function is idempotent; safe to call once at
491
522
  // construction.
492
523
  // OPR.0.4.4.19: single-source regex — the SQL function delegates to the
@@ -592,25 +623,35 @@ export class QueueRepository {
592
623
  if (input.explicitKind === "human-decision-resolved") {
593
624
  return { kind: input.explicitKind, level: "NOTICE" };
594
625
  }
595
- const registry = this.loadHumanRegistryFn();
596
- if (!registry.ok)
626
+ // Nobody registered yet isn't a broken registry: a row to a registered shared channel still posts (0.7.3).
627
+ const people = registeredPeople(this.loadHumanRegistryFn());
628
+ if (!people)
597
629
  return null;
598
- const blockedHuman = resolveRegisteredHumanAddress(input.nextBlockedOn, registry.entities);
599
- const previousBlockedHuman = resolveRegisteredHumanAddress(input.previousBlockedOn, registry.entities);
630
+ const blockedHuman = resolveRegisteredHumanAddress(input.nextBlockedOn, people);
631
+ const previousBlockedHuman = resolveRegisteredHumanAddress(input.previousBlockedOn, people);
600
632
  const enteredHumanPark = input.nextState === "blocked" && blockedHuman !== null &&
601
633
  (input.previousState !== "blocked" || previousBlockedHuman !== blockedHuman);
602
634
  if (enteredHumanPark)
603
635
  return { kind: "human-required", level: "ALERT" };
604
- const destinationHuman = resolveRegisteredHumanAddress(input.destinationSession, registry.entities);
636
+ const destinationHuman = resolveRegisteredHumanAddress(input.destinationSession, people);
605
637
  if (input.action === "create" && destinationHuman !== null) {
638
+ // A person's Slack message routed to a person is already in Slack: as it arrived, it's on Steering and the TUI and
639
+ // isn't echoed back. A later park of it on a person is a new ask, classified (and posted) on that update.
640
+ if (input.gatewayInbound)
641
+ return { kind: "human-required", level: "RECORD" };
606
642
  // The person's Slack subscription decides: `every-ask` (the default) posts every ask (ALERT); `urgent-only` posts only
607
643
  // one marked --alert, and a plain ask lands on Steering and the TUI (RECORD: below the posting dial, so no post is owed).
608
- const person = registry.entities.find((entity) => entity.address === destinationHuman);
644
+ const person = people.find((entity) => entity.address === destinationHuman);
609
645
  const posts = input.humanAlert === true || slackSubscriptionFor(person).preset === "every-ask";
610
646
  return input.humanIntent === "update"
611
647
  ? { kind: "human-update", level: "NOTICE" }
612
648
  : { kind: "human-required", level: posts ? "ALERT" : "RECORD" };
613
649
  }
650
+ // A row to a registered shared channel posts there as a notice, whatever its intent: a channel takes correspondence,
651
+ // so nothing it says can answer, approve or escalate (0.7.3).
652
+ if (input.action === "create" && input.destinationSession?.endsWith("@external") && this.sharedChannelsFn().some((channel) => channel.address === input.destinationSession)) {
653
+ return { kind: "human-update", level: "NOTICE" };
654
+ }
614
655
  return null;
615
656
  }
616
657
  /**
@@ -643,6 +684,7 @@ export class QueueRepository {
643
684
  this.recordWakeIntent({
644
685
  outboxId: `${WAKE_INTENT_PREFIX}${successorQitemId}`,
645
686
  auditPointer: successorQitemId,
687
+ qitemId: successorQitemId,
646
688
  fromSession,
647
689
  toSession,
648
690
  identityProvenance,
@@ -659,7 +701,7 @@ export class QueueRepository {
659
701
  // recovery replay these exact bytes without re-resolving the occupant.
660
702
  const stampISO = new Date().toISOString();
661
703
  const genUuid = this.resolveOccupantGeneration?.(input.fromSession) ?? undefined;
662
- const frozenEnvelope = wrapPaneEnvelope(input.fromSession, input.toSession, input.bareBody, { stampISO, genUuid });
704
+ const frozenEnvelope = wrapPaneEnvelope(input.fromSession, input.toSession, input.bareBody, { stampISO, genUuid, ...(input.qitemId ? { replyToQitem: input.qitemId } : {}) });
663
705
  const admission = this.wakeAdmission(input.auditPointer, input.tags?.includes(WAKE_TRIGGER_OPENRIG_TAG) ? "openrig" : "agent");
664
706
  // An urgent wake's frozen body carries the line naming who marked it, so a person reading it held sees it too; the
665
707
  // transport won't add it a second time when it's delivered.
@@ -830,6 +872,13 @@ export class QueueRepository {
830
872
  // The level can change while this send waits for the seat's lease. Under the lease, each member is admitted again with
831
873
  // its own source and urgency; only those with the first member's outcome go with this send, and the others go back
832
874
  // to their state before this claim (never marked delivered, held or failed) for their own delivery.
875
+ // A hosted member's trigger already accepted the ring for exactly these intents (tagged below): recovery doesn't ring
876
+ // it again, since each ring can start a run. Any other wake rings: a new intent, or one claimed but never sent.
877
+ if (group.every((entry) => entry.tags?.includes(HOSTED_WAKE_ACCEPTED_TAG))) {
878
+ for (const entry of group)
879
+ this.outbox.finalizeDelivery(entry.outboxId, "indeterminate");
880
+ return "indeterminate";
881
+ }
833
882
  const released = [];
834
883
  const recheckMembers = group.length < 2 ? undefined : (holds, held) => {
835
884
  const keep = group.filter((entry, i) => {
@@ -867,6 +916,12 @@ export class QueueRepository {
867
916
  const wakeEvent = this.db.transaction(() => {
868
917
  this.recordNudgeAttempt(qitemId, nudgeResult);
869
918
  this.outbox.finalizeDelivery(intent.outboxId, finalState);
919
+ // The acceptance belongs to this intent, so recovery can tell this wake already rang.
920
+ if (outcome.nudgeResult.startsWith("wake-accepted:")) {
921
+ this.db.prepare(`UPDATE outbox_entries SET tags = json_insert(COALESCE(tags, '[]'), '$[#]', ?)
922
+ WHERE outbox_id = ? AND NOT EXISTS (SELECT 1 FROM json_each(COALESCE(outbox_entries.tags, '[]')) WHERE value = ?)`)
923
+ .run(HOSTED_WAKE_ACCEPTED_TAG, intent.outboxId, HOSTED_WAKE_ACCEPTED_TAG);
924
+ }
870
925
  if (!blockerRef)
871
926
  return null;
872
927
  const item = this.getByIdOrThrow(qitemId);
@@ -1064,7 +1119,7 @@ export class QueueRepository {
1064
1119
  * delivered nor demoted to failed.
1065
1120
  */
1066
1121
  async performWakeSend(qitemId, destinationSession, sourceSession, bodyOverride, prebuiltText, committedOutboxIds, trigger = "agent", recheckMembers) {
1067
- // DEFECT FIX qitem-20260827065907-b9ae334c (S1-class, 3 live specimens): a virtual
1122
+ // DEFECT FIX (S1-class, 3 live specimens): a virtual
1068
1123
  // @external destination has NO pane — the queue row ITSELF is the gateway
1069
1124
  // subsystem's input (the Slack connector polls human-destined rows and its own
1070
1125
  // ledger is the delivery record). Falling through to tmux here recorded
@@ -1093,6 +1148,11 @@ export class QueueRepository {
1093
1148
  if (destClass.class === "unroutable") {
1094
1149
  return { classified: "failed", nudgeResult: destClass.teaching };
1095
1150
  }
1151
+ // A hosted member with a trigger: ring it. Accepted is indeterminate, never verified: pickup is its claim.
1152
+ if (destClass.class === "hosted") {
1153
+ const row = this.getById(qitemId);
1154
+ return ringHostedWake({ qitemId, destination: destinationSession, summary: row?.summary ?? null, source: sourceSession ?? row?.sourceSession ?? null }, destClass.wake, { fetchImpl: this.hostedWakeFetch });
1155
+ }
1096
1156
  // A terminal seat runs a shell or a TUI, not an agent. Typed wake text would run there as a
1097
1157
  // command line (it carries the row's summary), and nothing there can claim the row. So nothing
1098
1158
  // is typed; the row stays queued and visible. `failed:` keeps it on the wake ladder, whose
@@ -1123,7 +1183,7 @@ export class QueueRepository {
1123
1183
  const genUuid = sourceSession
1124
1184
  ? (this.resolveOccupantGeneration?.(sourceSession) ?? undefined)
1125
1185
  : undefined;
1126
- text = wrapPaneEnvelope(sourceSession, destinationSession, bareBody, { stampISO, genUuid });
1186
+ text = wrapPaneEnvelope(sourceSession, destinationSession, bareBody, { stampISO, genUuid, replyToQitem: qitemId });
1127
1187
  }
1128
1188
  const deliveryId = `guard-nudge-${qitemId}-${createHash("sha256").update(JSON.stringify([sourceSession, destinationSession, bodyOverride ?? null])).digest("hex")}`;
1129
1189
  const held = !committedOutboxIds ? this.outbox?.getById(deliveryId) : null;
@@ -1159,11 +1219,12 @@ export class QueueRepository {
1159
1219
  return { classified: "failed", nudgeResult: `failed:${msg}` };
1160
1220
  }
1161
1221
  }
1162
- /** First committed return of a direct ask, including pre-shared-ID Slack replies. */
1163
- getHumanAnswer(qitemId, actorSession) {
1222
+ /** First committed return of a direct ask, including pre-shared-ID Slack replies. `primaryUser`: the actor is the
1223
+ * primary user, who may answer anyone's ask. A shared channel's rows are correspondence, never an answer. */
1224
+ getHumanAnswer(qitemId, actorSession, opts = {}) {
1164
1225
  const ask = this.getById(qitemId);
1165
- if (!this.hasReplyToColumn || !ask || ask.destinationSession !== actorSession
1166
- || ask.humanIntent === "update" || !this.isPersonAddress(actorSession))
1226
+ if (!this.hasReplyToColumn || !ask || this.isSharedChannel(actorSession) || (ask.destinationSession !== actorSession && !opts.primaryUser)
1227
+ || ask.humanIntent === "update" || !this.isPersonAddress(ask.destinationSession))
1167
1228
  return null;
1168
1229
  const row = this.db.prepare(`SELECT qitem_id FROM queue_items
1169
1230
  WHERE reply_to = ? AND source_session = ? AND destination_session = ?
@@ -1202,7 +1263,7 @@ export class QueueRepository {
1202
1263
  try {
1203
1264
  // A savepoint removes any partial intent when staging fails, while
1204
1265
  // preserving ordinary create's existing acceptance of the task.
1205
- this.db.transaction(() => this.stageWakeIntent(created.qitemId, wakeFrom, input.destinationSession, input.identityProvenance ?? null, input.nudge, input.wakeTrigger))();
1266
+ this.db.transaction(() => this.stageWakeIntent(created.qitemId, wakeFrom, input.destinationSession, sideEffectProvenance(input.identityProvenance), input.nudge, input.wakeTrigger))();
1206
1267
  wakeStaged = true;
1207
1268
  }
1208
1269
  catch (err) {
@@ -1401,6 +1462,7 @@ export class QueueRepository {
1401
1462
  action: "create",
1402
1463
  humanIntent: input.humanIntent,
1403
1464
  humanAlert: input.humanAlert,
1465
+ gatewayInbound: input.gatewayInbound,
1404
1466
  destinationSession: input.destinationSession,
1405
1467
  nextState: "pending",
1406
1468
  });
@@ -1410,6 +1472,7 @@ export class QueueRepository {
1410
1472
  actorSession: input.sourceSession,
1411
1473
  transitionNote: "created",
1412
1474
  identityProvenance: input.identityProvenance ?? null, // P21 §4 era-stamp
1475
+ identityPrincipal: input.identityPrincipal ?? null,
1413
1476
  ownerNotificationKind: notification?.kind,
1414
1477
  ownerNotificationLevel: notification?.level,
1415
1478
  });
@@ -1443,6 +1506,14 @@ export class QueueRepository {
1443
1506
  const registry = this.loadHumanRegistryFn();
1444
1507
  return registry.ok && resolveRegisteredHumanAddress(destination, registry.entities) !== null;
1445
1508
  }
1509
+ /** A registered shared channel. It takes correspondence, so it never answers, approves, resolves or denies (0.7.3). */
1510
+ isSharedChannel(address) {
1511
+ return !!address && this.sharedChannelsFn().some((channel) => channel.address === address);
1512
+ }
1513
+ /** The registered people this queue resolves addresses against. */
1514
+ humanRegistry() {
1515
+ return this.loadHumanRegistryFn();
1516
+ }
1446
1517
  /** The asked person, when a different registered person is acting on what was asked of them; else null. An agent, the
1447
1518
  * asked person under another spelling, and an ask to no registered person aren't someone else. */
1448
1519
  askedSomeoneElse(actorSession, askedSession) {
@@ -1523,6 +1594,7 @@ export class QueueRepository {
1523
1594
  closureReason: "handed_off_to",
1524
1595
  closureTarget: input.toSession,
1525
1596
  identityProvenance: input.identityProvenance ?? null, // P21 §4 era-stamp
1597
+ identityPrincipal: input.identityPrincipal ?? null,
1526
1598
  });
1527
1599
  // OPR.0.5.8.1 S1b — THE ROUTE THE FOUNDING SPECIMEN TOOK. Row b7a70333 went
1528
1600
  // handed-off at 10:02:03Z and its timer still fired at 10:18:07Z, because
@@ -1559,13 +1631,14 @@ export class QueueRepository {
1559
1631
  actorSession: input.fromSession,
1560
1632
  transitionNote: `handoff from ${source.qitemId}`,
1561
1633
  identityProvenance: input.identityProvenance ?? null, // P21 §4 era-stamp
1634
+ identityPrincipal: input.identityPrincipal ?? null,
1562
1635
  ownerNotificationKind: successorNotification?.kind,
1563
1636
  ownerNotificationLevel: successorNotification?.level,
1564
1637
  });
1565
1638
  // W1-a: the durable wake intent joins the SAME transaction as the close +
1566
1639
  // successor create. If this (or anything above) throws, the whole act rolls
1567
1640
  // back — one act or none.
1568
- this.stageWakeIntent(newId, input.fromSession, input.toSession, input.identityProvenance ?? null, input.nudge);
1641
+ this.stageWakeIntent(newId, input.fromSession, input.toSession, sideEffectProvenance(input.identityProvenance), input.nudge);
1569
1642
  const handoffEvent = this.eventBus.persistWithinTransaction({
1570
1643
  type: "queue.handed_off",
1571
1644
  qitemId: source.qitemId,
@@ -1581,7 +1654,7 @@ export class QueueRepository {
1581
1654
  qitemId: source.qitemId,
1582
1655
  terminalState: "handed-off",
1583
1656
  actorSession: input.fromSession,
1584
- identityProvenance: input.identityProvenance ?? null,
1657
+ identityProvenance: sideEffectProvenance(input.identityProvenance),
1585
1658
  ts,
1586
1659
  })) {
1587
1660
  events.push({ name: "queue.updated", payload: dependentEvent });
@@ -1673,6 +1746,7 @@ export class QueueRepository {
1673
1746
  closureReason: "handed_off_to",
1674
1747
  closureTarget: input.toSession,
1675
1748
  identityProvenance: input.identityProvenance ?? null, // P21 §4 era-stamp
1749
+ identityPrincipal: input.identityPrincipal ?? null,
1676
1750
  });
1677
1751
  // OPR.0.5.8.1 S1b — same structural bypass as handoff(): own transaction,
1678
1752
  // never routes through update().
@@ -1712,7 +1786,7 @@ export class QueueRepository {
1712
1786
  });
1713
1787
  // W1-a: the durable wake intent joins the SAME transaction as the close +
1714
1788
  // successor create — one act or none (symmetric with handoff()).
1715
- this.stageWakeIntent(newId, input.fromSession, input.toSession, input.identityProvenance ?? null, input.nudge);
1789
+ this.stageWakeIntent(newId, input.fromSession, input.toSession, sideEffectProvenance(input.identityProvenance), input.nudge);
1716
1790
  const handoffEvent = this.eventBus.persistWithinTransaction({
1717
1791
  type: "queue.handed_off",
1718
1792
  qitemId: source.qitemId,
@@ -1728,7 +1802,7 @@ export class QueueRepository {
1728
1802
  qitemId: source.qitemId,
1729
1803
  terminalState: "done",
1730
1804
  actorSession: input.fromSession,
1731
- identityProvenance: input.identityProvenance ?? null,
1805
+ identityProvenance: sideEffectProvenance(input.identityProvenance),
1732
1806
  ts,
1733
1807
  })) {
1734
1808
  events.push({ name: "queue.updated", payload: dependentEvent });
@@ -1843,7 +1917,7 @@ export class QueueRepository {
1843
1917
  qitemId: input.qitemId,
1844
1918
  terminalState: input.terminalState,
1845
1919
  actorSession: input.fromSession,
1846
- identityProvenance: input.identityProvenance ?? null,
1920
+ identityProvenance: sideEffectProvenance(input.identityProvenance),
1847
1921
  ts,
1848
1922
  })) {
1849
1923
  events.push(dependentEvent);
@@ -1958,6 +2032,7 @@ export class QueueRepository {
1958
2032
  // or changing the note execution-view uses to exclude claim activity.
1959
2033
  closureTarget: qitem.state === "blocked" ? qitem.blockedOn ?? undefined : undefined,
1960
2034
  identityProvenance: input.identityProvenance ?? null, // P21 §4 era-stamp
2035
+ identityPrincipal: input.identityPrincipal ?? null,
1961
2036
  });
1962
2037
  // OPR.0.5.8.1 S1b — CLAIM-RESUME. A blocked row is claimable ("only
1963
2038
  // pending/blocked are claimable"), so claiming is a real exit from a park
@@ -1979,7 +2054,7 @@ export class QueueRepository {
1979
2054
  this.eventBus.notifySubscribers(persistedEvent);
1980
2055
  return this.getByIdOrThrow(input.qitemId);
1981
2056
  }
1982
- unclaim(qitemId, destinationSession, reason, identityProvenance) {
2057
+ unclaim(qitemId, destinationSession, reason, identityProvenance, identityPrincipal) {
1983
2058
  const qitem = this.getById(qitemId);
1984
2059
  if (!qitem) {
1985
2060
  throw new QueueRepositoryError("qitem_not_found", `qitem ${qitemId} not found`);
@@ -2006,6 +2081,7 @@ export class QueueRepository {
2006
2081
  actorSession: destinationSession,
2007
2082
  transitionNote: `unclaimed: ${reason}`,
2008
2083
  identityProvenance: identityProvenance ?? null, // P21 §4 era-stamp
2084
+ identityPrincipal: identityPrincipal ?? null,
2009
2085
  });
2010
2086
  return this.eventBus.persistWithinTransaction({
2011
2087
  type: "queue.unclaimed",
@@ -2142,6 +2218,7 @@ export class QueueRepository {
2142
2218
  // Carry its audit pointer so a later state write can end this chain.
2143
2219
  closureTarget: qitem.state === "in-progress" ? this.retainedClaimBlocker(input.qitemId) : undefined,
2144
2220
  identityProvenance: input.identityProvenance ?? null,
2221
+ identityPrincipal: input.identityPrincipal ?? null,
2145
2222
  });
2146
2223
  const persistedEvent = this.eventBus.persistWithinTransaction({
2147
2224
  type: "queue.updated",
@@ -2236,7 +2313,9 @@ export class QueueRepository {
2236
2313
  if (qitem.humanIntent === "update" && input.state === "blocked" && isHumanSeatSessionRef(effectiveBlockedOn ?? "")) {
2237
2314
  throw new QueueRepositoryError("invalid_human_notification", "An informational delivery cannot become a human approval park; author a separate decision request.");
2238
2315
  }
2239
- const isHumanPark = input.state === "blocked" && isHumanSeatSession(effectiveBlockedOn);
2316
+ // A park on a person by any address (a legacy human seat, or a registered person's own address or alias) keeps the
2317
+ // summary and evidence it names. validateHumanPark still requires them only for the legacy human-seat form.
2318
+ const isHumanPark = input.state === "blocked" && !!effectiveBlockedOn && this.isPersonAddress(effectiveBlockedOn);
2240
2319
  // A done close can also store the artifact the work produced, so the finished row carries its link.
2241
2320
  const isDoneClose = input.state === "done";
2242
2321
  // OPR.0.5.1 slice-51-06 D2 — summary/evidence_ref are persist-able ONLY at a human-seat park
@@ -2439,6 +2518,7 @@ export class QueueRepository {
2439
2518
  closureReason: validation.closureReason ?? undefined,
2440
2519
  closureTarget: validation.closureTarget ?? undefined,
2441
2520
  identityProvenance: input.identityProvenance ?? null, // P21 §4 era-stamp
2521
+ identityPrincipal: input.identityPrincipal ?? null,
2442
2522
  ownerNotificationKind: notification?.kind,
2443
2523
  ownerNotificationLevel: notification?.level,
2444
2524
  });
@@ -2499,7 +2579,7 @@ export class QueueRepository {
2499
2579
  qitemId: input.qitemId,
2500
2580
  terminalState: input.state,
2501
2581
  actorSession: input.actorSession,
2502
- identityProvenance: input.identityProvenance ?? null,
2582
+ identityProvenance: sideEffectProvenance(input.identityProvenance),
2503
2583
  ts,
2504
2584
  })
2505
2585
  : [];
@@ -2782,7 +2862,7 @@ export class QueueRepository {
2782
2862
  const result = this.db.transaction(() => {
2783
2863
  const item = this.getById(input.qitemId);
2784
2864
  if (item?.state !== "pending" || item.humanIntent === "update"
2785
- || item.destinationSession !== input.actorSession
2865
+ || (item.destinationSession !== input.actorSession && !input.primaryUser)
2786
2866
  || !this.isPersonAddress(item.destinationSession))
2787
2867
  return null;
2788
2868
  const text = input.decision.trim();
@@ -2790,7 +2870,8 @@ export class QueueRepository {
2790
2870
  ? unansweredQuestions(item.humanQuestions ?? [], item.humanAnswers ?? {})
2791
2871
  : [];
2792
2872
  const question = unanswered[0];
2793
- let transitionNote = "direct human reply received";
2873
+ let transitionNote = item.destinationSession === input.actorSession ? "direct human reply received"
2874
+ : `reply from ${input.actorSession}, the primary user at the terminal, on ${item.destinationSession}'s ask; not answered by ${item.destinationSession}`;
2794
2875
  if (question) {
2795
2876
  const typedReply = {
2796
2877
  kind: "typed-reply", text, placement: "first-unanswered", unansweredCount: unanswered.length - 1,
@@ -2839,7 +2920,7 @@ export class QueueRepository {
2839
2920
  return { status: "not-applicable", reason: `state-${item.state}`, ...(onRecord ? { answerOnRecord: true } : {}),
2840
2921
  ...(decidedForThem ? { decidedForThem } : {}) };
2841
2922
  }
2842
- if (item.destinationSession !== input.actorSession)
2923
+ if (item.destinationSession !== input.actorSession && !input.primaryUser)
2843
2924
  return { status: "not-applicable", reason: "not-the-asked-human" };
2844
2925
  const question = item.humanQuestions.find((q) => q.id === input.questionId);
2845
2926
  if (!question?.options.some((o) => o.id === input.optionId))
@@ -3099,7 +3180,7 @@ export class QueueRepository {
3099
3180
  * applies AFTER attention filtering. This makes the result
3100
3181
  * window-INDEPENDENT by construction: an old human-gate item
3101
3182
  * cannot be evicted past LIMIT by routine open qitems even when
3102
- * there are >>LIMIT of them. (Guard verdict qitem-20260518190827
3183
+ * there are >>LIMIT of them. (Guard verdict
3103
3184
  * BLOCKER 1 — the prior fetch-then-filter approach in the route
3104
3185
  * could still hide attention items behind ATTENTION_FETCH_BOUND
3105
3186
  * newer routine open qitems.)
@@ -3160,10 +3241,10 @@ export class QueueRepository {
3160
3241
  // optional scope filters (mirrors list() composition so
3161
3242
  // `attention=1` query params remain composable with
3162
3243
  // destinationSession/sourceSession/targetRepo — guard re-verify
3163
- // qitem-20260518192210 BLOCKER 1).
3244
+ // BLOCKER 1).
3164
3245
  const statePlaceholders = states.map(() => "?").join(", ");
3165
3246
  // The attention predicate is EXACT in SQL (guard re-verify-3
3166
- // qitem-20260518193005 BLOCKER 1): is_human_seat_session evaluates
3247
+ // BLOCKER 1): is_human_seat_session evaluates
3167
3248
  // the strict regex registered in the QueueRepository constructor.
3168
3249
  // Malformed rows that would have slipped through a LIKE superset
3169
3250
  // (e.g., 'human-@kernel' — empty name segment) are rejected at
@@ -3390,6 +3471,7 @@ export class QueueRepository {
3390
3471
  return loaded.ok ? loaded.entities : null;
3391
3472
  })(),
3392
3473
  hasTerminalTransport: (dest) => this.hasTerminalTransport(dest),
3474
+ hostedWake: (dest) => this.hostedWakeFn(dest),
3393
3475
  });
3394
3476
  }
3395
3477
  /** OPR.0.5.6.14 — terminal transport is a CAPABILITY, not topology presence.