@openrig/cli 0.7.11 → 0.7.12
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/README.md +9 -6
- package/daemon/assets/guidance/openrig-context-entry.md +8 -0
- package/daemon/assets/herdr-app/mods/rig-cell-header/main.js +15 -0
- package/daemon/assets/herdr-app/mods/rig-cell-header/mod.json +1 -0
- package/daemon/assets/herdr-app/mods/rig-ended/main.js +14 -0
- package/daemon/assets/herdr-app/mods/rig-ended/mod.json +1 -0
- package/daemon/assets/herdr-app/mods/rig-pad/main.js +10 -0
- package/daemon/assets/herdr-app/mods/rig-pad/mod.json +1 -0
- package/daemon/assets/herdr-app/mods/rig-strip/main.js +153 -0
- package/daemon/assets/herdr-app/mods/rig-strip/mod.json +1 -0
- 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/hooks/scripts/activity-relay.cjs +15 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus-state.cjs +103 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +170 -86
- package/daemon/assets/plugins/openrig-core/skills/agent-operated-software/SKILL.md +5 -1
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +3 -2
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +1 -1
- package/daemon/assets/plugins/openrig-core/skills/retiring-and-inheriting-a-seat/SKILL.md +1 -1
- package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +10 -6
- package/daemon/assets/plugins/openrig-core/skills/session-compaction-and-restore/SKILL.md +1 -1
- package/daemon/assets/skills/rigs/SKILL.md +37 -2
- package/daemon/context-packs/help/help.md +18 -0
- package/daemon/context-packs/help/manifest.yaml +1 -1
- package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
- package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +48 -21
- package/daemon/context-packs/reference/getting-started.md +18 -3
- package/daemon/context-packs/reference/manifest.yaml +1 -1
- package/daemon/context-packs/reference/rig-spec.md +15 -9
- package/daemon/context-packs/reference/tmux-servers.md +2 -2
- package/daemon/context-packs/reference/whats-new.md +141 -121
- package/daemon/context-packs/skills/agent-operated-software/SKILL.md +5 -1
- package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
- package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
- package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/SKILL.md +3 -2
- package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-herdr/SKILL.md +1 -0
- package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/working-with-an-openrig-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
- package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-user/SKILL.md +1 -1
- package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/review-team/SKILL.md +2 -0
- package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/SKILL.md +1 -1
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/seat-continuity-and-handover/SKILL.md +10 -6
- package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
- package/daemon/context-packs/skills/session-compaction-and-restore/SKILL.md +1 -1
- package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
- package/daemon/context-packs/world-example/manifest.yaml +1 -1
- package/daemon/context-packs/world-public/manifest.yaml +1 -1
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +18 -3
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts +2 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +13 -5
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +18 -2
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts +10 -6
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.js +78 -24
- package/daemon/dist/adapters/community-harness-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/pi-community-runtime-adapter.d.ts +27 -0
- package/daemon/dist/adapters/pi-community-runtime-adapter.d.ts.map +1 -0
- package/daemon/dist/adapters/pi-community-runtime-adapter.js +38 -0
- package/daemon/dist/adapters/pi-community-runtime-adapter.js.map +1 -0
- package/daemon/dist/adapters/pi-runner-protocol.d.ts +5 -3
- package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.js +6 -1
- package/daemon/dist/adapters/pi-runner-protocol.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +9 -4
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +104 -30
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts +32 -15
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.js +41 -10
- package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/tmux-exec.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-exec.js +13 -4
- package/daemon/dist/adapters/tmux-exec.js.map +1 -1
- package/daemon/dist/adapters/tmux-server.d.ts +2 -0
- package/daemon/dist/adapters/tmux-server.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-server.js +1 -1
- package/daemon/dist/adapters/tmux-server.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +14 -1
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +77 -15
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/attention-surface.d.ts +7 -0
- package/daemon/dist/attention-surface.d.ts.map +1 -1
- package/daemon/dist/attention-surface.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +10 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/155_queue_erasure.d.ts +12 -0
- package/daemon/dist/db/migrations/155_queue_erasure.d.ts.map +1 -0
- package/daemon/dist/db/migrations/155_queue_erasure.js +28 -0
- package/daemon/dist/db/migrations/155_queue_erasure.js.map +1 -0
- package/daemon/dist/db/migrations/156_queue_erasure_link_indexes.d.ts +4 -0
- package/daemon/dist/db/migrations/156_queue_erasure_link_indexes.d.ts.map +1 -0
- package/daemon/dist/db/migrations/156_queue_erasure_link_indexes.js +14 -0
- package/daemon/dist/db/migrations/156_queue_erasure_link_indexes.js.map +1 -0
- package/daemon/dist/db/migrations/157_queue_erasure_batches.d.ts +9 -0
- package/daemon/dist/db/migrations/157_queue_erasure_batches.d.ts.map +1 -0
- package/daemon/dist/db/migrations/157_queue_erasure_batches.js +18 -0
- package/daemon/dist/db/migrations/157_queue_erasure_batches.js.map +1 -0
- package/daemon/dist/db/migrations/158_queue_inbox_checkins.d.ts +8 -0
- package/daemon/dist/db/migrations/158_queue_inbox_checkins.d.ts.map +1 -0
- package/daemon/dist/db/migrations/158_queue_inbox_checkins.js +15 -0
- package/daemon/dist/db/migrations/158_queue_inbox_checkins.js.map +1 -0
- package/daemon/dist/db/migrations/159_queue_items_handed_off_from_index.d.ts +5 -0
- package/daemon/dist/db/migrations/159_queue_items_handed_off_from_index.d.ts.map +1 -0
- package/daemon/dist/db/migrations/159_queue_items_handed_off_from_index.js +9 -0
- package/daemon/dist/db/migrations/159_queue_items_handed_off_from_index.js.map +1 -0
- package/daemon/dist/domain/agent-activity-store.d.ts +4 -2
- package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
- package/daemon/dist/domain/agent-activity-store.js +11 -7
- package/daemon/dist/domain/agent-activity-store.js.map +1 -1
- package/daemon/dist/domain/builtin-startup-files.d.ts +8 -0
- package/daemon/dist/domain/builtin-startup-files.d.ts.map +1 -1
- package/daemon/dist/domain/builtin-startup-files.js +37 -11
- package/daemon/dist/domain/builtin-startup-files.js.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +30 -17
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +140 -66
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/claude-continuation-launch.d.ts +16 -0
- package/daemon/dist/domain/claude-continuation-launch.d.ts.map +1 -0
- package/daemon/dist/domain/claude-continuation-launch.js +110 -0
- package/daemon/dist/domain/claude-continuation-launch.js.map +1 -0
- package/daemon/dist/domain/claude-git-trust-root.d.ts +11 -0
- package/daemon/dist/domain/claude-git-trust-root.d.ts.map +1 -0
- package/daemon/dist/domain/claude-git-trust-root.js +72 -0
- package/daemon/dist/domain/claude-git-trust-root.js.map +1 -0
- package/daemon/dist/domain/claude-managed-launch.d.ts +1 -0
- package/daemon/dist/domain/claude-managed-launch.d.ts.map +1 -1
- package/daemon/dist/domain/claude-managed-launch.js +5 -5
- package/daemon/dist/domain/claude-managed-launch.js.map +1 -1
- package/daemon/dist/domain/community-harness-presets.d.ts +5 -0
- package/daemon/dist/domain/community-harness-presets.d.ts.map +1 -1
- package/daemon/dist/domain/community-harness-presets.js +33 -6
- package/daemon/dist/domain/community-harness-presets.js.map +1 -1
- package/daemon/dist/domain/compaction-restore-notice.d.ts +3 -1
- package/daemon/dist/domain/compaction-restore-notice.d.ts.map +1 -1
- package/daemon/dist/domain/compaction-restore-notice.js +37 -6
- package/daemon/dist/domain/compaction-restore-notice.js.map +1 -1
- package/daemon/dist/domain/current-work.d.ts +52 -0
- package/daemon/dist/domain/current-work.d.ts.map +1 -1
- package/daemon/dist/domain/current-work.js +215 -0
- package/daemon/dist/domain/current-work.js.map +1 -1
- package/daemon/dist/domain/default-receiver.d.ts +40 -0
- package/daemon/dist/domain/default-receiver.d.ts.map +1 -0
- package/daemon/dist/domain/default-receiver.js +70 -0
- package/daemon/dist/domain/default-receiver.js.map +1 -0
- package/daemon/dist/domain/draft-aware-delivery.js +1 -1
- package/daemon/dist/domain/draft-aware-delivery.js.map +1 -1
- package/daemon/dist/domain/escalation-owner.d.ts.map +1 -1
- package/daemon/dist/domain/escalation-owner.js +8 -3
- package/daemon/dist/domain/escalation-owner.js.map +1 -1
- package/daemon/dist/domain/event-bus.d.ts +16 -8
- package/daemon/dist/domain/event-bus.d.ts.map +1 -1
- package/daemon/dist/domain/event-bus.js +50 -16
- package/daemon/dist/domain/event-bus.js.map +1 -1
- package/daemon/dist/domain/execution-view.d.ts.map +1 -1
- package/daemon/dist/domain/execution-view.js +28 -3
- package/daemon/dist/domain/execution-view.js.map +1 -1
- package/daemon/dist/domain/gateway/gateway-subsystem.d.ts +3 -0
- package/daemon/dist/domain/gateway/gateway-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/gateway-subsystem.js +9 -0
- package/daemon/dist/domain/gateway/gateway-subsystem.js.map +1 -1
- package/daemon/dist/domain/gateway/human-quiet-windows.d.ts +2 -1
- package/daemon/dist/domain/gateway/human-quiet-windows.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/human-quiet-windows.js +2 -1
- package/daemon/dist/domain/gateway/human-quiet-windows.js.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.d.ts +12 -1
- package/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.js +64 -8
- package/daemon/dist/domain/gateway/human-registry.js.map +1 -1
- package/daemon/dist/domain/gateway/relay-config.d.ts +5 -2
- package/daemon/dist/domain/gateway/relay-config.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/relay-config.js +34 -3
- package/daemon/dist/domain/gateway/relay-config.js.map +1 -1
- package/daemon/dist/domain/gateway/relay-inbound.d.ts +11 -0
- package/daemon/dist/domain/gateway/relay-inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/relay-inbound.js +283 -41
- package/daemon/dist/domain/gateway/relay-inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/relay-outbound.d.ts +5 -2
- package/daemon/dist/domain/gateway/relay-outbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/relay-outbound.js +37 -6
- package/daemon/dist/domain/gateway/relay-outbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/config.d.ts +21 -0
- package/daemon/dist/domain/gateway/slack/config.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/config.js +30 -3
- package/daemon/dist/domain/gateway/slack/config.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.d.ts +4 -0
- package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.js +7 -2
- package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/open-asks.d.ts +13 -1
- package/daemon/dist/domain/gateway/slack/open-asks.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/open-asks.js +58 -7
- package/daemon/dist/domain/gateway/slack/open-asks.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/outbound-driver.d.ts +9 -0
- package/daemon/dist/domain/gateway/slack/outbound-driver.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/outbound-driver.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/settled-asks.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/settled-asks.js +19 -1
- package/daemon/dist/domain/gateway/slack/settled-asks.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts +3 -0
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.js +12 -4
- package/daemon/dist/domain/gateway/slack/slack-api.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +2 -0
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.js +38 -12
- package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-recovery.d.ts +12 -1
- package/daemon/dist/domain/gateway/slack/slack-recovery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-recovery.js +68 -10
- package/daemon/dist/domain/gateway/slack/slack-recovery.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js +151 -47
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/socket-inbound.d.ts +1 -0
- package/daemon/dist/domain/gateway/slack/socket-inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/socket-inbound.js +5 -0
- package/daemon/dist/domain/gateway/slack/socket-inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/state-store.d.ts +4 -0
- package/daemon/dist/domain/gateway/slack/state-store.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/state-store.js +4 -1
- package/daemon/dist/domain/gateway/slack/state-store.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-recovery.d.ts +23 -3
- package/daemon/dist/domain/gateway/slack/thread-recovery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-recovery.js +52 -10
- package/daemon/dist/domain/gateway/slack/thread-recovery.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-seat-map.d.ts +4 -1
- package/daemon/dist/domain/gateway/slack/thread-seat-map.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-seat-map.js +7 -4
- package/daemon/dist/domain/gateway/slack/thread-seat-map.js.map +1 -1
- package/daemon/dist/domain/guidance-projection.d.ts +39 -0
- package/daemon/dist/domain/guidance-projection.d.ts.map +1 -0
- package/daemon/dist/domain/guidance-projection.js +91 -0
- package/daemon/dist/domain/guidance-projection.js.map +1 -0
- package/daemon/dist/domain/health-passive-ceremony.d.ts.map +1 -1
- package/daemon/dist/domain/health-passive-ceremony.js +31 -12
- package/daemon/dist/domain/health-passive-ceremony.js.map +1 -1
- package/daemon/dist/domain/hosted-wake.d.ts +5 -1
- package/daemon/dist/domain/hosted-wake.d.ts.map +1 -1
- package/daemon/dist/domain/hosted-wake.js +13 -3
- package/daemon/dist/domain/hosted-wake.js.map +1 -1
- package/daemon/dist/domain/launch-wrapper.d.ts +2 -1
- package/daemon/dist/domain/launch-wrapper.d.ts.map +1 -1
- package/daemon/dist/domain/launch-wrapper.js +6 -2
- package/daemon/dist/domain/launch-wrapper.js.map +1 -1
- package/daemon/dist/domain/managed-blocks.d.ts +3 -0
- package/daemon/dist/domain/managed-blocks.d.ts.map +1 -1
- package/daemon/dist/domain/managed-blocks.js +5 -0
- package/daemon/dist/domain/managed-blocks.js.map +1 -1
- package/daemon/dist/domain/markdown-address.d.ts.map +1 -1
- package/daemon/dist/domain/markdown-address.js +12 -1
- package/daemon/dist/domain/markdown-address.js.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js +37 -6
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
- package/daemon/dist/domain/native-process-arguments.d.ts +5 -0
- package/daemon/dist/domain/native-process-arguments.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-arguments.js +60 -5
- package/daemon/dist/domain/native-process-arguments.js.map +1 -1
- package/daemon/dist/domain/node-inventory.js +3 -3
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/package-manifest.d.ts.map +1 -1
- package/daemon/dist/domain/package-manifest.js +10 -5
- package/daemon/dist/domain/package-manifest.js.map +1 -1
- package/daemon/dist/domain/policies/delivery-digest-flush.d.ts.map +1 -1
- package/daemon/dist/domain/policies/delivery-digest-flush.js +9 -1
- package/daemon/dist/domain/policies/delivery-digest-flush.js.map +1 -1
- package/daemon/dist/domain/policies/mode-scheduled-end.d.ts +4 -1
- package/daemon/dist/domain/policies/mode-scheduled-end.d.ts.map +1 -1
- package/daemon/dist/domain/policies/mode-scheduled-end.js +19 -10
- package/daemon/dist/domain/policies/mode-scheduled-end.js.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.js +3 -2
- package/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -1
- package/daemon/dist/domain/policies/quiet-release.d.ts +19 -6
- package/daemon/dist/domain/policies/quiet-release.d.ts.map +1 -1
- package/daemon/dist/domain/policies/quiet-release.js +44 -7
- package/daemon/dist/domain/policies/quiet-release.js.map +1 -1
- package/daemon/dist/domain/proof/judgments.d.ts +11 -0
- package/daemon/dist/domain/proof/judgments.d.ts.map +1 -1
- package/daemon/dist/domain/proof/judgments.js +61 -38
- package/daemon/dist/domain/proof/judgments.js.map +1 -1
- package/daemon/dist/domain/queue-blocker.d.ts +5 -0
- package/daemon/dist/domain/queue-blocker.d.ts.map +1 -0
- package/daemon/dist/domain/queue-blocker.js +12 -0
- package/daemon/dist/domain/queue-blocker.js.map +1 -0
- package/daemon/dist/domain/queue-erasure.d.ts +173 -0
- package/daemon/dist/domain/queue-erasure.d.ts.map +1 -0
- package/daemon/dist/domain/queue-erasure.js +885 -0
- package/daemon/dist/domain/queue-erasure.js.map +1 -0
- package/daemon/dist/domain/queue-owner.d.ts +6 -0
- package/daemon/dist/domain/queue-owner.d.ts.map +1 -1
- package/daemon/dist/domain/queue-owner.js +13 -4
- package/daemon/dist/domain/queue-owner.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +160 -20
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +449 -61
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-retention.d.ts +15 -1
- package/daemon/dist/domain/queue-retention.d.ts.map +1 -1
- package/daemon/dist/domain/queue-retention.js +35 -0
- package/daemon/dist/domain/queue-retention.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts +17 -4
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +246 -92
- package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
- package/daemon/dist/domain/queue-transition-log.d.ts +5 -2
- package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
- package/daemon/dist/domain/queue-transition-log.js +30 -5
- package/daemon/dist/domain/queue-transition-log.js.map +1 -1
- package/daemon/dist/domain/queue-waiting.d.ts +48 -2
- package/daemon/dist/domain/queue-waiting.d.ts.map +1 -1
- package/daemon/dist/domain/queue-waiting.js +73 -13
- package/daemon/dist/domain/queue-waiting.js.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +79 -28
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/rebuild-priming-chain.d.ts +3 -1
- package/daemon/dist/domain/rebuild-priming-chain.d.ts.map +1 -1
- package/daemon/dist/domain/rebuild-priming-chain.js +3 -1
- package/daemon/dist/domain/rebuild-priming-chain.js.map +1 -1
- package/daemon/dist/domain/refocus-record.d.ts +17 -0
- package/daemon/dist/domain/refocus-record.d.ts.map +1 -0
- package/daemon/dist/domain/refocus-record.js +94 -0
- package/daemon/dist/domain/refocus-record.js.map +1 -0
- package/daemon/dist/domain/restore-check-service.js +1 -1
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/restore-guidance.d.ts.map +1 -1
- package/daemon/dist/domain/restore-guidance.js +5 -6
- package/daemon/dist/domain/restore-guidance.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +2 -0
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +39 -18
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/restore-plan-preview.d.ts.map +1 -1
- package/daemon/dist/domain/restore-plan-preview.js +2 -1
- package/daemon/dist/domain/restore-plan-preview.js.map +1 -1
- package/daemon/dist/domain/resume-token-validation.d.ts +7 -0
- package/daemon/dist/domain/resume-token-validation.d.ts.map +1 -1
- package/daemon/dist/domain/resume-token-validation.js +13 -3
- package/daemon/dist/domain/resume-token-validation.js.map +1 -1
- package/daemon/dist/domain/rig-repository.js +3 -3
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +2 -1
- package/daemon/dist/domain/rig-teardown.js.map +1 -1
- package/daemon/dist/domain/rigs-being-built.d.ts +5 -0
- package/daemon/dist/domain/rigs-being-built.d.ts.map +1 -0
- package/daemon/dist/domain/rigs-being-built.js +18 -0
- package/daemon/dist/domain/rigs-being-built.js.map +1 -0
- package/daemon/dist/domain/rigspec-instantiator.d.ts +3 -0
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +32 -2
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.js +4 -1
- package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +2 -2
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/runner-permissions.d.ts +16 -0
- package/daemon/dist/domain/runner-permissions.d.ts.map +1 -1
- package/daemon/dist/domain/runner-permissions.js +95 -14
- package/daemon/dist/domain/runner-permissions.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +1 -0
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-adapter.js.map +1 -1
- package/daemon/dist/domain/scope/logical-checkbox.d.ts.map +1 -1
- package/daemon/dist/domain/scope/logical-checkbox.js +14 -0
- package/daemon/dist/domain/scope/logical-checkbox.js.map +1 -1
- package/daemon/dist/domain/seat-activity-service.d.ts +12 -0
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-activity-service.js +85 -4
- package/daemon/dist/domain/seat-activity-service.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts +7 -0
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +23 -8
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-kinds.d.ts +21 -0
- package/daemon/dist/domain/seat-kinds.d.ts.map +1 -0
- package/daemon/dist/domain/seat-kinds.js +27 -0
- package/daemon/dist/domain/seat-kinds.js.map +1 -0
- package/daemon/dist/domain/seat-launch-environment.d.ts +4 -0
- package/daemon/dist/domain/seat-launch-environment.d.ts.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.js +7 -6
- package/daemon/dist/domain/seat-launch-environment.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +12 -0
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +52 -11
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-runtime-switch-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-runtime-switch-service.js +23 -12
- package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -1
- package/daemon/dist/domain/seat-skill-apply.d.ts +2 -0
- package/daemon/dist/domain/seat-skill-apply.d.ts.map +1 -1
- package/daemon/dist/domain/seat-skill-apply.js +5 -2
- package/daemon/dist/domain/seat-skill-apply.js.map +1 -1
- package/daemon/dist/domain/seat-skill-storage.js +1 -1
- package/daemon/dist/domain/seat-skill-storage.js.map +1 -1
- package/daemon/dist/domain/seat-status-service.d.ts +10 -0
- package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-status-service.js +36 -2
- package/daemon/dist/domain/seat-status-service.js.map +1 -1
- package/daemon/dist/domain/seat-structural-activity-service.d.ts +8 -0
- package/daemon/dist/domain/seat-structural-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-structural-activity-service.js +8 -2
- package/daemon/dist/domain/seat-structural-activity-service.js.map +1 -1
- package/daemon/dist/domain/session-jsonl.d.ts +4 -2
- package/daemon/dist/domain/session-jsonl.d.ts.map +1 -1
- package/daemon/dist/domain/session-jsonl.js +56 -22
- package/daemon/dist/domain/session-jsonl.js.map +1 -1
- package/daemon/dist/domain/session-registry.d.ts +20 -3
- package/daemon/dist/domain/session-registry.d.ts.map +1 -1
- package/daemon/dist/domain/session-registry.js +39 -3
- package/daemon/dist/domain/session-registry.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +28 -4
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +236 -56
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.d.ts +41 -0
- package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.js +463 -22
- package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +5 -2
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.d.ts +1 -0
- package/daemon/dist/domain/startup-submission-evidence.d.ts.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.js +18 -4
- package/daemon/dist/domain/startup-submission-evidence.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.js +3 -2
- package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-app-install.d.ts +28 -0
- package/daemon/dist/domain/terminal/herdr-app-install.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/herdr-app-install.js +170 -0
- package/daemon/dist/domain/terminal/herdr-app-install.js.map +1 -0
- package/daemon/dist/domain/terminal/herdr-app-layout.d.ts +79 -0
- package/daemon/dist/domain/terminal/herdr-app-layout.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/herdr-app-layout.js +134 -0
- package/daemon/dist/domain/terminal/herdr-app-layout.js.map +1 -0
- package/daemon/dist/domain/terminal/herdr-app-provider.d.ts +123 -0
- package/daemon/dist/domain/terminal/herdr-app-provider.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/herdr-app-provider.js +681 -0
- package/daemon/dist/domain/terminal/herdr-app-provider.js.map +1 -0
- package/daemon/dist/domain/terminal/herdr-app-state.d.ts +91 -0
- package/daemon/dist/domain/terminal/herdr-app-state.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/herdr-app-state.js +140 -0
- package/daemon/dist/domain/terminal/herdr-app-state.js.map +1 -0
- package/daemon/dist/domain/terminal/herdr-app-transport.d.ts +68 -0
- package/daemon/dist/domain/terminal/herdr-app-transport.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/herdr-app-transport.js +133 -0
- package/daemon/dist/domain/terminal/herdr-app-transport.js.map +1 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts +18 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.d.ts +28 -3
- package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.js +41 -8
- package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
- package/daemon/dist/domain/terminal/view-composer.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/view-composer.js +1 -0
- package/daemon/dist/domain/terminal/view-composer.js.map +1 -1
- package/daemon/dist/domain/time-bound-advisory.js +3 -3
- package/daemon/dist/domain/time-bound-advisory.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +51 -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-browser.d.ts +2 -1
- package/daemon/dist/domain/user-settings/settings-browser.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-browser.js +22 -3
- package/daemon/dist/domain/user-settings/settings-browser.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.js +35 -0
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/wake-recovery.d.ts.map +1 -1
- package/daemon/dist/domain/wake-recovery.js +3 -2
- package/daemon/dist/domain/wake-recovery.js.map +1 -1
- package/daemon/dist/domain/whoami-service.d.ts +6 -0
- package/daemon/dist/domain/whoami-service.d.ts.map +1 -1
- package/daemon/dist/domain/whoami-service.js +9 -1
- package/daemon/dist/domain/whoami-service.js.map +1 -1
- package/daemon/dist/domain/workflow-projector.js +1 -1
- package/daemon/dist/domain/workflow-projector.js.map +1 -1
- package/daemon/dist/domain/workflow-runtime.js +4 -4
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.d.ts +14 -0
- package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.js +28 -7
- package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
- package/daemon/dist/index.d.ts +2 -1
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +9 -1
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/lib/pane-envelope.d.ts +3 -0
- package/daemon/dist/lib/pane-envelope.d.ts.map +1 -1
- package/daemon/dist/lib/pane-envelope.js +3 -1
- package/daemon/dist/lib/pane-envelope.js.map +1 -1
- package/daemon/dist/routes/activity.d.ts.map +1 -1
- package/daemon/dist/routes/activity.js +110 -23
- package/daemon/dist/routes/activity.js.map +1 -1
- package/daemon/dist/routes/attention.d.ts.map +1 -1
- package/daemon/dist/routes/attention.js +2 -0
- package/daemon/dist/routes/attention.js.map +1 -1
- package/daemon/dist/routes/config.d.ts.map +1 -1
- package/daemon/dist/routes/config.js +9 -1
- package/daemon/dist/routes/config.js.map +1 -1
- package/daemon/dist/routes/events.js +7 -2
- package/daemon/dist/routes/events.js.map +1 -1
- package/daemon/dist/routes/gateway.d.ts.map +1 -1
- package/daemon/dist/routes/gateway.js +34 -5
- package/daemon/dist/routes/gateway.js.map +1 -1
- package/daemon/dist/routes/hosts.d.ts.map +1 -1
- package/daemon/dist/routes/hosts.js +146 -46
- package/daemon/dist/routes/hosts.js.map +1 -1
- package/daemon/dist/routes/provider.js +1 -1
- package/daemon/dist/routes/provider.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts +19 -0
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +232 -43
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/skills.d.ts.map +1 -1
- package/daemon/dist/routes/skills.js +8 -2
- package/daemon/dist/routes/skills.js.map +1 -1
- package/daemon/dist/routes/slices.d.ts.map +1 -1
- package/daemon/dist/routes/slices.js +156 -28
- package/daemon/dist/routes/slices.js.map +1 -1
- package/daemon/dist/routes/terminal.d.ts.map +1 -1
- package/daemon/dist/routes/terminal.js +40 -3
- package/daemon/dist/routes/terminal.js.map +1 -1
- package/daemon/dist/routes/transport.d.ts.map +1 -1
- package/daemon/dist/routes/transport.js +0 -1
- package/daemon/dist/routes/transport.js.map +1 -1
- package/daemon/dist/startup.d.ts +34 -0
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +190 -10
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/docs/reference/agent-spec.md +2 -4
- package/daemon/docs/reference/agent-startup-guide.md +24 -2
- package/daemon/docs/reference/community-harness-examples/omo/omo.yaml +14 -0
- package/daemon/docs/reference/community-harness-presets.md +56 -2
- package/daemon/docs/reference/daemon-http-clients.md +15 -1
- package/daemon/docs/reference/edge-types.md +6 -4
- package/daemon/docs/reference/gateway-participants.md +19 -0
- package/daemon/docs/reference/gateway-relay.md +41 -12
- package/daemon/docs/reference/getting-started.md +18 -3
- package/daemon/docs/reference/harness-runner-contract.md +61 -12
- package/daemon/docs/reference/health-diagnosis.md +5 -1
- package/daemon/docs/reference/help.md +18 -0
- package/daemon/docs/reference/herdr-app.md +148 -0
- package/daemon/docs/reference/hosted-members.md +19 -7
- package/daemon/docs/reference/keeping-a-watch.md +3 -1
- package/daemon/docs/reference/queue-erasure.md +161 -0
- package/daemon/docs/reference/quickstart.md +1 -1
- package/daemon/docs/reference/rig-spec.md +15 -9
- package/daemon/docs/reference/runner-conformance/README.md +3 -0
- package/daemon/docs/reference/runner-conformance/check-runner.mjs +27 -6
- package/daemon/docs/reference/runner-conformance/fake-acp-agent.mjs +1 -1
- package/daemon/docs/reference/sdlc-conventions.md +16 -1
- package/daemon/docs/reference/seat-delivery.md +10 -3
- package/daemon/docs/reference/slack-app-setup.md +37 -12
- package/daemon/docs/reference/terminal-sessions.md +28 -15
- package/daemon/docs/reference/tmux-servers.md +2 -2
- package/daemon/docs/reference/whats-new.md +141 -121
- package/daemon/specs/agents/shared/skills/core/openrig-herdr/SKILL.md +1 -0
- package/daemon/specs/agents/shared/skills/pods/review-team/SKILL.md +2 -0
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +24 -0
- package/daemon/specs/rigs/launch/kernel/culture/CULTURE.md +7 -4
- package/daemon/specs/rigs/launch/kernel/rig.yaml +6 -3
- package/daemon/specs/rigs/launch/starter/guidance/lead-first-move.md +3 -1
- package/dist/build-info.js +3 -3
- package/dist/client.js +2 -2
- package/dist/client.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +11 -1
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +44 -4
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +17 -3
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/gateway.d.ts.map +1 -1
- package/dist/commands/gateway.js +21 -4
- package/dist/commands/gateway.js.map +1 -1
- package/dist/commands/host.d.ts.map +1 -1
- package/dist/commands/host.js +10 -1
- package/dist/commands/host.js.map +1 -1
- package/dist/commands/launch.d.ts +1 -0
- package/dist/commands/launch.d.ts.map +1 -1
- package/dist/commands/launch.js +1 -1
- package/dist/commands/launch.js.map +1 -1
- package/dist/commands/proof.d.ts.map +1 -1
- package/dist/commands/proof.js +18 -6
- package/dist/commands/proof.js.map +1 -1
- package/dist/commands/provider.js +1 -1
- package/dist/commands/ps.d.ts +9 -1
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +23 -2
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +226 -8
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/scope.d.ts +2 -0
- package/dist/commands/scope.d.ts.map +1 -1
- package/dist/commands/scope.js +15 -0
- package/dist/commands/scope.js.map +1 -1
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +64 -10
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts +2 -0
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +16 -6
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/setup.js +1 -1
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/skill.d.ts.map +1 -1
- package/dist/commands/skill.js +5 -0
- package/dist/commands/skill.js.map +1 -1
- package/dist/commands/slack.d.ts +1 -1
- package/dist/commands/slack.d.ts.map +1 -1
- package/dist/commands/slack.js +5 -1
- package/dist/commands/slack.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +11 -1
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/terminal.d.ts +22 -0
- package/dist/commands/terminal.d.ts.map +1 -1
- package/dist/commands/terminal.js +116 -7
- package/dist/commands/terminal.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +22 -0
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +13 -2
- package/dist/commands/whoami.js.map +1 -1
- package/dist/commands/workflow-errors.js +1 -1
- package/dist/commands/workflow-errors.js.map +1 -1
- package/dist/commands/workflow.js +1 -1
- package/dist/commands/workflow.js.map +1 -1
- package/dist/config-store.d.ts +8 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +60 -0
- package/dist/config-store.js.map +1 -1
- package/dist/daemon-start-lock.d.ts +24 -2
- package/dist/daemon-start-lock.d.ts.map +1 -1
- package/dist/daemon-start-lock.js +125 -4
- package/dist/daemon-start-lock.js.map +1 -1
- package/dist/lib/scope/logical-checkbox.d.ts.map +1 -1
- package/dist/lib/scope/logical-checkbox.js +14 -0
- package/dist/lib/scope/logical-checkbox.js.map +1 -1
- package/dist/lib/scope/scope-fs.d.ts.map +1 -1
- package/dist/lib/scope/scope-fs.js +36 -2
- package/dist/lib/scope/scope-fs.js.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +49 -8
- package/dist/mcp-server.js.map +1 -1
- package/dist/recap-seat.d.ts +28 -0
- package/dist/recap-seat.d.ts.map +1 -0
- package/dist/recap-seat.js +41 -0
- package/dist/recap-seat.js.map +1 -0
- package/dist/seat-attention.d.ts +24 -0
- package/dist/seat-attention.d.ts.map +1 -0
- package/dist/seat-attention.js +119 -0
- package/dist/seat-attention.js.map +1 -0
- package/dist/terminal-window.d.ts.map +1 -1
- package/dist/terminal-window.js +3 -3
- package/dist/terminal-window.js.map +1 -1
- package/package.json +1 -1
- package/tui/dist/attention/attention-model.d.ts.map +1 -1
- package/tui/dist/attention/attention-model.js +3 -0
- package/tui/dist/attention/attention-model.js.map +1 -1
- package/tui/dist/config/config-model.d.ts.map +1 -1
- package/tui/dist/config/config-model.js +6 -1
- package/tui/dist/config/config-model.js.map +1 -1
- package/tui/dist/config/pairing.d.ts +49 -0
- package/tui/dist/config/pairing.d.ts.map +1 -0
- package/tui/dist/config/pairing.js +98 -0
- package/tui/dist/config/pairing.js.map +1 -0
- package/tui/dist/daemon-client.d.ts +11 -1
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +18 -5
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/detail.d.ts +3 -0
- package/tui/dist/detail.d.ts.map +1 -1
- package/tui/dist/detail.js +6 -1
- package/tui/dist/detail.js.map +1 -1
- package/tui/dist/execution/execution-model.d.ts +2 -0
- package/tui/dist/execution/execution-model.d.ts.map +1 -1
- package/tui/dist/execution/execution-model.js +10 -3
- package/tui/dist/execution/execution-model.js.map +1 -1
- package/tui/dist/health/health-model.d.ts.map +1 -1
- package/tui/dist/health/health-model.js +27 -11
- package/tui/dist/health/health-model.js.map +1 -1
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +4 -2
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/main.js +6 -1
- package/tui/dist/main.js.map +1 -1
- package/tui/dist/scopes/scopes-model.d.ts +9 -0
- package/tui/dist/scopes/scopes-model.d.ts.map +1 -1
- package/tui/dist/scopes/scopes-model.js +27 -1
- package/tui/dist/scopes/scopes-model.js.map +1 -1
- package/tui/dist/state.d.ts.map +1 -1
- package/tui/dist/state.js +4 -3
- package/tui/dist/state.js.map +1 -1
- package/tui/dist/terminals/open-window.d.ts +21 -1
- package/tui/dist/terminals/open-window.d.ts.map +1 -1
- package/tui/dist/terminals/open-window.js +46 -9
- package/tui/dist/terminals/open-window.js.map +1 -1
- package/tui/dist/terminals/terminal-model.d.ts +8 -1
- package/tui/dist/terminals/terminal-model.d.ts.map +1 -1
- package/tui/dist/terminals/terminal-model.js +25 -8
- package/tui/dist/terminals/terminal-model.js.map +1 -1
- package/tui/dist/types.d.ts +18 -2
- package/tui/dist/types.d.ts.map +1 -1
|
@@ -35,10 +35,9 @@ import * as path from "node:path";
|
|
|
35
35
|
* second one (`recoverAfterRestart`). A prompt or /compact is marked in
|
|
36
36
|
* flight at its write, so a restart never sends it again. A restart between
|
|
37
37
|
* a post-compact stage's send and its record can send that one stage again.
|
|
38
|
-
* - A /compact whose outcome is unknown
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* is held, visibly, while the box holds text or can't be read.
|
|
38
|
+
* - A /compact whose outcome is unknown is never replayed, with or without
|
|
39
|
+
* a restart. Only its first owed step waits until the recorded possible
|
|
40
|
+
* write clears; subsequent input follows ordinary draft-delivery settings.
|
|
42
41
|
* - Definite pre-write prep failures retry at most three times. Uncertain
|
|
43
42
|
* delivery never replays. Unfinished preparation stops visibly until an
|
|
44
43
|
* explicit retry. A completed automatic map keeps its bounded idle grace.
|
|
@@ -275,9 +274,21 @@ export function buildPostCompactTurnBoundaryPrompt() {
|
|
|
275
274
|
"Do not restore yet; the next normal user message will contain the restore instructions.",
|
|
276
275
|
].join(" ");
|
|
277
276
|
}
|
|
278
|
-
/** #2575
|
|
279
|
-
* draft still holds it. Waiting doesn't show the box is empty, so the delivery is recorded as over an unreadable box. */
|
|
277
|
+
/** Legacy #2575 threshold for old diagnostics. Managed input now follows ordinary draft-delivery defaults. */
|
|
280
278
|
export const UNREADABLE_POLLS_BEFORE_DELIVERY = 2;
|
|
279
|
+
const UNKNOWN_READINESS_POLLS_BEFORE_DELIVERY = 2;
|
|
280
|
+
/** Under --skip-map, a map the seat completed at the attempt path anyway, or null. Nothing publishes the .tmp under
|
|
281
|
+
* --skip-map, so the final path is checked first, then the .tmp, and whichever ends with the marker is named. */
|
|
282
|
+
function completedSkippedMap({ mapPath, marker }) {
|
|
283
|
+
return [mapPath, `${mapPath}.tmp`].find((file) => {
|
|
284
|
+
try {
|
|
285
|
+
return fs.readFileSync(file, "utf8").trimEnd().endsWith(marker);
|
|
286
|
+
}
|
|
287
|
+
catch {
|
|
288
|
+
return false;
|
|
289
|
+
}
|
|
290
|
+
}) ?? null;
|
|
291
|
+
}
|
|
281
292
|
/** The file, beside an attempt's restore map, where the daemon records what it last did for that attempt. The agent
|
|
282
293
|
* never writes it. A restarted daemon reads it to pick the attempt up again. */
|
|
283
294
|
export const COMPACTION_RECORD_FILE = "COMPACTION-STATE.json";
|
|
@@ -321,8 +332,6 @@ function readCompactionRecord(file) {
|
|
|
321
332
|
return null;
|
|
322
333
|
}
|
|
323
334
|
}
|
|
324
|
-
/** Input-box readings that hold nothing typed: an owed step after an uncertain /compact may go in. A harness suggestion isn't input. */
|
|
325
|
-
const INPUT_BOX_CLEAR = new Set(["empty", "likely-suggestion"]);
|
|
326
335
|
function strandedSummary(record) {
|
|
327
336
|
return { attemptId: record.attemptId, mapPath: record.mapPath, phase: record.phase, recordedAt: new Date(record.updatedAt).toISOString() };
|
|
328
337
|
}
|
|
@@ -363,19 +372,19 @@ export class ClaudeCompactionEnforcer {
|
|
|
363
372
|
recovered = new Set();
|
|
364
373
|
/** Open records too old to resume: the seat's restore may still be owed. */
|
|
365
374
|
stranded = new Map();
|
|
366
|
-
/** Seats whose owed restore steps follow a /compact whose outcome is unknown
|
|
367
|
-
* box, where any Enter would submit it, so each step goes only into an empty box. */
|
|
375
|
+
/** Seats whose owed restore steps follow a /compact whose outcome is unknown; never replay that command. */
|
|
368
376
|
afterUncertainCompact = new Set();
|
|
369
|
-
/** What the input box last read for such a seat, before an owed step (absent until the first check). */
|
|
370
377
|
lastInputBox = new Map();
|
|
371
378
|
restartRecoveryWindowMs;
|
|
372
379
|
daemonInstance;
|
|
373
380
|
resolveOccupantGeneration;
|
|
374
381
|
onPostRestoreComplete;
|
|
382
|
+
onPreparationFailure;
|
|
375
383
|
onRestoreDeliveryFailure;
|
|
376
384
|
terminalPolicies;
|
|
377
385
|
constructor(settingsStore, sessionTransport, opts) {
|
|
378
386
|
this.onRestoreDeliveryFailure = opts?.onRestoreDeliveryFailure;
|
|
387
|
+
this.onPreparationFailure = opts?.onPreparationFailure;
|
|
379
388
|
this.terminalPolicies = opts?.terminalPolicies;
|
|
380
389
|
this.settingsStore = settingsStore;
|
|
381
390
|
this.sessionTransport = sessionTransport;
|
|
@@ -453,7 +462,7 @@ export class ClaudeCompactionEnforcer {
|
|
|
453
462
|
// the other seats' polls. A busy seat, or a read that fails, waits for a later poll.
|
|
454
463
|
let idle;
|
|
455
464
|
try {
|
|
456
|
-
idle = await this.sessionTransport.waitUntilIdle(session, CAPTURE_READABLE_BUDGET_MS, undefined, { singleObservation: true });
|
|
465
|
+
idle = await this.sessionTransport.waitUntilIdle(session, CAPTURE_READABLE_BUDGET_MS, undefined, { singleObservation: true, allowDraft: true });
|
|
457
466
|
}
|
|
458
467
|
catch {
|
|
459
468
|
idle = { ok: false };
|
|
@@ -521,28 +530,35 @@ export class ClaudeCompactionEnforcer {
|
|
|
521
530
|
}
|
|
522
531
|
/** The restore step OpenRig owes this seat next, or null. After a /compact whose outcome is unknown (see
|
|
523
532
|
* `afterUncertainCompact`) it also gives what the input box last read (`not_checked` before the first check) and
|
|
524
|
-
* whether the step is held for it. */
|
|
533
|
+
* whether the step is held for it. It names the attempt's restore map, which a person's restore notice leaves out. */
|
|
525
534
|
getOwedRestore(sessionName) {
|
|
526
535
|
const stage = this.pendingPostCompactRestore.get(sessionName);
|
|
527
536
|
if (!stage)
|
|
528
537
|
return null;
|
|
529
|
-
const
|
|
538
|
+
const record = this.records.get(sessionName)?.record;
|
|
539
|
+
const lastDelivery = record?.lastDelivery;
|
|
530
540
|
const failed = !!lastDelivery && lastDelivery.failures > 0;
|
|
531
|
-
|
|
541
|
+
// The map the restore request names: under --skip-map only one the seat completed anyway, never a path with no map.
|
|
542
|
+
// The record keeps the --skip-map choice through every owed stage; the in-memory carry ends once the request lands.
|
|
543
|
+
const skipMap = record?.restoreCarry?.skipMap;
|
|
544
|
+
const mapPath = skipMap ? completedSkippedMap(skipMap) : record?.mapPath;
|
|
545
|
+
const last = { ...(lastDelivery ? { lastDelivery } : {}), ...(mapPath ? { mapPath } : {}) };
|
|
532
546
|
const steps = { turn_boundary: "post-compaction turn boundary", restore_prompt: "restore request", compliance_prompt: "post-restore audit" };
|
|
533
547
|
const failure = !lastDelivery ? "" : lastDelivery.reason === "delivered_over_unreadable_input_box"
|
|
534
548
|
? ` The ${steps[lastDelivery.stage]} went in at ${lastDelivery.at} over an input box OpenRig couldn't read (it read ${lastDelivery.inputBox ?? "unknown"}); a draft there, if any, may hold its text.`
|
|
535
|
-
:
|
|
536
|
-
? `
|
|
549
|
+
: lastDelivery.reason === "delivered_over_unreadable_pane"
|
|
550
|
+
? ` The ${steps[lastDelivery.stage]} went in at ${lastDelivery.at} over a pane OpenRig couldn't read; its activity remained unknown.`
|
|
551
|
+
: ` ${failed ? "Last delivery" : "waiting: seat busy"} at ${lastDelivery.at}: ${[lastDelivery.reason, lastDelivery.activity?.reason, lastDelivery.errorClass, lastDelivery.noticeErrorClass && `owner notice failed (${lastDelivery.noticeErrorClass})`].filter(Boolean).join("; ")}. OpenRig will retry on its existing polls.${lastDelivery.unreadable
|
|
552
|
+
? " The operator’s draft-protection settings still apply." : ""}`;
|
|
537
553
|
const step = steps[stage];
|
|
538
554
|
if (!this.afterUncertainCompact.has(sessionName)) {
|
|
539
|
-
return { stage, held: failed, ...last, detail: `OpenRig owes this seat its ${step} next, sent
|
|
555
|
+
return { stage, held: failed, ...last, detail: `OpenRig owes this seat its ${step} next, sent once the pane is idle or after two consecutive polls cannot determine its activity.${failure}` };
|
|
540
556
|
}
|
|
541
|
-
const inputBox = this.lastInputBox.get(sessionName) ?? "not_checked";
|
|
542
|
-
const held = inputBox !== "not_checked" &&
|
|
543
|
-
return { stage, held
|
|
544
|
-
? `held: OpenRig
|
|
545
|
-
: `OpenRig owes this seat its ${step}
|
|
557
|
+
const inputBox = lastDelivery?.inputBox ?? this.lastInputBox.get(sessionName) ?? "not_checked";
|
|
558
|
+
const held = failed || (inputBox !== "not_checked" && inputBox !== "empty" && inputBox !== "likely-suggestion");
|
|
559
|
+
return { stage, held, inputBox, ...last, detail: held
|
|
560
|
+
? `held: OpenRig may have /compact text waiting from this attempt's uncertain write; any Enter could submit it. The input box reads ${inputBox}; check the pane and reconcile that effect. No command or restore input is replayed.${failure}`
|
|
561
|
+
: `OpenRig owes this seat its ${step} after an uncertain /compact. The outstanding write is checked before any restore Enter; unrelated delivery keeps ordinary draft settings.${failure}` };
|
|
546
562
|
}
|
|
547
563
|
/** An open record from before a restart that was too old to resume, while no later attempt has replaced it. */
|
|
548
564
|
getStrandedCompaction(sessionName) {
|
|
@@ -665,9 +681,12 @@ export class ClaudeCompactionEnforcer {
|
|
|
665
681
|
finally {
|
|
666
682
|
// The awaited lifecycle has settled: notice work must not inherit its active lease.
|
|
667
683
|
const lastDelivery = record?.record.lastDelivery;
|
|
668
|
-
|
|
684
|
+
const deliveredUnreadable = lastDelivery?.reason === "delivered_over_unreadable_pane";
|
|
685
|
+
if (record && lastDelivery && lastDelivery !== previous && (lastDelivery.failures >= 2 || deliveredUnreadable) && this.onRestoreDeliveryFailure) {
|
|
669
686
|
void Promise.resolve().then(() => {
|
|
670
|
-
|
|
687
|
+
const current = this.records.get(input.sessionName);
|
|
688
|
+
if ((current !== record && !(deliveredUnreadable && !current && !this.pendingPostCompactRestore.has(input.sessionName)))
|
|
689
|
+
|| record.record.lastDelivery !== lastDelivery || (!deliveredUnreadable && this.pendingPostCompactRestore.get(input.sessionName) !== stage))
|
|
671
690
|
return;
|
|
672
691
|
return this.onRestoreDeliveryFailure({ sessionName: input.sessionName, attemptId: record.record.attemptId, mapPath: record.record.mapPath,
|
|
673
692
|
markerPath: path.join(this.openrigHome, "compaction", "restore-pending", `${sanitizeSessionKey(input.sessionName)}.json`), lastDelivery });
|
|
@@ -686,8 +705,9 @@ export class ClaudeCompactionEnforcer {
|
|
|
686
705
|
const prior = record.record.lastDelivery;
|
|
687
706
|
// Active work is the expected wait between restore steps, not an undeliverable stage.
|
|
688
707
|
const waiting = result.reason === "wait_for_idle_timeout" && result.activity?.state === "running";
|
|
689
|
-
|
|
690
|
-
|
|
708
|
+
const unknownReadinessPolls = !result.ok && result.reason === "target_activity_unknown"
|
|
709
|
+
? (prior?.stage === stage ? prior.unknownReadinessPolls ?? 0 : 0) + 1 : 0;
|
|
710
|
+
// Retain the earlier input-box diagnostic separately from unknown pane readiness.
|
|
691
711
|
const held = result.heldInputBox;
|
|
692
712
|
const unreadable = !result.ok && result.reason === "draft_input_unknown" && held && held !== "typed" && held !== "typed-with-suggestion"
|
|
693
713
|
? (prior && prior.stage === stage ? prior.unreadable ?? 0 : 0) + 1 : 0;
|
|
@@ -697,6 +717,7 @@ export class ClaudeCompactionEnforcer {
|
|
|
697
717
|
...(result.activity ? { activity: { state: result.activity.state, reason: result.activity.reason, evidenceSource: result.activity.evidenceSource } } : {}),
|
|
698
718
|
...(errorClass ? { errorClass } : {}), failures: waiting ? 0 : (prior?.failures ?? 0) + 1,
|
|
699
719
|
...(held ? { inputBox: held } : {}), ...(unreadable ? { unreadable } : {}),
|
|
720
|
+
...(unknownReadinessPolls ? { unknownReadinessPolls } : {}),
|
|
700
721
|
};
|
|
701
722
|
this.persist(session, record.record.attemptId, { lastDelivery });
|
|
702
723
|
}
|
|
@@ -713,19 +734,18 @@ export class ClaudeCompactionEnforcer {
|
|
|
713
734
|
*/
|
|
714
735
|
async drainPendingStage(input, policy) {
|
|
715
736
|
// A missing or still-high sample need not show that /compact has finished. The newest idle
|
|
716
|
-
// hook can predate it
|
|
737
|
+
// hook can predate it: require live readiness, then admit only unknown after two consecutive owed-stage polls.
|
|
717
738
|
const pendingStage = this.pendingPostCompactRestore.get(input.sessionName);
|
|
718
739
|
const attempt = this.pendingPreCompactPrep.get(input.sessionName);
|
|
719
740
|
const isCurrent = () => this.pendingPostCompactRestore.get(input.sessionName) === pendingStage
|
|
720
741
|
&& this.pendingPreCompactPrep.get(input.sessionName) === attempt;
|
|
721
|
-
//
|
|
722
|
-
// Not after a /compact whose result was lost: there an Enter could submit /compact, so that check below stays strict.
|
|
723
|
-
const last = this.records.get(input.sessionName)?.record.lastDelivery;
|
|
724
|
-
const overUnreadable = !this.afterUncertainCompact.has(input.sessionName) && !!last && last.stage === pendingStage && !last.ok
|
|
725
|
-
&& (last.unreadable ?? 0) >= UNREADABLE_POLLS_BEFORE_DELIVERY;
|
|
742
|
+
// Owed input uses the ordinary delivery policy, including the operator's explicit draft protection.
|
|
726
743
|
const sendOpts = {
|
|
727
744
|
openrigNotice: true,
|
|
728
|
-
|
|
745
|
+
allowDraftWhileIdle: true,
|
|
746
|
+
...((this.records.get(input.sessionName)?.record.lastDelivery?.unknownReadinessPolls ?? 0) >= UNKNOWN_READINESS_POLLS_BEFORE_DELIVERY
|
|
747
|
+
? { allowUnknownWhileIdle: true } : {}),
|
|
748
|
+
...(pendingStage === "turn_boundary" && this.afterUncertainCompact.has(input.sessionName) ? { preserveInput: true } : {}),
|
|
729
749
|
beforeWrite: () => {
|
|
730
750
|
if (!isCurrent())
|
|
731
751
|
throw new DeliveryGuardError("compaction_cancelled", "Managed compaction was cancelled or replaced; no further input is authorized.");
|
|
@@ -760,16 +780,16 @@ export class ClaudeCompactionEnforcer {
|
|
|
760
780
|
return { triggered: false, reason: "stale_generation" };
|
|
761
781
|
}
|
|
762
782
|
}
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
// holds text or can't be read, the step waits for the next poll, and the notice and --state say why.
|
|
766
|
-
if (this.afterUncertainCompact.has(input.sessionName)) {
|
|
783
|
+
if (pendingStage === "turn_boundary" && this.afterUncertainCompact.has(input.sessionName)) {
|
|
784
|
+
// Only this attempt's possible /compact write is outstanding. A later Enter must not submit it.
|
|
767
785
|
const box = await this.inputBoxStatus(input.sessionName);
|
|
768
786
|
if (!isCurrent())
|
|
769
787
|
return { triggered: false, reason: "preparation_stopped" };
|
|
770
788
|
this.lastInputBox.set(input.sessionName, box);
|
|
771
|
-
if (
|
|
789
|
+
if (box !== "empty" && box !== "likely-suggestion") {
|
|
790
|
+
this.recordRestoreFailure(input.sessionName, pendingStage, this.records.get(input.sessionName), { ok: false, reason: "input_box_not_empty", heldInputBox: box });
|
|
772
791
|
return { triggered: false, reason: "input_box_not_empty" };
|
|
792
|
+
}
|
|
773
793
|
}
|
|
774
794
|
if (pendingStage === "turn_boundary") {
|
|
775
795
|
// Only this first step after /compact reads past the compaction output that fills the screen above the input box.
|
|
@@ -780,6 +800,8 @@ export class ClaudeCompactionEnforcer {
|
|
|
780
800
|
// Busy/never-idle → no delivery, no advance; the SAME stage retries next tick.
|
|
781
801
|
return { triggered: false, reason: "send_failed" };
|
|
782
802
|
}
|
|
803
|
+
this.afterUncertainCompact.delete(input.sessionName);
|
|
804
|
+
this.lastInputBox.delete(input.sessionName);
|
|
783
805
|
this.pendingPostCompactRestore.set(input.sessionName, "restore_prompt");
|
|
784
806
|
this.persistStage(input.sessionName, "restore_prompt", undefined, this.overUnreadableDelivery("turn_boundary", boundary));
|
|
785
807
|
return { triggered: true };
|
|
@@ -841,7 +863,6 @@ export class ClaudeCompactionEnforcer {
|
|
|
841
863
|
this.persistStage(input.sessionName, "done", undefined, this.overUnreadableDelivery("compliance_prompt", compliance));
|
|
842
864
|
this.records.delete(input.sessionName);
|
|
843
865
|
this.afterUncertainCompact.delete(input.sessionName);
|
|
844
|
-
this.lastInputBox.delete(input.sessionName);
|
|
845
866
|
this.restoreCarry.delete(input.sessionName);
|
|
846
867
|
// The attempt is finished, including one stopped after a lost /compact result whose restore this was.
|
|
847
868
|
const finished = this.pendingPreCompactPrep.get(input.sessionName);
|
|
@@ -878,6 +899,7 @@ export class ClaudeCompactionEnforcer {
|
|
|
878
899
|
return { triggered: false, reason: "invalid_policy" };
|
|
879
900
|
}
|
|
880
901
|
this.recoverAfterRestart(input, policy.preparationRoot || null);
|
|
902
|
+
await this.noteEndedPreparation(input, policy);
|
|
881
903
|
// A trigger sample must not block work already owed to this occupant. Restore reads can
|
|
882
904
|
// themselves exceed a low threshold; keep the same stage, authorization and idle gates.
|
|
883
905
|
const drained = await this.drainPendingStage(input, policy);
|
|
@@ -1079,7 +1101,7 @@ export class ClaudeCompactionEnforcer {
|
|
|
1079
1101
|
if (remaining <= 0)
|
|
1080
1102
|
return failed(this.mapReady(attempt) ? "map_complete_seat_never_idle" : "preparation_incomplete");
|
|
1081
1103
|
try {
|
|
1082
|
-
idle = await this.sessionTransport.waitUntilIdle(input.sessionName, remaining, attempt.controller.signal);
|
|
1104
|
+
idle = await this.sessionTransport.waitUntilIdle(input.sessionName, remaining, attempt.controller.signal, { allowDraft: true });
|
|
1083
1105
|
}
|
|
1084
1106
|
catch {
|
|
1085
1107
|
idle = { ok: false, reason: "transport_unavailable" };
|
|
@@ -1265,7 +1287,7 @@ export class ClaudeCompactionEnforcer {
|
|
|
1265
1287
|
overflowCompactInstruction: composed.instructionInCommand ? null : attempt.compactInstruction,
|
|
1266
1288
|
usedPercentage: input.usedPercentage, thresholdPercent: policy.thresholdPercent,
|
|
1267
1289
|
preCompactInstruction: policy.preCompactInstruction, preparation: attempt, constructedAt: this.now(),
|
|
1268
|
-
}), { openrigNotice: true,
|
|
1290
|
+
}), { openrigNotice: true, allowDraftWhileIdle: true, ...idleGate, beforeWrite: () => {
|
|
1269
1291
|
this.reconcilePreparations();
|
|
1270
1292
|
if (this.pendingPreCompactPrep.get(input.sessionName) !== attempt || attempt.controller.signal.aborted || attempt.status === "stopped")
|
|
1271
1293
|
throw new DeliveryGuardError("preparation_stopped", "This compaction attempt ended before preparation input.");
|
|
@@ -1295,7 +1317,8 @@ export class ClaudeCompactionEnforcer {
|
|
|
1295
1317
|
// Record this attempt's effect even if cancellation/retry happened during the await.
|
|
1296
1318
|
// Neither a failed response nor its loss proves no paste/Enter. Never replay uncertainty.
|
|
1297
1319
|
attempt.delivery = prep?.ok && prep.outcome !== "retained" ? "delivered" : notSent ? "not_sent" : "uncertain";
|
|
1298
|
-
|
|
1320
|
+
attempt.inputBox = prep?.heldInputBoxReading;
|
|
1321
|
+
this.persist(input.sessionName, attempt.attemptId, { delivery: attempt.delivery, sends: attempt.sends, inputBox: attempt.inputBox });
|
|
1299
1322
|
// The replacement request went out (or may have): the ended attempt's gate is used up.
|
|
1300
1323
|
if (!notSent && attempt.afterEnded !== undefined && this.pendingPreCompactPrep.get(input.sessionName) === attempt)
|
|
1301
1324
|
this.lastEnded.delete(input.sessionName);
|
|
@@ -1351,7 +1374,7 @@ export class ClaudeCompactionEnforcer {
|
|
|
1351
1374
|
// any more, and a capped wait would discard every idle read that ends after it, so the window would never open.
|
|
1352
1375
|
// Idle comes from a live pane read: the newest hook can predate the rest of the preparation turn.
|
|
1353
1376
|
const idleWait = this.compactSendIdleWaitMs + CAPTURE_READABLE_BUDGET_MS;
|
|
1354
|
-
return this.sessionTransport.send(input.sessionName, composed.command, { openrigNotice: true,
|
|
1377
|
+
return this.sessionTransport.send(input.sessionName, composed.command, { openrigNotice: true, allowDraftWhileIdle: true, beforeWrite, ...(attempt.deadlineAt !== null ? { waitForIdleMs: attempt.prepared ? idleWait : Math.max(1, Math.min(idleWait, this.compactDeadline(attempt) - this.now())), readinessFromPaneOnly: true } : {}) });
|
|
1355
1378
|
};
|
|
1356
1379
|
let result;
|
|
1357
1380
|
let guardRefused = false;
|
|
@@ -1381,14 +1404,18 @@ export class ClaudeCompactionEnforcer {
|
|
|
1381
1404
|
this.persist(input.sessionName, attempt.attemptId, { compactSending: undefined });
|
|
1382
1405
|
// A completed map whose /compact was refused before any input, for a window that isn't open yet, is held with the
|
|
1383
1406
|
// same map instead of stopped and asked for again after the retry cooldown (#2682).
|
|
1384
|
-
|
|
1407
|
+
// Explicit global draft refusal is reported by the idle preflight, before a draft_* input exception.
|
|
1408
|
+
const policyDraftHold = result.reason === "target_needs_input" && result.activity?.reason === "prompt_draft"
|
|
1409
|
+
&& result.activity.evidenceSource === "pane_heuristic" && (result.heldInputBox === "typed" || result.heldInputBox === "typed-with-suggestion");
|
|
1410
|
+
const windowReason = policyDraftHold ? "draft_input_busy" : result.reason;
|
|
1411
|
+
if (notSent && typeof windowReason === "string" && HOLD_REASONS.has(windowReason) && this.holdPrepared(input.sessionName, attempt, windowReason)) {
|
|
1385
1412
|
return { ok: false, reason: PREPARED_AWAITING_WINDOW };
|
|
1386
1413
|
}
|
|
1387
1414
|
// Only a known pre-input idle deferral keeps the automatic attempt armed for a later poll; the transport
|
|
1388
1415
|
// marks those `not_reached`. Reconciliation still bounds the idle grace and stops on an occupant change.
|
|
1389
1416
|
// A typing-guard draft hold (`draft_*`) is `not_reached` too, but it is a refusal, not an idle wait: it stops
|
|
1390
1417
|
// as not sent, and a fresh attempt may begin after the retry cooldown.
|
|
1391
|
-
const draftHold = typeof result.reason === "string" && result.reason.startsWith("draft_");
|
|
1418
|
+
const draftHold = policyDraftHold || (typeof result.reason === "string" && result.reason.startsWith("draft_"));
|
|
1392
1419
|
if (attempt.mode === "automatic" && attempt.status === "waiting" && notSent && phase === "not_reached" && !draftHold) {
|
|
1393
1420
|
return { ok: false, reason: "waiting_for_idle" };
|
|
1394
1421
|
}
|
|
@@ -1413,12 +1440,11 @@ export class ClaudeCompactionEnforcer {
|
|
|
1413
1440
|
this.persist(input.sessionName, attempt.attemptId, { phase: "turn_boundary", restoreCarry: carry, operatorInitiated });
|
|
1414
1441
|
return { ok: true };
|
|
1415
1442
|
}
|
|
1416
|
-
/**
|
|
1417
|
-
* why it couldn't be read. Never throws. */
|
|
1443
|
+
/** Reconcile this attempt's possible write using the existing capture path. Unknown is not a resolved write. */
|
|
1418
1444
|
async inputBoxStatus(sessionName) {
|
|
1419
1445
|
try {
|
|
1420
1446
|
const capture = await this.sessionTransport.capture(sessionName, { inputBox: true, readable: { width: 120, height: 40 } });
|
|
1421
|
-
return capture.inputBox?.status ??
|
|
1447
|
+
return capture.inputBox?.status ?? "unknown";
|
|
1422
1448
|
}
|
|
1423
1449
|
catch {
|
|
1424
1450
|
return "unknown";
|
|
@@ -1437,22 +1463,13 @@ export class ClaudeCompactionEnforcer {
|
|
|
1437
1463
|
this.pendingPostCompactRestore.set(sessionName, "turn_boundary");
|
|
1438
1464
|
this.pendingStageGeneration.set(sessionName, attempt.occupantGeneration);
|
|
1439
1465
|
}
|
|
1440
|
-
/** The map the restore request names. With --skip-map: a map the seat completed
|
|
1441
|
-
*
|
|
1442
|
-
* the final path is checked first, then the .tmp, and whichever ends with the marker is named. */
|
|
1466
|
+
/** The map the restore request names. With --skip-map: a map the seat completed anyway (`completedSkippedMap`),
|
|
1467
|
+
* or a plain statement that none was required. */
|
|
1443
1468
|
restoreMapFields(sessionName) {
|
|
1444
1469
|
const carry = this.restoreCarry.get(sessionName);
|
|
1445
1470
|
if (!carry?.skipMap)
|
|
1446
1471
|
return { attemptMapPath: carry?.mapPath ?? null, noMapRequired: false };
|
|
1447
|
-
const
|
|
1448
|
-
const completed = [mapPath, `${mapPath}.tmp`].find((file) => {
|
|
1449
|
-
try {
|
|
1450
|
-
return fs.readFileSync(file, "utf8").trimEnd().endsWith(marker);
|
|
1451
|
-
}
|
|
1452
|
-
catch {
|
|
1453
|
-
return false;
|
|
1454
|
-
}
|
|
1455
|
-
});
|
|
1472
|
+
const completed = completedSkippedMap(carry.skipMap);
|
|
1456
1473
|
return completed ? { attemptMapPath: completed, noMapRequired: false } : { attemptMapPath: null, noMapRequired: true };
|
|
1457
1474
|
}
|
|
1458
1475
|
/** Reuse the retry interval a new automatic preparation would otherwise wait through. The original deadline stays
|
|
@@ -1511,9 +1528,12 @@ export class ClaudeCompactionEnforcer {
|
|
|
1511
1528
|
}
|
|
1512
1529
|
/** Start the record for a new attempt, beside its map. */
|
|
1513
1530
|
startRecord(sessionName, attempt) {
|
|
1531
|
+
const previous = this.records.get(sessionName)?.record;
|
|
1532
|
+
const preparationFailures = attempt.mode === "automatic" && previous?.occupantGeneration === attempt.occupantGeneration
|
|
1533
|
+
? previous?.preparationFailures : undefined;
|
|
1514
1534
|
this.records.set(sessionName, { file: path.join(path.dirname(attempt.mapPath), COMPACTION_RECORD_FILE), record: {
|
|
1515
1535
|
daemon: this.daemonInstance, attemptId: attempt.attemptId, session: sessionName, occupantGeneration: attempt.occupantGeneration, mode: attempt.mode,
|
|
1516
|
-
phase: "preparing", delivery: attempt.delivery, deadlineAt: attempt.deadlineAt, sends: attempt.sends,
|
|
1536
|
+
phase: "preparing", delivery: attempt.delivery, deadlineAt: attempt.deadlineAt, sends: attempt.sends, preparationFailures,
|
|
1517
1537
|
mapPath: attempt.mapPath, marker: attempt.marker, compactInstruction: attempt.compactInstruction,
|
|
1518
1538
|
preparationRoot: attempt.preparationRoot, ...(attempt.sessionId ? { sessionId: attempt.sessionId } : {}),
|
|
1519
1539
|
...(attempt.afterEnded !== undefined ? { afterEnded: attempt.afterEnded, afterEndedSessionId: attempt.afterEndedSessionId ?? null } : {}),
|
|
@@ -1545,8 +1565,11 @@ export class ClaudeCompactionEnforcer {
|
|
|
1545
1565
|
if (current)
|
|
1546
1566
|
this.persist(sessionName, current.record.attemptId, { phase, ...(reason !== undefined ? { reason } : {}), lastDelivery });
|
|
1547
1567
|
}
|
|
1548
|
-
/**
|
|
1568
|
+
/** An unreadable pane or input box stays explicit on the delivered step; any other advance clears it. */
|
|
1549
1569
|
overUnreadableDelivery(stage, result) {
|
|
1570
|
+
if (result.activity?.state === "unknown")
|
|
1571
|
+
return { stage, at: new Date(this.now()).toISOString(), ok: true,
|
|
1572
|
+
reason: "delivered_over_unreadable_pane", activity: { state: "unknown", reason: result.activity.reason, evidenceSource: result.activity.evidenceSource }, failures: 0 };
|
|
1550
1573
|
return result.pastedOverInputBox ? { stage, at: new Date(this.now()).toISOString(), ok: true,
|
|
1551
1574
|
reason: "delivered_over_unreadable_input_box", inputBox: result.pastedOverInputBox, failures: 0 } : undefined;
|
|
1552
1575
|
}
|
|
@@ -1600,6 +1623,9 @@ export class ClaudeCompactionEnforcer {
|
|
|
1600
1623
|
return;
|
|
1601
1624
|
const live = this.resolveOccupantGeneration?.(session) ?? this.sessionTransport.deliveryGuard?.maybeTarget(session)?.occupant ?? null;
|
|
1602
1625
|
if (record.phase === "ended") {
|
|
1626
|
+
if (record.occupantGeneration !== null && live === record.occupantGeneration
|
|
1627
|
+
&& this.now() - (record.endedAt ?? record.updatedAt) < this.restartRecoveryWindowMs)
|
|
1628
|
+
this.records.set(session, newest);
|
|
1603
1629
|
// An ended automatic attempt of this occupant whose request was delivered and whose /compact was never sent keeps a
|
|
1604
1630
|
// busy seat from a fresh request (#2682), as in memory. Only a stop writes endedAt; a /compact that was sent (and then
|
|
1605
1631
|
// cancelled) never stopped, and one whose result was lost is marked uncertainCompact.
|
|
@@ -1624,7 +1650,7 @@ export class ClaudeCompactionEnforcer {
|
|
|
1624
1650
|
return;
|
|
1625
1651
|
const stale = this.now() - record.updatedAt > this.restartRecoveryWindowMs;
|
|
1626
1652
|
// A /compact whose send had begun, or whose outcome was lost, is never sent again; its restore steps are owed in case it
|
|
1627
|
-
// ran
|
|
1653
|
+
// ran. Only the first step reconciles that possible write; later input follows ordinary delivery settings.
|
|
1628
1654
|
const phase = (record.phase === "preparing" && record.compactSending) || record.phase === "compact_uncertain" ? "turn_boundary" : record.phase;
|
|
1629
1655
|
const inFlight = phase !== record.phase;
|
|
1630
1656
|
if (phase === "preparing") {
|
|
@@ -1644,7 +1670,7 @@ export class ClaudeCompactionEnforcer {
|
|
|
1644
1670
|
compact: "not_sent", sends: record.sends,
|
|
1645
1671
|
deadlineAt: record.deadlineAt ?? (record.delivery === "not_sent" ? null : record.updatedAt + AUTO_PREP_WAIT_MS_DEFAULT),
|
|
1646
1672
|
policyWasEnabled: true, preparationRoot: record.preparationRoot, controller: new AbortController(),
|
|
1647
|
-
compactInstruction: record.compactInstruction,
|
|
1673
|
+
compactInstruction: record.compactInstruction, inputBox: record.inputBox,
|
|
1648
1674
|
// A held attempt comes back held, with its recorded hold (never stamped again) and its map's age and usage.
|
|
1649
1675
|
...(held ? { prepared: true, preparedAt: record.preparedAt ?? record.updatedAt, preparedReason: record.preparedReason ?? "map_complete_seat_never_idle" } : {}),
|
|
1650
1676
|
...(held ? { mapReadyAt: record.mapReadyAt ?? record.preparedAt ?? record.updatedAt } : record.mapReadyAt !== undefined ? { mapReadyAt: record.mapReadyAt } : {}),
|
|
@@ -1673,7 +1699,8 @@ export class ClaudeCompactionEnforcer {
|
|
|
1673
1699
|
this.pendingPostCompactRestore.set(session, phase);
|
|
1674
1700
|
this.pendingStageGeneration.set(session, record.occupantGeneration);
|
|
1675
1701
|
if (inFlight || record.uncertainCompact) {
|
|
1676
|
-
|
|
1702
|
+
if (phase === "turn_boundary")
|
|
1703
|
+
this.afterUncertainCompact.add(session);
|
|
1677
1704
|
this.persist(session, record.attemptId, { uncertainCompact: true });
|
|
1678
1705
|
}
|
|
1679
1706
|
if (record.restoreCarry)
|
|
@@ -1685,6 +1712,49 @@ export class ClaudeCompactionEnforcer {
|
|
|
1685
1712
|
this.setManualStage(session, phase === "compliance_prompt" ? "restore-sent" : "compact-sent", undefined, record.operatorInitiated);
|
|
1686
1713
|
}
|
|
1687
1714
|
}
|
|
1715
|
+
/** Count ended attempts, never individual send calls. The current attempt record carries the run across restarts. */
|
|
1716
|
+
async noteEndedPreparation(input, policy) {
|
|
1717
|
+
const current = this.records.get(input.sessionName);
|
|
1718
|
+
if (!current)
|
|
1719
|
+
return;
|
|
1720
|
+
const r = current.record, generation = this.liveGeneration(input.sessionName);
|
|
1721
|
+
const interrupted = this.pendingPreCompactPrep.get(input.sessionName)?.cancelled || !policy.enabled || input.usedPercentage == null || input.usedPercentage < policy.thresholdPercent
|
|
1722
|
+
|| r.mode !== "automatic" || generation === null || generation !== r.occupantGeneration
|
|
1723
|
+
|| (r.sessionId && input.sessionId && r.sessionId !== input.sessionId)
|
|
1724
|
+
|| r.delivery !== "not_sent" || r.belowSince !== undefined || r.compactSending || r.uncertainCompact
|
|
1725
|
+
|| ["preparation_cancelled", "preparation_replaced", "stale_generation", "disabled", "daemon_restarted",
|
|
1726
|
+
"below_threshold_while_prepared", "prepared_map_stale", "occupant_generation_unavailable"].includes(r.reason ?? "");
|
|
1727
|
+
if (interrupted) {
|
|
1728
|
+
if (r.preparationFailures)
|
|
1729
|
+
this.persist(input.sessionName, r.attemptId, { preparationFailures: undefined });
|
|
1730
|
+
return;
|
|
1731
|
+
}
|
|
1732
|
+
if (r.phase !== "ended" || r.endedAt === undefined || r.sends === 0)
|
|
1733
|
+
return;
|
|
1734
|
+
const old = r.preparationFailures;
|
|
1735
|
+
const run = old && Number.isSafeInteger(old.endedAttempts) && old.endedAttempts >= 0
|
|
1736
|
+
&& typeof old.lastAttemptId === "string" && (old.sessionId === null || typeof old.sessionId === "string")
|
|
1737
|
+
&& old.occupantGeneration === generation
|
|
1738
|
+
&& (!old.sessionId || !input.sessionId || old.sessionId === input.sessionId) ? old
|
|
1739
|
+
: { occupantGeneration: generation, sessionId: input.sessionId ?? null, endedAttempts: 0, lastAttemptId: "" };
|
|
1740
|
+
if (run.lastAttemptId !== r.attemptId) {
|
|
1741
|
+
run.lastAttemptId = r.attemptId;
|
|
1742
|
+
run.endedAttempts++;
|
|
1743
|
+
this.persist(input.sessionName, r.attemptId, { preparationFailures: run });
|
|
1744
|
+
}
|
|
1745
|
+
if (run.endedAttempts < 3 || run.reportedAttempts === run.endedAttempts || !this.onPreparationFailure)
|
|
1746
|
+
return;
|
|
1747
|
+
try {
|
|
1748
|
+
await this.onPreparationFailure({ sessionName: input.sessionName, occupantGeneration: generation,
|
|
1749
|
+
attemptId: r.attemptId, mapPath: r.mapPath, statePath: current.file, endedAttempts: run.endedAttempts,
|
|
1750
|
+
reason: r.reason ?? "send_failed", ...(r.inputBox ? { inputBox: r.inputBox } : {}) });
|
|
1751
|
+
if (this.records.get(input.sessionName) === current && current.record.preparationFailures === run) {
|
|
1752
|
+
run.reportedAttempts = run.endedAttempts;
|
|
1753
|
+
this.persist(input.sessionName, r.attemptId, { preparationFailures: run });
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1756
|
+
catch { /* The same diagnostic stays eligible on existing polls; no input effect or new scheduler. */ }
|
|
1757
|
+
}
|
|
1688
1758
|
stopPreparation(session, reason, expected) {
|
|
1689
1759
|
const attempt = this.pendingPreCompactPrep.get(session);
|
|
1690
1760
|
if ((expected && expected !== attempt) || !attempt || attempt.status === "stopped" || attempt.status === "compact-sent")
|
|
@@ -1708,6 +1778,10 @@ export class ClaudeCompactionEnforcer {
|
|
|
1708
1778
|
const attempt = this.pendingPreCompactPrep.get(session);
|
|
1709
1779
|
if (attempt)
|
|
1710
1780
|
attempt.cancelled = true;
|
|
1781
|
+
const record = this.records.get(session)?.record;
|
|
1782
|
+
if (record)
|
|
1783
|
+
this.persist(session, record.attemptId, { preparationFailures: undefined,
|
|
1784
|
+
...(!attempt && record.phase === "ended" ? { reason: "preparation_cancelled" } : {}) });
|
|
1711
1785
|
if (attempt?.status === "compact-sent" || this.pendingPostCompactRestore.has(session)) {
|
|
1712
1786
|
// Abandon management, not the provider command: keep its unconfirmed receipt and map.
|
|
1713
1787
|
// Do not clear automatic dedup/re-arm state or send any input. A later explicit retry
|