@openrig/cli 0.5.5 → 0.5.7

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 (915) hide show
  1. package/daemon/assets/continuity/apprentice-cutover.md +19 -0
  2. package/daemon/assets/continuity/apprentice-prepare.md +17 -0
  3. package/daemon/assets/plugins/openrig-core/README.md +1 -1
  4. package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +81 -4
  5. package/daemon/assets/plugins/openrig-core/skills/applying-a-permission-policy/SKILL.md +3 -3
  6. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +0 -0
  7. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +0 -0
  8. package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +4 -9
  9. package/daemon/assets/plugins/openrig-core/skills/loading-addressable-markdown/SKILL.md +34 -0
  10. package/daemon/assets/plugins/openrig-core/skills/loading-addressable-markdown/scripts/resolve-markdown.mjs +170 -0
  11. package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +82 -118
  12. package/daemon/assets/plugins/openrig-core/skills/mission-slice-sop/SKILL.md +24 -25
  13. package/daemon/assets/plugins/openrig-core/skills/openrig-operating-model/SKILL.md +5 -12
  14. package/daemon/assets/plugins/openrig-core/skills/openrig-operating-model/scripts/compose.py +36 -117
  15. package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +10 -10
  16. package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +1 -12
  17. package/daemon/assets/plugins/openrig-core/skills/orienting-to-an-inherited-seat/CHANGELOG.md +1 -1
  18. package/daemon/assets/plugins/openrig-core/skills/orienting-to-an-inherited-seat/SKILL.md +15 -0
  19. package/daemon/assets/plugins/openrig-core/skills/queue-handoff/SKILL.md +4 -16
  20. package/daemon/assets/plugins/openrig-core/skills/refocusing/scripts/trace-to-root.py +50 -7
  21. package/daemon/assets/plugins/openrig-core/skills/retiring-and-inheriting-a-seat/SKILL.md +26 -6
  22. package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +3 -0
  23. package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/references/apprentice-evidence-toolkit.md +32 -0
  24. package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/references/apprentice-successor-seat-cutover.md +256 -0
  25. package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/references/orchestrator-role.md +40 -0
  26. package/daemon/assets/vm-preview-fixtures/README.md +16 -38
  27. package/daemon/assets/vm-preview-fixtures/workflows/sample-basic-loop.yaml +7 -8
  28. package/daemon/context-packs/onboarding-width/manifest.yaml +4 -1
  29. package/daemon/context-packs/onboarding-width/public-reference-material.md +1 -1
  30. package/daemon/context-packs/skills/applying-a-permission-policy/SKILL.md +120 -0
  31. package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +10 -0
  32. package/daemon/context-packs/skills/claude-compaction-restore/SKILL.md +166 -0
  33. package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +18 -0
  34. package/daemon/context-packs/skills/claude-compaction-restore/scripts/precompact-hook.mjs +174 -0
  35. package/daemon/context-packs/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +487 -0
  36. package/daemon/context-packs/skills/claude-compaction-restore/templates/compact-instruction.md +1 -0
  37. package/daemon/context-packs/skills/claude-compaction-restore/templates/post-compact-restore-instruction.md +1 -0
  38. package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +2 -1
  39. package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +2 -1
  40. package/daemon/context-packs/skills/core/cross-host-rig-commands/SKILL.md +6 -13
  41. package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +2 -1
  42. package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +2 -1
  43. package/daemon/context-packs/skills/core/messaging-the-human/SKILL.md +98 -0
  44. package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +10 -0
  45. package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +2 -1
  46. package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +2 -1
  47. package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +2 -1
  48. package/daemon/context-packs/skills/core/openrig-skills/SKILL.md +115 -0
  49. package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +10 -0
  50. package/daemon/context-packs/skills/core/openrig-upgrade/SKILL.md +19 -75
  51. package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +2 -1
  52. package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +2 -1
  53. package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +2 -1
  54. package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +2 -1
  55. package/daemon/context-packs/skills/core/specification-system/manifest.yaml +2 -1
  56. package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +2 -1
  57. package/daemon/context-packs/skills/core/watchdog/SKILL.md +4 -10
  58. package/daemon/context-packs/skills/core/watchdog/manifest.yaml +2 -1
  59. package/daemon/context-packs/skills/delegating-work/SKILL.md +43 -0
  60. package/daemon/context-packs/skills/delegating-work/manifest.yaml +10 -0
  61. package/daemon/context-packs/skills/forming-an-openrig-mental-model/SKILL.md +318 -0
  62. package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +10 -0
  63. package/daemon/context-packs/skills/loading-addressable-markdown/SKILL.md +34 -0
  64. package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +12 -0
  65. package/daemon/context-packs/skills/loading-addressable-markdown/scripts/resolve-markdown.mjs +170 -0
  66. package/daemon/context-packs/skills/mission-slice-sop/SKILL.md +94 -0
  67. package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +10 -0
  68. package/daemon/context-packs/skills/openrig-operating-model/SKILL.md +397 -0
  69. package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +30 -0
  70. package/daemon/context-packs/skills/openrig-operating-model/scripts/compose.py +572 -0
  71. package/daemon/context-packs/skills/openrig-operating-model/scripts/scaffold.sh +34 -0
  72. package/daemon/context-packs/skills/openrig-operating-model/scripts/trace-due.sh +32 -0
  73. package/daemon/context-packs/skills/openrig-operating-model/scripts/trace-stamp.sh +5 -0
  74. package/daemon/context-packs/skills/openrig-operating-model/scripts/trunk-diff.sh +18 -0
  75. package/daemon/context-packs/skills/openrig-operating-model/templates/LEARNED.md +40 -0
  76. package/daemon/context-packs/skills/openrig-operating-model/templates/NOTES.md +9 -0
  77. package/daemon/context-packs/skills/openrig-operating-model/templates/PLAYBOOK.md +5 -0
  78. package/daemon/context-packs/skills/openrig-operating-model/templates/SOP.md +24 -0
  79. package/daemon/context-packs/skills/openrig-operating-model/templates/SPEC.md +54 -0
  80. package/daemon/context-packs/skills/openrig-user/SKILL.md +1374 -0
  81. package/daemon/context-packs/skills/openrig-user/manifest.yaml +10 -0
  82. package/daemon/context-packs/skills/orienting-to-an-inherited-seat/CHANGELOG.md +64 -0
  83. package/daemon/context-packs/skills/orienting-to-an-inherited-seat/SKILL.md +250 -0
  84. package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +12 -0
  85. package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +2 -1
  86. package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +2 -1
  87. package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +2 -1
  88. package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +2 -1
  89. package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +2 -1
  90. package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +2 -1
  91. package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +2 -1
  92. package/daemon/context-packs/skills/pods/development-team/manifest.yaml +2 -1
  93. package/daemon/context-packs/skills/pods/orchestration-team/SKILL.md +1 -1
  94. package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +2 -1
  95. package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +2 -1
  96. package/daemon/context-packs/skills/pods/review-team/SKILL.md +1 -1
  97. package/daemon/context-packs/skills/pods/review-team/manifest.yaml +2 -1
  98. package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +2 -1
  99. package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +2 -1
  100. package/daemon/context-packs/skills/process/dogfood/manifest.yaml +2 -1
  101. package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +2 -1
  102. package/daemon/context-packs/skills/process/systematic-debugging/find-polluter.sh +0 -0
  103. package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +2 -1
  104. package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +2 -1
  105. package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +2 -1
  106. package/daemon/context-packs/skills/queue-handoff/SKILL.md +192 -0
  107. package/daemon/context-packs/skills/queue-handoff/manifest.yaml +10 -0
  108. package/daemon/context-packs/skills/refocusing/SKILL.md +31 -0
  109. package/daemon/context-packs/skills/refocusing/manifest.yaml +14 -0
  110. package/daemon/context-packs/skills/refocusing/references/refocus.md +22 -0
  111. package/daemon/context-packs/skills/refocusing/scripts/trace-to-root.py +264 -0
  112. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/CHANGELOG.md +48 -0
  113. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/SKILL.md +231 -0
  114. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +12 -0
  115. package/daemon/context-packs/skills/seat-continuity-and-handover/SKILL.md +151 -0
  116. package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +16 -0
  117. package/daemon/context-packs/skills/seat-continuity-and-handover/references/apprentice-evidence-toolkit.md +32 -0
  118. package/daemon/context-packs/skills/seat-continuity-and-handover/references/apprentice-successor-seat-cutover.md +256 -0
  119. package/daemon/context-packs/skills/seat-continuity-and-handover/references/orchestrator-role.md +40 -0
  120. package/daemon/context-packs/skills/session-compaction-and-restore/SKILL.md +163 -0
  121. package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +10 -0
  122. package/daemon/context-packs/skills/software-for-agents/SKILL.md +187 -0
  123. package/daemon/context-packs/skills/software-for-agents/manifest.yaml +10 -0
  124. package/daemon/context-packs/world-example/manifest.yaml +15 -2
  125. package/daemon/context-packs/world-example/your-world.md +19 -2
  126. package/daemon/context-packs/world-public/boundaries.md +33 -0
  127. package/daemon/context-packs/world-public/build-your-world.md +84 -0
  128. package/daemon/context-packs/world-public/claims.yaml +205 -0
  129. package/daemon/context-packs/world-public/manifest.yaml +59 -0
  130. package/daemon/context-packs/world-public/start-here.md +51 -0
  131. package/daemon/context-packs/world-public/verify-world.sh +522 -0
  132. package/daemon/dist/build-info.js +3 -3
  133. package/daemon/dist/builtins/workflow-specs/basic-loop.yaml +3 -3
  134. package/daemon/dist/builtins/workflow-specs/conveyor.yaml +1 -1
  135. package/daemon/dist/builtins/workflow-specs/factory-rsi.yaml +1 -1
  136. package/daemon/dist/context-pack-taxonomy-surface.d.ts +2 -0
  137. package/daemon/dist/context-pack-taxonomy-surface.d.ts.map +1 -0
  138. package/daemon/dist/context-pack-taxonomy-surface.js +6 -0
  139. package/daemon/dist/context-pack-taxonomy-surface.js.map +1 -0
  140. package/daemon/dist/db/all-migrations.d.ts +1 -1
  141. package/daemon/dist/db/all-migrations.d.ts.map +1 -1
  142. package/daemon/dist/db/all-migrations.js +10 -2
  143. package/daemon/dist/db/all-migrations.js.map +1 -1
  144. package/daemon/dist/db/migrations/074_context_usage_watchdog.d.ts +4 -0
  145. package/daemon/dist/db/migrations/074_context_usage_watchdog.d.ts.map +1 -0
  146. package/daemon/dist/db/migrations/074_context_usage_watchdog.js +11 -0
  147. package/daemon/dist/db/migrations/074_context_usage_watchdog.js.map +1 -0
  148. package/daemon/dist/db/migrations/075_context_usage_watchdog_generation.d.ts +4 -0
  149. package/daemon/dist/db/migrations/075_context_usage_watchdog_generation.d.ts.map +1 -0
  150. package/daemon/dist/db/migrations/075_context_usage_watchdog_generation.js +8 -0
  151. package/daemon/dist/db/migrations/075_context_usage_watchdog_generation.js.map +1 -0
  152. package/daemon/dist/db/migrations/076_owner_notification_levels.d.ts +8 -0
  153. package/daemon/dist/db/migrations/076_owner_notification_levels.d.ts.map +1 -0
  154. package/daemon/dist/db/migrations/076_owner_notification_levels.js +15 -0
  155. package/daemon/dist/db/migrations/076_owner_notification_levels.js.map +1 -0
  156. package/daemon/dist/db/migrations/077_node_session_source.d.ts +4 -0
  157. package/daemon/dist/db/migrations/077_node_session_source.d.ts.map +1 -0
  158. package/daemon/dist/db/migrations/077_node_session_source.js +6 -0
  159. package/daemon/dist/db/migrations/077_node_session_source.js.map +1 -0
  160. package/daemon/dist/domain/active-occupant.d.ts +44 -0
  161. package/daemon/dist/domain/active-occupant.d.ts.map +1 -0
  162. package/daemon/dist/domain/active-occupant.js +72 -0
  163. package/daemon/dist/domain/active-occupant.js.map +1 -0
  164. package/daemon/dist/domain/agent-manifest.d.ts +6 -0
  165. package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
  166. package/daemon/dist/domain/agent-manifest.js +77 -15
  167. package/daemon/dist/domain/agent-manifest.js.map +1 -1
  168. package/daemon/dist/domain/agent-resolver.d.ts +11 -0
  169. package/daemon/dist/domain/agent-resolver.d.ts.map +1 -1
  170. package/daemon/dist/domain/agent-resolver.js +55 -0
  171. package/daemon/dist/domain/agent-resolver.js.map +1 -1
  172. package/daemon/dist/domain/bundle-context-packs-router.d.ts +9 -2
  173. package/daemon/dist/domain/bundle-context-packs-router.d.ts.map +1 -1
  174. package/daemon/dist/domain/bundle-context-packs-router.js +18 -0
  175. package/daemon/dist/domain/bundle-context-packs-router.js.map +1 -1
  176. package/daemon/dist/domain/claude-compaction-enforcer.d.ts +7 -0
  177. package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
  178. package/daemon/dist/domain/claude-compaction-enforcer.js +10 -0
  179. package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
  180. package/daemon/dist/domain/context-packs/context-pack-library-service.d.ts.map +1 -1
  181. package/daemon/dist/domain/context-packs/context-pack-library-service.js +7 -0
  182. package/daemon/dist/domain/context-packs/context-pack-library-service.js.map +1 -1
  183. package/daemon/dist/domain/context-packs/context-pack-types.d.ts +11 -0
  184. package/daemon/dist/domain/context-packs/context-pack-types.d.ts.map +1 -1
  185. package/daemon/dist/domain/context-packs/context-pack-types.js +11 -0
  186. package/daemon/dist/domain/context-packs/context-pack-types.js.map +1 -1
  187. package/daemon/dist/domain/context-packs/manifest-parser.d.ts.map +1 -1
  188. package/daemon/dist/domain/context-packs/manifest-parser.js +18 -7
  189. package/daemon/dist/domain/context-packs/manifest-parser.js.map +1 -1
  190. package/daemon/dist/domain/context-packs/profile-composer.d.ts +1 -1
  191. package/daemon/dist/domain/context-packs/profile-composer.d.ts.map +1 -1
  192. package/daemon/dist/domain/context-packs/profile-composer.js +2 -2
  193. package/daemon/dist/domain/context-packs/profile-composer.js.map +1 -1
  194. package/daemon/dist/domain/context-packs/profile-source-resolver.d.ts +3 -1
  195. package/daemon/dist/domain/context-packs/profile-source-resolver.d.ts.map +1 -1
  196. package/daemon/dist/domain/context-packs/profile-source-resolver.js +3 -2
  197. package/daemon/dist/domain/context-packs/profile-source-resolver.js.map +1 -1
  198. package/daemon/dist/domain/continuity-policy-materializer.d.ts +88 -0
  199. package/daemon/dist/domain/continuity-policy-materializer.d.ts.map +1 -0
  200. package/daemon/dist/domain/continuity-policy-materializer.js +290 -0
  201. package/daemon/dist/domain/continuity-policy-materializer.js.map +1 -0
  202. package/daemon/dist/domain/continuity-stack-packets.d.ts +65 -0
  203. package/daemon/dist/domain/continuity-stack-packets.d.ts.map +1 -0
  204. package/daemon/dist/domain/continuity-stack-packets.js +99 -0
  205. package/daemon/dist/domain/continuity-stack-packets.js.map +1 -0
  206. package/daemon/dist/domain/execution-view.d.ts +39 -0
  207. package/daemon/dist/domain/execution-view.d.ts.map +1 -0
  208. package/daemon/dist/domain/execution-view.js +707 -0
  209. package/daemon/dist/domain/execution-view.js.map +1 -0
  210. package/daemon/dist/domain/gateway/delivery-rules-engine.d.ts +60 -0
  211. package/daemon/dist/domain/gateway/delivery-rules-engine.d.ts.map +1 -0
  212. package/daemon/dist/domain/gateway/delivery-rules-engine.js +144 -0
  213. package/daemon/dist/domain/gateway/delivery-rules-engine.js.map +1 -0
  214. package/daemon/dist/domain/gateway/destination-resolver.d.ts +20 -0
  215. package/daemon/dist/domain/gateway/destination-resolver.d.ts.map +1 -0
  216. package/daemon/dist/domain/gateway/destination-resolver.js +52 -0
  217. package/daemon/dist/domain/gateway/destination-resolver.js.map +1 -0
  218. package/daemon/dist/domain/gateway/dispatcher.d.ts +3 -1
  219. package/daemon/dist/domain/gateway/dispatcher.d.ts.map +1 -1
  220. package/daemon/dist/domain/gateway/dispatcher.js +9 -2
  221. package/daemon/dist/domain/gateway/dispatcher.js.map +1 -1
  222. package/daemon/dist/domain/gateway/gateway-subsystem.d.ts +6 -2
  223. package/daemon/dist/domain/gateway/gateway-subsystem.d.ts.map +1 -1
  224. package/daemon/dist/domain/gateway/gateway-subsystem.js +5 -3
  225. package/daemon/dist/domain/gateway/gateway-subsystem.js.map +1 -1
  226. package/daemon/dist/domain/gateway/human-registry.d.ts +9 -1
  227. package/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
  228. package/daemon/dist/domain/gateway/human-registry.js +32 -1
  229. package/daemon/dist/domain/gateway/human-registry.js.map +1 -1
  230. package/daemon/dist/domain/gateway/operator-delivery-engine.d.ts +32 -0
  231. package/daemon/dist/domain/gateway/operator-delivery-engine.d.ts.map +1 -0
  232. package/daemon/dist/domain/gateway/operator-delivery-engine.js +86 -0
  233. package/daemon/dist/domain/gateway/operator-delivery-engine.js.map +1 -0
  234. package/daemon/dist/domain/gateway/slack/config.d.ts +3 -2
  235. package/daemon/dist/domain/gateway/slack/config.d.ts.map +1 -1
  236. package/daemon/dist/domain/gateway/slack/config.js +20 -4
  237. package/daemon/dist/domain/gateway/slack/config.js.map +1 -1
  238. package/daemon/dist/domain/gateway/slack/inbound.d.ts +34 -6
  239. package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
  240. package/daemon/dist/domain/gateway/slack/inbound.js +60 -9
  241. package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
  242. package/daemon/dist/domain/gateway/slack/outbound-driver.d.ts +3 -0
  243. package/daemon/dist/domain/gateway/slack/outbound-driver.d.ts.map +1 -1
  244. package/daemon/dist/domain/gateway/slack/outbound-driver.js +12 -5
  245. package/daemon/dist/domain/gateway/slack/outbound-driver.js.map +1 -1
  246. package/daemon/dist/domain/gateway/slack/queue-access.d.ts +10 -5
  247. package/daemon/dist/domain/gateway/slack/queue-access.d.ts.map +1 -1
  248. package/daemon/dist/domain/gateway/slack/queue-access.js +46 -19
  249. package/daemon/dist/domain/gateway/slack/queue-access.js.map +1 -1
  250. package/daemon/dist/domain/gateway/slack/slack-api.d.ts +29 -6
  251. package/daemon/dist/domain/gateway/slack/slack-api.d.ts.map +1 -1
  252. package/daemon/dist/domain/gateway/slack/slack-api.js +41 -3
  253. package/daemon/dist/domain/gateway/slack/slack-api.js.map +1 -1
  254. package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +9 -3
  255. package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
  256. package/daemon/dist/domain/gateway/slack/slack-delivery.js +132 -12
  257. package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
  258. package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts +10 -0
  259. package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
  260. package/daemon/dist/domain/gateway/slack/slack-subsystem.js +286 -11
  261. package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
  262. package/daemon/dist/domain/graph-projection.d.ts +6 -0
  263. package/daemon/dist/domain/graph-projection.d.ts.map +1 -1
  264. package/daemon/dist/domain/graph-projection.js +6 -0
  265. package/daemon/dist/domain/graph-projection.js.map +1 -1
  266. package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
  267. package/daemon/dist/domain/mission-control/mission-control-write-contract.js +1 -0
  268. package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
  269. package/daemon/dist/domain/node-inventory.d.ts +41 -3
  270. package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
  271. package/daemon/dist/domain/node-inventory.js +45 -48
  272. package/daemon/dist/domain/node-inventory.js.map +1 -1
  273. package/daemon/dist/domain/parked-query.d.ts +1 -0
  274. package/daemon/dist/domain/parked-query.d.ts.map +1 -1
  275. package/daemon/dist/domain/parked-query.js +1 -0
  276. package/daemon/dist/domain/parked-query.js.map +1 -1
  277. package/daemon/dist/domain/pod-bundle-assembler.d.ts.map +1 -1
  278. package/daemon/dist/domain/pod-bundle-assembler.js +12 -5
  279. package/daemon/dist/domain/pod-bundle-assembler.js.map +1 -1
  280. package/daemon/dist/domain/policies/context-usage-threshold.d.ts +7 -0
  281. package/daemon/dist/domain/policies/context-usage-threshold.d.ts.map +1 -0
  282. package/daemon/dist/domain/policies/context-usage-threshold.js +99 -0
  283. package/daemon/dist/domain/policies/context-usage-threshold.js.map +1 -0
  284. package/daemon/dist/domain/policies/delivery-deferral.d.ts +54 -0
  285. package/daemon/dist/domain/policies/delivery-deferral.d.ts.map +1 -0
  286. package/daemon/dist/domain/policies/delivery-deferral.js +153 -0
  287. package/daemon/dist/domain/policies/delivery-deferral.js.map +1 -0
  288. package/daemon/dist/domain/policies/delivery-digest-flush.d.ts +45 -0
  289. package/daemon/dist/domain/policies/delivery-digest-flush.d.ts.map +1 -0
  290. package/daemon/dist/domain/policies/delivery-digest-flush.js +94 -0
  291. package/daemon/dist/domain/policies/delivery-digest-flush.js.map +1 -0
  292. package/daemon/dist/domain/policies/parked-owner-consumer.d.ts +65 -0
  293. package/daemon/dist/domain/policies/parked-owner-consumer.d.ts.map +1 -0
  294. package/daemon/dist/domain/policies/parked-owner-consumer.js +244 -0
  295. package/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -0
  296. package/daemon/dist/domain/policies/types.d.ts +8 -0
  297. package/daemon/dist/domain/policies/types.d.ts.map +1 -1
  298. package/daemon/dist/domain/profile-resolver.d.ts +4 -0
  299. package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
  300. package/daemon/dist/domain/profile-resolver.js +58 -0
  301. package/daemon/dist/domain/profile-resolver.js.map +1 -1
  302. package/daemon/dist/domain/provider/provider-signals.d.ts +20 -1
  303. package/daemon/dist/domain/provider/provider-signals.d.ts.map +1 -1
  304. package/daemon/dist/domain/provider/provider-signals.js +64 -0
  305. package/daemon/dist/domain/provider/provider-signals.js.map +1 -1
  306. package/daemon/dist/domain/ps-projection.d.ts +7 -5
  307. package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
  308. package/daemon/dist/domain/ps-projection.js +19 -32
  309. package/daemon/dist/domain/ps-projection.js.map +1 -1
  310. package/daemon/dist/domain/queue-pickup.d.ts.map +1 -1
  311. package/daemon/dist/domain/queue-pickup.js +5 -0
  312. package/daemon/dist/domain/queue-pickup.js.map +1 -1
  313. package/daemon/dist/domain/queue-repository.d.ts +55 -18
  314. package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  315. package/daemon/dist/domain/queue-repository.js +387 -83
  316. package/daemon/dist/domain/queue-repository.js.map +1 -1
  317. package/daemon/dist/domain/queue-retention.d.ts.map +1 -1
  318. package/daemon/dist/domain/queue-retention.js +8 -2
  319. package/daemon/dist/domain/queue-retention.js.map +1 -1
  320. package/daemon/dist/domain/queue-stuck-sweep.d.ts +24 -1
  321. package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
  322. package/daemon/dist/domain/queue-stuck-sweep.js +161 -24
  323. package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
  324. package/daemon/dist/domain/queue-transition-log.d.ts +10 -0
  325. package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
  326. package/daemon/dist/domain/queue-transition-log.js +49 -11
  327. package/daemon/dist/domain/queue-transition-log.js.map +1 -1
  328. package/daemon/dist/domain/queue-wake-ladder.d.ts +20 -2
  329. package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
  330. package/daemon/dist/domain/queue-wake-ladder.js +187 -15
  331. package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
  332. package/daemon/dist/domain/queue-wake-repository.d.ts +16 -0
  333. package/daemon/dist/domain/queue-wake-repository.d.ts.map +1 -1
  334. package/daemon/dist/domain/queue-wake-repository.js +52 -3
  335. package/daemon/dist/domain/queue-wake-repository.js.map +1 -1
  336. package/daemon/dist/domain/restore-check-service.js +1 -1
  337. package/daemon/dist/domain/restore-check-service.js.map +1 -1
  338. package/daemon/dist/domain/restore-orchestrator.d.ts +2 -1
  339. package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
  340. package/daemon/dist/domain/restore-orchestrator.js +88 -15
  341. package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
  342. package/daemon/dist/domain/restore-plan-preview.d.ts +6 -2
  343. package/daemon/dist/domain/restore-plan-preview.d.ts.map +1 -1
  344. package/daemon/dist/domain/restore-plan-preview.js +37 -19
  345. package/daemon/dist/domain/restore-plan-preview.js.map +1 -1
  346. package/daemon/dist/domain/rig-expansion-service.d.ts.map +1 -1
  347. package/daemon/dist/domain/rig-expansion-service.js +10 -9
  348. package/daemon/dist/domain/rig-expansion-service.js.map +1 -1
  349. package/daemon/dist/domain/rig-lifecycle-service.d.ts +24 -4
  350. package/daemon/dist/domain/rig-lifecycle-service.d.ts.map +1 -1
  351. package/daemon/dist/domain/rig-lifecycle-service.js +116 -6
  352. package/daemon/dist/domain/rig-lifecycle-service.js.map +1 -1
  353. package/daemon/dist/domain/rig-repository.d.ts +6 -1
  354. package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
  355. package/daemon/dist/domain/rig-repository.js +28 -3
  356. package/daemon/dist/domain/rig-repository.js.map +1 -1
  357. package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
  358. package/daemon/dist/domain/rigspec-codec.js +74 -4
  359. package/daemon/dist/domain/rigspec-codec.js.map +1 -1
  360. package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
  361. package/daemon/dist/domain/rigspec-exporter.js +2 -0
  362. package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
  363. package/daemon/dist/domain/rigspec-instantiator.d.ts +4 -0
  364. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  365. package/daemon/dist/domain/rigspec-instantiator.js +16 -0
  366. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  367. package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  368. package/daemon/dist/domain/rigspec-schema.js +32 -4
  369. package/daemon/dist/domain/rigspec-schema.js.map +1 -1
  370. package/daemon/dist/domain/scope/node-file.d.ts +8 -0
  371. package/daemon/dist/domain/scope/node-file.d.ts.map +1 -1
  372. package/daemon/dist/domain/scope/node-file.js +18 -0
  373. package/daemon/dist/domain/scope/node-file.js.map +1 -1
  374. package/daemon/dist/domain/scope/scope-audit.d.ts +5 -2
  375. package/daemon/dist/domain/scope/scope-audit.d.ts.map +1 -1
  376. package/daemon/dist/domain/scope/scope-audit.js +3 -3
  377. package/daemon/dist/domain/scope/scope-audit.js.map +1 -1
  378. package/daemon/dist/domain/snapshot-capture.d.ts.map +1 -1
  379. package/daemon/dist/domain/snapshot-capture.js +6 -0
  380. package/daemon/dist/domain/snapshot-capture.js.map +1 -1
  381. package/daemon/dist/domain/types.d.ts +28 -4
  382. package/daemon/dist/domain/types.d.ts.map +1 -1
  383. package/daemon/dist/domain/types.js.map +1 -1
  384. package/daemon/dist/domain/view-projector.d.ts +5 -1
  385. package/daemon/dist/domain/view-projector.d.ts.map +1 -1
  386. package/daemon/dist/domain/view-projector.js +24 -0
  387. package/daemon/dist/domain/view-projector.js.map +1 -1
  388. package/daemon/dist/domain/watchdog-jobs-repository.d.ts +25 -6
  389. package/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -1
  390. package/daemon/dist/domain/watchdog-jobs-repository.js +115 -32
  391. package/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
  392. package/daemon/dist/domain/watchdog-policy-engine.d.ts +40 -1
  393. package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
  394. package/daemon/dist/domain/watchdog-policy-engine.js +112 -6
  395. package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
  396. package/daemon/dist/domain/watchdog-scheduler.d.ts.map +1 -1
  397. package/daemon/dist/domain/watchdog-scheduler.js +3 -2
  398. package/daemon/dist/domain/watchdog-scheduler.js.map +1 -1
  399. package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts.map +1 -1
  400. package/daemon/dist/domain/workspace/default-workspace-scaffold.js +37 -2
  401. package/daemon/dist/domain/workspace/default-workspace-scaffold.js.map +1 -1
  402. package/daemon/dist/domain/workspace/workspace-doctor.d.ts.map +1 -1
  403. package/daemon/dist/domain/workspace/workspace-doctor.js +2 -4
  404. package/daemon/dist/domain/workspace/workspace-doctor.js.map +1 -1
  405. package/daemon/dist/index.d.ts +9 -0
  406. package/daemon/dist/index.d.ts.map +1 -1
  407. package/daemon/dist/index.js +24 -1
  408. package/daemon/dist/index.js.map +1 -1
  409. package/daemon/dist/routes/agent-images.d.ts.map +1 -1
  410. package/daemon/dist/routes/agent-images.js +9 -0
  411. package/daemon/dist/routes/agent-images.js.map +1 -1
  412. package/daemon/dist/routes/bundles.d.ts.map +1 -1
  413. package/daemon/dist/routes/bundles.js +61 -1
  414. package/daemon/dist/routes/bundles.js.map +1 -1
  415. package/daemon/dist/routes/context-packs.d.ts.map +1 -1
  416. package/daemon/dist/routes/context-packs.js +146 -6
  417. package/daemon/dist/routes/context-packs.js.map +1 -1
  418. package/daemon/dist/routes/gateway.js +1 -1
  419. package/daemon/dist/routes/gateway.js.map +1 -1
  420. package/daemon/dist/routes/queue.d.ts.map +1 -1
  421. package/daemon/dist/routes/queue.js +22 -11
  422. package/daemon/dist/routes/queue.js.map +1 -1
  423. package/daemon/dist/routes/rigs.js +45 -5
  424. package/daemon/dist/routes/rigs.js.map +1 -1
  425. package/daemon/dist/routes/scope-audit.js +6 -6
  426. package/daemon/dist/routes/scope-audit.js.map +1 -1
  427. package/daemon/dist/routes/sessions.js +7 -3
  428. package/daemon/dist/routes/sessions.js.map +1 -1
  429. package/daemon/dist/routes/views.d.ts.map +1 -1
  430. package/daemon/dist/routes/views.js +4 -1
  431. package/daemon/dist/routes/views.js.map +1 -1
  432. package/daemon/dist/routes/watchdog.d.ts.map +1 -1
  433. package/daemon/dist/routes/watchdog.js +40 -3
  434. package/daemon/dist/routes/watchdog.js.map +1 -1
  435. package/daemon/dist/server.d.ts.map +1 -1
  436. package/daemon/dist/server.js +5 -0
  437. package/daemon/dist/server.js.map +1 -1
  438. package/daemon/dist/startup.d.ts.map +1 -1
  439. package/daemon/dist/startup.js +197 -6
  440. package/daemon/dist/startup.js.map +1 -1
  441. package/daemon/docs/reference/agent-spec.md +5 -5
  442. package/daemon/docs/reference/agent-state-taxonomy.md +8 -13
  443. package/daemon/docs/reference/chain-file-convention.md +2 -2
  444. package/daemon/docs/reference/knowledge-maturity.md +123 -0
  445. package/daemon/docs/reference/lore-routing.md +173 -0
  446. package/daemon/docs/reference/mission-install.md +215 -0
  447. package/daemon/docs/reference/planning-dial.md +55 -0
  448. package/daemon/docs/reference/product-journey-sdlc.md +305 -0
  449. package/daemon/docs/reference/product-management-pass.md +139 -0
  450. package/daemon/docs/reference/release-boundary.md +88 -0
  451. package/daemon/docs/reference/sdlc-conventions.md +49 -69
  452. package/daemon/docs/reference/wave-sdlc.md +113 -0
  453. package/daemon/policies/builtin/standard.policy.md +3 -3
  454. package/daemon/policies/builtin/yolo.policy.md +7 -2
  455. package/daemon/specs/agents/apps/vault-specialist/agent.yaml +1 -1
  456. package/daemon/specs/agents/apps/vault-specialist/guidance/role.md +0 -1
  457. package/daemon/specs/agents/conveyor/builder/agent.yaml +1 -1
  458. package/daemon/specs/agents/conveyor/builder/guidance/role.md +0 -1
  459. package/daemon/specs/agents/conveyor/lead/agent.yaml +1 -1
  460. package/daemon/specs/agents/conveyor/lead/guidance/role.md +0 -3
  461. package/daemon/specs/agents/conveyor/planner/agent.yaml +1 -1
  462. package/daemon/specs/agents/conveyor/planner/guidance/role.md +0 -1
  463. package/daemon/specs/agents/design/product-designer/agent.yaml +3 -4
  464. package/daemon/specs/agents/design/product-designer/guidance/role.md +0 -3
  465. package/daemon/specs/agents/development/implementer/agent.yaml +3 -4
  466. package/daemon/specs/agents/development/implementer/guidance/role.md +0 -3
  467. package/daemon/specs/agents/development/qa/agent.yaml +4 -4
  468. package/daemon/specs/agents/development/qa/guidance/role.md +1 -4
  469. package/daemon/specs/agents/factory-rsi/dogfood/agent.yaml +1 -1
  470. package/daemon/specs/agents/factory-rsi/release-manager/agent.yaml +1 -1
  471. package/daemon/specs/agents/orchestration/orchestrator/agent.yaml +3 -4
  472. package/daemon/specs/agents/orchestration/orchestrator/guidance/role.md +0 -4
  473. package/daemon/specs/agents/review/independent-reviewer/agent.yaml +3 -4
  474. package/daemon/specs/agents/review/independent-reviewer/guidance/role.md +0 -3
  475. package/daemon/specs/agents/shared/agent.yaml +2 -10
  476. package/daemon/specs/agents/shared/skills/core/cross-host-rig-commands/SKILL.md +6 -13
  477. package/daemon/specs/agents/shared/skills/core/messaging-the-human/SKILL.md +98 -0
  478. package/daemon/specs/agents/shared/skills/core/openrig-skills/SKILL.md +115 -0
  479. package/daemon/specs/agents/shared/skills/core/openrig-upgrade/SKILL.md +19 -75
  480. package/daemon/specs/agents/shared/skills/core/watchdog/SKILL.md +4 -10
  481. package/daemon/specs/agents/shared/skills/pods/orchestration-team/SKILL.md +1 -1
  482. package/daemon/specs/agents/shared/skills/pods/review-team/SKILL.md +1 -1
  483. package/daemon/specs/agents/shared/skills/process/systematic-debugging/find-polluter.sh +0 -0
  484. package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/agent.yaml +1 -1
  485. package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/guidance/role.md +4 -5
  486. package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/startup/context.md +3 -3
  487. package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +3 -3
  488. package/daemon/specs/rigs/launch/kernel/agents/queue/worker/guidance/role.md +1 -1
  489. package/daemon/specs/rigs/launch/kernel/agents/queue/worker/startup/context.md +1 -1
  490. package/daemon/substance-surfaces.json +8 -0
  491. package/dist/build-info.js +3 -3
  492. package/dist/commands/broadcast.d.ts.map +1 -1
  493. package/dist/commands/broadcast.js +6 -1
  494. package/dist/commands/broadcast.js.map +1 -1
  495. package/dist/commands/capture.js +1 -1
  496. package/dist/commands/config-init-workspace.d.ts.map +1 -1
  497. package/dist/commands/config-init-workspace.js +38 -3
  498. package/dist/commands/config-init-workspace.js.map +1 -1
  499. package/dist/commands/context.d.ts.map +1 -1
  500. package/dist/commands/context.js +49 -1
  501. package/dist/commands/context.js.map +1 -1
  502. package/dist/commands/create.d.ts +4 -0
  503. package/dist/commands/create.d.ts.map +1 -0
  504. package/dist/commands/create.js +84 -0
  505. package/dist/commands/create.js.map +1 -0
  506. package/dist/commands/expand.d.ts.map +1 -1
  507. package/dist/commands/expand.js +9 -13
  508. package/dist/commands/expand.js.map +1 -1
  509. package/dist/commands/grow.d.ts +4 -0
  510. package/dist/commands/grow.d.ts.map +1 -0
  511. package/dist/commands/grow.js +182 -0
  512. package/dist/commands/grow.js.map +1 -0
  513. package/dist/commands/ps.d.ts +4 -0
  514. package/dist/commands/ps.d.ts.map +1 -1
  515. package/dist/commands/ps.js +15 -7
  516. package/dist/commands/ps.js.map +1 -1
  517. package/dist/commands/remove.d.ts.map +1 -1
  518. package/dist/commands/remove.js +9 -1
  519. package/dist/commands/remove.js.map +1 -1
  520. package/dist/commands/rig.d.ts.map +1 -1
  521. package/dist/commands/rig.js +48 -1
  522. package/dist/commands/rig.js.map +1 -1
  523. package/dist/commands/scope.d.ts.map +1 -1
  524. package/dist/commands/scope.js +61 -13
  525. package/dist/commands/scope.js.map +1 -1
  526. package/dist/commands/send.d.ts +2 -0
  527. package/dist/commands/send.d.ts.map +1 -1
  528. package/dist/commands/send.js +24 -2
  529. package/dist/commands/send.js.map +1 -1
  530. package/dist/commands/shrink.d.ts.map +1 -1
  531. package/dist/commands/shrink.js +6 -1
  532. package/dist/commands/shrink.js.map +1 -1
  533. package/dist/commands/slack.d.ts.map +1 -1
  534. package/dist/commands/slack.js +4 -2
  535. package/dist/commands/slack.js.map +1 -1
  536. package/dist/commands/topology-default-agent.d.ts +4 -0
  537. package/dist/commands/topology-default-agent.d.ts.map +1 -0
  538. package/dist/commands/topology-default-agent.js +13 -0
  539. package/dist/commands/topology-default-agent.js.map +1 -0
  540. package/dist/commands/view.d.ts.map +1 -1
  541. package/dist/commands/view.js +3 -0
  542. package/dist/commands/view.js.map +1 -1
  543. package/dist/commands/walk.d.ts.map +1 -1
  544. package/dist/commands/walk.js +3 -0
  545. package/dist/commands/walk.js.map +1 -1
  546. package/dist/commands/watchdog.d.ts.map +1 -1
  547. package/dist/commands/watchdog.js +64 -9
  548. package/dist/commands/watchdog.js.map +1 -1
  549. package/dist/cross-host-target.js +1 -1
  550. package/dist/cross-host-target.js.map +1 -1
  551. package/dist/host-registry.d.ts +2 -2
  552. package/dist/host-registry.js +2 -2
  553. package/dist/index.d.ts +2 -0
  554. package/dist/index.d.ts.map +1 -1
  555. package/dist/index.js +4 -0
  556. package/dist/index.js.map +1 -1
  557. package/dist/lib/scope/scope-audit.d.ts +4 -1
  558. package/dist/lib/scope/scope-audit.d.ts.map +1 -1
  559. package/dist/lib/scope/scope-audit.js +3 -3
  560. package/dist/lib/scope/scope-audit.js.map +1 -1
  561. package/dist/lib/scope/scope-fs.d.ts +8 -0
  562. package/dist/lib/scope/scope-fs.d.ts.map +1 -1
  563. package/dist/lib/scope/scope-fs.js +18 -0
  564. package/dist/lib/scope/scope-fs.js.map +1 -1
  565. package/dist/lib/scope-templates/backlog-deprecation.md +1 -1
  566. package/dist/lib/scope-templates/backlog-tech-debt.md +1 -1
  567. package/dist/lib/scope-templates/bug-fix.md +1 -1
  568. package/dist/lib/scope-templates/capability-delta.md +1 -0
  569. package/dist/lib/scope-templates/placeholder.md +1 -1
  570. package/dist/lib/scope-templates/release-feature.md +1 -1
  571. package/dist/lib/scope-templates/research.md +1 -1
  572. package/dist/lib/work-install.d.ts +39 -0
  573. package/dist/lib/work-install.d.ts.map +1 -0
  574. package/dist/lib/work-install.js +278 -0
  575. package/dist/lib/work-install.js.map +1 -0
  576. package/node_modules/@openrig/daemon/dist/build-info.js +3 -3
  577. package/node_modules/@openrig/daemon/dist/builtins/workflow-specs/basic-loop.yaml +3 -3
  578. package/node_modules/@openrig/daemon/dist/builtins/workflow-specs/conveyor.yaml +1 -1
  579. package/node_modules/@openrig/daemon/dist/builtins/workflow-specs/factory-rsi.yaml +1 -1
  580. package/node_modules/@openrig/daemon/dist/context-pack-taxonomy-surface.d.ts +2 -0
  581. package/node_modules/@openrig/daemon/dist/context-pack-taxonomy-surface.d.ts.map +1 -0
  582. package/node_modules/@openrig/daemon/dist/context-pack-taxonomy-surface.js +6 -0
  583. package/node_modules/@openrig/daemon/dist/context-pack-taxonomy-surface.js.map +1 -0
  584. package/node_modules/@openrig/daemon/dist/db/all-migrations.d.ts +1 -1
  585. package/node_modules/@openrig/daemon/dist/db/all-migrations.d.ts.map +1 -1
  586. package/node_modules/@openrig/daemon/dist/db/all-migrations.js +10 -2
  587. package/node_modules/@openrig/daemon/dist/db/all-migrations.js.map +1 -1
  588. package/node_modules/@openrig/daemon/dist/db/migrations/074_context_usage_watchdog.d.ts +4 -0
  589. package/node_modules/@openrig/daemon/dist/db/migrations/074_context_usage_watchdog.d.ts.map +1 -0
  590. package/node_modules/@openrig/daemon/dist/db/migrations/074_context_usage_watchdog.js +11 -0
  591. package/node_modules/@openrig/daemon/dist/db/migrations/074_context_usage_watchdog.js.map +1 -0
  592. package/node_modules/@openrig/daemon/dist/db/migrations/075_context_usage_watchdog_generation.d.ts +4 -0
  593. package/node_modules/@openrig/daemon/dist/db/migrations/075_context_usage_watchdog_generation.d.ts.map +1 -0
  594. package/node_modules/@openrig/daemon/dist/db/migrations/075_context_usage_watchdog_generation.js +8 -0
  595. package/node_modules/@openrig/daemon/dist/db/migrations/075_context_usage_watchdog_generation.js.map +1 -0
  596. package/node_modules/@openrig/daemon/dist/db/migrations/076_owner_notification_levels.d.ts +8 -0
  597. package/node_modules/@openrig/daemon/dist/db/migrations/076_owner_notification_levels.d.ts.map +1 -0
  598. package/node_modules/@openrig/daemon/dist/db/migrations/076_owner_notification_levels.js +15 -0
  599. package/node_modules/@openrig/daemon/dist/db/migrations/076_owner_notification_levels.js.map +1 -0
  600. package/node_modules/@openrig/daemon/dist/db/migrations/077_node_session_source.d.ts +4 -0
  601. package/node_modules/@openrig/daemon/dist/db/migrations/077_node_session_source.d.ts.map +1 -0
  602. package/node_modules/@openrig/daemon/dist/db/migrations/077_node_session_source.js +6 -0
  603. package/node_modules/@openrig/daemon/dist/db/migrations/077_node_session_source.js.map +1 -0
  604. package/node_modules/@openrig/daemon/dist/domain/active-occupant.d.ts +44 -0
  605. package/node_modules/@openrig/daemon/dist/domain/active-occupant.d.ts.map +1 -0
  606. package/node_modules/@openrig/daemon/dist/domain/active-occupant.js +72 -0
  607. package/node_modules/@openrig/daemon/dist/domain/active-occupant.js.map +1 -0
  608. package/node_modules/@openrig/daemon/dist/domain/agent-manifest.d.ts +6 -0
  609. package/node_modules/@openrig/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
  610. package/node_modules/@openrig/daemon/dist/domain/agent-manifest.js +77 -15
  611. package/node_modules/@openrig/daemon/dist/domain/agent-manifest.js.map +1 -1
  612. package/node_modules/@openrig/daemon/dist/domain/agent-resolver.d.ts +11 -0
  613. package/node_modules/@openrig/daemon/dist/domain/agent-resolver.d.ts.map +1 -1
  614. package/node_modules/@openrig/daemon/dist/domain/agent-resolver.js +55 -0
  615. package/node_modules/@openrig/daemon/dist/domain/agent-resolver.js.map +1 -1
  616. package/node_modules/@openrig/daemon/dist/domain/bundle-context-packs-router.d.ts +9 -2
  617. package/node_modules/@openrig/daemon/dist/domain/bundle-context-packs-router.d.ts.map +1 -1
  618. package/node_modules/@openrig/daemon/dist/domain/bundle-context-packs-router.js +18 -0
  619. package/node_modules/@openrig/daemon/dist/domain/bundle-context-packs-router.js.map +1 -1
  620. package/node_modules/@openrig/daemon/dist/domain/claude-compaction-enforcer.d.ts +7 -0
  621. package/node_modules/@openrig/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
  622. package/node_modules/@openrig/daemon/dist/domain/claude-compaction-enforcer.js +10 -0
  623. package/node_modules/@openrig/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
  624. package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-library-service.d.ts.map +1 -1
  625. package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-library-service.js +7 -0
  626. package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-library-service.js.map +1 -1
  627. package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.d.ts +11 -0
  628. package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.d.ts.map +1 -1
  629. package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.js +11 -0
  630. package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.js.map +1 -1
  631. package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.d.ts.map +1 -1
  632. package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.js +18 -7
  633. package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.js.map +1 -1
  634. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.d.ts +1 -1
  635. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.d.ts.map +1 -1
  636. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.js +2 -2
  637. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.js.map +1 -1
  638. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.d.ts +3 -1
  639. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.d.ts.map +1 -1
  640. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.js +3 -2
  641. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.js.map +1 -1
  642. package/node_modules/@openrig/daemon/dist/domain/continuity-policy-materializer.d.ts +88 -0
  643. package/node_modules/@openrig/daemon/dist/domain/continuity-policy-materializer.d.ts.map +1 -0
  644. package/node_modules/@openrig/daemon/dist/domain/continuity-policy-materializer.js +290 -0
  645. package/node_modules/@openrig/daemon/dist/domain/continuity-policy-materializer.js.map +1 -0
  646. package/node_modules/@openrig/daemon/dist/domain/continuity-stack-packets.d.ts +65 -0
  647. package/node_modules/@openrig/daemon/dist/domain/continuity-stack-packets.d.ts.map +1 -0
  648. package/node_modules/@openrig/daemon/dist/domain/continuity-stack-packets.js +99 -0
  649. package/node_modules/@openrig/daemon/dist/domain/continuity-stack-packets.js.map +1 -0
  650. package/node_modules/@openrig/daemon/dist/domain/execution-view.d.ts +39 -0
  651. package/node_modules/@openrig/daemon/dist/domain/execution-view.d.ts.map +1 -0
  652. package/node_modules/@openrig/daemon/dist/domain/execution-view.js +707 -0
  653. package/node_modules/@openrig/daemon/dist/domain/execution-view.js.map +1 -0
  654. package/node_modules/@openrig/daemon/dist/domain/gateway/delivery-rules-engine.d.ts +60 -0
  655. package/node_modules/@openrig/daemon/dist/domain/gateway/delivery-rules-engine.d.ts.map +1 -0
  656. package/node_modules/@openrig/daemon/dist/domain/gateway/delivery-rules-engine.js +144 -0
  657. package/node_modules/@openrig/daemon/dist/domain/gateway/delivery-rules-engine.js.map +1 -0
  658. package/node_modules/@openrig/daemon/dist/domain/gateway/destination-resolver.d.ts +20 -0
  659. package/node_modules/@openrig/daemon/dist/domain/gateway/destination-resolver.d.ts.map +1 -0
  660. package/node_modules/@openrig/daemon/dist/domain/gateway/destination-resolver.js +52 -0
  661. package/node_modules/@openrig/daemon/dist/domain/gateway/destination-resolver.js.map +1 -0
  662. package/node_modules/@openrig/daemon/dist/domain/gateway/dispatcher.d.ts +3 -1
  663. package/node_modules/@openrig/daemon/dist/domain/gateway/dispatcher.d.ts.map +1 -1
  664. package/node_modules/@openrig/daemon/dist/domain/gateway/dispatcher.js +9 -2
  665. package/node_modules/@openrig/daemon/dist/domain/gateway/dispatcher.js.map +1 -1
  666. package/node_modules/@openrig/daemon/dist/domain/gateway/gateway-subsystem.d.ts +6 -2
  667. package/node_modules/@openrig/daemon/dist/domain/gateway/gateway-subsystem.d.ts.map +1 -1
  668. package/node_modules/@openrig/daemon/dist/domain/gateway/gateway-subsystem.js +5 -3
  669. package/node_modules/@openrig/daemon/dist/domain/gateway/gateway-subsystem.js.map +1 -1
  670. package/node_modules/@openrig/daemon/dist/domain/gateway/human-registry.d.ts +9 -1
  671. package/node_modules/@openrig/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
  672. package/node_modules/@openrig/daemon/dist/domain/gateway/human-registry.js +32 -1
  673. package/node_modules/@openrig/daemon/dist/domain/gateway/human-registry.js.map +1 -1
  674. package/node_modules/@openrig/daemon/dist/domain/gateway/operator-delivery-engine.d.ts +32 -0
  675. package/node_modules/@openrig/daemon/dist/domain/gateway/operator-delivery-engine.d.ts.map +1 -0
  676. package/node_modules/@openrig/daemon/dist/domain/gateway/operator-delivery-engine.js +86 -0
  677. package/node_modules/@openrig/daemon/dist/domain/gateway/operator-delivery-engine.js.map +1 -0
  678. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/config.d.ts +3 -2
  679. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/config.d.ts.map +1 -1
  680. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/config.js +20 -4
  681. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/config.js.map +1 -1
  682. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/inbound.d.ts +34 -6
  683. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
  684. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/inbound.js +60 -9
  685. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
  686. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/outbound-driver.d.ts +3 -0
  687. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/outbound-driver.d.ts.map +1 -1
  688. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/outbound-driver.js +12 -5
  689. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/outbound-driver.js.map +1 -1
  690. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/queue-access.d.ts +10 -5
  691. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/queue-access.d.ts.map +1 -1
  692. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/queue-access.js +46 -19
  693. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/queue-access.js.map +1 -1
  694. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/slack-api.d.ts +29 -6
  695. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/slack-api.d.ts.map +1 -1
  696. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/slack-api.js +41 -3
  697. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/slack-api.js.map +1 -1
  698. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +9 -3
  699. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
  700. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/slack-delivery.js +132 -12
  701. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
  702. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts +10 -0
  703. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
  704. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/slack-subsystem.js +286 -11
  705. package/node_modules/@openrig/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
  706. package/node_modules/@openrig/daemon/dist/domain/graph-projection.d.ts +6 -0
  707. package/node_modules/@openrig/daemon/dist/domain/graph-projection.d.ts.map +1 -1
  708. package/node_modules/@openrig/daemon/dist/domain/graph-projection.js +6 -0
  709. package/node_modules/@openrig/daemon/dist/domain/graph-projection.js.map +1 -1
  710. package/node_modules/@openrig/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
  711. package/node_modules/@openrig/daemon/dist/domain/mission-control/mission-control-write-contract.js +1 -0
  712. package/node_modules/@openrig/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
  713. package/node_modules/@openrig/daemon/dist/domain/node-inventory.d.ts +41 -3
  714. package/node_modules/@openrig/daemon/dist/domain/node-inventory.d.ts.map +1 -1
  715. package/node_modules/@openrig/daemon/dist/domain/node-inventory.js +45 -48
  716. package/node_modules/@openrig/daemon/dist/domain/node-inventory.js.map +1 -1
  717. package/node_modules/@openrig/daemon/dist/domain/parked-query.d.ts +1 -0
  718. package/node_modules/@openrig/daemon/dist/domain/parked-query.d.ts.map +1 -1
  719. package/node_modules/@openrig/daemon/dist/domain/parked-query.js +1 -0
  720. package/node_modules/@openrig/daemon/dist/domain/parked-query.js.map +1 -1
  721. package/node_modules/@openrig/daemon/dist/domain/pod-bundle-assembler.d.ts.map +1 -1
  722. package/node_modules/@openrig/daemon/dist/domain/pod-bundle-assembler.js +12 -5
  723. package/node_modules/@openrig/daemon/dist/domain/pod-bundle-assembler.js.map +1 -1
  724. package/node_modules/@openrig/daemon/dist/domain/policies/context-usage-threshold.d.ts +7 -0
  725. package/node_modules/@openrig/daemon/dist/domain/policies/context-usage-threshold.d.ts.map +1 -0
  726. package/node_modules/@openrig/daemon/dist/domain/policies/context-usage-threshold.js +99 -0
  727. package/node_modules/@openrig/daemon/dist/domain/policies/context-usage-threshold.js.map +1 -0
  728. package/node_modules/@openrig/daemon/dist/domain/policies/delivery-deferral.d.ts +54 -0
  729. package/node_modules/@openrig/daemon/dist/domain/policies/delivery-deferral.d.ts.map +1 -0
  730. package/node_modules/@openrig/daemon/dist/domain/policies/delivery-deferral.js +153 -0
  731. package/node_modules/@openrig/daemon/dist/domain/policies/delivery-deferral.js.map +1 -0
  732. package/node_modules/@openrig/daemon/dist/domain/policies/delivery-digest-flush.d.ts +45 -0
  733. package/node_modules/@openrig/daemon/dist/domain/policies/delivery-digest-flush.d.ts.map +1 -0
  734. package/node_modules/@openrig/daemon/dist/domain/policies/delivery-digest-flush.js +94 -0
  735. package/node_modules/@openrig/daemon/dist/domain/policies/delivery-digest-flush.js.map +1 -0
  736. package/node_modules/@openrig/daemon/dist/domain/policies/parked-owner-consumer.d.ts +65 -0
  737. package/node_modules/@openrig/daemon/dist/domain/policies/parked-owner-consumer.d.ts.map +1 -0
  738. package/node_modules/@openrig/daemon/dist/domain/policies/parked-owner-consumer.js +244 -0
  739. package/node_modules/@openrig/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -0
  740. package/node_modules/@openrig/daemon/dist/domain/policies/types.d.ts +8 -0
  741. package/node_modules/@openrig/daemon/dist/domain/policies/types.d.ts.map +1 -1
  742. package/node_modules/@openrig/daemon/dist/domain/profile-resolver.d.ts +4 -0
  743. package/node_modules/@openrig/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
  744. package/node_modules/@openrig/daemon/dist/domain/profile-resolver.js +58 -0
  745. package/node_modules/@openrig/daemon/dist/domain/profile-resolver.js.map +1 -1
  746. package/node_modules/@openrig/daemon/dist/domain/provider/provider-signals.d.ts +20 -1
  747. package/node_modules/@openrig/daemon/dist/domain/provider/provider-signals.d.ts.map +1 -1
  748. package/node_modules/@openrig/daemon/dist/domain/provider/provider-signals.js +64 -0
  749. package/node_modules/@openrig/daemon/dist/domain/provider/provider-signals.js.map +1 -1
  750. package/node_modules/@openrig/daemon/dist/domain/ps-projection.d.ts +7 -5
  751. package/node_modules/@openrig/daemon/dist/domain/ps-projection.d.ts.map +1 -1
  752. package/node_modules/@openrig/daemon/dist/domain/ps-projection.js +19 -32
  753. package/node_modules/@openrig/daemon/dist/domain/ps-projection.js.map +1 -1
  754. package/node_modules/@openrig/daemon/dist/domain/queue-pickup.d.ts.map +1 -1
  755. package/node_modules/@openrig/daemon/dist/domain/queue-pickup.js +5 -0
  756. package/node_modules/@openrig/daemon/dist/domain/queue-pickup.js.map +1 -1
  757. package/node_modules/@openrig/daemon/dist/domain/queue-repository.d.ts +55 -18
  758. package/node_modules/@openrig/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  759. package/node_modules/@openrig/daemon/dist/domain/queue-repository.js +387 -83
  760. package/node_modules/@openrig/daemon/dist/domain/queue-repository.js.map +1 -1
  761. package/node_modules/@openrig/daemon/dist/domain/queue-retention.d.ts.map +1 -1
  762. package/node_modules/@openrig/daemon/dist/domain/queue-retention.js +8 -2
  763. package/node_modules/@openrig/daemon/dist/domain/queue-retention.js.map +1 -1
  764. package/node_modules/@openrig/daemon/dist/domain/queue-stuck-sweep.d.ts +24 -1
  765. package/node_modules/@openrig/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
  766. package/node_modules/@openrig/daemon/dist/domain/queue-stuck-sweep.js +161 -24
  767. package/node_modules/@openrig/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
  768. package/node_modules/@openrig/daemon/dist/domain/queue-transition-log.d.ts +10 -0
  769. package/node_modules/@openrig/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
  770. package/node_modules/@openrig/daemon/dist/domain/queue-transition-log.js +49 -11
  771. package/node_modules/@openrig/daemon/dist/domain/queue-transition-log.js.map +1 -1
  772. package/node_modules/@openrig/daemon/dist/domain/queue-wake-ladder.d.ts +20 -2
  773. package/node_modules/@openrig/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
  774. package/node_modules/@openrig/daemon/dist/domain/queue-wake-ladder.js +187 -15
  775. package/node_modules/@openrig/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
  776. package/node_modules/@openrig/daemon/dist/domain/queue-wake-repository.d.ts +16 -0
  777. package/node_modules/@openrig/daemon/dist/domain/queue-wake-repository.d.ts.map +1 -1
  778. package/node_modules/@openrig/daemon/dist/domain/queue-wake-repository.js +52 -3
  779. package/node_modules/@openrig/daemon/dist/domain/queue-wake-repository.js.map +1 -1
  780. package/node_modules/@openrig/daemon/dist/domain/restore-check-service.js +1 -1
  781. package/node_modules/@openrig/daemon/dist/domain/restore-check-service.js.map +1 -1
  782. package/node_modules/@openrig/daemon/dist/domain/restore-orchestrator.d.ts +2 -1
  783. package/node_modules/@openrig/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
  784. package/node_modules/@openrig/daemon/dist/domain/restore-orchestrator.js +88 -15
  785. package/node_modules/@openrig/daemon/dist/domain/restore-orchestrator.js.map +1 -1
  786. package/node_modules/@openrig/daemon/dist/domain/restore-plan-preview.d.ts +6 -2
  787. package/node_modules/@openrig/daemon/dist/domain/restore-plan-preview.d.ts.map +1 -1
  788. package/node_modules/@openrig/daemon/dist/domain/restore-plan-preview.js +37 -19
  789. package/node_modules/@openrig/daemon/dist/domain/restore-plan-preview.js.map +1 -1
  790. package/node_modules/@openrig/daemon/dist/domain/rig-expansion-service.d.ts.map +1 -1
  791. package/node_modules/@openrig/daemon/dist/domain/rig-expansion-service.js +10 -9
  792. package/node_modules/@openrig/daemon/dist/domain/rig-expansion-service.js.map +1 -1
  793. package/node_modules/@openrig/daemon/dist/domain/rig-lifecycle-service.d.ts +24 -4
  794. package/node_modules/@openrig/daemon/dist/domain/rig-lifecycle-service.d.ts.map +1 -1
  795. package/node_modules/@openrig/daemon/dist/domain/rig-lifecycle-service.js +116 -6
  796. package/node_modules/@openrig/daemon/dist/domain/rig-lifecycle-service.js.map +1 -1
  797. package/node_modules/@openrig/daemon/dist/domain/rig-repository.d.ts +6 -1
  798. package/node_modules/@openrig/daemon/dist/domain/rig-repository.d.ts.map +1 -1
  799. package/node_modules/@openrig/daemon/dist/domain/rig-repository.js +28 -3
  800. package/node_modules/@openrig/daemon/dist/domain/rig-repository.js.map +1 -1
  801. package/node_modules/@openrig/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
  802. package/node_modules/@openrig/daemon/dist/domain/rigspec-codec.js +74 -4
  803. package/node_modules/@openrig/daemon/dist/domain/rigspec-codec.js.map +1 -1
  804. package/node_modules/@openrig/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
  805. package/node_modules/@openrig/daemon/dist/domain/rigspec-exporter.js +2 -0
  806. package/node_modules/@openrig/daemon/dist/domain/rigspec-exporter.js.map +1 -1
  807. package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.d.ts +4 -0
  808. package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  809. package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.js +16 -0
  810. package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  811. package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  812. package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.js +32 -4
  813. package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.js.map +1 -1
  814. package/node_modules/@openrig/daemon/dist/domain/scope/node-file.d.ts +8 -0
  815. package/node_modules/@openrig/daemon/dist/domain/scope/node-file.d.ts.map +1 -1
  816. package/node_modules/@openrig/daemon/dist/domain/scope/node-file.js +18 -0
  817. package/node_modules/@openrig/daemon/dist/domain/scope/node-file.js.map +1 -1
  818. package/node_modules/@openrig/daemon/dist/domain/scope/scope-audit.d.ts +5 -2
  819. package/node_modules/@openrig/daemon/dist/domain/scope/scope-audit.d.ts.map +1 -1
  820. package/node_modules/@openrig/daemon/dist/domain/scope/scope-audit.js +3 -3
  821. package/node_modules/@openrig/daemon/dist/domain/scope/scope-audit.js.map +1 -1
  822. package/node_modules/@openrig/daemon/dist/domain/snapshot-capture.d.ts.map +1 -1
  823. package/node_modules/@openrig/daemon/dist/domain/snapshot-capture.js +6 -0
  824. package/node_modules/@openrig/daemon/dist/domain/snapshot-capture.js.map +1 -1
  825. package/node_modules/@openrig/daemon/dist/domain/types.d.ts +28 -4
  826. package/node_modules/@openrig/daemon/dist/domain/types.d.ts.map +1 -1
  827. package/node_modules/@openrig/daemon/dist/domain/types.js.map +1 -1
  828. package/node_modules/@openrig/daemon/dist/domain/view-projector.d.ts +5 -1
  829. package/node_modules/@openrig/daemon/dist/domain/view-projector.d.ts.map +1 -1
  830. package/node_modules/@openrig/daemon/dist/domain/view-projector.js +24 -0
  831. package/node_modules/@openrig/daemon/dist/domain/view-projector.js.map +1 -1
  832. package/node_modules/@openrig/daemon/dist/domain/watchdog-jobs-repository.d.ts +25 -6
  833. package/node_modules/@openrig/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -1
  834. package/node_modules/@openrig/daemon/dist/domain/watchdog-jobs-repository.js +115 -32
  835. package/node_modules/@openrig/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
  836. package/node_modules/@openrig/daemon/dist/domain/watchdog-policy-engine.d.ts +40 -1
  837. package/node_modules/@openrig/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
  838. package/node_modules/@openrig/daemon/dist/domain/watchdog-policy-engine.js +112 -6
  839. package/node_modules/@openrig/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
  840. package/node_modules/@openrig/daemon/dist/domain/watchdog-scheduler.d.ts.map +1 -1
  841. package/node_modules/@openrig/daemon/dist/domain/watchdog-scheduler.js +3 -2
  842. package/node_modules/@openrig/daemon/dist/domain/watchdog-scheduler.js.map +1 -1
  843. package/node_modules/@openrig/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts.map +1 -1
  844. package/node_modules/@openrig/daemon/dist/domain/workspace/default-workspace-scaffold.js +37 -2
  845. package/node_modules/@openrig/daemon/dist/domain/workspace/default-workspace-scaffold.js.map +1 -1
  846. package/node_modules/@openrig/daemon/dist/domain/workspace/workspace-doctor.d.ts.map +1 -1
  847. package/node_modules/@openrig/daemon/dist/domain/workspace/workspace-doctor.js +2 -4
  848. package/node_modules/@openrig/daemon/dist/domain/workspace/workspace-doctor.js.map +1 -1
  849. package/node_modules/@openrig/daemon/dist/index.d.ts +9 -0
  850. package/node_modules/@openrig/daemon/dist/index.d.ts.map +1 -1
  851. package/node_modules/@openrig/daemon/dist/index.js +24 -1
  852. package/node_modules/@openrig/daemon/dist/index.js.map +1 -1
  853. package/node_modules/@openrig/daemon/dist/routes/agent-images.d.ts.map +1 -1
  854. package/node_modules/@openrig/daemon/dist/routes/agent-images.js +9 -0
  855. package/node_modules/@openrig/daemon/dist/routes/agent-images.js.map +1 -1
  856. package/node_modules/@openrig/daemon/dist/routes/bundles.d.ts.map +1 -1
  857. package/node_modules/@openrig/daemon/dist/routes/bundles.js +61 -1
  858. package/node_modules/@openrig/daemon/dist/routes/bundles.js.map +1 -1
  859. package/node_modules/@openrig/daemon/dist/routes/context-packs.d.ts.map +1 -1
  860. package/node_modules/@openrig/daemon/dist/routes/context-packs.js +146 -6
  861. package/node_modules/@openrig/daemon/dist/routes/context-packs.js.map +1 -1
  862. package/node_modules/@openrig/daemon/dist/routes/gateway.js +1 -1
  863. package/node_modules/@openrig/daemon/dist/routes/gateway.js.map +1 -1
  864. package/node_modules/@openrig/daemon/dist/routes/queue.d.ts.map +1 -1
  865. package/node_modules/@openrig/daemon/dist/routes/queue.js +22 -11
  866. package/node_modules/@openrig/daemon/dist/routes/queue.js.map +1 -1
  867. package/node_modules/@openrig/daemon/dist/routes/rigs.js +45 -5
  868. package/node_modules/@openrig/daemon/dist/routes/rigs.js.map +1 -1
  869. package/node_modules/@openrig/daemon/dist/routes/scope-audit.js +6 -6
  870. package/node_modules/@openrig/daemon/dist/routes/scope-audit.js.map +1 -1
  871. package/node_modules/@openrig/daemon/dist/routes/sessions.js +7 -3
  872. package/node_modules/@openrig/daemon/dist/routes/sessions.js.map +1 -1
  873. package/node_modules/@openrig/daemon/dist/routes/views.d.ts.map +1 -1
  874. package/node_modules/@openrig/daemon/dist/routes/views.js +4 -1
  875. package/node_modules/@openrig/daemon/dist/routes/views.js.map +1 -1
  876. package/node_modules/@openrig/daemon/dist/routes/watchdog.d.ts.map +1 -1
  877. package/node_modules/@openrig/daemon/dist/routes/watchdog.js +40 -3
  878. package/node_modules/@openrig/daemon/dist/routes/watchdog.js.map +1 -1
  879. package/node_modules/@openrig/daemon/dist/server.d.ts.map +1 -1
  880. package/node_modules/@openrig/daemon/dist/server.js +5 -0
  881. package/node_modules/@openrig/daemon/dist/server.js.map +1 -1
  882. package/node_modules/@openrig/daemon/dist/startup.d.ts.map +1 -1
  883. package/node_modules/@openrig/daemon/dist/startup.js +197 -6
  884. package/node_modules/@openrig/daemon/dist/startup.js.map +1 -1
  885. package/node_modules/@openrig/daemon/package.json +5 -1
  886. package/package.json +1 -1
  887. package/tui/dist/demo-data.js +2 -2
  888. package/tui/dist/demo-data.js.map +1 -1
  889. package/daemon/assets/plugins/openrig-core/skills/openrig-operating-model/CHANGELOG.md +0 -92
  890. package/daemon/assets/plugins/openrig-core/skills/openrig-operating-model/REVISION-GUIDE.md +0 -34
  891. package/daemon/assets/plugins/openrig-core/skills/openrig-operating-model/ROADMAP.md +0 -23
  892. package/daemon/assets/plugins/openrig-core/skills/openrig-operating-model/ROLLOUT.md +0 -234
  893. package/daemon/context-packs/skills/core/attention-queue/SKILL.md +0 -264
  894. package/daemon/context-packs/skills/core/attention-queue/manifest.yaml +0 -9
  895. package/daemon/context-packs/skills/process/brainstorming/OPENRIG.md +0 -48
  896. package/daemon/context-packs/skills/process/brainstorming/SKILL.md +0 -107
  897. package/daemon/context-packs/skills/process/brainstorming/manifest.yaml +0 -11
  898. package/daemon/context-packs/skills/process/executing-plans/OPENRIG.md +0 -56
  899. package/daemon/context-packs/skills/process/executing-plans/SKILL.md +0 -94
  900. package/daemon/context-packs/skills/process/executing-plans/manifest.yaml +0 -11
  901. package/daemon/context-packs/skills/process/using-superpowers/OPENRIG.md +0 -48
  902. package/daemon/context-packs/skills/process/using-superpowers/SKILL.md +0 -106
  903. package/daemon/context-packs/skills/process/using-superpowers/manifest.yaml +0 -11
  904. package/daemon/context-packs/skills/process/writing-plans/OPENRIG.md +0 -52
  905. package/daemon/context-packs/skills/process/writing-plans/SKILL.md +0 -126
  906. package/daemon/context-packs/skills/process/writing-plans/manifest.yaml +0 -11
  907. package/daemon/specs/agents/shared/skills/core/attention-queue/SKILL.md +0 -264
  908. package/daemon/specs/agents/shared/skills/process/brainstorming/OPENRIG.md +0 -48
  909. package/daemon/specs/agents/shared/skills/process/brainstorming/SKILL.md +0 -107
  910. package/daemon/specs/agents/shared/skills/process/executing-plans/OPENRIG.md +0 -56
  911. package/daemon/specs/agents/shared/skills/process/executing-plans/SKILL.md +0 -94
  912. package/daemon/specs/agents/shared/skills/process/using-superpowers/OPENRIG.md +0 -48
  913. package/daemon/specs/agents/shared/skills/process/using-superpowers/SKILL.md +0 -106
  914. package/daemon/specs/agents/shared/skills/process/writing-plans/OPENRIG.md +0 -52
  915. package/daemon/specs/agents/shared/skills/process/writing-plans/SKILL.md +0 -126
