@openrig/cli 0.7.17 → 0.7.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -6
- package/daemon/assets/claude-hook-bridge.cjs +146 -0
- package/daemon/assets/plugins/openrig/.claude-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/.codex-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/.cursor-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/README.md +1 -1
- package/daemon/assets/plugins/openrig-core/hooks/claude.json +14 -14
- package/daemon/assets/plugins/openrig-core/hooks/scripts/activity-relay.cjs +43 -22
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +6 -0
- package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +23 -0
- package/daemon/assets/plugins/openrig-core/skills/mission-slice-sop/SKILL.md +1 -1
- 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 +95 -7
- package/daemon/assets/skills/rigs/SKILL.md +68 -33
- package/daemon/assets/skills/rigs/references/installing-for-someone.md +2 -2
- 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 +57 -14
- package/daemon/context-packs/reference/getting-started.md +9 -4
- package/daemon/context-packs/reference/manifest.yaml +1 -1
- package/daemon/context-packs/reference/rig-spec.md +197 -1
- package/daemon/context-packs/reference/whats-new.md +187 -15
- 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-upgrade/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/working-with-an-openrig-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
- package/daemon/context-packs/skills/mission-slice-sop/SKILL.md +1 -1
- package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-user/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 +95 -7
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
- package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
- package/daemon/context-packs/world-example/manifest.yaml +1 -1
- package/daemon/context-packs/world-public/manifest.yaml +1 -1
- package/daemon/dist/adapters/claude-code-adapter.d.ts +9 -0
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +57 -9
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts +4 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +15 -5
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +5 -0
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +45 -10
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/kernel-authority.d.ts +8 -1
- package/daemon/dist/adapters/kernel-authority.d.ts.map +1 -1
- package/daemon/dist/adapters/kernel-authority.js +45 -10
- package/daemon/dist/adapters/kernel-authority.js.map +1 -1
- package/daemon/dist/adapters/pi-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-resume.js +5 -7
- package/daemon/dist/adapters/pi-resume.js.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.d.ts +47 -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 +84 -1
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +799 -16
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts +7 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.js +29 -19
- package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/tmux-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 +242 -14
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +966 -34
- 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 +14 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- 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/171_seat_hook_bridge.d.ts +5 -0
- package/daemon/dist/db/migrations/171_seat_hook_bridge.d.ts.map +1 -0
- package/daemon/dist/db/migrations/171_seat_hook_bridge.js +25 -0
- package/daemon/dist/db/migrations/171_seat_hook_bridge.js.map +1 -0
- package/daemon/dist/db/migrations/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/db/migrations/174_session_launched_cwd.d.ts +6 -0
- package/daemon/dist/db/migrations/174_session_launched_cwd.d.ts.map +1 -0
- package/daemon/dist/db/migrations/174_session_launched_cwd.js +8 -0
- package/daemon/dist/db/migrations/174_session_launched_cwd.js.map +1 -0
- package/daemon/dist/db/migrations/175_core_app_access.d.ts +3 -0
- package/daemon/dist/db/migrations/175_core_app_access.d.ts.map +1 -0
- package/daemon/dist/db/migrations/175_core_app_access.js +26 -0
- package/daemon/dist/db/migrations/175_core_app_access.js.map +1 -0
- package/daemon/dist/domain/activity-grants.d.ts.map +1 -1
- package/daemon/dist/domain/activity-grants.js +8 -4
- package/daemon/dist/domain/activity-grants.js.map +1 -1
- package/daemon/dist/domain/agent-activity-store.d.ts +59 -1
- package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
- package/daemon/dist/domain/agent-activity-store.js +250 -4
- 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-activity-hooks.d.ts +4 -2
- package/daemon/dist/domain/claude-activity-hooks.d.ts.map +1 -1
- package/daemon/dist/domain/claude-activity-hooks.js +5 -3
- package/daemon/dist/domain/claude-activity-hooks.js.map +1 -1
- package/daemon/dist/domain/claude-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 +66 -3
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +214 -10
- 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/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/compaction-restore-notice.d.ts +3 -1
- package/daemon/dist/domain/compaction-restore-notice.d.ts.map +1 -1
- package/daemon/dist/domain/compaction-restore-notice.js +22 -3
- package/daemon/dist/domain/compaction-restore-notice.js.map +1 -1
- package/daemon/dist/domain/configured-account.d.ts +3 -0
- package/daemon/dist/domain/configured-account.d.ts.map +1 -0
- package/daemon/dist/domain/configured-account.js +10 -0
- package/daemon/dist/domain/configured-account.js.map +1 -0
- package/daemon/dist/domain/connection-contract.d.ts +91 -0
- package/daemon/dist/domain/connection-contract.d.ts.map +1 -1
- package/daemon/dist/domain/connection-contract.js +73 -0
- package/daemon/dist/domain/connection-contract.js.map +1 -1
- package/daemon/dist/domain/context-usage-store.d.ts +5 -0
- package/daemon/dist/domain/context-usage-store.d.ts.map +1 -1
- package/daemon/dist/domain/context-usage-store.js +37 -2
- package/daemon/dist/domain/context-usage-store.js.map +1 -1
- package/daemon/dist/domain/core-app-access.d.ts +51 -0
- package/daemon/dist/domain/core-app-access.d.ts.map +1 -0
- package/daemon/dist/domain/core-app-access.js +107 -0
- package/daemon/dist/domain/core-app-access.js.map +1 -0
- package/daemon/dist/domain/core-app-job.d.ts +411 -0
- package/daemon/dist/domain/core-app-job.d.ts.map +1 -0
- package/daemon/dist/domain/core-app-job.js +537 -0
- package/daemon/dist/domain/core-app-job.js.map +1 -0
- package/daemon/dist/domain/current-park-arm.d.ts +4 -0
- package/daemon/dist/domain/current-park-arm.d.ts.map +1 -0
- package/daemon/dist/domain/current-park-arm.js +14 -0
- package/daemon/dist/domain/current-park-arm.js.map +1 -0
- package/daemon/dist/domain/current-work.d.ts +6 -1
- package/daemon/dist/domain/current-work.d.ts.map +1 -1
- package/daemon/dist/domain/current-work.js +41 -8
- package/daemon/dist/domain/current-work.js.map +1 -1
- package/daemon/dist/domain/cwd-resolution.d.ts +14 -0
- package/daemon/dist/domain/cwd-resolution.d.ts.map +1 -1
- package/daemon/dist/domain/cwd-resolution.js +28 -3
- 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/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 +17 -4
- 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/gateway/operator-delivery-engine.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.js +107 -3
- package/daemon/dist/domain/gateway/operator-delivery-engine.js.map +1 -1
- package/daemon/dist/domain/gateway/participants.d.ts +2 -0
- package/daemon/dist/domain/gateway/participants.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/participants.js +5 -1
- package/daemon/dist/domain/gateway/participants.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/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 +2 -0
- package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.js +41 -18
- 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/gateway/slack/slack-delivery.d.ts +1 -0
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.js +2 -0
- package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts +4 -0
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js +26 -2
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
- package/daemon/dist/domain/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/hook-bridge.d.ts +345 -0
- package/daemon/dist/domain/hook-bridge.d.ts.map +1 -0
- package/daemon/dist/domain/hook-bridge.js +547 -0
- package/daemon/dist/domain/hook-bridge.js.map +1 -0
- package/daemon/dist/domain/hosted-wake.d.ts +9 -0
- package/daemon/dist/domain/hosted-wake.d.ts.map +1 -1
- package/daemon/dist/domain/hosted-wake.js +45 -6
- package/daemon/dist/domain/hosted-wake.js.map +1 -1
- package/daemon/dist/domain/hot-potato-enforcer.d.ts +1 -1
- package/daemon/dist/domain/human-ask-attention.d.ts +10 -0
- package/daemon/dist/domain/human-ask-attention.d.ts.map +1 -0
- package/daemon/dist/domain/human-ask-attention.js +22 -0
- package/daemon/dist/domain/human-ask-attention.js.map +1 -0
- package/daemon/dist/domain/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-action-log.d.ts +4 -0
- package/daemon/dist/domain/mission-control/mission-control-action-log.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-action-log.js +8 -1
- package/daemon/dist/domain/mission-control/mission-control-action-log.js.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts +10 -0
- package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js +64 -12
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
- package/daemon/dist/domain/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-continuation-notice.d.ts +16 -0
- package/daemon/dist/domain/native-continuation-notice.d.ts.map +1 -0
- package/daemon/dist/domain/native-continuation-notice.js +79 -0
- package/daemon/dist/domain/native-continuation-notice.js.map +1 -0
- package/daemon/dist/domain/native-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-process-lineage.d.ts +16 -0
- package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-lineage.js +48 -3
- package/daemon/dist/domain/native-process-lineage.js.map +1 -1
- package/daemon/dist/domain/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 +94 -10
- 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 +11 -2
- package/daemon/dist/domain/network/network-connector.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +55 -6
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +14 -0
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +35 -6
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/outbox-handler.d.ts +69 -1
- package/daemon/dist/domain/outbox-handler.d.ts.map +1 -1
- package/daemon/dist/domain/outbox-handler.js +337 -3
- package/daemon/dist/domain/outbox-handler.js.map +1 -1
- package/daemon/dist/domain/park-wake-text.d.ts +18 -0
- package/daemon/dist/domain/park-wake-text.d.ts.map +1 -1
- package/daemon/dist/domain/park-wake-text.js +44 -0
- package/daemon/dist/domain/park-wake-text.js.map +1 -1
- package/daemon/dist/domain/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/policies/idle-gate-qitem.d.ts +3 -0
- package/daemon/dist/domain/policies/idle-gate-qitem.d.ts.map +1 -1
- package/daemon/dist/domain/policies/idle-gate-qitem.js +15 -0
- package/daemon/dist/domain/policies/idle-gate-qitem.js.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts +6 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.js +28 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -1
- package/daemon/dist/domain/process-limits.d.ts +47 -0
- package/daemon/dist/domain/process-limits.d.ts.map +1 -0
- package/daemon/dist/domain/process-limits.js +123 -0
- package/daemon/dist/domain/process-limits.js.map +1 -0
- package/daemon/dist/domain/process-table.d.ts +24 -0
- package/daemon/dist/domain/process-table.d.ts.map +1 -1
- package/daemon/dist/domain/process-table.js +60 -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 +11 -6
- package/daemon/dist/domain/queue-erasure.d.ts.map +1 -1
- package/daemon/dist/domain/queue-erasure.js +47 -21
- package/daemon/dist/domain/queue-erasure.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +122 -21
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +448 -101
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts +5 -0
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +74 -13
- 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-waiting.d.ts.map +1 -1
- package/daemon/dist/domain/queue-waiting.js +28 -3
- package/daemon/dist/domain/queue-waiting.js.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.d.ts +20 -0
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +264 -25
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/queue-wake-repository.d.ts +10 -1
- package/daemon/dist/domain/queue-wake-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-repository.js +79 -12
- package/daemon/dist/domain/queue-wake-repository.js.map +1 -1
- package/daemon/dist/domain/reconciler.d.ts +18 -2
- package/daemon/dist/domain/reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/reconciler.js +40 -0
- package/daemon/dist/domain/reconciler.js.map +1 -1
- package/daemon/dist/domain/restore-attempt-receipt.d.ts.map +1 -1
- package/daemon/dist/domain/restore-attempt-receipt.js +3 -2
- package/daemon/dist/domain/restore-attempt-receipt.js.map +1 -1
- package/daemon/dist/domain/restore-check-service.d.ts +10 -0
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js +76 -3
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +65 -3
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +311 -55
- 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 +24 -0
- package/daemon/dist/domain/restore-preconditions.d.ts.map +1 -1
- package/daemon/dist/domain/restore-preconditions.js +61 -1
- package/daemon/dist/domain/restore-preconditions.js.map +1 -1
- package/daemon/dist/domain/restore-topology.d.ts +7 -1
- package/daemon/dist/domain/restore-topology.d.ts.map +1 -1
- package/daemon/dist/domain/restore-topology.js +21 -0
- package/daemon/dist/domain/restore-topology.js.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.d.ts +2 -3
- package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.js +6 -25
- package/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
- package/daemon/dist/domain/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-expansion-service.js +1 -1
- package/daemon/dist/domain/rig-expansion-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 +74 -0
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rig-teardown.d.ts +20 -5
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +105 -22
- 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 +27 -2
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +95 -26
- package/daemon/dist/domain/rigspec-instantiator.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 +23 -0
- package/daemon/dist/domain/rosters.d.ts.map +1 -1
- package/daemon/dist/domain/rosters.js +37 -5
- package/daemon/dist/domain/rosters.js.map +1 -1
- package/daemon/dist/domain/runner-channel.d.ts +65 -0
- package/daemon/dist/domain/runner-channel.d.ts.map +1 -0
- package/daemon/dist/domain/runner-channel.js +348 -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/runner-permissions.d.ts +26 -3
- package/daemon/dist/domain/runner-permissions.d.ts.map +1 -1
- package/daemon/dist/domain/runner-permissions.js +160 -39
- package/daemon/dist/domain/runner-permissions.js.map +1 -1
- package/daemon/dist/domain/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/mission-parent.d.ts +19 -0
- package/daemon/dist/domain/scope/mission-parent.d.ts.map +1 -0
- package/daemon/dist/domain/scope/mission-parent.js +134 -0
- package/daemon/dist/domain/scope/mission-parent.js.map +1 -0
- package/daemon/dist/domain/scope/scope-audit.d.ts.map +1 -1
- package/daemon/dist/domain/scope/scope-audit.js +63 -3
- package/daemon/dist/domain/scope/scope-audit.js.map +1 -1
- package/daemon/dist/domain/scope/types.d.ts +3 -1
- package/daemon/dist/domain/scope/types.d.ts.map +1 -1
- package/daemon/dist/domain/scope/types.js +5 -1
- package/daemon/dist/domain/scope/types.js.map +1 -1
- package/daemon/dist/domain/seat-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 +14 -2
- package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.js +55 -15
- 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 +210 -65
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.d.ts +12 -4
- package/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.js +92 -17
- package/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +31 -6
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +172 -24
- 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 +38 -3
- 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 +11 -3
- package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -1
- package/daemon/dist/domain/seat-skill-apply.d.ts +1 -1
- package/daemon/dist/domain/seat-skill-apply.d.ts.map +1 -1
- package/daemon/dist/domain/seat-skill-apply.js +3 -2
- package/daemon/dist/domain/seat-skill-apply.js.map +1 -1
- package/daemon/dist/domain/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-registry.d.ts +5 -1
- package/daemon/dist/domain/session-registry.d.ts.map +1 -1
- package/daemon/dist/domain/session-registry.js +12 -1
- package/daemon/dist/domain/session-registry.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +56 -4
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +344 -18
- 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.map +1 -1
- package/daemon/dist/domain/shared-history-selection.js +9 -5
- package/daemon/dist/domain/shared-history-selection.js.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.d.ts +1 -1
- package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.js +4 -0
- package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts +1 -0
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +6 -4
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/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/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 +33 -10
- 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-adapter.d.ts +35 -1
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.js +231 -33
- package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-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/herdr-sessions.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-sessions.js +2 -1
- package/daemon/dist/domain/terminal/herdr-sessions.js.map +1 -1
- package/daemon/dist/domain/terminal/rig-viewer-records.d.ts +59 -0
- package/daemon/dist/domain/terminal/rig-viewer-records.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/rig-viewer-records.js +210 -0
- package/daemon/dist/domain/terminal/rig-viewer-records.js.map +1 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts +2 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.d.ts +99 -4
- package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.js +556 -36
- package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
- package/daemon/dist/domain/terminal/tile-layout.js +1 -1
- package/daemon/dist/domain/terminal/tile-layout.js.map +1 -1
- package/daemon/dist/domain/terminal/tmux-viewer-guard.d.ts +25 -0
- package/daemon/dist/domain/terminal/tmux-viewer-guard.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/tmux-viewer-guard.js +70 -0
- package/daemon/dist/domain/terminal/tmux-viewer-guard.js.map +1 -0
- package/daemon/dist/domain/terminal-policy.js +1 -1
- package/daemon/dist/domain/terminal-policy.js.map +1 -1
- package/daemon/dist/domain/transcript-grep-worker.d.ts +2 -0
- package/daemon/dist/domain/transcript-grep-worker.d.ts.map +1 -0
- package/daemon/dist/domain/transcript-grep-worker.js +108 -0
- package/daemon/dist/domain/transcript-grep-worker.js.map +1 -0
- package/daemon/dist/domain/transcript-grep.d.ts +26 -0
- package/daemon/dist/domain/transcript-grep.d.ts.map +1 -0
- package/daemon/dist/domain/transcript-grep.js +90 -0
- package/daemon/dist/domain/transcript-grep.js.map +1 -0
- package/daemon/dist/domain/transcript-store.d.ts +8 -2
- package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-store.js +10 -60
- package/daemon/dist/domain/transcript-store.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +149 -5
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/watchdog-delivery-receipts.d.ts +4 -0
- package/daemon/dist/domain/watchdog-delivery-receipts.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-delivery-receipts.js +35 -2
- package/daemon/dist/domain/watchdog-delivery-receipts.js.map +1 -1
- package/daemon/dist/domain/watchdog-delivery.d.ts +45 -1
- package/daemon/dist/domain/watchdog-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-delivery.js +66 -5
- package/daemon/dist/domain/watchdog-delivery.js.map +1 -1
- package/daemon/dist/domain/watchdog-history-log.d.ts +12 -0
- package/daemon/dist/domain/watchdog-history-log.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-history-log.js +19 -1
- package/daemon/dist/domain/watchdog-history-log.js.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts +32 -0
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.js +79 -0
- package/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts +22 -3
- package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.js +33 -9
- package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
- package/daemon/dist/domain/workflow-projector.js +1 -1
- package/daemon/dist/domain/workflow-projector.js.map +1 -1
- package/daemon/dist/domain/workflow-runtime.d.ts +13 -1
- package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-runtime.js +68 -9
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/domain/workflow-step-trail-log.d.ts +2 -2
- package/daemon/dist/domain/workflow-step-trail-log.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-step-trail-log.js.map +1 -1
- package/daemon/dist/domain/workflow-types.d.ts +3 -1
- package/daemon/dist/domain/workflow-types.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-types.js.map +1 -1
- package/daemon/dist/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 +17 -2
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/lib/pane-envelope.d.ts +3 -0
- package/daemon/dist/lib/pane-envelope.d.ts.map +1 -1
- package/daemon/dist/lib/pane-envelope.js +3 -1
- package/daemon/dist/lib/pane-envelope.js.map +1 -1
- package/daemon/dist/mission-parent-surface.d.ts +2 -0
- package/daemon/dist/mission-parent-surface.d.ts.map +1 -0
- package/daemon/dist/mission-parent-surface.js +2 -0
- package/daemon/dist/mission-parent-surface.js.map +1 -0
- package/daemon/dist/routes/activity.d.ts +18 -1
- package/daemon/dist/routes/activity.d.ts.map +1 -1
- package/daemon/dist/routes/activity.js +150 -9
- 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 +194 -176
- 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/core-app.d.ts +10 -0
- package/daemon/dist/routes/core-app.d.ts.map +1 -0
- package/daemon/dist/routes/core-app.js +175 -0
- package/daemon/dist/routes/core-app.js.map +1 -0
- package/daemon/dist/routes/hook-bridge.d.ts +3 -0
- package/daemon/dist/routes/hook-bridge.d.ts.map +1 -0
- package/daemon/dist/routes/hook-bridge.js +158 -0
- package/daemon/dist/routes/hook-bridge.js.map +1 -0
- package/daemon/dist/routes/missions.d.ts.map +1 -1
- package/daemon/dist/routes/missions.js +14 -2
- package/daemon/dist/routes/missions.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts +4 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +239 -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 +1 -0
- package/daemon/dist/routes/restore-check.js.map +1 -1
- 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/scope-audit.d.ts.map +1 -1
- package/daemon/dist/routes/scope-audit.js +7 -1
- package/daemon/dist/routes/scope-audit.js.map +1 -1
- package/daemon/dist/routes/seat.d.ts.map +1 -1
- package/daemon/dist/routes/seat.js +133 -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/slices.d.ts.map +1 -1
- package/daemon/dist/routes/slices.js +21 -2
- package/daemon/dist/routes/slices.js.map +1 -1
- package/daemon/dist/routes/startup.js +9 -2
- package/daemon/dist/routes/startup.js.map +1 -1
- package/daemon/dist/routes/terminal.d.ts.map +1 -1
- package/daemon/dist/routes/terminal.js +47 -6
- package/daemon/dist/routes/terminal.js.map +1 -1
- package/daemon/dist/routes/transcripts.d.ts.map +1 -1
- package/daemon/dist/routes/transcripts.js +16 -1
- package/daemon/dist/routes/transcripts.js.map +1 -1
- package/daemon/dist/routes/up.d.ts.map +1 -1
- package/daemon/dist/routes/up.js +14 -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 +21 -3
- package/daemon/dist/routes/watchdog.js.map +1 -1
- package/daemon/dist/routes/workflow.d.ts.map +1 -1
- package/daemon/dist/routes/workflow.js +5 -0
- package/daemon/dist/routes/workflow.js.map +1 -1
- package/daemon/dist/server.d.ts +5 -0
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +22 -0
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +140 -48
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/dist/terminal-viewer-guard-surface.d.ts +2 -0
- package/daemon/dist/terminal-viewer-guard-surface.d.ts.map +1 -0
- package/daemon/dist/terminal-viewer-guard-surface.js +2 -0
- package/daemon/dist/terminal-viewer-guard-surface.js.map +1 -0
- package/daemon/docs/reference/agent-startup-guide.md +5 -1
- package/daemon/docs/reference/claude-status-line.md +3 -2
- package/daemon/docs/reference/community-harness-examples/cursor/openrig-cursor-launch +6 -0
- package/daemon/docs/reference/community-harness-examples/dsh/README.md +8 -0
- package/daemon/docs/reference/community-harness-examples/dsh/openrig-dsh-runner.mjs +310 -20
- package/daemon/docs/reference/community-harness-examples/hermes/openrig-hermes-launch +6 -0
- package/daemon/docs/reference/community-harness-examples/openclaw/openrig-openclaw-launch +6 -0
- package/daemon/docs/reference/community-harness-examples/openshell/README.md +2 -0
- package/daemon/docs/reference/community-harness-examples/pi-tui/openrig-pi-tui-launch +6 -0
- package/daemon/docs/reference/community-harness-presets.md +7 -4
- package/daemon/docs/reference/core-app.md +212 -0
- package/daemon/docs/reference/daemon-http-clients.md +67 -12
- package/daemon/docs/reference/getting-started.md +9 -4
- package/daemon/docs/reference/harness-runner-contract.md +140 -4
- package/daemon/docs/reference/herdr-app.md +6 -0
- package/daemon/docs/reference/hosted-members.md +21 -1
- package/daemon/docs/reference/quickstart.md +4 -3
- package/daemon/docs/reference/rig-spec.md +197 -1
- package/daemon/docs/reference/rosters.md +17 -0
- package/daemon/docs/reference/sdlc-conventions.md +47 -6
- package/daemon/docs/reference/seat-delivery.md +87 -6
- package/daemon/docs/reference/slack-app-setup.md +39 -21
- package/daemon/docs/reference/terminal-sessions.md +99 -1
- package/daemon/docs/reference/whats-new.md +187 -15
- package/daemon/specs/agents/shared/skills/core/messaging-the-human/SKILL.md +23 -0
- package/daemon/specs/rigs/launch/factory/guidance/lead-first-move.md +27 -5
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +32 -8
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/startup/context.md +1 -1
- package/daemon/specs/rigs/launch/kernel/culture/CULTURE.md +12 -0
- package/daemon/specs/rigs/launch/starter/guidance/lead-first-move.md +27 -5
- package/dist/acp/connector.js +1 -1
- package/dist/acp/connector.js.map +1 -1
- package/dist/ask-wake.d.ts.map +1 -1
- package/dist/ask-wake.js +8 -1
- package/dist/ask-wake.js.map +1 -1
- package/dist/build-info.js +3 -3
- package/dist/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/archive.js +1 -1
- package/dist/commands/archive.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/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +7 -0
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +8 -1
- package/dist/commands/down.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/ps.d.ts +30 -1
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +85 -6
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +309 -21
- package/dist/commands/queue.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 +8 -0
- package/dist/commands/roster.d.ts.map +1 -1
- package/dist/commands/scope.d.ts.map +1 -1
- package/dist/commands/scope.js +346 -9
- package/dist/commands/scope.js.map +1 -1
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +213 -12
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts +2 -0
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +50 -7
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/setup.js +2 -2
- 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 +56 -0
- package/dist/commands/terminal.d.ts.map +1 -1
- package/dist/commands/terminal.js +199 -9
- package/dist/commands/terminal.js.map +1 -1
- package/dist/commands/transcript.js +1 -1
- package/dist/commands/transcript.js.map +1 -1
- package/dist/commands/unarchive.js +1 -1
- package/dist/commands/unarchive.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +3 -0
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/workflow-follow.d.ts +3 -1
- package/dist/commands/workflow-follow.d.ts.map +1 -1
- package/dist/commands/workflow-follow.js +25 -6
- package/dist/commands/workflow-follow.js.map +1 -1
- package/dist/commands/workflow-render.d.ts.map +1 -1
- package/dist/commands/workflow-render.js +5 -1
- package/dist/commands/workflow-render.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +18 -4
- package/dist/commands/workflow.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +12 -0
- package/dist/daemon-lifecycle.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/mission-composition.d.ts +1 -0
- package/dist/lib/scope/mission-composition.d.ts.map +1 -1
- package/dist/lib/scope/mission-composition.js +14 -0
- package/dist/lib/scope/mission-composition.js.map +1 -1
- package/dist/lib/scope/scope-audit.d.ts.map +1 -1
- package/dist/lib/scope/scope-audit.js +63 -3
- package/dist/lib/scope/scope-audit.js.map +1 -1
- package/dist/lib/scope/scope-fs.d.ts +10 -0
- package/dist/lib/scope/scope-fs.d.ts.map +1 -1
- package/dist/lib/scope/scope-fs.js +60 -0
- package/dist/lib/scope/scope-fs.js.map +1 -1
- package/dist/lib/scope/types.d.ts +3 -1
- package/dist/lib/scope/types.d.ts.map +1 -1
- package/dist/lib/scope/types.js +5 -1
- package/dist/lib/scope/types.js.map +1 -1
- package/dist/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 +138 -24
- package/dist/mcp-server.js.map +1 -1
- package/dist/restore-packet/packet-writer.d.ts.map +1 -1
- package/dist/restore-packet/packet-writer.js +8 -5
- package/dist/restore-packet/packet-writer.js.map +1 -1
- package/dist/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.d.ts +2 -1
- package/dist/terminal-window.d.ts.map +1 -1
- package/dist/terminal-window.js +570 -44
- package/dist/terminal-window.js.map +1 -1
- package/package.json +1 -1
- package/tui/dist/daemon-client.d.ts +4 -0
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +2 -1
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/execution/execution-model.d.ts.map +1 -1
- package/tui/dist/execution/execution-model.js +22 -5
- package/tui/dist/execution/execution-model.js.map +1 -1
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +6 -3
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/navigator.d.ts +1 -1
- package/tui/dist/navigator.d.ts.map +1 -1
- package/tui/dist/navigator.js +4 -2
- package/tui/dist/navigator.js.map +1 -1
- package/tui/dist/pulse/render-pulse.d.ts.map +1 -1
- package/tui/dist/pulse/render-pulse.js +7 -14
- package/tui/dist/pulse/render-pulse.js.map +1 -1
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +29 -21
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/stylize.d.ts.map +1 -1
- package/tui/dist/stylize.js +3 -3
- package/tui/dist/stylize.js.map +1 -1
- package/tui/dist/terminals/terminal-model.d.ts +1 -0
- package/tui/dist/terminals/terminal-model.d.ts.map +1 -1
- package/tui/dist/terminals/terminal-model.js +4 -2
- package/tui/dist/terminals/terminal-model.js.map +1 -1
- package/tui/dist/types.d.ts +1 -0
- package/tui/dist/types.d.ts.map +1 -1
- package/tui/dist/visual-layout.d.ts +3 -0
- package/tui/dist/visual-layout.d.ts.map +1 -1
- package/tui/dist/visual-layout.js +17 -0
- package/tui/dist/visual-layout.js.map +1 -1
- package/ui/dist/assets/{index-BvUEh33d.js → index-B-sMy02c.js} +116 -116
- package/ui/dist/assets/{index-BX8TUZ0E.css → index-DiN7RwWg.css} +1 -1
- package/ui/dist/index.html +2 -2
|
@@ -1,11 +1,31 @@
|
|
|
1
|
+
// Rings a hosted member (an outside tool on the team) when a row lands for it, through the trigger its roster entry
|
|
2
|
+
// declares. It sends a pointer to the row, never the row's body: the member reads the row under its own grant. A 2xx
|
|
3
|
+
// means the trigger accepted the ring, not that the member picked the work up: pickup is its claim on the row.
|
|
4
|
+
import { createHmac, randomUUID } from "node:crypto";
|
|
1
5
|
import { resolveSecret } from "./gateway/slack/secrets.js";
|
|
2
6
|
import { safeDecodeURIComponent, validateOutboundUrl } from "./mission-control/outbound-url-validator.js";
|
|
3
7
|
/** How long a trigger may take to answer. After that the ring is unconfirmed, not failed: the trigger may have it. */
|
|
4
8
|
export const HOSTED_WAKE_TIMEOUT_MS = 10_000;
|
|
9
|
+
/** A signing key from its secret, read the way receivers read it: `whsec_` followed by base64 is that base64's bytes
|
|
10
|
+
* (strict: the alphabet with its padding), and any other value is its own UTF-8 bytes. Null only for a `whsec_` with
|
|
11
|
+
* nothing, or not valid base64, after it: a ring is never signed with a key it wasn't given. */
|
|
12
|
+
export function standardWebhookKey(secret) {
|
|
13
|
+
if (!secret.startsWith("whsec_"))
|
|
14
|
+
return secret ? Buffer.from(secret, "utf8") : null;
|
|
15
|
+
const encoded = secret.slice("whsec_".length);
|
|
16
|
+
if (!encoded || !/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(encoded))
|
|
17
|
+
return null;
|
|
18
|
+
return Buffer.from(encoded, "base64");
|
|
19
|
+
}
|
|
20
|
+
/** A Standard Webhooks v1 signature: HMAC-SHA256 over `<webhook-id>.<webhook-timestamp>.` and the body bytes exactly as
|
|
21
|
+
* sent, as `v1,<base64>`. */
|
|
22
|
+
export function standardWebhookSignature(key, id, timestamp, body) {
|
|
23
|
+
return `v1,${createHmac("sha256", key).update(`${id}.${timestamp}.`).update(body).digest("base64")}`;
|
|
24
|
+
}
|
|
5
25
|
/** The webhook URL can itself be a credential, so a result names the secret it came from, never the URL. */
|
|
6
26
|
const failed = (ref, detail) => ({ classified: "failed", nudgeResult: `failed:webhook (${ref}) ${detail}` });
|
|
7
27
|
export async function ringHostedWake(ring, wake, opts = {}) {
|
|
8
|
-
const { url_ref: urlRef, authorization_ref: authorizationRef, secrets_env_file: envFile } = wake.webhook;
|
|
28
|
+
const { url_ref: urlRef, authorization_ref: authorizationRef, signing_secret_ref: signingRef, secrets_env_file: envFile } = wake.webhook;
|
|
9
29
|
const lookup = { ...(opts.env ? { env: opts.env } : {}), ...(envFile ? { envFile } : {}) };
|
|
10
30
|
const url = resolveSecret(urlRef, lookup);
|
|
11
31
|
if (!url)
|
|
@@ -13,6 +33,14 @@ export async function ringHostedWake(ring, wake, opts = {}) {
|
|
|
13
33
|
const authorization = authorizationRef ? resolveSecret(authorizationRef, lookup) : null;
|
|
14
34
|
if (authorizationRef && !authorization)
|
|
15
35
|
return failed(urlRef, `not rung: its Authorization value (${authorizationRef}) isn't set`);
|
|
36
|
+
// A trigger set up to verify signatures gets a signed ring or none: a ring is never sent unsigned in its place.
|
|
37
|
+
const signingSecret = signingRef ? resolveSecret(signingRef, lookup) : null;
|
|
38
|
+
if (signingRef && !signingSecret)
|
|
39
|
+
return failed(urlRef, `not rung: its signing secret (${signingRef}) isn't set, and the ring isn't sent unsigned`);
|
|
40
|
+
const signingKey = signingSecret ? standardWebhookKey(signingSecret) : null;
|
|
41
|
+
if (signingRef && !signingKey) {
|
|
42
|
+
return failed(urlRef, `not rung: its signing secret (${signingRef}) starts with whsec_ but isn't followed by valid base64, and the ring isn't sent unsigned`);
|
|
43
|
+
}
|
|
16
44
|
const checked = validateOutboundUrl(url);
|
|
17
45
|
if (!checked.valid)
|
|
18
46
|
return failed(urlRef, `not rung: the URL is invalid (${checked.reason})`);
|
|
@@ -24,14 +52,25 @@ export async function ringHostedWake(ring, wake, opts = {}) {
|
|
|
24
52
|
target.username = "";
|
|
25
53
|
target.password = "";
|
|
26
54
|
}
|
|
55
|
+
const body = JSON.stringify({
|
|
56
|
+
source: "openrig.queue", schema_version: 1, event: "work-waiting",
|
|
57
|
+
qitem_id: ring.qitemId, destination: ring.destination, summary: ring.summary, from: ring.source,
|
|
58
|
+
});
|
|
59
|
+
// Signed over the body's UTF-8 bytes, which are the bytes fetch sends for this string. Each ring is its own message
|
|
60
|
+
// with its own id: a row can be rung again for a new wake, which a receiver mustn't drop as a repeat.
|
|
61
|
+
const signing = {};
|
|
62
|
+
if (signingKey) {
|
|
63
|
+
const id = `msg_${randomUUID().replaceAll("-", "")}`;
|
|
64
|
+
const timestamp = Math.floor((opts.now ?? Date.now)() / 1000);
|
|
65
|
+
signing["webhook-id"] = id;
|
|
66
|
+
signing["webhook-timestamp"] = String(timestamp);
|
|
67
|
+
signing["webhook-signature"] = standardWebhookSignature(signingKey, id, timestamp, Buffer.from(body, "utf8"));
|
|
68
|
+
}
|
|
27
69
|
try {
|
|
28
70
|
const res = await (opts.fetchImpl ?? fetch)(target.toString(), {
|
|
29
71
|
method: "POST",
|
|
30
|
-
headers: { "Content-Type": "application/json", ...(auth ? { Authorization: auth } : {}) },
|
|
31
|
-
body
|
|
32
|
-
source: "openrig.queue", schema_version: 1, event: "work-waiting",
|
|
33
|
-
qitem_id: ring.qitemId, destination: ring.destination, summary: ring.summary, from: ring.source,
|
|
34
|
-
}),
|
|
72
|
+
headers: { "Content-Type": "application/json", ...(auth ? { Authorization: auth } : {}), ...signing },
|
|
73
|
+
body,
|
|
35
74
|
// A redirect isn't followed: the ring goes only where the roster says.
|
|
36
75
|
redirect: "manual",
|
|
37
76
|
signal: AbortSignal.timeout(opts.timeoutMs ?? HOSTED_WAKE_TIMEOUT_MS),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-wake.js","sourceRoot":"","sources":["../../src/domain/hosted-wake.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hosted-wake.js","sourceRoot":"","sources":["../../src/domain/hosted-wake.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,qHAAqH;AACrH,+GAA+G;AAC/G,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;A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oCAAoC,CAAC,CAAC;QAC7H,OAAO,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;IAClD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,iHAAiH;QACjH,MAAM,QAAQ,GAAG,GAAG,YAAY,KAAK,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,cAAc,IAAI,GAAG,CAAC,IAAI,KAAK,YAAY,CAAC,CAAC;QACpG,sHAAsH;QACtH,iGAAiG;QACjG,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,0BAA0B,MAAM,0BAA0B,IAAI,CAAC,SAAS,IAAI,sBAAsB,OAAO;sBACxJ,4FAA4F,EAAE,CAAC;QACrG,CAAC;QACD,MAAM,IAAI,GAAI,GAA6C,EAAE,KAAK,EAAE,IAAI,CAAC;QACzE,OAAO,MAAM,CAAC,MAAM,EAAE,wBAAwB,OAAO,IAAI,KAAK,QAAQ,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,GAAG,CAAC,CAAC;IACxI,CAAC;AACH,CAAC;AAED;;kBAEkB;AAClB,MAAM,UAAU,wBAAwB,CAAC,WAAmB;IAC1D,OAAO,WAAW,CAAC,UAAU,CAAC,wBAAwB,CAAC,IAAI,WAAW,CAAC,UAAU,CAAC,wBAAwB,CAAC,CAAC;AAC9G,CAAC"}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
export declare const CLOSURE_REASONS: readonly ["handed_off_to", "blocked_on", "denied", "canceled", "no-follow-on", "escalation", "superseded"];
|
|
19
19
|
export type ClosureReason = (typeof CLOSURE_REASONS)[number];
|
|
20
|
-
export declare const DONE_CLOSURE_REASONS: ("
|
|
20
|
+
export declare const DONE_CLOSURE_REASONS: ("handed_off_to" | "denied" | "superseded" | "canceled" | "no-follow-on" | "escalation")[];
|
|
21
21
|
export interface ClosureRequest {
|
|
22
22
|
state: string;
|
|
23
23
|
closureReason?: string | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { QueueRepository, QueueItem } from "./queue-repository.js";
|
|
2
|
+
/** Shared queue attention membership; projection and delivery details remain with each reader. */
|
|
3
|
+
export declare function humanAskAttention(queue: QueueRepository): {
|
|
4
|
+
current: QueueItem[];
|
|
5
|
+
asked: Set<string>;
|
|
6
|
+
partial: boolean;
|
|
7
|
+
};
|
|
8
|
+
/** This job handles structured human asks only, with the existing whole-thread answer semantics. */
|
|
9
|
+
export declare function appAskUnsupported(queue: QueueRepository, item: QueueItem): string | null;
|
|
10
|
+
//# sourceMappingURL=human-ask-attention.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"human-ask-attention.d.ts","sourceRoot":"","sources":["../../src/domain/human-ask-attention.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGxE,kGAAkG;AAClG,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,eAAe;;;;EAOvD;AAED,oGAAoG;AACpG,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAMxF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { isHumanSeatSessionRef } from "./session-name.js";
|
|
2
|
+
/** Shared queue attention membership; projection and delivery details remain with each reader. */
|
|
3
|
+
export function humanAskAttention(queue) {
|
|
4
|
+
const rows = queue.listAttention({ limit: 1001, includeWaiting: false });
|
|
5
|
+
const bounded = rows.slice(0, 1000);
|
|
6
|
+
const asked = new Set(bounded.filter(q => queue.isCurrentHumanAsk(q.qitemId)).map(q => q.qitemId));
|
|
7
|
+
const current = bounded.filter(q => isHumanSeatSessionRef(q.destinationSession) || asked.has(q.qitemId)
|
|
8
|
+
|| q.state === "blocked" && isHumanSeatSessionRef(q.blockedOn ?? ""));
|
|
9
|
+
return { current, asked, partial: rows.length >= 1001 };
|
|
10
|
+
}
|
|
11
|
+
/** This job handles structured human asks only, with the existing whole-thread answer semantics. */
|
|
12
|
+
export function appAskUnsupported(queue, item) {
|
|
13
|
+
if (item.contentErasedAt)
|
|
14
|
+
return "source_unavailable";
|
|
15
|
+
if (!queue.isPersonAddress(item.destinationSession) || queue.isSharedChannel(item.destinationSession)
|
|
16
|
+
|| item.humanIntent === "update" || !item.humanQuestions?.length || item.evidenceRef?.startsWith("pair-request:"))
|
|
17
|
+
return "unsupported_request_kind";
|
|
18
|
+
if (item.state !== "pending")
|
|
19
|
+
return "request_not_pending";
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=human-ask-attention.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"human-ask-attention.js","sourceRoot":"","sources":["../../src/domain/human-ask-attention.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,kGAAkG;AAClG,MAAM,UAAU,iBAAiB,CAAC,KAAsB;IACtD,MAAM,IAAI,GAAG,KAAK,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,CAAC;IACzE,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;IACpC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACnG,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,qBAAqB,CAAC,CAAC,CAAC,kBAAkB,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC;WAClG,CAAC,CAAC,KAAK,KAAK,SAAS,IAAI,qBAAqB,CAAC,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,CAAC;IACxE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,IAAI,IAAI,EAAE,CAAC;AAC1D,CAAC;AAED,oGAAoG;AACpG,MAAM,UAAU,iBAAiB,CAAC,KAAsB,EAAE,IAAe;IACvE,IAAI,IAAI,CAAC,eAAe;QAAE,OAAO,oBAAoB,CAAC;IACtD,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,kBAAkB,CAAC;WAChG,IAAI,CAAC,WAAW,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,IAAI,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,eAAe,CAAC;QAAE,OAAO,0BAA0B,CAAC;IACvJ,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS;QAAE,OAAO,qBAAqB,CAAC;IAC3D,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const reasons = new Set(["capture_unavailable", "pane_in_mode", "invalid_cursor", "incomplete_frame",
|
|
2
2
|
"ambiguous_composer", "unrecognized_composer", "read_timeout", "read_budget_spent", "cursor_moved",
|
|
3
3
|
"cursor_unavailable", "cursor_outside", "unrecognized_input_box", "input_not_clear",
|
|
4
|
-
"paste_controls", "paste_long", "paste_viewport"]);
|
|
4
|
+
"paste_controls", "paste_long", "paste_viewport", "client_activity_unavailable"]);
|
|
5
5
|
/** Copy only fixed vocabulary and cursor flags. Unknown reader reasons remain content-free. */
|
|
6
6
|
export function inputReadDiagnostic(check, reading, reason) {
|
|
7
7
|
const evidence = reading?.evidence ?? [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-read-diagnostic.js","sourceRoot":"","sources":["../../src/domain/input-read-diagnostic.ts"],"names":[],"mappings":"AAWA,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,qBAAqB,EAAE,cAAc,EAAE,gBAAgB,EAAE,kBAAkB;IAClG,oBAAoB,EAAE,uBAAuB,EAAE,cAAc,EAAE,mBAAmB,EAAE,cAAc;IAClG,oBAAoB,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,iBAAiB;IACnF,gBAAgB,EAAE,YAAY,EAAE,gBAAgB,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"input-read-diagnostic.js","sourceRoot":"","sources":["../../src/domain/input-read-diagnostic.ts"],"names":[],"mappings":"AAWA,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,qBAAqB,EAAE,cAAc,EAAE,gBAAgB,EAAE,kBAAkB;IAClG,oBAAoB,EAAE,uBAAuB,EAAE,cAAc,EAAE,mBAAmB,EAAE,cAAc;IAClG,oBAAoB,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,iBAAiB;IACnF,gBAAgB,EAAE,YAAY,EAAE,gBAAgB,EAAE,6BAA6B,CAAC,CAAC,CAAC;AAEpF,+FAA+F;AAC/F,MAAM,UAAU,mBAAmB,CAAC,KAAmC,EAAE,OAIjE,EAAE,MAAe;IACvB,MAAM,QAAQ,GAAG,OAAO,EAAE,QAAQ,IAAI,EAAE,CAAC;IACzC,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,2BAA2B,CAAC,CAAC;IAC/D,MAAM,OAAO,GAAG,MAAM,IAAI,OAAO,EAAE,aAAa,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,cAAc;QAC3E,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,mBAAmB;YACnE,CAAC,CAAC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AAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC;mBACjH,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;YAC/F,KAAK,EAAE,OAAO,OAAO,EAAE,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,EAAE;QACjF,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI;KAChC,CAAC;AACJ,CAAC"}
|
|
@@ -14,6 +14,8 @@ export interface OpenRigInstanceInitializationResult {
|
|
|
14
14
|
createdPaths: string[];
|
|
15
15
|
conflicts: InitializationConflict[];
|
|
16
16
|
dryRun: boolean;
|
|
17
|
+
/** workspace.root already holds a project of its own (this project.yaml): the scaffold left it as it is. */
|
|
18
|
+
workspaceExistingProject?: string;
|
|
17
19
|
}
|
|
18
20
|
export declare function openRigContextLibraryRoots(contextRoot: string): [string, string];
|
|
19
21
|
/** Reconcile one canonical OpenRig instance layout. This is the shared owner
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instance-initialization.d.ts","sourceRoot":"","sources":["../../src/domain/instance-initialization.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACzB,MAAM,2CAA2C,CAAC;AAMnD,MAAM,WAAW,oCAAoC;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,EAAE,CAAC,EAAE,mBAAmB,CAAC;CAC1B;AAED,MAAM,WAAW,mCAAmC;IAClD,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,sBAAsB,EAAE,CAAC;IACpC,MAAM,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"instance-initialization.d.ts","sourceRoot":"","sources":["../../src/domain/instance-initialization.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACzB,MAAM,2CAA2C,CAAC;AAMnD,MAAM,WAAW,oCAAoC;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,EAAE,CAAC,EAAE,mBAAmB,CAAC;CAC1B;AAED,MAAM,WAAW,mCAAmC;IAClD,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,sBAAsB,EAAE,CAAC;IACpC,MAAM,EAAE,OAAO,CAAC;IAChB,4GAA4G;IAC5G,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAEhF;AAED;;;eAGe;AACf,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,oCAAoC,GAC5C,mCAAmC,CAmErC;AAED,wBAAgB,qCAAqC,CACnD,MAAM,EAAE,IAAI,CAAC,mCAAmC,EAAE,WAAW,CAAC,GAC7D,MAAM,CAIR"}
|
|
@@ -71,7 +71,8 @@ export function ensureOpenRigInstance(options) {
|
|
|
71
71
|
fs.writeFile(systemWorldPath, DEFAULT_SYSTEM_WORLD_MANIFEST);
|
|
72
72
|
ensureDefaultWorkspace({ root: workspaceRoot, fs });
|
|
73
73
|
}
|
|
74
|
-
return { ok: true, home: options.home, createdPaths, conflicts: [], dryRun
|
|
74
|
+
return { ok: true, home: options.home, createdPaths, conflicts: [], dryRun,
|
|
75
|
+
...(workspacePlan.existingProject ? { workspaceExistingProject: workspacePlan.existingProject } : {}) };
|
|
75
76
|
}
|
|
76
77
|
export function formatInstanceInitializationConflicts(result) {
|
|
77
78
|
return result.conflicts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instance-initialization.js","sourceRoot":"","sources":["../../src/domain/instance-initialization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,sBAAsB,EACtB,oBAAoB,GAGrB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,6BAA6B,EAC7B,kCAAkC,GACnC,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"instance-initialization.js","sourceRoot":"","sources":["../../src/domain/instance-initialization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,sBAAsB,EACtB,oBAAoB,GAGrB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,6BAA6B,EAC7B,kCAAkC,GACnC,MAAM,mBAAmB,CAAC;AAsB3B,MAAM,UAAU,0BAA0B,CAAC,WAAmB;IAC5D,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;AACpD,CAAC;AAED;;;eAGe;AACf,MAAM,U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AU,EAAE,MAAM,CAAC,CAAC;QAC/D,IAAI,eAAe,KAAK,SAAS;YAAE,EAAE,CAAC,SAAS,CAAC,eAAe,EAAE,6BAA6B,CAAC,CAAC;QAChG,sBAAsB,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM;QACxE,GAAG,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,wBAAwB,EAAE,aAAa,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AAC5G,CAAC;AAED,MAAM,UAAU,qCAAqC,CACnD,MAA8D;IAE9D,OAAO,MAAM,CAAC,SAAS;SACpB,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,GAAG,QAAQ,CAAC,IAAI,cAAc,QAAQ,CAAC,QAAQ,WAAW,QAAQ,CAAC,MAAM,EAAE,CAAC;SAC9F,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type Database from "better-sqlite3";
|
|
2
|
+
import { type MemberConnection } from "./connection-contract.js";
|
|
3
|
+
import type { QueueRepository } from "./queue-repository.js";
|
|
4
|
+
/** The connection an address is reached on, as this daemon resolves it: a person (the gateway), a hosted member (its
|
|
5
|
+
* trigger), else the seat it addresses, read by seat rather than by the newest session row with that name, and live
|
|
6
|
+
* when a session is recorded as its current one (a record, not an observed pane). A person is one the human registry
|
|
7
|
+
* resolves, or the reserved terminal person's seat (`human@host`, `human-<x>@kernel|host`); an address shaped like a
|
|
8
|
+
* person's (`<id>@external`) that the registry doesn't resolve isn't one. A person is resolved before a hosted member
|
|
9
|
+
* or seat, as the queue does, so when the registry can't be read, any spelling it could resolve to a person (an
|
|
10
|
+
* `@external` address or a canonical `member@rig`) reads unknown rather than as whatever else has that name. Nobody
|
|
11
|
+
* registered yet is a readable registry with no one in it. An address none of them has reads every capability
|
|
12
|
+
* unknown too, with its own reason. */
|
|
13
|
+
export declare function resolveMemberConnection(db: Database.Database, queue: Pick<QueueRepository, "humanRegistry" | "isHostedMember"> | undefined, member: string): MemberConnection;
|
|
14
|
+
//# sourceMappingURL=member-connection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"member-connection.d.ts","sourceRoot":"","sources":["../../src/domain/member-connection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEnF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAK7D;;;;;;;;wCAQwC;AACxC,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,eAAe,GAAG,gBAAgB,CAAC,GAAG,SAAS,EACzI,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAgBlC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { memberConnection } from "./connection-contract.js";
|
|
2
|
+
import { registeredPeople, resolveRegisteredHumanAddress } from "./gateway/human-registry.js";
|
|
3
|
+
import { resolveGuardTarget } from "./seat-delivery-guard.js";
|
|
4
|
+
import { isHumanSeatSessionRef, parseSessionName } from "./session-name.js";
|
|
5
|
+
import { resolveCurrentSessionAddress } from "./session-registry.js";
|
|
6
|
+
/** The connection an address is reached on, as this daemon resolves it: a person (the gateway), a hosted member (its
|
|
7
|
+
* trigger), else the seat it addresses, read by seat rather than by the newest session row with that name, and live
|
|
8
|
+
* when a session is recorded as its current one (a record, not an observed pane). A person is one the human registry
|
|
9
|
+
* resolves, or the reserved terminal person's seat (`human@host`, `human-<x>@kernel|host`); an address shaped like a
|
|
10
|
+
* person's (`<id>@external`) that the registry doesn't resolve isn't one. A person is resolved before a hosted member
|
|
11
|
+
* or seat, as the queue does, so when the registry can't be read, any spelling it could resolve to a person (an
|
|
12
|
+
* `@external` address or a canonical `member@rig`) reads unknown rather than as whatever else has that name. Nobody
|
|
13
|
+
* registered yet is a readable registry with no one in it. An address none of them has reads every capability
|
|
14
|
+
* unknown too, with its own reason. */
|
|
15
|
+
export function resolveMemberConnection(db, queue, member) {
|
|
16
|
+
const parsed = parseSessionName(member);
|
|
17
|
+
const terminalPersonSeat = isHumanSeatSessionRef(member) && parsed.kind !== "external";
|
|
18
|
+
const people = queue ? registeredPeople(queue.humanRegistry()) : null;
|
|
19
|
+
if (terminalPersonSeat || (people && resolveRegisteredHumanAddress(member, people) !== null)) {
|
|
20
|
+
return memberConnection(member, { kind: "person" });
|
|
21
|
+
}
|
|
22
|
+
if (!people && (parsed.kind === "external" || parsed.kind === "canonical")) {
|
|
23
|
+
return memberConnection(member, { kind: "none", reason: "the person registry couldn't be read, so whether a person has this address is unknown" });
|
|
24
|
+
}
|
|
25
|
+
if (queue?.isHostedMember(member))
|
|
26
|
+
return memberConnection(member, { kind: "hosted" });
|
|
27
|
+
const target = resolveGuardTarget(db, member);
|
|
28
|
+
if (!target)
|
|
29
|
+
return memberConnection(member, { kind: "none", reason: "no seat, hosted member or registered person has this address on this daemon" });
|
|
30
|
+
const node = db.prepare("SELECT runtime FROM nodes WHERE id = ?").get(target.nodeId);
|
|
31
|
+
return memberConnection(member, { kind: "seat", runtime: node?.runtime ?? null,
|
|
32
|
+
live: resolveCurrentSessionAddress(db, member)?.nodeId === target.nodeId });
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=member-connection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"member-connection.js","sourceRoot":"","sources":["../../src/domain/member-connection.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAyB,MAAM,0BAA0B,CA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AAE,MAAM,CAAC,CAAC;IAC9C,IAAI,CAAC,MAAM;QAAE,OAAO,gBAAgB,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,6EAA6E,EAAE,CAAC,CAAC;IACtJ,MAAM,IAAI,GAAG,EAAE,CAAC,OAAO,CAAC,wCAAwC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAA2C,CAAC;IAC/H,OAAO,gBAAgB,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,IAAI,IAAI;QAC5E,IAAI,EAAE,4BAA4B,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;AAChF,CAAC"}
|
|
@@ -2,6 +2,8 @@ import type Database from "better-sqlite3";
|
|
|
2
2
|
export declare const MISSION_CONTROL_VERBS: readonly ["approve", "deny", "route", "annotate", "hold", "drop", "handoff", "resolve", "answer"];
|
|
3
3
|
export type MissionControlVerb = (typeof MISSION_CONTROL_VERBS)[number];
|
|
4
4
|
export interface MissionControlActionRecordInput {
|
|
5
|
+
/** Reserved by a composing transactional writer; ordinary callers let the log allocate it. */
|
|
6
|
+
actionId?: string;
|
|
5
7
|
actionVerb: MissionControlVerb;
|
|
6
8
|
qitemId: string | null;
|
|
7
9
|
actorSession: string;
|
|
@@ -48,6 +50,8 @@ export declare class MissionControlActionLog {
|
|
|
48
50
|
* write-contract for the atomic 4-step handoff).
|
|
49
51
|
*/
|
|
50
52
|
record(input: MissionControlActionRecordInput): MissionControlActionEntry;
|
|
53
|
+
/** Exact all-history reconciliation; unrelated later actions cannot evict a committed operation. */
|
|
54
|
+
findOperation(qitemId: string, operation: string): MissionControlActionEntry | null;
|
|
51
55
|
listRecent(limit?: number): MissionControlActionEntry[];
|
|
52
56
|
listForQitem(qitemId: string, limit?: number): MissionControlActionEntry[];
|
|
53
57
|
listForActor(actorSession: string, limit?: number): MissionControlActionEntry[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mission-control-action-log.d.ts","sourceRoot":"","sources":["../../../src/domain/mission-control/mission-control-action-log.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAG3C,eAAO,MAAM,qBAAqB,mGAexB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,MAAM,WAAW,+BAA+B;IAC9C,UAAU,EAAE,kBAAkB,CAAC;IAC/B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC5C;0FACsF;IACtF,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,kBAAkB,CAAC;IAC/B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IA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I,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;IACzB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC3C,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAkBD,qBAAa,4BAA6B,SAAQ,KAAK;aAEnC,IAAI,EAAE,MAAM;aAEZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;gBAFjC,IAAI,EAAE,MAAM,EAC5B,OAAO,EAAE,MAAM,EACC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YAAA;CAKpD;AAaD,qBAAa,uBAAuB;IAEtB,OAAO,CAAC,QAAQ,CAAC,EAAE;IAD/B,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAU;gBACd,EAAE,EAAE,QAAQ,CAAC,QAAQ;IAIlD;;;;;OAKG;IACH,MAAM,CAAC,KAAK,EAAE,+BAA+B,GAAG,yBAAyB;IA2EzE,oGAAoG;IACpG,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,yBAAyB,GAAG,IAAI;IAOnF,UAAU,CAAC,KAAK,SAAK,GAAG,yBAAyB,EAAE;IAUnD,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,SAAK,GAAG,yBAAyB,EAAE;IAUtE,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,SAAK,GAAG,yBAAyB,EAAE;IAU3E,QAAQ,IAAI,MAAM;CAMnB"}
|
|
@@ -68,7 +68,7 @@ export class MissionControlActionLog {
|
|
|
68
68
|
if ((input.actionVerb === "hold" || input.actionVerb === "drop") && !input.reason) {
|
|
69
69
|
throw new MissionControlActionLogError("reason_required", `action_verb=${input.actionVerb} requires reason`, { actionVerb: input.actionVerb });
|
|
70
70
|
}
|
|
71
|
-
const actionId = ulid();
|
|
71
|
+
const actionId = input.actionId ?? ulid();
|
|
72
72
|
const baseCols = [
|
|
73
73
|
actionId,
|
|
74
74
|
input.actionVerb,
|
|
@@ -117,6 +117,13 @@ export class MissionControlActionLog {
|
|
|
117
117
|
identityProvenance: input.identityProvenance ?? null,
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
|
+
/** Exact all-history reconciliation; unrelated later actions cannot evict a committed operation. */
|
|
121
|
+
findOperation(qitemId, operation) {
|
|
122
|
+
const row = this.db.prepare(`SELECT * FROM mission_control_actions WHERE qitem_id = ?
|
|
123
|
+
AND json_valid(audit_notes_json) AND json_extract(audit_notes_json, '$.operation') = ? ORDER BY rowid LIMIT 1`)
|
|
124
|
+
.get(qitemId, operation);
|
|
125
|
+
return row ? rowToEntry(row) : null;
|
|
126
|
+
}
|
|
120
127
|
listRecent(limit = 50) {
|
|
121
128
|
const rows = this.db
|
|
122
129
|
.prepare(`SELECT * FROM mission_control_actions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mission-control-action-log.js","sourceRoot":"","sources":["../../../src/domain/mission-control/mission-control-action-log.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,EAAE;AACF,oEAAoE;AACpE,oEAAoE;AACpE,gEAAgE;AAChE,gEAAgE;AAChE,EAAE;AACF,oEAAoE;AACpE,yDAAyD;AAGzD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,SAAS;IACT,MAAM;IACN,OAAO;IACP,UAAU;IACV,MAAM;IACN,MAAM;IACN,SAAS;IACT,wEAAwE;IACxE,uEAAuE;IACvE,kEAAkE;IAClE,SAAS;IACT,8GAA8G;IAC9G,sDAAsD;IACtD,QAAQ;CACA,CAAC;
|
|
1
|
+
{"version":3,"file":"mission-control-action-log.js","sourceRoot":"","sources":["../../../src/domain/mission-control/mission-control-action-log.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,EAAE;AAC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AC,QAAQ;QACrB,YAAY,EAAE,GAAG,CAAC,aAAa;QAC/B,OAAO,EAAE,GAAG,CAAC,QAAQ;QACrB,WAAW,EAAE,GAAG,CAAC,iBAAiB;YAChC,CAAC,CAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAA6B;YAChE,CAAC,CAAC,IAAI;QACR,UAAU,EAAE,GAAG,CAAC,gBAAgB;YAC9B,CAAC,CAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAA6B;YAC/D,CAAC,CAAC,IAAI;QACR,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,UAAU,EAAE,GAAG,CAAC,UAAU;QAC1B,eAAe,EAAE,GAAG,CAAC,gBAAgB,KAAK,CAAC;QAC3C,YAAY,EAAE,GAAG,CAAC,aAAa;QAC/B,UAAU,EAAE,GAAG,CAAC,gBAAgB;YAC9B,CAAC,CAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAA6B;YAC/D,CAAC,CAAC,IAAI;QACR,kBAAkB,EAAE,GAAG,CAAC,mBAAmB,IAAI,IAAI;KACpD,CAAC;AACJ,CAAC"}
|
|
@@ -44,6 +44,13 @@ export interface MissionControlActionInput {
|
|
|
44
44
|
/** #2446, opt-in: the `decisionRevision` the caller read. A settling act then runs only on that decision; omitted, the
|
|
45
45
|
* act and its result are exactly as before. An `operationId` in `auditNotes` lets a retry be answered from the record. */
|
|
46
46
|
expectedRevision?: string;
|
|
47
|
+
/** In-process app submission composition, including reconciliation across later actions. Never accepted from legacy
|
|
48
|
+
* route input. Hooks run synchronously inside the owning mutation transaction; the immutable audit retains the receipt. */
|
|
49
|
+
appSubmission?: {
|
|
50
|
+
checkpoint: (item: QueueItem) => void;
|
|
51
|
+
verify: () => void;
|
|
52
|
+
finalize: (result: MissionControlActionResult) => Record<string, unknown>;
|
|
53
|
+
};
|
|
47
54
|
/**
|
|
48
55
|
* For handoff: opt-in best-effort wake. Default true (PL-004 Phase A R1
|
|
49
56
|
* pattern: durable + waking by default; operators opt out for cold queues).
|
|
@@ -152,5 +159,8 @@ export declare class MissionControlWriteContract {
|
|
|
152
159
|
private asActor;
|
|
153
160
|
private requireMutableQitem;
|
|
154
161
|
}
|
|
162
|
+
/** One logical operation (#2446): the caller's operationId with the verb, who sent it and what it carries, so a retry
|
|
163
|
+
* matches only itself, never another verb or payload sent under the same ID. */
|
|
164
|
+
export declare function operationFingerprint(input: MissionControlActionInput): string;
|
|
155
165
|
export {};
|
|
156
166
|
//# sourceMappingURL=mission-control-write-contract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mission-control-write-contract.d.ts","sourceRoot":"","sources":["../../../src/domain/mission-control/mission-control-write-contract.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mission-control-write-contract.d.ts","sourceRoot":"","sources":["../../../src/domain/mission-control/mission-control-write-contract.ts"],"names":[],"mappings":"AA4CA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAA0D,KAAK,eAAe,EAAE,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGtI,OAAO,EACL,uBAAuB,EAEvB,KAAK,kBAAkB,EACxB,MAAM,iCAAiC,CAAC;AAKzC;oCACoC;AACpC,eAAO,MAAM,oBAAoB,eAAqB,CAAC;AAIvD,qBAAa,gCAAiC,SAAQ,KAAK;aAEvC,IAAI,EAAE,MAAM;aAEZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;gBAFjC,IAAI,EAAE,MAAM,EAC5B,OAAO,EAAE,MAAM,EACC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YAAA;CAKpD;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,kBAAkB,CAAC;IACzB,OAAO,EAAE,MAAM,CAA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OAAO,CAAC,OAAO;IAsBf,OAAO,CAAC,mBAAmB;CAkB5B;AAUD;iFACiF;AACjF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,MAAM,CAI7E"}
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
// handoff → state="handed-off", closure_reason="handed_off_to",
|
|
39
39
|
// closure_target+handed_off_to=<destination>;
|
|
40
40
|
// creates new qitem at destination (4-step canonical)
|
|
41
|
+
import { ulid } from "ulid";
|
|
41
42
|
import { createHash } from "node:crypto";
|
|
42
43
|
import { isTypedGateBlocker, mcOperationTag, UNATTRIBUTED_ACTOR } from "../queue-repository.js";
|
|
43
44
|
import { askBackRoute, terminalAnswerMeaning } from "../receiver-context.js";
|
|
@@ -92,7 +93,11 @@ export class MissionControlWriteContract {
|
|
|
92
93
|
const item = this.queueRepo.getById(input.qitemId);
|
|
93
94
|
const current = item ? this.queueRepo.decisionRevision(item) : null;
|
|
94
95
|
if (item && current !== input.expectedRevision) {
|
|
95
|
-
|
|
96
|
+
// Stable app submissions own historical receipts. Legacy callers reconcile only the latest action: a later
|
|
97
|
+
// person's answer must still invalidate an old partial submission, even when its operation remains in history.
|
|
98
|
+
const last = input.appSubmission && operation
|
|
99
|
+
? this.actionLog.findOperation(input.qitemId, operation)
|
|
100
|
+
: this.actionLog.listForQitem(input.qitemId, 1)[0];
|
|
96
101
|
// The caller's own committed operation retried after an uncertain result: answered from its record, nothing written.
|
|
97
102
|
if (operation && last?.auditNotes?.operation === operation) {
|
|
98
103
|
return { actionId: last.actionId, verb: input.verb, qitemId: input.qitemId, closedQitem: item, createdQitemId: null,
|
|
@@ -500,8 +505,34 @@ export class MissionControlWriteContract {
|
|
|
500
505
|
let reply;
|
|
501
506
|
let wrote = false; // whether this call changed the ask before the return below awaits
|
|
502
507
|
if (chose) {
|
|
503
|
-
|
|
504
|
-
|
|
508
|
+
// A partial app choice has no asynchronous return seam: choice + immutable receipt + audit + events commit
|
|
509
|
+
// under the same envelope. An injected audit failure rolls back the choice too.
|
|
510
|
+
if (input.appSubmission && unansweredQuestions(questions, { ...(ask.humanAnswers ?? {}), [input.questionId ?? ""]: input.optionId ?? "" }).length > 0) {
|
|
511
|
+
return this.eventBus.withNotifyEnvelope(register => {
|
|
512
|
+
input.appSubmission.verify();
|
|
513
|
+
const recorded = this.queueRepo.recordHumanAnswer({ qitemId: input.qitemId, actorSession: input.actorSession,
|
|
514
|
+
questionId: input.questionId ?? "", optionId: input.optionId ?? "", primaryUser });
|
|
515
|
+
if (recorded.status !== "recorded")
|
|
516
|
+
throw new MissionControlWriteContractError("answer_not_recorded", `The answer wasn't recorded: ${recorded.reason}.`);
|
|
517
|
+
const [just] = formatHumanAnswers(recorded.questions.filter(q => q.id === input.questionId), recorded.answers);
|
|
518
|
+
return this.recordAnswer(input, before, just ?? `answered ${input.questionId}`, {
|
|
519
|
+
outcome: "recorded", unanswered: unansweredQuestions(recorded.questions, recorded.answers).map(q => q.question),
|
|
520
|
+
}, null, undefined, register);
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
// Only an app submission verifies, checkpoints and commits under one transaction and envelope; the ordinary
|
|
524
|
+
// path records directly, so the queue notifies after its own commit, as before.
|
|
525
|
+
const recorded = input.appSubmission
|
|
526
|
+
? this.eventBus.withNotifyEnvelope(this.db.transaction(() => {
|
|
527
|
+
input.appSubmission.verify();
|
|
528
|
+
const result = this.queueRepo.recordHumanAnswer({ qitemId: input.qitemId, actorSession: input.actorSession,
|
|
529
|
+
questionId: input.questionId ?? "", optionId: input.optionId ?? "", primaryUser });
|
|
530
|
+
if (result.status === "recorded")
|
|
531
|
+
input.appSubmission.checkpoint(this.queueRepo.getById(input.qitemId));
|
|
532
|
+
return result;
|
|
533
|
+
}))
|
|
534
|
+
: this.queueRepo.recordHumanAnswer({ qitemId: input.qitemId, actorSession: input.actorSession,
|
|
535
|
+
questionId: input.questionId ?? "", optionId: input.optionId ?? "", primaryUser });
|
|
505
536
|
if (recorded.status !== "recorded") {
|
|
506
537
|
throw new MissionControlWriteContractError("answer_not_recorded", `The answer wasn't recorded: ${recorded.reason}.`, { qitemId: input.qitemId, reason: recorded.reason });
|
|
507
538
|
}
|
|
@@ -545,6 +576,7 @@ export class MissionControlWriteContract {
|
|
|
545
576
|
...(ask.tags ?? []).filter((t) => /^(project|mission|slice):/.test(t)),
|
|
546
577
|
...(operation ? [mcOperationTag(operation)] : []),
|
|
547
578
|
],
|
|
579
|
+
...(input.appSubmission ? { verifyBeforeCreate: () => input.appSubmission.verify() } : {}),
|
|
548
580
|
inboundReplyTo: input.qitemId, ...(input.notify === false ? { nudge: false } : {}),
|
|
549
581
|
});
|
|
550
582
|
}
|
|
@@ -553,6 +585,7 @@ export class MissionControlWriteContract {
|
|
|
553
585
|
+ (chose || resume ? "Its recorded answers stay on the row; open it again to send them." : "Nothing was recorded; answer again once that's fixed."), { qitemId: input.qitemId });
|
|
554
586
|
}
|
|
555
587
|
const replyId = returned.qitemId;
|
|
588
|
+
input.appSubmission?.verify();
|
|
556
589
|
// Two people answering at once: one answer returns, and the other is told whose it was.
|
|
557
590
|
if (replyId !== input.qitemId && returned.sourceSession !== input.actorSession)
|
|
558
591
|
this.answeredByAnother(input, returned, primaryUser);
|
|
@@ -587,7 +620,7 @@ export class MissionControlWriteContract {
|
|
|
587
620
|
throw new MissionControlWriteContractError("qitem_already_terminal", `${other.sourceSession} already answered qitem ${input.qitemId}; their answer went to ${other.destinationSession} as ${other.qitemId}. ${input.actorSession}'s answer wasn't recorded or sent.`, { qitemId: input.qitemId, answeredBy: other.sourceSession, replyQitemId: other.qitemId });
|
|
588
621
|
}
|
|
589
622
|
/** Close a pending ask (when requested) and record its audit row and event in one atomic transaction. */
|
|
590
|
-
recordAnswer(input, before, reason, answer, createdQitemId = null, closePending) {
|
|
623
|
+
recordAnswer(input, before, reason, answer, createdQitemId = null, closePending, outerRegister) {
|
|
591
624
|
const evaluatedAt = this.now().toISOString();
|
|
592
625
|
// A runner's permission ask approved or denied from the Feed or Steering goes through the answer path, and the
|
|
593
626
|
// audit keeps what the person did: their verb, and their reason when they gave one.
|
|
@@ -595,8 +628,14 @@ export class MissionControlWriteContract {
|
|
|
595
628
|
const auditReason = actionVerb !== "answer" && input.reason ? input.reason : reason;
|
|
596
629
|
let after = null;
|
|
597
630
|
let actionEntry = null;
|
|
631
|
+
let appResult = null;
|
|
632
|
+
// The owner's final answer and message, computed once before the receipt is finalized: the immutable app receipt and the
|
|
633
|
+
// ordinary return carry the same words, handoff or kept alike.
|
|
634
|
+
let finalAnswer = answer;
|
|
598
635
|
try {
|
|
599
|
-
|
|
636
|
+
const persist = (register) => {
|
|
637
|
+
if (!outerRegister)
|
|
638
|
+
input.appSubmission?.verify();
|
|
600
639
|
if (closePending) {
|
|
601
640
|
const closed = this.queueRepo.resolveDirectHumanReply({
|
|
602
641
|
qitemId: input.qitemId,
|
|
@@ -609,7 +648,19 @@ export class MissionControlWriteContract {
|
|
|
609
648
|
}
|
|
610
649
|
}
|
|
611
650
|
after = this.queueRepo.getById(input.qitemId);
|
|
651
|
+
// A runner's permission request isn't closed by an answer: it's handed to the receiving agent, or kept. Say which.
|
|
652
|
+
const runnerNotice = !answer.message && after && runnerPermissionOrigin(after) ? runnerAnswerNotice(after) : undefined;
|
|
653
|
+
if (runnerNotice)
|
|
654
|
+
finalAnswer = { ...answer, message: runnerNotice };
|
|
655
|
+
const actionId = ulid();
|
|
656
|
+
appResult = {
|
|
657
|
+
actionId, verb: actionVerb, qitemId: input.qitemId, closedQitem: after, createdQitemId,
|
|
658
|
+
notifyAttempted: false, notifyResult: null, auditedAt: evaluatedAt, answer: finalAnswer,
|
|
659
|
+
...(input.expectedRevision && after ? { decisionRevision: this.queueRepo.decisionRevision(after) } : {}),
|
|
660
|
+
};
|
|
661
|
+
const appReceipt = input.appSubmission?.finalize(appResult);
|
|
612
662
|
actionEntry = this.actionLog.record({
|
|
663
|
+
actionId,
|
|
613
664
|
actionVerb,
|
|
614
665
|
qitemId: input.qitemId,
|
|
615
666
|
actorSession: input.actorSession,
|
|
@@ -617,7 +668,7 @@ export class MissionControlWriteContract {
|
|
|
617
668
|
beforeState: before,
|
|
618
669
|
afterState: after ? snapshotQitem(after) : null,
|
|
619
670
|
reason: auditReason,
|
|
620
|
-
auditNotes: input.auditNotes ?? null,
|
|
671
|
+
auditNotes: appReceipt ? { ...input.auditNotes, appReceipt } : input.auditNotes ?? null,
|
|
621
672
|
identityProvenance: input.identityProvenance ?? null,
|
|
622
673
|
});
|
|
623
674
|
register(this.eventBus.persistWithinTransaction({
|
|
@@ -627,7 +678,11 @@ export class MissionControlWriteContract {
|
|
|
627
678
|
qitemId: input.qitemId,
|
|
628
679
|
actorSession: input.actorSession,
|
|
629
680
|
}));
|
|
630
|
-
}
|
|
681
|
+
};
|
|
682
|
+
if (outerRegister)
|
|
683
|
+
persist(outerRegister);
|
|
684
|
+
else
|
|
685
|
+
this.eventBus.withNotifyEnvelope(persist);
|
|
631
686
|
}
|
|
632
687
|
catch (err) {
|
|
633
688
|
if (err instanceof MissionControlActionLogError) {
|
|
@@ -635,9 +690,6 @@ export class MissionControlWriteContract {
|
|
|
635
690
|
}
|
|
636
691
|
throw err;
|
|
637
692
|
}
|
|
638
|
-
// A runner's permission request isn't closed by an answer: it's handed to the receiving agent, or kept. Say which.
|
|
639
|
-
const final = after;
|
|
640
|
-
const runnerNotice = !answer.message && final && runnerPermissionOrigin(final) ? runnerAnswerNotice(final) : undefined;
|
|
641
693
|
return {
|
|
642
694
|
actionId: actionEntry.actionId,
|
|
643
695
|
verb: actionVerb,
|
|
@@ -647,7 +699,7 @@ export class MissionControlWriteContract {
|
|
|
647
699
|
notifyAttempted: false,
|
|
648
700
|
notifyResult: null,
|
|
649
701
|
auditedAt: evaluatedAt,
|
|
650
|
-
answer:
|
|
702
|
+
answer: finalAnswer,
|
|
651
703
|
};
|
|
652
704
|
}
|
|
653
705
|
/**
|
|
@@ -691,7 +743,7 @@ export class MissionControlWriteContract {
|
|
|
691
743
|
}
|
|
692
744
|
/** One logical operation (#2446): the caller's operationId with the verb, who sent it and what it carries, so a retry
|
|
693
745
|
* matches only itself, never another verb or payload sent under the same ID. */
|
|
694
|
-
function operationFingerprint(input) {
|
|
746
|
+
export function operationFingerprint(input) {
|
|
695
747
|
const sent = [input.auditNotes?.operationId, input.verb, input.actorSession, input.authority ?? null, input.questionId ?? null,
|
|
696
748
|
input.optionId ?? null, input.decision ?? null, input.reason ?? null, input.destinationSession ?? null, input.body ?? null, input.annotation ?? null];
|
|
697
749
|
return createHash("sha256").update(JSON.stringify(sent)).digest("hex").slice(0, 24);
|