@openrig/cli 0.7.14 → 0.7.15

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 (334) hide show
  1. package/README.md +5 -5
  2. package/daemon/assets/plugins/openrig/.claude-plugin/plugin.json +1 -1
  3. package/daemon/assets/plugins/openrig/.codex-plugin/plugin.json +1 -1
  4. package/daemon/assets/plugins/openrig/.cursor-plugin/plugin.json +1 -1
  5. package/daemon/assets/plugins/openrig/README.md +2 -0
  6. package/daemon/assets/plugins/openrig/plugin.json +1 -1
  7. package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
  8. package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
  9. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +4 -4
  10. package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +13 -4
  11. package/daemon/assets/plugins/openrig-core/skills/orienting-to-an-inherited-seat/CHANGELOG.md +10 -0
  12. package/daemon/assets/plugins/openrig-core/skills/orienting-to-an-inherited-seat/SKILL.md +12 -13
  13. package/daemon/context-packs/help/manifest.yaml +1 -1
  14. package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
  15. package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +41 -5
  16. package/daemon/context-packs/reference/getting-started.md +12 -11
  17. package/daemon/context-packs/reference/manifest.yaml +1 -1
  18. package/daemon/context-packs/reference/whats-new.md +150 -5
  19. package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
  20. package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
  21. package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
  22. package/daemon/context-packs/skills/claude-compaction-restore/SKILL.md +4 -4
  23. package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
  24. package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
  25. package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
  26. package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
  27. package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
  28. package/daemon/context-packs/skills/core/messaging-the-human/SKILL.md +13 -4
  29. package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
  30. package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
  31. package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
  32. package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
  33. package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
  34. package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
  35. package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
  36. package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
  37. package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
  38. package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
  39. package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
  40. package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
  41. package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
  42. package/daemon/context-packs/skills/core/working-with-an-openrig-team/manifest.yaml +1 -1
  43. package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
  44. package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
  45. package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
  46. package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
  47. package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
  48. package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
  49. package/daemon/context-packs/skills/orienting-to-an-inherited-seat/CHANGELOG.md +10 -0
  50. package/daemon/context-packs/skills/orienting-to-an-inherited-seat/SKILL.md +12 -13
  51. package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +3 -3
  52. package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
  53. package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
  54. package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
  55. package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
  56. package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
  57. package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
  58. package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
  59. package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
  60. package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
  61. package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
  62. package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
  63. package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
  64. package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
  65. package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
  66. package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
  67. package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
  68. package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
  69. package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
  70. package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
  71. package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
  72. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
  73. package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
  74. package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
  75. package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
  76. package/daemon/context-packs/world-example/manifest.yaml +1 -1
  77. package/daemon/context-packs/world-public/manifest.yaml +1 -1
  78. package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
  79. package/daemon/dist/adapters/codex-runtime-adapter.js +13 -3
  80. package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  81. package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts +2 -0
  82. package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts.map +1 -1
  83. package/daemon/dist/adapters/community-harness-runtime-adapter.js +93 -36
  84. package/daemon/dist/adapters/community-harness-runtime-adapter.js.map +1 -1
  85. package/daemon/dist/adapters/pi-resume.d.ts +3 -0
  86. package/daemon/dist/adapters/pi-resume.d.ts.map +1 -1
  87. package/daemon/dist/adapters/pi-resume.js +99 -51
  88. package/daemon/dist/adapters/pi-resume.js.map +1 -1
  89. package/daemon/dist/adapters/pi-runner.d.ts +2 -1
  90. package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
  91. package/daemon/dist/adapters/pi-runner.js +15 -9
  92. package/daemon/dist/adapters/pi-runner.js.map +1 -1
  93. package/daemon/dist/adapters/pi-runtime-adapter.d.ts +4 -0
  94. package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
  95. package/daemon/dist/adapters/pi-runtime-adapter.js +133 -75
  96. package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
  97. package/daemon/dist/adapters/tmux.d.ts +7 -0
  98. package/daemon/dist/adapters/tmux.d.ts.map +1 -1
  99. package/daemon/dist/adapters/tmux.js +26 -5
  100. package/daemon/dist/adapters/tmux.js.map +1 -1
  101. package/daemon/dist/build-info.js +3 -3
  102. package/daemon/dist/daemon-shutdown.d.ts +3 -0
  103. package/daemon/dist/daemon-shutdown.d.ts.map +1 -1
  104. package/daemon/dist/daemon-shutdown.js +6 -0
  105. package/daemon/dist/daemon-shutdown.js.map +1 -1
  106. package/daemon/dist/db/all-migrations.d.ts.map +1 -1
  107. package/daemon/dist/db/all-migrations.js +2 -0
  108. package/daemon/dist/db/all-migrations.js.map +1 -1
  109. package/daemon/dist/db/migrations/165_run_bound_activity_grants.d.ts +4 -0
  110. package/daemon/dist/db/migrations/165_run_bound_activity_grants.d.ts.map +1 -0
  111. package/daemon/dist/db/migrations/165_run_bound_activity_grants.js +14 -0
  112. package/daemon/dist/db/migrations/165_run_bound_activity_grants.js.map +1 -0
  113. package/daemon/dist/domain/activity-grants.d.ts +36 -3
  114. package/daemon/dist/domain/activity-grants.d.ts.map +1 -1
  115. package/daemon/dist/domain/activity-grants.js +188 -7
  116. package/daemon/dist/domain/activity-grants.js.map +1 -1
  117. package/daemon/dist/domain/applied-launch-observation-store.d.ts +2 -0
  118. package/daemon/dist/domain/applied-launch-observation-store.d.ts.map +1 -1
  119. package/daemon/dist/domain/applied-launch-observation-store.js +27 -16
  120. package/daemon/dist/domain/applied-launch-observation-store.js.map +1 -1
  121. package/daemon/dist/domain/claude-compaction-enforcer.js +2 -2
  122. package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
  123. package/daemon/dist/domain/codex-member-permissions.d.ts +2 -0
  124. package/daemon/dist/domain/codex-member-permissions.d.ts.map +1 -1
  125. package/daemon/dist/domain/codex-member-permissions.js +17 -9
  126. package/daemon/dist/domain/codex-member-permissions.js.map +1 -1
  127. package/daemon/dist/domain/codex-owned-plugin-trust.d.ts +6 -1
  128. package/daemon/dist/domain/codex-owned-plugin-trust.d.ts.map +1 -1
  129. package/daemon/dist/domain/codex-owned-plugin-trust.js +30 -9
  130. package/daemon/dist/domain/codex-owned-plugin-trust.js.map +1 -1
  131. package/daemon/dist/domain/execution-candidate-reader.d.ts +15 -5
  132. package/daemon/dist/domain/execution-candidate-reader.d.ts.map +1 -1
  133. package/daemon/dist/domain/execution-candidate-reader.js +36 -25
  134. package/daemon/dist/domain/execution-candidate-reader.js.map +1 -1
  135. package/daemon/dist/domain/execution-view.d.ts.map +1 -1
  136. package/daemon/dist/domain/execution-view.js +34 -11
  137. package/daemon/dist/domain/execution-view.js.map +1 -1
  138. package/daemon/dist/domain/gateway/destination-resolver.js +3 -3
  139. package/daemon/dist/domain/gateway/destination-resolver.js.map +1 -1
  140. package/daemon/dist/domain/gateway/slack/config.d.ts +2 -0
  141. package/daemon/dist/domain/gateway/slack/config.d.ts.map +1 -1
  142. package/daemon/dist/domain/gateway/slack/config.js +4 -0
  143. package/daemon/dist/domain/gateway/slack/config.js.map +1 -1
  144. package/daemon/dist/domain/gateway/slack/inbound.d.ts +11 -0
  145. package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
  146. package/daemon/dist/domain/gateway/slack/inbound.js +3 -0
  147. package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
  148. package/daemon/dist/domain/gateway/slack/slack-api.d.ts +2 -0
  149. package/daemon/dist/domain/gateway/slack/slack-api.d.ts.map +1 -1
  150. package/daemon/dist/domain/gateway/slack/slack-api.js +4 -0
  151. package/daemon/dist/domain/gateway/slack/slack-api.js.map +1 -1
  152. package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +2 -0
  153. package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
  154. package/daemon/dist/domain/gateway/slack/slack-delivery.js +2 -1
  155. package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
  156. package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
  157. package/daemon/dist/domain/gateway/slack/slack-subsystem.js +36 -2
  158. package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
  159. package/daemon/dist/domain/gateway/slack/thread-routing.d.ts +5 -0
  160. package/daemon/dist/domain/gateway/slack/thread-routing.d.ts.map +1 -1
  161. package/daemon/dist/domain/gateway/slack/thread-routing.js +1 -1
  162. package/daemon/dist/domain/gateway/slack/thread-routing.js.map +1 -1
  163. package/daemon/dist/domain/health-passive-ceremony.d.ts.map +1 -1
  164. package/daemon/dist/domain/health-passive-ceremony.js +13 -7
  165. package/daemon/dist/domain/health-passive-ceremony.js.map +1 -1
  166. package/daemon/dist/domain/native-permission-store.d.ts +40 -0
  167. package/daemon/dist/domain/native-permission-store.d.ts.map +1 -1
  168. package/daemon/dist/domain/native-permission-store.js +108 -29
  169. package/daemon/dist/domain/native-permission-store.js.map +1 -1
  170. package/daemon/dist/domain/native-resume-probe.d.ts +33 -1
  171. package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
  172. package/daemon/dist/domain/native-resume-probe.js +127 -4
  173. package/daemon/dist/domain/native-resume-probe.js.map +1 -1
  174. package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
  175. package/daemon/dist/domain/node-inventory.js +214 -30
  176. package/daemon/dist/domain/node-inventory.js.map +1 -1
  177. package/daemon/dist/domain/permission-drift.d.ts +2 -1
  178. package/daemon/dist/domain/permission-drift.d.ts.map +1 -1
  179. package/daemon/dist/domain/permission-drift.js.map +1 -1
  180. package/daemon/dist/domain/permission-policy/persisted-restore-posture.d.ts +62 -0
  181. package/daemon/dist/domain/permission-policy/persisted-restore-posture.d.ts.map +1 -0
  182. package/daemon/dist/domain/permission-policy/persisted-restore-posture.js +117 -0
  183. package/daemon/dist/domain/permission-policy/persisted-restore-posture.js.map +1 -0
  184. package/daemon/dist/domain/policies/context-usage-threshold.d.ts.map +1 -1
  185. package/daemon/dist/domain/policies/context-usage-threshold.js +5 -1
  186. package/daemon/dist/domain/policies/context-usage-threshold.js.map +1 -1
  187. package/daemon/dist/domain/policies/types.d.ts +2 -0
  188. package/daemon/dist/domain/policies/types.d.ts.map +1 -1
  189. package/daemon/dist/domain/queue-repository.d.ts +9 -1
  190. package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  191. package/daemon/dist/domain/queue-repository.js +24 -6
  192. package/daemon/dist/domain/queue-repository.js.map +1 -1
  193. package/daemon/dist/domain/queue-wake-ladder.d.ts +12 -0
  194. package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
  195. package/daemon/dist/domain/queue-wake-ladder.js +27 -7
  196. package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
  197. package/daemon/dist/domain/rehydrate-eligibility.d.ts.map +1 -1
  198. package/daemon/dist/domain/rehydrate-eligibility.js +3 -2
  199. package/daemon/dist/domain/rehydrate-eligibility.js.map +1 -1
  200. package/daemon/dist/domain/reply-to-choice.d.ts +10 -0
  201. package/daemon/dist/domain/reply-to-choice.d.ts.map +1 -1
  202. package/daemon/dist/domain/reply-to-choice.js +23 -0
  203. package/daemon/dist/domain/reply-to-choice.js.map +1 -1
  204. package/daemon/dist/domain/restore-check-service.d.ts +5 -0
  205. package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
  206. package/daemon/dist/domain/restore-check-service.js +31 -6
  207. package/daemon/dist/domain/restore-check-service.js.map +1 -1
  208. package/daemon/dist/domain/restore-orchestrator.d.ts +1 -1
  209. package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
  210. package/daemon/dist/domain/restore-orchestrator.js +48 -80
  211. package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
  212. package/daemon/dist/domain/restore-preconditions.d.ts +2 -0
  213. package/daemon/dist/domain/restore-preconditions.d.ts.map +1 -1
  214. package/daemon/dist/domain/restore-preconditions.js +6 -0
  215. package/daemon/dist/domain/restore-preconditions.js.map +1 -1
  216. package/daemon/dist/domain/resume-metadata-refresher.d.ts +4 -0
  217. package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
  218. package/daemon/dist/domain/resume-metadata-refresher.js +7 -2
  219. package/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
  220. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  221. package/daemon/dist/domain/rigspec-instantiator.js +2 -1
  222. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  223. package/daemon/dist/domain/runner-grant-launch.d.ts +16 -0
  224. package/daemon/dist/domain/runner-grant-launch.d.ts.map +1 -0
  225. package/daemon/dist/domain/runner-grant-launch.js +86 -0
  226. package/daemon/dist/domain/runner-grant-launch.js.map +1 -0
  227. package/daemon/dist/domain/runtime-adapter.d.ts +2 -0
  228. package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
  229. package/daemon/dist/domain/runtime-adapter.js.map +1 -1
  230. package/daemon/dist/domain/seat-delivery-guard.d.ts +13 -1
  231. package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
  232. package/daemon/dist/domain/seat-delivery-guard.js +53 -1
  233. package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
  234. package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
  235. package/daemon/dist/domain/seat-handover-service.js +13 -7
  236. package/daemon/dist/domain/seat-handover-service.js.map +1 -1
  237. package/daemon/dist/domain/seat-identity-reconciler.d.ts +3 -0
  238. package/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
  239. package/daemon/dist/domain/seat-identity-reconciler.js +34 -2
  240. package/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
  241. package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
  242. package/daemon/dist/domain/seat-lifecycle-service.js +5 -1
  243. package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
  244. package/daemon/dist/domain/seat-runtime-switch-service.d.ts.map +1 -1
  245. package/daemon/dist/domain/seat-runtime-switch-service.js +15 -0
  246. package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -1
  247. package/daemon/dist/domain/session-registry.d.ts +2 -0
  248. package/daemon/dist/domain/session-registry.d.ts.map +1 -1
  249. package/daemon/dist/domain/session-registry.js +16 -0
  250. package/daemon/dist/domain/session-registry.js.map +1 -1
  251. package/daemon/dist/domain/session-transport.js +1 -1
  252. package/daemon/dist/domain/session-transport.js.map +1 -1
  253. package/daemon/dist/domain/skill-discovery.d.ts.map +1 -1
  254. package/daemon/dist/domain/skill-discovery.js +2 -1
  255. package/daemon/dist/domain/skill-discovery.js.map +1 -1
  256. package/daemon/dist/domain/slow-op-recorder.d.ts +3 -0
  257. package/daemon/dist/domain/slow-op-recorder.d.ts.map +1 -1
  258. package/daemon/dist/domain/slow-op-recorder.js +5 -0
  259. package/daemon/dist/domain/slow-op-recorder.js.map +1 -1
  260. package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
  261. package/daemon/dist/domain/startup-orchestrator.js +9 -0
  262. package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
  263. package/daemon/dist/domain/successor-session-launcher.d.ts +3 -1
  264. package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
  265. package/daemon/dist/domain/successor-session-launcher.js +12 -2
  266. package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
  267. package/daemon/dist/domain/sync-site-wrap.d.ts +13 -1
  268. package/daemon/dist/domain/sync-site-wrap.d.ts.map +1 -1
  269. package/daemon/dist/domain/sync-site-wrap.js +38 -0
  270. package/daemon/dist/domain/sync-site-wrap.js.map +1 -1
  271. package/daemon/dist/domain/terminal/terminal-service.d.ts +3 -1
  272. package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
  273. package/daemon/dist/domain/terminal/terminal-service.js +17 -12
  274. package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
  275. package/daemon/dist/domain/types.d.ts +3 -0
  276. package/daemon/dist/domain/types.d.ts.map +1 -1
  277. package/daemon/dist/domain/types.js.map +1 -1
  278. package/daemon/dist/domain/watchdog-policy-engine.d.ts +5 -0
  279. package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
  280. package/daemon/dist/domain/watchdog-policy-engine.js +4 -0
  281. package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
  282. package/daemon/dist/domain/workflow-runtime.d.ts +1 -1
  283. package/daemon/dist/routes/activity.d.ts.map +1 -1
  284. package/daemon/dist/routes/activity.js +34 -2
  285. package/daemon/dist/routes/activity.js.map +1 -1
  286. package/daemon/dist/routes/sessions.d.ts.map +1 -1
  287. package/daemon/dist/routes/sessions.js +9 -6
  288. package/daemon/dist/routes/sessions.js.map +1 -1
  289. package/daemon/dist/startup.d.ts.map +1 -1
  290. package/daemon/dist/startup.js +27 -9
  291. package/daemon/dist/startup.js.map +1 -1
  292. package/daemon/docs/reference/agent-startup-guide.md +1 -1
  293. package/daemon/docs/reference/bundle-formats.md +6 -4
  294. package/daemon/docs/reference/daemon-http-clients.md +2 -1
  295. package/daemon/docs/reference/getting-started.md +12 -11
  296. package/daemon/docs/reference/harness-runner-contract.md +27 -1
  297. package/daemon/docs/reference/health-diagnosis.md +5 -3
  298. package/daemon/docs/reference/keeping-a-watch.md +14 -9
  299. package/daemon/docs/reference/quickstart.md +2 -2
  300. package/daemon/docs/reference/slack-app-setup.md +4 -0
  301. package/daemon/docs/reference/whats-new.md +150 -5
  302. package/daemon/specs/agents/shared/skills/core/messaging-the-human/SKILL.md +13 -4
  303. package/dist/build-info.js +3 -3
  304. package/dist/commands/down.d.ts.map +1 -1
  305. package/dist/commands/down.js +2 -1
  306. package/dist/commands/down.js.map +1 -1
  307. package/dist/commands/ps.d.ts +1 -0
  308. package/dist/commands/ps.d.ts.map +1 -1
  309. package/dist/commands/ps.js +2 -1
  310. package/dist/commands/ps.js.map +1 -1
  311. package/dist/commands/slack.d.ts.map +1 -1
  312. package/dist/commands/slack.js +2 -0
  313. package/dist/commands/slack.js.map +1 -1
  314. package/dist/daemon-lifecycle.d.ts.map +1 -1
  315. package/dist/daemon-lifecycle.js +10 -5
  316. package/dist/daemon-lifecycle.js.map +1 -1
  317. package/dist/lib/work-install.d.ts.map +1 -1
  318. package/dist/lib/work-install.js +7 -3
  319. package/dist/lib/work-install.js.map +1 -1
  320. package/dist/mcp-server.d.ts.map +1 -1
  321. package/dist/mcp-server.js +27 -13
  322. package/dist/mcp-server.js.map +1 -1
  323. package/package.json +1 -1
  324. package/tui/dist/connected-assistants.js +1 -1
  325. package/tui/dist/connected-assistants.js.map +1 -1
  326. package/tui/dist/main.js +4 -3
  327. package/tui/dist/main.js.map +1 -1
  328. package/tui/dist/render.d.ts.map +1 -1
  329. package/tui/dist/render.js +4 -1
  330. package/tui/dist/render.js.map +1 -1
  331. package/ui/dist/assets/index-BX8TUZ0E.css +32 -0
  332. package/ui/dist/assets/{index-BOYrLyfQ.js → index-BvUEh33d.js} +1 -1
  333. package/ui/dist/index.html +2 -2
  334. package/ui/dist/assets/index-DqSRu4OY.css +0 -32
