@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,120 @@
1
+ ---
2
+ name: applying-a-permission-policy
3
+ description: "Use when a permission policy is attached to a rig/seat (rig.yaml permission_policy:), or a user asks you to apply one, and you must translate that harness-neutral policy into the target harness's LIVE permission config — Claude settings.json / Codex config.toml / Pi run flags. Agent-driven and interactive: you read the policy, ground yourself in YOUR harness version, show the diff, and ask before writing. NOT for defining policies (that's the policy spec) and NOT a set-and-forget updater."
4
+ metadata:
5
+ openrig:
6
+ stage: established # config cells VM-verified + cold-transfer PASSING (rerun #2) + built-in SPEC FILES landed → skill translates FROM the spec (POINT-not-COPY). The two established criteria met 2026-08-04. Reviewed at push.
7
+ tested_against: # VERSION STAMP — the whole point; re-verify at every harness bump
8
+ claude_code: "2.1.220 — VM-CONFIRMED 2026-08-03 (all cells)"
9
+ codex: "0.120.0 — VM-CONFIRMED 2026-08-03 (sandbox_mode/approval_policy; on-failure deprecated-but-accepted)"
10
+ pi: "0.83.0 — VM-CONFIRMED 2026-08-03: --approve/--no-approve govern PROJECT-RESOURCE TRUST, NOT tool permissions; Pi has NO permission surface (see Pi leg)"
11
+ verification_status: "Live-verified 2026-08-03/04. Claude 2.1.220 + Codex 0.120.0 config cells CONFIRMED live. Pi 0.83.0 divergence folded (flags = project-resource trust, not a permission gate). Cold-transfer rerun #1 blocked on the force_push/push_to_remote prefix collision → added the PREFIX-COLLISION rule. Cold-transfer rerun #2: TRANSFERS — all 5 gate checks pass (collision resolved deterministically without asking; single ordinary write confirmation; defaultMode floor written; Codex workspace-write/on-request; Pi compute-nothing). Blocking collision/floor defect CLOSED → gate cleared, 4.8-shippable (provisional-with-passing-cold-transfer). Non-blocking seam closed: the built-in SPEC FILES landed (arch-accepted, source:builtin) → skill translates FROM the spec, interim in-skill pinned summary retired (POINT-not-COPY). stage:ESTABLISHED 2026-08-04 — both criteria met."
12
+ ---
13
+
14
+ # Applying a permission policy
15
+
16
+ ## Translation is best-effort — read this first
17
+ This skill provides the policy schema and OpenRig's best current understanding of how to translate it to each harness. That guidance is **best-effort and version-stamped**: harness permission surfaces change frequently across versions, so a mapping that is correct today can drift on a later release. When you apply a config-surface policy:
18
+ - **Verify against the current docs for your installed harness version.** Treat this skill's tables as version-stamped starting points (see `tested_against`), not settled truth.
19
+ - **Prefer testing in a protected or disposable environment first.** An incorrect write can lock a seat out or over-permit it, so confirm the format before applying it to a live seat.
20
+ - **Hand-editing via the harness's own settings tools is always a valid path.** If a translation is uncertain, setting the policy directly — or asking the user to — is a legitimate outcome, not a failure.
21
+
22
+ The reliable, deterministic parts are the **blunt instruments**: the YOLO full-bypass flag and the floor (Claude `acceptEdits` / Codex `workspace-write`), which ride the stable launch-flag surface. **Fine-grained config-rule translation — the allow/ask/deny prefix rules and the Codex posture — is the best-effort part** and carries no guarantee of exact fidelity. If a translation looks wrong, fall back to a blunt instrument or a direct hand-edit.
23
+
24
+ ## ⚠ Read this preamble first — why this is a SKILL, not a script (do not "improve" it into a deterministic updater)
25
+ Harness permission formats are a **moving target**. The exact fact this skill is stamped against — Claude Code 2.1.220 permission rules are **prefix-only** (no flag-precise Bash match) — is *version-specific*; the rule grammar can change on the next point release. A hardcoded/deterministic updater would foot-gun the instant it does, and a wrong permission write can **lock a seat out or silently over-permit it**. So the maintained artifact is this caveated, version-stamped skill that an agent reads and applies **interactively, grounding in the live format** — never a code path that writes blindly. If you are tempted to replace this with a deterministic projector: that temptation is the bug this preamble exists to stop.
26
+
27
+ ## When to reach for this
28
+ - A rig/seat has a policy attached (`rig.yaml … permission_policy: <file>`), and you're at **setup/preflight** — apply it (**mandatory for autonomous seats**, see the freeze warning).
29
+ - A user asks "apply the Standard/Open/Locked/Operator policy here" or "set up permissions like <host>".
30
+ - NOT for authoring policies (that's the policy spec) and NOT for daemon-level enforcement (OpenRig is agnostic — it injects nothing).
31
+
32
+ ## What you're translating (the boundary)
33
+ INPUT = a **harness-neutral policy spec** (arch's schema): `default_posture`, `floor`, `allow`/`ask`/`deny` as **semantic actions** (`push_to_remote`, `delete_files`, …), `destructive_class`, `source: builtin|custom`. You TRANSLATE that intent → the harness's live config. You never invent policy; you never pre-bake harness config into the spec.
34
+
35
+ ## The apply flow (interactive — the interactive-ask IS the product)
36
+ 1. **Read the policy spec** + its `source:` marker (built-in read-only from the package = copy-to-customize before editing; custom = user space).
37
+ 2. **PREFLIGHT (mandatory) — ground yourself in THIS environment:**
38
+ - **daemon-HOME must equal seat-HOME**, or a user-level Claude write never reaches the seat (assessment iv). Check; if they differ, **stop and ask** — do not write into the wrong HOME.
39
+ - Read the harness's **actual current config file** + confirm its schema against your installed version (`claude --version`, the live settings.json shape, codex/pi versions). If the format differs from this skill's `tested_against`, trust the LIVE format and flag the drift.
40
+ 3. **Derive the per-harness config** from the semantic actions (see the three legs below). Compute the Codex posture-collapse + Pi bit.
41
+ 4. **Show the concrete DIFF before writing** (old → new, per file). Never a blind write.
42
+ 5. **Resolve best-effort actions by the built-in's rule FIRST, then ask only on genuine ambiguity.** Best-effort destructive actions (`force_push`, `delete_files`, `delete_everything`, `read_secrets`) default to **`ask`** (never a `deny` that can't be enforced) — apply that default rather than stopping to question-back. Surface a question only when the policy is genuinely ambiguous or the seat is interactive. **For a same-prefix collision (`push_to_remote` vs `force_push`, both `Bash(git push:*)`), NEVER ask — apply the deterministic PREFIX-COLLISION rule in the Claude leg.** (Live cold-transfers caught fresh agents *question-backing* — first on the `force_push` default, then on the prefix collision — instead of applying the fixed rule; both freeze an autonomous seat.) On a Claude-only fleet, if the policy denies `network_egress`, **say so explicitly**: it is NOT enforceable — Claude has no network gate, a `Bash(curl:*)`/`Bash(wget:*)` deny is best-effort, and `python`/`node` fetch bypasses it (live-verified: `urllib` reached HTTPS 200 under a curl/wget deny). Route real egress-gating to the Codex sandbox, or record it as advisory on Claude.
43
+ 6. **Back up the current config**, then write. Prefer the **user-level** file (`~/.claude/settings.json`) for durable policy — it's the clobber-resistant tier (deny wins across the union). **ALWAYS include `defaultMode: "acceptEdits"` in the Claude settings.json you write** — the floor key must be PRESENT in the file, or the config policy strips the floor. (This is the exact gap a live cold-transfer test FAILED on: the fresh agent wrote allow/deny lists but omitted `defaultMode`, leaving the seat below the floor.)
44
+ 7. **Verify** the write landed and the seat can see it (re-read; confirm `defaultMode: "acceptEdits"` is present; for an autonomous seat, confirm no `ask` will freeze it).
45
+
46
+ ## Two surfaces — and this skill writes only ONE of them
47
+ Permissions live on two surfaces with opposite stability — which is the whole reason for the agent-driven split:
48
+ - **LAUNCH-FLAG surface — STABLE (>1yr) → OpenRig sets it DETERMINISTICALLY, NOT this skill.** The flags OpenRig passes at boot: Claude `--permission-mode` / `--dangerously-skip-permissions`; Codex sandbox/bypass flags; Pi `--approve`/`--no-approve`. **Two things live here, both OpenRig-owned: the FLOOR (minimum, by default) and YOLO (full bypass, opt-in).**
49
+ - **CONFIG-FILE surface — CHAOTIC → NEVER deterministic → THIS SKILL'S DOMAIN.** Claude `settings.json` allow/ask/deny + defaultMode; Codex `config.toml` approval rules. This is where the Locked / Standard / Open policies get applied — agent-driven, version-stamped, caveated. (Pi has **no permission surface at all** — its `--approve`/`--no-approve` flags govern project-resource trust, not tool permissions (VM-confirmed Pi 0.83.0); a permission policy does not translate to Pi. See the Pi leg.)
50
+
51
+ **THE FLOOR (launch-flag, OpenRig-set — this skill KNOWS it, never WRITES it):** Claude `--permission-mode acceptEdits` (keep it); **Codex workspace-only** (stop forcing `danger-full-access` — ≈ Codex's own default ≈ setting-nothing = agnostic); Pi `--no-approve` (a project-resource-trust floor — Pi has no permission gate; see the Pi leg). **One consistent unconditional minimum** (no by-context switching — that mode idea is parked 5.0). A chosen config-file policy layers ON TOP of the floor.
52
+
53
+ **YOLO MODE (launch-flag, OpenRig-set, opt-in — for people done with permissions):** OpenRig boots every seat with the full-bypass flag (Claude `--dangerously-skip-permissions`; Codex full-bypass). **When YOLO is on, CONFIG-FILE POLICY IS MOOT** — this skill does NOT apply a config policy (or explicitly notes it's overridden by the flag); don't fight the bypass. YOLO is OpenRig's deterministic job, not this skill's. (**Operator = YOLO mode** — subsumed.)
54
+
55
+ ## The three harness legs (skill-owned mapping knowledge, version-stamped + caveated)
56
+
57
+ ### Claude — `~/.claude/settings.json` (user-level, clobber-resistant)
58
+ - **Action → prefix map** (VM-CONFIRMED @ Claude 2.1.220, 2026-08-03 — every row exercised through real Claude tool calls). `fidelity`: `clean` = the prefix honors intent; `best_effort` = prefix-only can't fully enforce → prefer `ask`, never a `deny` that lies.
59
+
60
+ | Semantic action | `permissions.*` prefix rule(s) | fidelity |
61
+ |---|---|---|
62
+ | push_to_remote | `Bash(git push:*)` | clean |
63
+ | force_push | ask the flag-first forms `Bash(git push --force:*)` `Bash(git push -f:*)` `Bash(git push --force-with-lease:*)`; base `Bash(git push:*)` follows push_to_remote (see the collision rule) | **best_effort** — catches flag-FIRST force; flag-LAST (`git push origin main --force`) leaks |
64
+ | create_pr | `Bash(gh pr create:*)` | clean |
65
+ | publish_package | `Bash(npm publish:*)` `Bash(pnpm publish:*)` `Bash(yarn publish:*)` `Bash(cargo publish:*)` | clean (multi-pattern) |
66
+ | merge_or_release | `Bash(git merge:*)` `Bash(git tag:*)` `Bash(gh release:*)` | best_effort — protected-branch semantics not expressible |
67
+ | delete_files | `Bash(rm:*)` | **best_effort** — target-first leak (`rm <t> -rf` slips); scope not boundable → default `ask` |
68
+ | delete_everything | `Bash(rm -rf:*)` `Bash(rm -fr:*)` | **best_effort** — same leak → default to `ask`, never a silent deny |
69
+ | reset_or_discard_vcs | `Bash(git reset:*)` `Bash(git clean:*)` `Bash(git checkout:*)` `Bash(git branch -D:*)` | best_effort |
70
+ | drop_persistent_store | `Bash(dropdb:*)` `Bash(docker volume rm:*)` (+ project-specific) | best_effort (open-ended) → `ask` |
71
+ | rig_up / rig_down | `Bash(rig up:*)` / `Bash(rig down:*)` | clean — ⚠ an `ask` here FREEZES an autonomous seat |
72
+ | mutate_topology | `Bash(rig add:*)` `Bash(rig remove:*)` `Bash(rig rename:*)` | clean |
73
+ | run_toolchain | `Bash(npm:*)` `Bash(npx:*)` `Bash(pnpm:*)` `Bash(yarn:*)` `Bash(node:*)` `Bash(tsc:*)` `Bash(vitest:*)` `Bash(jest:*)` | clean (the known set) |
74
+ | run_arbitrary_shell | `Bash(*)` — this IS the `default_posture` knob | clean |
75
+ | network_egress | `Bash(curl:*)` `Bash(wget:*)` (partial) | **best_effort** — Claude has NO native network gate; real floor = Codex sandbox (route it there) |
76
+ | read_secrets | `Read(./.env)` `Read(~/.ssh/**)` `Read(**/*secret*)` (path-scoped) | **best_effort** — path-based, not secret-aware |
77
+ | install_dependencies | `Bash(npm install:*)` `Bash(pip install:*)` `Bash(brew install:*)` | clean |
78
+ - **PREFIX-ONLY caveat** — cannot flag-precisely gate (`force_push` vs `push_to_remote` both match `Bash(git push:*)`); **target-first leak** (`rm <target> -rf` slips a `Bash(rm -rf*)` deny). Actions marked `best_effort` in the taxonomy (`force_push`, `delete_files`, `read_secrets`) → surface the caveat and prefer `ask` over a `deny` you can't enforce (a `deny` that leaks lies).
79
+ - **PREFIX-COLLISION resolution (deterministic — resolve it, NEVER ask).** When two actions collapse to the SAME base prefix with different dispositions — the canonical case is `push_to_remote`=allow + `force_push`=ask, both basing to `Bash(git push:*)` — you cannot put that base prefix in both `allow` and `ask`. Resolve without a question-back:
80
+ - **Push allowed + force asked (Standard / Open):** put the base `Bash(git push:*)` per push's disposition (`allow`), AND add the flag-first force forms to `ask` (`Bash(git push --force:*)`, `Bash(git push -f:*)`, `Bash(git push --force-with-lease:*)`). RECORD in your diff that this is best-effort — flag-LAST force (`git push origin main --force`) leaks past the flag-first ask rules and runs under the allow. Don't block on it.
81
+ - **Push denied (Locked):** `Bash(git push:*)` in `deny` already covers force — no conflict.
82
+ This is a FIXED rule, not a user decision — apply it and note the leak. (A live cold-transfer FAILED because a fresh agent *blocked asking* "how to resolve the force_push/push_to_remote collision" instead of applying this default.)
83
+ - **`defaultMode: "acceptEdits"` is the FLOOR and MUST be written into every Claude settings.json you produce.** It is not a knob you tune, but it IS a key you must always include — a config policy that omits it strips the floor (the cold-transfer failure). Live-confirmed schema: `{"permissions":{"allow":[],"ask":[],"deny":[],"defaultMode":"acceptEdits"}}`.
84
+
85
+ ### Codex — `~/.codex/config.toml` (via the existing X10 `codex_config_fragment` splice path — reuse, don't invent)
86
+ - Codex is **per-posture, not per-action**: the whole action set **collapses** to the nearest `{sandbox_mode, approval_policy}` pair. **Built-in → posture** (VM-CONFIRMED @ Codex 0.120.0, 2026-08-03 — each posture applied to a real seat: read-only blocked writes+egress, workspace-write allowed writes/blocked egress, danger-full-access allowed both):
87
+
88
+ | Built-in | `sandbox_mode` | `approval_policy` | Collapse note (surface this to the user) |
89
+ |---|---|---|---|
90
+ | Locked | `read-only` | `on-request` | read-only blocks all writes + egress, prompts on escalation — OVER-restricts `edit_files` vs the Claude floor |
91
+ | Standard ⭐ | `workspace-write` | `on-request` | workspace writes allowed, egress blocked by sandbox, prompt on escalation — UNDER-gates `create_pr` (no per-action ask; folds into the prompt) |
92
+ | Open | `danger-full-access` | `on-failure` | everything allowed, prompt only on failure — OVER-permits the `destructive_class` vs the Claude ask-gates |
93
+ | YOLO | *(flag-surface — full-bypass launch flag, NOT config.toml)* | — | not a config write; the rip-out adapter owns it |
94
+
95
+ Valid values (VM-confirmed @ Codex 0.120.0): `sandbox_mode` ∈ {read-only, workspace-write, danger-full-access}; `approval_policy` ∈ {on-request, on-failure, never, untrusted, granular} (`granular` observed live at 0.120.0). ⚠ `on-failure` (used by Open) is marked **deprecated** in 0.120.0 help but still accepted — revisit if a future Codex drops it.
96
+ - Surface the collapse: "Codex can't gate per-action; this policy becomes sandbox=X approval=Y, which over-permits Z / under-permits W."
97
+
98
+ ### Pi — NO permission surface at all (VM-confirmed Pi 0.83.0 — the earlier "approval bit" reading was WRONG)
99
+ - **Pi has no tool-permission gate — neither a config store NOR a permission-posture flag.** Live verification confirmed: Pi 0.83.0's `--approve`/`-a` and `--no-approve`/`-na` govern **project-resource trust** (whether project extensions/resources appear in RPC `get_commands`), **NOT** tool-call approval. There is no sandbox or permission mechanism to map a policy onto.
100
+ - So a permission policy **does not translate to Pi**. Do NOT say `--approve` = "auto-approve all", or that a posture "collapses to a Pi approval bit" — that was an earlier misread, corrected here. This skill computes **nothing** for Pi.
101
+ - Whatever the OpenRig adapter sets (`--no-approve` by default) is a project-resource-trust floor, not a permission posture — not this skill's to derive.
102
+ - Behavior to know (resource-trust, NOT permission-gating): under default ask / `--no-approve`, a project resource is silently **absent** from RPC `get_commands`; it appears under `--approve`. Never mistake that for permission enforcement.
103
+ - **Say this to the user for a Pi seat:** "Pi has no permission-policy surface today — the policy applies to Claude/Codex; Pi runs under its project-resource-trust flag unchanged."
104
+
105
+ ## ⚠ The two warnings that save real fleets
106
+ - **`ask` FREEZES an autonomous/headless Claude seat** — it hangs on the first non-edit op. So for autonomous fleets apply **Open/YOLO** (or a policy with no asks) **at setup** — the floor only covers edits; bash still asks without an applied policy. Never leave an autonomous seat on a policy with live `ask` gates. (Pi has no permission ask at all — see the Pi leg; Codex prompts per its posture, not per-action.)
107
+ - **daemon-HOME ≠ seat-HOME** silently voids user-level writes — always the preflight check above.
108
+
109
+ ## The built-ins — DEFINED by the shipped policy spec files (translate FROM the spec; POINT, don't COPY)
110
+ The four built-in policies ship as read-only spec files (`source: builtin`, `policy_schema_version: 1`) — they are the AUTHORITATIVE definitions. **Do NOT restate their action-sets here.** An earlier in-skill copy drifted (it under-asked `publish_package`/`merge_or_release`, which the spec ASKs) — the exact reason POINT-don't-COPY is the rule. Read the attached/selected spec and translate its semantic-action sets (`default_posture` / `allow` / `ask` / `deny` / `destructive_class`) per the three legs above.
111
+ - **Locked / Standard ⭐ / Open** — `surface: config`. Translate to the Claude / Codex config surface. **Standard ⭐** is the recommended default: routine dev incl. push allowed, the outward/release/history-rewriting acts (`create_pr`, `publish_package`, `merge_or_release`, `force_push`) ASK, destructive_class ASKs. Standard has live `ask` gates → not for a headless-autonomous Claude seat (use Open or YOLO). Locked = deny-default whitelist; Open = allow-default, destructive_class asks only.
112
+ - **YOLO** — `surface: flag`, `launch_posture: full_bypass`. This skill does **NOT** translate it — it points at OpenRig's deterministic flag-surface opt-in (the rip-out YOLO setting). When YOLO is on, any config-surface policy is MOOT (the bypass overrides it). (Subsumes the former "Operator".)
113
+
114
+ Built-ins ship read-only in the package (canonical names); copy-to-customize into user space (custom, user-named); the `source:` frontmatter marker travels on copy. Onboarding presents these as a required MENU (explain each + ask which; no-choice = the floor).
115
+
116
+ ## Boundary (keeps this the only maintained piece)
117
+ This skill TRANSLATES + APPLIES only. It does **not** define policies (the policy spec does) and does **not** enforce at the daemon (OpenRig is agnostic). Spec = *what* (neutral intent); this skill = *how, on this harness version* (the caveated, version-stamped translation).
118
+
119
+ ---
120
+ *Stage: ESTABLISHED (2026-08-04) — both criteria met: (1) cold-transfer PASSING (rerun #2, all 5 gate checks TRANSFER); (2) the built-in policy SPEC FILES landed (`source: builtin`, arch-accepted) as the authoritative source — the skill now translates FROM the spec and the interim in-skill pinned summary is retired (POINT-not-COPY). Config cells VM-CONFIRMED (Claude 2.1.220 / Codex 0.120.0); Pi has no permission surface (compute-nothing). Reviewed at push. feedback.md maintained.*
@@ -0,0 +1,10 @@
1
+ # GENERATED by scripts/generate-context-packs.mjs — DO NOT EDIT.
2
+ # Package-time projection of a canonical skill; regenerated every build.
3
+ name: "applying-a-permission-policy"
4
+ version: "0.5.7"
5
+ taxonomy: "skills"
6
+ purpose: "Use when a permission policy is attached to a rig/seat (rig.yaml permission_policy:), or a user asks you to apply one, and you must translate that harness-neutral policy into the target harness's LIVE permission config — Claude settings.json / Codex config.toml / Pi run flags. Agent-driven and interactive: you read the policy, ground yourself in YOUR harness version, show the diff, and ask before writing. NOT for defining policies (that's the policy spec) and NOT a set-and-forget updater."
7
+ files:
8
+ - path: "SKILL.md"
9
+ role: "instruction"
10
+ summary: "Use when a permission policy is attached to a rig/seat (rig.yaml permission_policy:), or a user asks you to apply one, and you must translate that harness-neutral policy into the target harness's LIVE permission config — Claude settings.json / Codex config.toml / Pi run flags. Agent-driven and interactive: you read the policy, ground yourself in YOUR harness version, show the diff, and ask before writing. NOT for defining policies (that's the policy spec) and NOT a set-and-forget updater."
@@ -0,0 +1,166 @@
1
+ ---
2
+ name: claude-compaction-restore
3
+ description: Use when a Claude Code session has just compacted, is about to compact, reached context limit, resumed after /compact, or needs to rebuild its working mental model from Claude JSONL transcripts and touched files.
4
+ metadata:
5
+ openrig:
6
+ stage: factory-approved
7
+ sibling_skills:
8
+ - mental-model-ha
9
+ - scope-recovery
10
+ - session-compaction-and-restore
11
+ - agent-startup-and-context-ingestion
12
+ - agent-starters
13
+ - composable-priming-packs
14
+ - session-source-fork
15
+ - seat-continuity-and-handover
16
+ - claude-compact-in-place
17
+ - pre-maintenance-agent-preservation
18
+ ---
19
+
20
+ # Claude Compaction Restore
21
+
22
+ Use this skill to preserve continuity before Claude Code compacts and to
23
+ restore continuity after compaction. Do the work described here; do not merely
24
+ explain the protocol.
25
+
26
+ ## If You Are About To Compact
27
+
28
+ Prepare durable continuity before the context boundary.
29
+
30
+ 1. Identify the active task, queue item, mission/slice, branch or commit, and
31
+ current working directory.
32
+ 2. Record the current state: decisions made, files changed, commands/tests run,
33
+ evidence produced, blockers, caveats, and the next concrete step.
34
+ 3. Create or update a durable mental-model restore map. This map is the main
35
+ artifact future-you will use to rebuild context after compaction.
36
+ 4. In the restore map, write an ASCII file/folder tree of every path that
37
+ mattered to your working mental model during this session. Include:
38
+ - the active queue item or mission packet;
39
+ - mission notes, progress, decisions, and evidence files;
40
+ - Claude memory/project notes you used or wrote, especially when the memory
41
+ folder is shared by many agents;
42
+ - files with active edits or recently inspected source;
43
+ - root instructions such as `AGENTS.md`, `CLAUDE.md`, or `README.md`;
44
+ - as-built docs, codemaps, conventions, skills, and product docs needed
45
+ before code/review work;
46
+ - source files, tests, scripts, UI evidence, screenshots, logs, or reports
47
+ that shaped your current state.
48
+ 5. For every file or folder in the tree, add a short note explaining why it
49
+ matters and whether it is required reading after compaction.
50
+ 6. Write any important glue context that is not already on disk into the
51
+ handoff/restore map. This includes assumptions, partial conclusions, failed
52
+ paths, and why the listed files fit together.
53
+ 7. In the compaction summary, include the restore map path and the top required
54
+ reading paths from that map.
55
+
56
+ ## If You Just Compacted
57
+
58
+ Treat your memory as unreliable until you restore from durable evidence.
59
+ Restoration is your current task. Do not wait for a future user request or a
60
+ new task assignment before reading the required files.
61
+
62
+ 1. Read any restore prompt, marker path, packet path, transcript path, restore
63
+ map, or extra instruction file named by the operator or OpenRig.
64
+ 2. Run the restore script from this skill:
65
+
66
+ ```bash
67
+ node ~/.claude/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs --out /tmp/claude-compaction-restore
68
+ ```
69
+
70
+ If the prompt names a specific Claude JSONL transcript, pass it explicitly:
71
+
72
+ ```bash
73
+ node ~/.claude/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs /path/to/session.jsonl --out /tmp/claude-compaction-restore
74
+ ```
75
+
76
+ 3. Read the generated `restore-instructions.md`.
77
+ 4. Read the generated `touched-files.md`.
78
+ 5. Find and read the mental-model restore map if one exists. Treat it as the
79
+ highest-value guide to which memory files, mission files, source files, and
80
+ docs mattered before compaction.
81
+ 6. Identify the important files for the active task. The touched-file list is
82
+ a triage aid, not a complete inventory.
83
+ 7. Read every important file in full. Prioritize the restore map, Claude memory
84
+ files named in the map, Markdown state/planning files, queue/mission packets,
85
+ source files with active edits, root instruction files, and as-built or
86
+ codemap docs.
87
+ 8. After the required reads are complete, state:
88
+
89
+ ```text
90
+ restored from packet at <path>; resumed at step <X>
91
+ ```
92
+
93
+ Include the main files you read in full when you make that statement.
94
+
95
+ 9. **REFOCUS BEFORE YOU RESUME — the restore returns your TASK, not your BEARINGS.** Everything
96
+ above rebuilds *what you were doing*. None of it rebuilds *what the work is for* or *how this
97
+ rig operates* — those live in the chains, and nothing in steps 1–8 walks them. Invoke the
98
+ `refocus` skill and do its reads before your next substantive move.
99
+
100
+ **Measured 2026-08-13, and this step exists because of it:** a seat completed this protocol
101
+ faithfully — packet built, narrative read tail-first, read-depth audit reported honestly — and
102
+ resumed with a perfect picture of its atom and *zero* work-tree context. It had never opened
103
+ the mission or project nodes, and could only paraphrase the release's intent second-hand from
104
+ a peer's message. It then produced a technically-correct trace concluding *"I hold nothing"*
105
+ while holding 18 pending rows. **A restore that returns you to your task without your bearings
106
+ is how a confidently-wrong agent gets back to work.**
107
+
108
+ **On the marker and the packet's size (measured across restores, 2026-08):** two realities the restore
109
+ must handle honestly —
110
+
111
+ - **The per-seat marker (`restore-pending/<session>.json`) is frequently absent** — in five observed
112
+ restores it was never present. Treat the JSONL rebuild via `restore-from-jsonl.mjs` as the **primary**
113
+ path, not a fallback: run it regardless of whether a marker exists. (When product-infra reliably writes
114
+ the marker for tmux-launched seats, it becomes a fast-path upgrade — not a prerequisite that keeps failing.)
115
+ - **The generated transcript can be very large** (measured at ~346k tokens in one restore). Do **not**
116
+ read it front-to-back or claim to. `restore-instructions.md` declares its token cost up front; default
117
+ to the **most recent ~50k tokens of unique narrative first** (recency is what a restore needs — the
118
+ thread that produced the current frontier, not the boot handshake), and go earlier only if a specific
119
+ question requires it. A restore must leave room for the work it was restored to do.
120
+
121
+ ## Required Read-Depth Audit
122
+
123
+ After the first restore pass, audit yourself before continuing.
124
+
125
+ 1. List every file, packet, marker, restore map, instruction file, and source
126
+ document you were asked to read during restore.
127
+ 2. Mark each item as `FULL`, `PARTIAL`, or `NOT_READ`.
128
+ 3. You will be given a task where all of these files are required reading in
129
+ order to understand the task.
130
+ 4. Read `PARTIAL`/`NOT_READ` items in full — but **to a declared budget with a stopping rule**, not
131
+ unbounded. Prioritize by relevance to the active task; for a large transcript read the most recent
132
+ unique narrative first (see *If You Just Compacted*), not front-to-back.
133
+ 5. **Stop** when either every task-relevant item is `FULL`, or you reach the budget — *a restore that
134
+ cannot leave room for the work it was restored to do is not a successful restore.* "Read everything,
135
+ never conserve" has no termination condition; that open-endedness is the bug, not the goal.
136
+ 6. Report the final read-depth table **honestly** (`FULL`/`PARTIAL`/`NOT_READ`, each with a reason)
137
+ before task work. **An honest `PARTIAL` with its reason is a correct outcome, not a failure** — do
138
+ not claim a completion you did not reach.
139
+
140
+ ## Guardrails
141
+
142
+ - Compaction is survival, not housekeeping — never compact to free space, "lean" a seat, or capture/prepare an agent starter (the `rig agent-image` library). It is lossy (a compacted Claude is confident-but-hollow); compact only when a seat is genuinely near its context limit, with a before/after plan. A starter's value is being *functional*, not small — see the `agent-starters` skill.
143
+ - Do not silently launch fresh after compaction.
144
+ - Do not continue from memory when restore evidence exists.
145
+ - Do not defer required restore reading until a later user task. The restore is
146
+ the current task.
147
+ - Do not skip root instructions, as-built docs, or codemaps before product
148
+ code/review work.
149
+ - Do not treat the generated touched-file list as exhaustive.
150
+ - Do not mark a file `FULL` unless you actually read the full file content
151
+ after compaction.
152
+ - Do not resume task work until the restore sentinel and read-depth audit are
153
+ complete.
154
+
155
+ ## Failure Modes To Avoid
156
+
157
+ 1. **Confidently-wrong restoration**: claiming restoration after reading only
158
+ the touched-file list or summary.
159
+ 2. **Partial restore**: reading the first few files, then continuing before the
160
+ full reading list is complete.
161
+ 3. **Skipping project instructions**: missing `AGENTS.md`, `CLAUDE.md`,
162
+ `README.md`, as-built docs, or codemaps that govern the task.
163
+ 4. **Treating the packet as exhaustive**: ignoring mission or workspace files
164
+ that are important but were not discovered by the script.
165
+ 5. **Waiting for the next task**: treating restore reading as conditional on a
166
+ future user assignment instead of completing it immediately.
@@ -0,0 +1,18 @@
1
+ # GENERATED by scripts/generate-context-packs.mjs — DO NOT EDIT.
2
+ # Package-time projection of a canonical skill; regenerated every build.
3
+ name: "claude-compaction-restore"
4
+ version: "0.5.7"
5
+ taxonomy: "skills"
6
+ purpose: "Use when a Claude Code session has just compacted, is about to compact, reached context limit, resumed after /compact, or needs to rebuild its working mental model from Claude JSONL transcripts and touched files."
7
+ files:
8
+ - path: "SKILL.md"
9
+ role: "instruction"
10
+ summary: "Use when a Claude Code session has just compacted, is about to compact, reached context limit, resumed after /compact, or needs to rebuild its working mental model from Claude JSONL transcripts and touched files."
11
+ - path: "scripts/precompact-hook.mjs"
12
+ role: "reference"
13
+ - path: "scripts/restore-from-jsonl.mjs"
14
+ role: "reference"
15
+ - path: "templates/compact-instruction.md"
16
+ role: "reference"
17
+ - path: "templates/post-compact-restore-instruction.md"
18
+ role: "reference"
@@ -0,0 +1,174 @@
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
+
7
+ const skillRoot = path.resolve(new URL("..", import.meta.url).pathname);
8
+ const restoreScript = path.join(skillRoot, "scripts", "restore-from-jsonl.mjs");
9
+ const outRoot = "/tmp/claude-compaction-restore";
10
+ const defaultRestoreInstruction =
11
+ "Read the claude-compaction-restore skill and follow its \"If You Just Compacted\" protocol.";
12
+
13
+ function emit(payload) {
14
+ process.stdout.write(`${JSON.stringify(payload)}\n`);
15
+ }
16
+
17
+ function readHookInput() {
18
+ const raw = fs.readFileSync(0, "utf8").trim();
19
+ if (!raw) return {};
20
+ return JSON.parse(raw);
21
+ }
22
+
23
+ function getOpenRigHome() {
24
+ return process.env.OPENRIG_HOME || process.env.RIGGED_HOME || path.join(os.homedir(), ".openrig");
25
+ }
26
+
27
+ function expandInstructionPath(filePath) {
28
+ if (filePath.startsWith("~/")) return path.join(os.homedir(), filePath.slice(2));
29
+ if (filePath.startsWith("${OPENRIG_HOME}/")) {
30
+ return path.join(getOpenRigHome(), filePath.slice("${OPENRIG_HOME}/".length));
31
+ }
32
+ if (filePath.startsWith("$OPENRIG_HOME/")) {
33
+ return path.join(getOpenRigHome(), filePath.slice("$OPENRIG_HOME/".length));
34
+ }
35
+ return filePath;
36
+ }
37
+
38
+ function readInstructionFile(filePath) {
39
+ const expanded = expandInstructionPath(filePath);
40
+ if (!fs.existsSync(expanded)) return "";
41
+ return fs.readFileSync(expanded, "utf8");
42
+ }
43
+
44
+ function sessionKey(input) {
45
+ const raw = [
46
+ process.env.OPENRIG_SESSION_NAME,
47
+ process.env.RIGGED_SESSION_NAME,
48
+ input.session_id,
49
+ input.sessionId,
50
+ input.session_name,
51
+ input.sessionName,
52
+ input.transcript_path ? path.basename(input.transcript_path, ".jsonl") : "",
53
+ ].find((value) => typeof value === "string" && value.trim().length > 0) || "unknown-session";
54
+ return raw.replace(/[^a-zA-Z0-9_.@-]/g, "_");
55
+ }
56
+
57
+ function pendingMarkerPath(input) {
58
+ return path.join(getOpenRigHome(), "compaction", "restore-pending", `${sessionKey(input)}.json`);
59
+ }
60
+
61
+ function writePendingRestoreMarker(input, parsed, restoreInstruction, customMessage) {
62
+ const markerPath = pendingMarkerPath(input);
63
+ fs.mkdirSync(path.dirname(markerPath), { recursive: true });
64
+ const payload = {
65
+ version: 1,
66
+ createdAt: new Date().toISOString(),
67
+ sessionName: process.env.OPENRIG_SESSION_NAME || process.env.RIGGED_SESSION_NAME || null,
68
+ sessionId: input.session_id || input.sessionId || null,
69
+ transcriptPath: input.transcript_path || null,
70
+ cwd: input.cwd || null,
71
+ outputDir: parsed.outputDir,
72
+ restoreInstruction,
73
+ postCompactInstruction: customMessage || "",
74
+ expectedAck: "restored from packet at <path>; resumed at step <X>",
75
+ deliveredAt: null,
76
+ deliveryCount: 0,
77
+ };
78
+ fs.writeFileSync(markerPath, `${JSON.stringify(payload, null, 2)}\n`, "utf8");
79
+ return markerPath;
80
+ }
81
+
82
+ // Slice 27 — read the OpenRig config directly (no daemon HTTP dependency
83
+ // so the hook still works when the daemon isn't running or isn't
84
+ // reachable from this process). Returns "" for either field when the
85
+ // config is missing, malformed, or the policy isn't set. If the policy is
86
+ // enabled but restore text has not been written yet, use OpenRig's default
87
+ // instruction to load the canonical restore skill. Inline instructions and
88
+ // file-path content are both included when both are configured.
89
+ function readClaudeCompactionMessage() {
90
+ const configPath = path.join(getOpenRigHome(), "config.json");
91
+ let inline = "";
92
+ let filePath = "";
93
+ let inlineConfigured = false;
94
+ let filePathConfigured = false;
95
+ let policyEnabled = false;
96
+ try {
97
+ if (!fs.existsSync(configPath)) return "";
98
+ const raw = fs.readFileSync(configPath, "utf8");
99
+ const parsed = JSON.parse(raw);
100
+ const policy = parsed?.policies?.claudeCompaction;
101
+ if (policy && typeof policy === "object") {
102
+ policyEnabled = policy.enabled === true;
103
+ if (typeof policy.messageInline === "string") {
104
+ inlineConfigured = true;
105
+ inline = policy.messageInline;
106
+ }
107
+ if (typeof policy.messageFilePath === "string") {
108
+ filePathConfigured = true;
109
+ filePath = policy.messageFilePath;
110
+ }
111
+ }
112
+ } catch {
113
+ return "";
114
+ }
115
+
116
+ const parts = [];
117
+ if (inline && inline.length > 0) {
118
+ parts.push(`Inline restore instruction:\n${inline}`);
119
+ }
120
+ if (filePath && filePath.length > 0) {
121
+ try {
122
+ const fileText = readInstructionFile(filePath);
123
+ if (fileText) {
124
+ parts.push(`Additional restore instruction file (${filePath}):\n${fileText}`);
125
+ }
126
+ } catch {
127
+ // Keep any inline instruction; unreadable extra files degrade quietly.
128
+ }
129
+ }
130
+ if (parts.length > 0) return parts.join("\n\n");
131
+ if (policyEnabled && !inlineConfigured && !filePathConfigured) {
132
+ return defaultRestoreInstruction;
133
+ }
134
+ return "";
135
+ }
136
+
137
+ function buildSystemMessage(restoreInstruction, customMessage) {
138
+ if (!customMessage) return restoreInstruction;
139
+ return `${restoreInstruction}\n\n--- Operator-configured post-compaction restore instruction ---\n${customMessage}`;
140
+ }
141
+
142
+ try {
143
+ const input = readHookInput();
144
+ const args = [restoreScript, "--out", outRoot, "--json"];
145
+ if (input.cwd) args.push("--cwd", input.cwd);
146
+ if (input.transcript_path && input.transcript_path.endsWith(".jsonl") && fs.existsSync(input.transcript_path)) {
147
+ args.push(input.transcript_path);
148
+ }
149
+
150
+ const customMessage = readClaudeCompactionMessage();
151
+
152
+ const result = spawnSync("node", args, { encoding: "utf8" });
153
+ if (result.status !== 0) {
154
+ const baseFailure = `Claude compaction restore packet generation failed: ${(result.stderr || result.stdout || "unknown error").trim()}. After compaction, load the claude-compaction-restore skill and run restore-from-jsonl manually.`;
155
+ emit({
156
+ continue: true,
157
+ systemMessage: buildSystemMessage(baseFailure, customMessage),
158
+ });
159
+ process.exit(0);
160
+ }
161
+
162
+ const parsed = JSON.parse(result.stdout);
163
+ const baseRestore = `Pre-compaction restore seed packet prepared at ${parsed.outputDir}. This hook output is informational. After compaction, OpenRig may send a later normal user message asking you to restore from this packet; treat that later normal user message as the action request. The restore protocol is: load/read the claude-compaction-restore skill, run "node ~/.claude/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs --out /tmp/claude-compaction-restore --json" yourself when needed, read the generated restore-instructions.md, read the generated touched-files.md, identify remembered important files, read those files in full, read root/as-built/codemap docs before real work, then reply with "restored from packet at <path>; resumed at step <X>" with the files you read in full. If any step fails, report the failure explicitly.`;
164
+ const markerPath = writePendingRestoreMarker(input, parsed, baseRestore, customMessage);
165
+ emit({
166
+ continue: true,
167
+ systemMessage: buildSystemMessage(`${baseRestore} OpenRig also wrote a pending restore marker at ${markerPath}.`, customMessage),
168
+ });
169
+ } catch (error) {
170
+ emit({
171
+ continue: true,
172
+ systemMessage: `Claude compaction restore hook errored: ${error.message}. After compaction, load the claude-compaction-restore skill and run restore-from-jsonl manually.`,
173
+ });
174
+ }