@openrig/cli 0.5.2 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/README.md +1 -1
- package/daemon/assets/plugins/openrig-core/hooks/claude.json +36 -0
- package/daemon/assets/plugins/openrig-core/hooks/codex.json +27 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +152 -0
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +35 -3
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +8 -95
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +63 -20
- package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +6 -2
- package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +28 -2
- package/daemon/assets/plugins/openrig-core/skills/mission-slice-sop/SKILL.md +42 -52
- package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +26 -1
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +7 -2
- package/daemon/assets/plugins/openrig-core/skills/orienting-to-an-inherited-seat/CHANGELOG.md +64 -0
- package/daemon/assets/plugins/openrig-core/skills/orienting-to-an-inherited-seat/SKILL.md +235 -0
- package/daemon/assets/plugins/openrig-core/skills/queue-handoff/SKILL.md +31 -1
- package/daemon/assets/plugins/openrig-core/skills/retiring-and-inheriting-a-seat/CHANGELOG.md +48 -0
- package/daemon/assets/plugins/openrig-core/skills/retiring-and-inheriting-a-seat/SKILL.md +211 -0
- package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +8 -0
- package/daemon/assets/plugins/openrig-core/skills/software-for-agents/SKILL.md +31 -9
- package/daemon/context-packs/skills/core/agent-starters/SKILL.md +132 -0
- package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/SKILL.md +112 -0
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/attention-queue/SKILL.md +264 -0
- package/daemon/context-packs/skills/core/attention-queue/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/cross-host-rig-commands/SKILL.md +195 -0
- package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/human-in-the-loop/SKILL.md +104 -0
- package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/openrig-architect/SKILL.md +378 -0
- package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/openrig-cmux/SKILL.md +81 -0
- package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/openrig-herdr/SKILL.md +153 -0
- package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/openrig-upgrade/SKILL.md +460 -0
- package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/SKILL.md +101 -0
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/rig-lifecycle/SKILL.md +127 -0
- package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/session-source-fork/SKILL.md +160 -0
- package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/specification-system/SKILL.md +103 -0
- package/daemon/context-packs/skills/core/specification-system/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/SKILL.md +118 -0
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/watchdog/SKILL.md +126 -0
- package/daemon/context-packs/skills/core/watchdog/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pm/backlog-capture/SKILL.md +43 -0
- package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pm/context-builder/SKILL.md +87 -0
- package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pm/exec-summary/SKILL.md +84 -0
- package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pm/office-hours/SKILL.md +129 -0
- package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pm/plan-review/SKILL.md +98 -0
- package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pm/requirements-writer/SKILL.md +113 -0
- package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pm/ui-mockup/SKILL.md +76 -0
- package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pods/development-team/SKILL.md +156 -0
- package/daemon/context-packs/skills/pods/development-team/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pods/orchestration-team/SKILL.md +307 -0
- package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pods/oversight-team/SKILL.md +106 -0
- package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pods/review-team/SKILL.md +213 -0
- package/daemon/context-packs/skills/pods/review-team/manifest.yaml +9 -0
- package/daemon/context-packs/skills/process/agent-browser/LOCAL-INSIGHTS.md +189 -0
- package/daemon/context-packs/skills/process/agent-browser/OPENRIG.md +40 -0
- package/daemon/context-packs/skills/process/agent-browser/SKILL.md +427 -0
- package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +13 -0
- package/daemon/context-packs/skills/process/brainstorming/OPENRIG.md +48 -0
- package/daemon/context-packs/skills/process/brainstorming/SKILL.md +107 -0
- package/daemon/context-packs/skills/process/brainstorming/manifest.yaml +11 -0
- package/daemon/context-packs/skills/process/context-engineering/SKILL.md +479 -0
- package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +9 -0
- package/daemon/context-packs/skills/process/dogfood/SKILL.md +225 -0
- package/daemon/context-packs/skills/process/dogfood/manifest.yaml +13 -0
- package/daemon/context-packs/skills/process/dogfood/references/issue-taxonomy.md +109 -0
- package/daemon/context-packs/skills/process/dogfood/templates/dogfood-report-template.md +53 -0
- package/daemon/context-packs/skills/process/executing-plans/OPENRIG.md +56 -0
- package/daemon/context-packs/skills/process/executing-plans/SKILL.md +94 -0
- package/daemon/context-packs/skills/process/executing-plans/manifest.yaml +11 -0
- package/daemon/context-packs/skills/process/frontend-design/LICENSE.txt +177 -0
- package/daemon/context-packs/skills/process/frontend-design/SKILL.md +50 -0
- package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +11 -0
- package/daemon/context-packs/skills/process/systematic-debugging/SKILL.md +301 -0
- package/daemon/context-packs/skills/process/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/daemon/context-packs/skills/process/systematic-debugging/condition-based-waiting.md +115 -0
- package/daemon/context-packs/skills/process/systematic-debugging/defense-in-depth.md +122 -0
- package/daemon/context-packs/skills/process/systematic-debugging/find-polluter.sh +63 -0
- package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +19 -0
- package/daemon/context-packs/skills/process/systematic-debugging/root-cause-tracing.md +169 -0
- package/daemon/context-packs/skills/process/test-driven-development/SKILL.md +385 -0
- package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +11 -0
- package/daemon/context-packs/skills/process/test-driven-development/testing-anti-patterns.md +299 -0
- package/daemon/context-packs/skills/process/using-superpowers/OPENRIG.md +48 -0
- package/daemon/context-packs/skills/process/using-superpowers/SKILL.md +106 -0
- package/daemon/context-packs/skills/process/using-superpowers/manifest.yaml +11 -0
- package/daemon/context-packs/skills/process/verification-before-completion/SKILL.md +155 -0
- package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +9 -0
- package/daemon/context-packs/skills/process/writing-plans/OPENRIG.md +52 -0
- package/daemon/context-packs/skills/process/writing-plans/SKILL.md +126 -0
- package/daemon/context-packs/skills/process/writing-plans/manifest.yaml +11 -0
- package/daemon/context-packs/world/install/01-world-from-primitives.md +97 -0
- package/daemon/context-packs/world/install/02-permission-self-sleep.md +141 -0
- package/daemon/context-packs/world/install/03-what-this-is-for.md +86 -0
- package/daemon/context-packs/world/install/04-ontology.md +790 -0
- package/daemon/context-packs/world/install/05-harness-power-use.md +355 -0
- package/daemon/context-packs/world/install/06-a-competent-turn.md +225 -0
- package/daemon/context-packs/world/install/manifest.yaml +125 -0
- package/daemon/context-packs/world/install/reference-material.md +125 -0
- package/daemon/context-packs/world/install/what-you-can-do.md +416 -0
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +7 -4
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +2 -2
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +41 -2
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +58 -18
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/adapters/yolo-mode.d.ts +18 -0
- package/daemon/dist/adapters/yolo-mode.d.ts.map +1 -1
- package/daemon/dist/adapters/yolo-mode.js +21 -0
- package/daemon/dist/adapters/yolo-mode.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/daemon-db-path.d.ts.map +1 -1
- package/daemon/dist/daemon-db-path.js +50 -2
- package/daemon/dist/daemon-db-path.js.map +1 -1
- package/daemon/dist/domain/codex-thread-id.d.ts +95 -0
- package/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
- package/daemon/dist/domain/codex-thread-id.js +171 -2
- package/daemon/dist/domain/codex-thread-id.js.map +1 -1
- package/daemon/dist/domain/context-packs/context-pack-types.d.ts +48 -0
- package/daemon/dist/domain/context-packs/context-pack-types.d.ts.map +1 -1
- package/daemon/dist/domain/context-packs/context-pack-types.js +8 -0
- package/daemon/dist/domain/context-packs/context-pack-types.js.map +1 -1
- package/daemon/dist/domain/context-packs/manifest-parser.d.ts.map +1 -1
- package/daemon/dist/domain/context-packs/manifest-parser.js +234 -2
- package/daemon/dist/domain/context-packs/manifest-parser.js.map +1 -1
- package/daemon/dist/domain/context-packs/probe-eval-bridge.d.ts +34 -0
- package/daemon/dist/domain/context-packs/probe-eval-bridge.d.ts.map +1 -0
- package/daemon/dist/domain/context-packs/probe-eval-bridge.js +38 -0
- package/daemon/dist/domain/context-packs/probe-eval-bridge.js.map +1 -0
- package/daemon/dist/domain/context-packs/profile-composer.d.ts +49 -0
- package/daemon/dist/domain/context-packs/profile-composer.d.ts.map +1 -0
- package/daemon/dist/domain/context-packs/profile-composer.js +125 -0
- package/daemon/dist/domain/context-packs/profile-composer.js.map +1 -0
- package/daemon/dist/domain/context-packs/profile-source-resolver.d.ts +53 -0
- package/daemon/dist/domain/context-packs/profile-source-resolver.d.ts.map +1 -0
- package/daemon/dist/domain/context-packs/profile-source-resolver.js +129 -0
- package/daemon/dist/domain/context-packs/profile-source-resolver.js.map +1 -0
- package/daemon/dist/domain/context-packs/seat-recap-store.d.ts +48 -0
- package/daemon/dist/domain/context-packs/seat-recap-store.d.ts.map +1 -0
- package/daemon/dist/domain/context-packs/seat-recap-store.js +123 -0
- package/daemon/dist/domain/context-packs/seat-recap-store.js.map +1 -0
- package/daemon/dist/domain/markdown-address.d.ts +56 -0
- package/daemon/dist/domain/markdown-address.d.ts.map +1 -0
- package/daemon/dist/domain/markdown-address.js +188 -0
- package/daemon/dist/domain/markdown-address.js.map +1 -0
- package/daemon/dist/domain/model-divergence/current-generation-record.d.ts +8 -2
- package/daemon/dist/domain/model-divergence/current-generation-record.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/current-generation-record.js +1 -1
- package/daemon/dist/domain/model-divergence/current-generation-record.js.map +1 -1
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts +33 -21
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.js +64 -55
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.js.map +1 -1
- package/daemon/dist/domain/periodic-snapshot-scheduler.d.ts +4 -0
- package/daemon/dist/domain/periodic-snapshot-scheduler.d.ts.map +1 -1
- package/daemon/dist/domain/periodic-snapshot-scheduler.js +5 -1
- package/daemon/dist/domain/periodic-snapshot-scheduler.js.map +1 -1
- package/daemon/dist/domain/permission-drift-observer.d.ts.map +1 -1
- package/daemon/dist/domain/permission-drift-observer.js +6 -1
- package/daemon/dist/domain/permission-drift-observer.js.map +1 -1
- package/daemon/dist/domain/plugin-discovery-service.d.ts +16 -0
- package/daemon/dist/domain/plugin-discovery-service.d.ts.map +1 -1
- package/daemon/dist/domain/plugin-discovery-service.js +175 -1
- package/daemon/dist/domain/plugin-discovery-service.js.map +1 -1
- package/daemon/dist/domain/plugin-vendor-service.d.ts +9 -5
- package/daemon/dist/domain/plugin-vendor-service.d.ts.map +1 -1
- package/daemon/dist/domain/plugin-vendor-service.js +101 -12
- package/daemon/dist/domain/plugin-vendor-service.js.map +1 -1
- package/daemon/dist/domain/process-census.d.ts +25 -0
- package/daemon/dist/domain/process-census.d.ts.map +1 -0
- package/daemon/dist/domain/process-census.js +47 -0
- package/daemon/dist/domain/process-census.js.map +1 -0
- package/daemon/dist/domain/queue-repository.d.ts +3 -1
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +50 -2
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/reconciler.js +6 -1
- package/daemon/dist/domain/reconciler.js.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.d.ts +31 -2
- package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.js +64 -29
- package/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
- package/daemon/dist/domain/review/compose.d.ts +5 -26
- package/daemon/dist/domain/review/compose.d.ts.map +1 -1
- package/daemon/dist/domain/review/compose.js +31 -57
- package/daemon/dist/domain/review/compose.js.map +1 -1
- package/daemon/dist/domain/rig-repository.d.ts +4 -0
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +9 -0
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +13 -0
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +71 -0
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +19 -3
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/running-name-guard.d.ts +52 -0
- package/daemon/dist/domain/running-name-guard.d.ts.map +1 -0
- package/daemon/dist/domain/running-name-guard.js +34 -0
- package/daemon/dist/domain/running-name-guard.js.map +1 -0
- package/daemon/dist/domain/scope/logical-checkbox.d.ts +26 -0
- package/daemon/dist/domain/scope/logical-checkbox.d.ts.map +1 -0
- package/daemon/dist/domain/scope/logical-checkbox.js +65 -0
- package/daemon/dist/domain/scope/logical-checkbox.js.map +1 -0
- package/daemon/dist/domain/scope/plan-lock-artifacts.d.ts +1 -1
- package/daemon/dist/domain/scope/plan-lock-artifacts.d.ts.map +1 -1
- package/daemon/dist/domain/scope/plan-lock-artifacts.js +2 -2
- package/daemon/dist/domain/scope/plan-lock-artifacts.js.map +1 -1
- package/daemon/dist/domain/scope/scaffold-placeholder.d.ts +22 -0
- package/daemon/dist/domain/scope/scaffold-placeholder.d.ts.map +1 -1
- package/daemon/dist/domain/scope/scaffold-placeholder.js +24 -0
- package/daemon/dist/domain/scope/scaffold-placeholder.js.map +1 -1
- package/daemon/dist/domain/seat-activity-service.d.ts +1 -0
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-activity-service.js +39 -23
- package/daemon/dist/domain/seat-activity-service.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts +22 -0
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +32 -2
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +97 -0
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -0
- package/daemon/dist/domain/seat-lifecycle-service.js +312 -0
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -0
- package/daemon/dist/domain/session-transport.d.ts +16 -5
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +155 -16
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/shell-classifier.d.ts +23 -0
- package/daemon/dist/domain/shell-classifier.d.ts.map +1 -0
- package/daemon/dist/domain/shell-classifier.js +36 -0
- package/daemon/dist/domain/shell-classifier.js.map +1 -0
- package/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-detail-projector.js +10 -1
- package/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
- package/daemon/dist/domain/spec-validation-advisory.d.ts +17 -0
- package/daemon/dist/domain/spec-validation-advisory.d.ts.map +1 -0
- package/daemon/dist/domain/spec-validation-advisory.js +38 -0
- package/daemon/dist/domain/spec-validation-advisory.js.map +1 -0
- package/daemon/dist/domain/successor-session-launcher.d.ts +7 -0
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +38 -1
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/topology-defaults-installer.d.ts +47 -0
- package/daemon/dist/domain/topology-defaults-installer.d.ts.map +1 -0
- package/daemon/dist/domain/topology-defaults-installer.js +92 -0
- package/daemon/dist/domain/topology-defaults-installer.js.map +1 -0
- package/daemon/dist/domain/transcript-rotation.d.ts +4 -0
- package/daemon/dist/domain/transcript-rotation.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-rotation.js +61 -3
- package/daemon/dist/domain/transcript-rotation.js.map +1 -1
- package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-store.js +9 -2
- package/daemon/dist/domain/transcript-store.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +39 -0
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts +10 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.js +39 -0
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/routes/context-packs.d.ts.map +1 -1
- package/daemon/dist/routes/context-packs.js +205 -0
- package/daemon/dist/routes/context-packs.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +29 -24
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/rigspec.js +20 -6
- package/daemon/dist/routes/rigspec.js.map +1 -1
- package/daemon/dist/routes/seat.d.ts.map +1 -1
- package/daemon/dist/routes/seat.js +69 -0
- package/daemon/dist/routes/seat.js.map +1 -1
- package/daemon/dist/routes/sessions.js +55 -0
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/transport.d.ts.map +1 -1
- package/daemon/dist/routes/transport.js +52 -39
- package/daemon/dist/routes/transport.js.map +1 -1
- package/daemon/dist/routes/up.js +21 -2
- package/daemon/dist/routes/up.js.map +1 -1
- package/daemon/dist/seat-recap-store-surface.d.ts +2 -0
- package/daemon/dist/seat-recap-store-surface.d.ts.map +1 -0
- package/daemon/dist/seat-recap-store-surface.js +6 -0
- package/daemon/dist/seat-recap-store-surface.js.map +1 -0
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +37 -6
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/docs/reference/chain-file-convention.md +115 -0
- package/daemon/docs/reference/legacy-topology-migration.md +53 -0
- package/daemon/docs/reference/refocus-channel.md +80 -0
- package/daemon/docs/reference/sdlc-conventions.md +24 -0
- package/daemon/specs/agents/shared/skills/core/attention-queue/SKILL.md +1 -1
- package/daemon/specs/agents/shared/skills/core/human-in-the-loop/SKILL.md +1 -1
- package/daemon/specs/agents/shared/skills/core/session-source-fork/SKILL.md +1 -1
- package/daemon/specs/agents/shared/skills/core/watchdog/SKILL.md +4 -4
- package/daemon/specs/agents/shared/skills/pods/development-team/SKILL.md +8 -0
- package/daemon/specs/agents/shared/skills/pods/orchestration-team/SKILL.md +72 -31
- package/daemon/specs/agents/shared/skills/pods/oversight-team/SKILL.md +106 -0
- package/daemon/specs/agents/shared/skills/process/context-engineering/SKILL.md +479 -0
- package/daemon/specs/agents/shared/skills/process/test-driven-development/SKILL.md +9 -0
- package/daemon/specs/rigs/launch/demo/project-example/README.md +25 -0
- package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/SPEC.md +19 -0
- package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/PROGRESS.md +6 -0
- package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/PROOF.md +7 -0
- package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/SPEC.md +31 -0
- package/daemon/specs/rigs/preview/product-team/topology/instance/CRAFT.md +24 -0
- package/daemon/specs/rigs/preview/product-team/topology/rig/CRAFT.md +21 -0
- package/daemon/specs/rigs/preview/product-team/topology/rig/ORCHESTRATION-CRAFT.md +50 -0
- package/daemon/specs/rigs/preview/product-team/topology/seats/dev1-qa/CRAFT.md +13 -0
- package/daemon/specs/rigs/preview/product-team/topology/seats/orch1-lead/CRAFT.md +17 -0
- package/daemon/specs/rigs/preview/product-team/topology/seats/rev1-r1/CRAFT.md +17 -0
- package/daemon/specs/rigs/preview/product-team/topology/seats/rev1-r2/CRAFT.md +15 -0
- package/dist/build-info.js +3 -3
- package/dist/cli-error.js +1 -1
- package/dist/cli-error.js.map +1 -1
- package/dist/commands/broadcast.js +6 -0
- package/dist/commands/broadcast.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +8 -0
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +363 -48
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +23 -2
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/import.d.ts.map +1 -1
- package/dist/commands/import.js +10 -0
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/proof.d.ts.map +1 -1
- package/dist/commands/proof.js +70 -12
- package/dist/commands/proof.js.map +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +36 -13
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/rig.d.ts.map +1 -1
- package/dist/commands/rig.js +5 -0
- package/dist/commands/rig.js.map +1 -1
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +88 -0
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +224 -20
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/transcript.d.ts.map +1 -1
- package/dist/commands/transcript.js +25 -1
- package/dist/commands/transcript.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +8 -0
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/walk.d.ts +1 -1
- package/dist/commands/walk.d.ts.map +1 -1
- package/dist/commands/walk.js +293 -30
- package/dist/commands/walk.js.map +1 -1
- package/dist/config-store.d.ts +15 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +35 -1
- package/dist/config-store.js.map +1 -1
- package/dist/lib/scope/logical-checkbox.d.ts +26 -0
- package/dist/lib/scope/logical-checkbox.d.ts.map +1 -0
- package/dist/lib/scope/logical-checkbox.js +65 -0
- package/dist/lib/scope/logical-checkbox.js.map +1 -0
- package/dist/lib/scope/scaffold-placeholder.d.ts +22 -0
- package/dist/lib/scope/scaffold-placeholder.d.ts.map +1 -1
- package/dist/lib/scope/scaffold-placeholder.js +24 -0
- package/dist/lib/scope/scaffold-placeholder.js.map +1 -1
- package/dist/lib/topology-trace.d.ts +36 -0
- package/dist/lib/topology-trace.d.ts.map +1 -0
- package/dist/lib/topology-trace.js +91 -0
- package/dist/lib/topology-trace.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/adapters/claude-code-adapter.js +7 -4
- package/node_modules/@openrig/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/adapters/claude-resume.js +2 -2
- package/node_modules/@openrig/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/adapters/tmux.d.ts +41 -2
- package/node_modules/@openrig/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/adapters/tmux.js +58 -18
- package/node_modules/@openrig/daemon/dist/adapters/tmux.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/adapters/yolo-mode.d.ts +18 -0
- package/node_modules/@openrig/daemon/dist/adapters/yolo-mode.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/adapters/yolo-mode.js +21 -0
- package/node_modules/@openrig/daemon/dist/adapters/yolo-mode.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/build-info.js +3 -3
- package/node_modules/@openrig/daemon/dist/daemon-db-path.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/daemon-db-path.js +50 -2
- package/node_modules/@openrig/daemon/dist/daemon-db-path.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/codex-thread-id.d.ts +95 -0
- package/node_modules/@openrig/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/codex-thread-id.js +171 -2
- package/node_modules/@openrig/daemon/dist/domain/codex-thread-id.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.d.ts +48 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.js +8 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.js +234 -2
- package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/context-packs/probe-eval-bridge.d.ts +34 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/probe-eval-bridge.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/probe-eval-bridge.js +38 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/probe-eval-bridge.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.d.ts +49 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.js +125 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.d.ts +53 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.js +129 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/seat-recap-store.d.ts +48 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/seat-recap-store.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/seat-recap-store.js +123 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/seat-recap-store.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/markdown-address.d.ts +56 -0
- package/node_modules/@openrig/daemon/dist/domain/markdown-address.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/markdown-address.js +188 -0
- package/node_modules/@openrig/daemon/dist/domain/markdown-address.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.d.ts +8 -2
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.js +1 -1
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts +33 -21
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/model-divergence-monitor.js +64 -55
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/model-divergence-monitor.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/periodic-snapshot-scheduler.d.ts +4 -0
- package/node_modules/@openrig/daemon/dist/domain/periodic-snapshot-scheduler.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/periodic-snapshot-scheduler.js +5 -1
- package/node_modules/@openrig/daemon/dist/domain/periodic-snapshot-scheduler.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/permission-drift-observer.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/permission-drift-observer.js +6 -1
- package/node_modules/@openrig/daemon/dist/domain/permission-drift-observer.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/plugin-discovery-service.d.ts +16 -0
- package/node_modules/@openrig/daemon/dist/domain/plugin-discovery-service.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/plugin-discovery-service.js +175 -1
- package/node_modules/@openrig/daemon/dist/domain/plugin-discovery-service.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/plugin-vendor-service.d.ts +9 -5
- package/node_modules/@openrig/daemon/dist/domain/plugin-vendor-service.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/plugin-vendor-service.js +101 -12
- package/node_modules/@openrig/daemon/dist/domain/plugin-vendor-service.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/process-census.d.ts +25 -0
- package/node_modules/@openrig/daemon/dist/domain/process-census.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/process-census.js +47 -0
- package/node_modules/@openrig/daemon/dist/domain/process-census.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/queue-repository.d.ts +3 -1
- package/node_modules/@openrig/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/queue-repository.js +50 -2
- package/node_modules/@openrig/daemon/dist/domain/queue-repository.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/reconciler.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/reconciler.js +6 -1
- package/node_modules/@openrig/daemon/dist/domain/reconciler.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/resume-metadata-refresher.d.ts +31 -2
- package/node_modules/@openrig/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/resume-metadata-refresher.js +64 -29
- package/node_modules/@openrig/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/review/compose.d.ts +5 -26
- package/node_modules/@openrig/daemon/dist/domain/review/compose.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/review/compose.js +31 -57
- package/node_modules/@openrig/daemon/dist/domain/review/compose.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rig-repository.d.ts +4 -0
- package/node_modules/@openrig/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rig-repository.js +9 -0
- package/node_modules/@openrig/daemon/dist/domain/rig-repository.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.d.ts +13 -0
- package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.js +71 -0
- package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.js +19 -3
- package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/running-name-guard.d.ts +52 -0
- package/node_modules/@openrig/daemon/dist/domain/running-name-guard.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/running-name-guard.js +34 -0
- package/node_modules/@openrig/daemon/dist/domain/running-name-guard.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/scope/logical-checkbox.d.ts +26 -0
- package/node_modules/@openrig/daemon/dist/domain/scope/logical-checkbox.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/scope/logical-checkbox.js +65 -0
- package/node_modules/@openrig/daemon/dist/domain/scope/logical-checkbox.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/scope/plan-lock-artifacts.d.ts +1 -1
- package/node_modules/@openrig/daemon/dist/domain/scope/plan-lock-artifacts.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/scope/plan-lock-artifacts.js +2 -2
- package/node_modules/@openrig/daemon/dist/domain/scope/plan-lock-artifacts.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/scope/scaffold-placeholder.d.ts +22 -0
- package/node_modules/@openrig/daemon/dist/domain/scope/scaffold-placeholder.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/scope/scaffold-placeholder.js +24 -0
- package/node_modules/@openrig/daemon/dist/domain/scope/scaffold-placeholder.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/seat-activity-service.d.ts +1 -0
- package/node_modules/@openrig/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/seat-activity-service.js +39 -23
- package/node_modules/@openrig/daemon/dist/domain/seat-activity-service.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/seat-handover-service.d.ts +22 -0
- package/node_modules/@openrig/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/seat-handover-service.js +32 -2
- package/node_modules/@openrig/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/seat-lifecycle-service.d.ts +97 -0
- package/node_modules/@openrig/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/seat-lifecycle-service.js +312 -0
- package/node_modules/@openrig/daemon/dist/domain/seat-lifecycle-service.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/session-transport.d.ts +16 -5
- package/node_modules/@openrig/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/session-transport.js +155 -16
- package/node_modules/@openrig/daemon/dist/domain/session-transport.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/shell-classifier.d.ts +23 -0
- package/node_modules/@openrig/daemon/dist/domain/shell-classifier.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/shell-classifier.js +36 -0
- package/node_modules/@openrig/daemon/dist/domain/shell-classifier.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/slices/slice-detail-projector.js +10 -1
- package/node_modules/@openrig/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/spec-validation-advisory.d.ts +17 -0
- package/node_modules/@openrig/daemon/dist/domain/spec-validation-advisory.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/spec-validation-advisory.js +38 -0
- package/node_modules/@openrig/daemon/dist/domain/spec-validation-advisory.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/successor-session-launcher.d.ts +7 -0
- package/node_modules/@openrig/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/successor-session-launcher.js +38 -1
- package/node_modules/@openrig/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.d.ts +47 -0
- package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.js +92 -0
- package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/transcript-rotation.d.ts +4 -0
- package/node_modules/@openrig/daemon/dist/domain/transcript-rotation.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/transcript-rotation.js +61 -3
- package/node_modules/@openrig/daemon/dist/domain/transcript-rotation.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/transcript-store.js +9 -2
- package/node_modules/@openrig/daemon/dist/domain/transcript-store.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/types.d.ts +39 -0
- package/node_modules/@openrig/daemon/dist/domain/types.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/types.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.d.ts +10 -1
- package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.js +39 -0
- package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/context-packs.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/context-packs.js +205 -0
- package/node_modules/@openrig/daemon/dist/routes/context-packs.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/queue.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/queue.js +29 -24
- package/node_modules/@openrig/daemon/dist/routes/queue.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/rigspec.js +20 -6
- package/node_modules/@openrig/daemon/dist/routes/rigspec.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/seat.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/seat.js +69 -0
- package/node_modules/@openrig/daemon/dist/routes/seat.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/sessions.js +55 -0
- package/node_modules/@openrig/daemon/dist/routes/sessions.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/transport.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/transport.js +52 -39
- package/node_modules/@openrig/daemon/dist/routes/transport.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/up.js +21 -2
- package/node_modules/@openrig/daemon/dist/routes/up.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/seat-recap-store-surface.d.ts +2 -0
- package/node_modules/@openrig/daemon/dist/seat-recap-store-surface.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/seat-recap-store-surface.js +6 -0
- package/node_modules/@openrig/daemon/dist/seat-recap-store-surface.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/startup.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/startup.js +37 -6
- package/node_modules/@openrig/daemon/dist/startup.js.map +1 -1
- package/node_modules/@openrig/daemon/package.json +6 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ Canonical OpenRig skills and hooks for cross-runtime agent topology coordination
|
|
|
4
4
|
|
|
5
5
|
## What this plugin ships
|
|
6
6
|
|
|
7
|
-
**Skills (
|
|
7
|
+
**Skills (14):** the canonical OpenRig operating knowledge — how to use the `rig` CLI, how to design rig topologies, how to recover from compaction, how to hand work off durably between agents, how to maintain seat continuity and inherit or retire a seat across handovers and restarts, how to apply a permission policy to a seat's live harness, and how to decide who does a task.
|
|
8
8
|
|
|
9
9
|
**Hooks:** activity-tracking hooks (Claude Code: 4 events; Codex: 3 events) that POST agent state to the OpenRig daemon for real-time UI seat-status updates.
|
|
10
10
|
|
|
@@ -19,6 +19,15 @@
|
|
|
19
19
|
"timeout": 5
|
|
20
20
|
}
|
|
21
21
|
]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"hooks": [
|
|
25
|
+
{
|
|
26
|
+
"type": "command",
|
|
27
|
+
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/scripts/refocus.cjs\"",
|
|
28
|
+
"timeout": 5
|
|
29
|
+
}
|
|
30
|
+
]
|
|
22
31
|
}
|
|
23
32
|
],
|
|
24
33
|
"UserPromptSubmit": [
|
|
@@ -39,6 +48,15 @@
|
|
|
39
48
|
"timeout": 5
|
|
40
49
|
}
|
|
41
50
|
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"hooks": [
|
|
54
|
+
{
|
|
55
|
+
"type": "command",
|
|
56
|
+
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/scripts/refocus.cjs\"",
|
|
57
|
+
"timeout": 5
|
|
58
|
+
}
|
|
59
|
+
]
|
|
42
60
|
}
|
|
43
61
|
],
|
|
44
62
|
"PreCompact": [
|
|
@@ -61,6 +79,15 @@
|
|
|
61
79
|
"timeout": 5
|
|
62
80
|
}
|
|
63
81
|
]
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"hooks": [
|
|
85
|
+
{
|
|
86
|
+
"type": "command",
|
|
87
|
+
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/scripts/refocus.cjs\"",
|
|
88
|
+
"timeout": 5
|
|
89
|
+
}
|
|
90
|
+
]
|
|
64
91
|
}
|
|
65
92
|
],
|
|
66
93
|
"Stop": [
|
|
@@ -72,6 +99,15 @@
|
|
|
72
99
|
"timeout": 5
|
|
73
100
|
}
|
|
74
101
|
]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"hooks": [
|
|
105
|
+
{
|
|
106
|
+
"type": "command",
|
|
107
|
+
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/scripts/refocus.cjs\"",
|
|
108
|
+
"timeout": 5
|
|
109
|
+
}
|
|
110
|
+
]
|
|
75
111
|
}
|
|
76
112
|
],
|
|
77
113
|
"Notification": [
|
|
@@ -9,6 +9,15 @@
|
|
|
9
9
|
"timeout": 5
|
|
10
10
|
}
|
|
11
11
|
]
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"hooks": [
|
|
15
|
+
{
|
|
16
|
+
"type": "command",
|
|
17
|
+
"command": "node \"${PLUGIN_ROOT}/hooks/scripts/refocus.cjs\"",
|
|
18
|
+
"timeout": 5
|
|
19
|
+
}
|
|
20
|
+
]
|
|
12
21
|
}
|
|
13
22
|
],
|
|
14
23
|
"UserPromptSubmit": [
|
|
@@ -20,6 +29,15 @@
|
|
|
20
29
|
"timeout": 5
|
|
21
30
|
}
|
|
22
31
|
]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"hooks": [
|
|
35
|
+
{
|
|
36
|
+
"type": "command",
|
|
37
|
+
"command": "node \"${PLUGIN_ROOT}/hooks/scripts/refocus.cjs\"",
|
|
38
|
+
"timeout": 5
|
|
39
|
+
}
|
|
40
|
+
]
|
|
23
41
|
}
|
|
24
42
|
],
|
|
25
43
|
"Stop": [
|
|
@@ -31,6 +49,15 @@
|
|
|
31
49
|
"timeout": 5
|
|
32
50
|
}
|
|
33
51
|
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"hooks": [
|
|
55
|
+
{
|
|
56
|
+
"type": "command",
|
|
57
|
+
"command": "node \"${PLUGIN_ROOT}/hooks/scripts/refocus.cjs\"",
|
|
58
|
+
"timeout": 5
|
|
59
|
+
}
|
|
60
|
+
]
|
|
34
61
|
}
|
|
35
62
|
],
|
|
36
63
|
"PermissionRequest": [
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
// openrig-core REFOCUS hook (OPR.0.5.3.6 — promoted from the lab where it ran
|
|
4
|
+
// live on 6+ seats; the mechanism ships, the CONTENT is configurable).
|
|
5
|
+
//
|
|
6
|
+
// WHY: the moment an agent most needs to reorient is the moment it is least
|
|
7
|
+
// able to choose to. Drift does not feel like drift — it feels like work. So
|
|
8
|
+
// refocus FIRES rather than waits to be invoked.
|
|
9
|
+
//
|
|
10
|
+
// THIS IS ALSO HOW TOPOLOGY CHAIN FILES REACH A RUNNING SEAT. Editing a file
|
|
11
|
+
// under topology.root is not delivery — a running seat reads its config at
|
|
12
|
+
// session start and its context never re-reads disk on its own. This hook is
|
|
13
|
+
// the delivery channel: Stop / PostCompact observations retain due-state,
|
|
14
|
+
// then inject orientation content at the seat's next context-visible boundary
|
|
15
|
+
// (SessionStart / UserPromptSubmit), so a shipped or updated chain file becomes
|
|
16
|
+
// live doctrine without a relaunch.
|
|
17
|
+
//
|
|
18
|
+
// SIGNAL = TRANSCRIPT GROWTH, not turns and not wall-clock. A "turn" is one
|
|
19
|
+
// prompt submission; an agent can burn 200k tokens across fifty tool calls
|
|
20
|
+
// inside ONE turn, so a turn counter is blind to exactly the drift that
|
|
21
|
+
// matters. The JSONL grows monotonically with work done (measured ~8.9 bytes
|
|
22
|
+
// per context token, so ~300k tokens ≈ 2.6MB — rough on purpose; it needs to
|
|
23
|
+
// be monotonic, not exact). Tune with OPENRIG_REFOCUS_BYTES.
|
|
24
|
+
//
|
|
25
|
+
// CONTENT IS CONFIGURABLE, NEVER PROJECT-SPECIFIC IN SOURCE. Resolution:
|
|
26
|
+
// 1. OPENRIG_REFOCUS_CONTENT_REF env — resolved by `rig context get`.
|
|
27
|
+
// 2. OPENRIG_REFOCUS_CONTENT_FILE env — an operator-authored file.
|
|
28
|
+
// 3. $OPENRIG_HOME/refocus/REFOCUS.md — the instance's standing content.
|
|
29
|
+
// 4. The generic three-question orientation below (project-neutral).
|
|
30
|
+
// Project- or mission-specific refocus text belongs in those FILES, on the
|
|
31
|
+
// instance that needs it — it must never be committed here.
|
|
32
|
+
//
|
|
33
|
+
// Observes: SessionStart (fresh orientation), Stop (catches the long single
|
|
34
|
+
// turn), UserPromptSubmit, and PostCompact on Claude (post-compaction
|
|
35
|
+
// re-orientation; Codex exposes no compact hook — growth+Stop is the coverage
|
|
36
|
+
// there). Emits only at context-visible boundaries and stays silent unless due.
|
|
37
|
+
// A configured REF failure degrades loudly inside the delivered payload; every
|
|
38
|
+
// failure remains non-blocking because a refocus hook must never break a turn.
|
|
39
|
+
|
|
40
|
+
const fs = require("node:fs");
|
|
41
|
+
const path = require("node:path");
|
|
42
|
+
const { spawnSync } = require("node:child_process");
|
|
43
|
+
const THRESH = Number(process.env.OPENRIG_REFOCUS_BYTES || 2_600_000);
|
|
44
|
+
|
|
45
|
+
const readStdin = () => new Promise((r) => { let d = ""; process.stdin.setEncoding("utf8");
|
|
46
|
+
process.stdin.on("data", (c) => d += c); process.stdin.on("end", () => r(d)); process.stdin.on("error", () => r("")); });
|
|
47
|
+
|
|
48
|
+
(async () => {
|
|
49
|
+
let input = {}; try { input = JSON.parse((await readStdin()) || "{}") || {}; } catch {}
|
|
50
|
+
const ev = input.hook_event_name || "UserPromptSubmit";
|
|
51
|
+
const seat = process.env.OPENRIG_SESSION_NAME || "unknown-seat";
|
|
52
|
+
const home = process.env.OPENRIG_HOME || path.join(process.env.HOME || "/tmp", ".openrig");
|
|
53
|
+
const tpath = input.transcript_path || input.transcriptPath || "";
|
|
54
|
+
|
|
55
|
+
let size = 0; try { size = fs.statSync(tpath).size; } catch {}
|
|
56
|
+
|
|
57
|
+
const dir = path.join(home, "refocus");
|
|
58
|
+
const file = path.join(dir, `${seat.replace(/[^A-Za-z0-9@._-]/g, "_")}.json`);
|
|
59
|
+
let st = { lastBytes: 0 };
|
|
60
|
+
try { st = JSON.parse(fs.readFileSync(file, "utf8")) || st; } catch {}
|
|
61
|
+
const writeState = () => {
|
|
62
|
+
try { fs.mkdirSync(dir, { recursive: true }); fs.writeFileSync(file, JSON.stringify(st)); } catch {}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const grown = size > 0 ? size - (st.lastBytes || 0) : 0;
|
|
66
|
+
const due = ev === "SessionStart" || ev === "PostCompact" || Boolean(st.pendingOn) || grown >= THRESH;
|
|
67
|
+
if (!due) { process.exit(0); } // silent no-op — the common path
|
|
68
|
+
|
|
69
|
+
// Stop and PostCompact do not expose hook output to the agent's next context.
|
|
70
|
+
// Remember that delivery is due, but do not consume transcript growth until a
|
|
71
|
+
// context-visible boundary actually accepts the payload.
|
|
72
|
+
const contextVisible = ev === "SessionStart" || ev === "UserPromptSubmit";
|
|
73
|
+
if (!contextVisible) {
|
|
74
|
+
st.pendingOn ||= ev;
|
|
75
|
+
st.pendingAt ||= new Date().toISOString();
|
|
76
|
+
writeState();
|
|
77
|
+
process.exit(0);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// A library ref wins over file configuration and reuses the public assembler instead of
|
|
81
|
+
// growing a second resolver inside this hook. REF failures stay visible without blocking
|
|
82
|
+
// the session boundary; REF-unset follows the folded FILE/default path byte-for-byte.
|
|
83
|
+
const contentRef = process.env.OPENRIG_REFOCUS_CONTENT_REF || "";
|
|
84
|
+
let configured = null;
|
|
85
|
+
let refFailure = null;
|
|
86
|
+
if (contentRef) {
|
|
87
|
+
const result = spawnSync("rig", ["context", "get", contentRef], {
|
|
88
|
+
encoding: "utf8",
|
|
89
|
+
env: process.env,
|
|
90
|
+
timeout: 4_000,
|
|
91
|
+
maxBuffer: 16 * 1024 * 1024,
|
|
92
|
+
});
|
|
93
|
+
if (!result.error && result.status === 0 && result.stdout.trim()) {
|
|
94
|
+
configured = result.stdout;
|
|
95
|
+
} else {
|
|
96
|
+
refFailure = result.error?.message
|
|
97
|
+
|| result.stderr?.trim()
|
|
98
|
+
|| result.stdout?.trim()
|
|
99
|
+
|| `rig context get exited ${result.status ?? "without a status"}`;
|
|
100
|
+
refFailure = String(refFailure).replace(/\s+/g, " ").trim();
|
|
101
|
+
}
|
|
102
|
+
} else {
|
|
103
|
+
// Configurable content: operator file beats instance file beats the generic default.
|
|
104
|
+
const contentFile = [
|
|
105
|
+
process.env.OPENRIG_REFOCUS_CONTENT_FILE,
|
|
106
|
+
path.join(home, "refocus", "REFOCUS.md"),
|
|
107
|
+
].filter(Boolean).find((p) => { try { return fs.existsSync(p); } catch { return false; } });
|
|
108
|
+
if (contentFile) {
|
|
109
|
+
try { configured = fs.readFileSync(contentFile, "utf8").trim() || null; } catch {}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const why = ev === "SessionStart" ? "fresh session"
|
|
114
|
+
: st.pendingOn === "PostCompact" ? "just compacted — your picture is lossy"
|
|
115
|
+
: `${Math.round(grown / 1e6 * 10) / 10}MB of work since your last refocus`;
|
|
116
|
+
|
|
117
|
+
const generic = [
|
|
118
|
+
`1. What is the person actually trying to get? Not your current task — the outcome.`,
|
|
119
|
+
`2. Does what you are doing RIGHT NOW move that? If you cannot say what a user gets, stop and say so.`,
|
|
120
|
+
`3. What have you concluded without opening the file or running the thing?`,
|
|
121
|
+
``,
|
|
122
|
+
`Discomfort on any of these IS the signal — drift feels like work.`,
|
|
123
|
+
``,
|
|
124
|
+
`Your topology context (instance/rig/seat craft and this seat's LEARNED) is one walk away:`,
|
|
125
|
+
`rig context trace --rig <rig> --seat <seat> --name CRAFT.md — read it, do not recall it.`,
|
|
126
|
+
`A seat's LEARNED.md is written by previous occupants in the first person: it is evidence`,
|
|
127
|
+
`about the SEAT, never your own memory.`,
|
|
128
|
+
];
|
|
129
|
+
|
|
130
|
+
const payload = refFailure ? [
|
|
131
|
+
`REFOCUS CONTENT REF FAILED: ${contentRef} — ${refFailure}`,
|
|
132
|
+
``,
|
|
133
|
+
`REFOCUS (${why}). Answer briefly, out loud, before your next move:`,
|
|
134
|
+
``,
|
|
135
|
+
...generic,
|
|
136
|
+
] : [
|
|
137
|
+
`REFOCUS (${why}). Answer briefly, out loud, before your next move:`,
|
|
138
|
+
``,
|
|
139
|
+
...(contentRef
|
|
140
|
+
? [`REFOCUS CONTENT SOURCE: OPENRIG_REFOCUS_CONTENT_REF=${contentRef}`, ``, configured]
|
|
141
|
+
: configured ? [configured] : generic),
|
|
142
|
+
];
|
|
143
|
+
const output = JSON.stringify({ hookSpecificOutput: { hookEventName: ev, additionalContext: payload.join("\n") } });
|
|
144
|
+
process.stdout.write(output, () => {
|
|
145
|
+
st.lastBytes = size;
|
|
146
|
+
st.firedAt = new Date().toISOString();
|
|
147
|
+
st.firedOn = ev;
|
|
148
|
+
delete st.pendingOn;
|
|
149
|
+
delete st.pendingAt;
|
|
150
|
+
writeState();
|
|
151
|
+
});
|
|
152
|
+
})();
|
|
@@ -92,6 +92,32 @@ restored from packet at <path>; resumed at step <X>
|
|
|
92
92
|
|
|
93
93
|
Include the main files you read in full when you make that statement.
|
|
94
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
|
+
|
|
95
121
|
## Required Read-Depth Audit
|
|
96
122
|
|
|
97
123
|
After the first restore pass, audit yourself before continuing.
|
|
@@ -101,9 +127,15 @@ After the first restore pass, audit yourself before continuing.
|
|
|
101
127
|
2. Mark each item as `FULL`, `PARTIAL`, or `NOT_READ`.
|
|
102
128
|
3. You will be given a task where all of these files are required reading in
|
|
103
129
|
order to understand the task.
|
|
104
|
-
4.
|
|
105
|
-
|
|
106
|
-
|
|
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.
|
|
107
139
|
|
|
108
140
|
## Guardrails
|
|
109
141
|
|
|
@@ -6,12 +6,7 @@ import { spawnSync } from "node:child_process";
|
|
|
6
6
|
|
|
7
7
|
const skillRoot = path.resolve(new URL("..", import.meta.url).pathname);
|
|
8
8
|
const restoreScript = path.join(skillRoot, "scripts", "restore-from-jsonl.mjs");
|
|
9
|
-
|
|
10
|
-
// /tmp/claude-compaction-restore (production), but becomes per-run isolated when the
|
|
11
|
-
// hermetic env-var OPENRIG_COMPACTION_OUT_ROOT is set — so concurrent writers with the
|
|
12
|
-
// same injected clock + sessionId no longer collide on the same `${sessionId}-${stamp}`
|
|
13
|
-
// dir. Mirrors the injectable-clock seam (OPENRIG_TEST_CLOCK_NOW). Empty/absent = /tmp.
|
|
14
|
-
const outRoot = process.env.OPENRIG_COMPACTION_OUT_ROOT || "/tmp/claude-compaction-restore";
|
|
9
|
+
const outRoot = "/tmp/claude-compaction-restore";
|
|
15
10
|
const defaultRestoreInstruction =
|
|
16
11
|
"Read the claude-compaction-restore skill and follow its \"If You Just Compacted\" protocol.";
|
|
17
12
|
|
|
@@ -29,14 +24,6 @@ function getOpenRigHome() {
|
|
|
29
24
|
return process.env.OPENRIG_HOME || process.env.RIGGED_HOME || path.join(os.homedir(), ".openrig");
|
|
30
25
|
}
|
|
31
26
|
|
|
32
|
-
// A3-R3 injectable clock (slice 51-01): marker.createdAt defaults to real wall-clock,
|
|
33
|
-
// but becomes deterministic when the shared hermetic env-var OPENRIG_TEST_CLOCK_NOW is
|
|
34
|
-
// set (an ISO instant). Empty/absent = production real-time.
|
|
35
|
-
function nowIso() {
|
|
36
|
-
const injected = process.env.OPENRIG_TEST_CLOCK_NOW;
|
|
37
|
-
return typeof injected === "string" && injected.trim().length > 0 ? injected : new Date().toISOString();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
27
|
function expandInstructionPath(filePath) {
|
|
41
28
|
if (filePath.startsWith("~/")) return path.join(os.homedir(), filePath.slice(2));
|
|
42
29
|
if (filePath.startsWith("${OPENRIG_HOME}/")) {
|
|
@@ -54,50 +41,6 @@ function readInstructionFile(filePath) {
|
|
|
54
41
|
return fs.readFileSync(expanded, "utf8");
|
|
55
42
|
}
|
|
56
43
|
|
|
57
|
-
// OPR.0.4.1.09 / R5 marker-lifecycle (foreign-content-in-marker face): the hook
|
|
58
|
-
// path must apply the SAME seat-check the daemon enforcer's resolvePostCompactExtra
|
|
59
|
-
// applies (rev1-r2 dcd95bd9), or a FOREIGN seat's global messageFilePath leaks into
|
|
60
|
-
// THIS seat's marker. Parse a WELL-FORMED leading `---` frontmatter for a declared
|
|
61
|
-
// seat (target_seat / seat / session); body text is never scanned; a broken/absent
|
|
62
|
-
// fence is GENERIC (valid for any seat). Byte-mirrors the enforcer regexes.
|
|
63
|
-
function declaredSeatOf(content) {
|
|
64
|
-
const fm = /^\s*---\s*\n([\s\S]*?)\n---/.exec(content);
|
|
65
|
-
if (!fm) return null;
|
|
66
|
-
const m = /^[ \t]*(?:target[_-]?seat|seat|session(?:[_-]?name)?)[ \t]*:[ \t]*["']?([^"'\n#]+?)["']?[ \t]*$/im.exec(fm[1]);
|
|
67
|
-
return m ? m[1].trim() : null;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function sanitizeSeat(value) {
|
|
71
|
-
return value.replace(/[^a-zA-Z0-9_.@-]/g, "_");
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// Resolve the post-compaction extra FOR THIS SEAT (mirror of the enforcer): (1) prefer
|
|
75
|
-
// a per-seat compaction/post-compact-extra/<seat>.md — no cross-seat contamination
|
|
76
|
-
// possible; (2) fall back to the global ONLY when it does not declare a DIFFERENT seat
|
|
77
|
-
// (a wrong-seat global is REFUSED). Generic/undeclared/configured-but-absent stay
|
|
78
|
-
// allowed. Returns the path to read, or null when nothing valid for this seat.
|
|
79
|
-
function resolveSeatSafeExtraPath(globalFilePathRaw) {
|
|
80
|
-
const rawSeat = process.env.OPENRIG_SESSION_NAME || process.env.RIGGED_SESSION_NAME || "";
|
|
81
|
-
const seatKey = rawSeat ? sanitizeSeat(rawSeat) : "";
|
|
82
|
-
if (seatKey) {
|
|
83
|
-
const perSeatPath = path.join(getOpenRigHome(), "compaction", "post-compact-extra", `${seatKey}.md`);
|
|
84
|
-
if (fs.existsSync(perSeatPath)) {
|
|
85
|
-
const declared = declaredSeatOf(fs.readFileSync(perSeatPath, "utf8"));
|
|
86
|
-
if (declared && sanitizeSeat(declared) !== seatKey) return null; // wrong-seat per-seat file
|
|
87
|
-
return perSeatPath;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
const trimmed = (globalFilePathRaw || "").trim();
|
|
91
|
-
if (!trimmed) return null;
|
|
92
|
-
const expanded = expandInstructionPath(trimmed);
|
|
93
|
-
// configured-but-absent: keep the path (an absent file cannot be a wrong-seat leak;
|
|
94
|
-
// readInstructionFile returns "" so nothing is appended).
|
|
95
|
-
if (!fs.existsSync(expanded)) return trimmed;
|
|
96
|
-
const declared = declaredSeatOf(fs.readFileSync(expanded, "utf8"));
|
|
97
|
-
if (declared && sanitizeSeat(declared) !== seatKey) return null; // foreign-seat global REFUSED
|
|
98
|
-
return trimmed;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
44
|
function sessionKey(input) {
|
|
102
45
|
const raw = [
|
|
103
46
|
process.env.OPENRIG_SESSION_NAME,
|
|
@@ -115,28 +58,12 @@ function pendingMarkerPath(input) {
|
|
|
115
58
|
return path.join(getOpenRigHome(), "compaction", "restore-pending", `${sessionKey(input)}.json`);
|
|
116
59
|
}
|
|
117
60
|
|
|
118
|
-
// R5 absent-when-needed: drop a lightweight EXPECTED sentinel FIRST (before the packet is
|
|
119
|
-
// generated + the marker is written), carrying the SAME identity binding the marker gets.
|
|
120
|
-
// Its presence-without-a-marker is what lets the bridge be LOUD about a missing packet
|
|
121
|
-
// (hook died partway / write failed); policy off = no hook = no sentinel = silent.
|
|
122
|
-
function writeExpectedSentinel(input) {
|
|
123
|
-
const p = path.join(getOpenRigHome(), "compaction", "restore-pending", `${sessionKey(input)}.expected.json`);
|
|
124
|
-
fs.mkdirSync(path.dirname(p), { recursive: true });
|
|
125
|
-
fs.writeFileSync(p, `${JSON.stringify({
|
|
126
|
-
version: 1,
|
|
127
|
-
sessionName: process.env.OPENRIG_SESSION_NAME || process.env.RIGGED_SESSION_NAME || null,
|
|
128
|
-
sessionId: input.session_id || input.sessionId || null,
|
|
129
|
-
transcriptPath: input.transcript_path || null,
|
|
130
|
-
createdAt: nowIso(),
|
|
131
|
-
}, null, 2)}\n`, "utf8");
|
|
132
|
-
}
|
|
133
|
-
|
|
134
61
|
function writePendingRestoreMarker(input, parsed, restoreInstruction, customMessage) {
|
|
135
62
|
const markerPath = pendingMarkerPath(input);
|
|
136
63
|
fs.mkdirSync(path.dirname(markerPath), { recursive: true });
|
|
137
64
|
const payload = {
|
|
138
65
|
version: 1,
|
|
139
|
-
createdAt:
|
|
66
|
+
createdAt: new Date().toISOString(),
|
|
140
67
|
sessionName: process.env.OPENRIG_SESSION_NAME || process.env.RIGGED_SESSION_NAME || null,
|
|
141
68
|
sessionId: input.session_id || input.sessionId || null,
|
|
142
69
|
transcriptPath: input.transcript_path || null,
|
|
@@ -191,18 +118,13 @@ function readClaudeCompactionMessage() {
|
|
|
191
118
|
parts.push(`Inline restore instruction:\n${inline}`);
|
|
192
119
|
}
|
|
193
120
|
if (filePath && filePath.length > 0) {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
try {
|
|
199
|
-
const fileText = readInstructionFile(resolved);
|
|
200
|
-
if (fileText) {
|
|
201
|
-
parts.push(`Additional restore instruction file (${resolved}):\n${fileText}`);
|
|
202
|
-
}
|
|
203
|
-
} catch {
|
|
204
|
-
// Keep any inline instruction; unreadable extra files degrade quietly.
|
|
121
|
+
try {
|
|
122
|
+
const fileText = readInstructionFile(filePath);
|
|
123
|
+
if (fileText) {
|
|
124
|
+
parts.push(`Additional restore instruction file (${filePath}):\n${fileText}`);
|
|
205
125
|
}
|
|
126
|
+
} catch {
|
|
127
|
+
// Keep any inline instruction; unreadable extra files degrade quietly.
|
|
206
128
|
}
|
|
207
129
|
}
|
|
208
130
|
if (parts.length > 0) return parts.join("\n\n");
|
|
@@ -218,16 +140,7 @@ function buildSystemMessage(restoreInstruction, customMessage) {
|
|
|
218
140
|
}
|
|
219
141
|
|
|
220
142
|
try {
|
|
221
|
-
// Slice 51-01 RIDER (leak-visibility, review-r1 escalation): OPENRIG_TEST_CLOCK_NOW is
|
|
222
|
-
// read by nowIso() to make createdAt deterministic in tests — but a LEAKED var in a
|
|
223
|
-
// real seat would silently FREEZE production createdAt. Announce loudly on stderr when
|
|
224
|
-
// active so any leak is visible in seat logs; absence stays silent (production path).
|
|
225
|
-
// MUST stay byte-identical to STUB_CLOCK_ANNOUNCEMENT in stub-runner.ts.
|
|
226
|
-
if (typeof process.env.OPENRIG_TEST_CLOCK_NOW === "string" && process.env.OPENRIG_TEST_CLOCK_NOW.trim().length > 0) {
|
|
227
|
-
process.stderr.write("OPENRIG_TEST_CLOCK_NOW active — timestamps are injected\n");
|
|
228
|
-
}
|
|
229
143
|
const input = readHookInput();
|
|
230
|
-
writeExpectedSentinel(input); // R5: sentinel FIRST, before the packet + marker (catches hook-died-partway)
|
|
231
144
|
const args = [restoreScript, "--out", outRoot, "--json"];
|
|
232
145
|
if (input.cwd) args.push("--cwd", input.cwd);
|
|
233
146
|
if (input.transcript_path && input.transcript_path.endsWith(".jsonl") && fs.existsSync(input.transcript_path)) {
|