@openrig/cli 0.6.4-rc.1 → 0.6.5
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 +384 -0
- package/daemon/assets/onboarding/02-self-and-competent-action.md +5 -0
- package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +100 -20
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +201 -132
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/reference/SKILL-v1.md +143 -0
- package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +11 -11
- package/daemon/assets/plugins/openrig-core/skills/loading-addressable-markdown/scripts/resolve-markdown.mjs +2 -1
- package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +24 -0
- package/daemon/assets/plugins/openrig-core/skills/mission-slice-sop/SKILL.md +2 -2
- package/daemon/assets/plugins/openrig-core/skills/openrig-operating-model/SKILL.md +17 -0
- package/daemon/assets/plugins/openrig-core/skills/openrig-operating-model/scripts/compose.py +2 -2
- package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +6 -0
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +45 -19
- package/daemon/assets/plugins/openrig-core/skills/orienting-to-an-inherited-seat/SKILL.md +5 -7
- package/daemon/assets/plugins/openrig-core/skills/queue-handoff/SKILL.md +1 -19
- package/daemon/assets/plugins/openrig-core/skills/refocusing/SKILL.md +3 -0
- package/daemon/assets/plugins/openrig-core/skills/refocusing/scripts/trace-to-root.py +56 -4
- package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +0 -5
- package/daemon/assets/plugins/openrig-core/skills/session-compaction-and-restore/SKILL.md +5 -6
- package/daemon/context-packs/help/help.md +9 -4
- 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 +25 -12
- package/daemon/context-packs/reference/getting-started.md +7 -2
- package/daemon/context-packs/reference/instance-layout.md +11 -0
- package/daemon/context-packs/reference/manifest.yaml +1 -1
- package/daemon/context-packs/reference/rig-spec.md +32 -5
- 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/SKILL.md +201 -132
- package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +5 -3
- package/daemon/context-packs/skills/claude-compaction-restore/reference/SKILL-v1.md +143 -0
- 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 +24 -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/SKILL.md +6 -0
- 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/SKILL.md +24 -3
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +3 -3
- package/daemon/context-packs/skills/core/watchdog/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/SKILL.md +11 -11
- 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/loading-addressable-markdown/scripts/resolve-markdown.mjs +2 -1
- package/daemon/context-packs/skills/mission-slice-sop/SKILL.md +2 -2
- package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-operating-model/SKILL.md +17 -0
- package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-operating-model/scripts/compose.py +2 -2
- package/daemon/context-packs/skills/openrig-user/SKILL.md +45 -19
- package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/SKILL.md +5 -7
- 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/SKILL.md +1 -19
- package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/SKILL.md +3 -0
- package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/scripts/trace-to-root.py +56 -4
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/seat-continuity-and-handover/SKILL.md +0 -5
- package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
- package/daemon/context-packs/skills/session-compaction-and-restore/SKILL.md +5 -6
- 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 +17 -3
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +157 -53
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts +7 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +39 -8
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-resume.d.ts +7 -1
- package/daemon/dist/adapters/codex-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-resume.js +14 -6
- package/daemon/dist/adapters/codex-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +8 -0
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +34 -12
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/compose-services-adapter.d.ts +2 -1
- package/daemon/dist/adapters/compose-services-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/compose-services-adapter.js +5 -2
- package/daemon/dist/adapters/compose-services-adapter.js.map +1 -1
- package/daemon/dist/adapters/daemon-url.d.ts +7 -0
- package/daemon/dist/adapters/daemon-url.d.ts.map +1 -0
- package/daemon/dist/adapters/daemon-url.js +12 -0
- package/daemon/dist/adapters/daemon-url.js.map +1 -0
- package/daemon/dist/adapters/omp-resume.d.ts +6 -0
- package/daemon/dist/adapters/omp-resume.d.ts.map +1 -0
- package/daemon/dist/adapters/omp-resume.js +6 -0
- package/daemon/dist/adapters/omp-resume.js.map +1 -0
- package/daemon/dist/adapters/omp-runtime-adapter.d.ts +10 -0
- package/daemon/dist/adapters/omp-runtime-adapter.d.ts.map +1 -0
- package/daemon/dist/adapters/omp-runtime-adapter.js +16 -0
- package/daemon/dist/adapters/omp-runtime-adapter.js.map +1 -0
- package/daemon/dist/adapters/pi-resume.d.ts +4 -0
- package/daemon/dist/adapters/pi-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-resume.js +20 -18
- package/daemon/dist/adapters/pi-resume.js.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.d.ts +14 -2
- package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.js +62 -5
- package/daemon/dist/adapters/pi-runner-protocol.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +49 -5
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +362 -67
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts +3 -2
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.js +49 -32
- package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/preflight-exec.d.ts +11 -0
- package/daemon/dist/adapters/preflight-exec.d.ts.map +1 -0
- package/daemon/dist/adapters/preflight-exec.js +52 -0
- package/daemon/dist/adapters/preflight-exec.js.map +1 -0
- package/daemon/dist/adapters/stub-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/stub-runner.js +3 -1
- package/daemon/dist/adapters/stub-runner.js.map +1 -1
- package/daemon/dist/adapters/stub-runtime-adapter.js +1 -1
- package/daemon/dist/adapters/stub-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +47 -5
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +305 -54
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/daemon-shutdown.d.ts +19 -0
- package/daemon/dist/daemon-shutdown.d.ts.map +1 -1
- package/daemon/dist/daemon-shutdown.js +81 -0
- package/daemon/dist/daemon-shutdown.js.map +1 -1
- package/daemon/dist/db/all-migrations.d.ts +1 -1
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +10 -2
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/090_human_reply_to.d.ts +3 -0
- package/daemon/dist/db/migrations/090_human_reply_to.d.ts.map +1 -0
- package/daemon/dist/db/migrations/090_human_reply_to.js +7 -0
- package/daemon/dist/db/migrations/090_human_reply_to.js.map +1 -0
- package/daemon/dist/db/migrations/091_human_questions.d.ts +3 -0
- package/daemon/dist/db/migrations/091_human_questions.d.ts.map +1 -0
- package/daemon/dist/db/migrations/091_human_questions.js +9 -0
- package/daemon/dist/db/migrations/091_human_questions.js.map +1 -0
- package/daemon/dist/db/migrations/092_node_effort.d.ts +3 -0
- package/daemon/dist/db/migrations/092_node_effort.d.ts.map +1 -0
- package/daemon/dist/db/migrations/092_node_effort.js +8 -0
- package/daemon/dist/db/migrations/092_node_effort.js.map +1 -0
- package/daemon/dist/db/migrations/094_usage_samples_latest_indexes.d.ts +3 -0
- package/daemon/dist/db/migrations/094_usage_samples_latest_indexes.d.ts.map +1 -0
- package/daemon/dist/db/migrations/094_usage_samples_latest_indexes.js +12 -0
- package/daemon/dist/db/migrations/094_usage_samples_latest_indexes.js.map +1 -0
- package/daemon/dist/domain/activity-endpoint.d.ts.map +1 -1
- package/daemon/dist/domain/activity-endpoint.js +3 -1
- package/daemon/dist/domain/activity-endpoint.js.map +1 -1
- package/daemon/dist/domain/agent-activity-store.d.ts +3 -1
- package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
- package/daemon/dist/domain/agent-activity-store.js +13 -3
- package/daemon/dist/domain/agent-activity-store.js.map +1 -1
- package/daemon/dist/domain/agent-images/agent-image-library-service.d.ts.map +1 -1
- package/daemon/dist/domain/agent-images/agent-image-library-service.js +76 -56
- package/daemon/dist/domain/agent-images/agent-image-library-service.js.map +1 -1
- package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
- package/daemon/dist/domain/agent-manifest.js +24 -3
- package/daemon/dist/domain/agent-manifest.js.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.js +3 -2
- package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
- package/daemon/dist/domain/bundle-archive.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-archive.js +25 -5
- package/daemon/dist/domain/bundle-archive.js.map +1 -1
- package/daemon/dist/domain/chat-repository.d.ts.map +1 -1
- package/daemon/dist/domain/chat-repository.js +3 -1
- package/daemon/dist/domain/chat-repository.js.map +1 -1
- package/daemon/dist/domain/checkpoint-store.d.ts.map +1 -1
- package/daemon/dist/domain/checkpoint-store.js +2 -2
- package/daemon/dist/domain/checkpoint-store.js.map +1 -1
- package/daemon/dist/domain/claim-service.d.ts +7 -0
- package/daemon/dist/domain/claim-service.d.ts.map +1 -1
- package/daemon/dist/domain/claim-service.js +6 -2
- package/daemon/dist/domain/claim-service.js.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +35 -12
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +256 -128
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/claude-managed-launch.d.ts +13 -0
- package/daemon/dist/domain/claude-managed-launch.d.ts.map +1 -1
- package/daemon/dist/domain/claude-managed-launch.js +31 -4
- package/daemon/dist/domain/claude-managed-launch.js.map +1 -1
- package/daemon/dist/domain/codex-daemon-support.d.ts +1 -1
- package/daemon/dist/domain/codex-daemon-support.d.ts.map +1 -1
- package/daemon/dist/domain/codex-daemon-support.js +2 -2
- package/daemon/dist/domain/codex-daemon-support.js.map +1 -1
- package/daemon/dist/domain/codex-network-default.d.ts +42 -0
- package/daemon/dist/domain/codex-network-default.d.ts.map +1 -0
- package/daemon/dist/domain/codex-network-default.js +230 -0
- package/daemon/dist/domain/codex-network-default.js.map +1 -0
- package/daemon/dist/domain/codex-profile-preflight.d.ts +1 -1
- package/daemon/dist/domain/codex-profile-preflight.d.ts.map +1 -1
- package/daemon/dist/domain/codex-profile-preflight.js +3 -3
- package/daemon/dist/domain/codex-profile-preflight.js.map +1 -1
- package/daemon/dist/domain/codex-thread-id.d.ts +4 -2
- package/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
- package/daemon/dist/domain/codex-thread-id.js +10 -6
- package/daemon/dist/domain/codex-thread-id.js.map +1 -1
- package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/context-monitor.js +2 -1
- package/daemon/dist/domain/context-monitor.js.map +1 -1
- package/daemon/dist/domain/context-packs/context-pack-library-service.d.ts.map +1 -1
- package/daemon/dist/domain/context-packs/context-pack-library-service.js +13 -2
- package/daemon/dist/domain/context-packs/context-pack-library-service.js.map +1 -1
- package/daemon/dist/domain/context-packs/profile-composer.d.ts +5 -0
- package/daemon/dist/domain/context-packs/profile-composer.d.ts.map +1 -1
- package/daemon/dist/domain/context-packs/profile-composer.js +30 -15
- package/daemon/dist/domain/context-packs/profile-composer.js.map +1 -1
- package/daemon/dist/domain/context-packs/profile-source-resolver.d.ts +10 -0
- package/daemon/dist/domain/context-packs/profile-source-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/context-packs/profile-source-resolver.js +43 -8
- package/daemon/dist/domain/context-packs/profile-source-resolver.js.map +1 -1
- package/daemon/dist/domain/context-packs/seat-recap-store.d.ts.map +1 -1
- package/daemon/dist/domain/context-packs/seat-recap-store.js +73 -16
- package/daemon/dist/domain/context-packs/seat-recap-store.js.map +1 -1
- package/daemon/dist/domain/context-usage-store.d.ts +3 -0
- package/daemon/dist/domain/context-usage-store.d.ts.map +1 -1
- package/daemon/dist/domain/context-usage-store.js +4 -2
- package/daemon/dist/domain/context-usage-store.js.map +1 -1
- package/daemon/dist/domain/crash-cart-detect.d.ts.map +1 -1
- package/daemon/dist/domain/crash-cart-detect.js +2 -1
- package/daemon/dist/domain/crash-cart-detect.js.map +1 -1
- package/daemon/dist/domain/crash-cart-discovery.d.ts.map +1 -1
- package/daemon/dist/domain/crash-cart-discovery.js +4 -2
- package/daemon/dist/domain/crash-cart-discovery.js.map +1 -1
- package/daemon/dist/domain/current-work.d.ts +17 -0
- package/daemon/dist/domain/current-work.d.ts.map +1 -1
- package/daemon/dist/domain/current-work.js +46 -0
- package/daemon/dist/domain/current-work.js.map +1 -1
- package/daemon/dist/domain/cwd-resolution.js +1 -1
- package/daemon/dist/domain/cwd-resolution.js.map +1 -1
- package/daemon/dist/domain/daemon-url.d.ts +7 -0
- package/daemon/dist/domain/daemon-url.d.ts.map +1 -0
- package/daemon/dist/domain/daemon-url.js +12 -0
- package/daemon/dist/domain/daemon-url.js.map +1 -0
- package/daemon/dist/domain/discovery-types.d.ts +1 -1
- package/daemon/dist/domain/discovery-types.d.ts.map +1 -1
- package/daemon/dist/domain/event-bus.d.ts +1 -0
- package/daemon/dist/domain/event-bus.d.ts.map +1 -1
- package/daemon/dist/domain/event-bus.js +18 -7
- package/daemon/dist/domain/event-bus.js.map +1 -1
- package/daemon/dist/domain/execution-view.d.ts +3 -3
- package/daemon/dist/domain/execution-view.d.ts.map +1 -1
- package/daemon/dist/domain/execution-view.js +116 -93
- package/daemon/dist/domain/execution-view.js.map +1 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.d.ts +9 -7
- package/daemon/dist/domain/gateway/operator-delivery-engine.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.js +38 -16
- package/daemon/dist/domain/gateway/operator-delivery-engine.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts +71 -3
- package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.js +145 -11
- package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/manifest.js +1 -1
- package/daemon/dist/domain/gateway/slack/manifest.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.d.ts +17 -0
- package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.js +77 -3
- package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/outbound-driver.d.ts +3 -0
- package/daemon/dist/domain/gateway/slack/outbound-driver.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/outbound-driver.js +2 -0
- package/daemon/dist/domain/gateway/slack/outbound-driver.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts +3 -0
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.js +15 -5
- package/daemon/dist/domain/gateway/slack/queue-access.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/secrets.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/secrets.js +5 -4
- package/daemon/dist/domain/gateway/slack/secrets.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts +16 -10
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.js +91 -23
- package/daemon/dist/domain/gateway/slack/slack-api.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +33 -10
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.js +107 -26
- package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js +114 -27
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/socket-inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/socket-inbound.js +3 -0
- package/daemon/dist/domain/gateway/slack/socket-inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/state-store.d.ts +3 -0
- package/daemon/dist/domain/gateway/slack/state-store.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/state-store.js +18 -0
- package/daemon/dist/domain/gateway/slack/state-store.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-routing.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-routing.js +7 -2
- package/daemon/dist/domain/gateway/slack/thread-routing.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-seat-map.d.ts +3 -0
- package/daemon/dist/domain/gateway/slack/thread-seat-map.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-seat-map.js +14 -2
- package/daemon/dist/domain/gateway/slack/thread-seat-map.js.map +1 -1
- package/daemon/dist/domain/graph-projection.d.ts.map +1 -1
- package/daemon/dist/domain/graph-projection.js +1 -0
- package/daemon/dist/domain/graph-projection.js.map +1 -1
- package/daemon/dist/domain/health-checkpoints.d.ts +2 -0
- package/daemon/dist/domain/health-checkpoints.d.ts.map +1 -1
- package/daemon/dist/domain/health-checkpoints.js +2 -0
- package/daemon/dist/domain/health-checkpoints.js.map +1 -1
- package/daemon/dist/domain/health-detectors.d.ts +32 -1
- package/daemon/dist/domain/health-detectors.d.ts.map +1 -1
- package/daemon/dist/domain/health-detectors.js +40 -9
- package/daemon/dist/domain/health-detectors.js.map +1 -1
- package/daemon/dist/domain/health-diagnosis.d.ts +3 -1
- package/daemon/dist/domain/health-diagnosis.d.ts.map +1 -1
- package/daemon/dist/domain/health-diagnosis.js +6 -3
- package/daemon/dist/domain/health-diagnosis.js.map +1 -1
- package/daemon/dist/domain/health-passive-ceremony.d.ts +5 -1
- package/daemon/dist/domain/health-passive-ceremony.d.ts.map +1 -1
- package/daemon/dist/domain/health-passive-ceremony.js +20 -4
- package/daemon/dist/domain/health-passive-ceremony.js.map +1 -1
- package/daemon/dist/domain/hosts/remote-daemon-http.d.ts +3 -1
- package/daemon/dist/domain/hosts/remote-daemon-http.d.ts.map +1 -1
- package/daemon/dist/domain/hosts/remote-daemon-http.js +10 -3
- package/daemon/dist/domain/hosts/remote-daemon-http.js.map +1 -1
- package/daemon/dist/domain/human-questions.d.ts +41 -0
- package/daemon/dist/domain/human-questions.d.ts.map +1 -0
- package/daemon/dist/domain/human-questions.js +81 -0
- package/daemon/dist/domain/human-questions.js.map +1 -0
- package/daemon/dist/domain/markdown-address.js +1 -1
- package/daemon/dist/domain/markdown-address.js.map +1 -1
- package/daemon/dist/domain/mission-control/audit-browse.d.ts +5 -0
- package/daemon/dist/domain/mission-control/audit-browse.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/audit-browse.js +11 -1
- package/daemon/dist/domain/mission-control/audit-browse.js.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.d.ts +25 -63
- package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.js +34 -100
- package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.js.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-read-layer.d.ts +1 -0
- package/daemon/dist/domain/mission-control/mission-control-read-layer.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-read-layer.js +6 -3
- package/daemon/dist/domain/mission-control/mission-control-read-layer.js.map +1 -1
- package/daemon/dist/domain/mission-control/notification-adapter-ntfy.d.ts +5 -0
- package/daemon/dist/domain/mission-control/notification-adapter-ntfy.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/notification-adapter-ntfy.js +33 -2
- package/daemon/dist/domain/mission-control/notification-adapter-ntfy.js.map +1 -1
- package/daemon/dist/domain/mission-control/notification-adapter-types.d.ts +2 -0
- package/daemon/dist/domain/mission-control/notification-adapter-types.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/notification-adapter-webhook.d.ts +4 -0
- package/daemon/dist/domain/mission-control/notification-adapter-webhook.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/notification-adapter-webhook.js +33 -2
- package/daemon/dist/domain/mission-control/notification-adapter-webhook.js.map +1 -1
- package/daemon/dist/domain/mission-control/outbound-url-validator.d.ts +27 -0
- package/daemon/dist/domain/mission-control/outbound-url-validator.d.ts.map +1 -0
- package/daemon/dist/domain/mission-control/outbound-url-validator.js +60 -0
- package/daemon/dist/domain/mission-control/outbound-url-validator.js.map +1 -0
- package/daemon/dist/domain/native-process-lineage.d.ts +9 -2
- package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-lineage.js +104 -11
- package/daemon/dist/domain/native-process-lineage.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe.d.ts +5 -1
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +17 -4
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +91 -44
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +4 -0
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +4 -1
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/periodic-snapshot-scheduler.d.ts +1 -0
- package/daemon/dist/domain/periodic-snapshot-scheduler.d.ts.map +1 -1
- package/daemon/dist/domain/periodic-snapshot-scheduler.js +25 -0
- package/daemon/dist/domain/periodic-snapshot-scheduler.js.map +1 -1
- package/daemon/dist/domain/permission-drift.d.ts +1 -0
- package/daemon/dist/domain/permission-drift.d.ts.map +1 -1
- package/daemon/dist/domain/permission-drift.js +13 -1
- package/daemon/dist/domain/permission-drift.js.map +1 -1
- package/daemon/dist/domain/plugin-discovery-service.d.ts +5 -6
- package/daemon/dist/domain/plugin-discovery-service.d.ts.map +1 -1
- package/daemon/dist/domain/plugin-discovery-service.js +14 -8
- package/daemon/dist/domain/plugin-discovery-service.js.map +1 -1
- package/daemon/dist/domain/pod-bundle-assembler.d.ts +6 -2
- package/daemon/dist/domain/pod-bundle-assembler.d.ts.map +1 -1
- package/daemon/dist/domain/pod-bundle-assembler.js +58 -15
- package/daemon/dist/domain/pod-bundle-assembler.js.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts +6 -0
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.js +11 -0
- package/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -1
- package/daemon/dist/domain/profile-resolver.d.ts +1 -0
- package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/profile-resolver.js +7 -0
- package/daemon/dist/domain/profile-resolver.js.map +1 -1
- package/daemon/dist/domain/project-lifecycle-compiler.d.ts.map +1 -1
- package/daemon/dist/domain/project-lifecycle-compiler.js +10 -2
- package/daemon/dist/domain/project-lifecycle-compiler.js.map +1 -1
- package/daemon/dist/domain/projection-planner.d.ts.map +1 -1
- package/daemon/dist/domain/projection-planner.js +14 -5
- package/daemon/dist/domain/projection-planner.js.map +1 -1
- package/daemon/dist/domain/proof/judgments.d.ts +3 -0
- package/daemon/dist/domain/proof/judgments.d.ts.map +1 -1
- package/daemon/dist/domain/proof/judgments.js +13 -8
- package/daemon/dist/domain/proof/judgments.js.map +1 -1
- package/daemon/dist/domain/proof/source-watch.d.ts.map +1 -1
- package/daemon/dist/domain/proof/source-watch.js +45 -27
- package/daemon/dist/domain/proof/source-watch.js.map +1 -1
- package/daemon/dist/domain/provider/host-usage-rollup.js +9 -5
- package/daemon/dist/domain/provider/host-usage-rollup.js.map +1 -1
- package/daemon/dist/domain/ps-projection.d.ts +22 -3
- package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
- package/daemon/dist/domain/ps-projection.js +50 -11
- package/daemon/dist/domain/ps-projection.js.map +1 -1
- package/daemon/dist/domain/queue-recovery.d.ts.map +1 -1
- package/daemon/dist/domain/queue-recovery.js +7 -1
- package/daemon/dist/domain/queue-recovery.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +98 -6
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +301 -33
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts +3 -0
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +111 -26
- package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.d.ts +8 -7
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +278 -19
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/queue-wake-repository.d.ts +10 -9
- package/daemon/dist/domain/queue-wake-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-repository.js +31 -11
- package/daemon/dist/domain/queue-wake-repository.js.map +1 -1
- package/daemon/dist/domain/reply-to-choice.d.ts +26 -0
- package/daemon/dist/domain/reply-to-choice.d.ts.map +1 -0
- package/daemon/dist/domain/reply-to-choice.js +45 -0
- package/daemon/dist/domain/reply-to-choice.js.map +1 -0
- package/daemon/dist/domain/restore-check-service.d.ts +27 -8
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js +202 -126
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +3 -2
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +65 -208
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/restore-plan-preview.d.ts.map +1 -1
- package/daemon/dist/domain/restore-plan-preview.js +2 -6
- package/daemon/dist/domain/restore-plan-preview.js.map +1 -1
- package/daemon/dist/domain/restore-preconditions.d.ts +12 -0
- package/daemon/dist/domain/restore-preconditions.d.ts.map +1 -0
- package/daemon/dist/domain/restore-preconditions.js +202 -0
- package/daemon/dist/domain/restore-preconditions.js.map +1 -0
- package/daemon/dist/domain/resume-metadata-refresher.d.ts +20 -4
- package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.js +70 -8
- package/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
- package/daemon/dist/domain/resume-token-capture.d.ts +22 -1
- package/daemon/dist/domain/resume-token-capture.d.ts.map +1 -1
- package/daemon/dist/domain/resume-token-capture.js +32 -4
- package/daemon/dist/domain/resume-token-capture.js.map +1 -1
- package/daemon/dist/domain/resume-token-validation.d.ts +1 -1
- package/daemon/dist/domain/resume-token-validation.d.ts.map +1 -1
- package/daemon/dist/domain/resume-token-validation.js +24 -24
- package/daemon/dist/domain/resume-token-validation.js.map +1 -1
- package/daemon/dist/domain/rig-repository.d.ts +3 -0
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +21 -0
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rig-teardown.d.ts +3 -0
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +96 -19
- 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 +6 -0
- package/daemon/dist/domain/rigspec-codec.js.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.js +4 -0
- package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +37 -8
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts +2 -0
- package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.js +20 -5
- package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
- package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +14 -2
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +7 -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-verifier.d.ts +3 -1
- package/daemon/dist/domain/runtime-verifier.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-verifier.js +10 -1
- package/daemon/dist/domain/runtime-verifier.js.map +1 -1
- package/daemon/dist/domain/scope/scaffold-placeholder.d.ts +4 -4
- package/daemon/dist/domain/scope/scaffold-placeholder.d.ts.map +1 -1
- package/daemon/dist/domain/scope/scaffold-placeholder.js +4 -4
- package/daemon/dist/domain/scope/scaffold-placeholder.js.map +1 -1
- package/daemon/dist/domain/seat-activity-service.d.ts +9 -4
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-activity-service.js +73 -22
- package/daemon/dist/domain/seat-activity-service.js.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.d.ts +1 -0
- package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.js +32 -9
- package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts +6 -0
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +8 -5
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.d.ts +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.js +99 -18
- package/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.d.ts +26 -0
- package/daemon/dist/domain/seat-launch-environment.d.ts.map +1 -0
- package/daemon/dist/domain/seat-launch-environment.js +178 -0
- package/daemon/dist/domain/seat-launch-environment.js.map +1 -0
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +7 -0
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +37 -2
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-status-service.js +4 -2
- package/daemon/dist/domain/seat-status-service.js.map +1 -1
- package/daemon/dist/domain/seat-structural-activity-service.d.ts +5 -4
- package/daemon/dist/domain/seat-structural-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-structural-activity-service.js +23 -9
- package/daemon/dist/domain/seat-structural-activity-service.js.map +1 -1
- package/daemon/dist/domain/seat-switch-client-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-switch-client-service.js +3 -2
- package/daemon/dist/domain/seat-switch-client-service.js.map +1 -1
- package/daemon/dist/domain/services-readiness.d.ts.map +1 -1
- package/daemon/dist/domain/services-readiness.js +6 -2
- package/daemon/dist/domain/services-readiness.js.map +1 -1
- package/daemon/dist/domain/session-fingerprinter.d.ts.map +1 -1
- package/daemon/dist/domain/session-fingerprinter.js +16 -1
- package/daemon/dist/domain/session-fingerprinter.js.map +1 -1
- package/daemon/dist/domain/session-name.d.ts.map +1 -1
- package/daemon/dist/domain/session-name.js +6 -0
- package/daemon/dist/domain/session-name.js.map +1 -1
- package/daemon/dist/domain/session-registry.d.ts +3 -0
- package/daemon/dist/domain/session-registry.d.ts.map +1 -1
- package/daemon/dist/domain/session-registry.js +7 -0
- package/daemon/dist/domain/session-registry.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +30 -1
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +290 -145
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/snapshot-repository.d.ts +2 -1
- package/daemon/dist/domain/snapshot-repository.d.ts.map +1 -1
- package/daemon/dist/domain/snapshot-repository.js +39 -15
- package/daemon/dist/domain/snapshot-repository.js.map +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.d.ts +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.d.ts.map +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.js +70 -11
- package/daemon/dist/domain/spec-library-workflow-scanner.js.map +1 -1
- package/daemon/dist/domain/spec-validation-service.d.ts +6 -0
- package/daemon/dist/domain/spec-validation-service.d.ts.map +1 -1
- package/daemon/dist/domain/spec-validation-service.js +16 -1
- package/daemon/dist/domain/spec-validation-service.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts +8 -0
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +148 -37
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.d.ts +41 -0
- package/daemon/dist/domain/startup-submission-evidence.d.ts.map +1 -0
- package/daemon/dist/domain/startup-submission-evidence.js +67 -0
- package/daemon/dist/domain/startup-submission-evidence.js.map +1 -0
- package/daemon/dist/domain/startup-validation.d.ts.map +1 -1
- package/daemon/dist/domain/startup-validation.js +4 -0
- package/daemon/dist/domain/startup-validation.js.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts +5 -0
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +8 -6
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/terminal/view-composer.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/view-composer.js +2 -1
- package/daemon/dist/domain/terminal/view-composer.js.map +1 -1
- package/daemon/dist/domain/tmux-discovery-scanner.d.ts.map +1 -1
- package/daemon/dist/domain/tmux-discovery-scanner.js +7 -2
- package/daemon/dist/domain/tmux-discovery-scanner.js.map +1 -1
- package/daemon/dist/domain/tmux-option-defaults.d.ts.map +1 -1
- package/daemon/dist/domain/tmux-option-defaults.js +5 -0
- package/daemon/dist/domain/tmux-option-defaults.js.map +1 -1
- package/daemon/dist/domain/transcript-capture.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-capture.js +1 -1
- package/daemon/dist/domain/transcript-capture.js.map +1 -1
- package/daemon/dist/domain/transcript-rotation.d.ts +26 -5
- package/daemon/dist/domain/transcript-rotation.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-rotation.js +176 -25
- package/daemon/dist/domain/transcript-rotation.js.map +1 -1
- package/daemon/dist/domain/transcript-store.d.ts +1 -1
- package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-store.js +11 -4
- package/daemon/dist/domain/transcript-store.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +18 -5
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/usage-series.d.ts.map +1 -1
- package/daemon/dist/domain/usage-series.js +11 -6
- package/daemon/dist/domain/usage-series.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts +2 -0
- package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.js +88 -6
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/view-projector.d.ts +11 -6
- package/daemon/dist/domain/view-projector.d.ts.map +1 -1
- package/daemon/dist/domain/view-projector.js +2 -6
- package/daemon/dist/domain/view-projector.js.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.d.ts +29 -7
- package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.js +103 -14
- package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
- package/daemon/dist/domain/workspace/workspace-doctor.js +1 -1
- package/daemon/dist/domain/workspace/workspace-doctor.js.map +1 -1
- package/daemon/dist/domain/workspace/workspace-resolver.js +1 -1
- package/daemon/dist/domain/workspace/workspace-resolver.js.map +1 -1
- package/daemon/dist/health-detectors-surface.d.ts +1 -1
- package/daemon/dist/health-detectors-surface.d.ts.map +1 -1
- package/daemon/dist/health-detectors-surface.js.map +1 -1
- package/daemon/dist/index.d.ts +4 -4
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +11 -7
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/middleware/json-body-error.d.ts +17 -0
- package/daemon/dist/middleware/json-body-error.d.ts.map +1 -0
- package/daemon/dist/middleware/json-body-error.js +42 -0
- package/daemon/dist/middleware/json-body-error.js.map +1 -0
- package/daemon/dist/routes/activity.d.ts.map +1 -1
- package/daemon/dist/routes/activity.js +85 -6
- package/daemon/dist/routes/activity.js.map +1 -1
- package/daemon/dist/routes/attention.d.ts.map +1 -1
- package/daemon/dist/routes/attention.js +7 -1
- package/daemon/dist/routes/attention.js.map +1 -1
- package/daemon/dist/routes/bundles.js +32 -3
- package/daemon/dist/routes/bundles.js.map +1 -1
- package/daemon/dist/routes/compaction.d.ts.map +1 -1
- package/daemon/dist/routes/compaction.js +30 -2
- package/daemon/dist/routes/compaction.js.map +1 -1
- package/daemon/dist/routes/context-packs.d.ts.map +1 -1
- package/daemon/dist/routes/context-packs.js +10 -2
- package/daemon/dist/routes/context-packs.js.map +1 -1
- package/daemon/dist/routes/files.js +2 -2
- package/daemon/dist/routes/files.js.map +1 -1
- package/daemon/dist/routes/gateway.d.ts.map +1 -1
- package/daemon/dist/routes/gateway.js +6 -1
- package/daemon/dist/routes/gateway.js.map +1 -1
- package/daemon/dist/routes/hosts.d.ts.map +1 -1
- package/daemon/dist/routes/hosts.js +51 -12
- package/daemon/dist/routes/hosts.js.map +1 -1
- package/daemon/dist/routes/mission-control.d.ts.map +1 -1
- package/daemon/dist/routes/mission-control.js +6 -2
- package/daemon/dist/routes/mission-control.js.map +1 -1
- package/daemon/dist/routes/missions.d.ts.map +1 -1
- package/daemon/dist/routes/missions.js +17 -5
- package/daemon/dist/routes/missions.js.map +1 -1
- package/daemon/dist/routes/plugins.d.ts.map +1 -1
- package/daemon/dist/routes/plugins.js +5 -1
- package/daemon/dist/routes/plugins.js.map +1 -1
- package/daemon/dist/routes/proof.d.ts.map +1 -1
- package/daemon/dist/routes/proof.js +9 -2
- package/daemon/dist/routes/proof.js.map +1 -1
- package/daemon/dist/routes/ps.d.ts.map +1 -1
- package/daemon/dist/routes/ps.js +18 -0
- package/daemon/dist/routes/ps.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +150 -67
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/restore-check.d.ts.map +1 -1
- package/daemon/dist/routes/restore-check.js +40 -1
- package/daemon/dist/routes/restore-check.js.map +1 -1
- package/daemon/dist/routes/rigs.js +1 -1
- package/daemon/dist/routes/rigs.js.map +1 -1
- package/daemon/dist/routes/rigspec.d.ts.map +1 -1
- package/daemon/dist/routes/rigspec.js +7 -10
- package/daemon/dist/routes/rigspec.js.map +1 -1
- package/daemon/dist/routes/seat.d.ts.map +1 -1
- package/daemon/dist/routes/seat.js +11 -0
- package/daemon/dist/routes/seat.js.map +1 -1
- package/daemon/dist/routes/sessions.js +1 -1
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/telemetry.d.ts.map +1 -1
- package/daemon/dist/routes/telemetry.js +6 -1
- package/daemon/dist/routes/telemetry.js.map +1 -1
- package/daemon/dist/routes/terminal-ws.d.ts +1 -2
- package/daemon/dist/routes/terminal-ws.d.ts.map +1 -1
- package/daemon/dist/routes/terminal-ws.js +1 -2
- package/daemon/dist/routes/terminal-ws.js.map +1 -1
- package/daemon/dist/routes/up.js +2 -1
- package/daemon/dist/routes/up.js.map +1 -1
- package/daemon/dist/routes/views.js +2 -2
- package/daemon/dist/routes/views.js.map +1 -1
- package/daemon/dist/server.d.ts +2 -0
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +7 -2
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/spec-validation-surface.d.ts +2 -0
- package/daemon/dist/spec-validation-surface.d.ts.map +1 -0
- package/daemon/dist/spec-validation-surface.js +2 -0
- package/daemon/dist/spec-validation-surface.js.map +1 -0
- package/daemon/dist/startup.d.ts +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +137 -50
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/dist/terminal/TerminalSessionBroker.d.ts +1 -0
- package/daemon/dist/terminal/TerminalSessionBroker.d.ts.map +1 -1
- package/daemon/dist/terminal/TerminalSessionBroker.js +8 -1
- package/daemon/dist/terminal/TerminalSessionBroker.js.map +1 -1
- package/daemon/docs/reference/agent-spec.md +36 -1
- package/daemon/docs/reference/agent-startup-guide.md +81 -2
- package/daemon/docs/reference/browser-access.md +4 -1
- package/daemon/docs/reference/developing.md +17 -9
- package/daemon/docs/reference/getting-started.md +7 -2
- package/daemon/docs/reference/health-diagnosis.md +10 -3
- package/daemon/docs/reference/help.md +9 -4
- package/daemon/docs/reference/host-resources.md +60 -0
- package/daemon/docs/reference/instance-layout.md +11 -0
- package/daemon/docs/reference/rig-spec.md +32 -5
- package/daemon/docs/reference/sdlc-conventions.md +6 -3
- package/daemon/docs/reference/slack-app-setup.md +6 -0
- package/daemon/specs/agents/shared/agent.yaml +1 -1
- package/daemon/specs/agents/shared/skills/core/messaging-the-human/SKILL.md +24 -0
- package/daemon/specs/agents/shared/skills/core/openrig-skills/SKILL.md +6 -0
- package/daemon/specs/agents/shared/skills/core/topology-mutation-and-seat-management/SKILL.md +24 -3
- package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/agent.yaml +2 -8
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/agent.yaml +2 -8
- package/daemon/specs/rigs/launch/kernel/agents/queue/worker/agent.yaml +2 -8
- package/daemon/specs/rigs/preview/product-team/topology/rig/ORCHESTRATION-CRAFT.md +1 -1
- package/dist/atomic-text-write.d.ts +3 -0
- package/dist/atomic-text-write.d.ts.map +1 -0
- package/dist/atomic-text-write.js +79 -0
- package/dist/atomic-text-write.js.map +1 -0
- package/dist/build-info.js +3 -3
- package/dist/cli-error.d.ts.map +1 -1
- package/dist/cli-error.js +15 -2
- package/dist/cli-error.js.map +1 -1
- package/dist/client.d.ts +14 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +29 -4
- package/dist/client.js.map +1 -1
- package/dist/commands/agent-image.d.ts.map +1 -1
- package/dist/commands/agent-image.js +2 -0
- package/dist/commands/agent-image.js.map +1 -1
- package/dist/commands/ask.d.ts.map +1 -1
- package/dist/commands/ask.js +10 -1
- package/dist/commands/ask.js.map +1 -1
- package/dist/commands/bootstrap.d.ts.map +1 -1
- package/dist/commands/bootstrap.js +4 -6
- package/dist/commands/bootstrap.js.map +1 -1
- package/dist/commands/broadcast.js +1 -1
- package/dist/commands/broadcast.js.map +1 -1
- package/dist/commands/chatroom.d.ts.map +1 -1
- package/dist/commands/chatroom.js +22 -1
- package/dist/commands/chatroom.js.map +1 -1
- package/dist/commands/compact-plan.d.ts.map +1 -1
- package/dist/commands/compact-plan.js +34 -5
- package/dist/commands/compact-plan.js.map +1 -1
- package/dist/commands/compact.d.ts.map +1 -1
- package/dist/commands/compact.js +24 -4
- package/dist/commands/compact.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +2 -4
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +19 -14
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/crash-cart.d.ts.map +1 -1
- package/dist/commands/crash-cart.js +2 -1
- package/dist/commands/crash-cart.js.map +1 -1
- package/dist/commands/daemon.d.ts +13 -1
- package/dist/commands/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +35 -17
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/destroy.d.ts.map +1 -1
- package/dist/commands/destroy.js +3 -2
- package/dist/commands/destroy.js.map +1 -1
- package/dist/commands/discover.d.ts.map +1 -1
- package/dist/commands/discover.js +2 -4
- package/dist/commands/discover.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +3 -2
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/env.js +8 -0
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/export.js +2 -2
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/gateway.d.ts.map +1 -1
- package/dist/commands/gateway.js +23 -3
- package/dist/commands/gateway.js.map +1 -1
- package/dist/commands/health.d.ts.map +1 -1
- package/dist/commands/health.js +9 -0
- package/dist/commands/health.js.map +1 -1
- package/dist/commands/host.d.ts.map +1 -1
- package/dist/commands/host.js +13 -3
- package/dist/commands/host.js.map +1 -1
- package/dist/commands/plugin.d.ts.map +1 -1
- package/dist/commands/plugin.js +12 -2
- package/dist/commands/plugin.js.map +1 -1
- package/dist/commands/ps.d.ts +1 -0
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +97 -35
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts +2 -0
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +129 -17
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/requirements.d.ts.map +1 -1
- package/dist/commands/requirements.js +6 -3
- package/dist/commands/requirements.js.map +1 -1
- package/dist/commands/rig-mode.d.ts.map +1 -1
- package/dist/commands/rig-mode.js +6 -1
- package/dist/commands/rig-mode.js.map +1 -1
- package/dist/commands/rig.d.ts.map +1 -1
- package/dist/commands/rig.js +20 -20
- package/dist/commands/rig.js.map +1 -1
- package/dist/commands/scope.d.ts.map +1 -1
- package/dist/commands/scope.js +22 -0
- package/dist/commands/scope.js.map +1 -1
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +39 -9
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +6 -5
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/slack.d.ts.map +1 -1
- package/dist/commands/slack.js +8 -1
- package/dist/commands/slack.js.map +1 -1
- package/dist/commands/specs.d.ts.map +1 -1
- package/dist/commands/specs.js +2 -0
- package/dist/commands/specs.js.map +1 -1
- package/dist/commands/start.js +6 -5
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/startup-proof.d.ts.map +1 -1
- package/dist/commands/startup-proof.js +2 -1
- package/dist/commands/startup-proof.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +7 -0
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/terminal.d.ts.map +1 -1
- package/dist/commands/terminal.js +4 -0
- package/dist/commands/terminal.js.map +1 -1
- package/dist/commands/transcript.js +5 -3
- package/dist/commands/transcript.js.map +1 -1
- package/dist/commands/up.d.ts +8 -0
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +78 -4
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/walk.d.ts.map +1 -1
- package/dist/commands/walk.js +3 -0
- package/dist/commands/walk.js.map +1 -1
- package/dist/commands/workflow-follow.d.ts +2 -0
- package/dist/commands/workflow-follow.d.ts.map +1 -1
- package/dist/commands/workflow-follow.js +6 -4
- package/dist/commands/workflow-follow.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +2 -4
- package/dist/commands/workflow.js.map +1 -1
- package/dist/commands/workspace.d.ts.map +1 -1
- package/dist/commands/workspace.js +2 -4
- package/dist/commands/workspace.js.map +1 -1
- package/dist/config-store.d.ts +2 -0
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +24 -6
- package/dist/config-store.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts +9 -0
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +61 -19
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/daemon-reachability.d.ts +18 -0
- package/dist/daemon-reachability.d.ts.map +1 -0
- package/dist/daemon-reachability.js +48 -0
- package/dist/daemon-reachability.js.map +1 -0
- package/dist/lib/file-transfer.d.ts +1 -1
- package/dist/lib/file-transfer.d.ts.map +1 -1
- package/dist/lib/file-transfer.js +17 -5
- package/dist/lib/file-transfer.js.map +1 -1
- package/dist/lib/scope/mission-composition.d.ts.map +1 -1
- package/dist/lib/scope/mission-composition.js +11 -0
- package/dist/lib/scope/mission-composition.js.map +1 -1
- package/dist/lib/scope/scaffold-placeholder.d.ts +4 -4
- package/dist/lib/scope/scaffold-placeholder.d.ts.map +1 -1
- package/dist/lib/scope/scaffold-placeholder.js +4 -4
- package/dist/lib/scope/scaffold-placeholder.js.map +1 -1
- package/dist/lib/scope/scope-fs.d.ts.map +1 -1
- package/dist/lib/scope/scope-fs.js +10 -16
- package/dist/lib/scope/scope-fs.js.map +1 -1
- package/dist/lib/scope-templates/slice-progress.md +11 -7
- package/dist/restore-packet/claude-transcript-parser.d.ts.map +1 -1
- package/dist/restore-packet/claude-transcript-parser.js +2 -0
- package/dist/restore-packet/claude-transcript-parser.js.map +1 -1
- package/dist/restore-packet/codex-jsonl-parser.d.ts.map +1 -1
- package/dist/restore-packet/codex-jsonl-parser.js +2 -0
- package/dist/restore-packet/codex-jsonl-parser.js.map +1 -1
- package/dist/restore-packet/runtime-detect.d.ts.map +1 -1
- package/dist/restore-packet/runtime-detect.js +2 -0
- package/dist/restore-packet/runtime-detect.js.map +1 -1
- package/package.json +4 -3
- package/tui/dist/attention/source-continuity.d.ts.map +1 -1
- package/tui/dist/attention/source-continuity.js +5 -3
- package/tui/dist/attention/source-continuity.js.map +1 -1
- package/tui/dist/daemon-client.d.ts +2 -1
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +13 -4
- 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 +19 -7
- package/tui/dist/execution/execution-model.js.map +1 -1
- package/tui/dist/grammar.d.ts.map +1 -1
- package/tui/dist/grammar.js +3 -2
- package/tui/dist/grammar.js.map +1 -1
- package/tui/dist/health/health-model.d.ts.map +1 -1
- package/tui/dist/health/health-model.js +17 -5
- package/tui/dist/health/health-model.js.map +1 -1
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +1 -0
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/input.d.ts.map +1 -1
- package/tui/dist/input.js +5 -0
- package/tui/dist/input.js.map +1 -1
- package/tui/dist/live-events.d.ts +2 -2
- package/tui/dist/live-events.d.ts.map +1 -1
- package/tui/dist/live-events.js +65 -27
- package/tui/dist/live-events.js.map +1 -1
- package/tui/dist/local-reading.d.ts.map +1 -1
- package/tui/dist/local-reading.js +2 -0
- package/tui/dist/local-reading.js.map +1 -1
- package/tui/dist/main.js +16 -3
- package/tui/dist/main.js.map +1 -1
- package/tui/dist/page-read.d.ts.map +1 -1
- package/tui/dist/page-read.js +4 -1
- package/tui/dist/page-read.js.map +1 -1
- package/tui/dist/render.d.ts +2 -0
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +15 -4
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/scopes/scopes-model.d.ts.map +1 -1
- package/tui/dist/scopes/scopes-model.js +36 -31
- package/tui/dist/scopes/scopes-model.js.map +1 -1
- package/tui/dist/socket-server.d.ts +6 -2
- package/tui/dist/socket-server.d.ts.map +1 -1
- package/tui/dist/socket-server.js +159 -14
- package/tui/dist/socket-server.js.map +1 -1
- package/tui/dist/types.d.ts +18 -0
- package/tui/dist/types.d.ts.map +1 -1
- package/ui/dist/assets/{index-N-SdPj-I.css → index-DNU3XZr_.css} +1 -1
- package/ui/dist/assets/{index-BVW54ItO.js → index-HHSvwF97.js} +75 -75
- package/ui/dist/index.html +2 -2
|
@@ -22,10 +22,11 @@ import nodePath from "node:path";
|
|
|
22
22
|
import readline from "node:readline";
|
|
23
23
|
import { PassThrough } from "node:stream";
|
|
24
24
|
import { StringDecoder } from "node:string_decoder";
|
|
25
|
-
import { spawn } from "node:child_process";
|
|
25
|
+
import { execFileSync, spawn } from "node:child_process";
|
|
26
26
|
import { pathToFileURL } from "node:url";
|
|
27
27
|
import { stripVTControlCharacters } from "node:util";
|
|
28
|
-
import {
|
|
28
|
+
import { formatDaemonHostForUrl } from "./daemon-url.js";
|
|
29
|
+
import { piSeatPaths, buildPiChildArgs, buildPiChildEnv, buildPendingRunnerState, parsePiRunnerState, PI_RUNNER_READY_MARKER, PI_RUNNER_ERROR_MARKER, } from "./pi-runner-protocol.js";
|
|
29
30
|
// ── Submitted input boundaries ─────────────────────────────────────────────
|
|
30
31
|
// Canonical TTY buffers can overflow before Node sees even the paste terminator.
|
|
31
32
|
// Use Node's line editor in raw mode, with only paste framing handled here.
|
|
@@ -143,21 +144,40 @@ export function createRunnerInput(input, output, onSubmit) {
|
|
|
143
144
|
});
|
|
144
145
|
return editor;
|
|
145
146
|
}
|
|
146
|
-
function errorNotice(detail) {
|
|
147
|
+
function errorNotice(detail, runtime) {
|
|
147
148
|
const text = typeof detail === "string"
|
|
148
149
|
? stripVTControlCharacters(detail).replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/gu, " ").replace(/\s+/g, " ").trim()
|
|
149
150
|
: "";
|
|
150
|
-
|
|
151
|
+
const marker = runtime === "omp" ? "[omp-runner] ERROR" : PI_RUNNER_ERROR_MARKER;
|
|
152
|
+
return `${marker} ${text.slice(0, 400) || "request failed"}`;
|
|
151
153
|
}
|
|
152
|
-
|
|
154
|
+
/** The one model-failure detector for both runtimes. Pi and OMP report a
|
|
155
|
+
* provider/auth failure on the assistant message itself and still end the
|
|
156
|
+
* turn normally; OMP repeats the message on turn_end, and either runtime can
|
|
157
|
+
* announce it again when automatic retries exhaust. The core coalesces the
|
|
158
|
+
* repeats into one notice per failure. */
|
|
159
|
+
function modelErrorNotice(event, runtime) {
|
|
160
|
+
if (event.type === "auto_retry_end") {
|
|
161
|
+
return event.success === false ? { errorNotice: errorNotice(event.finalError, runtime) } : {};
|
|
162
|
+
}
|
|
163
|
+
const message = event.message;
|
|
164
|
+
return message?.role === "assistant" && message.stopReason === "error"
|
|
165
|
+
? { errorNotice: errorNotice(message.errorMessage, runtime) } : {};
|
|
166
|
+
}
|
|
167
|
+
export function mapPiEvent(event, runtime = "pi") {
|
|
153
168
|
const type = typeof event.type === "string" ? event.type : "";
|
|
154
169
|
switch (type) {
|
|
155
170
|
case "agent_start":
|
|
156
171
|
return { mirrorLines: [], activity: { hookEvent: "active", subtype: "agent_start" }, streaming: true };
|
|
157
172
|
case "agent_end":
|
|
158
|
-
return
|
|
159
|
-
|
|
173
|
+
return runtime === "omp" && event.isTerminal === false
|
|
174
|
+
? { mirrorLines: [], streaming: true }
|
|
175
|
+
: { mirrorLines: [""], activity: { hookEvent: "Stop", subtype: "agent_end" }, streaming: false };
|
|
160
176
|
case "turn_end":
|
|
177
|
+
// OMP repeats an assistant failure on turn_end (sometimes only there).
|
|
178
|
+
// Pi keeps main's mapping: turn_end carries no notice.
|
|
179
|
+
return runtime === "omp" ? { mirrorLines: [], ...modelErrorNotice(event, runtime) } : { mirrorLines: [] };
|
|
180
|
+
case "turn_start":
|
|
161
181
|
case "message_start":
|
|
162
182
|
return { mirrorLines: [] };
|
|
163
183
|
case "message_update": {
|
|
@@ -171,18 +191,12 @@ export function mapPiEvent(event) {
|
|
|
171
191
|
const delta = update?.type === "text_delta" && typeof update.delta === "string" ? update.delta : "";
|
|
172
192
|
return delta ? { mirrorLines: [], mirrorAppend: delta } : { mirrorLines: [] };
|
|
173
193
|
}
|
|
174
|
-
case "message_end":
|
|
194
|
+
case "message_end":
|
|
175
195
|
// The message text already streamed via message_update appends; this
|
|
176
196
|
// terminates the line. (mapPiEvent is stateless, so a hypothetical
|
|
177
197
|
// updates-carried-nothing case is a VM-calibration follow-up, not
|
|
178
198
|
// silently guessed here.)
|
|
179
|
-
|
|
180
|
-
return {
|
|
181
|
-
mirrorLines: [""],
|
|
182
|
-
...(message?.role === "assistant" && message.stopReason === "error"
|
|
183
|
-
? { errorNotice: errorNotice(message.errorMessage) } : {}),
|
|
184
|
-
};
|
|
185
|
-
}
|
|
199
|
+
return { mirrorLines: [""], ...modelErrorNotice(event, runtime) };
|
|
186
200
|
case "tool_execution_start": {
|
|
187
201
|
const tool = typeof event.toolName === "string" ? event.toolName : (typeof event.name === "string" ? event.name : "tool");
|
|
188
202
|
return { mirrorLines: [` ⚙ ${tool} …`], activity: { hookEvent: "PreToolUse", subtype: tool } };
|
|
@@ -195,15 +209,23 @@ export function mapPiEvent(event) {
|
|
|
195
209
|
case "queue_update":
|
|
196
210
|
return { mirrorLines: [] };
|
|
197
211
|
case "compaction_start":
|
|
198
|
-
return { mirrorLines: [
|
|
212
|
+
return { mirrorLines: [`[${runtime}] compacting context…`], activity: { hookEvent: "active", subtype: "compaction" } };
|
|
199
213
|
case "compaction_end":
|
|
200
|
-
return { mirrorLines: [
|
|
214
|
+
return { mirrorLines: [`[${runtime}] compaction done`] };
|
|
215
|
+
// OMP names its automatic compaction separately. Pi keeps main's mapping
|
|
216
|
+
// (unmapped), so an idle Pi seat never reads as running after one.
|
|
217
|
+
case "auto_compaction_start":
|
|
218
|
+
return runtime === "omp"
|
|
219
|
+
? { mirrorLines: ["[omp] compacting context…"], activity: { hookEvent: "active", subtype: "compaction" } }
|
|
220
|
+
: { mirrorLines: [] };
|
|
221
|
+
case "auto_compaction_end":
|
|
222
|
+
return runtime === "omp" ? { mirrorLines: ["[omp] compaction done"] } : { mirrorLines: [] };
|
|
201
223
|
case "auto_retry_start":
|
|
202
224
|
return { mirrorLines: ["[pi] transient error — retrying"], activity: { hookEvent: "active", subtype: "auto_retry" } };
|
|
203
|
-
case "auto_retry_end":
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
225
|
+
case "auto_retry_end": {
|
|
226
|
+
const notice = modelErrorNotice(event, runtime);
|
|
227
|
+
return notice.errorNotice ? { mirrorLines: [""], ...notice } : { mirrorLines: [] };
|
|
228
|
+
}
|
|
207
229
|
case "extension_error": {
|
|
208
230
|
const message = typeof event.message === "string" ? event.message : "extension error";
|
|
209
231
|
return { mirrorLines: [`${PI_RUNNER_ERROR_MARKER} extension: ${message}`] };
|
|
@@ -215,6 +237,9 @@ export function mapPiEvent(event) {
|
|
|
215
237
|
const GET_STATE_ID = "pi-runner-get-state";
|
|
216
238
|
const CATCH_UP_ID = "pi-runner-catch-up";
|
|
217
239
|
const CURSOR_REFRESH_ID = "pi-runner-cursor-refresh";
|
|
240
|
+
/** RPC commands that carry operator input. Their failure means the seat
|
|
241
|
+
* cannot do the requested work; other command failures are not attention. */
|
|
242
|
+
const INPUT_COMMANDS = { prompt: true, steer: true, follow_up: true };
|
|
218
243
|
export class RunnerCore {
|
|
219
244
|
io;
|
|
220
245
|
identity;
|
|
@@ -225,6 +250,16 @@ export class RunnerCore {
|
|
|
225
250
|
lastEntryId;
|
|
226
251
|
ready = false;
|
|
227
252
|
assistantErrorShown = false;
|
|
253
|
+
started = false;
|
|
254
|
+
/** OMP attention (runtime_error | permission_prompt) that must survive the
|
|
255
|
+
* end of the turn; cleared by the next agent_start. */
|
|
256
|
+
attention = null;
|
|
257
|
+
/** Whether the last activity posted is that attention. Later activity in
|
|
258
|
+
* the same turn (a tool call after a denied approval) replaces it. */
|
|
259
|
+
attentionIsLatest = false;
|
|
260
|
+
/** Set once the daemon confirms it persisted the resume token. */
|
|
261
|
+
identityPersisted = false;
|
|
262
|
+
identityInFlight = false;
|
|
228
263
|
constructor(io, identity, opts = {}) {
|
|
229
264
|
this.io = io;
|
|
230
265
|
this.identity = identity;
|
|
@@ -234,8 +269,17 @@ export class RunnerCore {
|
|
|
234
269
|
// newer entry supersedes it.
|
|
235
270
|
this.lastEntryId = opts.catchUpSince;
|
|
236
271
|
}
|
|
272
|
+
/** Runner readiness is the sidecar's acknowledged get_state, not RPC transport ready. */
|
|
273
|
+
isReady() { return this.ready; }
|
|
237
274
|
/** Kick off identity capture. Called once pi's RPC stream is up. */
|
|
238
275
|
start() {
|
|
276
|
+
// OMP's start is driven by the transport `ready` frame and must run once;
|
|
277
|
+
// Pi keeps main's unconditional start.
|
|
278
|
+
if (this.runtime === "omp") {
|
|
279
|
+
if (this.started)
|
|
280
|
+
return;
|
|
281
|
+
this.started = true;
|
|
282
|
+
}
|
|
239
283
|
this.io.sendRpc({ type: "get_state", id: GET_STATE_ID });
|
|
240
284
|
if (this.opts.catchUpSince) {
|
|
241
285
|
// Durable catch-up cursor (FR-5): replay session entries the previous
|
|
@@ -267,6 +311,7 @@ export class RunnerCore {
|
|
|
267
311
|
}
|
|
268
312
|
this.handleEvent(record);
|
|
269
313
|
}
|
|
314
|
+
get runtime() { return this.opts.runtime ?? "pi"; }
|
|
270
315
|
/** One aggregated paste block from pane stdin. */
|
|
271
316
|
handleUserBlock(block) {
|
|
272
317
|
if (block === "/abort") {
|
|
@@ -290,34 +335,49 @@ export class RunnerCore {
|
|
|
290
335
|
this.io.sendRpc({ type: "prompt", message: block });
|
|
291
336
|
this.io.mirrorLine(`you ▸ ${block}`);
|
|
292
337
|
}
|
|
293
|
-
/**
|
|
338
|
+
/** Child process exit — honest, loud, durable. */
|
|
294
339
|
handlePiExit(code) {
|
|
295
340
|
this.ready = false;
|
|
296
|
-
this.io.mirrorLine(
|
|
341
|
+
this.io.mirrorLine(`[${this.runtime}-runner] EXITED ${this.runtime} exited (code ${code ?? "unknown"})`);
|
|
297
342
|
this.writeSidecar({ exited: { code, at: this.io.now() } });
|
|
298
|
-
this.io.postActivity(this.activityPayload("Stop",
|
|
343
|
+
this.io.postActivity(this.activityPayload("Stop", `${this.runtime}_exited`));
|
|
299
344
|
}
|
|
300
345
|
handleResponse(record) {
|
|
346
|
+
if (record.success === false || record.error != null) {
|
|
347
|
+
const message = typeof record.error === "string" ? record.error : "request failed";
|
|
348
|
+
if (record.id === GET_STATE_ID) {
|
|
349
|
+
this.ready = false;
|
|
350
|
+
this.writeSidecar({});
|
|
351
|
+
this.io.mirrorLine(this.runtime === "omp" ? `[omp-runner] ERROR rpc get_state: ${message}` : `${PI_RUNNER_ERROR_MARKER} rpc: ${message}`);
|
|
352
|
+
// OMP cannot provide a resume token without get_state; stop it so the
|
|
353
|
+
// launch fails now instead of waiting out readiness.
|
|
354
|
+
if (this.runtime === "omp")
|
|
355
|
+
this.io.stopChild?.();
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
this.io.mirrorLine(`[${this.runtime}-runner] ERROR rpc: ${message}`);
|
|
359
|
+
// Only a rejected input means the seat cannot do the requested work.
|
|
360
|
+
// A mistimed /abort (or any control command) leaves the seat idle.
|
|
361
|
+
if (this.runtime === "omp" && typeof record.command === "string" && Object.hasOwn(INPUT_COMMANDS, record.command)) {
|
|
362
|
+
this.raiseAttention("runtime_error");
|
|
363
|
+
}
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
301
366
|
if (record.id === GET_STATE_ID) {
|
|
302
367
|
const data = (record.data ?? record.state ?? record);
|
|
303
368
|
const sessionFile = typeof data.sessionFile === "string" ? data.sessionFile : undefined;
|
|
304
369
|
const sessionId = typeof data.sessionId === "string" ? data.sessionId : undefined;
|
|
305
370
|
this.sessionFile = sessionFile ?? this.sessionFile;
|
|
306
371
|
this.sessionId = sessionId ?? this.sessionId;
|
|
307
|
-
this.ready =
|
|
372
|
+
this.ready = this.runtime === "pi" || !!this.sessionFile;
|
|
373
|
+
if (!this.ready) {
|
|
374
|
+
this.io.mirrorLine("[omp-runner] ERROR rpc get_state returned no session file; cannot provide a resume token");
|
|
375
|
+
this.io.stopChild?.();
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
308
378
|
this.writeSidecar({});
|
|
309
|
-
this.io.mirrorLine(`${PI_RUNNER_READY_MARKER} session=${this.sessionFile ?? "unknown"}`);
|
|
310
|
-
this.
|
|
311
|
-
eventFamily: "session_identity",
|
|
312
|
-
sessionName: this.identity.sessionName,
|
|
313
|
-
nodeId: this.identity.nodeId ?? null,
|
|
314
|
-
generation: this.identity.generation ?? null,
|
|
315
|
-
runtime: "pi",
|
|
316
|
-
hookEvent: "SessionStart",
|
|
317
|
-
sessionId: this.sessionId ?? "unknown",
|
|
318
|
-
sessionFile: this.sessionFile ?? null,
|
|
319
|
-
occurredAt: this.io.now(),
|
|
320
|
-
});
|
|
379
|
+
this.io.mirrorLine(`${this.runtime === "omp" ? "[omp-runner] READY" : PI_RUNNER_READY_MARKER} session=${this.sessionFile ?? "unknown"}`);
|
|
380
|
+
this.postSessionIdentity();
|
|
321
381
|
return;
|
|
322
382
|
}
|
|
323
383
|
if (record.id === CURSOR_REFRESH_ID || record.id === CATCH_UP_ID) {
|
|
@@ -333,13 +393,35 @@ export class RunnerCore {
|
|
|
333
393
|
}
|
|
334
394
|
return;
|
|
335
395
|
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
396
|
+
}
|
|
397
|
+
raiseAttention(subtype) {
|
|
398
|
+
// Runtime failures outrank denied approvals. Only emit when the visible
|
|
399
|
+
// attention changes or intervening activity replaced it.
|
|
400
|
+
const next = this.attention === "runtime_error" ? this.attention : subtype;
|
|
401
|
+
if (this.attention === next && this.attentionIsLatest)
|
|
402
|
+
return;
|
|
403
|
+
this.attention = next;
|
|
404
|
+
this.attentionIsLatest = true;
|
|
405
|
+
this.io.postActivity(this.activityPayload("Notification", next));
|
|
406
|
+
}
|
|
407
|
+
clearAttention() {
|
|
408
|
+
this.attention = null;
|
|
409
|
+
this.attentionIsLatest = false;
|
|
341
410
|
}
|
|
342
411
|
handleEvent(event) {
|
|
412
|
+
if (this.runtime === "omp" && event.type === "extension_ui_request") {
|
|
413
|
+
const method = event.method;
|
|
414
|
+
// RPC does not mount an interactive UI. Reply at once; otherwise the
|
|
415
|
+
// child can wait forever for approval that cannot be given in the pane.
|
|
416
|
+
if (typeof event.id === "string") {
|
|
417
|
+
this.io.sendRpc({ type: "extension_ui_response", id: event.id, cancelled: true });
|
|
418
|
+
}
|
|
419
|
+
if (method === "select" || method === "confirm" || method === "input" || method === "editor") {
|
|
420
|
+
this.io.mirrorLine("[omp-runner] Approval/input requested; cancelled because the managed RPC pane cannot answer it. Operator action required: review the denied action and re-send a safe instruction, or change the seat permission policy explicitly.");
|
|
421
|
+
this.raiseAttention("permission_prompt");
|
|
422
|
+
}
|
|
423
|
+
return;
|
|
424
|
+
}
|
|
343
425
|
const message = event.message;
|
|
344
426
|
if (event.type === "agent_start" || (event.type === "message_start" && message?.role === "assistant")) {
|
|
345
427
|
this.assistantErrorShown = false;
|
|
@@ -350,9 +432,23 @@ export class RunnerCore {
|
|
|
350
432
|
this.lastEntryId = entryId;
|
|
351
433
|
this.writeSidecar({});
|
|
352
434
|
}
|
|
353
|
-
|
|
435
|
+
if (this.runtime === "omp") {
|
|
436
|
+
if (event.type === "agent_start")
|
|
437
|
+
this.clearAttention();
|
|
438
|
+
// A successful automatic retry supersedes the failed attempt.
|
|
439
|
+
if (event.type === "auto_retry_start" && this.attention === "runtime_error")
|
|
440
|
+
this.clearAttention();
|
|
441
|
+
// Some paths omit agent_start; turn_start still opens a new turn.
|
|
442
|
+
if (event.type === "turn_start")
|
|
443
|
+
this.assistantErrorShown = false;
|
|
444
|
+
}
|
|
445
|
+
const mapped = mapPiEvent(event, this.runtime);
|
|
354
446
|
if (mapped.streaming !== undefined)
|
|
355
447
|
this.streaming = mapped.streaming;
|
|
448
|
+
// OMP writes its JSONL lazily; re-announce identity after each turn until
|
|
449
|
+
// the daemon confirms the token. Pi's get_state identity is final.
|
|
450
|
+
if (event.type === "agent_end" && this.runtime === "omp")
|
|
451
|
+
this.postSessionIdentity();
|
|
356
452
|
if (event.type === "agent_end") {
|
|
357
453
|
// QA RED fold (qitem-20260707020922): live events do not reliably carry
|
|
358
454
|
// session-entry ids, so the durable cursor starved (lastEntryId stayed
|
|
@@ -366,24 +462,67 @@ export class RunnerCore {
|
|
|
366
462
|
for (const line of mapped.mirrorLines)
|
|
367
463
|
this.io.mirrorLine(line);
|
|
368
464
|
if (mapped.errorNotice) {
|
|
369
|
-
// Pi can announce the same failed message again when retries exhaust
|
|
370
|
-
// Keep the first useful detail even if
|
|
371
|
-
// at the next assistant message/agent
|
|
372
|
-
|
|
465
|
+
// Pi can announce the same failed message again when retries exhaust,
|
|
466
|
+
// and OMP repeats it on turn_end. Keep the first useful detail even if
|
|
467
|
+
// the repeat lacks it, then reset at the next assistant message/agent
|
|
468
|
+
// turn, not at agent_end.
|
|
469
|
+
if (event.type === "message_end" || !this.assistantErrorShown) {
|
|
373
470
|
this.io.mirrorLine(mapped.errorNotice);
|
|
374
471
|
}
|
|
375
472
|
this.assistantErrorShown = true;
|
|
473
|
+
// OMP still ends the turn normally after a model failure; the operator
|
|
474
|
+
// has to act, so the seat shows attention rather than idle.
|
|
475
|
+
if (this.runtime === "omp")
|
|
476
|
+
this.raiseAttention("runtime_error");
|
|
477
|
+
}
|
|
478
|
+
if (!mapped.activity)
|
|
479
|
+
return;
|
|
480
|
+
if (mapped.activity.hookEvent === "Stop" && this.attention) {
|
|
481
|
+
// The turn ended, but the operator still has to act. Drop the Stop; if
|
|
482
|
+
// later activity replaced the attention, restore it as the final state.
|
|
483
|
+
if (!this.attentionIsLatest)
|
|
484
|
+
this.raiseAttention(this.attention);
|
|
376
485
|
}
|
|
377
|
-
|
|
486
|
+
else {
|
|
487
|
+
this.attentionIsLatest = false;
|
|
378
488
|
this.io.postActivity(this.activityPayload(mapped.activity.hookEvent, mapped.activity.subtype));
|
|
379
489
|
}
|
|
380
490
|
}
|
|
491
|
+
/** Re-deliver OMP identity until the daemon confirms the resume token.
|
|
492
|
+
* Called from a timer so a daemon restart during the first turn cannot
|
|
493
|
+
* leave a seat with history but no restorable token. */
|
|
494
|
+
retrySessionIdentity() {
|
|
495
|
+
if (this.runtime === "omp" && this.ready)
|
|
496
|
+
this.postSessionIdentity();
|
|
497
|
+
}
|
|
498
|
+
postSessionIdentity() {
|
|
499
|
+
if (this.runtime === "omp" && (!this.sessionFile || !this.io.sessionFileExists?.(this.sessionFile)))
|
|
500
|
+
return;
|
|
501
|
+
if (this.runtime === "omp" && (this.identityPersisted || this.identityInFlight))
|
|
502
|
+
return;
|
|
503
|
+
const result = this.io.postActivity({
|
|
504
|
+
eventFamily: "session_identity",
|
|
505
|
+
sessionName: this.identity.sessionName,
|
|
506
|
+
nodeId: this.identity.nodeId ?? null,
|
|
507
|
+
runtime: this.runtime,
|
|
508
|
+
generation: this.identity.generation ?? null,
|
|
509
|
+
hookEvent: "SessionStart",
|
|
510
|
+
sessionId: this.sessionId ?? "unknown",
|
|
511
|
+
sessionFile: this.sessionFile ?? null,
|
|
512
|
+
occurredAt: this.io.now(),
|
|
513
|
+
});
|
|
514
|
+
if (this.runtime !== "omp" || !result)
|
|
515
|
+
return;
|
|
516
|
+
this.identityInFlight = true;
|
|
517
|
+
void result.then((body) => { if (body?.tokenPersisted === true)
|
|
518
|
+
this.identityPersisted = true; }, () => { }).finally(() => { this.identityInFlight = false; });
|
|
519
|
+
}
|
|
381
520
|
activityPayload(hookEvent, subtype) {
|
|
382
521
|
return {
|
|
383
522
|
sessionName: this.identity.sessionName,
|
|
384
523
|
nodeId: this.identity.nodeId ?? null,
|
|
385
524
|
generation: this.identity.generation ?? null,
|
|
386
|
-
runtime:
|
|
525
|
+
runtime: this.runtime,
|
|
387
526
|
hookEvent,
|
|
388
527
|
subtype,
|
|
389
528
|
occurredAt: this.io.now(),
|
|
@@ -417,6 +556,13 @@ export function parseRunnerArgs(argv) {
|
|
|
417
556
|
case "--session-name":
|
|
418
557
|
args.sessionName = next();
|
|
419
558
|
break;
|
|
559
|
+
case "--runtime": {
|
|
560
|
+
const runtime = next();
|
|
561
|
+
if (runtime !== "pi" && runtime !== "omp")
|
|
562
|
+
throw new Error(`unsupported runtime: ${runtime}`);
|
|
563
|
+
args.runtime = runtime;
|
|
564
|
+
break;
|
|
565
|
+
}
|
|
420
566
|
case "--state-root":
|
|
421
567
|
args.stateRoot = next();
|
|
422
568
|
break;
|
|
@@ -441,6 +587,13 @@ export function parseRunnerArgs(argv) {
|
|
|
441
587
|
case "--no-approve":
|
|
442
588
|
args.trust = "no-approve";
|
|
443
589
|
break;
|
|
590
|
+
case "--approval-mode": {
|
|
591
|
+
const mode = next();
|
|
592
|
+
if (mode !== "yolo" && mode !== "always-ask")
|
|
593
|
+
throw new Error(`unsupported OMP approval mode: ${mode}`);
|
|
594
|
+
args.trust = mode === "yolo" ? "approve" : "no-approve";
|
|
595
|
+
break;
|
|
596
|
+
}
|
|
444
597
|
default: throw new Error(`unknown flag: ${flag}`);
|
|
445
598
|
}
|
|
446
599
|
}
|
|
@@ -452,8 +605,14 @@ export function parseRunnerArgs(argv) {
|
|
|
452
605
|
throw new Error("--cwd is required");
|
|
453
606
|
if (!args.launchId)
|
|
454
607
|
throw new Error("--launch-id is required (launch-attempt scoping)");
|
|
455
|
-
if (
|
|
608
|
+
if (args.runtime === "omp") {
|
|
609
|
+
if (!argv.includes("--approval-mode") || argv.some((flag) => flag === "--approve" || flag === "--no-approve")) {
|
|
610
|
+
throw new Error("OMP requires --approval-mode yolo or always-ask, not Pi trust flags");
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
else if (!args.trust || argv.includes("--approval-mode")) {
|
|
456
614
|
throw new Error("an explicit trust flag is required: --approve or --no-approve");
|
|
615
|
+
}
|
|
457
616
|
if (args.sessionFile && args.forkRef)
|
|
458
617
|
throw new Error("--session and --fork are mutually exclusive");
|
|
459
618
|
return args;
|
|
@@ -462,7 +621,8 @@ function resolveActivityEndpoint(env) {
|
|
|
462
621
|
let baseUrl = env.OPENRIG_URL?.trim() || null;
|
|
463
622
|
let token = env.OPENRIG_ACTIVITY_HOOK_TOKEN?.trim() || null;
|
|
464
623
|
if (!baseUrl && env.OPENRIG_PORT) {
|
|
465
|
-
|
|
624
|
+
const rawHost = env.OPENRIG_HOST?.trim() || "127.0.0.1";
|
|
625
|
+
baseUrl = `http://${formatDaemonHostForUrl(rawHost)}:${env.OPENRIG_PORT.trim()}`;
|
|
466
626
|
}
|
|
467
627
|
if (!baseUrl || !token) {
|
|
468
628
|
try {
|
|
@@ -497,6 +657,59 @@ export function prepareRunnerSidecar(fsOps, runnerStatePath, launchId, resuming,
|
|
|
497
657
|
catch { /* best-effort; the adapter pre-writes an equivalent pending record */ }
|
|
498
658
|
return { catchUpSince: resuming ? prior?.lastEntryId : undefined };
|
|
499
659
|
}
|
|
660
|
+
/** How often an OMP runner re-delivers an unconfirmed session identity. */
|
|
661
|
+
const IDENTITY_RETRY_MS = 30_000;
|
|
662
|
+
const nodeResolverOps = {
|
|
663
|
+
isExecutable: (path) => {
|
|
664
|
+
try {
|
|
665
|
+
fs.accessSync(path, fs.constants.X_OK);
|
|
666
|
+
return fs.statSync(path).isFile();
|
|
667
|
+
}
|
|
668
|
+
catch {
|
|
669
|
+
return false;
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
realpath: (path) => fs.realpathSync(path),
|
|
673
|
+
run: (file, args, env) => execFileSync(file, args, { env, encoding: "utf8", timeout: 10_000, stdio: ["ignore", "pipe", "pipe"] }).trim(),
|
|
674
|
+
};
|
|
675
|
+
/** Resolve `name` to the absolute path of the real binary, using the
|
|
676
|
+
* runner's own environment. The child later runs under a per-seat HOME, and
|
|
677
|
+
* version-manager shims (mise) find their target through HOME, so the shim
|
|
678
|
+
* itself must never be what the child executes. */
|
|
679
|
+
export function resolveRuntimeExecutable(name, env, ops = nodeResolverOps) {
|
|
680
|
+
const onPath = (env.PATH ?? "").split(nodePath.delimiter)
|
|
681
|
+
.filter((dir) => nodePath.isAbsolute(dir))
|
|
682
|
+
.map((dir) => nodePath.join(dir, name))
|
|
683
|
+
.find((candidate) => ops.isExecutable(candidate));
|
|
684
|
+
if (!onPath)
|
|
685
|
+
return { ok: false, error: `'${name}' was not found on PATH (${env.PATH ?? ""})` };
|
|
686
|
+
let real;
|
|
687
|
+
try {
|
|
688
|
+
real = ops.realpath(onPath);
|
|
689
|
+
}
|
|
690
|
+
catch (err) {
|
|
691
|
+
return { ok: false, error: `could not resolve ${onPath}: ${err.message}` };
|
|
692
|
+
}
|
|
693
|
+
if (nodePath.basename(real) !== "mise")
|
|
694
|
+
return { ok: true, path: real };
|
|
695
|
+
// A mise shim is a symlink to mise itself; ask mise for the tool it maps to.
|
|
696
|
+
let target;
|
|
697
|
+
try {
|
|
698
|
+
target = ops.run(real, ["which", name], env);
|
|
699
|
+
}
|
|
700
|
+
catch (err) {
|
|
701
|
+
return { ok: false, error: `${onPath} is a mise shim and 'mise which ${name}' failed: ${err.message}` };
|
|
702
|
+
}
|
|
703
|
+
if (!nodePath.isAbsolute(target) || !ops.isExecutable(target)) {
|
|
704
|
+
return { ok: false, error: `${onPath} is a mise shim but 'mise which ${name}' returned no executable (${target || "empty"})` };
|
|
705
|
+
}
|
|
706
|
+
try {
|
|
707
|
+
return { ok: true, path: ops.realpath(target) };
|
|
708
|
+
}
|
|
709
|
+
catch (err) {
|
|
710
|
+
return { ok: false, error: `could not resolve ${target}: ${err.message}` };
|
|
711
|
+
}
|
|
712
|
+
}
|
|
500
713
|
export async function main(argv = process.argv.slice(2)) {
|
|
501
714
|
let args;
|
|
502
715
|
try {
|
|
@@ -507,6 +720,7 @@ export async function main(argv = process.argv.slice(2)) {
|
|
|
507
720
|
process.exitCode = 2;
|
|
508
721
|
return;
|
|
509
722
|
}
|
|
723
|
+
const runtime = args.runtime ?? "pi";
|
|
510
724
|
const paths = piSeatPaths(args.stateRoot, args.sessionName);
|
|
511
725
|
fs.mkdirSync(paths.agentDir, { recursive: true });
|
|
512
726
|
fs.mkdirSync(paths.sessionsDir, { recursive: true });
|
|
@@ -520,6 +734,11 @@ export async function main(argv = process.argv.slice(2)) {
|
|
|
520
734
|
agentDir: paths.agentDir,
|
|
521
735
|
sessionsDir: paths.sessionsDir,
|
|
522
736
|
model: args.model,
|
|
737
|
+
runtime,
|
|
738
|
+
sessionName: args.sessionName,
|
|
739
|
+
nodeId: process.env.OPENRIG_NODE_ID,
|
|
740
|
+
openrigHome: process.env.OPENRIG_HOME,
|
|
741
|
+
openrigUrl: endpoint?.baseUrl ?? process.env.OPENRIG_URL,
|
|
523
742
|
});
|
|
524
743
|
const childArgs = buildPiChildArgs({
|
|
525
744
|
sessionsDir: paths.sessionsDir,
|
|
@@ -528,10 +747,33 @@ export async function main(argv = process.argv.slice(2)) {
|
|
|
528
747
|
trust: args.trust,
|
|
529
748
|
sessionFile: args.sessionFile,
|
|
530
749
|
forkRef: args.forkRef,
|
|
750
|
+
runtime,
|
|
531
751
|
});
|
|
532
|
-
console.log(`[
|
|
533
|
-
console.log(`[
|
|
534
|
-
|
|
752
|
+
console.log(`[${runtime}-runner] starting ${runtime} --mode rpc (seat ${args.sessionName})`);
|
|
753
|
+
console.log(`[${runtime}-runner] send text normally; prefixes: "/followup <text>" queues after the turn, "/abort" cancels`);
|
|
754
|
+
// OMP runs under a per-seat HOME. A HOME-dependent launcher on PATH (a mise
|
|
755
|
+
// shim) cannot find its target there, so resolve the real binary first,
|
|
756
|
+
// with the runner's own environment.
|
|
757
|
+
let command = runtime;
|
|
758
|
+
if (runtime === "omp") {
|
|
759
|
+
const resolved = resolveRuntimeExecutable("omp", process.env);
|
|
760
|
+
if (!resolved.ok) {
|
|
761
|
+
console.error(`[omp-runner] ERROR launch: ${resolved.error}`);
|
|
762
|
+
// Record the exit for this launch so the adapter fails it now instead
|
|
763
|
+
// of waiting out its readiness timeout. The durable cursor survives.
|
|
764
|
+
const at = new Date().toISOString();
|
|
765
|
+
try {
|
|
766
|
+
const pending = parsePiRunnerState(fs.readFileSync(paths.runnerStatePath, "utf8"));
|
|
767
|
+
const exitedState = { ready: false, launchId: args.launchId, lastEntryId: pending?.lastEntryId, updatedAt: at, exited: { code: 127, at } };
|
|
768
|
+
fs.writeFileSync(paths.runnerStatePath, JSON.stringify(exitedState));
|
|
769
|
+
}
|
|
770
|
+
catch { /* the pane ERROR marker still fails readiness */ }
|
|
771
|
+
process.exitCode = 127;
|
|
772
|
+
return;
|
|
773
|
+
}
|
|
774
|
+
command = resolved.path;
|
|
775
|
+
}
|
|
776
|
+
const child = spawn(command, childArgs, {
|
|
535
777
|
cwd: args.cwd,
|
|
536
778
|
env: childEnv,
|
|
537
779
|
stdio: ["pipe", "pipe", "pipe"],
|
|
@@ -550,12 +792,22 @@ export async function main(argv = process.argv.slice(2)) {
|
|
|
550
792
|
return;
|
|
551
793
|
const controller = new AbortController();
|
|
552
794
|
const timeout = setTimeout(() => controller.abort(), 1500);
|
|
553
|
-
fetch(new URL("/api/activity/hooks", endpoint.baseUrl).toString(), {
|
|
795
|
+
const request = fetch(new URL("/api/activity/hooks", endpoint.baseUrl).toString(), {
|
|
554
796
|
method: "POST",
|
|
555
797
|
headers: { "content-type": "application/json", authorization: `Bearer ${endpoint.token}` },
|
|
556
798
|
body: JSON.stringify(payload),
|
|
557
799
|
signal: controller.signal,
|
|
558
|
-
})
|
|
800
|
+
});
|
|
801
|
+
if (runtime !== "omp") {
|
|
802
|
+
request.catch(() => { }).finally(() => clearTimeout(timeout));
|
|
803
|
+
return;
|
|
804
|
+
}
|
|
805
|
+
// OMP reads the acknowledgement so identity delivery can retry; null
|
|
806
|
+
// (transport failure or a non-OK reply) means "not yet persisted".
|
|
807
|
+
return request
|
|
808
|
+
.then(async (response) => response.ok ? await response.json() : null)
|
|
809
|
+
.catch(() => null)
|
|
810
|
+
.finally(() => clearTimeout(timeout));
|
|
559
811
|
},
|
|
560
812
|
writeSidecar: (state) => {
|
|
561
813
|
try {
|
|
@@ -564,30 +816,73 @@ export async function main(argv = process.argv.slice(2)) {
|
|
|
564
816
|
catch { /* best-effort; adapter falls back to pane markers */ }
|
|
565
817
|
},
|
|
566
818
|
now: () => new Date().toISOString(),
|
|
819
|
+
stopChild: () => { child.kill(); },
|
|
820
|
+
sessionFileExists: (path) => fs.existsSync(path),
|
|
567
821
|
};
|
|
568
822
|
const core = new RunnerCore(io, {
|
|
569
823
|
sessionName: args.sessionName, nodeId: process.env.OPENRIG_NODE_ID, launchId: args.launchId,
|
|
570
824
|
// Carry the emitting tenure; never infer it from a later daemon read or Pi event.
|
|
571
825
|
generation: process.env.OPENRIG_OCCUPANT_GENERATION,
|
|
572
|
-
}, { catchUpSince });
|
|
573
|
-
|
|
826
|
+
}, { catchUpSince, runtime });
|
|
827
|
+
let transportUp = runtime === "pi";
|
|
828
|
+
readline.createInterface({ input: child.stdout }).on("line", (line) => {
|
|
829
|
+
if (runtime === "omp" && !core.isReady()) {
|
|
830
|
+
try {
|
|
831
|
+
const frame = JSON.parse(line);
|
|
832
|
+
if (frame.type === "ready") {
|
|
833
|
+
transportUp = true;
|
|
834
|
+
core.start();
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
catch { /* surface non-JSON stdout through the core */ }
|
|
838
|
+
}
|
|
839
|
+
core.handlePiLine(line);
|
|
840
|
+
});
|
|
841
|
+
// Re-deliver OMP identity until the daemon confirms the resume token.
|
|
842
|
+
const identityRetry = runtime === "omp" ? setInterval(() => core.retrySessionIdentity(), IDENTITY_RETRY_MS) : undefined;
|
|
843
|
+
identityRetry?.unref();
|
|
574
844
|
readline.createInterface({ input: child.stderr }).on("line", (line) => {
|
|
575
845
|
if (line.trim())
|
|
576
|
-
process.stdout.write(`[
|
|
846
|
+
process.stdout.write(`[${runtime}:err] ${line}\n`);
|
|
577
847
|
});
|
|
578
848
|
const input = createRunnerInput(process.stdin, process.stdout, (block) => core.handleUserBlock(block));
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
849
|
+
if (runtime === "pi") {
|
|
850
|
+
child.on("error", (err) => {
|
|
851
|
+
console.error(`${PI_RUNNER_ERROR_MARKER} failed to spawn pi: ${err.message}`);
|
|
852
|
+
core.handlePiExit(null);
|
|
853
|
+
input.close();
|
|
854
|
+
process.exitCode = 1;
|
|
855
|
+
});
|
|
856
|
+
child.on("exit", (code) => {
|
|
857
|
+
core.handlePiExit(code);
|
|
858
|
+
input.close();
|
|
859
|
+
process.exitCode = code ?? 1;
|
|
860
|
+
});
|
|
861
|
+
core.start();
|
|
862
|
+
return;
|
|
863
|
+
}
|
|
864
|
+
// OMP: one exit record per launch, with a launch-vs-credential diagnosis
|
|
865
|
+
// when the RPC session never became resumable.
|
|
866
|
+
let exited = false;
|
|
867
|
+
const recordExit = (code) => {
|
|
868
|
+
if (exited)
|
|
869
|
+
return;
|
|
870
|
+
exited = true;
|
|
871
|
+
clearInterval(identityRetry);
|
|
872
|
+
if (!core.isReady()) {
|
|
873
|
+
console.error(transportUp
|
|
874
|
+
? "[omp-runner] ERROR OMP did not establish a resumable RPC session. Authenticate this isolated seat using HOME=<seat-root> PI_CODING_AGENT_DIR=<seat-root>/agent omp and /login, or provide its declared model provider key in the OpenRig daemon environment. Default OMP credentials are not shared."
|
|
875
|
+
: `[omp-runner] ERROR OMP exited before its RPC transport started (${command}, code ${code ?? "unknown"}). This is a launch failure, not a credential problem; see the output above.`);
|
|
876
|
+
}
|
|
586
877
|
core.handlePiExit(code);
|
|
587
878
|
input.close();
|
|
588
879
|
process.exitCode = code ?? 1;
|
|
880
|
+
};
|
|
881
|
+
child.on("error", (err) => {
|
|
882
|
+
console.error(`[omp-runner] ERROR failed to spawn omp: ${err.message}`);
|
|
883
|
+
recordExit(null);
|
|
589
884
|
});
|
|
590
|
-
|
|
885
|
+
child.on("exit", recordExit);
|
|
591
886
|
}
|
|
592
887
|
// Compiled-entry guard: run main() only when executed directly (not imported
|
|
593
888
|
// by tests). import.meta.url === file URL of process.argv[1] when direct.
|