@openrig/cli 0.7.13 → 0.7.14
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 +5 -5
- package/daemon/assets/plugins/openrig/.claude-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/.codex-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/.cursor-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/skills/working-with-an-openrig-team/SKILL.md +7 -0
- package/daemon/assets/skills/rigs/SKILL.md +5 -2
- package/daemon/context-packs/help/manifest.yaml +1 -1
- package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
- package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +65 -21
- package/daemon/context-packs/reference/getting-started.md +13 -8
- package/daemon/context-packs/reference/manifest.yaml +1 -1
- package/daemon/context-packs/reference/rig-spec.md +4 -0
- package/daemon/context-packs/reference/tmux-servers.md +8 -2
- package/daemon/context-packs/reference/whats-new.md +153 -15
- package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
- package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
- package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/working-with-an-openrig-team/SKILL.md +7 -0
- package/daemon/context-packs/skills/core/working-with-an-openrig-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
- package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-user/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/manifest.yaml +1 -1
- package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
- package/daemon/context-packs/world-example/manifest.yaml +1 -1
- package/daemon/context-packs/world-public/manifest.yaml +1 -1
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +27 -4
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +11 -2
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +32 -9
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/tmux-exec.d.ts +4 -4
- package/daemon/dist/adapters/tmux-exec.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-exec.js +37 -8
- package/daemon/dist/adapters/tmux-exec.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +9 -0
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +23 -3
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/attention-surface.d.ts +8 -0
- package/daemon/dist/attention-surface.d.ts.map +1 -1
- package/daemon/dist/attention-surface.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +6 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/163_network_installations.d.ts +7 -0
- package/daemon/dist/db/migrations/163_network_installations.d.ts.map +1 -0
- package/daemon/dist/db/migrations/163_network_installations.js +23 -0
- package/daemon/dist/db/migrations/163_network_installations.js.map +1 -0
- package/daemon/dist/db/migrations/164_queue_items_reply_to_index.d.ts +5 -0
- package/daemon/dist/db/migrations/164_queue_items_reply_to_index.d.ts.map +1 -0
- package/daemon/dist/db/migrations/164_queue_items_reply_to_index.js +9 -0
- package/daemon/dist/db/migrations/164_queue_items_reply_to_index.js.map +1 -0
- package/daemon/dist/db/migrations/166_queue_list_read_indexes.d.ts +4 -0
- package/daemon/dist/db/migrations/166_queue_list_read_indexes.d.ts.map +1 -0
- package/daemon/dist/db/migrations/166_queue_list_read_indexes.js +17 -0
- package/daemon/dist/db/migrations/166_queue_list_read_indexes.js.map +1 -0
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +5 -0
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +12 -3
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/context-monitor.js +8 -3
- package/daemon/dist/domain/context-monitor.js.map +1 -1
- package/daemon/dist/domain/draft-aware-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/draft-aware-delivery.js +2 -1
- package/daemon/dist/domain/draft-aware-delivery.js.map +1 -1
- package/daemon/dist/domain/hosts/pairing-ask.d.ts +8 -0
- package/daemon/dist/domain/hosts/pairing-ask.d.ts.map +1 -1
- package/daemon/dist/domain/hosts/pairing-ask.js +20 -0
- package/daemon/dist/domain/hosts/pairing-ask.js.map +1 -1
- package/daemon/dist/domain/input-read-diagnostic.d.ts +30 -0
- package/daemon/dist/domain/input-read-diagnostic.d.ts.map +1 -0
- package/daemon/dist/domain/input-read-diagnostic.js +32 -0
- package/daemon/dist/domain/input-read-diagnostic.js.map +1 -0
- package/daemon/dist/domain/native-model-picker.d.ts +8 -0
- package/daemon/dist/domain/native-model-picker.d.ts.map +1 -0
- package/daemon/dist/domain/native-model-picker.js +35 -0
- package/daemon/dist/domain/native-model-picker.js.map +1 -0
- package/daemon/dist/domain/native-process-lineage.d.ts +6 -0
- package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-lineage.js +34 -29
- package/daemon/dist/domain/native-process-lineage.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe.d.ts +6 -0
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +124 -2
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/network/network-bindings.d.ts +32 -2
- package/daemon/dist/domain/network/network-bindings.d.ts.map +1 -1
- package/daemon/dist/domain/network/network-bindings.js +65 -28
- package/daemon/dist/domain/network/network-bindings.js.map +1 -1
- package/daemon/dist/domain/network/network-installations.d.ts +97 -0
- package/daemon/dist/domain/network/network-installations.d.ts.map +1 -0
- package/daemon/dist/domain/network/network-installations.js +371 -0
- package/daemon/dist/domain/network/network-installations.js.map +1 -0
- package/daemon/dist/domain/operation-correlation.d.ts +1 -1
- package/daemon/dist/domain/operation-correlation.d.ts.map +1 -1
- package/daemon/dist/domain/operation-correlation.js +1 -1
- package/daemon/dist/domain/operation-correlation.js.map +1 -1
- package/daemon/dist/domain/process-observation-pass.d.ts +20 -0
- package/daemon/dist/domain/process-observation-pass.d.ts.map +1 -0
- package/daemon/dist/domain/process-observation-pass.js +80 -0
- package/daemon/dist/domain/process-observation-pass.js.map +1 -0
- package/daemon/dist/domain/queue-erasure.d.ts +10 -6
- package/daemon/dist/domain/queue-erasure.d.ts.map +1 -1
- package/daemon/dist/domain/queue-erasure.js +31 -18
- package/daemon/dist/domain/queue-erasure.js.map +1 -1
- package/daemon/dist/domain/queue-recovery.d.ts +10 -1
- package/daemon/dist/domain/queue-recovery.d.ts.map +1 -1
- package/daemon/dist/domain/queue-recovery.js +25 -3
- package/daemon/dist/domain/queue-recovery.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +23 -2
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +77 -4
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-retention.d.ts +1 -1
- package/daemon/dist/domain/queue-retention.d.ts.map +1 -1
- package/daemon/dist/domain/queue-retention.js +1 -0
- package/daemon/dist/domain/queue-retention.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts +5 -0
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +335 -50
- package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
- package/daemon/dist/domain/receiver-context.d.ts.map +1 -1
- package/daemon/dist/domain/receiver-context.js +3 -2
- package/daemon/dist/domain/receiver-context.js.map +1 -1
- package/daemon/dist/domain/restore-guidance.d.ts +3 -0
- package/daemon/dist/domain/restore-guidance.d.ts.map +1 -1
- package/daemon/dist/domain/restore-guidance.js +5 -0
- package/daemon/dist/domain/restore-guidance.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +6 -0
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +69 -5
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/restore-preconditions.d.ts.map +1 -1
- package/daemon/dist/domain/restore-preconditions.js +2 -1
- package/daemon/dist/domain/restore-preconditions.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +1 -0
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rosters.d.ts +2 -1
- package/daemon/dist/domain/rosters.d.ts.map +1 -1
- package/daemon/dist/domain/rosters.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +9 -0
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-adapter.js +2 -0
- package/daemon/dist/domain/runtime-adapter.js.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.d.ts +3 -1
- package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.js +8 -5
- package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +20 -2
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +2 -0
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +37 -6
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +8 -3
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/team-operations.d.ts +20 -0
- package/daemon/dist/domain/team-operations.d.ts.map +1 -0
- package/daemon/dist/domain/team-operations.js +23 -0
- package/daemon/dist/domain/team-operations.js.map +1 -0
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts +12 -2
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.js +52 -2
- package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-live-workspace.d.ts +42 -0
- package/daemon/dist/domain/terminal/herdr-live-workspace.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/herdr-live-workspace.js +118 -0
- package/daemon/dist/domain/terminal/herdr-live-workspace.js.map +1 -0
- package/daemon/dist/domain/terminal/herdr-sessions.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-sessions.js +3 -0
- package/daemon/dist/domain/terminal/herdr-sessions.js.map +1 -1
- package/daemon/dist/domain/terminal/rex-adapter.d.ts +3 -0
- package/daemon/dist/domain/terminal/rex-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/rex-adapter.js +10 -1
- package/daemon/dist/domain/terminal/rex-adapter.js.map +1 -1
- package/daemon/dist/domain/terminal/rex-agent-status.d.ts +76 -0
- package/daemon/dist/domain/terminal/rex-agent-status.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/rex-agent-status.js +168 -0
- package/daemon/dist/domain/terminal/rex-agent-status.js.map +1 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts +12 -1
- package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.d.ts +2 -0
- package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.js +3 -2
- package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +9 -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 +8 -2
- package/daemon/dist/domain/user-settings/settings-browser.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-browser.js +5 -2
- package/daemon/dist/domain/user-settings/settings-browser.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts +15 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.js +108 -44
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/workflow-exception-escalation.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-exception-escalation.js +4 -2
- package/daemon/dist/domain/workflow-exception-escalation.js.map +1 -1
- package/daemon/dist/domain/workflow-validator.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-validator.js +16 -0
- package/daemon/dist/domain/workflow-validator.js.map +1 -1
- package/daemon/dist/herdr-live-workspace-surface.d.ts +2 -0
- package/daemon/dist/herdr-live-workspace-surface.d.ts.map +1 -0
- package/daemon/dist/herdr-live-workspace-surface.js +2 -0
- package/daemon/dist/herdr-live-workspace-surface.js.map +1 -0
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +1 -0
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/routes/attention.d.ts.map +1 -1
- package/daemon/dist/routes/attention.js +5 -1
- package/daemon/dist/routes/attention.js.map +1 -1
- package/daemon/dist/routes/hosts.d.ts.map +1 -1
- package/daemon/dist/routes/hosts.js +23 -14
- package/daemon/dist/routes/hosts.js.map +1 -1
- package/daemon/dist/routes/network.d.ts +7 -3
- package/daemon/dist/routes/network.d.ts.map +1 -1
- package/daemon/dist/routes/network.js +52 -17
- package/daemon/dist/routes/network.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +9 -0
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/rigspec.js +13 -4
- package/daemon/dist/routes/rigspec.js.map +1 -1
- package/daemon/dist/routes/sessions.d.ts.map +1 -1
- package/daemon/dist/routes/sessions.js +24 -5
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/terminal.js +1 -1
- package/daemon/dist/routes/terminal.js.map +1 -1
- package/daemon/dist/server.d.ts +1 -0
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +2 -0
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +19 -5
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/dist/tmux-server-start-surface.d.ts +2 -0
- package/daemon/dist/tmux-server-start-surface.d.ts.map +1 -0
- package/daemon/dist/tmux-server-start-surface.js +2 -0
- package/daemon/dist/tmux-server-start-surface.js.map +1 -0
- package/daemon/dist/tmux-server-start.d.ts +13 -0
- package/daemon/dist/tmux-server-start.d.ts.map +1 -0
- package/daemon/dist/tmux-server-start.js +36 -0
- package/daemon/dist/tmux-server-start.js.map +1 -0
- package/daemon/docs/reference/agent-startup-guide.md +34 -7
- package/daemon/docs/reference/agent-state-taxonomy.md +2 -1
- package/daemon/docs/reference/daemon-http-clients.md +42 -0
- package/daemon/docs/reference/getting-started.md +13 -8
- package/daemon/docs/reference/hosted-members.md +29 -3
- package/daemon/docs/reference/network-connector.md +76 -5
- package/daemon/docs/reference/operation-correlation.md +18 -2
- package/daemon/docs/reference/queue-erasure.md +7 -5
- package/daemon/docs/reference/quickstart.md +2 -2
- package/daemon/docs/reference/rig-spec.md +4 -0
- package/daemon/docs/reference/seat-delivery.md +16 -1
- package/daemon/docs/reference/terminal-sessions.md +12 -0
- package/daemon/docs/reference/tmux-servers.md +8 -2
- package/daemon/docs/reference/whats-new.md +153 -15
- package/daemon/specs/agents/shared/skills/core/working-with-an-openrig-team/SKILL.md +7 -0
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +27 -11
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/startup/context.md +11 -3
- package/dist/build-info.js +3 -3
- package/dist/commands/broadcast.js +7 -3
- package/dist/commands/broadcast.js.map +1 -1
- package/dist/commands/chatroom.d.ts.map +1 -1
- package/dist/commands/chatroom.js +8 -3
- package/dist/commands/chatroom.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +50 -10
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/daemon.d.ts +0 -4
- package/dist/commands/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +1 -19
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/doctor.js +1 -1
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +2 -1
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/gateway.d.ts.map +1 -1
- package/dist/commands/gateway.js +5 -0
- package/dist/commands/gateway.js.map +1 -1
- package/dist/commands/host.js +2 -2
- package/dist/commands/host.js.map +1 -1
- package/dist/commands/import.d.ts.map +1 -1
- package/dist/commands/import.js +96 -3
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/network.d.ts.map +1 -1
- package/dist/commands/network.js +72 -17
- package/dist/commands/network.js.map +1 -1
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +44 -0
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +61 -3
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/roster.d.ts +2 -4
- package/dist/commands/roster.d.ts.map +1 -1
- package/dist/commands/roster.js +3 -12
- package/dist/commands/roster.js.map +1 -1
- package/dist/commands/seat.js +2 -2
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts +4 -0
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +6 -1
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/setup.js +1 -1
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/terminal.d.ts.map +1 -1
- package/dist/commands/terminal.js +9 -7
- package/dist/commands/terminal.js.map +1 -1
- package/dist/config-store.d.ts +14 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +34 -5
- package/dist/config-store.js.map +1 -1
- package/dist/lib/check-in.d.ts +7 -0
- package/dist/lib/check-in.d.ts.map +1 -0
- package/dist/lib/check-in.js +13 -0
- package/dist/lib/check-in.js.map +1 -0
- package/dist/mcp-http.d.ts.map +1 -1
- package/dist/mcp-http.js +25 -2
- package/dist/mcp-http.js.map +1 -1
- package/dist/mcp-server.d.ts +12 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +185 -57
- package/dist/mcp-server.js.map +1 -1
- package/dist/person-registration-offer.d.ts +10 -0
- package/dist/person-registration-offer.d.ts.map +1 -0
- package/dist/person-registration-offer.js +25 -0
- package/dist/person-registration-offer.js.map +1 -0
- package/dist/terminal-window.d.ts.map +1 -1
- package/dist/terminal-window.js +20 -102
- package/dist/terminal-window.js.map +1 -1
- package/dist/tmux-attachment.d.ts.map +1 -1
- package/dist/tmux-attachment.js +3 -1
- package/dist/tmux-attachment.js.map +1 -1
- package/package.json +1 -1
- package/tui/dist/config/pairing.d.ts.map +1 -1
- package/tui/dist/config/pairing.js +8 -3
- package/tui/dist/config/pairing.js.map +1 -1
- package/tui/dist/connected-assistants.d.ts +20 -0
- package/tui/dist/connected-assistants.d.ts.map +1 -0
- package/tui/dist/connected-assistants.js +51 -0
- package/tui/dist/connected-assistants.js.map +1 -0
- package/tui/dist/daemon-client.d.ts +8 -0
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +8 -0
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +13 -2
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +4 -0
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/topology/glyphs.d.ts.map +1 -1
- package/tui/dist/topology/glyphs.js +4 -0
- package/tui/dist/topology/glyphs.js.map +1 -1
- package/tui/dist/types.d.ts +11 -0
- package/tui/dist/types.d.ts.map +1 -1
package/dist/mcp-server.js
CHANGED
|
@@ -91,6 +91,13 @@ function ignoredFilter(data, filters) {
|
|
|
91
91
|
const sinceMs = filters.since ? Date.parse(filters.since) : Number.NaN;
|
|
92
92
|
if (!Number.isNaN(sinceMs) && rows.some((row) => typeof row.tsUpdated === "string" && Date.parse(row.tsUpdated) < sinceMs))
|
|
93
93
|
return "since";
|
|
94
|
+
if (filters.tags?.length && rows.some((row) => {
|
|
95
|
+
if (!row || typeof row !== "object")
|
|
96
|
+
return true;
|
|
97
|
+
const rowTags = row.tags;
|
|
98
|
+
return !Array.isArray(rowTags) || filters.tags.some((tag) => !rowTags.includes(tag));
|
|
99
|
+
}))
|
|
100
|
+
return "tag";
|
|
94
101
|
return null;
|
|
95
102
|
}
|
|
96
103
|
/** A rig's team from its detail (authored delegates_to edges and the daemon's representative) and its node inventory
|
|
@@ -257,16 +264,18 @@ function projectForExternal(row, view) {
|
|
|
257
264
|
fields.pickup = { state: pickup.state };
|
|
258
265
|
return fields;
|
|
259
266
|
}
|
|
260
|
-
/**
|
|
261
|
-
* successorsTruncated, successorNote), which name rows and
|
|
262
|
-
* show's scope-checked successor (successorOf).
|
|
263
|
-
|
|
267
|
+
/** An item as a scoped caller receives it: without the daemon's own fields that carry other rows regardless of this
|
|
268
|
+
* caller's scope. Those are the successor fields (successors, successorsTruncated, successorNote), which name rows and
|
|
269
|
+
* remote ids; a handed-on item's answer is show's scope-checked successor (successorOf). And the answers people returned
|
|
270
|
+
* to the item (answers), which are other rows, from people, to its asker. */
|
|
271
|
+
function withoutDaemonLinkedRows(row) {
|
|
264
272
|
if (!row || typeof row !== "object" || Array.isArray(row))
|
|
265
273
|
return row;
|
|
266
274
|
const fields = { ...row };
|
|
267
275
|
delete fields.successors;
|
|
268
276
|
delete fields.successorsTruncated;
|
|
269
277
|
delete fields.successorNote;
|
|
278
|
+
delete fields.answers;
|
|
270
279
|
return fields;
|
|
271
280
|
}
|
|
272
281
|
/** What an authenticated non-owner caller may reach: its own seat, its rigs' seats, the items they send or own (to read),
|
|
@@ -372,6 +381,15 @@ function outOfScope(what, hint) {
|
|
|
372
381
|
const message = `${what} is outside what this connection may reach.${hint ? ` ${hint}` : ""}`;
|
|
373
382
|
return errorResult(JSON.stringify({ ok: false, error: "out_of_scope", message }), "out_of_scope", message);
|
|
374
383
|
}
|
|
384
|
+
/** A new create the grant service's fair-use limit holds back: nothing was written, and it says when to retry with the same
|
|
385
|
+
* id. `unread`: whether an earlier create with this id was saved couldn't be read. */
|
|
386
|
+
function fairUseRetryLater(qitemId, retryAfterSeconds, unread) {
|
|
387
|
+
const earlier = unread ? ` Whether an earlier attempt with this id was saved is unknown: check rig_queue_show with qitemId ${qitemId} before retrying.` : "";
|
|
388
|
+
const message = `OpenRig: this account has reached its fair-use limit for new work just now. Nothing was created by this call.${earlier}`
|
|
389
|
+
+ ` Retry after ${retryAfterSeconds} seconds with the same qitemId ${qitemId}. Work you already have continues as usual: read, claim, answer and`
|
|
390
|
+
+ " close it, and to reply to an item addressed to you, put the reply in its resolution when you close it.";
|
|
391
|
+
return errorResult(message, "fair_use_retry_later", message, { retryable: true, retryAfterSeconds, qitemId, outcome: "not_written", ...(unread ? { earlierAttempt: "unknown" } : {}) });
|
|
392
|
+
}
|
|
375
393
|
/** A file the daemon read through a shared root, as text from offset: at most CONTEXT_TEXT_LIMIT characters, with
|
|
376
394
|
* nextOffset when more of what the daemon read remains, and its byte cut when the file was longer than the daemon reads. */
|
|
377
395
|
function artifactView(source, read, offset) {
|
|
@@ -431,6 +449,27 @@ function transportRequestOptions(timeout) {
|
|
|
431
449
|
const READ_ONLY = { readOnlyHint: true };
|
|
432
450
|
const ADDITIVE = { readOnlyHint: false, destructiveHint: false };
|
|
433
451
|
const DESTRUCTIVE = { readOnlyHint: false, destructiveHint: true };
|
|
452
|
+
/** The title and plain first sentence a connected assistant's client shows a person for each tool. Each replaces only the
|
|
453
|
+
* opening it names; every rule after it stays as the model reads it. */
|
|
454
|
+
export const PLAIN_WORDING = {
|
|
455
|
+
rig_queue_list: { title: "List my OpenRig requests", replaces: "List queue items.",
|
|
456
|
+
with: "Lists the requests addressed to this assistant, or that it sent." },
|
|
457
|
+
rig_queue_show: { title: "Show one request", replaces: "Read one queue item and its transitions.",
|
|
458
|
+
with: "Shows one request, who picked it up, and its answer." },
|
|
459
|
+
rig_queue_create: { title: "Send a request", replaces: "Hand a task to another seat as a durable queue item.",
|
|
460
|
+
with: "Sends a request to another assistant on your team." },
|
|
461
|
+
rig_queue_claim: { title: "Pick up a request", replaces: "Claim a queue item assigned to this seat before working on it.",
|
|
462
|
+
with: "Marks a request addressed to this assistant as picked up, so others see it's being worked on. Do it before working on the request." },
|
|
463
|
+
rig_queue_update: { title: "Answer a request", replaces: "Update a queue item: add a note, block it, close it, or reopen a closed one.",
|
|
464
|
+
with: "Adds this assistant's answer to a request, or a note while it works. It can also block, close or reopen one." },
|
|
465
|
+
rig_artifact_read: { title: "Read a shared file",
|
|
466
|
+
replaces: "Read a finished item's artifact (its evidenceRef), or a named file, through the daemon's shared roots (OPENRIG_FILES_ALLOWLIST), as text:",
|
|
467
|
+
with: "Reads a file attached to a request. It returns text:" },
|
|
468
|
+
rig_team: { title: "Show my team", replaces: "Show a rig's team.",
|
|
469
|
+
with: "Shows the assistants on your team, each one's address for sending it a request, and which one leads." },
|
|
470
|
+
rig_whoami: { title: "Show this connection", replaces: "Show which OpenRig seat this server acts as: ",
|
|
471
|
+
with: "Shows which assistant this connection is and which team it belongs to. It answers with " },
|
|
472
|
+
};
|
|
434
473
|
/** The tool each external object/action pair offers. A pair not listed here offers nothing. */
|
|
435
474
|
const EXTERNAL_TOOLS = {
|
|
436
475
|
queue: { create: "rig_queue_create", show: "rig_queue_show", list: "rig_queue_list", claim: "rig_queue_claim", update: "rig_queue_update" },
|
|
@@ -483,7 +522,7 @@ export const MCP_OPERATIONS = [
|
|
|
483
522
|
{ tool: "rig_environment_export", routes: ["GET /api/queue/:qitemId", "POST /api/environments/:bindingId/export"], effect: "additive", access: "work" },
|
|
484
523
|
{ tool: "rig_telemetry_events", routes: ["GET /api/telemetry/v1/events"], effect: "read", access: "owner" },
|
|
485
524
|
{ tool: "rig_whoami", routes: ["GET /api/whoami"], effect: "read", access: "work" },
|
|
486
|
-
{ tool: "rig_team", routes: ["GET /api/rigs/:rigId", "GET /api/rigs/:rigId/nodes", "GET /healthz"], effect: "read", access: "work" },
|
|
525
|
+
{ tool: "rig_team", routes: ["GET /api/rigs/:rigId", "GET /api/rigs/:rigId/nodes", "GET /healthz", "GET /api/queue/hosted-members"], effect: "read", access: "work" },
|
|
487
526
|
{ tool: "rig_slices", routes: ["GET /api/slices"], effect: "read", access: "workspace" },
|
|
488
527
|
{ tool: "rig_mission", routes: ["GET /api/missions/:missionId"], effect: "read", access: "workspace" },
|
|
489
528
|
{ tool: "rig_context_pack", routes: ["GET /api/context-packs/library/by-ref"], effect: "read", access: "workspace" },
|
|
@@ -552,7 +591,7 @@ const EXTERNAL_PERSON_INSTRUCTIONS = [
|
|
|
552
591
|
].join("\n");
|
|
553
592
|
/** For an external grant that names claim and update: how it works the items addressed to it, messages included. */
|
|
554
593
|
const EXTERNAL_INBOX_INSTRUCTIONS = [...SHARED_INSTRUCTIONS,
|
|
555
|
-
"Items addressed to your seat are yours: rig_queue_list with owned set lists them. For each, claim it (rig_queue_claim), do it, then close it done with closure reason no-follow-on and the answer in resolution (rig_queue_update); the sender reads that answer on the same item. A message is an item too: read it
|
|
594
|
+
"Items addressed to your seat are yours: rig_queue_list with owned set lists them. For each, claim it (rig_queue_claim), do it, then close it done with closure reason no-follow-on and the answer in resolution (rig_queue_update); the sender reads that answer on the same item. A message is an item too: read it and close it done, with your reply in resolution when it needs one; its sender reads that reply on the same item. Nothing promises to wake you, so check your items again.",
|
|
556
595
|
].join("\n");
|
|
557
596
|
function instructionsFor(access, frontDoor = false) {
|
|
558
597
|
if (!access?.external)
|
|
@@ -562,29 +601,47 @@ function instructionsFor(access, frontDoor = false) {
|
|
|
562
601
|
: tools.has("rig_question_list") || tools.has("rig_question_answer") ? EXTERNAL_PERSON_INSTRUCTIONS : EXTERNAL_INSTRUCTIONS;
|
|
563
602
|
return tools.has("rig_team") ? `Discover the team this grant connects you to by calling rig_team without rigId. A sole granted rig is selected automatically; with several, it returns the granted names to choose from.\n${instructions}` : instructions;
|
|
564
603
|
}
|
|
565
|
-
/**
|
|
566
|
-
*
|
|
567
|
-
|
|
568
|
-
|
|
604
|
+
/** The seats of `rigName` that `name` names, each as its actual session: its node's canonical session, or the
|
|
605
|
+
* pod-member form while the node has no session yet. A name matches, in this order, a seat's session's own name before
|
|
606
|
+
* `@`, its pod-member form (logical id `pod.member` written `pod-member`), or that own name's slug, so a seat attached
|
|
607
|
+
* under its own name is found by the name its team shows. Only seats the caller may address (`addressable`) count, and
|
|
608
|
+
* the first of these that any of them matches decides: another seat's slug never makes an exact name ambiguous, and a
|
|
609
|
+
* seat the caller can't address never decides or shadows one it can. No topology relationship, name convention for a
|
|
610
|
+
* lead, caller identity or task history supplies a seat. Throws when the rig isn't one active rig here or its node list
|
|
611
|
+
* can't be read. */
|
|
612
|
+
async function namedSeats(client, rigName, name, addressable) {
|
|
569
613
|
const rig = await resolveRigHandle(client, rigName, { strict: true });
|
|
570
614
|
if (rig.kind !== "resolved")
|
|
571
|
-
|
|
615
|
+
throw new Error(`rig ${rigName} isn't one active rig here`);
|
|
572
616
|
const nodes = await client.get(`/api/rigs/${encodeURIComponent(rig.id)}/nodes`);
|
|
573
617
|
if (nodes.status !== 200 || !Array.isArray(nodes.data))
|
|
574
|
-
|
|
575
|
-
|
|
618
|
+
throw new Error(`the node list for ${rigName} answered HTTP ${nodes.status}`);
|
|
619
|
+
const wanted = seatSlug(name);
|
|
620
|
+
const [byOwn, byPodMember, bySlug] = [new Set(), new Set(), new Set()];
|
|
576
621
|
for (const entry of nodes.data) {
|
|
577
|
-
const { logicalId, rigName:
|
|
578
|
-
if (typeof logicalId !== "string" ||
|
|
579
|
-
|
|
622
|
+
const { logicalId, rigName: inRig, canonicalSessionName } = (entry ?? {});
|
|
623
|
+
if (typeof logicalId !== "string" || inRig !== rigName)
|
|
624
|
+
throw new Error(`the node list for ${rigName} has a malformed entry`);
|
|
580
625
|
const dot = logicalId.indexOf(".");
|
|
581
626
|
if (dot <= 0 || dot === logicalId.length - 1)
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
627
|
+
throw new Error(`the node list for ${rigName} has a malformed entry`);
|
|
628
|
+
const podMember = `${logicalId.slice(0, dot)}-${logicalId.slice(dot + 1)}`;
|
|
629
|
+
const session = typeof canonicalSessionName === "string" && canonicalSessionName.endsWith(`@${rigName}`)
|
|
630
|
+
&& canonicalSessionName.length > rigName.length + 1 ? canonicalSessionName : `${podMember}@${rigName}`;
|
|
631
|
+
const own = session.slice(0, -(rigName.length + 1));
|
|
632
|
+
if (!addressable(session))
|
|
633
|
+
continue;
|
|
634
|
+
if (name === own)
|
|
635
|
+
byOwn.add(session);
|
|
636
|
+
else if (name === podMember)
|
|
637
|
+
byPodMember.add(session);
|
|
638
|
+
else if (wanted !== "" && wanted === seatSlug(own))
|
|
639
|
+
bySlug.add(session);
|
|
585
640
|
}
|
|
586
|
-
return
|
|
641
|
+
return [...(byOwn.size > 0 ? byOwn : byPodMember.size > 0 ? byPodMember : bySlug)];
|
|
587
642
|
}
|
|
643
|
+
/** A seat name as a slug: lowercase, with each run of other characters a single hyphen. */
|
|
644
|
+
const seatSlug = (name) => name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
588
645
|
/**
|
|
589
646
|
* Maps a DaemonResponse to MCP tool result.
|
|
590
647
|
* Three error levels: HTTP status, in-body errors, and structural failure fields.
|
|
@@ -695,6 +752,16 @@ export function createMcpServer(client, options = {}) {
|
|
|
695
752
|
return kind === "work" || (kind === "workspace" && access.workspace);
|
|
696
753
|
};
|
|
697
754
|
const scope = access && !access.owner ? scopeFor(access, seatOf) : null;
|
|
755
|
+
/** A tool's title and plain opening for a connected assistant (an external grant), whose client shows a person these;
|
|
756
|
+
* rig_whoami's are true for every caller, so it has them everywhere. Another caller keeps the tool's own text, which
|
|
757
|
+
* covers what only it can do (listing its rig's work, reaching a person, reading a named shared file). The same title
|
|
758
|
+
* goes in both of MCP's title fields, and the hints are unchanged. */
|
|
759
|
+
const worded = (tool, description, annotations) => {
|
|
760
|
+
const plain = PLAIN_WORDING[tool];
|
|
761
|
+
if (!plain || !(access?.external || tool === "rig_whoami") || !description.startsWith(plain.replaces))
|
|
762
|
+
return { description, annotations };
|
|
763
|
+
return { title: plain.title, description: plain.with + description.slice(plain.replaces.length), annotations: { ...annotations, title: plain.title } };
|
|
764
|
+
};
|
|
698
765
|
const caller = access ? { authenticated: true, principal: access.principal } : { authenticated: false, identity: "declared" };
|
|
699
766
|
/** For an authenticated non-owner: the error for an item it can't reach (or can't read), else null. `owner` asks
|
|
700
767
|
* whether it may change the item, which needs the item's owner in scope. */
|
|
@@ -1210,10 +1277,10 @@ export function createMcpServer(client, options = {}) {
|
|
|
1210
1277
|
// 19. rig_queue_create — hand a task to a seat
|
|
1211
1278
|
if (offered("rig_queue_create"))
|
|
1212
1279
|
server.registerTool("rig_queue_create", {
|
|
1213
|
-
|
|
1280
|
+
...worded("rig_queue_create", "Hand a task to another seat as a durable queue item. Returns its qitemId: read the answer later with rig_queue_show. If the call times out, check rig_queue_show with the same qitemId before retrying; never retry with a new id. To ask for a revision of earlier work, name it in revises: the new item opens with 'Revision of <id>' and records it in its chainOfRecord.", ADDITIVE),
|
|
1214
1281
|
inputSchema: z.object({
|
|
1215
1282
|
destination: access?.external
|
|
1216
|
-
? z.string().optional().describe("Destination seat: member@rig, or its name alone (e.g. workshop-lead) within this connection's team; omit to use the connected team's configured receiver")
|
|
1283
|
+
? z.string().optional().describe("Destination seat: member@rig, or its name alone as the team shows it (e.g. workshop-lead) within this connection's team; omit to use the connected team's configured receiver")
|
|
1217
1284
|
: z.string().describe("Destination seat (e.g. dev-impl@my-rig)"),
|
|
1218
1285
|
body: z.string().describe("The task: what to do and what to return"),
|
|
1219
1286
|
summary: z.string().optional().describe("One-line summary"),
|
|
@@ -1224,7 +1291,6 @@ export function createMcpServer(client, options = {}) {
|
|
|
1224
1291
|
revises: z.string().optional().describe("The qitemId of the work this asks to revise"),
|
|
1225
1292
|
alert: z.boolean().optional().describe("For an ask to a person that's urgent: something only they can do, or an approval whose wait costs now (as rig queue create --alert). It stands out in Slack. Without it the ask still posts to Slack unless the person's Slack subscription is urgent-only, in which case it waits on Steering and the TUI"),
|
|
1226
1293
|
}),
|
|
1227
|
-
annotations: ADDITIVE,
|
|
1228
1294
|
}, async ({ destination, body, summary, tags, priority, tier, qitemId, revises, alert }) => {
|
|
1229
1295
|
// The server's one receiver counts for this connection only when its grant reaches it. Then a refused destination
|
|
1230
1296
|
// says how to reach it, so the assistant retries instead of telling the person the connection lacks access. It
|
|
@@ -1240,31 +1306,53 @@ export function createMcpServer(client, options = {}) {
|
|
|
1240
1306
|
// another rig's destination. An explicit destination continues through the existing path below.
|
|
1241
1307
|
if (!scope?.destination(destination))
|
|
1242
1308
|
return outOfScope("Configured task destination");
|
|
1309
|
+
// The receiver is exactly one seat this connection may address, and the item goes to that seat's actual session.
|
|
1310
|
+
const at = destination.lastIndexOf("@");
|
|
1311
|
+
let seats;
|
|
1243
1312
|
try {
|
|
1244
|
-
|
|
1245
|
-
return unavailable();
|
|
1313
|
+
seats = await namedSeats(client, destination.slice(at + 1), destination.slice(0, at), (seat) => scope?.destination(seat) === true);
|
|
1246
1314
|
}
|
|
1247
1315
|
catch {
|
|
1248
1316
|
return unavailable();
|
|
1249
1317
|
}
|
|
1318
|
+
if (seats.length !== 1)
|
|
1319
|
+
return unavailable();
|
|
1320
|
+
destination = seats[0];
|
|
1250
1321
|
}
|
|
1251
1322
|
else if (destination !== undefined && access?.external && !destination.includes("@")) {
|
|
1252
|
-
// A person names
|
|
1253
|
-
//
|
|
1254
|
-
// rig; never another rig's. It
|
|
1323
|
+
// A person names a seat as their team shows it ("workshop-lead"), and the assistant passes that on. A name alone
|
|
1324
|
+
// looks in the rig of the receiver this connection reaches when it is that receiver's name, else in this
|
|
1325
|
+
// connection's one rig; never another rig's. It reaches one seat the connection may address, stored under that
|
|
1326
|
+
// seat's actual session, or nothing is written.
|
|
1255
1327
|
const named = destination;
|
|
1256
|
-
const
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
if (
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
}
|
|
1265
|
-
if (!exists)
|
|
1328
|
+
const receiverAt = receiver?.lastIndexOf("@") ?? -1;
|
|
1329
|
+
const rigName = receiver && receiver.slice(0, receiverAt) === named ? receiver.slice(receiverAt + 1)
|
|
1330
|
+
: access.rigs.length === 1 ? access.rigs[0] : undefined;
|
|
1331
|
+
if (!rigName)
|
|
1332
|
+
return outOfScope(`Destination ${named}`, omitHint);
|
|
1333
|
+
// A name this connection may not address as written (another caller's seat without team/list, or its own) is
|
|
1334
|
+
// refused before the team is read, so the answer doesn't say whether such a seat exists.
|
|
1335
|
+
if (named !== "" && !scope?.destination(`${named}@${rigName}`))
|
|
1266
1336
|
return outOfScope(`Destination ${named}`, omitHint);
|
|
1267
|
-
|
|
1337
|
+
let reachable;
|
|
1338
|
+
try {
|
|
1339
|
+
reachable = named === "" ? [] : await namedSeats(client, rigName, named, (seat) => scope?.destination(seat) === true);
|
|
1340
|
+
}
|
|
1341
|
+
catch {
|
|
1342
|
+
const message = "This connection's team couldn't be read just now, so nothing was written. Try again.";
|
|
1343
|
+
return errorResult(message, "destination_unchecked", message);
|
|
1344
|
+
}
|
|
1345
|
+
if (reachable.length > 1) {
|
|
1346
|
+
const message = `'${named}' names ${reachable.length} seats here. Nothing was written; pass one of these: ${reachable.join(", ")}.`;
|
|
1347
|
+
return errorResult(JSON.stringify({ ok: false, code: "destination_ambiguous", message, candidates: reachable }), "destination_ambiguous", message, { candidates: reachable });
|
|
1348
|
+
}
|
|
1349
|
+
// A seat it may not address reads as no seat at all, so a hidden seat's name says nothing about it.
|
|
1350
|
+
if (reachable.length === 0) {
|
|
1351
|
+
const where = offered("rig_team") ? " rig_team lists the seats you can reach and their names." : " Check the name the person gave.";
|
|
1352
|
+
const message = `No seat here is named '${named}', so nothing was written.${where}${omitHint ? ` ${omitHint}` : ""}`;
|
|
1353
|
+
return errorResult(message, "destination_not_found", message);
|
|
1354
|
+
}
|
|
1355
|
+
destination = reachable[0];
|
|
1268
1356
|
}
|
|
1269
1357
|
if (scope && !scope.destination(destination))
|
|
1270
1358
|
return outOfScope(`Destination ${destination}`, access?.external ? omitHint : undefined);
|
|
@@ -1287,6 +1375,23 @@ export function createMcpServer(client, options = {}) {
|
|
|
1287
1375
|
}
|
|
1288
1376
|
}
|
|
1289
1377
|
const id = qitemId ?? `qitem-${new Date().toISOString().replace(/\D/g, "").slice(0, 14)}-${randomBytes(8).toString("hex")}`;
|
|
1378
|
+
// The grant service's fair-use limit holds back new work only. A retry of a create that already landed isn't new
|
|
1379
|
+
// work: the daemon answers it from the stored row, so it goes through as before.
|
|
1380
|
+
const throttle = access?.external?.throttle;
|
|
1381
|
+
if (throttle) {
|
|
1382
|
+
let landed = false;
|
|
1383
|
+
if (qitemId) {
|
|
1384
|
+
try {
|
|
1385
|
+
const existing = await client.get(`/api/queue/${encodeURIComponent(qitemId)}`);
|
|
1386
|
+
landed = existing.status < 400 ? true : existing.status === 404 ? false : undefined;
|
|
1387
|
+
}
|
|
1388
|
+
catch {
|
|
1389
|
+
landed = undefined;
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
if (landed !== true)
|
|
1393
|
+
return fairUseRetryLater(id, throttle.retryAfterSeconds, landed === undefined);
|
|
1394
|
+
}
|
|
1290
1395
|
// With no seat, the task goes to its destination as from the unknown sender, with the note at the top of its body.
|
|
1291
1396
|
const note = unknownSenderNote("task");
|
|
1292
1397
|
try {
|
|
@@ -1320,11 +1425,10 @@ export function createMcpServer(client, options = {}) {
|
|
|
1320
1425
|
// 20. rig_queue_show — one item with its transitions: a delegated task's answer is its own record
|
|
1321
1426
|
if (offered("rig_queue_show"))
|
|
1322
1427
|
server.registerTool("rig_queue_show", {
|
|
1323
|
-
|
|
1428
|
+
...worded("rig_queue_show", "Read one queue item and its transitions. For a task you handed off, this is where its answer is: the state, the closure reason and target, the notes the assignee recorded, and evidenceRef when it names an artifact (read it with rig_artifact_read). When the item was handed on, successor names the next item (on another host: its id and host); follow it with rig_queue_show. null means none was found. A revision names the work it revises in chainOfRecord.", READ_ONLY),
|
|
1324
1429
|
inputSchema: z.object({
|
|
1325
1430
|
qitemId: z.string().describe("The qitemId returned by rig_queue_create (or any queue item)"),
|
|
1326
1431
|
}),
|
|
1327
|
-
annotations: READ_ONLY,
|
|
1328
1432
|
}, async ({ qitemId }) => {
|
|
1329
1433
|
try {
|
|
1330
1434
|
const id = encodeURIComponent(qitemId);
|
|
@@ -1342,7 +1446,7 @@ export function createMcpServer(client, options = {}) {
|
|
|
1342
1446
|
let successor = handedOn ? await successorOf(client, qitemId, row.closureTarget, view ? scope.item : undefined) : undefined;
|
|
1343
1447
|
if (scope && !view && successor && "destinationSession" in successor && !scope.successor(successor.destinationSession))
|
|
1344
1448
|
successor = { unknown: true, code: "out_of_scope" };
|
|
1345
|
-
const shownItem = scope ?
|
|
1449
|
+
const shownItem = scope ? withoutDaemonLinkedRows(item.data) : item.data;
|
|
1346
1450
|
const data = view
|
|
1347
1451
|
? { item: projectForExternal(shownItem, view), transitions: Array.isArray(transitions.data) ? transitions.data.map((t) => projectForExternal(t, view)) : transitions.data }
|
|
1348
1452
|
: { item: shownItem, transitions: transitions.data };
|
|
@@ -1355,21 +1459,33 @@ export function createMcpServer(client, options = {}) {
|
|
|
1355
1459
|
// 21. rig_queue_list — list queue items
|
|
1356
1460
|
if (offered("rig_queue_list"))
|
|
1357
1461
|
server.registerTool("rig_queue_list", {
|
|
1358
|
-
|
|
1462
|
+
...worded("rig_queue_list", "List queue items. owned: assigned to this seat. mine: this seat is the source or the destination. Without a scope, this seat's rig. Without state, open items only (all adds closed ones); a state filter returns exactly those states, closed ones included. since finds work updated after a time; handedOffFrom finds where a handed-off item went. tags are exact, case-sensitive AND filters; mission and slice add their corresponding exact tags.", READ_ONLY),
|
|
1359
1463
|
inputSchema: z.object({
|
|
1360
1464
|
owned: z.boolean().optional().describe("Only items assigned to this seat: its whole inbox (overrides destination)"),
|
|
1361
1465
|
mine: z.boolean().optional().describe("Items this seat sent or owns"),
|
|
1362
1466
|
destination: z.string().optional().describe("Filter by destination seat"),
|
|
1363
1467
|
source: z.string().optional().describe("Filter by source seat"),
|
|
1364
1468
|
state: z.string().optional().describe("Only these states, comma-separated; closed states included when named"),
|
|
1469
|
+
tags: z.array(z.string()).optional().describe("Exact, case-sensitive tags; every supplied tag must match. Commas are literal."),
|
|
1470
|
+
mission: z.string().optional().describe("Add the exact mission:<id> tag filter"),
|
|
1471
|
+
slice: z.string().optional().describe("Add the exact slice:<id> tag filter"),
|
|
1365
1472
|
all: z.boolean().optional().describe("Without state: include closed items"),
|
|
1366
1473
|
since: z.string().optional().describe("Only items updated at or after this ISO-8601 time, e.g. done work since Monday: state done, since 2026-10-19"),
|
|
1367
1474
|
handedOffFrom: z.string().optional().describe("The items handed on from this qitemId, in any state and any rig"),
|
|
1368
1475
|
limit: z.number().int().positive().optional().describe("Result limit (default 100)"),
|
|
1369
1476
|
}),
|
|
1370
|
-
|
|
1371
|
-
}, async ({ owned, mine: mineAsked, destination, source, state, all, since, handedOffFrom, limit }) => {
|
|
1477
|
+
}, async ({ owned, mine: mineAsked, destination, source, state, tags: requestedTags, mission, slice, all, since, handedOffFrom, limit }) => {
|
|
1372
1478
|
try {
|
|
1479
|
+
if ([...(requestedTags ?? []), ...(mission === undefined ? [] : [mission]), ...(slice === undefined ? [] : [slice])]
|
|
1480
|
+
.some((value) => value.trim().length === 0)) {
|
|
1481
|
+
const message = "tag filters cannot be blank";
|
|
1482
|
+
return errorResult(JSON.stringify({ error: "tag_invalid", message }), "tag_invalid", message);
|
|
1483
|
+
}
|
|
1484
|
+
const tags = [...new Set([
|
|
1485
|
+
...(requestedTags ?? []),
|
|
1486
|
+
...(mission === undefined ? [] : [`mission:${mission}`]),
|
|
1487
|
+
...(slice === undefined ? [] : [`slice:${slice}`]),
|
|
1488
|
+
])];
|
|
1373
1489
|
const params = new URLSearchParams();
|
|
1374
1490
|
const sessionName = seatOf();
|
|
1375
1491
|
// An external caller lists its own items only, so the daemon's limit counts those and not the team's.
|
|
@@ -1403,13 +1519,15 @@ export function createMcpServer(client, options = {}) {
|
|
|
1403
1519
|
params.set("sourceSession", source);
|
|
1404
1520
|
if (state)
|
|
1405
1521
|
params.set("state", state);
|
|
1522
|
+
for (const tag of tags)
|
|
1523
|
+
params.append("tag", tag);
|
|
1406
1524
|
if (since)
|
|
1407
1525
|
params.set("updatedSince", since);
|
|
1408
1526
|
if (handedOffFrom)
|
|
1409
1527
|
params.set("handedOffFrom", handedOffFrom);
|
|
1410
1528
|
params.set("limit", String(limit ?? 100));
|
|
1411
1529
|
const res = await client.get(`/api/queue/list?${params.toString()}`);
|
|
1412
|
-
const ignored = res.status < 400 ? ignoredFilter(res.data, { since, handedOffFrom }) : null;
|
|
1530
|
+
const ignored = res.status < 400 ? ignoredFilter(res.data, { since, handedOffFrom, tags }) : null;
|
|
1413
1531
|
if (ignored) {
|
|
1414
1532
|
const message = `The daemon didn't apply ${ignored}, so this list isn't filtered by it; it needs a newer daemon.`;
|
|
1415
1533
|
return errorResult(JSON.stringify({ ok: false, error: message }), "filter_unsupported", message);
|
|
@@ -1429,9 +1547,8 @@ export function createMcpServer(client, options = {}) {
|
|
|
1429
1547
|
// 22. rig_queue_claim — take an item assigned to this seat
|
|
1430
1548
|
if (offered("rig_queue_claim"))
|
|
1431
1549
|
server.registerTool("rig_queue_claim", {
|
|
1432
|
-
|
|
1550
|
+
...worded("rig_queue_claim", "Claim a queue item assigned to this seat before working on it.", DESTRUCTIVE),
|
|
1433
1551
|
inputSchema: z.object({ qitemId: z.string().describe("The queue item to claim") }),
|
|
1434
|
-
annotations: DESTRUCTIVE,
|
|
1435
1552
|
}, async ({ qitemId }) => {
|
|
1436
1553
|
try {
|
|
1437
1554
|
const denied = await itemOutOfScope(qitemId);
|
|
@@ -1449,7 +1566,7 @@ export function createMcpServer(client, options = {}) {
|
|
|
1449
1566
|
// 23. rig_queue_update — record progress, block, or close with the answer
|
|
1450
1567
|
if (offered("rig_queue_update"))
|
|
1451
1568
|
server.registerTool("rig_queue_update", {
|
|
1452
|
-
|
|
1569
|
+
...worded("rig_queue_update", "Update a queue item: add a note, block it, close it, or reopen a closed one. To answer a task, close it with state done, a closure reason and the answer in resolution, which the item keeps; note records why this transition happened.", DESTRUCTIVE),
|
|
1453
1570
|
inputSchema: z.object({
|
|
1454
1571
|
qitemId: z.string().describe("The queue item to update"),
|
|
1455
1572
|
state: z.string().optional().describe("New state (e.g. in-progress, blocked, done)"),
|
|
@@ -1463,7 +1580,6 @@ export function createMcpServer(client, options = {}) {
|
|
|
1463
1580
|
blockedOn: z.string().optional().describe("What it waits on, when blocking: another qitemId (this item returns to pending when that one closes), or the address of the person this item came from, not a shared channel (they're asked with this item's summary, and their answer returns it to you in progress)"),
|
|
1464
1581
|
wakeAfterSeconds: z.number().int().positive().optional().describe("Wake this seat after this many seconds, when blocking. Delivered only to a seat with a terminal: an attached app can't receive it today, so the item just waits until it is checked."),
|
|
1465
1582
|
}),
|
|
1466
|
-
annotations: DESTRUCTIVE,
|
|
1467
1583
|
}, async ({ qitemId, state, closureReason, closureTarget, note, resolution, reopen, summary, evidenceRef, blockedOn, wakeAfterSeconds }) => {
|
|
1468
1584
|
try {
|
|
1469
1585
|
const denied = await itemOutOfScope(qitemId, "owner");
|
|
@@ -1553,9 +1669,8 @@ export function createMcpServer(client, options = {}) {
|
|
|
1553
1669
|
// 26. rig_whoami — which seat this server acts as
|
|
1554
1670
|
if (offered("rig_whoami"))
|
|
1555
1671
|
server.registerTool("rig_whoami", {
|
|
1556
|
-
|
|
1672
|
+
...worded("rig_whoami", "Show which OpenRig seat this server acts as: its rig, pod, peers and edges, and caller: authenticated (a validated HTTP credential, with its principal) or declared (OPENRIG_SESSION_NAME where the server was configured, which nothing verifies).", READ_ONLY),
|
|
1557
1673
|
inputSchema: z.object({}),
|
|
1558
|
-
annotations: READ_ONLY,
|
|
1559
1674
|
}, async () => {
|
|
1560
1675
|
try {
|
|
1561
1676
|
const seat = seatOf();
|
|
@@ -1609,11 +1724,10 @@ export function createMcpServer(client, options = {}) {
|
|
|
1609
1724
|
// 27. rig_team — a rig's seats and its lead
|
|
1610
1725
|
if (offered("rig_team"))
|
|
1611
1726
|
server.registerTool("rig_team", {
|
|
1612
|
-
|
|
1727
|
+
...worded("rig_team", "Show a rig's team. For an external grant, omit rigId to use its sole rig or see its granted names to choose from. The answer includes its lead, the rig's one delegates_to root (the seat that delegates to others and that nothing delegates to: the seat to delegate to), and each seat's pod, role, runtime, delegation (reportsTo, delegatesTo) and activity as the daemon reports it. Activity the daemon doesn't know reads unknown, never idle. hostedMembers are the rig's members that live outside a terminal (roster entries marked hosted): their authored capabilities and limits, with no pane and activity unknown.", READ_ONLY),
|
|
1613
1728
|
inputSchema: z.object({
|
|
1614
1729
|
rigId: z.string().optional().describe("Rig name or identifier; optional for an external grant to discover its team"),
|
|
1615
1730
|
}),
|
|
1616
|
-
annotations: READ_ONLY,
|
|
1617
1731
|
}, async ({ rigId }) => {
|
|
1618
1732
|
try {
|
|
1619
1733
|
const inferred = rigId === undefined && !!access?.external;
|
|
@@ -1653,6 +1767,21 @@ export function createMcpServer(client, options = {}) {
|
|
|
1653
1767
|
// A node is a seat whether or not it has a session yet: its address derives from its logical id (pod.member).
|
|
1654
1768
|
const nodeSeats = new Set(inventory.flatMap((seat) => [seat.canonicalSessionName,
|
|
1655
1769
|
typeof seat.logicalId === "string" ? `${seat.logicalId.replace(".", "-")}@${rigName}` : null]).filter((name) => typeof name === "string"));
|
|
1770
|
+
// One read of the daemon's check-ins serves every member in this answer.
|
|
1771
|
+
let checkIns;
|
|
1772
|
+
const checkInOf = async (seat) => {
|
|
1773
|
+
checkIns ??= client.get("/api/queue/hosted-members")
|
|
1774
|
+
.then((res) => (res.status < 400 && Array.isArray(res.data?.members) ? res.data.members : null), () => null);
|
|
1775
|
+
const list = await checkIns;
|
|
1776
|
+
const row = list?.find((m) => m.seat === seat);
|
|
1777
|
+
if (!row || typeof row.status !== "string") {
|
|
1778
|
+
return { status: "unknown", lastCheckInAt: null, expectedMinutes: null, onRequest: false,
|
|
1779
|
+
reason: list ? "this daemon gave no status for it" : "this daemon gave no check-in status" };
|
|
1780
|
+
}
|
|
1781
|
+
return { status: row.status, lastCheckInAt: typeof row.lastCheckInAt === "string" ? row.lastCheckInAt : null,
|
|
1782
|
+
expectedMinutes: typeof row.expectedMinutes === "number" ? row.expectedMinutes : null, onRequest: row.onRequest === true,
|
|
1783
|
+
...(typeof row.reason === "string" ? { reason: row.reason } : {}) };
|
|
1784
|
+
};
|
|
1656
1785
|
const hosted = await hostedMembersOf(rostersFolder(), rigName, nodeSeats, async () => inventory.find((seat) => typeof seat.hostSelfId === "string")?.hostSelfId
|
|
1657
1786
|
?? await client.get("/healthz").then((res) => (res.status < 400 ? (res.data ?? {}).selfHostId ?? null : null), () => null), async (seat) => {
|
|
1658
1787
|
const rows = await client.get(`/api/queue/list?${new URLSearchParams({ destinationSession: seat, compact: "1", limit: String(PRESENCE_ROWS) }).toString()}`)
|
|
@@ -1660,7 +1789,7 @@ export function createMcpServer(client, options = {}) {
|
|
|
1660
1789
|
// An external caller sees a ring only on an item it may read, so another pair's item isn't named.
|
|
1661
1790
|
const visible = access?.external && Array.isArray(rows) ? rows.filter((row) => scope?.item(row)) : rows;
|
|
1662
1791
|
return { lastCallAt: readPresence(presenceFile())[seat]?.lastCallAt ?? null, lastWake: newestWake(visible, seat),
|
|
1663
|
-
lastWakeScope: `the latest ring among its ${PRESENCE_ROWS} most recent rows
|
|
1792
|
+
lastWakeScope: `the latest ring among its ${PRESENCE_ROWS} most recent rows`, checkIn: await checkInOf(seat) };
|
|
1664
1793
|
});
|
|
1665
1794
|
return mapResult({ status: 200, data: { ...view, hostedMembers: hosted.members, ...(hosted.note ? { hostedMembersNote: hosted.note } : {}) } }, undefined, { structured: true });
|
|
1666
1795
|
}
|
|
@@ -1764,14 +1893,13 @@ export function createMcpServer(client, options = {}) {
|
|
|
1764
1893
|
// 32. rig_artifact_read — a result's artifact, read through the daemon's shared roots
|
|
1765
1894
|
if (offered("rig_artifact_read"))
|
|
1766
1895
|
server.registerTool("rig_artifact_read", {
|
|
1767
|
-
|
|
1896
|
+
...worded("rig_artifact_read", `Read a finished item's artifact (its evidenceRef), or a named file, through the daemon's shared roots (OPENRIG_FILES_ALLOWLIST), as text: at most ${CONTEXT_TEXT_LIMIT} characters from offset; nextOffset reads on. An artifact outside every shared root, a link, or an item with no evidenceRef comes back as available: false with the reason and the shared roots' names; nothing outside those roots is read. A code-result manifest (kind openrig.code-result/v1) also comes back parsed as codeResult: its repo, the exact base and revision commits, and paths; a branch or fetch ref in it is a hint, never the revision.`, READ_ONLY),
|
|
1768
1897
|
inputSchema: z.object({
|
|
1769
1898
|
qitemId: z.string().optional().describe("Read this item's evidenceRef"),
|
|
1770
1899
|
root: z.string().optional().describe("A shared root's name: with path, the file to read; with qitemId, the root a relative evidenceRef is under"),
|
|
1771
1900
|
path: z.string().optional().describe("With root: the file's path inside that root"),
|
|
1772
1901
|
offset: z.number().int().min(0).optional().describe("The character to start from (default 0)"),
|
|
1773
1902
|
}),
|
|
1774
|
-
annotations: READ_ONLY,
|
|
1775
1903
|
}, async ({ qitemId, root, path, offset }) => {
|
|
1776
1904
|
try {
|
|
1777
1905
|
const read = async (source, rootName, inside) => {
|