@openrig/cli 0.7.16 → 0.7.18
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/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +5 -0
- package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +23 -0
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +11 -0
- package/daemon/assets/plugins/openrig-core/skills/refocusing/scripts/trace-to-root.py +25 -5
- package/daemon/assets/skills/rigs/SKILL.md +95 -42
- 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 +123 -35
- package/daemon/context-packs/reference/getting-started.md +8 -8
- package/daemon/context-packs/reference/manifest.yaml +1 -1
- package/daemon/context-packs/reference/rig-spec.md +166 -0
- package/daemon/context-packs/reference/whats-new.md +294 -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/SKILL.md +23 -0
- 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/SKILL.md +11 -0
- 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 +25 -5
- 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 +52 -8
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts +2 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +17 -7
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/kernel-authority.d.ts +1 -1
- package/daemon/dist/adapters/kernel-authority.d.ts.map +1 -1
- package/daemon/dist/adapters/kernel-authority.js +22 -10
- package/daemon/dist/adapters/kernel-authority.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-protocol.d.ts +43 -0
- package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +88 -5
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +707 -43
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/tmux-credential-env.d.ts +4 -0
- package/daemon/dist/adapters/tmux-credential-env.d.ts.map +1 -0
- package/daemon/dist/adapters/tmux-credential-env.js +14 -0
- package/daemon/dist/adapters/tmux-credential-env.js.map +1 -0
- package/daemon/dist/adapters/tmux-exec.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-exec.js +4 -3
- package/daemon/dist/adapters/tmux-exec.js.map +1 -1
- package/daemon/dist/adapters/tmux-server.d.ts +2 -2
- package/daemon/dist/adapters/tmux-server.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-server.js +12 -4
- package/daemon/dist/adapters/tmux-server.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +223 -12
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +836 -30
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/attention-surface.d.ts +4 -1
- package/daemon/dist/attention-surface.d.ts.map +1 -1
- package/daemon/dist/attention-surface.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +12 -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/db/migrations/171_claude_auto_mode.d.ts +4 -0
- package/daemon/dist/db/migrations/171_claude_auto_mode.d.ts.map +1 -0
- package/daemon/dist/db/migrations/171_claude_auto_mode.js +9 -0
- package/daemon/dist/db/migrations/171_claude_auto_mode.js.map +1 -0
- package/daemon/dist/db/migrations/171_node_input_route.d.ts +4 -0
- package/daemon/dist/db/migrations/171_node_input_route.d.ts.map +1 -0
- package/daemon/dist/db/migrations/171_node_input_route.js +6 -0
- package/daemon/dist/db/migrations/171_node_input_route.js.map +1 -0
- package/daemon/dist/db/migrations/172_queue_return_route.d.ts +3 -0
- package/daemon/dist/db/migrations/172_queue_return_route.d.ts.map +1 -0
- package/daemon/dist/db/migrations/172_queue_return_route.js +13 -0
- package/daemon/dist/db/migrations/172_queue_return_route.js.map +1 -0
- package/daemon/dist/db/migrations/173_node_process_limits.d.ts +4 -0
- package/daemon/dist/db/migrations/173_node_process_limits.d.ts.map +1 -0
- package/daemon/dist/db/migrations/173_node_process_limits.js +6 -0
- package/daemon/dist/db/migrations/173_node_process_limits.js.map +1 -0
- package/daemon/dist/domain/activity-grants.d.ts.map +1 -1
- package/daemon/dist/domain/activity-grants.js +2 -0
- package/daemon/dist/domain/activity-grants.js.map +1 -1
- package/daemon/dist/domain/agent-activity-store.d.ts +36 -1
- package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
- package/daemon/dist/domain/agent-activity-store.js +192 -3
- package/daemon/dist/domain/agent-activity-store.js.map +1 -1
- package/daemon/dist/domain/agent-images/resume-token-discovery.d.ts +10 -0
- package/daemon/dist/domain/agent-images/resume-token-discovery.d.ts.map +1 -1
- package/daemon/dist/domain/agent-images/resume-token-discovery.js +21 -0
- package/daemon/dist/domain/agent-images/resume-token-discovery.js.map +1 -1
- package/daemon/dist/domain/applied-launch-observation-store.d.ts +5 -0
- package/daemon/dist/domain/applied-launch-observation-store.d.ts.map +1 -1
- package/daemon/dist/domain/applied-launch-observation-store.js +57 -21
- package/daemon/dist/domain/applied-launch-observation-store.js.map +1 -1
- package/daemon/dist/domain/builtin-startup-files.d.ts +26 -12
- package/daemon/dist/domain/builtin-startup-files.d.ts.map +1 -1
- package/daemon/dist/domain/builtin-startup-files.js +73 -34
- package/daemon/dist/domain/builtin-startup-files.js.map +1 -1
- package/daemon/dist/domain/claude-auto-mode.d.ts +64 -0
- package/daemon/dist/domain/claude-auto-mode.d.ts.map +1 -0
- package/daemon/dist/domain/claude-auto-mode.js +114 -0
- package/daemon/dist/domain/claude-auto-mode.js.map +1 -0
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +2 -0
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +11 -4
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/claude-continuation-launch.d.ts +5 -1
- package/daemon/dist/domain/claude-continuation-launch.d.ts.map +1 -1
- package/daemon/dist/domain/claude-continuation-launch.js +51 -2
- package/daemon/dist/domain/claude-continuation-launch.js.map +1 -1
- package/daemon/dist/domain/claude-core-plugin-env.d.ts +7 -3
- package/daemon/dist/domain/claude-core-plugin-env.d.ts.map +1 -1
- package/daemon/dist/domain/claude-core-plugin-env.js +11 -8
- package/daemon/dist/domain/claude-core-plugin-env.js.map +1 -1
- package/daemon/dist/domain/codex-daemon-support.d.ts.map +1 -1
- package/daemon/dist/domain/codex-daemon-support.js +6 -1
- package/daemon/dist/domain/codex-daemon-support.js.map +1 -1
- 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/community-harness-launch-result.d.ts +2 -0
- package/daemon/dist/domain/community-harness-launch-result.d.ts.map +1 -1
- package/daemon/dist/domain/community-harness-launch-result.js +5 -1
- package/daemon/dist/domain/community-harness-launch-result.js.map +1 -1
- package/daemon/dist/domain/connection-contract.d.ts +91 -0
- package/daemon/dist/domain/connection-contract.d.ts.map +1 -1
- package/daemon/dist/domain/connection-contract.js +75 -1
- package/daemon/dist/domain/connection-contract.js.map +1 -1
- package/daemon/dist/domain/context-usage-store.d.ts +16 -2
- package/daemon/dist/domain/context-usage-store.d.ts.map +1 -1
- package/daemon/dist/domain/context-usage-store.js +70 -15
- package/daemon/dist/domain/context-usage-store.js.map +1 -1
- package/daemon/dist/domain/current-work.d.ts +11 -1
- package/daemon/dist/domain/current-work.d.ts.map +1 -1
- package/daemon/dist/domain/current-work.js +107 -12
- package/daemon/dist/domain/current-work.js.map +1 -1
- package/daemon/dist/domain/cwd-resolution.d.ts +2 -0
- package/daemon/dist/domain/cwd-resolution.d.ts.map +1 -1
- package/daemon/dist/domain/cwd-resolution.js +7 -2
- package/daemon/dist/domain/cwd-resolution.js.map +1 -1
- package/daemon/dist/domain/draft-aware-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/draft-aware-delivery.js +5 -1
- package/daemon/dist/domain/draft-aware-delivery.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/errors.d.ts +4 -0
- package/daemon/dist/domain/errors.d.ts.map +1 -1
- package/daemon/dist/domain/errors.js +7 -0
- package/daemon/dist/domain/errors.js.map +1 -1
- package/daemon/dist/domain/execution-view.d.ts.map +1 -1
- package/daemon/dist/domain/execution-view.js +8 -1
- package/daemon/dist/domain/execution-view.js.map +1 -1
- package/daemon/dist/domain/existing-rig-restore.d.ts +2 -0
- package/daemon/dist/domain/existing-rig-restore.d.ts.map +1 -1
- package/daemon/dist/domain/existing-rig-restore.js +1 -0
- package/daemon/dist/domain/existing-rig-restore.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 +120 -6
- package/daemon/dist/domain/gateway/operator-delivery-engine.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/capabilities.d.ts +9 -1
- package/daemon/dist/domain/gateway/slack/capabilities.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/capabilities.js +6 -1
- package/daemon/dist/domain/gateway/slack/capabilities.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound-admission.js +1 -1
- package/daemon/dist/domain/gateway/slack/inbound-admission.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts +4 -0
- package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.js +15 -1
- package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/manifest.d.ts +5 -1
- package/daemon/dist/domain/gateway/slack/manifest.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/manifest.js +12 -3
- package/daemon/dist/domain/gateway/slack/manifest.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 +4 -1
- package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts +2 -0
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.js +1 -0
- package/daemon/dist/domain/gateway/slack/queue-access.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/settled-asks.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/settled-asks.js +6 -5
- package/daemon/dist/domain/gateway/slack/settled-asks.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts +1 -0
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.js +7 -2
- package/daemon/dist/domain/gateway/slack/slack-api.js.map +1 -1
- package/daemon/dist/domain/harness-not-started-notice.d.ts +36 -0
- package/daemon/dist/domain/harness-not-started-notice.d.ts.map +1 -0
- package/daemon/dist/domain/harness-not-started-notice.js +81 -0
- package/daemon/dist/domain/harness-not-started-notice.js.map +1 -0
- 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/hot-potato-enforcer.d.ts +1 -1
- package/daemon/dist/domain/input-read-diagnostic.js +1 -1
- package/daemon/dist/domain/input-read-diagnostic.js.map +1 -1
- package/daemon/dist/domain/instance-initialization.d.ts +2 -0
- package/daemon/dist/domain/instance-initialization.d.ts.map +1 -1
- package/daemon/dist/domain/instance-initialization.js +2 -1
- package/daemon/dist/domain/instance-initialization.js.map +1 -1
- package/daemon/dist/domain/member-connection.d.ts +14 -0
- package/daemon/dist/domain/member-connection.d.ts.map +1 -0
- package/daemon/dist/domain/member-connection.js +34 -0
- package/daemon/dist/domain/member-connection.js.map +1 -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 +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
- package/daemon/dist/domain/model-divergence/current-model-reader.d.ts +3 -1
- package/daemon/dist/domain/model-divergence/current-model-reader.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/current-model-reader.js +32 -7
- package/daemon/dist/domain/model-divergence/current-model-reader.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-permission-store.d.ts +6 -2
- package/daemon/dist/domain/native-permission-store.d.ts.map +1 -1
- package/daemon/dist/domain/native-permission-store.js +12 -5
- package/daemon/dist/domain/native-permission-store.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe.d.ts +5 -0
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +172 -21
- 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 +16 -5
- 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-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +28 -0
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +11 -0
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +23 -7
- 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/outbox-handler.d.ts +50 -0
- package/daemon/dist/domain/outbox-handler.d.ts.map +1 -1
- package/daemon/dist/domain/outbox-handler.js +255 -1
- package/daemon/dist/domain/outbox-handler.js.map +1 -1
- package/daemon/dist/domain/parked-query.d.ts.map +1 -1
- package/daemon/dist/domain/parked-query.js +3 -1
- package/daemon/dist/domain/parked-query.js.map +1 -1
- package/daemon/dist/domain/permission-account.d.ts +28 -1
- package/daemon/dist/domain/permission-account.d.ts.map +1 -1
- package/daemon/dist/domain/permission-account.js +55 -11
- package/daemon/dist/domain/permission-account.js.map +1 -1
- package/daemon/dist/domain/permission-drift.d.ts +2 -0
- package/daemon/dist/domain/permission-drift.d.ts.map +1 -1
- package/daemon/dist/domain/permission-drift.js.map +1 -1
- package/daemon/dist/domain/pi-compaction-request-store.d.ts +16 -0
- package/daemon/dist/domain/pi-compaction-request-store.d.ts.map +1 -0
- package/daemon/dist/domain/pi-compaction-request-store.js +40 -0
- package/daemon/dist/domain/pi-compaction-request-store.js.map +1 -0
- package/daemon/dist/domain/pi-compaction-service.d.ts +82 -0
- package/daemon/dist/domain/pi-compaction-service.d.ts.map +1 -0
- package/daemon/dist/domain/pi-compaction-service.js +229 -0
- package/daemon/dist/domain/pi-compaction-service.js.map +1 -0
- package/daemon/dist/domain/process-limits.d.ts +37 -0
- package/daemon/dist/domain/process-limits.d.ts.map +1 -0
- package/daemon/dist/domain/process-limits.js +69 -0
- package/daemon/dist/domain/process-limits.js.map +1 -0
- package/daemon/dist/domain/process-table.d.ts +9 -0
- package/daemon/dist/domain/process-table.d.ts.map +1 -1
- package/daemon/dist/domain/process-table.js +21 -4
- package/daemon/dist/domain/process-table.js.map +1 -1
- package/daemon/dist/domain/proof/judgments.d.ts +7 -0
- package/daemon/dist/domain/proof/judgments.d.ts.map +1 -1
- package/daemon/dist/domain/proof/judgments.js +27 -1
- package/daemon/dist/domain/proof/judgments.js.map +1 -1
- package/daemon/dist/domain/ps-projection.d.ts +2 -1
- package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
- package/daemon/dist/domain/ps-projection.js +6 -1
- package/daemon/dist/domain/ps-projection.js.map +1 -1
- package/daemon/dist/domain/queue-erasure.d.ts +18 -7
- package/daemon/dist/domain/queue-erasure.d.ts.map +1 -1
- package/daemon/dist/domain/queue-erasure.js +270 -41
- package/daemon/dist/domain/queue-erasure.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +81 -16
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +325 -76
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts +3 -0
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +90 -30
- package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
- package/daemon/dist/domain/queue-transition-log.d.ts +5 -3
- package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
- package/daemon/dist/domain/queue-transition-log.js +9 -6
- package/daemon/dist/domain/queue-transition-log.js.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.d.ts +8 -0
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +245 -41
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/queue-wake-repository.d.ts +2 -1
- package/daemon/dist/domain/queue-wake-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-repository.js +31 -4
- package/daemon/dist/domain/queue-wake-repository.js.map +1 -1
- package/daemon/dist/domain/restore-check-service.d.ts +23 -0
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js +198 -12
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +64 -3
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +335 -82
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/restore-plan-preview.d.ts +28 -1
- package/daemon/dist/domain/restore-plan-preview.d.ts.map +1 -1
- package/daemon/dist/domain/restore-plan-preview.js +17 -5
- package/daemon/dist/domain/restore-plan-preview.js.map +1 -1
- package/daemon/dist/domain/restore-preconditions.d.ts +26 -0
- package/daemon/dist/domain/restore-preconditions.d.ts.map +1 -1
- package/daemon/dist/domain/restore-preconditions.js +63 -1
- 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/resume-token-validation.d.ts +3 -1
- package/daemon/dist/domain/resume-token-validation.d.ts.map +1 -1
- package/daemon/dist/domain/resume-token-validation.js +6 -3
- package/daemon/dist/domain/resume-token-validation.js.map +1 -1
- package/daemon/dist/domain/return-route.d.ts +73 -0
- package/daemon/dist/domain/return-route.d.ts.map +1 -0
- package/daemon/dist/domain/return-route.js +124 -0
- package/daemon/dist/domain/return-route.js.map +1 -0
- 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-expansion-service.js +1 -1
- package/daemon/dist/domain/rig-expansion-service.js.map +1 -1
- 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-repository.d.ts +12 -0
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +73 -0
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rig-teardown.d.ts +22 -3
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +99 -20
- package/daemon/dist/domain/rig-teardown.js.map +1 -1
- package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-codec.js +9 -0
- package/daemon/dist/domain/rigspec-codec.js.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.d.ts +6 -0
- package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.js +30 -0
- package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +22 -2
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +82 -23
- package/daemon/dist/domain/rigspec-instantiator.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/rigspec-schema.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +44 -1
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/rosters.d.ts +12 -0
- package/daemon/dist/domain/rosters.d.ts.map +1 -1
- package/daemon/dist/domain/rosters.js +17 -4
- package/daemon/dist/domain/rosters.js.map +1 -1
- package/daemon/dist/domain/runner-channel.d.ts +33 -0
- package/daemon/dist/domain/runner-channel.d.ts.map +1 -0
- package/daemon/dist/domain/runner-channel.js +179 -0
- package/daemon/dist/domain/runner-channel.js.map +1 -0
- package/daemon/dist/domain/runner-grant-launch.js +2 -2
- package/daemon/dist/domain/runtime-adapter.d.ts +2 -0
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-adapter.js.map +1 -1
- package/daemon/dist/domain/runtime-switch-materials.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-switch-materials.js +4 -3
- package/daemon/dist/domain/runtime-switch-materials.js.map +1 -1
- package/daemon/dist/domain/scope/scope-audit.d.ts.map +1 -1
- package/daemon/dist/domain/scope/scope-audit.js +55 -3
- package/daemon/dist/domain/scope/scope-audit.js.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.d.ts +6 -4
- package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.js +17 -10
- package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.js +2 -1
- package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts +27 -4
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +209 -64
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.d.ts +8 -1
- package/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.js +52 -12
- package/daemon/dist/domain/seat-identity-reconciler.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/seat-lifecycle-service.d.ts +21 -4
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +68 -2
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.d.ts +9 -2
- package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.js +34 -2
- package/daemon/dist/domain/seat-restart-in-place.js.map +1 -1
- package/daemon/dist/domain/seat-runtime-switch-service.d.ts +4 -0
- package/daemon/dist/domain/seat-runtime-switch-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-runtime-switch-service.js +9 -3
- package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -1
- package/daemon/dist/domain/seat-status-service.d.ts +4 -0
- package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-status-service.js +31 -6
- package/daemon/dist/domain/seat-status-service.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 +16 -3
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +161 -16
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/shared-conversation.d.ts +58 -0
- package/daemon/dist/domain/shared-conversation.d.ts.map +1 -0
- package/daemon/dist/domain/shared-conversation.js +98 -0
- package/daemon/dist/domain/shared-conversation.js.map +1 -0
- 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-phase-timing.d.ts +19 -0
- package/daemon/dist/domain/startup-phase-timing.d.ts.map +1 -0
- package/daemon/dist/domain/startup-phase-timing.js +23 -0
- package/daemon/dist/domain/startup-phase-timing.js.map +1 -0
- 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/successor-session-launcher.d.ts +9 -0
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +24 -7
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/team-operations.d.ts +6 -6
- package/daemon/dist/domain/team-operations.d.ts.map +1 -1
- package/daemon/dist/domain/team-operations.js +2 -4
- package/daemon/dist/domain/team-operations.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-app-provider.d.ts +6 -0
- package/daemon/dist/domain/terminal/herdr-app-provider.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-app-provider.js +23 -1
- package/daemon/dist/domain/terminal/herdr-app-provider.js.map +1 -1
- package/daemon/dist/domain/terminal-policy.js +1 -1
- package/daemon/dist/domain/terminal-policy.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +91 -6
- 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-delivery.d.ts +1 -1
- package/daemon/dist/domain/watchdog-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-delivery.js +6 -3
- package/daemon/dist/domain/watchdog-delivery.js.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.js +1 -0
- package/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts +9 -0
- package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.js +42 -5
- 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 +5 -3
- package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-runtime.js +48 -22
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts +7 -1
- package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts.map +1 -1
- package/daemon/dist/domain/workspace/default-workspace-scaffold.js +35 -7
- package/daemon/dist/domain/workspace/default-workspace-scaffold.js.map +1 -1
- package/daemon/dist/gateway-slack-surface.d.ts +2 -2
- package/daemon/dist/gateway-slack-surface.d.ts.map +1 -1
- package/daemon/dist/gateway-slack-surface.js +1 -1
- package/daemon/dist/gateway-slack-surface.js.map +1 -1
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +13 -2
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/routes/activity.d.ts.map +1 -1
- package/daemon/dist/routes/activity.js +105 -2
- package/daemon/dist/routes/activity.js.map +1 -1
- package/daemon/dist/routes/agent-images.d.ts.map +1 -1
- package/daemon/dist/routes/agent-images.js +6 -1
- package/daemon/dist/routes/agent-images.js.map +1 -1
- package/daemon/dist/routes/attention.d.ts.map +1 -1
- package/daemon/dist/routes/attention.js +2 -1
- package/daemon/dist/routes/attention.js.map +1 -1
- package/daemon/dist/routes/compaction.d.ts.map +1 -1
- package/daemon/dist/routes/compaction.js +46 -7
- package/daemon/dist/routes/compaction.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts +4 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +266 -38
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/require-sender-identity.d.ts +4 -3
- package/daemon/dist/routes/require-sender-identity.d.ts.map +1 -1
- package/daemon/dist/routes/require-sender-identity.js.map +1 -1
- package/daemon/dist/routes/restore-check.d.ts.map +1 -1
- package/daemon/dist/routes/restore-check.js +18 -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/rigspec.d.ts.map +1 -1
- package/daemon/dist/routes/rigspec.js +24 -4
- package/daemon/dist/routes/rigspec.js.map +1 -1
- package/daemon/dist/routes/seat.d.ts.map +1 -1
- package/daemon/dist/routes/seat.js +107 -6
- package/daemon/dist/routes/seat.js.map +1 -1
- package/daemon/dist/routes/sessions.js +14 -3
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/startup.d.ts.map +1 -1
- package/daemon/dist/routes/startup.js +127 -29
- package/daemon/dist/routes/startup.js.map +1 -1
- package/daemon/dist/routes/up.d.ts.map +1 -1
- package/daemon/dist/routes/up.js +16 -4
- package/daemon/dist/routes/up.js.map +1 -1
- package/daemon/dist/routes/watchdog.d.ts.map +1 -1
- package/daemon/dist/routes/watchdog.js +18 -1
- package/daemon/dist/routes/watchdog.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 +3 -0
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +13 -0
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +57 -16
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/docs/reference/agent-startup-guide.md +5 -3
- package/daemon/docs/reference/community-harness-examples/dsh/README.md +8 -0
- package/daemon/docs/reference/community-harness-examples/dsh/openrig-dsh-runner.mjs +139 -5
- package/daemon/docs/reference/community-harness-presets.md +2 -0
- package/daemon/docs/reference/daemon-http-clients.md +123 -6
- package/daemon/docs/reference/getting-started.md +8 -8
- package/daemon/docs/reference/harness-runner-contract.md +91 -1
- package/daemon/docs/reference/herdr-app.md +6 -0
- 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/rig-spec.md +166 -0
- package/daemon/docs/reference/rosters.md +9 -0
- package/daemon/docs/reference/sdlc-conventions.md +5 -1
- package/daemon/docs/reference/slack-app-setup.md +39 -21
- package/daemon/docs/reference/whats-new.md +294 -6
- package/daemon/specs/agents/shared/skills/core/messaging-the-human/SKILL.md +23 -0
- 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/factory/guidance/lead-first-move.md +26 -5
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +92 -18
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/startup/context.md +9 -6
- package/daemon/specs/rigs/launch/kernel/culture/CULTURE.md +12 -0
- package/daemon/specs/rigs/launch/starter/guidance/lead-first-move.md +26 -5
- package/dist/acp/connector.js +1 -1
- package/dist/acp/connector.js.map +1 -1
- package/dist/build-info.js +3 -3
- package/dist/cli-error.d.ts.map +1 -1
- package/dist/cli-error.js +7 -1
- package/dist/cli-error.js.map +1 -1
- package/dist/client.d.ts +2 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +3 -2
- package/dist/client.js.map +1 -1
- package/dist/commands/ask.d.ts.map +1 -1
- package/dist/commands/ask.js +92 -11
- package/dist/commands/ask.js.map +1 -1
- package/dist/commands/broadcast.js +9 -5
- package/dist/commands/broadcast.js.map +1 -1
- package/dist/commands/compact.d.ts +3 -4
- package/dist/commands/compact.d.ts.map +1 -1
- package/dist/commands/compact.js +76 -16
- package/dist/commands/compact.js.map +1 -1
- package/dist/commands/config-init-workspace.d.ts.map +1 -1
- package/dist/commands/config-init-workspace.js +3 -0
- package/dist/commands/config-init-workspace.js.map +1 -1
- 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 +7 -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/export.d.ts.map +1 -1
- package/dist/commands/export.js +2 -1
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/fork.d.ts.map +1 -1
- package/dist/commands/fork.js +2 -0
- package/dist/commands/fork.js.map +1 -1
- package/dist/commands/launch.d.ts.map +1 -1
- package/dist/commands/launch.js +11 -3
- package/dist/commands/launch.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/ps.d.ts +28 -0
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +76 -2
- package/dist/commands/ps.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 +350 -29
- 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/rig.d.ts +2 -0
- package/dist/commands/rig.d.ts.map +1 -1
- package/dist/commands/rig.js +36 -2
- package/dist/commands/rig.js.map +1 -1
- package/dist/commands/roster.d.ts +3 -0
- package/dist/commands/roster.d.ts.map +1 -1
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +128 -9
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +47 -6
- package/dist/commands/send.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/slack.d.ts +2 -1
- package/dist/commands/slack.d.ts.map +1 -1
- package/dist/commands/slack.js +38 -2
- package/dist/commands/slack.js.map +1 -1
- package/dist/commands/terminal.d.ts.map +1 -1
- package/dist/commands/terminal.js +5 -5
- package/dist/commands/terminal.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +10 -0
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +10 -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/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +1 -0
- package/dist/daemon-lifecycle.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/lib/model-observation.d.ts.map +1 -1
- package/dist/lib/model-observation.js +9 -3
- package/dist/lib/model-observation.js.map +1 -1
- package/dist/lib/scope/scope-audit.d.ts.map +1 -1
- package/dist/lib/scope/scope-audit.js +55 -3
- package/dist/lib/scope/scope-audit.js.map +1 -1
- package/dist/local-db.d.ts +5 -0
- package/dist/local-db.d.ts.map +1 -0
- package/dist/local-db.js +23 -0
- package/dist/local-db.js.map +1 -0
- package/dist/local-origin.d.ts.map +1 -1
- package/dist/local-origin.js +2 -17
- package/dist/local-origin.js.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +170 -27
- 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/dist/sender-identity.d.ts +18 -6
- package/dist/sender-identity.d.ts.map +1 -1
- package/dist/sender-identity.js +67 -7
- package/dist/sender-identity.js.map +1 -1
- package/dist/terminal-window-rex.d.ts +1 -1
- package/dist/terminal-window-rex.d.ts.map +1 -1
- package/dist/terminal-window-rex.js +3 -2
- package/dist/terminal-window-rex.js.map +1 -1
- package/dist/terminal-window.js +3 -3
- package/dist/terminal-window.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 +6 -3
- 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
- package/ui/dist/assets/{index-BvUEh33d.js → index-1O1f3A7K.js} +55 -55
- package/ui/dist/index.html +1 -1
|
@@ -2,10 +2,11 @@ import { Hono } from "hono";
|
|
|
2
2
|
import { classifierOccupant } from "../domain/classification-sources.js";
|
|
3
3
|
import { OCCUPANT_GENERATION_HEADER, runtimeSwitchCustodyRefusal } from "./runtime-switch-custody.js";
|
|
4
4
|
import { streamSSE } from "hono/streaming";
|
|
5
|
-
import { QueueRepositoryError, newQitemId, deriveCrossHostSuccessorId, stampSelfHostSuffix, classifyNudgeFailure, isTypedGateBlocker } from "../domain/queue-repository.js";
|
|
5
|
+
import { QueueRepositoryError, newQitemId, deriveCrossHostSuccessorId, stampSelfHostSuffix, classifyNudgeFailure, isTypedGateBlocker, DEFAULT_RECENT_TRANSITIONS_LIMIT } from "../domain/queue-repository.js";
|
|
6
6
|
import { NO_TIMED_BACKSTOP } from "../domain/queue-waiting.js";
|
|
7
7
|
import { parseSessionName, isHumanSeatSessionRef } from "../domain/session-name.js";
|
|
8
|
-
import { requireSenderIdentity, resolveRecordedProvenance, resolveRecordedIdentity, ORIGIN_UNKNOWN_HEADER, transportSenderSession } from "./require-sender-identity.js";
|
|
8
|
+
import { requireSenderIdentity, resolveRecordedProvenance, resolveRecordedIdentity, ORIGIN_UNKNOWN_HEADER, transportSenderSession, canonicalSenderSession } from "./require-sender-identity.js";
|
|
9
|
+
import { issuedReturnAddress, isRouteAddress, RETURN_ROUTE_BASES, RETURN_ROUTE_NOT_CARRIED, RETURN_ROUTE_NOT_CARRIED_TAG, RETURN_ROUTE_NOTE_PREFIX, routeIsPersonMessage, routeNotCarriedMessage, splitRoute } from "../domain/return-route.js";
|
|
9
10
|
import { hostname as osHostname } from "node:os";
|
|
10
11
|
import { InboxHandlerError } from "../domain/inbox-handler.js";
|
|
11
12
|
import { aggregateAttention } from "../domain/feed/attention-aggregator.js";
|
|
@@ -15,9 +16,11 @@ import { getSelfHostId, resolvesToLocalHost } from "../domain/hosts/fanout-contr
|
|
|
15
16
|
import { remoteJsonRequest } from "../domain/hosts/remote-daemon-http.js";
|
|
16
17
|
import { deriveCurrentWork, deriveCurrentWorkChoice, deriveRole, deriveWorkCandidates, evaluateCreateScope, skippedCreateScopeAdvisory, toCreateScopeAdvisory, } from "../domain/current-work.js";
|
|
17
18
|
import { listProjects, projectCatalogPaths } from "../domain/workspace/project-read.js";
|
|
18
|
-
import { readProjectCatalog } from "../domain/workspace/project-catalog.js";
|
|
19
|
+
import { inferCatalogProject, ProjectReadError, readProjectCatalog, rigFromSession, selectCatalogProject } from "../domain/workspace/project-catalog.js";
|
|
20
|
+
import { physicalSessionName } from "../domain/session-registry.js";
|
|
19
21
|
import { EraseRefusal, eraseQueue } from "../domain/queue-erasure.js";
|
|
20
22
|
import { HumanModeService } from "../domain/gateway/human-operating-modes.js";
|
|
23
|
+
import { HUMAN_ALERT_TAG } from "../domain/gateway/human-registry.js";
|
|
21
24
|
import { sharedChannelFor } from "../domain/gateway/participants.js";
|
|
22
25
|
import { queryLimit, SQL_LIMIT_BOUND } from "./query-limit.js";
|
|
23
26
|
import { feedPerspective } from "../domain/feed-perspective.js";
|
|
@@ -36,6 +39,9 @@ import { feedPerspective } from "../domain/feed-perspective.js";
|
|
|
36
39
|
const QUEUE_FORWARD_TIMEOUT_MS = 10_000;
|
|
37
40
|
/** OPR.0.7.0.12 — held and next rows listed in a refocus packet; past this the packet says the list was cut. */
|
|
38
41
|
const WORK_CANDIDATE_LIST_LIMIT = 50;
|
|
42
|
+
/** Private request opt-in for CLI diagnostics; its response acknowledgement is never forwarded. */
|
|
43
|
+
const CLI_HANDOFF_SCOPE_ADVISORY_HEADER = "X-OpenRig-CLI-Handoff-Scope-Advisory";
|
|
44
|
+
const HANDOFF_SCOPE_CHECK_ACKNOWLEDGED = "handoffScopeCheckAcknowledged";
|
|
39
45
|
// OPR.0.4.6.MH3 D-4 (FR-2/R2a): the cross-host provenance shape appended to a
|
|
40
46
|
// FORWARDED body's tags — a marker (`cross-host`) + the forwarding daemon's
|
|
41
47
|
// self-declared name (`from-host:<name>`). Honest best-effort provenance, not
|
|
@@ -45,6 +51,25 @@ const WORK_CANDIDATE_LIST_LIMIT = 50;
|
|
|
45
51
|
// shipped registry has no canonical own-alias reader, and D-4 frames this name
|
|
46
52
|
// as free-text best-effort by design.
|
|
47
53
|
export const CROSS_HOST_TAG = "cross-host";
|
|
54
|
+
/** A route this daemon sends to another host, naming this host (`member@rig@<self>`); one carried from another host keeps
|
|
55
|
+
* its own. Null when this daemon doesn't know its host id, so the route can't say where it is. */
|
|
56
|
+
export function hostQualifiedRoute(route) {
|
|
57
|
+
if (splitRoute(route).host)
|
|
58
|
+
return route;
|
|
59
|
+
const stamped = stampSelfHostSuffix(route);
|
|
60
|
+
return stamped === route ? null : stamped;
|
|
61
|
+
}
|
|
62
|
+
/** A forwarded row's tags, with the mark that its return route wasn't carried when that's so. */
|
|
63
|
+
function withRouteNotCarriedTag(tags, notCarried) {
|
|
64
|
+
if (!notCarried)
|
|
65
|
+
return tags;
|
|
66
|
+
return [...(tags ?? []).filter(t => t !== RETURN_ROUTE_NOT_CARRIED_TAG), RETURN_ROUTE_NOT_CARRIED_TAG];
|
|
67
|
+
}
|
|
68
|
+
/** How a named route was established: a route carried from another host keeps the basis it was sent with there. */
|
|
69
|
+
function carriedRouteBasis(route, basis) {
|
|
70
|
+
return splitRoute(canonicalSenderSession(route)).host && RETURN_ROUTE_BASES.includes(basis)
|
|
71
|
+
? basis : "named";
|
|
72
|
+
}
|
|
48
73
|
export function crossHostProvenanceTags(existing) {
|
|
49
74
|
const base = existing ?? [];
|
|
50
75
|
const fromHost = `from-host:${osHostname()}`;
|
|
@@ -132,7 +157,7 @@ export function queueRoutes() {
|
|
|
132
157
|
return null;
|
|
133
158
|
}
|
|
134
159
|
}
|
|
135
|
-
function createScopeAdvisory(c, tags) {
|
|
160
|
+
function createScopeAdvisory(c, tags, context) {
|
|
136
161
|
try {
|
|
137
162
|
const check = evaluateCreateScope(tags, () => {
|
|
138
163
|
const flat = (tags ?? []).flatMap((tag) => tag.split(",").map((part) => part.trim())).filter(Boolean);
|
|
@@ -157,7 +182,7 @@ export function queueRoutes() {
|
|
|
157
182
|
const value = store?.resolveOne("workspace.slices_root").value;
|
|
158
183
|
return typeof value === "string" && value.trim() ? value : null;
|
|
159
184
|
});
|
|
160
|
-
return check ? toCreateScopeAdvisory(check) : null;
|
|
185
|
+
return check ? toCreateScopeAdvisory(check, context) : null;
|
|
161
186
|
}
|
|
162
187
|
catch {
|
|
163
188
|
return null;
|
|
@@ -450,7 +475,7 @@ export function queueRoutes() {
|
|
|
450
475
|
* `handed_off_from` column is not part of the create body and stays NULL
|
|
451
476
|
* on the target — R2b's opaque-lineage contract, not a gap.
|
|
452
477
|
*/
|
|
453
|
-
async function crossHostHandoff(c, qitemId, hostId, terminalState, body, createSuccessor = (forwardBody) => forwardQueueWrite(c, hostId, "/api/queue/create", forwardBody)) {
|
|
478
|
+
async function crossHostHandoff(c, qitemId, hostId, terminalState, body, createSuccessor = (forwardBody) => forwardQueueWrite(c, hostId, "/api/queue/create", forwardBody), delivery = "forwarded") {
|
|
454
479
|
const repo = getRepo(c);
|
|
455
480
|
const source = repo.getById(qitemId);
|
|
456
481
|
if (!source)
|
|
@@ -476,8 +501,12 @@ export function queueRoutes() {
|
|
|
476
501
|
attemptedClosureTarget: closureTarget,
|
|
477
502
|
}, 409);
|
|
478
503
|
}
|
|
479
|
-
// (2) The deterministic successor identity + forwarded body.
|
|
480
|
-
|
|
504
|
+
// (2) The deterministic successor identity + forwarded body. The goal's return route goes with the work, naming the host
|
|
505
|
+
// it's on. Without this host's id it can't say where the conversation is, so the work goes without it, and the response,
|
|
506
|
+
// the source row and the successor say so; the route is never sent as a bare address the other host would read as its own.
|
|
507
|
+
const carriedRoute = source.returnRoute ? hostQualifiedRoute(source.returnRoute) : null;
|
|
508
|
+
const routeNotCarried = source.returnRoute && !carriedRoute ? routeNotCarriedMessage(source.returnRoute) : null;
|
|
509
|
+
const effectiveTags = withRouteNotCarriedTag(body.tags ?? source.tags ?? undefined, routeNotCarried);
|
|
481
510
|
const forwardBody = {
|
|
482
511
|
qitemId: successorId,
|
|
483
512
|
// 51-09 incr 4a — stamp-at-FORWARD: this forwarding daemon IS the origin,
|
|
@@ -499,6 +528,7 @@ export function queueRoutes() {
|
|
|
499
528
|
...(body.evidenceRef !== undefined ? { evidenceRef: body.evidenceRef } : {}),
|
|
500
529
|
...(body.nudge !== undefined ? { nudge: body.nudge } : {}),
|
|
501
530
|
...(body.humanAlert !== undefined ? { humanAlert: body.humanAlert } : {}),
|
|
531
|
+
...(carriedRoute ? { returnRoute: carriedRoute, returnRouteBasis: source.returnRouteBasis ?? "named" } : {}),
|
|
502
532
|
};
|
|
503
533
|
// (3) Successor-create FIRST — origin-owns-the-record; failure leaves the
|
|
504
534
|
// source untouched (never-drop).
|
|
@@ -523,9 +553,39 @@ export function queueRoutes() {
|
|
|
523
553
|
catch (err) {
|
|
524
554
|
return errorResponse(c, err);
|
|
525
555
|
}
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
556
|
+
const notCarriedNote = routeNotCarried ? `${RETURN_ROUTE_NOTE_PREFIX}not-carried: ${routeNotCarried}` : null;
|
|
557
|
+
if (notCarriedNote && !repo.listTransitions(source.qitemId).some(t => t.transitionNote === notCarriedNote)) {
|
|
558
|
+
repo.transitionLog.append({ qitemId: source.qitemId, state: closed.item.state, actorSession: body.fromSession, transitionNote: notCarriedNote });
|
|
559
|
+
}
|
|
560
|
+
// `created` is the origin daemon's row, verbatim. The origin can also report
|
|
561
|
+
// that its own scope check was skipped, without pretending the forwarding
|
|
562
|
+
// daemon inspected remote filesystem state.
|
|
563
|
+
const receiverReportedTags = fwd.payload && typeof fwd.payload === "object" && !Array.isArray(fwd.payload)
|
|
564
|
+
? fwd.payload.tags
|
|
565
|
+
: undefined;
|
|
566
|
+
const hasAcceptedTags = receiverReportedTags === null || Array.isArray(receiverReportedTags);
|
|
567
|
+
const acceptedTags = Array.isArray(receiverReportedTags)
|
|
568
|
+
? receiverReportedTags.filter((tag) => typeof tag === "string")
|
|
569
|
+
: [];
|
|
570
|
+
const requestedTags = forwardBody.tags;
|
|
571
|
+
const acceptedScopeTags = acceptedTags.filter((tag) => tag !== HUMAN_ALERT_TAG);
|
|
572
|
+
const requestedScopeTags = requestedTags.filter((tag) => tag !== HUMAN_ALERT_TAG);
|
|
573
|
+
const acceptedTagsMatchRequest = acceptedScopeTags.length === requestedScopeTags.length
|
|
574
|
+
&& acceptedScopeTags.every((tag, index) => tag === requestedScopeTags[index]);
|
|
575
|
+
const scopeCheckRequested = c.req.header(CLI_HANDOFF_SCOPE_ADVISORY_HEADER) === "1";
|
|
576
|
+
const scopeCheck = scopeCheckRequested
|
|
577
|
+
? skippedCreateScopeAdvisory(hasAcceptedTags ? acceptedTags : requestedTags)
|
|
578
|
+
: null;
|
|
579
|
+
const scopeAdvisory = scopeCheck ? toCreateScopeAdvisory(scopeCheck, {
|
|
580
|
+
verb: terminalState === "done" ? "handoff-and-complete" : "handoff",
|
|
581
|
+
tagSource: hasAcceptedTags && acceptedTagsMatchRequest ? (body.tags == null ? "inherited" : "explicit") : "unknown",
|
|
582
|
+
delivery,
|
|
583
|
+
}) : null;
|
|
584
|
+
const advisories = [...(scopeAdvisory ? [scopeAdvisory] : []),
|
|
585
|
+
...(routeNotCarried ? [{ code: RETURN_ROUTE_NOT_CARRIED, message: routeNotCarried }] : [])];
|
|
586
|
+
return c.json({ closed: closed.item, created: fwd.payload,
|
|
587
|
+
...(advisories.length ? { advisories } : {}),
|
|
588
|
+
...(scopeCheckRequested ? { [HANDOFF_SCOPE_CHECK_ACKNOWLEDGED]: true } : {}) }, 201);
|
|
529
589
|
}
|
|
530
590
|
/**
|
|
531
591
|
* A handoff addressed to this daemon's own host id is local. Before that was
|
|
@@ -549,7 +609,9 @@ export function queueRoutes() {
|
|
|
549
609
|
return { ok: false, response: refusal };
|
|
550
610
|
try {
|
|
551
611
|
// Recorded as the receiving /create records a forwarded write: no transport header, so claimed:v1.
|
|
552
|
-
|
|
612
|
+
// A route naming this host is one of this host's own addresses.
|
|
613
|
+
const route = typeof input.returnRoute === "string" ? canonicalSenderSession(input.returnRoute) : input.returnRoute;
|
|
614
|
+
const item = await getRepo(c).create({ ...input, ...(route ? { returnRoute: route } : {}), identityProvenance: "claimed:v1" });
|
|
553
615
|
const advisory = destinationAdvisory(c, item.destinationSession);
|
|
554
616
|
return { ok: true, payload: { ...item, ...(advisory ? { advisories: [advisory] } : {}) } };
|
|
555
617
|
}
|
|
@@ -561,14 +623,48 @@ export function queueRoutes() {
|
|
|
561
623
|
// POST /create
|
|
562
624
|
app.post("/create", async (c) => {
|
|
563
625
|
const body = await c.req.json().catch(() => ({}));
|
|
626
|
+
// The return route, when the caller asks for one: `auto` issues a conversation address for this create (from its id, so
|
|
627
|
+
// an exact retry issues the same one), `self` takes the caller's own identity, and anything else is an address the
|
|
628
|
+
// caller named. Absent, the create is exactly as before.
|
|
629
|
+
const requestedRoute = typeof body.returnRoute === "string" ? body.returnRoute.trim() : undefined;
|
|
630
|
+
if (body.returnRoute !== undefined && (!requestedRoute
|
|
631
|
+
|| (requestedRoute !== "auto" && requestedRoute !== "self" && !isRouteAddress(canonicalSenderSession(requestedRoute))))) {
|
|
632
|
+
return c.json({ error: "invalid_return_route", message: "A return route is auto, self, or an agent conversation's queue address (member@rig). A person is reached through the gateway, not a return route." }, 400);
|
|
633
|
+
}
|
|
634
|
+
const createId = body.qitemId ?? (requestedRoute ? newQitemId() : undefined);
|
|
635
|
+
const issued = requestedRoute === "auto" ? issuedReturnAddress(createId) : null;
|
|
564
636
|
// P21 I3 — the source is the transport-derived sender (X-OpenRig-Session), NEVER the body claim.
|
|
565
637
|
// P18 deliver-and-label: absent header + a body sourceSession → recorded as the claimed-era stamp
|
|
566
638
|
// claimed:v1; absent header + no body → 400 actor_required; a body sourceSession that DIFFERS from the
|
|
567
639
|
// header → the wire SUPERSEDES it (transport:v1), not a 409. `sourceSession` below is authoritative.
|
|
568
|
-
|
|
640
|
+
// A caller with neither that asks for an issued route is declared by it: the issued address is the row's actor,
|
|
641
|
+
// recorded as claimed:v1 (declared here, not verified), never as a transport identity. A known caller keeps its own.
|
|
642
|
+
const derived = requireSenderIdentity(c, { verb: "queue create", bodyClaim: body.sourceSession });
|
|
643
|
+
const identity = !derived.ok && issued ? { ok: true, session: issued, provenance: "claimed:v1" } : derived;
|
|
569
644
|
if (!identity.ok)
|
|
570
645
|
return identity.response;
|
|
571
646
|
const sourceSession = identity.session;
|
|
647
|
+
let route = requestedRoute === undefined ? null
|
|
648
|
+
: requestedRoute === "auto" ? { address: issued, basis: sourceSession === issued ? "issued-actor" : "issued" }
|
|
649
|
+
: requestedRoute === "self" ? { address: sourceSession, basis: "caller" }
|
|
650
|
+
: { address: canonicalSenderSession(requestedRoute), basis: carriedRouteBasis(requestedRoute, body.returnRouteBasis) };
|
|
651
|
+
if (route && !isRouteAddress(route.address)) {
|
|
652
|
+
return c.json({ error: "invalid_return_route", message: `--return-route self takes the caller's own address, and this caller is ${sourceSession}, which isn't an agent conversation's queue address. Use auto, or name the address.` }, 400);
|
|
653
|
+
}
|
|
654
|
+
// A registered person's alias on this host is a person, reached through the gateway: the work goes on without that route,
|
|
655
|
+
// and the response and the row say so. An unreadable registry decides nothing.
|
|
656
|
+
let routeNotKept = null;
|
|
657
|
+
if (route && route.basis !== "issued" && route.basis !== "issued-actor" && !splitRoute(route.address).host) {
|
|
658
|
+
let person = false;
|
|
659
|
+
try {
|
|
660
|
+
person = getRepo(c).isHumanDestination(route.address);
|
|
661
|
+
}
|
|
662
|
+
catch { /* unreadable registry: the route is kept as given */ }
|
|
663
|
+
if (person) {
|
|
664
|
+
routeNotKept = routeIsPersonMessage(route.address);
|
|
665
|
+
route = null;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
572
668
|
{
|
|
573
669
|
const held = switchCustody(c, sourceSession);
|
|
574
670
|
if (held)
|
|
@@ -595,40 +691,50 @@ export function queueRoutes() {
|
|
|
595
691
|
if (typeof body.hostId === "string" && !resolvesToLocalHost(body.hostId, getSelfHostId())) {
|
|
596
692
|
if (body.classificationBinding !== undefined)
|
|
597
693
|
return c.json({ error: "invalid_classification_binding", message: "Classifier-bound effects belong to this daemon's local queue." }, 400);
|
|
598
|
-
const mintedId =
|
|
599
|
-
|
|
694
|
+
const mintedId = createId ?? newQitemId();
|
|
695
|
+
// The route names this host, so the receiving daemon never reads it as one of its own addresses. Without this host's id
|
|
696
|
+
// the work goes without the route, and the response and the row say so.
|
|
697
|
+
const carried = route ? hostQualifiedRoute(route.address) : null;
|
|
698
|
+
const routeNotCarried = routeNotKept ?? (route && !carried ? routeNotCarriedMessage(route.address) : null);
|
|
699
|
+
const { hostId: _dropped, returnRoute: _route, returnRouteBasis: _basis, ...rest } = body;
|
|
600
700
|
const forwardBody = {
|
|
601
701
|
...rest,
|
|
702
|
+
...(route && carried ? { returnRoute: carried, returnRouteBasis: route.basis } : {}),
|
|
602
703
|
qitemId: mintedId,
|
|
603
704
|
// 51-09 incr 4a — stamp-at-FORWARD: this forwarding daemon is the origin,
|
|
604
705
|
// so it stamps its OWN self-id (overriding the bare spread) before the
|
|
605
706
|
// remote create() runs — else the remote would forge member@rig@RECEIVER.
|
|
606
707
|
sourceSession: c.req.header(ORIGIN_UNKNOWN_HEADER) === "true" ? sourceSession : stampSelfHostSuffix(sourceSession),
|
|
607
|
-
tags: crossHostProvenanceTags(body.tags),
|
|
708
|
+
tags: crossHostProvenanceTags(withRouteNotCarriedTag(body.tags, routeNotCarried)),
|
|
608
709
|
};
|
|
609
710
|
const fwd = await forwardQueueWrite(c, body.hostId, "/api/queue/create", forwardBody);
|
|
610
711
|
if (!fwd.ok)
|
|
611
712
|
return fwd.response;
|
|
612
713
|
const skippedScope = skippedCreateScopeAdvisory(body.tags);
|
|
613
714
|
const payload = fwd.payload;
|
|
614
|
-
|
|
715
|
+
// A same-id retry returns the row the receiver already stored: say the route wasn't carried only when it has none.
|
|
716
|
+
const returnedRoute = payload !== null && typeof payload === "object" && !Array.isArray(payload)
|
|
717
|
+
&& typeof payload.returnRoute === "string";
|
|
718
|
+
const added = [...(skippedScope ? [toCreateScopeAdvisory(skippedScope)] : []),
|
|
719
|
+
...(routeNotCarried && !returnedRoute ? [{ code: RETURN_ROUTE_NOT_CARRIED, message: routeNotCarried }] : [])];
|
|
720
|
+
if (!added.length || payload === null || typeof payload !== "object" || Array.isArray(payload))
|
|
615
721
|
return c.json(payload, fwd.status);
|
|
616
722
|
const objectPayload = payload;
|
|
617
723
|
const existingAdvisories = Array.isArray(objectPayload.advisories) ? objectPayload.advisories : [];
|
|
618
|
-
return c.json({ ...objectPayload, advisories: [...existingAdvisories,
|
|
724
|
+
return c.json({ ...objectPayload, advisories: [...existingAdvisories, ...added] }, fwd.status);
|
|
619
725
|
}
|
|
620
726
|
try {
|
|
621
727
|
const fence = classificationRefusal(c, sourceSession, body.classificationBinding);
|
|
622
728
|
if (fence)
|
|
623
729
|
return fence;
|
|
624
730
|
const item = await getRepo(c).create({
|
|
625
|
-
qitemId:
|
|
731
|
+
qitemId: createId,
|
|
626
732
|
sourceSession,
|
|
627
733
|
destinationSession: body.destinationSession, // required by createInputRefusal
|
|
628
734
|
body: body.body,
|
|
629
735
|
priority: body.priority,
|
|
630
736
|
tier: body.tier,
|
|
631
|
-
tags: body.tags,
|
|
737
|
+
tags: withRouteNotCarriedTag(body.tags, routeNotKept),
|
|
632
738
|
expiresAt: body.expiresAt,
|
|
633
739
|
chainOfRecord: body.chainOfRecord,
|
|
634
740
|
targetRepo: body.targetRepo,
|
|
@@ -641,9 +747,12 @@ export function queueRoutes() {
|
|
|
641
747
|
evidenceRef: body.evidenceRef,
|
|
642
748
|
nudge: body.nudge,
|
|
643
749
|
...resolveRecordedIdentity(c, identity), // P21 §4 era-stamp, plus the MCP adapter's caller on a direct attributed request (principal:v1)
|
|
750
|
+
...(route ? { returnRoute: route.address, returnRouteBasis: route.basis } : {}),
|
|
644
751
|
});
|
|
645
752
|
const scopeAdvisory = !(body.tags ?? []).includes(CROSS_HOST_TAG) ? createScopeAdvisory(c, item.tags) : null;
|
|
646
|
-
const advisories = [destinationAdvisory(c, item.destinationSession), sharedChannelAskAdvisory(item.destinationSession, body.humanIntent), scopeAdvisory
|
|
753
|
+
const advisories = [destinationAdvisory(c, item.destinationSession), sharedChannelAskAdvisory(item.destinationSession, body.humanIntent), scopeAdvisory,
|
|
754
|
+
// A same-id retry returns the stored row unchanged: say the route wasn't kept only when that row has none.
|
|
755
|
+
routeNotKept && !item.returnRoute ? { code: RETURN_ROUTE_NOT_CARRIED, message: routeNotKept } : null].filter(Boolean);
|
|
647
756
|
return c.json({ ...item, ...(advisories.length ? { advisories } : {}) }, 201);
|
|
648
757
|
}
|
|
649
758
|
catch (err) {
|
|
@@ -673,9 +782,11 @@ export function queueRoutes() {
|
|
|
673
782
|
return refuse("erase_rig_invalid", "rig is the account rig's id, given with members.");
|
|
674
783
|
}
|
|
675
784
|
if (body.members !== undefined) {
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
785
|
+
// An empty list, given with rig, is an account rig that never had a member; the erasure checks the rig's history.
|
|
786
|
+
const members = Array.isArray(body.members) && body.members.length === 0 && typeof body.rig === "string" ? [] : exactList(body.members);
|
|
787
|
+
if (!members) {
|
|
788
|
+
return refuse("erase_members_invalid", "members must be a non-empty list of exact session names, or [] with rig for an account rig that never had a member.");
|
|
789
|
+
}
|
|
679
790
|
scope = { kind: "members", members, ...(typeof body.rig === "string" ? { rig: body.rig } : {}) };
|
|
680
791
|
}
|
|
681
792
|
else if (body.ids !== undefined) {
|
|
@@ -715,10 +826,38 @@ export function queueRoutes() {
|
|
|
715
826
|
}
|
|
716
827
|
scope = { kind: "routine", contentDays, metadataDays };
|
|
717
828
|
}
|
|
829
|
+
// Whose host a host-qualified address at the rig names, for a never-member erase. Another host is proved only by a
|
|
830
|
+
// registered entry whose identity is established (declared, or a learned binding still eligible) and differs from this
|
|
831
|
+
// daemon's known id. This daemon's id, or an entry established as it, is this host. Anything else (an entry known only
|
|
832
|
+
// by its label, or no known id for this daemon) is unknown, which refuses. Routing is unchanged.
|
|
833
|
+
const registryLoader = c.get("hostRegistryLoader") ?? loadHostRegistry;
|
|
834
|
+
const bindingsLoader = c.get("hostBindingsLoader") ?? loadLearnedHostBindings;
|
|
835
|
+
let hosts;
|
|
836
|
+
const classifyHost = (host) => {
|
|
837
|
+
const self = getSelfHostId();
|
|
838
|
+
if (resolvesToLocalHost(host, self))
|
|
839
|
+
return "self";
|
|
840
|
+
if (self === null)
|
|
841
|
+
return "unknown";
|
|
842
|
+
if (hosts === undefined) {
|
|
843
|
+
const reg = registryLoader();
|
|
844
|
+
hosts = reg.ok ? { registry: reg.registry, learned: eligibleQueueBindings(reg.registry, bindingsLoader()) } : null;
|
|
845
|
+
}
|
|
846
|
+
const known = hosts;
|
|
847
|
+
if (!known)
|
|
848
|
+
return "unknown";
|
|
849
|
+
const match = resolveHost(known.registry, host, known.learned);
|
|
850
|
+
if (!match.ok)
|
|
851
|
+
return "unknown";
|
|
852
|
+
const identity = match.host.hostId ?? known.learned[match.host.id]?.hostId;
|
|
853
|
+
if (identity === undefined)
|
|
854
|
+
return "unknown";
|
|
855
|
+
return identity === self ? "self" : "other";
|
|
856
|
+
};
|
|
718
857
|
try {
|
|
719
858
|
const ledger = settings?.resolveOne("retention.erasure_ledger").value;
|
|
720
859
|
const report = await eraseQueue(c.get("db"), {
|
|
721
|
-
scope, apply: body.apply === true, nowIso: new Date().toISOString(),
|
|
860
|
+
scope, apply: body.apply === true, nowIso: new Date().toISOString(), classifyHost,
|
|
722
861
|
...(typeof ledger === "string" && ledger.length > 0 ? { ledgerPath: ledger } : {}),
|
|
723
862
|
});
|
|
724
863
|
console.log(`[queue-erase] ${identity.session} ${scope.kind} ${report.applied ? "applied" : "dry run"}: `
|
|
@@ -851,6 +990,33 @@ export function queueRoutes() {
|
|
|
851
990
|
return errorResponse(c, err);
|
|
852
991
|
}
|
|
853
992
|
});
|
|
993
|
+
// POST /:qitemId/tags — add tags to a row, in any state ({ add: [...] }). Add-only: existing tags stay, a tag the
|
|
994
|
+
// row already has adds nothing, and nothing else about the row changes. The actor is the transport-derived sender,
|
|
995
|
+
// as for update, and the tags added are recorded on a transition naming it.
|
|
996
|
+
app.post("/:qitemId/tags", async (c) => {
|
|
997
|
+
const qitemId = c.req.param("qitemId");
|
|
998
|
+
const body = await c.req.json().catch(() => ({}));
|
|
999
|
+
const identity = requireSenderIdentity(c, { verb: "queue tag", bodyClaim: body.actorSession });
|
|
1000
|
+
if (!identity.ok)
|
|
1001
|
+
return identity.response;
|
|
1002
|
+
const actorSession = identity.session;
|
|
1003
|
+
{
|
|
1004
|
+
const held = switchCustody(c, actorSession);
|
|
1005
|
+
if (held)
|
|
1006
|
+
return held;
|
|
1007
|
+
}
|
|
1008
|
+
const add = body.add;
|
|
1009
|
+
if (!Array.isArray(add) || add.length === 0 || !add.every((tag) => typeof tag === "string" && tag.trim().length > 0)) {
|
|
1010
|
+
return c.json({ error: "tags_required", message: "add takes one or more non-blank tags; nothing was written" }, 400);
|
|
1011
|
+
}
|
|
1012
|
+
try {
|
|
1013
|
+
const { item, added } = getRepo(c).addTags({ qitemId, actorSession, tags: add, ...resolveRecordedIdentity(c, identity) });
|
|
1014
|
+
return c.json({ ...item, added });
|
|
1015
|
+
}
|
|
1016
|
+
catch (err) {
|
|
1017
|
+
return errorResponse(c, err);
|
|
1018
|
+
}
|
|
1019
|
+
});
|
|
854
1020
|
// POST /:qitemId/handoff — transactional close+create (local); cross-host
|
|
855
1021
|
// message-passing choreography when a registered hostId is enveloped
|
|
856
1022
|
// (OPR.0.4.6.MH3 FR-4, C2).
|
|
@@ -900,7 +1066,7 @@ export function queueRoutes() {
|
|
|
900
1066
|
// Exact self id: finish a handoff that an earlier self-forward already started.
|
|
901
1067
|
if (typeof body.hostId === "string" && body.hostId === getSelfHostId()
|
|
902
1068
|
&& priorSelfForwardSuccessor(c, qitemId, crossHostBody.toSession, body.hostId)) {
|
|
903
|
-
return crossHostHandoff(c, qitemId, body.hostId, "handed-off", crossHostBody, createSuccessorInProcess(c));
|
|
1069
|
+
return crossHostHandoff(c, qitemId, body.hostId, "handed-off", crossHostBody, createSuccessorInProcess(c), "in-process");
|
|
904
1070
|
}
|
|
905
1071
|
try {
|
|
906
1072
|
const result = await getRepo(c).handoff({
|
|
@@ -919,8 +1085,17 @@ export function queueRoutes() {
|
|
|
919
1085
|
humanAlert: body.humanAlert,
|
|
920
1086
|
...resolveRecordedIdentity(c, identity), // P21 §4 era-stamp, plus the MCP adapter's caller on a direct attributed request (principal:v1)
|
|
921
1087
|
});
|
|
922
|
-
const
|
|
923
|
-
|
|
1088
|
+
const destination = destinationAdvisory(c, result.created.destinationSession);
|
|
1089
|
+
const scopeCheckRequested = c.req.header(CLI_HANDOFF_SCOPE_ADVISORY_HEADER) === "1";
|
|
1090
|
+
const scope = scopeCheckRequested
|
|
1091
|
+
? createScopeAdvisory(c, result.created.tags, {
|
|
1092
|
+
verb: "handoff",
|
|
1093
|
+
tagSource: body.tags == null ? "inherited" : "explicit",
|
|
1094
|
+
})
|
|
1095
|
+
: null;
|
|
1096
|
+
const advisories = [destination, scope].filter(Boolean);
|
|
1097
|
+
return c.json({ ...result, ...(advisories.length > 0 ? { advisories } : {}),
|
|
1098
|
+
...(scopeCheckRequested ? { [HANDOFF_SCOPE_CHECK_ACKNOWLEDGED]: true } : {}) }, 201);
|
|
924
1099
|
}
|
|
925
1100
|
catch (err) {
|
|
926
1101
|
return errorResponse(c, err);
|
|
@@ -974,7 +1149,7 @@ export function queueRoutes() {
|
|
|
974
1149
|
// Exact self id: finish a handoff that an earlier self-forward already started.
|
|
975
1150
|
if (typeof body.hostId === "string" && body.hostId === getSelfHostId()
|
|
976
1151
|
&& priorSelfForwardSuccessor(c, qitemId, crossHostBody.toSession, body.hostId)) {
|
|
977
|
-
return crossHostHandoff(c, qitemId, body.hostId, "done", crossHostBody, createSuccessorInProcess(c));
|
|
1152
|
+
return crossHostHandoff(c, qitemId, body.hostId, "done", crossHostBody, createSuccessorInProcess(c), "in-process");
|
|
978
1153
|
}
|
|
979
1154
|
try {
|
|
980
1155
|
const result = await getRepo(c).handoffAndComplete({
|
|
@@ -993,8 +1168,17 @@ export function queueRoutes() {
|
|
|
993
1168
|
humanAlert: body.humanAlert,
|
|
994
1169
|
identityProvenance: resolveRecordedProvenance(c, identity), // P21 §4 era-stamp: transport:v1 if the header named the actor here, else claimed:v1 (resolveRecordedProvenance degrades)
|
|
995
1170
|
});
|
|
996
|
-
const
|
|
997
|
-
|
|
1171
|
+
const destination = destinationAdvisory(c, result.created.destinationSession);
|
|
1172
|
+
const scopeCheckRequested = c.req.header(CLI_HANDOFF_SCOPE_ADVISORY_HEADER) === "1";
|
|
1173
|
+
const scope = scopeCheckRequested
|
|
1174
|
+
? createScopeAdvisory(c, result.created.tags, {
|
|
1175
|
+
verb: "handoff-and-complete",
|
|
1176
|
+
tagSource: body.tags == null ? "inherited" : "explicit",
|
|
1177
|
+
})
|
|
1178
|
+
: null;
|
|
1179
|
+
const advisories = [destination, scope].filter(Boolean);
|
|
1180
|
+
return c.json({ ...result, ...(advisories.length > 0 ? { advisories } : {}),
|
|
1181
|
+
...(scopeCheckRequested ? { [HANDOFF_SCOPE_CHECK_ACKNOWLEDGED]: true } : {}) }, 201);
|
|
998
1182
|
}
|
|
999
1183
|
catch (err) {
|
|
1000
1184
|
return errorResponse(c, err);
|
|
@@ -1088,6 +1272,7 @@ export function queueRoutes() {
|
|
|
1088
1272
|
// workspace.root, and the trace can only ascend to a root it knows (#2693).
|
|
1089
1273
|
let workRoots = [];
|
|
1090
1274
|
let catalogPath = null;
|
|
1275
|
+
let catalogError;
|
|
1091
1276
|
try {
|
|
1092
1277
|
catalogPath = projectCatalogPaths(c).catalog;
|
|
1093
1278
|
}
|
|
@@ -1108,9 +1293,49 @@ export function queueRoutes() {
|
|
|
1108
1293
|
workRoots = projects.filter((project) => !project.error).map((project) => project.root);
|
|
1109
1294
|
}
|
|
1110
1295
|
}
|
|
1111
|
-
catch {
|
|
1296
|
+
catch (error) {
|
|
1112
1297
|
catalogStatus = "unavailable";
|
|
1298
|
+
catalogError = error;
|
|
1113
1299
|
}
|
|
1300
|
+
// The project this seat's broad refocus orientation belongs to when no typed baton names
|
|
1301
|
+
// one (#3320), chosen as work-install chooses: the only catalog entry, then the rig's
|
|
1302
|
+
// association, the seat's working folder, the only unclaimed entry. No unique answer is
|
|
1303
|
+
// reported with its reason, never guessed.
|
|
1304
|
+
let workProject;
|
|
1305
|
+
const unselected = (error) => {
|
|
1306
|
+
const candidates = error instanceof ProjectReadError && error.candidates?.length ? ` (candidates: ${error.candidates.join(", ")})` : "";
|
|
1307
|
+
return { error: `${error instanceof Error ? error.message : String(error)}${candidates}` };
|
|
1308
|
+
};
|
|
1309
|
+
// An unreadable catalog selects nothing; say why, and the trace keeps the workspace root.
|
|
1310
|
+
if (catalogStatus === "unavailable")
|
|
1311
|
+
workProject = unselected(catalogError);
|
|
1312
|
+
if (catalogPath && catalogStatus === "usable") {
|
|
1313
|
+
try {
|
|
1314
|
+
const only = selectCatalogProject(catalogPath);
|
|
1315
|
+
if (only)
|
|
1316
|
+
workProject = { ...only, selectedBy: "single" };
|
|
1317
|
+
}
|
|
1318
|
+
catch (error) {
|
|
1319
|
+
if (error instanceof ProjectReadError && error.code === "project_required") {
|
|
1320
|
+
let cwd = null;
|
|
1321
|
+
try {
|
|
1322
|
+
const db = c.get("db");
|
|
1323
|
+
const seat = db && db.prepare("SELECT n.cwd FROM sessions s JOIN nodes n ON n.id = s.node_id WHERE s.session_name = ? ORDER BY s.created_at DESC, s.rowid DESC LIMIT 1")
|
|
1324
|
+
.get(physicalSessionName(db, session));
|
|
1325
|
+
cwd = seat?.cwd ?? null;
|
|
1326
|
+
}
|
|
1327
|
+
catch { /* No recorded working folder: selection continues without it. */ }
|
|
1328
|
+
try {
|
|
1329
|
+
workProject = inferCatalogProject(catalogPath, error, { rigName: rigFromSession(session), cwd }, []);
|
|
1330
|
+
}
|
|
1331
|
+
catch (inferred) {
|
|
1332
|
+
workProject = unselected(inferred);
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
else
|
|
1336
|
+
workProject = unselected(error);
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1114
1339
|
const currentWorkRoot = (row) => {
|
|
1115
1340
|
const projectIds = [...new Set((row.tags ?? []).flatMap((tag) => tag.split(",").map((part) => part.trim()))
|
|
1116
1341
|
.filter((tag) => tag.startsWith("project:") && tag.slice("project:".length).trim())
|
|
@@ -1166,11 +1391,11 @@ export function queueRoutes() {
|
|
|
1166
1391
|
getRow: (qitemId) => repo.getById(qitemId) ?? null,
|
|
1167
1392
|
continuationOf: (qitemId) => repo.currentParkContinuation(qitemId),
|
|
1168
1393
|
}, missionsRoot);
|
|
1169
|
-
return c.json({ ...position, ...derived, ...choiceField, role, workRoots,
|
|
1394
|
+
return c.json({ ...position, ...derived, ...choiceField, role, workRoots, ...(workProject ? { workProject } : {}),
|
|
1170
1395
|
// heldAndNextTruncated stays for trace scripts that predate the per-list flags.
|
|
1171
1396
|
workCandidates: { ...workCandidates, heldTruncated, nextTruncated, heldAndNextTruncated: heldTruncated || nextTruncated } });
|
|
1172
1397
|
}
|
|
1173
|
-
return c.json({ ...position, ...derived, ...choiceField, role, workRoots });
|
|
1398
|
+
return c.json({ ...position, ...derived, ...choiceField, role, workRoots, ...(workProject ? { workProject } : {}) });
|
|
1174
1399
|
});
|
|
1175
1400
|
// GET /list — list with filters. MUST precede /:qitemId so the literal path wins.
|
|
1176
1401
|
//
|
|
@@ -1295,7 +1520,8 @@ export function queueRoutes() {
|
|
|
1295
1520
|
if (sender && named.length > 0 && !sentOnly && (!state || state.includes("pending")) && named.every((s) => repo.isSameSession(sender, s))) {
|
|
1296
1521
|
repo.recordInboxCheckIn(sender);
|
|
1297
1522
|
}
|
|
1298
|
-
return c.json(items)
|
|
1523
|
+
return c.json(items.map((item) => item.state === "handed-off" || item.closureReason === "handed_off_to"
|
|
1524
|
+
? { ...item, ...handoffSuccessors(repo, item) } : item));
|
|
1299
1525
|
}
|
|
1300
1526
|
// OPR.0.3.2.20 — attention path goes through
|
|
1301
1527
|
// QueueRepository.listAttention, which pushes the attention
|
|
@@ -1386,8 +1612,8 @@ export function queueRoutes() {
|
|
|
1386
1612
|
return c.json({ error: "rig_required", message: "rig is required for a rig RECENT read" }, 400);
|
|
1387
1613
|
}
|
|
1388
1614
|
const raw = c.req.query("limit");
|
|
1389
|
-
const parsed = raw == null ?
|
|
1390
|
-
const limit = Number.isInteger(parsed) && parsed > 0 ? parsed :
|
|
1615
|
+
const parsed = raw == null ? DEFAULT_RECENT_TRANSITIONS_LIMIT : Number.parseInt(raw, 10);
|
|
1616
|
+
const limit = Number.isInteger(parsed) && parsed > 0 ? parsed : DEFAULT_RECENT_TRANSITIONS_LIMIT;
|
|
1391
1617
|
const scope = scopeKind === "instance"
|
|
1392
1618
|
? { kind: "instance" }
|
|
1393
1619
|
: { kind: "rig", rig: rig };
|
|
@@ -1452,8 +1678,10 @@ export function queueRoutes() {
|
|
|
1452
1678
|
...item,
|
|
1453
1679
|
// #2446: what a settling Mission Control act can be guarded with (expectedRevision).
|
|
1454
1680
|
decisionRevision: repo.decisionRevision(item),
|
|
1455
|
-
// The answer rows returned to this row, read by their link rather than their text; empty when none came back.
|
|
1681
|
+
// The answer rows returned to this row, read by their link rather than their text; empty when none came back here.
|
|
1682
|
+
// Only this daemon's rows are read: an answer another host holds isn't in them, so empty isn't proof of none.
|
|
1456
1683
|
answers: repo.answersForAsk(qitemId),
|
|
1684
|
+
answersFrom: "this-daemon",
|
|
1457
1685
|
// A closed row's outcome (its note and reason) lives only in the transition log; omitted while the row is open.
|
|
1458
1686
|
...(closing ? { closingTransition: {
|
|
1459
1687
|
transitionId: closing.transitionId,
|