@@ -1,3 +1,4 @@
1
+ import { runnerGrantIssuer } from "./domain/runner-grant-launch.js";
1
2
  import { piAccountStateRoot } from "./domain/pi-account-state.js";
2
3
  import { EnvironmentStartup } from "./domain/environment-startup.js";
3
4
  import { EnvironmentPlatform } from "./domain/environment-platform.js";
@@ -13,7 +14,7 @@ import { makeWatchdogDeliver } from "./domain/watchdog-delivery.js";
13
14
  import { fileURLToPath } from "node:url";
14
15
  import { discoverTailscaleSelfNames } from "./middleware/browser-boundary.js";
15
16
  import { configureShadowCapture } from "./domain/shadow-capture.js";
16
- import { SeatDeliveryGuard, resolveGuardTarget } from "./domain/seat-delivery-guard.js";
17
+ import { SeatDeliveryGuard, resolveExternalCliOccupant, resolveGuardTarget } from "./domain/seat-delivery-guard.js";
17
18
  import { seatCodexCorePluginDir, vendoredCorePluginDir } from "./domain/claude-core-plugin-env.js";
18
19
  import { queueRecoveryOwnsWake } from "./domain/queue-wake-ladder.js";
19
20
  import { HealthPolicyStore } from "./domain/health-policy.js";
