@openrig/cli 0.6.5 → 0.6.6
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 +70 -49
- package/daemon/assets/onboarding/02-self-and-competent-action.md +39 -2
- 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/applying-a-permission-policy/SKILL.md +41 -21
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +13 -7
- package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +1 -1
- package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +3 -4
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +9 -4
- package/daemon/context-packs/help/help.md +33 -8
- 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 +6 -5
- package/daemon/context-packs/reference/getting-started.md +423 -113
- package/daemon/context-packs/reference/manifest.yaml +1 -1
- package/daemon/context-packs/reference/rig-spec.md +150 -26
- 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/SKILL.md +41 -21
- package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/SKILL.md +13 -7
- package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-starters/SKILL.md +0 -6
- package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/SKILL.md +1 -8
- 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/SKILL.md +5 -5
- package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +3 -3
- package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-skills/SKILL.md +3 -4
- package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/SKILL.md +12 -9
- package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/references/worked-example.md +29 -29
- package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/SKILL.md +0 -1
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/session-source-fork/SKILL.md +0 -5
- 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/SKILL.md +1 -1
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
- package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-user/SKILL.md +9 -4
- 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/OPENRIG.md +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/SKILL.md +0 -2
- package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
- package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
- package/daemon/context-packs/world-example/manifest.yaml +1 -1
- package/daemon/context-packs/world-public/manifest.yaml +1 -1
- package/daemon/dist/adapters/claude-code-adapter.d.ts +1 -1
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +25 -13
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +7 -4
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-resume.d.ts +3 -1
- package/daemon/dist/adapters/codex-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-resume.js +10 -4
- package/daemon/dist/adapters/codex-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +3 -0
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +59 -61
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/compose-services-adapter.js +1 -1
- package/daemon/dist/adapters/compose-services-adapter.js.map +1 -1
- package/daemon/dist/adapters/kernel-authority.d.ts +10 -0
- package/daemon/dist/adapters/kernel-authority.d.ts.map +1 -0
- package/daemon/dist/adapters/kernel-authority.js +53 -0
- package/daemon/dist/adapters/kernel-authority.js.map +1 -0
- package/daemon/dist/adapters/non-interruptive.d.ts +14 -0
- package/daemon/dist/adapters/non-interruptive.d.ts.map +1 -0
- package/daemon/dist/adapters/non-interruptive.js +38 -0
- package/daemon/dist/adapters/non-interruptive.js.map +1 -0
- package/daemon/dist/adapters/pi-resume.d.ts +3 -1
- package/daemon/dist/adapters/pi-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-resume.js +8 -1
- package/daemon/dist/adapters/pi-resume.js.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.d.ts +15 -0
- package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.js +27 -0
- package/daemon/dist/adapters/pi-runner-protocol.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +3 -0
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +79 -13
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts +8 -0
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.js +37 -9
- package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/stub-runner-protocol.d.ts +1 -1
- package/daemon/dist/adapters/stub-runner-protocol.d.ts.map +1 -1
- package/daemon/dist/adapters/stub-runner.d.ts +1 -1
- package/daemon/dist/adapters/stub-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/stub-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/stub-runtime-adapter.js +10 -7
- package/daemon/dist/adapters/stub-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +7 -3
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +11 -6
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/adapters/yolo-mode.d.ts +1 -1
- package/daemon/dist/adapters/yolo-mode.d.ts.map +1 -1
- package/daemon/dist/adapters/yolo-mode.js +3 -0
- package/daemon/dist/adapters/yolo-mode.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/bundle-behaviour-surface.d.ts +2 -0
- package/daemon/dist/bundle-behaviour-surface.d.ts.map +1 -0
- package/daemon/dist/bundle-behaviour-surface.js +2 -0
- package/daemon/dist/bundle-behaviour-surface.js.map +1 -0
- package/daemon/dist/bundle-identity-surface.d.ts +2 -0
- package/daemon/dist/bundle-identity-surface.d.ts.map +1 -0
- package/daemon/dist/bundle-identity-surface.js +4 -0
- package/daemon/dist/bundle-identity-surface.js.map +1 -0
- package/daemon/dist/daemon-shutdown.d.ts +1 -1
- package/daemon/dist/daemon-shutdown.d.ts.map +1 -1
- package/daemon/dist/daemon-shutdown.js +5 -1
- package/daemon/dist/daemon-shutdown.js.map +1 -1
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +2 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/095_rig_non_interruptive.d.ts +3 -0
- package/daemon/dist/db/migrations/095_rig_non_interruptive.d.ts.map +1 -0
- package/daemon/dist/db/migrations/095_rig_non_interruptive.js +5 -0
- package/daemon/dist/db/migrations/095_rig_non_interruptive.js.map +1 -0
- package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
- package/daemon/dist/domain/agent-manifest.js +4 -2
- package/daemon/dist/domain/agent-manifest.js.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.d.ts +10 -0
- package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.js +133 -31
- package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
- package/daemon/dist/domain/builtin-policy-reference.d.ts +1 -1
- package/daemon/dist/domain/builtin-policy-reference.d.ts.map +1 -1
- package/daemon/dist/domain/builtin-policy-reference.js +2 -2
- package/daemon/dist/domain/builtin-policy-reference.js.map +1 -1
- package/daemon/dist/domain/bundle-archive.d.ts +24 -0
- package/daemon/dist/domain/bundle-archive.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-archive.js +52 -27
- package/daemon/dist/domain/bundle-archive.js.map +1 -1
- package/daemon/dist/domain/bundle-audit.d.ts +5 -0
- package/daemon/dist/domain/bundle-audit.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-audit.js.map +1 -1
- package/daemon/dist/domain/bundle-behaviour-inspect.d.ts +4 -0
- package/daemon/dist/domain/bundle-behaviour-inspect.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-behaviour-inspect.js +56 -0
- package/daemon/dist/domain/bundle-behaviour-inspect.js.map +1 -0
- package/daemon/dist/domain/bundle-behaviour.d.ts +118 -0
- package/daemon/dist/domain/bundle-behaviour.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-behaviour.js +364 -0
- package/daemon/dist/domain/bundle-behaviour.js.map +1 -0
- package/daemon/dist/domain/bundle-carried-context-pack.d.ts +16 -0
- package/daemon/dist/domain/bundle-carried-context-pack.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-carried-context-pack.js +67 -0
- package/daemon/dist/domain/bundle-carried-context-pack.js.map +1 -0
- package/daemon/dist/domain/bundle-carried-project.d.ts +13 -0
- package/daemon/dist/domain/bundle-carried-project.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-carried-project.js +71 -0
- package/daemon/dist/domain/bundle-carried-project.js.map +1 -0
- package/daemon/dist/domain/bundle-conflict-detector.js +3 -3
- package/daemon/dist/domain/bundle-conflict-detector.js.map +1 -1
- package/daemon/dist/domain/bundle-content-routing.d.ts +49 -0
- package/daemon/dist/domain/bundle-content-routing.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-content-routing.js +246 -0
- package/daemon/dist/domain/bundle-content-routing.js.map +1 -0
- package/daemon/dist/domain/bundle-context-packs-router.d.ts +7 -2
- package/daemon/dist/domain/bundle-context-packs-router.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-context-packs-router.js +19 -0
- package/daemon/dist/domain/bundle-context-packs-router.js.map +1 -1
- package/daemon/dist/domain/bundle-identity.d.ts +27 -0
- package/daemon/dist/domain/bundle-identity.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-identity.js +34 -0
- package/daemon/dist/domain/bundle-identity.js.map +1 -0
- package/daemon/dist/domain/bundle-install-context.d.ts +22 -0
- package/daemon/dist/domain/bundle-install-context.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-install-context.js +51 -0
- package/daemon/dist/domain/bundle-install-context.js.map +1 -0
- package/daemon/dist/domain/bundle-integrity.d.ts +1 -0
- package/daemon/dist/domain/bundle-integrity.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-integrity.js +1 -1
- package/daemon/dist/domain/bundle-integrity.js.map +1 -1
- package/daemon/dist/domain/bundle-source-resolver.d.ts +4 -1
- package/daemon/dist/domain/bundle-source-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-source-resolver.js +73 -19
- package/daemon/dist/domain/bundle-source-resolver.js.map +1 -1
- package/daemon/dist/domain/bundle-types.d.ts +37 -0
- package/daemon/dist/domain/bundle-types.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-types.js +78 -0
- package/daemon/dist/domain/bundle-types.js.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +4 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +45 -10
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/codex-team-workspace.d.ts +8 -0
- package/daemon/dist/domain/codex-team-workspace.d.ts.map +1 -0
- package/daemon/dist/domain/codex-team-workspace.js +54 -0
- package/daemon/dist/domain/codex-team-workspace.js.map +1 -0
- package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/context-monitor.js +7 -1
- package/daemon/dist/domain/context-monitor.js.map +1 -1
- package/daemon/dist/domain/daemon-version.d.ts +3 -1
- package/daemon/dist/domain/daemon-version.d.ts.map +1 -1
- package/daemon/dist/domain/daemon-version.js +6 -1
- package/daemon/dist/domain/daemon-version.js.map +1 -1
- package/daemon/dist/domain/event-loop-monitor.d.ts +6 -0
- package/daemon/dist/domain/event-loop-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/event-loop-monitor.js +13 -0
- package/daemon/dist/domain/event-loop-monitor.js.map +1 -1
- package/daemon/dist/domain/finite-telemetry.d.ts +74 -0
- package/daemon/dist/domain/finite-telemetry.d.ts.map +1 -0
- package/daemon/dist/domain/finite-telemetry.js +236 -0
- package/daemon/dist/domain/finite-telemetry.js.map +1 -0
- package/daemon/dist/domain/gateway/connections-projection.d.ts +1 -1
- package/daemon/dist/domain/gateway/gateway-subsystem.d.ts +2 -0
- package/daemon/dist/domain/gateway/gateway-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/gateway-subsystem.js +4 -0
- package/daemon/dist/domain/gateway/gateway-subsystem.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/channel-recovery.d.ts +45 -0
- package/daemon/dist/domain/gateway/slack/channel-recovery.d.ts.map +1 -0
- package/daemon/dist/domain/gateway/slack/channel-recovery.js +176 -0
- package/daemon/dist/domain/gateway/slack/channel-recovery.js.map +1 -0
- package/daemon/dist/domain/gateway/slack/inbound.d.ts +3 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.js +19 -8
- package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts +1 -0
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.js +3 -1
- 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 +7 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/socket-inbound.d.ts +4 -0
- package/daemon/dist/domain/gateway/slack/socket-inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/socket-inbound.js +11 -1
- package/daemon/dist/domain/gateway/slack/socket-inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/state-store.d.ts +24 -0
- package/daemon/dist/domain/gateway/slack/state-store.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/state-store.js +84 -1
- package/daemon/dist/domain/gateway/slack/state-store.js.map +1 -1
- package/daemon/dist/domain/generated-file-hygiene.d.ts +3 -0
- package/daemon/dist/domain/generated-file-hygiene.d.ts.map +1 -0
- package/daemon/dist/domain/generated-file-hygiene.js +142 -0
- package/daemon/dist/domain/generated-file-hygiene.js.map +1 -0
- package/daemon/dist/domain/install-planner.d.ts.map +1 -1
- package/daemon/dist/domain/install-planner.js +17 -0
- package/daemon/dist/domain/install-planner.js.map +1 -1
- package/daemon/dist/domain/managed-blocks.d.ts +1 -0
- package/daemon/dist/domain/managed-blocks.d.ts.map +1 -1
- package/daemon/dist/domain/managed-blocks.js +3 -0
- package/daemon/dist/domain/managed-blocks.js.map +1 -1
- package/daemon/dist/domain/native-permission-store.d.ts +14 -0
- package/daemon/dist/domain/native-permission-store.d.ts.map +1 -1
- package/daemon/dist/domain/native-permission-store.js +168 -4
- package/daemon/dist/domain/native-permission-store.js.map +1 -1
- package/daemon/dist/domain/native-process-executable.d.ts +4 -0
- package/daemon/dist/domain/native-process-executable.d.ts.map +1 -0
- package/daemon/dist/domain/native-process-executable.js +53 -0
- package/daemon/dist/domain/native-process-executable.js.map +1 -0
- package/daemon/dist/domain/native-process-lineage.d.ts +2 -0
- package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-lineage.js +34 -7
- package/daemon/dist/domain/native-process-lineage.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe.d.ts +3 -1
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +38 -7
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/permission-policy/policy-ref.d.ts +6 -1
- package/daemon/dist/domain/permission-policy/policy-ref.d.ts.map +1 -1
- package/daemon/dist/domain/permission-policy/policy-ref.js +16 -4
- package/daemon/dist/domain/permission-policy/policy-ref.js.map +1 -1
- package/daemon/dist/domain/permission-policy/policy-spec.d.ts +1 -1
- package/daemon/dist/domain/permission-policy/policy-spec.d.ts.map +1 -1
- package/daemon/dist/domain/permission-policy/policy-spec.js +2 -2
- package/daemon/dist/domain/permission-policy/policy-spec.js.map +1 -1
- package/daemon/dist/domain/profile-resolver.d.ts +3 -2
- package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/profile-resolver.js +71 -9
- package/daemon/dist/domain/profile-resolver.js.map +1 -1
- package/daemon/dist/domain/projection-planner.d.ts +11 -0
- package/daemon/dist/domain/projection-planner.d.ts.map +1 -1
- package/daemon/dist/domain/projection-planner.js +1 -1
- package/daemon/dist/domain/projection-planner.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +36 -10
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
- package/daemon/dist/domain/queue-transition-log.js +12 -10
- package/daemon/dist/domain/queue-transition-log.js.map +1 -1
- package/daemon/dist/domain/readiness-timeout.d.ts +7 -0
- package/daemon/dist/domain/readiness-timeout.d.ts.map +1 -0
- package/daemon/dist/domain/readiness-timeout.js +19 -0
- package/daemon/dist/domain/readiness-timeout.js.map +1 -0
- package/daemon/dist/domain/request-phase-observer.d.ts +69 -0
- package/daemon/dist/domain/request-phase-observer.d.ts.map +1 -0
- package/daemon/dist/domain/request-phase-observer.js +206 -0
- package/daemon/dist/domain/request-phase-observer.js.map +1 -0
- package/daemon/dist/domain/restore-orchestrator.d.ts +2 -0
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +58 -12
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/rig-mode/operating-posture.d.ts +17 -1
- package/daemon/dist/domain/rig-mode/operating-posture.d.ts.map +1 -1
- package/daemon/dist/domain/rig-mode/operating-posture.js +53 -15
- package/daemon/dist/domain/rig-mode/operating-posture.js.map +1 -1
- package/daemon/dist/domain/rig-repository.d.ts +12 -5
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +49 -6
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +12 -3
- 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 +1 -0
- package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +8 -3
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +45 -12
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts +3 -2
- package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.js +18 -10
- 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 +5 -1
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/route-timing-recorder.d.ts.map +1 -1
- package/daemon/dist/domain/route-timing-recorder.js +2 -0
- package/daemon/dist/domain/route-timing-recorder.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +12 -3
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-adapter.js +1 -0
- package/daemon/dist/domain/runtime-adapter.js.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.js +10 -4
- package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts +2 -0
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +5 -7
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.d.ts.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.js +4 -0
- package/daemon/dist/domain/seat-launch-environment.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +4 -0
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +4 -0
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-status-service.d.ts +2 -1
- package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-status-service.js +6 -4
- package/daemon/dist/domain/seat-status-service.js.map +1 -1
- package/daemon/dist/domain/service-orchestrator.d.ts +1 -0
- package/daemon/dist/domain/service-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/service-orchestrator.js +4 -0
- package/daemon/dist/domain/service-orchestrator.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +5 -0
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +161 -14
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/skill-catalog.d.ts +19 -0
- package/daemon/dist/domain/skill-catalog.d.ts.map +1 -1
- package/daemon/dist/domain/skill-catalog.js +166 -17
- package/daemon/dist/domain/skill-catalog.js.map +1 -1
- package/daemon/dist/domain/skill-discovery.d.ts +1 -1
- package/daemon/dist/domain/skill-discovery.d.ts.map +1 -1
- package/daemon/dist/domain/skill-discovery.js +6 -0
- package/daemon/dist/domain/skill-discovery.js.map +1 -1
- package/daemon/dist/domain/slow-op-recorder.d.ts +5 -0
- package/daemon/dist/domain/slow-op-recorder.d.ts.map +1 -1
- package/daemon/dist/domain/slow-op-recorder.js +34 -1
- package/daemon/dist/domain/slow-op-recorder.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts +30 -5
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +143 -43
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/startup-proof.d.ts +7 -0
- package/daemon/dist/domain/startup-proof.d.ts.map +1 -1
- package/daemon/dist/domain/startup-proof.js +7 -0
- package/daemon/dist/domain/startup-proof.js.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.d.ts +5 -1
- package/daemon/dist/domain/startup-submission-evidence.d.ts.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.js +19 -2
- package/daemon/dist/domain/startup-submission-evidence.js.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts +9 -3
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +12 -4
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/system-world.d.ts +3 -0
- package/daemon/dist/domain/system-world.d.ts.map +1 -1
- package/daemon/dist/domain/system-world.js +24 -21
- package/daemon/dist/domain/system-world.js.map +1 -1
- package/daemon/dist/domain/terminal/cmux-provider-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/cmux-provider-adapter.js +2 -3
- package/daemon/dist/domain/terminal/cmux-provider-adapter.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts +19 -4
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.js +102 -8
- package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
- package/daemon/dist/domain/terminal/terminal-provider.d.ts +2 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.d.ts +10 -0
- package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.js +75 -6
- package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
- package/daemon/dist/domain/terminal/view-composer.d.ts +6 -0
- package/daemon/dist/domain/terminal/view-composer.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/view-composer.js +4 -2
- package/daemon/dist/domain/terminal/view-composer.js.map +1 -1
- package/daemon/dist/domain/topology/remote-up-leaf.d.ts +1 -0
- package/daemon/dist/domain/topology/remote-up-leaf.d.ts.map +1 -1
- package/daemon/dist/domain/topology/remote-up-leaf.js.map +1 -1
- package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-store.js +3 -2
- package/daemon/dist/domain/transcript-store.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +6 -0
- package/daemon/dist/domain/types.d.ts.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 +13 -0
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/workflow-runtime.d.ts +1 -1
- package/daemon/dist/domain/workspace/project-catalog.d.ts +20 -0
- package/daemon/dist/domain/workspace/project-catalog.d.ts.map +1 -1
- package/daemon/dist/domain/workspace/project-catalog.js +92 -0
- package/daemon/dist/domain/workspace/project-catalog.js.map +1 -1
- package/daemon/dist/domain/workspace/project-registration.d.ts +49 -0
- package/daemon/dist/domain/workspace/project-registration.d.ts.map +1 -0
- package/daemon/dist/domain/workspace/project-registration.js +251 -0
- package/daemon/dist/domain/workspace/project-registration.js.map +1 -0
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +2 -1
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/project-catalog-surface.d.ts +2 -1
- package/daemon/dist/project-catalog-surface.d.ts.map +1 -1
- package/daemon/dist/project-catalog-surface.js +1 -1
- package/daemon/dist/project-catalog-surface.js.map +1 -1
- package/daemon/dist/routes/bundles.d.ts.map +1 -1
- package/daemon/dist/routes/bundles.js +174 -413
- package/daemon/dist/routes/bundles.js.map +1 -1
- package/daemon/dist/routes/compaction.d.ts.map +1 -1
- package/daemon/dist/routes/compaction.js +14 -2
- package/daemon/dist/routes/compaction.js.map +1 -1
- package/daemon/dist/routes/env.d.ts.map +1 -1
- package/daemon/dist/routes/env.js +14 -4
- package/daemon/dist/routes/env.js.map +1 -1
- package/daemon/dist/routes/gateway.d.ts.map +1 -1
- package/daemon/dist/routes/gateway.js +5 -0
- package/daemon/dist/routes/gateway.js.map +1 -1
- package/daemon/dist/routes/projects.d.ts.map +1 -1
- package/daemon/dist/routes/projects.js +4 -2
- package/daemon/dist/routes/projects.js.map +1 -1
- package/daemon/dist/routes/rigs.d.ts.map +1 -1
- package/daemon/dist/routes/rigs.js +3 -2
- package/daemon/dist/routes/rigs.js.map +1 -1
- package/daemon/dist/routes/rigspec.js +4 -2
- package/daemon/dist/routes/rigspec.js.map +1 -1
- package/daemon/dist/routes/seat.js +11 -4
- package/daemon/dist/routes/seat.js.map +1 -1
- package/daemon/dist/routes/sessions.d.ts.map +1 -1
- package/daemon/dist/routes/sessions.js +2 -1
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/telemetry.d.ts +2 -0
- package/daemon/dist/routes/telemetry.d.ts.map +1 -1
- package/daemon/dist/routes/telemetry.js +16 -0
- package/daemon/dist/routes/telemetry.js.map +1 -1
- package/daemon/dist/routes/up.js +9 -5
- package/daemon/dist/routes/up.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 +4 -1
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/spec-validation-surface.d.ts +2 -0
- package/daemon/dist/spec-validation-surface.d.ts.map +1 -1
- package/daemon/dist/spec-validation-surface.js +2 -0
- package/daemon/dist/spec-validation-surface.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +33 -11
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/dist/system-world-surface.d.ts +1 -1
- package/daemon/dist/system-world-surface.d.ts.map +1 -1
- package/daemon/dist/system-world-surface.js +1 -1
- package/daemon/dist/system-world-surface.js.map +1 -1
- package/daemon/docs/reference/agent-spec.md +113 -67
- package/daemon/docs/reference/agent-startup-guide.md +106 -33
- package/daemon/docs/reference/agent-state-taxonomy.md +44 -13
- package/daemon/docs/reference/browser-access.md +8 -7
- package/daemon/docs/reference/bundle-formats.md +207 -0
- package/daemon/docs/reference/chain-file-convention.md +16 -7
- package/daemon/docs/reference/developing.md +7 -0
- package/daemon/docs/reference/edge-types.md +18 -10
- package/daemon/docs/reference/getting-started.md +423 -113
- package/daemon/docs/reference/health-diagnosis.md +14 -6
- package/daemon/docs/reference/help.md +33 -8
- package/daemon/docs/reference/host-resources.md +3 -2
- package/daemon/docs/reference/inventory-request-diagnostics.md +75 -0
- package/daemon/docs/reference/knowledge-maturity.md +3 -1
- package/daemon/docs/reference/legacy-topology-migration.md +4 -2
- package/daemon/docs/reference/lore-routing.md +3 -1
- package/daemon/docs/reference/mission-install.md +3 -1
- package/daemon/docs/reference/non-interruptive-mode.md +60 -0
- package/daemon/docs/reference/planning-dial.md +2 -1
- package/daemon/docs/reference/product-journey-sdlc.md +11 -6
- package/daemon/docs/reference/product-management-pass.md +3 -1
- package/daemon/docs/reference/project-workspace.md +80 -3
- package/daemon/docs/reference/publishing-a-rig-bundle.md +144 -0
- package/daemon/docs/reference/refocus-channel.md +14 -5
- package/daemon/docs/reference/release-boundary.md +7 -3
- package/daemon/docs/reference/rig-bundle.md +271 -42
- package/daemon/docs/reference/rig-spec.md +150 -26
- package/daemon/docs/reference/rosters.md +60 -0
- package/daemon/docs/reference/schemas/bundle-behaviour.v1.schema.json +546 -0
- package/daemon/docs/reference/schemas/bundle-common.v1.schema.json +110 -0
- package/daemon/docs/reference/schemas/bundle-configurations.v1.schema.json +67 -0
- package/daemon/docs/reference/schemas/bundle-status.v1.schema.json +323 -0
- package/daemon/docs/reference/schemas/fixtures/identity-vectors.json +80 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/behaviour/not-generated-with-sections.json +60 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/configurations/spaced-member.configurations.yaml +6 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/registry/listed-with-withdrawn-on.yaml +21 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/registry/missing-source.yaml +16 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/registry/parent-folder.yaml +20 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/registry/short-commit.yaml +20 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/registry/withdrawn-without-date.yaml +20 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/run-record/harness-check-with-configuration.json +75 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/run-record/unlabelable-platform.json +97 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/status/hand-edited-notice.json +61 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/status/tested-with-assistance.json +62 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/status/tested-without-records.json +59 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/status/unavailable-harness-with-result.json +61 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/status/unavailable-listing-with-label.json +61 -0
- package/daemon/docs/reference/schemas/fixtures/valid/behaviour/custom-not-generated.json +22 -0
- package/daemon/docs/reference/schemas/fixtures/valid/behaviour/legacy-archive-unknown-identity.json +53 -0
- package/daemon/docs/reference/schemas/fixtures/valid/behaviour/mixed-runtimes-default.json +101 -0
- package/daemon/docs/reference/schemas/fixtures/valid/behaviour/mixed-runtimes-yolo.json +102 -0
- package/daemon/docs/reference/schemas/fixtures/valid/behaviour/openrig-dev.recommended.json +258 -0
- package/daemon/docs/reference/schemas/fixtures/valid/configurations/openrig-dev.configurations.yaml +12 -0
- package/daemon/docs/reference/schemas/fixtures/valid/registry/openrig-dev.yaml +20 -0
- package/daemon/docs/reference/schemas/fixtures/valid/registry/withdrawn.yaml +21 -0
- package/daemon/docs/reference/schemas/fixtures/valid/run-record/pi-harness-check-blocked.json +74 -0
- package/daemon/docs/reference/schemas/fixtures/valid/run-record/team-assisted-pass.json +97 -0
- package/daemon/docs/reference/schemas/fixtures/valid/run-record/team-pass.json +97 -0
- package/daemon/docs/reference/schemas/fixtures/valid/run-record/withdraws-earlier.json +99 -0
- package/daemon/docs/reference/schemas/fixtures/valid/status/status.json +61 -0
- package/daemon/docs/reference/schemas/registry-entry.v1.schema.json +139 -0
- package/daemon/docs/reference/schemas/run-record.v1.schema.json +315 -0
- package/daemon/docs/reference/scoped-operating-posture.md +17 -9
- package/daemon/docs/reference/sdlc-conventions.md +42 -26
- package/daemon/docs/reference/slack-app-setup.md +52 -7
- package/daemon/docs/reference/stream-classifier-worker.md +21 -8
- package/daemon/docs/reference/telemetry.md +114 -0
- package/daemon/docs/reference/worktree-builds.md +12 -6
- package/daemon/policies/builtin/auto.policy.md +24 -0
- package/daemon/specs/agents/development/implementer/agent.yaml +2 -2
- package/daemon/specs/agents/development/qa/agent.yaml +1 -1
- package/daemon/specs/agents/product-management/pm/agent.yaml +10 -0
- package/daemon/specs/agents/shared/skills/core/agent-starters/SKILL.md +0 -6
- package/daemon/specs/agents/shared/skills/core/agent-startup-and-context-ingestion/SKILL.md +1 -8
- package/daemon/specs/agents/shared/skills/core/openrig-architect/SKILL.md +5 -5
- package/daemon/specs/agents/shared/skills/core/openrig-skills/SKILL.md +3 -4
- package/daemon/specs/agents/shared/skills/core/openrig-software-factory/SKILL.md +12 -9
- package/daemon/specs/agents/shared/skills/core/openrig-software-factory/references/worked-example.md +29 -29
- package/daemon/specs/agents/shared/skills/core/rig-bundles-and-shareable-artifacts/SKILL.md +0 -1
- package/daemon/specs/agents/shared/skills/core/session-source-fork/SKILL.md +0 -5
- package/daemon/specs/agents/shared/skills/process/agent-browser/OPENRIG.md +1 -1
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/SKILL.md +0 -2
- package/daemon/specs/rigs/focused/{adversarial-review → code-review}/rig.yaml +1 -1
- package/daemon/specs/rigs/focused/pm/CULTURE.md +21 -0
- package/daemon/specs/rigs/focused/{pm-team → pm}/rig.yaml +5 -5
- package/daemon/specs/rigs/focused/{research-team → research}/rig.yaml +1 -1
- package/daemon/specs/rigs/launch/factory/CULTURE.md +96 -0
- package/daemon/specs/rigs/launch/factory/guidance/advisor-role.md +10 -0
- package/daemon/specs/rigs/launch/factory/guidance/lead-first-move.md +23 -0
- package/daemon/specs/rigs/launch/{demo → factory}/rig.yaml +46 -35
- package/daemon/specs/rigs/{preview/product-team → launch/factory}/topology/instance/CRAFT.md +1 -1
- package/daemon/specs/rigs/{preview/product-team → launch/factory}/topology/rig/CRAFT.md +2 -2
- package/daemon/specs/rigs/{preview/product-team → launch/factory}/topology/rig/ORCHESTRATION-CRAFT.md +2 -2
- package/daemon/specs/rigs/{preview/product-team/topology/seats/dev1-qa → launch/factory/topology/seats/dev-qa}/CRAFT.md +1 -1
- package/daemon/specs/rigs/{preview/product-team/topology/seats/orch1-lead → launch/factory/topology/seats/orch-lead}/CRAFT.md +1 -1
- package/daemon/specs/rigs/{preview/product-team/topology/seats/rev1-r1 → launch/factory/topology/seats/review-r1}/CRAFT.md +1 -1
- package/daemon/specs/rigs/{preview/product-team/topology/seats/rev1-r2 → launch/factory/topology/seats/review-r2}/CRAFT.md +1 -1
- package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/guidance/role.md +37 -0
- package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/startup/context.md +12 -13
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +167 -4
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/startup/context.md +30 -7
- package/daemon/specs/rigs/launch/kernel/agents/queue/worker/guidance/role.md +37 -0
- package/daemon/specs/rigs/launch/kernel/culture/CULTURE.md +41 -0
- package/daemon/specs/rigs/launch/starter/CULTURE.md +39 -0
- package/daemon/specs/rigs/launch/starter/guidance/lead-first-move.md +23 -0
- package/daemon/specs/rigs/launch/{first-project-mixed → starter}/rig.yaml +11 -8
- package/dist/build-info.js +3 -3
- package/dist/bundle-behaviour.d.ts +10 -0
- package/dist/bundle-behaviour.d.ts.map +1 -0
- package/dist/bundle-behaviour.js +72 -0
- package/dist/bundle-behaviour.js.map +1 -0
- package/dist/commands/bootstrap.d.ts.map +1 -1
- package/dist/commands/bootstrap.js +30 -5
- package/dist/commands/bootstrap.js.map +1 -1
- package/dist/commands/bundle.d.ts +12 -0
- package/dist/commands/bundle.d.ts.map +1 -1
- package/dist/commands/bundle.js +286 -21
- package/dist/commands/bundle.js.map +1 -1
- package/dist/commands/capture.js +4 -4
- package/dist/commands/capture.js.map +1 -1
- package/dist/commands/compact-plan.js +2 -2
- package/dist/commands/compact-plan.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +3 -0
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/context.d.ts +3 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +66 -18
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/daemon.js +1 -1
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +7 -2
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +7 -1
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/env.js +1 -1
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/health.d.ts.map +1 -1
- package/dist/commands/health.js +4 -1
- package/dist/commands/health.js.map +1 -1
- package/dist/commands/host.d.ts +11 -0
- package/dist/commands/host.d.ts.map +1 -1
- package/dist/commands/host.js +25 -1
- package/dist/commands/host.js.map +1 -1
- package/dist/commands/import.d.ts.map +1 -1
- package/dist/commands/import.js +2 -0
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +25 -12
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/policy.d.ts.map +1 -1
- package/dist/commands/policy.js +3 -2
- package/dist/commands/policy.js.map +1 -1
- package/dist/commands/project-jev.js +1 -1
- package/dist/commands/project-jev.js.map +1 -1
- package/dist/commands/project.d.ts.map +1 -1
- package/dist/commands/project.js +5 -3
- package/dist/commands/project.js.map +1 -1
- package/dist/commands/ps.d.ts +1 -0
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +12 -2
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +4 -2
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/restore.d.ts.map +1 -1
- package/dist/commands/restore.js +5 -0
- package/dist/commands/restore.js.map +1 -1
- package/dist/commands/roster.d.ts +63 -0
- package/dist/commands/roster.d.ts.map +1 -0
- package/dist/commands/roster.js +169 -0
- package/dist/commands/roster.js.map +1 -0
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +57 -8
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +20 -6
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/setup.d.ts +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +72 -25
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/slack.d.ts +1 -1
- package/dist/commands/slack.d.ts.map +1 -1
- package/dist/commands/slack.js +49 -4
- package/dist/commands/slack.js.map +1 -1
- package/dist/commands/specs.d.ts.map +1 -1
- package/dist/commands/specs.js +19 -2
- package/dist/commands/specs.js.map +1 -1
- package/dist/commands/start.js +1 -1
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/telemetry.d.ts +5 -0
- package/dist/commands/telemetry.d.ts.map +1 -0
- package/dist/commands/telemetry.js +58 -0
- package/dist/commands/telemetry.js.map +1 -0
- package/dist/commands/terminal.js +1 -1
- package/dist/commands/terminal.js.map +1 -1
- package/dist/commands/tui.js +4 -4
- package/dist/commands/tui.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +115 -68
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/whoami.d.ts +3 -0
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +29 -2
- package/dist/commands/whoami.js.map +1 -1
- package/dist/config-store.d.ts +5 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +16 -1
- package/dist/config-store.js.map +1 -1
- package/dist/daemon-auto-start.d.ts +8 -0
- package/dist/daemon-auto-start.d.ts.map +1 -0
- package/dist/daemon-auto-start.js +39 -0
- package/dist/daemon-auto-start.js.map +1 -0
- package/dist/front-door.d.ts.map +1 -1
- package/dist/front-door.js +3 -2
- package/dist/front-door.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/bundle-check.d.ts +13 -0
- package/dist/lib/bundle-check.d.ts.map +1 -0
- package/dist/lib/bundle-check.js +191 -0
- package/dist/lib/bundle-check.js.map +1 -0
- package/dist/lib/bundle-configuration.d.ts +60 -0
- package/dist/lib/bundle-configuration.d.ts.map +1 -0
- package/dist/lib/bundle-configuration.js +198 -0
- package/dist/lib/bundle-configuration.js.map +1 -0
- package/dist/lib/bundle-source.d.ts +57 -0
- package/dist/lib/bundle-source.d.ts.map +1 -0
- package/dist/lib/bundle-source.js +355 -0
- package/dist/lib/bundle-source.js.map +1 -0
- package/dist/lib/context-install.d.ts.map +1 -1
- package/dist/lib/context-install.js +2 -3
- package/dist/lib/context-install.js.map +1 -1
- package/dist/lib/permission-policy/policy-ref.d.ts +6 -1
- package/dist/lib/permission-policy/policy-ref.d.ts.map +1 -1
- package/dist/lib/permission-policy/policy-ref.js +16 -4
- package/dist/lib/permission-policy/policy-ref.js.map +1 -1
- package/dist/lib/permission-policy/policy-spec.d.ts +1 -1
- package/dist/lib/permission-policy/policy-spec.d.ts.map +1 -1
- package/dist/lib/permission-policy/policy-spec.js +2 -2
- package/dist/lib/permission-policy/policy-spec.js.map +1 -1
- package/dist/lib/scope/templates.d.ts.map +1 -1
- package/dist/lib/scope/templates.js +1 -0
- package/dist/lib/scope/templates.js.map +1 -1
- package/dist/lib/scope-templates/notes.md +1 -1
- package/dist/lib/work-install.d.ts +12 -0
- package/dist/lib/work-install.d.ts.map +1 -1
- package/dist/lib/work-install.js +55 -4
- package/dist/lib/work-install.js.map +1 -1
- package/package.json +1 -1
- package/tui/dist/commands/registry.d.ts.map +1 -1
- package/tui/dist/commands/registry.js +8 -3
- package/tui/dist/commands/registry.js.map +1 -1
- package/tui/dist/daemon-client.d.ts +1 -0
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +5 -2
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/main.js +30 -3
- package/tui/dist/main.js.map +1 -1
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +66 -19
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/specs/graph.d.ts +5 -0
- package/tui/dist/specs/graph.d.ts.map +1 -0
- package/tui/dist/specs/graph.js +16 -0
- package/tui/dist/specs/graph.js.map +1 -0
- package/tui/dist/specs/launch.d.ts +29 -0
- package/tui/dist/specs/launch.d.ts.map +1 -0
- package/tui/dist/specs/launch.js +64 -0
- package/tui/dist/specs/launch.js.map +1 -0
- package/tui/dist/startup.d.ts.map +1 -1
- package/tui/dist/startup.js +15 -6
- package/tui/dist/startup.js.map +1 -1
- package/tui/dist/state.d.ts +2 -2
- package/tui/dist/state.d.ts.map +1 -1
- package/tui/dist/state.js +41 -18
- package/tui/dist/state.js.map +1 -1
- package/tui/dist/terminals/terminal-model.d.ts +1 -0
- package/tui/dist/terminals/terminal-model.d.ts.map +1 -1
- package/tui/dist/terminals/terminal-model.js +19 -2
- package/tui/dist/terminals/terminal-model.js.map +1 -1
- package/tui/dist/types.d.ts +17 -0
- package/tui/dist/types.d.ts.map +1 -1
- package/daemon/specs/rigs/launch/conveyor/README.md +0 -33
- package/daemon/specs/rigs/launch/conveyor/rig.yaml +0 -72
- package/daemon/specs/rigs/launch/demo/project-example/README.md +0 -25
- package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/SPEC.md +0 -19
- package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/PROGRESS.md +0 -6
- package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/PROOF.md +0 -7
- package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/SPEC.md +0 -31
- package/daemon/specs/rigs/launch/first-project/rig.yaml +0 -31
- package/daemon/specs/rigs/launch/first-project-claude/rig.yaml +0 -30
- package/daemon/specs/rigs/launch/implementation-pair/rig.yaml +0 -27
- package/daemon/specs/rigs/preview/product-team/rig.yaml +0 -90
- /package/daemon/specs/rigs/launch/factory-rsi/{rig.yaml → world-bundle.yaml} +0 -0
|
@@ -126,6 +126,8 @@ export class SlowOpRecorder {
|
|
|
126
126
|
// record it could not durably write (ok:false). The Worker stays alive, but
|
|
127
127
|
// durability is lost, so flush()/close() must refuse to report a clean drain.
|
|
128
128
|
acknowledgedWriteFailure = false;
|
|
129
|
+
diagnosticIds = new Set();
|
|
130
|
+
diagnostic = { offered: 0, enqueued: 0, dropped: 0, acknowledged: 0, failed: 0 };
|
|
129
131
|
constructor(options) {
|
|
130
132
|
this.logPath = options.logPath;
|
|
131
133
|
this.maxBytes = options.maxBytes ?? SLOW_OPERATION_ROTATION_BYTES;
|
|
@@ -137,6 +139,12 @@ export class SlowOpRecorder {
|
|
|
137
139
|
this.worker.on("message", (message) => {
|
|
138
140
|
if (!message.id)
|
|
139
141
|
return;
|
|
142
|
+
if (this.diagnosticIds.delete(message.id)) {
|
|
143
|
+
if (message.ok === false)
|
|
144
|
+
this.diagnostic.failed++;
|
|
145
|
+
else
|
|
146
|
+
this.diagnostic.acknowledged++;
|
|
147
|
+
}
|
|
140
148
|
if (message.ok === false) {
|
|
141
149
|
// Latch the lost durability BEFORE resolving this waiter (the write
|
|
142
150
|
// attempt is done, just failed): keep the one-shot degraded signal and
|
|
@@ -231,6 +239,27 @@ export class SlowOpRecorder {
|
|
|
231
239
|
return;
|
|
232
240
|
this.recordMeasurement(`request:${site}`, durationMs);
|
|
233
241
|
}
|
|
242
|
+
recordDiagnostic(record) {
|
|
243
|
+
this.diagnostic.offered++;
|
|
244
|
+
const coverage = { ...this.diagnostic, pending: this.diagnosticIds.size,
|
|
245
|
+
recorderHealthy: this.degraded.healthy, maxBytes: this.maxBytes, rotationCount: this.rotationCount };
|
|
246
|
+
let bytes;
|
|
247
|
+
try {
|
|
248
|
+
bytes = Buffer.byteLength(JSON.stringify({ ...record, coverage }));
|
|
249
|
+
}
|
|
250
|
+
catch {
|
|
251
|
+
this.diagnostic.dropped++;
|
|
252
|
+
return false;
|
|
253
|
+
}
|
|
254
|
+
if (this.closed || this.terminalReason !== null || this.diagnosticIds.size >= 1024 || bytes > 1024) {
|
|
255
|
+
this.diagnostic.dropped++;
|
|
256
|
+
return false;
|
|
257
|
+
}
|
|
258
|
+
this.diagnostic.enqueued++;
|
|
259
|
+
void this.postAndWait({ type: "append", logPath: this.logPath, maxBytes: this.maxBytes,
|
|
260
|
+
rotationCount: this.rotationCount, record: { ...record, coverage } }, true).catch(() => { });
|
|
261
|
+
return true;
|
|
262
|
+
}
|
|
234
263
|
async flush() {
|
|
235
264
|
if (this.closed)
|
|
236
265
|
return;
|
|
@@ -287,7 +316,7 @@ export class SlowOpRecorder {
|
|
|
287
316
|
record,
|
|
288
317
|
}).catch(() => { });
|
|
289
318
|
}
|
|
290
|
-
postAndWait(message) {
|
|
319
|
+
postAndWait(message, diagnostic = false) {
|
|
291
320
|
if (this.closed)
|
|
292
321
|
return Promise.resolve();
|
|
293
322
|
if (this.terminalReason !== null)
|
|
@@ -295,6 +324,8 @@ export class SlowOpRecorder {
|
|
|
295
324
|
const id = randomUUID();
|
|
296
325
|
return new Promise((resolve, reject) => {
|
|
297
326
|
this.pending.set(id, { resolve, reject });
|
|
327
|
+
if (diagnostic)
|
|
328
|
+
this.diagnosticIds.add(id);
|
|
298
329
|
try {
|
|
299
330
|
this.worker.postMessage({ ...message, id });
|
|
300
331
|
}
|
|
@@ -325,6 +356,8 @@ export class SlowOpRecorder {
|
|
|
325
356
|
for (const waiter of this.pending.values())
|
|
326
357
|
waiter.reject(error);
|
|
327
358
|
this.pending.clear();
|
|
359
|
+
this.diagnostic.failed += this.diagnosticIds.size;
|
|
360
|
+
this.diagnosticIds.clear();
|
|
328
361
|
}
|
|
329
362
|
markDegraded(reason, site) {
|
|
330
363
|
if (!this.degraded.healthy)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slow-op-recorder.js","sourceRoot":"","sources":["../../src/domain/slow-op-recorder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,MAAM,CAAC,MAAM,iCAAiC,GAAG,GAAG,CAAC;AACrD,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAC/C,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,GAAG,IAAI,CAAC;AACzD,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC;AAC/C,MAAM,CAAC,MAAM,2BAA2B,GAAG,uBAAuB,CAAC;AAQnE;;;;;GAKG;AACH,MAAM,OAAO,6BAA8B,SAAQ,KAAK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AAC,IAAI,CAAC,cAAc,IAAI,qBAAqB,CAAC,CAAC;IACzF,CAAC;IAED;;;;;OAKG;IACK,qBAAqB,CAAC,MAAc,EAAE,IAAI,GAAG,iBAAiB;QACpE,IAAI,IAAI,CAAC,cAAc,KAAK,IAAI;YAAE,OAAO;QACzC,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;QAC7B,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QACnC,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACjE,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QACrB,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC;QAClD,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;IAC7B,CAAC;IAEO,YAAY,CAAC,MAAc,EAAE,IAAY;QAC/C,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO;YAAE,OAAO;QACnC,IAAI,CAAC,QAAQ,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACjD,IAAI,CAAC;YACH,IAAI,CAAC,eAAe,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3C,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;IACZ,CAAC;CACF"}
|
|
@@ -6,6 +6,9 @@ import type { StartupAction } from "./types.js";
|
|
|
6
6
|
import type { RuntimeAdapter, NodeBinding, ResolvedStartupFile, ForkSource } from "./runtime-adapter.js";
|
|
7
7
|
import type { ProjectionPlan } from "./projection-planner.js";
|
|
8
8
|
import { type StartupSubmissionDiagnostic } from "./startup-submission-evidence.js";
|
|
9
|
+
import { SettingsStore } from "./user-settings/settings-store.js";
|
|
10
|
+
/** Pending context belongs to this occupant and is consumed before delivery starts. */
|
|
11
|
+
export declare function hasPendingFreshStartup(db: Database.Database, nodeId: string, sessionId: string): boolean;
|
|
9
12
|
export interface StartupInput {
|
|
10
13
|
rigId: string;
|
|
11
14
|
nodeId: string;
|
|
@@ -42,16 +45,18 @@ export interface StartupInput {
|
|
|
42
45
|
skipHarnessLaunch?: boolean;
|
|
43
46
|
/** Allow runtime adapter retry_fresh fallback when native resume data is stale. */
|
|
44
47
|
allowFreshFallback?: boolean;
|
|
45
|
-
/** Exact resume
|
|
48
|
+
/** Exact resume preserves saved context; its empty Claude plan must not disable activity hooks. */
|
|
46
49
|
preserveStartupContext?: boolean;
|
|
47
50
|
/** Continue the same fresh occupant after a prerequisite, without another harness launch. */
|
|
48
51
|
continueFreshStartup?: boolean;
|
|
49
52
|
/** Deliberate fresh replacement retains the seat’s durable destination obligations. */
|
|
50
53
|
includeDurableObligations?: boolean;
|
|
51
|
-
/** Readiness timeout in ms (
|
|
54
|
+
/** Readiness timeout in ms (defaults to runtime.readiness_timeout_seconds). */
|
|
52
55
|
readinessTimeoutMs?: number;
|
|
53
56
|
}
|
|
54
57
|
export type StartupResult = {
|
|
58
|
+
warnings?: string[];
|
|
59
|
+
} & ({
|
|
55
60
|
ok: true;
|
|
56
61
|
startupStatus: "ready";
|
|
57
62
|
continuityOutcome: "resumed" | "fresh" | "forked" | "rebuilt";
|
|
@@ -66,7 +71,7 @@ export type StartupResult = {
|
|
|
66
71
|
startupStatus: "attention_required" | "failed";
|
|
67
72
|
errors: string[];
|
|
68
73
|
evidence?: string;
|
|
69
|
-
};
|
|
74
|
+
});
|
|
70
75
|
interface StartupOrchestratorDeps {
|
|
71
76
|
db: Database.Database;
|
|
72
77
|
sessionRegistry: SessionRegistry;
|
|
@@ -76,6 +81,7 @@ interface StartupOrchestratorDeps {
|
|
|
76
81
|
readFile?: (path: string) => string;
|
|
77
82
|
/** Sleep between paste and submit for tmux-driven TUIs. */
|
|
78
83
|
sleep?: (ms: number) => Promise<void>;
|
|
84
|
+
readinessSettings?: Pick<SettingsStore, "resolveOne">;
|
|
79
85
|
}
|
|
80
86
|
/**
|
|
81
87
|
* Drives one node from projected resources to startup_status: ready.
|
|
@@ -85,7 +91,7 @@ interface StartupOrchestratorDeps {
|
|
|
85
91
|
* 2. Project resources (filesystem)
|
|
86
92
|
* 3. Deliver pre-launch files (guidance_merge, skill_install → filesystem)
|
|
87
93
|
* 4. Launch harness via adapter.launchHarness()
|
|
88
|
-
* 5. Wait for harness ready (retry with exponential backoff,
|
|
94
|
+
* 5. Wait for harness ready (retry with exponential backoff, configurable timeout)
|
|
89
95
|
* 6. For fresh sessions, inject the built-in identity anchor as the first prompt
|
|
90
96
|
* and deliver remaining post-launch files (send_text → TUI)
|
|
91
97
|
* 7. Execute after_files actions
|
|
@@ -105,9 +111,11 @@ export declare class StartupOrchestrator {
|
|
|
105
111
|
private sleep;
|
|
106
112
|
private appliedLaunchStore;
|
|
107
113
|
private sessionTransport;
|
|
114
|
+
private readinessSettings;
|
|
108
115
|
constructor(deps: StartupOrchestratorDeps);
|
|
109
116
|
private readFile;
|
|
110
117
|
startNode(input: StartupInput): Promise<StartupResult>;
|
|
118
|
+
private startNodeWithWarnings;
|
|
111
119
|
/** A failed attempt can continue only when it stopped before sending context.
|
|
112
120
|
* Any newer pending/ready/failure event consumes that permission, including a
|
|
113
121
|
* daemon loss during delivery: uncertain delivery is never blindly replayed.
|
|
@@ -115,7 +123,7 @@ export declare class StartupOrchestrator {
|
|
|
115
123
|
canContinueFresh(nodeId: string, sessionId: string): boolean;
|
|
116
124
|
/**
|
|
117
125
|
* Wait for harness readiness with exponential backoff.
|
|
118
|
-
* Backoff: 1s → 2s → 4s → 8s → 16s (capped)
|
|
126
|
+
* Backoff: 1s → 2s → 4s → 8s → 16s (capped); the caller supplies the deadline.
|
|
119
127
|
*/
|
|
120
128
|
private waitForReady;
|
|
121
129
|
private safeReadFile;
|
|
@@ -132,7 +140,24 @@ export declare class StartupOrchestrator {
|
|
|
132
140
|
* normally (role.md removed once bundled).
|
|
133
141
|
*/
|
|
134
142
|
private deliverRestorePreloadPrompt;
|
|
143
|
+
/**
|
|
144
|
+
* Claude only: the challenge reached the seat inside a paste, which Claude won't act on alone.
|
|
145
|
+
* One short line in the person's turn asks it to run the challenge's own command. Best-effort: a
|
|
146
|
+
* failed send is a submission warning, never a startup failure. It is sent only after the startup
|
|
147
|
+
* prompt was observed submitted: staged, unverified or unobservable input stays in the composer
|
|
148
|
+
* for the operator, and nothing is typed on top of it.
|
|
149
|
+
*/
|
|
150
|
+
private sendProofInstruction;
|
|
151
|
+
private recordSubmissionWarning;
|
|
135
152
|
private sendInteractiveText;
|
|
153
|
+
/**
|
|
154
|
+
* Claude can take the startup Enter after the first look while the composer still shows our paste collapsed.
|
|
155
|
+
* Only that transient is looked at again, until the composer reads clear or staged, shows anything else, or
|
|
156
|
+
* the looks run out. A draft, ghost text or any other mismatch keeps its first-look verdict. Observation only.
|
|
157
|
+
* Remaining ambiguity: a person who clears a collapsed paste with the same line count inside the window reads
|
|
158
|
+
* as submitted.
|
|
159
|
+
*/
|
|
160
|
+
private settleOwnPaste;
|
|
136
161
|
}
|
|
137
162
|
export {};
|
|
138
163
|
//# sourceMappingURL=startup-orchestrator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startup-orchestrator.d.ts","sourceRoot":"","sources":["../../src/domain/startup-orchestrator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"startup-orchestrator.d.ts","sourceRoot":"","sources":["../../src/domain/startup-orchestrator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MA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AC9B,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAC/B,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,KAAK,CAAgC;IAC7C,OAAO,CAAC,kBAAkB,CAAgC;IAC1D,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,iBAAiB,CAAoC;gBAEjD,IAAI,EAAE,uBAAuB;IAoBzC,OAAO,CAAC,QAAQ,CAA2B;IAErC,SAAS,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC;YAM9C,qBAAqB;IAoXnC;;;OAGG;IACH,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO;IAI5D;;;OAGG;YACW,YAAY;IA0B1B,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,IAAI;YAuBE,cAAc;IAyC5B,OAAO,CAAC,4BAA4B;YAOtB,2BAA2B;IA8CzC;;;;;;;OAOG;YACW,2BAA2B;IAoCzC;;;;;;OAMG;YACW,oBAAoB;IAUlC,OAAO,CAAC,uBAAuB;YAOjB,mBAAmB;IAmFjC;;;;;;OAMG;YACW,cAAc;CAc7B"}
|
|
@@ -1,15 +1,31 @@
|
|
|
1
|
+
import { nonInterruptiveNotice } from "../adapters/non-interruptive.js";
|
|
1
2
|
import { randomUUID } from "node:crypto";
|
|
2
3
|
import { isClaudeResumeType } from "../adapters/claude-resume.js";
|
|
3
4
|
import { isAttentionRequiredReadinessCode, resolveConcreteHint } from "./runtime-adapter.js";
|
|
4
|
-
import { issueStartupChallenge } from "./startup-proof.js";
|
|
5
|
+
import { issueStartupChallenge, STARTUP_PROOF_INSTRUCTION_LINE } from "./startup-proof.js";
|
|
5
6
|
import { resolveStartupProof } from "./startup-resolver.js";
|
|
6
7
|
import { AppliedLaunchObservationStore } from "./applied-launch-observation-store.js";
|
|
7
8
|
import { NativePermissionStore } from "./native-permission-store.js";
|
|
8
9
|
import { RigRepository } from "./rig-repository.js";
|
|
9
10
|
import { SessionTransport, inspectStartupStagedText } from "./session-transport.js";
|
|
10
|
-
import { startupSubmissionEvidence } from "./startup-submission-evidence.js";
|
|
11
|
+
import { startupOwnCollapsedPaste, startupSubmissionEvidence } from "./startup-submission-evidence.js";
|
|
12
|
+
import { resolveReadinessTimeoutMs } from "./readiness-timeout.js";
|
|
13
|
+
import { SettingsStore } from "./user-settings/settings-store.js";
|
|
14
|
+
import { shellQuote } from "../adapters/shell-quote.js";
|
|
11
15
|
// Expanded startup text can put the current input marker above 50 scrollback lines.
|
|
12
16
|
const STARTUP_SUBMIT_CAPTURE_LINES = 200;
|
|
17
|
+
// Claude Code 2.1.289 has taken Enter on a large startup paste after the first look, while the composer
|
|
18
|
+
// still showed that paste collapsed. Only that transient is looked at again, 200 ms apart, up to this many
|
|
19
|
+
// times: about 5 s of waiting per send, plus capture time. Nothing is typed meanwhile.
|
|
20
|
+
const STARTUP_SUBMIT_SETTLE_LOOKS = 25;
|
|
21
|
+
/** Pending context belongs to this occupant and is consumed before delivery starts. */
|
|
22
|
+
export function hasPendingFreshStartup(db, nodeId, sessionId) {
|
|
23
|
+
const row = db.prepare("SELECT payload FROM events WHERE node_id = ? AND type IN ('node.startup_pending', 'node.startup_ready', 'node.startup_failed') ORDER BY seq DESC LIMIT 1").get(nodeId);
|
|
24
|
+
if (!row)
|
|
25
|
+
return false;
|
|
26
|
+
const event = JSON.parse(row.payload);
|
|
27
|
+
return event.type === "node.startup_failed" && event.sessionId === sessionId && event.freshContextPending === true;
|
|
28
|
+
}
|
|
13
29
|
/**
|
|
14
30
|
* Drives one node from projected resources to startup_status: ready.
|
|
15
31
|
*
|
|
@@ -18,7 +34,7 @@ const STARTUP_SUBMIT_CAPTURE_LINES = 200;
|
|
|
18
34
|
* 2. Project resources (filesystem)
|
|
19
35
|
* 3. Deliver pre-launch files (guidance_merge, skill_install → filesystem)
|
|
20
36
|
* 4. Launch harness via adapter.launchHarness()
|
|
21
|
-
* 5. Wait for harness ready (retry with exponential backoff,
|
|
37
|
+
* 5. Wait for harness ready (retry with exponential backoff, configurable timeout)
|
|
22
38
|
* 6. For fresh sessions, inject the built-in identity anchor as the first prompt
|
|
23
39
|
* and deliver remaining post-launch files (send_text → TUI)
|
|
24
40
|
* 7. Execute after_files actions
|
|
@@ -38,6 +54,7 @@ export class StartupOrchestrator {
|
|
|
38
54
|
sleep;
|
|
39
55
|
appliedLaunchStore;
|
|
40
56
|
sessionTransport;
|
|
57
|
+
readinessSettings;
|
|
41
58
|
constructor(deps) {
|
|
42
59
|
if (deps.db !== deps.sessionRegistry.db)
|
|
43
60
|
throw new Error("StartupOrchestrator: sessionRegistry must share the same db handle");
|
|
@@ -49,6 +66,7 @@ export class StartupOrchestrator {
|
|
|
49
66
|
this.tmuxAdapter = deps.tmuxAdapter;
|
|
50
67
|
this.readFile = deps.readFile ?? (() => "");
|
|
51
68
|
this.sleep = deps.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
69
|
+
this.readinessSettings = deps.readinessSettings ?? new SettingsStore();
|
|
52
70
|
this.appliedLaunchStore = new AppliedLaunchObservationStore(deps.db);
|
|
53
71
|
this.sessionTransport = new SessionTransport({
|
|
54
72
|
db: deps.db,
|
|
@@ -60,9 +78,14 @@ export class StartupOrchestrator {
|
|
|
60
78
|
}
|
|
61
79
|
readFile;
|
|
62
80
|
async startNode(input) {
|
|
81
|
+
const warnings = [];
|
|
82
|
+
const result = await this.startNodeWithWarnings(input, warnings);
|
|
83
|
+
return { ...result, ...(warnings.length ? { warnings: [...new Set(warnings)] } : {}) };
|
|
84
|
+
}
|
|
85
|
+
async startNodeWithWarnings(input, warnings) {
|
|
63
86
|
const guard = this.tmuxAdapter.deliveryGuard;
|
|
64
87
|
if (guard && !guard.ownsLifecycle(input.nodeId)) {
|
|
65
|
-
return guard.lifecycle([input.nodeId], () => this.
|
|
88
|
+
return guard.lifecycle([input.nodeId], () => this.startNodeWithWarnings(input, warnings));
|
|
66
89
|
}
|
|
67
90
|
try {
|
|
68
91
|
input = { ...input, binding: new NativePermissionStore(this.db).apply(input.binding, input.adapter.runtime) };
|
|
@@ -74,10 +97,12 @@ export class StartupOrchestrator {
|
|
|
74
97
|
// guidance through here, so the rig's managed-block destination is bound once
|
|
75
98
|
// for the adapter. Handover does not come here: the successor launches directly
|
|
76
99
|
// and reads the file already written in its cwd.
|
|
77
|
-
const
|
|
100
|
+
const rigRepo = new RigRepository(this.db);
|
|
101
|
+
input = { ...input, binding: { ...input.binding, nonInterruptive: rigRepo.getRigNonInterruptive(input.rigId) } };
|
|
102
|
+
const claudeManagedBlockFile = rigRepo.getRigClaudeManagedBlockFile(input.rigId);
|
|
78
103
|
if (claudeManagedBlockFile)
|
|
79
104
|
input = { ...input, binding: { ...input.binding, claudeManagedBlockFile } };
|
|
80
|
-
const deliveryInput = { ...input, submissionWarnings: [], startupAttemptId: randomUUID(), sendOrder: 0, submissionDiagnostics: [] };
|
|
105
|
+
const deliveryInput = { ...input, warnings, submissionWarnings: [], startupAttemptId: randomUUID(), sendOrder: 0, submissionDiagnostics: [] };
|
|
81
106
|
const errors = [];
|
|
82
107
|
let continuityOutcome = input.resumeToken
|
|
83
108
|
? "resumed"
|
|
@@ -99,21 +124,26 @@ export class StartupOrchestrator {
|
|
|
99
124
|
return this.fail(input, "failed", [`Startup proof selection: ${err.message}`]);
|
|
100
125
|
}
|
|
101
126
|
this.eventBus.emit({ type: "node.startup_pending", rigId: input.rigId, nodeId: input.nodeId, startupProof });
|
|
102
|
-
// 2. Project resources
|
|
127
|
+
// 2. Project resources. A contained Claude resume has an intentionally empty
|
|
128
|
+
// replay plan, not a newly selected profile with activity hooks removed.
|
|
129
|
+
// RestoreOrchestrator already reconciled the saved activity selection before
|
|
130
|
+
// native resume. Fresh launches still project empty plans to support removal.
|
|
103
131
|
let projectionResult;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
132
|
+
if (!(input.preserveStartupContext && input.adapter.runtime === "claude-code" && input.plan.entries.length === 0))
|
|
133
|
+
try {
|
|
134
|
+
projectionResult = await input.adapter.project(input.plan, input.binding);
|
|
135
|
+
warnings.push(...(projectionResult.warnings ?? []));
|
|
136
|
+
if (projectionResult.failed.length > 0) {
|
|
137
|
+
for (const f of projectionResult.failed) {
|
|
138
|
+
errors.push(`Projection failed for ${f.effectiveId}: ${f.error}`);
|
|
139
|
+
}
|
|
140
|
+
return this.fail(input, "failed", errors);
|
|
109
141
|
}
|
|
142
|
+
}
|
|
143
|
+
catch (err) {
|
|
144
|
+
errors.push(`Projection error: ${err.message}`);
|
|
110
145
|
return this.fail(input, "failed", errors);
|
|
111
146
|
}
|
|
112
|
-
}
|
|
113
|
-
catch (err) {
|
|
114
|
-
errors.push(`Projection error: ${err.message}`);
|
|
115
|
-
return this.fail(input, "failed", errors);
|
|
116
|
-
}
|
|
117
147
|
// 3. Partition startup files by concrete hint: pre-launch (filesystem) vs post-launch (TUI)
|
|
118
148
|
// Note: new file-building paths (NS-T05+) emit only concrete hints. The auto fallback
|
|
119
149
|
// is compatibility-only for pre-NS-T05 persisted startup contexts in node_startup_context.
|
|
@@ -143,6 +173,7 @@ export class StartupOrchestrator {
|
|
|
143
173
|
// Always call even with empty list so adapters can provision runtime-specific config (e.g. context collectors)
|
|
144
174
|
try {
|
|
145
175
|
const deliveryResult = await input.adapter.deliverStartup(preLaunchFiles, input.binding);
|
|
176
|
+
warnings.push(...(deliveryResult.warnings ?? []));
|
|
146
177
|
if (deliveryResult.failed.length > 0) {
|
|
147
178
|
for (const f of deliveryResult.failed) {
|
|
148
179
|
errors.push(`Pre-launch file delivery failed: ${f.path}: ${f.error}`);
|
|
@@ -175,6 +206,9 @@ export class StartupOrchestrator {
|
|
|
175
206
|
});
|
|
176
207
|
if (launchResult.ok) {
|
|
177
208
|
appliedLaunch = launchResult.appliedLaunch;
|
|
209
|
+
const notice = nonInterruptiveNotice(input.adapter.runtime, input.binding);
|
|
210
|
+
if (notice)
|
|
211
|
+
warnings.push(`${input.sessionName ?? input.nodeId}: ${notice}`);
|
|
178
212
|
const normalizedResumeToken = launchResult.resumeToken?.trim();
|
|
179
213
|
if (normalizedResumeToken) {
|
|
180
214
|
try {
|
|
@@ -238,15 +272,16 @@ export class StartupOrchestrator {
|
|
|
238
272
|
reason: input.adapter.runtime === "terminal" ? "terminal" : "not_selected",
|
|
239
273
|
});
|
|
240
274
|
}
|
|
241
|
-
// 6. Wait for harness readiness
|
|
275
|
+
// 6. Wait for harness readiness within the configured launch window.
|
|
242
276
|
try {
|
|
243
|
-
const
|
|
277
|
+
const readinessTimeoutMs = resolveReadinessTimeoutMs(input.readinessTimeoutMs, this.readinessSettings);
|
|
278
|
+
const readiness = await this.waitForReady(input.adapter, input.binding, readinessTimeoutMs);
|
|
244
279
|
if (!readiness.ready) {
|
|
245
280
|
if (isAttentionRequiredReadinessCode(readiness.code)) {
|
|
246
281
|
errors.push(`Startup requires attention: ${readiness.reason ?? "unknown"}`);
|
|
247
282
|
return this.fail(input, "attention_required", errors, undefined, isFreshLaunch);
|
|
248
283
|
}
|
|
249
|
-
errors.push(`Readiness timeout after
|
|
284
|
+
errors.push(`Readiness timeout after ${readinessTimeoutMs / 1000}s — harness did not become interactive: ${readiness.reason ?? "unknown"}`);
|
|
250
285
|
return this.fail(input, "failed", errors);
|
|
251
286
|
}
|
|
252
287
|
}
|
|
@@ -281,6 +316,8 @@ export class StartupOrchestrator {
|
|
|
281
316
|
return this.fail(input, "failed", errors);
|
|
282
317
|
}
|
|
283
318
|
postLaunchFiles = initialPrompt.remainingFiles;
|
|
319
|
+
if (challenge)
|
|
320
|
+
await this.sendProofInstruction(deliveryInput);
|
|
284
321
|
}
|
|
285
322
|
else if (challenge) {
|
|
286
323
|
challengeOnlyPrompt = challenge.promptBlock;
|
|
@@ -317,7 +354,15 @@ export class StartupOrchestrator {
|
|
|
317
354
|
// 7. Deliver post-launch files (send_text → TUI, now that harness is ready)
|
|
318
355
|
if (postLaunchFiles.length > 0) {
|
|
319
356
|
try {
|
|
320
|
-
|
|
357
|
+
// Keep reads/provisioning and required/optional errors in the adapter. Only Claude's
|
|
358
|
+
// already-partitioned interactive files use the same bounded check as startup actions.
|
|
359
|
+
const checkedSend = input.adapter.runtime === "claude-code" ? async (content) => {
|
|
360
|
+
const failure = await this.sendInteractiveText(deliveryInput, content, "post_launch_file");
|
|
361
|
+
if (failure)
|
|
362
|
+
throw new Error(failure.error);
|
|
363
|
+
} : undefined;
|
|
364
|
+
const deliveryResult = await input.adapter.deliverStartup(postLaunchFiles, input.binding, checkedSend);
|
|
365
|
+
warnings.push(...(deliveryResult.warnings ?? []));
|
|
321
366
|
if (deliveryResult.failed.length > 0) {
|
|
322
367
|
for (const f of deliveryResult.failed) {
|
|
323
368
|
errors.push(`Post-launch file delivery failed: ${f.path}: ${f.error}`);
|
|
@@ -333,7 +378,9 @@ export class StartupOrchestrator {
|
|
|
333
378
|
// Challenge-only delivery remains best-effort. Staging is reported without
|
|
334
379
|
// turning a recoverable composer into a startup failure/occupant rollback.
|
|
335
380
|
if (challengeOnlyPrompt && input.binding.tmuxSession) {
|
|
336
|
-
await this.sendInteractiveText(deliveryInput, challengeOnlyPrompt, "challenge");
|
|
381
|
+
const challengeFailure = await this.sendInteractiveText(deliveryInput, challengeOnlyPrompt, "challenge");
|
|
382
|
+
if (!challengeFailure)
|
|
383
|
+
await this.sendProofInstruction(deliveryInput);
|
|
337
384
|
}
|
|
338
385
|
// 8. Execute after_files actions
|
|
339
386
|
const afterFilesResult = await this.executeActions(deliveryInput, "after_files");
|
|
@@ -347,8 +394,9 @@ export class StartupOrchestrator {
|
|
|
347
394
|
return this.fail(deliveryInput, "failed", afterReadyResult.errors);
|
|
348
395
|
}
|
|
349
396
|
// Delivering the first native prompt can reveal a provider refusal or
|
|
350
|
-
// interactive gate.
|
|
351
|
-
|
|
397
|
+
// interactive gate. Bundled identity/preload prompts consume their files,
|
|
398
|
+
// so the remaining file list alone does not tell us whether context was sent.
|
|
399
|
+
if (postLaunchFiles.length > 0 || deliveryInput.sendOrder > 0) {
|
|
352
400
|
try {
|
|
353
401
|
const readiness = await input.adapter.checkReady(input.binding);
|
|
354
402
|
if (!readiness.ready && isAttentionRequiredReadinessCode(readiness.code)) {
|
|
@@ -356,7 +404,8 @@ export class StartupOrchestrator {
|
|
|
356
404
|
}
|
|
357
405
|
}
|
|
358
406
|
catch (error) {
|
|
359
|
-
|
|
407
|
+
// An unavailable observation is not a positive provider prerequisite.
|
|
408
|
+
this.recordSubmissionWarning(deliveryInput, `Post-delivery runtime state is unverified: ${error.message}`, `Post-delivery runtime state is unverified in ${input.binding.tmuxSession}: ${error.message}`);
|
|
360
409
|
}
|
|
361
410
|
}
|
|
362
411
|
// Managed Claude resume needs agreement on the launched row, not a successful
|
|
@@ -388,15 +437,11 @@ export class StartupOrchestrator {
|
|
|
388
437
|
* daemon loss during delivery: uncertain delivery is never blindly replayed.
|
|
389
438
|
*/
|
|
390
439
|
canContinueFresh(nodeId, sessionId) {
|
|
391
|
-
|
|
392
|
-
if (!row)
|
|
393
|
-
return false;
|
|
394
|
-
const event = JSON.parse(row.payload);
|
|
395
|
-
return event.type === "node.startup_failed" && event.sessionId === sessionId && event.freshContextPending === true;
|
|
440
|
+
return hasPendingFreshStartup(this.db, nodeId, sessionId);
|
|
396
441
|
}
|
|
397
442
|
/**
|
|
398
443
|
* Wait for harness readiness with exponential backoff.
|
|
399
|
-
* Backoff: 1s → 2s → 4s → 8s → 16s (capped)
|
|
444
|
+
* Backoff: 1s → 2s → 4s → 8s → 16s (capped); the caller supplies the deadline.
|
|
400
445
|
*/
|
|
401
446
|
async waitForReady(adapter, binding, timeoutMs = 30_000) {
|
|
402
447
|
const startTime = Date.now();
|
|
@@ -426,6 +471,9 @@ export class StartupOrchestrator {
|
|
|
426
471
|
}
|
|
427
472
|
}
|
|
428
473
|
fail(input, status, errors, evidence, freshContextPending = false) {
|
|
474
|
+
if (status === "attention_required" && freshContextPending && input.binding.tmuxSession) {
|
|
475
|
+
errors.push(`After resolving it in ${input.binding.tmuxSession}, run: rig seat continue ${shellQuote(input.binding.tmuxSession)}`);
|
|
476
|
+
}
|
|
429
477
|
this.sessionRegistry.updateStartupStatus(input.sessionId, status);
|
|
430
478
|
this.eventBus.emit({
|
|
431
479
|
type: "node.startup_failed",
|
|
@@ -548,9 +596,34 @@ export class StartupOrchestrator {
|
|
|
548
596
|
}
|
|
549
597
|
return { ok: true, remainingFiles };
|
|
550
598
|
}
|
|
599
|
+
/**
|
|
600
|
+
* Claude only: the challenge reached the seat inside a paste, which Claude won't act on alone.
|
|
601
|
+
* One short line in the person's turn asks it to run the challenge's own command. Best-effort: a
|
|
602
|
+
* failed send is a submission warning, never a startup failure. It is sent only after the startup
|
|
603
|
+
* prompt was observed submitted: staged, unverified or unobservable input stays in the composer
|
|
604
|
+
* for the operator, and nothing is typed on top of it.
|
|
605
|
+
*/
|
|
606
|
+
async sendProofInstruction(input) {
|
|
607
|
+
if (input.adapter.runtime !== "claude-code" || !input.binding.tmuxSession)
|
|
608
|
+
return;
|
|
609
|
+
if (!input.lastSubmissionConfirmed) {
|
|
610
|
+
this.recordSubmissionWarning(input, "Startup proof instruction was not sent: the startup prompt was not confirmed submitted.");
|
|
611
|
+
return;
|
|
612
|
+
}
|
|
613
|
+
const failure = await this.sendInteractiveText(input, STARTUP_PROOF_INSTRUCTION_LINE, "startup_proof_instruction");
|
|
614
|
+
if (failure)
|
|
615
|
+
this.recordSubmissionWarning(input, `Startup proof instruction was not delivered: ${failure.error}`);
|
|
616
|
+
}
|
|
617
|
+
recordSubmissionWarning(input, reason, displayWarning) {
|
|
618
|
+
input.submissionWarnings.push(reason);
|
|
619
|
+
// Keep every observation in the ordinary result, including if a later file fails.
|
|
620
|
+
input.warnings.push(displayWarning ?? (reason === input.stagedSubmissionWarning ? reason
|
|
621
|
+
: `Startup submission unverified in ${input.binding.tmuxSession}: ${reason}`));
|
|
622
|
+
}
|
|
551
623
|
async sendInteractiveText(input, text, source, actionIndex) {
|
|
552
624
|
const sendOrder = ++input.sendOrder;
|
|
553
625
|
const tmuxSession = input.binding.tmuxSession;
|
|
626
|
+
input.lastSubmissionConfirmed = false;
|
|
554
627
|
const textResult = await this.tmuxAdapter.sendText(tmuxSession, text);
|
|
555
628
|
if (!textResult.ok) {
|
|
556
629
|
return { error: textResult.message ?? "unknown" };
|
|
@@ -565,30 +638,34 @@ export class StartupOrchestrator {
|
|
|
565
638
|
const diagnostic = { startupAttemptId: input.startupAttemptId,
|
|
566
639
|
sendOrder, source, ...(actionIndex === undefined ? {} : { actionIndex }), observations: [], retry: "not_run" };
|
|
567
640
|
let phase = "initial";
|
|
568
|
-
const record = (pane) => {
|
|
641
|
+
const record = (pane, look) => {
|
|
569
642
|
const evidence = startupSubmissionEvidence(pane, text, STARTUP_SUBMIT_CAPTURE_LINES);
|
|
570
643
|
if (evidence)
|
|
571
|
-
diagnostic.observations.push({ ...evidence, phase });
|
|
644
|
+
diagnostic.observations.push({ ...evidence, phase, ...(look === undefined ? {} : { look }) });
|
|
572
645
|
return evidence;
|
|
573
646
|
};
|
|
574
647
|
const unverified = (reason) => {
|
|
575
|
-
|
|
648
|
+
this.recordSubmissionWarning(input, reason);
|
|
576
649
|
return null; // An unavailable observation is not a failed delivery.
|
|
577
650
|
};
|
|
578
651
|
// tmux accepting Enter does not prove the TUI submitted a large bracketed paste.
|
|
579
|
-
// Reuse submitOnly's content check and guarded retry; never repaste or
|
|
652
|
+
// Reuse submitOnly's content check and guarded retry; never repaste or resend.
|
|
580
653
|
try {
|
|
581
654
|
await this.sleep(200);
|
|
582
|
-
const
|
|
583
|
-
if (!
|
|
584
|
-
record(
|
|
655
|
+
const first = await this.tmuxAdapter.capturePaneContent(tmuxSession, STARTUP_SUBMIT_CAPTURE_LINES);
|
|
656
|
+
if (!first?.trim()) {
|
|
657
|
+
record(first);
|
|
585
658
|
return unverified("Startup submission capture is unavailable after Enter.");
|
|
586
659
|
}
|
|
587
|
-
const before =
|
|
588
|
-
if (before === "clear")
|
|
660
|
+
const { pane, state: before, looks } = await this.settleOwnPaste(tmuxSession, first, text);
|
|
661
|
+
if (before === "clear") {
|
|
662
|
+
input.lastSubmissionConfirmed = true;
|
|
589
663
|
return null;
|
|
664
|
+
}
|
|
590
665
|
if (before === "unverified") {
|
|
591
|
-
|
|
666
|
+
if (looks)
|
|
667
|
+
record(first, 0);
|
|
668
|
+
const evidence = record(pane, looks || undefined);
|
|
592
669
|
return unverified(evidence?.reason === "unrecognized_composer_boundary"
|
|
593
670
|
? "Startup submission is unverified: the current composer boundary was not recognized."
|
|
594
671
|
: "Startup submission is unverified: the current composer does not positively match the complete prompt.");
|
|
@@ -614,9 +691,9 @@ export class StartupOrchestrator {
|
|
|
614
691
|
if (observed === "staged") {
|
|
615
692
|
const warning = `Startup prompt still staged in ${tmuxSession}; press Enter in that pane.`;
|
|
616
693
|
input.stagedSubmissionWarning = warning;
|
|
617
|
-
|
|
694
|
+
this.recordSubmissionWarning(input, warning);
|
|
618
695
|
if (!retry.ok)
|
|
619
|
-
|
|
696
|
+
this.recordSubmissionWarning(input, `Guarded retry did not submit: ${retry.error ?? retry.reason}`);
|
|
620
697
|
return null;
|
|
621
698
|
}
|
|
622
699
|
if (observed === "unverified") {
|
|
@@ -627,6 +704,7 @@ export class StartupOrchestrator {
|
|
|
627
704
|
}
|
|
628
705
|
if (!retry.ok)
|
|
629
706
|
return unverified(`Guarded startup retry did not submit: ${retry.error ?? retry.reason}; matching staged text is no longer visible.`);
|
|
707
|
+
input.lastSubmissionConfirmed = true;
|
|
630
708
|
return null;
|
|
631
709
|
}
|
|
632
710
|
catch (error) {
|
|
@@ -639,6 +717,28 @@ export class StartupOrchestrator {
|
|
|
639
717
|
input.submissionDiagnostics.push(diagnostic);
|
|
640
718
|
}
|
|
641
719
|
}
|
|
720
|
+
/**
|
|
721
|
+
* Claude can take the startup Enter after the first look while the composer still shows our paste collapsed.
|
|
722
|
+
* Only that transient is looked at again, until the composer reads clear or staged, shows anything else, or
|
|
723
|
+
* the looks run out. A draft, ghost text or any other mismatch keeps its first-look verdict. Observation only.
|
|
724
|
+
* Remaining ambiguity: a person who clears a collapsed paste with the same line count inside the window reads
|
|
725
|
+
* as submitted.
|
|
726
|
+
*/
|
|
727
|
+
async settleOwnPaste(tmuxSession, pane, text) {
|
|
728
|
+
let state = inspectStartupStagedText(pane, text);
|
|
729
|
+
let looks = 0;
|
|
730
|
+
while (state === "unverified" && looks < STARTUP_SUBMIT_SETTLE_LOOKS && startupOwnCollapsedPaste(pane, text)) {
|
|
731
|
+
await this.sleep(200);
|
|
732
|
+
// A failed re-look adds nothing; the last usable observation stands.
|
|
733
|
+
const next = await this.tmuxAdapter.capturePaneContent(tmuxSession, STARTUP_SUBMIT_CAPTURE_LINES).catch(() => null);
|
|
734
|
+
if (!next?.trim())
|
|
735
|
+
break;
|
|
736
|
+
pane = next;
|
|
737
|
+
state = inspectStartupStagedText(pane, text);
|
|
738
|
+
looks++;
|
|
739
|
+
}
|
|
740
|
+
return { pane, state, looks };
|
|
741
|
+
}
|
|
642
742
|
}
|
|
643
743
|
function isSessionIdentityAction(action) {
|
|
644
744
|
if (action.builtin === "session_identity")
|