@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
|
@@ -5,23 +5,24 @@ import { Hono } from "hono";
|
|
|
5
5
|
import { LegacyBundleAssembler as BundleAssembler } from "../domain/bundle-assembler.js";
|
|
6
6
|
import { PodBundleAssembler } from "../domain/pod-bundle-assembler.js";
|
|
7
7
|
import { computeIntegrity, writeIntegrity, verifyIntegrity } from "../domain/bundle-integrity.js";
|
|
8
|
-
import { pack, unpack, verifyArchiveDigest } from "../domain/bundle-archive.js";
|
|
8
|
+
import { pack, unpack, verifyArchiveDigest, collectUnsafeArchiveEntries, unsafeArchiveEntryReason } from "../domain/bundle-archive.js";
|
|
9
9
|
import { resolvePackage } from "../domain/package-resolve-helper.js";
|
|
10
10
|
import { compareSpecToLive, topologyFromRigSpec, topologyFromLiveLogicalIds, bundleExportWarning, topologyFromLegacyRigSpec, topologyFromLiveNodeIds, } from "../domain/spec-live-conformance.js";
|
|
11
11
|
import { LegacyRigSpecSchema } from "../domain/rigspec-schema.js";
|
|
12
12
|
import { RigSpecCodec } from "../domain/rigspec-codec.js";
|
|
13
13
|
import { RigSpecSchema } from "../domain/rigspec-schema.js";
|
|
14
|
-
import { parseLegacyBundleManifest as parseBundleManifest, normalizeLegacyBundleManifest as normalizeBundleManifest, serializePodBundleManifest, parsePodBundleManifest, validatePodBundleManifest, validateLegacyBundleManifest, normalizeProvenanceBlock, normalizeCompatibilityBlock, isRelativeSafePath } from "../domain/bundle-types.js";
|
|
14
|
+
import { parseLegacyBundleManifest as parseBundleManifest, normalizeLegacyBundleManifest as normalizeBundleManifest, serializePodBundleManifest, parsePodBundleManifest, validatePodBundleManifest, validateLegacyBundleManifest, normalizeProvenanceBlock, normalizeBundleSource, normalizeCompatibilityBlock, isRelativeSafePath } from "../domain/bundle-types.js";
|
|
15
15
|
import { detectBundleConflicts } from "../domain/bundle-conflict-detector.js";
|
|
16
|
+
import { bundleInstallContext, bundleInstallContextLines } from "../domain/bundle-install-context.js";
|
|
16
17
|
import { BundleAuditReader, BundleAuditWriter } from "../domain/bundle-audit.js";
|
|
17
18
|
import { getDefaultOpenRigPath } from "../openrig-compat.js";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { routeAgentImages } from "../domain/bundle-agent-images-router.js";
|
|
23
|
-
import { SettingsStore as ContextPackSettingsStore } from "../domain/user-settings/settings-store.js";
|
|
19
|
+
import { routingFailureWarnings } from "../domain/bundle-content-routing.js";
|
|
20
|
+
import { configurationId, packageDigest } from "../domain/bundle-identity.js";
|
|
21
|
+
import { vendorContextPackDir } from "../domain/bundle-carried-context-pack.js";
|
|
22
|
+
import { vendorProjectDir } from "../domain/bundle-carried-project.js";
|
|
24
23
|
import { getDaemonVersion } from "../domain/daemon-version.js";
|
|
24
|
+
import { inspectBundleBehaviour } from "../domain/bundle-behaviour-inspect.js";
|
|
25
|
+
import { normalizePreconditionsBlock } from "../domain/bundle-types.js";
|
|
25
26
|
import { assertShippableSubstance } from "../domain/agent-resolver.js";
|
|
26
27
|
/**
|
|
27
28
|
* Compare two dotted numeric version strings (semver-ish). Returns -1 if
|
|
@@ -181,6 +182,9 @@ function provenanceFromRequestBody(raw) {
|
|
|
181
182
|
return undefined;
|
|
182
183
|
const p = raw;
|
|
183
184
|
const result = {};
|
|
185
|
+
const source = normalizeBundleSource(p["source"]);
|
|
186
|
+
if (source)
|
|
187
|
+
result.source = source;
|
|
184
188
|
if (typeof p["sourceHost"] === "string")
|
|
185
189
|
result.sourceHost = p["sourceHost"];
|
|
186
190
|
if (typeof p["authorSession"] === "string")
|
|
@@ -361,314 +365,6 @@ function podAssemblerFsOps() {
|
|
|
361
365
|
},
|
|
362
366
|
};
|
|
363
367
|
}
|
|
364
|
-
/** Item 6 / slice-05 Checkpoint 7.3d: real PluginsRouterFsOps backed by node:fs. */
|
|
365
|
-
function pluginsRouterFsOps() {
|
|
366
|
-
return {
|
|
367
|
-
exists: (p) => fs.existsSync(p),
|
|
368
|
-
isDirectory: (p) => { try {
|
|
369
|
-
return fs.statSync(p).isDirectory();
|
|
370
|
-
}
|
|
371
|
-
catch {
|
|
372
|
-
return false;
|
|
373
|
-
} },
|
|
374
|
-
mkdirp: (p) => fs.mkdirSync(p, { recursive: true }),
|
|
375
|
-
copyDir: (s, d) => fs.cpSync(s, d, { recursive: true }),
|
|
376
|
-
};
|
|
377
|
-
}
|
|
378
|
-
/** Item 6 / slice-05 Checkpoint 7.3e step 3: real WorkflowSpecsRouterFsOps backed by node:fs. */
|
|
379
|
-
function workflowSpecsRouterFsOps() {
|
|
380
|
-
return {
|
|
381
|
-
exists: (p) => fs.existsSync(p),
|
|
382
|
-
copyFile: (s, d) => fs.copyFileSync(s, d),
|
|
383
|
-
mkdirp: (p) => fs.mkdirSync(p, { recursive: true }),
|
|
384
|
-
};
|
|
385
|
-
}
|
|
386
|
-
/** Item 6 / slice-05 Checkpoint 7.3f step 3: real ContextPacksRouterFsOps backed by node:fs. */
|
|
387
|
-
function contextPacksRouterFsOps() {
|
|
388
|
-
return {
|
|
389
|
-
exists: (p) => fs.existsSync(p),
|
|
390
|
-
isDirectory: (p) => { try {
|
|
391
|
-
return fs.statSync(p).isDirectory();
|
|
392
|
-
}
|
|
393
|
-
catch {
|
|
394
|
-
return false;
|
|
395
|
-
} },
|
|
396
|
-
readFile: (p) => fs.readFileSync(p, "utf8"),
|
|
397
|
-
listFiles: (dir) => {
|
|
398
|
-
const files = [];
|
|
399
|
-
const walk = (current, prefix) => {
|
|
400
|
-
for (const entry of fs.readdirSync(current, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
|
|
401
|
-
const child = nodePath.join(current, entry.name);
|
|
402
|
-
const relativePath = prefix ? `${prefix}/${entry.name}` : entry.name;
|
|
403
|
-
if (entry.isDirectory())
|
|
404
|
-
walk(child, relativePath);
|
|
405
|
-
else if (entry.isFile())
|
|
406
|
-
files.push(relativePath);
|
|
407
|
-
}
|
|
408
|
-
};
|
|
409
|
-
walk(dir, "");
|
|
410
|
-
return files;
|
|
411
|
-
},
|
|
412
|
-
mkdirp: (p) => fs.mkdirSync(p, { recursive: true }),
|
|
413
|
-
copyDir: (s, d) => fs.cpSync(s, d, { recursive: true }),
|
|
414
|
-
};
|
|
415
|
-
}
|
|
416
|
-
/** Item 6 / slice-05 Checkpoint 7.3g step 3: real AgentImagesRouterFsOps backed by node:fs. */
|
|
417
|
-
function agentImagesRouterFsOps() {
|
|
418
|
-
return {
|
|
419
|
-
exists: (p) => fs.existsSync(p),
|
|
420
|
-
isDirectory: (p) => { try {
|
|
421
|
-
return fs.statSync(p).isDirectory();
|
|
422
|
-
}
|
|
423
|
-
catch {
|
|
424
|
-
return false;
|
|
425
|
-
} },
|
|
426
|
-
mkdirp: (p) => fs.mkdirSync(p, { recursive: true }),
|
|
427
|
-
copyDir: (s, d) => fs.cpSync(s, d, { recursive: true }),
|
|
428
|
-
};
|
|
429
|
-
}
|
|
430
|
-
/**
|
|
431
|
-
* Item 6 / slice-05 Checkpoint 7.3g step 3: extract the bundle safely
|
|
432
|
-
* (banked unpack trust boundary) and route any declared agent_images to
|
|
433
|
-
* the operator agent-images library. Returns null when bundle has no
|
|
434
|
-
* agent_images[] (no-op).
|
|
435
|
-
*
|
|
436
|
-
* Target resolution: <openrigHome>/agent-images — per startup.ts:523
|
|
437
|
-
* (the user-file root the live AgentImageLibraryService is constructed
|
|
438
|
-
* against). No SettingsStore complexity; canonical path is OPENRIG_HOME-
|
|
439
|
-
* rooted per agent-image-types.ts:9-10.
|
|
440
|
-
*
|
|
441
|
-
* Per the e7a0b253 PRD-coherent contract: agent_images entries are paths
|
|
442
|
-
* to image DIRECTORIES (not manifest paths — distinct shape from
|
|
443
|
-
* context_packs). The router enforces sourceAbs isDirectory + manifest.yaml
|
|
444
|
-
* inside the dir is a file before copying the whole image dir.
|
|
445
|
-
*
|
|
446
|
-
* Mirror of routeContextPacksAfterBootstrap pattern with the dir-path
|
|
447
|
-
* contract adaptation. bundlePath-only signature per 5f410eee B1 lesson.
|
|
448
|
-
*/
|
|
449
|
-
async function routeAgentImagesAfterBootstrap(bundlePath) {
|
|
450
|
-
const targetAgentImagesDir = getDefaultOpenRigPath("agent-images");
|
|
451
|
-
const tmpDir = fs.mkdtempSync(nodePath.join(os.tmpdir(), "bundle-agent-images-route-"));
|
|
452
|
-
try {
|
|
453
|
-
await unpack(bundlePath, tmpDir);
|
|
454
|
-
const manifestPath = nodePath.join(tmpDir, "bundle.yaml");
|
|
455
|
-
if (!fs.existsSync(manifestPath))
|
|
456
|
-
return null;
|
|
457
|
-
const manifestYaml = fs.readFileSync(manifestPath, "utf-8");
|
|
458
|
-
const manifest = parsePodBundleManifest(manifestYaml);
|
|
459
|
-
const rawAgentImages = manifest["agent_images"];
|
|
460
|
-
if (!Array.isArray(rawAgentImages) || rawAgentImages.length === 0)
|
|
461
|
-
return null;
|
|
462
|
-
const declaredAgentImages = rawAgentImages.filter((s) => typeof s === "string" && s.length > 0);
|
|
463
|
-
if (declaredAgentImages.length === 0)
|
|
464
|
-
return null;
|
|
465
|
-
return routeAgentImages({
|
|
466
|
-
bundleRoot: tmpDir,
|
|
467
|
-
declaredAgentImages,
|
|
468
|
-
targetAgentImagesDir,
|
|
469
|
-
}, agentImagesRouterFsOps());
|
|
470
|
-
}
|
|
471
|
-
finally {
|
|
472
|
-
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
/**
|
|
476
|
-
* Item 6 / slice-05 Checkpoint 7.3f step 3: extract the bundle safely
|
|
477
|
-
* (banked unpack trust boundary) and route any declared context_packs to
|
|
478
|
-
* the operator context-packs library. Returns null when bundle has no
|
|
479
|
-
* context_packs[] (no-op).
|
|
480
|
-
*
|
|
481
|
-
* Target resolution uses context.root, exactly like the live
|
|
482
|
-
* ContextPackLibraryService. A configured root replaces the default; bundle
|
|
483
|
-
* routing must not silently create a second writable library.
|
|
484
|
-
*
|
|
485
|
-
* Mirror of routeSkillsAfterBootstrap / routePluginsAfterBootstrap /
|
|
486
|
-
* routeWorkflowSpecsAfterBootstrap pattern: takes bundlePath only
|
|
487
|
-
* (decoupled from installMeta per the 5f410eee B1 lesson; routing must
|
|
488
|
-
* fire on the dual-override path too).
|
|
489
|
-
*/
|
|
490
|
-
async function routeContextPacksAfterBootstrap(bundlePath) {
|
|
491
|
-
const targetContextPacksDir = new ContextPackSettingsStore().resolveOne("context.root").value;
|
|
492
|
-
const tmpDir = fs.mkdtempSync(nodePath.join(os.tmpdir(), "bundle-context-packs-route-"));
|
|
493
|
-
try {
|
|
494
|
-
await unpack(bundlePath, tmpDir);
|
|
495
|
-
const manifestPath = nodePath.join(tmpDir, "bundle.yaml");
|
|
496
|
-
if (!fs.existsSync(manifestPath))
|
|
497
|
-
return null;
|
|
498
|
-
const manifestYaml = fs.readFileSync(manifestPath, "utf-8");
|
|
499
|
-
const manifest = parsePodBundleManifest(manifestYaml);
|
|
500
|
-
const rawContextPacks = manifest["context_packs"];
|
|
501
|
-
if (!Array.isArray(rawContextPacks) || rawContextPacks.length === 0)
|
|
502
|
-
return null;
|
|
503
|
-
const declaredContextPacks = rawContextPacks.filter((s) => typeof s === "string" && s.length > 0);
|
|
504
|
-
if (declaredContextPacks.length === 0)
|
|
505
|
-
return null;
|
|
506
|
-
return routeContextPacks({
|
|
507
|
-
bundleRoot: tmpDir,
|
|
508
|
-
declaredContextPacks,
|
|
509
|
-
targetContextPacksDir,
|
|
510
|
-
}, contextPacksRouterFsOps());
|
|
511
|
-
}
|
|
512
|
-
finally {
|
|
513
|
-
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
/**
|
|
517
|
-
* Item 6 / slice-05 Checkpoint 7.3e step 3: extract the bundle safely
|
|
518
|
-
* (banked unpack trust boundary) and route any declared workflow_specs to
|
|
519
|
-
* the operator workflow-specs library. Returns null when bundle has no
|
|
520
|
-
* workflow_specs[] (no-op), no manifest, or workspaceSpecsRoot unresolved.
|
|
521
|
-
*
|
|
522
|
-
* Target resolution per the CALLER CONTRACT in
|
|
523
|
-
* bundle-workflow-specs-router.ts: SettingsStore is the sole authority.
|
|
524
|
-
* Resolved as nodePath.join(workspaceSpecsRoot, "workflows") — the path
|
|
525
|
-
* that spec-library-workflow-scanner actually reads (startup.ts:903-916).
|
|
526
|
-
* If SettingsStore cannot resolve workspaceSpecsRoot (settings not yet
|
|
527
|
-
* initialized / config error), we return null and the install lifecycle
|
|
528
|
-
* proceeds without workflow_specs routing — mirror of startup.ts:910-916
|
|
529
|
-
* try/catch posture.
|
|
530
|
-
*
|
|
531
|
-
* Mirror of routeSkillsAfterBootstrap / routePluginsAfterBootstrap pattern:
|
|
532
|
-
* takes bundlePath only (decoupled from installMeta per the 5f410eee B1
|
|
533
|
-
* lesson; routing must fire on the dual-override path too).
|
|
534
|
-
*/
|
|
535
|
-
async function routeWorkflowSpecsAfterBootstrap(bundlePath) {
|
|
536
|
-
let workspaceSpecsRoot;
|
|
537
|
-
try {
|
|
538
|
-
const settingsStore = new ContextPackSettingsStore();
|
|
539
|
-
workspaceSpecsRoot = settingsStore.resolveConfig().workspaceSpecsRoot;
|
|
540
|
-
}
|
|
541
|
-
catch {
|
|
542
|
-
return null; // settings unresolvable; no-op routing
|
|
543
|
-
}
|
|
544
|
-
if (!workspaceSpecsRoot)
|
|
545
|
-
return null;
|
|
546
|
-
const targetWorkflowSpecsDir = nodePath.join(workspaceSpecsRoot, "workflows");
|
|
547
|
-
const tmpDir = fs.mkdtempSync(nodePath.join(os.tmpdir(), "bundle-workflow-specs-route-"));
|
|
548
|
-
try {
|
|
549
|
-
await unpack(bundlePath, tmpDir);
|
|
550
|
-
const manifestPath = nodePath.join(tmpDir, "bundle.yaml");
|
|
551
|
-
if (!fs.existsSync(manifestPath))
|
|
552
|
-
return null;
|
|
553
|
-
const manifestYaml = fs.readFileSync(manifestPath, "utf-8");
|
|
554
|
-
const manifest = parsePodBundleManifest(manifestYaml);
|
|
555
|
-
const rawWorkflowSpecs = manifest["workflow_specs"];
|
|
556
|
-
if (!Array.isArray(rawWorkflowSpecs) || rawWorkflowSpecs.length === 0)
|
|
557
|
-
return null;
|
|
558
|
-
const declaredWorkflowSpecs = rawWorkflowSpecs.filter((s) => typeof s === "string" && s.length > 0);
|
|
559
|
-
if (declaredWorkflowSpecs.length === 0)
|
|
560
|
-
return null;
|
|
561
|
-
return routeWorkflowSpecs({
|
|
562
|
-
bundleRoot: tmpDir,
|
|
563
|
-
declaredWorkflowSpecs,
|
|
564
|
-
targetWorkflowSpecsDir,
|
|
565
|
-
}, workflowSpecsRouterFsOps());
|
|
566
|
-
}
|
|
567
|
-
finally {
|
|
568
|
-
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
/**
|
|
572
|
-
* Item 6 / slice-05 Checkpoint 7.3d: extract the bundle safely (banked unpack
|
|
573
|
-
* trust boundary) and route any declared plugin references to the operator
|
|
574
|
-
* plugins library (<OPENRIG_HOME>/plugins/<id>/). Returns null when bundle
|
|
575
|
-
* has no plugins[] (no-op). Mirror of routeSkillsAfterBootstrap pattern —
|
|
576
|
-
* takes bundlePath only (decoupled from installMeta per the 5f410eee B1
|
|
577
|
-
* lesson; routing must fire on the dual-override path too).
|
|
578
|
-
*/
|
|
579
|
-
async function routePluginsAfterBootstrap(bundlePath) {
|
|
580
|
-
const tmpDir = fs.mkdtempSync(nodePath.join(os.tmpdir(), "bundle-plugins-route-"));
|
|
581
|
-
try {
|
|
582
|
-
await unpack(bundlePath, tmpDir);
|
|
583
|
-
const manifestPath = nodePath.join(tmpDir, "bundle.yaml");
|
|
584
|
-
if (!fs.existsSync(manifestPath))
|
|
585
|
-
return null;
|
|
586
|
-
const manifestYaml = fs.readFileSync(manifestPath, "utf-8");
|
|
587
|
-
const manifest = parsePodBundleManifest(manifestYaml);
|
|
588
|
-
const rawPlugins = manifest["plugins"];
|
|
589
|
-
if (!Array.isArray(rawPlugins) || rawPlugins.length === 0)
|
|
590
|
-
return null;
|
|
591
|
-
const declaredPlugins = [];
|
|
592
|
-
for (const entry of rawPlugins) {
|
|
593
|
-
if (!entry || typeof entry !== "object" || Array.isArray(entry))
|
|
594
|
-
continue;
|
|
595
|
-
const p = entry;
|
|
596
|
-
const s = p["source"];
|
|
597
|
-
if (typeof p["id"] !== "string" || !p["id"])
|
|
598
|
-
continue;
|
|
599
|
-
if (!s || typeof s !== "object" || Array.isArray(s))
|
|
600
|
-
continue;
|
|
601
|
-
const src = s;
|
|
602
|
-
if (src["kind"] !== "local" || typeof src["path"] !== "string" || !src["path"])
|
|
603
|
-
continue;
|
|
604
|
-
declaredPlugins.push({ id: p["id"], source: { kind: "local", path: src["path"] } });
|
|
605
|
-
}
|
|
606
|
-
if (declaredPlugins.length === 0)
|
|
607
|
-
return null;
|
|
608
|
-
return routePlugins({
|
|
609
|
-
bundleRoot: tmpDir,
|
|
610
|
-
declaredPlugins,
|
|
611
|
-
targetPluginsDir: getDefaultOpenRigPath("plugins"),
|
|
612
|
-
}, pluginsRouterFsOps());
|
|
613
|
-
}
|
|
614
|
-
finally {
|
|
615
|
-
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
/** Item 6 / slice-05 Checkpoint 7.3: real SkillsRouterFsOps backed by node:fs. */
|
|
619
|
-
function skillsRouterFsOps() {
|
|
620
|
-
return {
|
|
621
|
-
exists: (p) => fs.existsSync(p),
|
|
622
|
-
copyFile: (s, d) => fs.copyFileSync(s, d),
|
|
623
|
-
mkdirp: (p) => fs.mkdirSync(p, { recursive: true }),
|
|
624
|
-
};
|
|
625
|
-
}
|
|
626
|
-
/**
|
|
627
|
-
* Item 6 / slice-05 Checkpoint 7.3: extract the bundle safely (banked unpack
|
|
628
|
-
* trust boundary) and route legacy declared skill files to the package cache.
|
|
629
|
-
* S04 keeps this package-shaped payload out of the managed skill catalog;
|
|
630
|
-
* importing a complete harness skill into the catalog is a separate action.
|
|
631
|
-
* Returns null when bundle has no skills[] (no-op).
|
|
632
|
-
*
|
|
633
|
-
* B1 repair (qitem-20260518220247-22f5257a): takes bundlePath only and does
|
|
634
|
-
* its own safe unpack + parse. Previously coupled to installMeta from the
|
|
635
|
-
* pre-check extraction, which is null when operator passes --skip-version-
|
|
636
|
-
* check AND --force together; that incorrectly suppressed post-install
|
|
637
|
-
* skills routing on the dual-override path. Skills routing is independent
|
|
638
|
-
* of the pre-check decisions and should fire whenever an install completes
|
|
639
|
-
* successfully with a bundle that declares skills.
|
|
640
|
-
*
|
|
641
|
-
* Best-effort: returns null on any extract/parse failure (caller has the
|
|
642
|
-
* outer try/catch). Single unpack call per invocation; the manifest re-parse
|
|
643
|
-
* is cheap vs. the unpack cost which is required either way to access the
|
|
644
|
-
* skill source files for routing.
|
|
645
|
-
*/
|
|
646
|
-
async function routeSkillsAfterBootstrap(bundlePath) {
|
|
647
|
-
const tmpDir = fs.mkdtempSync(nodePath.join(os.tmpdir(), "bundle-skills-route-"));
|
|
648
|
-
try {
|
|
649
|
-
await unpack(bundlePath, tmpDir);
|
|
650
|
-
const manifestPath = nodePath.join(tmpDir, "bundle.yaml");
|
|
651
|
-
if (!fs.existsSync(manifestPath))
|
|
652
|
-
return null;
|
|
653
|
-
const manifestYaml = fs.readFileSync(manifestPath, "utf-8");
|
|
654
|
-
const manifest = parsePodBundleManifest(manifestYaml);
|
|
655
|
-
const rawSkills = manifest["skills"];
|
|
656
|
-
if (!Array.isArray(rawSkills) || rawSkills.length === 0)
|
|
657
|
-
return null;
|
|
658
|
-
const declaredSkills = rawSkills.filter((s) => typeof s === "string" && s.length > 0);
|
|
659
|
-
if (declaredSkills.length === 0)
|
|
660
|
-
return null;
|
|
661
|
-
return routeSkills({
|
|
662
|
-
bundleRoot: tmpDir,
|
|
663
|
-
declaredSkills,
|
|
664
|
-
targetSkillsDir: getDefaultOpenRigPath("packages"),
|
|
665
|
-
targetPrefixToStrip: "packages/",
|
|
666
|
-
}, skillsRouterFsOps());
|
|
667
|
-
}
|
|
668
|
-
finally {
|
|
669
|
-
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
368
|
/** Item 4 / slice-05 Checkpoint 5.2: real BundleAuditFsOps backed by node:fs. */
|
|
673
369
|
function auditFsOps() {
|
|
674
370
|
return {
|
|
@@ -714,6 +410,8 @@ function writeInstallAudit(opts) {
|
|
|
714
410
|
record.daemonVersion = getDaemonVersion();
|
|
715
411
|
if (provenance?.sourceHost)
|
|
716
412
|
record.sourceHost = provenance.sourceHost;
|
|
413
|
+
if (opts.routingFailures?.length)
|
|
414
|
+
record.routingFailures = opts.routingFailures;
|
|
717
415
|
writer.append(record);
|
|
718
416
|
}
|
|
719
417
|
catch {
|
|
@@ -797,6 +495,14 @@ function consumeAuthorBundleYaml(sourceRoot, staging) {
|
|
|
797
495
|
const authorYaml = fs.readFileSync(authorBundlePath, "utf-8");
|
|
798
496
|
const authorParsed = parsePodBundleManifest(authorYaml);
|
|
799
497
|
const result = {};
|
|
498
|
+
result.preconditions = normalizePreconditionsBlock(authorParsed["preconditions"], reason => {
|
|
499
|
+
(result.warnings ??= []).push(`Ignored author bundle preconditions: ${reason}; the whole block was omitted.`);
|
|
500
|
+
});
|
|
501
|
+
for (const [index, precondition] of (result.preconditions ?? []).entries()) {
|
|
502
|
+
if (precondition.commands?.some(command => /[;|`<>]|&&|\$\(/.test(command))) {
|
|
503
|
+
(result.warnings ??= []).push(`preconditions[${index}].commands contains shell operators; retained as data, but a site may omit setup commands that fail its plain-command rule.`);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
800
506
|
const vendorFile = (declared, kindLabel) => {
|
|
801
507
|
if (!isRelativeSafePath(declared))
|
|
802
508
|
throw new Error(`author bundle ${kindLabel} path '${declared}' is not safe`);
|
|
@@ -859,12 +565,16 @@ function consumeAuthorBundleYaml(sourceRoot, staging) {
|
|
|
859
565
|
// written as regular files for tar safety
|
|
860
566
|
fs.cpSync(sourceAbs, targetAbs, { recursive: true, dereference: true });
|
|
861
567
|
};
|
|
862
|
-
//
|
|
568
|
+
// A portable skill includes its helpers/references. Retain the legacy
|
|
569
|
+
// single-file payload contract outside the discovered skills/<name> tree.
|
|
863
570
|
const rawSkills = authorParsed["skills"];
|
|
864
571
|
if (Array.isArray(rawSkills) && rawSkills.length > 0) {
|
|
865
572
|
const skills = rawSkills.filter((s) => typeof s === "string" && s.length > 0);
|
|
866
|
-
for (const declared of skills)
|
|
573
|
+
for (const declared of skills) {
|
|
867
574
|
vendorFile(declared, "skill");
|
|
575
|
+
if (/^skills\/[^/]+\/SKILL\.md$/.test(declared))
|
|
576
|
+
vendorDir(nodePath.dirname(declared), "skill");
|
|
577
|
+
}
|
|
868
578
|
if (skills.length > 0)
|
|
869
579
|
result.skills = skills;
|
|
870
580
|
}
|
|
@@ -946,6 +656,16 @@ function assertShippableStagingTree(staging) {
|
|
|
946
656
|
walk(staging);
|
|
947
657
|
assertShippableSubstance(sources);
|
|
948
658
|
}
|
|
659
|
+
/** Describe this artifact; inspecting an older archive never substitutes the current daemon's version. */
|
|
660
|
+
function bundleBuildIdentity(manifest, archiveHash) {
|
|
661
|
+
return {
|
|
662
|
+
source: manifest.provenance?.source ?? null,
|
|
663
|
+
configurationId: manifest.configuration?.id ?? null,
|
|
664
|
+
packageDigest: manifest.integrity ? packageDigest(manifest.integrity.files) : null,
|
|
665
|
+
archiveHash,
|
|
666
|
+
assembler: manifest.assembler ?? null,
|
|
667
|
+
};
|
|
668
|
+
}
|
|
949
669
|
// POST /api/bundles/create
|
|
950
670
|
bundleRoutes.post("/create", async (c) => {
|
|
951
671
|
const { eventBus } = getDeps(c);
|
|
@@ -956,9 +676,23 @@ bundleRoutes.post("/create", async (c) => {
|
|
|
956
676
|
const outputPath = typeof body["outputPath"] === "string" ? body["outputPath"] : "";
|
|
957
677
|
const rigRoot = typeof body["rigRoot"] === "string" ? body["rigRoot"] : undefined;
|
|
958
678
|
const includePackages = Array.isArray(body["includePackages"]) ? body["includePackages"] : undefined;
|
|
679
|
+
// `rig bundle create --context-pack <dir>`: packs to carry from anywhere the author names, by manifest name
|
|
680
|
+
const contextPackDirs = Array.isArray(body["contextPackDirs"])
|
|
681
|
+
? body["contextPackDirs"].filter((d) => typeof d === "string" && d.length > 0)
|
|
682
|
+
: [];
|
|
683
|
+
// `rig bundle create --project-dir <dir>`: the project this rig works in (project.yaml and its files)
|
|
684
|
+
const projectDir = typeof body["projectDir"] === "string" && body["projectDir"] ? body["projectDir"] : undefined;
|
|
685
|
+
// `rig bundle create --preset/--seat`: the configuration the CLI staged, recorded in the manifest (outside the package digest)
|
|
686
|
+
const rawConfiguration = body["configuration"];
|
|
687
|
+
const configuration = rawConfiguration && typeof rawConfiguration.id === "string"
|
|
688
|
+
? { id: rawConfiguration.id, ...(typeof rawConfiguration.preset === "string" ? { preset: rawConfiguration.preset } : {}) }
|
|
689
|
+
: undefined;
|
|
959
690
|
const allowDrift = body["allowDrift"] === true;
|
|
960
691
|
// Item 1 / slice-05: build provenance from request body + inject daemonVersion server-side
|
|
961
|
-
const
|
|
692
|
+
const rawProvenance = body["provenance"];
|
|
693
|
+
if (rawProvenance?.source !== undefined && !normalizeBundleSource(rawProvenance.source))
|
|
694
|
+
return c.json({ error: "Invalid GitHub bundle source identity" }, 400);
|
|
695
|
+
const clientProvenance = provenanceFromRequestBody(rawProvenance);
|
|
962
696
|
let provenance = clientProvenance
|
|
963
697
|
? { ...clientProvenance, daemonVersion: getDaemonVersion() }
|
|
964
698
|
: undefined;
|
|
@@ -1025,6 +759,8 @@ bundleRoutes.post("/create", async (c) => {
|
|
|
1025
759
|
// cross-primitive content into staging + carry the fields onto
|
|
1026
760
|
// the manifest. computeIntegrity below covers the vendored content.
|
|
1027
761
|
const authorPrimitives = consumeAuthorBundleYaml(effectiveRigRoot, tmpStaging);
|
|
762
|
+
if (authorPrimitives.preconditions)
|
|
763
|
+
result.manifest.preconditions = authorPrimitives.preconditions;
|
|
1028
764
|
if (authorPrimitives.skills)
|
|
1029
765
|
result.manifest.skills = authorPrimitives.skills;
|
|
1030
766
|
if (authorPrimitives.plugins)
|
|
@@ -1035,14 +771,29 @@ bundleRoutes.post("/create", async (c) => {
|
|
|
1035
771
|
result.manifest.contextPacks = authorPrimitives.contextPacks;
|
|
1036
772
|
if (authorPrimitives.agentImages)
|
|
1037
773
|
result.manifest.agentImages = authorPrimitives.agentImages;
|
|
774
|
+
const actualMapping = {};
|
|
775
|
+
for (const pod of RigSpecSchema.normalize(rawParsed).pods) {
|
|
776
|
+
for (const member of pod.members)
|
|
777
|
+
actualMapping[`${pod.id}.${member.id}`] = member.runtime;
|
|
778
|
+
}
|
|
779
|
+
const actualConfigurationId = configurationId(actualMapping);
|
|
780
|
+
if (configuration && configuration.id !== actualConfigurationId)
|
|
781
|
+
return c.json({ error: "Configuration ID does not match the packaged rig spec" }, 400);
|
|
782
|
+
result.manifest.configuration = { id: actualConfigurationId, ...(configuration?.preset ? { preset: configuration.preset } : {}) };
|
|
783
|
+
result.manifest.assembler = { openrigVersion: getDaemonVersion() };
|
|
784
|
+
const carriedPacks = contextPackDirs.map((dir) => vendorContextPackDir(nodePath.resolve(dir), tmpStaging));
|
|
785
|
+
if (carriedPacks.length > 0)
|
|
786
|
+
result.manifest.contextPacks = [...(result.manifest.contextPacks ?? []), ...carriedPacks];
|
|
787
|
+
if (projectDir)
|
|
788
|
+
result.manifest.project = vendorProjectDir(nodePath.resolve(projectDir), tmpStaging);
|
|
1038
789
|
const integrity = computeIntegrity(tmpStaging, integrityFsOps());
|
|
1039
790
|
result.manifest.integrity = integrity;
|
|
1040
791
|
fs.writeFileSync(nodePath.join(tmpStaging, "bundle.yaml"), serializePodBundleManifest(result.manifest), "utf-8");
|
|
1041
792
|
assertShippableStagingTree(tmpStaging);
|
|
1042
793
|
const archiveHash = await pack(tmpStaging, nodePath.resolve(outputPath));
|
|
1043
794
|
eventBus.emit({ type: "bundle.created", bundleName, bundleVersion, archiveHash });
|
|
1044
|
-
const warning = [driftWarning, ...(result.warnings ?? [])].filter(Boolean).join("; ");
|
|
1045
|
-
return c.json({ bundleName, bundleVersion, archiveHash, schemaVersion: 2, agents: result.manifest.agents.length, ...(warning ? { warning } : {}) }, 201);
|
|
795
|
+
const warning = [driftWarning, ...(result.warnings ?? []), ...(authorPrimitives.warnings ?? [])].filter(Boolean).join("; ");
|
|
796
|
+
return c.json({ ...bundleBuildIdentity(result.manifest, archiveHash), bundleName, bundleVersion, archiveHash, schemaVersion: 2, agents: result.manifest.agents.length, ...(warning ? { warning } : {}) }, 201);
|
|
1046
797
|
}
|
|
1047
798
|
finally {
|
|
1048
799
|
fs.rmSync(tmpStaging, { recursive: true, force: true });
|
|
@@ -1050,6 +801,12 @@ bundleRoutes.post("/create", async (c) => {
|
|
|
1050
801
|
}
|
|
1051
802
|
// Legacy bundle creation
|
|
1052
803
|
// Validated above, before the drift guard ran.
|
|
804
|
+
if (contextPackDirs.length > 0) {
|
|
805
|
+
return c.json({ error: "--context-pack needs a pod-aware rig spec (one with pods:)" }, 400);
|
|
806
|
+
}
|
|
807
|
+
if (projectDir) {
|
|
808
|
+
return c.json({ error: "--project-dir needs a pod-aware rig spec (one with pods:)" }, 400);
|
|
809
|
+
}
|
|
1053
810
|
const spec = LegacyRigSpecSchema.normalize(rawParsed);
|
|
1054
811
|
const specDir = nodePath.dirname(nodePath.resolve(specPath));
|
|
1055
812
|
const allRefs = new Set();
|
|
@@ -1089,14 +846,17 @@ bundleRoutes.post("/create", async (c) => {
|
|
|
1089
846
|
const manifest = assembler.assemble({
|
|
1090
847
|
specPath: nodePath.resolve(specPath), packages, outputDir: tmpStaging, bundleName, bundleVersion, provenance, compatibility,
|
|
1091
848
|
});
|
|
849
|
+
manifest.assembler = { openrigVersion: getDaemonVersion() };
|
|
1092
850
|
// Item 6 / Checkpoint 7.5 (QA-20260601 A2 repair, legacy path mirror):
|
|
1093
851
|
// auto-detect author bundle.yaml in source dir; vendor + carry
|
|
1094
852
|
// cross-primitive fields before integrity. Re-serialize bundle.yaml
|
|
1095
853
|
// since the assembler already wrote one without these fields.
|
|
1096
854
|
const legacyAuthorPrimitives = consumeAuthorBundleYaml(specDir, tmpStaging);
|
|
1097
855
|
const hasLegacyPrimitives = legacyAuthorPrimitives.skills || legacyAuthorPrimitives.plugins ||
|
|
1098
|
-
legacyAuthorPrimitives.workflowSpecs || legacyAuthorPrimitives.contextPacks || legacyAuthorPrimitives.agentImages;
|
|
1099
|
-
if (hasLegacyPrimitives) {
|
|
856
|
+
legacyAuthorPrimitives.workflowSpecs || legacyAuthorPrimitives.contextPacks || legacyAuthorPrimitives.agentImages || legacyAuthorPrimitives.preconditions;
|
|
857
|
+
if (hasLegacyPrimitives || manifest.assembler) {
|
|
858
|
+
if (legacyAuthorPrimitives.preconditions)
|
|
859
|
+
manifest.preconditions = legacyAuthorPrimitives.preconditions;
|
|
1100
860
|
if (legacyAuthorPrimitives.skills)
|
|
1101
861
|
manifest.skills = legacyAuthorPrimitives.skills;
|
|
1102
862
|
if (legacyAuthorPrimitives.plugins)
|
|
@@ -1112,10 +872,12 @@ bundleRoutes.post("/create", async (c) => {
|
|
|
1112
872
|
}
|
|
1113
873
|
const integrity = computeIntegrity(tmpStaging, integrityFsOps());
|
|
1114
874
|
writeIntegrity(tmpStaging, integrity, integrityFsOps());
|
|
875
|
+
manifest.integrity = integrity;
|
|
1115
876
|
assertShippableStagingTree(tmpStaging);
|
|
1116
877
|
const archiveHash = await pack(tmpStaging, nodePath.resolve(outputPath));
|
|
1117
878
|
eventBus.emit({ type: "bundle.created", bundleName, bundleVersion, archiveHash });
|
|
1118
|
-
|
|
879
|
+
const warning = [driftWarning, ...(legacyAuthorPrimitives.warnings ?? [])].filter(Boolean).join("; ");
|
|
880
|
+
return c.json({ ...bundleBuildIdentity(manifest, archiveHash), bundleName, bundleVersion, archiveHash, packages: manifest.packages.length, ...(warning ? { warning } : {}) }, 201);
|
|
1119
881
|
}
|
|
1120
882
|
finally {
|
|
1121
883
|
fs.rmSync(tmpStaging, { recursive: true, force: true });
|
|
@@ -1132,39 +894,59 @@ bundleRoutes.post("/inspect", async (c) => {
|
|
|
1132
894
|
if (!bundlePath)
|
|
1133
895
|
return c.json({ error: "bundlePath is required" }, 400);
|
|
1134
896
|
let digestValid = false;
|
|
897
|
+
let archiveHash = null;
|
|
1135
898
|
try {
|
|
1136
899
|
const dr = verifyArchiveDigest(bundlePath);
|
|
1137
900
|
digestValid = dr.valid;
|
|
901
|
+
archiveHash = dr.actual;
|
|
1138
902
|
}
|
|
1139
903
|
catch { /* missing digest = invalid */ }
|
|
1140
904
|
const tmpDir = fs.mkdtempSync(nodePath.join(os.tmpdir(), "bundle-inspect-"));
|
|
1141
905
|
try {
|
|
1142
|
-
// Extract with safety pre-scan
|
|
906
|
+
// Extract with the SAME shared safety pre-scan that unpack() uses, but without
|
|
907
|
+
// content integrity verification (inspect must be able to REPORT a broken
|
|
908
|
+
// bundle rather than refuse it). One source of truth: collectUnsafeArchiveEntries
|
|
909
|
+
// rejects symlinks/hardlinks, POSIX-absolute and Windows drive-absolute paths,
|
|
910
|
+
// and dot-dot traversal (POSIX or backslash). Previously this route hand-rolled a
|
|
911
|
+
// weaker scan that missed drive-letter and backslash-traversal entries, so an
|
|
912
|
+
// archive unpack() refuses could be reported safe by inspect.
|
|
913
|
+
const unsafeEntries = await collectUnsafeArchiveEntries(bundlePath);
|
|
914
|
+
if (unsafeEntries.length > 0) {
|
|
915
|
+
return c.json({ error: `Unsafe archive entries: ${unsafeEntries.join("; ")}`, digestValid }, 200);
|
|
916
|
+
}
|
|
1143
917
|
const tar = await import("tar");
|
|
1144
|
-
|
|
1145
|
-
await tar.list({
|
|
918
|
+
await tar.extract({
|
|
1146
919
|
file: bundlePath,
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
unsafeEntries.push(`traversal: ${p}`);
|
|
920
|
+
cwd: tmpDir,
|
|
921
|
+
// Same defensive filter unpack() applies: even if the pre-scan above were
|
|
922
|
+
// bypassed, no unsafe entry is written.
|
|
923
|
+
filter: (p, entry) => {
|
|
924
|
+
if ("isSymbolicLink" in entry && typeof entry.isSymbolicLink === "function" && entry.isSymbolicLink())
|
|
925
|
+
return false;
|
|
926
|
+
const type = "type" in entry ? entry.type : undefined;
|
|
927
|
+
return unsafeArchiveEntryReason(p, type) === null;
|
|
1156
928
|
},
|
|
1157
929
|
});
|
|
1158
|
-
if (unsafeEntries.length > 0) {
|
|
1159
|
-
return c.json({ error: `Unsafe archive entries: ${unsafeEntries.join("; ")}`, digestValid }, 200);
|
|
1160
|
-
}
|
|
1161
|
-
await tar.extract({ file: bundlePath, cwd: tmpDir });
|
|
1162
930
|
const manifestPath = nodePath.join(tmpDir, "bundle.yaml");
|
|
1163
931
|
if (!fs.existsSync(manifestPath)) {
|
|
1164
932
|
return c.json({ error: "Bundle missing bundle.yaml", digestValid }, 200);
|
|
1165
933
|
}
|
|
1166
934
|
const manifestYaml = fs.readFileSync(manifestPath, "utf-8");
|
|
1167
935
|
const rawParsed = parsePodBundleManifest(manifestYaml);
|
|
936
|
+
const describeBehaviour = (identity, filesVerified) => {
|
|
937
|
+
const generator = { openrigVersion: getDaemonVersion() };
|
|
938
|
+
const source = identity.source ? { ...identity.source } : null;
|
|
939
|
+
try {
|
|
940
|
+
return inspectBundleBehaviour(tmpDir, { manifest: rawParsed, ...identity, source, generator, digestValid, filesVerified });
|
|
941
|
+
}
|
|
942
|
+
catch {
|
|
943
|
+
return {
|
|
944
|
+
schema: "openrig.bundle-behaviour/v1", state: "not_generated",
|
|
945
|
+
identity: { source, configurationId: identity.configurationId, packageDigest: identity.packageDigest, assembler: identity.assembler, generator, integrity: { digestValid, filesVerified } },
|
|
946
|
+
reason: "The archive's behaviour could not be described.", localInspectCommand: "rig bundle inspect <archive> --json",
|
|
947
|
+
};
|
|
948
|
+
}
|
|
949
|
+
};
|
|
1168
950
|
// Detect v2 (pod-aware) vs v1 (legacy)
|
|
1169
951
|
if (rawParsed && rawParsed["schema_version"] === 2) {
|
|
1170
952
|
const validation = validatePodBundleManifest(rawParsed);
|
|
@@ -1194,10 +976,15 @@ bundleRoutes.post("/inspect", async (c) => {
|
|
|
1194
976
|
// (v1 path normalizes through normalizeLegacyBundleManifest below).
|
|
1195
977
|
// Field is optional; undefined when bundle has no provenance.
|
|
1196
978
|
provenance: normalizeProvenanceBlock(rawParsed["provenance"]),
|
|
979
|
+
configuration: typeof rawParsed["configuration"]?.id === "string"
|
|
980
|
+
? rawParsed["configuration"] : undefined,
|
|
981
|
+
assembler: typeof rawParsed["assembler"]?.openrigVersion === "string"
|
|
982
|
+
? rawParsed["assembler"] : undefined,
|
|
1197
983
|
// Item 2 / slice-05: surface compatibility normalized to camelCase
|
|
1198
984
|
// (same single-contract reason as provenance above). v1 already
|
|
1199
985
|
// surfaces via the normalizer at the end of this handler.
|
|
1200
986
|
compatibility: normalizeCompatibilityBlock(rawParsed["compatibility"]),
|
|
987
|
+
preconditions: normalizePreconditionsBlock(rawParsed["preconditions"]),
|
|
1201
988
|
// Item 6 / Checkpoint 7.5 / QA-20260601 C1 repair: surface the 5
|
|
1202
989
|
// cross-primitive blocks normalized to camelCase so /inspect's
|
|
1203
990
|
// contract carries the same shape v1's normalizer already
|
|
@@ -1218,6 +1005,9 @@ bundleRoutes.post("/inspect", async (c) => {
|
|
|
1218
1005
|
agentImages: Array.isArray(rawParsed["agent_images"])
|
|
1219
1006
|
? rawParsed["agent_images"].filter((s) => typeof s === "string")
|
|
1220
1007
|
: undefined,
|
|
1008
|
+
project: rawParsed["project"] && typeof rawParsed["project"] === "object" && !Array.isArray(rawParsed["project"])
|
|
1009
|
+
? rawParsed["project"]
|
|
1010
|
+
: undefined,
|
|
1221
1011
|
};
|
|
1222
1012
|
const integrityCompat = integritySection ? {
|
|
1223
1013
|
schemaVersion: 2,
|
|
@@ -1231,13 +1021,17 @@ bundleRoutes.post("/inspect", async (c) => {
|
|
|
1231
1021
|
const integrityResult = integrityCompat
|
|
1232
1022
|
? verifyIntegrity(tmpDir, integrityCompat, integrityFsOps())
|
|
1233
1023
|
: { passed: false, mismatches: [], missing: [], extra: [], errors: ["no integrity section"] };
|
|
1234
|
-
|
|
1024
|
+
const identity = bundleBuildIdentity(podManifest, archiveHash);
|
|
1025
|
+
const behaviour = describeBehaviour(identity, integrityResult.passed);
|
|
1026
|
+
return c.json({ ...identity, manifest: podManifest, digestValid, integrityResult, behaviour }, 200);
|
|
1235
1027
|
}
|
|
1236
1028
|
const manifest = normalizeBundleManifest(parseBundleManifest(manifestYaml));
|
|
1237
1029
|
const integrityResult = manifest.integrity
|
|
1238
1030
|
? verifyIntegrity(tmpDir, manifest, integrityFsOps())
|
|
1239
1031
|
: { passed: false, mismatches: [], missing: [], extra: [], errors: ["no integrity section"] };
|
|
1240
|
-
|
|
1032
|
+
const identity = bundleBuildIdentity(manifest, archiveHash);
|
|
1033
|
+
const behaviour = describeBehaviour(identity, integrityResult.passed);
|
|
1034
|
+
return c.json({ ...identity, manifest, digestValid, integrityResult, behaviour }, 200);
|
|
1241
1035
|
}
|
|
1242
1036
|
catch (err) {
|
|
1243
1037
|
return c.json({ error: err.message }, 500);
|
|
@@ -1271,7 +1065,9 @@ bundleRoutes.post("/install", async (c) => {
|
|
|
1271
1065
|
const bundlePath = typeof body["bundlePath"] === "string" ? body["bundlePath"] : "";
|
|
1272
1066
|
const plan = body["plan"] === true;
|
|
1273
1067
|
const autoApprove = body["autoApprove"] === true;
|
|
1068
|
+
const nonInterruptive = typeof body["nonInterruptive"] === "boolean" ? body["nonInterruptive"] : undefined;
|
|
1274
1069
|
const targetRoot = typeof body["targetRoot"] === "string" ? body["targetRoot"] : undefined;
|
|
1070
|
+
const cwdOverride = typeof body["cwdOverride"] === "string" ? body["cwdOverride"] : undefined;
|
|
1275
1071
|
// Item 2 / slice-05 Checkpoint 3.3: install-time compatibility check inputs
|
|
1276
1072
|
const skipVersionCheck = body["skipVersionCheck"] === true;
|
|
1277
1073
|
const clientCliVersion = typeof body["cliVersion"] === "string" ? body["cliVersion"] : undefined;
|
|
@@ -1334,7 +1130,12 @@ bundleRoutes.post("/install", async (c) => {
|
|
|
1334
1130
|
// The check fails CLOSED on extraction failure (handled above) and
|
|
1335
1131
|
// fail-OPEN on missing rig name in the bundle (no rig name to compare).
|
|
1336
1132
|
if (!force && installMeta && rigRepo) {
|
|
1337
|
-
const
|
|
1133
|
+
const context = bundleInstallContext(rigRepo.db, installMeta.rigName ?? "", {
|
|
1134
|
+
name: String(installMeta.bundleManifest.name ?? installMeta.rigName ?? ""),
|
|
1135
|
+
version: typeof installMeta.bundleManifest.version === "string" ? installMeta.bundleManifest.version : null,
|
|
1136
|
+
source: bundlePath,
|
|
1137
|
+
});
|
|
1138
|
+
const runningRigs = context.existing.filter(rig => rig.state === "running");
|
|
1338
1139
|
const report = detectBundleConflicts({
|
|
1339
1140
|
bundleRigName: installMeta.rigName ?? "",
|
|
1340
1141
|
runningRigs,
|
|
@@ -1342,11 +1143,11 @@ bundleRoutes.post("/install", async (c) => {
|
|
|
1342
1143
|
if (report.hasConflicts) {
|
|
1343
1144
|
return c.json({
|
|
1344
1145
|
error: "Bundle install conflict check failed",
|
|
1146
|
+
status: "not_attempted",
|
|
1147
|
+
detail: bundleInstallContextLines(context).slice(0, context.existing.length + 1).join("\n"),
|
|
1148
|
+
bundleInstall: context,
|
|
1345
1149
|
conflicts: report.conflicts,
|
|
1346
|
-
resolutions:
|
|
1347
|
-
"stop the conflicting running rig and re-attempt install",
|
|
1348
|
-
"use --force to bypass for an operator-explicit override (NOT recommended for routine use; conflicts may produce partial install state)",
|
|
1349
|
-
],
|
|
1150
|
+
resolutions: context.resolutions,
|
|
1350
1151
|
}, 400);
|
|
1351
1152
|
}
|
|
1352
1153
|
}
|
|
@@ -1354,7 +1155,7 @@ bundleRoutes.post("/install", async (c) => {
|
|
|
1354
1155
|
// Plan mode: no run lifecycle
|
|
1355
1156
|
try {
|
|
1356
1157
|
const result = await bootstrapOrchestrator.bootstrap({
|
|
1357
|
-
mode: "plan", sourceRef: bundlePath, sourceKind: "rig_bundle",
|
|
1158
|
+
mode: "plan", sourceRef: bundlePath, sourceKind: "rig_bundle", cwdOverride,
|
|
1358
1159
|
});
|
|
1359
1160
|
if (result.status === "planned") {
|
|
1360
1161
|
eventBus.emit({ type: "bootstrap.planned", runId: result.runId, sourceRef: bundlePath, stages: result.stages.length });
|
|
@@ -1386,84 +1187,44 @@ bundleRoutes.post("/install", async (c) => {
|
|
|
1386
1187
|
try {
|
|
1387
1188
|
const result = await bootstrapOrchestrator.bootstrap({
|
|
1388
1189
|
mode: "apply", sourceRef: bundlePath, sourceKind: "rig_bundle",
|
|
1389
|
-
autoApprove, targetRoot, runId: run.id,
|
|
1190
|
+
autoApprove, nonInterruptive, targetRoot, cwdOverride, runId: run.id,
|
|
1390
1191
|
});
|
|
1391
|
-
if (result.status === "completed") {
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
//
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
let contextPacksRouting = null;
|
|
1407
|
-
let agentImagesRouting = null;
|
|
1408
|
-
try {
|
|
1409
|
-
skillsRouting = await routeSkillsAfterBootstrap(bundlePath);
|
|
1410
|
-
}
|
|
1411
|
-
catch {
|
|
1412
|
-
// Side-channel failure; install already succeeded
|
|
1413
|
-
}
|
|
1414
|
-
try {
|
|
1415
|
-
pluginsRouting = await routePluginsAfterBootstrap(bundlePath);
|
|
1192
|
+
if (result.status === "completed" || result.status === "partial") {
|
|
1193
|
+
// A pod-aware (v2) bundle routes its declared skills, plugins, workflow
|
|
1194
|
+
// specs, context packs and agent images in bootstrap's pre-launch hook,
|
|
1195
|
+
// before any seat launches, and reports the outcome on the result. A
|
|
1196
|
+
// legacy v1 bundle has no hook, so it keeps routing after a completed
|
|
1197
|
+
// install. Routing never fails the install; failures are reported in
|
|
1198
|
+
// routingFailures and the audit.
|
|
1199
|
+
const { bundleRouting, ...bootstrapResult } = result;
|
|
1200
|
+
const routing = bundleRouting
|
|
1201
|
+
?? (result.status === "completed" ? await bootstrapOrchestrator.routeBundleContents(bundlePath) : undefined);
|
|
1202
|
+
// The hook already put its failures in warnings; the legacy fallback adds its own here.
|
|
1203
|
+
const warnings = bundleRouting ? (result.warnings ?? []) : [...(result.warnings ?? []), ...routingFailureWarnings(routing)];
|
|
1204
|
+
const responseBody = routing ? { ...bootstrapResult, ...routing, warnings } : { ...bootstrapResult, warnings };
|
|
1205
|
+
if (result.status === "completed") {
|
|
1206
|
+
eventBus.emit({ type: "bootstrap.completed", runId: result.runId, rigId: result.rigId, sourceRef: bundlePath });
|
|
1416
1207
|
}
|
|
1417
|
-
|
|
1418
|
-
|
|
1208
|
+
else {
|
|
1209
|
+
const ok = result.stages.filter((s) => s.status === "ok").length;
|
|
1210
|
+
const fail = result.stages.filter((s) => s.status === "failed" || s.status === "blocked").length;
|
|
1211
|
+
eventBus.emit({ type: "bootstrap.partial", runId: result.runId, sourceRef: bundlePath, rigId: result.rigId, completed: ok, failed: fail });
|
|
1419
1212
|
}
|
|
1420
|
-
try {
|
|
1421
|
-
workflowSpecsRouting = await routeWorkflowSpecsAfterBootstrap(bundlePath);
|
|
1422
|
-
}
|
|
1423
|
-
catch {
|
|
1424
|
-
// Side-channel failure; install already succeeded
|
|
1425
|
-
}
|
|
1426
|
-
try {
|
|
1427
|
-
contextPacksRouting = await routeContextPacksAfterBootstrap(bundlePath);
|
|
1428
|
-
}
|
|
1429
|
-
catch {
|
|
1430
|
-
// Side-channel failure; install already succeeded
|
|
1431
|
-
}
|
|
1432
|
-
try {
|
|
1433
|
-
agentImagesRouting = await routeAgentImagesAfterBootstrap(bundlePath);
|
|
1434
|
-
}
|
|
1435
|
-
catch {
|
|
1436
|
-
// Side-channel failure; install already succeeded
|
|
1437
|
-
}
|
|
1438
|
-
const extras = {};
|
|
1439
|
-
if (skillsRouting)
|
|
1440
|
-
extras.skillsRouting = skillsRouting;
|
|
1441
|
-
if (pluginsRouting)
|
|
1442
|
-
extras.pluginsRouting = pluginsRouting;
|
|
1443
|
-
if (workflowSpecsRouting)
|
|
1444
|
-
extras.workflowSpecsRouting = workflowSpecsRouting;
|
|
1445
|
-
if (contextPacksRouting)
|
|
1446
|
-
extras.contextPacksRouting = contextPacksRouting;
|
|
1447
|
-
if (agentImagesRouting)
|
|
1448
|
-
extras.agentImagesRouting = agentImagesRouting;
|
|
1449
|
-
return c.json(Object.keys(extras).length > 0 ? { ...result, ...extras } : result, 201);
|
|
1450
|
-
}
|
|
1451
|
-
if (result.status === "partial") {
|
|
1452
|
-
const ok = result.stages.filter((s) => s.status === "ok").length;
|
|
1453
|
-
const fail = result.stages.filter((s) => s.status === "failed" || s.status === "blocked").length;
|
|
1454
|
-
eventBus.emit({ type: "bootstrap.partial", runId: result.runId, sourceRef: bundlePath, rigId: result.rigId, completed: ok, failed: fail });
|
|
1455
1213
|
writeInstallAudit({
|
|
1456
|
-
bundlePath, outcome: "partial", targetRigId: result.rigId,
|
|
1214
|
+
bundlePath, outcome: result.status === "completed" ? "success" : "partial", targetRigId: result.rigId,
|
|
1457
1215
|
targetRigName: installMeta?.rigName, cliVersion: clientCliVersion,
|
|
1458
1216
|
bundleManifest: installMeta?.bundleManifest,
|
|
1217
|
+
routingFailures: routing?.routingFailures,
|
|
1459
1218
|
});
|
|
1460
|
-
return c.json(
|
|
1219
|
+
return c.json(responseBody, result.status === "completed" ? 201 : 200);
|
|
1461
1220
|
}
|
|
1462
1221
|
eventBus.emit({ type: "bootstrap.failed", runId: result.runId, sourceRef: bundlePath, error: result.errors[0] ?? "failed" });
|
|
1222
|
+
// The pre-launch hook may have routed contents before a later failure; the result carries what it did.
|
|
1463
1223
|
writeInstallAudit({
|
|
1464
1224
|
bundlePath, outcome: "failed",
|
|
1465
1225
|
targetRigName: installMeta?.rigName, cliVersion: clientCliVersion,
|
|
1466
1226
|
bundleManifest: installMeta?.bundleManifest,
|
|
1227
|
+
routingFailures: result.bundleRouting?.routingFailures,
|
|
1467
1228
|
});
|
|
1468
1229
|
const hasBlocked = result.stages.some((s) => s.status === "blocked");
|
|
1469
1230
|
return c.json(result, hasBlocked ? 409 : 500);
|