@@ -109,7 +110,7 @@ import { setSelfHostId, setSelfHostIdSource } from "./domain/hosts/fanout-contra
109
110
  import { UpCommandRouter } from "./domain/up-command-router.js";
110
111
  import { RigTeardownOrchestrator } from "./domain/rig-teardown.js";
111
112
  import { ResumeMetadataRefresher } from "./domain/resume-metadata-refresher.js";
112
- import { observeClaudePaneStartedAt } from "./domain/native-process-lineage.js";
113
+ import { observeClaudePaneStartedAt, listNativeProcessesOrThrow, listNativeProcesses } from "./domain/native-process-lineage.js";
113
114
  import { TranscriptStore } from "./domain/transcript-store.js";
114
115
  import { resumeRunningTranscriptCaptures, wireTranscriptCaptureStops } from "./domain/transcript-capture.js";
115
116
  import { probeSessionActivity, SessionTransport, inspectComposerInput, draftDeliveryAllows, readDraftDeliverySetting } from "./domain/session-transport.js";
@@ -577,6 +578,7 @@ export async function createDaemon(opts) {
577
578
  const seatIdentityReconciler = new SeatIdentityReconciler({
578
579
  db,
579
580
  tmux: tmuxAdapter,
581
+ readPiRunnerState: sessionName => piAdapter.readRunnerSidecar(sessionName).state,
580
582
  });
581
583
  // cmuxFactory takes precedence (for tests), then cmuxExec-based CLI transport, then default
582
584
  const cmuxFactory = opts?.cmuxFactory
@@ -747,7 +749,17 @@ export async function createDaemon(opts) {
747
749
  return false;
748
750
  }
749
751
  };
