@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,197 @@
|
|
|
1
|
+
import { parse as parseYaml, stringify as stringifyYaml } from "yaml";
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import { execFile, spawn } from "node:child_process";
|
|
4
|
+
import { promisify } from "node:util";
|
|
5
|
+
import { existsSync, lstatSync, mkdirSync, readFileSync, realpathSync, writeFileSync } from "node:fs";
|
|
6
|
+
import { join, resolve } from "node:path";
|
|
7
|
+
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
8
|
+
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
9
|
+
import { DaemonClient } from "../client.js";
|
|
10
|
+
import { getDaemonPath, getDaemonStatus, getDaemonUrl, daemonStatusGuard } from "../daemon-lifecycle.js";
|
|
11
|
+
import { getOpenRigHome } from "../openrig-compat.js";
|
|
12
|
+
import { addGrant, grantFor, mcpTokenFilePath, readGrants } from "../mcp-http.js";
|
|
13
|
+
import { realDeps } from "./daemon.js";
|
|
14
|
+
const managedId = (id) => {
|
|
15
|
+
if (!/^[A-Za-z0-9][A-Za-z0-9._-]{0,159}$/.test(id))
|
|
16
|
+
throw new Error("A short binding identifier is required");
|
|
17
|
+
return id;
|
|
18
|
+
};
|
|
19
|
+
function preserveWrite(file, data) {
|
|
20
|
+
mkdirSync(resolve(file, ".."), { recursive: true, mode: 0o700 });
|
|
21
|
+
if (existsSync(file) || (() => { try {
|
|
22
|
+
return lstatSync(file).isSymbolicLink();
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
return false;
|
|
26
|
+
} })()) {
|
|
27
|
+
if (lstatSync(file).isSymbolicLink() || !lstatSync(file).isFile() || !readFileSync(file).equals(Buffer.from(data)))
|
|
28
|
+
throw new Error(`An existing file is preserved: ${file}`);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
writeFileSync(file, data, { flag: "wx", mode: 0o600 });
|
|
32
|
+
}
|
|
33
|
+
function connectionRef(home, bindingId) { return join(home, "environment-secrets", managedId(bindingId), "work.json"); }
|
|
34
|
+
function readConnection(file) {
|
|
35
|
+
const stat = lstatSync(file);
|
|
36
|
+
if (!stat.isFile() || stat.isSymbolicLink() || stat.size > 16384 || (stat.mode & 0o077))
|
|
37
|
+
throw new Error("The managed work connection must be a private regular file");
|
|
38
|
+
const value = JSON.parse(readFileSync(file, "utf8"));
|
|
39
|
+
if (value.version !== 1 || typeof value.token !== "string" || !value.token || typeof value.mcpUrl !== "string")
|
|
40
|
+
throw new Error("The work connection is invalid");
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
async function prepareWork(home, input) {
|
|
44
|
+
const url = new URL(input.mcpUrl);
|
|
45
|
+
if (!["http:", "https:"].includes(url.protocol) || url.username || url.password || url.search || url.hash || !url.pathname.endsWith("/mcp"))
|
|
46
|
+
throw new Error("The work endpoint must be an HTTP(S) MCP URL without embedded credentials");
|
|
47
|
+
if (!/^[^\s@]+@[^\s@]+$/.test(input.seat) || !input.rig)
|
|
48
|
+
throw new Error("A canonical seat and its rig are required");
|
|
49
|
+
const file = connectionRef(home, input.bindingId), grantName = `environment-${input.bindingId}`;
|
|
50
|
+
if (existsSync(file)) {
|
|
51
|
+
const prior = readConnection(file), grants = readGrants(mcpTokenFilePath(home)) ?? [];
|
|
52
|
+
const grant = grantFor(grants, prior.token);
|
|
53
|
+
if (!grant || grant.name !== grantName || prior.seat !== input.seat || prior.rig !== input.rig || prior.mcpUrl !== url.toString()
|
|
54
|
+
|| prior.artifactRoot !== resolve(input.artifactRoot) || grant.seat !== input.seat || grant.owner || grant.workspace
|
|
55
|
+
|| grant.rigs.length !== 1 || grant.rigs[0] !== input.rig || grant.roots.length !== 0)
|
|
56
|
+
throw new Error("The existing managed work connection changed or was revoked; preserve it and reconcile before setup");
|
|
57
|
+
return file;
|
|
58
|
+
}
|
|
59
|
+
const token = await addGrant(mcpTokenFilePath(home), { name: grantName, seat: input.seat, rigs: [input.rig], roots: [], workspace: false, owner: false });
|
|
60
|
+
const data = { version: 1, mcpUrl: url.toString(), seat: input.seat, rig: input.rig, grantName, artifactRoot: resolve(input.artifactRoot), token };
|
|
61
|
+
preserveWrite(file, JSON.stringify(data) + "\n");
|
|
62
|
+
return file;
|
|
63
|
+
}
|
|
64
|
+
export function environmentCommand(override) {
|
|
65
|
+
const cmd = new Command("environment").description("Explicit OpenShell execution placement and verified artifact return; not rig env (services)");
|
|
66
|
+
const deps = () => override ?? { lifecycleDeps: realDeps(), clientFactory: url => new DaemonClient(url) };
|
|
67
|
+
const client = async () => { const d = deps(), status = await getDaemonStatus(d.lifecycleDeps); if (!daemonStatusGuard(status))
|
|
68
|
+
throw new Error("A reachable daemon is required"); return d.clientFactory(getDaemonUrl(status)); };
|
|
69
|
+
const home = () => deps().home ?? getOpenRigHome();
|
|
70
|
+
const report = (value) => console.log(JSON.stringify(value, null, 2));
|
|
71
|
+
const action = (fn) => async (...args) => { try {
|
|
72
|
+
await fn(...args);
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
console.error(error.message);
|
|
76
|
+
process.exitCode = 1;
|
|
77
|
+
} };
|
|
78
|
+
const checked = (res) => { if (res.status >= 400)
|
|
79
|
+
throw new Error(res.data?.error ?? `Environment request failed (${res.status})`); return res.data; };
|
|
80
|
+
cmd.command("setup").description("Inspect the pinned vendor CLI and install the maintained example without overwriting another preset")
|
|
81
|
+
.requiredOption("--directory <path>", "New or matching example directory")
|
|
82
|
+
.option("--binding <id>", "Prepare this binding's normal scoped MCP work connection")
|
|
83
|
+
.option("--seat <address>").option("--rig <name>").option("--mcp-url <url>", "Existing authenticated MCP HTTP listener, as reached by the guest")
|
|
84
|
+
.option("--guest-base-url <origin>", "Guest-only activity listener origin (not the main daemon API); required with work authority")
|
|
85
|
+
.option("--artifact-root <path>", "Host returned-artifact root, bound to this environment")
|
|
86
|
+
.option("--json", "JSON receipt; never credential values")
|
|
87
|
+
.action(action(async (opts) => {
|
|
88
|
+
const binary = await promisify(execFile)("openshell", ["--version"], { timeout: 10_000, maxBuffer: 4096 });
|
|
89
|
+
if (!/\b0\.1\.6\b/.test(binary.stdout))
|
|
90
|
+
throw new Error("This reference requires OpenShell 0.1.6; no compute was prepared");
|
|
91
|
+
const root = resolve(opts.directory), assets = deps().assets ?? join(getDaemonPath(), "assets", "openshell");
|
|
92
|
+
const names = ["guest.py", "Dockerfile", "policy.yaml", "rig.yaml", "agents/worker/agent.yaml", "agents/worker/role.md", "agents/coordinator/agent.yaml", "agents/coordinator/role.md", "README.md", "driver-v1.schema.json", "claude-code-provider.yaml"];
|
|
93
|
+
for (const name of names) {
|
|
94
|
+
let data = readFileSync(join(assets, name));
|
|
95
|
+
if (name === "policy.yaml" && opts.mcpUrl && opts.guestBaseUrl) {
|
|
96
|
+
const mcp = new URL(opts.mcpUrl), activity = new URL(opts.guestBaseUrl);
|
|
97
|
+
if (![mcp, activity].every(url => ["http:", "https:"].includes(url.protocol) && !url.username && !url.password && !url.search && !url.hash)
|
|
98
|
+
|| activity.pathname !== "/")
|
|
99
|
+
throw new Error("Explicit guest endpoints without embedded credentials are required");
|
|
100
|
+
const mainPort = Number(process.env.OPENRIG_PORT ?? "7433");
|
|
101
|
+
const ports = [mcp, activity].map(url => Number(url.port || (url.protocol === "https:" ? 443 : 80)));
|
|
102
|
+
if (ports.includes(mainPort) || ports[0] === ports[1])
|
|
103
|
+
throw new Error("Select separate MCP and guest-only activity ports, never the daemon main port");
|
|
104
|
+
const policy = parseYaml(data.toString("utf8"));
|
|
105
|
+
for (const [name, url] of [["openrig_mcp", mcp], ["openrig_activity", activity]]) {
|
|
106
|
+
policy.network_policies[name].endpoints[0].host = url.hostname;
|
|
107
|
+
policy.network_policies[name].endpoints[0].port = Number(url.port || (url.protocol === "https:" ? 443 : 80));
|
|
108
|
+
}
|
|
109
|
+
data = Buffer.from(stringifyYaml(policy));
|
|
110
|
+
}
|
|
111
|
+
preserveWrite(join(root, name), data);
|
|
112
|
+
}
|
|
113
|
+
preserveWrite(join(home(), "community-harnesses", "openshell-claude.yaml"), readFileSync(join(assets, "preset.yaml")));
|
|
114
|
+
let ref;
|
|
115
|
+
if (opts.binding || opts.seat || opts.rig || opts.mcpUrl) {
|
|
116
|
+
if (!opts.binding || !opts.seat || !opts.rig || !opts.mcpUrl || !opts.guestBaseUrl)
|
|
117
|
+
throw new Error("Preparing work authority needs --binding, --seat, --rig, --mcp-url and --guest-base-url together");
|
|
118
|
+
ref = await prepareWork(home(), { bindingId: opts.binding, seat: opts.seat, rig: opts.rig, mcpUrl: opts.mcpUrl, artifactRoot: resolve(opts.artifactRoot ?? join(root, "artifacts")) });
|
|
119
|
+
}
|
|
120
|
+
report({ version: 1, driver: "openshell", vendorVersion: "0.1.6", directory: root,
|
|
121
|
+
...(ref ? { workConnectionRef: ref } : {}), effect: "reference and preset installed; no environment or native process created" });
|
|
122
|
+
}));
|
|
123
|
+
for (const verb of ["create", "attach"]) {
|
|
124
|
+
const sub = cmd.command(verb).argument("<binding>").description(verb === "create" ? "Journal intent, then explicitly create one owned sandbox; retries reconcile the same operation" : "Verify and bind an exact existing resource as an attached consumer")
|
|
125
|
+
.requiredOption("--seat <address>").option("--node <id>", "Existing node ID; otherwise claimed by the exact named seat on its first launch")
|
|
126
|
+
.requiredOption("--gateway <ref>").requiredOption("--workspace <ref>").requiredOption("--name <name>")
|
|
127
|
+
.requiredOption("--image <digest>").requiredOption("--provider <ref>").requiredOption("--policy <path>")
|
|
128
|
+
.requiredOption("--guest-base-url <origin>", "Guest-reachable guest-only activity listener origin (not the main daemon API)")
|
|
129
|
+
.option("--operation <id>", "Stable effect identity (default verb plus binding ID)").option("--json");
|
|
130
|
+
if (verb === "attach")
|
|
131
|
+
sub.requiredOption("--resource-id <id>", "Immutable live resource ID").option("--fingerprint <value>", "Expected host-key fingerprint");
|
|
132
|
+
sub.action(action(async (binding, opts) => {
|
|
133
|
+
managedId(binding);
|
|
134
|
+
const ref = connectionRef(home(), binding), work = readConnection(ref);
|
|
135
|
+
if (work.seat !== opts.seat)
|
|
136
|
+
throw new Error("The managed work connection belongs to another seat; no provider operation was requested");
|
|
137
|
+
const body = { version: 1, bindingId: binding, operationId: opts.operation ?? `${verb}-${binding}`, nodeId: opts.node, seat: opts.seat,
|
|
138
|
+
baseRuntime: "claude-code", guestRoot: "/sandbox/openrig", guestBaseUrl: opts.guestBaseUrl, coordinationRef: ref, artifactRoot: work.artifactRoot,
|
|
139
|
+
placement: { gateway: opts.gateway, workspace: opts.workspace, name: opts.name, image: opts.image, provider: opts.provider, policy: realpathSync(opts.policy) },
|
|
140
|
+
...(verb === "attach" ? { resourceId: opts.resourceId, fingerprint: opts.fingerprint } : {}) };
|
|
141
|
+
const res = await (await client()).post(`/api/environments/${verb}`, body, { timeoutMs: 120_000 });
|
|
142
|
+
report({ ...checked(res), operationId: body.operationId, effect: res.status === 202 ? "unconfirmed; reconcile this same operation" : "binding-confirmed; native launch not requested" });
|
|
143
|
+
}));
|
|
144
|
+
}
|
|
145
|
+
cmd.command("inspect").description("Read stored binding receipts or inspect the exact live resource").argument("<binding>").option("--live", "Observe the exact provider resource; unavailable is not absence").option("--json")
|
|
146
|
+
.action(action(async (binding, opts) => report(checked(await (await client()).get(`/api/environments/${encodeURIComponent(binding)}${opts.live ? "?live=true" : ""}`)))));
|
|
147
|
+
cmd.command("connect").argument("<binding>").requiredOption("--generation <id>").description("Open only the bound execution's viewer; closing it does not prove native or compute stopped")
|
|
148
|
+
.action(action(async (id, opts) => {
|
|
149
|
+
// Launch and the guest latch already verify all projected files. Opening a viewer needs only one live
|
|
150
|
+
// resource lookup (the driver bounds it at 30s), not another serial validation of every startup file.
|
|
151
|
+
const c = await client(), b = checked(await c.get(`/api/environments/${encodeURIComponent(id)}?live=true`, { timeoutMs: 35_000 }));
|
|
152
|
+
if (b.generation !== opts.generation)
|
|
153
|
+
throw new Error("The selected environment generation changed; no viewer was opened");
|
|
154
|
+
const args = ["--gateway", b.placement.gateway, "--workspace", b.placement.workspace, "sandbox", "connect", b.placement.name];
|
|
155
|
+
await new Promise((resolveExit, reject) => {
|
|
156
|
+
const child = spawn("openshell", args, { stdio: "inherit" });
|
|
157
|
+
child.once("error", reject);
|
|
158
|
+
child.once("exit", code => code === 0 ? resolveExit() : reject(new Error(`The environment viewer exited ${code}; native and compute state require inspection`)));
|
|
159
|
+
});
|
|
160
|
+
}));
|
|
161
|
+
cmd.command("export").argument("<binding>").requiredOption("--request <path>", "Versioned artifact request JSON with operation/task/generation/path/hash/bytes/schema/context")
|
|
162
|
+
.option("--json").description("Transfer actual bytes through the existing authenticated MCP work route, never an activity token")
|
|
163
|
+
.action(action(async (binding, opts) => {
|
|
164
|
+
const work = readConnection(connectionRef(home(), binding)), request = JSON.parse(readFileSync(opts.request, "utf8"));
|
|
165
|
+
const transport = new StreamableHTTPClientTransport(new URL(work.mcpUrl), { requestInit: { headers: { Authorization: `Bearer ${work.token}` } } });
|
|
166
|
+
const mcp = new Client({ name: "openrig-environment-export", version: "1" });
|
|
167
|
+
try {
|
|
168
|
+
await mcp.connect(transport);
|
|
169
|
+
const result = await mcp.callTool({ name: "rig_environment_export", arguments: { ...request, bindingId: binding } });
|
|
170
|
+
if (result.isError)
|
|
171
|
+
throw new Error(result.content.map(c => c.text ?? "").join("\n"));
|
|
172
|
+
report(result.structuredContent ?? result.content);
|
|
173
|
+
}
|
|
174
|
+
finally {
|
|
175
|
+
await mcp.close();
|
|
176
|
+
}
|
|
177
|
+
}));
|
|
178
|
+
cmd.command("checkpoint").argument("<binding>").requiredOption("--generation <id>", "Selected current execution generation")
|
|
179
|
+
.requiredOption("--operation <id>", "Stable private checkpoint identity").option("--json")
|
|
180
|
+
.description("Capture exact private native history and verified prior artifact references while the provider remains accessible")
|
|
181
|
+
.action(action(async (id, opts) => report(checked(await (await client()).post(`/api/environments/${encodeURIComponent(id)}/checkpoint`, { operationId: opts.operation, generation: opts.generation }, { timeoutMs: 120_000 })))));
|
|
182
|
+
cmd.command("recreate").argument("<binding>").requiredOption("--request <path>", "JSON with operationId, predecessor generation, checkpointId, exact resumeType/resumeToken and same-host placement")
|
|
183
|
+
.option("--json").description("Explicitly create successor compute only after exact predecessor cleanup and retained state verification; native launch remains normal rig restore")
|
|
184
|
+
.action(action(async (id, opts) => report(checked(await (await client()).post(`/api/environments/${encodeURIComponent(id)}/recreate`, JSON.parse(readFileSync(opts.request, "utf8")), { timeoutMs: 120_000 })))));
|
|
185
|
+
cmd.command("completion").argument("<binding>").requiredOption("--request <path>", "JSON selecting operationId, taskId, generation, exportOperationId and stop-native or stop-compute")
|
|
186
|
+
.option("--json").description("Select finite completion for one task, generation and required verified export; persistent defaults stay unchanged")
|
|
187
|
+
.action(action(async (id, opts) => report(checked(await (await client()).post(`/api/environments/${encodeURIComponent(id)}/completion`, JSON.parse(readFileSync(opts.request, "utf8")))))));
|
|
188
|
+
cmd.command("effect").argument("<binding>").requiredOption("--effect <name>", "close-viewer, stop-native, stop-compute or delete-owned")
|
|
189
|
+
.option("--generation <id>", "Selected execution generation; omit only for delete-owned before any generation exists")
|
|
190
|
+
.option("--resource-id <id>", "Exact immutable compute ID; required for delete-owned without a generation").requiredOption("--operation <id>", "Stable effect identity; retries reconcile without another provider mutation")
|
|
191
|
+
.option("--engine-socket <path>", "Owned local rootless Podman socket, required to capture dependent identities before delete-owned").option("--json")
|
|
192
|
+
.description("Execute one selected effect and return its separate observed outcome; attached native/storage/compute are preserved")
|
|
193
|
+
.action(action(async (id, opts) => report(checked(await (await client()).post(`/api/environments/${encodeURIComponent(id)}/effect`, { effect: opts.effect, generation: opts.generation ?? null, ...(opts.resourceId ? { resourceId: opts.resourceId } : {}), operationId: opts.operation, engineSocket: opts.engineSocket }, { timeoutMs: 120_000 })))));
|
|
194
|
+
cmd.addHelpText("after", "\nStart with rig environment setup --help. Run from your managed seat, or set OPENRIG_SESSION_NAME to the acting member@rig in a plain shell for existing transport attribution (not authentication). --guest-base-url names the separate guest-only activity listener, reachable from the guest; never the main API. Create/attach are explicit effects; a 202 is unconfirmed. The first native start remains rig up with the installed openshell-claude preset. Checkpoint before stop, select effects explicitly, and recreate compute before exact normal rig restore. No unknown effect permits fresh-native fallback.\n");
|
|
195
|
+
return cmd;
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=environment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../src/commands/environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACtG,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,6BAA6B,E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CAAC,CAAC;IAChP,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,cAAc,CAAC,iBAAiB,EAAE,yDAAyD,CAAC;SACrI,MAAM,CAAC,mBAAmB,EAAE,wFAAwF,CAAC;SACrH,MAAM,CAAC,oBAAoB,EAAE,4EAA4E,CAAC,CAAC,cAAc,CAAC,kBAAkB,EAAE,6EAA6E,CAAC;SAC5N,MAAM,CAAC,wBAAwB,EAAE,kGAAkG,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;SACrJ,WAAW,CAAC,qHAAqH,CAAC;SAClI,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,EAAU,EAAE,IAA4G,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,MAAM,EAAE,CAAC,CAAC,IAAI,CAAsB,qBAAqB,kBAAkB,CAAC,EAAE,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,SAAS,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAChe,GAAG,CAAC,WAAW,CAAC,OAAO,EAAE,+lBAA+lB,CAAC,CAAC;IAC1nB,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -2,6 +2,8 @@ import { Command } from "commander";
|
|
|
2
2
|
import type { StatusDeps } from "./status.js";
|
|
3
3
|
export interface ExportDeps extends StatusDeps {
|
|
4
4
|
writeFile: (path: string, content: string) => void;
|
|
5
|
+
/** Must fail with EEXIST when the path is taken. */
|
|
6
|
+
writeNewFile?: (path: string, content: string) => void;
|
|
5
7
|
exists?: (path: string) => boolean;
|
|
6
8
|
}
|
|
7
9
|
export declare function exportCommand(depsOverride?: ExportDeps): Command;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/commands/export.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,MAAM,WAAW,UAAW,SAAQ,UAAU;IAC5C,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;CACpC;
|
|
1
|
+
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/commands/export.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,MAAM,WAAW,UAAW,SAAQ,UAAU;IAC5C,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,oDAAoD;IACpD,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;CACpC;AA0CD,wBAAgB,aAAa,CAAC,YAAY,CAAC,EAAE,UAAU,GAAG,OAAO,CA0HhE"}
|
package/dist/commands/export.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import nodePath from "node:path";
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
import { Command } from "commander";
|
|
4
|
-
import { writeTextAtomically } from "../atomic-text-write.js";
|
|
4
|
+
import { writeNewText, writeTextAtomically } from "../atomic-text-write.js";
|
|
5
5
|
import { DaemonClient } from "../client.js";
|
|
6
6
|
import { getDaemonStatus, getDaemonUrl, daemonStatusGuard } from "../daemon-lifecycle.js";
|
|
7
7
|
import { realDeps } from "./daemon.js";
|
|
@@ -29,17 +29,36 @@ function copyCulture(file, root, outDir) {
|
|
|
29
29
|
fs.copyFileSync(source, target, fs.constants.COPYFILE_EXCL);
|
|
30
30
|
console.log(`Copied culture to ${target}`);
|
|
31
31
|
}
|
|
32
|
+
/** rig.yaml is also the name of an authored spec, and an export doesn't carry all of one (comments, a summary, startup
|
|
33
|
+
* it couldn't read back). So a default export takes the first free name, created so that it can't replace a file that
|
|
34
|
+
* appeared after the daemon was asked. Only a path the person named with -o may replace a file. */
|
|
35
|
+
function writeDefaultExport(write, first, content) {
|
|
36
|
+
for (let attempt = 1;; attempt++) {
|
|
37
|
+
const path = attempt === 1 ? first : attempt === 2 ? "rig-export.yaml" : `rig-export-${attempt - 1}.yaml`;
|
|
38
|
+
try {
|
|
39
|
+
write(path, content);
|
|
40
|
+
if (attempt > 1)
|
|
41
|
+
console.warn(`${first} already exists and was left unchanged. Use -o ${first} to replace it.`);
|
|
42
|
+
return path;
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
if (error.code !== "EEXIST")
|
|
46
|
+
throw error;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
32
50
|
export function exportCommand(depsOverride) {
|
|
33
51
|
const cmd = new Command("export").description("Export a rig spec as YAML");
|
|
34
52
|
const getDeps = () => depsOverride ?? {
|
|
35
53
|
lifecycleDeps: realDeps(),
|
|
36
54
|
clientFactory: (url) => new DaemonClient(url),
|
|
37
55
|
writeFile: (p, content) => writeTextAtomically(p, content, "export"),
|
|
56
|
+
writeNewFile: writeNewText,
|
|
38
57
|
exists: (p) => fs.existsSync(p),
|
|
39
58
|
};
|
|
40
59
|
cmd
|
|
41
60
|
.argument("<rig>", "Rig name or ID to export")
|
|
42
|
-
.option("-o, --output <path>", "Output file path", "rig.yaml")
|
|
61
|
+
.option("-o, --output <path>", "Output file path, replacing any file there. Without it, an existing rig.yaml is kept and the export goes to an unused rig-export*.yaml", "rig.yaml")
|
|
43
62
|
.action(async (rigId, opts) => {
|
|
44
63
|
const deps = getDeps();
|
|
45
64
|
const status = await getDaemonStatus(deps.lifecycleDeps);
|
|
@@ -62,11 +81,16 @@ export function exportCommand(depsOverride) {
|
|
|
62
81
|
process.exitCode = 1;
|
|
63
82
|
}
|
|
64
83
|
else {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
84
|
+
const written = cmd.getOptionValueSource("output") === "default"
|
|
85
|
+
? writeDefaultExport(deps.writeNewFile ?? deps.writeFile, opts.output, res.data)
|
|
86
|
+
: (deps.writeFile(opts.output, res.data), opts.output);
|
|
87
|
+
console.log(`Exported to ${written}`);
|
|
88
|
+
for (const line of String(res.data).split("\n")) {
|
|
68
89
|
if (line.startsWith("# Not carried: "))
|
|
69
90
|
console.log(line.slice(2));
|
|
91
|
+
if (line.startsWith("# Member startup not carried for "))
|
|
92
|
+
console.warn(`Warning: ${line.slice(2)}`);
|
|
93
|
+
}
|
|
70
94
|
// Check for referenced culture_file and startup files resolving from the output directory
|
|
71
95
|
const checkExists = deps.exists ?? ((p) => fs.existsSync(p));
|
|
72
96
|
const outDir = nodePath.dirname(nodePath.resolve(opts.output));
|
|
@@ -85,7 +109,7 @@ export function exportCommand(depsOverride) {
|
|
|
85
109
|
const parsed = parse(res.data);
|
|
86
110
|
if (parsed && typeof parsed === "object") {
|
|
87
111
|
if (parsed["name"] === "starter") {
|
|
88
|
-
console.warn(
|
|
112
|
+
console.warn(`Warning: this export still installs as 'starter'. Before sharing, rename the team's name in ${written}; changing the bundle name alone does not rename the installed rig.`);
|
|
89
113
|
}
|
|
90
114
|
const pods = parsed["pods"];
|
|
91
115
|
for (const pod of Array.isArray(pods) ? pods : []) {
|
|
@@ -117,7 +141,7 @@ export function exportCommand(depsOverride) {
|
|
|
117
141
|
}
|
|
118
142
|
const startupBlocks = [
|
|
119
143
|
parsed["startup"],
|
|
120
|
-
...(Array.isArray(pods) ? pods.
|
|
144
|
+
...(Array.isArray(pods) ? pods.flatMap((pod) => [pod.startup, ...(pod.members ?? []).map((member) => member.startup)]) : []),
|
|
121
145
|
];
|
|
122
146
|
for (const startup of startupBlocks) {
|
|
123
147
|
if (startup && Array.isArray(startup.files)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/commands/export.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/commands/export.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,YAAY,EAAG,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAalD,2EAA2E;AAC3E,SAAS,WAAW,CAAC,IAAY,EAAE,IAAY,EAAE,MAAc;IAC7D,IAAI,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,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AE,CAAC;wBACnC,MAAM,UAAU,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;wBACrD,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,CAAC;4BAC7B,MAAM,UAAU,GAAG,YAAY,CAAC,CAAC,CAAC,eAAe,YAAY,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;4BACtE,OAAO,CAAC,IAAI,CACV,6BAA6B,OAAO,IAAI,UAAU,gCAAgC,MAAM,KAAK;gCAC7F,oIAAoI,YAAY,IAAI,UAAU,IAAI,CACnK,CAAC;wBACJ,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;YAAC,MAAM,CAAC;gBACP,6CAA6C;YAC/C,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;IAEL,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/commands/gateway.js
CHANGED
|
@@ -110,7 +110,7 @@ export function gatewayCommand(deps = {}) {
|
|
|
110
110
|
.command("add <entityId>")
|
|
111
111
|
.description("Add a human fragment (verb-add-only; the fragment is truth, the registry is a GENERATED projection)")
|
|
112
112
|
.requiredOption("--display-name <name>", "Human-readable display name")
|
|
113
|
-
.
|
|
113
|
+
.option("--binding <kind:connectorRef:secretsRef:role[:handle=<id>]>", "Connector binding (repeatable); leave it out for a person with no connector, who's reached in the Feed and Steering only. With bindings, role primary|secondary, EXACTLY ONE primary. connectorRef and secretsRef are config/vault labels (e.g. for Slack: slack:openrig-personal:file:<env-path>:primary:handle=<id>; tokens come from 'rig slack setup --secrets-env-file', never inline). Optional handle=<platform id> makes the binding inbound-resolvable (unique per kind); omit it for outbound-only.", (v, acc = []) => { acc.push(v); return acc; })
|
|
114
114
|
.requiredOption("--delivery-class <A|B|C|D>", "Notification loudness class (the notifications register selection)")
|
|
115
115
|
.option("--away", "Set the AWAY preset")
|
|
116
116
|
.option("--replace", "Explicitly replace an existing human (no silent overwrite)")
|
|
@@ -155,7 +155,7 @@ export function gatewayCommand(deps = {}) {
|
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
const bindings = [];
|
|
158
|
-
for (const spec of opts.binding) {
|
|
158
|
+
for (const spec of opts.binding ?? []) {
|
|
159
159
|
const b = parseBindingSpec(spec);
|
|
160
160
|
if (!b.ok) {
|
|
161
161
|
console.error(`--binding: ${b.error}`);
|
|
@@ -250,8 +250,9 @@ Example:
|
|
|
250
250
|
return;
|
|
251
251
|
}
|
|
252
252
|
for (const h of humans) {
|
|
253
|
-
const inbound = h.bindings.inboundResolvable ? "" : " [outbound-only]";
|
|
254
|
-
|
|
253
|
+
const inbound = h.bindings.inboundResolvable || !h.bindings.primary ? "" : " [outbound-only]";
|
|
254
|
+
const primary = h.bindings.primary ? `primary ${h.bindings.primary.kind}:${h.bindings.primary.connectorRef}` : "no connector: Feed and Steering only";
|
|
255
|
+
console.log(`${h.entityId} "${h.displayName}" class=${h.deliveryClass} ${h.availability} bindings=${h.bindings.count} (${primary}) delivery=${h.deliveryReadiness.state}${inbound}`);
|
|
255
256
|
if (!h.deliveryReadiness.ready)
|
|
256
257
|
console.log(` delivery: ${h.deliveryReadiness.reason}${h.deliveryReadiness.nextAction ? `; next: ${h.deliveryReadiness.nextAction}` : ""}`);
|
|
257
258
|
console.log(` ${"unknown" in h.quiet ? `quiet: unknown (${h.quiet.unknown})` : describeQuiet(h.quiet)}`);
|
|
@@ -792,6 +793,16 @@ Examples:
|
|
|
792
793
|
.option("--json", "Complete records as JSON, including organizations and groups")
|
|
793
794
|
.action(async (opts) => {
|
|
794
795
|
const registry = await import("../../daemon/dist/gateway-human-registry-surface.js");
|
|
796
|
+
if (opts.json) {
|
|
797
|
+
const result = registry.participantsJsonView(undefined, opts.organization);
|
|
798
|
+
if (!result.ok) {
|
|
799
|
+
console.error(`refused: ${result.error}`);
|
|
800
|
+
process.exitCode = 1;
|
|
801
|
+
return;
|
|
802
|
+
}
|
|
803
|
+
console.log(JSON.stringify(result));
|
|
804
|
+
return;
|
|
805
|
+
}
|
|
795
806
|
const view = registry.participantsView();
|
|
796
807
|
if (!view.ok) {
|
|
797
808
|
console.error(`refused: ${view.error}`);
|
|
@@ -800,13 +811,6 @@ Examples:
|
|
|
800
811
|
}
|
|
801
812
|
const shown = opts.organization ? view.participants.filter((p) => p.organization?.id === opts.organization) : view.participants;
|
|
802
813
|
const defaultPerson = view.default.person ? { id: view.default.person.entityId, source: view.default.source } : { id: null, reason: view.default.source === "none" ? view.default.reason : null };
|
|
803
|
-
if (opts.json) {
|
|
804
|
-
const side = registry.readParticipantsFile();
|
|
805
|
-
console.log(JSON.stringify({ ok: true, participants: shown, default: defaultPerson,
|
|
806
|
-
organizations: side.ok ? side.file.organizations : null, groups: side.ok ? side.file.groups : null,
|
|
807
|
-
warnings: view.warnings, participantFile: view.sideFile }));
|
|
808
|
-
return;
|
|
809
|
-
}
|
|
810
814
|
if (!shown.length)
|
|
811
815
|
console.log(opts.organization ? `no participants in organization "${opts.organization}"` : "no participants yet: rig gateway human add … registers a person, rig gateway channel add … a shared channel");
|
|
812
816
|
for (const p of shown) {
|