@openrig/cli 0.7.7 → 0.7.9
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 +6 -6
- package/daemon/assets/openshell/Dockerfile +15 -0
- package/daemon/assets/openshell/README.md +139 -0
- package/daemon/assets/openshell/agents/coordinator/agent.yaml +20 -0
- package/daemon/assets/openshell/agents/coordinator/role.md +1 -0
- package/daemon/assets/openshell/agents/worker/agent.yaml +20 -0
- package/daemon/assets/openshell/agents/worker/role.md +3 -0
- package/daemon/assets/openshell/claude-code-provider.yaml +55 -0
- package/daemon/assets/openshell/driver-v1.schema.json +81 -0
- package/daemon/assets/openshell/guest.py +319 -0
- package/daemon/assets/openshell/policy.yaml +33 -0
- package/daemon/assets/openshell/preset.yaml +13 -0
- package/daemon/assets/openshell/rig.yaml +20 -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/skills/seat-continuity-and-handover/SKILL.md +13 -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 +110 -30
- package/daemon/context-packs/reference/getting-started.md +36 -9
- 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 +130 -14
- package/daemon/context-packs/reference/whats-new.md +294 -132
- package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
- package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
- package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-upgrade/SKILL.md +4 -3
- package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-upgrade/scripts/backup-sqlite.mjs +90 -14
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
- package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
- package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/seat-continuity-and-handover/SKILL.md +13 -4
- package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
- package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
- package/daemon/context-packs/world-example/manifest.yaml +1 -1
- package/daemon/context-packs/world-public/manifest.yaml +1 -1
- package/daemon/dist/adapters/claude-code-adapter.d.ts +6 -0
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +51 -74
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts +2 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +19 -7
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +33 -7
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +204 -45
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts +13 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.js +31 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/omp-runtime-adapter.d.ts +5 -0
- package/daemon/dist/adapters/omp-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/omp-runtime-adapter.js +4 -0
- package/daemon/dist/adapters/omp-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/openshell-driver.d.ts +39 -0
- package/daemon/dist/adapters/openshell-driver.d.ts.map +1 -0
- package/daemon/dist/adapters/openshell-driver.js +145 -0
- package/daemon/dist/adapters/openshell-driver.js.map +1 -0
- package/daemon/dist/adapters/openshell-podman-observer.d.ts +30 -0
- package/daemon/dist/adapters/openshell-podman-observer.d.ts.map +1 -0
- package/daemon/dist/adapters/openshell-podman-observer.js +94 -0
- package/daemon/dist/adapters/openshell-podman-observer.js.map +1 -0
- package/daemon/dist/adapters/pi-openrouter-charge.d.ts +1 -0
- package/daemon/dist/adapters/pi-openrouter-charge.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-openrouter-charge.js +17 -3
- package/daemon/dist/adapters/pi-openrouter-charge.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +39 -5
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +97 -19
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts +22 -0
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.js +39 -8
- package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/preflight-exec.d.ts +2 -0
- package/daemon/dist/adapters/preflight-exec.d.ts.map +1 -1
- package/daemon/dist/adapters/preflight-exec.js +3 -1
- package/daemon/dist/adapters/preflight-exec.js.map +1 -1
- package/daemon/dist/adapters/stub-runtime-adapter.d.ts +5 -0
- package/daemon/dist/adapters/stub-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/stub-runtime-adapter.js +7 -4
- package/daemon/dist/adapters/stub-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/tmux-control.d.ts +12 -6
- package/daemon/dist/adapters/tmux-control.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-control.js +42 -21
- package/daemon/dist/adapters/tmux-control.js.map +1 -1
- package/daemon/dist/adapters/tmux-exec.d.ts +3 -0
- package/daemon/dist/adapters/tmux-exec.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-exec.js +35 -1
- package/daemon/dist/adapters/tmux-exec.js.map +1 -1
- package/daemon/dist/adapters/tmux-server.d.ts +6 -3
- package/daemon/dist/adapters/tmux-server.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-server.js +13 -8
- package/daemon/dist/adapters/tmux-server.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +11 -2
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +66 -14
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +16 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/142_node_claude_mcp.d.ts +3 -0
- package/daemon/dist/db/migrations/142_node_claude_mcp.d.ts.map +1 -0
- package/daemon/dist/db/migrations/142_node_claude_mcp.js +5 -0
- package/daemon/dist/db/migrations/142_node_claude_mcp.js.map +1 -0
- package/daemon/dist/db/migrations/143_activity_grants.d.ts +8 -0
- package/daemon/dist/db/migrations/143_activity_grants.d.ts.map +1 -0
- package/daemon/dist/db/migrations/143_activity_grants.js +22 -0
- package/daemon/dist/db/migrations/143_activity_grants.js.map +1 -0
- package/daemon/dist/db/migrations/144_environment_bindings.d.ts +4 -0
- package/daemon/dist/db/migrations/144_environment_bindings.d.ts.map +1 -0
- package/daemon/dist/db/migrations/144_environment_bindings.js +31 -0
- package/daemon/dist/db/migrations/144_environment_bindings.js.map +1 -0
- package/daemon/dist/db/migrations/145_node_permissions_to.d.ts +5 -0
- package/daemon/dist/db/migrations/145_node_permissions_to.d.ts.map +1 -0
- package/daemon/dist/db/migrations/145_node_permissions_to.js +7 -0
- package/daemon/dist/db/migrations/145_node_permissions_to.js.map +1 -0
- package/daemon/dist/db/migrations/146_node_startup_guidance_file.d.ts +6 -0
- package/daemon/dist/db/migrations/146_node_startup_guidance_file.d.ts.map +1 -0
- package/daemon/dist/db/migrations/146_node_startup_guidance_file.js +8 -0
- package/daemon/dist/db/migrations/146_node_startup_guidance_file.js.map +1 -0
- package/daemon/dist/db/migrations/147_managed_block_writes.d.ts +9 -0
- package/daemon/dist/db/migrations/147_managed_block_writes.d.ts.map +1 -0
- package/daemon/dist/db/migrations/147_managed_block_writes.js +19 -0
- package/daemon/dist/db/migrations/147_managed_block_writes.js.map +1 -0
- package/daemon/dist/db/migrations/148_outbox_dispatched_index.d.ts +8 -0
- package/daemon/dist/db/migrations/148_outbox_dispatched_index.d.ts.map +1 -0
- package/daemon/dist/db/migrations/148_outbox_dispatched_index.js +12 -0
- package/daemon/dist/db/migrations/148_outbox_dispatched_index.js.map +1 -0
- package/daemon/dist/db/migrations/149_stream_intake_cursor.d.ts +4 -0
- package/daemon/dist/db/migrations/149_stream_intake_cursor.d.ts.map +1 -0
- package/daemon/dist/db/migrations/149_stream_intake_cursor.js +14 -0
- package/daemon/dist/db/migrations/149_stream_intake_cursor.js.map +1 -0
- package/daemon/dist/domain/active-occupant.d.ts +2 -0
- package/daemon/dist/domain/active-occupant.d.ts.map +1 -1
- package/daemon/dist/domain/active-occupant.js +9 -1
- package/daemon/dist/domain/active-occupant.js.map +1 -1
- package/daemon/dist/domain/activity-grants.d.ts +63 -0
- package/daemon/dist/domain/activity-grants.d.ts.map +1 -0
- package/daemon/dist/domain/activity-grants.js +106 -0
- package/daemon/dist/domain/activity-grants.js.map +1 -0
- package/daemon/dist/domain/activity-taxonomy.d.ts +3 -0
- package/daemon/dist/domain/activity-taxonomy.d.ts.map +1 -1
- package/daemon/dist/domain/activity-taxonomy.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 +5 -2
- package/daemon/dist/domain/agent-images/agent-image-library-service.js.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.js +3 -1
- 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 +40 -4
- package/daemon/dist/domain/bundle-archive.js.map +1 -1
- package/daemon/dist/domain/bundle-behaviour.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-behaviour.js +7 -0
- package/daemon/dist/domain/bundle-behaviour.js.map +1 -1
- package/daemon/dist/domain/bundle-content-routing.d.ts +1 -0
- package/daemon/dist/domain/bundle-content-routing.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-content-routing.js +3 -1
- package/daemon/dist/domain/bundle-content-routing.js.map +1 -1
- package/daemon/dist/domain/bundle-source-resolver.d.ts +2 -0
- package/daemon/dist/domain/bundle-source-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-source-resolver.js +4 -4
- package/daemon/dist/domain/bundle-source-resolver.js.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +12 -5
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +47 -18
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/claude-mcp.d.ts +10 -0
- package/daemon/dist/domain/claude-mcp.d.ts.map +1 -0
- package/daemon/dist/domain/claude-mcp.js +19 -0
- package/daemon/dist/domain/claude-mcp.js.map +1 -0
- package/daemon/dist/domain/claude-owned-settings.d.ts +19 -0
- package/daemon/dist/domain/claude-owned-settings.d.ts.map +1 -0
- package/daemon/dist/domain/claude-owned-settings.js +160 -0
- package/daemon/dist/domain/claude-owned-settings.js.map +1 -0
- package/daemon/dist/domain/claude-plugin-channels.d.ts +2 -0
- package/daemon/dist/domain/claude-plugin-channels.d.ts.map +1 -0
- package/daemon/dist/domain/claude-plugin-channels.js +12 -0
- package/daemon/dist/domain/claude-plugin-channels.js.map +1 -0
- package/daemon/dist/domain/claude-theme-menu.d.ts +5 -0
- package/daemon/dist/domain/claude-theme-menu.d.ts.map +1 -0
- package/daemon/dist/domain/claude-theme-menu.js +43 -0
- package/daemon/dist/domain/claude-theme-menu.js.map +1 -0
- package/daemon/dist/domain/codex-owned-plugin-trust.d.ts.map +1 -1
- package/daemon/dist/domain/codex-owned-plugin-trust.js +2 -1
- package/daemon/dist/domain/codex-owned-plugin-trust.js.map +1 -1
- package/daemon/dist/domain/codex-pane-patterns.d.ts +1 -0
- package/daemon/dist/domain/codex-pane-patterns.d.ts.map +1 -1
- package/daemon/dist/domain/codex-pane-patterns.js +2 -0
- package/daemon/dist/domain/codex-pane-patterns.js.map +1 -1
- package/daemon/dist/domain/community-harness-presets.d.ts +2 -1
- package/daemon/dist/domain/community-harness-presets.d.ts.map +1 -1
- package/daemon/dist/domain/community-harness-presets.js +3 -2
- package/daemon/dist/domain/community-harness-presets.js.map +1 -1
- package/daemon/dist/domain/composer-prompts.d.ts +2 -0
- package/daemon/dist/domain/composer-prompts.d.ts.map +1 -1
- package/daemon/dist/domain/composer-prompts.js +3 -2
- package/daemon/dist/domain/composer-prompts.js.map +1 -1
- package/daemon/dist/domain/context-monitor.d.ts +2 -2
- package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/context-monitor.js +8 -2
- package/daemon/dist/domain/context-monitor.js.map +1 -1
- package/daemon/dist/domain/desired-claude-activity-hooks.d.ts +25 -0
- package/daemon/dist/domain/desired-claude-activity-hooks.d.ts.map +1 -0
- package/daemon/dist/domain/desired-claude-activity-hooks.js +86 -0
- package/daemon/dist/domain/desired-claude-activity-hooks.js.map +1 -0
- package/daemon/dist/domain/draft-aware-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/draft-aware-delivery.js +14 -4
- package/daemon/dist/domain/draft-aware-delivery.js.map +1 -1
- package/daemon/dist/domain/environment-artifacts.d.ts +49 -0
- package/daemon/dist/domain/environment-artifacts.d.ts.map +1 -0
- package/daemon/dist/domain/environment-artifacts.js +158 -0
- package/daemon/dist/domain/environment-artifacts.js.map +1 -0
- package/daemon/dist/domain/environment-lifecycle.d.ts +126 -0
- package/daemon/dist/domain/environment-lifecycle.d.ts.map +1 -0
- package/daemon/dist/domain/environment-lifecycle.js +474 -0
- package/daemon/dist/domain/environment-lifecycle.js.map +1 -0
- package/daemon/dist/domain/environment-platform.d.ts +121 -0
- package/daemon/dist/domain/environment-platform.d.ts.map +1 -0
- package/daemon/dist/domain/environment-platform.js +280 -0
- package/daemon/dist/domain/environment-platform.js.map +1 -0
- package/daemon/dist/domain/environment-startup.d.ts +43 -0
- package/daemon/dist/domain/environment-startup.d.ts.map +1 -0
- package/daemon/dist/domain/environment-startup.js +307 -0
- package/daemon/dist/domain/environment-startup.js.map +1 -0
- package/daemon/dist/domain/expected-conversation.d.ts +20 -0
- package/daemon/dist/domain/expected-conversation.d.ts.map +1 -0
- package/daemon/dist/domain/expected-conversation.js +101 -0
- package/daemon/dist/domain/expected-conversation.js.map +1 -0
- package/daemon/dist/domain/gateway/human-readiness.d.ts +2 -1
- package/daemon/dist/domain/gateway/human-readiness.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/human-readiness.js +6 -0
- package/daemon/dist/domain/gateway/human-readiness.js.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.d.ts +2 -1
- package/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.js +9 -7
- package/daemon/dist/domain/gateway/human-registry.js.map +1 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.d.ts +8 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.js +61 -4
- package/daemon/dist/domain/gateway/operator-delivery-engine.js.map +1 -1
- package/daemon/dist/domain/gateway/participants.d.ts +26 -0
- package/daemon/dist/domain/gateway/participants.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/participants.js +15 -0
- package/daemon/dist/domain/gateway/participants.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts +2 -0
- package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.js +59 -11
- package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.d.ts +19 -0
- package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.js +219 -9
- package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts +15 -0
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.js +24 -5
- package/daemon/dist/domain/gateway/slack/queue-access.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/recovery-budget.d.ts +1 -0
- package/daemon/dist/domain/gateway/slack/recovery-budget.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/recovery-budget.js +1 -0
- package/daemon/dist/domain/gateway/slack/recovery-budget.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/settled-asks.d.ts +37 -0
- package/daemon/dist/domain/gateway/slack/settled-asks.d.ts.map +1 -0
- package/daemon/dist/domain/gateway/slack/settled-asks.js +276 -0
- package/daemon/dist/domain/gateway/slack/settled-asks.js.map +1 -0
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts +32 -0
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.js +40 -2
- package/daemon/dist/domain/gateway/slack/slack-api.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.js +9 -4
- package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts +2 -0
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js +35 -6
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
- package/daemon/dist/domain/hosts/hosts-registry-writer.d.ts +22 -0
- package/daemon/dist/domain/hosts/hosts-registry-writer.d.ts.map +1 -1
- package/daemon/dist/domain/hosts/hosts-registry-writer.js +116 -0
- package/daemon/dist/domain/hosts/hosts-registry-writer.js.map +1 -1
- package/daemon/dist/domain/human-questions.d.ts +3 -1
- package/daemon/dist/domain/human-questions.d.ts.map +1 -1
- package/daemon/dist/domain/human-questions.js.map +1 -1
- package/daemon/dist/domain/kernel-boot-tracker.d.ts +3 -2
- package/daemon/dist/domain/kernel-boot-tracker.d.ts.map +1 -1
- package/daemon/dist/domain/kernel-boot-tracker.js +2 -1
- package/daemon/dist/domain/kernel-boot-tracker.js.map +1 -1
- package/daemon/dist/domain/kernel-boot.d.ts +11 -6
- package/daemon/dist/domain/kernel-boot.d.ts.map +1 -1
- package/daemon/dist/domain/kernel-boot.js +27 -5
- package/daemon/dist/domain/kernel-boot.js.map +1 -1
- package/daemon/dist/domain/kernel-hook-review.d.ts +18 -0
- package/daemon/dist/domain/kernel-hook-review.d.ts.map +1 -0
- package/daemon/dist/domain/kernel-hook-review.js +58 -0
- package/daemon/dist/domain/kernel-hook-review.js.map +1 -0
- package/daemon/dist/domain/managed-block-records.d.ts +54 -0
- package/daemon/dist/domain/managed-block-records.d.ts.map +1 -0
- package/daemon/dist/domain/managed-block-records.js +130 -0
- package/daemon/dist/domain/managed-block-records.js.map +1 -0
- package/daemon/dist/domain/managed-blocks.d.ts +14 -0
- package/daemon/dist/domain/managed-blocks.d.ts.map +1 -1
- package/daemon/dist/domain/managed-blocks.js +24 -4
- package/daemon/dist/domain/managed-blocks.js.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts +29 -10
- package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js +116 -29
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
- package/daemon/dist/domain/model-divergence/current-generation-record.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/current-generation-record.js +10 -6
- package/daemon/dist/domain/model-divergence/current-generation-record.js.map +1 -1
- package/daemon/dist/domain/native-process-lineage.d.ts +5 -1
- package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-lineage.js +91 -6
- package/daemon/dist/domain/native-process-lineage.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe.d.ts +2 -1
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +4 -2
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts +1 -0
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +42 -10
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +3 -0
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +6 -0
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/outbox-handler.d.ts +17 -0
- package/daemon/dist/domain/outbox-handler.d.ts.map +1 -1
- package/daemon/dist/domain/outbox-handler.js +60 -3
- package/daemon/dist/domain/outbox-handler.js.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts +10 -0
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.js +60 -4
- package/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -1
- package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/profile-resolver.js +7 -1
- package/daemon/dist/domain/profile-resolver.js.map +1 -1
- package/daemon/dist/domain/provider/claude-seat-switch.d.ts +9 -3
- package/daemon/dist/domain/provider/claude-seat-switch.d.ts.map +1 -1
- package/daemon/dist/domain/provider/claude-seat-switch.js +100 -17
- package/daemon/dist/domain/provider/claude-seat-switch.js.map +1 -1
- package/daemon/dist/domain/provider/provider-service-impl.js +1 -1
- package/daemon/dist/domain/provider/provider-service-impl.js.map +1 -1
- package/daemon/dist/domain/provider/provider-service.d.ts +32 -2
- package/daemon/dist/domain/provider/provider-service.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-types.d.ts +1 -1
- package/daemon/dist/domain/provider/provider-types.d.ts.map +1 -1
- package/daemon/dist/domain/queue-recovery.d.ts +1 -1
- package/daemon/dist/domain/queue-recovery.d.ts.map +1 -1
- package/daemon/dist/domain/queue-recovery.js +6 -2
- package/daemon/dist/domain/queue-recovery.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +64 -8
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +309 -76
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +59 -4
- package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
- package/daemon/dist/domain/queue-transition-log.d.ts +2 -0
- package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
- package/daemon/dist/domain/queue-transition-log.js +9 -0
- package/daemon/dist/domain/queue-transition-log.js.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.d.ts +3 -0
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +124 -25
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/restore-check-service.d.ts +2 -7
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/restore-guidance.d.ts +70 -7
- package/daemon/dist/domain/restore-guidance.d.ts.map +1 -1
- package/daemon/dist/domain/restore-guidance.js +181 -18
- package/daemon/dist/domain/restore-guidance.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +40 -3
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +276 -33
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.d.ts +2 -1
- package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.js +20 -6
- package/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
- package/daemon/dist/domain/rig-expansion-service.js +1 -1
- package/daemon/dist/domain/rig-expansion-service.js.map +1 -1
- package/daemon/dist/domain/rig-repository.d.ts +14 -0
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +57 -1
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rig-teardown.d.ts +18 -0
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +73 -17
- 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 +8 -0
- package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.js +66 -3
- package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +7 -4
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +38 -11
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts +4 -0
- package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.js +35 -1
- package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
- package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +56 -6
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/runner-permissions.d.ts +150 -0
- package/daemon/dist/domain/runner-permissions.d.ts.map +1 -0
- package/daemon/dist/domain/runner-permissions.js +383 -0
- package/daemon/dist/domain/runner-permissions.js.map +1 -0
- package/daemon/dist/domain/runtime-adapter.d.ts +28 -0
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-adapter.js.map +1 -1
- package/daemon/dist/domain/runtime-switch-materials.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-switch-materials.js +3 -0
- package/daemon/dist/domain/runtime-switch-materials.js.map +1 -1
- package/daemon/dist/domain/runtime-verifier.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-verifier.js +9 -4
- package/daemon/dist/domain/runtime-verifier.js.map +1 -1
- package/daemon/dist/domain/scope/scope-audit.d.ts +1 -1
- package/daemon/dist/domain/scope/scope-audit.d.ts.map +1 -1
- package/daemon/dist/domain/scope/scope-audit.js.map +1 -1
- package/daemon/dist/domain/scope/types.d.ts +3 -0
- package/daemon/dist/domain/scope/types.d.ts.map +1 -1
- package/daemon/dist/domain/scope/types.js.map +1 -1
- package/daemon/dist/domain/seat-activity-service.d.ts +7 -0
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-activity-service.js +47 -7
- package/daemon/dist/domain/seat-activity-service.js.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.js +8 -1
- package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.d.ts +22 -4
- package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.js +80 -11
- package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
- package/daemon/dist/domain/seat-effort.d.ts +6 -0
- package/daemon/dist/domain/seat-effort.d.ts.map +1 -1
- package/daemon/dist/domain/seat-effort.js +0 -2
- package/daemon/dist/domain/seat-effort.js.map +1 -1
- package/daemon/dist/domain/seat-handover-planner.js +1 -1
- package/daemon/dist/domain/seat-handover-planner.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts +25 -10
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +164 -31
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-launch-additions.d.ts +6 -0
- package/daemon/dist/domain/seat-launch-additions.d.ts.map +1 -1
- package/daemon/dist/domain/seat-launch-additions.js +41 -11
- package/daemon/dist/domain/seat-launch-additions.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +24 -2
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +65 -2
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.js +6 -1
- package/daemon/dist/domain/seat-restart-in-place.js.map +1 -1
- package/daemon/dist/domain/seat-runtime-switch-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-runtime-switch-service.js +21 -3
- package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -1
- package/daemon/dist/domain/seat-skill-storage.d.ts +8 -6
- package/daemon/dist/domain/seat-skill-storage.d.ts.map +1 -1
- package/daemon/dist/domain/seat-skill-storage.js +27 -7
- package/daemon/dist/domain/seat-skill-storage.js.map +1 -1
- package/daemon/dist/domain/seat-status-service.d.ts +5 -0
- package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-status-service.js +9 -0
- package/daemon/dist/domain/seat-status-service.js.map +1 -1
- package/daemon/dist/domain/seat-structural-activity-service.d.ts +15 -5
- package/daemon/dist/domain/seat-structural-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-structural-activity-service.js +21 -7
- package/daemon/dist/domain/seat-structural-activity-service.js.map +1 -1
- package/daemon/dist/domain/self-attach-service.d.ts +8 -1
- package/daemon/dist/domain/self-attach-service.d.ts.map +1 -1
- package/daemon/dist/domain/self-attach-service.js +26 -0
- package/daemon/dist/domain/self-attach-service.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +17 -0
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +247 -31
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/snapshot-capture.d.ts.map +1 -1
- package/daemon/dist/domain/snapshot-capture.js +15 -0
- package/daemon/dist/domain/snapshot-capture.js.map +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.d.ts +2 -0
- package/daemon/dist/domain/spec-library-workflow-scanner.d.ts.map +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.js +5 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts +1 -0
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +106 -8
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/stream-intake.d.ts +51 -0
- package/daemon/dist/domain/stream-intake.d.ts.map +1 -0
- package/daemon/dist/domain/stream-intake.js +438 -0
- package/daemon/dist/domain/stream-intake.js.map +1 -0
- package/daemon/dist/domain/successor-session-launcher.d.ts +3 -0
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +2 -0
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.js +4 -3
- package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-follow-view.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-follow-view.js +22 -4
- package/daemon/dist/domain/terminal/herdr-follow-view.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-viewer.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-viewer.js +8 -4
- package/daemon/dist/domain/terminal/herdr-viewer.js.map +1 -1
- package/daemon/dist/domain/terminal/login-shell.d.ts +10 -0
- package/daemon/dist/domain/terminal/login-shell.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/login-shell.js +37 -0
- package/daemon/dist/domain/terminal/login-shell.js.map +1 -0
- package/daemon/dist/domain/terminal/rex-layout.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/rex-layout.js +2 -1
- package/daemon/dist/domain/terminal/rex-layout.js.map +1 -1
- package/daemon/dist/domain/terminal/scope-task-terminal-view.d.ts +12 -1
- package/daemon/dist/domain/terminal/scope-task-terminal-view.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/scope-task-terminal-view.js +120 -18
- package/daemon/dist/domain/terminal/scope-task-terminal-view.js.map +1 -1
- package/daemon/dist/domain/terminal/terminal-following.js +1 -1
- package/daemon/dist/domain/terminal/terminal-following.js.map +1 -1
- package/daemon/dist/domain/terminal/terminal-provider.d.ts +2 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.d.ts +3 -2
- package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.js +18 -27
- package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
- package/daemon/dist/domain/terminal/tile-attach.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/tile-attach.js +15 -5
- package/daemon/dist/domain/terminal/tile-attach.js.map +1 -1
- package/daemon/dist/domain/terminal/view-composer.d.ts +6 -3
- package/daemon/dist/domain/terminal/view-composer.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/view-composer.js +15 -5
- package/daemon/dist/domain/terminal/view-composer.js.map +1 -1
- package/daemon/dist/domain/tmux-server-selection.d.ts +47 -0
- package/daemon/dist/domain/tmux-server-selection.d.ts.map +1 -0
- package/daemon/dist/domain/tmux-server-selection.js +220 -0
- package/daemon/dist/domain/tmux-server-selection.js.map +1 -0
- package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-store.js +19 -10
- package/daemon/dist/domain/transcript-store.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +54 -0
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-browser.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-browser.js +3 -1
- package/daemon/dist/domain/user-settings/settings-browser.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.js +23 -0
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/watchdog-delivery-receipts.d.ts +11 -0
- package/daemon/dist/domain/watchdog-delivery-receipts.d.ts.map +1 -0
- package/daemon/dist/domain/watchdog-delivery-receipts.js +134 -0
- package/daemon/dist/domain/watchdog-delivery-receipts.js.map +1 -0
- package/daemon/dist/domain/watchdog-delivery.d.ts +7 -1
- package/daemon/dist/domain/watchdog-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-delivery.js +24 -8
- package/daemon/dist/domain/watchdog-delivery.js.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts +21 -2
- package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.js +52 -23
- package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
- package/daemon/dist/domain/workflow-projector.js +3 -3
- package/daemon/dist/domain/workflow-projector.js.map +1 -1
- package/daemon/dist/domain/workflow-runtime.d.ts +1 -1
- package/daemon/dist/domain/workflow-runtime.js +3 -3
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/domain/working-liveness.d.ts +66 -0
- package/daemon/dist/domain/working-liveness.d.ts.map +1 -0
- package/daemon/dist/domain/working-liveness.js +94 -0
- package/daemon/dist/domain/working-liveness.js.map +1 -0
- package/daemon/dist/domain/workspace/frontmatter-validator.js +4 -2
- package/daemon/dist/domain/workspace/frontmatter-validator.js.map +1 -1
- package/daemon/dist/index.d.ts +4 -0
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +17 -0
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/lib/pane-envelope.d.ts.map +1 -1
- package/daemon/dist/lib/pane-envelope.js +9 -3
- package/daemon/dist/lib/pane-envelope.js.map +1 -1
- package/daemon/dist/middleware/auth-bearer-token.js +2 -2
- package/daemon/dist/middleware/auth-bearer-token.js.map +1 -1
- package/daemon/dist/routes/activity.d.ts +6 -0
- package/daemon/dist/routes/activity.d.ts.map +1 -1
- package/daemon/dist/routes/activity.js +317 -22
- 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 +17 -5
- package/daemon/dist/routes/attention.js.map +1 -1
- package/daemon/dist/routes/bundles.js +3 -1
- package/daemon/dist/routes/bundles.js.map +1 -1
- package/daemon/dist/routes/compaction.js +4 -2
- package/daemon/dist/routes/compaction.js.map +1 -1
- package/daemon/dist/routes/environments.d.ts +3 -0
- package/daemon/dist/routes/environments.d.ts.map +1 -0
- package/daemon/dist/routes/environments.js +104 -0
- package/daemon/dist/routes/environments.js.map +1 -0
- package/daemon/dist/routes/gateway.d.ts +6 -0
- package/daemon/dist/routes/gateway.d.ts.map +1 -1
- package/daemon/dist/routes/gateway.js +39 -0
- 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 +106 -8
- 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 -1
- package/daemon/dist/routes/mission-control.js.map +1 -1
- package/daemon/dist/routes/provider.d.ts.map +1 -1
- package/daemon/dist/routes/provider.js +53 -7
- package/daemon/dist/routes/provider.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +21 -2
- 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 +5 -19
- package/daemon/dist/routes/restore-check.js.map +1 -1
- package/daemon/dist/routes/rigs.js +3 -0
- 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 +8 -3
- package/daemon/dist/routes/rigspec.js.map +1 -1
- package/daemon/dist/routes/scope-audit.d.ts.map +1 -1
- package/daemon/dist/routes/scope-audit.js +30 -0
- package/daemon/dist/routes/scope-audit.js.map +1 -1
- package/daemon/dist/routes/seat.d.ts.map +1 -1
- package/daemon/dist/routes/seat.js +32 -5
- package/daemon/dist/routes/seat.js.map +1 -1
- package/daemon/dist/routes/sessions.d.ts.map +1 -1
- package/daemon/dist/routes/sessions.js +66 -20
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/spec-library.d.ts.map +1 -1
- package/daemon/dist/routes/spec-library.js +60 -5
- package/daemon/dist/routes/spec-library.js.map +1 -1
- package/daemon/dist/routes/startup.js +2 -2
- package/daemon/dist/routes/startup.js.map +1 -1
- package/daemon/dist/routes/transport.d.ts.map +1 -1
- package/daemon/dist/routes/transport.js +31 -5
- package/daemon/dist/routes/transport.js.map +1 -1
- package/daemon/dist/server.d.ts +7 -0
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +57 -1
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/startup.d.ts +2 -0
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +90 -37
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/docs/reference/agent-spec.md +1 -1
- package/daemon/docs/reference/agent-startup-guide.md +119 -3
- package/daemon/docs/reference/agent-state-taxonomy.md +23 -2
- package/daemon/docs/reference/author-contracts.md +9 -9
- package/daemon/docs/reference/checked-seat-stop.md +12 -1
- package/daemon/docs/reference/community-harness-examples/dsh/README.md +96 -0
- package/daemon/docs/reference/community-harness-examples/dsh/dsh.yaml +20 -0
- package/daemon/docs/reference/community-harness-examples/dsh/openrig-dsh-runner.mjs +626 -0
- package/daemon/docs/reference/community-harness-examples/openshell/README.md +5 -0
- package/daemon/docs/reference/community-harness-presets.md +25 -1
- package/daemon/docs/reference/daemon-http-clients.md +203 -0
- package/daemon/docs/reference/execution-platform-contract.md +1 -1
- package/daemon/docs/reference/gateway-participants.md +29 -17
- package/daemon/docs/reference/getting-started.md +36 -9
- package/daemon/docs/reference/harness-runner-contract.md +235 -26
- package/daemon/docs/reference/hosted-members.md +32 -0
- package/daemon/docs/reference/instance-layout.md +11 -0
- package/daemon/docs/reference/keeping-a-watch.md +22 -0
- package/daemon/docs/reference/pi-tool-selection-recovery.md +84 -0
- package/daemon/docs/reference/quickstart.md +9 -4
- package/daemon/docs/reference/rig-bundle.md +2 -2
- package/daemon/docs/reference/rig-spec.md +130 -14
- package/daemon/docs/reference/runner-conformance/README.md +77 -0
- package/daemon/docs/reference/runner-conformance/check-runner.mjs +818 -0
- package/daemon/docs/reference/runner-conformance/fake-acp-agent.mjs +150 -0
- package/daemon/docs/reference/sdlc-conventions.md +22 -3
- package/daemon/docs/reference/seat-delivery.md +31 -6
- package/daemon/docs/reference/slack-app-setup.md +55 -5
- package/daemon/docs/reference/terminal-sessions.md +100 -14
- package/daemon/docs/reference/tmux-servers.md +166 -0
- package/daemon/docs/reference/whats-new.md +294 -132
- package/daemon/specs/agents/shared/skills/core/openrig-upgrade/SKILL.md +4 -3
- package/daemon/specs/agents/shared/skills/core/openrig-upgrade/scripts/backup-sqlite.mjs +90 -14
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +2 -1
- package/daemon/specs/rigs/launch/kernel/agents/queue/worker/guidance/role.md +1 -1
- package/dist/acp/connector.d.ts.map +1 -1
- package/dist/acp/connector.js +6 -1
- package/dist/acp/connector.js.map +1 -1
- package/dist/atomic-text-write.d.ts +2 -0
- package/dist/atomic-text-write.d.ts.map +1 -1
- package/dist/atomic-text-write.js +17 -0
- package/dist/atomic-text-write.js.map +1 -1
- package/dist/build-info.js +3 -3
- package/dist/client.d.ts +3 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +28 -0
- package/dist/client.js.map +1 -1
- package/dist/commands/attach.d.ts +1 -0
- package/dist/commands/attach.d.ts.map +1 -1
- package/dist/commands/attach.js +8 -2
- package/dist/commands/attach.js.map +1 -1
- package/dist/commands/broadcast.js +2 -1
- package/dist/commands/broadcast.js.map +1 -1
- package/dist/commands/compact.d.ts.map +1 -1
- package/dist/commands/compact.js +7 -4
- package/dist/commands/compact.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +9 -3
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +1 -0
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +7 -1
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/destroy.d.ts.map +1 -1
- package/dist/commands/destroy.js +2 -0
- package/dist/commands/destroy.js.map +1 -1
- package/dist/commands/doctor.d.ts +8 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +126 -10
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +10 -0
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/env.js +10 -4
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/environment.d.ts +8 -0
- package/dist/commands/environment.d.ts.map +1 -0
- package/dist/commands/environment.js +197 -0
- package/dist/commands/environment.js.map +1 -0
- package/dist/commands/export.d.ts +2 -0
- package/dist/commands/export.d.ts.map +1 -1
- package/dist/commands/export.js +31 -7
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/gateway.js +15 -11
- package/dist/commands/gateway.js.map +1 -1
- package/dist/commands/host.d.ts +13 -6
- package/dist/commands/host.d.ts.map +1 -1
- package/dist/commands/host.js +112 -15
- package/dist/commands/host.js.map +1 -1
- package/dist/commands/project-jev.js +1 -1
- package/dist/commands/project-jev.js.map +1 -1
- package/dist/commands/provider.d.ts.map +1 -1
- package/dist/commands/provider.js +12 -5
- package/dist/commands/provider.js.map +1 -1
- package/dist/commands/ps.d.ts +2 -0
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +12 -3
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts +1 -0
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +50 -6
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/scope.d.ts.map +1 -1
- package/dist/commands/scope.js +36 -2
- package/dist/commands/scope.js.map +1 -1
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +85 -8
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +46 -16
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +18 -0
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/slack.d.ts.map +1 -1
- package/dist/commands/slack.js +5 -0
- package/dist/commands/slack.js.map +1 -1
- package/dist/commands/specs.d.ts +1 -1
- package/dist/commands/specs.d.ts.map +1 -1
- package/dist/commands/specs.js +44 -10
- package/dist/commands/specs.js.map +1 -1
- package/dist/commands/stream.d.ts.map +1 -1
- package/dist/commands/stream.js +6 -1
- package/dist/commands/stream.js.map +1 -1
- package/dist/commands/terminal.d.ts +2 -0
- package/dist/commands/terminal.d.ts.map +1 -1
- package/dist/commands/terminal.js +31 -2
- package/dist/commands/terminal.js.map +1 -1
- package/dist/commands/topology-default-agent.js +1 -1
- package/dist/commands/topology-default-agent.js.map +1 -1
- package/dist/commands/tui.d.ts +3 -2
- package/dist/commands/tui.d.ts.map +1 -1
- package/dist/commands/tui.js.map +1 -1
- package/dist/commands/walk.d.ts.map +1 -1
- package/dist/commands/walk.js +27 -10
- package/dist/commands/walk.js.map +1 -1
- package/dist/commands/workspace.d.ts.map +1 -1
- package/dist/commands/workspace.js +8 -1
- package/dist/commands/workspace.js.map +1 -1
- package/dist/config-store.d.ts +9 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +33 -2
- package/dist/config-store.js.map +1 -1
- package/dist/cross-host-target.d.ts.map +1 -1
- package/dist/cross-host-target.js +3 -1
- package/dist/cross-host-target.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts +6 -0
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +66 -4
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/daemon-reachability.d.ts +2 -1
- package/dist/daemon-reachability.d.ts.map +1 -1
- package/dist/daemon-reachability.js +3 -2
- package/dist/daemon-reachability.js.map +1 -1
- package/dist/destroy-helpers.d.ts +3 -2
- package/dist/destroy-helpers.d.ts.map +1 -1
- package/dist/destroy-helpers.js +6 -3
- package/dist/destroy-helpers.js.map +1 -1
- package/dist/host-bindings.js +1 -1
- package/dist/host-bindings.js.map +1 -1
- package/dist/host-registry.d.ts +22 -0
- package/dist/host-registry.d.ts.map +1 -1
- package/dist/host-registry.js +121 -0
- package/dist/host-registry.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lazy-program.d.ts.map +1 -1
- package/dist/lazy-program.js +1 -0
- package/dist/lazy-program.js.map +1 -1
- package/dist/lib/scope/progress-edit.d.ts.map +1 -1
- package/dist/lib/scope/progress-edit.js +37 -7
- package/dist/lib/scope/progress-edit.js.map +1 -1
- package/dist/lib/scope/scope-audit.d.ts +1 -1
- package/dist/lib/scope/scope-audit.d.ts.map +1 -1
- package/dist/lib/scope/scope-audit.js.map +1 -1
- package/dist/lib/scope/scope-fs.d.ts +3 -0
- package/dist/lib/scope/scope-fs.d.ts.map +1 -1
- package/dist/lib/scope/scope-fs.js +39 -53
- package/dist/lib/scope/scope-fs.js.map +1 -1
- package/dist/lib/scope/types.d.ts +3 -0
- package/dist/lib/scope/types.d.ts.map +1 -1
- package/dist/lib/scope/types.js.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +89 -18
- package/dist/mcp-server.js.map +1 -1
- package/dist/openrig-compat.d.ts +1 -1
- package/dist/openrig-compat.d.ts.map +1 -1
- package/dist/openrig-compat.js +2 -2
- package/dist/openrig-compat.js.map +1 -1
- package/dist/seat-launch-additions-lines.d.ts +2 -0
- package/dist/seat-launch-additions-lines.d.ts.map +1 -1
- package/dist/seat-launch-additions-lines.js +1 -0
- package/dist/seat-launch-additions-lines.js.map +1 -1
- package/dist/shared-tui.d.ts +4 -2
- package/dist/shared-tui.d.ts.map +1 -1
- package/dist/shared-tui.js +4 -11
- package/dist/shared-tui.js.map +1 -1
- package/dist/terminal-window.d.ts.map +1 -1
- package/dist/terminal-window.js +34 -29
- package/dist/terminal-window.js.map +1 -1
- package/dist/tmux-attachment.d.ts +17 -0
- package/dist/tmux-attachment.d.ts.map +1 -0
- package/dist/tmux-attachment.js +89 -0
- package/dist/tmux-attachment.js.map +1 -0
- package/package.json +2 -2
- package/tui/dist/attention/attention-model.d.ts +3 -2
- package/tui/dist/attention/attention-model.d.ts.map +1 -1
- package/tui/dist/attention/attention-model.js +7 -4
- package/tui/dist/attention/attention-model.js.map +1 -1
- package/tui/dist/daemon-client.d.ts +4 -4
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +6 -5
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +16 -5
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/pulse/pulse-model.d.ts +1 -1
- package/tui/dist/pulse/pulse-model.d.ts.map +1 -1
- package/tui/dist/pulse/pulse-model.js +6 -17
- package/tui/dist/pulse/pulse-model.js.map +1 -1
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +8 -2
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/terminals/terminal-model.d.ts.map +1 -1
- package/tui/dist/terminals/terminal-model.js +2 -1
- package/tui/dist/terminals/terminal-model.js.map +1 -1
- package/tui/dist/theme.d.ts.map +1 -1
- package/tui/dist/theme.js +7 -2
- package/tui/dist/theme.js.map +1 -1
- package/tui/dist/time.d.ts +2 -0
- package/tui/dist/time.d.ts.map +1 -1
- package/tui/dist/time.js +5 -0
- package/tui/dist/time.js.map +1 -1
- package/tui/dist/types.d.ts +2 -3
- package/tui/dist/types.d.ts.map +1 -1
- package/ui/dist/assets/index-BFOs3ejL.css +32 -0
- package/ui/dist/assets/{index-CMBgYrS7.js → index-CdkFwtld.js} +92 -92
- package/ui/dist/index.html +2 -2
- package/ui/dist/assets/index-DNU3XZr_.css +0 -32
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import type Database from "better-sqlite3";
|
|
2
|
+
import { type LoadResult } from "./gateway/human-registry.js";
|
|
3
|
+
import type { QueueItem, QueueRepository } from "./queue-repository.js";
|
|
4
|
+
import type { EventBus } from "./event-bus.js";
|
|
5
|
+
import type { StreamStore } from "./stream-store.js";
|
|
6
|
+
export declare const RUNNER_PERMISSION_TAG = "runner-permission";
|
|
7
|
+
/** The stream tag on OpenRig's record of each permit it decided by default. */
|
|
8
|
+
export declare const RUNNER_PERMIT_TAG = "runner-permission-permit";
|
|
9
|
+
/** The seat setting that opts in to refusing every request; OpenRig's default is to ask a person, or permit. */
|
|
10
|
+
export declare const PERMISSIONS_DENY = "deny";
|
|
11
|
+
export type PermissionOwnerRefusal = {
|
|
12
|
+
ok: false;
|
|
13
|
+
code: "permissions_to_not_a_person" | "permissions_to_unavailable";
|
|
14
|
+
message: string;
|
|
15
|
+
};
|
|
16
|
+
/** The registered person `ref` names, as their canonical address. Only a person answers in this version: a seat address
|
|
17
|
+
* is refused, even when its member name matches a registered person. */
|
|
18
|
+
export declare function resolvePermissionOwner(ref: string, registry: () => LoadResult): {
|
|
19
|
+
ok: true;
|
|
20
|
+
address: string;
|
|
21
|
+
} | PermissionOwnerRefusal;
|
|
22
|
+
/** With no override, the default person answers, as for any ask that names no one: the chosen default, else the only
|
|
23
|
+
* registered person. With no one to ask, the caller permits. */
|
|
24
|
+
export declare function defaultPermissionOwner(registry: () => LoadResult): {
|
|
25
|
+
ok: true;
|
|
26
|
+
address: string;
|
|
27
|
+
} | {
|
|
28
|
+
ok: false;
|
|
29
|
+
message: string;
|
|
30
|
+
};
|
|
31
|
+
export type RunnerPermissionSeat = {
|
|
32
|
+
nodeId: string;
|
|
33
|
+
sessionName: string;
|
|
34
|
+
generation: string;
|
|
35
|
+
};
|
|
36
|
+
export type RunnerPermissionOption = {
|
|
37
|
+
optionId: string;
|
|
38
|
+
name: string;
|
|
39
|
+
kind: string;
|
|
40
|
+
};
|
|
41
|
+
export type RunnerPermissionRequest = {
|
|
42
|
+
nativeRef: string;
|
|
43
|
+
turnId: string;
|
|
44
|
+
requestId: string;
|
|
45
|
+
toolCall: {
|
|
46
|
+
title?: string;
|
|
47
|
+
kind?: string;
|
|
48
|
+
};
|
|
49
|
+
options: RunnerPermissionOption[];
|
|
50
|
+
};
|
|
51
|
+
export type SubmitRefusalCode = "denied_by_seat" | "duplicate_request" | "invalid_permission_request" | "options_unsupported";
|
|
52
|
+
export type SubmitResult = {
|
|
53
|
+
ok: true;
|
|
54
|
+
askId: string;
|
|
55
|
+
created: boolean;
|
|
56
|
+
} | {
|
|
57
|
+
ok: true;
|
|
58
|
+
state: "permitted";
|
|
59
|
+
optionId: string;
|
|
60
|
+
reason: string;
|
|
61
|
+
} | {
|
|
62
|
+
ok: false;
|
|
63
|
+
code: SubmitRefusalCode;
|
|
64
|
+
message: string;
|
|
65
|
+
};
|
|
66
|
+
export type ReadResult = {
|
|
67
|
+
ok: true;
|
|
68
|
+
state: "pending" | "withdrawn" | "stale";
|
|
69
|
+
} | {
|
|
70
|
+
ok: true;
|
|
71
|
+
state: "answered" | "permitted";
|
|
72
|
+
optionId: string;
|
|
73
|
+
said?: string;
|
|
74
|
+
} | {
|
|
75
|
+
ok: true;
|
|
76
|
+
state: "refused";
|
|
77
|
+
reason: "no_allow_offered" | "said_no";
|
|
78
|
+
said?: string;
|
|
79
|
+
} | {
|
|
80
|
+
ok: false;
|
|
81
|
+
code: "not_found";
|
|
82
|
+
message: string;
|
|
83
|
+
};
|
|
84
|
+
export type WithdrawResult = ReadResult | {
|
|
85
|
+
ok: false;
|
|
86
|
+
code: "invalid_permission_request";
|
|
87
|
+
message: string;
|
|
88
|
+
};
|
|
89
|
+
/** A permission ask's own seat and generation, from its create-time tags. */
|
|
90
|
+
export declare function runnerPermissionOrigin(item: Pick<QueueItem, "tags">): {
|
|
91
|
+
nodeId: string;
|
|
92
|
+
generation: string;
|
|
93
|
+
} | null;
|
|
94
|
+
/** Validate a runner's submitted request into its parts, or say what's wrong with it. */
|
|
95
|
+
export declare function parseRunnerPermissionRequest(body: Record<string, unknown>): {
|
|
96
|
+
ok: true;
|
|
97
|
+
request: RunnerPermissionRequest;
|
|
98
|
+
} | {
|
|
99
|
+
ok: false;
|
|
100
|
+
message: string;
|
|
101
|
+
};
|
|
102
|
+
export declare class RunnerPermissions {
|
|
103
|
+
private readonly deps;
|
|
104
|
+
constructor(deps: {
|
|
105
|
+
db: Database.Database;
|
|
106
|
+
queueRepo: QueueRepository;
|
|
107
|
+
eventBus: EventBus;
|
|
108
|
+
humanRegistry: () => LoadResult;
|
|
109
|
+
ownerOf: (nodeId: string) => string | null;
|
|
110
|
+
currentGeneration: (nodeId: string) => string | null;
|
|
111
|
+
/** Where each default permit is recorded; without one, nothing is recorded. */
|
|
112
|
+
stream?: Pick<StreamStore, "emit">;
|
|
113
|
+
});
|
|
114
|
+
/** One ask per live agent request: the same seat generation, conversation and request id always name the same ask. */
|
|
115
|
+
static askIdFor(seat: RunnerPermissionSeat, request: Pick<RunnerPermissionRequest, "nativeRef" | "requestId">): string;
|
|
116
|
+
submit(seat: RunnerPermissionSeat, request: RunnerPermissionRequest): Promise<SubmitResult>;
|
|
117
|
+
/** A grant's seat carries its launch generation: it reads only its own launch's requests. Only the current
|
|
118
|
+
* occupant's request can read pending or answered; an earlier occupant's reads stale, whatever answer it holds. */
|
|
119
|
+
read(seat: {
|
|
120
|
+
nodeId: string;
|
|
121
|
+
generation?: string;
|
|
122
|
+
} | null, askId: string): ReadResult;
|
|
123
|
+
/** The record of a permit after an ask closed without a choice: one per ask, however often the runner reads it. */
|
|
124
|
+
private recordClosedAsk;
|
|
125
|
+
/** Best effort: a record that can't be built or written is logged, and the permit goes ahead unchanged. With no stream,
|
|
126
|
+
* nothing is read to build one. */
|
|
127
|
+
private recordPermit;
|
|
128
|
+
/** Wait up to `waitMs` for the ask to change, then read it. Subscribes before reading, so a change between the two isn't missed. */
|
|
129
|
+
readWhenChanged(seat: {
|
|
130
|
+
nodeId: string;
|
|
131
|
+
generation?: string;
|
|
132
|
+
} | null, askId: string, waitMs: number): Promise<ReadResult>;
|
|
133
|
+
withdraw(seat: {
|
|
134
|
+
nodeId: string;
|
|
135
|
+
generation?: string;
|
|
136
|
+
} | null, askId: string, reason: string): WithdrawResult;
|
|
137
|
+
/** A person who closed the ask with their own words, not a choice or a plain yes or no: the read passes them back as
|
|
138
|
+
* `said`, from the row that holds the answer, for the runner to give the agent. The outcome and option are unchanged. */
|
|
139
|
+
private withWords;
|
|
140
|
+
/** A person who routes or hands the ask to a colleague means the colleague decides: follow each handoff (a handed-off
|
|
141
|
+
* row, or one completed with closure handed_off_to) along its own edge, to the row handed from it at the handed-to
|
|
142
|
+
* address. Null when that can't be followed on this host. */
|
|
143
|
+
private liveEnd;
|
|
144
|
+
/** A relaunch makes every open ask from the seat's earlier generations stale, so none of them can still be answered. */
|
|
145
|
+
private withdrawEarlierGenerations;
|
|
146
|
+
private close;
|
|
147
|
+
/** Who chose this seat's answer owner, and when, from the audit event. */
|
|
148
|
+
private latestSelection;
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=runner-permissions.d.ts.map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ED,sHAAsH;IACtH,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,IAAI,CAAC,uBAAuB,EAAE,WAAW,GAAG,WAAW,CAAC,GAAG,MAAM;IAKhH,MAAM,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,YAAY,CAAC;IAwEjG;wHACoH;IACpH,IAAI,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU;IAmCrF,mHAAmH;IACnH,OAAO,CAAC,eAAe;IAgBvB;wCACoC;IACpC,OAAO,CAAC,YAAY;IAUpB,oIAAoI;IAC9H,eAAe,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAsB/H,QAAQ,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc;IAa7G;8HAC0H;IAC1H,OAAO,CAAC,SAAS;IAOjB;;kEAE8D;IAC9D,OAAO,CAAC,OAAO;IAef,wHAAwH;IACxH,OAAO,CAAC,0BAA0B;IAWlC,OAAO,CAAC,KAAK;IAKb,0EAA0E;IAC1E,OAAO,CAAC,eAAe;CAWxB"}
|
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
// Answered permissions for a runner seat (the harness runner contract §7, "the answered path"). A runner whose agent asks
|
|
2
|
+
// permission submits the request; OpenRig opens one ordinary ask to the default person, or to the person the seat's
|
|
3
|
+
// operator chose instead (`rig seat set-permissions-to`), with exactly the agent's offered options as its choices; the
|
|
4
|
+
// runner reads the one answer back and gives it to that same live request. With no one to ask, or an ask closed without
|
|
5
|
+
// a choice, OpenRig's default is permit with the agent's own allow option; a person's no is never a grant, and only the
|
|
6
|
+
// seat's opt-in (`--deny`) refuses every request. Each default permit leaves one pull-only record on the stream.
|
|
7
|
+
import { createHash } from "node:crypto";
|
|
8
|
+
import { isHumanSeatSessionRef } from "./session-name.js";
|
|
9
|
+
import { resolveRegisteredHumanAddress } from "./gateway/human-registry.js";
|
|
10
|
+
import { resolveDefaultPerson } from "./gateway/participants.js";
|
|
11
|
+
import { MAX_OPTION_LABEL, MAX_QUESTION_TEXT } from "./human-questions.js";
|
|
12
|
+
export const RUNNER_PERMISSION_TAG = "runner-permission";
|
|
13
|
+
/** The stream tag on OpenRig's record of each permit it decided by default. */
|
|
14
|
+
export const RUNNER_PERMIT_TAG = "runner-permission-permit";
|
|
15
|
+
const QUESTION_ID = "permission";
|
|
16
|
+
const NODE_TAG = "permission-node:";
|
|
17
|
+
const GENERATION_TAG = "permission-generation:";
|
|
18
|
+
const TURN_TAG = "permission-turn:";
|
|
19
|
+
const WITHDRAWN_NOTE = "runner-permission-withdrawn";
|
|
20
|
+
const STALE_NOTE = "runner-permission-stale";
|
|
21
|
+
/** The agent's own allow and reject options, kept on the ask so a person's yes or no in words maps to them. */
|
|
22
|
+
const ALLOW_TAG = "permission-allow:";
|
|
23
|
+
const ALLOW_KIND_TAG = "permission-allow-kind:";
|
|
24
|
+
const REJECT_TAG = "permission-reject:";
|
|
25
|
+
const ASK_PREFIX = "qitem-runner-permission-";
|
|
26
|
+
const OPTION_ID = /^[A-Za-z0-9_-]{1,40}$/;
|
|
27
|
+
const ANSWERABLE_KINDS = new Set(["allow_once", "allow_always", "reject_once", "reject_always"]);
|
|
28
|
+
/** What each ACP option kind means to the agent, told to the person beside the option. */
|
|
29
|
+
const NATIVE_MEANING = {
|
|
30
|
+
allow_once: "allows this one tool call",
|
|
31
|
+
allow_always: "the agent's harness remembers this choice and allows similar requests without asking; OpenRig doesn't record or revoke it",
|
|
32
|
+
reject_once: "refuses this one tool call",
|
|
33
|
+
reject_always: "the agent's harness remembers this refusal for similar requests",
|
|
34
|
+
};
|
|
35
|
+
const WITHDRAW_REASONS = new Set(["turn_cancelled", "turn_ended", "exited"]);
|
|
36
|
+
const MAX_AGENT_TEXT = 500;
|
|
37
|
+
const MAX_HANDOFF_HOPS = 10;
|
|
38
|
+
/** The seat setting that opts in to refusing every request; OpenRig's default is to ask a person, or permit. */
|
|
39
|
+
export const PERMISSIONS_DENY = "deny";
|
|
40
|
+
const SAID_YES = new Set(["yes", "y", "yep", "yeah", "ok", "okay", "sure", "fine", "allow", "allowed", "approve", "approved",
|
|
41
|
+
"accept", "accepted", "permit", "permitted", "go", "go ahead", "do it", "lgtm"]);
|
|
42
|
+
const SAID_NO = new Set(["no", "n", "nope", "deny", "denied", "reject", "rejected", "refuse", "refused", "decline", "declined",
|
|
43
|
+
"don't", "dont", "do not", "stop", "no thanks"]);
|
|
44
|
+
/** A person's typed reply that plainly says yes or no; anything else says neither. */
|
|
45
|
+
function typedYesOrNo(answer) {
|
|
46
|
+
if (!answer || typeof answer !== "object" || answer.kind !== "typed-reply")
|
|
47
|
+
return null;
|
|
48
|
+
const words = String(answer.text ?? "").trim().toLowerCase().replace(/[.!?,;:]+$/, "").replace(/\s+/g, " ");
|
|
49
|
+
return SAID_YES.has(words) ? "yes" : SAID_NO.has(words) ? "no" : null;
|
|
50
|
+
}
|
|
51
|
+
/** A person's typed reply that says more than a plain yes or no: their own words, whole. */
|
|
52
|
+
function typedWords(answer) {
|
|
53
|
+
if (!answer || typeof answer !== "object" || answer.kind !== "typed-reply" || typedYesOrNo(answer))
|
|
54
|
+
return null;
|
|
55
|
+
const words = String(answer.text ?? "").trim();
|
|
56
|
+
return words || null;
|
|
57
|
+
}
|
|
58
|
+
/** The registered person `ref` names, as their canonical address. Only a person answers in this version: a seat address
|
|
59
|
+
* is refused, even when its member name matches a registered person. */
|
|
60
|
+
export function resolvePermissionOwner(ref, registry) {
|
|
61
|
+
if (!isHumanSeatSessionRef(ref)) {
|
|
62
|
+
return { ok: false, code: "permissions_to_not_a_person",
|
|
63
|
+
message: `${ref} isn't a person's address. In this version only a registered person answers a seat's permission requests.` };
|
|
64
|
+
}
|
|
65
|
+
let loaded;
|
|
66
|
+
try {
|
|
67
|
+
loaded = registry();
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
return { ok: false, code: "permissions_to_unavailable", message: `The registered people can't be read: ${error.message}` };
|
|
71
|
+
}
|
|
72
|
+
if (!loaded.ok)
|
|
73
|
+
return { ok: false, code: "permissions_to_unavailable", message: loaded.error };
|
|
74
|
+
const address = resolveRegisteredHumanAddress(ref, loaded.entities);
|
|
75
|
+
if (!address)
|
|
76
|
+
return { ok: false, code: "permissions_to_not_a_person", message: `${ref} isn't a registered person.` };
|
|
77
|
+
return { ok: true, address };
|
|
78
|
+
}
|
|
79
|
+
/** With no override, the default person answers, as for any ask that names no one: the chosen default, else the only
|
|
80
|
+
* registered person. With no one to ask, the caller permits. */
|
|
81
|
+
export function defaultPermissionOwner(registry) {
|
|
82
|
+
let loaded;
|
|
83
|
+
try {
|
|
84
|
+
loaded = registry();
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
return { ok: false, message: `the registered people can't be read: ${error.message}` };
|
|
88
|
+
}
|
|
89
|
+
if (!loaded.ok)
|
|
90
|
+
return { ok: false, message: `the registered people can't be read: ${loaded.error}` };
|
|
91
|
+
const fallback = resolveDefaultPerson(loaded.entities);
|
|
92
|
+
return fallback.person ? { ok: true, address: fallback.person.address } : { ok: false, message: fallback.reason };
|
|
93
|
+
}
|
|
94
|
+
const text = (value) => typeof value === "string" && value.trim().length > 0 ? value.trim() : null;
|
|
95
|
+
/** A JSON-RPC id or prompt number as the runner passed it: a number reads as its decimal string, so 7 and "7" match. */
|
|
96
|
+
const idText = (value) => typeof value === "number" && Number.isFinite(value) ? String(value) : text(value);
|
|
97
|
+
const clip = (value, max) => value.length <= max ? value : `${value.slice(0, max - 1)}…`;
|
|
98
|
+
const tagValue = (item, prefix) => item.tags?.find((tag) => tag.startsWith(prefix))?.slice(prefix.length) ?? null;
|
|
99
|
+
/** An option as a person reads it in a record; one the agent's harness remembers says so. */
|
|
100
|
+
const optionText = (name, kind, optionId) => `${clip(name, MAX_AGENT_TEXT)} (${kind ? `${kind}, ` : ""}${optionId})${kind === "allow_always" ? `: ${NATIVE_MEANING.allow_always}` : ""}`;
|
|
101
|
+
/** A permission ask's own seat and generation, from its create-time tags. */
|
|
102
|
+
export function runnerPermissionOrigin(item) {
|
|
103
|
+
if (!item.tags?.includes(RUNNER_PERMISSION_TAG))
|
|
104
|
+
return null;
|
|
105
|
+
const nodeId = tagValue(item, NODE_TAG);
|
|
106
|
+
const generation = tagValue(item, GENERATION_TAG);
|
|
107
|
+
return nodeId && generation ? { nodeId, generation } : null;
|
|
108
|
+
}
|
|
109
|
+
/** Validate a runner's submitted request into its parts, or say what's wrong with it. */
|
|
110
|
+
export function parseRunnerPermissionRequest(body) {
|
|
111
|
+
const nativeRef = text(body.nativeRef), turnId = idText(body.turnId), requestId = idText(body.requestId);
|
|
112
|
+
if (!nativeRef || !turnId || !requestId)
|
|
113
|
+
return { ok: false, message: "A permission request needs nativeRef, turnId and requestId." };
|
|
114
|
+
if (!Array.isArray(body.options))
|
|
115
|
+
return { ok: false, message: "A permission request needs options[]." };
|
|
116
|
+
const options = [];
|
|
117
|
+
for (const raw of body.options) {
|
|
118
|
+
const option = (raw ?? {});
|
|
119
|
+
const optionId = text(option.optionId), name = text(option.name), kind = text(option.kind);
|
|
120
|
+
if (!optionId || !name || !kind)
|
|
121
|
+
return { ok: false, message: "Each option needs optionId, name and kind." };
|
|
122
|
+
options.push({ optionId, name, kind });
|
|
123
|
+
}
|
|
124
|
+
const toolCall = (body.toolCall ?? {});
|
|
125
|
+
return { ok: true, request: { nativeRef, turnId, requestId, options,
|
|
126
|
+
toolCall: { title: text(toolCall.title) ?? undefined, kind: text(toolCall.kind) ?? undefined } } };
|
|
127
|
+
}
|
|
128
|
+
export class RunnerPermissions {
|
|
129
|
+
deps;
|
|
130
|
+
constructor(deps) {
|
|
131
|
+
this.deps = deps;
|
|
132
|
+
}
|
|
133
|
+
/** One ask per live agent request: the same seat generation, conversation and request id always name the same ask. */
|
|
134
|
+
static askIdFor(seat, request) {
|
|
135
|
+
const key = JSON.stringify([seat.nodeId, seat.generation, request.nativeRef, request.requestId]);
|
|
136
|
+
return `qitem-runner-permission-${createHash("sha256").update(key).digest("hex").slice(0, 24)}`;
|
|
137
|
+
}
|
|
138
|
+
async submit(seat, request) {
|
|
139
|
+
const selected = this.deps.ownerOf(seat.nodeId);
|
|
140
|
+
if (selected === PERMISSIONS_DENY) {
|
|
141
|
+
return { ok: false, code: "denied_by_seat",
|
|
142
|
+
message: "This seat's operator chose to refuse its runner's permission requests (rig seat set-permissions-to --deny). Refuse the request and hold attention." };
|
|
143
|
+
}
|
|
144
|
+
const allow = request.options.find((option) => option.kind === "allow_once") ?? request.options.find((option) => option.kind === "allow_always");
|
|
145
|
+
const reject = request.options.find((option) => option.kind === "reject_once") ?? request.options.find((option) => option.kind === "reject_always");
|
|
146
|
+
// OpenRig's default is permit: when no one can be asked, the agent gets its own allow option at once.
|
|
147
|
+
const permit = (why) => {
|
|
148
|
+
if (!allow)
|
|
149
|
+
return { ok: false, code: "options_unsupported", message: `No one can be asked (${why}), and the agent offered no allow option to permit.` };
|
|
150
|
+
// One record per request and turn: a resubmitted request finds its record already there.
|
|
151
|
+
const key = JSON.stringify([seat.nodeId, seat.generation, request.nativeRef, request.requestId, request.turnId]);
|
|
152
|
+
this.recordPermit(`runner-permit-request-${createHash("sha256").update(key).digest("hex").slice(0, 24)}`, seat.sessionName, seat.nodeId, () => [
|
|
153
|
+
`OpenRig permitted ${seat.sessionName}'s agent by default, without asking anyone: ${why}.`,
|
|
154
|
+
"",
|
|
155
|
+
`- **Tool call:** ${clip(request.toolCall.title ?? "a tool call", MAX_AGENT_TEXT)} (${clip(request.toolCall.kind ?? "other", MAX_AGENT_TEXT)}), as the agent described it.`,
|
|
156
|
+
`- **Option given:** ${optionText(allow.name, allow.kind, allow.optionId)}.`,
|
|
157
|
+
`- **Conversation:** ${request.nativeRef}, turn ${request.turnId}, request ${request.requestId}.`,
|
|
158
|
+
]);
|
|
159
|
+
return { ok: true, state: "permitted", optionId: allow.optionId, reason: why };
|
|
160
|
+
};
|
|
161
|
+
const owner = selected ? resolvePermissionOwner(selected, this.deps.humanRegistry) : defaultPermissionOwner(this.deps.humanRegistry);
|
|
162
|
+
if (!owner.ok)
|
|
163
|
+
return permit(selected ? `the person chosen for this seat can't be asked: ${owner.message}` : `no one can be asked: ${owner.message}`);
|
|
164
|
+
const ids = new Set(request.options.map((option) => option.optionId));
|
|
165
|
+
if (request.options.length < 2 || request.options.length > 4 || ids.size !== request.options.length
|
|
166
|
+
|| request.options.some((option) => !OPTION_ID.test(option.optionId) || !ANSWERABLE_KINDS.has(option.kind))) {
|
|
167
|
+
return permit("these options can't be shown to a person: an ask takes 2-4 options with distinct ids of letters, digits, \"-\" or \"_\"");
|
|
168
|
+
}
|
|
169
|
+
this.withdrawEarlierGenerations(seat);
|
|
170
|
+
const askId = RunnerPermissions.askIdFor(seat, request);
|
|
171
|
+
const existing = this.deps.queueRepo.getById(askId);
|
|
172
|
+
if (existing) {
|
|
173
|
+
if (tagValue(existing, TURN_TAG) === request.turnId)
|
|
174
|
+
return { ok: true, askId, created: false };
|
|
175
|
+
return { ok: false, code: "duplicate_request", message: `Request ${request.requestId} of this conversation was already submitted in turn ${tagValue(existing, TURN_TAG)}.` };
|
|
176
|
+
}
|
|
177
|
+
// The agent's own text, shown to the person: bounded like the summary.
|
|
178
|
+
const title = clip(request.toolCall.title ?? "a tool call", MAX_AGENT_TEXT);
|
|
179
|
+
const kind = clip(request.toolCall.kind ?? "other", MAX_AGENT_TEXT);
|
|
180
|
+
const selection = this.latestSelection(seat.nodeId);
|
|
181
|
+
const offered = request.options.map((option) => `- ${clip(option.name, MAX_AGENT_TEXT)} (${option.kind}, ${option.optionId}): ${NATIVE_MEANING[option.kind]}.`);
|
|
182
|
+
await this.deps.queueRepo.create({
|
|
183
|
+
qitemId: askId,
|
|
184
|
+
sourceSession: seat.sessionName,
|
|
185
|
+
destinationSession: owner.address,
|
|
186
|
+
humanIntent: "decision",
|
|
187
|
+
humanAlert: true,
|
|
188
|
+
summary: clip(`Permission: ${seat.sessionName} asks to ${title} (${kind})`, 200),
|
|
189
|
+
humanQuestions: [{ id: QUESTION_ID, question: clip(`Allow ${seat.sessionName} to ${title} (${kind})?`, MAX_QUESTION_TEXT),
|
|
190
|
+
options: request.options.map((option) => ({ id: option.optionId,
|
|
191
|
+
label: clip(option.kind.endsWith("_always") ? `${option.name} (remembered by the agent)` : option.name, MAX_OPTION_LABEL) })) }],
|
|
192
|
+
tags: [RUNNER_PERMISSION_TAG, `${NODE_TAG}${seat.nodeId}`, `${GENERATION_TAG}${seat.generation}`, `${TURN_TAG}${request.turnId}`,
|
|
193
|
+
...(allow ? [`${ALLOW_TAG}${allow.optionId}`, `${ALLOW_KIND_TAG}${allow.kind}`] : []), ...(reject ? [`${REJECT_TAG}${reject.optionId}`] : [])],
|
|
194
|
+
nudge: false,
|
|
195
|
+
body: [
|
|
196
|
+
`${seat.sessionName}'s agent asks permission for one tool call, and is waiting on it.`,
|
|
197
|
+
"",
|
|
198
|
+
`- **Tool call:** ${title} (${kind}), as the agent described it.`,
|
|
199
|
+
`- **Conversation:** ${request.nativeRef}, turn ${request.turnId}, request ${request.requestId}.`,
|
|
200
|
+
`- **Why you:** ${selected ? selection ?? "you are the seat's chosen permission answer owner" : "you are the default person, and no one else is chosen for this seat"}.`,
|
|
201
|
+
"",
|
|
202
|
+
"**The options the agent offered:**",
|
|
203
|
+
...offered,
|
|
204
|
+
"",
|
|
205
|
+
"Your choice goes to this one request, once. A reply of just yes or no counts as the agent's allow or reject. Any other words choose nothing: OpenRig's default permits the request when the agent offered an allow option, and a runner that forwards your words passes them to the agent only after its turn. Closing this without choosing counts as no answer, and then OpenRig's default applies: the request is permitted. If the agent's turn ends first, your answer isn't sent.",
|
|
206
|
+
].join("\n"),
|
|
207
|
+
});
|
|
208
|
+
return { ok: true, askId, created: true };
|
|
209
|
+
}
|
|
210
|
+
/** A grant's seat carries its launch generation: it reads only its own launch's requests. Only the current
|
|
211
|
+
* occupant's request can read pending or answered; an earlier occupant's reads stale, whatever answer it holds. */
|
|
212
|
+
read(seat, askId) {
|
|
213
|
+
const asked = this.deps.queueRepo.getById(askId);
|
|
214
|
+
const origin = asked ? runnerPermissionOrigin(asked) : null;
|
|
215
|
+
if (!asked || !origin || (seat && origin.nodeId !== seat.nodeId))
|
|
216
|
+
return { ok: false, code: "not_found", message: `No permission request ${askId} for this seat.` };
|
|
217
|
+
const item = this.liveEnd(asked);
|
|
218
|
+
const askIsCurrent = this.deps.currentGeneration(origin.nodeId) === origin.generation;
|
|
219
|
+
const callerMatches = !seat?.generation || seat.generation === origin.generation;
|
|
220
|
+
// Handed to someone this host can't follow (another host, or no row that carries the ask): still no answer, and the
|
|
221
|
+
// handoff itself never permits.
|
|
222
|
+
if (!item)
|
|
223
|
+
return askIsCurrent && callerMatches ? { ok: true, state: "pending" } : { ok: true, state: "stale" };
|
|
224
|
+
// Still open (pending, or claimed or parked by the person): no answer yet.
|
|
225
|
+
if (item.state === "pending" || item.state === "in-progress" || item.state === "blocked") {
|
|
226
|
+
if (askIsCurrent && callerMatches)
|
|
227
|
+
return { ok: true, state: "pending" };
|
|
228
|
+
if (!askIsCurrent)
|
|
229
|
+
this.close(item, STALE_NOTE, "relaunched: a later occupant holds this seat");
|
|
230
|
+
return { ok: true, state: "stale" };
|
|
231
|
+
}
|
|
232
|
+
if (item.state === "canceled") {
|
|
233
|
+
const withdrawn = this.deps.queueRepo.listTransitions(item.qitemId).some((transition) => transition.transitionNote?.startsWith(WITHDRAWN_NOTE));
|
|
234
|
+
return { ok: true, state: withdrawn ? "withdrawn" : "stale" };
|
|
235
|
+
}
|
|
236
|
+
if (!askIsCurrent || !callerMatches)
|
|
237
|
+
return { ok: true, state: "stale" };
|
|
238
|
+
const answer = item.humanAnswers?.[QUESTION_ID];
|
|
239
|
+
const offered = item.humanQuestions?.find((question) => question.id === QUESTION_ID)?.options.map((option) => option.id) ?? [];
|
|
240
|
+
if (typeof answer === "string" && offered.includes(answer))
|
|
241
|
+
return { ok: true, state: "answered", optionId: answer };
|
|
242
|
+
// A plain no in words, or a deny from the Feed, is the agent's reject, and never a grant; a plain yes is its allow.
|
|
243
|
+
const allowId = tagValue(item, ALLOW_TAG), rejectId = tagValue(item, REJECT_TAG);
|
|
244
|
+
const said = item.closureReason === "denied" || item.state === "denied" ? "no" : typedYesOrNo(answer);
|
|
245
|
+
if (said === "no")
|
|
246
|
+
return rejectId ? { ok: true, state: "answered", optionId: rejectId } : { ok: true, state: "refused", reason: "said_no" };
|
|
247
|
+
if (said === "yes" && allowId)
|
|
248
|
+
return { ok: true, state: "answered", optionId: allowId };
|
|
249
|
+
// Closed without an option is no answer, so OpenRig's default applies: permit.
|
|
250
|
+
if (!allowId)
|
|
251
|
+
return { ok: true, state: "refused", reason: "no_allow_offered" };
|
|
252
|
+
this.recordClosedAsk(asked, item, origin.nodeId, allowId);
|
|
253
|
+
return { ok: true, state: "permitted", optionId: allowId };
|
|
254
|
+
}
|
|
255
|
+
/** The record of a permit after an ask closed without a choice: one per ask, however often the runner reads it. */
|
|
256
|
+
recordClosedAsk(asked, closed, nodeId, allowId) {
|
|
257
|
+
this.recordPermit(`runner-permit-ask-${asked.qitemId.slice(ASK_PREFIX.length)}`, asked.sourceSession, nodeId, () => {
|
|
258
|
+
// Who closed it: the close itself, since later notes and delivery receipts on a closed row repeat its state.
|
|
259
|
+
const closer = this.deps.queueRepo.closingTransition(closed.qitemId, closed.state)?.actorSession ?? "someone";
|
|
260
|
+
const row = closed.qitemId === asked.qitemId ? "the ask" : `${closed.qitemId}, the row it was handed to at ${closed.destinationSession},`;
|
|
261
|
+
const label = asked.humanQuestions?.find((question) => question.id === QUESTION_ID)?.options.find((option) => option.id === allowId)?.label;
|
|
262
|
+
return [
|
|
263
|
+
`OpenRig permitted ${asked.sourceSession}'s agent by default: its permission ask ${asked.qitemId} closed without a choice.`
|
|
264
|
+
+ ` ${closer} closed ${row} as ${closed.state}${closed.closureReason ? ` (${closed.closureReason})` : ""}.`,
|
|
265
|
+
"",
|
|
266
|
+
`- **Ask:** ${asked.summary ?? "a permission request"}, asked of ${asked.destinationSession}.`,
|
|
267
|
+
`- **Option given:** ${optionText(label ?? allowId, tagValue(asked, ALLOW_KIND_TAG), allowId)}.`,
|
|
268
|
+
];
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
/** Best effort: a record that can't be built or written is logged, and the permit goes ahead unchanged. With no stream,
|
|
272
|
+
* nothing is read to build one. */
|
|
273
|
+
recordPermit(streamItemId, sessionName, nodeId, lines) {
|
|
274
|
+
if (!this.deps.stream)
|
|
275
|
+
return;
|
|
276
|
+
try {
|
|
277
|
+
this.deps.stream.emit({ streamItemId, sourceSession: sessionName, body: lines().join("\n"), hintType: "observation", hintUrgency: "low",
|
|
278
|
+
hintTags: [RUNNER_PERMIT_TAG, `${NODE_TAG}${nodeId}`] });
|
|
279
|
+
}
|
|
280
|
+
catch (error) {
|
|
281
|
+
console.error(`[runner-permissions] the record of a default permit for ${sessionName} wasn't written`, error);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
/** Wait up to `waitMs` for the ask to change, then read it. Subscribes before reading, so a change between the two isn't missed. */
|
|
285
|
+
async readWhenChanged(seat, askId, waitMs) {
|
|
286
|
+
let release = () => { };
|
|
287
|
+
const changed = new Promise((resolve) => { release = resolve; });
|
|
288
|
+
let liveId = askId; // after a route or handoff, the colleague's row is where the answer lands
|
|
289
|
+
const unsubscribe = this.deps.eventBus.subscribe((event) => {
|
|
290
|
+
const changedId = event.type === "queue.updated" ? event.qitemId : undefined;
|
|
291
|
+
if (changedId === askId || changedId === liveId)
|
|
292
|
+
release();
|
|
293
|
+
});
|
|
294
|
+
try {
|
|
295
|
+
const now = this.withWords(askId, this.read(seat, askId));
|
|
296
|
+
if (!now.ok || now.state !== "pending" || waitMs <= 0)
|
|
297
|
+
return now;
|
|
298
|
+
const asked = this.deps.queueRepo.getById(askId);
|
|
299
|
+
liveId = this.liveEnd(asked)?.qitemId ?? askId;
|
|
300
|
+
let timer;
|
|
301
|
+
await Promise.race([changed, new Promise((resolve) => { timer = setTimeout(resolve, waitMs); })]);
|
|
302
|
+
if (timer)
|
|
303
|
+
clearTimeout(timer);
|
|
304
|
+
return this.withWords(askId, this.read(seat, askId));
|
|
305
|
+
}
|
|
306
|
+
finally {
|
|
307
|
+
unsubscribe();
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
withdraw(seat, askId, reason) {
|
|
311
|
+
if (!WITHDRAW_REASONS.has(reason)) {
|
|
312
|
+
return { ok: false, code: "invalid_permission_request", message: "reason must be turn_cancelled, turn_ended or exited." };
|
|
313
|
+
}
|
|
314
|
+
const now = this.read(seat, askId);
|
|
315
|
+
if (!now.ok || now.state !== "pending")
|
|
316
|
+
return now;
|
|
317
|
+
const asked = this.deps.queueRepo.getById(askId);
|
|
318
|
+
const live = this.liveEnd(asked);
|
|
319
|
+
// A handoff this host can't follow leaves its rows as they are; the runner just stops waiting.
|
|
320
|
+
if (live)
|
|
321
|
+
this.close(live, WITHDRAWN_NOTE, reason);
|
|
322
|
+
return { ok: true, state: "withdrawn" };
|
|
323
|
+
}
|
|
324
|
+
/** A person who closed the ask with their own words, not a choice or a plain yes or no: the read passes them back as
|
|
325
|
+
* `said`, from the row that holds the answer, for the runner to give the agent. The outcome and option are unchanged. */
|
|
326
|
+
withWords(askId, result) {
|
|
327
|
+
if (!result.ok || !(result.state === "permitted" || (result.state === "refused" && result.reason === "no_allow_offered")))
|
|
328
|
+
return result;
|
|
329
|
+
const asked = this.deps.queueRepo.getById(askId);
|
|
330
|
+
const said = typedWords((asked ? this.liveEnd(asked) : null)?.humanAnswers?.[QUESTION_ID]);
|
|
331
|
+
return said ? { ...result, said } : result;
|
|
332
|
+
}
|
|
333
|
+
/** A person who routes or hands the ask to a colleague means the colleague decides: follow each handoff (a handed-off
|
|
334
|
+
* row, or one completed with closure handed_off_to) along its own edge, to the row handed from it at the handed-to
|
|
335
|
+
* address. Null when that can't be followed on this host. */
|
|
336
|
+
liveEnd(item) {
|
|
337
|
+
let current = item;
|
|
338
|
+
for (let hops = 0; current.state === "handed-off" || (current.state === "done" && current.closureReason === "handed_off_to"); hops++) {
|
|
339
|
+
if (hops >= MAX_HANDOFF_HOPS || !current.handedOffTo)
|
|
340
|
+
return null;
|
|
341
|
+
// The newest: a reopened ask handed to the same person again has a later successor.
|
|
342
|
+
const next = this.deps.db.prepare(`SELECT qitem_id FROM queue_items WHERE destination_session = ? AND handed_off_from = ?
|
|
343
|
+
ORDER BY ts_created DESC, rowid DESC LIMIT 1`)
|
|
344
|
+
.get(current.handedOffTo, current.qitemId);
|
|
345
|
+
const successor = next ? this.deps.queueRepo.getById(next.qitem_id) : null;
|
|
346
|
+
if (!successor)
|
|
347
|
+
return null;
|
|
348
|
+
current = successor;
|
|
349
|
+
}
|
|
350
|
+
return current;
|
|
351
|
+
}
|
|
352
|
+
/** A relaunch makes every open ask from the seat's earlier generations stale, so none of them can still be answered. */
|
|
353
|
+
withdrawEarlierGenerations(seat) {
|
|
354
|
+
const open = this.deps.db.prepare(`SELECT qitem_id FROM queue_items WHERE state = 'pending'
|
|
355
|
+
AND EXISTS (SELECT 1 FROM json_each(queue_items.tags) WHERE value = ?)
|
|
356
|
+
AND NOT EXISTS (SELECT 1 FROM json_each(queue_items.tags) WHERE value = ?)`)
|
|
357
|
+
.all(`${NODE_TAG}${seat.nodeId}`, `${GENERATION_TAG}${seat.generation}`);
|
|
358
|
+
for (const { qitem_id } of open) {
|
|
359
|
+
const item = this.deps.queueRepo.getById(qitem_id);
|
|
360
|
+
if (item && runnerPermissionOrigin(item))
|
|
361
|
+
this.close(item, STALE_NOTE, "relaunched: a later occupant holds this seat");
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
close(item, note, reason) {
|
|
365
|
+
this.deps.queueRepo.update({ qitemId: item.qitemId, actorSession: item.sourceSession, state: "canceled",
|
|
366
|
+
transitionNote: `${note} reason=${reason}: the runner's request ended, so any answer here is not sent.` });
|
|
367
|
+
}
|
|
368
|
+
/** Who chose this seat's answer owner, and when, from the audit event. */
|
|
369
|
+
latestSelection(nodeId) {
|
|
370
|
+
try {
|
|
371
|
+
const row = this.deps.db.prepare(`SELECT payload, created_at FROM events WHERE node_id = ? AND type = 'node.permissions_to_changed'
|
|
372
|
+
ORDER BY seq DESC LIMIT 1`).get(nodeId);
|
|
373
|
+
if (!row)
|
|
374
|
+
return null;
|
|
375
|
+
const payload = JSON.parse(row.payload);
|
|
376
|
+
return `chosen by ${payload.operator ?? "an operator"} at ${row.created_at}${payload.reason ? ` (${payload.reason})` : ""}`;
|
|
377
|
+
}
|
|
378
|
+
catch {
|
|
379
|
+
return null;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
//# sourceMappingURL=runner-permissions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner-permissions.js","sourceRoot":"","sources":["../../src/domain/runner-permissions.ts"],"names":[],"mappings":"AAAA,0HAA0H;AAC1H,oHAAoH;AACpH,uHAAuH;AACvH,wHAAwH;AACxH,wHAAwH;AACxH,iHAAiH;AAGjH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,6BAA6B,EAAmB,MAAM,6BAA6B,CAAC;AAC7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE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