750
- const piResume = new PiResumeAdapter(tmuxAdapter, { readFile: (p) => fs.readFileSync(p, "utf-8"), writeFile: (p, c) => fs.writeFileSync(p, c, "utf-8"), exists: (p) => fs.existsSync(p), mkdirp: (p) => fs.mkdirSync(p, { recursive: true }) }, { stateRoot: piStateRoot, runnerEntryPath: piRunnerEntryPath }, { accountHomeForSession: session => seatRuntimeHomeBySession(db, session, "pi"), stateRootForSession: piStateRootForSession, seatLaunchEnvironment, usageFactsEnabled: piUsageFactsEnabled, openRouterChargeEnabled: piOpenRouterChargeEnabled });
752
+ const runnerGrants = runnerGrantIssuer(db, tmuxAdapter);
753
+ const piResume = new PiResumeAdapter(tmuxAdapter, { readFile: (p) => fs.readFileSync(p, "utf-8"), writeFile: (p, c) => fs.writeFileSync(p, c, "utf-8"), exists: (p) => fs.existsSync(p), mkdirp: (p) => fs.mkdirSync(p, { recursive: true }) }, { stateRoot: piStateRoot, runnerEntryPath: piRunnerEntryPath }, { runnerGrant: async (session, runId, cwd) => {
754
+ const owners = db.prepare(`SELECT b.node_id AS nodeId FROM bindings b JOIN nodes n ON n.id=b.node_id
755
+ JOIN sessions s ON s.node_id=n.id AND s.id=(SELECT id FROM sessions WHERE node_id=n.id ORDER BY id DESC LIMIT 1)
756
+ WHERE b.tmux_session=? AND s.session_name=? AND n.runtime='pi' AND s.status NOT IN ('superseded','detached','exited')`)
757
+ .all(session, session);
758
+ const binding = owners.length === 1 ? sessionRegistry.getBindingForNode(owners[0].nodeId) : null;
759
+ if (!binding)
760
+ throw new Error("The restored Pi run has no unambiguous Core binding.");
761
+ return runnerGrants({ ...binding, cwd }, "pi", runId, 0);
762
+ }, accountHomeForSession: session => seatRuntimeHomeBySession(db, session, "pi"), stateRootForSession: piStateRootForSession, seatLaunchEnvironment, usageFactsEnabled: piUsageFactsEnabled, openRouterChargeEnabled: piOpenRouterChargeEnabled });
751
763
  const ompResume = new OmpResumeAdapter(tmuxAdapter, { readFile: (p) => fs.readFileSync(p, "utf-8"), writeFile: (p, c) => fs.writeFileSync(p, c, "utf-8"), exists: (p) => fs.existsSync(p), mkdirp: (p) => fs.mkdirSync(p, { recursive: true }) }, { stateRoot: ompStateRoot, runnerEntryPath: piRunnerEntryPath });
