@openrig/cli 0.7.0 → 0.7.1

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 (1007) hide show
  1. package/README.md +9 -8
  2. package/daemon/assets/claude-statusline-context.cjs +13 -3
  3. package/daemon/assets/guidance/openrig-seat-skills.md +1 -0
  4. package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
  5. package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
  6. package/daemon/assets/plugins/openrig-core/hooks/claude.json +11 -11
  7. package/daemon/assets/plugins/openrig-core/hooks/scripts/activity-relay.cjs +9 -8
  8. package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus-health.cjs +2 -2
  9. package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +9 -6
  10. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +1 -1
  11. package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +13 -8
  12. package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +19 -4
  13. package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +167 -46
  14. package/daemon/assets/skills/rigs/SKILL.md +2 -1
  15. package/daemon/context-packs/help/manifest.yaml +1 -1
  16. package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
  17. package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +206 -28
  18. package/daemon/context-packs/reference/getting-started.md +65 -6
  19. package/daemon/context-packs/reference/manifest.yaml +1 -1
  20. package/daemon/context-packs/reference/rig-spec.md +82 -2
  21. package/daemon/context-packs/reference/whats-new.md +162 -113
  22. package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
  23. package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
  24. package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
  25. package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
  26. package/daemon/context-packs/skills/claude-compaction-restore/scripts/precompact-hook.mjs +1 -1
  27. package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
  28. package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
  29. package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
  30. package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
  31. package/daemon/context-packs/skills/core/messaging-the-human/SKILL.md +19 -4
  32. package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
  33. package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
  34. package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
  35. package/daemon/context-packs/skills/core/openrig-herdr/SKILL.md +3 -0
  36. package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
  37. package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
  38. package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
  39. package/daemon/context-packs/skills/core/openrig-software-factory/references/worked-example.md +2 -2
  40. package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
  41. package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
  42. package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
  43. package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
  44. package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
  45. package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
  46. package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
  47. package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
  48. package/daemon/context-packs/skills/forming-an-openrig-mental-model/SKILL.md +13 -8
  49. package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
  50. package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
  51. package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
  52. package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
  53. package/daemon/context-packs/skills/openrig-user/SKILL.md +167 -46
  54. package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
  55. package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
  56. package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
  57. package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
  58. package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
  59. package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
  60. package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
  61. package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
  62. package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
  63. package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
  64. package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
  65. package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
  66. package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
  67. package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
  68. package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
  69. package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
  70. package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
  71. package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
  72. package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
  73. package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
  74. package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
  75. package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
  76. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
  77. package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
  78. package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
  79. package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
  80. package/daemon/context-packs/world-example/manifest.yaml +1 -1
  81. package/daemon/context-packs/world-public/manifest.yaml +1 -1
  82. package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
  83. package/daemon/dist/adapters/claude-code-adapter.js +94 -26
  84. package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
  85. package/daemon/dist/adapters/claude-resume.d.ts +2 -1
  86. package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
  87. package/daemon/dist/adapters/claude-resume.js +10 -3
  88. package/daemon/dist/adapters/claude-resume.js.map +1 -1
  89. package/daemon/dist/adapters/codex-runtime-adapter.d.ts +10 -4
  90. package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
  91. package/daemon/dist/adapters/codex-runtime-adapter.js +231 -41
  92. package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  93. package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts +21 -2
  94. package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts.map +1 -1
  95. package/daemon/dist/adapters/community-harness-runtime-adapter.js +90 -8
  96. package/daemon/dist/adapters/community-harness-runtime-adapter.js.map +1 -1
  97. package/daemon/dist/adapters/pi-runner.d.ts +11 -0
  98. package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
  99. package/daemon/dist/adapters/pi-runner.js +59 -16
  100. package/daemon/dist/adapters/pi-runner.js.map +1 -1
  101. package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
  102. package/daemon/dist/adapters/pi-runtime-adapter.js +9 -6
  103. package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
  104. package/daemon/dist/adapters/stub-runtime-adapter.d.ts.map +1 -1
  105. package/daemon/dist/adapters/stub-runtime-adapter.js +9 -5
  106. package/daemon/dist/adapters/stub-runtime-adapter.js.map +1 -1
  107. package/daemon/dist/adapters/tmux.d.ts +15 -4
  108. package/daemon/dist/adapters/tmux.d.ts.map +1 -1
  109. package/daemon/dist/adapters/tmux.js +68 -26
  110. package/daemon/dist/adapters/tmux.js.map +1 -1
  111. package/daemon/dist/attention-surface.d.ts +14 -0
  112. package/daemon/dist/attention-surface.d.ts.map +1 -1
  113. package/daemon/dist/attention-surface.js.map +1 -1
  114. package/daemon/dist/build-info.js +3 -3
  115. package/daemon/dist/daemon-db-path.d.ts +6 -0
  116. package/daemon/dist/daemon-db-path.d.ts.map +1 -1
  117. package/daemon/dist/daemon-db-path.js +65 -1
  118. package/daemon/dist/daemon-db-path.js.map +1 -1
  119. package/daemon/dist/daemon-shutdown.d.ts.map +1 -1
  120. package/daemon/dist/daemon-shutdown.js +4 -2
  121. package/daemon/dist/daemon-shutdown.js.map +1 -1
  122. package/daemon/dist/db/all-migrations.d.ts.map +1 -1
  123. package/daemon/dist/db/all-migrations.js +16 -0
  124. package/daemon/dist/db/all-migrations.js.map +1 -1
  125. package/daemon/dist/db/migrations/124_context_usage_watchdog_units.d.ts +4 -0
  126. package/daemon/dist/db/migrations/124_context_usage_watchdog_units.d.ts.map +1 -0
  127. package/daemon/dist/db/migrations/124_context_usage_watchdog_units.js +9 -0
  128. package/daemon/dist/db/migrations/124_context_usage_watchdog_units.js.map +1 -0
  129. package/daemon/dist/db/migrations/125_node_advisor.d.ts +3 -0
  130. package/daemon/dist/db/migrations/125_node_advisor.d.ts.map +1 -0
  131. package/daemon/dist/db/migrations/125_node_advisor.js +8 -0
  132. package/daemon/dist/db/migrations/125_node_advisor.js.map +1 -0
  133. package/daemon/dist/db/migrations/127_operation_correlation.d.ts +3 -0
  134. package/daemon/dist/db/migrations/127_operation_correlation.d.ts.map +1 -0
  135. package/daemon/dist/db/migrations/127_operation_correlation.js +10 -0
  136. package/daemon/dist/db/migrations/127_operation_correlation.js.map +1 -0
  137. package/daemon/dist/db/migrations/128_terminal_policy.d.ts +3 -0
  138. package/daemon/dist/db/migrations/128_terminal_policy.d.ts.map +1 -0
  139. package/daemon/dist/db/migrations/128_terminal_policy.js +37 -0
  140. package/daemon/dist/db/migrations/128_terminal_policy.js.map +1 -0
  141. package/daemon/dist/db/migrations/129_stream_dispositions.d.ts +10 -0
  142. package/daemon/dist/db/migrations/129_stream_dispositions.d.ts.map +1 -0
  143. package/daemon/dist/db/migrations/129_stream_dispositions.js +35 -0
  144. package/daemon/dist/db/migrations/129_stream_dispositions.js.map +1 -0
  145. package/daemon/dist/db/migrations/130_stream_subscriptions.d.ts +11 -0
  146. package/daemon/dist/db/migrations/130_stream_subscriptions.d.ts.map +1 -0
  147. package/daemon/dist/db/migrations/130_stream_subscriptions.js +33 -0
  148. package/daemon/dist/db/migrations/130_stream_subscriptions.js.map +1 -0
  149. package/daemon/dist/db/migrations/131_stream_retention_floor.d.ts +8 -0
  150. package/daemon/dist/db/migrations/131_stream_retention_floor.d.ts.map +1 -0
  151. package/daemon/dist/db/migrations/131_stream_retention_floor.js +20 -0
  152. package/daemon/dist/db/migrations/131_stream_retention_floor.js.map +1 -0
  153. package/daemon/dist/db/migrations/135_seat_identity_process_evidence.d.ts +3 -0
  154. package/daemon/dist/db/migrations/135_seat_identity_process_evidence.d.ts.map +1 -0
  155. package/daemon/dist/db/migrations/135_seat_identity_process_evidence.js +16 -0
  156. package/daemon/dist/db/migrations/135_seat_identity_process_evidence.js.map +1 -0
  157. package/daemon/dist/domain/active-occupant.d.ts +3 -0
  158. package/daemon/dist/domain/active-occupant.d.ts.map +1 -1
  159. package/daemon/dist/domain/active-occupant.js +6 -2
  160. package/daemon/dist/domain/active-occupant.js.map +1 -1
  161. package/daemon/dist/domain/activity-taxonomy.d.ts +3 -0
  162. package/daemon/dist/domain/activity-taxonomy.d.ts.map +1 -1
  163. package/daemon/dist/domain/activity-taxonomy.js.map +1 -1
  164. package/daemon/dist/domain/agent-activity-store.d.ts +6 -2
  165. package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
  166. package/daemon/dist/domain/agent-activity-store.js +13 -4
  167. package/daemon/dist/domain/agent-activity-store.js.map +1 -1
  168. package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
  169. package/daemon/dist/domain/agent-manifest.js +14 -2
  170. package/daemon/dist/domain/agent-manifest.js.map +1 -1
  171. package/daemon/dist/domain/bootstrap-orchestrator.d.ts +3 -0
  172. package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
  173. package/daemon/dist/domain/bootstrap-orchestrator.js +20 -6
  174. package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
  175. package/daemon/dist/domain/builtin-startup-files.d.ts.map +1 -1
  176. package/daemon/dist/domain/builtin-startup-files.js +2 -0
  177. package/daemon/dist/domain/builtin-startup-files.js.map +1 -1
  178. package/daemon/dist/domain/bundle-behaviour.d.ts.map +1 -1
  179. package/daemon/dist/domain/bundle-behaviour.js +28 -1
  180. package/daemon/dist/domain/bundle-behaviour.js.map +1 -1
  181. package/daemon/dist/domain/claim-service.d.ts +19 -1
  182. package/daemon/dist/domain/claim-service.d.ts.map +1 -1
  183. package/daemon/dist/domain/claim-service.js +67 -19
  184. package/daemon/dist/domain/claim-service.js.map +1 -1
  185. package/daemon/dist/domain/classification-attempts.d.ts +4 -1
  186. package/daemon/dist/domain/classification-attempts.d.ts.map +1 -1
  187. package/daemon/dist/domain/classification-attempts.js +10 -1
  188. package/daemon/dist/domain/classification-attempts.js.map +1 -1
  189. package/daemon/dist/domain/classification-sources.d.ts +38 -0
  190. package/daemon/dist/domain/classification-sources.d.ts.map +1 -1
  191. package/daemon/dist/domain/classification-sources.js +24 -1
  192. package/daemon/dist/domain/classification-sources.js.map +1 -1
  193. package/daemon/dist/domain/claude-activity-hooks.d.ts +2 -2
  194. package/daemon/dist/domain/claude-activity-hooks.d.ts.map +1 -1
  195. package/daemon/dist/domain/claude-activity-hooks.js +8 -7
  196. package/daemon/dist/domain/claude-activity-hooks.js.map +1 -1
  197. package/daemon/dist/domain/claude-compaction-enforcer.d.ts +109 -7
  198. package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
  199. package/daemon/dist/domain/claude-compaction-enforcer.js +447 -52
  200. package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
  201. package/daemon/dist/domain/claude-core-plugin-env.d.ts +4 -1
  202. package/daemon/dist/domain/claude-core-plugin-env.d.ts.map +1 -1
  203. package/daemon/dist/domain/claude-core-plugin-env.js +23 -12
  204. package/daemon/dist/domain/claude-core-plugin-env.js.map +1 -1
  205. package/daemon/dist/domain/claude-managed-launch.d.ts +1 -1
  206. package/daemon/dist/domain/claude-managed-launch.d.ts.map +1 -1
  207. package/daemon/dist/domain/claude-managed-launch.js +33 -15
  208. package/daemon/dist/domain/claude-managed-launch.js.map +1 -1
  209. package/daemon/dist/domain/codex-owned-plugin-trust.d.ts +26 -0
  210. package/daemon/dist/domain/codex-owned-plugin-trust.d.ts.map +1 -0
  211. package/daemon/dist/domain/codex-owned-plugin-trust.js +187 -0
  212. package/daemon/dist/domain/codex-owned-plugin-trust.js.map +1 -0
  213. package/daemon/dist/domain/codex-rebuild-permissions.d.ts +54 -0
  214. package/daemon/dist/domain/codex-rebuild-permissions.d.ts.map +1 -0
  215. package/daemon/dist/domain/codex-rebuild-permissions.js +134 -0
  216. package/daemon/dist/domain/codex-rebuild-permissions.js.map +1 -0
  217. package/daemon/dist/domain/community-harness-launch-result.d.ts +33 -0
  218. package/daemon/dist/domain/community-harness-launch-result.d.ts.map +1 -0
  219. package/daemon/dist/domain/community-harness-launch-result.js +93 -0
  220. package/daemon/dist/domain/community-harness-launch-result.js.map +1 -0
  221. package/daemon/dist/domain/community-harness-presets.d.ts +27 -2
  222. package/daemon/dist/domain/community-harness-presets.d.ts.map +1 -1
  223. package/daemon/dist/domain/community-harness-presets.js +49 -5
  224. package/daemon/dist/domain/community-harness-presets.js.map +1 -1
  225. package/daemon/dist/domain/composer-prompts.d.ts +5 -2
  226. package/daemon/dist/domain/composer-prompts.d.ts.map +1 -1
  227. package/daemon/dist/domain/composer-prompts.js +2 -2
  228. package/daemon/dist/domain/composer-prompts.js.map +1 -1
  229. package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
  230. package/daemon/dist/domain/context-monitor.js +2 -1
  231. package/daemon/dist/domain/context-monitor.js.map +1 -1
  232. package/daemon/dist/domain/continuity-policy-materializer.d.ts +1 -0
  233. package/daemon/dist/domain/continuity-policy-materializer.d.ts.map +1 -1
  234. package/daemon/dist/domain/continuity-policy-materializer.js +2 -0
  235. package/daemon/dist/domain/continuity-policy-materializer.js.map +1 -1
  236. package/daemon/dist/domain/draft-aware-delivery.d.ts.map +1 -1
  237. package/daemon/dist/domain/draft-aware-delivery.js +1 -1
  238. package/daemon/dist/domain/draft-aware-delivery.js.map +1 -1
  239. package/daemon/dist/domain/execution-view.d.ts.map +1 -1
  240. package/daemon/dist/domain/execution-view.js +7 -6
  241. package/daemon/dist/domain/execution-view.js.map +1 -1
  242. package/daemon/dist/domain/footprint-choice.d.ts +41 -0
  243. package/daemon/dist/domain/footprint-choice.d.ts.map +1 -0
  244. package/daemon/dist/domain/footprint-choice.js +42 -0
  245. package/daemon/dist/domain/footprint-choice.js.map +1 -0
  246. package/daemon/dist/domain/gateway/delivery-rules-engine.d.ts +3 -0
  247. package/daemon/dist/domain/gateway/delivery-rules-engine.d.ts.map +1 -1
  248. package/daemon/dist/domain/gateway/delivery-rules-engine.js +1 -1
  249. package/daemon/dist/domain/gateway/delivery-rules-engine.js.map +1 -1
  250. package/daemon/dist/domain/gateway/human-registry.d.ts +32 -0
  251. package/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
  252. package/daemon/dist/domain/gateway/human-registry.js +71 -4
  253. package/daemon/dist/domain/gateway/human-registry.js.map +1 -1
  254. package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
  255. package/daemon/dist/domain/gateway/slack/inbound.js +52 -4
  256. package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
  257. package/daemon/dist/domain/gateway/slack/message.d.ts +3 -0
  258. package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
  259. package/daemon/dist/domain/gateway/slack/message.js +9 -2
  260. package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
  261. package/daemon/dist/domain/gateway/slack/queue-access.d.ts +7 -0
  262. package/daemon/dist/domain/gateway/slack/queue-access.d.ts.map +1 -1
  263. package/daemon/dist/domain/gateway/slack/queue-access.js +14 -2
  264. package/daemon/dist/domain/gateway/slack/queue-access.js.map +1 -1
  265. package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +1 -3
  266. package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
  267. package/daemon/dist/domain/gateway/slack/slack-delivery.js +22 -22
  268. package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
  269. package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
  270. package/daemon/dist/domain/gateway/slack/slack-subsystem.js +4 -7
  271. package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
  272. package/daemon/dist/domain/generated-file-hygiene.js +1 -1
  273. package/daemon/dist/domain/generated-file-hygiene.js.map +1 -1
  274. package/daemon/dist/domain/graph-projection.d.ts +3 -0
  275. package/daemon/dist/domain/graph-projection.d.ts.map +1 -1
  276. package/daemon/dist/domain/graph-projection.js +2 -0
  277. package/daemon/dist/domain/graph-projection.js.map +1 -1
  278. package/daemon/dist/domain/health-diagnosis.d.ts.map +1 -1
  279. package/daemon/dist/domain/health-diagnosis.js +14 -6
  280. package/daemon/dist/domain/health-diagnosis.js.map +1 -1
  281. package/daemon/dist/domain/hot-potato-enforcer.d.ts +1 -1
  282. package/daemon/dist/domain/human-questions.d.ts +2 -0
  283. package/daemon/dist/domain/human-questions.d.ts.map +1 -1
  284. package/daemon/dist/domain/human-questions.js +5 -0
  285. package/daemon/dist/domain/human-questions.js.map +1 -1
  286. package/daemon/dist/domain/kernel-boot.d.ts +5 -1
  287. package/daemon/dist/domain/kernel-boot.d.ts.map +1 -1
  288. package/daemon/dist/domain/kernel-boot.js +34 -4
  289. package/daemon/dist/domain/kernel-boot.js.map +1 -1
  290. package/daemon/dist/domain/managed-blocks.d.ts +32 -1
  291. package/daemon/dist/domain/managed-blocks.d.ts.map +1 -1
  292. package/daemon/dist/domain/managed-blocks.js +109 -11
  293. package/daemon/dist/domain/managed-blocks.js.map +1 -1
  294. package/daemon/dist/domain/mission-control/mission-control-action-log.d.ts +1 -1
  295. package/daemon/dist/domain/mission-control/mission-control-action-log.d.ts.map +1 -1
  296. package/daemon/dist/domain/mission-control/mission-control-action-log.js +3 -0
  297. package/daemon/dist/domain/mission-control/mission-control-action-log.js.map +1 -1
  298. package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts +21 -0
  299. package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
  300. package/daemon/dist/domain/mission-control/mission-control-write-contract.js +110 -0
  301. package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
  302. package/daemon/dist/domain/model-divergence/current-model-reader.d.ts +2 -0
  303. package/daemon/dist/domain/model-divergence/current-model-reader.d.ts.map +1 -1
  304. package/daemon/dist/domain/model-divergence/current-model-reader.js +7 -0
  305. package/daemon/dist/domain/model-divergence/current-model-reader.js.map +1 -1
  306. package/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts +10 -1
  307. package/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts.map +1 -1
  308. package/daemon/dist/domain/model-divergence/model-divergence-monitor.js +24 -5
  309. package/daemon/dist/domain/model-divergence/model-divergence-monitor.js.map +1 -1
  310. package/daemon/dist/domain/native-process-lineage.d.ts +3 -0
  311. package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
  312. package/daemon/dist/domain/native-process-lineage.js +60 -2
  313. package/daemon/dist/domain/native-process-lineage.js.map +1 -1
  314. package/daemon/dist/domain/native-resume-probe-evidence.d.ts +19 -0
  315. package/daemon/dist/domain/native-resume-probe-evidence.d.ts.map +1 -0
  316. package/daemon/dist/domain/native-resume-probe-evidence.js +37 -0
  317. package/daemon/dist/domain/native-resume-probe-evidence.js.map +1 -0
  318. package/daemon/dist/domain/native-resume-probe.d.ts +7 -0
  319. package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
  320. package/daemon/dist/domain/native-resume-probe.js +12 -9
  321. package/daemon/dist/domain/native-resume-probe.js.map +1 -1
  322. package/daemon/dist/domain/node-inventory.d.ts +49 -1
  323. package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
  324. package/daemon/dist/domain/node-inventory.js +119 -45
  325. package/daemon/dist/domain/node-inventory.js.map +1 -1
  326. package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
  327. package/daemon/dist/domain/node-launcher.js +9 -3
  328. package/daemon/dist/domain/node-launcher.js.map +1 -1
  329. package/daemon/dist/domain/occupant-invalidator.d.ts +16 -4
  330. package/daemon/dist/domain/occupant-invalidator.d.ts.map +1 -1
  331. package/daemon/dist/domain/occupant-invalidator.js +25 -5
  332. package/daemon/dist/domain/occupant-invalidator.js.map +1 -1
  333. package/daemon/dist/domain/operation-correlation.d.ts +78 -0
  334. package/daemon/dist/domain/operation-correlation.d.ts.map +1 -0
  335. package/daemon/dist/domain/operation-correlation.js +54 -0
  336. package/daemon/dist/domain/operation-correlation.js.map +1 -0
  337. package/daemon/dist/domain/permission-account.d.ts +28 -0
  338. package/daemon/dist/domain/permission-account.d.ts.map +1 -0
  339. package/daemon/dist/domain/permission-account.js +102 -0
  340. package/daemon/dist/domain/permission-account.js.map +1 -0
  341. package/daemon/dist/domain/permission-drift.d.ts.map +1 -1
  342. package/daemon/dist/domain/permission-drift.js +11 -7
  343. package/daemon/dist/domain/permission-drift.js.map +1 -1
  344. package/daemon/dist/domain/pod-bundle-assembler.d.ts +1 -0
  345. package/daemon/dist/domain/pod-bundle-assembler.d.ts.map +1 -1
  346. package/daemon/dist/domain/pod-bundle-assembler.js +25 -0
  347. package/daemon/dist/domain/pod-bundle-assembler.js.map +1 -1
  348. package/daemon/dist/domain/policies/artifact-pool-helpers.d.ts +7 -0
  349. package/daemon/dist/domain/policies/artifact-pool-helpers.d.ts.map +1 -1
  350. package/daemon/dist/domain/policies/artifact-pool-helpers.js +8 -4
  351. package/daemon/dist/domain/policies/artifact-pool-helpers.js.map +1 -1
  352. package/daemon/dist/domain/policies/context-usage-threshold.d.ts.map +1 -1
  353. package/daemon/dist/domain/policies/context-usage-threshold.js +109 -21
  354. package/daemon/dist/domain/policies/context-usage-threshold.js.map +1 -1
  355. package/daemon/dist/domain/policies/edge-artifact-required.d.ts +6 -1
  356. package/daemon/dist/domain/policies/edge-artifact-required.d.ts.map +1 -1
  357. package/daemon/dist/domain/policies/edge-artifact-required.js +18 -13
  358. package/daemon/dist/domain/policies/edge-artifact-required.js.map +1 -1
  359. package/daemon/dist/domain/policies/mode-scheduled-end.d.ts +2 -0
  360. package/daemon/dist/domain/policies/mode-scheduled-end.d.ts.map +1 -1
  361. package/daemon/dist/domain/policies/mode-scheduled-end.js +5 -1
  362. package/daemon/dist/domain/policies/mode-scheduled-end.js.map +1 -1
  363. package/daemon/dist/domain/policies/periodic-reminder.d.ts +10 -0
  364. package/daemon/dist/domain/policies/periodic-reminder.d.ts.map +1 -1
  365. package/daemon/dist/domain/policies/periodic-reminder.js +11 -6
  366. package/daemon/dist/domain/policies/periodic-reminder.js.map +1 -1
  367. package/daemon/dist/domain/policies/types.d.ts +25 -0
  368. package/daemon/dist/domain/policies/types.d.ts.map +1 -1
  369. package/daemon/dist/domain/policies/workflow-keepalive.d.ts +6 -1
  370. package/daemon/dist/domain/policies/workflow-keepalive.d.ts.map +1 -1
  371. package/daemon/dist/domain/policies/workflow-keepalive.js +11 -5
  372. package/daemon/dist/domain/policies/workflow-keepalive.js.map +1 -1
  373. package/daemon/dist/domain/profile-resolution-worker.d.ts +7 -0
  374. package/daemon/dist/domain/profile-resolution-worker.d.ts.map +1 -0
  375. package/daemon/dist/domain/profile-resolution-worker.js +83 -0
  376. package/daemon/dist/domain/profile-resolution-worker.js.map +1 -0
  377. package/daemon/dist/domain/profile-resolver.d.ts +6 -0
  378. package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
  379. package/daemon/dist/domain/profile-resolver.js +14 -2
  380. package/daemon/dist/domain/profile-resolver.js.map +1 -1
  381. package/daemon/dist/domain/project-classifier.d.ts +7 -0
  382. package/daemon/dist/domain/project-classifier.d.ts.map +1 -1
  383. package/daemon/dist/domain/project-classifier.js +26 -0
  384. package/daemon/dist/domain/project-classifier.js.map +1 -1
  385. package/daemon/dist/domain/provider/subscription-move-report.d.ts +86 -0
  386. package/daemon/dist/domain/provider/subscription-move-report.d.ts.map +1 -0
  387. package/daemon/dist/domain/provider/subscription-move-report.js +227 -0
  388. package/daemon/dist/domain/provider/subscription-move-report.js.map +1 -0
  389. package/daemon/dist/domain/ps-projection.d.ts +6 -35
  390. package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
  391. package/daemon/dist/domain/ps-projection.js +14 -55
  392. package/daemon/dist/domain/ps-projection.js.map +1 -1
  393. package/daemon/dist/domain/queue-owner.d.ts +6 -3
  394. package/daemon/dist/domain/queue-owner.d.ts.map +1 -1
  395. package/daemon/dist/domain/queue-owner.js +10 -5
  396. package/daemon/dist/domain/queue-owner.js.map +1 -1
  397. package/daemon/dist/domain/queue-pickup.d.ts +5 -2
  398. package/daemon/dist/domain/queue-pickup.d.ts.map +1 -1
  399. package/daemon/dist/domain/queue-pickup.js +19 -2
  400. package/daemon/dist/domain/queue-pickup.js.map +1 -1
  401. package/daemon/dist/domain/queue-repository.d.ts +54 -21
  402. package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  403. package/daemon/dist/domain/queue-repository.js +257 -97
  404. package/daemon/dist/domain/queue-repository.js.map +1 -1
  405. package/daemon/dist/domain/queue-retention.d.ts +18 -0
  406. package/daemon/dist/domain/queue-retention.d.ts.map +1 -1
  407. package/daemon/dist/domain/queue-retention.js +74 -0
  408. package/daemon/dist/domain/queue-retention.js.map +1 -1
  409. package/daemon/dist/domain/queue-stuck-sweep.d.ts +2 -0
  410. package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
  411. package/daemon/dist/domain/queue-stuck-sweep.js +37 -3
  412. package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
  413. package/daemon/dist/domain/queue-wait-backoff.d.ts +3 -0
  414. package/daemon/dist/domain/queue-wait-backoff.d.ts.map +1 -1
  415. package/daemon/dist/domain/queue-wait-backoff.js +9 -0
  416. package/daemon/dist/domain/queue-wait-backoff.js.map +1 -1
  417. package/daemon/dist/domain/queue-waiting.d.ts +2 -0
  418. package/daemon/dist/domain/queue-waiting.d.ts.map +1 -1
  419. package/daemon/dist/domain/queue-waiting.js.map +1 -1
  420. package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
  421. package/daemon/dist/domain/queue-wake-ladder.js +18 -6
  422. package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
  423. package/daemon/dist/domain/reconciler.d.ts +23 -0
  424. package/daemon/dist/domain/reconciler.d.ts.map +1 -1
  425. package/daemon/dist/domain/reconciler.js +44 -1
  426. package/daemon/dist/domain/reconciler.js.map +1 -1
  427. package/daemon/dist/domain/rehydrate-eligibility.d.ts.map +1 -1
  428. package/daemon/dist/domain/rehydrate-eligibility.js +2 -3
  429. package/daemon/dist/domain/rehydrate-eligibility.js.map +1 -1
  430. package/daemon/dist/domain/restore-guidance.d.ts +7 -0
  431. package/daemon/dist/domain/restore-guidance.d.ts.map +1 -1
  432. package/daemon/dist/domain/restore-guidance.js +20 -8
  433. package/daemon/dist/domain/restore-guidance.js.map +1 -1
  434. package/daemon/dist/domain/restore-orchestrator.d.ts +13 -1
  435. package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
  436. package/daemon/dist/domain/restore-orchestrator.js +151 -26
  437. package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
  438. package/daemon/dist/domain/restore-plan-preview.d.ts +7 -2
  439. package/daemon/dist/domain/restore-plan-preview.d.ts.map +1 -1
  440. package/daemon/dist/domain/restore-plan-preview.js +28 -7
  441. package/daemon/dist/domain/restore-plan-preview.js.map +1 -1
  442. package/daemon/dist/domain/restore-policy.d.ts +4 -0
  443. package/daemon/dist/domain/restore-policy.d.ts.map +1 -1
  444. package/daemon/dist/domain/restore-policy.js +11 -0
  445. package/daemon/dist/domain/restore-policy.js.map +1 -1
  446. package/daemon/dist/domain/rig-edge-ops.d.ts +58 -0
  447. package/daemon/dist/domain/rig-edge-ops.d.ts.map +1 -0
  448. package/daemon/dist/domain/rig-edge-ops.js +113 -0
  449. package/daemon/dist/domain/rig-edge-ops.js.map +1 -0
  450. package/daemon/dist/domain/rig-name-override.d.ts +14 -0
  451. package/daemon/dist/domain/rig-name-override.d.ts.map +1 -0
  452. package/daemon/dist/domain/rig-name-override.js +38 -0
  453. package/daemon/dist/domain/rig-name-override.js.map +1 -0
  454. package/daemon/dist/domain/rig-repository.d.ts +10 -2
  455. package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
  456. package/daemon/dist/domain/rig-repository.js +14 -0
  457. package/daemon/dist/domain/rig-repository.js.map +1 -1
  458. package/daemon/dist/domain/rig-status-compose.d.ts +1 -1
  459. package/daemon/dist/domain/rig-status-compose.d.ts.map +1 -1
  460. package/daemon/dist/domain/rig-status-compose.js +3 -1
  461. package/daemon/dist/domain/rig-status-compose.js.map +1 -1
  462. package/daemon/dist/domain/rig-teardown.d.ts +19 -0
  463. package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
  464. package/daemon/dist/domain/rig-teardown.js +78 -8
  465. package/daemon/dist/domain/rig-teardown.js.map +1 -1
  466. package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
  467. package/daemon/dist/domain/rigspec-codec.js +10 -0
  468. package/daemon/dist/domain/rigspec-codec.js.map +1 -1
  469. package/daemon/dist/domain/rigspec-exporter.d.ts +3 -0
  470. package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
  471. package/daemon/dist/domain/rigspec-exporter.js +22 -0
  472. package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
  473. package/daemon/dist/domain/rigspec-instantiator.d.ts +30 -2
  474. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  475. package/daemon/dist/domain/rigspec-instantiator.js +262 -47
  476. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  477. package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
  478. package/daemon/dist/domain/rigspec-preflight.js +15 -2
  479. package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
  480. package/daemon/dist/domain/rigspec-schema.d.ts +3 -0
  481. package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  482. package/daemon/dist/domain/rigspec-schema.js +67 -3
  483. package/daemon/dist/domain/rigspec-schema.js.map +1 -1
  484. package/daemon/dist/domain/runtime-adapter.d.ts +20 -1
  485. package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
  486. package/daemon/dist/domain/runtime-adapter.js +5 -1
  487. package/daemon/dist/domain/runtime-adapter.js.map +1 -1
  488. package/daemon/dist/domain/scope/scope-view-projection.d.ts +6 -0
  489. package/daemon/dist/domain/scope/scope-view-projection.d.ts.map +1 -1
  490. package/daemon/dist/domain/scope/scope-view-projection.js +26 -10
  491. package/daemon/dist/domain/scope/scope-view-projection.js.map +1 -1
  492. package/daemon/dist/domain/seat-activity-service.d.ts +4 -2
  493. package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
  494. package/daemon/dist/domain/seat-activity-service.js +13 -5
  495. package/daemon/dist/domain/seat-activity-service.js.map +1 -1
  496. package/daemon/dist/domain/seat-attention-reconciler.d.ts +19 -0
  497. package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
  498. package/daemon/dist/domain/seat-attention-reconciler.js +60 -6
  499. package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
  500. package/daemon/dist/domain/seat-delivery-guard.d.ts +20 -1
  501. package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
  502. package/daemon/dist/domain/seat-delivery-guard.js +66 -11
  503. package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
  504. package/daemon/dist/domain/seat-handover-service.d.ts +8 -0
  505. package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
  506. package/daemon/dist/domain/seat-handover-service.js +74 -4
  507. package/daemon/dist/domain/seat-handover-service.js.map +1 -1
  508. package/daemon/dist/domain/seat-identity-store.d.ts +11 -1
  509. package/daemon/dist/domain/seat-identity-store.d.ts.map +1 -1
  510. package/daemon/dist/domain/seat-identity-store.js +29 -4
  511. package/daemon/dist/domain/seat-identity-store.js.map +1 -1
  512. package/daemon/dist/domain/seat-launch-additions.d.ts +115 -0
  513. package/daemon/dist/domain/seat-launch-additions.d.ts.map +1 -0
  514. package/daemon/dist/domain/seat-launch-additions.js +439 -0
  515. package/daemon/dist/domain/seat-launch-additions.js.map +1 -0
  516. package/daemon/dist/domain/seat-launch-environment.d.ts +1 -1
  517. package/daemon/dist/domain/seat-launch-environment.d.ts.map +1 -1
  518. package/daemon/dist/domain/seat-launch-environment.js +1 -1
  519. package/daemon/dist/domain/seat-launch-environment.js.map +1 -1
  520. package/daemon/dist/domain/seat-lifecycle-service.d.ts +79 -4
  521. package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
  522. package/daemon/dist/domain/seat-lifecycle-service.js +202 -12
  523. package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
  524. package/daemon/dist/domain/seat-skill-apply.d.ts +139 -0
  525. package/daemon/dist/domain/seat-skill-apply.d.ts.map +1 -0
  526. package/daemon/dist/domain/seat-skill-apply.js +221 -0
  527. package/daemon/dist/domain/seat-skill-apply.js.map +1 -0
  528. package/daemon/dist/domain/seat-skill-storage.d.ts +295 -0
  529. package/daemon/dist/domain/seat-skill-storage.d.ts.map +1 -0
  530. package/daemon/dist/domain/seat-skill-storage.js +850 -0
  531. package/daemon/dist/domain/seat-skill-storage.js.map +1 -0
  532. package/daemon/dist/domain/seat-status-service.d.ts +9 -0
  533. package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
  534. package/daemon/dist/domain/seat-status-service.js +15 -3
  535. package/daemon/dist/domain/seat-status-service.js.map +1 -1
  536. package/daemon/dist/domain/session-registry.d.ts +4 -0
  537. package/daemon/dist/domain/session-registry.d.ts.map +1 -1
  538. package/daemon/dist/domain/session-registry.js +13 -0
  539. package/daemon/dist/domain/session-registry.js.map +1 -1
  540. package/daemon/dist/domain/session-transport.d.ts +52 -21
  541. package/daemon/dist/domain/session-transport.d.ts.map +1 -1
  542. package/daemon/dist/domain/session-transport.js +150 -47
  543. package/daemon/dist/domain/session-transport.js.map +1 -1
  544. package/daemon/dist/domain/skill-catalog.d.ts +16 -0
  545. package/daemon/dist/domain/skill-catalog.d.ts.map +1 -1
  546. package/daemon/dist/domain/skill-catalog.js +15 -6
  547. package/daemon/dist/domain/skill-catalog.js.map +1 -1
  548. package/daemon/dist/domain/skill-discovery.d.ts +17 -2
  549. package/daemon/dist/domain/skill-discovery.d.ts.map +1 -1
  550. package/daemon/dist/domain/skill-discovery.js +44 -5
  551. package/daemon/dist/domain/skill-discovery.js.map +1 -1
  552. package/daemon/dist/domain/startup-orchestrator.d.ts +26 -2
  553. package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
  554. package/daemon/dist/domain/startup-orchestrator.js +226 -14
  555. package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
  556. package/daemon/dist/domain/stream-dispositions.d.ts +51 -0
  557. package/daemon/dist/domain/stream-dispositions.d.ts.map +1 -0
  558. package/daemon/dist/domain/stream-dispositions.js +112 -0
  559. package/daemon/dist/domain/stream-dispositions.js.map +1 -0
  560. package/daemon/dist/domain/stream-store.d.ts +22 -0
  561. package/daemon/dist/domain/stream-store.d.ts.map +1 -1
  562. package/daemon/dist/domain/stream-store.js +49 -6
  563. package/daemon/dist/domain/stream-store.js.map +1 -1
  564. package/daemon/dist/domain/stream-subscriptions.d.ts +94 -0
  565. package/daemon/dist/domain/stream-subscriptions.d.ts.map +1 -0
  566. package/daemon/dist/domain/stream-subscriptions.js +160 -0
  567. package/daemon/dist/domain/stream-subscriptions.js.map +1 -0
  568. package/daemon/dist/domain/successor-session-launcher.d.ts +6 -0
  569. package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
  570. package/daemon/dist/domain/successor-session-launcher.js +5 -2
  571. package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
  572. package/daemon/dist/domain/terminal/herdr-adapter.d.ts +2 -0
  573. package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
  574. package/daemon/dist/domain/terminal/herdr-adapter.js +104 -1
  575. package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
  576. package/daemon/dist/domain/terminal/herdr-sessions.d.ts +9 -0
  577. package/daemon/dist/domain/terminal/herdr-sessions.d.ts.map +1 -0
  578. package/daemon/dist/domain/terminal/herdr-sessions.js +23 -0
  579. package/daemon/dist/domain/terminal/herdr-sessions.js.map +1 -0
  580. package/daemon/dist/domain/terminal/terminal-provider.d.ts +4 -0
  581. package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
  582. package/daemon/dist/domain/terminal/terminal-service.d.ts +12 -3
  583. package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
  584. package/daemon/dist/domain/terminal/terminal-service.js +42 -17
  585. package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
  586. package/daemon/dist/domain/terminal/view-composer.d.ts.map +1 -1
  587. package/daemon/dist/domain/terminal/view-composer.js +1 -0
  588. package/daemon/dist/domain/terminal/view-composer.js.map +1 -1
  589. package/daemon/dist/domain/terminal-policy.d.ts +80 -0
  590. package/daemon/dist/domain/terminal-policy.d.ts.map +1 -0
  591. package/daemon/dist/domain/terminal-policy.js +117 -0
  592. package/daemon/dist/domain/terminal-policy.js.map +1 -0
  593. package/daemon/dist/domain/terminal-seat.d.ts +9 -0
  594. package/daemon/dist/domain/terminal-seat.d.ts.map +1 -0
  595. package/daemon/dist/domain/terminal-seat.js +37 -0
  596. package/daemon/dist/domain/terminal-seat.js.map +1 -0
  597. package/daemon/dist/domain/topology-converge.d.ts +25 -2
  598. package/daemon/dist/domain/topology-converge.d.ts.map +1 -1
  599. package/daemon/dist/domain/topology-converge.js +14 -1
  600. package/daemon/dist/domain/topology-converge.js.map +1 -1
  601. package/daemon/dist/domain/types.d.ts +58 -2
  602. package/daemon/dist/domain/types.d.ts.map +1 -1
  603. package/daemon/dist/domain/types.js.map +1 -1
  604. package/daemon/dist/domain/urgent-line.d.ts +4 -0
  605. package/daemon/dist/domain/urgent-line.d.ts.map +1 -0
  606. package/daemon/dist/domain/urgent-line.js +7 -0
  607. package/daemon/dist/domain/urgent-line.js.map +1 -0
  608. package/daemon/dist/domain/usage-series.d.ts.map +1 -1
  609. package/daemon/dist/domain/usage-series.js +6 -2
  610. package/daemon/dist/domain/usage-series.js.map +1 -1
  611. package/daemon/dist/domain/user-settings/settings-browser.js +2 -2
  612. package/daemon/dist/domain/user-settings/settings-browser.js.map +1 -1
  613. package/daemon/dist/domain/user-settings/settings-store.d.ts +3 -1
  614. package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
  615. package/daemon/dist/domain/user-settings/settings-store.js +73 -1
  616. package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
  617. package/daemon/dist/domain/view-projector.d.ts.map +1 -1
  618. package/daemon/dist/domain/view-projector.js +2 -1
  619. package/daemon/dist/domain/view-projector.js.map +1 -1
  620. package/daemon/dist/domain/watchdog-delivery.js +1 -1
  621. package/daemon/dist/domain/watchdog-delivery.js.map +1 -1
  622. package/daemon/dist/domain/watchdog-job-update.d.ts +21 -0
  623. package/daemon/dist/domain/watchdog-job-update.d.ts.map +1 -0
  624. package/daemon/dist/domain/watchdog-job-update.js +143 -0
  625. package/daemon/dist/domain/watchdog-job-update.js.map +1 -0
  626. package/daemon/dist/domain/watchdog-jobs-repository.d.ts +63 -7
  627. package/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -1
  628. package/daemon/dist/domain/watchdog-jobs-repository.js +190 -21
  629. package/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
  630. package/daemon/dist/domain/watchdog-policy-engine.d.ts +23 -0
  631. package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
  632. package/daemon/dist/domain/watchdog-policy-engine.js +46 -13
  633. package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
  634. package/daemon/dist/domain/workflow-exception-escalation.d.ts.map +1 -1
  635. package/daemon/dist/domain/workflow-exception-escalation.js +7 -3
  636. package/daemon/dist/domain/workflow-exception-escalation.js.map +1 -1
  637. package/daemon/dist/domain/workflow-projector.d.ts +5 -2
  638. package/daemon/dist/domain/workflow-projector.d.ts.map +1 -1
  639. package/daemon/dist/domain/workflow-projector.js +16 -7
  640. package/daemon/dist/domain/workflow-projector.js.map +1 -1
  641. package/daemon/dist/domain/workflow-runtime.d.ts +8 -2
  642. package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
  643. package/daemon/dist/domain/workflow-runtime.js +30 -7
  644. package/daemon/dist/domain/workflow-runtime.js.map +1 -1
  645. package/daemon/dist/domain/workspace/project-read.d.ts +2 -0
  646. package/daemon/dist/domain/workspace/project-read.d.ts.map +1 -1
  647. package/daemon/dist/domain/workspace/project-read.js +10 -1
  648. package/daemon/dist/domain/workspace/project-read.js.map +1 -1
  649. package/daemon/dist/index.d.ts.map +1 -1
  650. package/daemon/dist/index.js +2 -0
  651. package/daemon/dist/index.js.map +1 -1
  652. package/daemon/dist/router-line-surface.d.ts +2 -0
  653. package/daemon/dist/router-line-surface.d.ts.map +1 -0
  654. package/daemon/dist/router-line-surface.js +3 -0
  655. package/daemon/dist/router-line-surface.js.map +1 -0
  656. package/daemon/dist/routes/activity.d.ts.map +1 -1
  657. package/daemon/dist/routes/activity.js +3 -0
  658. package/daemon/dist/routes/activity.js.map +1 -1
  659. package/daemon/dist/routes/agent-images.d.ts.map +1 -1
  660. package/daemon/dist/routes/agent-images.js +10 -2
  661. package/daemon/dist/routes/agent-images.js.map +1 -1
  662. package/daemon/dist/routes/attention.d.ts.map +1 -1
  663. package/daemon/dist/routes/attention.js +30 -3
  664. package/daemon/dist/routes/attention.js.map +1 -1
  665. package/daemon/dist/routes/bootstrap-failure-response.js +2 -2
  666. package/daemon/dist/routes/bootstrap-failure-response.js.map +1 -1
  667. package/daemon/dist/routes/bundles.js +1 -1
  668. package/daemon/dist/routes/bundles.js.map +1 -1
  669. package/daemon/dist/routes/compaction.d.ts.map +1 -1
  670. package/daemon/dist/routes/compaction.js +31 -10
  671. package/daemon/dist/routes/compaction.js.map +1 -1
  672. package/daemon/dist/routes/hosts.d.ts.map +1 -1
  673. package/daemon/dist/routes/hosts.js +2 -0
  674. package/daemon/dist/routes/hosts.js.map +1 -1
  675. package/daemon/dist/routes/mission-control.d.ts.map +1 -1
  676. package/daemon/dist/routes/mission-control.js +5 -1
  677. package/daemon/dist/routes/mission-control.js.map +1 -1
  678. package/daemon/dist/routes/projects.d.ts.map +1 -1
  679. package/daemon/dist/routes/projects.js +59 -12
  680. package/daemon/dist/routes/projects.js.map +1 -1
  681. package/daemon/dist/routes/proof.js +2 -2
  682. package/daemon/dist/routes/proof.js.map +1 -1
  683. package/daemon/dist/routes/provider.d.ts.map +1 -1
  684. package/daemon/dist/routes/provider.js +87 -0
  685. package/daemon/dist/routes/provider.js.map +1 -1
  686. package/daemon/dist/routes/queue.d.ts.map +1 -1
  687. package/daemon/dist/routes/queue.js +52 -3
  688. package/daemon/dist/routes/queue.js.map +1 -1
  689. package/daemon/dist/routes/rigs.d.ts.map +1 -1
  690. package/daemon/dist/routes/rigs.js +75 -10
  691. package/daemon/dist/routes/rigs.js.map +1 -1
  692. package/daemon/dist/routes/rigspec.d.ts.map +1 -1
  693. package/daemon/dist/routes/rigspec.js +38 -12
  694. package/daemon/dist/routes/rigspec.js.map +1 -1
  695. package/daemon/dist/routes/scopes.d.ts.map +1 -1
  696. package/daemon/dist/routes/scopes.js +30 -7
  697. package/daemon/dist/routes/scopes.js.map +1 -1
  698. package/daemon/dist/routes/seat.d.ts.map +1 -1
  699. package/daemon/dist/routes/seat.js +19 -3
  700. package/daemon/dist/routes/seat.js.map +1 -1
  701. package/daemon/dist/routes/sessions.js +5 -0
  702. package/daemon/dist/routes/sessions.js.map +1 -1
  703. package/daemon/dist/routes/skills.d.ts.map +1 -1
  704. package/daemon/dist/routes/skills.js +54 -1
  705. package/daemon/dist/routes/skills.js.map +1 -1
  706. package/daemon/dist/routes/stream.d.ts.map +1 -1
  707. package/daemon/dist/routes/stream.js +62 -13
  708. package/daemon/dist/routes/stream.js.map +1 -1
  709. package/daemon/dist/routes/terminal.d.ts.map +1 -1
  710. package/daemon/dist/routes/terminal.js +20 -11
  711. package/daemon/dist/routes/terminal.js.map +1 -1
  712. package/daemon/dist/routes/transport.d.ts.map +1 -1
  713. package/daemon/dist/routes/transport.js +24 -2
  714. package/daemon/dist/routes/transport.js.map +1 -1
  715. package/daemon/dist/routes/up.js +5 -0
  716. package/daemon/dist/routes/up.js.map +1 -1
  717. package/daemon/dist/routes/watchdog.d.ts +1 -0
  718. package/daemon/dist/routes/watchdog.d.ts.map +1 -1
  719. package/daemon/dist/routes/watchdog.js +52 -3
  720. package/daemon/dist/routes/watchdog.js.map +1 -1
  721. package/daemon/dist/routes/workflow.d.ts.map +1 -1
  722. package/daemon/dist/routes/workflow.js +24 -13
  723. package/daemon/dist/routes/workflow.js.map +1 -1
  724. package/daemon/dist/server.d.ts +2 -0
  725. package/daemon/dist/server.d.ts.map +1 -1
  726. package/daemon/dist/server.js +4 -1
  727. package/daemon/dist/server.js.map +1 -1
  728. package/daemon/dist/skill-loadout-surface.d.ts +2 -0
  729. package/daemon/dist/skill-loadout-surface.d.ts.map +1 -1
  730. package/daemon/dist/skill-loadout-surface.js +2 -0
  731. package/daemon/dist/skill-loadout-surface.js.map +1 -1
  732. package/daemon/dist/startup.d.ts.map +1 -1
  733. package/daemon/dist/startup.js +54 -21
  734. package/daemon/dist/startup.js.map +1 -1
  735. package/daemon/dist/terminal/TerminalSessionBroker.d.ts.map +1 -1
  736. package/daemon/dist/terminal/TerminalSessionBroker.js +9 -2
  737. package/daemon/dist/terminal/TerminalSessionBroker.js.map +1 -1
  738. package/daemon/docs/reference/a2a-agents.md +343 -0
  739. package/daemon/docs/reference/acp-agents.md +77 -0
  740. package/daemon/docs/reference/agent-spec.md +7 -5
  741. package/daemon/docs/reference/agent-startup-guide.md +46 -0
  742. package/daemon/docs/reference/agent-state-taxonomy.md +27 -2
  743. package/daemon/docs/reference/checked-seat-stop.md +11 -0
  744. package/daemon/docs/reference/community-harness-examples/cursor/cursor.yaml +13 -0
  745. package/daemon/docs/reference/community-harness-examples/cursor/openrig-cursor-launch +61 -0
  746. package/daemon/docs/reference/community-harness-examples/hermes/config.yaml.example +18 -0
  747. package/daemon/docs/reference/community-harness-examples/hermes/hermes.yaml +12 -0
  748. package/daemon/docs/reference/community-harness-examples/hermes/openrig-hermes-launch +34 -0
  749. package/daemon/docs/reference/community-harness-examples/openclaw/openclaw.yaml +13 -0
  750. package/daemon/docs/reference/community-harness-examples/openclaw/openrig-openclaw-launch +38 -0
  751. package/daemon/docs/reference/community-harness-presets.md +179 -0
  752. package/daemon/docs/reference/getting-started.md +65 -6
  753. package/daemon/docs/reference/operation-correlation.md +9 -0
  754. package/daemon/docs/reference/project-workspace.md +6 -0
  755. package/daemon/docs/reference/quickstart.md +1 -1
  756. package/daemon/docs/reference/refocus-channel.md +6 -4
  757. package/daemon/docs/reference/rig-spec.md +82 -2
  758. package/daemon/docs/reference/seat-delivery.md +73 -2
  759. package/daemon/docs/reference/slack-app-setup.md +3 -1
  760. package/daemon/docs/reference/stream-classifier-worker.md +28 -0
  761. package/daemon/docs/reference/telemetry.md +3 -0
  762. package/daemon/docs/reference/terminal-sessions.md +90 -0
  763. package/daemon/docs/reference/topology-naming.md +1 -1
  764. package/daemon/docs/reference/whats-new.md +162 -113
  765. package/daemon/specs/agents/shared/runtime/claude-settings.fragment.json +0 -3
  766. package/daemon/specs/agents/shared/skills/core/messaging-the-human/SKILL.md +19 -4
  767. package/daemon/specs/agents/shared/skills/core/openrig-herdr/SKILL.md +3 -0
  768. package/daemon/specs/agents/shared/skills/core/openrig-software-factory/references/worked-example.md +2 -2
  769. package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +36 -10
  770. package/daemon/specs/rigs/launch/kernel/agents/queue/worker/guidance/role.md +11 -0
  771. package/daemon/specs/rigs/launch/kernel/agents/queue/worker/startup/context.md +3 -1
  772. package/daemon/specs/rigs/launch/secrets-manager/secrets-manager.compose.yaml +1 -1
  773. package/dist/acp/connector.d.ts +72 -0
  774. package/dist/acp/connector.d.ts.map +1 -0
  775. package/dist/acp/connector.js +218 -0
  776. package/dist/acp/connector.js.map +1 -0
  777. package/dist/acp/json-rpc-stdio.d.ts +53 -0
  778. package/dist/acp/json-rpc-stdio.d.ts.map +1 -0
  779. package/dist/acp/json-rpc-stdio.js +141 -0
  780. package/dist/acp/json-rpc-stdio.js.map +1 -0
  781. package/dist/acp/run-processes.d.ts +10 -0
  782. package/dist/acp/run-processes.d.ts.map +1 -0
  783. package/dist/acp/run-processes.js +33 -0
  784. package/dist/acp/run-processes.js.map +1 -0
  785. package/dist/build-info.js +3 -3
  786. package/dist/client.d.ts +7 -2
  787. package/dist/client.d.ts.map +1 -1
  788. package/dist/client.js +14 -7
  789. package/dist/client.js.map +1 -1
  790. package/dist/commands/acp.d.ts +11 -0
  791. package/dist/commands/acp.d.ts.map +1 -0
  792. package/dist/commands/acp.js +198 -0
  793. package/dist/commands/acp.js.map +1 -0
  794. package/dist/commands/attach.js +1 -1
  795. package/dist/commands/attach.js.map +1 -1
  796. package/dist/commands/auth.d.ts +3 -0
  797. package/dist/commands/auth.d.ts.map +1 -1
  798. package/dist/commands/auth.js +39 -10
  799. package/dist/commands/auth.js.map +1 -1
  800. package/dist/commands/compact-plan.d.ts +2 -0
  801. package/dist/commands/compact-plan.d.ts.map +1 -1
  802. package/dist/commands/compact-plan.js +38 -3
  803. package/dist/commands/compact-plan.js.map +1 -1
  804. package/dist/commands/compact.js +1 -1
  805. package/dist/commands/compact.js.map +1 -1
  806. package/dist/commands/config.d.ts.map +1 -1
  807. package/dist/commands/config.js +7 -1
  808. package/dist/commands/config.js.map +1 -1
  809. package/dist/commands/create.js +2 -2
  810. package/dist/commands/create.js.map +1 -1
  811. package/dist/commands/daemon.d.ts.map +1 -1
  812. package/dist/commands/daemon.js +2 -0
  813. package/dist/commands/daemon.js.map +1 -1
  814. package/dist/commands/down.d.ts +5 -1
  815. package/dist/commands/down.d.ts.map +1 -1
  816. package/dist/commands/down.js +87 -3
  817. package/dist/commands/down.js.map +1 -1
  818. package/dist/commands/edge.d.ts +4 -0
  819. package/dist/commands/edge.d.ts.map +1 -0
  820. package/dist/commands/edge.js +135 -0
  821. package/dist/commands/edge.js.map +1 -0
  822. package/dist/commands/export.d.ts +1 -0
  823. package/dist/commands/export.d.ts.map +1 -1
  824. package/dist/commands/export.js +51 -0
  825. package/dist/commands/export.js.map +1 -1
  826. package/dist/commands/fork.d.ts.map +1 -1
  827. package/dist/commands/fork.js +19 -2
  828. package/dist/commands/fork.js.map +1 -1
  829. package/dist/commands/gateway.d.ts.map +1 -1
  830. package/dist/commands/gateway.js +2 -1
  831. package/dist/commands/gateway.js.map +1 -1
  832. package/dist/commands/grow.js +2 -2
  833. package/dist/commands/grow.js.map +1 -1
  834. package/dist/commands/launch.js +1 -1
  835. package/dist/commands/launch.js.map +1 -1
  836. package/dist/commands/mcp.d.ts.map +1 -1
  837. package/dist/commands/mcp.js +113 -1
  838. package/dist/commands/mcp.js.map +1 -1
  839. package/dist/commands/project-worker.d.ts +25 -1
  840. package/dist/commands/project-worker.d.ts.map +1 -1
  841. package/dist/commands/project-worker.js +9 -7
  842. package/dist/commands/project-worker.js.map +1 -1
  843. package/dist/commands/project.d.ts +2 -0
  844. package/dist/commands/project.d.ts.map +1 -1
  845. package/dist/commands/project.js +64 -1
  846. package/dist/commands/project.js.map +1 -1
  847. package/dist/commands/provider.d.ts.map +1 -1
  848. package/dist/commands/provider.js +101 -0
  849. package/dist/commands/provider.js.map +1 -1
  850. package/dist/commands/ps.d.ts +12 -1
  851. package/dist/commands/ps.d.ts.map +1 -1
  852. package/dist/commands/ps.js +50 -47
  853. package/dist/commands/ps.js.map +1 -1
  854. package/dist/commands/queue.d.ts +4 -2
  855. package/dist/commands/queue.d.ts.map +1 -1
  856. package/dist/commands/queue.js +24 -15
  857. package/dist/commands/queue.js.map +1 -1
  858. package/dist/commands/reconcile-session.d.ts.map +1 -1
  859. package/dist/commands/reconcile-session.js +6 -0
  860. package/dist/commands/reconcile-session.js.map +1 -1
  861. package/dist/commands/seat.d.ts +2 -0
  862. package/dist/commands/seat.d.ts.map +1 -1
  863. package/dist/commands/seat.js +124 -6
  864. package/dist/commands/seat.js.map +1 -1
  865. package/dist/commands/send.d.ts.map +1 -1
  866. package/dist/commands/send.js +62 -55
  867. package/dist/commands/send.js.map +1 -1
  868. package/dist/commands/setup.d.ts +24 -0
  869. package/dist/commands/setup.d.ts.map +1 -1
  870. package/dist/commands/setup.js +160 -7
  871. package/dist/commands/setup.js.map +1 -1
  872. package/dist/commands/skill.d.ts.map +1 -1
  873. package/dist/commands/skill.js +116 -3
  874. package/dist/commands/skill.js.map +1 -1
  875. package/dist/commands/start.d.ts.map +1 -1
  876. package/dist/commands/start.js +18 -25
  877. package/dist/commands/start.js.map +1 -1
  878. package/dist/commands/status.d.ts.map +1 -1
  879. package/dist/commands/status.js +4 -1
  880. package/dist/commands/status.js.map +1 -1
  881. package/dist/commands/stream-outcome.d.ts +157 -0
  882. package/dist/commands/stream-outcome.d.ts.map +1 -0
  883. package/dist/commands/stream-outcome.js +81 -0
  884. package/dist/commands/stream-outcome.js.map +1 -0
  885. package/dist/commands/stream.d.ts.map +1 -1
  886. package/dist/commands/stream.js +64 -2
  887. package/dist/commands/stream.js.map +1 -1
  888. package/dist/commands/terminal.d.ts +1 -0
  889. package/dist/commands/terminal.d.ts.map +1 -1
  890. package/dist/commands/terminal.js +35 -6
  891. package/dist/commands/terminal.js.map +1 -1
  892. package/dist/commands/topology-default-agent.d.ts +2 -2
  893. package/dist/commands/topology-default-agent.d.ts.map +1 -1
  894. package/dist/commands/topology-default-agent.js +5 -3
  895. package/dist/commands/topology-default-agent.js.map +1 -1
  896. package/dist/commands/up.d.ts.map +1 -1
  897. package/dist/commands/up.js +75 -30
  898. package/dist/commands/up.js.map +1 -1
  899. package/dist/commands/watchdog.d.ts.map +1 -1
  900. package/dist/commands/watchdog.js +80 -5
  901. package/dist/commands/watchdog.js.map +1 -1
  902. package/dist/commands/workflow-errors.js +1 -1
  903. package/dist/commands/workflow-errors.js.map +1 -1
  904. package/dist/commands/workflow-render.js +4 -4
  905. package/dist/commands/workflow-render.js.map +1 -1
  906. package/dist/commands/workflow.d.ts.map +1 -1
  907. package/dist/commands/workflow.js +34 -15
  908. package/dist/commands/workflow.js.map +1 -1
  909. package/dist/config-store.d.ts +15 -1
  910. package/dist/config-store.d.ts.map +1 -1
  911. package/dist/config-store.js +86 -4
  912. package/dist/config-store.js.map +1 -1
  913. package/dist/daemon-lifecycle.d.ts +4 -0
  914. package/dist/daemon-lifecycle.d.ts.map +1 -1
  915. package/dist/daemon-lifecycle.js +73 -21
  916. package/dist/daemon-lifecycle.js.map +1 -1
  917. package/dist/decisions/decisions.d.ts +203 -0
  918. package/dist/decisions/decisions.d.ts.map +1 -0
  919. package/dist/decisions/decisions.js +374 -0
  920. package/dist/decisions/decisions.js.map +1 -0
  921. package/dist/decisions/stream-consumer.d.ts +255 -0
  922. package/dist/decisions/stream-consumer.d.ts.map +1 -0
  923. package/dist/decisions/stream-consumer.js +282 -0
  924. package/dist/decisions/stream-consumer.js.map +1 -0
  925. package/dist/decisions/templates.d.ts +8 -0
  926. package/dist/decisions/templates.d.ts.map +1 -0
  927. package/dist/decisions/templates.js +34 -0
  928. package/dist/decisions/templates.js.map +1 -0
  929. package/dist/fresh-seat-command.d.ts +18 -0
  930. package/dist/fresh-seat-command.d.ts.map +1 -0
  931. package/dist/fresh-seat-command.js +36 -0
  932. package/dist/fresh-seat-command.js.map +1 -0
  933. package/dist/front-door.d.ts +4 -0
  934. package/dist/front-door.d.ts.map +1 -1
  935. package/dist/front-door.js +8 -4
  936. package/dist/front-door.js.map +1 -1
  937. package/dist/host-bindings.d.ts.map +1 -1
  938. package/dist/host-bindings.js +16 -9
  939. package/dist/host-bindings.js.map +1 -1
  940. package/dist/index.d.ts +2 -0
  941. package/dist/index.d.ts.map +1 -1
  942. package/dist/index.js +4 -0
  943. package/dist/index.js.map +1 -1
  944. package/dist/lazy-program.d.ts.map +1 -1
  945. package/dist/lazy-program.js +2 -0
  946. package/dist/lazy-program.js.map +1 -1
  947. package/dist/lib/run-on-host.d.ts +29 -0
  948. package/dist/lib/run-on-host.d.ts.map +1 -0
  949. package/dist/lib/run-on-host.js +69 -0
  950. package/dist/lib/run-on-host.js.map +1 -0
  951. package/dist/lib/seat-activity.d.ts +17 -0
  952. package/dist/lib/seat-activity.d.ts.map +1 -0
  953. package/dist/lib/seat-activity.js +29 -0
  954. package/dist/lib/seat-activity.js.map +1 -0
  955. package/dist/local-daemon-owner.d.ts +4 -0
  956. package/dist/local-daemon-owner.d.ts.map +1 -1
  957. package/dist/local-daemon-owner.js +1 -1
  958. package/dist/local-daemon-owner.js.map +1 -1
  959. package/dist/mcp-http.d.ts +42 -0
  960. package/dist/mcp-http.d.ts.map +1 -0
  961. package/dist/mcp-http.js +232 -0
  962. package/dist/mcp-http.js.map +1 -0
  963. package/dist/mcp-server.d.ts +30 -2
  964. package/dist/mcp-server.d.ts.map +1 -1
  965. package/dist/mcp-server.js +1112 -436
  966. package/dist/mcp-server.js.map +1 -1
  967. package/dist/seat-launch-additions-lines.d.ts +11 -0
  968. package/dist/seat-launch-additions-lines.d.ts.map +1 -0
  969. package/dist/seat-launch-additions-lines.js +14 -0
  970. package/dist/seat-launch-additions-lines.js.map +1 -0
  971. package/dist/terminal-window.d.ts +1 -1
  972. package/dist/terminal-window.d.ts.map +1 -1
  973. package/dist/terminal-window.js +50 -22
  974. package/dist/terminal-window.js.map +1 -1
  975. package/package.json +1 -1
  976. package/tui/dist/attention/attention-model.d.ts +3 -1
  977. package/tui/dist/attention/attention-model.d.ts.map +1 -1
  978. package/tui/dist/attention/attention-model.js +68 -1
  979. package/tui/dist/attention/attention-model.js.map +1 -1
  980. package/tui/dist/commands/registry.d.ts.map +1 -1
  981. package/tui/dist/commands/registry.js +2 -0
  982. package/tui/dist/commands/registry.js.map +1 -1
  983. package/tui/dist/config/config-model.d.ts.map +1 -1
  984. package/tui/dist/config/config-model.js +2 -0
  985. package/tui/dist/config/config-model.js.map +1 -1
  986. package/tui/dist/daemon-client.d.ts +18 -0
  987. package/tui/dist/daemon-client.d.ts.map +1 -1
  988. package/tui/dist/daemon-client.js +4 -0
  989. package/tui/dist/daemon-client.js.map +1 -1
  990. package/tui/dist/hydrate.d.ts.map +1 -1
  991. package/tui/dist/hydrate.js +9 -6
  992. package/tui/dist/hydrate.js.map +1 -1
  993. package/tui/dist/main.js +15 -1
  994. package/tui/dist/main.js.map +1 -1
  995. package/tui/dist/render.d.ts.map +1 -1
  996. package/tui/dist/render.js +10 -3
  997. package/tui/dist/render.js.map +1 -1
  998. package/tui/dist/topology/fixture.js +1 -1
  999. package/tui/dist/topology/fixture.js.map +1 -1
  1000. package/tui/dist/topology/glyphs.js +1 -1
  1001. package/tui/dist/topology/glyphs.js.map +1 -1
  1002. package/tui/dist/topology/graph-types.d.ts +1 -0
  1003. package/tui/dist/topology/graph-types.d.ts.map +1 -1
  1004. package/tui/dist/types.d.ts +25 -0
  1005. package/tui/dist/types.d.ts.map +1 -1
  1006. package/ui/dist/assets/{index-CVgod3Pm.js → index-Blg-p32B.js} +92 -92
  1007. package/ui/dist/index.html +1 -1
