@openrig/cli 0.7.16 → 0.7.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/daemon/assets/onboarding/02-self-and-competent-action.md +5 -41
- 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/skills/working-with-an-openrig-team/SKILL.md +22 -6
- package/daemon/assets/skills/rigs/SKILL.md +68 -29
- package/daemon/assets/skills/rigs/references/installing-for-someone.md +47 -0
- package/daemon/context-packs/help/manifest.yaml +1 -1
- package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
- package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +87 -33
- package/daemon/context-packs/reference/getting-started.md +8 -8
- package/daemon/context-packs/reference/manifest.yaml +1 -1
- package/daemon/context-packs/reference/whats-new.md +193 -6
- 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-software-factory/references/worked-example.md +1 -1
- package/daemon/context-packs/skills/core/openrig-upgrade/SKILL.md +2 -0
- 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/SKILL.md +22 -6
- package/daemon/context-packs/skills/core/working-with-an-openrig-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
- package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-user/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/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.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +36 -3
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +4 -2
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/openshell-driver.d.ts +1 -0
- package/daemon/dist/adapters/openshell-driver.d.ts.map +1 -1
- package/daemon/dist/adapters/openshell-driver.js +3 -0
- package/daemon/dist/adapters/openshell-driver.js.map +1 -1
- package/daemon/dist/adapters/openshell-podman-observer.d.ts +9 -7
- package/daemon/dist/adapters/openshell-podman-observer.d.ts.map +1 -1
- package/daemon/dist/adapters/openshell-podman-observer.js +20 -3
- package/daemon/dist/adapters/openshell-podman-observer.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +38 -4
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +244 -30
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +3 -0
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +1 -1
- 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 +4 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/168_context_usage_occupant_generation.d.ts +6 -0
- package/daemon/dist/db/migrations/168_context_usage_occupant_generation.d.ts.map +1 -0
- package/daemon/dist/db/migrations/168_context_usage_occupant_generation.js +10 -0
- package/daemon/dist/db/migrations/168_context_usage_occupant_generation.js.map +1 -0
- package/daemon/dist/db/migrations/170_rig_delivery_drains.d.ts +3 -0
- package/daemon/dist/db/migrations/170_rig_delivery_drains.d.ts.map +1 -0
- package/daemon/dist/db/migrations/170_rig_delivery_drains.js +21 -0
- package/daemon/dist/db/migrations/170_rig_delivery_drains.js.map +1 -0
- package/daemon/dist/domain/codex-thread-id.d.ts +13 -0
- package/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
- package/daemon/dist/domain/codex-thread-id.js +132 -9
- package/daemon/dist/domain/codex-thread-id.js.map +1 -1
- package/daemon/dist/domain/connection-contract.d.ts.map +1 -1
- package/daemon/dist/domain/connection-contract.js +2 -1
- package/daemon/dist/domain/connection-contract.js.map +1 -1
- package/daemon/dist/domain/context-usage-store.d.ts +11 -2
- package/daemon/dist/domain/context-usage-store.d.ts.map +1 -1
- package/daemon/dist/domain/context-usage-store.js +33 -13
- package/daemon/dist/domain/context-usage-store.js.map +1 -1
- package/daemon/dist/domain/current-work.d.ts +5 -0
- package/daemon/dist/domain/current-work.d.ts.map +1 -1
- package/daemon/dist/domain/current-work.js +66 -4
- package/daemon/dist/domain/current-work.js.map +1 -1
- package/daemon/dist/domain/environment-lifecycle.d.ts +15 -0
- package/daemon/dist/domain/environment-lifecycle.d.ts.map +1 -1
- package/daemon/dist/domain/environment-lifecycle.js +22 -4
- package/daemon/dist/domain/environment-lifecycle.js.map +1 -1
- package/daemon/dist/domain/expected-conversation.d.ts.map +1 -1
- package/daemon/dist/domain/expected-conversation.js +26 -11
- package/daemon/dist/domain/expected-conversation.js.map +1 -1
- package/daemon/dist/domain/gateway/destination-resolver.d.ts +4 -0
- package/daemon/dist/domain/gateway/destination-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/destination-resolver.js +10 -3
- package/daemon/dist/domain/gateway/destination-resolver.js.map +1 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.d.ts +3 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.js +14 -4
- package/daemon/dist/domain/gateway/operator-delivery-engine.js.map +1 -1
- package/daemon/dist/domain/health-diagnosis.d.ts.map +1 -1
- package/daemon/dist/domain/health-diagnosis.js +4 -0
- package/daemon/dist/domain/health-diagnosis.js.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
- package/daemon/dist/domain/native-model-picker.d.ts +2 -0
- package/daemon/dist/domain/native-model-picker.d.ts.map +1 -1
- package/daemon/dist/domain/native-model-picker.js +8 -2
- package/daemon/dist/domain/native-model-picker.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +78 -11
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/network/network-connector.d.ts.map +1 -1
- package/daemon/dist/domain/network/network-connector.js +5 -3
- package/daemon/dist/domain/network/network-connector.js.map +1 -1
- package/daemon/dist/domain/network/network-installations.d.ts +5 -4
- package/daemon/dist/domain/network/network-installations.d.ts.map +1 -1
- package/daemon/dist/domain/network/network-installations.js +42 -11
- package/daemon/dist/domain/network/network-installations.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +3 -0
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +4 -3
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/occupant-invalidator.d.ts +4 -1
- package/daemon/dist/domain/occupant-invalidator.d.ts.map +1 -1
- package/daemon/dist/domain/occupant-invalidator.js +10 -2
- package/daemon/dist/domain/occupant-invalidator.js.map +1 -1
- package/daemon/dist/domain/operation-correlation.d.ts +1 -1
- package/daemon/dist/domain/operation-correlation.d.ts.map +1 -1
- package/daemon/dist/domain/operation-correlation.js +1 -1
- package/daemon/dist/domain/operation-correlation.js.map +1 -1
- package/daemon/dist/domain/queue-erasure.d.ts +7 -1
- package/daemon/dist/domain/queue-erasure.d.ts.map +1 -1
- package/daemon/dist/domain/queue-erasure.js +226 -20
- package/daemon/dist/domain/queue-erasure.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +19 -2
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +59 -15
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +49 -21
- package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +90 -24
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/restore-check-service.d.ts +13 -0
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js +122 -9
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +4 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +95 -33
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/restore-preconditions.d.ts +2 -0
- package/daemon/dist/domain/restore-preconditions.d.ts.map +1 -1
- package/daemon/dist/domain/restore-preconditions.js +2 -0
- package/daemon/dist/domain/restore-preconditions.js.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.js +4 -1
- package/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
- package/daemon/dist/domain/rig-delivery-drain.d.ts +46 -0
- package/daemon/dist/domain/rig-delivery-drain.d.ts.map +1 -0
- package/daemon/dist/domain/rig-delivery-drain.js +128 -0
- package/daemon/dist/domain/rig-delivery-drain.js.map +1 -0
- package/daemon/dist/domain/rig-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/rig-lifecycle-service.js +4 -1
- package/daemon/dist/domain/rig-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/rig-teardown.d.ts +20 -3
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +71 -11
- package/daemon/dist/domain/rig-teardown.js.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.js +16 -1
- package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +6 -1
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.d.ts +3 -2
- package/daemon/dist/domain/seat-launch-environment.d.ts.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.js +16 -4
- package/daemon/dist/domain/seat-launch-environment.js.map +1 -1
- package/daemon/dist/domain/session-name.d.ts +13 -0
- package/daemon/dist/domain/session-name.d.ts.map +1 -1
- package/daemon/dist/domain/session-name.js +77 -0
- package/daemon/dist/domain/session-name.js.map +1 -1
- package/daemon/dist/domain/session-registry.d.ts +7 -1
- package/daemon/dist/domain/session-registry.d.ts.map +1 -1
- package/daemon/dist/domain/session-registry.js +7 -4
- package/daemon/dist/domain/session-registry.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +27 -7
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/shared-history-selection.d.ts +1 -0
- package/daemon/dist/domain/shared-history-selection.d.ts.map +1 -1
- package/daemon/dist/domain/shared-history-selection.js +3 -1
- package/daemon/dist/domain/shared-history-selection.js.map +1 -1
- package/daemon/dist/domain/snapshot-capture.d.ts +4 -1
- package/daemon/dist/domain/snapshot-capture.d.ts.map +1 -1
- package/daemon/dist/domain/snapshot-capture.js +19 -12
- package/daemon/dist/domain/snapshot-capture.js.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.d.ts.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.js +3 -2
- package/daemon/dist/domain/startup-submission-evidence.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +9 -1
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.js +6 -0
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts +4 -0
- package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.js +28 -1
- package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
- package/daemon/dist/domain/workflow-instance-store.d.ts +3 -2
- package/daemon/dist/domain/workflow-instance-store.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-instance-store.js +6 -4
- package/daemon/dist/domain/workflow-instance-store.js.map +1 -1
- package/daemon/dist/domain/workflow-projector.d.ts +48 -0
- package/daemon/dist/domain/workflow-projector.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-projector.js +160 -90
- package/daemon/dist/domain/workflow-projector.js.map +1 -1
- package/daemon/dist/domain/workflow-reconciliation.d.ts +7 -1
- package/daemon/dist/domain/workflow-reconciliation.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-reconciliation.js +51 -13
- package/daemon/dist/domain/workflow-reconciliation.js.map +1 -1
- package/daemon/dist/domain/workflow-runtime.d.ts +4 -2
- package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-runtime.js +46 -22
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +34 -4
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/restore-check.d.ts.map +1 -1
- package/daemon/dist/routes/restore-check.js +17 -0
- package/daemon/dist/routes/restore-check.js.map +1 -1
- package/daemon/dist/routes/rig-delivery-drain.d.ts +3 -0
- package/daemon/dist/routes/rig-delivery-drain.d.ts.map +1 -0
- package/daemon/dist/routes/rig-delivery-drain.js +46 -0
- package/daemon/dist/routes/rig-delivery-drain.js.map +1 -0
- package/daemon/dist/routes/startup.d.ts.map +1 -1
- package/daemon/dist/routes/startup.js +120 -28
- package/daemon/dist/routes/startup.js.map +1 -1
- package/daemon/dist/routes/up.js +2 -0
- package/daemon/dist/routes/up.js.map +1 -1
- package/daemon/dist/routes/workflow.js +1 -1
- package/daemon/dist/routes/workflow.js.map +1 -1
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +2 -0
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +6 -0
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/docs/reference/agent-startup-guide.md +3 -2
- package/daemon/docs/reference/daemon-http-clients.md +68 -0
- package/daemon/docs/reference/getting-started.md +8 -8
- package/daemon/docs/reference/hosted-members.md +4 -2
- package/daemon/docs/reference/network-connector.md +4 -3
- package/daemon/docs/reference/queue-erasure.md +16 -1
- package/daemon/docs/reference/quickstart.md +2 -2
- package/daemon/docs/reference/whats-new.md +193 -6
- package/daemon/specs/agents/shared/skills/core/openrig-software-factory/references/worked-example.md +1 -1
- package/daemon/specs/agents/shared/skills/core/openrig-upgrade/SKILL.md +2 -0
- package/daemon/specs/agents/shared/skills/core/working-with-an-openrig-team/SKILL.md +22 -6
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +78 -18
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/startup/context.md +9 -6
- package/dist/build-info.js +3 -3
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +2 -0
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +5 -1
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/environment.js +1 -1
- package/dist/commands/environment.js.map +1 -1
- package/dist/commands/network.d.ts +2 -0
- package/dist/commands/network.d.ts.map +1 -1
- package/dist/commands/network.js +14 -1
- package/dist/commands/network.js.map +1 -1
- package/dist/commands/queue.d.ts +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +43 -10
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/restore.d.ts.map +1 -1
- package/dist/commands/restore.js +6 -1
- package/dist/commands/restore.js.map +1 -1
- package/dist/commands/seat.js +3 -3
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +5 -3
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +7 -0
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +6 -4
- package/dist/commands/workflow.js.map +1 -1
- package/dist/config-store.d.ts +3 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +5 -0
- package/dist/config-store.js.map +1 -1
- package/dist/lib/bundle-check.d.ts.map +1 -1
- package/dist/lib/bundle-check.js +33 -3
- package/dist/lib/bundle-check.js.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +48 -9
- package/dist/mcp-server.js.map +1 -1
- package/dist/person-registration-offer.d.ts.map +1 -1
- package/dist/person-registration-offer.js +2 -1
- package/dist/person-registration-offer.js.map +1 -1
- package/package.json +2 -2
- package/tui/dist/config/config-model.js +1 -1
- package/tui/dist/config/config-model.js.map +1 -1
- package/tui/dist/daemon-client.d.ts +3 -1
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +4 -2
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +31 -1
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +106 -15
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/types.d.ts +2 -0
- package/tui/dist/types.d.ts.map +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { RigDeliveryDrainStore } from "./rig-delivery-drain.js";
|
|
1
2
|
import { PROMPT_ALERT_TAG, readWakeLadderBackstop } from "./queue-wake-ladder.js";
|
|
2
3
|
import { withUrgentLine } from "./urgent-line.js";
|
|
3
4
|
import { quietCustodyBackstop, quietHoldCustody } from "./quiet-hold-custody.js";
|
|
5
|
+
import { cooperativeReadFile, readRowsCooperatively } from "./execution-candidate-reader.js";
|
|
4
6
|
import { createHash } from "node:crypto";
|
|
5
7
|
import { loadHumanRegistry, registeredPeople, resolveRegisteredHumanAddress, slackSubscriptionFor, withHumanAlertTag } from "./gateway/human-registry.js";
|
|
6
8
|
import { DispatchBuffer } from "./gateway/dispatch-buffer.js";
|
|
@@ -31,7 +33,7 @@ import { parseSessionName, isHumanSeatSessionRef } from "./session-name.js";
|
|
|
31
33
|
import { runnerPermissionOrigin } from "./runner-permissions.js";
|
|
32
34
|
import { isHostPairingAsk } from "./hosts/pairing-ask.js";
|
|
33
35
|
import { parseReplyToChoice, parseArrivalThread, parseReplyToThreadMissing, formatReplyToChoice, describeReplyToFallback, REPLY_TO_CHOICE_ACTOR } from "./reply-to-choice.js";
|
|
34
|
-
import { classifyDestination } from "./gateway/destination-resolver.js";
|
|
36
|
+
import { classifyDestination, recordsNoWakeRoute } from "./gateway/destination-resolver.js";
|
|
35
37
|
import { join } from "node:path";
|
|
36
38
|
import { SettingsStore } from "./user-settings/settings-store.js";
|
|
37
39
|
import { hostedMembersAt, hostedWakeFor, isHostedMemberAt } from "./rosters.js";
|
|
@@ -539,6 +541,7 @@ function isWakeTimeoutSignal(s) {
|
|
|
539
541
|
}
|
|
540
542
|
export class QueueRepository {
|
|
541
543
|
db;
|
|
544
|
+
deliveryDrains;
|
|
542
545
|
transitionLog;
|
|
543
546
|
eventBus;
|
|
544
547
|
destinationAdvisory;
|
|
@@ -607,6 +610,7 @@ export class QueueRepository {
|
|
|
607
610
|
workflowFrontierPredicate;
|
|
608
611
|
constructor(db, eventBus, opts) {
|
|
609
612
|
this.db = db;
|
|
613
|
+
this.deliveryDrains = new RigDeliveryDrainStore(db);
|
|
610
614
|
this.eventBus = eventBus;
|
|
611
615
|
this.transitionLog = new QueueTransitionLog(db);
|
|
612
616
|
this.wakeRepo = new QueueWakeRepository(db);
|
|
@@ -990,13 +994,15 @@ export class QueueRepository {
|
|
|
990
994
|
return "skipped";
|
|
991
995
|
const alreadyHeld = this.outbox.getById(outboxId);
|
|
992
996
|
if (alreadyHeld?.deliveryState === "retained" || alreadyHeld?.deliveryState === "retired") {
|
|
997
|
+
if (this.deliveryDrains.holds(alreadyHeld.destinationSession))
|
|
998
|
+
return "retained";
|
|
993
999
|
if (alreadyHeld.auditPointer)
|
|
994
1000
|
this.recordNudgeAttempt(alreadyHeld.auditPointer, "retained:typing_guard");
|
|
995
1001
|
return "retained";
|
|
996
1002
|
}
|
|
997
1003
|
let recovering = false;
|
|
998
1004
|
const claim = (entry) => {
|
|
999
|
-
if (!eligible(entry) || attempted.has(entry.outboxId) || !this.outbox.claimForDelivery(entry.outboxId))
|
|
1005
|
+
if (this.deliveryDrains.holds(entry.destinationSession) || !eligible(entry) || attempted.has(entry.outboxId) || !this.outbox.claimForDelivery(entry.outboxId))
|
|
1000
1006
|
return false;
|
|
1001
1007
|
this.bindFirstTarget(entry);
|
|
1002
1008
|
attempted.add(entry.outboxId);
|
|
@@ -1005,6 +1011,8 @@ export class QueueRepository {
|
|
|
1005
1011
|
};
|
|
1006
1012
|
let superseded = false;
|
|
1007
1013
|
const actionable = (entry) => {
|
|
1014
|
+
if (!eligible(entry))
|
|
1015
|
+
return false;
|
|
1008
1016
|
const current = this.currentWakeIntent(entry);
|
|
1009
1017
|
if (!current) {
|
|
1010
1018
|
// Existing failed state means the requested old delivery was refused;
|
|
@@ -1208,18 +1216,19 @@ export class QueueRepository {
|
|
|
1208
1216
|
const BATCH = 200;
|
|
1209
1217
|
const horizon = this.db.prepare("SELECT COALESCE(MAX(rowid),0) AS id FROM outbox_entries").get().id;
|
|
1210
1218
|
// Retire never-attempted obsolete notifications without materializing historical intents.
|
|
1211
|
-
|
|
1219
|
+
if (!opts?.eligible)
|
|
1220
|
+
tally.failed += this.db.prepare(`UPDATE outbox_entries AS o SET delivery_state = 'failed',
|
|
1212
1221
|
tags = json_insert(COALESCE(tags, '[]'), '$[#]', 'queue:wake-superseded')
|
|
1213
1222
|
WHERE delivery_state = 'pending' AND rowid <= ? AND substr(outbox_id, 1, ?) = ?
|
|
1214
1223
|
AND substr(outbox_id, 1, ?) != ?
|
|
1215
1224
|
AND NOT EXISTS (SELECT 1 FROM queue_items q WHERE q.qitem_id = o.audit_pointer
|
|
1216
1225
|
AND q.state = 'pending' AND q.destination_session = o.destination_session)`)
|
|
1217
|
-
|
|
1226
|
+
.run(horizon, WAKE_INTENT_PREFIX.length, WAKE_INTENT_PREFIX, CLAIM_OVERRIDDEN_WAKE_PREFIX.length, CLAIM_OVERRIDDEN_WAKE_PREFIX).changes;
|
|
1218
1227
|
// A stop also refuses every later claim inside a delivery: coalesced peers and members it releases for their own send.
|
|
1219
1228
|
// So does a missing receiver, for a notification already tried. One never tried still gets its attempt, so its row
|
|
1220
1229
|
// records why it didn't land.
|
|
1221
1230
|
const eligible = (entry) => {
|
|
1222
|
-
if (opts?.stopRequested?.())
|
|
1231
|
+
if (opts?.stopRequested?.() || opts?.eligible && !opts.eligible(entry))
|
|
1223
1232
|
return false;
|
|
1224
1233
|
if (entry.deliveryState === "pending" || !this.wakeHasNoReceiver(entry.destinationSession))
|
|
1225
1234
|
return true;
|
|
@@ -1294,9 +1303,11 @@ export class QueueRepository {
|
|
|
1294
1303
|
* copies were deleted, refused at the seat boundary instead); this
|
|
1295
1304
|
* site holds no copy of its own.
|
|
1296
1305
|
*/
|
|
1297
|
-
async maybeNudge(qitemId, destinationSession, nudgeOpt, sourceSession, bodyOverride, trigger = "agent") {
|
|
1306
|
+
async maybeNudge(qitemId, destinationSession, nudgeOpt, sourceSession, bodyOverride, trigger = "agent", opts) {
|
|
1298
1307
|
if (nudgeOpt === false)
|
|
1299
1308
|
return;
|
|
1309
|
+
if (!opts?.explicit && this.deliveryDrains.holds(destinationSession))
|
|
1310
|
+
return;
|
|
1300
1311
|
if (!this.transport)
|
|
1301
1312
|
return;
|
|
1302
1313
|
const outcome = await this.performWakeSend(qitemId, destinationSession, sourceSession, bodyOverride, undefined, undefined, trigger);
|
|
@@ -1304,6 +1315,7 @@ export class QueueRepository {
|
|
|
1304
1315
|
}
|
|
1305
1316
|
/** The following startup intent drain owns durable pending wakes. Legacy packets
|
|
1306
1317
|
* and overdue claimed work (not eligible for that drain) still use the nudge path. */
|
|
1318
|
+
// Held workflow boot packets remain owed: their keepalive resumes after END; the sweep reports unclaimed work.
|
|
1307
1319
|
async recoverLostNudge(qitemId, destinationSession, sourceSession) {
|
|
1308
1320
|
const outboxId = `${WAKE_INTENT_PREFIX}${qitemId}`;
|
|
1309
1321
|
if (this.outbox?.getById(outboxId) && this.getById(qitemId)?.state === "pending")
|
|
@@ -1325,6 +1337,8 @@ export class QueueRepository {
|
|
|
1325
1337
|
}
|
|
1326
1338
|
if (state !== "running" && state !== "idle")
|
|
1327
1339
|
return;
|
|
1340
|
+
if (addresses.some(address => this.deliveryDrains.holds(address)))
|
|
1341
|
+
return;
|
|
1328
1342
|
if (addresses.every(address => this.promptRecoveryState.get(address) === false))
|
|
1329
1343
|
return;
|
|
1330
1344
|
// A compaction's "Compacted" is also a clear. While its turn boundary, restore or audit is still owed, a retried wake
|
|
@@ -1391,7 +1405,7 @@ export class QueueRepository {
|
|
|
1391
1405
|
* gateway, not held or released for quiet hours, and its seat now pane-bound. A handoff's retry ladder is the
|
|
1392
1406
|
* caller's to check: the sweep defers to a live ladder, the reachable-seat retry leaves every handed-off row to it. */
|
|
1393
1407
|
unroutableWakeRetryable(row, now = new Date()) {
|
|
1394
|
-
return row.lastNudgeResult
|
|
1408
|
+
return recordsNoWakeRoute(row.lastNudgeResult)
|
|
1395
1409
|
&& !row.claimedAt
|
|
1396
1410
|
&& row.deliveryOutcome !== "never-posted" && row.deliveryOutcome !== "transport-failed"
|
|
1397
1411
|
&& !this.isLocalHumanDecisionWithoutGateway(row)
|
|
@@ -1407,12 +1421,15 @@ export class QueueRepository {
|
|
|
1407
1421
|
const addresses = this.resolveSessionAddresses(sessionName);
|
|
1408
1422
|
if (!addresses.length)
|
|
1409
1423
|
return;
|
|
1424
|
+
if (addresses.some(address => this.deliveryDrains.holds(address)))
|
|
1425
|
+
return;
|
|
1410
1426
|
// As for a prompt clear (#2575): while a compaction's restore is owed, the wake would reach the agent before it.
|
|
1411
1427
|
if ([sessionName, ...addresses].some(address => this.hasPendingPostCompactStage?.(address)))
|
|
1412
1428
|
return;
|
|
1413
1429
|
const rows = this.db.prepare(`SELECT qitem_id FROM queue_items
|
|
1414
1430
|
WHERE destination_session IN (${addresses.map(() => "?").join(",")}) AND state = 'pending'
|
|
1415
|
-
AND handed_off_from IS NULL AND last_nudge_result LIKE 'unroutable:%'
|
|
1431
|
+
AND handed_off_from IS NULL AND (last_nudge_result LIKE 'unroutable:%' OR last_nudge_result LIKE 'awaiting-pickup:%')
|
|
1432
|
+
ORDER BY ts_created, qitem_id`)
|
|
1416
1433
|
.all(...addresses);
|
|
1417
1434
|
const now = new Date();
|
|
1418
1435
|
// One attempt per intent for the pass: a returned result and its resume go as one send, so the second row's turn
|
|
@@ -4272,12 +4289,9 @@ export class QueueRepository {
|
|
|
4272
4289
|
this.eventBus.notifySubscribers(persisted);
|
|
4273
4290
|
return persisted;
|
|
4274
4291
|
}
|
|
4275
|
-
findUndelivered
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
// carry a current episode or a legacy nudge/receipt, then derive/filter in
|
|
4279
|
-
// JS. LIMIT is applied after that filtering so historical POSTED episodes
|
|
4280
|
-
// cannot consume the window and hide a later failure.
|
|
4292
|
+
/** The active rows findUndelivered considers: each can carry a current owner episode, a legacy nudge failure or a
|
|
4293
|
+
* delivery receipt. Which of them is undelivered is derived per row afterwards. */
|
|
4294
|
+
undeliveredCandidateFilter(opts) {
|
|
4281
4295
|
const ownerEpisodeCandidate = this.hasOwnerNotificationColumns
|
|
4282
4296
|
? `EXISTS (SELECT 1 FROM queue_transitions owner_episode
|
|
4283
4297
|
WHERE owner_episode.qitem_id = queue_items.qitem_id
|
|
@@ -4287,6 +4301,7 @@ export class QueueRepository {
|
|
|
4287
4301
|
"state IN ('pending', 'in-progress', 'blocked')",
|
|
4288
4302
|
`((state = 'pending' AND (last_nudge_result LIKE 'failed:%'
|
|
4289
4303
|
OR last_nudge_result LIKE 'unroutable:%'
|
|
4304
|
+
OR last_nudge_result LIKE 'awaiting-pickup:%'
|
|
4290
4305
|
OR last_nudge_result LIKE 'gateway-owned%'))
|
|
4291
4306
|
OR ${ownerEpisodeCandidate}
|
|
4292
4307
|
OR EXISTS (SELECT 1 FROM queue_transitions receipt
|
|
@@ -4306,6 +4321,35 @@ export class QueueRepository {
|
|
|
4306
4321
|
conditions.push("(destination_session LIKE ? ESCAPE '\\' OR source_session LIKE ? ESCAPE '\\')");
|
|
4307
4322
|
params.push(`%@${escaped}`, `%@${escaped}`);
|
|
4308
4323
|
}
|
|
4324
|
+
return { conditions, params };
|
|
4325
|
+
}
|
|
4326
|
+
/**
|
|
4327
|
+
* The ids of the rows findUndelivered considers, oldest first, with no row's delivery outcome derived: a caller that
|
|
4328
|
+
* must stay responsive (the stuck sweep) derives each one by id, `findUndelivered({ qitemId })`, between its own
|
|
4329
|
+
* yields, so a long candidate set never runs as one synchronous read. On a WAL file database outside a transaction the
|
|
4330
|
+
* read runs in rowid windows on its own readonly connection and yields between windows (readRowsCooperatively, one
|
|
4331
|
+
* snapshot for the whole read); otherwise it is one id-only read on this handle. Every candidate is returned: nothing
|
|
4332
|
+
* is capped, and rows that change after the read are judged on that fresh read by id.
|
|
4333
|
+
*/
|
|
4334
|
+
async undeliveredCandidateIds(opts) {
|
|
4335
|
+
const { conditions, params } = this.undeliveredCandidateFilter(opts);
|
|
4336
|
+
const where = conditions.join(" AND ");
|
|
4337
|
+
const columns = "qitem_id, ts_created, queue_items.rowid AS rid";
|
|
4338
|
+
const file = cooperativeReadFile(this.db);
|
|
4339
|
+
const rows = file
|
|
4340
|
+
? (await readRowsCooperatively(file, "queue_items", `SELECT ${columns} FROM queue_items WHERE queue_items.rowid > ? AND queue_items.rowid <= ? AND ${where}`, params)).rows
|
|
4341
|
+
: this.db.prepare(`SELECT ${columns} FROM queue_items WHERE ${where}`).all(...params);
|
|
4342
|
+
// findUndelivered's order: oldest first, ties in rowid order.
|
|
4343
|
+
rows.sort((a, b) => (a.ts_created < b.ts_created ? -1 : a.ts_created > b.ts_created ? 1 : a.rid - b.rid));
|
|
4344
|
+
return rows.map((row) => row.qitem_id);
|
|
4345
|
+
}
|
|
4346
|
+
findUndelivered(opts) {
|
|
4347
|
+
// OPR.0.5.6.14 — delivery truth belongs to the CURRENT human-notification
|
|
4348
|
+
// episode, not to the row's whole history. Pull every active row that can
|
|
4349
|
+
// carry a current episode or a legacy nudge/receipt, then derive/filter in
|
|
4350
|
+
// JS. LIMIT is applied after that filtering so historical POSTED episodes
|
|
4351
|
+
// cannot consume the window and hide a later failure.
|
|
4352
|
+
const { conditions, params } = this.undeliveredCandidateFilter(opts);
|
|
4309
4353
|
const columns = opts?.compact ? this.compactColumns() : "*";
|
|
4310
4354
|
const sql = `SELECT ${columns} FROM queue_items WHERE ${conditions.join(" AND ")} ORDER BY ts_created ASC`;
|
|
4311
4355
|
const rows = this.db.prepare(sql).all(...params);
|
|
@@ -4336,7 +4380,7 @@ export class QueueRepository {
|
|
|
4336
4380
|
// undelivered. An active non-human row can still have an old OWNER
|
|
4337
4381
|
// transition; that historical episode is not a current obligation.
|
|
4338
4382
|
const lastNudge = item.lastNudgeResult ?? "";
|
|
4339
|
-
if (item.state === "pending" && (lastNudge.startsWith("failed:") || lastNudge
|
|
4383
|
+
if (item.state === "pending" && (lastNudge.startsWith("failed:") || recordsNoWakeRoute(lastNudge))) {
|
|
4340
4384
|
out.push(item);
|
|
4341
4385
|
}
|
|
4342
4386
|
}
|