@openrig/cli 0.7.9 → 0.7.11
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/claude-permission-policies.cjs +41 -0
- package/daemon/assets/claude-permission-policies.d.cts +3 -0
- package/daemon/assets/claude-team-permissions.cjs +13 -3
- package/daemon/assets/openshell/README.md +1 -1
- package/daemon/assets/openshell/guest.py +3 -2
- package/daemon/assets/pi-account-lock.cjs +39 -0
- package/daemon/assets/plugins/openrig/.claude-plugin/marketplace.json +15 -0
- package/daemon/assets/plugins/openrig/.claude-plugin/plugin.json +32 -0
- package/daemon/assets/plugins/openrig/.codex-plugin/plugin.json +39 -0
- package/daemon/assets/plugins/openrig/.cursor-plugin/plugin.json +6 -0
- package/daemon/assets/plugins/openrig/LICENSE +200 -0
- package/daemon/assets/plugins/openrig/README.md +106 -0
- package/daemon/assets/plugins/openrig/assets/logo.svg +1 -0
- package/daemon/assets/plugins/openrig/mcp.json +10 -0
- package/daemon/assets/plugins/openrig/plugin.json +14 -0
- package/daemon/assets/plugins/openrig/skills/working-with-an-openrig-team/SKILL.md +90 -0
- package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/hooks/claude.json +11 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/activity-relay.cjs +39 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/permission-stop-descriptor.cjs +221 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +16 -2
- package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +1 -0
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +24 -8
- package/daemon/assets/plugins/openrig-core/skills/refocusing/SKILL.md +5 -0
- package/daemon/assets/plugins/openrig-core/skills/refocusing/scripts/trace-to-root.py +39 -4
- package/daemon/assets/skills/rigs/SKILL.md +10 -3
- 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 +122 -17
- package/daemon/context-packs/reference/acp-agents.md +176 -2
- package/daemon/context-packs/reference/getting-started.md +23 -4
- package/daemon/context-packs/reference/manifest.yaml +4 -1
- package/daemon/context-packs/reference/rig-spec.md +64 -7
- package/daemon/context-packs/reference/tmux-servers.md +214 -0
- package/daemon/context-packs/reference/whats-new.md +484 -76
- 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/SKILL.md +7 -0
- 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/SKILL.md +1 -0
- package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/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 +90 -0
- package/daemon/context-packs/skills/core/working-with-an-openrig-team/manifest.yaml +10 -0
- 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/SKILL.md +24 -8
- 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/SKILL.md +5 -0
- package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/scripts/trace-to-root.py +39 -4
- 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 +3 -1
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +53 -12
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +17 -3
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-resume.d.ts +3 -1
- package/daemon/dist/adapters/codex-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-resume.js +8 -4
- package/daemon/dist/adapters/codex-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +6 -0
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +49 -19
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/kernel-authority.d.ts +2 -4
- package/daemon/dist/adapters/kernel-authority.d.ts.map +1 -1
- package/daemon/dist/adapters/kernel-authority.js +10 -41
- package/daemon/dist/adapters/kernel-authority.js.map +1 -1
- package/daemon/dist/adapters/openshell-podman-observer.d.ts.map +1 -1
- package/daemon/dist/adapters/openshell-podman-observer.js +25 -20
- package/daemon/dist/adapters/openshell-podman-observer.js.map +1 -1
- package/daemon/dist/adapters/pi-resume.d.ts +4 -1
- package/daemon/dist/adapters/pi-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-resume.js +38 -9
- package/daemon/dist/adapters/pi-resume.js.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.d.ts +4 -0
- package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.js +7 -0
- package/daemon/dist/adapters/pi-runner-protocol.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +5 -0
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +79 -8
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts +6 -0
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.js +58 -23
- package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/tmux-control.d.ts +32 -1
- package/daemon/dist/adapters/tmux-control.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-control.js +149 -9
- package/daemon/dist/adapters/tmux-control.js.map +1 -1
- package/daemon/dist/adapters/tmux-server.d.ts +9 -0
- package/daemon/dist/adapters/tmux-server.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-server.js +12 -0
- package/daemon/dist/adapters/tmux-server.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +21 -1
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +184 -14
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +10 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/150_node_launch_wrapper.d.ts +3 -0
- package/daemon/dist/db/migrations/150_node_launch_wrapper.d.ts.map +1 -0
- package/daemon/dist/db/migrations/150_node_launch_wrapper.js +5 -0
- package/daemon/dist/db/migrations/150_node_launch_wrapper.js.map +1 -0
- package/daemon/dist/db/migrations/151_pi_account_switches.d.ts +4 -0
- package/daemon/dist/db/migrations/151_pi_account_switches.d.ts.map +1 -0
- package/daemon/dist/db/migrations/151_pi_account_switches.js +44 -0
- package/daemon/dist/db/migrations/151_pi_account_switches.js.map +1 -0
- package/daemon/dist/db/migrations/152_workflow_instance_spec.d.ts +8 -0
- package/daemon/dist/db/migrations/152_workflow_instance_spec.d.ts.map +1 -0
- package/daemon/dist/db/migrations/152_workflow_instance_spec.js +13 -0
- package/daemon/dist/db/migrations/152_workflow_instance_spec.js.map +1 -0
- package/daemon/dist/db/migrations/153_events_retention_marks.d.ts +7 -0
- package/daemon/dist/db/migrations/153_events_retention_marks.d.ts.map +1 -0
- package/daemon/dist/db/migrations/153_events_retention_marks.js +17 -0
- package/daemon/dist/db/migrations/153_events_retention_marks.js.map +1 -0
- package/daemon/dist/db/migrations/154_workflow_instance_root_objective.d.ts +7 -0
- package/daemon/dist/db/migrations/154_workflow_instance_root_objective.d.ts.map +1 -0
- package/daemon/dist/db/migrations/154_workflow_instance_root_objective.js +11 -0
- package/daemon/dist/db/migrations/154_workflow_instance_root_objective.js.map +1 -0
- package/daemon/dist/domain/activity-taxonomy.d.ts +9 -0
- package/daemon/dist/domain/activity-taxonomy.d.ts.map +1 -1
- package/daemon/dist/domain/activity-taxonomy.js.map +1 -1
- package/daemon/dist/domain/agent-activity-store.d.ts +14 -0
- package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
- package/daemon/dist/domain/agent-activity-store.js +33 -0
- package/daemon/dist/domain/agent-activity-store.js.map +1 -1
- package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
- package/daemon/dist/domain/agent-manifest.js +47 -9
- package/daemon/dist/domain/agent-manifest.js.map +1 -1
- package/daemon/dist/domain/agent-resolver.d.ts +8 -0
- package/daemon/dist/domain/agent-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/agent-resolver.js +6 -1
- package/daemon/dist/domain/agent-resolver.js.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +55 -3
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +339 -31
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/claude-managed-launch.d.ts +2 -0
- package/daemon/dist/domain/claude-managed-launch.d.ts.map +1 -1
- package/daemon/dist/domain/claude-managed-launch.js +12 -2
- package/daemon/dist/domain/claude-managed-launch.js.map +1 -1
- package/daemon/dist/domain/compaction-restore-notice.d.ts +1 -1
- package/daemon/dist/domain/compaction-restore-notice.d.ts.map +1 -1
- package/daemon/dist/domain/compaction-restore-notice.js +2 -1
- package/daemon/dist/domain/compaction-restore-notice.js.map +1 -1
- package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/context-monitor.js +3 -0
- package/daemon/dist/domain/context-monitor.js.map +1 -1
- package/daemon/dist/domain/context-usage-store.d.ts.map +1 -1
- package/daemon/dist/domain/context-usage-store.js +10 -1
- package/daemon/dist/domain/context-usage-store.js.map +1 -1
- package/daemon/dist/domain/desired-claude-activity-hooks.d.ts +4 -3
- package/daemon/dist/domain/desired-claude-activity-hooks.d.ts.map +1 -1
- package/daemon/dist/domain/desired-claude-activity-hooks.js +49 -15
- package/daemon/dist/domain/desired-claude-activity-hooks.js.map +1 -1
- package/daemon/dist/domain/draft-aware-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/draft-aware-delivery.js +5 -1
- package/daemon/dist/domain/draft-aware-delivery.js.map +1 -1
- package/daemon/dist/domain/event-bus.d.ts +31 -0
- package/daemon/dist/domain/event-bus.d.ts.map +1 -1
- package/daemon/dist/domain/event-bus.js +88 -2
- package/daemon/dist/domain/event-bus.js.map +1 -1
- package/daemon/dist/domain/execution-view.d.ts +9 -0
- package/daemon/dist/domain/execution-view.d.ts.map +1 -1
- package/daemon/dist/domain/execution-view.js +91 -50
- package/daemon/dist/domain/execution-view.js.map +1 -1
- package/daemon/dist/domain/gateway/connections-projection.d.ts +13 -1
- package/daemon/dist/domain/gateway/connections-projection.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/connections-projection.js +38 -10
- package/daemon/dist/domain/gateway/connections-projection.js.map +1 -1
- package/daemon/dist/domain/gateway/dispatcher.d.ts +2 -0
- package/daemon/dist/domain/gateway/dispatcher.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/dispatcher.js +14 -1
- package/daemon/dist/domain/gateway/dispatcher.js.map +1 -1
- package/daemon/dist/domain/gateway/gateway-subsystem.d.ts +2 -0
- package/daemon/dist/domain/gateway/gateway-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/gateway-subsystem.js +1 -0
- package/daemon/dist/domain/gateway/gateway-subsystem.js.map +1 -1
- package/daemon/dist/domain/gateway/human-readiness.d.ts +7 -0
- package/daemon/dist/domain/gateway/human-readiness.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/human-readiness.js +45 -0
- package/daemon/dist/domain/gateway/human-readiness.js.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.d.ts +23 -3
- package/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.js +66 -34
- package/daemon/dist/domain/gateway/human-registry.js.map +1 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.js +8 -2
- package/daemon/dist/domain/gateway/operator-delivery-engine.js.map +1 -1
- package/daemon/dist/domain/gateway/relay-config.d.ts +80 -0
- package/daemon/dist/domain/gateway/relay-config.d.ts.map +1 -0
- package/daemon/dist/domain/gateway/relay-config.js +290 -0
- package/daemon/dist/domain/gateway/relay-config.js.map +1 -0
- package/daemon/dist/domain/gateway/relay-inbound.d.ts +74 -0
- package/daemon/dist/domain/gateway/relay-inbound.d.ts.map +1 -0
- package/daemon/dist/domain/gateway/relay-inbound.js +739 -0
- package/daemon/dist/domain/gateway/relay-inbound.js.map +1 -0
- package/daemon/dist/domain/gateway/relay-outbound.d.ts +215 -0
- package/daemon/dist/domain/gateway/relay-outbound.d.ts.map +1 -0
- package/daemon/dist/domain/gateway/relay-outbound.js +770 -0
- package/daemon/dist/domain/gateway/relay-outbound.js.map +1 -0
- package/daemon/dist/domain/gateway/slack/inbound.d.ts +4 -0
- package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.js +14 -2
- package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/open-asks.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/open-asks.js +14 -1
- package/daemon/dist/domain/gateway/slack/open-asks.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 +225 -32
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
- package/daemon/dist/domain/hosts/pairing-ask.d.ts +10 -0
- package/daemon/dist/domain/hosts/pairing-ask.d.ts.map +1 -0
- package/daemon/dist/domain/hosts/pairing-ask.js +9 -0
- package/daemon/dist/domain/hosts/pairing-ask.js.map +1 -0
- package/daemon/dist/domain/launch-wrapper.d.ts +28 -0
- package/daemon/dist/domain/launch-wrapper.d.ts.map +1 -0
- package/daemon/dist/domain/launch-wrapper.js +93 -0
- package/daemon/dist/domain/launch-wrapper.js.map +1 -0
- package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js +85 -28
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
- package/daemon/dist/domain/model-divergence/current-model-reader.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/current-model-reader.js +14 -3
- package/daemon/dist/domain/model-divergence/current-model-reader.js.map +1 -1
- package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-lineage.js +32 -9
- package/daemon/dist/domain/native-process-lineage.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe.d.ts +5 -0
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +5 -0
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +7 -0
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +9 -2
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/outbox-handler.d.ts +53 -3
- package/daemon/dist/domain/outbox-handler.d.ts.map +1 -1
- package/daemon/dist/domain/outbox-handler.js +101 -6
- package/daemon/dist/domain/outbox-handler.js.map +1 -1
- package/daemon/dist/domain/parent-session-env.d.ts +2 -1
- package/daemon/dist/domain/parent-session-env.d.ts.map +1 -1
- package/daemon/dist/domain/parent-session-env.js +9 -1
- package/daemon/dist/domain/parent-session-env.js.map +1 -1
- package/daemon/dist/domain/parked-query.d.ts +6 -0
- package/daemon/dist/domain/parked-query.d.ts.map +1 -1
- package/daemon/dist/domain/parked-query.js +1 -0
- package/daemon/dist/domain/parked-query.js.map +1 -1
- package/daemon/dist/domain/permission-stop-observation.d.ts +50 -0
- package/daemon/dist/domain/permission-stop-observation.d.ts.map +1 -0
- package/daemon/dist/domain/permission-stop-observation.js +163 -0
- package/daemon/dist/domain/permission-stop-observation.js.map +1 -0
- package/daemon/dist/domain/pi-account-state.d.ts +6 -0
- package/daemon/dist/domain/pi-account-state.d.ts.map +1 -0
- package/daemon/dist/domain/pi-account-state.js +14 -0
- package/daemon/dist/domain/pi-account-state.js.map +1 -0
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts +6 -0
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.js +10 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -1
- package/daemon/dist/domain/policies/quiet-release.d.ts.map +1 -1
- package/daemon/dist/domain/policies/quiet-release.js +6 -3
- package/daemon/dist/domain/policies/quiet-release.js.map +1 -1
- package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/profile-resolver.js +3 -0
- package/daemon/dist/domain/profile-resolver.js.map +1 -1
- package/daemon/dist/domain/projection-planner.d.ts +4 -1
- package/daemon/dist/domain/projection-planner.d.ts.map +1 -1
- package/daemon/dist/domain/projection-planner.js +3 -0
- package/daemon/dist/domain/projection-planner.js.map +1 -1
- package/daemon/dist/domain/queue-pickup.d.ts +20 -1
- package/daemon/dist/domain/queue-pickup.d.ts.map +1 -1
- package/daemon/dist/domain/queue-pickup.js +38 -6
- package/daemon/dist/domain/queue-pickup.js.map +1 -1
- package/daemon/dist/domain/queue-recovery.d.ts +19 -0
- package/daemon/dist/domain/queue-recovery.d.ts.map +1 -1
- package/daemon/dist/domain/queue-recovery.js +80 -2
- package/daemon/dist/domain/queue-recovery.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +81 -10
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +381 -48
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-retention.d.ts +68 -0
- package/daemon/dist/domain/queue-retention.d.ts.map +1 -1
- package/daemon/dist/domain/queue-retention.js +133 -0
- package/daemon/dist/domain/queue-retention.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts +22 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +586 -157
- package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
- package/daemon/dist/domain/queue-transition-log.d.ts +49 -1
- package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
- package/daemon/dist/domain/queue-transition-log.js +216 -3
- package/daemon/dist/domain/queue-transition-log.js.map +1 -1
- package/daemon/dist/domain/queue-waiting.d.ts +1 -1
- package/daemon/dist/domain/queue-waiting.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +7 -2
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/quiet-hold-custody.d.ts.map +1 -1
- package/daemon/dist/domain/quiet-hold-custody.js +7 -3
- package/daemon/dist/domain/quiet-hold-custody.js.map +1 -1
- package/daemon/dist/domain/restore-check-service.d.ts +1 -0
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js +7 -2
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +13 -2
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +63 -26
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/rig-repository.d.ts +3 -0
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +46 -1
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-codec.js +4 -0
- package/daemon/dist/domain/rigspec-codec.js.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.js +5 -0
- package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +20 -2
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +76 -20
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.js +13 -1
- package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
- package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +26 -1
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +1 -0
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-adapter.js.map +1 -1
- package/daemon/dist/domain/runtime-switch-materials.d.ts +1 -1
- package/daemon/dist/domain/runtime-switch-materials.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-switch-materials.js +2 -2
- package/daemon/dist/domain/runtime-switch-materials.js.map +1 -1
- package/daemon/dist/domain/seat-activity-service.d.ts +38 -1
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-activity-service.js +59 -1
- package/daemon/dist/domain/seat-activity-service.js.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.d.ts +13 -0
- package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.js +45 -1
- package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts +1 -0
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +38 -11
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.d.ts +10 -0
- package/daemon/dist/domain/seat-launch-environment.d.ts.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.js +62 -15
- package/daemon/dist/domain/seat-launch-environment.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +3 -0
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +30 -8
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.d.ts +2 -1
- package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.js +22 -2
- package/daemon/dist/domain/seat-restart-in-place.js.map +1 -1
- package/daemon/dist/domain/seat-runtime-home.d.ts +4 -1
- package/daemon/dist/domain/seat-runtime-home.d.ts.map +1 -1
- package/daemon/dist/domain/seat-runtime-home.js +6 -4
- package/daemon/dist/domain/seat-runtime-home.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 +75 -11
- package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -1
- package/daemon/dist/domain/seat-skill-storage.d.ts +57 -4
- package/daemon/dist/domain/seat-skill-storage.d.ts.map +1 -1
- package/daemon/dist/domain/seat-skill-storage.js +338 -8
- package/daemon/dist/domain/seat-skill-storage.js.map +1 -1
- package/daemon/dist/domain/seat-status-service.d.ts +9 -2
- package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-status-service.js +17 -2
- package/daemon/dist/domain/seat-status-service.js.map +1 -1
- package/daemon/dist/domain/self-attach-service.d.ts.map +1 -1
- package/daemon/dist/domain/self-attach-service.js +11 -4
- package/daemon/dist/domain/self-attach-service.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +33 -4
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +225 -37
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/skill-catalog.d.ts +37 -0
- package/daemon/dist/domain/skill-catalog.d.ts.map +1 -1
- package/daemon/dist/domain/skill-catalog.js +152 -3
- package/daemon/dist/domain/skill-catalog.js.map +1 -1
- package/daemon/dist/domain/slices/slice-detail-projector.d.ts +1 -1
- package/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-detail-projector.js +11 -13
- package/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
- package/daemon/dist/domain/spec-validation-service.d.ts +1 -0
- package/daemon/dist/domain/spec-validation-service.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +7 -1
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts +1 -0
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +1 -0
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/terminal/earlier-tile-attach-0711.d.ts +2 -0
- package/daemon/dist/domain/terminal/earlier-tile-attach-0711.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/earlier-tile-attach-0711.js +146 -0
- package/daemon/dist/domain/terminal/earlier-tile-attach-0711.js.map +1 -0
- package/daemon/dist/domain/terminal/earlier-tile-attach.d.ts +4 -0
- package/daemon/dist/domain/terminal/earlier-tile-attach.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/earlier-tile-attach.js +131 -0
- package/daemon/dist/domain/terminal/earlier-tile-attach.js.map +1 -0
- package/daemon/dist/domain/terminal/herdr-follow-view.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-follow-view.js +47 -17
- package/daemon/dist/domain/terminal/herdr-follow-view.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-viewer.d.ts +7 -4
- package/daemon/dist/domain/terminal/herdr-viewer.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-viewer.js +105 -41
- package/daemon/dist/domain/terminal/herdr-viewer.js.map +1 -1
- package/daemon/dist/domain/terminal/terminal-following.js +3 -3
- package/daemon/dist/domain/terminal/terminal-following.js.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.js +16 -1
- package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
- package/daemon/dist/domain/terminal/tile-attach.d.ts +8 -1
- package/daemon/dist/domain/terminal/tile-attach.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/tile-attach.js +20 -50
- package/daemon/dist/domain/terminal/tile-attach.js.map +1 -1
- package/daemon/dist/domain/terminal/view-composer.js +1 -1
- package/daemon/dist/domain/terminal/view-composer.js.map +1 -1
- package/daemon/dist/domain/tmux-server-selection.d.ts.map +1 -1
- package/daemon/dist/domain/tmux-server-selection.js +8 -2
- package/daemon/dist/domain/tmux-server-selection.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +18 -1
- 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-store.d.ts +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.js +52 -0
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/view-event-bridge.js +1 -1
- package/daemon/dist/domain/view-event-bridge.js.map +1 -1
- package/daemon/dist/domain/view-projector.d.ts +4 -1
- package/daemon/dist/domain/view-projector.d.ts.map +1 -1
- package/daemon/dist/domain/view-projector.js +9 -4
- package/daemon/dist/domain/view-projector.js.map +1 -1
- package/daemon/dist/domain/wake-recovery.d.ts.map +1 -1
- package/daemon/dist/domain/wake-recovery.js +9 -2
- package/daemon/dist/domain/wake-recovery.js.map +1 -1
- package/daemon/dist/domain/workflow-exception-escalation.d.ts +3 -2
- package/daemon/dist/domain/workflow-exception-escalation.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-exception-escalation.js +1 -1
- package/daemon/dist/domain/workflow-exception-escalation.js.map +1 -1
- package/daemon/dist/domain/workflow-instance-store.d.ts +8 -1
- package/daemon/dist/domain/workflow-instance-store.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-instance-store.js +21 -3
- package/daemon/dist/domain/workflow-instance-store.js.map +1 -1
- package/daemon/dist/domain/workflow-reconciliation.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-reconciliation.js +2 -1
- package/daemon/dist/domain/workflow-reconciliation.js.map +1 -1
- package/daemon/dist/domain/workflow-runtime.d.ts +4 -1
- package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-runtime.js +20 -7
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.d.ts +24 -4
- package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.js +87 -7
- package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
- package/daemon/dist/domain/workflow-spec-unregister.d.ts +36 -0
- package/daemon/dist/domain/workflow-spec-unregister.d.ts.map +1 -0
- package/daemon/dist/domain/workflow-spec-unregister.js +105 -0
- package/daemon/dist/domain/workflow-spec-unregister.js.map +1 -0
- package/daemon/dist/domain/workflow-types.d.ts +14 -0
- package/daemon/dist/domain/workflow-types.d.ts.map +1 -1
- package/daemon/dist/index.d.ts +2 -1
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +23 -5
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/learned-host-bindings-surface.d.ts +2 -0
- package/daemon/dist/learned-host-bindings-surface.d.ts.map +1 -0
- package/daemon/dist/learned-host-bindings-surface.js +4 -0
- package/daemon/dist/learned-host-bindings-surface.js.map +1 -0
- package/daemon/dist/middleware/auth-bearer-token.d.ts +2 -0
- package/daemon/dist/middleware/auth-bearer-token.d.ts.map +1 -1
- package/daemon/dist/middleware/auth-bearer-token.js +12 -8
- package/daemon/dist/middleware/auth-bearer-token.js.map +1 -1
- package/daemon/dist/routes/activity.d.ts.map +1 -1
- package/daemon/dist/routes/activity.js +59 -4
- package/daemon/dist/routes/activity.js.map +1 -1
- package/daemon/dist/routes/adapters.d.ts.map +1 -1
- package/daemon/dist/routes/adapters.js +4 -0
- package/daemon/dist/routes/adapters.js.map +1 -1
- package/daemon/dist/routes/compaction.js +3 -1
- package/daemon/dist/routes/compaction.js.map +1 -1
- package/daemon/dist/routes/events.js +4 -0
- package/daemon/dist/routes/events.js.map +1 -1
- package/daemon/dist/routes/gateway.d.ts +3 -0
- package/daemon/dist/routes/gateway.d.ts.map +1 -1
- package/daemon/dist/routes/gateway.js +58 -8
- package/daemon/dist/routes/gateway.js.map +1 -1
- package/daemon/dist/routes/hosts.d.ts.map +1 -1
- package/daemon/dist/routes/hosts.js +298 -35
- package/daemon/dist/routes/hosts.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +10 -3
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/seat.d.ts.map +1 -1
- package/daemon/dist/routes/seat.js +8 -5
- package/daemon/dist/routes/seat.js.map +1 -1
- package/daemon/dist/routes/sessions.js +1 -1
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/terminal-ws.d.ts +1 -0
- package/daemon/dist/routes/terminal-ws.d.ts.map +1 -1
- package/daemon/dist/routes/terminal-ws.js +1 -1
- package/daemon/dist/routes/terminal-ws.js.map +1 -1
- package/daemon/dist/routes/terminal.js +2 -2
- package/daemon/dist/routes/terminal.js.map +1 -1
- package/daemon/dist/routes/transport.js +1 -1
- package/daemon/dist/routes/transport.js.map +1 -1
- package/daemon/dist/routes/workflow.d.ts.map +1 -1
- package/daemon/dist/routes/workflow.js +24 -0
- package/daemon/dist/routes/workflow.js.map +1 -1
- package/daemon/dist/server.d.ts +2 -0
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +7 -2
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +74 -17
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/dist/terminal/TerminalSessionBroker.d.ts +18 -13
- package/daemon/dist/terminal/TerminalSessionBroker.d.ts.map +1 -1
- package/daemon/dist/terminal/TerminalSessionBroker.js +113 -76
- package/daemon/dist/terminal/TerminalSessionBroker.js.map +1 -1
- package/daemon/dist/terminal/window-pin.d.ts +3 -3
- package/daemon/dist/terminal/window-pin.d.ts.map +1 -1
- package/daemon/dist/terminal/window-pin.js +2 -2
- package/daemon/dist/terminal/window-pin.js.map +1 -1
- package/daemon/docs/reference/acp-agents.md +176 -2
- package/daemon/docs/reference/agent-spec.md +73 -6
- package/daemon/docs/reference/agent-startup-guide.md +28 -0
- package/daemon/docs/reference/agent-state-taxonomy.md +7 -0
- package/daemon/docs/reference/author-contracts.md +1 -1
- package/daemon/docs/reference/community-harness-examples/dsh/dsh.yaml +2 -2
- package/daemon/docs/reference/daemon-http-clients.md +16 -7
- package/daemon/docs/reference/gateway-participants.md +4 -1
- package/daemon/docs/reference/gateway-relay.md +239 -0
- package/daemon/docs/reference/getting-started.md +23 -4
- package/daemon/docs/reference/harness-runner-contract.md +20 -3
- package/daemon/docs/reference/hosted-members.md +38 -1
- package/daemon/docs/reference/project-workspace.md +4 -0
- package/daemon/docs/reference/quickstart.md +1 -1
- package/daemon/docs/reference/reconstructions.md +90 -0
- package/daemon/docs/reference/rig-spec.md +64 -7
- package/daemon/docs/reference/seat-delivery.md +83 -0
- package/daemon/docs/reference/slack-app-setup.md +1 -2
- package/daemon/docs/reference/telemetry.md +64 -0
- package/daemon/docs/reference/terminal-sessions.md +88 -26
- package/daemon/docs/reference/tmux-servers.md +48 -0
- package/daemon/docs/reference/whats-new.md +484 -76
- package/daemon/specs/agents/shared/skills/core/cross-host-rig-commands/SKILL.md +7 -0
- package/daemon/specs/agents/shared/skills/core/openrig-skills/SKILL.md +1 -0
- package/daemon/specs/agents/shared/skills/core/working-with-an-openrig-team/SKILL.md +90 -0
- package/dist/acp/agent-server.d.ts +126 -0
- package/dist/acp/agent-server.d.ts.map +1 -0
- package/dist/acp/agent-server.js +449 -0
- package/dist/acp/agent-server.js.map +1 -0
- package/dist/acp/connector.d.ts +27 -1
- package/dist/acp/connector.d.ts.map +1 -1
- package/dist/acp/connector.js +38 -5
- package/dist/acp/connector.js.map +1 -1
- package/dist/acp/json-rpc-stdio.d.ts +24 -10
- package/dist/acp/json-rpc-stdio.d.ts.map +1 -1
- package/dist/acp/json-rpc-stdio.js +58 -36
- package/dist/acp/json-rpc-stdio.js.map +1 -1
- package/dist/acp/run-processes.d.ts +3 -2
- package/dist/acp/run-processes.d.ts.map +1 -1
- package/dist/acp/run-processes.js +4 -3
- package/dist/acp/run-processes.js.map +1 -1
- package/dist/bin-wrapper.d.ts.map +1 -1
- package/dist/bin-wrapper.js +3 -1
- package/dist/bin-wrapper.js.map +1 -1
- package/dist/build-info.js +3 -3
- package/dist/client.d.ts +4 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +7 -0
- package/dist/client.js.map +1 -1
- package/dist/commands/acp.d.ts +16 -0
- package/dist/commands/acp.d.ts.map +1 -1
- package/dist/commands/acp.js +191 -4
- package/dist/commands/acp.js.map +1 -1
- package/dist/commands/agent.d.ts.map +1 -1
- package/dist/commands/agent.js +3 -0
- package/dist/commands/agent.js.map +1 -1
- package/dist/commands/attach.js +1 -1
- package/dist/commands/attach.js.map +1 -1
- package/dist/commands/broadcast.js +4 -0
- package/dist/commands/broadcast.js.map +1 -1
- package/dist/commands/capture.js +6 -6
- package/dist/commands/capture.js.map +1 -1
- package/dist/commands/compact.d.ts.map +1 -1
- package/dist/commands/compact.js +14 -2
- package/dist/commands/compact.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +42 -6
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/context-reconstruction.d.ts +5 -0
- package/dist/commands/context-reconstruction.d.ts.map +1 -0
- package/dist/commands/context-reconstruction.js +69 -0
- package/dist/commands/context-reconstruction.js.map +1 -0
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +2 -0
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +5 -2
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/doctor.d.ts +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +97 -7
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/exec.d.ts +102 -0
- package/dist/commands/exec.d.ts.map +1 -0
- package/dist/commands/exec.js +562 -0
- package/dist/commands/exec.js.map +1 -0
- package/dist/commands/gateway.d.ts.map +1 -1
- package/dist/commands/gateway.js +15 -7
- package/dist/commands/gateway.js.map +1 -1
- package/dist/commands/host.d.ts.map +1 -1
- package/dist/commands/host.js +59 -12
- package/dist/commands/host.js.map +1 -1
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +29 -5
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/provider.d.ts.map +1 -1
- package/dist/commands/provider.js +4 -1
- package/dist/commands/provider.js.map +1 -1
- package/dist/commands/ps.d.ts +2 -0
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +3 -1
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts +3 -0
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +203 -67
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/roster.d.ts +1 -1
- package/dist/commands/roster.d.ts.map +1 -1
- package/dist/commands/roster.js +14 -2
- package/dist/commands/roster.js.map +1 -1
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +48 -5
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +7 -11
- package/dist/commands/send.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/stream.d.ts.map +1 -1
- package/dist/commands/stream.js +24 -1
- package/dist/commands/stream.js.map +1 -1
- package/dist/commands/terminal.js +1 -1
- package/dist/commands/workflow-render.d.ts +4 -0
- package/dist/commands/workflow-render.d.ts.map +1 -1
- package/dist/commands/workflow-render.js +7 -0
- package/dist/commands/workflow-render.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +69 -1
- package/dist/commands/workflow.js.map +1 -1
- package/dist/config-store.d.ts +9 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +57 -3
- package/dist/config-store.js.map +1 -1
- package/dist/cross-host-target.d.ts +2 -0
- package/dist/cross-host-target.d.ts.map +1 -1
- package/dist/cross-host-target.js +1 -1
- package/dist/cross-host-target.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts +2 -0
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +38 -5
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/daemon-reachability.d.ts +1 -1
- package/dist/daemon-reachability.d.ts.map +1 -1
- package/dist/daemon-reachability.js +4 -2
- package/dist/daemon-reachability.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lazy-program.d.ts.map +1 -1
- package/dist/lazy-program.js +1 -0
- package/dist/lazy-program.js.map +1 -1
- package/dist/lib/reconstruction-reader.d.ts +122 -0
- package/dist/lib/reconstruction-reader.d.ts.map +1 -0
- package/dist/lib/reconstruction-reader.js +481 -0
- package/dist/lib/reconstruction-reader.js.map +1 -0
- package/dist/lib/work-install.d.ts +28 -0
- package/dist/lib/work-install.d.ts.map +1 -1
- package/dist/lib/work-install.js +80 -20
- package/dist/lib/work-install.js.map +1 -1
- package/dist/mcp-http.d.ts +7 -0
- package/dist/mcp-http.d.ts.map +1 -1
- package/dist/mcp-http.js +30 -6
- package/dist/mcp-http.js.map +1 -1
- package/dist/mcp-server.d.ts +33 -3
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +443 -52
- package/dist/mcp-server.js.map +1 -1
- package/dist/queue-artifact.d.ts +57 -0
- package/dist/queue-artifact.d.ts.map +1 -0
- package/dist/queue-artifact.js +70 -0
- package/dist/queue-artifact.js.map +1 -0
- package/dist/queue-receipt.d.ts.map +1 -1
- package/dist/queue-receipt.js +4 -3
- package/dist/queue-receipt.js.map +1 -1
- package/dist/system-preflight.d.ts.map +1 -1
- package/dist/system-preflight.js +15 -7
- package/dist/system-preflight.js.map +1 -1
- package/dist/terminal-window.d.ts.map +1 -1
- package/dist/terminal-window.js +13 -10
- package/dist/terminal-window.js.map +1 -1
- package/package.json +1 -1
- package/tui/dist/attention/attention-model.d.ts +2 -1
- package/tui/dist/attention/attention-model.d.ts.map +1 -1
- package/tui/dist/attention/attention-model.js +18 -4
- package/tui/dist/attention/attention-model.js.map +1 -1
- package/tui/dist/config/config-model.d.ts.map +1 -1
- package/tui/dist/config/config-model.js +2 -1
- package/tui/dist/config/config-model.js.map +1 -1
- package/tui/dist/daemon-client.d.ts +7 -0
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +19 -5
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/demo-data.js +2 -2
- package/tui/dist/demo-data.js.map +1 -1
- package/tui/dist/main.js +5 -1
- package/tui/dist/main.js.map +1 -1
- package/ui/dist/assets/index-BOYrLyfQ.js +623 -0
- package/ui/dist/assets/index-DqSRu4OY.css +32 -0
- package/ui/dist/index.html +2 -2
- package/ui/dist/assets/index-BFOs3ejL.css +0 -32
- package/ui/dist/assets/index-CdkFwtld.js +0 -623
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: working-with-an-openrig-team
|
|
3
|
+
description: >-
|
|
4
|
+
Use when you are a person's coding agent in an app such as Claude Code, Codex, Cursor or VS Code, connected through the
|
|
5
|
+
OpenRig MCP server, and the person wants their OpenRig team to do some work, wants to know how that work is going,
|
|
6
|
+
has a question from the team to answer, or wants to read what the team returned.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Working with an OpenRig team from your app
|
|
10
|
+
|
|
11
|
+
The person runs a team of agents with OpenRig: each agent has its own terminal, and they keep working after this chat ends.
|
|
12
|
+
You aren't one of those terminals. You're the person's front door to the team: you hand it work, follow that work, bring
|
|
13
|
+
the team's questions to the person, and bring back what it produced. The MCP server's own instructions say how its tools
|
|
14
|
+
behave; this skill is the loop around them.
|
|
15
|
+
|
|
16
|
+
## Check the connection first
|
|
17
|
+
|
|
18
|
+
- Call `rig_whoami`. It names the seat this connection acts as. Every item you create is recorded as coming from that seat,
|
|
19
|
+
and the team's questions about your work come back to it.
|
|
20
|
+
- If it has no seat, you can still hand the team work. It goes as the unknown sender `rig_whoami` names, with no return
|
|
21
|
+
address, so tell the person the `qitemId` and follow it with `rig_queue_show`. Receiving the team's questions and
|
|
22
|
+
replies, recording the person's answers and listing your own work need a seat: offer to set one (the last section).
|
|
23
|
+
- Call `rig_team` with the rig's name: it shows the team's seats, what each is for, and its lead. Work goes to the lead
|
|
24
|
+
unless the person names a seat.
|
|
25
|
+
- If `lead` is null (its `leadNote` says why), and the team has exactly one seat, send work there. Otherwise, ask the person
|
|
26
|
+
which seat should take it.
|
|
27
|
+
|
|
28
|
+
## Hand the team work
|
|
29
|
+
|
|
30
|
+
- Use `rig_queue_create` with `destination` (the lead, or the seat the person chose) and `body`. Write the body for a
|
|
31
|
+
capable colleague: the goal, why it matters, what done looks like, and where to look. Add a one-line `summary`.
|
|
32
|
+
- Tell the person the `qitemId` it returns. It's how both of you find this work again.
|
|
33
|
+
- If the call times out, check `rig_queue_show` with that same `qitemId` before trying again. If you retry, pass the same id
|
|
34
|
+
as `qitemId`. Never retry with a new one: that creates the work twice.
|
|
35
|
+
|
|
36
|
+
## Follow it
|
|
37
|
+
|
|
38
|
+
- `rig_queue_show` with the `qitemId` gives its state, its current owner and its transitions.
|
|
39
|
+
- When a seat hands the work on, the item names the next one. Follow the chain to the newest item before you report.
|
|
40
|
+
- Report what the record says. An accepted or claimed item isn't finished work, and a quiet one isn't stuck: say what you
|
|
41
|
+
saw and when it last changed.
|
|
42
|
+
- Nothing wakes this chat when the team finishes. Check again when the person asks, or when they come back.
|
|
43
|
+
|
|
44
|
+
## The team's questions
|
|
45
|
+
|
|
46
|
+
- Questions about your work come to your seat: `rig_queue_list` with `owned` lists them.
|
|
47
|
+
- Show the person the question and the team's draft, in their own words where the item gives them. Then ask for an answer.
|
|
48
|
+
- Record only what the person actually tells you. Claim the item (`rig_queue_claim`), then close it with
|
|
49
|
+
`rig_queue_update`: `state` `done`, `closureReason` `no-follow-on`, and exactly what the person typed in `resolution`,
|
|
50
|
+
nothing else: no label such as "The person's answer:", no quotation marks, and no notes, paths or summaries of your own.
|
|
51
|
+
If the person isn't there to answer, leave the item open and tell them it's waiting. Never choose an answer for them.
|
|
52
|
+
- Some questions go to the person directly, outside your seat. Those wait for them where they already answer the team,
|
|
53
|
+
such as the OpenRig TUI or Slack. You can mention that they're waiting; answering them isn't yours.
|
|
54
|
+
|
|
55
|
+
## Read the result
|
|
56
|
+
|
|
57
|
+
- When the item is `done`, its `resolution` is the answer, and its transitions hold the notes the team recorded.
|
|
58
|
+
- If it names an `evidenceRef`, read it with `rig_artifact_read`, passing the item's `qitemId`, not the path. The tool
|
|
59
|
+
reads the item's `evidenceRef` within the shared roots this connection may read. For another file in a shared root,
|
|
60
|
+
pass the root's name and `path`. If the connection can't read it, give the person the path.
|
|
61
|
+
- To ask for changes, create a new item with `revises` set to the earlier `qitemId`, so the revision stays with the
|
|
62
|
+
original work.
|
|
63
|
+
|
|
64
|
+
## Come back later
|
|
65
|
+
|
|
66
|
+
- `rig_queue_list` with `mine` lists what this seat sent or owns. Add `all` to include finished work, or `since` to see
|
|
67
|
+
what changed after a time.
|
|
68
|
+
- A new chat with the same seat reaches the same work. Items outlive conversations.
|
|
69
|
+
|
|
70
|
+
## Set it up (once, with the person)
|
|
71
|
+
|
|
72
|
+
1. OpenRig runs on this machine with a team: `rig ps` lists the person's rigs.
|
|
73
|
+
2. Pick an address for this app on one of those rigs, for example `cursor@my-team`. It's an address the queue takes items
|
|
74
|
+
for; nothing is launched for it. To tell the team what it's for, the person can add it to a roster as a hosted member
|
|
75
|
+
(`docs/reference/hosted-members.md` in the OpenRig package).
|
|
76
|
+
3. Connect the app to that address, then start a new session so the MCP server starts with it:
|
|
77
|
+
- **Claude Code:** set it as the plugin's OpenRig seat in the plugin's settings.
|
|
78
|
+
- **Codex:** run `codex mcp add openrig --env OPENRIG_SESSION_NAME=<address> -- rig mcp serve --front-door`. Codex
|
|
79
|
+
does not forward every shell environment variable to MCP servers by default, so if the team's OpenRig home isn't the
|
|
80
|
+
default, add `--env OPENRIG_HOME=<that home>` too.
|
|
81
|
+
- **Another app:** add an MCP server that runs `rig mcp serve --front-door` with `OPENRIG_SESSION_NAME` set to the
|
|
82
|
+
address, and turn the plugin's `openrig` server off, so the app runs one. In VS Code, give yours another name, such
|
|
83
|
+
as `openrig-seat`; in Cursor, disable **openrig · Plugin**. Starting the app from a shell with the variable set lasts
|
|
84
|
+
only for that launch.
|
|
85
|
+
|
|
86
|
+
## What this doesn't do
|
|
87
|
+
|
|
88
|
+
- It doesn't add a panel to the app, and nothing wakes this chat when the team finishes.
|
|
89
|
+
- Anyone using this app on this machine acts as the seat the plugin names.
|
|
90
|
+
- It reaches a team on this machine. A team hosted elsewhere needs that host's own connection.
|
|
@@ -81,6 +81,17 @@
|
|
|
81
81
|
]
|
|
82
82
|
}
|
|
83
83
|
],
|
|
84
|
+
"PermissionRequest": [
|
|
85
|
+
{
|
|
86
|
+
"hooks": [
|
|
87
|
+
{
|
|
88
|
+
"type": "command",
|
|
89
|
+
"command": "\"${OPENRIG_NODE:-node}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/scripts/activity-relay.cjs\" --from-plugin",
|
|
90
|
+
"timeout": 5
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
],
|
|
84
95
|
"PostToolBatch": [
|
|
85
96
|
{
|
|
86
97
|
"hooks": [
|
|
@@ -46,6 +46,24 @@ function firstString(...values) {
|
|
|
46
46
|
return null;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
// #2702: the conversation this event belongs to. A harness started inside a seat (a Codex helper a Claude seat runs, or
|
|
50
|
+
// a Claude a Codex seat runs) inherits the seat's environment and so posts as the seat; the daemon tells it apart by
|
|
51
|
+
// whether the transcript is the seat's runtime's own. Whether the runtime sent transcript_path is kept apart from its
|
|
52
|
+
// value, as on session identity (#1524). claudeHook is whether CLAUDE_PROJECT_DIR is set: the marker Claude Code gives
|
|
53
|
+
// its hook commands, and also the LSP, status line and MCP processes it starts. Neither Codex nor OpenRig sets it, so
|
|
54
|
+
// it's evidence that a Claude Code process ran this, not proof. Only whether it is set is sent.
|
|
55
|
+
// A Claude permission request's report keeps its fixed field list (below).
|
|
56
|
+
function conversationFields(providerPayload, env) {
|
|
57
|
+
const sessionId = firstString(providerPayload.session_id, providerPayload.sessionId);
|
|
58
|
+
const transcriptPathPresent = Object.prototype.hasOwnProperty.call(providerPayload, "transcript_path");
|
|
59
|
+
return {
|
|
60
|
+
...(sessionId ? { sessionId } : {}),
|
|
61
|
+
transcriptPathPresent,
|
|
62
|
+
...(transcriptPathPresent ? { transcriptPath: providerPayload.transcript_path } : {}),
|
|
63
|
+
claudeHook: firstString(env.CLAUDE_PROJECT_DIR) !== null,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
49
67
|
// The route this run reports by, so the daemon can count one event once per route: "plugin" for the plugin's hook
|
|
50
68
|
// (started with --from-plugin), "managed" for the settings or managed hook copy.
|
|
51
69
|
function buildOpenRigPayload(providerPayload, env = process.env, now = () => new Date(), argv = process.argv) {
|
|
@@ -63,6 +81,25 @@ function buildOpenRigPayload(providerPayload, env = process.env, now = () => new
|
|
|
63
81
|
|
|
64
82
|
if ((!sessionName && !nodeId) || !runtime || !hookEvent) return null;
|
|
65
83
|
|
|
84
|
+
if (runtime === "claude-code" && hookEvent === "PermissionRequest") {
|
|
85
|
+
// Passive observation only: discard all native tool data before transport. An absent/broken
|
|
86
|
+
// sanitizer loses detail rather than affecting approval or the existing activity hooks.
|
|
87
|
+
let descriptor = "Tool: details withheld";
|
|
88
|
+
let suggestions = { state: "unavailable", entries: [], unsupported: false, size_cut: false };
|
|
89
|
+
try {
|
|
90
|
+
descriptor = require("./permission-stop-descriptor.cjs").buildPermissionStopDescriptor(providerPayload);
|
|
91
|
+
} catch { /* Withhold details. No provider decision is ever returned. */ }
|
|
92
|
+
try {
|
|
93
|
+
suggestions = require("./permission-stop-descriptor.cjs").buildPermissionRuleSuggestions(providerPayload);
|
|
94
|
+
} catch { /* Optional rule evidence is unavailable, not an approval or a native absence claim. */ }
|
|
95
|
+
const actor = providerPayload.agent_id;
|
|
96
|
+
return { sessionName, nodeId, runtime, generation, hookEvent,
|
|
97
|
+
...(actor == null ? { hookAgentId: null }
|
|
98
|
+
: typeof actor === "string" && /^[A-Za-z0-9_-]{1,128}$/.test(actor) ? { hookAgentId: actor } : {}),
|
|
99
|
+
permissionStopDescriptor: descriptor, permissionRuleSuggestions: suggestions, occurredAt: now().toISOString(),
|
|
100
|
+
relayRoute: argv.includes("--from-plugin") ? "plugin" : "managed" };
|
|
101
|
+
}
|
|
102
|
+
|
|
66
103
|
// StopFailure has a typed error field. Never infer it from rendered error text,
|
|
67
104
|
// a tool name, or another event's subtype; those are not provider failures.
|
|
68
105
|
const subtype = runtime === "claude-code" && hookEvent === "StopFailure"
|
|
@@ -92,6 +129,7 @@ function buildOpenRigPayload(providerPayload, env = process.env, now = () => new
|
|
|
92
129
|
turnId: firstString(providerPayload.turn_id, providerPayload.turnId),
|
|
93
130
|
occurredAt: now().toISOString(),
|
|
94
131
|
relayRoute: argv.includes("--from-plugin") ? "plugin" : "managed",
|
|
132
|
+
...conversationFields(providerPayload, env),
|
|
95
133
|
};
|
|
96
134
|
}
|
|
97
135
|
|
|
@@ -200,6 +238,7 @@ function buildSessionIdentityPayload(providerPayload, env = process.env, now = (
|
|
|
200
238
|
sessionId,
|
|
201
239
|
transcriptPathPresent,
|
|
202
240
|
...(transcriptPathPresent ? { transcriptPath: providerPayload.transcript_path } : {}),
|
|
241
|
+
claudeHook: firstString(env.CLAUDE_PROJECT_DIR) !== null,
|
|
203
242
|
occurredAt: now().toISOString(),
|
|
204
243
|
};
|
|
205
244
|
}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// Constant-only permission-stop descriptor builder for untrusted provider tool payloads.
|
|
4
|
+
// Never interpolates raw input fragments, paths, URLs, arguments, environment assignments,
|
|
5
|
+
// provider reason strings, or hashes of input; every return value is a pre-defined constant
|
|
6
|
+
// ASCII string of at most 80 characters.
|
|
7
|
+
|
|
8
|
+
const MAX_DESCRIPTOR_LENGTH = 80;
|
|
9
|
+
const MAX_COMMAND_INPUT_LENGTH = 512;
|
|
10
|
+
|
|
11
|
+
const BASH_DETAILS_WITHHELD = "Bash: details withheld";
|
|
12
|
+
const TOOL_DETAILS_WITHHELD = "Tool: details withheld";
|
|
13
|
+
|
|
14
|
+
const BASH_EXECUTABLE_DESCRIPTORS = Object.freeze(
|
|
15
|
+
Object.assign(Object.create(null), {
|
|
16
|
+
git: "Bash: git [arguments hidden]",
|
|
17
|
+
npm: "Bash: npm [arguments hidden]",
|
|
18
|
+
node: "Bash: node [arguments hidden]",
|
|
19
|
+
python3: "Bash: python3 [arguments hidden]",
|
|
20
|
+
ls: "Bash: ls [arguments hidden]",
|
|
21
|
+
pwd: "Bash: pwd [arguments hidden]",
|
|
22
|
+
cat: "Bash: cat [arguments hidden]",
|
|
23
|
+
sed: "Bash: sed [arguments hidden]",
|
|
24
|
+
find: "Bash: find [arguments hidden]",
|
|
25
|
+
echo: "Bash: echo [arguments hidden]",
|
|
26
|
+
printf: "Bash: printf [arguments hidden]",
|
|
27
|
+
}),
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
const KNOWN_TOOL_DESCRIPTORS = Object.freeze(
|
|
31
|
+
Object.assign(Object.create(null), {
|
|
32
|
+
Read: "Tool: Read",
|
|
33
|
+
Write: "Tool: Write",
|
|
34
|
+
Edit: "Tool: Edit",
|
|
35
|
+
MultiEdit: "Tool: MultiEdit",
|
|
36
|
+
NotebookEdit: "Tool: NotebookEdit",
|
|
37
|
+
Glob: "Tool: Glob",
|
|
38
|
+
Grep: "Tool: Grep",
|
|
39
|
+
LS: "Tool: LS",
|
|
40
|
+
WebFetch: "Tool: WebFetch",
|
|
41
|
+
WebSearch: "Tool: WebSearch",
|
|
42
|
+
Skill: "Tool: Skill",
|
|
43
|
+
Task: "Tool: Task",
|
|
44
|
+
TodoWrite: "Tool: TodoWrite",
|
|
45
|
+
}),
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
// Rejects any character outside horizontal tab (0x09) and printable ASCII (0x20-0x7E),
|
|
49
|
+
// including newlines (\r, \n), NUL, ESC/ANSI sequences, DEL, and non-ASCII characters.
|
|
50
|
+
const DISALLOWED_CONTROL_OR_NON_ASCII = /[^\t\x20-\x7e]/;
|
|
51
|
+
|
|
52
|
+
// Rejects compound operators, pipes, backgrounding, redirections, heredocs, substitutions,
|
|
53
|
+
// expansions, subshells, brace groups, and backslash escapes anywhere in the command.
|
|
54
|
+
const DISALLOWED_SHELL_METACHARACTER = /[;&|<>(){}$`\\]/;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Check whether a value is a plain object (prototype is Object.prototype or null).
|
|
58
|
+
*
|
|
59
|
+
* @param {unknown} value
|
|
60
|
+
* @returns {value is Record<string, unknown>}
|
|
61
|
+
*/
|
|
62
|
+
function isPlainObject(value) {
|
|
63
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) return false;
|
|
64
|
+
const proto = Object.getPrototypeOf(value);
|
|
65
|
+
return proto === Object.prototype || proto === null;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Verify that quotes in the argument tail are balanced and that no unquoted shell comment
|
|
70
|
+
* starts in the argument tail.
|
|
71
|
+
*
|
|
72
|
+
* @param {string} rest
|
|
73
|
+
* @returns {boolean}
|
|
74
|
+
*/
|
|
75
|
+
function hasSafeArgumentTail(rest) {
|
|
76
|
+
let quote = "";
|
|
77
|
+
let atWordStart = true;
|
|
78
|
+
for (let i = 0; i < rest.length; i++) {
|
|
79
|
+
const ch = rest[i];
|
|
80
|
+
if (quote) {
|
|
81
|
+
if (ch === quote) quote = "";
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
if (ch === "#" && atWordStart) return false;
|
|
85
|
+
if (ch === "'" || ch === '"') {
|
|
86
|
+
quote = ch;
|
|
87
|
+
atWordStart = false;
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
atWordStart = ch === " " || ch === "\t";
|
|
91
|
+
}
|
|
92
|
+
return quote === "";
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Build a constant-only descriptor for a Bash command string.
|
|
97
|
+
* Rejects oversized inputs before scanning so prefixes of oversized strings are never accepted.
|
|
98
|
+
*
|
|
99
|
+
* @param {string} command
|
|
100
|
+
* @returns {string}
|
|
101
|
+
*/
|
|
102
|
+
function describeBashCommand(command) {
|
|
103
|
+
if (command.length === 0 || command.length > MAX_COMMAND_INPUT_LENGTH) {
|
|
104
|
+
return BASH_DETAILS_WITHHELD;
|
|
105
|
+
}
|
|
106
|
+
if (DISALLOWED_CONTROL_OR_NON_ASCII.test(command) || DISALLOWED_SHELL_METACHARACTER.test(command)) {
|
|
107
|
+
return BASH_DETAILS_WITHHELD;
|
|
108
|
+
}
|
|
109
|
+
const trimmed = command.trim();
|
|
110
|
+
if (trimmed.length === 0) {
|
|
111
|
+
return BASH_DETAILS_WITHHELD;
|
|
112
|
+
}
|
|
113
|
+
const match = /^([a-z0-9]+)(?:[ \t]+([\s\S]*))?$/.exec(trimmed);
|
|
114
|
+
if (!match) {
|
|
115
|
+
return BASH_DETAILS_WITHHELD;
|
|
116
|
+
}
|
|
117
|
+
const executable = match[1];
|
|
118
|
+
const descriptor = BASH_EXECUTABLE_DESCRIPTORS[executable];
|
|
119
|
+
if (typeof descriptor !== "string") {
|
|
120
|
+
return BASH_DETAILS_WITHHELD;
|
|
121
|
+
}
|
|
122
|
+
const rest = match[2] || "";
|
|
123
|
+
if (rest.length > 0 && !hasSafeArgumentTail(rest)) {
|
|
124
|
+
return BASH_DETAILS_WITHHELD;
|
|
125
|
+
}
|
|
126
|
+
return descriptor;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Build a bounded, constant-only permission-stop descriptor from untrusted provider tool data.
|
|
131
|
+
*
|
|
132
|
+
* @param {unknown} input
|
|
133
|
+
* @returns {string}
|
|
134
|
+
*/
|
|
135
|
+
function buildPermissionStopDescriptor(input) {
|
|
136
|
+
try {
|
|
137
|
+
if (!isPlainObject(input)) return TOOL_DETAILS_WITHHELD;
|
|
138
|
+
const toolName = input.tool_name;
|
|
139
|
+
if (typeof toolName !== "string") return TOOL_DETAILS_WITHHELD;
|
|
140
|
+
|
|
141
|
+
if (toolName === "Bash") {
|
|
142
|
+
const toolInput = input.tool_input;
|
|
143
|
+
if (!isPlainObject(toolInput) || typeof toolInput.command !== "string") {
|
|
144
|
+
return TOOL_DETAILS_WITHHELD;
|
|
145
|
+
}
|
|
146
|
+
return describeBashCommand(toolInput.command);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const knownToolDescriptor = KNOWN_TOOL_DESCRIPTORS[toolName];
|
|
150
|
+
if (typeof knownToolDescriptor === "string") {
|
|
151
|
+
const toolInput = input.tool_input;
|
|
152
|
+
if (toolInput !== undefined && !isPlainObject(toolInput)) {
|
|
153
|
+
return TOOL_DETAILS_WITHHELD;
|
|
154
|
+
}
|
|
155
|
+
return knownToolDescriptor;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return TOOL_DETAILS_WITHHELD;
|
|
159
|
+
} catch {
|
|
160
|
+
return TOOL_DETAILS_WITHHELD;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// Rule text is intentionally sensitive evidence, unlike the constant-only tool descriptor.
|
|
165
|
+
// Bounds count UTF-16 code units per string and UTF-8 bytes of the serialized envelope.
|
|
166
|
+
function buildPermissionRuleSuggestions(input) {
|
|
167
|
+
const unavailable = { state: "unavailable", entries: [], unsupported: false, size_cut: false };
|
|
168
|
+
try {
|
|
169
|
+
if (!isPlainObject(input)) return unavailable;
|
|
170
|
+
if (!Object.hasOwn(input, "permission_suggestions")) {
|
|
171
|
+
return { state: "missing", entries: [], unsupported: false, size_cut: false };
|
|
172
|
+
}
|
|
173
|
+
const evidence = { state: "present", entries: [], unsupported: false, size_cut: false };
|
|
174
|
+
const entries = input.permission_suggestions;
|
|
175
|
+
if (!Array.isArray(entries)) return { ...evidence, unsupported: true };
|
|
176
|
+
if (entries.length > 8) evidence.size_cut = true;
|
|
177
|
+
for (const entry of entries.slice(0, 8)) {
|
|
178
|
+
if (!isPlainObject(entry) || !["addRules", "replaceRules", "removeRules"].includes(entry.type)
|
|
179
|
+
|| !["allow", "deny", "ask"].includes(entry.behavior)
|
|
180
|
+
|| !["session", "localSettings", "projectSettings", "userSettings"].includes(entry.destination)
|
|
181
|
+
|| !Array.isArray(entry.rules)
|
|
182
|
+
|| Object.keys(entry).some(key => !["type", "rules", "behavior", "destination"].includes(key))) {
|
|
183
|
+
evidence.unsupported = true;
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
if (entry.rules.length > 16) { evidence.size_cut = true; continue; }
|
|
187
|
+
const rules = [];
|
|
188
|
+
let rejected = false;
|
|
189
|
+
for (const rule of entry.rules) {
|
|
190
|
+
if (!isPlainObject(rule) || typeof rule.toolName !== "string" || !rule.toolName.length
|
|
191
|
+
|| Object.keys(rule).some(key => !["toolName", "ruleContent"].includes(key))
|
|
192
|
+
|| (Object.hasOwn(rule, "ruleContent") && typeof rule.ruleContent !== "string")) {
|
|
193
|
+
evidence.unsupported = true; rejected = true; break;
|
|
194
|
+
}
|
|
195
|
+
if (rule.toolName.length > 128 || (Object.hasOwn(rule, "ruleContent") && rule.ruleContent.length > 2048)) {
|
|
196
|
+
evidence.size_cut = true; rejected = true; break;
|
|
197
|
+
}
|
|
198
|
+
rules.push({ toolName: rule.toolName,
|
|
199
|
+
...(Object.hasOwn(rule, "ruleContent") ? { ruleContent: rule.ruleContent } : {}) });
|
|
200
|
+
}
|
|
201
|
+
if (rejected) continue;
|
|
202
|
+
const supported = { type: entry.type, rules, behavior: entry.behavior, destination: entry.destination };
|
|
203
|
+
if (Buffer.byteLength(JSON.stringify({ ...evidence, entries: [...evidence.entries, supported] }), "utf8") > 16384) {
|
|
204
|
+
evidence.size_cut = true; continue;
|
|
205
|
+
}
|
|
206
|
+
evidence.entries.push(supported);
|
|
207
|
+
}
|
|
208
|
+
return evidence;
|
|
209
|
+
} catch { return unavailable; }
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
module.exports = {
|
|
213
|
+
MAX_DESCRIPTOR_LENGTH,
|
|
214
|
+
MAX_COMMAND_INPUT_LENGTH,
|
|
215
|
+
BASH_DETAILS_WITHHELD,
|
|
216
|
+
TOOL_DETAILS_WITHHELD,
|
|
217
|
+
BASH_EXECUTABLE_DESCRIPTORS,
|
|
218
|
+
KNOWN_TOOL_DESCRIPTORS,
|
|
219
|
+
buildPermissionStopDescriptor,
|
|
220
|
+
buildPermissionRuleSuggestions,
|
|
221
|
+
};
|
|
@@ -157,7 +157,10 @@ function readQueueWhoami(timeout = lookupTimeout()) {
|
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
-
|
|
160
|
+
// A lookup that timed out (a slow daemon) says nothing about this seat's work: the trace shows it as an advisory gap (#2581).
|
|
161
|
+
if (result.error) {
|
|
162
|
+
return { unknown: `queue whoami failed: ${result.error.message}`, timedOut: result.error.code === "ETIMEDOUT" };
|
|
163
|
+
}
|
|
161
164
|
if (result.status !== 0 || !result.stdout || !result.stdout.trim()) {
|
|
162
165
|
return { unknown: `queue whoami exited ${result.status ?? "without a status"} with no answer` };
|
|
163
166
|
}
|
|
@@ -243,6 +246,7 @@ function renderTrace() {
|
|
|
243
246
|
"--trees", trees,
|
|
244
247
|
"--depth", process.env.OPENRIG_REFOCUS_DEPTH || "light",
|
|
245
248
|
"--check",
|
|
249
|
+
"--unresolved-work-advisory",
|
|
246
250
|
];
|
|
247
251
|
if (process.env.OPENRIG_REFOCUS_TOPOLOGY_NODE) {
|
|
248
252
|
args.push("--topology-start", process.env.OPENRIG_REFOCUS_TOPOLOGY_NODE);
|
|
@@ -277,9 +281,19 @@ function renderTrace() {
|
|
|
277
281
|
if (work.start && (explicitStart || !evidence)) args.push("--work-start", work.start);
|
|
278
282
|
else if (evidence) args.push("--work-candidates", "-");
|
|
279
283
|
else if (work.basis) args.push("--work-basis", work.basis);
|
|
280
|
-
else if (work.unknown)
|
|
284
|
+
else if (work.unknown) {
|
|
285
|
+
args.push("--work-unknown", work.unknown);
|
|
286
|
+
if (work.timedOut) args.push("--work-unknown-timed-out");
|
|
287
|
+
}
|
|
281
288
|
// With an explicit start, the evidence supplies only held and next work.
|
|
282
289
|
if (explicitStart && evidence) args.push("--work-candidates", "-");
|
|
290
|
+
// Catalogued project roots the daemon knows, so work in a project outside workspace.root
|
|
291
|
+
// traces to its own root instead of failing as "outside configured root" (#2693).
|
|
292
|
+
if (trees !== "topology") {
|
|
293
|
+
for (const workRoot of whoami?.answer?.workRoots ?? []) {
|
|
294
|
+
if (typeof workRoot === "string" && workRoot) args.push("--work-root", workRoot);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
283
297
|
const env = traceEnv(trees);
|
|
284
298
|
const timeout = lookupTimeout(contentReserveMs());
|
|
285
299
|
const result = timeout <= MIN_LOOKUP_MS
|
|
@@ -87,6 +87,7 @@ These ship in the OpenRig repo and reach a seat when its profile selects them. T
|
|
|
87
87
|
- **watchdog** — monitoring or recovering a seat (health, restore, stuck state).
|
|
88
88
|
- **session-source-fork** — forking a session's source/context.
|
|
89
89
|
- **context-engineering** — designing context systems. Provisional and non-normative: current OpenRig skills, explicit rulings, and measured practice outrank it on any conflict.
|
|
90
|
+
- **working-with-an-openrig-team** — a person's own agent in an app (Claude Code, Codex, Cursor, VS Code) works with their team through `rig mcp serve`: hand work over, follow it, answer the team's questions, read results. The `openrig` app plugin loads it; a seat helping someone connect an app can open it with `rig context get skills/core/working-with-an-openrig-team/SKILL.md`.
|
|
90
91
|
|
|
91
92
|
Pod handbooks (load when you're in that pod):
|
|
92
93
|
- **orchestration-team** — you're orchestrating a rig: dispatching, monitoring, keeping the loop moving.
|
|
@@ -101,6 +101,10 @@ when the command exits 0. A non-zero exit means no row was confirmed, even when
|
|
|
101
101
|
indeterminate answer repeats the request ID so you can reconcile by it. Don't merge stderr into stdout and keep the
|
|
102
102
|
first `qitem-…` you find there; a refused create prints its request ID first, too.
|
|
103
103
|
|
|
104
|
+
A timed-out write can still land late. To retry a `create` or `rig stream emit` safely, repeat it unchanged with the
|
|
105
|
+
same `--id` (create's request ID, or the emit's own), since the daemon keeps one row or item per ID; an emit sent
|
|
106
|
+
without `--id` has no ID to reuse, so look for it with `rig stream list --source <seat>` before emitting again.
|
|
107
|
+
|
|
104
108
|
Read back (`rig queue show <id> --full --json`, or `rig queue transitions <id>`) when the answer doesn't show what you
|
|
105
109
|
need, for example:
|
|
106
110
|
|
|
@@ -1624,10 +1628,11 @@ rig mcp token list [--json]
|
|
|
1624
1628
|
rig mcp token revoke <name>
|
|
1625
1629
|
```
|
|
1626
1630
|
|
|
1627
|
-
The
|
|
1628
|
-
grant offers the work tools; the workspace tools with `--workspace` or `--owner`; and the owner tools only
|
|
1629
|
-
`--owner`, which offers every tool.
|
|
1630
|
-
|
|
1631
|
+
The 39 shipped tools fall into four groups. Over stdio, and over HTTP with no grants, every tool but the person tools is
|
|
1632
|
+
offered. An HTTP grant offers the work tools; the workspace tools with `--workspace` or `--owner`; and the owner tools only
|
|
1633
|
+
with `--owner`, which offers every tool but the person tools. Only a grant service's grant that names its person offers
|
|
1634
|
+
the person tools.
|
|
1635
|
+
- **Work (20):** orientation, communication and the durable work loop.
|
|
1631
1636
|
- `rig_whoami`: the seat the server acts as (rig, pod, peers, edges) and the `caller`: authenticated (an HTTP
|
|
1632
1637
|
credential, with its principal) or declared (`OPENRIG_SESSION_NAME` where the server was configured, which nothing
|
|
1633
1638
|
verifies).
|
|
@@ -1645,8 +1650,12 @@ grant offers the work tools; the workspace tools with `--workspace` or `--owner`
|
|
|
1645
1650
|
- `rig_artifact_read`: a finished item's artifact (its `evidenceRef`) or a named file, through the daemon's shared
|
|
1646
1651
|
roots (`OPENRIG_FILES_ALLOWLIST`), in windows (`offset`, `nextOffset`). Outside those roots it answers unavailable
|
|
1647
1652
|
rather than reading a local path.
|
|
1653
|
+
- `rig_environment_export`: copies a bound worker's JSON artifact to the host, checks its bytes, schema and context, and
|
|
1654
|
+
adds a receipt to its existing work. It doesn't close the work, stop compute or restore native history, and it needs
|
|
1655
|
+
an authenticated HTTP work connection.
|
|
1648
1656
|
- `rig_human_decision_room`, then `rig_queue_decide`: on your own pending ask to a person, read the decision room of
|
|
1649
|
-
the mode they have on, and record a decision you made for them inside it.
|
|
1657
|
+
the mode they have on, and record a decision you made for them inside it. Only the person tools record a person's own
|
|
1658
|
+
answer, and only for the person a grant names.
|
|
1650
1659
|
- **Workspace (4):** `rig_slices`, `rig_mission`, `rig_context_pack`, and `rig_context_get` (one context file or
|
|
1651
1660
|
section, as `rig context get` reads it).
|
|
1652
1661
|
- **Owner (13):** `rig_up`, `rig_down`, `rig_snapshot_create`, `rig_snapshot_list`, `rig_discover`, `rig_bind`,
|
|
@@ -1654,16 +1663,23 @@ grant offers the work tools; the workspace tools with `--workspace` or `--owner`
|
|
|
1654
1663
|
of event metadata), and:
|
|
1655
1664
|
- `rig_restore`, which starts a restore and returns its attempt;
|
|
1656
1665
|
- `rig_restore_status`, that attempt's receipt.
|
|
1666
|
+
- **Person (2):** `rig_question_list` and `rig_question_answer`, offered only on a grant service's grant that names the
|
|
1667
|
+
person who owns the connection (`person.entity_id`, with the `question` pair). They list the team's questions waiting on
|
|
1668
|
+
that person, as Steering shows them, and record that person's own answer, given through the connection: `answer` for an
|
|
1669
|
+
ask, which returns their words to the asker, and `resolve` for a park. `docs/reference/hosted-members.md` has the
|
|
1670
|
+
contract.
|
|
1657
1671
|
|
|
1658
1672
|
**Results:**
|
|
1659
1673
|
- A structured result comes beside the text from the queue tools, `rig_whoami`, `rig_team`, the four workspace tools,
|
|
1660
|
-
`rig_artifact_read`, `rig_human_decision_room` and
|
|
1674
|
+
`rig_artifact_read`, `rig_human_decision_room`, `rig_restore_status` and the person tools. The other tools answer in
|
|
1675
|
+
text.
|
|
1661
1676
|
- Every failure carries the same structured shape: `ok: false`, a `code` and a `message`.
|
|
1662
1677
|
|
|
1663
1678
|
**Identity:**
|
|
1664
1679
|
- **Over stdio, and over HTTP with no grants:** the server acts as one seat, the `OPENRIG_SESSION_NAME` in its
|
|
1665
|
-
environment. Every request carries that identity, so no tool call names a sender. Without it,
|
|
1666
|
-
|
|
1680
|
+
environment. Every request carries that identity, so no tool call names a sender. Without it, messages, new tasks and
|
|
1681
|
+
chat go through as an unknown sender (`unknown-mcp-` and eight hex digits, one per `rig mcp serve` process) with a
|
|
1682
|
+
note at the top, and claim, update, hand off, unclaim and decide are refused with `actor_required`.
|
|
1667
1683
|
- **Over HTTP with grants:** each caller acts as its own grant's seat.
|
|
1668
1684
|
|
|
1669
1685
|
### Over HTTP: an assistant that can't start a local process
|
|
@@ -52,6 +52,11 @@ the complete node and notes bodies. The script resolves `topology.root` and `wor
|
|
|
52
52
|
`rig config get`. When a known current node must be supplied, pass `--work-start` or
|
|
53
53
|
`--topology-start` with its literal absolute path in the same plain command. Do not
|
|
54
54
|
substitute the project root for a mission or slice node and claim that mission was traced.
|
|
55
|
+
A catalogued project's root can sit outside `workspace.root`. The refocus hook passes the daemon's
|
|
56
|
+
catalogued project roots as `--work-root`, and the work trace ascends to the deepest known root that
|
|
57
|
+
contains the node. Run by hand, pass the project root with `--work-root` (repeatable) or
|
|
58
|
+
`OPENRIG_REFOCUS_WORK_ROOT`. Don't point `OPENRIG_WORKSPACE_ROOT` at the project instead: the CLI reads
|
|
59
|
+
that variable as `workspace.root` too.
|
|
55
60
|
|
|
56
61
|
The trace walks the topology and work trees. For the project's own declared context (intent, context files,
|
|
57
62
|
skills), `rig context work-install` lists it; read what the next action needs.
|
|
@@ -42,6 +42,25 @@ def configured_root(key, env_key):
|
|
|
42
42
|
return Path(value).expanduser().resolve() if value else None
|
|
43
43
|
|
|
44
44
|
|
|
45
|
+
def extra_work_roots(cli_roots):
|
|
46
|
+
"""Roots beyond workspace.root that the work trace may ascend to: a catalogued project
|
|
47
|
+
can live outside workspace.root (#2693). Refocus-only, unlike OPENRIG_WORKSPACE_ROOT,
|
|
48
|
+
which the CLI config store also reads as workspace.root."""
|
|
49
|
+
values = list(cli_roots or [])
|
|
50
|
+
values += [part for part in (os.environ.get("OPENRIG_REFOCUS_WORK_ROOT") or "").split(os.pathsep) if part]
|
|
51
|
+
return [Path(value).expanduser().resolve() for value in values]
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def work_root_for(start, root, extra_roots):
|
|
55
|
+
"""The deepest known root that contains start; workspace.root when none does, so a node
|
|
56
|
+
outside every known root still reports the same gap."""
|
|
57
|
+
if start is None or not extra_roots:
|
|
58
|
+
return root
|
|
59
|
+
start = Path(start).expanduser().resolve()
|
|
60
|
+
containing = [candidate for candidate in (root, *extra_roots) if under_root(start, candidate)]
|
|
61
|
+
return max(containing, key=lambda candidate: len(candidate.parts)) if containing else root
|
|
62
|
+
|
|
63
|
+
|
|
45
64
|
def under_root(path, root):
|
|
46
65
|
try:
|
|
47
66
|
path.relative_to(root)
|
|
@@ -385,7 +404,7 @@ def render_held_and_next(evidence):
|
|
|
385
404
|
return "\n".join(output)
|
|
386
405
|
|
|
387
406
|
|
|
388
|
-
def render_candidates(evidence, root, depth, failures):
|
|
407
|
+
def render_candidates(evidence, root, depth, failures, extra_roots=()):
|
|
389
408
|
"""The work section from labelled queue evidence. One direct, resolved tag is shown as the
|
|
390
409
|
work with its source; anything less certain lists every candidate and asks the agent."""
|
|
391
410
|
candidates = evidence.get("candidates") or []
|
|
@@ -396,7 +415,8 @@ def render_candidates(evidence, root, depth, failures):
|
|
|
396
415
|
notes = [f"WORK FROM QUEUE EVIDENCE — {only.get('source')}. If this is stale, say what you are actually doing."]
|
|
397
416
|
if not only.get("slice"):
|
|
398
417
|
notes.append("no slice named")
|
|
399
|
-
|
|
418
|
+
start = Path(only["workNodePath"])
|
|
419
|
+
traced = render_work(start, work_root_for(start, root, extra_roots), depth, failures, packet=True)
|
|
400
420
|
head, _, rest = traced.partition("\n")
|
|
401
421
|
return "\n".join([head, *notes, rest])
|
|
402
422
|
|
|
@@ -503,8 +523,11 @@ def main():
|
|
|
503
523
|
parser.add_argument("--depth", choices=("light", "full"), default=os.environ.get("OPENRIG_REFOCUS_DEPTH", "light"))
|
|
504
524
|
parser.add_argument("--topology-start")
|
|
505
525
|
parser.add_argument("--work-start")
|
|
526
|
+
parser.add_argument("--work-root", action="append", default=[], help="an extra root the work trace may ascend to, for a catalogued project outside workspace.root; repeatable (also OPENRIG_REFOCUS_WORK_ROOT, separated by the OS path separator)")
|
|
506
527
|
parser.add_argument("--work-basis", help="the daemon's reason no current work node was named")
|
|
507
528
|
parser.add_argument("--work-unknown", help="why the current work node could not be read")
|
|
529
|
+
parser.add_argument("--unresolved-work-advisory", action="store_true", help="show unresolved typed work as an advisory with broad orientation")
|
|
530
|
+
parser.add_argument("--work-unknown-timed-out", action="store_true", help="the --work-unknown lookup timed out (a slow daemon); with --unresolved-work-advisory it is an advisory, not a failure")
|
|
508
531
|
parser.add_argument("--check", action="store_true", help="exit nonzero on trace or notes resolution failure; rendered text is unchanged")
|
|
509
532
|
parser.add_argument("--packet", action="store_true", help="carry duties and notes as text by section, with old-notes cues")
|
|
510
533
|
parser.add_argument("--work-candidates", help="labelled work evidence as JSON (a path, or - for stdin), from `rig queue whoami --work-candidates`")
|
|
@@ -532,6 +555,7 @@ def main():
|
|
|
532
555
|
else:
|
|
533
556
|
# Precedence: an explicit start wins; then the hook's daemon answer (basis or unknown);
|
|
534
557
|
# only a standalone run with neither falls back to inferring from the working directory.
|
|
558
|
+
extra_roots = extra_work_roots(args.work_root)
|
|
535
559
|
explicit = args.work_start or os.environ.get("OPENRIG_REFOCUS_WORK_NODE")
|
|
536
560
|
evidence = None
|
|
537
561
|
if args.work_candidates:
|
|
@@ -539,17 +563,28 @@ def main():
|
|
|
539
563
|
if error:
|
|
540
564
|
sections.append(gap(f"## WORK TRACE\nTRACE GAP — {error}"))
|
|
541
565
|
if explicit:
|
|
542
|
-
sections.append(render_work(Path(explicit), root, args.depth, failures, packet=args.packet))
|
|
566
|
+
sections.append(render_work(Path(explicit), work_root_for(explicit, root, extra_roots), args.depth, failures, packet=args.packet))
|
|
543
567
|
elif evidence is not None:
|
|
544
|
-
sections.append(render_candidates(evidence, root, args.depth, failures))
|
|
568
|
+
sections.append(render_candidates(evidence, root, args.depth, failures, extra_roots))
|
|
545
569
|
elif args.work_candidates:
|
|
546
570
|
pass # the unreadable-evidence gap above is the answer; never fall back to the root
|
|
547
571
|
elif args.work_basis == NO_CURRENT_BATON_BASIS:
|
|
548
572
|
sections.append(render_work(root, root, args.depth, failures, packet=args.packet, fallback=(
|
|
549
573
|
f"no current typed baton ({args.work_basis}). Showing the project-level chain from the work root: "
|
|
550
574
|
"a broad orientation, not evidence of a current mission")))
|
|
575
|
+
elif args.unresolved_work_advisory and args.work_basis and args.work_basis.startswith("typed work did not resolve: "):
|
|
576
|
+
sections.append(f"## WORK TRACE\nTRACE GAP — no single current work node: {args.work_basis}")
|
|
577
|
+
sections.append(render_work(root, root, args.depth, failures, packet=args.packet, fallback=(
|
|
578
|
+
"typed work could not be resolved. Showing the project-level chain from the work root: "
|
|
579
|
+
"a broad orientation, not evidence of a current mission")))
|
|
551
580
|
elif args.work_basis:
|
|
552
581
|
sections.append(gap(f"## WORK TRACE\nTRACE GAP — no single current work node: {args.work_basis}"))
|
|
582
|
+
elif args.unresolved_work_advisory and args.work_unknown and args.work_unknown_timed_out:
|
|
583
|
+
# A lookup that timed out says nothing about this seat's work: name it, orient broadly, and don't fail --check.
|
|
584
|
+
sections.append(f"## WORK TRACE\nTRACE GAP — current work node UNKNOWN: {args.work_unknown}")
|
|
585
|
+
sections.append(render_work(root, root, args.depth, failures, packet=args.packet, fallback=(
|
|
586
|
+
"the work lookup timed out, which says nothing about this seat's work. Showing the project-level chain "
|
|
587
|
+
"from the work root: a broad orientation, not evidence of a current mission")))
|
|
553
588
|
elif args.work_unknown:
|
|
554
589
|
sections.append(gap(f"## WORK TRACE\nTRACE GAP — current work node UNKNOWN: {args.work_unknown}"))
|
|
555
590
|
else:
|