@@ -0,0 +1,487 @@
1
+ #!/usr/bin/env node
2
+ import fs from "node:fs";
3
+ import os from "node:os";
4
+ import path from "node:path";
5
+ import { spawnSync } from "node:child_process";
6
+ import crypto from "node:crypto";
7
+
8
+ const TEXT_LIMIT = 4000;
9
+ const BASE64_RUN = 800; // strip contiguous base64 runs at least this long (screenshots, data URIs)
10
+
11
+ function sha256(text) {
12
+ return crypto.createHash("sha256").update(String(text ?? "")).digest("hex").slice(0, 16);
13
+ }
14
+
15
+ // R3: replace binary / base64 payloads (data: URIs, long base64 runs) with a compact marker,
16
+ // so a single screenshot block does not blow the transcript into un-chunkable size.
17
+ function stripBinary(text) {
18
+ let s = String(text ?? "");
19
+ s = s.replace(/data:([\w.+-]+\/[\w.+-]+)?;base64,[A-Za-z0-9+/=\s]{200,}/g,
20
+ (m, mime) => `[binary omitted: ~${m.length} bytes${mime ? `, ${mime}` : ""}]`);
21
+ s = s.replace(new RegExp(`[A-Za-z0-9+/]{${BASE64_RUN},}={0,2}`, "g"),
22
+ (m) => `[base64 omitted: ~${m.length} bytes]`);
23
+ return s;
24
+ }
25
+ const DEFAULT_OUT = "/tmp/claude-compaction-restore";
26
+
27
+ function parseArgs(argv) {
28
+ const args = {
29
+ jsonl: null,
30
+ out: DEFAULT_OUT,
31
+ cwd: process.cwd(),
32
+ json: false,
33
+ };
34
+
35
+ for (let i = 0; i < argv.length; i += 1) {
36
+ const arg = argv[i];
37
+ if (arg === "--jsonl") args.jsonl = argv[++i];
38
+ else if (arg === "--out") args.out = argv[++i];
39
+ else if (arg === "--cwd") args.cwd = argv[++i];
40
+ else if (arg === "--json") args.json = true;
41
+ else if (!arg.startsWith("-") && !args.jsonl) args.jsonl = arg;
42
+ else throw new Error(`unknown argument: ${arg}`);
43
+ }
44
+
45
+ return args;
46
+ }
47
+
48
+ function readJsonLines(file) {
49
+ const raw = fs.readFileSync(file, "utf8");
50
+ return raw
51
+ .split(/\r?\n/)
52
+ .filter(Boolean)
53
+ .map((line, index) => {
54
+ try {
55
+ return JSON.parse(line);
56
+ } catch (error) {
57
+ return { type: "parse-error", line: index + 1, error: String(error), raw: line };
58
+ }
59
+ });
60
+ }
61
+
62
+ function findLatestJsonl(cwd) {
63
+ const projectsRoot = path.join(os.homedir(), ".claude", "projects");
64
+ if (!fs.existsSync(projectsRoot)) return null;
65
+
66
+ const encoded = cwd ? cwd.replaceAll("/", "-") : null;
67
+ const candidates = [];
68
+ const roots = [];
69
+
70
+ if (encoded) {
71
+ const exact = path.join(projectsRoot, encoded);
72
+ if (fs.existsSync(exact)) roots.push(exact);
73
+ }
74
+ roots.push(projectsRoot);
75
+
76
+ for (const root of roots) {
77
+ const result = spawnSync("find", [root, "-name", "*.jsonl", "-maxdepth", root === projectsRoot ? "4" : "2"], {
78
+ encoding: "utf8",
79
+ });
80
+ if (result.status !== 0 && !result.stdout) continue;
81
+ for (const file of result.stdout.split(/\r?\n/).filter(Boolean)) {
82
+ try {
83
+ const stat = fs.statSync(file);
84
+ candidates.push({ file, mtimeMs: stat.mtimeMs });
85
+ } catch {
86
+ // Ignore raced/deleted transcript files.
87
+ }
88
+ }
89
+ if (candidates.length) break;
90
+ }
91
+
92
+ candidates.sort((a, b) => b.mtimeMs - a.mtimeMs);
93
+ return candidates[0]?.file ?? null;
94
+ }
95
+
96
+ function stringifyContent(content) {
97
+ if (typeof content === "string") return content;
98
+ if (Array.isArray(content)) {
99
+ return content
100
+ .map((block) => {
101
+ if (typeof block === "string") return block;
102
+ if (block?.type === "text") return block.text ?? "";
103
+ if (block?.type === "image") return `[image omitted: ${block.source?.media_type ?? "image"}]`;
104
+ if (block?.type === "tool_use") return `[tool_use:${block.name}] ${JSON.stringify(block.input ?? {})}`;
105
+ if (block?.type === "tool_result") return `[tool_result] ${truncate(stripBinary(stringifyContent(block.content)), TEXT_LIMIT)}`;
106
+ return JSON.stringify(block);
107
+ })
108
+ .join("\n");
109
+ }
110
+ if (content == null) return "";
111
+ return JSON.stringify(content);
112
+ }
113
+
114
+ function truncate(text, max) {
115
+ const s = String(text ?? "");
116
+ if (s.length <= max) return s;
117
+ return `${s.slice(0, max)}\n[...truncated ${s.length - max} chars...]`;
118
+ }
119
+
120
+ function walkStrings(value, acc = []) {
121
+ if (typeof value === "string") acc.push(value);
122
+ else if (Array.isArray(value)) value.forEach((item) => walkStrings(item, acc));
123
+ else if (value && typeof value === "object") Object.values(value).forEach((item) => walkStrings(item, acc));
124
+ return acc;
125
+ }
126
+
127
+ function normalizeFile(candidate, cwd) {
128
+ let file = candidate.trim().replace(/[),.;:'"`\]\}>]+$/g, "").replace(/^[('"`<\[]+/g, "");
129
+ if (!file || file.includes("\n")) return null;
130
+ if (/\.(?:md|mdx|txt|json|jsonl|yaml|yml|toml|ts|tsx|js|jsx|mjs|cjs|py|sh|rs|go|sql|css|scss|html|xml|svg|csv|log|lock)\//i.test(file)) return null;
131
+ if (file.startsWith("~")) file = path.join(os.homedir(), file.slice(1));
132
+ let normalized = null;
133
+ if (file.startsWith("/")) normalized = path.normalize(file);
134
+ else if (file.startsWith("./") || file.startsWith("../")) normalized = path.normalize(path.resolve(cwd, file));
135
+ else if (/^[A-Za-z0-9_@.+-][A-Za-z0-9_@.+/\-:]*\.[A-Za-z0-9]+$/.test(file)) {
136
+ normalized = path.normalize(path.resolve(cwd, file));
137
+ } else if (/^(CLAUDE|AGENTS|README|DESIGN|CULTURE|MEMORY)\.md$/.test(file)) {
138
+ normalized = path.normalize(path.resolve(cwd, file));
139
+ }
140
+
141
+ if (!normalized) return null;
142
+ try {
143
+ if (fs.existsSync(normalized) && fs.statSync(normalized).isDirectory()) return null;
144
+ } catch {
145
+ // Keep the candidate if stat races; the restore agent can decide.
146
+ }
147
+ return normalized;
148
+ }
149
+
150
+ function extractPaths(text, cwd) {
151
+ const paths = new Set();
152
+ const s = String(text ?? "");
153
+ const absolute = /(?:^|[\s"'(<\[])(\/(?:Users|private|tmp|var|opt|Volumes)\/[^\s"'()\]<>]+)/g;
154
+ const relative = /(?:^|[\s"'(<\[])((?:\.{1,2}\/)?[A-Za-z0-9_@.+-][A-Za-z0-9_@.+/\-:]*\.(?:md|mdx|txt|json|jsonl|yaml|yml|toml|ts|tsx|js|jsx|mjs|cjs|py|sh|rs|go|sql|css|scss|html|xml|svg|csv|log|lock))(?:$|[\s"')>\],.;:])/g;
155
+ const namedMarkdown = /(?:^|[\s"'(<\[])((?:CLAUDE|AGENTS|README|DESIGN|CULTURE|MEMORY)\.md)(?:$|[\s"')>\],.;:])/g;
156
+
157
+ for (const regex of [absolute, relative, namedMarkdown]) {
158
+ let match;
159
+ while ((match = regex.exec(s)) !== null) {
160
+ const normalized = normalizeFile(match[1], cwd);
161
+ if (normalized) paths.add(normalized);
162
+ }
163
+ }
164
+ return [...paths];
165
+ }
166
+
167
+ function createRegistry() {
168
+ const files = new Map();
169
+ let sequence = 0;
170
+
171
+ return {
172
+ add(file, kind, source) {
173
+ if (!file) return;
174
+ const existing = files.get(file) ?? {
175
+ path: file,
176
+ kinds: {},
177
+ sources: new Set(),
178
+ firstSeen: sequence,
179
+ lastSeen: sequence,
180
+ };
181
+ existing.kinds[kind] = (existing.kinds[kind] ?? 0) + 1;
182
+ existing.sources.add(source);
183
+ existing.lastSeen = sequence;
184
+ files.set(file, existing);
185
+ },
186
+ tick() {
187
+ sequence += 1;
188
+ },
189
+ values() {
190
+ return [...files.values()].map((entry) => ({
191
+ ...entry,
192
+ sources: [...entry.sources].slice(0, 8),
193
+ }));
194
+ },
195
+ };
196
+ }
197
+
198
+ function toolKind(name, input) {
199
+ if (["Write", "Edit", "MultiEdit", "NotebookEdit"].includes(name)) return "written";
200
+ if (name === "Read") return "read";
201
+ if (["Grep", "Glob", "LS"].includes(name)) return "discovered";
202
+ if (name === "Bash") {
203
+ const command = input?.command ?? "";
204
+ if (/\b(apply_patch|tee|touch|mkdir|mv|cp|rm)\b|(^|[^>])>{1,2}[^>]/.test(command)) return "shell-write";
205
+ return "shell-mentioned";
206
+ }
207
+ return "mentioned";
208
+ }
209
+
210
+ function scoreFile(entry) {
211
+ const ext = path.extname(entry.path).toLowerCase();
212
+ let score = 0;
213
+ if (entry.kinds.written) score += 40;
214
+ if (entry.kinds["shell-write"]) score += 30;
215
+ if (entry.kinds["file-history"]) score += 35;
216
+ if (ext === ".md" || ext === ".mdx") score += 20;
217
+ if (entry.kinds.read) score += 10;
218
+ if (entry.kinds.discovered) score += 4;
219
+ if (/\/docs\/as-built\//.test(entry.path)) score += 25;
220
+ if (/(codemap|architecture|CLAUDE|AGENTS|README|DESIGN|CULTURE|session\.log|queue\.md)/i.test(entry.path)) score += 15;
221
+ score += Math.min(10, Object.values(entry.kinds).reduce((a, b) => a + b, 0));
222
+ return score;
223
+ }
224
+
225
+ function discoverDocs(cwd) {
226
+ const candidates = [
227
+ "CLAUDE.md",
228
+ "AGENTS.md",
229
+ "README.md",
230
+ "docs/as-built",
231
+ "docs",
232
+ ];
233
+ const docs = new Set();
234
+
235
+ for (const candidate of candidates) {
236
+ const full = path.resolve(cwd, candidate);
237
+ if (!fs.existsSync(full)) continue;
238
+ const stat = fs.statSync(full);
239
+ if (stat.isFile()) docs.add(full);
240
+ if (stat.isDirectory()) {
241
+ const result = spawnSync("find", [full, "-maxdepth", candidate === "docs" ? "2" : "1", "-type", "f", "-name", "*.md"], {
242
+ encoding: "utf8",
243
+ });
244
+ for (const file of result.stdout.split(/\r?\n/).filter(Boolean)) {
245
+ if (/as-built|codemap|architecture|README|overview/i.test(file)) docs.add(path.normalize(file));
246
+ }
247
+ }
248
+ }
249
+
250
+ return [...docs].sort();
251
+ }
252
+
253
+ function analyze(jsonlPath, cwd) {
254
+ const records = readJsonLines(jsonlPath);
255
+ const registry = createRegistry();
256
+ const transcript = [];
257
+ const narrative = []; // R4: message-turns only (assistant/user text), no tool bodies
258
+ const readTargets = new Map(); // R1: tool_use_id -> file_path for Read calls
259
+ const cwdCounts = new Map();
260
+ let sessionId = null;
261
+
262
+ for (const record of records) {
263
+ registry.tick();
264
+ if (record.sessionId || record.session_id) sessionId = record.sessionId ?? record.session_id;
265
+ if (record.cwd) {
266
+ cwdCounts.set(record.cwd, (cwdCounts.get(record.cwd) ?? 0) + 1);
267
+ cwd = record.cwd;
268
+ }
269
+
270
+ if (record.type === "file-history-snapshot") {
271
+ const backups = record.snapshot?.trackedFileBackups ?? {};
272
+ for (const file of Object.keys(backups)) registry.add(path.normalize(file), "file-history", "file-history-snapshot");
273
+ }
274
+
275
+ const message = record.message;
276
+ if (!message) continue;
277
+ const role = message.role ?? record.type ?? "unknown";
278
+ const content = message.content;
279
+
280
+ if (typeof content === "string") {
281
+ transcript.push(`\n## ${role}\n\n${content}`);
282
+ narrative.push(`\n## ${role}\n\n${content}`);
283
+ for (const file of extractPaths(content, cwd)) registry.add(file, "mentioned", `${role}:text`);
284
+ continue;
285
+ }
286
+
287
+ if (!Array.isArray(content)) continue;
288
+ const parts = [];
289
+ const narrativeParts = [];
290
+ for (const block of content) {
291
+ if (block?.type === "text") {
292
+ parts.push(block.text ?? "");
293
+ narrativeParts.push(block.text ?? "");
294
+ for (const file of extractPaths(block.text ?? "", cwd)) registry.add(file, "mentioned", `${role}:text`);
295
+ } else if (block?.type === "tool_use") {
296
+ const name = block.name ?? "unknown";
297
+ const input = block.input ?? {};
298
+ parts.push(`\n[tool_use:${name}]\n${JSON.stringify(input, null, 2)}`);
299
+ if (name === "Read" && block.id && (input.file_path || input.path)) {
300
+ readTargets.set(block.id, input.file_path || input.path);
301
+ }
302
+ const kind = toolKind(name, input);
303
+ if (input.file_path) registry.add(normalizeFile(input.file_path, cwd), kind, `tool:${name}:file_path`);
304
+ if (input.path) registry.add(normalizeFile(input.path, cwd), kind, `tool:${name}:path`);
305
+ if (input.notebook_path) registry.add(normalizeFile(input.notebook_path, cwd), kind, `tool:${name}:notebook_path`);
306
+ for (const text of walkStrings(input)) {
307
+ for (const file of extractPaths(text, cwd)) registry.add(file, kind, `tool:${name}:input`);
308
+ }
309
+ } else if (block?.type === "tool_result") {
310
+ const resultText = stripBinary(stringifyContent(block.content));
311
+ const target = block.tool_use_id && readTargets.get(block.tool_use_id);
312
+ if (target) {
313
+ // R1: a Read result reproduces a whole file — emit a pointer, not the body.
314
+ // The live file is current; this transcript copy is a snapshot that may be stale.
315
+ const lineCount = resultText.split("\n").length;
316
+ parts.push(`\n[tool_result: Read ${target} — ${lineCount} lines, sha256 ${sha256(resultText)} — READ THE LIVE FILE; this snapshot may be stale]`);
317
+ } else {
318
+ parts.push(`\n[tool_result]\n${truncate(resultText, TEXT_LIMIT)}`);
319
+ }
320
+ for (const file of extractPaths(resultText, cwd)) registry.add(file, "mentioned", "tool_result");
321
+ }
322
+ }
323
+ if (parts.length) transcript.push(`\n## ${role}\n\n${parts.join("\n")}`);
324
+ if (narrativeParts.some((p) => String(p).trim())) narrative.push(`\n## ${role}\n\n${narrativeParts.join("\n")}`);
325
+ }
326
+
327
+ const rankedFiles = registry
328
+ .values()
329
+ .map((entry) => ({ ...entry, score: scoreFile(entry), markdown: [".md", ".mdx"].includes(path.extname(entry.path).toLowerCase()) }))
330
+ .sort((a, b) => b.score - a.score || a.path.localeCompare(b.path));
331
+
332
+ const cwdRanked = [...cwdCounts.entries()].sort((a, b) => b[1] - a[1]);
333
+ const effectiveCwd = cwdRanked[0]?.[0] ?? cwd;
334
+
335
+ const transcriptText = transcript.join("\n");
336
+ const narrativeText = narrative.join("\n");
337
+ return {
338
+ sessionId,
339
+ jsonlPath,
340
+ cwd: effectiveCwd,
341
+ records: records.length,
342
+ transcript: transcriptText,
343
+ narrative: narrativeText,
344
+ transcriptTokens: Math.round(transcriptText.length / 4),
345
+ narrativeTokens: Math.round(narrativeText.length / 4),
346
+ files: rankedFiles,
347
+ docs: discoverDocs(effectiveCwd),
348
+ };
349
+ }
350
+
351
+ function markdownFileList(files) {
352
+ const lines = [];
353
+ lines.push("# Touched Files");
354
+ lines.push("");
355
+ lines.push("Files are ranked for restore relevance. Markdown and written files are the first candidates to read in full.");
356
+ lines.push("");
357
+
358
+ const sections = [
359
+ ["Highest-priority Markdown/state files", (f) => f.markdown && (f.kinds.written || f.kinds["shell-write"] || f.kinds["file-history"])],
360
+ ["Other written/tracked files", (f) => !f.markdown && (f.kinds.written || f.kinds["shell-write"] || f.kinds["file-history"])],
361
+ ["Read/discovered/mentioned files", (f) => !(f.kinds.written || f.kinds["shell-write"] || f.kinds["file-history"])],
362
+ ];
363
+
364
+ for (const [title, predicate] of sections) {
365
+ const group = files.filter(predicate);
366
+ if (!group.length) continue;
367
+ lines.push(`## ${title}`);
368
+ lines.push("");
369
+ for (const file of group) {
370
+ const kinds = Object.entries(file.kinds).map(([kind, count]) => `${kind}:${count}`).join(", ");
371
+ lines.push(`- score ${file.score} — \`${file.path}\` — ${kinds}`);
372
+ }
373
+ lines.push("");
374
+ }
375
+
376
+ return lines.join("\n");
377
+ }
378
+
379
+ function restoreInstructions(summary, outputPaths) {
380
+ const lines = [];
381
+ lines.push("# Claude Compaction Restore Instructions");
382
+ lines.push("");
383
+ lines.push("You have just been compacted or are restoring a compacted Claude Code seat. Your mental model is compressed and unreliable.");
384
+ lines.push("");
385
+ lines.push(`- JSONL transcript: \`${summary.jsonlPath}\``);
386
+ lines.push(`- Reconstructed transcript: \`${outputPaths.transcript}\` (~${summary.transcriptTokens ?? "?"} tokens — do NOT read front-to-back)`);
387
+ lines.push(`- Narrative companion (READ THIS FIRST): \`${outputPaths.narrative}\` (~${summary.narrativeTokens ?? "?"} tokens — message turns only, no tool bodies)`);
388
+ lines.push(`- Touched-file triage: \`${outputPaths.touchedFiles}\``);
389
+ lines.push(`- Working directory inferred: \`${summary.cwd}\``);
390
+ lines.push("");
391
+ lines.push("## Read budget (the restore must leave room for the work)");
392
+ lines.push("");
393
+ lines.push(`- The full transcript is ~${summary.transcriptTokens ?? "?"} tokens. **Reading it front-to-back can consume the window the restore exists to rebuild.**`);
394
+ lines.push(`- Default order: read the **narrative companion first** (~${summary.narrativeTokens ?? "?"} tokens — message turns + decisions), tail-first (most recent first).`);
395
+ lines.push("- Drop to the full transcript only for a specific question the narrative can't answer. File bodies inside tool-results are pointers now — **read the live file, not the transcript snapshot.**");
396
+ lines.push("- Read to a budget with a stopping rule; report depth honestly (an honest PARTIAL beats a false completion). See the skill's *Required Read-Depth Audit*.");
397
+ lines.push("");
398
+ lines.push("## Required Sequence");
399
+ lines.push("");
400
+ lines.push("1. Read this file and `touched-files.md`.");
401
+ lines.push("2. Ask yourself: which files do I recognize as important to the work and project state?");
402
+ lines.push("3. Mark those files mentally or in a short note.");
403
+ lines.push("4. Read every important Markdown/state/planning file in full.");
404
+ lines.push("5. Read project root docs in full when present: `CLAUDE.md`, `AGENTS.md`, `README.md`.");
405
+ lines.push("6. Read as-built docs and codemaps in full before product work, code review, or architecture decisions.");
406
+ lines.push("7. State exactly: `restored from packet at <path>; resumed at step <X>`.");
407
+ lines.push("");
408
+ lines.push("## Documentation Candidates");
409
+ lines.push("");
410
+ if (summary.docs.length) {
411
+ for (const doc of summary.docs) lines.push(`- \`${doc}\``);
412
+ } else {
413
+ lines.push("- No root/as-built/codemap candidates were found automatically. Search manually before resuming code/review work.");
414
+ }
415
+ lines.push("");
416
+ lines.push("## Top File Candidates");
417
+ lines.push("");
418
+ for (const file of summary.files.slice(0, 30)) {
419
+ lines.push(`- \`${file.path}\` — score ${file.score}`);
420
+ }
421
+ lines.push("");
422
+ lines.push("Do not continue from fuzzy memory alone.");
423
+ return lines.join("\n");
424
+ }
425
+
426
+ function writeOutputs(summary, outRoot) {
427
+ const stamp = new Date().toISOString().replace(/[:.]/g, "-");
428
+ const base = path.join(outRoot, `${summary.sessionId ?? "unknown-session"}-${stamp}`);
429
+ fs.mkdirSync(base, { recursive: true });
430
+
431
+ const outputPaths = {
432
+ dir: base,
433
+ transcript: path.join(base, "transcript.txt"),
434
+ narrative: path.join(base, "transcript-narrative.txt"),
435
+ touchedFiles: path.join(base, "touched-files.md"),
436
+ instructions: path.join(base, "restore-instructions.md"),
437
+ summary: path.join(base, "restore-summary.json"),
438
+ };
439
+
440
+ fs.writeFileSync(outputPaths.transcript, summary.transcript || "(no message transcript reconstructed)\n");
441
+ fs.writeFileSync(outputPaths.narrative, summary.narrative || "(no narrative reconstructed)\n");
442
+ fs.writeFileSync(outputPaths.touchedFiles, markdownFileList(summary.files));
443
+ fs.writeFileSync(outputPaths.instructions, restoreInstructions(summary, outputPaths));
444
+ fs.writeFileSync(outputPaths.summary, JSON.stringify({ ...summary, transcript: undefined, narrative: undefined, outputPaths }, null, 2));
445
+
446
+ return outputPaths;
447
+ }
448
+
449
+ function main() {
450
+ const args = parseArgs(process.argv.slice(2));
451
+ const cwd = path.resolve(args.cwd);
452
+ const jsonlPath = args.jsonl ? path.resolve(args.jsonl) : findLatestJsonl(cwd);
453
+ if (!jsonlPath) throw new Error("could not find a Claude JSONL transcript; pass one explicitly");
454
+ if (!fs.existsSync(jsonlPath)) throw new Error(`JSONL transcript not found: ${jsonlPath}`);
455
+
456
+ const summary = analyze(jsonlPath, cwd);
457
+ const outputPaths = writeOutputs(summary, path.resolve(args.out));
458
+ const result = {
459
+ ok: true,
460
+ jsonlPath,
461
+ outputDir: outputPaths.dir,
462
+ transcript: outputPaths.transcript,
463
+ narrative: outputPaths.narrative,
464
+ transcriptTokens: summary.transcriptTokens,
465
+ narrativeTokens: summary.narrativeTokens,
466
+ touchedFiles: outputPaths.touchedFiles,
467
+ instructions: outputPaths.instructions,
468
+ fileCount: summary.files.length,
469
+ topFiles: summary.files.slice(0, 12).map((file) => file.path),
470
+ };
471
+
472
+ if (args.json) console.log(JSON.stringify(result, null, 2));
473
+ else {
474
+ console.log(`Restore packet: ${result.outputDir}`);
475
+ console.log(`Instructions: ${result.instructions}`);
476
+ console.log(`Touched files: ${result.touchedFiles}`);
477
+ console.log(`Narrative (read first): ${result.narrative} (~${result.narrativeTokens} tokens)`);
478
+ console.log(`Transcript (drill-down): ${result.transcript} (~${result.transcriptTokens} tokens)`);
479
+ }
480
+ }
481
+
482
+ try {
483
+ main();
484
+ } catch (error) {
485
+ console.error(`claude-compaction-restore failed: ${error.message}`);
486
+ process.exit(1);
487
+ }
@@ -0,0 +1 @@
1
+ Optional. Leave blank to use Claude Code's native compaction summary behavior; OpenRig's pre-compaction preparation and post-compaction restore prompts carry the durable continuity protocol.
@@ -0,0 +1 @@
1
+ Read the claude-compaction-restore skill and follow its "If You Just Compacted" protocol.
@@ -1,7 +1,8 @@
1
1
  # GENERATED by scripts/generate-context-packs.mjs — DO NOT EDIT.
2
2
  # Package-time projection of a canonical skill; regenerated every build.
3
3
  name: "agent-starters"
4
- version: "0.5.5"
4
+ version: "0.5.7"
5
+ taxonomy: "skills"
5
6
  purpose: "Use when creating, refreshing, packaging, inspecting, promoting, or deprecating a named per-seat starting point — Agent Starter manifest authoring, the 6-state lifecycle (captured → named → inspectable → used → promoted → deprecated), provenance honesty, and refusal rules. NOT a VM image; a managed starting point composed from agent role + startup context + optional native session source + provenance."
6
7
  files:
7
8
  - path: "SKILL.md"
@@ -1,7 +1,8 @@
1
1
  # GENERATED by scripts/generate-context-packs.mjs — DO NOT EDIT.
2
2
  # Package-time projection of a canonical skill; regenerated every build.
3
3
  name: "agent-startup-and-context-ingestion"
4
- version: "0.5.5"
4
+ version: "0.5.7"
5
+ taxonomy: "skills"
5
6
  purpose: "Use when designing or auditing how an agent becomes useful after launch — AGENTS.md overlays, role files, skills, rig specs, workflow specs, startup checklists, refocus messages, \"rig context\" surface. Covers the 4 failure modes that make startup context fail (old rig spec misses current operating mode; current agents never told about new guidance; startup file as dumping ground; orchestrator transmits implementation without preserving product intent)."
6
7
  files:
7
8
  - path: "SKILL.md"
@@ -30,11 +30,8 @@ operator pattern (`ssh <host> rig <cmd>`) with declared host identity,
30
30
  explicit cross-host invocation path, preserved `--verify` semantics, and
31
31
  4 named failure modes.
32
32
 
33
- **Current-host note (2026-07-14):** this skill still preserves the original
34
- SSH-v0 doctrine below, but the live host registry may also contain HTTP
35
- read-through/tunnel entries such as `your-vm` and `your-other-vm`. Use the
36
- host registry entry as ground truth for transport shape, and use
37
- `conventions/multi-host-naming/README.md` for host-id naming. HTTP entries
33
+ The live host registry may contain SSH or HTTP read-through/tunnel entries.
34
+ Use each registry entry as ground truth for transport shape. HTTP entries
38
35
  require `url` plus exactly one of `bearer_file` or `bearer_env`.
39
36
 
40
37
  **v0 is CLI-side shell-out only — `packages/daemon/` is NOT touched.**
@@ -73,24 +70,20 @@ differs from the interactive verbs (`send`/`capture`/`ps`/`whoami`):
73
70
 
74
71
  ## Host registry shape (`~/.openrig/hosts.yaml`)
75
72
 
76
- Host ids should follow the OpenRig-work multi-host naming convention:
77
- `conventions/multi-host-naming/README.md`. In this environment that means
78
- physical hosts such as `your-vm`, local OpenRig development VMs such as
79
- `your-vm`, persistent product VMs such as `your-other-vm`, and VPS hosts such
80
- as `your-vps`. Keep old aliases during migration until no live routing
81
- depends on them.
73
+ Host ids must be non-empty and unique. Choose stable, operator-meaningful ids
74
+ that describe the destination without depending on transient network details.
82
75
 
83
76
  ```yaml
84
77
  hosts:
85
78
  - id: a-test-vm
86
79
  transport: ssh # v0 supports "ssh" only
87
80
  target: a-test-vm.local # DNS name, SSH config alias, or IP
88
- user: wrandom # optional
81
+ user: example-user # optional
89
82
  notes: "Tart VM" # optional
90
83
  - id: laptop-b
91
84
  transport: ssh
92
85
  target: laptop-b.tail-scale-net
93
- user: wrandom
86
+ user: example-user
94
87
  ```
95
88
 
96
89
  Validation rules:
@@ -1,7 +1,8 @@
1
1
  # GENERATED by scripts/generate-context-packs.mjs — DO NOT EDIT.
2
2
  # Package-time projection of a canonical skill; regenerated every build.
3
3
  name: "cross-host-rig-commands"
4
- version: "0.5.5"
4
+ version: "0.5.7"
5
+ taxonomy: "skills"
5
6
  purpose: "Use when issuing `rig` commands against a remote host via `--host <id>` flag (single-hop SSH to a host declared in `~/.openrig/hosts.yaml`). Covers the 4 structured failure modes (ssh-unreachable / permission-gate / remote-daemon-unreachable / remote-command-failed), the `--verify` honest pass-through (SSH success is NOT verify success), and the host-registry shape. v0 supports `rig send / capture / ps / whoami --host <id>`."
6
7
  files:
7
8
  - path: "SKILL.md"
@@ -1,7 +1,8 @@
1
1
  # GENERATED by scripts/generate-context-packs.mjs — DO NOT EDIT.
2
2
  # Package-time projection of a canonical skill; regenerated every build.
3
3
  name: "human-in-the-loop"
4
- version: "0.5.5"
4
+ version: "0.5.7"
5
+ taxonomy: "skills"
5
6
  purpose: "Use when classifying a slice closeout (auto-continue / human gate / park), routing a real decision to a human, or designing a human queue/dashboard surface. Treats humans as durable network participants with attention surfaces, queues, and decision records — escalation lands as a durable attention item, not a chat message. Approval is NOT required for every clean closeout; the default RSI conveyor continues unless an explicit human gate is reached."
6
7
  files:
7
8
  - path: "SKILL.md"
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: messaging-the-human
3
+ description: "Use when a human decision, access grant, external action, or escalation must survive the operator's absence, or when an orchestrator or PM has a judgment-worthy update for the operator."
4
+ metadata:
5
+ cli_surfaces_referenced:
6
+ - gateway human add
7
+ - gateway human list
8
+ - queue block
9
+ - queue handoff
10
+ - queue transitions
11
+ - send
12
+ openrig:
13
+ stage: provisional
14
+ audience: all agents
15
+ sibling_skills:
16
+ - queue-handoff
17
+ - human-in-the-loop
18
+ - openrig-user
19
+ ---
20
+
21
+ # Messaging the Human
22
+
23
+ The human is an addressable participant, but their attention is scarce and they
24
+ may not be at a terminal. Anything that must survive their absence needs a
25
+ durable queue row; the gateway turns the human blocker on that row into the
26
+ external notification.
27
+
28
+ Any seat may contact the human directly for a real escalation. Orchestrators
29
+ and product managers may also send updates they judge the human would want to
30
+ know. Do not add a routing intermediary merely because of your role.
31
+
32
+ ## The supported route
33
+
34
+ First discover the registered human identity. Never invent or remember an
35
+ address:
36
+
37
+ ```bash
38
+ rig gateway human list --json
39
+ ```
40
+
41
+ Use `humans[].entityId` to derive the durable blocker as `<entityId>@host`.
42
+ The entity id must use the human-seat prefix (`human` or `human-...`); if it
43
+ does not, stop and repair the registration rather than guessing. The returned
44
+ `humans[].address` is the gateway delivery address, not the `--on` value. If no
45
+ unambiguous registered human is returned, stop: registration is lifecycle work
46
+ (`rig gateway human add --help`), not an address to guess.
47
+
48
+ Keep the work row owned by the agent who must resume it, then park that row on
49
+ the registered human:
50
+
51
+ ```bash
52
+ rig queue block <qitem-id> --on <entityId>@host \
53
+ --summary "<decision owed>" \
54
+ --evidence-ref "<durable artifact the human should judge>" \
55
+ --continuation "<what resumes after the answer>"
56
+ ```
57
+
58
+ The gateway resolves the registered human to the configured connector, sends
59
+ the Slack notification, and records its receipt on the same row. Confirm the
60
+ effect from the append-only history:
61
+
62
+ ```bash
63
+ rig queue transitions <qitem-id>
64
+ ```
65
+
66
+ The row is the obligation and the audit trail. Slack is the attention leg. A
67
+ reply resolves the durable blocker and wakes the row owner; it does not create
68
+ a second private work stream.
69
+
70
+ ## When to use it
71
+
72
+ Escalate directly when only the human can supply the missing capability:
73
+
74
+ - a decision or irreversible judgment only they own;
75
+ - access, credentials, authority, or capacity only they can grant;
76
+ - an external action only they can perform;
77
+ - a security-class or provider/model-fallback event they need to know about.
78
+
79
+ Orchestrators and product managers may additionally send meaningful milestone,
80
+ environment, or completion updates. Prefer signal over routine narration.
81
+
82
+ ## Boundaries
83
+
84
+ - `rig send` sends text to an agent's terminal. It is not the Slack route and
85
+ does not create a durable human obligation.
86
+ - An unregistered or ambiguous human identity must fail loudly. Register or
87
+ repair the identity; never downgrade it to an agent seat or a guessed
88
+ `@external` address.
89
+ - Agent-to-agent work that needs closure uses `rig queue handoff`, not this
90
+ human-blocker path.
91
+ - Deferred work that is not imminent belongs in the mission workspace, not on
92
+ the queue.
93
+
94
+ ## Writing the escalation
95
+
96
+ Lead with what is blocked and the exact decision or action needed. Point at the
97
+ durable evidence instead of pasting a second copy, and name the continuation so
98
+ the system can resume the right work when the answer arrives.