@@ -0,0 +1,850 @@
1
+ import { createHash } from "node:crypto";
2
+ import fs from "node:fs";
3
+ import nodePath from "node:path";
4
+ import { getOpenRigHome } from "../openrig-compat.js";
5
+ import { parseSkillFrontmatter } from "./skill-discovery.js";
6
+ import { MANAGED_BLOCK_APPEND_SEPARATOR, hasEditedManagedBlock, managedBlockText } from "./managed-blocks.js";
7
+ // OPR.0.7.0.13 — where a team seat's skills live: storage OpenRig owns, outside the person's project and their own
8
+ // skill folders, so a person's own agent opened in the project sees none of the team's skills.
9
+ //
10
+ // <openrig home>/state/seats/<rig id>/<logical seat>/<runtime>/
11
+ // plugin/.claude-plugin/plugin.json the generated plugin "openrig" (Claude shows its skills as openrig:<id>)
12
+ // plugin/skills/<id>/ the seat's complete skill trees, helpers included
13
+ // skill-loadout.json the loadout OpenRig wrote here: each skill's source, files and their hashes
14
+ // skill-projections.json every other skill file OpenRig wrote here: its hash and its source
15
+ //
16
+ // The key is the rig and the logical seat, never a session name: a native resume, a restore, a handover successor and
17
+ // an in-place restart are the same seat and find the same storage, while a fork is a new seat in a new rig with its own.
18
+ // Two seats never share one manifest (a rig's logical seats are unique). Every launch path derives the pointer to this
19
+ // storage from the node record, so a path that doesn't re-project skills still hands the seat its storage.
20
+ //
21
+ // Adapted from #1008's claude-seat-material.ts (Adam Dmitruczuk): the generated plugin, its name and manifest, and the
22
+ // skills-under-the-plugin layout. That design keyed the directory by session name and also moved settings, MCP and
23
+ // guidance; this keeps skills only, keyed by seat.
24
+ /** The generated plugin's name. Claude Code shows its skills as `openrig:<id>`. */
25
+ export const SEAT_SKILL_PLUGIN_NAME = "openrig";
26
+ const segment = (value) => value.replace(/[^A-Za-z0-9@._-]/g, "_");
27
+ export function seatSkillPaths(key, openrigHome = getOpenRigHome()) {
28
+ const root = nodePath.join(nodePath.resolve(openrigHome), "state", "seats", segment(key.rigId), segment(key.logicalId), segment(key.runtime));
29
+ const pluginDir = nodePath.join(root, "plugin");
30
+ return {
31
+ root,
32
+ pluginDir,
33
+ pluginManifestPath: nodePath.join(pluginDir, ".claude-plugin", "plugin.json"),
34
+ // Claude reads skills through the generated plugin; a Codex seat's trees sit beside its catalog (no plugin).
35
+ skillsRoot: key.runtime === "codex" ? nodePath.join(root, "skills") : nodePath.join(pluginDir, "skills"),
36
+ manifestPath: nodePath.join(root, "skill-loadout.json"),
37
+ projectionsPath: nodePath.join(root, "skill-projections.json"),
38
+ catalogPath: nodePath.join(root, "catalog.md"),
39
+ };
40
+ }
41
+ /** The name Claude Code gives a skill delivered through the seat plugin. */
42
+ export function seatSkillName(skillId) {
43
+ return `${SEAT_SKILL_PLUGIN_NAME}:${skillId}`;
44
+ }
45
+ /** Where the skill loadout reconciler keeps this seat's skills, and the name each is recorded with. */
46
+ export function seatSkillLocation(paths, runtime = "claude-code") {
47
+ // A Codex seat reads its skills by path from its catalog, so they keep their own names.
48
+ return { targetRoot: paths.skillsRoot, manifestPath: paths.manifestPath, qualifiedName: runtime === "codex" ? (id) => id : seatSkillName,
49
+ // The reconciler stages beside the skills folder and writes its manifest at the seat's root, both on the skills
50
+ // folder's anchored path, so this one check covers every write and removal it makes there.
51
+ refuseMutation: () => anchored(seatsAnchor(paths.root), paths.skillsRoot, "folder") && anchored(seatsAnchor(paths.root), paths.manifestPath, "file")
52
+ ? undefined
53
+ : `${paths.skillsRoot} is not inside this seat's storage (a link on the way from ${seatsAnchor(paths.root)}); the loadout changed nothing there` };
54
+ }
55
+ const PLUGIN_MANIFEST = `${JSON.stringify({
56
+ name: SEAT_SKILL_PLUGIN_NAME,
57
+ version: "0.0.0",
58
+ description: "Skills OpenRig keeps for this seat only.",
59
+ }, null, 2)}\n`;
60
+ /**
61
+ * Write the generated plugin's manifest, unless it's already there as written. A manifest that differs from the one
62
+ * OpenRig generates is someone's edit: it is kept and named (returned), never overwritten.
63
+ */
64
+ export function ensureSeatSkillPlugin(paths) {
65
+ const file = paths.pluginManifestPath;
66
+ if (!insideSeatStorage(paths.root, file))
67
+ return [`seat_plugin_kept: ${file} is not inside this seat's storage (a link on the way); not written`];
68
+ if (lexists(file)) {
69
+ let current;
70
+ try {
71
+ current = fs.readFileSync(file, "utf8");
72
+ }
73
+ catch { }
74
+ return current === PLUGIN_MANIFEST ? [] : [`seat_plugin_kept: ${file} differs from the manifest OpenRig generates; kept as it is`];
75
+ }
76
+ writeInsideSeatStorage(paths.root, file, PLUGIN_MANIFEST);
77
+ return [];
78
+ }
79
+ // --- Where OpenRig may write or remove in a seat's storage --------------------------------------------------------
80
+ // What these checks establish: just before cleanup or repair acts on a path, every component from the anchor down was
81
+ // a real folder (no link), and a file, if present, a regular file. The anchor is `<home>/state/seats`, the folder
82
+ // OpenRig makes for every seat; it is checked too. (The OpenRig home and its `state` folder above the anchor are the
83
+ // operator's layout, and may be links.) The check and the filesystem call are separate operations (Node has no
84
+ // openat), so a namespace entry replaced by another process between them is outside what is established here; that
85
+ // window hasn't been measured.
86
+ const lexists = (file) => { try {
87
+ fs.lstatSync(file);
88
+ return true;
89
+ }
90
+ catch {
91
+ return false;
92
+ } };
93
+ /** `<home>/state/seats` for a seat root `<home>/state/seats/<rig>/<seat>/<runtime>`. */
94
+ const seatsAnchor = (root) => nodePath.dirname(nodePath.dirname(nodePath.dirname(nodePath.resolve(root))));
95
+ /**
96
+ * Whether `target` is the anchor or below it with no link anywhere from the anchor down, the anchor included. A missing
97
+ * component ends the walk as contained (nothing below it exists to follow). `kind` is what the target must be if present.
98
+ */
99
+ function anchored(anchor, target, kind) {
100
+ const base = nodePath.resolve(anchor);
101
+ const resolved = nodePath.resolve(target);
102
+ const relative = nodePath.relative(base, resolved);
103
+ if (relative === ".." || relative.startsWith(`..${nodePath.sep}`) || nodePath.isAbsolute(relative))
104
+ return false;
105
+ const parts = relative === "" ? [] : relative.split(nodePath.sep);
106
+ const chain = [base, ...parts.map((_, i) => nodePath.join(base, ...parts.slice(0, i + 1)))];
107
+ for (let i = 0; i < chain.length; i++) {
108
+ let stat;
109
+ try {
110
+ stat = fs.lstatSync(chain[i]);
111
+ }
112
+ catch (err) {
113
+ return err.code === "ENOENT";
114
+ }
115
+ if (stat.isSymbolicLink())
116
+ return false;
117
+ const last = i === chain.length - 1;
118
+ if (!last || kind === "folder" ? !stat.isDirectory() : !stat.isFile())
119
+ return false;
120
+ }
121
+ return true;
122
+ }
123
+ /** Whether folder `dir` is inside the seat storage at `root`, with no link on the way, itself included. */
124
+ export function insideSeatStorageFolder(root, dir) {
125
+ const seatRoot = nodePath.resolve(root);
126
+ if (!nodePath.resolve(dir).startsWith(seatRoot + nodePath.sep))
127
+ return false;
128
+ return anchored(seatsAnchor(seatRoot), dir, "folder");
129
+ }
130
+ /** Whether `file` is inside the seat storage at `root`, with no link on the way from the anchor all seats share. */
131
+ export function insideSeatStorage(root, file) {
132
+ const seatRoot = nodePath.resolve(root);
133
+ if (!nodePath.resolve(file).startsWith(seatRoot + nodePath.sep))
134
+ return false;
135
+ return anchored(seatsAnchor(seatRoot), file, "file");
136
+ }
137
+ /**
138
+ * Write a file inside the seat's storage without following a link: folders are made one at a time, a new file is
139
+ * created exclusively, and an existing one is replaced by a rename (which replaces the entry itself). Throws when the
140
+ * path isn't inside the seat's storage.
141
+ */
142
+ export function writeInsideSeatStorage(root, file, bytes, mode) {
143
+ if (!insideSeatStorage(root, file))
144
+ throw new Error(`${file} is not inside this seat's storage`);
145
+ const base = seatsAnchor(root);
146
+ fs.mkdirSync(base, { recursive: true }); // the folder every seat shares, in the OpenRig home
147
+ if (!anchored(base, base, "folder"))
148
+ throw new Error(`${base} is not a folder OpenRig can write seat storage in`);
149
+ let current = base;
150
+ for (const part of nodePath.relative(base, nodePath.dirname(nodePath.resolve(file))).split(nodePath.sep)) {
151
+ current = nodePath.join(current, part);
152
+ try {
153
+ fs.mkdirSync(current);
154
+ }
155
+ catch (err) {
156
+ if (err.code !== "EEXIST")
157
+ throw err;
158
+ }
159
+ if (!fs.lstatSync(current).isDirectory())
160
+ throw new Error(`${current} is not a folder inside this seat's storage`);
161
+ }
162
+ const temp = `${file}.openrig-${process.pid}-${Date.now()}`;
163
+ fs.writeFileSync(temp, bytes, { flag: "wx", ...(mode !== undefined ? { mode } : {}) });
164
+ try {
165
+ if (mode !== undefined)
166
+ fs.chmodSync(temp, mode);
167
+ if (lexists(file))
168
+ fs.renameSync(temp, file);
169
+ else
170
+ fs.linkSync(temp, file); // fails rather than replace anything that appeared since the check
171
+ }
172
+ finally {
173
+ try {
174
+ fs.unlinkSync(temp);
175
+ }
176
+ catch { }
177
+ }
178
+ }
179
+ /** Remove a file inside the seat's storage, only while it's still there with no link on the way. */
180
+ function removeInsideSeatStorage(root, file) {
181
+ if (!insideSeatStorage(root, file))
182
+ return false;
183
+ fs.unlinkSync(file);
184
+ return true;
185
+ }
186
+ /** The seat's root, from the skills root an adapter is handed: `<root>/plugin/skills` (Claude) or `<root>/skills`. */
187
+ export function seatRootOfSkills(skillsRoot) {
188
+ const parent = nodePath.dirname(nodePath.resolve(skillsRoot));
189
+ return nodePath.basename(parent) === "plugin" ? nodePath.dirname(parent) : parent;
190
+ }
191
+ /**
192
+ * After an adapter copied a skill into a seat's storage: true when every file went in. When any destination was
193
+ * refused, the skill is reported incomplete (the caller lists it as skipped, not projected) and the files not delivered
194
+ * are named; those files were neither written nor recorded, and whatever was at them is left as it was.
195
+ */
196
+ export function seatProjectionComplete(id, notProjected, warnings) {
197
+ if (notProjected.length === 0)
198
+ return true;
199
+ warnings.push(`${id}: incomplete in this seat's storage: ${notProjected.length} file(s) not projected (${notProjected.join(", ")}); the skill is not fully delivered`);
200
+ return false;
201
+ }
202
+ /** Whether an adapter may write this file into a seat's skills: only inside the seat's storage, with no link on the way. */
203
+ export function seatSkillWriteRefusal(skillsRoot, dest) {
204
+ return insideSeatStorage(seatRootOfSkills(skillsRoot), dest) ? undefined : `${dest} is not inside this seat's storage (a link on the way); not written`;
205
+ }
206
+ /**
207
+ * A selected plugin's bundled skills, left out of the project's copy because a seat with storage gets them there: when
208
+ * that storage is refused (`refusal`, the reason the seat's storage was refused), they reach neither, so the loss is named.
209
+ */
210
+ export function seatPluginSkillsLossNote(pluginId, skippedFiles, refusal) {
211
+ if (skippedFiles === 0)
212
+ return undefined;
213
+ return `${pluginId}: plugin_skills_not_delivered: its bundled skills (${skippedFiles} file(s)) are not copied to the project, and this seat's skill storage is refused (${refusal}); the plugin's other files are copied as before`;
214
+ }
215
+ /**
216
+ * The seat plugin to load into this node's Claude process, or undefined: not a Claude seat, or OpenRig has kept no
217
+ * skills for it. Derived from the node record alone, so every launch and continuation path finds the same storage.
218
+ */
219
+ export function seatSkillPluginDir(node, openrigHome) {
220
+ if (node.runtime !== "claude-code")
221
+ return undefined;
222
+ const paths = seatSkillPaths({ rigId: node.rig_id, logicalId: node.logical_id, runtime: node.runtime }, openrigHome);
223
+ return fs.existsSync(paths.pluginManifestPath) ? paths.pluginDir : undefined;
224
+ }
225
+ /** The seat plugin for a node, read from its record: what every launch and continuation path calls. Seat storage is
226
+ * always under the OpenRig home, so launch, teardown and restore all find the same place. */
227
+ export function seatSkillPluginDirForNode(db, nodeId) {
228
+ try {
229
+ const row = db.prepare("SELECT rig_id, logical_id, runtime FROM nodes WHERE id = ?").get(nodeId);
230
+ return row ? seatSkillPluginDir(row) : undefined;
231
+ }
232
+ catch {
233
+ return undefined;
234
+ }
235
+ }
236
+ const sha256 = (bytes) => createHash("sha256").update(bytes).digest("hex");
237
+ /**
238
+ * Put back the seat's selected skills from what its manifest recorded, before a restore relaunches it. The saved
239
+ * selection is kept (nothing is re-resolved). A missing file comes back only from its recorded source, and only when
240
+ * that source still has the recorded bytes. A file that differs from the record is someone's edit: it is kept. Anything
241
+ * that can't be put back is named. Nothing is replayed into a conversation; this only repairs the seat's storage.
242
+ */
243
+ export function rehydrateSeatSkills(paths) {
244
+ const out = { restored: [], kept: [], missing: [], refused: [] };
245
+ for (const [file, entry] of recordedSeatSkillFiles(paths)) {
246
+ if (!insideSeatStorage(paths.root, file)) {
247
+ out.refused.push(file);
248
+ continue;
249
+ }
250
+ if (lexists(file)) {
251
+ try {
252
+ if (sha256(fs.readFileSync(file)) !== entry.sha256)
253
+ out.kept.push(file);
254
+ }
255
+ catch {
256
+ out.kept.push(file);
257
+ }
258
+ continue;
259
+ }
260
+ let bytes;
261
+ let mode;
262
+ try {
263
+ bytes = fs.readFileSync(entry.source);
264
+ mode = fs.statSync(entry.source).mode & 0o777;
265
+ }
266
+ catch {
267
+ out.missing.push(file);
268
+ continue;
269
+ }
270
+ if (sha256(bytes) !== entry.sha256) {
271
+ out.missing.push(file);
272
+ continue;
273
+ }
274
+ try {
275
+ // The recorded source still has the recorded bytes, so its mode (a helper's executable bit) comes back too.
276
+ writeInsideSeatStorage(paths.root, file, bytes, mode);
277
+ out.restored.push(file);
278
+ }
279
+ catch {
280
+ out.refused.push(file);
281
+ }
282
+ }
283
+ return out;
284
+ }
285
+ /** The storage of a seat that uses it (a Claude seat with its plugin, a Codex seat with its catalog), from its node
286
+ * record, or undefined (no storage: the project, as before). */
287
+ export function seatSkillPathsForNode(db, nodeId) {
288
+ try {
289
+ const row = db.prepare("SELECT rig_id, logical_id, runtime FROM nodes WHERE id = ?").get(nodeId);
290
+ if (!row || (row.runtime !== "claude-code" && row.runtime !== "codex"))
291
+ return undefined;
292
+ const paths = seatSkillPaths({ rigId: row.rig_id, logicalId: row.logical_id, runtime: row.runtime });
293
+ // A Claude seat uses its storage once its plugin exists; a Codex seat once its catalog does.
294
+ return fs.existsSync(row.runtime === "codex" ? paths.catalogPath : paths.pluginManifestPath) ? paths : undefined;
295
+ }
296
+ catch {
297
+ return undefined;
298
+ }
299
+ }
300
+ /**
301
+ * A Claude or Codex seat whose storage was refused by a link: its plugin manifest (Claude) or catalog (Codex) is missing
302
+ * because a link on the way out of its storage refused it, or (Codex) its projection record is a link, which the catalog
303
+ * writer refuses too. Gives the skills root its skills were meant for and the reason, so each is refused there and named
304
+ * rather than written into the project or where nothing reads it. Undefined for a seat whose storage is found the
305
+ * ordinary way, and for one with no storage and no link (one that never had it), which keeps the project, as before.
306
+ */
307
+ export function refusedSeatSkillsRootForNode(db, nodeId) {
308
+ try {
309
+ const row = db.prepare("SELECT rig_id, logical_id, runtime FROM nodes WHERE id = ?").get(nodeId);
310
+ if (!row || (row.runtime !== "claude-code" && row.runtime !== "codex"))
311
+ return undefined;
312
+ const paths = seatSkillPaths({ rigId: row.rig_id, logicalId: row.logical_id, runtime: row.runtime });
313
+ const marker = row.runtime === "codex" ? paths.catalogPath : paths.pluginManifestPath;
314
+ if (fs.existsSync(marker))
315
+ return undefined; // the storage is found the ordinary way
316
+ // The same paths the writers refuse: the Claude manifest; the Codex catalog and its projection record.
317
+ const checked = row.runtime === "codex" ? [paths.catalogPath, paths.projectionsPath] : [paths.pluginManifestPath];
318
+ const linked = checked.find((file) => !insideSeatStorage(paths.root, file));
319
+ return linked
320
+ ? { skillsRoot: paths.skillsRoot, reason: `${linked} is not inside this seat's storage (a link on the way); this seat's skills are not written` }
321
+ : undefined;
322
+ }
323
+ catch {
324
+ return undefined;
325
+ }
326
+ }
327
+ /** Whether a seat's copy of a skill differs from its source (a file, or a whole skill folder compared file by file). */
328
+ export function seatSkillDiffers(source, target) {
329
+ const files = (root) => {
330
+ const out = new Map();
331
+ const walk = (dir) => {
332
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
333
+ const full = nodePath.join(dir, entry.name);
334
+ if (entry.isDirectory())
335
+ walk(full);
336
+ else if (entry.isFile())
337
+ out.set(nodePath.relative(root, full), sha256(fs.readFileSync(full)));
338
+ }
339
+ };
340
+ walk(root);
341
+ return out;
342
+ };
343
+ try {
344
+ if (!fs.statSync(source).isDirectory()) {
345
+ const copy = nodePath.join(target, nodePath.basename(source));
346
+ return !fs.existsSync(copy) || sha256(fs.readFileSync(copy)) !== sha256(fs.readFileSync(source));
347
+ }
348
+ const a = files(source);
349
+ const b = files(target);
350
+ return a.size !== b.size || [...a].some(([path, hash]) => b.get(path) !== hash);
351
+ }
352
+ catch {
353
+ return true;
354
+ }
355
+ }
356
+ /** Every Claude seat's skill folder under this OpenRig home, for the skills audit. They are seat output, never a source. */
357
+ export function listSeatSkillRoots(openrigHome = getOpenRigHome()) {
358
+ const seats = nodePath.join(nodePath.resolve(openrigHome), "state", "seats");
359
+ const dirs = (dir) => {
360
+ try {
361
+ return fs.readdirSync(dir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name).sort();
362
+ }
363
+ catch {
364
+ return [];
365
+ }
366
+ };
367
+ return dirs(seats).flatMap((rig) => dirs(nodePath.join(seats, rig)).map((seat) => nodePath.join(seats, rig, seat, "claude-code", "plugin", "skills")))
368
+ .filter((root) => fs.existsSync(root));
369
+ }
370
+ /**
371
+ * For a fresh relaunch of a Claude seat with storage: which replayed skill entries to leave alone. A skill already in
372
+ * the seat's storage is kept as it is (if it differs from its source, that is someone's edit, and it is named); only a
373
+ * missing one is projected again from its saved source.
374
+ */
375
+ export function seatSkillsToKeep(entries, paths) {
376
+ const keep = new Set();
377
+ const warnings = [];
378
+ for (const entry of entries) {
379
+ if (entry.category !== "skill")
380
+ continue;
381
+ const target = nodePath.join(paths.skillsRoot, entry.effectiveId);
382
+ if (!fs.existsSync(target))
383
+ continue;
384
+ if (seatSkillDiffers(entry.absolutePath, target)) {
385
+ warnings.push(`Restore: kept ${target}: it differs from its source ${entry.absolutePath} (an edit is never overwritten)`);
386
+ }
387
+ keep.add(entry.effectiveId);
388
+ }
389
+ return { keep, warnings };
390
+ }
391
+ /**
392
+ * For a fresh relaunch's replay, after rehydration: which saved skill entries and startup skill files not to write
393
+ * again. A skill already in the seat's storage is left as it is (an edit is named), and so is a startup skill file whose
394
+ * target is there. A missing file whose recorded source is gone or has changed is not put back by projection or install
395
+ * either: that would substitute today's bytes for the saved selection. Everything else is projected or installed.
396
+ */
397
+ export function seatSkillReplay(input) {
398
+ const { paths } = input;
399
+ const notPutBack = [...input.rehydration.missing, ...input.rehydration.refused].map((f) => nodePath.resolve(f));
400
+ const blocked = (target) => notPutBack.some((f) => f === target || f.startsWith(target + nodePath.sep));
401
+ const kept = seatSkillsToKeep(input.entries, paths);
402
+ const skipEntryIds = new Set(kept.keep);
403
+ const warnings = [...kept.warnings];
404
+ for (const entry of input.entries) {
405
+ if (entry.category !== "skill" || skipEntryIds.has(entry.effectiveId))
406
+ continue;
407
+ const target = nodePath.resolve(paths.skillsRoot, entry.effectiveId);
408
+ if (blocked(target)) {
409
+ skipEntryIds.add(entry.effectiveId);
410
+ warnings.push(`Restore: ${target} not projected again: its recorded source is gone or has changed`);
411
+ }
412
+ }
413
+ const skipFiles = new Set();
414
+ const read = input.readFile ?? ((p) => fs.readFileSync(p, "utf8"));
415
+ for (const file of input.files) {
416
+ let hint = file.deliveryHint;
417
+ if (hint === "auto") {
418
+ try {
419
+ hint = file.path.endsWith("SKILL.md") || read(file.absolutePath).startsWith("# SKILL") ? "skill_install" : "other";
420
+ }
421
+ catch {
422
+ hint = "other";
423
+ }
424
+ }
425
+ if (hint !== "skill_install")
426
+ continue;
427
+ // The adapters' skill_install target: <skills root>/<the source's folder name>/<file name>.
428
+ const target = nodePath.resolve(paths.skillsRoot, nodePath.basename(nodePath.dirname(file.absolutePath)), nodePath.basename(file.path));
429
+ if (lexists(target)) {
430
+ skipFiles.add(file.absolutePath);
431
+ let differs = true;
432
+ try {
433
+ differs = !fs.readFileSync(target).equals(fs.readFileSync(file.absolutePath));
434
+ }
435
+ catch { }
436
+ if (differs)
437
+ warnings.push(`Restore: kept ${target}: it differs from its source ${file.absolutePath} (an edit is never overwritten)`);
438
+ }
439
+ else if (blocked(target)) {
440
+ skipFiles.add(file.absolutePath);
441
+ warnings.push(`Restore: ${target} not installed again: its recorded source is gone or has changed`);
442
+ }
443
+ }
444
+ return { skipEntryIds, skipFiles, warnings };
445
+ }
446
+ const readProjections = (path) => {
447
+ try {
448
+ const value = JSON.parse(fs.readFileSync(path, "utf8"));
449
+ return value && typeof value.files === "object" && value.files ? value : { files: {} };
450
+ }
451
+ catch {
452
+ return { files: {} };
453
+ }
454
+ };
455
+ function writeProjections(root, record) {
456
+ writeInsideSeatStorage(root, nodePath.join(root, "skill-projections.json"), `${JSON.stringify({ schema: "openrig.seat-skill-projections/v1", files: record.files, ...(record.generated ? { generated: record.generated } : {}) }, null, 2)}\n`);
457
+ }
458
+ /** Record a skill file the Claude adapter wrote (or found already identical) in a seat's storage, so cleanup can tell
459
+ * it from an edit and a restore can put it back. `skillsRoot` is the binding's `seatSkillsRoot`. */
460
+ export function recordSeatSkillWrite(skillsRoot, dest, source, bytes) {
461
+ // `<root>/plugin/skills` (Claude) or `<root>/skills` (Codex): the record sits at the seat's root.
462
+ const root = seatRootOfSkills(skillsRoot);
463
+ const record = readProjections(nodePath.join(root, "skill-projections.json"));
464
+ record.files[nodePath.resolve(dest)] = { sha256: sha256(Buffer.from(bytes)), source: nodePath.resolve(source) };
465
+ writeProjections(root, record);
466
+ }
467
+ /** OPR.0.7.0.9: the seat's launch additions' locations, beside its skills: `additions/` (the prompt file and plugin
468
+ * folders) and, for Claude, its generated plugin's `agents/`. The same record, restore and cleanup route covers them. */
469
+ export function seatAdditionLocations(paths) {
470
+ return [nodePath.join(paths.root, "additions"), ...(paths.skillsRoot === nodePath.join(paths.pluginDir, "skills") ? [nodePath.join(paths.pluginDir, "agents")] : [])];
471
+ }
472
+ /** Every file OpenRig recorded writing into this seat's skills or launch additions: its recorded hash and source. */
473
+ function recordedSeatSkillFiles(paths) {
474
+ const out = new Map();
475
+ const roots = [paths.skillsRoot, ...seatAdditionLocations(paths)].map((dir) => nodePath.resolve(dir) + nodePath.sep);
476
+ const inside = (file) => roots.some((root) => file.startsWith(root));
477
+ try {
478
+ const manifest = JSON.parse(fs.readFileSync(paths.manifestPath, "utf8"));
479
+ for (const skill of Array.isArray(manifest.skills) ? manifest.skills : []) {
480
+ if (typeof skill["target"] !== "string" || typeof skill["sourceDir"] !== "string" || !skill["files"] || typeof skill["files"] !== "object")
481
+ continue;
482
+ const target = nodePath.resolve(skill["target"]);
483
+ for (const [relative, digest] of Object.entries(skill["files"])) {
484
+ const file = nodePath.resolve(target, relative);
485
+ if (typeof digest === "string" && inside(file))
486
+ out.set(file, { sha256: digest, source: nodePath.resolve(skill["sourceDir"], relative) });
487
+ }
488
+ }
489
+ }
490
+ catch { }
491
+ for (const [file, entry] of Object.entries(readProjections(paths.projectionsPath).files)) {
492
+ if (entry && typeof entry.sha256 === "string" && typeof entry.source === "string" && inside(nodePath.resolve(file)))
493
+ out.set(nodePath.resolve(file), entry);
494
+ }
495
+ return out;
496
+ }
497
+ /** Whether OpenRig has a record of writing this seat's skills (so a restore can rebuild its storage). */
498
+ export function hasSeatSkillRecords(paths) {
499
+ return fs.existsSync(paths.manifestPath) || fs.existsSync(paths.projectionsPath);
500
+ }
501
+ /**
502
+ * Remove what OpenRig wrote into a seat's skills once the seat's consumers have stopped: only recorded files whose
503
+ * bytes still match the record, and the generated plugin's manifest, so nothing points at the storage. Edited and
504
+ * unrecorded files are kept and reported. The records themselves stay, unless `dropRecords` (the rig is deleted), so a
505
+ * later restore can rebuild the seat's skills from their sources.
506
+ */
507
+ export function cleanSeatSkills(paths, opts = {}) {
508
+ const out = { removed: [], kept: [], refused: [] };
509
+ if (!lexists(paths.root))
510
+ return out;
511
+ // Every file this cleanup removes; only the folders on their paths may be removed afterwards.
512
+ const removedFiles = [];
513
+ for (const [file, entry] of recordedSeatSkillFiles(paths)) {
514
+ if (!lexists(file))
515
+ continue;
516
+ if (!insideSeatStorage(paths.root, file)) {
517
+ out.refused.push(file);
518
+ continue;
519
+ }
520
+ try {
521
+ if (sha256(fs.readFileSync(file)) === entry.sha256 && removeInsideSeatStorage(paths.root, file)) {
522
+ out.removed.push(file);
523
+ removedFiles.push(file);
524
+ }
525
+ else
526
+ out.kept.push(file);
527
+ }
528
+ catch {
529
+ out.kept.push(file);
530
+ }
531
+ }
532
+ const leftovers = (dir) => {
533
+ let found = [];
534
+ try {
535
+ for (const e of fs.readdirSync(dir, { withFileTypes: true })) {
536
+ const full = nodePath.join(dir, e.name);
537
+ if (e.isDirectory())
538
+ found = found.concat(leftovers(full));
539
+ else
540
+ found.push(full);
541
+ }
542
+ }
543
+ catch { }
544
+ return found;
545
+ };
546
+ // The generated router, like the catalog below: removed only while it is exactly what OpenRig recorded writing.
547
+ const router = nodePath.join(paths.skillsRoot, SEAT_SKILL_ROUTER_ID, "SKILL.md");
548
+ if (lexists(router)) {
549
+ const recorded = readProjections(paths.projectionsPath).generated?.[router];
550
+ try {
551
+ if (insideSeatStorage(paths.root, router) && recorded === sha256(fs.readFileSync(router)) && removeInsideSeatStorage(paths.root, router))
552
+ removedFiles.push(router);
553
+ }
554
+ catch { }
555
+ }
556
+ for (const dir of [paths.skillsRoot, ...seatAdditionLocations(paths)]) {
557
+ // A linked location is refused above, file by file; nothing is walked through it.
558
+ if (dir !== paths.skillsRoot && lexists(dir) && !anchored(seatsAnchor(paths.root), dir, "folder"))
559
+ continue;
560
+ for (const file of leftovers(dir))
561
+ if (!out.kept.includes(file) && !out.refused.includes(file))
562
+ out.kept.push(file);
563
+ }
564
+ // Nothing points at the storage any more: no Claude plugin, no Codex catalog (both are rebuilt on a restore). Each is
565
+ // removed only while it is exactly what OpenRig wrote: the plugin manifest is a constant, and the catalog's digest
566
+ // is recorded when OpenRig writes it. A differing or unrecorded one is someone's: kept and named.
567
+ const generated = readProjections(paths.projectionsPath).generated ?? {};
568
+ const owned = (file, expected) => {
569
+ if (!lexists(file))
570
+ return;
571
+ try {
572
+ if (insideSeatStorage(paths.root, file) && expected(fs.readFileSync(file)) && removeInsideSeatStorage(paths.root, file)) {
573
+ removedFiles.push(file);
574
+ return;
575
+ }
576
+ }
577
+ catch { }
578
+ out.kept.push(file);
579
+ };
580
+ owned(paths.pluginManifestPath, (bytes) => bytes.toString("utf8") === PLUGIN_MANIFEST);
581
+ owned(paths.catalogPath, (bytes) => generated[paths.catalogPath] === sha256(bytes));
582
+ if (opts.dropRecords && out.kept.length === 0 && out.refused.length === 0) {
583
+ for (const record of [paths.manifestPath, paths.projectionsPath, nodePath.join(paths.root, "launch-additions.json")]) {
584
+ try {
585
+ if (removeInsideSeatStorage(paths.root, record))
586
+ removedFiles.push(record);
587
+ }
588
+ catch { }
589
+ }
590
+ }
591
+ // Remove only the folders this cleanup emptied: those on the path of a file it removed, from the deepest up to the
592
+ // rig's folder, each while it is still an empty real folder under the anchor. An empty folder OpenRig never wrote a
593
+ // file into is not recorded ownership, so it stays; nothing is walked through a refused (linked) path.
594
+ const anchor = seatsAnchor(paths.root);
595
+ const emptied = new Set();
596
+ for (const file of removedFiles) {
597
+ for (let dir = nodePath.dirname(nodePath.resolve(file)); dir.startsWith(anchor + nodePath.sep); dir = nodePath.dirname(dir))
598
+ emptied.add(dir);
599
+ }
600
+ for (const dir of [...emptied].sort((a, b) => b.split(nodePath.sep).length - a.split(nodePath.sep).length)) {
601
+ try {
602
+ if (anchored(anchor, dir, "folder") && fs.readdirSync(dir).length === 0)
603
+ fs.rmdirSync(dir);
604
+ }
605
+ catch { }
606
+ }
607
+ out.kept.sort();
608
+ out.refused.sort();
609
+ return out;
610
+ }
611
+ /**
612
+ * Copies a Claude seat's earlier launches put in the project, once the seat uses its own storage. They go only when the
613
+ * project's loadout record names this seat as the sole owner and they are unchanged: that is the reconciler's own rule
614
+ * for a skill no seat selects any more, run with this seat's selection emptied. A skill the person installed for the
615
+ * project stays selected. While another seat still shares the copies, nothing is removed. Returns launch notes.
616
+ */
617
+ export function migrateLegacyProjectSkills(input) {
618
+ let owners;
619
+ try {
620
+ const manifest = JSON.parse(fs.readFileSync(nodePath.join(input.cwd, ".openrig", "skill-loadouts", "claude-code.json"), "utf8"));
621
+ owners = Object.keys(manifest.topologySelections ?? {});
622
+ }
623
+ catch {
624
+ return [];
625
+ }
626
+ if (owners.length === 0)
627
+ return [];
628
+ const others = owners.filter((owner) => owner !== input.owner);
629
+ if (others.length > 0)
630
+ return [`legacy_project_skills_kept: other seats still share the project's copies (${others.join(", ")})`];
631
+ const migrated = input.reconcile({
632
+ loadout: { ...input.loadout, projectSelectionDeclared: false, projectSelection: [], entries: [], skipped: [] },
633
+ runtime: "claude-code", cwd: input.cwd, apply: true, topologyOwner: input.owner,
634
+ });
635
+ if (!migrated.ok)
636
+ return [`legacy_project_skills_kept: ${migrated.errors.map((e) => `${e.code}: ${e.message}`).join("; ")}`];
637
+ return migrated.removed.length > 0 ? [`legacy_project_skills_removed: ${migrated.removed.join(", ")} (now in this seat's own storage)`] : [];
638
+ }
639
+ /** The launch or restore warning for a catalog that wasn't written, naming why. */
640
+ export function seatCatalogKeptNote(catalog) {
641
+ return catalog.reason === "linked"
642
+ ? `seat_catalog_refused: ${catalog.path} is not inside this seat's storage (a link on the way); nothing was written there`
643
+ : `seat_catalog_kept: ${catalog.path} differs from what OpenRig last wrote; kept as it is`;
644
+ }
645
+ /**
646
+ * OPR.0.7.0.13 (Codex C2): write the seat's skill catalog from what is in its own storage: each skill's original
647
+ * description (its trigger) and the exact SKILL.md to read, never the skill bodies. It is delivered to the seat through
648
+ * its per-seat startup text, so it says plainly that it replaces any earlier list (a fork child carries its parent's).
649
+ */
650
+ export function writeSeatSkillCatalog(paths) {
651
+ const lines = [];
652
+ let ids = [];
653
+ // The generated router isn't one of the seat's skills; anything else under its reserved name (a team skill named so,
654
+ // or an edited router) is listed like any skill, never hidden.
655
+ const routerGenerated = resolveSeatSkillRouter(paths).written;
656
+ try {
657
+ ids = fs.readdirSync(paths.skillsRoot, { withFileTypes: true }).filter((e) => e.isDirectory() && !(e.name === SEAT_SKILL_ROUTER_ID && routerGenerated)).map((e) => e.name).sort();
658
+ }
659
+ catch { }
660
+ for (const id of ids) {
661
+ const file = nodePath.join(paths.skillsRoot, id, "SKILL.md");
662
+ let parsed;
663
+ try {
664
+ parsed = parseSkillFrontmatter(fs.readFileSync(file, "utf8"));
665
+ }
666
+ catch {
667
+ continue;
668
+ }
669
+ if (!parsed.ok)
670
+ continue;
671
+ const description = String(parsed.frontmatter.description).replace(/\s+/g, " ").trim();
672
+ lines.push(`- **${parsed.frontmatter.name}**: ${description}`, ` Read before you use it: \`${file}\``);
673
+ }
674
+ const text = [
675
+ "OpenRig: this seat's skills. This list replaces any earlier OpenRig skill list in this conversation.",
676
+ "",
677
+ lines.length > 0
678
+ ? "Each skill says when to use it. When that moment comes, read its SKILL.md, then follow it."
679
+ : "No OpenRig skills are kept for this seat.",
680
+ "",
681
+ ...lines,
682
+ "",
683
+ ].join("\n");
684
+ const digest = sha256(Buffer.from(text));
685
+ const count = lines.length / 2;
686
+ // A linked catalog or record path anywhere from the anchor down: neither is read or written through it, and the reason
687
+ // is named. (The skills folder listed above is read where it is, link or not; this guards the two files written here.)
688
+ if (!insideSeatStorage(paths.root, paths.catalogPath) || !insideSeatStorage(paths.root, paths.projectionsPath)) {
689
+ return { path: paths.catalogPath, digest, count, kept: true, reason: "linked" };
690
+ }
691
+ const record = readProjections(paths.projectionsPath);
692
+ if (lexists(paths.catalogPath)) {
693
+ let current;
694
+ try {
695
+ if (insideSeatStorage(paths.root, paths.catalogPath))
696
+ current = fs.readFileSync(paths.catalogPath);
697
+ }
698
+ catch { }
699
+ const ours = current !== undefined && (sha256(current) === digest || record.generated?.[paths.catalogPath] === sha256(current));
700
+ if (!ours)
701
+ return { path: paths.catalogPath, digest: current ? sha256(current) : digest, count, kept: true, reason: "edited" };
702
+ }
703
+ writeInsideSeatStorage(paths.root, paths.catalogPath, text);
704
+ writeProjections(paths.root, { ...record, generated: { ...record.generated, [paths.catalogPath]: digest } });
705
+ return { path: paths.catalogPath, digest, count };
706
+ }
707
+ /** The startup file, and the managed block id, that carry the bootstrap line into a seat's guidance file. */
708
+ export const SEAT_SKILLS_BOOTSTRAP_BLOCK_ID = "openrig-seat-skills.md";
709
+ /** OPR.0.7.0.13 (router, R1.1): the one constant bootstrap line, verbatim. The guidance asset carries exactly this text. */
710
+ export const SEAT_SKILLS_BOOTSTRAP_LINE = "OpenRig seat skills: if `OPENRIG_SESSION_NAME` is set, run `rig skill loadout --seat self` and use the router skill it names; if it isn't set, this line doesn't apply to you.";
711
+ /** Whether guidance text holds the seat-skills block with anything but the line: a person edited it. A start leaves such a
712
+ * block as it is, and down keeps it (both by `managedBlockBodyMatches`). */
713
+ export function seatSkillsLineEdited(content) {
714
+ return hasEditedManagedBlock(content, SEAT_SKILLS_BOOTSTRAP_BLOCK_ID, SEAT_SKILLS_BOOTSTRAP_LINE);
715
+ }
716
+ /**
717
+ * Slice 20 seam: the exact preview of the bootstrap line's footprint, before any write: the line verbatim, the exact text
718
+ * written (the line between OpenRig's markers) and where it goes, and each file
719
+ * it would go into (a Claude seat's rig file, `CLAUDE.md` or `CLAUDE.local.md`; a Codex seat's `AGENTS.md`), one entry
720
+ * per file with every seat sharing it. Pure: no filesystem or settings read. The file rule is main's
721
+ * `seatGuidanceFile` (restore-guidance.ts), repeated here until this branch carries it.
722
+ */
723
+ export function describeSkillRouterFootprint(seats) {
724
+ const byPath = new Map();
725
+ const notCovered = [];
726
+ for (const s of seats) {
727
+ const name = s.runtime === "claude-code" ? (s.claudeManagedBlockFile ?? "CLAUDE.md") : s.runtime === "codex" ? "AGENTS.md" : null;
728
+ if (!name) {
729
+ notCovered.push({ seat: s.seat, runtime: s.runtime, reason: "this runtime has no managed guidance file for the line" });
730
+ continue;
731
+ }
732
+ const path = nodePath.join(s.cwd, name);
733
+ const entry = byPath.get(path) ?? { path, runtime: s.runtime, seats: [] };
734
+ entry.seats.push(s.seat);
735
+ byPath.set(path, entry);
736
+ }
737
+ // The guidance asset carries the line and a newline; the managed-block writer puts its markers around that.
738
+ const written = managedBlockText(SEAT_SKILLS_BOOTSTRAP_BLOCK_ID, `${SEAT_SKILLS_BOOTSTRAP_LINE}\n`);
739
+ return {
740
+ line: SEAT_SKILLS_BOOTSTRAP_LINE,
741
+ written,
742
+ placement: "Added at the end of the file after two newlines. A file that doesn't exist yet holds only this, and a file that already has it gets it replaced in place.",
743
+ appended: `${MANAGED_BLOCK_APPEND_SEPARATOR}${written}`,
744
+ files: [...byPath.values()],
745
+ notCovered,
746
+ ifNo: "Nothing is written into these files. Each seat still has its own skills and router; a Codex seat still gets its skill list in its startup text, and any agent can run `rig skill loadout --seat self`, but nothing in the project points there.",
747
+ };
748
+ }
749
+ /** OPR.0.7.0.13 (router): the id of the one router skill OpenRig generates for each seat. */
750
+ export const SEAT_SKILL_ROUTER_ID = "openrig-seat-router";
751
+ /** The router's place in the seat's own storage, and whether it is there as OpenRig wrote it. Reads only. */
752
+ export function resolveSeatSkillRouter(paths) {
753
+ const file = nodePath.join(paths.skillsRoot, SEAT_SKILL_ROUTER_ID, "SKILL.md");
754
+ if (!insideSeatStorage(paths.root, file) || !insideSeatStorage(paths.root, paths.projectionsPath)) {
755
+ return { id: SEAT_SKILL_ROUTER_ID, path: file, written: false, kept: "linked" };
756
+ }
757
+ if (!lexists(file))
758
+ return { id: SEAT_SKILL_ROUTER_ID, path: file, written: false };
759
+ let written = false;
760
+ try {
761
+ written = readProjections(paths.projectionsPath).generated?.[file] === sha256(fs.readFileSync(file));
762
+ }
763
+ catch { }
764
+ return { id: SEAT_SKILL_ROUTER_ID, path: file, written, ...(written ? {} : { kept: "edited" }) };
765
+ }
766
+ /**
767
+ * OPR.0.7.0.13 (router, R1.1): write the one router skill OpenRig generates for this seat, in the seat's own storage,
768
+ * with every other skill's trigger and the exact SKILL.md to read in its body. It is a skill like the others (for Claude,
769
+ * `openrig:openrig-seat-router` through the seat plugin), so it is never listed in the Codex catalog, which stays as it
770
+ * was. A router edited since OpenRig wrote it, or on a linked path, is kept and named, never overwritten.
771
+ */
772
+ export function writeSeatSkillRouter(paths) {
773
+ const router = resolveSeatSkillRouter(paths);
774
+ // A link on the way: nothing is read through it, and nothing written.
775
+ if (router.kept === "linked")
776
+ return { id: router.id, path: router.path, written: false, kept: "linked" };
777
+ const lines = [];
778
+ let ids = [];
779
+ try {
780
+ ids = fs.readdirSync(paths.skillsRoot, { withFileTypes: true })
781
+ .filter((e) => e.isDirectory() && e.name !== SEAT_SKILL_ROUTER_ID).map((e) => e.name).sort();
782
+ }
783
+ catch { }
784
+ for (const id of ids) {
785
+ const file = nodePath.join(paths.skillsRoot, id, "SKILL.md");
786
+ let parsed;
787
+ try {
788
+ parsed = parseSkillFrontmatter(fs.readFileSync(file, "utf8"));
789
+ }
790
+ catch {
791
+ continue;
792
+ }
793
+ if (!parsed.ok)
794
+ continue;
795
+ const description = String(parsed.frontmatter.description).replace(/\s+/g, " ").trim();
796
+ lines.push(`- **${parsed.frontmatter.name}**: ${description}`, ` Read before you use it: \`${file}\``);
797
+ }
798
+ const text = [
799
+ "---",
800
+ `name: ${SEAT_SKILL_ROUTER_ID}`,
801
+ "description: Use first whenever you might need one of this OpenRig seat's own skills. It lists each skill, when to use it, and the exact file to read.",
802
+ "---",
803
+ "",
804
+ "# This seat's OpenRig skills",
805
+ "",
806
+ lines.length > 0
807
+ ? "Each skill says when to use it. When that moment comes, read its SKILL.md, then follow it."
808
+ : "No other OpenRig skills are kept for this seat.",
809
+ "",
810
+ ...lines,
811
+ "",
812
+ ].join("\n");
813
+ const digest = sha256(Buffer.from(text));
814
+ if (!insideSeatStorage(paths.root, router.path) || !insideSeatStorage(paths.root, paths.projectionsPath)) {
815
+ return { ...router, written: false, kept: "linked" };
816
+ }
817
+ const record = readProjections(paths.projectionsPath);
818
+ if (lexists(router.path)) {
819
+ let current;
820
+ try {
821
+ current = fs.readFileSync(router.path);
822
+ }
823
+ catch { }
824
+ const ours = current !== undefined && (sha256(current) === digest || record.generated?.[router.path] === sha256(current));
825
+ if (!ours)
826
+ return { ...router, written: false, kept: "edited" };
827
+ }
828
+ writeInsideSeatStorage(paths.root, router.path, text);
829
+ writeProjections(paths.root, { ...record, generated: { ...record.generated, [router.path]: digest } });
830
+ return { id: router.id, path: router.path, written: true };
831
+ }
832
+ /** The launch or restore warning for a router that wasn't written, naming why. */
833
+ export function seatRouterKeptNote(router) {
834
+ return router.kept === "linked"
835
+ ? `seat_router_refused: ${router.path} is not inside this seat's storage (a link on the way); nothing was written there`
836
+ : `seat_router_kept: ${router.path} differs from what OpenRig last wrote; kept as it is`;
837
+ }
838
+ /** Claude Code reads a seat's plugin from CLAUDE_CODE_PLUGIN_DIRS from v2.1.280; OpenRig doesn't check the version. */
839
+ export const TEAM_SKILLS_VERSION_NOTE = "team_skills_need_claude_2.1.280: this seat's skills reach Claude Code through CLAUDE_CODE_PLUGIN_DIRS, which Claude Code reads from v2.1.280; OpenRig doesn't check the version, and an older Claude starts without them";
840
+ /**
841
+ * The version limit, named for a Claude seat with its own storage whenever any writer puts a skill there: its loadout,
842
+ * a profile skill, or a startup skill file. A seat with no skills gets no note.
843
+ */
844
+ export function claudeSeatSkillsNote(input) {
845
+ const writesSkills = input.loadoutReceipts > 0
846
+ || input.planEntries.some((e) => e.category === "skill")
847
+ || input.startupFiles.some((f) => f.deliveryHint === "skill_install" || (f.deliveryHint === "auto" && f.path.endsWith("SKILL.md")));
848
+ return writesSkills ? TEAM_SKILLS_VERSION_NOTE : undefined;
849
+ }
850
+ //# sourceMappingURL=seat-skill-storage.js.map