@openrig/cli 0.7.18 → 0.7.19
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 +7 -6
- package/daemon/assets/claude-hook-bridge.cjs +146 -0
- package/daemon/assets/plugins/openrig/.claude-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/.codex-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/.cursor-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/plugin.json +1 -1
- 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 +14 -14
- package/daemon/assets/plugins/openrig-core/hooks/scripts/activity-relay.cjs +43 -22
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +1 -0
- package/daemon/assets/plugins/openrig-core/skills/mission-slice-sop/SKILL.md +1 -1
- package/daemon/assets/plugins/openrig-core/skills/refocusing/scripts/trace-to-root.py +70 -2
- package/daemon/assets/skills/rigs/SKILL.md +40 -19
- 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 +16 -7
- package/daemon/context-packs/reference/getting-started.md +9 -4
- package/daemon/context-packs/reference/manifest.yaml +1 -1
- package/daemon/context-packs/reference/rig-spec.md +56 -26
- package/daemon/context-packs/reference/whats-new.md +82 -11
- 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/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/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/SKILL.md +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/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/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/refocusing/scripts/trace-to-root.py +70 -2
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +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 +9 -0
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +41 -4
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts +2 -0
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +3 -1
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +5 -0
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +45 -10
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/kernel-authority.d.ts +7 -0
- package/daemon/dist/adapters/kernel-authority.d.ts.map +1 -1
- package/daemon/dist/adapters/kernel-authority.js +24 -1
- package/daemon/dist/adapters/kernel-authority.js.map +1 -1
- package/daemon/dist/adapters/pi-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-resume.js +5 -7
- package/daemon/dist/adapters/pi-resume.js.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.d.ts +5 -1
- package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +34 -0
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +359 -26
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts +7 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.js +29 -19
- package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +54 -34
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +183 -57
- package/daemon/dist/adapters/tmux.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 +6 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/171_seat_hook_bridge.d.ts +5 -0
- package/daemon/dist/db/migrations/171_seat_hook_bridge.d.ts.map +1 -0
- package/daemon/dist/db/migrations/171_seat_hook_bridge.js +25 -0
- package/daemon/dist/db/migrations/171_seat_hook_bridge.js.map +1 -0
- package/daemon/dist/db/migrations/174_session_launched_cwd.d.ts +6 -0
- package/daemon/dist/db/migrations/174_session_launched_cwd.d.ts.map +1 -0
- package/daemon/dist/db/migrations/174_session_launched_cwd.js +8 -0
- package/daemon/dist/db/migrations/174_session_launched_cwd.js.map +1 -0
- package/daemon/dist/db/migrations/175_core_app_access.d.ts +3 -0
- package/daemon/dist/db/migrations/175_core_app_access.d.ts.map +1 -0
- package/daemon/dist/db/migrations/175_core_app_access.js +26 -0
- package/daemon/dist/db/migrations/175_core_app_access.js.map +1 -0
- package/daemon/dist/domain/activity-grants.d.ts.map +1 -1
- package/daemon/dist/domain/activity-grants.js +6 -4
- package/daemon/dist/domain/activity-grants.js.map +1 -1
- package/daemon/dist/domain/agent-activity-store.d.ts +23 -0
- package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
- package/daemon/dist/domain/agent-activity-store.js +62 -5
- package/daemon/dist/domain/agent-activity-store.js.map +1 -1
- package/daemon/dist/domain/claude-activity-hooks.d.ts +4 -2
- package/daemon/dist/domain/claude-activity-hooks.d.ts.map +1 -1
- package/daemon/dist/domain/claude-activity-hooks.js +5 -3
- package/daemon/dist/domain/claude-activity-hooks.js.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +64 -3
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +203 -6
- package/daemon/dist/domain/claude-compaction-enforcer.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 +22 -3
- package/daemon/dist/domain/compaction-restore-notice.js.map +1 -1
- package/daemon/dist/domain/configured-account.d.ts +3 -0
- package/daemon/dist/domain/configured-account.d.ts.map +1 -0
- package/daemon/dist/domain/configured-account.js +10 -0
- package/daemon/dist/domain/configured-account.js.map +1 -0
- package/daemon/dist/domain/core-app-access.d.ts +51 -0
- package/daemon/dist/domain/core-app-access.d.ts.map +1 -0
- package/daemon/dist/domain/core-app-access.js +107 -0
- package/daemon/dist/domain/core-app-access.js.map +1 -0
- package/daemon/dist/domain/core-app-job.d.ts +411 -0
- package/daemon/dist/domain/core-app-job.d.ts.map +1 -0
- package/daemon/dist/domain/core-app-job.js +537 -0
- package/daemon/dist/domain/core-app-job.js.map +1 -0
- package/daemon/dist/domain/current-park-arm.d.ts +4 -0
- package/daemon/dist/domain/current-park-arm.d.ts.map +1 -0
- package/daemon/dist/domain/current-park-arm.js +14 -0
- package/daemon/dist/domain/current-park-arm.js.map +1 -0
- package/daemon/dist/domain/cwd-resolution.d.ts +12 -0
- package/daemon/dist/domain/cwd-resolution.d.ts.map +1 -1
- package/daemon/dist/domain/cwd-resolution.js +21 -1
- package/daemon/dist/domain/cwd-resolution.js.map +1 -1
- package/daemon/dist/domain/execution-view.d.ts.map +1 -1
- package/daemon/dist/domain/execution-view.js +9 -3
- package/daemon/dist/domain/execution-view.js.map +1 -1
- package/daemon/dist/domain/gateway/participants.d.ts +2 -0
- package/daemon/dist/domain/gateway/participants.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/participants.js +5 -1
- package/daemon/dist/domain/gateway/participants.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.d.ts +1 -0
- package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.js +37 -17
- package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/settled-asks.js +1 -1
- package/daemon/dist/domain/gateway/slack/settled-asks.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +1 -0
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.js +2 -0
- package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts +4 -0
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js +26 -2
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
- package/daemon/dist/domain/hook-bridge.d.ts +345 -0
- package/daemon/dist/domain/hook-bridge.d.ts.map +1 -0
- package/daemon/dist/domain/hook-bridge.js +547 -0
- package/daemon/dist/domain/hook-bridge.js.map +1 -0
- package/daemon/dist/domain/hosted-wake.d.ts +9 -0
- package/daemon/dist/domain/hosted-wake.d.ts.map +1 -1
- package/daemon/dist/domain/hosted-wake.js +45 -6
- package/daemon/dist/domain/hosted-wake.js.map +1 -1
- package/daemon/dist/domain/human-ask-attention.d.ts +10 -0
- package/daemon/dist/domain/human-ask-attention.d.ts.map +1 -0
- package/daemon/dist/domain/human-ask-attention.js +22 -0
- package/daemon/dist/domain/human-ask-attention.js.map +1 -0
- package/daemon/dist/domain/mission-control/mission-control-action-log.d.ts +4 -0
- package/daemon/dist/domain/mission-control/mission-control-action-log.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-action-log.js +8 -1
- package/daemon/dist/domain/mission-control/mission-control-action-log.js.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts +10 -0
- 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 +64 -12
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
- package/daemon/dist/domain/native-continuation-notice.d.ts +16 -0
- package/daemon/dist/domain/native-continuation-notice.d.ts.map +1 -0
- package/daemon/dist/domain/native-continuation-notice.js +79 -0
- package/daemon/dist/domain/native-continuation-notice.js.map +1 -0
- package/daemon/dist/domain/native-process-lineage.d.ts +16 -0
- package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-lineage.js +48 -3
- package/daemon/dist/domain/native-process-lineage.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +27 -6
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +6 -0
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +16 -2
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/outbox-handler.d.ts +21 -3
- package/daemon/dist/domain/outbox-handler.d.ts.map +1 -1
- package/daemon/dist/domain/outbox-handler.js +88 -8
- package/daemon/dist/domain/outbox-handler.js.map +1 -1
- package/daemon/dist/domain/park-wake-text.d.ts +18 -0
- package/daemon/dist/domain/park-wake-text.d.ts.map +1 -1
- package/daemon/dist/domain/park-wake-text.js +44 -0
- package/daemon/dist/domain/park-wake-text.js.map +1 -1
- package/daemon/dist/domain/policies/idle-gate-qitem.d.ts +3 -0
- package/daemon/dist/domain/policies/idle-gate-qitem.d.ts.map +1 -1
- package/daemon/dist/domain/policies/idle-gate-qitem.js +15 -0
- package/daemon/dist/domain/policies/idle-gate-qitem.js.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts +6 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.js +28 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -1
- package/daemon/dist/domain/process-limits.d.ts +21 -11
- package/daemon/dist/domain/process-limits.d.ts.map +1 -1
- package/daemon/dist/domain/process-limits.js +74 -20
- package/daemon/dist/domain/process-limits.js.map +1 -1
- package/daemon/dist/domain/process-table.d.ts +15 -0
- package/daemon/dist/domain/process-table.d.ts.map +1 -1
- package/daemon/dist/domain/process-table.js +39 -0
- package/daemon/dist/domain/process-table.js.map +1 -1
- package/daemon/dist/domain/queue-erasure.d.ts.map +1 -1
- package/daemon/dist/domain/queue-erasure.js +3 -0
- package/daemon/dist/domain/queue-erasure.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +60 -7
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +178 -36
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts +2 -0
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +29 -0
- package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
- package/daemon/dist/domain/queue-waiting.d.ts.map +1 -1
- package/daemon/dist/domain/queue-waiting.js +28 -3
- package/daemon/dist/domain/queue-waiting.js.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.d.ts +12 -0
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +115 -14
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/queue-wake-repository.d.ts +8 -0
- package/daemon/dist/domain/queue-wake-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-repository.js +48 -8
- package/daemon/dist/domain/queue-wake-repository.js.map +1 -1
- package/daemon/dist/domain/reconciler.d.ts +18 -2
- package/daemon/dist/domain/reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/reconciler.js +40 -0
- package/daemon/dist/domain/reconciler.js.map +1 -1
- package/daemon/dist/domain/restore-attempt-receipt.d.ts.map +1 -1
- package/daemon/dist/domain/restore-attempt-receipt.js +3 -2
- package/daemon/dist/domain/restore-attempt-receipt.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +5 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +73 -8
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/restore-topology.d.ts +7 -1
- package/daemon/dist/domain/restore-topology.d.ts.map +1 -1
- package/daemon/dist/domain/restore-topology.js +21 -0
- package/daemon/dist/domain/restore-topology.js.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.d.ts +2 -3
- package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.js +6 -25
- package/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +7 -6
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rig-teardown.d.ts +16 -3
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +73 -9
- package/daemon/dist/domain/rig-teardown.js.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.js +2 -2
- package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +5 -0
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +17 -7
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rosters.d.ts +11 -0
- package/daemon/dist/domain/rosters.d.ts.map +1 -1
- package/daemon/dist/domain/rosters.js +21 -2
- package/daemon/dist/domain/rosters.js.map +1 -1
- package/daemon/dist/domain/runner-channel.d.ts +35 -3
- package/daemon/dist/domain/runner-channel.d.ts.map +1 -1
- package/daemon/dist/domain/runner-channel.js +177 -8
- package/daemon/dist/domain/runner-channel.js.map +1 -1
- package/daemon/dist/domain/runner-permissions.d.ts +26 -3
- package/daemon/dist/domain/runner-permissions.d.ts.map +1 -1
- package/daemon/dist/domain/runner-permissions.js +160 -39
- package/daemon/dist/domain/runner-permissions.js.map +1 -1
- package/daemon/dist/domain/scope/mission-parent.d.ts +19 -0
- package/daemon/dist/domain/scope/mission-parent.d.ts.map +1 -0
- package/daemon/dist/domain/scope/mission-parent.js +134 -0
- package/daemon/dist/domain/scope/mission-parent.js.map +1 -0
- package/daemon/dist/domain/scope/scope-audit.d.ts.map +1 -1
- package/daemon/dist/domain/scope/scope-audit.js +8 -0
- package/daemon/dist/domain/scope/scope-audit.js.map +1 -1
- package/daemon/dist/domain/scope/types.d.ts +3 -1
- package/daemon/dist/domain/scope/types.d.ts.map +1 -1
- package/daemon/dist/domain/scope/types.js +5 -1
- package/daemon/dist/domain/scope/types.js.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.d.ts +14 -2
- package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.js +53 -14
- package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +9 -4
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.d.ts +4 -3
- package/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.js +40 -5
- package/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +14 -6
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +104 -22
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.js +4 -1
- package/daemon/dist/domain/seat-restart-in-place.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 +2 -0
- package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -1
- package/daemon/dist/domain/seat-skill-apply.d.ts +1 -1
- package/daemon/dist/domain/seat-skill-apply.d.ts.map +1 -1
- package/daemon/dist/domain/seat-skill-apply.js +3 -2
- package/daemon/dist/domain/seat-skill-apply.js.map +1 -1
- package/daemon/dist/domain/session-registry.d.ts +5 -1
- package/daemon/dist/domain/session-registry.d.ts.map +1 -1
- package/daemon/dist/domain/session-registry.js +12 -1
- package/daemon/dist/domain/session-registry.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +40 -1
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +211 -10
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/shared-history-selection.d.ts.map +1 -1
- package/daemon/dist/domain/shared-history-selection.js +9 -5
- package/daemon/dist/domain/shared-history-selection.js.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.d.ts +1 -1
- package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.js +4 -0
- package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts +1 -0
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +6 -4
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +10 -4
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts +35 -1
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.js +231 -33
- package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-sessions.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-sessions.js +2 -1
- package/daemon/dist/domain/terminal/herdr-sessions.js.map +1 -1
- package/daemon/dist/domain/terminal/rig-viewer-records.d.ts +59 -0
- package/daemon/dist/domain/terminal/rig-viewer-records.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/rig-viewer-records.js +210 -0
- package/daemon/dist/domain/terminal/rig-viewer-records.js.map +1 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts +2 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.d.ts +99 -4
- package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.js +556 -36
- package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
- package/daemon/dist/domain/terminal/tile-layout.js +1 -1
- package/daemon/dist/domain/terminal/tile-layout.js.map +1 -1
- package/daemon/dist/domain/terminal/tmux-viewer-guard.d.ts +25 -0
- package/daemon/dist/domain/terminal/tmux-viewer-guard.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/tmux-viewer-guard.js +70 -0
- package/daemon/dist/domain/terminal/tmux-viewer-guard.js.map +1 -0
- package/daemon/dist/domain/transcript-grep-worker.d.ts +2 -0
- package/daemon/dist/domain/transcript-grep-worker.d.ts.map +1 -0
- package/daemon/dist/domain/transcript-grep-worker.js +108 -0
- package/daemon/dist/domain/transcript-grep-worker.js.map +1 -0
- package/daemon/dist/domain/transcript-grep.d.ts +26 -0
- package/daemon/dist/domain/transcript-grep.d.ts.map +1 -0
- package/daemon/dist/domain/transcript-grep.js +90 -0
- package/daemon/dist/domain/transcript-grep.js.map +1 -0
- package/daemon/dist/domain/transcript-store.d.ts +8 -2
- package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-store.js +10 -60
- package/daemon/dist/domain/transcript-store.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +69 -2
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/watchdog-delivery-receipts.d.ts +4 -0
- package/daemon/dist/domain/watchdog-delivery-receipts.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-delivery-receipts.js +35 -2
- package/daemon/dist/domain/watchdog-delivery-receipts.js.map +1 -1
- package/daemon/dist/domain/watchdog-delivery.d.ts +44 -0
- package/daemon/dist/domain/watchdog-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-delivery.js +60 -2
- package/daemon/dist/domain/watchdog-delivery.js.map +1 -1
- package/daemon/dist/domain/watchdog-history-log.d.ts +12 -0
- package/daemon/dist/domain/watchdog-history-log.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-history-log.js +19 -1
- package/daemon/dist/domain/watchdog-history-log.js.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts +32 -0
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.js +78 -0
- package/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts +17 -3
- package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.js +19 -5
- package/daemon/dist/domain/watchdog-policy-engine.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.d.ts +12 -0
- package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-runtime.js +64 -7
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/domain/workflow-step-trail-log.d.ts +2 -2
- package/daemon/dist/domain/workflow-step-trail-log.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-step-trail-log.js.map +1 -1
- package/daemon/dist/domain/workflow-types.d.ts +3 -1
- package/daemon/dist/domain/workflow-types.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-types.js.map +1 -1
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +5 -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/mission-parent-surface.d.ts +2 -0
- package/daemon/dist/mission-parent-surface.d.ts.map +1 -0
- package/daemon/dist/mission-parent-surface.js +2 -0
- package/daemon/dist/mission-parent-surface.js.map +1 -0
- package/daemon/dist/routes/activity.d.ts +18 -1
- package/daemon/dist/routes/activity.d.ts.map +1 -1
- package/daemon/dist/routes/activity.js +47 -9
- 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 +194 -177
- package/daemon/dist/routes/attention.js.map +1 -1
- package/daemon/dist/routes/core-app.d.ts +10 -0
- package/daemon/dist/routes/core-app.d.ts.map +1 -0
- package/daemon/dist/routes/core-app.js +175 -0
- package/daemon/dist/routes/core-app.js.map +1 -0
- package/daemon/dist/routes/hook-bridge.d.ts +3 -0
- package/daemon/dist/routes/hook-bridge.d.ts.map +1 -0
- package/daemon/dist/routes/hook-bridge.js +158 -0
- package/daemon/dist/routes/hook-bridge.js.map +1 -0
- package/daemon/dist/routes/missions.d.ts.map +1 -1
- package/daemon/dist/routes/missions.js +14 -2
- package/daemon/dist/routes/missions.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts +1 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +8 -5
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/rigspec.js +1 -1
- package/daemon/dist/routes/rigspec.js.map +1 -1
- package/daemon/dist/routes/scope-audit.d.ts.map +1 -1
- package/daemon/dist/routes/scope-audit.js +7 -1
- package/daemon/dist/routes/scope-audit.js.map +1 -1
- package/daemon/dist/routes/seat.d.ts.map +1 -1
- package/daemon/dist/routes/seat.js +30 -4
- package/daemon/dist/routes/seat.js.map +1 -1
- package/daemon/dist/routes/slices.d.ts.map +1 -1
- package/daemon/dist/routes/slices.js +21 -2
- package/daemon/dist/routes/slices.js.map +1 -1
- package/daemon/dist/routes/startup.js +2 -1
- package/daemon/dist/routes/startup.js.map +1 -1
- package/daemon/dist/routes/terminal.d.ts.map +1 -1
- package/daemon/dist/routes/terminal.js +47 -6
- package/daemon/dist/routes/terminal.js.map +1 -1
- package/daemon/dist/routes/transcripts.d.ts.map +1 -1
- package/daemon/dist/routes/transcripts.js +16 -1
- package/daemon/dist/routes/transcripts.js.map +1 -1
- package/daemon/dist/routes/watchdog.d.ts.map +1 -1
- package/daemon/dist/routes/watchdog.js +3 -2
- package/daemon/dist/routes/watchdog.js.map +1 -1
- package/daemon/dist/routes/workflow.d.ts.map +1 -1
- package/daemon/dist/routes/workflow.js +5 -0
- package/daemon/dist/routes/workflow.js.map +1 -1
- package/daemon/dist/server.d.ts +2 -0
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +11 -0
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +90 -33
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/dist/terminal-viewer-guard-surface.d.ts +2 -0
- package/daemon/dist/terminal-viewer-guard-surface.d.ts.map +1 -0
- package/daemon/dist/terminal-viewer-guard-surface.js +2 -0
- package/daemon/dist/terminal-viewer-guard-surface.js.map +1 -0
- package/daemon/docs/reference/agent-startup-guide.md +4 -1
- package/daemon/docs/reference/claude-status-line.md +3 -2
- package/daemon/docs/reference/community-harness-examples/cursor/openrig-cursor-launch +6 -0
- package/daemon/docs/reference/community-harness-examples/dsh/README.md +1 -1
- package/daemon/docs/reference/community-harness-examples/dsh/openrig-dsh-runner.mjs +186 -30
- package/daemon/docs/reference/community-harness-examples/hermes/openrig-hermes-launch +6 -0
- package/daemon/docs/reference/community-harness-examples/openclaw/openrig-openclaw-launch +6 -0
- package/daemon/docs/reference/community-harness-examples/openshell/README.md +2 -0
- package/daemon/docs/reference/community-harness-examples/pi-tui/openrig-pi-tui-launch +6 -0
- package/daemon/docs/reference/community-harness-presets.md +6 -5
- package/daemon/docs/reference/core-app.md +212 -0
- package/daemon/docs/reference/daemon-http-clients.md +6 -0
- package/daemon/docs/reference/getting-started.md +9 -4
- package/daemon/docs/reference/harness-runner-contract.md +50 -4
- package/daemon/docs/reference/hosted-members.md +21 -1
- package/daemon/docs/reference/quickstart.md +4 -3
- package/daemon/docs/reference/rig-spec.md +56 -26
- package/daemon/docs/reference/rosters.md +8 -0
- package/daemon/docs/reference/sdlc-conventions.md +42 -5
- package/daemon/docs/reference/seat-delivery.md +87 -6
- package/daemon/docs/reference/terminal-sessions.md +99 -1
- package/daemon/docs/reference/whats-new.md +82 -11
- package/daemon/specs/rigs/launch/factory/guidance/lead-first-move.md +4 -3
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +13 -3
- package/daemon/specs/rigs/launch/starter/guidance/lead-first-move.md +4 -3
- package/dist/ask-wake.d.ts.map +1 -1
- package/dist/ask-wake.js +8 -1
- package/dist/ask-wake.js.map +1 -1
- package/dist/build-info.js +3 -3
- package/dist/commands/archive.js +1 -1
- package/dist/commands/archive.js.map +1 -1
- package/dist/commands/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +7 -0
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +5 -0
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/ps.d.ts +2 -1
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +9 -4
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.js +4 -4
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/roster.d.ts +5 -0
- package/dist/commands/roster.d.ts.map +1 -1
- package/dist/commands/scope.d.ts.map +1 -1
- package/dist/commands/scope.js +346 -9
- package/dist/commands/scope.js.map +1 -1
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +90 -8
- 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 +3 -1
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/terminal.d.ts +56 -0
- package/dist/commands/terminal.d.ts.map +1 -1
- package/dist/commands/terminal.js +194 -4
- package/dist/commands/terminal.js.map +1 -1
- package/dist/commands/transcript.js +1 -1
- package/dist/commands/transcript.js.map +1 -1
- package/dist/commands/unarchive.js +1 -1
- package/dist/commands/unarchive.js.map +1 -1
- package/dist/commands/workflow-follow.d.ts +3 -1
- package/dist/commands/workflow-follow.d.ts.map +1 -1
- package/dist/commands/workflow-follow.js +25 -6
- package/dist/commands/workflow-follow.js.map +1 -1
- package/dist/commands/workflow-render.d.ts.map +1 -1
- package/dist/commands/workflow-render.js +5 -1
- package/dist/commands/workflow-render.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +14 -4
- package/dist/commands/workflow.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +11 -0
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/lib/scope/mission-composition.d.ts +1 -0
- package/dist/lib/scope/mission-composition.d.ts.map +1 -1
- package/dist/lib/scope/mission-composition.js +14 -0
- package/dist/lib/scope/mission-composition.js.map +1 -1
- package/dist/lib/scope/scope-audit.d.ts.map +1 -1
- package/dist/lib/scope/scope-audit.js +8 -0
- package/dist/lib/scope/scope-audit.js.map +1 -1
- package/dist/lib/scope/scope-fs.d.ts +10 -0
- package/dist/lib/scope/scope-fs.d.ts.map +1 -1
- package/dist/lib/scope/scope-fs.js +60 -0
- package/dist/lib/scope/scope-fs.js.map +1 -1
- package/dist/lib/scope/types.d.ts +3 -1
- package/dist/lib/scope/types.d.ts.map +1 -1
- package/dist/lib/scope/types.js +5 -1
- package/dist/lib/scope/types.js.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +18 -8
- package/dist/mcp-server.js.map +1 -1
- package/dist/restore-packet/packet-writer.d.ts.map +1 -1
- package/dist/restore-packet/packet-writer.js +8 -5
- package/dist/restore-packet/packet-writer.js.map +1 -1
- package/dist/terminal-window.d.ts +2 -1
- package/dist/terminal-window.d.ts.map +1 -1
- package/dist/terminal-window.js +567 -41
- package/dist/terminal-window.js.map +1 -1
- package/package.json +1 -1
- package/tui/dist/daemon-client.d.ts +4 -0
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/execution/execution-model.d.ts.map +1 -1
- package/tui/dist/execution/execution-model.js +22 -5
- package/tui/dist/execution/execution-model.js.map +1 -1
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +6 -3
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/navigator.d.ts +1 -1
- package/tui/dist/navigator.d.ts.map +1 -1
- package/tui/dist/navigator.js +4 -2
- package/tui/dist/navigator.js.map +1 -1
- package/tui/dist/pulse/render-pulse.d.ts.map +1 -1
- package/tui/dist/pulse/render-pulse.js +7 -14
- package/tui/dist/pulse/render-pulse.js.map +1 -1
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +29 -21
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/stylize.d.ts.map +1 -1
- package/tui/dist/stylize.js +3 -3
- package/tui/dist/stylize.js.map +1 -1
- package/tui/dist/terminals/terminal-model.d.ts +1 -0
- package/tui/dist/terminals/terminal-model.d.ts.map +1 -1
- package/tui/dist/terminals/terminal-model.js +4 -2
- package/tui/dist/terminals/terminal-model.js.map +1 -1
- package/tui/dist/types.d.ts +1 -0
- package/tui/dist/types.d.ts.map +1 -1
- package/tui/dist/visual-layout.d.ts +3 -0
- package/tui/dist/visual-layout.d.ts.map +1 -1
- package/tui/dist/visual-layout.js +17 -0
- package/tui/dist/visual-layout.js.map +1 -1
- package/ui/dist/assets/{index-1O1f3A7K.js → index-B-sMy02c.js} +107 -107
- package/ui/dist/assets/{index-BX8TUZ0E.css → index-DiN7RwWg.css} +1 -1
- package/ui/dist/index.html +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-activity-hooks.d.ts","sourceRoot":"","sources":["../../src/domain/claude-activity-hooks.ts"],"names":[],"mappings":"AAUA,6FAA6F;AAC7F,eAAO,MAAM,mCAAmC,mDAAmD,CAAC;AAEpG,wBAAgB,uBAAuB,CAAC,WAAW,SAAmB,GAAG,MAAM,CAE9E;AAED,6FAA6F;AAC7F,eAAO,MAAM,mCAAmC,0BAA0B,CAAC;AAE3E,4FAA4F;AAC5F,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC,yCAAyC;IACzC,aAAa,EAAE,OAAO,CAAC;IACvB,0FAA0F;IAC1F,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,gFAAgF;IAChF,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAChD,EAAE,EAAE,kBAAkB,EACtB,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACtC,oBAAoB,CAItB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,kBAAkB,EAAE,CAwBvH;AAMD;
|
|
1
|
+
{"version":3,"file":"claude-activity-hooks.d.ts","sourceRoot":"","sources":["../../src/domain/claude-activity-hooks.ts"],"names":[],"mappings":"AAUA,6FAA6F;AAC7F,eAAO,MAAM,mCAAmC,mDAAmD,CAAC;AAEpG,wBAAgB,uBAAuB,CAAC,WAAW,SAAmB,GAAG,MAAM,CAE9E;AAED,6FAA6F;AAC7F,eAAO,MAAM,mCAAmC,0BAA0B,CAAC;AAE3E,4FAA4F;AAC5F,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC,yCAAyC;IACzC,aAAa,EAAE,OAAO,CAAC;IACvB,0FAA0F;IAC1F,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,gFAAgF;IAChF,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAChD,EAAE,EAAE,kBAAkB,EACtB,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACtC,oBAAoB,CAItB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,kBAAkB,EAAE,CAwBvH;AAMD;;;oFAGoF;AACpF,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,IAAI,CAW5G"}
|
|
@@ -65,13 +65,15 @@ export function deriveRelayEvents(fs, manifestPath) {
|
|
|
65
65
|
function isPlainObject(v) {
|
|
66
66
|
return typeof v === "object" && v !== null && !Array.isArray(v);
|
|
67
67
|
}
|
|
68
|
-
/** Finite Node-command grammar: canonical POSIX quotes or literal unquoted words
|
|
69
|
-
*
|
|
68
|
+
/** Finite Node-command grammar: canonical POSIX quotes or literal unquoted words, optionally after one leading `exec`
|
|
69
|
+
* (the shape OpenRig generates since #3416, so `sh -c` becomes the Node process; the shape without it is what earlier
|
|
70
|
+
* versions wrote, and both stay OpenRig's). Shell expansion/operators and other wrappers remain user-owned, never
|
|
71
|
+
* managed commands. Keep in parity with settingsRelayPath in activity-relay.cjs. */
|
|
70
72
|
export function parseManagedClaudeNodeCommand(command) {
|
|
71
73
|
if (/[\r\n]/.test(command))
|
|
72
74
|
return null;
|
|
73
75
|
const token = /'(?:[^']|'"'"')*'|[-A-Za-z0-9_./:@%+=,]+/.source;
|
|
74
|
-
const text = command.trim();
|
|
76
|
+
const text = command.trim().replace(/^exec[ \t]+/, "");
|
|
75
77
|
if (!new RegExp(`^(?:${token})(?:[ \t]+(?:${token}))+$`).test(text))
|
|
76
78
|
return null;
|
|
77
79
|
const tokens = text.match(new RegExp(token, "g"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-activity-hooks.js","sourceRoot":"","sources":["../../src/domain/claude-activity-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,4FAA4F;AAC5F,8FAA8F;AAC9F,8FAA8F;AAC9F,8FAA8F;AAC9F,wEAAwE;AAExE,6FAA6F;AAC7F,MAAM,CAAC,MAAM,mCAAmC,GAAG,gDAAgD,CAAC;AAEpG,MAAM,UAAU,uBAAuB,CAAC,WAAW,GAAG,cAAc,EAAE;IACpE,OAAO,OAAO,C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AAI,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,CAAE,CAAC,KAAK,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACvG,MAAM,UAAU,GAAG,OAAO,CAAC,CAAC,CAAE,CAAC;IAC/B,IAAI,UAAU,KAAK,MAAM,IAAI,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IACvH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AAChD,CAAC"}
|
|
@@ -61,6 +61,26 @@ export declare const PREPARED_MAP_MAX_GROWTH_PERCENT = 15;
|
|
|
61
61
|
/** A held map retires this long after it was first seen ready (#2682). Operational, not measured. */
|
|
62
62
|
export declare const PREPARED_MAP_MAX_AGE_MS: number;
|
|
63
63
|
export declare const POST_COMPACT_SEND_WAIT_MS_DEFAULT = 10000;
|
|
64
|
+
/** #3389: Claude Code holds a `/compact` the seat accepted behind the turn it is running, while the three post-compaction
|
|
65
|
+
* messages join that turn. The steps therefore wait for the seat's own report of its compaction (SessionStart, source
|
|
66
|
+
* `compact`). How long before they go ahead without it (fail open, as before this wait): long enough for a long turn,
|
|
67
|
+
* short enough that a seat whose hooks never report is not left unrestored. Operational, not measured. */
|
|
68
|
+
export declare const COMPACT_SIGNAL_WAIT_MS_DEFAULT: number;
|
|
69
|
+
/** After the steps went ahead without the signal, how long a late signal still owes the sequence once more. Operational,
|
|
70
|
+
* not measured: the same age a held map retires at. */
|
|
71
|
+
export declare const LATE_COMPACT_SIGNAL_WATCH_MS_DEFAULT: number;
|
|
72
|
+
/** The seat's own report of a compaction: a SessionStart hook with source `compact`, as the daemon recorded it. */
|
|
73
|
+
export interface CompactSignal {
|
|
74
|
+
/** When the hook fired (epoch ms), from the hook's own timestamp. */
|
|
75
|
+
observedAt: number;
|
|
76
|
+
/** The occupant generation the emitting hook carried: the one asked for, or an earlier one of the same live process
|
|
77
|
+
* (an adoption mints a new generation, the process's hooks keep the one it launched with). */
|
|
78
|
+
generation: string;
|
|
79
|
+
}
|
|
80
|
+
/** The earliest report of a compaction recorded for the seat at or after `sinceMs` that came from the occupant of this
|
|
81
|
+
* generation, or null. Who counts as that occupant is the reader's to say, and part of the question, not a check on its
|
|
82
|
+
* answer: a report with no generation or from a retired occupant must not stand in front of a later report from this one. */
|
|
83
|
+
export type CompactSignalSince = (sessionName: string, sinceMs: number, generation: string) => CompactSignal | null;
|
|
64
84
|
export interface EnforcerInput {
|
|
65
85
|
nodeId?: string;
|
|
66
86
|
sessionName: string;
|
|
@@ -109,7 +129,10 @@ export type ManualCompactionOutcome = {
|
|
|
109
129
|
};
|
|
110
130
|
export type EnforcerSkipReason = "terminal_policy_refused" | "terminal_policy_unavailable" | "typing_guard_enabled" | "guard_target_unknown" | "guard_target_changed" | "runtime_filter" | "no_usage_data" | "disabled" | "below_threshold" | "already_triggered_above_threshold" | "dedup_window" | "post_restore_cooldown" | "send_failed" | "invalid_policy" | "stale_generation" | "stale_observation" | "preparation_pending" | "preparation_incomplete" | "map_complete_seat_never_idle" | "preparation_stopped" | "preparation_directory_unavailable" | "occupant_generation_unavailable" | "no_pending_stage" | "waiting_for_idle"
|
|
111
131
|
/** A completed map is held until a window opens (#2682): no /compact now, and no new preparation request. */
|
|
112
|
-
| "prepared_awaiting_window" | "pane_unknown_protected" | "input_box_not_empty"
|
|
132
|
+
| "prepared_awaiting_window" | "pane_unknown_protected" | "input_box_not_empty"
|
|
133
|
+
/** The /compact write was accepted, but the seat has not yet reported its compaction (SessionStart, source compact):
|
|
134
|
+
* the post-compaction steps wait, up to a bound, and then go ahead as they always did (#3389). */
|
|
135
|
+
| "awaiting_compact_signal";
|
|
113
136
|
/** Out-of-contract thresholds (0, 101, NaN, a non-integer) are treated as disabled. */
|
|
114
137
|
export declare function isValidThresholdPercent(value: unknown): boolean;
|
|
115
138
|
/**
|
|
@@ -301,6 +324,13 @@ export declare class ClaudeCompactionEnforcer {
|
|
|
301
324
|
private readonly stranded;
|
|
302
325
|
/** Seats whose owed restore steps follow a /compact whose outcome is unknown; never replay that command. */
|
|
303
326
|
private readonly afterUncertainCompact;
|
|
327
|
+
/** #3389: seats whose /compact write was accepted and whose compaction report has not come yet: the turn boundary waits. */
|
|
328
|
+
private readonly awaitingCompactSignal;
|
|
329
|
+
/** #3389: seats whose steps went ahead without the report: a report that comes late owes the sequence once more. */
|
|
330
|
+
private readonly lateCompactSignal;
|
|
331
|
+
private readonly compactSignalSince?;
|
|
332
|
+
private readonly compactSignalWaitMs;
|
|
333
|
+
private readonly lateCompactSignalWatchMs;
|
|
304
334
|
private readonly lastInputBox;
|
|
305
335
|
private readonly restartRecoveryWindowMs;
|
|
306
336
|
private readonly daemonInstance;
|
|
@@ -308,10 +338,13 @@ export declare class ClaudeCompactionEnforcer {
|
|
|
308
338
|
private readonly onPostRestoreComplete?;
|
|
309
339
|
private readonly onPreparationFailure?;
|
|
310
340
|
private readonly onRestoreDeliveryFailure?;
|
|
341
|
+
private readonly onRestoreDeliveryComplete?;
|
|
311
342
|
private readonly terminalPolicies?;
|
|
312
343
|
constructor(settingsStore: SettingsStore, sessionTransport: SessionTransport, opts?: {
|
|
313
344
|
onPreparationFailure?: (failure: PreparationFailure) => Promise<void>;
|
|
314
345
|
onRestoreDeliveryFailure?: (failure: RestoreDeliveryFailure) => Promise<void>;
|
|
346
|
+
/** All owed stages landed; independent of the optional post-restore usage sample. */
|
|
347
|
+
onRestoreDeliveryComplete?: (receipt: RestoreDeliveryFailure) => Promise<void>;
|
|
315
348
|
terminalPolicies?: TerminalPolicyStore;
|
|
316
349
|
dedupWindowMs?: number;
|
|
317
350
|
openrigHome?: string;
|
|
@@ -326,6 +359,11 @@ export declare class ClaudeCompactionEnforcer {
|
|
|
326
359
|
/** Which daemon process this is (default: this process). Records another process wrote can be recovered. */
|
|
327
360
|
daemonInstance?: string;
|
|
328
361
|
resolveOccupantGeneration?: (sessionName: string) => string | null;
|
|
362
|
+
/** #3389: where the seat's own report of its compaction (SessionStart, source compact) is read. Without it the
|
|
363
|
+
* post-compaction steps follow the accepted /compact at once, as before. */
|
|
364
|
+
compactSignalSince?: CompactSignalSince;
|
|
365
|
+
compactSignalWaitMs?: number;
|
|
366
|
+
lateCompactSignalWatchMs?: number;
|
|
329
367
|
onPostRestoreComplete?: (receipt: {
|
|
330
368
|
sessionName: string;
|
|
331
369
|
occupantGeneration: string | null;
|
|
@@ -437,6 +475,28 @@ export declare class ClaudeCompactionEnforcer {
|
|
|
437
475
|
private noteMapReady;
|
|
438
476
|
private deliverPreparation;
|
|
439
477
|
private sendPreparedCompact;
|
|
478
|
+
/** #3389: does the first post-compaction step still wait for the seat's report of its compaction? Releases it when the
|
|
479
|
+
* report is there (a SessionStart with source compact, from this occupant, at or after this attempt's /compact write),
|
|
480
|
+
* and after the bound goes ahead without it (fail open) while keeping a watch for a late report. */
|
|
481
|
+
private compactSignalPending;
|
|
482
|
+
/** The report that belongs to this wait: from the same occupant generation the /compact went to (a report with no
|
|
483
|
+
* generation, or another one, proves nothing here), and not older than the write. */
|
|
484
|
+
private matchingCompactSignal;
|
|
485
|
+
/** #3389: a report that comes after the steps went ahead without it owes the sequence once more, once: the watch ends
|
|
486
|
+
* with that, so the same report seen again (the managed and the plugin hook both post it, a poll reads it twice) owes
|
|
487
|
+
* nothing more. Held until the first sequence has finished, so the two never overlap. */
|
|
488
|
+
private reseedFromLateCompactSignal;
|
|
489
|
+
/** A restarted daemon picks the wait for the seat's report up from the record, with the write time the record kept, so a
|
|
490
|
+
* restart neither starts the bound over nor lets the steps go early. Only for an /compact the seat accepted: one whose
|
|
491
|
+
* outcome was lost keeps the steps it always owed. */
|
|
492
|
+
private recoverCompactSignal;
|
|
493
|
+
/** The late-report check, under the same rule as any owed stage: only for a seat whose compaction is enabled, or an
|
|
494
|
+
* operator's own request (a disabled system drains nothing: the ghost-stage rule). */
|
|
495
|
+
private reseedIfOwed;
|
|
496
|
+
/** A cancel ends the late-report watch, and the record it was kept under says so, so a restart does not bring it back. */
|
|
497
|
+
private endLateCompactSignalWatch;
|
|
498
|
+
/** Write fields onto the seat's current record, when it has one. */
|
|
499
|
+
private persistStageFields;
|
|
440
500
|
/** Reconcile this attempt's possible write using the existing capture path. Unknown is not a resolved write. */
|
|
441
501
|
private inputBoxStatus;
|
|
442
502
|
/** /compact was submitted, or may have been: its restore steps are owed next, and no new automatic compaction starts
|
|
@@ -498,8 +558,9 @@ export declare class ClaudeCompactionEnforcer {
|
|
|
498
558
|
/** A draft-aware (protected) seat whose binding records no tmux pane. The input layer refuses every write to a
|
|
499
559
|
* managed seat without a known pane, so compaction refuses it before preparing anything. "Protected" is the
|
|
500
560
|
* mode an automatic input lease takes from the guard's configuration (desired draft-aware, else effective),
|
|
501
|
-
* the mode needsInputCheck then reads
|
|
502
|
-
* (no await before an attempt is registered) is
|
|
561
|
+
* the mode needsInputCheck then reads; a queue-only seat's lifecycle lease takes draft-aware too (#3076). It is
|
|
562
|
+
* read synchronously, so the manual path's in-progress guard (no await before an attempt is registered) is
|
|
563
|
+
* unchanged. */
|
|
503
564
|
private paneUnknownProtected;
|
|
504
565
|
private recordManualFailure;
|
|
505
566
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-compaction-enforcer.d.ts","sourceRoot":"","sources":["../../src/domain/claude-compaction-enforcer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAG/E,OAAO,EAA2D,KAAK,gBAAgB,EAAE,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzI,OAA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BAAmB;IAK3B;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB;CAO3B"}
|
|
@@ -80,6 +80,14 @@ const PREP_SEND_ATTEMPTS_MAX = 3;
|
|
|
80
80
|
// timeout the send returns not-ok, the stage does NOT advance, and the SAME stage
|
|
81
81
|
// is retried on the next poll tick. No new scheduler.
|
|
82
82
|
export const POST_COMPACT_SEND_WAIT_MS_DEFAULT = 10_000;
|
|
83
|
+
/** #3389: Claude Code holds a `/compact` the seat accepted behind the turn it is running, while the three post-compaction
|
|
84
|
+
* messages join that turn. The steps therefore wait for the seat's own report of its compaction (SessionStart, source
|
|
85
|
+
* `compact`). How long before they go ahead without it (fail open, as before this wait): long enough for a long turn,
|
|
86
|
+
* short enough that a seat whose hooks never report is not left unrestored. Operational, not measured. */
|
|
87
|
+
export const COMPACT_SIGNAL_WAIT_MS_DEFAULT = 10 * 60_000;
|
|
88
|
+
/** After the steps went ahead without the signal, how long a late signal still owes the sequence once more. Operational,
|
|
89
|
+
* not measured: the same age a held map retires at. */
|
|
90
|
+
export const LATE_COMPACT_SIGNAL_WATCH_MS_DEFAULT = 2 * 60 * 60_000;
|
|
83
91
|
/** Out-of-contract thresholds (0, 101, NaN, a non-integer) are treated as disabled. */
|
|
84
92
|
export function isValidThresholdPercent(value) {
|
|
85
93
|
return typeof value === "number"
|
|
@@ -326,6 +334,10 @@ function readCompactionRecord(file) {
|
|
|
326
334
|
&& (r.sessionId === undefined || text(r.sessionId)) && (r.endedAt === undefined || Number.isFinite(r.endedAt))
|
|
327
335
|
&& (r.afterEnded === undefined || Number.isFinite(r.afterEnded))
|
|
328
336
|
&& (r.afterEndedSessionId === undefined || textOrNull(r.afterEndedSessionId))
|
|
337
|
+
&& (r.compactWriteAt === undefined || Number.isFinite(r.compactWriteAt))
|
|
338
|
+
&& (r.compactSignalSeenAt === undefined || Number.isFinite(r.compactSignalSeenAt))
|
|
339
|
+
&& (r.compactSignalFellBackAt === undefined || Number.isFinite(r.compactSignalFellBackAt))
|
|
340
|
+
&& (r.lateSignalWatchUntil === undefined || Number.isFinite(r.lateSignalWatchUntil))
|
|
329
341
|
&& (carry === undefined || (typeof carry === "object" && carry !== null && textOrNull(carry.mapPath) && textOrNull(carry.compactInstruction)
|
|
330
342
|
&& (carry.skipMap === undefined || (text(carry.skipMap?.mapPath) && text(carry.skipMap?.marker)))));
|
|
331
343
|
return valid ? r : null;
|
|
@@ -376,6 +388,13 @@ export class ClaudeCompactionEnforcer {
|
|
|
376
388
|
stranded = new Map();
|
|
377
389
|
/** Seats whose owed restore steps follow a /compact whose outcome is unknown; never replay that command. */
|
|
378
390
|
afterUncertainCompact = new Set();
|
|
391
|
+
/** #3389: seats whose /compact write was accepted and whose compaction report has not come yet: the turn boundary waits. */
|
|
392
|
+
awaitingCompactSignal = new Map();
|
|
393
|
+
/** #3389: seats whose steps went ahead without the report: a report that comes late owes the sequence once more. */
|
|
394
|
+
lateCompactSignal = new Map();
|
|
395
|
+
compactSignalSince;
|
|
396
|
+
compactSignalWaitMs;
|
|
397
|
+
lateCompactSignalWatchMs;
|
|
379
398
|
lastInputBox = new Map();
|
|
380
399
|
restartRecoveryWindowMs;
|
|
381
400
|
daemonInstance;
|
|
@@ -383,9 +402,11 @@ export class ClaudeCompactionEnforcer {
|
|
|
383
402
|
onPostRestoreComplete;
|
|
384
403
|
onPreparationFailure;
|
|
385
404
|
onRestoreDeliveryFailure;
|
|
405
|
+
onRestoreDeliveryComplete;
|
|
386
406
|
terminalPolicies;
|
|
387
407
|
constructor(settingsStore, sessionTransport, opts) {
|
|
388
408
|
this.onRestoreDeliveryFailure = opts?.onRestoreDeliveryFailure;
|
|
409
|
+
this.onRestoreDeliveryComplete = opts?.onRestoreDeliveryComplete;
|
|
389
410
|
this.onPreparationFailure = opts?.onPreparationFailure;
|
|
390
411
|
this.terminalPolicies = opts?.terminalPolicies;
|
|
391
412
|
this.settingsStore = settingsStore;
|
|
@@ -403,6 +424,9 @@ export class ClaudeCompactionEnforcer {
|
|
|
403
424
|
this.restartRecoveryWindowMs = opts?.restartRecoveryWindowMs ?? RESTART_RECOVERY_WINDOW_MS_DEFAULT;
|
|
404
425
|
this.daemonInstance = opts?.daemonInstance ?? DAEMON_PROCESS_ID;
|
|
405
426
|
this.resolveOccupantGeneration = opts?.resolveOccupantGeneration;
|
|
427
|
+
this.compactSignalSince = opts?.compactSignalSince;
|
|
428
|
+
this.compactSignalWaitMs = opts?.compactSignalWaitMs ?? COMPACT_SIGNAL_WAIT_MS_DEFAULT;
|
|
429
|
+
this.lateCompactSignalWatchMs = opts?.lateCompactSignalWatchMs ?? LATE_COMPACT_SIGNAL_WATCH_MS_DEFAULT;
|
|
406
430
|
this.onPostRestoreComplete = opts?.onPostRestoreComplete;
|
|
407
431
|
}
|
|
408
432
|
/**
|
|
@@ -553,6 +577,10 @@ export class ClaudeCompactionEnforcer {
|
|
|
553
577
|
: ` ${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
|
|
554
578
|
? " The operator’s draft-protection settings still apply." : ""}`;
|
|
555
579
|
const step = steps[stage];
|
|
580
|
+
const waiting = stage === "turn_boundary" ? this.awaitingCompactSignal.get(sessionName) : undefined;
|
|
581
|
+
if (waiting) {
|
|
582
|
+
return { stage, held: false, ...last, detail: `OpenRig owes this seat its ${step} once the seat reports its compaction (a SessionStart hook with source compact, from this occupant, after this /compact was written). Without that report it goes ahead anyway ${Math.round(this.compactSignalWaitMs / 60_000)} minutes after the write, at ${new Date(waiting.writeAt + this.compactSignalWaitMs).toISOString()}.` };
|
|
583
|
+
}
|
|
556
584
|
if (!this.afterUncertainCompact.has(sessionName)) {
|
|
557
585
|
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}` };
|
|
558
586
|
}
|
|
@@ -601,6 +629,9 @@ export class ClaudeCompactionEnforcer {
|
|
|
601
629
|
const unsampled = { ...rest, usedPercentage: null };
|
|
602
630
|
this.recoverSeat(input);
|
|
603
631
|
this.reconcilePreparations();
|
|
632
|
+
// #3389: this runs every poll for a seat with no fresh sample, the one that owes a late report's sequence.
|
|
633
|
+
if (input.runtime === "claude-code")
|
|
634
|
+
this.reseedIfOwed(input.sessionName);
|
|
604
635
|
const attempt = this.pendingPreCompactPrep.get(input.sessionName);
|
|
605
636
|
if (input.runtime !== "claude-code" || attempt?.mode !== "automatic" || attempt.status !== "waiting"
|
|
606
637
|
|| attempt.delivery === "pending")
|
|
@@ -667,7 +698,8 @@ export class ClaudeCompactionEnforcer {
|
|
|
667
698
|
const outcome = guard && input.runtime === "claude-code"
|
|
668
699
|
? await guard.lifecycle([guard.target(input.sessionName).nodeId], runIfCurrent) : await runIfCurrent();
|
|
669
700
|
// Refusals before send (policy, guard, observation) must be visible too. A send has already recorded its full result.
|
|
670
|
-
|
|
701
|
+
// Waiting for the seat's report of its compaction is no delivery: nothing was attempted, so nothing failed.
|
|
702
|
+
if (!outcome.triggered && outcome.reason !== "awaiting_compact_signal" && record?.record.lastDelivery === previous) {
|
|
671
703
|
this.recordRestoreFailure(input.sessionName, stage, record, { ok: false, reason: outcome.reason });
|
|
672
704
|
}
|
|
673
705
|
return outcome;
|
|
@@ -684,6 +716,18 @@ export class ClaudeCompactionEnforcer {
|
|
|
684
716
|
finally {
|
|
685
717
|
// The awaited lifecycle has settled: notice work must not inherit its active lease.
|
|
686
718
|
const lastDelivery = record?.record.lastDelivery;
|
|
719
|
+
if (record?.record.phase === "done") {
|
|
720
|
+
// Bookkeeping is best-effort: a storage failure cannot turn delivered input into a failed drain.
|
|
721
|
+
try {
|
|
722
|
+
await this.onRestoreDeliveryComplete?.({ sessionName: input.sessionName, attemptId: record.record.attemptId,
|
|
723
|
+
mapPath: record.record.mapPath, lastDelivery: lastDelivery ?? { stage: "compliance_prompt", ok: true,
|
|
724
|
+
at: new Date(record.record.updatedAt).toISOString(), reason: "delivered", failures: 0 } });
|
|
725
|
+
}
|
|
726
|
+
catch (error) {
|
|
727
|
+
console.warn("[compaction] restore completion notice failed", { sessionName: input.sessionName,
|
|
728
|
+
attemptId: record.record.attemptId, errorClass: error instanceof Error ? error.name : typeof error });
|
|
729
|
+
}
|
|
730
|
+
}
|
|
687
731
|
const deliveredUnreadable = lastDelivery?.reason === "delivered_over_unreadable_pane";
|
|
688
732
|
// Unknown readiness from an attempt without #2818's bounded fallback waits for that fallback to be tried. It opens after
|
|
689
733
|
// two consecutive unknown polls of this stage, and the busy, prompt, draft, typing and beforeWrite guards still apply.
|
|
@@ -744,6 +788,7 @@ export class ClaudeCompactionEnforcer {
|
|
|
744
788
|
* is pending, so the sampled path can run its below-threshold bookkeeping.
|
|
745
789
|
*/
|
|
746
790
|
async drainPendingStage(input, policy) {
|
|
791
|
+
this.reseedIfOwed(input.sessionName);
|
|
747
792
|
// A missing or still-high sample need not show that /compact has finished. The newest idle
|
|
748
793
|
// hook can predate it: require live readiness, then admit only unknown after two consecutive owed-stage polls.
|
|
749
794
|
const pendingStage = this.pendingPostCompactRestore.get(input.sessionName);
|
|
@@ -791,6 +836,10 @@ export class ClaudeCompactionEnforcer {
|
|
|
791
836
|
return { triggered: false, reason: "stale_generation" };
|
|
792
837
|
}
|
|
793
838
|
}
|
|
839
|
+
// #3389: an accepted /compact is not a compaction. The first step waits for the seat's own report of it, up to a bound.
|
|
840
|
+
if (pendingStage === "turn_boundary" && this.compactSignalPending(input.sessionName)) {
|
|
841
|
+
return { triggered: false, reason: "awaiting_compact_signal" };
|
|
842
|
+
}
|
|
794
843
|
if (pendingStage === "turn_boundary" && this.afterUncertainCompact.has(input.sessionName)) {
|
|
795
844
|
// Only this attempt's possible /compact write is outstanding. A later Enter must not submit it.
|
|
796
845
|
const box = await this.inputBoxStatus(input.sessionName);
|
|
@@ -1418,7 +1467,9 @@ export class ClaudeCompactionEnforcer {
|
|
|
1418
1467
|
if (!marked) {
|
|
1419
1468
|
marked = true;
|
|
1420
1469
|
attempt.compactInFlight = true;
|
|
1421
|
-
|
|
1470
|
+
// #3389: the write's start, before it: a seat that compacts at once reports a time no earlier than this.
|
|
1471
|
+
attempt.compactWriteAt = this.now();
|
|
1472
|
+
this.persist(input.sessionName, attempt.attemptId, { compactSending: true, compactWriteAt: attempt.compactWriteAt, restoreCarry: carry, operatorInitiated });
|
|
1422
1473
|
}
|
|
1423
1474
|
};
|
|
1424
1475
|
const send = async () => {
|
|
@@ -1499,8 +1550,135 @@ export class ClaudeCompactionEnforcer {
|
|
|
1499
1550
|
attempt.status = "compact-sent";
|
|
1500
1551
|
this.owePostCompactRestore(input.sessionName, attempt, carry);
|
|
1501
1552
|
this.persist(input.sessionName, attempt.attemptId, { phase: "turn_boundary", restoreCarry: carry, operatorInitiated });
|
|
1553
|
+
// #3389: the write was accepted, which says nothing about the seat having compacted: Claude Code holds a /compact
|
|
1554
|
+
// behind the turn it is running. The first step waits for the seat's own report of its compaction.
|
|
1555
|
+
if (this.compactSignalSince && attempt.compactWriteAt !== undefined) {
|
|
1556
|
+
this.lateCompactSignal.delete(input.sessionName);
|
|
1557
|
+
this.awaitingCompactSignal.set(input.sessionName, { attemptId: attempt.attemptId, writeAt: attempt.compactWriteAt, generation: attempt.occupantGeneration });
|
|
1558
|
+
}
|
|
1502
1559
|
return { ok: true };
|
|
1503
1560
|
}
|
|
1561
|
+
/** #3389: does the first post-compaction step still wait for the seat's report of its compaction? Releases it when the
|
|
1562
|
+
* report is there (a SessionStart with source compact, from this occupant, at or after this attempt's /compact write),
|
|
1563
|
+
* and after the bound goes ahead without it (fail open) while keeping a watch for a late report. */
|
|
1564
|
+
compactSignalPending(session) {
|
|
1565
|
+
const wait = this.awaitingCompactSignal.get(session);
|
|
1566
|
+
if (!wait || !this.compactSignalSince)
|
|
1567
|
+
return false;
|
|
1568
|
+
const signal = this.matchingCompactSignal(session, wait);
|
|
1569
|
+
if (signal) {
|
|
1570
|
+
this.awaitingCompactSignal.delete(session);
|
|
1571
|
+
this.persistStageFields(session, { compactSignalSeenAt: signal.observedAt });
|
|
1572
|
+
return false;
|
|
1573
|
+
}
|
|
1574
|
+
if (this.now() - wait.writeAt < this.compactSignalWaitMs)
|
|
1575
|
+
return true;
|
|
1576
|
+
this.awaitingCompactSignal.delete(session);
|
|
1577
|
+
const until = wait.writeAt + this.lateCompactSignalWatchMs;
|
|
1578
|
+
this.lateCompactSignal.set(session, { ...wait, until, carry: this.restoreCarry.get(session), record: this.records.get(session) });
|
|
1579
|
+
this.persistStageFields(session, { compactSignalFellBackAt: this.now(), lateSignalWatchUntil: until });
|
|
1580
|
+
return false;
|
|
1581
|
+
}
|
|
1582
|
+
/** The report that belongs to this wait: from the same occupant generation the /compact went to (a report with no
|
|
1583
|
+
* generation, or another one, proves nothing here), and not older than the write. */
|
|
1584
|
+
matchingCompactSignal(session, wait) {
|
|
1585
|
+
// An attempt that names no occupant has nothing to match a report against.
|
|
1586
|
+
if (wait.generation === null)
|
|
1587
|
+
return null;
|
|
1588
|
+
let signal = null;
|
|
1589
|
+
try {
|
|
1590
|
+
signal = this.compactSignalSince?.(session, wait.writeAt, wait.generation) ?? null;
|
|
1591
|
+
}
|
|
1592
|
+
catch {
|
|
1593
|
+
return null;
|
|
1594
|
+
}
|
|
1595
|
+
// The reader answers for this occupant; a report with no generation, or older than the write, is no answer.
|
|
1596
|
+
if (!signal || !signal.generation || !(signal.observedAt >= wait.writeAt))
|
|
1597
|
+
return null;
|
|
1598
|
+
return signal;
|
|
1599
|
+
}
|
|
1600
|
+
/** #3389: a report that comes after the steps went ahead without it owes the sequence once more, once: the watch ends
|
|
1601
|
+
* with that, so the same report seen again (the managed and the plugin hook both post it, a poll reads it twice) owes
|
|
1602
|
+
* nothing more. Held until the first sequence has finished, so the two never overlap. */
|
|
1603
|
+
reseedFromLateCompactSignal(session) {
|
|
1604
|
+
const watch = this.lateCompactSignal.get(session);
|
|
1605
|
+
if (!watch)
|
|
1606
|
+
return;
|
|
1607
|
+
const live = this.liveGeneration(session);
|
|
1608
|
+
if (this.now() >= watch.until || watch.generation === null || (live !== null && live !== watch.generation)) {
|
|
1609
|
+
this.lateCompactSignal.delete(session);
|
|
1610
|
+
return;
|
|
1611
|
+
}
|
|
1612
|
+
if (this.pendingPostCompactRestore.has(session) || this.pendingPreCompactPrep.has(session))
|
|
1613
|
+
return;
|
|
1614
|
+
const signal = this.matchingCompactSignal(session, watch);
|
|
1615
|
+
if (!signal)
|
|
1616
|
+
return;
|
|
1617
|
+
this.lateCompactSignal.delete(session);
|
|
1618
|
+
if (watch.carry)
|
|
1619
|
+
this.restoreCarry.set(session, watch.carry);
|
|
1620
|
+
else
|
|
1621
|
+
this.restoreCarry.delete(session);
|
|
1622
|
+
if (watch.record)
|
|
1623
|
+
this.records.set(session, watch.record);
|
|
1624
|
+
this.lastAutoCompactAt.set(session, this.now());
|
|
1625
|
+
this.triggeredAboveThreshold.add(session);
|
|
1626
|
+
this.pendingPostCompactRestore.set(session, "turn_boundary");
|
|
1627
|
+
this.pendingStageGeneration.set(session, watch.generation);
|
|
1628
|
+
this.persistStageFields(session, { phase: "turn_boundary", compactSignalSeenAt: signal.observedAt, lateSignalWatchUntil: undefined });
|
|
1629
|
+
}
|
|
1630
|
+
/** A restarted daemon picks the wait for the seat's report up from the record, with the write time the record kept, so a
|
|
1631
|
+
* restart neither starts the bound over nor lets the steps go early. Only for an /compact the seat accepted: one whose
|
|
1632
|
+
* outcome was lost keeps the steps it always owed. */
|
|
1633
|
+
recoverCompactSignal(session, holder, phase, uncertain) {
|
|
1634
|
+
const record = holder.record;
|
|
1635
|
+
if (!this.compactSignalSince || record.compactWriteAt === undefined || record.compactSignalSeenAt !== undefined)
|
|
1636
|
+
return;
|
|
1637
|
+
const base = { attemptId: record.attemptId, writeAt: record.compactWriteAt, generation: record.occupantGeneration };
|
|
1638
|
+
if (record.compactSignalFellBackAt !== undefined) {
|
|
1639
|
+
if (record.lateSignalWatchUntil !== undefined) {
|
|
1640
|
+
this.lateCompactSignal.set(session, { ...base, until: record.lateSignalWatchUntil, carry: record.restoreCarry, record: holder });
|
|
1641
|
+
}
|
|
1642
|
+
}
|
|
1643
|
+
else if (phase === "turn_boundary" && !uncertain) {
|
|
1644
|
+
this.awaitingCompactSignal.set(session, base);
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
/** The late-report check, under the same rule as any owed stage: only for a seat whose compaction is enabled, or an
|
|
1648
|
+
* operator's own request (a disabled system drains nothing: the ghost-stage rule). */
|
|
1649
|
+
reseedIfOwed(session) {
|
|
1650
|
+
if (!this.lateCompactSignal.has(session))
|
|
1651
|
+
return;
|
|
1652
|
+
let enabled = false;
|
|
1653
|
+
try {
|
|
1654
|
+
enabled = this.settingsStore.resolveClaudeCompactionPolicy().enabled;
|
|
1655
|
+
}
|
|
1656
|
+
catch { /* unreadable policy: owes nothing now */ }
|
|
1657
|
+
if (enabled || this.manualCompactionState.get(session)?.operatorInitiated === true)
|
|
1658
|
+
this.reseedFromLateCompactSignal(session);
|
|
1659
|
+
}
|
|
1660
|
+
/** A cancel ends the late-report watch, and the record it was kept under says so, so a restart does not bring it back. */
|
|
1661
|
+
endLateCompactSignalWatch(session) {
|
|
1662
|
+
const watch = this.lateCompactSignal.get(session);
|
|
1663
|
+
this.awaitingCompactSignal.delete(session);
|
|
1664
|
+
this.lateCompactSignal.delete(session);
|
|
1665
|
+
if (!watch?.record)
|
|
1666
|
+
return;
|
|
1667
|
+
const held = this.records.get(session);
|
|
1668
|
+
this.records.set(session, watch.record);
|
|
1669
|
+
this.persistStage(session, "ended", "compaction_cancelled");
|
|
1670
|
+
this.persistStageFields(session, { lateSignalWatchUntil: undefined });
|
|
1671
|
+
if (held)
|
|
1672
|
+
this.records.set(session, held);
|
|
1673
|
+
else
|
|
1674
|
+
this.records.delete(session);
|
|
1675
|
+
}
|
|
1676
|
+
/** Write fields onto the seat's current record, when it has one. */
|
|
1677
|
+
persistStageFields(session, patch) {
|
|
1678
|
+
const current = this.records.get(session);
|
|
1679
|
+
if (current)
|
|
1680
|
+
this.persist(session, current.record.attemptId, patch);
|
|
1681
|
+
}
|
|
1504
1682
|
/** Reconcile this attempt's possible write using the existing capture path. Unknown is not a resolved write. */
|
|
1505
1683
|
async inputBoxStatus(sessionName) {
|
|
1506
1684
|
try {
|
|
@@ -1682,9 +1860,20 @@ export class ClaudeCompactionEnforcer {
|
|
|
1682
1860
|
return;
|
|
1683
1861
|
const { record } = newest;
|
|
1684
1862
|
// This process's own record (another enforcer in it) is live state, not a predecessor's.
|
|
1685
|
-
if (record.daemon === this.daemonInstance
|
|
1863
|
+
if (record.daemon === this.daemonInstance)
|
|
1686
1864
|
return;
|
|
1687
1865
|
const live = this.resolveOccupantGeneration?.(session) ?? this.sessionTransport.deliveryGuard?.maybeTarget(session)?.occupant ?? null;
|
|
1866
|
+
if (record.phase === "done") {
|
|
1867
|
+
// #3389: a sequence that went ahead without the seat's report still owes one more if the report comes late.
|
|
1868
|
+
if (record.occupantGeneration !== null && live === record.occupantGeneration) {
|
|
1869
|
+
this.recoverCompactSignal(session, newest, "done", false);
|
|
1870
|
+
// An operator's own request keeps its authority while its watch is kept, as an owed stage does, or a late report
|
|
1871
|
+
// would owe nothing when automatic compaction is off.
|
|
1872
|
+
if (record.mode === "manual" && this.lateCompactSignal.has(session))
|
|
1873
|
+
this.setManualStage(session, "audit-sent", undefined, record.operatorInitiated);
|
|
1874
|
+
}
|
|
1875
|
+
return;
|
|
1876
|
+
}
|
|
1688
1877
|
if (record.phase === "ended") {
|
|
1689
1878
|
if (record.occupantGeneration !== null && live === record.occupantGeneration
|
|
1690
1879
|
&& this.now() - (record.endedAt ?? record.updatedAt) < this.restartRecoveryWindowMs)
|
|
@@ -1768,6 +1957,8 @@ export class ClaudeCompactionEnforcer {
|
|
|
1768
1957
|
}
|
|
1769
1958
|
if (record.restoreCarry)
|
|
1770
1959
|
this.restoreCarry.set(session, record.restoreCarry);
|
|
1960
|
+
// #3389: the first step still waits for the seat's report, measured from the write this record kept, not from now.
|
|
1961
|
+
this.recoverCompactSignal(session, newest, phase, inFlight || record.uncertainCompact === true);
|
|
1771
1962
|
// As after a /compact this daemon sent: no new automatic compaction until the owed stages finish.
|
|
1772
1963
|
this.lastAutoCompactAt.set(session, this.now());
|
|
1773
1964
|
this.triggeredAboveThreshold.add(session);
|
|
@@ -1845,6 +2036,7 @@ export class ClaudeCompactionEnforcer {
|
|
|
1845
2036
|
if (record)
|
|
1846
2037
|
this.persist(session, record.attemptId, { preparationFailures: undefined,
|
|
1847
2038
|
...(!attempt && record.phase === "ended" ? { reason: "preparation_cancelled" } : {}) });
|
|
2039
|
+
this.endLateCompactSignalWatch(session);
|
|
1848
2040
|
if (attempt?.status === "compact-sent" || this.pendingPostCompactRestore.has(session)) {
|
|
1849
2041
|
// Abandon management, not the provider command: keep its unconfirmed receipt and map.
|
|
1850
2042
|
// Do not clear automatic dedup/re-arm state or send any input. A later explicit retry
|
|
@@ -1855,6 +2047,8 @@ export class ClaudeCompactionEnforcer {
|
|
|
1855
2047
|
attempt.controller.abort();
|
|
1856
2048
|
}
|
|
1857
2049
|
this.persistStage(session, "ended", "compaction_cancelled");
|
|
2050
|
+
this.awaitingCompactSignal.delete(session);
|
|
2051
|
+
this.lateCompactSignal.delete(session);
|
|
1858
2052
|
this.pendingPostCompactRestore.delete(session);
|
|
1859
2053
|
this.pendingStageGeneration.delete(session);
|
|
1860
2054
|
this.restoreCarry.delete(session);
|
|
@@ -1905,6 +2099,8 @@ export class ClaudeCompactionEnforcer {
|
|
|
1905
2099
|
this.triggeredAboveThreshold.delete(sessionName);
|
|
1906
2100
|
this.pendingPreCompactPrep.delete(sessionName);
|
|
1907
2101
|
this.pendingPostCompactRestore.delete(sessionName);
|
|
2102
|
+
this.awaitingCompactSignal.delete(sessionName);
|
|
2103
|
+
this.lateCompactSignal.delete(sessionName);
|
|
1908
2104
|
this.restoreCarry.delete(sessionName);
|
|
1909
2105
|
this.manualCompactionState.delete(sessionName);
|
|
1910
2106
|
this.pendingStageGeneration.delete(sessionName); // GHOST-STAGE (b): drop the captured queue-time gen
|
|
@@ -1915,8 +2111,9 @@ export class ClaudeCompactionEnforcer {
|
|
|
1915
2111
|
/** A draft-aware (protected) seat whose binding records no tmux pane. The input layer refuses every write to a
|
|
1916
2112
|
* managed seat without a known pane, so compaction refuses it before preparing anything. "Protected" is the
|
|
1917
2113
|
* mode an automatic input lease takes from the guard's configuration (desired draft-aware, else effective),
|
|
1918
|
-
* the mode needsInputCheck then reads
|
|
1919
|
-
* (no await before an attempt is registered) is
|
|
2114
|
+
* the mode needsInputCheck then reads; a queue-only seat's lifecycle lease takes draft-aware too (#3076). It is
|
|
2115
|
+
* read synchronously, so the manual path's in-progress guard (no await before an attempt is registered) is
|
|
2116
|
+
* unchanged. */
|
|
1920
2117
|
paneUnknownProtected(sessionName) {
|
|
1921
2118
|
const guard = this.sessionTransport.deliveryGuard;
|
|
1922
2119
|
const target = guard?.maybeTarget(sessionName);
|
|
@@ -1924,7 +2121,7 @@ export class ClaudeCompactionEnforcer {
|
|
|
1924
2121
|
return false;
|
|
1925
2122
|
try {
|
|
1926
2123
|
const config = guard.configuration(target.nodeId);
|
|
1927
|
-
return (config.desired.mode === "draft-aware" ? config.desired : config.effective).mode === "draft-aware";
|
|
2124
|
+
return (config.desired.mode === "draft-aware" ? config.desired : config.effective).mode === "draft-aware" || guard.queueOnly(target.nodeId);
|
|
1928
2125
|
}
|
|
1929
2126
|
catch {
|
|
1930
2127
|
return false;
|