@openrig/cli 0.3.1 → 0.3.3-rc.0
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/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +1 -1
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +8 -8
- package/daemon/dist/adapters/cmux-transport.d.ts.map +1 -1
- package/daemon/dist/adapters/cmux-transport.js +51 -9
- package/daemon/dist/adapters/cmux-transport.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +34 -5
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +68 -1
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +141 -2
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/db/migrations/037_mission_control_actions.d.ts +5 -1
- package/daemon/dist/db/migrations/037_mission_control_actions.d.ts.map +1 -1
- package/daemon/dist/db/migrations/037_mission_control_actions.js +5 -1
- package/daemon/dist/db/migrations/037_mission_control_actions.js.map +1 -1
- package/daemon/dist/db/migrations/041_rig_policy.d.ts +32 -0
- package/daemon/dist/db/migrations/041_rig_policy.d.ts.map +1 -0
- package/daemon/dist/db/migrations/041_rig_policy.js +47 -0
- package/daemon/dist/db/migrations/041_rig_policy.js.map +1 -0
- package/daemon/dist/db/migrations/042_rig_archive.d.ts +16 -0
- package/daemon/dist/db/migrations/042_rig_archive.d.ts.map +1 -0
- package/daemon/dist/db/migrations/042_rig_archive.js +21 -0
- package/daemon/dist/db/migrations/042_rig_archive.js.map +1 -0
- package/daemon/dist/domain/agent-images/resume-token-discovery.js +1 -1
- package/daemon/dist/domain/agent-images/resume-token-discovery.js.map +1 -1
- package/daemon/dist/domain/agent-images/snapshot-capturer.d.ts.map +1 -1
- package/daemon/dist/domain/agent-images/snapshot-capturer.js +2 -1
- package/daemon/dist/domain/agent-images/snapshot-capturer.js.map +1 -1
- package/daemon/dist/domain/agent-manifest.js +27 -0
- package/daemon/dist/domain/agent-manifest.js.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.js +86 -6
- package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
- package/daemon/dist/domain/bundle-agent-images-router.d.ts +95 -0
- package/daemon/dist/domain/bundle-agent-images-router.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-agent-images-router.js +140 -0
- package/daemon/dist/domain/bundle-agent-images-router.js.map +1 -0
- package/daemon/dist/domain/bundle-assembler.d.ts +18 -1
- package/daemon/dist/domain/bundle-assembler.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-assembler.js +11 -1
- package/daemon/dist/domain/bundle-assembler.js.map +1 -1
- package/daemon/dist/domain/bundle-audit.d.ts +89 -0
- package/daemon/dist/domain/bundle-audit.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-audit.js +87 -0
- package/daemon/dist/domain/bundle-audit.js.map +1 -0
- package/daemon/dist/domain/bundle-conflict-detector.d.ts +57 -0
- package/daemon/dist/domain/bundle-conflict-detector.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-conflict-detector.js +49 -0
- package/daemon/dist/domain/bundle-conflict-detector.js.map +1 -0
- package/daemon/dist/domain/bundle-context-packs-router.d.ts +100 -0
- package/daemon/dist/domain/bundle-context-packs-router.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-context-packs-router.js +158 -0
- package/daemon/dist/domain/bundle-context-packs-router.js.map +1 -0
- package/daemon/dist/domain/bundle-plugins-router.d.ts +69 -0
- package/daemon/dist/domain/bundle-plugins-router.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-plugins-router.js +87 -0
- package/daemon/dist/domain/bundle-plugins-router.js.map +1 -0
- package/daemon/dist/domain/bundle-skills-router.d.ts +62 -0
- package/daemon/dist/domain/bundle-skills-router.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-skills-router.js +90 -0
- package/daemon/dist/domain/bundle-skills-router.js.map +1 -0
- package/daemon/dist/domain/bundle-types.d.ts +106 -0
- package/daemon/dist/domain/bundle-types.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-types.js +375 -0
- package/daemon/dist/domain/bundle-types.js.map +1 -1
- package/daemon/dist/domain/bundle-workflow-specs-router.d.ts +94 -0
- package/daemon/dist/domain/bundle-workflow-specs-router.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-workflow-specs-router.js +144 -0
- package/daemon/dist/domain/bundle-workflow-specs-router.js.map +1 -0
- package/daemon/dist/domain/context-monitor.d.ts +5 -1
- package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/context-monitor.js +28 -15
- package/daemon/dist/domain/context-monitor.js.map +1 -1
- package/daemon/dist/domain/graph-projection.d.ts +6 -0
- package/daemon/dist/domain/graph-projection.d.ts.map +1 -1
- package/daemon/dist/domain/graph-projection.js +6 -0
- package/daemon/dist/domain/graph-projection.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +7 -7
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts +18 -0
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +98 -0
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +12 -0
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +25 -1
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/pod-bundle-assembler.d.ts +16 -1
- package/daemon/dist/domain/pod-bundle-assembler.d.ts.map +1 -1
- package/daemon/dist/domain/pod-bundle-assembler.js +11 -1
- package/daemon/dist/domain/pod-bundle-assembler.js.map +1 -1
- package/daemon/dist/domain/profile-resolver.d.ts +10 -0
- package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/profile-resolver.js +4 -0
- package/daemon/dist/domain/profile-resolver.js.map +1 -1
- package/daemon/dist/domain/ps-projection.d.ts +28 -1
- package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
- package/daemon/dist/domain/ps-projection.js +67 -1
- package/daemon/dist/domain/ps-projection.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +37 -1
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +99 -2
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/restore-check-service.d.ts +4 -0
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js +16 -7
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/rig-expansion-service.d.ts +1 -1
- package/daemon/dist/domain/rig-expansion-service.d.ts.map +1 -1
- package/daemon/dist/domain/rig-expansion-service.js +12 -10
- package/daemon/dist/domain/rig-expansion-service.js.map +1 -1
- package/daemon/dist/domain/rig-policy/rig-policy-defaults.d.ts +48 -0
- package/daemon/dist/domain/rig-policy/rig-policy-defaults.d.ts.map +1 -0
- package/daemon/dist/domain/rig-policy/rig-policy-defaults.js +96 -0
- package/daemon/dist/domain/rig-policy/rig-policy-defaults.js.map +1 -0
- package/daemon/dist/domain/rig-policy/rig-policy-store.d.ts +46 -0
- package/daemon/dist/domain/rig-policy/rig-policy-store.d.ts.map +1 -0
- package/daemon/dist/domain/rig-policy/rig-policy-store.js +171 -0
- package/daemon/dist/domain/rig-policy/rig-policy-store.js.map +1 -0
- package/daemon/dist/domain/rig-policy/rig-policy-types.d.ts +145 -0
- package/daemon/dist/domain/rig-policy/rig-policy-types.d.ts.map +1 -0
- package/daemon/dist/domain/rig-policy/rig-policy-types.js +52 -0
- package/daemon/dist/domain/rig-policy/rig-policy-types.js.map +1 -0
- package/daemon/dist/domain/rig-policy/rig-policy-validator.d.ts +58 -0
- package/daemon/dist/domain/rig-policy/rig-policy-validator.d.ts.map +1 -0
- package/daemon/dist/domain/rig-policy/rig-policy-validator.js +211 -0
- package/daemon/dist/domain/rig-policy/rig-policy-validator.js.map +1 -0
- package/daemon/dist/domain/rig-repository.d.ts +28 -2
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +40 -3
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +177 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +414 -55
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts +19 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.js +30 -12
- package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
- package/daemon/dist/domain/rigspec-schema.d.ts +1 -0
- package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +4 -1
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/seat-activity-service.d.ts +79 -0
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -0
- package/daemon/dist/domain/seat-activity-service.js +123 -0
- package/daemon/dist/domain/seat-activity-service.js.map +1 -0
- package/daemon/dist/domain/session-transport.d.ts +15 -0
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +8 -3
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.d.ts +12 -0
- package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.js +23 -0
- package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
- package/daemon/dist/domain/spec-library-service.d.ts.map +1 -1
- package/daemon/dist/domain/spec-library-service.js +19 -0
- package/daemon/dist/domain/spec-library-service.js.map +1 -1
- package/daemon/dist/domain/topology-converge.d.ts +97 -0
- package/daemon/dist/domain/topology-converge.d.ts.map +1 -0
- package/daemon/dist/domain/topology-converge.js +70 -0
- package/daemon/dist/domain/topology-converge.js.map +1 -0
- package/daemon/dist/domain/types.d.ts +85 -3
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/whoami-service.d.ts +8 -0
- package/daemon/dist/domain/whoami-service.d.ts.map +1 -1
- package/daemon/dist/domain/whoami-service.js +1 -0
- package/daemon/dist/domain/whoami-service.js.map +1 -1
- package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-runtime.js +9 -1
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.d.ts +41 -0
- package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.js +63 -0
- package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
- package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts +7 -0
- package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts.map +1 -1
- package/daemon/dist/domain/workspace/default-workspace-scaffold.js +156 -3
- package/daemon/dist/domain/workspace/default-workspace-scaffold.js.map +1 -1
- package/daemon/dist/domain/workspace/workspace-doctor.d.ts +197 -0
- package/daemon/dist/domain/workspace/workspace-doctor.d.ts.map +1 -0
- package/daemon/dist/domain/workspace/workspace-doctor.js +448 -0
- package/daemon/dist/domain/workspace/workspace-doctor.js.map +1 -0
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +11 -0
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/routes/bundles.d.ts.map +1 -1
- package/daemon/dist/routes/bundles.js +966 -7
- package/daemon/dist/routes/bundles.js.map +1 -1
- package/daemon/dist/routes/config.d.ts.map +1 -1
- package/daemon/dist/routes/config.js +19 -2
- package/daemon/dist/routes/config.js.map +1 -1
- package/daemon/dist/routes/info.d.ts +3 -0
- package/daemon/dist/routes/info.d.ts.map +1 -0
- package/daemon/dist/routes/info.js +20 -0
- package/daemon/dist/routes/info.js.map +1 -0
- package/daemon/dist/routes/ps.js +4 -1
- package/daemon/dist/routes/ps.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts +18 -0
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +97 -5
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/rig-policy.d.ts +9 -0
- package/daemon/dist/routes/rig-policy.d.ts.map +1 -0
- package/daemon/dist/routes/rig-policy.js +174 -0
- package/daemon/dist/routes/rig-policy.js.map +1 -0
- package/daemon/dist/routes/rigs.d.ts.map +1 -1
- package/daemon/dist/routes/rigs.js +134 -4
- package/daemon/dist/routes/rigs.js.map +1 -1
- package/daemon/dist/routes/sessions.d.ts.map +1 -1
- package/daemon/dist/routes/sessions.js +26 -3
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/up.d.ts +25 -0
- package/daemon/dist/routes/up.d.ts.map +1 -1
- package/daemon/dist/routes/up.js +70 -3
- package/daemon/dist/routes/up.js.map +1 -1
- package/daemon/dist/routes/workspace.d.ts.map +1 -1
- package/daemon/dist/routes/workspace.js +80 -1
- package/daemon/dist/routes/workspace.js.map +1 -1
- package/daemon/dist/server.d.ts +10 -0
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +11 -0
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +46 -4
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/docs/reference/getting-started.md +69 -0
- package/daemon/specs/agents/orchestration/orchestrator/guidance/role.md +28 -4
- package/daemon/specs/agents/shared/skills/core/openrig-user/SKILL.md +361 -15
- package/daemon/specs/agents/shared/skills/core/rig-lifecycle/SKILL.md +2 -2
- package/daemon/specs/rigs/launch/conveyor/rig.yaml +1 -1
- package/dist/client.d.ts +3 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +13 -1
- package/dist/client.js.map +1 -1
- package/dist/commands/add.d.ts +4 -0
- package/dist/commands/add.d.ts.map +1 -0
- package/dist/commands/add.js +115 -0
- package/dist/commands/add.js.map +1 -0
- package/dist/commands/archive.d.ts +10 -0
- package/dist/commands/archive.d.ts.map +1 -0
- package/dist/commands/archive.js +68 -0
- package/dist/commands/archive.js.map +1 -0
- package/dist/commands/bootstrap.js +2 -2
- package/dist/commands/bootstrap.js.map +1 -1
- package/dist/commands/bundle.d.ts.map +1 -1
- package/dist/commands/bundle.js +123 -2
- package/dist/commands/bundle.js.map +1 -1
- package/dist/commands/config-init-workspace.d.ts.map +1 -1
- package/dist/commands/config-init-workspace.js +40 -5
- package/dist/commands/config-init-workspace.js.map +1 -1
- package/dist/commands/discover.js +2 -2
- package/dist/commands/discover.js.map +1 -1
- package/dist/commands/down.d.ts +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +91 -3
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +72 -10
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts +6 -0
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +103 -5
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/rig-policy.d.ts +48 -0
- package/dist/commands/rig-policy.d.ts.map +1 -0
- package/dist/commands/rig-policy.js +429 -0
- package/dist/commands/rig-policy.js.map +1 -0
- package/dist/commands/scope.d.ts +6 -0
- package/dist/commands/scope.d.ts.map +1 -0
- package/dist/commands/scope.js +659 -0
- package/dist/commands/scope.js.map +1 -0
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +11 -0
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/setup.d.ts +7 -0
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +28 -1
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +35 -2
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/unarchive.d.ts +10 -0
- package/dist/commands/unarchive.d.ts.map +1 -0
- package/dist/commands/unarchive.js +53 -0
- package/dist/commands/unarchive.js.map +1 -0
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +97 -0
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +4 -1
- package/dist/commands/whoami.js.map +1 -1
- package/dist/commands/workflow.d.ts +9 -0
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +141 -4
- package/dist/commands/workflow.js.map +1 -1
- package/dist/commands/workspace.d.ts +20 -0
- package/dist/commands/workspace.d.ts.map +1 -1
- package/dist/commands/workspace.js +140 -10
- package/dist/commands/workspace.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts +48 -1
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +57 -2
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/scope/dot-id.d.ts +43 -0
- package/dist/lib/scope/dot-id.d.ts.map +1 -0
- package/dist/lib/scope/dot-id.js +165 -0
- package/dist/lib/scope/dot-id.js.map +1 -0
- package/dist/lib/scope/scope-fs.d.ts +79 -0
- package/dist/lib/scope/scope-fs.d.ts.map +1 -0
- package/dist/lib/scope/scope-fs.js +468 -0
- package/dist/lib/scope/scope-fs.js.map +1 -0
- package/dist/lib/scope/templates.d.ts +38 -0
- package/dist/lib/scope/templates.d.ts.map +1 -0
- package/dist/lib/scope/templates.js +109 -0
- package/dist/lib/scope/templates.js.map +1 -0
- package/dist/lib/scope/types.d.ts +61 -0
- package/dist/lib/scope/types.d.ts.map +1 -0
- package/dist/lib/scope/types.js +38 -0
- package/dist/lib/scope/types.js.map +1 -0
- package/dist/lib/scope-templates/backlog-deprecation.md +26 -0
- package/dist/lib/scope-templates/backlog-tech-debt.md +22 -0
- package/dist/lib/scope-templates/bug-fix.md +30 -0
- package/dist/lib/scope-templates/mission-notes.md +97 -0
- package/dist/lib/scope-templates/mission-placeholder.md +20 -0
- package/dist/lib/scope-templates/mission-release.md +25 -0
- package/dist/lib/scope-templates/placeholder.md +30 -0
- package/dist/lib/scope-templates/release-feature.md +26 -0
- package/dist/lib/scope-templates/research.md +22 -0
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +29 -0
- package/dist/mcp-server.js.map +1 -1
- package/dist/release-surface/affected-skills.d.ts +49 -0
- package/dist/release-surface/affected-skills.d.ts.map +1 -0
- package/dist/release-surface/affected-skills.js +153 -0
- package/dist/release-surface/affected-skills.js.map +1 -0
- package/dist/release-surface/extract-surface.d.ts +23 -0
- package/dist/release-surface/extract-surface.d.ts.map +1 -0
- package/dist/release-surface/extract-surface.js +193 -0
- package/dist/release-surface/extract-surface.js.map +1 -0
- package/dist/release-surface/generate.d.ts +2 -0
- package/dist/release-surface/generate.d.ts.map +1 -0
- package/dist/release-surface/generate.js +51 -0
- package/dist/release-surface/generate.js.map +1 -0
- package/dist/release-surface/surface-diff.d.ts +40 -0
- package/dist/release-surface/surface-diff.d.ts.map +1 -0
- package/dist/release-surface/surface-diff.js +212 -0
- package/dist/release-surface/surface-diff.js.map +1 -0
- package/package.json +2 -2
- package/ui/dist/assets/index-CrJgCmkX.js +552 -0
- package/ui/dist/index.html +1 -1
- package/ui/dist/assets/index-Rl3ZBrUg.js +0 -547
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bundle plugins router (Item 6 / slice-05 Checkpoint 7.3c).
|
|
3
|
+
*
|
|
4
|
+
* Pure function. Copies plugin trees declared in a bundle manifest's
|
|
5
|
+
* plugins[] block from the bundle's extracted tree to the operator plugins
|
|
6
|
+
* library (per-id subdir). Mirrors the bundle-skills-router pattern: FsOps
|
|
7
|
+
* injection; both-sides path containment (banked
|
|
8
|
+
* feedback_pre_existing_trust_boundary_reuse_canonical_helper addendum:
|
|
9
|
+
* contain BOTH source AND target when handling untrusted path input);
|
|
10
|
+
* missing source surfaces as status=missing; unsafe paths rejected with
|
|
11
|
+
* status=unsafe.
|
|
12
|
+
*
|
|
13
|
+
* Per orch-ratified HYBRID decision: v0 source.kind is local only (path
|
|
14
|
+
* under the bundle's extracted tree). Other kinds (external operator-host
|
|
15
|
+
* paths, remote fetch) reserved for future.
|
|
16
|
+
*
|
|
17
|
+
* /install handler integration lands at Checkpoint 7.3d.
|
|
18
|
+
*/
|
|
19
|
+
import nodePath from "node:path";
|
|
20
|
+
/**
|
|
21
|
+
* Route each declared plugin from the bundle tree to the operator plugins
|
|
22
|
+
* library as <targetPluginsDir>/<id>/. Per-plugin safety: BOTH source path
|
|
23
|
+
* (under bundleRoot) AND target path (under targetPluginsDir) are
|
|
24
|
+
* containment-checked. Banked both-sides-of-trust-boundary lesson applied.
|
|
25
|
+
*/
|
|
26
|
+
export function routePlugins(input, fs) {
|
|
27
|
+
const records = [];
|
|
28
|
+
const bundleRootResolved = nodePath.resolve(input.bundleRoot);
|
|
29
|
+
const targetRootResolved = nodePath.resolve(input.targetPluginsDir);
|
|
30
|
+
fs.mkdirp(input.targetPluginsDir);
|
|
31
|
+
for (const plugin of input.declaredPlugins) {
|
|
32
|
+
if (!plugin.id || plugin.source.kind !== "local") {
|
|
33
|
+
records.push({
|
|
34
|
+
id: plugin.id || "(unknown)",
|
|
35
|
+
status: "unsafe",
|
|
36
|
+
detail: `plugin reference invalid: id required and source.kind must be 'local' (other kinds reserved for future)`,
|
|
37
|
+
});
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
// Source containment: source.path must resolve inside bundleRoot
|
|
41
|
+
const sourceAbs = nodePath.resolve(input.bundleRoot, plugin.source.path);
|
|
42
|
+
if (sourceAbs !== bundleRootResolved && !sourceAbs.startsWith(bundleRootResolved + nodePath.sep)) {
|
|
43
|
+
records.push({
|
|
44
|
+
id: plugin.id,
|
|
45
|
+
status: "unsafe",
|
|
46
|
+
detail: `plugin source path '${plugin.source.path}' escapes bundle workspace; rejected`,
|
|
47
|
+
});
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
if (!fs.exists(sourceAbs)) {
|
|
51
|
+
records.push({
|
|
52
|
+
id: plugin.id,
|
|
53
|
+
status: "missing",
|
|
54
|
+
detail: `plugin source '${plugin.source.path}' not present in bundle; skipped`,
|
|
55
|
+
});
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
if (!fs.isDirectory(sourceAbs)) {
|
|
59
|
+
records.push({
|
|
60
|
+
id: plugin.id,
|
|
61
|
+
status: "not_directory",
|
|
62
|
+
detail: `plugin source '${plugin.source.path}' is not a directory; skipped`,
|
|
63
|
+
});
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
// Target containment: id must produce a path inside targetPluginsDir
|
|
67
|
+
const targetAbs = nodePath.resolve(input.targetPluginsDir, plugin.id);
|
|
68
|
+
if (targetAbs !== targetRootResolved && !targetAbs.startsWith(targetRootResolved + nodePath.sep)) {
|
|
69
|
+
records.push({
|
|
70
|
+
id: plugin.id,
|
|
71
|
+
status: "unsafe",
|
|
72
|
+
detail: `plugin id '${plugin.id}' would resolve outside target plugins library; rejected`,
|
|
73
|
+
});
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
fs.copyDir(sourceAbs, targetAbs);
|
|
77
|
+
records.push({
|
|
78
|
+
id: plugin.id,
|
|
79
|
+
status: "routed",
|
|
80
|
+
installedAt: targetAbs,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
const routedCount = records.filter((r) => r.status === "routed").length;
|
|
84
|
+
const rejectedCount = records.length - routedCount;
|
|
85
|
+
return { records, routedCount, rejectedCount };
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=bundle-plugins-router.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle-plugins-router.js","sourceRoot":"","sources":["../../src/domain/bundle-plugins-router.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,QAAQ,MAAM,WAAW,CAAC;AA+CjC;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,KAAwB,EAAE,EAAsB;IAC3E,MAAM,OAAO,GAAyB,EAAE,CAAC;IACzC,MAAM,kBAAkB,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAC9D,MAAM,kBAAkB,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACpE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAElC,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,eAAe,EAAE,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YACjD,OAAO,CAAC,IAAI,CAAC;gBACX,EAAE,EAAE,MAAM,CAAC,EAAE,IAAI,WAAW;gBAC5B,MAAM,EAAE,QAAQ;gBAChB,MAAM,EAAE,yGAAyG;aAClH,CAAC,CAAC;YACH,SAAS;QACX,CAAC;QACD,iEAAiE;QACjE,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACzE,IAAI,SAAS,KAAK,kBAAkB,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,kBAAkB,GAAG,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACjG,OAAO,CAAC,IAAI,CAAC;gBACX,EAAE,EAAE,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M,EAAE,QAAQ;YAChB,WAAW,EAAE,SAAS;SACvB,CAAC,CAAC;IACL,CAAC;IAED,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,MAAM,CAAC;IACxE,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,GAAG,WAAW,CAAC;IACnD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bundle skills router (Item 6 / slice-05 Checkpoint 7.2).
|
|
3
|
+
*
|
|
4
|
+
* Pure function. Copies skill files declared in a bundle manifest's skills[]
|
|
5
|
+
* block from the bundle's extracted tree to the operator skills library.
|
|
6
|
+
* No daemon dependencies — fully unit-testable via FsOps injection.
|
|
7
|
+
*
|
|
8
|
+
* Safety: each declared skill path is treated as untrusted manifest content;
|
|
9
|
+
* the helper rejects paths that escape the bundle tree (path containment
|
|
10
|
+
* check mirrors the bundle-source-resolver pattern). The output target
|
|
11
|
+
* directory is created via mkdirp.
|
|
12
|
+
*
|
|
13
|
+
* Honest-scoping: missing source files surface as warnings in the result
|
|
14
|
+
* (NOT thrown errors) so the install lifecycle can continue with what's
|
|
15
|
+
* available. Same for absent skills library: caller decides to skip-or-fail.
|
|
16
|
+
*
|
|
17
|
+
* /install handler integration lands at Checkpoint 7.3.
|
|
18
|
+
*/
|
|
19
|
+
/** Filesystem injection point — real impl wraps node:fs. Tests substitute in-memory. */
|
|
20
|
+
export interface SkillsRouterFsOps {
|
|
21
|
+
exists: (path: string) => boolean;
|
|
22
|
+
readFile: (path: string) => string;
|
|
23
|
+
writeFile: (path: string, content: string) => void;
|
|
24
|
+
mkdirp: (path: string) => void;
|
|
25
|
+
}
|
|
26
|
+
/** Inputs to routeSkills. */
|
|
27
|
+
export interface RouteSkillsInput {
|
|
28
|
+
/** Absolute path to the bundle's extracted root (tmp dir from unpack). */
|
|
29
|
+
bundleRoot: string;
|
|
30
|
+
/** Relative skill paths declared in the manifest's skills[] block. */
|
|
31
|
+
declaredSkills: string[];
|
|
32
|
+
/** Absolute path to the operator skills library (default ~/.openrig/skills). */
|
|
33
|
+
targetSkillsDir: string;
|
|
34
|
+
}
|
|
35
|
+
/** One routed skill (or one rejection). */
|
|
36
|
+
export interface RoutedSkillRecord {
|
|
37
|
+
/** Declared path from manifest.skills[]. */
|
|
38
|
+
declaredPath: string;
|
|
39
|
+
/** "routed" = copied successfully; "missing" = source not in bundle;
|
|
40
|
+
* "unsafe" = escapes bundle workspace; "no_library" = target dir not
|
|
41
|
+
* present and caller did not request creation (reserved for future
|
|
42
|
+
* library-reachability mode). */
|
|
43
|
+
status: "routed" | "missing" | "unsafe";
|
|
44
|
+
/** Where the skill landed in the target library (absolute path), if routed. */
|
|
45
|
+
installedAt?: string;
|
|
46
|
+
/** Human-readable detail (3-part error shape input for caller). */
|
|
47
|
+
detail?: string;
|
|
48
|
+
}
|
|
49
|
+
/** Aggregate routing result. */
|
|
50
|
+
export interface RouteSkillsResult {
|
|
51
|
+
records: RoutedSkillRecord[];
|
|
52
|
+
routedCount: number;
|
|
53
|
+
rejectedCount: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Route each declared skill from the bundle tree to the operator skills
|
|
57
|
+
* library. Per-skill safety: resolved source path must stay inside bundleRoot;
|
|
58
|
+
* skipped if missing from bundle. Caller writes the install audit record
|
|
59
|
+
* (Item 4 chain) using the records returned here.
|
|
60
|
+
*/
|
|
61
|
+
export declare function routeSkills(input: RouteSkillsInput, fs: SkillsRouterFsOps): RouteSkillsResult;
|
|
62
|
+
//# sourceMappingURL=bundle-skills-router.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle-skills-router.d.ts","sourceRoot":"","sources":["../../src/domain/bundle-skills-router.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,wFAAwF;AACxF,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAClC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACnC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAED,6BAA6B;AAC7B,MAAM,WAAW,gBAAgB;IAC/B,0EAA0E;IAC1E,UAAU,EAAE,MAAM,CAAC;IACnB,sEAAsE;IACtE,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,gFAAgF;IAChF,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,2CAA2C;AAC3C,MAAM,WAAW,iBAAiB;IAChC,4CAA4C;IAC5C,YAAY,EAAE,MAAM,CAAC;IACrB;;;qCAGiC;IACjC,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;IACxC,+EAA+E;IAC/E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mEAAmE;IACnE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,gCAAgC;AAChC,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,EAAE,EAAE,EAAE,iBAAiB,GAAG,iBAAiB,CAiE7F"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bundle skills router (Item 6 / slice-05 Checkpoint 7.2).
|
|
3
|
+
*
|
|
4
|
+
* Pure function. Copies skill files declared in a bundle manifest's skills[]
|
|
5
|
+
* block from the bundle's extracted tree to the operator skills library.
|
|
6
|
+
* No daemon dependencies — fully unit-testable via FsOps injection.
|
|
7
|
+
*
|
|
8
|
+
* Safety: each declared skill path is treated as untrusted manifest content;
|
|
9
|
+
* the helper rejects paths that escape the bundle tree (path containment
|
|
10
|
+
* check mirrors the bundle-source-resolver pattern). The output target
|
|
11
|
+
* directory is created via mkdirp.
|
|
12
|
+
*
|
|
13
|
+
* Honest-scoping: missing source files surface as warnings in the result
|
|
14
|
+
* (NOT thrown errors) so the install lifecycle can continue with what's
|
|
15
|
+
* available. Same for absent skills library: caller decides to skip-or-fail.
|
|
16
|
+
*
|
|
17
|
+
* /install handler integration lands at Checkpoint 7.3.
|
|
18
|
+
*/
|
|
19
|
+
import nodePath from "node:path";
|
|
20
|
+
/**
|
|
21
|
+
* Route each declared skill from the bundle tree to the operator skills
|
|
22
|
+
* library. Per-skill safety: resolved source path must stay inside bundleRoot;
|
|
23
|
+
* skipped if missing from bundle. Caller writes the install audit record
|
|
24
|
+
* (Item 4 chain) using the records returned here.
|
|
25
|
+
*/
|
|
26
|
+
export function routeSkills(input, fs) {
|
|
27
|
+
const records = [];
|
|
28
|
+
const bundleRootResolved = nodePath.resolve(input.bundleRoot);
|
|
29
|
+
const targetRootResolved = nodePath.resolve(input.targetSkillsDir);
|
|
30
|
+
fs.mkdirp(input.targetSkillsDir);
|
|
31
|
+
for (const declared of input.declaredSkills) {
|
|
32
|
+
const sourceAbs = nodePath.resolve(input.bundleRoot, declared);
|
|
33
|
+
// Defense-in-depth path-containment on SOURCE (mirrors bundle-source-
|
|
34
|
+
// resolver pattern; the manifest validator already rejects unsafe paths
|
|
35
|
+
// via isRelativeSafePath but we re-check here in case the input bypassed
|
|
36
|
+
// validation upstream).
|
|
37
|
+
if (sourceAbs !== bundleRootResolved && !sourceAbs.startsWith(bundleRootResolved + nodePath.sep)) {
|
|
38
|
+
records.push({
|
|
39
|
+
declaredPath: declared,
|
|
40
|
+
status: "unsafe",
|
|
41
|
+
detail: `skill path '${declared}' escapes bundle workspace; rejected`,
|
|
42
|
+
});
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
if (!fs.exists(sourceAbs)) {
|
|
46
|
+
records.push({
|
|
47
|
+
declaredPath: declared,
|
|
48
|
+
status: "missing",
|
|
49
|
+
detail: `skill source '${declared}' not present in bundle; skipped`,
|
|
50
|
+
});
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
// Target path mirrors the declared path under the target skills directory.
|
|
54
|
+
// Operator's skill library inherits the bundle's directory layout for the
|
|
55
|
+
// declared skills (e.g., skills/foo/SKILL.md → <target>/foo/SKILL.md);
|
|
56
|
+
// strip the leading "skills/" prefix if present so the target dir is the
|
|
57
|
+
// root of the operator's skill tree.
|
|
58
|
+
const declaredTrimmed = declared.startsWith("skills/") ? declared.slice("skills/".length) : declared;
|
|
59
|
+
const targetAbs = nodePath.resolve(input.targetSkillsDir, declaredTrimmed);
|
|
60
|
+
// Defense-in-depth path-containment on TARGET (B1 repair on
|
|
61
|
+
// qitem-20260518215234-f84fff45). The leading "skills/" strip can promote
|
|
62
|
+
// a relative segment that looks safe under bundleRoot (e.g.
|
|
63
|
+
// "skills/../outside/SKILL.md" passes source-containment because the bundle
|
|
64
|
+
// tree may contain "outside/SKILL.md", but stripping yields
|
|
65
|
+
// "../outside/SKILL.md" which would escape targetSkillsDir). Reject if the
|
|
66
|
+
// target resolves outside the target library. Banked lesson:
|
|
67
|
+
// feedback_pre_existing_trust_boundary_reuse_canonical_helper — contain
|
|
68
|
+
// BOTH source and target when handling untrusted path input.
|
|
69
|
+
if (targetAbs !== targetRootResolved && !targetAbs.startsWith(targetRootResolved + nodePath.sep)) {
|
|
70
|
+
records.push({
|
|
71
|
+
declaredPath: declared,
|
|
72
|
+
status: "unsafe",
|
|
73
|
+
detail: `skill target path for '${declared}' escapes target skills library; rejected`,
|
|
74
|
+
});
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
fs.mkdirp(nodePath.dirname(targetAbs));
|
|
78
|
+
const content = fs.readFile(sourceAbs);
|
|
79
|
+
fs.writeFile(targetAbs, content);
|
|
80
|
+
records.push({
|
|
81
|
+
declaredPath: declared,
|
|
82
|
+
status: "routed",
|
|
83
|
+
installedAt: targetAbs,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
const routedCount = records.filter((r) => r.status === "routed").length;
|
|
87
|
+
const rejectedCount = records.length - routedCount;
|
|
88
|
+
return { records, routedCount, rejectedCount };
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=bundle-skills-router.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle-skills-router.js","sourceRoot":"","sources":["../../src/domain/bundle-skills-router.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,QAAQ,MAAM,WAAW,CAAC;AA0CjC;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,KAAuB,EAAE,EAAqB;IACxE,MAAM,OAAO,GAAwB,EAAE,CAAC;IACxC,MAAM,kBAAkB,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAC9D,MAAM,kBAAkB,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IACnE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAEjC,KAAK,MAAM,QAAQ,IAAI,KAAK,CAAC,cAAc,EAAE,CAAC;QAC5C,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC/D,sEAAsE;QACtE,wEAAwE;QACxE,yEAAyE;QACzE,wBAAwB;QACxB,IAAI,SAAS,KAAK,kBAAkB,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,kBAAkB,GAAG,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACjG,OAAO,CAAC,IAAI,CAA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AQ,CAAC,SAAS,CAAC,CAAC;QACvC,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QACjC,OAAO,CAAC,IAAI,CAAC;YACX,YAAY,EAAE,QAAQ;YACtB,MAAM,EAAE,QAAQ;YAChB,WAAW,EAAE,SAAS;SACvB,CAAC,CAAC;IACL,CAAC;IAED,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,MAAM,CAAC;IACxE,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,GAAG,WAAW,CAAC;IACnD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC;AACjD,CAAC"}
|
|
@@ -1,3 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provenance block — attribution metadata for a bundle artifact. All fields
|
|
3
|
+
* optional for backward compat; bundles without provenance install unchanged.
|
|
4
|
+
* Captured by the bundle-assembler at create time; surfaced in inspect output
|
|
5
|
+
* and audit-trail records. Not cryptographically signed at this stage.
|
|
6
|
+
*/
|
|
7
|
+
export interface BundleProvenance {
|
|
8
|
+
/** ISO timestamp; mirrors root createdAt at create time. */
|
|
9
|
+
createdAt?: string;
|
|
10
|
+
/** os.hostname() of the host that ran rig bundle create. */
|
|
11
|
+
sourceHost?: string;
|
|
12
|
+
/** Canonical session name of the creator (e.g. velocity-driver@openrig-velocity). */
|
|
13
|
+
authorSession?: string;
|
|
14
|
+
/** ULID of the source rig, if creating from a live rig. */
|
|
15
|
+
sourceRigId?: string;
|
|
16
|
+
/** Name of the source rig, if creating from a live rig. */
|
|
17
|
+
sourceRigName?: string;
|
|
18
|
+
/** Daemon version at create time (e.g. 0.3.2). */
|
|
19
|
+
daemonVersion?: string;
|
|
20
|
+
/** CLI version at create time (e.g. 0.3.2). */
|
|
21
|
+
cliVersion?: string;
|
|
22
|
+
/** Operator-authored notes from the --notes flag on rig bundle create. */
|
|
23
|
+
notes?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Cross-primitive bundling — Item 6 / slice-05 Checkpoint 7.1.
|
|
27
|
+
*
|
|
28
|
+
* Manifest may optionally declare typed sibling primitives the bundle should
|
|
29
|
+
* route to their respective libraries on install. v0 ships the `skills` kind
|
|
30
|
+
* (Checkpoint 7.1). Plugins + workflow_specs + context_packs + agent_images
|
|
31
|
+
* land additively in subsequent checkpoints as their libraries are reachable.
|
|
32
|
+
*
|
|
33
|
+
* PRD §Item 6: bundles list these alongside the existing rig + agents +
|
|
34
|
+
* packages fields (no `contents:` re-grouping — that would be a schema
|
|
35
|
+
* reorg violating the no-bump constraint). Each kind is an optional top-
|
|
36
|
+
* level field; missing kinds keep backward compat.
|
|
37
|
+
*/
|
|
38
|
+
/**
|
|
39
|
+
* Plugin reference — Item 6 / slice-05 Checkpoint 7.3b. Bundle manifest may
|
|
40
|
+
* declare plugin references the bundle includes (in HYBRID mode the bundle
|
|
41
|
+
* REFERENCES the existing 0.3.1 plugin rather than forking its content; per
|
|
42
|
+
* orch-ratified decision doc).
|
|
43
|
+
*/
|
|
44
|
+
export interface BundlePluginReference {
|
|
45
|
+
/** Plugin id (matches the plugin primitive's id surface). */
|
|
46
|
+
id: string;
|
|
47
|
+
/** Where to resolve the plugin from. v0 supports local-path source. */
|
|
48
|
+
source: {
|
|
49
|
+
kind: "local";
|
|
50
|
+
path: string;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Compatibility block — operator-declared install-time requirements for a
|
|
55
|
+
* bundle artifact. All fields optional; missing block keeps backward compat
|
|
56
|
+
* (bundles install unchanged). Install-time version check (Item 2 Checkpoint
|
|
57
|
+
* 3.3) consults this block before bootstrap delegation; --skip-version-check
|
|
58
|
+
* is the operator-explicit override.
|
|
59
|
+
*/
|
|
60
|
+
export interface BundleCompatibility {
|
|
61
|
+
/** Minimum daemon version required to install this bundle (semver string). */
|
|
62
|
+
minDaemonVersion?: string;
|
|
63
|
+
/** Minimum CLI version required to install this bundle (semver string). */
|
|
64
|
+
minCliVersion?: string;
|
|
65
|
+
/** Schema version reaffirmed; mirrors root schemaVersion when set. */
|
|
66
|
+
schemaVersion?: number;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Normalize raw snake_case compatibility to typed camelCase BundleCompatibility.
|
|
70
|
+
* Returns undefined when absent or empty. Exported alongside the provenance
|
|
71
|
+
* normalizer so the v2 inspect-route projection can produce a single
|
|
72
|
+
* camelCase shape for both manifest schemas.
|
|
73
|
+
*/
|
|
74
|
+
export declare function normalizeCompatibilityBlock(raw: unknown): BundleCompatibility | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Normalize raw snake_case provenance (as parsed from YAML or received from
|
|
77
|
+
* a request body) to typed camelCase BundleProvenance. Returns undefined when
|
|
78
|
+
* absent or empty. Exported so both the v1 normalizer pipeline and the v2
|
|
79
|
+
* inspect-route projection produce identical camelCase shapes — the
|
|
80
|
+
* /api/bundles/inspect contract is one shape regardless of schema version.
|
|
81
|
+
*/
|
|
82
|
+
export declare function normalizeProvenanceBlock(raw: unknown): BundleProvenance | undefined;
|
|
1
83
|
export interface PodBundleAgentImportEntry {
|
|
2
84
|
name: string;
|
|
3
85
|
version: string;
|
|
@@ -22,6 +104,18 @@ export interface PodBundleManifest {
|
|
|
22
104
|
agents: PodBundleAgentEntry[];
|
|
23
105
|
cultureFile?: string;
|
|
24
106
|
integrity?: BundleIntegrity;
|
|
107
|
+
provenance?: BundleProvenance;
|
|
108
|
+
compatibility?: BundleCompatibility;
|
|
109
|
+
/** Item 6 cross-primitive bundling: skill paths to route to the operator skills library on install. */
|
|
110
|
+
skills?: string[];
|
|
111
|
+
/** Item 6 cross-primitive bundling: plugin references to install via the plugin primitive (HYBRID-mode bundles reference existing plugins rather than forking content). */
|
|
112
|
+
plugins?: BundlePluginReference[];
|
|
113
|
+
/** Item 6 cross-primitive bundling: workflow spec YAML paths to route to the operator workflow-specs library on install (Checkpoint 7.3e). */
|
|
114
|
+
workflowSpecs?: string[];
|
|
115
|
+
/** Item 6 cross-primitive bundling: paths to context-pack manifest.yaml files; router copies the parent dir to the operator context-packs library on install (Checkpoint 7.3f). */
|
|
116
|
+
contextPacks?: string[];
|
|
117
|
+
/** Item 6 cross-primitive bundling: paths to agent-image DIRECTORIES (per PRD §Item 6 line 197); router copies the declared directory to the operator agent-images library on install. Consumer requires manifest.yaml inside each image dir. (Checkpoint 7.3g) */
|
|
118
|
+
agentImages?: string[];
|
|
25
119
|
}
|
|
26
120
|
export declare function validatePodBundleManifest(raw: unknown): {
|
|
27
121
|
valid: boolean;
|
|
@@ -52,6 +146,18 @@ export interface LegacyBundleManifest {
|
|
|
52
146
|
rigSpec: string;
|
|
53
147
|
packages: LegacyBundlePackageEntry[];
|
|
54
148
|
integrity?: BundleIntegrity;
|
|
149
|
+
provenance?: BundleProvenance;
|
|
150
|
+
compatibility?: BundleCompatibility;
|
|
151
|
+
/** Item 6 cross-primitive bundling: skill paths to route to the operator skills library on install. */
|
|
152
|
+
skills?: string[];
|
|
153
|
+
/** Item 6 cross-primitive bundling: plugin references to install via the plugin primitive (HYBRID-mode bundles reference existing plugins rather than forking content). */
|
|
154
|
+
plugins?: BundlePluginReference[];
|
|
155
|
+
/** Item 6 cross-primitive bundling: workflow spec YAML paths to route to the operator workflow-specs library on install (Checkpoint 7.3e). */
|
|
156
|
+
workflowSpecs?: string[];
|
|
157
|
+
/** Item 6 cross-primitive bundling: paths to context-pack manifest.yaml files; router copies the parent dir to the operator context-packs library on install (Checkpoint 7.3f). */
|
|
158
|
+
contextPacks?: string[];
|
|
159
|
+
/** Item 6 cross-primitive bundling: paths to agent-image DIRECTORIES (per PRD §Item 6 line 197); router copies the declared directory to the operator agent-images library on install. Consumer requires manifest.yaml inside each image dir. (Checkpoint 7.3g) */
|
|
160
|
+
agentImages?: string[];
|
|
55
161
|
}
|
|
56
162
|
/** Validation options */
|
|
57
163
|
interface ValidateOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle-types.d.ts","sourceRoot":"","sources":["../../src/domain/bundle-types.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,yBAAyB,EAAE,CAAC;CAC5C;AAED,MAAM,WAAW,iBAAiB;IAChC,aAAa,EAAE,CAAC,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,mBAAmB,EAAE,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"bundle-types.d.ts","sourceRoot":"","sources":["../../src/domain/bundle-types.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qFAAqF;IACrF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kDAAkD;IAClD,aAAa,CAAC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