752
764
  // Services infrastructure (RigEnv) — created early so restore/bootstrap can use it
753
765
  const { ComposeServicesAdapter } = await import("./adapters/compose-services-adapter.js");
@@ -952,7 +964,7 @@ export async function createDaemon(opts) {
952
964
  } });
953
965
  // OPR.0.4.6.PI1 — the RPC-first Pi adapter (runner-in-a-pane). Same fsOps
954
966
  // shape as the Codex adapter; seat isolation roots under piStateRoot.
955
- const piAdapter = new PiRuntimeAdapter({ managedBlockRecords: guidanceBlockRecords, tmux: tmuxAdapter, seatLaunchEnvironment, fsOps: { readFile: (p) => fs.readFileSync(p, "utf-8"), writeFile: (p, c) => fs.writeFileSync(p, c, "utf-8"), exists: (p) => fs.existsSync(p), mkdirp: (p) => fs.mkdirSync(p, { recursive: true }), listFiles: (dir) => { const r = []; /** Collect relative file paths recursively. */ /** Collect relative file paths recursively. */ function w(d, pre) { for (const e of fs.readdirSync(d, { withFileTypes: true })) {
967
+ const piAdapter = new PiRuntimeAdapter({ runnerGrants, managedBlockRecords: guidanceBlockRecords, tmux: tmuxAdapter, seatLaunchEnvironment, fsOps: { readFile: (p) => fs.readFileSync(p, "utf-8"), writeFile: (p, c) => fs.writeFileSync(p, c, "utf-8"), exists: (p) => fs.existsSync(p), mkdirp: (p) => fs.mkdirSync(p, { recursive: true }), listFiles: (dir) => { const r = []; /** Collect relative file paths recursively. */ /** Collect relative file paths recursively. */ function w(d, pre) { for (const e of fs.readdirSync(d, { withFileTypes: true })) {
956
968
  if (e.isDirectory())
957
969
  w(nodePath.join(d, e.name), nodePath.join(pre, e.name));
958
970
  else
@@ -1163,7 +1175,7 @@ export async function createDaemon(opts) {
1163
1175
  db, rigRepo, podRepo,
1164
1176
  sessionRegistry, eventBus, nodeLauncher, startupOrchestrator,
1165
1177
  fsOps: { readFile: (p) => fs.readFileSync(p, "utf-8"), exists: (p) => fs.existsSync(p) },
1166
- adapters: withCommunityHarnesses({ "claude-code": claudeAdapter, "codex": codexAdapter, "pi": piAdapter, "omp": ompAdapter, "stub": stubAdapter, "terminal": new (await import("./adapters/terminal-adapter.js")).TerminalAdapter() }, { tmux: tmuxAdapter, seatLaunchEnvironment, environmentStartup, piAdapter }),
1178
+ adapters: withCommunityHarnesses({ "claude-code": claudeAdapter, "codex": codexAdapter, "pi": piAdapter, "omp": ompAdapter, "stub": stubAdapter, "terminal": new (await import("./adapters/terminal-adapter.js")).TerminalAdapter() }, { tmux: tmuxAdapter, seatLaunchEnvironment, environmentStartup, piAdapter, runnerGrants }),
1167
1179
  tmuxAdapter,
1168
1180
  agentImageLibrary,
1169
1181
  continuityPolicyMaterializer,
@@ -1223,7 +1235,7 @@ export async function createDaemon(opts) {
1223
1235
  "omp": ompAdapter,
1224
1236
  "stub": stubAdapter,
1225
1237
  "terminal": new (await import("./adapters/terminal-adapter.js")).TerminalAdapter(),
1226
- }, { tmux: tmuxAdapter, seatLaunchEnvironment, environmentStartup, piAdapter });
1238
+ }, { tmux: tmuxAdapter, seatLaunchEnvironment, environmentStartup, piAdapter, runnerGrants });
1227
1239
  let kernelBootTracker;
1228
1240
  try {
1229
1241
  const { bootKernelIfNeeded } = await import("./domain/kernel-boot.js");
@@ -1352,7 +1364,9 @@ export async function createDaemon(opts) {
1352
1364
  // #421 — the pane's current Claude process start time; a sidecar sampled earlier is not this
1353
1365
  // process's, so capture and null-fill skip it.
1354
1366
  const claudeProcessStartedAt = (sessionName) => observeClaudePaneStartedAt({ target: sessionName, tmux: tmuxAdapter });
1355
- const resumeMetadataRefresher = new ResumeMetadataRefresher({ sessionRegistry, tmuxAdapter, contextUsageStore, claudeProcessStartedAt, codexHome: configuredCodexHome,
1367
+ const resumeMetadataRefresher = new ResumeMetadataRefresher({ sessionRegistry, tmuxAdapter, contextUsageStore, claudeProcessStartedAt,
1368
+ claudeStartedAtForPass: (pass) => (sessionName) => observeClaudePaneStartedAt({ target: sessionName, tmux: tmuxAdapter,
1369
+ listProcesses: pass.lister(listNativeProcessesOrThrow, listNativeProcesses) }), codexHome: configuredCodexHome,
1356
1370
  seatHome: (nodeId, runtime) => seatRuntimeHome(db, nodeId, runtime).home });
1357
1371
  const claimService = new ClaimService({
1358
1372
  db, rigRepo, sessionRegistry, discoveryRepo, eventBus, tmuxAdapter, transcriptStore,
@@ -2269,8 +2283,12 @@ export async function createDaemon(opts) {
2269
2283
  // (i-c) fire-time target-generation gate: resolve the target's LIVE occupant-generation (P12
2270
2284
  // occupant_tenures) so a generation-bound wake is refused once the target has handed over.
2271
2285
  // UNKNOWN (null) fails open → deliver. A drop of this line disables the gate silently (gen-bound
2272
- // wakes would fire at the successor) — pinned in watchdog-target-gen-wiring.test.ts.
2273
- resolveTargetGeneration: (s) => sessionRegistry.currentOccupantGenerationForSession(s),
2286
+ // wakes would fire at the successor) — pinned in watchdog-target-gen-wiring.test.ts. Read by the
2287
+ // seat the name addresses, not the newest row with that name: an archived generation of the same
2288
+ // seat can hold a newer one, and a context watchdog would then read that node's telemetry. An external-CLI seat
2289
+ // addressed by its external session name, which the guard's address rules don't match, reads its own.
2290
+ resolveTargetGeneration: (s) => { const target = resolveGuardTarget(db, s); return target ? target.occupant ?? null : resolveExternalCliOccupant(db, s); },
2291
+ targetNameCarried: (s) => sessionRegistry.carriesSessionName(s),
2274
2292
  // Issue #1180 — sampled context use for token/percent context watchdogs,
2275
2293
  // generation-guarded against a predecessor's frozen telemetry.
2276
2294
  resolveContextUsage: (s, occupantGeneration) => watchdogJobsRepoInstance.findContextUsageForSession(s, occupantGeneration),