@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
|
@@ -10,7 +10,7 @@ import { loadRelayProfiles } from "./gateway/relay-config.js";
|
|
|
10
10
|
import { relayStatePaths, validateRelayOutboundEnvelope } from "./gateway/relay-outbound.js";
|
|
11
11
|
import { SeenStore } from "./gateway/slack/state-store.js";
|
|
12
12
|
import { getOpenRigHome } from "../openrig-compat.js";
|
|
13
|
-
import { sharedChannelAddresses } from "./gateway/participants.js";
|
|
13
|
+
import { readSharedChannelAddresses, sharedChannelAddresses } from "./gateway/participants.js";
|
|
14
14
|
import { resolveExternal } from "./gateway/external-admission.js";
|
|
15
15
|
import { QueueTransitionLog, RELAY_OWNER_NOTIFICATION_ACCEPTED_PREFIX, RELAY_OWNER_NOTIFICATION_TRANSPORT_FAILED_PREFIX, formatRelayOwnerNotificationAccepted, formatRelayOwnerNotificationTransportFailed, parseRelayOwnerNotificationAccepted, parseRelayOwnerNotificationTransportFailed, DEFAULT_RECENT_TRANSITIONS_LIMIT, MAX_RECENT_TRANSITIONS_LIMIT, } from "./queue-transition-log.js";
|
|
16
16
|
export { DEFAULT_RECENT_TRANSITIONS_LIMIT, MAX_RECENT_TRANSITIONS_LIMIT, RELAY_OWNER_NOTIFICATION_ACCEPTED_PREFIX, RELAY_OWNER_NOTIFICATION_TRANSPORT_FAILED_PREFIX, formatRelayOwnerNotificationAccepted, formatRelayOwnerNotificationTransportFailed, parseRelayOwnerNotificationAccepted, parseRelayOwnerNotificationTransportFailed, };
|
|
@@ -19,7 +19,7 @@ export function mcOperationTag(operation) {
|
|
|
19
19
|
return `${MC_OPERATION_TAG_PREFIX}${operation}`;
|
|
20
20
|
}
|
|
21
21
|
import { WAKE_INTENT_PREFIX } from "./outbox-handler.js";
|
|
22
|
-
import { physicalSessionName } from "./session-registry.js";
|
|
22
|
+
import { physicalSessionName, SessionRegistry } from "./session-registry.js";
|
|
23
23
|
import { derivePickup } from "./queue-pickup.js";
|
|
24
24
|
import { withRecoveryIndex } from "./queue-recovery.js";
|
|
25
25
|
import { lastMeaningfulTransitionMany, meaningfulFor, readWaitingView, WaitingStatements } from "./queue-waiting.js";
|
|
@@ -45,6 +45,8 @@ import { computeClosureRequiredAt, validateClosure, } from "./hot-potato-enforce
|
|
|
45
45
|
import { validateHumanPark, validateHumanRoute } from "./human-route-enforcer.js";
|
|
46
46
|
import { QueueWakeRepository, USAGE_LIMIT_BLOCKER_TAG, } from "./queue-wake-repository.js";
|
|
47
47
|
import { WatchdogJobsRepository } from "./watchdog-jobs-repository.js";
|
|
48
|
+
import { NOTED_ON_QUEUED_ROW, QUEUED_AS_ROW, isQueueOnlyDeliveryCode } from "./watchdog-history-log.js";
|
|
49
|
+
import { parkedRowNotePrefix, queuedAsRowNote } from "./park-wake-text.js";
|
|
48
50
|
import { armQueueWait, backOffQueueWait, refreshQueueWaits, evaluateQueueWait, retargetQueueWait, isQueueWait } from "./queue-wait-backoff.js";
|
|
49
51
|
import { parseHumanQuestions, unansweredQuestions, describeTypedReplyPlacement, formatHumanAnswers, humanAnswerText } from "./human-questions.js";
|
|
50
52
|
import { slackMicros } from "./gateway/slack/state-store.js";
|
|
@@ -628,6 +630,7 @@ export class QueueRepository {
|
|
|
628
630
|
loadHumanRegistryFn;
|
|
629
631
|
/** Registered shared channels (0.7.3): `<id>@external` participants whose rows post to their Slack channel. */
|
|
630
632
|
sharedChannelsFn;
|
|
633
|
+
readSharedChannelsFn;
|
|
631
634
|
/** A hosted member's trigger, from the authored rosters on this host. */
|
|
632
635
|
hostedWakeFn;
|
|
633
636
|
/** Whether the rosters list an address as a hosted member, trigger or not. */
|
|
@@ -659,6 +662,7 @@ export class QueueRepository {
|
|
|
659
662
|
this.hasPendingPostCompactStage = opts?.hasPendingPostCompactStage;
|
|
660
663
|
this.loadHumanRegistryFn = opts?.loadHumanRegistry ?? (() => loadHumanRegistry());
|
|
661
664
|
this.sharedChannelsFn = opts?.sharedChannels ?? (() => sharedChannelAddresses());
|
|
665
|
+
this.readSharedChannelsFn = opts?.readSharedChannels ?? (() => readSharedChannelAddresses());
|
|
662
666
|
this.hostedWakeFn = opts?.hostedWake ?? defaultHostedWake;
|
|
663
667
|
this.hostedMemberFn = opts?.isHostedMember ?? defaultIsHostedMember;
|
|
664
668
|
this.hostedMembersFn = opts?.hostedMembers ?? defaultHostedMembers;
|
|
@@ -783,6 +787,10 @@ export class QueueRepository {
|
|
|
783
787
|
if (res.outcome === "retained")
|
|
784
788
|
return { classified: "retained", nudgeResult: res.reason === "typing_guard_enabled"
|
|
785
789
|
? "retained:typing_guard" : "retained:draft_aware" };
|
|
790
|
+
// Queued for the seat's hook bridge: it reaches the seat's context at the next turn boundary, which isn't a claim.
|
|
791
|
+
// The bridge owns the row now (handed to the hook, typed by its fallback, or named uncertain), so it isn't finalized.
|
|
792
|
+
if (res.outcome === "bridged")
|
|
793
|
+
return { classified: "bridged", nudgeResult: "bridged:queued" };
|
|
786
794
|
if (res.ok)
|
|
787
795
|
return res.verified ? { classified: "verified", nudgeResult: "verified" } : { classified: "indeterminate", nudgeResult: "delivered-ack-pending" };
|
|
788
796
|
const detail = res.error ?? res.reason ?? "unknown";
|
|
@@ -907,8 +915,33 @@ export class QueueRepository {
|
|
|
907
915
|
}
|
|
908
916
|
/** #2895 (a): the envelope meta for a sender `rig send` can't reach; empty (today's bytes) otherwise or when unwired. */
|
|
909
917
|
senderReach(sender) {
|
|
918
|
+
// #3268: an @external sender's reply is a queue row to it, so name that command only when the queue would accept it.
|
|
919
|
+
if (sender?.endsWith("@external") && this.knownUnregistered(sender))
|
|
920
|
+
return { senderRegistered: false };
|
|
910
921
|
return sender && this.isSenderSendable && !this.isSenderSendable(sender) ? { senderReachable: false } : {};
|
|
911
922
|
}
|
|
923
|
+
/** #3268: true only when one read of the person registry and one of the participant file both succeeded, that
|
|
924
|
+
* snapshot names no such @external address, and the queue's admission refuses it too. Absence comes from that
|
|
925
|
+
* snapshot, so admission's own later read collapsing to an empty list can't turn "unknown" into "absent". A read
|
|
926
|
+
* that fails or throws proves nothing, so the caller keeps today's reply line and the notification still goes out. */
|
|
927
|
+
knownUnregistered(sender) {
|
|
928
|
+
try {
|
|
929
|
+
const parsed = parseSessionName(sender);
|
|
930
|
+
if (parsed.kind !== "external")
|
|
931
|
+
return false;
|
|
932
|
+
const people = registeredPeople(this.loadHumanRegistryFn());
|
|
933
|
+
if (people === null)
|
|
934
|
+
return false;
|
|
935
|
+
const channels = this.readSharedChannelsFn();
|
|
936
|
+
if (channels === null)
|
|
937
|
+
return false;
|
|
938
|
+
const entities = [...people.map((p) => ({ entityId: p.entityId, address: p.address })), ...channels];
|
|
939
|
+
return resolveExternal(parsed.local, entities).kind === "unregistered" && !this.canRecordDestination(sender);
|
|
940
|
+
}
|
|
941
|
+
catch {
|
|
942
|
+
return false;
|
|
943
|
+
}
|
|
944
|
+
}
|
|
912
945
|
recordWakeIntent(input) {
|
|
913
946
|
if (!this.outbox)
|
|
914
947
|
return null;
|
|
@@ -1185,13 +1218,15 @@ export class QueueRepository {
|
|
|
1185
1218
|
return { text: recoveryNotice(keep) + keep.map(entry => entry.body).join("\n"), outboxIds: keep.map(entry => entry.outboxId) };
|
|
1186
1219
|
};
|
|
1187
1220
|
const outcome = await this.performWakeSend(qitemId, intent.destinationSession, intent.senderSession, undefined, recoveryNotice(group) + group.map(entry => entry.body).join("\n"), group.map(entry => entry.outboxId), trigger, recheckMembers);
|
|
1188
|
-
|
|
1221
|
+
// A bridged wake isn't confirmed, so the pass counts it as unconfirmed; its row is the bridge's to settle.
|
|
1222
|
+
let reportedState = outcome.classified === "verified" ? "delivered"
|
|
1223
|
+
: outcome.classified === "bridged" ? "indeterminate" : outcome.classified;
|
|
1189
1224
|
for (const intent of group) {
|
|
1190
1225
|
if (released.includes(intent))
|
|
1191
1226
|
continue;
|
|
1192
1227
|
// A no-write retry cannot settle whether an earlier attempt landed.
|
|
1193
1228
|
const earlierUnknown = intent.deliveryState === "indeterminate" && outcome.classified === "failed";
|
|
1194
|
-
const finalState = earlierUnknown ? "indeterminate" : outcome.classified === "verified" ? "delivered" : outcome.classified;
|
|
1229
|
+
const finalState = earlierUnknown ? "indeterminate" : outcome.classified === "verified" ? "delivered" : outcome.classified === "bridged" ? null : outcome.classified;
|
|
1195
1230
|
const nudgeResult = earlierUnknown ? `indeterminate:earlier delivery unconfirmed; retry ${outcome.nudgeResult}` : outcome.nudgeResult;
|
|
1196
1231
|
if (earlierUnknown)
|
|
1197
1232
|
reportedState = "indeterminate";
|
|
@@ -1203,7 +1238,8 @@ export class QueueRepository {
|
|
|
1203
1238
|
: undefined;
|
|
1204
1239
|
const wakeEvent = this.db.transaction(() => {
|
|
1205
1240
|
this.recordNudgeAttempt(qitemId, nudgeResult);
|
|
1206
|
-
|
|
1241
|
+
if (finalState)
|
|
1242
|
+
this.outbox.finalizeDelivery(intent.outboxId, finalState);
|
|
1207
1243
|
// Only a first attempt creates proof: an actual retry consumes it even if it again fails before input.
|
|
1208
1244
|
if (intent.deliveryState === "pending" && finalState === "failed" && outcome.preInputFailure === true) {
|
|
1209
1245
|
this.setWakePreInputFailure(intent.outboxId, true);
|
|
@@ -1397,7 +1433,7 @@ export class QueueRepository {
|
|
|
1397
1433
|
return;
|
|
1398
1434
|
if (!this.transport)
|
|
1399
1435
|
return;
|
|
1400
|
-
const outcome = await this.performWakeSend(qitemId, destinationSession, sourceSession, bodyOverride, undefined, undefined, trigger);
|
|
1436
|
+
const outcome = await this.performWakeSend(qitemId, destinationSession, sourceSession, bodyOverride, undefined, undefined, trigger, undefined, opts?.explicit === true);
|
|
1401
1437
|
this.recordNudgeAttempt(qitemId, outcome.nudgeResult);
|
|
1402
1438
|
}
|
|
1403
1439
|
/** The following startup intent drain owns durable pending wakes. Legacy packets
|
|
@@ -1574,7 +1610,9 @@ export class QueueRepository {
|
|
|
1574
1610
|
* (the "delivered-ack-pending" nudge literal). It is never promoted to
|
|
1575
1611
|
* delivered nor demoted to failed.
|
|
1576
1612
|
*/
|
|
1577
|
-
async performWakeSend(qitemId, destinationSession, sourceSession, bodyOverride, prebuiltText, committedOutboxIds, trigger = "agent", recheckMembers
|
|
1613
|
+
async performWakeSend(qitemId, destinationSession, sourceSession, bodyOverride, prebuiltText, committedOutboxIds, trigger = "agent", recheckMembers,
|
|
1614
|
+
/** An explicit notification, which passes a rig's delivery drain (here, and if a hook bridge queues it). */
|
|
1615
|
+
explicit = false) {
|
|
1578
1616
|
// DEFECT FIX (S1-class, 3 live specimens): a virtual
|
|
1579
1617
|
// @external destination has NO pane — the queue row ITSELF is the gateway
|
|
1580
1618
|
// subsystem's input (the Slack connector polls human-destined rows and its own
|
|
@@ -1652,7 +1690,7 @@ export class QueueRepository {
|
|
|
1652
1690
|
const res = await this.transport.send(destinationSession, text, { verify: true, stampISO, actorSession: sourceSession, committedOutboxIds,
|
|
1653
1691
|
deliveryId: committedOutboxIds ? undefined : deliveryId, auditPointer: qitemId, queueWake: true,
|
|
1654
1692
|
...(trigger === "openrig" ? { openrigNotice: true } : {}), ...(admission.urgentBy ? { urgent: { by: admission.urgentBy } } : {}),
|
|
1655
|
-
...(recheckMembers ? { recheckMembers } : {}) });
|
|
1693
|
+
...(recheckMembers ? { recheckMembers } : {}), ...(explicit ? { drainExempt: true } : {}) });
|
|
1656
1694
|
// OPR.0.3.2.21.FR-4(c) — wording rename: the prior literal
|
|
1657
1695
|
// "sent-unverified" read as a failure even in the common case
|
|
1658
1696
|
// (delivery confirmed but the synchronous ack window expired,
|
|
@@ -1693,7 +1731,7 @@ export class QueueRepository {
|
|
|
1693
1731
|
* Every new surface uses the same ID; old IDs and their original bodies remain intact. An answer to a decision parked
|
|
1694
1732
|
* on the person it asked belongs to that park's question (`episodeKey`): its ID includes it, and only that ID counts. */
|
|
1695
1733
|
async createHumanAnswer(input) {
|
|
1696
|
-
const { episodeKey, ...create } = input;
|
|
1734
|
+
const { episodeKey, verifyBeforeCreate, ...create } = input;
|
|
1697
1735
|
// A runner's permission request is answered in its ask, and the runner reads the answer back. No reply row: it
|
|
1698
1736
|
// would wake the runner's terminal, where typed text reads as a prompt to its agent. A host pairing request is
|
|
1699
1737
|
// answered in its ask too: the pairing poll reads it there, and nothing reads a reply.
|
|
@@ -1708,7 +1746,7 @@ export class QueueRepository {
|
|
|
1708
1746
|
const answered = this.getById(qitemId);
|
|
1709
1747
|
if (answered)
|
|
1710
1748
|
return answered;
|
|
1711
|
-
return this.create({ ...create, qitemId, tags: [...new Set([...(input.tags ?? []), "human-answer"])] });
|
|
1749
|
+
return this.create({ ...create, qitemId, tags: [...new Set([...(input.tags ?? []), "human-answer"])] }, verifyBeforeCreate);
|
|
1712
1750
|
}
|
|
1713
1751
|
/** Every answer this person returned to the ask (one per park), oldest first: after close, a replay finds the one its
|
|
1714
1752
|
* event returned or was absorbed into, whichever park it answered. */
|
|
@@ -1774,7 +1812,7 @@ export class QueueRepository {
|
|
|
1774
1812
|
const row = episode ? this.getById(humanAnswerId(qitemId, episode.key)) : null;
|
|
1775
1813
|
return row?.sourceSession === actorSession ? row : null;
|
|
1776
1814
|
}
|
|
1777
|
-
async create(input) {
|
|
1815
|
+
async create(input, verifyBeforeCreate) {
|
|
1778
1816
|
// FOUNDER ROOT INVARIANT (2026-08-27, supersedes 51-09 incr 4 / ruling cb19867f Q2):
|
|
1779
1817
|
// a LOCAL write stores the bare transport identity — no self-host suffix inside one
|
|
1780
1818
|
// instance. Host identity is added only at the cross-host forwarding boundary
|
|
@@ -1788,6 +1826,7 @@ export class QueueRepository {
|
|
|
1788
1826
|
// record, but its wake comes from OpenRig: the seat named as source didn't send it.
|
|
1789
1827
|
const wakeFrom = input.wakeTrigger === "openrig" && !isOpenRigSender(input.sourceSession) ? OPENRIG_SENDER : input.sourceSession;
|
|
1790
1828
|
const txn = this.db.transaction(() => {
|
|
1829
|
+
verifyBeforeCreate?.();
|
|
1791
1830
|
const created = this.createInTransactionalContext(input);
|
|
1792
1831
|
if (this.outbox && input.nudge !== false) {
|
|
1793
1832
|
try {
|
|
@@ -2039,29 +2078,37 @@ export class QueueRepository {
|
|
|
2039
2078
|
throw new QueueRepositoryError("invalid_human_notification", "humanAlert marks an ask to a person as alert-worthy, and an update isn't an ask: send it without --alert; updates are notices; delivery depends on the person's connector and settings.");
|
|
2040
2079
|
}
|
|
2041
2080
|
}
|
|
2042
|
-
/**
|
|
2043
|
-
|
|
2044
|
-
*
|
|
2045
|
-
*
|
|
2081
|
+
/** Where a runner permission ask's seat stands, read once from the live tenure ledger. Only `replaced` (a later occupant holds
|
|
2082
|
+
* the seat) and `absent` (the node itself is gone) are positive evidence that the ask can never be answered. `no-tenure`
|
|
2083
|
+
* (the node exists but its ledger has no tenure) and `unreadable` (the read threw) prove neither that the ask is current
|
|
2084
|
+
* nor that it is stale: they are unknown. */
|
|
2085
|
+
runnerPermissionAuthority(origin) {
|
|
2086
|
+
try {
|
|
2087
|
+
const tenure = new SessionRegistry(this.db).currentOccupantTenure(origin.nodeId);
|
|
2088
|
+
if (tenure)
|
|
2089
|
+
return tenure.generationUuid === origin.generation ? "current" : "replaced";
|
|
2090
|
+
return this.db.prepare("SELECT 1 FROM nodes WHERE id = ?").get(origin.nodeId) ? "no-tenure" : "absent";
|
|
2091
|
+
}
|
|
2092
|
+
catch {
|
|
2093
|
+
return "unreadable";
|
|
2094
|
+
}
|
|
2095
|
+
}
|
|
2096
|
+
/** A runner's permission ask whose seat has since been relaunched (or gone) can't be answered: its request died with the
|
|
2097
|
+
* occupant. Close it (canceled), so the person sees it isn't waiting, and return true. Authority that is merely unknown
|
|
2098
|
+
* (no tenure yet, or an unreadable ledger) closes nothing. */
|
|
2046
2099
|
closeStaleRunnerPermission(qitemId) {
|
|
2047
2100
|
const item = this.getById(qitemId);
|
|
2048
2101
|
const origin = item?.state === "pending" ? runnerPermissionOrigin(item) : null;
|
|
2049
2102
|
if (!item || !origin)
|
|
2050
2103
|
return false;
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
current = this.db.prepare("SELECT generation_uuid FROM occupant_tenures WHERE node_id = ? ORDER BY generation_ordinal DESC LIMIT 1")
|
|
2054
|
-
.get(origin.nodeId)?.generation_uuid ?? null;
|
|
2055
|
-
}
|
|
2056
|
-
catch {
|
|
2057
|
-
return false;
|
|
2058
|
-
}
|
|
2059
|
-
if (current === origin.generation)
|
|
2104
|
+
const authority = this.runnerPermissionAuthority(origin);
|
|
2105
|
+
if (authority !== "replaced" && authority !== "absent")
|
|
2060
2106
|
return false;
|
|
2061
2107
|
this.update({ qitemId, actorSession: item.sourceSession, state: "canceled",
|
|
2062
2108
|
transitionNote: "runner-permission-stale reason=relaunched: a later occupant holds this seat, so any answer here is not sent." });
|
|
2063
2109
|
return true;
|
|
2064
2110
|
}
|
|
2111
|
+
/** A person by address or by the registry: a registered person may be addressed as their seat or an alias. */
|
|
2065
2112
|
isPersonAddress(destination) {
|
|
2066
2113
|
if (!destination.includes("@"))
|
|
2067
2114
|
return false;
|
|
@@ -3451,23 +3498,80 @@ export class QueueRepository {
|
|
|
3451
3498
|
return null;
|
|
3452
3499
|
return { qitemId: row.qitemId, summary: row.summary ?? null, continuation: this.currentParkContinuation(row.qitemId) };
|
|
3453
3500
|
}
|
|
3501
|
+
/** The parked rows of `owner` whose current park this job wakes (QueueWakeRepository.findCurrentParkRowsByWatchdog):
|
|
3502
|
+
* at a queue-only seat the reminder is noted on them, never another row (#3076). */
|
|
3503
|
+
parkedRowsOwnedBy(jobId, owner) {
|
|
3504
|
+
return this.wakeRepo.findCurrentParkRowsByWatchdog(jobId, owner);
|
|
3505
|
+
}
|
|
3506
|
+
/** Notes a queue-only seat's park wake on each parked row it is about (#3076), in one transaction, each only while
|
|
3507
|
+
* the row is still `owner`'s and its current park is still the job's; nothing is typed. Returns the rows noted. */
|
|
3508
|
+
noteParkedRows(owner, notes) {
|
|
3509
|
+
const written = this.db.transaction(() => notes.flatMap(({ qitemId, jobId, note }) => {
|
|
3510
|
+
if (!this.wakeRepo.findCurrentParkRowsByWatchdog(jobId, owner).includes(qitemId))
|
|
3511
|
+
return [];
|
|
3512
|
+
this.transitionLog.append({ qitemId, state: "blocked", actorSession: "watchdog@system", transitionNote: note });
|
|
3513
|
+
return [{ qitemId, event: this.eventBus.persistWithinTransaction({ type: "queue.updated", qitemId, fromState: "blocked", toState: "blocked",
|
|
3514
|
+
closureReason: null, closureTarget: null, actorSession: "watchdog@system", summary: this.getById(qitemId)?.summary ?? null }) }];
|
|
3515
|
+
})).immediate();
|
|
3516
|
+
for (const { event } of written)
|
|
3517
|
+
this.eventBus.notifySubscribers(event);
|
|
3518
|
+
return written.map(({ qitemId }) => qitemId);
|
|
3519
|
+
}
|
|
3520
|
+
/** Notes a later occurrence of a watchdog job on its earlier cold row at a queue-only seat (#3076), while that row is
|
|
3521
|
+
* open (pending, in progress or blocked, claimed or not): the reminder is already in the queue, so no second row. The
|
|
3522
|
+
* row is chosen and noted in one write transaction, so a close can't land between them. Returns the row's id, or null. */
|
|
3523
|
+
noteOpenWatchdogRow(jobId, destinationSession, note) {
|
|
3524
|
+
const noted = this.db.transaction(() => {
|
|
3525
|
+
const row = this.db.prepare(`SELECT qitem_id FROM queue_items
|
|
3526
|
+
WHERE destination_session = ? AND state IN ('pending', 'in-progress', 'blocked') AND source_session = 'watchdog@system'
|
|
3527
|
+
AND tags IS NOT NULL AND json_valid(tags)
|
|
3528
|
+
AND EXISTS (SELECT 1 FROM json_each(queue_items.tags) WHERE value = 'queue-only')
|
|
3529
|
+
AND EXISTS (SELECT 1 FROM json_each(queue_items.tags) WHERE value = ?)
|
|
3530
|
+
ORDER BY ts_created DESC, rowid DESC LIMIT 1`).get(destinationSession, `watchdog-job:${jobId}`);
|
|
3531
|
+
if (!row)
|
|
3532
|
+
return null;
|
|
3533
|
+
return { qitemId: row.qitem_id, ...this.updateInTransactionalContext({ qitemId: row.qitem_id, actorSession: "watchdog@system", transitionNote: note }) };
|
|
3534
|
+
}).immediate();
|
|
3535
|
+
if (!noted)
|
|
3536
|
+
return null;
|
|
3537
|
+
for (const event of noted.persistedEvents)
|
|
3538
|
+
this.eventBus.notifySubscribers(event);
|
|
3539
|
+
return noted.qitemId;
|
|
3540
|
+
}
|
|
3454
3541
|
/** Called by the watchdog engine after the delivery attempt is durably
|
|
3455
3542
|
* audited. The queue transition records that attempt independently of
|
|
3456
|
-
* whether the HELD row's owner consumed it.
|
|
3457
|
-
|
|
3543
|
+
* whether the HELD row's owner consumed it. At a queue-only seat (#3076), `receipt.targetSession`, nothing is
|
|
3544
|
+
* written on that seat's rows here: the delivery already noted the rows its reminder was about, and their fire is
|
|
3545
|
+
* recorded on that note; a row of the seat it didn't note (parked again with no wake of its own) wasn't that
|
|
3546
|
+
* reminder's. Another owner's row bound to the job says what the reminder became (`receipt.queuedQitemId`). */
|
|
3547
|
+
recordWatchdogWakeAttempt(jobId, deliveryStatus, retryAt, receipt) {
|
|
3458
3548
|
const bindings = this.wakeRepo.findBlockedQitemsByWatchdog(jobId);
|
|
3459
3549
|
if (bindings.length === 0)
|
|
3460
3550
|
return;
|
|
3461
3551
|
// Both receipt ownership and timer lifecycle follow the current park.
|
|
3462
3552
|
const targets = this.wakeRepo.findBlockedQitemsByWatchdog(jobId, true);
|
|
3553
|
+
const queueOnlySeat = !retryAt && isQueueOnlyDeliveryCode(deliveryStatus) ? receipt?.targetSession : undefined;
|
|
3554
|
+
const noteOfDelivery = queueOnlySeat === undefined ? null : this.db.prepare(`SELECT t.transition_id FROM queue_transitions t
|
|
3555
|
+
WHERE t.qitem_id = ? AND t.actor_session = 'watchdog@system' AND substr(t.transition_note, 1, length(?)) = ?
|
|
3556
|
+
AND t.transition_id > (SELECT MAX(a.transition_id) FROM queue_transition_wakes a WHERE a.qitem_id = t.qitem_id AND a.phase = 'armed')
|
|
3557
|
+
AND NOT EXISTS (SELECT 1 FROM queue_transition_wakes w WHERE w.transition_id = t.transition_id)
|
|
3558
|
+
ORDER BY t.transition_id DESC LIMIT 1`);
|
|
3463
3559
|
const recordFired = ({ qitemId, kind }) => {
|
|
3560
|
+
if (noteOfDelivery && this.getById(qitemId)?.destinationSession === queueOnlySeat) {
|
|
3561
|
+
const noted = noteOfDelivery.get(qitemId, parkedRowNotePrefix(jobId), parkedRowNotePrefix(jobId));
|
|
3562
|
+
if (noted)
|
|
3563
|
+
this.wakeRepo.record({ transitionId: noted.transition_id, qitemId, phase: "fired", kind, ref: jobId, deliveryStatus });
|
|
3564
|
+
return null;
|
|
3565
|
+
}
|
|
3464
3566
|
const transition = this.transitionLog.append({
|
|
3465
3567
|
qitemId,
|
|
3466
3568
|
state: "blocked",
|
|
3467
3569
|
actorSession: "watchdog@system",
|
|
3468
3570
|
transitionNote: retryAt ? `park wake failed: watchdog ${jobId}; delivery=${deliveryStatus}; occurrence remains owed; retry at ${retryAt}` : deliveryStatus === "retained"
|
|
3469
3571
|
? `park wake retained: watchdog ${jobId}; not delivered; blocked work unchanged`
|
|
3470
|
-
:
|
|
3572
|
+
: deliveryStatus === QUEUED_AS_ROW || deliveryStatus === NOTED_ON_QUEUED_ROW
|
|
3573
|
+
? queuedAsRowNote(jobId, deliveryStatus, receipt?.queuedQitemId)
|
|
3574
|
+
: `park wake fired: watchdog ${jobId}; delivery=${deliveryStatus}; awaiting owner consumption`,
|
|
3471
3575
|
});
|
|
3472
3576
|
if (!retryAt)
|
|
3473
3577
|
this.wakeRepo.record({
|
|
@@ -3500,7 +3604,7 @@ export class QueueRepository {
|
|
|
3500
3604
|
// resolving the blocker is a provider-limit outcome, not a timer one.
|
|
3501
3605
|
const parkGeneratedTimer = this.wakeRepo.findCurrentQitemsByGeneratedTimer(jobId).length > 0;
|
|
3502
3606
|
const events = this.db.transaction(() => {
|
|
3503
|
-
const firedEvents = targets.map(recordFired);
|
|
3607
|
+
const firedEvents = targets.map(recordFired).filter((event) => event !== null);
|
|
3504
3608
|
if (retryAt || deliveryStatus === "retained")
|
|
3505
3609
|
return firedEvents;
|
|
3506
3610
|
if (usageLimitBlockers.length === 0) {
|
|
@@ -3830,9 +3934,11 @@ export class QueueRepository {
|
|
|
3830
3934
|
// The click is on the ask before anyone hears of it; a failed event never takes it back or holds up its return.
|
|
3831
3935
|
if (changed && result.status === "recorded") {
|
|
3832
3936
|
try {
|
|
3833
|
-
this.eventBus.
|
|
3937
|
+
const event = this.eventBus.persistWithinTransaction({ type: "queue.answer_recorded", qitemId: input.qitemId, actorSession: input.actorSession,
|
|
3834
3938
|
questionId: input.questionId, answered: changed.answered, questions: result.questions.length,
|
|
3835
3939
|
complete: result.complete, summary: changed.summary });
|
|
3940
|
+
if (!this.eventBus.registerPersistedWithinActiveEnvelope(event))
|
|
3941
|
+
this.eventBus.notifySubscribers(event);
|
|
3836
3942
|
}
|
|
3837
3943
|
catch (error) {
|
|
3838
3944
|
console.warn(`[queue] ${input.qitemId}'s recorded answer has no event`, error);
|
|
@@ -3857,6 +3963,25 @@ export class QueueRepository {
|
|
|
3857
3963
|
return posted !== null && answered !== null && answered > posted;
|
|
3858
3964
|
}
|
|
3859
3965
|
/** A park's current question: its latest human-required transition, and that notification's final post receipt, if any. */
|
|
3966
|
+
/** Bounded recorded relations for an opened request/result. No inference from seats, summaries or timestamps. */
|
|
3967
|
+
relatedTo(qitemId, limit = 101) {
|
|
3968
|
+
const rows = this.db.prepare(`SELECT qitem_id, reply_to, handed_off_from, blocked_on FROM queue_items
|
|
3969
|
+
WHERE reply_to = ? OR handed_off_from = ? OR blocked_on = ? ORDER BY rowid LIMIT ?`)
|
|
3970
|
+
.all(qitemId, qitemId, qitemId, Math.min(101, Math.max(1, limit)));
|
|
3971
|
+
return rows.flatMap(row => {
|
|
3972
|
+
const item = this.getById(row.qitem_id);
|
|
3973
|
+
if (!item)
|
|
3974
|
+
return [];
|
|
3975
|
+
const relations = [];
|
|
3976
|
+
if (row.reply_to === qitemId)
|
|
3977
|
+
relations.push("reply-to");
|
|
3978
|
+
if (row.handed_off_from === qitemId)
|
|
3979
|
+
relations.push("handed-off-from");
|
|
3980
|
+
if (row.blocked_on === qitemId)
|
|
3981
|
+
relations.push("blocked-on");
|
|
3982
|
+
return relations.map(relation => ({ item, relation }));
|
|
3983
|
+
});
|
|
3984
|
+
}
|
|
3860
3985
|
/** The opaque revision of what a person decides on (#2446): the question (body, intent, questions, and the evidence it
|
|
3861
3986
|
* points to, when it has any) and its decision state (open, blocked or terminal; who it's addressed to or parked on; its
|
|
3862
3987
|
* answers, a decision made for them, the current park, and the replies returned). A label, a wake, a claim or a note on a
|
|
@@ -4385,7 +4510,7 @@ export class QueueRepository {
|
|
|
4385
4510
|
LIMIT ?
|
|
4386
4511
|
`;
|
|
4387
4512
|
const rows = this.db.prepare(sql).all(...params);
|
|
4388
|
-
return rows.map((r) => this.rowToItem(r));
|
|
4513
|
+
return rows.map((r) => this.rowToItem(r, opts?.includeWaiting ?? true));
|
|
4389
4514
|
}
|
|
4390
4515
|
/** The compact listings' columns: the shared set plus the summary, which is short and is what people search for, and a
|
|
4391
4516
|
* routed row's return route, which isn't elided, so a routed row never lists as unrouted. */
|
|
@@ -4957,6 +5082,16 @@ export class QueueRepository {
|
|
|
4957
5082
|
* (#2742). */
|
|
4958
5083
|
static PULL_OUTBOX_NEVER_POSTED_WINDOW_MS = 24 * 60 * 60 * 1000;
|
|
4959
5084
|
/** Record one wake attempt. */
|
|
5085
|
+
/** How a wake queued for the seat's hook bridge ended there, on the row's nudge record, so the queue's own rules (such
|
|
5086
|
+
* as prompt-clear recovery of a refused wake) read the real end and not `bridged:queued` (#3270). A typed fallback's
|
|
5087
|
+
* result is recorded as a typed wake's is. */
|
|
5088
|
+
recordBridgedWakeEnd(qitemId, end) {
|
|
5089
|
+
const result = end.kind === "typed" && end.result ? this.classifyWakeResult(end.result).nudgeResult
|
|
5090
|
+
: end.kind === "handed-to-hook" ? "bridged:handed-to-hook"
|
|
5091
|
+
: end.kind === "not-delivered" ? "failed:hook_bridge_not_delivered"
|
|
5092
|
+
: "indeterminate:hook_bridge_claimed_unacked";
|
|
5093
|
+
this.recordNudgeAttempt(qitemId, result);
|
|
5094
|
+
}
|
|
4960
5095
|
recordNudgeAttempt(qitemId, result) {
|
|
4961
5096
|
const ts = new Date().toISOString();
|
|
4962
5097
|
this.db
|
|
@@ -5348,12 +5483,15 @@ export class QueueRepository {
|
|
|
5348
5483
|
handoffAdvisory(row) {
|
|
5349
5484
|
// Generic updates can write handed-off and retain a previous handoff's owner
|
|
5350
5485
|
// after reopening. Skip only when that owner still matches this closure.
|
|
5351
|
-
if ((row.state === "handed-off" && matchesRecordedHandoffTarget(row.qitem_id, row.handed_off_to, row.closure_target)) || !isTerminalState(row.state)
|
|
5352
|
-
|| row.closure_reason !== "handed_off_to"
|
|
5486
|
+
if ((row.state === "handed-off" && matchesRecordedHandoffTarget(row.qitem_id, row.handed_off_to, row.closure_target)) || (!isTerminalState(row.state) && !(row.state === "canceled" && row.closure_reason === "superseded"))
|
|
5487
|
+
|| !row.closure_target || (row.closure_reason !== "handed_off_to"
|
|
5488
|
+
&& !(row.closure_reason === "superseded" && row.closure_target.startsWith("qitem-"))))
|
|
5353
5489
|
return undefined;
|
|
5354
5490
|
const target = row.closure_target;
|
|
5355
5491
|
try {
|
|
5356
|
-
if (
|
|
5492
|
+
if (row.closure_reason === "superseded"
|
|
5493
|
+
? this.db.prepare("SELECT 1 FROM queue_items WHERE qitem_id = ?").get(target)
|
|
5494
|
+
: hasLinkedSuccessor(this.db, row.qitem_id, target))
|
|
5357
5495
|
return undefined;
|
|
5358
5496
|
}
|
|
5359
5497
|
catch {
|
|
@@ -5366,9 +5504,13 @@ export class QueueRepository {
|
|
|
5366
5504
|
status: "unverified",
|
|
5367
5505
|
target,
|
|
5368
5506
|
reason: "no-live-local-successor",
|
|
5369
|
-
message:
|
|
5370
|
-
? `Successor custody for '${target}' is unverified on this daemon:
|
|
5371
|
-
|
|
5507
|
+
message: row.closure_reason === "superseded"
|
|
5508
|
+
? `Successor custody for '${target}' is unverified on this daemon: ${foreignTarget
|
|
5509
|
+
? "the recorded successor is on another host; read it there"
|
|
5510
|
+
: "no local row with this ID was found; reconcile the recorded successor by ID"}. This row records supersession, not proof of transfer or pickup.`
|
|
5511
|
+
: foreignTarget
|
|
5512
|
+
? `Successor custody for '${target}' is unverified on this daemon: the successor is named on that host, and this daemon cannot read its custody. This closure records a handoff claim, not proof of transfer or pickup. Use 'rig queue handoff' or 'handoff-and-complete' with '--to <seat@rig>'; add '--host <registered-host>' for another host instead of manually closing to the successor ID; a local handoff is atomic, across hosts the successor is created first and the source closed after, and an uncertain result is reconciled by its exact id, since re-running the same handoff is idempotent.`
|
|
5513
|
+
: `Successor custody for '${target}' is unverified on this daemon: no local row with this source's lineage was found. A successor may exist on another host. This closure records a handoff claim, not proof of transfer or pickup; reconcile the successor by ID. Use 'rig queue handoff' or 'handoff-and-complete' with '--to <seat@rig>'; add '--host <registered-host>' for another host instead of manually closing to the successor ID; a local handoff is atomic, across hosts the successor is created first and the source closed after, and an uncertain result is reconciled by its exact id, since re-running the same handoff is idempotent.`,
|
|
5372
5514
|
};
|
|
5373
5515
|
}
|
|
5374
5516
|
rowToItem(row, includeWaiting = true, listed) {
|