@openrig/cli 0.7.13 → 0.7.15
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/README.md +2 -0
- 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/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/claude-compaction-restore/SKILL.md +4 -4
- package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +13 -4
- package/daemon/assets/plugins/openrig-core/skills/orienting-to-an-inherited-seat/CHANGELOG.md +10 -0
- package/daemon/assets/plugins/openrig-core/skills/orienting-to-an-inherited-seat/SKILL.md +12 -13
- 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 +103 -23
- package/daemon/context-packs/reference/getting-started.md +21 -15
- 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 +298 -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/SKILL.md +4 -4
- package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/messaging-the-human/SKILL.md +13 -4
- 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/CHANGELOG.md +10 -0
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/SKILL.md +12 -13
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +3 -3
- 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 +45 -12
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts +2 -0
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.js +93 -36
- package/daemon/dist/adapters/community-harness-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/pi-resume.d.ts +3 -0
- package/daemon/dist/adapters/pi-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-resume.js +99 -51
- package/daemon/dist/adapters/pi-resume.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +2 -1
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +15 -9
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts +4 -0
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.js +133 -75
- package/daemon/dist/adapters/pi-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 +16 -0
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +49 -8
- 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/daemon-shutdown.d.ts +3 -0
- package/daemon/dist/daemon-shutdown.d.ts.map +1 -1
- package/daemon/dist/daemon-shutdown.js +6 -0
- package/daemon/dist/daemon-shutdown.js.map +1 -1
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +8 -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/165_run_bound_activity_grants.d.ts +4 -0
- package/daemon/dist/db/migrations/165_run_bound_activity_grants.d.ts.map +1 -0
- package/daemon/dist/db/migrations/165_run_bound_activity_grants.js +14 -0
- package/daemon/dist/db/migrations/165_run_bound_activity_grants.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/activity-grants.d.ts +36 -3
- package/daemon/dist/domain/activity-grants.d.ts.map +1 -1
- package/daemon/dist/domain/activity-grants.js +188 -7
- package/daemon/dist/domain/activity-grants.js.map +1 -1
- package/daemon/dist/domain/applied-launch-observation-store.d.ts +2 -0
- package/daemon/dist/domain/applied-launch-observation-store.d.ts.map +1 -1
- package/daemon/dist/domain/applied-launch-observation-store.js +27 -16
- package/daemon/dist/domain/applied-launch-observation-store.js.map +1 -1
- 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 +14 -5
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/codex-member-permissions.d.ts +2 -0
- package/daemon/dist/domain/codex-member-permissions.d.ts.map +1 -1
- package/daemon/dist/domain/codex-member-permissions.js +17 -9
- package/daemon/dist/domain/codex-member-permissions.js.map +1 -1
- package/daemon/dist/domain/codex-owned-plugin-trust.d.ts +6 -1
- package/daemon/dist/domain/codex-owned-plugin-trust.d.ts.map +1 -1
- package/daemon/dist/domain/codex-owned-plugin-trust.js +30 -9
- package/daemon/dist/domain/codex-owned-plugin-trust.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/execution-candidate-reader.d.ts +15 -5
- package/daemon/dist/domain/execution-candidate-reader.d.ts.map +1 -1
- package/daemon/dist/domain/execution-candidate-reader.js +36 -25
- package/daemon/dist/domain/execution-candidate-reader.js.map +1 -1
- package/daemon/dist/domain/execution-view.d.ts.map +1 -1
- package/daemon/dist/domain/execution-view.js +34 -11
- package/daemon/dist/domain/execution-view.js.map +1 -1
- package/daemon/dist/domain/gateway/destination-resolver.js +3 -3
- package/daemon/dist/domain/gateway/destination-resolver.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/config.d.ts +2 -0
- package/daemon/dist/domain/gateway/slack/config.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/config.js +4 -0
- package/daemon/dist/domain/gateway/slack/config.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts +11 -0
- package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.js +3 -0
- package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts +2 -0
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.js +4 -0
- package/daemon/dist/domain/gateway/slack/slack-api.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +2 -0
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.js +2 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js +36 -2
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-routing.d.ts +5 -0
- package/daemon/dist/domain/gateway/slack/thread-routing.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-routing.js +1 -1
- package/daemon/dist/domain/gateway/slack/thread-routing.js.map +1 -1
- package/daemon/dist/domain/health-passive-ceremony.d.ts.map +1 -1
- package/daemon/dist/domain/health-passive-ceremony.js +13 -7
- package/daemon/dist/domain/health-passive-ceremony.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-permission-store.d.ts +40 -0
- package/daemon/dist/domain/native-permission-store.d.ts.map +1 -1
- package/daemon/dist/domain/native-permission-store.js +108 -29
- package/daemon/dist/domain/native-permission-store.js.map +1 -1
- 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 +39 -1
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +251 -6
- 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/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +214 -30
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- 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/permission-drift.d.ts +2 -1
- package/daemon/dist/domain/permission-drift.d.ts.map +1 -1
- package/daemon/dist/domain/permission-drift.js.map +1 -1
- package/daemon/dist/domain/permission-policy/persisted-restore-posture.d.ts +62 -0
- package/daemon/dist/domain/permission-policy/persisted-restore-posture.d.ts.map +1 -0
- package/daemon/dist/domain/permission-policy/persisted-restore-posture.js +117 -0
- package/daemon/dist/domain/permission-policy/persisted-restore-posture.js.map +1 -0
- package/daemon/dist/domain/policies/context-usage-threshold.d.ts.map +1 -1
- package/daemon/dist/domain/policies/context-usage-threshold.js +5 -1
- package/daemon/dist/domain/policies/context-usage-threshold.js.map +1 -1
- package/daemon/dist/domain/policies/types.d.ts +2 -0
- package/daemon/dist/domain/policies/types.d.ts.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 +32 -3
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +101 -10
- 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/queue-wake-ladder.d.ts +12 -0
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +27 -7
- package/daemon/dist/domain/queue-wake-ladder.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/rehydrate-eligibility.d.ts.map +1 -1
- package/daemon/dist/domain/rehydrate-eligibility.js +3 -2
- package/daemon/dist/domain/rehydrate-eligibility.js.map +1 -1
- package/daemon/dist/domain/reply-to-choice.d.ts +10 -0
- package/daemon/dist/domain/reply-to-choice.d.ts.map +1 -1
- package/daemon/dist/domain/reply-to-choice.js +23 -0
- package/daemon/dist/domain/reply-to-choice.js.map +1 -1
- package/daemon/dist/domain/restore-check-service.d.ts +5 -0
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js +31 -6
- package/daemon/dist/domain/restore-check-service.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 +7 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +116 -84
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/restore-preconditions.d.ts +2 -0
- package/daemon/dist/domain/restore-preconditions.d.ts.map +1 -1
- package/daemon/dist/domain/restore-preconditions.js +8 -1
- package/daemon/dist/domain/restore-preconditions.js.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.d.ts +4 -0
- package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.js +7 -2
- package/daemon/dist/domain/resume-metadata-refresher.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 +3 -2
- 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/runner-grant-launch.d.ts +16 -0
- package/daemon/dist/domain/runner-grant-launch.d.ts.map +1 -0
- package/daemon/dist/domain/runner-grant-launch.js +86 -0
- package/daemon/dist/domain/runner-grant-launch.js.map +1 -0
- package/daemon/dist/domain/runtime-adapter.d.ts +11 -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 +16 -2
- package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.js +61 -6
- 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 +33 -9
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.d.ts +3 -0
- package/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.js +34 -2
- package/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +5 -1
- package/daemon/dist/domain/seat-lifecycle-service.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 +15 -0
- package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -1
- package/daemon/dist/domain/session-registry.d.ts +2 -0
- package/daemon/dist/domain/session-registry.d.ts.map +1 -1
- package/daemon/dist/domain/session-registry.js +16 -0
- package/daemon/dist/domain/session-registry.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 +38 -7
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/skill-discovery.d.ts.map +1 -1
- package/daemon/dist/domain/skill-discovery.js +2 -1
- package/daemon/dist/domain/skill-discovery.js.map +1 -1
- package/daemon/dist/domain/slow-op-recorder.d.ts +3 -0
- package/daemon/dist/domain/slow-op-recorder.d.ts.map +1 -1
- package/daemon/dist/domain/slow-op-recorder.js +5 -0
- package/daemon/dist/domain/slow-op-recorder.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +17 -3
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts +3 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +12 -2
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/sync-site-wrap.d.ts +13 -1
- package/daemon/dist/domain/sync-site-wrap.d.ts.map +1 -1
- package/daemon/dist/domain/sync-site-wrap.js +38 -0
- package/daemon/dist/domain/sync-site-wrap.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 +5 -1
- package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.js +20 -14
- package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +12 -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/watchdog-policy-engine.d.ts +5 -0
- package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.js +4 -0
- package/daemon/dist/domain/watchdog-policy-engine.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-runtime.d.ts +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/activity.d.ts.map +1 -1
- package/daemon/dist/routes/activity.js +34 -2
- 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 +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 +27 -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 +46 -14
- 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/bundle-formats.md +6 -4
- package/daemon/docs/reference/daemon-http-clients.md +44 -1
- package/daemon/docs/reference/getting-started.md +21 -15
- package/daemon/docs/reference/harness-runner-contract.md +27 -1
- package/daemon/docs/reference/health-diagnosis.md +5 -3
- package/daemon/docs/reference/hosted-members.md +29 -3
- package/daemon/docs/reference/keeping-a-watch.md +14 -9
- 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/slack-app-setup.md +4 -0
- 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 +298 -15
- package/daemon/specs/agents/shared/skills/core/messaging-the-human/SKILL.md +13 -4
- 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 +3 -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 +1 -0
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +46 -1
- 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/slack.d.ts.map +1 -1
- package/dist/commands/slack.js +2 -0
- package/dist/commands/slack.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/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +10 -5
- package/dist/daemon-lifecycle.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/lib/work-install.d.ts.map +1 -1
- package/dist/lib/work-install.js +7 -3
- package/dist/lib/work-install.js.map +1 -1
- 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 +211 -69
- 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/main.js +4 -3
- package/tui/dist/main.js.map +1 -1
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +8 -1
- 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/ui/dist/assets/index-BX8TUZ0E.css +32 -0
- package/ui/dist/assets/{index-BOYrLyfQ.js → index-BvUEh33d.js} +1 -1
- package/ui/dist/index.html +2 -2
- package/ui/dist/assets/index-DqSRu4OY.css +0 -32
package/dist/mcp-server.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/server";
|
|
2
2
|
import { type DaemonClient } from "./client.js";
|
|
3
|
+
/** The title and plain first sentence a connected assistant's client shows a person for each tool. Each replaces only the
|
|
4
|
+
* opening it names; every rule after it stays as the model reads it. */
|
|
5
|
+
export declare const PLAIN_WORDING: Readonly<Record<string, {
|
|
6
|
+
title: string;
|
|
7
|
+
replaces: string;
|
|
8
|
+
with: string;
|
|
9
|
+
}>>;
|
|
3
10
|
/** Who an authenticated HTTP caller must be to be offered a tool: work tools (the work loop, orientation, and
|
|
4
11
|
* communication with seats) reach a team within the caller's scope; workspace tools read the work tree and context when
|
|
5
12
|
* the caller's grant includes them; owner tools administer the instance (launch, stop, snapshot and restore, discover and
|
|
@@ -18,7 +25,8 @@ export type McpAccess = {
|
|
|
18
25
|
roots: readonly string[];
|
|
19
26
|
workspace: boolean;
|
|
20
27
|
/** An external caller's grant: the object/action pairs it names (openrig.grant/v1 `objects`), the grant it answered
|
|
21
|
-
* with,
|
|
28
|
+
* with, `person`, the gateway entity id of the person the grant service vouches owns this connection, and `throttle`,
|
|
29
|
+
* the service's fair-use limit on new work for this request: the seconds before a new create is accepted again. */
|
|
22
30
|
external?: {
|
|
23
31
|
objects: Readonly<Record<string, readonly string[]>>;
|
|
24
32
|
grant?: {
|
|
@@ -26,6 +34,9 @@ export type McpAccess = {
|
|
|
26
34
|
version?: number | string;
|
|
27
35
|
};
|
|
28
36
|
person?: string;
|
|
37
|
+
throttle?: {
|
|
38
|
+
retryAfterSeconds: number;
|
|
39
|
+
};
|
|
29
40
|
};
|
|
30
41
|
};
|
|
31
42
|
/** What each tool calls and what it does, kept beside the registrations. The MCP contract tests check that it names every
|
package/dist/mcp-server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAMzD,OAAO,EAAkE,KAAK,YAAY,EAAuB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAMzD,OAAO,EAAkE,KAAK,YAAY,EAAuB,MAAM,aAAa,CAAC;AAmfrI;yEACyE;AACzE,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAkBrG,CAAC;AAEF;;;;;;yBAMyB;AACzB,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEvE;;qFAEqF;AACrF,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IACzG;;wHAEoH;IACpH,QAAQ,CAAC,EAAE;QAAE,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAC;QAAC,KAAK,CAAC,EAAE;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QACpI,QAAQ,CAAC,EAAE;YAAE,iBAAiB,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;CAC9C,CAAC;AAyBF;;qEAEqE;AACrE,eAAO,MAAM,cAAc,EAAE,aAAa,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,aAAa,CAAC;IAAC,MAAM,EAAE,cAAc,CAAA;CAAE,CAwC1J,CAAC;AAEF;2HAC2H;AAC3H,eAAO,MAAM,uBAAuB,uBAAuB,CAAC;AAG5D,eAAO,MAAM,eAAe,QASjB,CAAC;AAuBZ;mFACmF;AACnF,eAAO,MAAM,2BAA2B,kBAAkB,CAAC;AAC3D,eAAO,MAAM,mBAAmB,QAKrB,CAAC;AAoHZ,0FAA0F;AAC1F,MAAM,WAAW,YAAY;IAAG,QAAQ,EAAE,sBAAsB,GAAG,qBAAqB,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE;AAMzG;;gHAEgH;AAChH,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,YAAY,GAAG,SAAS,CAO/F;AAWD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAI3D;AAED,qHAAqH;AACrH,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,SAAS,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,YAAY,CAAC,EAAE,YAAY,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChQ,oHAAoH;IACpH,YAAY,CAAC,EAAE,YAAY,CAAA;CAAO,GAAG,SAAS,CAqiD/C"}
|
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" },
|
|
@@ -513,12 +552,23 @@ export const MEMBER_WORKFLOW = [
|
|
|
513
552
|
].join(" ");
|
|
514
553
|
// Short guidance a client may show the model (the server's MCP instructions). An external caller's connection asks the
|
|
515
554
|
// team for work and isn't one of its members, so it isn't given the member workflow.
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
555
|
+
/** The paragraphs every seat's connection shares, naming a tool only where `has` says the connection offers it. A local or
|
|
556
|
+
* authenticated member is offered every tool named here; an external grant is offered only the ones its grant names. */
|
|
557
|
+
function sharedInstructions(has) {
|
|
558
|
+
const finding = [has("rig_whoami") ? "rig_whoami shows which, and whether the caller is authenticated" : "",
|
|
559
|
+
has("rig_team") ? "rig_team shows a rig's seats and its lead" : ""].filter(Boolean).join("; ");
|
|
560
|
+
const showing = "rig_queue_show, which names the next item when the work was handed on";
|
|
561
|
+
const handing = has("rig_queue_create")
|
|
562
|
+
? `To hand work to a seat, use rig_queue_create and keep its qitemId${has("rig_queue_show") ? `; read the answer later with ${showing}` : ""}. `
|
|
563
|
+
: has("rig_queue_show") ? `Read an item's answer with ${showing}. ` : "";
|
|
564
|
+
return [
|
|
565
|
+
`This server reaches an OpenRig team as one seat: the one named by OPENRIG_SESSION_NAME where the server was configured, or, over authenticated HTTP, the seat of the caller's grant${finding ? ` (${finding})` : ""}. The daemon attributes this server's writes to that seat.`,
|
|
566
|
+
`${handing}${has("rig_queue_handoff") ? "To pass on work this seat holds, use rig_queue_handoff rather than closing it and creating another, so the work stays one chain. " : ""}Queue items are durable: they outlive this conversation and this server.`,
|
|
567
|
+
"Tools marked read-only change nothing. A seat whose activity is unknown is not idle, and an accepted request (a restore's attemptId) is not a finished one.",
|
|
568
|
+
`A question reserved for a person is theirs to answer: don't answer it on their behalf.${has("rig_queue_decide") ? " rig_queue_decide records a decision only inside the decision room of the mode they have on, beside their answers and never as one." : ""}`,
|
|
569
|
+
];
|
|
570
|
+
}
|
|
571
|
+
const SHARED_INSTRUCTIONS = sharedInstructions(() => true);
|
|
522
572
|
const INSTRUCTIONS = [...SHARED_INSTRUCTIONS, MEMBER_WORKFLOW].join("\n");
|
|
523
573
|
/** rig mcp serve --front-door: the seat is a person's agent in their own app, the front door to their team, not a member
|
|
524
574
|
* that works its inbox. The team's questions to it are the person's to answer. */
|
|
@@ -550,41 +600,62 @@ const EXTERNAL_PERSON_INSTRUCTIONS = [
|
|
|
550
600
|
...EXTERNAL_HOW,
|
|
551
601
|
"To answer one, show the person the question and its options as rig_question_list gives them. Then pass rig_question_answer its qitemId, the revision you showed, and either the options they chose or exactly what they typed, with no label or words of your own. If the question changed, show them the new one; if it was already answered or closed, say so. It's recorded as their answer, given through this connection. A question reserved for a person is theirs to answer, never yours.",
|
|
552
602
|
].join("\n");
|
|
553
|
-
/** For an external grant that names claim and update: how it works the items addressed to it, messages included.
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
603
|
+
/** For an external grant that names claim and update: how it works the items addressed to it, messages included. It names
|
|
604
|
+
* only the tools that grant offers. */
|
|
605
|
+
function externalInboxInstructions(tools) {
|
|
606
|
+
return [...sharedInstructions((tool) => tools.has(tool)),
|
|
607
|
+
`Items addressed to your seat are yours${tools.has("rig_queue_list") ? ": 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.`,
|
|
608
|
+
].join("\n");
|
|
609
|
+
}
|
|
557
610
|
function instructionsFor(access, frontDoor = false) {
|
|
558
611
|
if (!access?.external)
|
|
559
612
|
return frontDoor ? FRONT_DOOR_INSTRUCTIONS : INSTRUCTIONS;
|
|
560
613
|
const tools = externalTools(access.external);
|
|
561
|
-
const instructions = tools.has("rig_queue_claim") && tools.has("rig_queue_update") ?
|
|
614
|
+
const instructions = tools.has("rig_queue_claim") && tools.has("rig_queue_update") ? externalInboxInstructions(tools)
|
|
562
615
|
: tools.has("rig_question_list") || tools.has("rig_question_answer") ? EXTERNAL_PERSON_INSTRUCTIONS : EXTERNAL_INSTRUCTIONS;
|
|
563
616
|
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
617
|
}
|
|
565
|
-
/**
|
|
566
|
-
*
|
|
567
|
-
|
|
568
|
-
|
|
618
|
+
/** The seats of `rigName` that `name` names, each as its actual session: its node's canonical session, or the
|
|
619
|
+
* pod-member form while the node has no session yet. A name matches, in this order, a seat's session's own name before
|
|
620
|
+
* `@`, its pod-member form (logical id `pod.member` written `pod-member`), or that own name's slug, so a seat attached
|
|
621
|
+
* under its own name is found by the name its team shows. Only seats the caller may address (`addressable`) count, and
|
|
622
|
+
* the first of these that any of them matches decides: another seat's slug never makes an exact name ambiguous, and a
|
|
623
|
+
* seat the caller can't address never decides or shadows one it can. No topology relationship, name convention for a
|
|
624
|
+
* lead, caller identity or task history supplies a seat. Throws when the rig isn't one active rig here or its node list
|
|
625
|
+
* can't be read. */
|
|
626
|
+
async function namedSeats(client, rigName, name, addressable) {
|
|
569
627
|
const rig = await resolveRigHandle(client, rigName, { strict: true });
|
|
570
628
|
if (rig.kind !== "resolved")
|
|
571
|
-
|
|
629
|
+
throw new Error(`rig ${rigName} isn't one active rig here`);
|
|
572
630
|
const nodes = await client.get(`/api/rigs/${encodeURIComponent(rig.id)}/nodes`);
|
|
573
631
|
if (nodes.status !== 200 || !Array.isArray(nodes.data))
|
|
574
|
-
|
|
575
|
-
|
|
632
|
+
throw new Error(`the node list for ${rigName} answered HTTP ${nodes.status}`);
|
|
633
|
+
const wanted = seatSlug(name);
|
|
634
|
+
const [byOwn, byPodMember, bySlug] = [new Set(), new Set(), new Set()];
|
|
576
635
|
for (const entry of nodes.data) {
|
|
577
|
-
const { logicalId, rigName:
|
|
578
|
-
if (typeof logicalId !== "string" ||
|
|
579
|
-
|
|
636
|
+
const { logicalId, rigName: inRig, canonicalSessionName } = (entry ?? {});
|
|
637
|
+
if (typeof logicalId !== "string" || inRig !== rigName)
|
|
638
|
+
throw new Error(`the node list for ${rigName} has a malformed entry`);
|
|
580
639
|
const dot = logicalId.indexOf(".");
|
|
581
640
|
if (dot <= 0 || dot === logicalId.length - 1)
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
641
|
+
throw new Error(`the node list for ${rigName} has a malformed entry`);
|
|
642
|
+
const podMember = `${logicalId.slice(0, dot)}-${logicalId.slice(dot + 1)}`;
|
|
643
|
+
const session = typeof canonicalSessionName === "string" && canonicalSessionName.endsWith(`@${rigName}`)
|
|
644
|
+
&& canonicalSessionName.length > rigName.length + 1 ? canonicalSessionName : `${podMember}@${rigName}`;
|
|
645
|
+
const own = session.slice(0, -(rigName.length + 1));
|
|
646
|
+
if (!addressable(session))
|
|
647
|
+
continue;
|
|
648
|
+
if (name === own)
|
|
649
|
+
byOwn.add(session);
|
|
650
|
+
else if (name === podMember)
|
|
651
|
+
byPodMember.add(session);
|
|
652
|
+
else if (wanted !== "" && wanted === seatSlug(own))
|
|
653
|
+
bySlug.add(session);
|
|
585
654
|
}
|
|
586
|
-
return
|
|
655
|
+
return [...(byOwn.size > 0 ? byOwn : byPodMember.size > 0 ? byPodMember : bySlug)];
|
|
587
656
|
}
|
|
657
|
+
/** A seat name as a slug: lowercase, with each run of other characters a single hyphen. */
|
|
658
|
+
const seatSlug = (name) => name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
588
659
|
/**
|
|
589
660
|
* Maps a DaemonResponse to MCP tool result.
|
|
590
661
|
* Three error levels: HTTP status, in-body errors, and structural failure fields.
|
|
@@ -695,6 +766,16 @@ export function createMcpServer(client, options = {}) {
|
|
|
695
766
|
return kind === "work" || (kind === "workspace" && access.workspace);
|
|
696
767
|
};
|
|
697
768
|
const scope = access && !access.owner ? scopeFor(access, seatOf) : null;
|
|
769
|
+
/** A tool's title and plain opening for a connected assistant (an external grant), whose client shows a person these;
|
|
770
|
+
* rig_whoami's are true for every caller, so it has them everywhere. Another caller keeps the tool's own text, which
|
|
771
|
+
* covers what only it can do (listing its rig's work, reaching a person, reading a named shared file). The same title
|
|
772
|
+
* goes in both of MCP's title fields, and the hints are unchanged. */
|
|
773
|
+
const worded = (tool, description, annotations) => {
|
|
774
|
+
const plain = PLAIN_WORDING[tool];
|
|
775
|
+
if (!plain || !(access?.external || tool === "rig_whoami") || !description.startsWith(plain.replaces))
|
|
776
|
+
return { description, annotations };
|
|
777
|
+
return { title: plain.title, description: plain.with + description.slice(plain.replaces.length), annotations: { ...annotations, title: plain.title } };
|
|
778
|
+
};
|
|
698
779
|
const caller = access ? { authenticated: true, principal: access.principal } : { authenticated: false, identity: "declared" };
|
|
699
780
|
/** For an authenticated non-owner: the error for an item it can't reach (or can't read), else null. `owner` asks
|
|
700
781
|
* whether it may change the item, which needs the item's owner in scope. */
|
|
@@ -1210,10 +1291,10 @@ export function createMcpServer(client, options = {}) {
|
|
|
1210
1291
|
// 19. rig_queue_create — hand a task to a seat
|
|
1211
1292
|
if (offered("rig_queue_create"))
|
|
1212
1293
|
server.registerTool("rig_queue_create", {
|
|
1213
|
-
|
|
1294
|
+
...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
1295
|
inputSchema: z.object({
|
|
1215
1296
|
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")
|
|
1297
|
+
? 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
1298
|
: z.string().describe("Destination seat (e.g. dev-impl@my-rig)"),
|
|
1218
1299
|
body: z.string().describe("The task: what to do and what to return"),
|
|
1219
1300
|
summary: z.string().optional().describe("One-line summary"),
|
|
@@ -1224,7 +1305,6 @@ export function createMcpServer(client, options = {}) {
|
|
|
1224
1305
|
revises: z.string().optional().describe("The qitemId of the work this asks to revise"),
|
|
1225
1306
|
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
1307
|
}),
|
|
1227
|
-
annotations: ADDITIVE,
|
|
1228
1308
|
}, async ({ destination, body, summary, tags, priority, tier, qitemId, revises, alert }) => {
|
|
1229
1309
|
// The server's one receiver counts for this connection only when its grant reaches it. Then a refused destination
|
|
1230
1310
|
// says how to reach it, so the assistant retries instead of telling the person the connection lacks access. It
|
|
@@ -1240,31 +1320,53 @@ export function createMcpServer(client, options = {}) {
|
|
|
1240
1320
|
// another rig's destination. An explicit destination continues through the existing path below.
|
|
1241
1321
|
if (!scope?.destination(destination))
|
|
1242
1322
|
return outOfScope("Configured task destination");
|
|
1323
|
+
// The receiver is exactly one seat this connection may address, and the item goes to that seat's actual session.
|
|
1324
|
+
const at = destination.lastIndexOf("@");
|
|
1325
|
+
let seats;
|
|
1243
1326
|
try {
|
|
1244
|
-
|
|
1245
|
-
return unavailable();
|
|
1327
|
+
seats = await namedSeats(client, destination.slice(at + 1), destination.slice(0, at), (seat) => scope?.destination(seat) === true);
|
|
1246
1328
|
}
|
|
1247
1329
|
catch {
|
|
1248
1330
|
return unavailable();
|
|
1249
1331
|
}
|
|
1332
|
+
if (seats.length !== 1)
|
|
1333
|
+
return unavailable();
|
|
1334
|
+
destination = seats[0];
|
|
1250
1335
|
}
|
|
1251
1336
|
else if (destination !== undefined && access?.external && !destination.includes("@")) {
|
|
1252
|
-
// A person names
|
|
1253
|
-
//
|
|
1254
|
-
// rig; never another rig's. It
|
|
1337
|
+
// A person names a seat as their team shows it ("workshop-lead"), and the assistant passes that on. A name alone
|
|
1338
|
+
// looks in the rig of the receiver this connection reaches when it is that receiver's name, else in this
|
|
1339
|
+
// connection's one rig; never another rig's. It reaches one seat the connection may address, stored under that
|
|
1340
|
+
// seat's actual session, or nothing is written.
|
|
1255
1341
|
const named = destination;
|
|
1256
|
-
const
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
if (
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
}
|
|
1265
|
-
if (!exists)
|
|
1342
|
+
const receiverAt = receiver?.lastIndexOf("@") ?? -1;
|
|
1343
|
+
const rigName = receiver && receiver.slice(0, receiverAt) === named ? receiver.slice(receiverAt + 1)
|
|
1344
|
+
: access.rigs.length === 1 ? access.rigs[0] : undefined;
|
|
1345
|
+
if (!rigName)
|
|
1346
|
+
return outOfScope(`Destination ${named}`, omitHint);
|
|
1347
|
+
// A name this connection may not address as written (another caller's seat without team/list, or its own) is
|
|
1348
|
+
// refused before the team is read, so the answer doesn't say whether such a seat exists.
|
|
1349
|
+
if (named !== "" && !scope?.destination(`${named}@${rigName}`))
|
|
1266
1350
|
return outOfScope(`Destination ${named}`, omitHint);
|
|
1267
|
-
|
|
1351
|
+
let reachable;
|
|
1352
|
+
try {
|
|
1353
|
+
reachable = named === "" ? [] : await namedSeats(client, rigName, named, (seat) => scope?.destination(seat) === true);
|
|
1354
|
+
}
|
|
1355
|
+
catch {
|
|
1356
|
+
const message = "This connection's team couldn't be read just now, so nothing was written. Try again.";
|
|
1357
|
+
return errorResult(message, "destination_unchecked", message);
|
|
1358
|
+
}
|
|
1359
|
+
if (reachable.length > 1) {
|
|
1360
|
+
const message = `'${named}' names ${reachable.length} seats here. Nothing was written; pass one of these: ${reachable.join(", ")}.`;
|
|
1361
|
+
return errorResult(JSON.stringify({ ok: false, code: "destination_ambiguous", message, candidates: reachable }), "destination_ambiguous", message, { candidates: reachable });
|
|
1362
|
+
}
|
|
1363
|
+
// A seat it may not address reads as no seat at all, so a hidden seat's name says nothing about it.
|
|
1364
|
+
if (reachable.length === 0) {
|
|
1365
|
+
const where = offered("rig_team") ? " rig_team lists the seats you can reach and their names." : " Check the name the person gave.";
|
|
1366
|
+
const message = `No seat here is named '${named}', so nothing was written.${where}${omitHint ? ` ${omitHint}` : ""}`;
|
|
1367
|
+
return errorResult(message, "destination_not_found", message);
|
|
1368
|
+
}
|
|
1369
|
+
destination = reachable[0];
|
|
1268
1370
|
}
|
|
1269
1371
|
if (scope && !scope.destination(destination))
|
|
1270
1372
|
return outOfScope(`Destination ${destination}`, access?.external ? omitHint : undefined);
|
|
@@ -1287,6 +1389,23 @@ export function createMcpServer(client, options = {}) {
|
|
|
1287
1389
|
}
|
|
1288
1390
|
}
|
|
1289
1391
|
const id = qitemId ?? `qitem-${new Date().toISOString().replace(/\D/g, "").slice(0, 14)}-${randomBytes(8).toString("hex")}`;
|
|
1392
|
+
// The grant service's fair-use limit holds back new work only. A retry of a create that already landed isn't new
|
|
1393
|
+
// work: the daemon answers it from the stored row, so it goes through as before.
|
|
1394
|
+
const throttle = access?.external?.throttle;
|
|
1395
|
+
if (throttle) {
|
|
1396
|
+
let landed = false;
|
|
1397
|
+
if (qitemId) {
|
|
1398
|
+
try {
|
|
1399
|
+
const existing = await client.get(`/api/queue/${encodeURIComponent(qitemId)}`);
|
|
1400
|
+
landed = existing.status < 400 ? true : existing.status === 404 ? false : undefined;
|
|
1401
|
+
}
|
|
1402
|
+
catch {
|
|
1403
|
+
landed = undefined;
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
if (landed !== true)
|
|
1407
|
+
return fairUseRetryLater(id, throttle.retryAfterSeconds, landed === undefined);
|
|
1408
|
+
}
|
|
1290
1409
|
// With no seat, the task goes to its destination as from the unknown sender, with the note at the top of its body.
|
|
1291
1410
|
const note = unknownSenderNote("task");
|
|
1292
1411
|
try {
|
|
@@ -1320,11 +1439,10 @@ export function createMcpServer(client, options = {}) {
|
|
|
1320
1439
|
// 20. rig_queue_show — one item with its transitions: a delegated task's answer is its own record
|
|
1321
1440
|
if (offered("rig_queue_show"))
|
|
1322
1441
|
server.registerTool("rig_queue_show", {
|
|
1323
|
-
|
|
1442
|
+
...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
1443
|
inputSchema: z.object({
|
|
1325
1444
|
qitemId: z.string().describe("The qitemId returned by rig_queue_create (or any queue item)"),
|
|
1326
1445
|
}),
|
|
1327
|
-
annotations: READ_ONLY,
|
|
1328
1446
|
}, async ({ qitemId }) => {
|
|
1329
1447
|
try {
|
|
1330
1448
|
const id = encodeURIComponent(qitemId);
|
|
@@ -1342,7 +1460,7 @@ export function createMcpServer(client, options = {}) {
|
|
|
1342
1460
|
let successor = handedOn ? await successorOf(client, qitemId, row.closureTarget, view ? scope.item : undefined) : undefined;
|
|
1343
1461
|
if (scope && !view && successor && "destinationSession" in successor && !scope.successor(successor.destinationSession))
|
|
1344
1462
|
successor = { unknown: true, code: "out_of_scope" };
|
|
1345
|
-
const shownItem = scope ?
|
|
1463
|
+
const shownItem = scope ? withoutDaemonLinkedRows(item.data) : item.data;
|
|
1346
1464
|
const data = view
|
|
1347
1465
|
? { item: projectForExternal(shownItem, view), transitions: Array.isArray(transitions.data) ? transitions.data.map((t) => projectForExternal(t, view)) : transitions.data }
|
|
1348
1466
|
: { item: shownItem, transitions: transitions.data };
|
|
@@ -1355,21 +1473,33 @@ export function createMcpServer(client, options = {}) {
|
|
|
1355
1473
|
// 21. rig_queue_list — list queue items
|
|
1356
1474
|
if (offered("rig_queue_list"))
|
|
1357
1475
|
server.registerTool("rig_queue_list", {
|
|
1358
|
-
|
|
1476
|
+
...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
1477
|
inputSchema: z.object({
|
|
1360
1478
|
owned: z.boolean().optional().describe("Only items assigned to this seat: its whole inbox (overrides destination)"),
|
|
1361
1479
|
mine: z.boolean().optional().describe("Items this seat sent or owns"),
|
|
1362
1480
|
destination: z.string().optional().describe("Filter by destination seat"),
|
|
1363
1481
|
source: z.string().optional().describe("Filter by source seat"),
|
|
1364
1482
|
state: z.string().optional().describe("Only these states, comma-separated; closed states included when named"),
|
|
1483
|
+
tags: z.array(z.string()).optional().describe("Exact, case-sensitive tags; every supplied tag must match. Commas are literal."),
|
|
1484
|
+
mission: z.string().optional().describe("Add the exact mission:<id> tag filter"),
|
|
1485
|
+
slice: z.string().optional().describe("Add the exact slice:<id> tag filter"),
|
|
1365
1486
|
all: z.boolean().optional().describe("Without state: include closed items"),
|
|
1366
1487
|
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
1488
|
handedOffFrom: z.string().optional().describe("The items handed on from this qitemId, in any state and any rig"),
|
|
1368
1489
|
limit: z.number().int().positive().optional().describe("Result limit (default 100)"),
|
|
1369
1490
|
}),
|
|
1370
|
-
|
|
1371
|
-
}, async ({ owned, mine: mineAsked, destination, source, state, all, since, handedOffFrom, limit }) => {
|
|
1491
|
+
}, async ({ owned, mine: mineAsked, destination, source, state, tags: requestedTags, mission, slice, all, since, handedOffFrom, limit }) => {
|
|
1372
1492
|
try {
|
|
1493
|
+
if ([...(requestedTags ?? []), ...(mission === undefined ? [] : [mission]), ...(slice === undefined ? [] : [slice])]
|
|
1494
|
+
.some((value) => value.trim().length === 0)) {
|
|
1495
|
+
const message = "tag filters cannot be blank";
|
|
1496
|
+
return errorResult(JSON.stringify({ error: "tag_invalid", message }), "tag_invalid", message);
|
|
1497
|
+
}
|
|
1498
|
+
const tags = [...new Set([
|
|
1499
|
+
...(requestedTags ?? []),
|
|
1500
|
+
...(mission === undefined ? [] : [`mission:${mission}`]),
|
|
1501
|
+
...(slice === undefined ? [] : [`slice:${slice}`]),
|
|
1502
|
+
])];
|
|
1373
1503
|
const params = new URLSearchParams();
|
|
1374
1504
|
const sessionName = seatOf();
|
|
1375
1505
|
// An external caller lists its own items only, so the daemon's limit counts those and not the team's.
|
|
@@ -1403,13 +1533,15 @@ export function createMcpServer(client, options = {}) {
|
|
|
1403
1533
|
params.set("sourceSession", source);
|
|
1404
1534
|
if (state)
|
|
1405
1535
|
params.set("state", state);
|
|
1536
|
+
for (const tag of tags)
|
|
1537
|
+
params.append("tag", tag);
|
|
1406
1538
|
if (since)
|
|
1407
1539
|
params.set("updatedSince", since);
|
|
1408
1540
|
if (handedOffFrom)
|
|
1409
1541
|
params.set("handedOffFrom", handedOffFrom);
|
|
1410
1542
|
params.set("limit", String(limit ?? 100));
|
|
1411
1543
|
const res = await client.get(`/api/queue/list?${params.toString()}`);
|
|
1412
|
-
const ignored = res.status < 400 ? ignoredFilter(res.data, { since, handedOffFrom }) : null;
|
|
1544
|
+
const ignored = res.status < 400 ? ignoredFilter(res.data, { since, handedOffFrom, tags }) : null;
|
|
1413
1545
|
if (ignored) {
|
|
1414
1546
|
const message = `The daemon didn't apply ${ignored}, so this list isn't filtered by it; it needs a newer daemon.`;
|
|
1415
1547
|
return errorResult(JSON.stringify({ ok: false, error: message }), "filter_unsupported", message);
|
|
@@ -1429,9 +1561,8 @@ export function createMcpServer(client, options = {}) {
|
|
|
1429
1561
|
// 22. rig_queue_claim — take an item assigned to this seat
|
|
1430
1562
|
if (offered("rig_queue_claim"))
|
|
1431
1563
|
server.registerTool("rig_queue_claim", {
|
|
1432
|
-
|
|
1564
|
+
...worded("rig_queue_claim", "Claim a queue item assigned to this seat before working on it.", DESTRUCTIVE),
|
|
1433
1565
|
inputSchema: z.object({ qitemId: z.string().describe("The queue item to claim") }),
|
|
1434
|
-
annotations: DESTRUCTIVE,
|
|
1435
1566
|
}, async ({ qitemId }) => {
|
|
1436
1567
|
try {
|
|
1437
1568
|
const denied = await itemOutOfScope(qitemId);
|
|
@@ -1449,7 +1580,7 @@ export function createMcpServer(client, options = {}) {
|
|
|
1449
1580
|
// 23. rig_queue_update — record progress, block, or close with the answer
|
|
1450
1581
|
if (offered("rig_queue_update"))
|
|
1451
1582
|
server.registerTool("rig_queue_update", {
|
|
1452
|
-
|
|
1583
|
+
...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
1584
|
inputSchema: z.object({
|
|
1454
1585
|
qitemId: z.string().describe("The queue item to update"),
|
|
1455
1586
|
state: z.string().optional().describe("New state (e.g. in-progress, blocked, done)"),
|
|
@@ -1463,7 +1594,6 @@ export function createMcpServer(client, options = {}) {
|
|
|
1463
1594
|
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
1595
|
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
1596
|
}),
|
|
1466
|
-
annotations: DESTRUCTIVE,
|
|
1467
1597
|
}, async ({ qitemId, state, closureReason, closureTarget, note, resolution, reopen, summary, evidenceRef, blockedOn, wakeAfterSeconds }) => {
|
|
1468
1598
|
try {
|
|
1469
1599
|
const denied = await itemOutOfScope(qitemId, "owner");
|
|
@@ -1553,9 +1683,8 @@ export function createMcpServer(client, options = {}) {
|
|
|
1553
1683
|
// 26. rig_whoami — which seat this server acts as
|
|
1554
1684
|
if (offered("rig_whoami"))
|
|
1555
1685
|
server.registerTool("rig_whoami", {
|
|
1556
|
-
|
|
1686
|
+
...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
1687
|
inputSchema: z.object({}),
|
|
1558
|
-
annotations: READ_ONLY,
|
|
1559
1688
|
}, async () => {
|
|
1560
1689
|
try {
|
|
1561
1690
|
const seat = seatOf();
|
|
@@ -1609,11 +1738,10 @@ export function createMcpServer(client, options = {}) {
|
|
|
1609
1738
|
// 27. rig_team — a rig's seats and its lead
|
|
1610
1739
|
if (offered("rig_team"))
|
|
1611
1740
|
server.registerTool("rig_team", {
|
|
1612
|
-
|
|
1741
|
+
...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
1742
|
inputSchema: z.object({
|
|
1614
|
-
rigId: z.string().optional().describe("Rig name or
|
|
1743
|
+
rigId: z.string().optional().describe("Rig name or id. A connection from outside the rig (an external grant) usually leaves this out, and the tool finds its team; if it passes one, it must be the granted rig's name, never its id or the team's display name."),
|
|
1615
1744
|
}),
|
|
1616
|
-
annotations: READ_ONLY,
|
|
1617
1745
|
}, async ({ rigId }) => {
|
|
1618
1746
|
try {
|
|
1619
1747
|
const inferred = rigId === undefined && !!access?.external;
|
|
@@ -1630,7 +1758,7 @@ export function createMcpServer(client, options = {}) {
|
|
|
1630
1758
|
}
|
|
1631
1759
|
// An external caller names one of its grant's rigs, so a lookup never answers about another workspace's rig.
|
|
1632
1760
|
if (access?.external && !scope?.rig(rigId))
|
|
1633
|
-
return outOfScope(`Rig ${rigId}
|
|
1761
|
+
return outOfScope(`Rig ${rigId}`, "Leave rigId out to see this connection's own team.");
|
|
1634
1762
|
const rig = await rigIdFor(client, rigId);
|
|
1635
1763
|
if ("content" in rig)
|
|
1636
1764
|
return rig;
|
|
@@ -1653,6 +1781,21 @@ export function createMcpServer(client, options = {}) {
|
|
|
1653
1781
|
// A node is a seat whether or not it has a session yet: its address derives from its logical id (pod.member).
|
|
1654
1782
|
const nodeSeats = new Set(inventory.flatMap((seat) => [seat.canonicalSessionName,
|
|
1655
1783
|
typeof seat.logicalId === "string" ? `${seat.logicalId.replace(".", "-")}@${rigName}` : null]).filter((name) => typeof name === "string"));
|
|
1784
|
+
// One read of the daemon's check-ins serves every member in this answer.
|
|
1785
|
+
let checkIns;
|
|
1786
|
+
const checkInOf = async (seat) => {
|
|
1787
|
+
checkIns ??= client.get("/api/queue/hosted-members")
|
|
1788
|
+
.then((res) => (res.status < 400 && Array.isArray(res.data?.members) ? res.data.members : null), () => null);
|
|
1789
|
+
const list = await checkIns;
|
|
1790
|
+
const row = list?.find((m) => m.seat === seat);
|
|
1791
|
+
if (!row || typeof row.status !== "string") {
|
|
1792
|
+
return { status: "unknown", lastCheckInAt: null, expectedMinutes: null, onRequest: false,
|
|
1793
|
+
reason: list ? "this daemon gave no status for it" : "this daemon gave no check-in status" };
|
|
1794
|
+
}
|
|
1795
|
+
return { status: row.status, lastCheckInAt: typeof row.lastCheckInAt === "string" ? row.lastCheckInAt : null,
|
|
1796
|
+
expectedMinutes: typeof row.expectedMinutes === "number" ? row.expectedMinutes : null, onRequest: row.onRequest === true,
|
|
1797
|
+
...(typeof row.reason === "string" ? { reason: row.reason } : {}) };
|
|
1798
|
+
};
|
|
1656
1799
|
const hosted = await hostedMembersOf(rostersFolder(), rigName, nodeSeats, async () => inventory.find((seat) => typeof seat.hostSelfId === "string")?.hostSelfId
|
|
1657
1800
|
?? await client.get("/healthz").then((res) => (res.status < 400 ? (res.data ?? {}).selfHostId ?? null : null), () => null), async (seat) => {
|
|
1658
1801
|
const rows = await client.get(`/api/queue/list?${new URLSearchParams({ destinationSession: seat, compact: "1", limit: String(PRESENCE_ROWS) }).toString()}`)
|
|
@@ -1660,7 +1803,7 @@ export function createMcpServer(client, options = {}) {
|
|
|
1660
1803
|
// An external caller sees a ring only on an item it may read, so another pair's item isn't named.
|
|
1661
1804
|
const visible = access?.external && Array.isArray(rows) ? rows.filter((row) => scope?.item(row)) : rows;
|
|
1662
1805
|
return { lastCallAt: readPresence(presenceFile())[seat]?.lastCallAt ?? null, lastWake: newestWake(visible, seat),
|
|
1663
|
-
lastWakeScope: `the latest ring among its ${PRESENCE_ROWS} most recent rows
|
|
1806
|
+
lastWakeScope: `the latest ring among its ${PRESENCE_ROWS} most recent rows`, checkIn: await checkInOf(seat) };
|
|
1664
1807
|
});
|
|
1665
1808
|
return mapResult({ status: 200, data: { ...view, hostedMembers: hosted.members, ...(hosted.note ? { hostedMembersNote: hosted.note } : {}) } }, undefined, { structured: true });
|
|
1666
1809
|
}
|
|
@@ -1764,14 +1907,13 @@ export function createMcpServer(client, options = {}) {
|
|
|
1764
1907
|
// 32. rig_artifact_read — a result's artifact, read through the daemon's shared roots
|
|
1765
1908
|
if (offered("rig_artifact_read"))
|
|
1766
1909
|
server.registerTool("rig_artifact_read", {
|
|
1767
|
-
|
|
1910
|
+
...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
1911
|
inputSchema: z.object({
|
|
1769
1912
|
qitemId: z.string().optional().describe("Read this item's evidenceRef"),
|
|
1770
1913
|
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
1914
|
path: z.string().optional().describe("With root: the file's path inside that root"),
|
|
1772
1915
|
offset: z.number().int().min(0).optional().describe("The character to start from (default 0)"),
|
|
1773
1916
|
}),
|
|
1774
|
-
annotations: READ_ONLY,
|
|
1775
1917
|
}, async ({ qitemId, root, path, offset }) => {
|
|
1776
1918
|
try {
|
|
1777
1919
|
const read = async (source, rootName, inside) => {
|