@openrig/cli 0.7.8 → 0.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/daemon/assets/openshell/README.md +4 -2
- package/daemon/assets/openshell/guest.py +13 -0
- package/daemon/assets/openshell/preset.yaml +1 -0
- package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +12 -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 +99 -29
- package/daemon/context-packs/reference/getting-started.md +30 -8
- package/daemon/context-packs/reference/instance-layout.md +11 -0
- package/daemon/context-packs/reference/manifest.yaml +1 -1
- package/daemon/context-packs/reference/rig-spec.md +61 -2
- package/daemon/context-packs/reference/whats-new.md +198 -140
- package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
- package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
- package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-upgrade/SKILL.md +4 -3
- package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-upgrade/scripts/backup-sqlite.mjs +90 -14
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
- package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
- package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/seat-continuity-and-handover/SKILL.md +12 -3
- package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
- package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
- package/daemon/context-packs/world-example/manifest.yaml +1 -1
- package/daemon/context-packs/world-public/manifest.yaml +1 -1
- package/daemon/dist/adapters/claude-code-adapter.d.ts +6 -0
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +14 -68
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +13 -4
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +29 -0
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +118 -12
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.js +3 -0
- package/daemon/dist/adapters/community-harness-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/omp-runtime-adapter.d.ts +5 -0
- package/daemon/dist/adapters/omp-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/omp-runtime-adapter.js +4 -0
- package/daemon/dist/adapters/omp-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/openshell-driver.d.ts.map +1 -1
- package/daemon/dist/adapters/openshell-driver.js +8 -2
- package/daemon/dist/adapters/openshell-driver.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +39 -5
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +97 -19
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts +22 -0
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.js +39 -8
- package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/preflight-exec.d.ts +2 -0
- package/daemon/dist/adapters/preflight-exec.d.ts.map +1 -1
- package/daemon/dist/adapters/preflight-exec.js +3 -1
- package/daemon/dist/adapters/preflight-exec.js.map +1 -1
- package/daemon/dist/adapters/stub-runtime-adapter.d.ts +5 -0
- package/daemon/dist/adapters/stub-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/stub-runtime-adapter.js +7 -4
- package/daemon/dist/adapters/stub-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/tmux-exec.d.ts +3 -0
- package/daemon/dist/adapters/tmux-exec.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-exec.js +35 -1
- package/daemon/dist/adapters/tmux-exec.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +3 -0
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +28 -3
- 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 +8 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/146_node_startup_guidance_file.d.ts +6 -0
- package/daemon/dist/db/migrations/146_node_startup_guidance_file.d.ts.map +1 -0
- package/daemon/dist/db/migrations/146_node_startup_guidance_file.js +8 -0
- package/daemon/dist/db/migrations/146_node_startup_guidance_file.js.map +1 -0
- package/daemon/dist/db/migrations/147_managed_block_writes.d.ts +9 -0
- package/daemon/dist/db/migrations/147_managed_block_writes.d.ts.map +1 -0
- package/daemon/dist/db/migrations/147_managed_block_writes.js +19 -0
- package/daemon/dist/db/migrations/147_managed_block_writes.js.map +1 -0
- package/daemon/dist/db/migrations/148_outbox_dispatched_index.d.ts +8 -0
- package/daemon/dist/db/migrations/148_outbox_dispatched_index.d.ts.map +1 -0
- package/daemon/dist/db/migrations/148_outbox_dispatched_index.js +12 -0
- package/daemon/dist/db/migrations/148_outbox_dispatched_index.js.map +1 -0
- package/daemon/dist/db/migrations/149_stream_intake_cursor.d.ts +4 -0
- package/daemon/dist/db/migrations/149_stream_intake_cursor.d.ts.map +1 -0
- package/daemon/dist/db/migrations/149_stream_intake_cursor.js +14 -0
- package/daemon/dist/db/migrations/149_stream_intake_cursor.js.map +1 -0
- package/daemon/dist/domain/activity-taxonomy.d.ts +3 -0
- package/daemon/dist/domain/activity-taxonomy.d.ts.map +1 -1
- package/daemon/dist/domain/activity-taxonomy.js.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.js +3 -1
- package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
- package/daemon/dist/domain/bundle-archive.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-archive.js +40 -4
- package/daemon/dist/domain/bundle-archive.js.map +1 -1
- package/daemon/dist/domain/bundle-behaviour.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-behaviour.js +7 -0
- package/daemon/dist/domain/bundle-behaviour.js.map +1 -1
- package/daemon/dist/domain/bundle-content-routing.d.ts +1 -0
- package/daemon/dist/domain/bundle-content-routing.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-content-routing.js +3 -1
- package/daemon/dist/domain/bundle-content-routing.js.map +1 -1
- package/daemon/dist/domain/bundle-source-resolver.d.ts +2 -0
- package/daemon/dist/domain/bundle-source-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-source-resolver.js +4 -4
- package/daemon/dist/domain/bundle-source-resolver.js.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +14 -9
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/claude-owned-settings.d.ts +19 -0
- package/daemon/dist/domain/claude-owned-settings.d.ts.map +1 -0
- package/daemon/dist/domain/claude-owned-settings.js +160 -0
- package/daemon/dist/domain/claude-owned-settings.js.map +1 -0
- package/daemon/dist/domain/claude-plugin-channels.d.ts +2 -0
- package/daemon/dist/domain/claude-plugin-channels.d.ts.map +1 -0
- package/daemon/dist/domain/claude-plugin-channels.js +12 -0
- package/daemon/dist/domain/claude-plugin-channels.js.map +1 -0
- package/daemon/dist/domain/claude-theme-menu.d.ts +5 -0
- package/daemon/dist/domain/claude-theme-menu.d.ts.map +1 -0
- package/daemon/dist/domain/claude-theme-menu.js +43 -0
- package/daemon/dist/domain/claude-theme-menu.js.map +1 -0
- package/daemon/dist/domain/codex-pane-patterns.d.ts +1 -0
- package/daemon/dist/domain/codex-pane-patterns.d.ts.map +1 -1
- package/daemon/dist/domain/codex-pane-patterns.js +2 -0
- package/daemon/dist/domain/codex-pane-patterns.js.map +1 -1
- package/daemon/dist/domain/composer-prompts.d.ts +2 -0
- package/daemon/dist/domain/composer-prompts.d.ts.map +1 -1
- package/daemon/dist/domain/composer-prompts.js +3 -2
- package/daemon/dist/domain/composer-prompts.js.map +1 -1
- package/daemon/dist/domain/desired-claude-activity-hooks.d.ts +10 -6
- package/daemon/dist/domain/desired-claude-activity-hooks.d.ts.map +1 -1
- package/daemon/dist/domain/desired-claude-activity-hooks.js +69 -13
- 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 +8 -2
- package/daemon/dist/domain/draft-aware-delivery.js.map +1 -1
- package/daemon/dist/domain/environment-lifecycle.d.ts +7 -0
- package/daemon/dist/domain/environment-lifecycle.d.ts.map +1 -1
- package/daemon/dist/domain/environment-lifecycle.js +15 -2
- package/daemon/dist/domain/environment-lifecycle.js.map +1 -1
- package/daemon/dist/domain/environment-startup.d.ts +3 -1
- package/daemon/dist/domain/environment-startup.d.ts.map +1 -1
- package/daemon/dist/domain/environment-startup.js +31 -5
- package/daemon/dist/domain/environment-startup.js.map +1 -1
- package/daemon/dist/domain/gateway/human-readiness.d.ts +2 -1
- package/daemon/dist/domain/gateway/human-readiness.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/human-readiness.js +6 -0
- package/daemon/dist/domain/gateway/human-readiness.js.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.d.ts +2 -1
- package/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.js +9 -7
- package/daemon/dist/domain/gateway/human-registry.js.map +1 -1
- package/daemon/dist/domain/gateway/participants.d.ts +26 -0
- package/daemon/dist/domain/gateway/participants.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/participants.js +15 -0
- package/daemon/dist/domain/gateway/participants.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.js +21 -5
- package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.d.ts +3 -0
- package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.js +4 -3
- package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts +3 -2
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.js +17 -6
- package/daemon/dist/domain/gateway/slack/queue-access.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/recovery-budget.d.ts +1 -0
- package/daemon/dist/domain/gateway/slack/recovery-budget.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/recovery-budget.js +1 -0
- package/daemon/dist/domain/gateway/slack/recovery-budget.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/settled-asks.d.ts +37 -0
- package/daemon/dist/domain/gateway/slack/settled-asks.d.ts.map +1 -0
- package/daemon/dist/domain/gateway/slack/settled-asks.js +276 -0
- package/daemon/dist/domain/gateway/slack/settled-asks.js.map +1 -0
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts +32 -0
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.js +40 -2
- package/daemon/dist/domain/gateway/slack/slack-api.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js +30 -6
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
- package/daemon/dist/domain/human-questions.d.ts +3 -1
- package/daemon/dist/domain/human-questions.d.ts.map +1 -1
- package/daemon/dist/domain/human-questions.js.map +1 -1
- package/daemon/dist/domain/kernel-boot-tracker.d.ts +3 -2
- package/daemon/dist/domain/kernel-boot-tracker.d.ts.map +1 -1
- package/daemon/dist/domain/kernel-boot-tracker.js +2 -1
- package/daemon/dist/domain/kernel-boot-tracker.js.map +1 -1
- package/daemon/dist/domain/kernel-boot.d.ts +11 -6
- package/daemon/dist/domain/kernel-boot.d.ts.map +1 -1
- package/daemon/dist/domain/kernel-boot.js +27 -5
- package/daemon/dist/domain/kernel-boot.js.map +1 -1
- package/daemon/dist/domain/kernel-hook-review.d.ts +3 -1
- package/daemon/dist/domain/kernel-hook-review.d.ts.map +1 -1
- package/daemon/dist/domain/kernel-hook-review.js +12 -3
- package/daemon/dist/domain/kernel-hook-review.js.map +1 -1
- package/daemon/dist/domain/managed-block-records.d.ts +54 -0
- package/daemon/dist/domain/managed-block-records.d.ts.map +1 -0
- package/daemon/dist/domain/managed-block-records.js +130 -0
- package/daemon/dist/domain/managed-block-records.js.map +1 -0
- package/daemon/dist/domain/managed-blocks.d.ts +14 -0
- package/daemon/dist/domain/managed-blocks.d.ts.map +1 -1
- package/daemon/dist/domain/managed-blocks.js +24 -4
- package/daemon/dist/domain/managed-blocks.js.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts +26 -10
- package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js +98 -26
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
- package/daemon/dist/domain/native-process-lineage.d.ts +2 -1
- package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-lineage.js +57 -5
- package/daemon/dist/domain/native-process-lineage.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts +1 -0
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +24 -2
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/outbox-handler.d.ts +5 -0
- package/daemon/dist/domain/outbox-handler.d.ts.map +1 -1
- package/daemon/dist/domain/outbox-handler.js +28 -0
- package/daemon/dist/domain/outbox-handler.js.map +1 -1
- package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/profile-resolver.js +7 -1
- package/daemon/dist/domain/profile-resolver.js.map +1 -1
- package/daemon/dist/domain/queue-recovery.d.ts +1 -1
- package/daemon/dist/domain/queue-recovery.d.ts.map +1 -1
- package/daemon/dist/domain/queue-recovery.js +6 -2
- package/daemon/dist/domain/queue-recovery.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +32 -7
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +165 -50
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +28 -4
- package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
- package/daemon/dist/domain/queue-transition-log.d.ts +2 -0
- package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
- package/daemon/dist/domain/queue-transition-log.js +9 -0
- package/daemon/dist/domain/queue-transition-log.js.map +1 -1
- package/daemon/dist/domain/restore-guidance.d.ts +70 -7
- package/daemon/dist/domain/restore-guidance.d.ts.map +1 -1
- package/daemon/dist/domain/restore-guidance.js +181 -18
- package/daemon/dist/domain/restore-guidance.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +5 -0
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +115 -17
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/rig-repository.d.ts +4 -0
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +20 -1
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rig-teardown.d.ts +18 -0
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +73 -17
- package/daemon/dist/domain/rig-teardown.js.map +1 -1
- package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-codec.js +2 -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 +6 -1
- package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +7 -4
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +19 -7
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts +4 -0
- package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.js +35 -1
- package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
- package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +32 -5
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/runner-permissions.d.ts +15 -0
- package/daemon/dist/domain/runner-permissions.d.ts.map +1 -1
- package/daemon/dist/domain/runner-permissions.js +74 -9
- package/daemon/dist/domain/runner-permissions.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +19 -1
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-adapter.js.map +1 -1
- package/daemon/dist/domain/runtime-switch-materials.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-switch-materials.js +3 -0
- package/daemon/dist/domain/runtime-switch-materials.js.map +1 -1
- package/daemon/dist/domain/runtime-verifier.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-verifier.js +9 -4
- package/daemon/dist/domain/runtime-verifier.js.map +1 -1
- package/daemon/dist/domain/scope/scope-audit.d.ts +1 -1
- package/daemon/dist/domain/scope/scope-audit.d.ts.map +1 -1
- package/daemon/dist/domain/scope/scope-audit.js.map +1 -1
- package/daemon/dist/domain/scope/types.d.ts +3 -0
- package/daemon/dist/domain/scope/types.d.ts.map +1 -1
- package/daemon/dist/domain/scope/types.js.map +1 -1
- package/daemon/dist/domain/seat-activity-service.d.ts +7 -0
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-activity-service.js +47 -7
- package/daemon/dist/domain/seat-activity-service.js.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.js +8 -1
- package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.d.ts +22 -4
- package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.js +80 -11
- package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts +23 -10
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +119 -3
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-launch-additions.d.ts +6 -0
- package/daemon/dist/domain/seat-launch-additions.d.ts.map +1 -1
- package/daemon/dist/domain/seat-launch-additions.js +41 -11
- package/daemon/dist/domain/seat-launch-additions.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +3 -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 +17 -3
- package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -1
- package/daemon/dist/domain/seat-skill-storage.d.ts +2 -2
- package/daemon/dist/domain/seat-skill-storage.js +2 -2
- package/daemon/dist/domain/seat-structural-activity-service.d.ts +15 -5
- package/daemon/dist/domain/seat-structural-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-structural-activity-service.js +21 -7
- package/daemon/dist/domain/seat-structural-activity-service.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +7 -0
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +145 -31
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/snapshot-capture.d.ts.map +1 -1
- package/daemon/dist/domain/snapshot-capture.js +1 -0
- package/daemon/dist/domain/snapshot-capture.js.map +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.d.ts +2 -0
- package/daemon/dist/domain/spec-library-workflow-scanner.d.ts.map +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.js +5 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts +1 -0
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +74 -7
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/stream-intake.d.ts +51 -0
- package/daemon/dist/domain/stream-intake.d.ts.map +1 -0
- package/daemon/dist/domain/stream-intake.js +438 -0
- package/daemon/dist/domain/stream-intake.js.map +1 -0
- package/daemon/dist/domain/successor-session-launcher.d.ts +2 -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/herdr-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.js +4 -3
- package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-viewer.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-viewer.js +8 -4
- package/daemon/dist/domain/terminal/herdr-viewer.js.map +1 -1
- package/daemon/dist/domain/terminal/login-shell.d.ts +10 -0
- package/daemon/dist/domain/terminal/login-shell.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/login-shell.js +37 -0
- package/daemon/dist/domain/terminal/login-shell.js.map +1 -0
- package/daemon/dist/domain/terminal/rex-layout.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/rex-layout.js +2 -1
- package/daemon/dist/domain/terminal/rex-layout.js.map +1 -1
- package/daemon/dist/domain/terminal/tile-attach.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/tile-attach.js +15 -5
- package/daemon/dist/domain/terminal/tile-attach.js.map +1 -1
- package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-store.js +11 -5
- package/daemon/dist/domain/transcript-store.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +16 -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-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 +14 -0
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/watchdog-delivery-receipts.d.ts +11 -0
- package/daemon/dist/domain/watchdog-delivery-receipts.d.ts.map +1 -0
- package/daemon/dist/domain/watchdog-delivery-receipts.js +134 -0
- package/daemon/dist/domain/watchdog-delivery-receipts.js.map +1 -0
- package/daemon/dist/domain/watchdog-delivery.d.ts +6 -1
- package/daemon/dist/domain/watchdog-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-delivery.js +10 -6
- package/daemon/dist/domain/watchdog-delivery.js.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts +19 -2
- package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.js +49 -22
- package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
- package/daemon/dist/domain/workflow-projector.js +3 -3
- package/daemon/dist/domain/workflow-projector.js.map +1 -1
- package/daemon/dist/domain/workflow-runtime.js +3 -3
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/domain/working-liveness.d.ts +66 -0
- package/daemon/dist/domain/working-liveness.d.ts.map +1 -0
- package/daemon/dist/domain/working-liveness.js +94 -0
- package/daemon/dist/domain/working-liveness.js.map +1 -0
- package/daemon/dist/domain/workspace/frontmatter-validator.js +4 -2
- package/daemon/dist/domain/workspace/frontmatter-validator.js.map +1 -1
- package/daemon/dist/index.d.ts +1 -1
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +3 -0
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/lib/pane-envelope.d.ts.map +1 -1
- package/daemon/dist/lib/pane-envelope.js +9 -3
- package/daemon/dist/lib/pane-envelope.js.map +1 -1
- package/daemon/dist/middleware/auth-bearer-token.js +2 -2
- package/daemon/dist/middleware/auth-bearer-token.js.map +1 -1
- package/daemon/dist/routes/activity.d.ts +2 -0
- package/daemon/dist/routes/activity.d.ts.map +1 -1
- package/daemon/dist/routes/activity.js +60 -5
- package/daemon/dist/routes/activity.js.map +1 -1
- package/daemon/dist/routes/attention.d.ts.map +1 -1
- package/daemon/dist/routes/attention.js +17 -5
- package/daemon/dist/routes/attention.js.map +1 -1
- package/daemon/dist/routes/bundles.js +3 -1
- package/daemon/dist/routes/bundles.js.map +1 -1
- package/daemon/dist/routes/gateway.d.ts +6 -0
- package/daemon/dist/routes/gateway.d.ts.map +1 -1
- package/daemon/dist/routes/gateway.js +39 -0
- package/daemon/dist/routes/gateway.js.map +1 -1
- package/daemon/dist/routes/hosts.d.ts.map +1 -1
- package/daemon/dist/routes/hosts.js +26 -4
- package/daemon/dist/routes/hosts.js.map +1 -1
- package/daemon/dist/routes/mission-control.d.ts.map +1 -1
- package/daemon/dist/routes/mission-control.js +6 -1
- package/daemon/dist/routes/mission-control.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +21 -2
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/scope-audit.d.ts.map +1 -1
- package/daemon/dist/routes/scope-audit.js +30 -0
- package/daemon/dist/routes/scope-audit.js.map +1 -1
- package/daemon/dist/routes/seat.d.ts.map +1 -1
- package/daemon/dist/routes/seat.js +3 -3
- package/daemon/dist/routes/seat.js.map +1 -1
- package/daemon/dist/routes/spec-library.d.ts.map +1 -1
- package/daemon/dist/routes/spec-library.js +60 -5
- package/daemon/dist/routes/spec-library.js.map +1 -1
- package/daemon/dist/routes/startup.js +2 -2
- package/daemon/dist/routes/startup.js.map +1 -1
- package/daemon/dist/routes/transport.d.ts.map +1 -1
- package/daemon/dist/routes/transport.js +8 -3
- package/daemon/dist/routes/transport.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 +1 -0
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +30 -12
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/docs/reference/agent-spec.md +1 -1
- package/daemon/docs/reference/agent-startup-guide.md +115 -3
- package/daemon/docs/reference/agent-state-taxonomy.md +23 -2
- package/daemon/docs/reference/author-contracts.md +6 -6
- package/daemon/docs/reference/checked-seat-stop.md +12 -1
- package/daemon/docs/reference/community-harness-examples/dsh/README.md +32 -7
- package/daemon/docs/reference/community-harness-examples/dsh/dsh.yaml +2 -2
- package/daemon/docs/reference/community-harness-examples/dsh/openrig-dsh-runner.mjs +101 -18
- package/daemon/docs/reference/daemon-http-clients.md +203 -0
- package/daemon/docs/reference/execution-platform-contract.md +1 -1
- package/daemon/docs/reference/gateway-participants.md +29 -17
- package/daemon/docs/reference/getting-started.md +30 -8
- package/daemon/docs/reference/harness-runner-contract.md +93 -19
- package/daemon/docs/reference/hosted-members.md +32 -0
- package/daemon/docs/reference/instance-layout.md +11 -0
- package/daemon/docs/reference/keeping-a-watch.md +22 -0
- package/daemon/docs/reference/pi-tool-selection-recovery.md +2 -1
- package/daemon/docs/reference/quickstart.md +9 -4
- package/daemon/docs/reference/rig-bundle.md +2 -2
- package/daemon/docs/reference/rig-spec.md +61 -2
- package/daemon/docs/reference/runner-conformance/README.md +5 -3
- package/daemon/docs/reference/runner-conformance/check-runner.mjs +136 -16
- package/daemon/docs/reference/runner-conformance/fake-acp-agent.mjs +10 -3
- package/daemon/docs/reference/sdlc-conventions.md +22 -3
- package/daemon/docs/reference/seat-delivery.md +31 -6
- package/daemon/docs/reference/slack-app-setup.md +55 -5
- package/daemon/docs/reference/terminal-sessions.md +15 -5
- package/daemon/docs/reference/whats-new.md +198 -140
- package/daemon/specs/agents/shared/skills/core/openrig-upgrade/SKILL.md +4 -3
- package/daemon/specs/agents/shared/skills/core/openrig-upgrade/scripts/backup-sqlite.mjs +90 -14
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +2 -1
- package/daemon/specs/rigs/launch/kernel/agents/queue/worker/guidance/role.md +1 -1
- package/dist/atomic-text-write.d.ts +2 -0
- package/dist/atomic-text-write.d.ts.map +1 -1
- package/dist/atomic-text-write.js +17 -0
- package/dist/atomic-text-write.js.map +1 -1
- package/dist/build-info.js +3 -3
- package/dist/commands/broadcast.js +2 -1
- package/dist/commands/broadcast.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +1 -0
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +1 -0
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/doctor.d.ts +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +48 -6
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +10 -0
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/env.js +9 -3
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/environment.d.ts.map +1 -1
- package/dist/commands/environment.js +5 -2
- package/dist/commands/environment.js.map +1 -1
- package/dist/commands/export.d.ts +2 -0
- package/dist/commands/export.d.ts.map +1 -1
- package/dist/commands/export.js +26 -5
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/gateway.js +15 -11
- package/dist/commands/gateway.js.map +1 -1
- package/dist/commands/host.d.ts +13 -6
- package/dist/commands/host.d.ts.map +1 -1
- package/dist/commands/host.js +35 -8
- package/dist/commands/host.js.map +1 -1
- package/dist/commands/project-jev.js +1 -1
- package/dist/commands/project-jev.js.map +1 -1
- package/dist/commands/provider.d.ts.map +1 -1
- package/dist/commands/provider.js +10 -5
- package/dist/commands/provider.js.map +1 -1
- package/dist/commands/ps.d.ts +2 -0
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +12 -3
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts +1 -0
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +38 -4
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/scope.d.ts.map +1 -1
- package/dist/commands/scope.js +36 -2
- package/dist/commands/scope.js.map +1 -1
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +31 -4
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +46 -16
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/slack.d.ts.map +1 -1
- package/dist/commands/slack.js +5 -0
- package/dist/commands/slack.js.map +1 -1
- package/dist/commands/specs.d.ts +1 -1
- package/dist/commands/specs.d.ts.map +1 -1
- package/dist/commands/specs.js +44 -10
- package/dist/commands/specs.js.map +1 -1
- package/dist/commands/stream.d.ts.map +1 -1
- package/dist/commands/stream.js +6 -1
- package/dist/commands/stream.js.map +1 -1
- package/dist/commands/topology-default-agent.js +1 -1
- package/dist/commands/topology-default-agent.js.map +1 -1
- package/dist/commands/walk.d.ts.map +1 -1
- package/dist/commands/walk.js +27 -10
- package/dist/commands/walk.js.map +1 -1
- package/dist/commands/workspace.d.ts.map +1 -1
- package/dist/commands/workspace.js +8 -1
- package/dist/commands/workspace.js.map +1 -1
- package/dist/config-store.d.ts +7 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +23 -2
- package/dist/config-store.js.map +1 -1
- package/dist/lib/scope/progress-edit.d.ts.map +1 -1
- package/dist/lib/scope/progress-edit.js +37 -7
- package/dist/lib/scope/progress-edit.js.map +1 -1
- package/dist/lib/scope/scope-audit.d.ts +1 -1
- package/dist/lib/scope/scope-audit.d.ts.map +1 -1
- package/dist/lib/scope/scope-audit.js.map +1 -1
- package/dist/lib/scope/scope-fs.d.ts +3 -0
- package/dist/lib/scope/scope-fs.d.ts.map +1 -1
- package/dist/lib/scope/scope-fs.js +39 -53
- package/dist/lib/scope/scope-fs.js.map +1 -1
- package/dist/lib/scope/types.d.ts +3 -0
- package/dist/lib/scope/types.d.ts.map +1 -1
- package/dist/lib/scope/types.js.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +53 -16
- package/dist/mcp-server.js.map +1 -1
- package/dist/seat-launch-additions-lines.d.ts +2 -0
- package/dist/seat-launch-additions-lines.d.ts.map +1 -1
- package/dist/seat-launch-additions-lines.js +1 -0
- package/dist/seat-launch-additions-lines.js.map +1 -1
- package/package.json +1 -1
- package/tui/dist/attention/attention-model.d.ts +3 -2
- package/tui/dist/attention/attention-model.d.ts.map +1 -1
- package/tui/dist/attention/attention-model.js +7 -4
- package/tui/dist/attention/attention-model.js.map +1 -1
- package/tui/dist/daemon-client.d.ts +4 -4
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +6 -5
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +10 -4
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/pulse/pulse-model.d.ts +1 -1
- package/tui/dist/pulse/pulse-model.d.ts.map +1 -1
- package/tui/dist/pulse/pulse-model.js +6 -17
- package/tui/dist/pulse/pulse-model.js.map +1 -1
- package/tui/dist/render.js +1 -1
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/theme.d.ts.map +1 -1
- package/tui/dist/theme.js +7 -2
- package/tui/dist/theme.js.map +1 -1
- package/tui/dist/time.d.ts +2 -0
- package/tui/dist/time.d.ts.map +1 -1
- package/tui/dist/time.js +5 -0
- package/tui/dist/time.js.map +1 -1
- package/tui/dist/types.d.ts +2 -3
- package/tui/dist/types.d.ts.map +1 -1
- package/ui/dist/assets/index-BFOs3ejL.css +32 -0
- package/ui/dist/assets/{index-Ch6UxNld.js → index-CdkFwtld.js} +81 -81
- package/ui/dist/index.html +2 -2
- package/ui/dist/assets/index-DNU3XZr_.css +0 -32
|
@@ -107,6 +107,38 @@ OpenRig doesn't observe a hosted member between its calls, so it never reads idl
|
|
|
107
107
|
|
|
108
108
|
`rig mcp token revoke grok` refuses its next request. The rows it worked, and their answers, stay.
|
|
109
109
|
|
|
110
|
+
## Assistants connected through a grant service
|
|
111
|
+
|
|
112
|
+
With `rig mcp serve --http --grant-service <url>`, an outside service answers each connection's key with its grant
|
|
113
|
+
(`openrig.grant/v1`): the seat it acts as, its rigs, and the object/action pairs it may use. Each pair offers one tool,
|
|
114
|
+
and nothing else is offered:
|
|
115
|
+
|
|
116
|
+
| Pair | Tool |
|
|
117
|
+
|---|---|
|
|
118
|
+
| `queue`/`create`, `queue`/`show`, `queue`/`list` | `rig_queue_create`, `rig_queue_show`, `rig_queue_list` |
|
|
119
|
+
| `queue`/`claim`, `queue`/`update` | `rig_queue_claim`, `rig_queue_update` |
|
|
120
|
+
| `team`/`list` | `rig_team` |
|
|
121
|
+
| `artifact`/`read` | `rig_artifact_read` |
|
|
122
|
+
|
|
123
|
+
- **One seat per connected assistant:** the service gives each connection its own seat and keeps it across that
|
|
124
|
+
connection's reconnects. The seat must be one of the rig's nodes; a node created without a launch is enough. The caller
|
|
125
|
+
is exactly that seat.
|
|
126
|
+
- **What it reaches:**
|
|
127
|
+
- It hands work to its rigs' other seats, never to a person or another host's seat.
|
|
128
|
+
- It reads the items it sent and the items addressed to it from those seats, never the team's internal items.
|
|
129
|
+
- With `queue`/`claim` and `queue`/`update`, it claims and closes only items addressed to its own seat that it can read,
|
|
130
|
+
and waits (blocked) only on an item it names and can read. Its answers hide what reading the item hides.
|
|
131
|
+
- **Two assistants together:** a grant with `team`/`list` sees its rigs' seats with `rig_team`, and may address and hear from
|
|
132
|
+
another connected assistant's seat. A grant without it never reaches a seat in the service's caller form
|
|
133
|
+
(`cus-<id>-<connection>@<rig>`), so an existing connection keeps the reach it had.
|
|
134
|
+
- **Messages are items:** a message is an item the receiver reads and closes, and a reply is an item back to its sender.
|
|
135
|
+
- **What the sender can tell, from the item it reads:**
|
|
136
|
+
- **Queued:** the item exists and is `pending` with no claim.
|
|
137
|
+
- **Picked up:** the receiver's claim (`in-progress`).
|
|
138
|
+
- **Answered:** closed `done`, with the answer in `resolution`.
|
|
139
|
+
- Reading or listing an item records nothing, and nothing wakes an assistant, so an item stays queued until its receiver
|
|
140
|
+
claims it.
|
|
141
|
+
|
|
110
142
|
## Limits today
|
|
111
143
|
|
|
112
144
|
- **Webhook triggers only:** OpenRig rings a webhook. Email and other triggers aren't supported yet. A member without a trigger
|
|
@@ -110,6 +110,17 @@ limitation: use the live spec-library commands to determine where a spec is
|
|
|
110
110
|
served from, and do not infer convergence merely because the canonical
|
|
111
111
|
directory exists.
|
|
112
112
|
|
|
113
|
+
The spec library scans the built-in specs, `$OPENRIG_HOME/specs` and, when
|
|
114
|
+
present, that legacy library. At any depth below them it skips directories
|
|
115
|
+
named `.git`, `.worktrees`, `node_modules`, `dist`, `build`, `.turbo` and
|
|
116
|
+
`.next`, which usually hold build output or dependencies (`SKIP_DIRS` in
|
|
117
|
+
`packages/daemon/src/domain/spec-library-service.ts`). A spec inside one of
|
|
118
|
+
them, such as `specs/build/rig.yaml`, isn't listed, and nothing reports that it
|
|
119
|
+
was skipped. To list it, rename its directory and run `rig specs sync`.
|
|
120
|
+
`rig specs add <directory>` copies a directory under its own name, so adding a
|
|
121
|
+
directory named `build` doesn't help. `rig up <path-to-rig.yaml>` still launches
|
|
122
|
+
a spec by its path, without the library.
|
|
123
|
+
|
|
113
124
|
Config updates publish a complete replacement file atomically where directory
|
|
114
125
|
permissions and the filesystem allow it. On POSIX systems, replacement preserves
|
|
115
126
|
the existing owner, group, and read/write/execute permission bits. If creating or
|
|
@@ -107,6 +107,28 @@ rig queue create --destination <entityId>@external --human-intent update \
|
|
|
107
107
|
- **`posted` means the connector posted it, not that they read it.** Don't say they saw it.
|
|
108
108
|
- **If delivery fails or is indeterminate,** inspect that task before anything else. Never resend blindly.
|
|
109
109
|
|
|
110
|
+
## If the timer cannot reach its recipient
|
|
111
|
+
|
|
112
|
+
A `periodic-reminder` occurrence that definitely fails before input remains owed. The watchdog
|
|
113
|
+
retries through its existing loop, using `queue.wake_retry_interval_seconds` and
|
|
114
|
+
`queue.wake_retry_cap` (by default, three retries five minutes apart). A failed attempt does not
|
|
115
|
+
advance the reminder to its next regular cycle. A confirmed send advances the normal interval;
|
|
116
|
+
recovery does not replay every elapsed cycle.
|
|
117
|
+
|
|
118
|
+
`rig watchdog show <jobId> --json` includes the failed attempt, its retained outbox IDs, retry
|
|
119
|
+
time and next action. If input may have reached the recipient, that occurrence ends unconfirmed
|
|
120
|
+
and is not automatically sent again. Inspect the recipient and exact outbox record before any
|
|
121
|
+
manual replay. A recurring reminder keeps its next normal cycle under a new occurrence identity. A confirmed receipt survives a daemon restart, so
|
|
122
|
+
finishing its accounting does not type the same occurrence twice.
|
|
123
|
+
|
|
124
|
+
Exhausted retries end only the failed occurrence, with its cause and next action; a recurring
|
|
125
|
+
reminder keeps its next normal cycle. A permanent transport failure leaves a terminal job:
|
|
126
|
+
correct the destination and register a replacement reminder. A one-shot park timer records its
|
|
127
|
+
failed or unconfirmed wake on the parked row before it ends. A retryable failure is recorded
|
|
128
|
+
there while the timer stays armed. Deliberately held
|
|
129
|
+
input keeps its existing retained-message custody. Condition watches and parked-owner policy
|
|
130
|
+
behavior are unchanged. This does not replay failed occurrences recorded by older versions.
|
|
131
|
+
|
|
110
132
|
## "What are you watching for me?"
|
|
111
133
|
|
|
112
134
|
List **every active state**, not just set-aside ones. A watch being checked can be in progress, and a new one can be
|
|
@@ -25,7 +25,8 @@ that restores nothing is not itself evidence of accidental loss.
|
|
|
25
25
|
|
|
26
26
|
## Choose the interface the seat actually has
|
|
27
27
|
|
|
28
|
-
Pi 1.4.0 includes an opt-in selector at
|
|
28
|
+
Pi 1.4.0 includes an opt-in selector at
|
|
29
|
+
`packages/coding-agent/examples/extensions/tools.ts` in the Pi repository. Its
|
|
29
30
|
`/tools` command remembers selection per branch and needs Pi's own TUI. Use it
|
|
30
31
|
where that extension and native TUI are available. **Do not send `/tools` to an
|
|
31
32
|
agent OpenRig drives over RPC**: that interface cannot operate the selector.
|
|
@@ -17,7 +17,7 @@ npx skills add https://github.com/mvschwarz/openrig/tree/<release-tag>/skills/ri
|
|
|
17
17
|
npx skills add https://github.com/mvschwarz/openrig/tree/<release-tag>/skills/rigs --skill rigs --agent codex
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
For a new install, use the latest release's tag, for example `v0.7.
|
|
20
|
+
For a new install, use the latest release's tag, for example `v0.7.9`. If OpenRig is already installed, use the tag
|
|
21
21
|
that matches `rig --version`, or upgrade first. If the command fails with `npx: command not found`, Node.js isn't
|
|
22
22
|
installed or isn't on your PATH yet (see [What you need](#what-you-need)). Then type `/rigs` in Claude Code, or `$rigs` in Codex, and say what
|
|
23
23
|
you want built.
|
|
@@ -90,7 +90,8 @@ Use `codex` or `both` in place of `claude` to match the coding agents you use. A
|
|
|
90
90
|
- it adds an OpenRig block to `~/.tmux.conf` (mouse support and longer scrollback).
|
|
91
91
|
|
|
92
92
|
It doesn't start anything. It ends with a summary of what's done and what still needs you. A missing sign-in shows
|
|
93
|
-
there: run `claude auth login` or `codex login`, then carry on.
|
|
93
|
+
there: run `claude auth login` or `codex login`, then carry on. Setup also tries to record the selected providers
|
|
94
|
+
for a new kernel's first boot; its summary warns if it could not save the choice.
|
|
94
95
|
|
|
95
96
|
### 3. Start OpenRig
|
|
96
97
|
|
|
@@ -100,12 +101,16 @@ rig status
|
|
|
100
101
|
rig ps --nodes --rig kernel
|
|
101
102
|
```
|
|
102
103
|
|
|
103
|
-
|
|
104
|
+
On the kernel's first boot, the daemon uses the providers selected by `rig setup --providers` that are signed in.
|
|
105
|
+
If no provider choice was recorded, it considers every signed-in provider. An existing kernel keeps its seats;
|
|
106
|
+
changing the setup choice does not replace them. An `OPENRIG_PROVIDER_SELECTED` value in the daemon's environment
|
|
107
|
+
takes precedence over the saved choice.
|
|
104
108
|
|
|
105
109
|
**What starting OpenRig changes, for the coding agents you use** (paths are the usual defaults):
|
|
106
110
|
- **For Codex:** hooks and trust in `~/.codex/config.toml`, when OpenRig or a Codex agent starts.
|
|
107
111
|
- **For Claude Code:** workspace trust in `~/.claude.json`, and activity hooks in the project's
|
|
108
|
-
`.claude/settings.local.json`, plus a status line unless you already have your own.
|
|
112
|
+
`.claude/settings.local.json`, plus a status line unless you already have your own. `rig down` takes the hooks and
|
|
113
|
+
status line back out once no Claude seat uses that directory.
|
|
109
114
|
- **For both:** small discovery skills in `~/.claude/skills` and `~/.agents/skills`.
|
|
110
115
|
- **Kernel access:** by default the kernel gets broader permissions than a project team gets by default. On Codex
|
|
111
116
|
that's full access with no approval prompts. On Claude Code, its file tools, web fetches and operational commands,
|
|
@@ -91,10 +91,10 @@ my-rig.rigbundle.sha256 — "a1b2c3d4..." (64-char hex SHA-256)
|
|
|
91
91
|
The packer produces deterministic output:
|
|
92
92
|
- Files are sorted alphabetically
|
|
93
93
|
- A fixed mtime is used (`2026-01-01T00:00:00Z`)
|
|
94
|
-
- Portable mode
|
|
94
|
+
- Portable mode omits machine-specific owner metadata; file mode bits can be retained
|
|
95
95
|
- Maximum gzip compression (level 9)
|
|
96
96
|
|
|
97
|
-
Identical staged bytes (including manifest timestamps and provenance) produce the same archive hash. Use the package digest to compare packaged file content independently of manifest metadata.
|
|
97
|
+
Identical staged bytes and file modes (including identical manifest timestamps and provenance) produce the same archive hash. A mode change can change the archive hash even when the file contents are unchanged. Use the package digest to compare packaged file content independently of manifest metadata and file modes.
|
|
98
98
|
|
|
99
99
|
---
|
|
100
100
|
|
|
@@ -180,7 +180,7 @@ edges:
|
|
|
180
180
|
| `non_interruptive` | boolean | no | — | Pod-aware rig launch-warning default. With full-bypass Claude/Codex seats, true accepts or hides supported harness warnings using launch flags. Explicit CLI choices override this field; this field overrides the machine default. It does not grant permissions, change native settings files, or bypass login. |
|
|
181
181
|
| `permission_policy` | string | no | — | Permission policy attached to the rig. Either a built-in (`builtin:locked`, `builtin:standard`, `builtin:open`, `builtin:yolo`, `builtin:auto`) or a safe relative path to a custom policy file (resolved from this spec's directory; no `..`, no absolute, no empty segments, each segment `[A-Za-z0-9][A-Za-z0-9._-]*`), or `none`, a recorded choice of the floor. Absent uses the default floor with the scoped team launch allowances described below. A bare built-in name such as `yolo` is refused ("use 'builtin:yolo'"), and so is an explicit `null`. A custom file that is missing, unreadable or invalid isn't a validation error: it resolves to the floor, and preflight warns. A member may set its own `permission_policy` (not on a terminal member), which takes precedence over the rig-level one; there is no pod level. See "Attaching a permission policy" below. |
|
|
182
182
|
| `env` | map | no | — | Launch environment for every seat in the rig: `NAME: value` pairs. A member's own `env` overrides it name by name. Names match `^[A-Z_][A-Z0-9_]*$`, names starting `OPENRIG_` are reserved, and values must be non-empty strings (quote numbers and booleans). Values are not secret. See "Launch environment" below. |
|
|
183
|
-
| `managed_blocks` | map | no | `CLAUDE.md` | File that receives OpenRig's managed instruction blocks for Claude Code members. Only the `claude-code` key is accepted, with `CLAUDE.md` or `CLAUDE.local.md`. Codex, Pi and OMP members use `AGENTS.md
|
|
183
|
+
| `managed_blocks` | map | no | `CLAUDE.md` | File that receives OpenRig's managed instruction blocks for Claude Code members. Only the `claude-code` key is accepted, with `CLAUDE.md` or `CLAUDE.local.md`. Codex, Pi and OMP members use `AGENTS.md`, except that a fresh Pi seat normally uses its own agent folder's `AGENTS.md` and a fresh Codex 0.164.0+ seat normally gets launch developer instructions; a link, a conflicting or unreadable Codex config layer, or a resume keeps the repository file. See [Codex guidance at launch](agent-startup-guide.md#codex-guidance-at-launch) and [Runtime Differences](agent-startup-guide.md#runtime-differences). See "Choosing the Claude instruction file" below. |
|
|
184
184
|
| `workspace` | object | no | — | The rig's workspace: `workspace_root` (required), `repos[]` of `{name, path, kind}` with `kind` one of `user`, `project`, `knowledge`, `lab` or `delivery` and unique names, an optional `default_repo` naming one of them, and an optional `knowledge_root`. Relative repo paths resolve against `workspace_root`. |
|
|
185
185
|
| `docs` | Doc[] | no | — | Documentation files that should travel with the rig. Included in rig bundles. Each entry has a `path` field (safe relative path). The engine does not consume these — they are for humans and agents setting up the environment before launch. |
|
|
186
186
|
| `startup` | StartupBlock | no | — | Rig-level startup files and actions. Applied to all members via the startup layering model. |
|
|
@@ -755,6 +755,7 @@ directory's `CLAUDE.md`, including blocks written by other rigs.
|
|
|
755
755
|
| `agent_file` | string | no | — | Claude members only. A Claude agent definition (a `.md` file with `name` in its frontmatter) for this seat. It's copied into the seat's own storage and launched as `--agent openrig:<name>`. A path beside the spec: no `..`, not absolute. |
|
|
756
756
|
| `append_system_prompt_file` | string | no | — | Claude members only. A prompt file appended to Claude's system prompt for this seat. It's copied into the seat's own storage and passed as `--append-system-prompt-file`. A path beside the spec. |
|
|
757
757
|
| `plugin_dirs` | list | no | — | Claude members only. Claude plugin folders for this seat, each copied into the seat's own storage and loaded through `CLAUDE_CODE_PLUGIN_DIRS`. Paths beside the spec. Each is copied under its folder name, so two folders with the same name are refused; an empty list is none. A missing file or folder fails that seat's launch by name. `rig bundle create` carries all three; `rig export` names a seat whose additions it doesn't carry. |
|
|
758
|
+
| `plugin_channels` | list | no | — | Claude members only. Plugin channels this agent registers for, as `plugin:<name>@<marketplace>` entries, passed as one `--channels` on every launch; see [Claude plugin channels](#claude-plugin-channels-runtime-claude-code). |
|
|
758
759
|
| `role` | string | no | — | The seat's role, letters, digits, `_`, `.` and `-`. Not valid on terminal members. |
|
|
759
760
|
| `restore_policy` | string | no | the AgentSpec's | Restore behavior. One of: `resume_if_possible`, `relaunch_fresh`, `checkpoint_only`. The default comes from the AgentSpec's `defaults.lifecycle` (else `resume_if_possible`) as narrowed by its profile; a member value may only narrow it further, in that order. |
|
|
760
761
|
| `compaction_strategy` | string | no | — | `default-compaction`, `managed-compaction`, `handover` or `apprentice-handover`; `harness_native` and `pod_continuity` are accepted as deprecated aliases, and `custom_prompt` is refused. `managed-compaction` and `apprentice-handover` create their jobs only for `claude-code` seats; see [Codex compaction and sizing](agent-startup-guide.md#codex-compaction-and-sizing). |
|
|
@@ -810,6 +811,52 @@ OpenRig keeps the requested opt-out flags, so startup and resume remain subject
|
|
|
810
811
|
to that native refusal; it does not fall back to loading servers. Use a host
|
|
811
812
|
without that managed configuration, or omit the opt-out to use the managed set.
|
|
812
813
|
|
|
814
|
+
### Claude plugin channels (`runtime: claude-code`)
|
|
815
|
+
|
|
816
|
+
Set `plugin_channels` on a Claude member to register that agent for channel
|
|
817
|
+
notifications (messages a plugin's MCP server pushes into the session):
|
|
818
|
+
|
|
819
|
+
```yaml
|
|
820
|
+
members:
|
|
821
|
+
- id: support
|
|
822
|
+
agent_ref: local:agents/support
|
|
823
|
+
profile: default
|
|
824
|
+
runtime: claude-code
|
|
825
|
+
cwd: .
|
|
826
|
+
plugin_channels:
|
|
827
|
+
- plugin:example-channel@example-marketplace
|
|
828
|
+
```
|
|
829
|
+
|
|
830
|
+
OpenRig passes `--channels plugin:example-channel@example-marketplace` to this
|
|
831
|
+
agent's Claude on every launch, resume, fork, restore and handover. Several
|
|
832
|
+
entries follow one `--channels`, space-separated, and OpenRig's own session
|
|
833
|
+
options come after them. Claude Code 2.1.316 hides `--channels` from
|
|
834
|
+
`claude --help`, so it isn't listed there. An agent without the field gets no
|
|
835
|
+
`--channels`, and nothing is added for other agents or other runtimes; there is
|
|
836
|
+
no rig-wide or environment default.
|
|
837
|
+
|
|
838
|
+
Each entry is `plugin:<name>@<marketplace>`, both names made of letters, digits,
|
|
839
|
+
`.`, `_` and `-`, starting with a letter or digit. `server:` entries and Claude's
|
|
840
|
+
`--dangerously-load-development-channels` aren't supported. Combining a non-empty
|
|
841
|
+
channel list with `claude_mcp: none` produces a validation warning: that setting
|
|
842
|
+
starts Claude without MCP servers (plugin servers included), so no channel could
|
|
843
|
+
register. OpenRig keeps both settings and launches the member normally. Remove
|
|
844
|
+
`claude_mcp: none` to use the channels, or remove `plugin_channels` to keep the MCP
|
|
845
|
+
opt-out. OpenRig doesn't install plugins or marketplaces, or change the settings
|
|
846
|
+
that admit a channel: whether each channel registers is Claude's decision (the plugin installed, and
|
|
847
|
+
admitted by your organisation's channel settings or Claude's approved list).
|
|
848
|
+
|
|
849
|
+
Selecting a channel for one agent doesn't isolate what the plugin shares with
|
|
850
|
+
other agents. A token or other credential the plugin keeps in its own
|
|
851
|
+
configuration is the same for every agent that loads that plugin.
|
|
852
|
+
|
|
853
|
+
The selection is saved with the seat's other launch additions when the seat
|
|
854
|
+
starts from the spec, and starting it from a spec without the field removes it.
|
|
855
|
+
`rig seat launch --plan` and `rig skill loadout --seat` list it, a fork keeps it,
|
|
856
|
+
and `rig bundle create` and `rig export` carry it in the member; a bundle's
|
|
857
|
+
before-install view names each channel as a need. A running Claude process is
|
|
858
|
+
unaffected.
|
|
859
|
+
|
|
813
860
|
### Claude Advisor (`runtime: claude-code`)
|
|
814
861
|
|
|
815
862
|
Set `advisor` independently of the primary `model`:
|
|
@@ -1030,7 +1077,7 @@ file; missing optional files do not trigger that warning.
|
|
|
1030
1077
|
| Hint | Behavior |
|
|
1031
1078
|
|------|----------|
|
|
1032
1079
|
| `auto` | System chooses based on file type and context. |
|
|
1033
|
-
| `guidance_merge` | Merged as a managed block into the runtime's guidance file: for Claude, the `managed_blocks` file (`CLAUDE.md` or `CLAUDE.local.md`); for Codex, Pi and OMP, `AGENTS.md
|
|
1080
|
+
| `guidance_merge` | Merged as a managed block into the runtime's guidance file: for Claude, the `managed_blocks` file (`CLAUDE.md` or `CLAUDE.local.md`); for Codex, Pi and OMP, `AGENTS.md`, except that a fresh Pi seat normally uses its own agent folder's and a fresh Codex 0.164.0+ seat normally gets launch developer instructions (the conditions are in [Codex guidance at launch](agent-startup-guide.md#codex-guidance-at-launch) and [Runtime Differences](agent-startup-guide.md#runtime-differences)). Delivered before harness boot. |
|
|
1034
1081
|
| `skill_install` | Installed as a skill in the runtime's skill directory. Delivered before harness boot. |
|
|
1035
1082
|
| `send_text` | Sent as text to the agent's terminal after the harness is ready. Requires the agent TUI to be active. |
|
|
1036
1083
|
|
|
@@ -1274,3 +1321,15 @@ These are the built-in specs shipped with OpenRig. Read them as worked examples.
|
|
|
1274
1321
|
Also shipped, in the same tree: `launch/kernel`, OpenRig's own team, which starts automatically. `first-project` is
|
|
1275
1322
|
starter's old name and still resolves to it. `workshop`, the four-agent middle team, is a rig bundle rather than a
|
|
1276
1323
|
built-in. List the built-ins with `rig specs ls --kind rig`.
|
|
1324
|
+
|
|
1325
|
+
To omit built-in rigs, agents and workflows from the shared spec inventory, run
|
|
1326
|
+
`rig config set specs.builtins_visible false`. This changes the CLI, TUI and other
|
|
1327
|
+
consumers of the library listing; user specs remain visible. Use
|
|
1328
|
+
`rig specs ls --include-builtins` to list them deliberately, and set the value
|
|
1329
|
+
back to `true` to restore the default. Explicit `show`, `preview`, and launch
|
|
1330
|
+
lookups can still find hidden built-ins. When built-ins are hidden and a user
|
|
1331
|
+
spec has the same name, the user spec wins the name lookup; use the built-in's
|
|
1332
|
+
ID from `rig specs ls --include-builtins --json` to select it. With built-ins visible,
|
|
1333
|
+
same-name matches remain ambiguous. This is an inventory preference, not an
|
|
1334
|
+
access-control boundary; other endpoints and on-disk files can still expose the
|
|
1335
|
+
built-ins.
|
|
@@ -18,7 +18,7 @@ node check-runner.mjs --runner 'my-runner --agent-command {agent}' --name my-har
|
|
|
18
18
|
- **`--wait-ms 20000`** waits longer for each step (default 8000), for a runner whose agent takes a while to start. The check's shorter settling times, and the fake agent's own delays and holds, grow in proportion.
|
|
19
19
|
- **`--pass-env NAME`** passes one more variable through. Otherwise the runner gets only `PATH`, `HOME`, `USER`,
|
|
20
20
|
`SHELL`, `LANG` and `TMPDIR`, plus the OpenRig variables.
|
|
21
|
-
- **The exit status** is 0 when nothing fails, 1 when a case fails, and 2 for a usage or setup problem. An advisory result (7c) never changes it.
|
|
21
|
+
- **The exit status** is 0 when nothing fails, 1 when a case fails, and 2 for a usage or setup problem. An advisory result (4c, 7c) never changes it.
|
|
22
22
|
|
|
23
23
|
In an installed OpenRig, the check is at `$(npm root -g)/@openrig/cli/daemon/docs/reference/runner-conformance/`.
|
|
24
24
|
|
|
@@ -51,11 +51,13 @@ In an installed OpenRig, the check is at `$(npm root -g)/@openrig/cli/daemon/doc
|
|
|
51
51
|
| 1b | 3, 4 | A handshake that fails at `initialize` or `session/new` (an error or an exit) writes no conversation in a launch record, and posts no accepted prompt or idle report |
|
|
52
52
|
| 2 | 5, 6 | One pasted block becomes exactly one `session/prompt`, byte for byte. A line reading `/abort` inside a block isn't control. A block sent mid-turn waits for the next turn. A block that is exactly `/abort`, or Ctrl-C outside a paste, sends one `session/cancel`. `Stop/cancelled` is posted only when the agent itself returns `cancelled` |
|
|
53
53
|
| 3 | 4 | `UserPromptSubmit/accepted` with a `turnId`, then `Stop/end_turn`. Every post carries the contract's fields, the hook token, this seat's identity and a rising `sequence`. `livenessSeconds`, when given, is from 1 to 3600 |
|
|
54
|
+
| 3b | 4 | **Optional, from 0.7.9; skipped when the runner sends no beat.** In a long, quiet turn, each `active/liveness` beat names the accepted turn, `sequence` rises with the runner's own `occurredAt` across every post, beats come more often than every `livenessSeconds` ÷ 2, and none follows the turn's `Stop`. While a person is asked, no beat is posted; after the answer, `active/permission_resolved` names the turn and the ask, before any beat. A permit at submit opens no ask, so the quiet turn's beats go on |
|
|
54
55
|
| 4 | 7 | When no one can be asked, the request is permitted: an OpenRig without the answered path (404) at once, and one the runner can't reach, each get the agent's `allow_once` option, never its `allow_always` while `allow_once` is offered. The turn then reports as usual, with no `permission_prompt`. Only `denied_by_seat`, or a request with no allow option, is answered at once with a refusal, never an allow option. `Notification/permission_prompt` is then posted, and for `denied_by_seat` the pane shows what was asked (the tool call's title). No idle `Stop` or beat is posted while that attention is held, even when `/abort` then cancels the turn. The next prompt is accepted as usual |
|
|
55
|
-
| 4b | 7 | The live request is submitted with the hook token, its `requestId` as the agent's JSON-RPC id, passed unchanged, the accepted prompt's `turnId`, this conversation and generation, and the agent's options as offered. The runner doesn't post `permission_prompt` itself for a created ask, and each read waits at most 25 s. The chosen option, allow or deny, reaches the agent once, and the turn then reports as usual. OpenRig's `permitted`, at submit or at a read, reaches the agent the same way. A refusal is read by its code, never its status: one section 7's table marks "permits" (`duplicate_request`, `activity_grant_pending`, `activity_grant_revoked`), a read that gets no answer, and a status or read state the section doesn't list (500, `deferred`) each give the agent its `allow_once` option. A refusal saying the request isn't the current occupant's (`stale_generation` at submit, `activity_grant_stale` on a read), and a `refused` (`said_no`), stale or withdrawn read, give the agent `cancelled`, and the turn then ends as usual, with nothing held. With no answer, the request stays pending with no idle report, and a pasted message isn't an answer. `/abort` withdraws it with `turn_cancelled`, and an answer after that isn't delivered. A turn's end or the agent's exit while it waits withdraws it with `turn_ended` or `exited`. Once the ask is withdrawn no person is still waiting, so the turn's end is reported as usual. An ask the runner permitted after a read got no answer, or an unlisted one, may still be open, so it's withdrawn at the turn's end too |
|
|
56
|
+
| 4b | 7 | The live request is submitted with the hook token, its `requestId` as the agent's JSON-RPC id, passed unchanged, the accepted prompt's `turnId`, this conversation and generation, and the agent's options as offered. The runner doesn't post `permission_prompt` itself for a created ask, and each read waits at most 25 s. The chosen option, allow or deny, reaches the agent once, and the turn then reports as usual. OpenRig's `permitted`, at submit or at a read, reaches the agent the same way, and a read that carries the person's own words (`said`) still gives the agent the read's option. A refusal is read by its code, never its status: one section 7's table marks "permits" (`duplicate_request`, `activity_grant_pending`, `activity_grant_revoked`), a read that gets no answer, and a status or read state the section doesn't list (500, `deferred`) each give the agent its `allow_once` option. A refusal saying the request isn't the current occupant's (`stale_generation` at submit, `activity_grant_stale` on a read), and a `refused` (`said_no`), stale or withdrawn read, give the agent `cancelled`, and the turn then ends as usual, with nothing held. With no answer, the request stays pending with no idle report after the turn's accepted prompt, and a pasted message isn't an answer. `/abort` withdraws it with `turn_cancelled`, and an answer after that isn't delivered. A turn's end or the agent's exit while it waits withdraws it with `turn_ended` or `exited`. Once the ask is withdrawn no person is still waiting, so the turn's end is reported as usual. An ask the runner permitted after a read got no answer, or an unlisted one, may still be open, so it's withdrawn at the turn's end too |
|
|
57
|
+
| 4c | 7 | **Advisory.** A read's `said`, the words of a person who answered in words, is queued to the agent as a prompt, after the turn and after any prompt already waiting. Section 7 lets a runner drop them and still keep the contract, so this result is shown as met or not met and never counts as a pass or a fail, or toward the exit status |
|
|
56
58
|
| 5 | 4 | Every post carries `OPENRIG_OCCUPANT_GENERATION` |
|
|
57
59
|
| 6 | 8 | A resume asks the agent to reopen `OPENRIG_RESUME_REF` in the launch's working folder, and records that conversation. The agent's own not-found becomes `error: "missing"`. Any other failure is neither missing nor resumed. No case starts a new conversation |
|
|
58
|
-
| 7 | 4 | An agent that dies mid-turn gets `Stop/<preset>_exited`, and no idle report
|
|
60
|
+
| 7 | 4 | An agent that dies mid-turn gets `Stop/<preset>_exited`, and no idle report for that turn. Posts are taken in the runner's own order, as OpenRig orders them (`occurredAt` when it's a time string, otherwise the post's arrival, then `sequence` when both are positive whole numbers), so an idle report from before the turn began doesn't count, however late it arrives |
|
|
59
61
|
| 7b | 4 | A failed `session/prompt` posts `Notification/runtime_error`, not a permission request |
|
|
60
62
|
| 7c | 9 | **Advisory.** Closing the pane ends the agent process. Section 9 marks this duty as proposed, and lets a runner list in `limits` what may keep running, so this result is shown as met or not met and never counts as a pass or a fail, or toward the exit status. The fake agent outlives a hangup here, so the runner has to end it |
|
|
61
63
|
| 8 | 7 | An unknown request from the agent gets JSON-RPC `-32601`, and the next prompt still goes through |
|
|
@@ -133,8 +133,8 @@ function askState(h, entry) {
|
|
|
133
133
|
const script = h.asks.script;
|
|
134
134
|
if (entry.withdrawn) return script.late ?? { state: "withdrawn" };
|
|
135
135
|
if (script.answer && Date.now() >= entry.created + (script.answer.afterMs ?? 0)) {
|
|
136
|
-
const { state, optionId, reason } = script.answer;
|
|
137
|
-
return { state, ...(optionId ? { optionId } : {}), ...(reason ? { reason } : {}) };
|
|
136
|
+
const { state, optionId, reason, said } = script.answer;
|
|
137
|
+
return { state, ...(optionId ? { optionId } : {}), ...(reason ? { reason } : {}), ...(said ? { said } : {}) };
|
|
138
138
|
}
|
|
139
139
|
return { state: "pending" };
|
|
140
140
|
}
|
|
@@ -242,6 +242,19 @@ async function launch(label, { scenario = {}, env = {}, asks } = {}) {
|
|
|
242
242
|
// An ordinary send arrives inside an envelope, so a line in it that reads /abort is still just text.
|
|
243
243
|
const message = (h, body) => `From: checker@runner-check\nTo: ${h.session}\n---\n${body}`;
|
|
244
244
|
const nonExitStops = (h, after = 0) => h.hooks("Stop").filter((p) => p.at >= after && !String(p.body?.subtype ?? "").endsWith("_exited"));
|
|
245
|
+
// Whether post `a` comes before post `b` in the runner's own order, as OpenRig orders them: by `occurredAt` when it's a
|
|
246
|
+
// non-blank string that reads as a time, otherwise by its arrival; then by `sequence`, when both carry a positive whole number.
|
|
247
|
+
const postedAt = (p) => {
|
|
248
|
+
const value = p?.body?.occurredAt;
|
|
249
|
+
const t = typeof value === "string" && value.trim() ? Date.parse(value) : NaN;
|
|
250
|
+
return Number.isFinite(t) ? t : p?.at ?? 0;
|
|
251
|
+
};
|
|
252
|
+
const sequenceOf = (p) => { const value = p?.body?.sequence; return Number.isSafeInteger(value) && value > 0 ? value : null; };
|
|
253
|
+
const precedes = (a, b) => postedAt(a) !== postedAt(b) ? postedAt(a) < postedAt(b)
|
|
254
|
+
: sequenceOf(a) !== null && sequenceOf(b) !== null && sequenceOf(a) < sequenceOf(b);
|
|
255
|
+
// Non-exit Stops the runner posted after `post` in that order. An idle report from before the turn began (a runner may report
|
|
256
|
+
// idle at startup) is never one made during it, however late its POST arrives.
|
|
257
|
+
const stopsAfter = (h, post) => nonExitStops(h).filter((p) => !post || !precedes(p, post));
|
|
245
258
|
const ready = (h, ms) => waitFor(() => h.record()?.nativeRef && h.record(), ms);
|
|
246
259
|
|
|
247
260
|
function result(id, title, { proposed = false } = {}) {
|
|
@@ -257,8 +270,17 @@ const cases = {
|
|
|
257
270
|
const h = await launch("1", { scenario: { newDelayMs: scale(2000), sessionId: "fake-session-1" } });
|
|
258
271
|
const asked = await waitFor(() => h.received("session/new")[0]);
|
|
259
272
|
if (!r.check("the runner opens a conversation with session/new", asked, "no session/new arrived")) return r;
|
|
260
|
-
|
|
261
|
-
|
|
273
|
+
// Until the agent's answer is logged, there must be no record. The agent logs each message before it sends it, so a
|
|
274
|
+
// record read before a log that still holds no answer was written before the answer went out. Reading against the
|
|
275
|
+
// agent's log, not after a fixed settle, keeps a busy machine from reading a correct runner's record as early.
|
|
276
|
+
let early;
|
|
277
|
+
await waitFor(() => {
|
|
278
|
+
const record = h.record();
|
|
279
|
+
if (h.replyTo(asked)) return true;
|
|
280
|
+
if (record) early = record;
|
|
281
|
+
return early;
|
|
282
|
+
}, scale(2000) + opts.waitMs);
|
|
283
|
+
r.check("no launch record while session/new is still unanswered", !early, `a record was written early: ${JSON.stringify(early)}`);
|
|
262
284
|
const record = await ready(h);
|
|
263
285
|
r.check("a launch record arrives after session/new is answered", record, `no record with a nativeRef at ${h.recordPath}`);
|
|
264
286
|
if (!record) return r;
|
|
@@ -288,7 +310,7 @@ const cases = {
|
|
|
288
310
|
|
|
289
311
|
async "2"() {
|
|
290
312
|
const r = result("2", "Input framing, queued messages and cancel");
|
|
291
|
-
const h = await launch("2", { scenario: { turns: [{}, { holdMs: scale(15000) }, { holdMs: scale(
|
|
313
|
+
const h = await launch("2", { scenario: { turns: [{}, { holdMs: scale(15000) }, { holdMs: scale(15000), ignoreCancel: true, endAfterCancelMs: scale(300) }, {}] } });
|
|
292
314
|
if (!r.check("the runner opens its conversation", await ready(h), "no launch record")) return r;
|
|
293
315
|
const block = message(h, "first line\n/abort\nthird line");
|
|
294
316
|
h.paste(block);
|
|
@@ -317,10 +339,12 @@ const cases = {
|
|
|
317
339
|
r.check("one /abort sends one session/cancel", h.received("session/cancel").length === 1, `got ${h.received("session/cancel").length}`);
|
|
318
340
|
r.check("the waiting block becomes the next prompt", await waitFor(() => h.prompts()[2] === queued, scale(4000)), `prompts: ${JSON.stringify(h.prompts().slice(2))}`);
|
|
319
341
|
|
|
342
|
+
// The agent keeps this turn open until the cancel arrives and then ends it end_turn, so a runner that handles Ctrl-C
|
|
343
|
+
// late on a busy machine still has a turn to cancel. Only its delivery is timed, by the per-step bound.
|
|
320
344
|
const interrupted = Date.now();
|
|
321
345
|
await sleep(scale(200));
|
|
322
346
|
h.keys("C-c");
|
|
323
|
-
r.check("Ctrl-C outside a paste sends session/cancel", await waitFor(() => h.received("session/cancel").length >= 2
|
|
347
|
+
r.check("Ctrl-C outside a paste sends session/cancel", await waitFor(() => h.received("session/cancel").length >= 2), "no second session/cancel");
|
|
324
348
|
const ended = await waitFor(() => nonExitStops(h, interrupted)[0], scale(6000));
|
|
325
349
|
r.check("cancelled is reported only on the agent's own stop reason", ended?.body?.subtype === "end_turn",
|
|
326
350
|
`the agent ended the turn end_turn; the runner reported ${ended ? `Stop/${ended.body.subtype}` : "no Stop"}`);
|
|
@@ -355,6 +379,65 @@ const cases = {
|
|
|
355
379
|
return r;
|
|
356
380
|
},
|
|
357
381
|
|
|
382
|
+
// The optional working beat (section 4). When a runner posts active/liveness in a quiet turn, each beat names the open
|
|
383
|
+
// turn it belongs to, keeps the post order, comes often enough for its own lifetime, stops at the turn's end, and never
|
|
384
|
+
// runs while a person is asked; after an answer, active/permission_resolved comes before the next beat. Order is read
|
|
385
|
+
// from the runner's own sequence and times, so a slow delivery never reads as a broken runner.
|
|
386
|
+
async "3b"() {
|
|
387
|
+
const r = result("3b", "Working beat (optional): beats name their open turn, keep order, and stop at its end and while a person is asked");
|
|
388
|
+
const quiet = scale(22000);
|
|
389
|
+
const seqOf = (p) => Number(p?.body?.sequence);
|
|
390
|
+
const at = (p) => Date.parse(p.body.occurredAt);
|
|
391
|
+
const h = await launch("3b", { scenario: { turns: [{ silent: true, holdMs: quiet }, {}] } });
|
|
392
|
+
if (!r.check("the runner opens its conversation", await ready(h), "no launch record")) return r;
|
|
393
|
+
h.paste(message(h, "a long, quiet turn"));
|
|
394
|
+
const accepted = await waitFor(() => h.hooks("UserPromptSubmit", "accepted")[0]);
|
|
395
|
+
const end = await waitFor(() => h.hooks("Stop", "end_turn")[0], quiet + opts.waitMs);
|
|
396
|
+
await sleep(scale(11000)); // room for a beat a runner wrongly sends after the Stop
|
|
397
|
+
const beats = h.hooks("active", "liveness");
|
|
398
|
+
if (!beats.length) return r.skip("the runner sends no working beat in a quiet turn; the beat is optional (section 4)");
|
|
399
|
+
r.check("each beat names the turn it belongs to", accepted && beats.every((b) => b.body.turnId === accepted.body.turnId),
|
|
400
|
+
`turnIds: ${beats.map((b) => b.body.turnId).join(", ")}`);
|
|
401
|
+
// In the runner's own time order, not delivery's: a post delivered late still has to fit where the runner sent it.
|
|
402
|
+
const byTime = (a, b) => at(a) - at(b) || seqOf(a) - seqOf(b);
|
|
403
|
+
const timed = h.posts().slice().sort(byTime);
|
|
404
|
+
r.check("sequence rises with the runner's own time across every post, beats included",
|
|
405
|
+
timed.every((p, i) => Number.isFinite(seqOf(p)) && Number.isFinite(at(p)) && (i === 0 || seqOf(p) > seqOf(timed[i - 1]))),
|
|
406
|
+
`sequences in occurredAt order: ${timed.map(seqOf).join(", ")}`);
|
|
407
|
+
const life = (b) => (Number.isFinite(b.body.livenessSeconds) ? b.body.livenessSeconds : 30);
|
|
408
|
+
const inTurn = beats.filter((b) => !end || seqOf(b) < seqOf(end)).sort(byTime);
|
|
409
|
+
const gaps = inTurn.map((b, i) => at(b) - at(i === 0 ? accepted : inTurn[i - 1]));
|
|
410
|
+
r.check("beats come more often than every livenessSeconds / 2", inTurn.every((b, i) => gaps[i] <= life(b) * 500 + 1000),
|
|
411
|
+
`gaps by the runner's own times: ${gaps.join(", ")} ms`);
|
|
412
|
+
r.check("no beat after the turn's Stop", end && beats.every((b) => seqOf(b) < seqOf(end)),
|
|
413
|
+
`beats after Stop/end_turn: ${beats.filter((b) => end && seqOf(b) > seqOf(end)).length}`);
|
|
414
|
+
|
|
415
|
+
// A person is asked first, and answers after a while; the agent then carries on, quietly, in the same turn.
|
|
416
|
+
const p = await launch("3b-asked", { scenario: { turns: [{ permission: true, silent: true, holdMs: quiet }, {}] },
|
|
417
|
+
asks: { answer: { afterMs: scale(12000), state: "answered", optionId: "allow-once" } } });
|
|
418
|
+
if (!r.check("asked: the runner opens its conversation", await ready(p), "no launch record")) return r;
|
|
419
|
+
p.paste(message(p, "edit the notes"));
|
|
420
|
+
const submitted = await waitFor(() => p.permissionCalls("POST").find((c) => c.path === "/api/activity/permission-requests"), scale(5000));
|
|
421
|
+
if (!r.check("asked: the request is submitted", submitted, "no submit")) return r;
|
|
422
|
+
await waitFor(() => p.hooks("Stop", "end_turn")[0], scale(12000) + quiet + opts.waitMs);
|
|
423
|
+
const resolvedPost = p.hooks("active", "permission_resolved")[0];
|
|
424
|
+
const before = p.hooks("active", "liveness").filter((b) => at(b) > submitted.at && (!resolvedPost || seqOf(b) < seqOf(resolvedPost)));
|
|
425
|
+
r.check("asked: no beat while the ask waits on a person", before.length === 0, `${before.length} beats while it waited`);
|
|
426
|
+
r.check("asked: after the answer, active/permission_resolved names the turn and the ask, before any beat",
|
|
427
|
+
resolvedPost && resolvedPost.body.askId && resolvedPost.body.turnId === p.hooks("UserPromptSubmit", "accepted")[0]?.body.turnId,
|
|
428
|
+
resolvedPost ? `permission_resolved: ${JSON.stringify({ turnId: resolvedPost.body.turnId, askId: resolvedPost.body.askId })}` : "no permission_resolved");
|
|
429
|
+
|
|
430
|
+
// OpenRig permits at submit when no one can be asked: no ask opens, so nothing waits and the beats go on.
|
|
431
|
+
const q = await launch("3b-permitted", { scenario: { turns: [{ permission: true, silent: true, holdMs: quiet }, {}] },
|
|
432
|
+
asks: { submit: { permitted: true } } });
|
|
433
|
+
if (!r.check("permitted at submit: the runner opens its conversation", await ready(q), "no launch record")) return r;
|
|
434
|
+
q.paste(message(q, "edit the notes"));
|
|
435
|
+
const qEnd = await waitFor(() => q.hooks("Stop", "end_turn")[0], quiet + opts.waitMs);
|
|
436
|
+
const qBeats = q.hooks("active", "liveness").filter((b) => !qEnd || seqOf(b) < seqOf(qEnd));
|
|
437
|
+
r.check("permitted at submit: the quiet turn's beats go on, with no ask to resolve", qBeats.length > 0, "no beat in the quiet turn after the permit");
|
|
438
|
+
return r;
|
|
439
|
+
},
|
|
440
|
+
|
|
358
441
|
// Section 7's default is permit: when no one can be asked, the agent gets its own allow option at once, allow_once before
|
|
359
442
|
// allow_always. Only the seat's opt-in refusal (denied_by_seat), or a request with no allow option, is refused at once,
|
|
360
443
|
// shown, and held as needs input until the next prompt, even when the turn is cancelled.
|
|
@@ -440,7 +523,8 @@ const cases = {
|
|
|
440
523
|
const submitted = await waitFor(() => submits(h)[0], scale(3000));
|
|
441
524
|
if (!r.check(`${label}: the request is submitted to /api/activity/permission-requests`, submitted, "no submit")) continue;
|
|
442
525
|
const asked = h.sent("session/request_permission")[0];
|
|
443
|
-
|
|
526
|
+
// The submit isn't one of the runner's ordered activity posts, so it can arrive before the accepted prompt does.
|
|
527
|
+
const accepted = await waitFor(() => h.hooks("UserPromptSubmit", "accepted")[0], scale(3000));
|
|
444
528
|
const sent = submitted.body ?? {};
|
|
445
529
|
if (label === "allow") {
|
|
446
530
|
r.check("the submit passes OpenRig's checks", h.asks.submitted[0]?.problems.length === 0, h.asks.submitted[0]?.problems.join("; "));
|
|
@@ -477,6 +561,8 @@ const cases = {
|
|
|
477
561
|
const outcomes = [
|
|
478
562
|
["permitted at submit", { submit: { permitted: true } }, "allow-once"],
|
|
479
563
|
["permitted at read", { answer: { afterMs: 300, state: "permitted", optionId: "allow-once" } }, "allow-once"],
|
|
564
|
+
// A person's own words come back beside the outcome, and never change the option delivered.
|
|
565
|
+
["permitted at read, with the person's words", { answer: { afterMs: 300, state: "permitted", optionId: "allow-once", said: "only the notes file" } }, "allow-once"],
|
|
480
566
|
["duplicate_request", { submit: { status: 409, code: "duplicate_request" } }, "allow-once"],
|
|
481
567
|
["activity_grant_pending", { submit: { status: 409, code: "activity_grant_pending" } }, "allow-once"],
|
|
482
568
|
["activity_grant_revoked", { submit: { status: 401, code: "activity_grant_revoked" } }, "allow-once"],
|
|
@@ -492,8 +578,9 @@ const cases = {
|
|
|
492
578
|
await Promise.all(outcomes.map(async ([label, asks, optionId]) => {
|
|
493
579
|
const h = await open(label.replace(/[^a-z0-9]+/g, "-"), asks, [{ permission: true, holdMs: scale(800) }, {}]);
|
|
494
580
|
if (!h) return;
|
|
495
|
-
//
|
|
496
|
-
|
|
581
|
+
// Section 7 sets no time limit for what follows a read, so the check waits its ordinary per-step bound (--wait-ms),
|
|
582
|
+
// and longer when the read got no answer, which a runner may retry a few times before it permits.
|
|
583
|
+
const got = await waitFor(() => outcome(h), label === "unreachable read" ? scale(10000) : opts.waitMs);
|
|
497
584
|
if (!optionId) {
|
|
498
585
|
r.check(`${label}: the agent gets cancelled`, got?.outcome === "cancelled", `got ${JSON.stringify(got)}`);
|
|
499
586
|
r.check(`${label}: nothing is held`, await waitFor(() => h.hooks("Stop", "end_turn")[0], scale(3000))
|
|
@@ -520,19 +607,22 @@ const cases = {
|
|
|
520
607
|
await sleep(scale(1500));
|
|
521
608
|
r.check("pending: the runner keeps reading the ask", h.permissionCalls("GET").length >= 1, "no read of the ask");
|
|
522
609
|
r.check("pending: nothing is delivered while no one has answered", answers(h).length === 0, `got ${JSON.stringify(outcome(h))}`);
|
|
523
|
-
|
|
610
|
+
const turn = h.hooks("UserPromptSubmit", "accepted").at(-1);
|
|
611
|
+
r.check("pending: no idle Stop while it waits", stopsAfter(h, turn).length === 0, stopsAfter(h, turn).map((p) => p.body.subtype).join(", "));
|
|
524
612
|
h.paste(message(h, "allow it"));
|
|
525
613
|
await sleep(scale(800));
|
|
526
614
|
r.check("pending: a pasted message isn't an answer", answers(h).length === 0, `got ${JSON.stringify(outcome(h))}`);
|
|
615
|
+
const abortedAt = Date.now();
|
|
527
616
|
h.paste("/abort");
|
|
528
617
|
const withdrawn = await waitFor(() => withdraws(h)[0], scale(3000));
|
|
529
618
|
r.check("pending: /abort withdraws the ask with turn_cancelled", withdrawn?.body?.reason === "turn_cancelled", `withdraw: ${JSON.stringify(withdrawn?.body)}`);
|
|
530
619
|
r.check("pending: the agent's request is answered cancelled", (await waitFor(() => outcome(h), scale(3000)))?.outcome === "cancelled",
|
|
531
620
|
`got ${JSON.stringify(outcome(h))}`);
|
|
532
621
|
// Once the ask is withdrawn no person is still waiting, so the cancelled turn's own end is reported as usual (the
|
|
533
|
-
// pasted message above runs as the next turn, so only that turn's Stop/cancelled counts).
|
|
622
|
+
// pasted message above runs as the next turn, so only that turn's Stop/cancelled counts). The contract doesn't
|
|
623
|
+
// order the Stop and the withdraw, so the Stop is any after /abort, not only one after the withdraw arrived.
|
|
534
624
|
r.check("pending: after /abort, the turn's end is reported, holding nothing",
|
|
535
|
-
await waitFor(() => h.hooks("Stop", "cancelled").some((p) => p.at >=
|
|
625
|
+
await waitFor(() => h.hooks("Stop", "cancelled").some((p) => p.at >= abortedAt), scale(3000)), "no Stop/cancelled after /abort");
|
|
536
626
|
await sleep(scale(1200));
|
|
537
627
|
r.check("pending: an answer after the withdraw isn't delivered", answers(h).every((a) => a.msg.result?.outcome?.outcome !== "selected"),
|
|
538
628
|
`answers: ${JSON.stringify(answers(h).map((a) => a.msg.result))}`);
|
|
@@ -544,12 +634,39 @@ const cases = {
|
|
|
544
634
|
if (!h) continue;
|
|
545
635
|
const withdrawn = await waitFor(() => withdraws(h)[0], scale(4000));
|
|
546
636
|
r.check(`${label}: the ask is withdrawn with ${reason}`, withdrawn?.body?.reason === reason, `withdraw: ${JSON.stringify(withdrawn?.body)}`);
|
|
547
|
-
|
|
548
|
-
|
|
637
|
+
// The turn's own end: a Stop with the agent's own stop reason, after the agent answered that turn's session/prompt,
|
|
638
|
+
// on either side of the withdraw (the contract doesn't order them). A Stop posted before the turn ended doesn't count.
|
|
639
|
+
if (reason === "turn_ended") {
|
|
640
|
+
const turnEnd = await waitFor(() => {
|
|
641
|
+
const asked = h.sent("session/request_permission")[0];
|
|
642
|
+
const prompt = asked && h.received("session/prompt").filter((p) => p.at <= asked.at).at(-1);
|
|
643
|
+
return prompt && h.replyTo(prompt);
|
|
644
|
+
}, scale(4000));
|
|
645
|
+
const stopReason = turnEnd?.msg.result?.stopReason;
|
|
646
|
+
r.check(`${label}: nothing is held once the ask is withdrawn`,
|
|
647
|
+
stopReason && await waitFor(() => h.hooks("Stop", stopReason).some((p) => p.at >= turnEnd.at), scale(3000)),
|
|
648
|
+
`no Stop/${stopReason ?? "(no turn end)"} after the agent ended the turn`);
|
|
649
|
+
}
|
|
549
650
|
}
|
|
550
651
|
return r;
|
|
551
652
|
},
|
|
552
653
|
|
|
654
|
+
// Section 7: a person who answers in their own words gets them passed on. OpenRig carries them as the read's `said`, and
|
|
655
|
+
// a runner queues them for the agent like any other prompt, after the turn, never as the answer. A runner that drops
|
|
656
|
+
// them still keeps the contract, so the result is advisory.
|
|
657
|
+
async "4c"() {
|
|
658
|
+
const r = result("4c", "The person's words: a read's said is queued to the agent as a prompt (advisory)", { proposed: true });
|
|
659
|
+
const said = "Only the notes file, please. Leave the rest alone.";
|
|
660
|
+
const h = await launch("4c", { scenario: { turns: [{ permission: true }, {}] },
|
|
661
|
+
asks: { answer: { afterMs: 300, state: "permitted", optionId: "allow-once", said } } });
|
|
662
|
+
if (!r.check("the runner opens its conversation", await ready(h), "no launch record")) return r;
|
|
663
|
+
h.paste(message(h, "edit the notes"));
|
|
664
|
+
if (!r.check("the first turn ends", await waitFor(() => h.hooks("Stop", "end_turn")[0], scale(6000)), "no Stop/end_turn")) return r;
|
|
665
|
+
const later = await waitFor(() => h.prompts().slice(1).find((prompt) => prompt?.includes(said)), scale(4000));
|
|
666
|
+
r.check("the person's words are queued to the agent as a prompt, after the turn", later, `prompts: ${JSON.stringify(h.prompts())}`);
|
|
667
|
+
return r;
|
|
668
|
+
},
|
|
669
|
+
|
|
553
670
|
async "5"() {
|
|
554
671
|
const r = result("5", "Generation: every post carries the launch's occupant generation");
|
|
555
672
|
const h = await launch("5");
|
|
@@ -607,7 +724,10 @@ const cases = {
|
|
|
607
724
|
if (!r.check("the agent exits mid-turn", died, "the agent didn't exit")) return r;
|
|
608
725
|
const exited = await waitFor(() => h.hooks("Stop", `${opts.name}_exited`)[0], scale(4000));
|
|
609
726
|
r.check(`Stop/${opts.name}_exited is posted`, exited, `posts: ${h.posts().map((p) => `${p.body?.hookEvent}/${p.body?.subtype}`).join(", ")}`);
|
|
610
|
-
|
|
727
|
+
// Any idle report for the turn the agent died in counts, before or after the exit; one from before the turn doesn't.
|
|
728
|
+
const turn = h.hooks("UserPromptSubmit", "accepted")[0];
|
|
729
|
+
const idle = turn ? stopsAfter(h, turn) : nonExitStops(h, died.at);
|
|
730
|
+
r.check("no idle report for the turn it died in", idle.length === 0, idle.map((p) => p.body.subtype).join(", "));
|
|
611
731
|
return r;
|
|
612
732
|
},
|
|
613
733
|
|
|
@@ -663,7 +783,7 @@ const cases = {
|
|
|
663
783
|
},
|
|
664
784
|
};
|
|
665
785
|
|
|
666
|
-
const order = ["1", "1b", "2", "3", "4", "4b", "5", "6", "7", "7b", "7c", "8", "9"];
|
|
786
|
+
const order = ["1", "1b", "2", "3", "3b", "4", "4b", "4c", "5", "6", "7", "7b", "7c", "8", "9"];
|
|
667
787
|
const selected = opts.cases ?? order;
|
|
668
788
|
const unknown = selected.filter((id) => !order.includes(id));
|
|
669
789
|
if (unknown.length) { console.error(`unknown case ${unknown.join(", ")}; cases are ${order.join(", ")}`); process.exit(2); }
|
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
// stubborn keep running after a hangup or after input closes; only SIGTERM or SIGKILL ends it
|
|
17
17
|
// turns one entry per `session/prompt`, in order (the last one repeats):
|
|
18
18
|
// holdMs keep the turn open this long; `session/cancel` ends it early as "cancelled"
|
|
19
|
-
//
|
|
19
|
+
// silent send no message chunk for this turn, so a held turn is entirely quiet (a long tool or model call)
|
|
20
|
+
// ignoreCancel on `session/cancel`, keep the turn open and end it with stopReason (default end_turn) anyway, when
|
|
21
|
+
// holdMs runs out or, with endAfterCancelMs, that long after the first cancel if that's sooner
|
|
20
22
|
// permission ask `session/request_permission` first, then carry on whatever the answer. As an object:
|
|
21
23
|
// options the options offered (default: allow-once, allow_once; reject-once, reject_once)
|
|
22
24
|
// waitMs stop waiting for the answer after this long, and end the turn
|
|
@@ -65,7 +67,7 @@ async function prompt(id, params) {
|
|
|
65
67
|
turn += 1;
|
|
66
68
|
if (spec.exit) exit(3, `turn ${turn}`);
|
|
67
69
|
if (spec.error) { fail(id, -32603, "fake agent: this turn fails"); return; }
|
|
68
|
-
send({ jsonrpc: "2.0", method: "session/update",
|
|
70
|
+
if (!spec.silent) send({ jsonrpc: "2.0", method: "session/update",
|
|
69
71
|
params: { sessionId: params.sessionId, update: { sessionUpdate: "agent_message_chunk", content: { type: "text", text: `turn ${turn}` } } } });
|
|
70
72
|
let stopReason = spec.stopReason ?? "end_turn";
|
|
71
73
|
if (spec.permission) {
|
|
@@ -89,7 +91,12 @@ async function prompt(id, params) {
|
|
|
89
91
|
if (spec.holdMs) {
|
|
90
92
|
const cancelled = await new Promise((resolve) => {
|
|
91
93
|
const timer = setTimeout(() => { cancelTurn = null; resolve(false); }, spec.holdMs);
|
|
92
|
-
cancelTurn = () => {
|
|
94
|
+
cancelTurn = () => {
|
|
95
|
+
if (!spec.ignoreCancel) { clearTimeout(timer); cancelTurn = null; resolve(true); return; }
|
|
96
|
+
if (spec.endAfterCancelMs === undefined) return;
|
|
97
|
+
cancelTurn = null;
|
|
98
|
+
setTimeout(() => { clearTimeout(timer); resolve(false); }, spec.endAfterCancelMs);
|
|
99
|
+
};
|
|
93
100
|
});
|
|
94
101
|
if (cancelled) stopReason = "cancelled";
|
|
95
102
|
}
|