@openrig/cli 0.5.2 → 0.5.3
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/hooks/claude.json +36 -0
- package/daemon/assets/plugins/openrig-core/hooks/codex.json +27 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +132 -0
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +35 -3
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +8 -95
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +63 -20
- package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +6 -2
- package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +28 -2
- package/daemon/assets/plugins/openrig-core/skills/mission-slice-sop/SKILL.md +42 -52
- package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +23 -1
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +7 -2
- package/daemon/assets/plugins/openrig-core/skills/orienting-to-an-inherited-seat/CHANGELOG.md +64 -0
- package/daemon/assets/plugins/openrig-core/skills/orienting-to-an-inherited-seat/SKILL.md +235 -0
- package/daemon/assets/plugins/openrig-core/skills/queue-handoff/SKILL.md +31 -1
- package/daemon/assets/plugins/openrig-core/skills/retiring-and-inheriting-a-seat/CHANGELOG.md +48 -0
- package/daemon/assets/plugins/openrig-core/skills/retiring-and-inheriting-a-seat/SKILL.md +211 -0
- package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +8 -0
- package/daemon/assets/plugins/openrig-core/skills/software-for-agents/SKILL.md +28 -1
- package/daemon/context-packs/skills/core/agent-starters/SKILL.md +132 -0
- package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/SKILL.md +112 -0
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/attention-queue/SKILL.md +264 -0
- package/daemon/context-packs/skills/core/attention-queue/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/cross-host-rig-commands/SKILL.md +195 -0
- package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/human-in-the-loop/SKILL.md +104 -0
- package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/openrig-architect/SKILL.md +378 -0
- package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/openrig-cmux/SKILL.md +81 -0
- package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/openrig-herdr/SKILL.md +153 -0
- package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/openrig-upgrade/SKILL.md +460 -0
- package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/SKILL.md +101 -0
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/rig-lifecycle/SKILL.md +127 -0
- package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/session-source-fork/SKILL.md +160 -0
- package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/specification-system/SKILL.md +103 -0
- package/daemon/context-packs/skills/core/specification-system/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/SKILL.md +118 -0
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/watchdog/SKILL.md +126 -0
- package/daemon/context-packs/skills/core/watchdog/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pm/backlog-capture/SKILL.md +43 -0
- package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pm/context-builder/SKILL.md +87 -0
- package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pm/exec-summary/SKILL.md +84 -0
- package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pm/office-hours/SKILL.md +129 -0
- package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pm/plan-review/SKILL.md +98 -0
- package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pm/requirements-writer/SKILL.md +113 -0
- package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pm/ui-mockup/SKILL.md +76 -0
- package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pods/development-team/SKILL.md +156 -0
- package/daemon/context-packs/skills/pods/development-team/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pods/orchestration-team/SKILL.md +307 -0
- package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pods/oversight-team/SKILL.md +106 -0
- package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pods/review-team/SKILL.md +213 -0
- package/daemon/context-packs/skills/pods/review-team/manifest.yaml +9 -0
- package/daemon/context-packs/skills/process/agent-browser/LOCAL-INSIGHTS.md +189 -0
- package/daemon/context-packs/skills/process/agent-browser/OPENRIG.md +40 -0
- package/daemon/context-packs/skills/process/agent-browser/SKILL.md +427 -0
- package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +13 -0
- package/daemon/context-packs/skills/process/brainstorming/OPENRIG.md +48 -0
- package/daemon/context-packs/skills/process/brainstorming/SKILL.md +107 -0
- package/daemon/context-packs/skills/process/brainstorming/manifest.yaml +11 -0
- package/daemon/context-packs/skills/process/context-engineering/SKILL.md +479 -0
- package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +9 -0
- package/daemon/context-packs/skills/process/dogfood/SKILL.md +225 -0
- package/daemon/context-packs/skills/process/dogfood/manifest.yaml +13 -0
- package/daemon/context-packs/skills/process/dogfood/references/issue-taxonomy.md +109 -0
- package/daemon/context-packs/skills/process/dogfood/templates/dogfood-report-template.md +53 -0
- package/daemon/context-packs/skills/process/executing-plans/OPENRIG.md +56 -0
- package/daemon/context-packs/skills/process/executing-plans/SKILL.md +94 -0
- package/daemon/context-packs/skills/process/executing-plans/manifest.yaml +11 -0
- package/daemon/context-packs/skills/process/frontend-design/LICENSE.txt +177 -0
- package/daemon/context-packs/skills/process/frontend-design/SKILL.md +50 -0
- package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +11 -0
- package/daemon/context-packs/skills/process/systematic-debugging/SKILL.md +301 -0
- package/daemon/context-packs/skills/process/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/daemon/context-packs/skills/process/systematic-debugging/condition-based-waiting.md +115 -0
- package/daemon/context-packs/skills/process/systematic-debugging/defense-in-depth.md +122 -0
- package/daemon/context-packs/skills/process/systematic-debugging/find-polluter.sh +63 -0
- package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +19 -0
- package/daemon/context-packs/skills/process/systematic-debugging/root-cause-tracing.md +169 -0
- package/daemon/context-packs/skills/process/test-driven-development/SKILL.md +385 -0
- package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +11 -0
- package/daemon/context-packs/skills/process/test-driven-development/testing-anti-patterns.md +299 -0
- package/daemon/context-packs/skills/process/using-superpowers/OPENRIG.md +48 -0
- package/daemon/context-packs/skills/process/using-superpowers/SKILL.md +106 -0
- package/daemon/context-packs/skills/process/using-superpowers/manifest.yaml +11 -0
- package/daemon/context-packs/skills/process/verification-before-completion/SKILL.md +155 -0
- package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +9 -0
- package/daemon/context-packs/skills/process/writing-plans/OPENRIG.md +52 -0
- package/daemon/context-packs/skills/process/writing-plans/SKILL.md +126 -0
- package/daemon/context-packs/skills/process/writing-plans/manifest.yaml +11 -0
- package/daemon/context-packs/world/install/01-world-from-primitives.md +97 -0
- package/daemon/context-packs/world/install/02-permission-self-sleep.md +141 -0
- package/daemon/context-packs/world/install/03-what-this-is-for.md +86 -0
- package/daemon/context-packs/world/install/04-ontology.md +790 -0
- package/daemon/context-packs/world/install/05-harness-power-use.md +355 -0
- package/daemon/context-packs/world/install/06-a-competent-turn.md +225 -0
- package/daemon/context-packs/world/install/manifest.yaml +125 -0
- package/daemon/context-packs/world/install/reference-material.md +125 -0
- package/daemon/context-packs/world/install/what-you-can-do.md +416 -0
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +7 -4
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +2 -2
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +10 -2
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +27 -7
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/adapters/yolo-mode.d.ts +18 -0
- package/daemon/dist/adapters/yolo-mode.d.ts.map +1 -1
- package/daemon/dist/adapters/yolo-mode.js +21 -0
- package/daemon/dist/adapters/yolo-mode.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/domain/codex-thread-id.d.ts +95 -0
- package/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
- package/daemon/dist/domain/codex-thread-id.js +171 -2
- package/daemon/dist/domain/codex-thread-id.js.map +1 -1
- package/daemon/dist/domain/context-packs/context-pack-types.d.ts +48 -0
- package/daemon/dist/domain/context-packs/context-pack-types.d.ts.map +1 -1
- package/daemon/dist/domain/context-packs/context-pack-types.js +8 -0
- package/daemon/dist/domain/context-packs/context-pack-types.js.map +1 -1
- package/daemon/dist/domain/context-packs/manifest-parser.d.ts.map +1 -1
- package/daemon/dist/domain/context-packs/manifest-parser.js +234 -2
- package/daemon/dist/domain/context-packs/manifest-parser.js.map +1 -1
- package/daemon/dist/domain/context-packs/probe-eval-bridge.d.ts +34 -0
- package/daemon/dist/domain/context-packs/probe-eval-bridge.d.ts.map +1 -0
- package/daemon/dist/domain/context-packs/probe-eval-bridge.js +38 -0
- package/daemon/dist/domain/context-packs/probe-eval-bridge.js.map +1 -0
- package/daemon/dist/domain/context-packs/profile-composer.d.ts +49 -0
- package/daemon/dist/domain/context-packs/profile-composer.d.ts.map +1 -0
- package/daemon/dist/domain/context-packs/profile-composer.js +125 -0
- package/daemon/dist/domain/context-packs/profile-composer.js.map +1 -0
- package/daemon/dist/domain/context-packs/profile-source-resolver.d.ts +53 -0
- package/daemon/dist/domain/context-packs/profile-source-resolver.d.ts.map +1 -0
- package/daemon/dist/domain/context-packs/profile-source-resolver.js +129 -0
- package/daemon/dist/domain/context-packs/profile-source-resolver.js.map +1 -0
- package/daemon/dist/domain/context-packs/seat-recap-store.d.ts +48 -0
- package/daemon/dist/domain/context-packs/seat-recap-store.d.ts.map +1 -0
- package/daemon/dist/domain/context-packs/seat-recap-store.js +123 -0
- package/daemon/dist/domain/context-packs/seat-recap-store.js.map +1 -0
- package/daemon/dist/domain/markdown-address.d.ts +56 -0
- package/daemon/dist/domain/markdown-address.d.ts.map +1 -0
- package/daemon/dist/domain/markdown-address.js +188 -0
- package/daemon/dist/domain/markdown-address.js.map +1 -0
- package/daemon/dist/domain/model-divergence/current-generation-record.d.ts +8 -2
- package/daemon/dist/domain/model-divergence/current-generation-record.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/current-generation-record.js +1 -1
- package/daemon/dist/domain/model-divergence/current-generation-record.js.map +1 -1
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts +33 -21
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.js +64 -55
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.js.map +1 -1
- package/daemon/dist/domain/periodic-snapshot-scheduler.d.ts +4 -0
- package/daemon/dist/domain/periodic-snapshot-scheduler.d.ts.map +1 -1
- package/daemon/dist/domain/periodic-snapshot-scheduler.js +5 -1
- package/daemon/dist/domain/periodic-snapshot-scheduler.js.map +1 -1
- package/daemon/dist/domain/permission-drift-observer.d.ts.map +1 -1
- package/daemon/dist/domain/permission-drift-observer.js +6 -1
- package/daemon/dist/domain/permission-drift-observer.js.map +1 -1
- package/daemon/dist/domain/process-census.d.ts +25 -0
- package/daemon/dist/domain/process-census.d.ts.map +1 -0
- package/daemon/dist/domain/process-census.js +47 -0
- package/daemon/dist/domain/process-census.js.map +1 -0
- package/daemon/dist/domain/resume-metadata-refresher.d.ts +31 -2
- package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.js +64 -29
- package/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
- package/daemon/dist/domain/review/compose.d.ts +5 -26
- package/daemon/dist/domain/review/compose.d.ts.map +1 -1
- package/daemon/dist/domain/review/compose.js +31 -57
- package/daemon/dist/domain/review/compose.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +4 -0
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +39 -0
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +19 -3
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/scope/logical-checkbox.d.ts +26 -0
- package/daemon/dist/domain/scope/logical-checkbox.d.ts.map +1 -0
- package/daemon/dist/domain/scope/logical-checkbox.js +65 -0
- package/daemon/dist/domain/scope/logical-checkbox.js.map +1 -0
- package/daemon/dist/domain/scope/plan-lock-artifacts.d.ts +1 -1
- package/daemon/dist/domain/scope/plan-lock-artifacts.d.ts.map +1 -1
- package/daemon/dist/domain/scope/plan-lock-artifacts.js +2 -2
- package/daemon/dist/domain/scope/plan-lock-artifacts.js.map +1 -1
- package/daemon/dist/domain/scope/scaffold-placeholder.d.ts +22 -0
- package/daemon/dist/domain/scope/scaffold-placeholder.d.ts.map +1 -1
- package/daemon/dist/domain/scope/scaffold-placeholder.js +24 -0
- package/daemon/dist/domain/scope/scaffold-placeholder.js.map +1 -1
- package/daemon/dist/domain/seat-activity-service.d.ts +1 -0
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-activity-service.js +39 -23
- package/daemon/dist/domain/seat-activity-service.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts +22 -0
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +32 -2
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +8 -0
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +116 -0
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/shell-classifier.d.ts +23 -0
- package/daemon/dist/domain/shell-classifier.d.ts.map +1 -0
- package/daemon/dist/domain/shell-classifier.js +36 -0
- package/daemon/dist/domain/shell-classifier.js.map +1 -0
- package/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-detail-projector.js +10 -1
- package/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
- package/daemon/dist/domain/spec-validation-advisory.d.ts +17 -0
- package/daemon/dist/domain/spec-validation-advisory.d.ts.map +1 -0
- package/daemon/dist/domain/spec-validation-advisory.js +38 -0
- package/daemon/dist/domain/spec-validation-advisory.js.map +1 -0
- package/daemon/dist/domain/successor-session-launcher.d.ts +7 -0
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +38 -1
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/topology-defaults-installer.d.ts +47 -0
- package/daemon/dist/domain/topology-defaults-installer.d.ts.map +1 -0
- package/daemon/dist/domain/topology-defaults-installer.js +92 -0
- package/daemon/dist/domain/topology-defaults-installer.js.map +1 -0
- package/daemon/dist/domain/transcript-rotation.d.ts +4 -0
- package/daemon/dist/domain/transcript-rotation.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-rotation.js +61 -3
- package/daemon/dist/domain/transcript-rotation.js.map +1 -1
- package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-store.js +9 -2
- package/daemon/dist/domain/transcript-store.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +3 -0
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts +10 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.js +39 -0
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/routes/context-packs.d.ts.map +1 -1
- package/daemon/dist/routes/context-packs.js +205 -0
- package/daemon/dist/routes/context-packs.js.map +1 -1
- package/daemon/dist/routes/seat.d.ts.map +1 -1
- package/daemon/dist/routes/seat.js +11 -0
- package/daemon/dist/routes/seat.js.map +1 -1
- package/daemon/dist/routes/sessions.js +55 -0
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/transport.d.ts.map +1 -1
- package/daemon/dist/routes/transport.js +12 -3
- package/daemon/dist/routes/transport.js.map +1 -1
- package/daemon/dist/seat-recap-store-surface.d.ts +2 -0
- package/daemon/dist/seat-recap-store-surface.d.ts.map +1 -0
- package/daemon/dist/seat-recap-store-surface.js +6 -0
- package/daemon/dist/seat-recap-store-surface.js.map +1 -0
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +37 -6
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/docs/reference/chain-file-convention.md +115 -0
- package/daemon/docs/reference/legacy-topology-migration.md +53 -0
- package/daemon/docs/reference/refocus-channel.md +80 -0
- package/daemon/docs/reference/sdlc-conventions.md +24 -0
- package/daemon/specs/agents/shared/skills/core/attention-queue/SKILL.md +1 -1
- package/daemon/specs/agents/shared/skills/core/human-in-the-loop/SKILL.md +1 -1
- package/daemon/specs/agents/shared/skills/core/session-source-fork/SKILL.md +1 -1
- package/daemon/specs/agents/shared/skills/core/watchdog/SKILL.md +4 -4
- package/daemon/specs/agents/shared/skills/pods/development-team/SKILL.md +8 -0
- package/daemon/specs/agents/shared/skills/pods/orchestration-team/SKILL.md +72 -31
- package/daemon/specs/agents/shared/skills/pods/oversight-team/SKILL.md +106 -0
- package/daemon/specs/agents/shared/skills/process/context-engineering/SKILL.md +479 -0
- package/daemon/specs/agents/shared/skills/process/test-driven-development/SKILL.md +9 -0
- package/daemon/specs/rigs/launch/demo/project-example/README.md +25 -0
- package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/SPEC.md +19 -0
- package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/PROGRESS.md +6 -0
- package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/PROOF.md +7 -0
- package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/SPEC.md +31 -0
- package/daemon/specs/rigs/preview/product-team/topology/instance/CRAFT.md +24 -0
- package/daemon/specs/rigs/preview/product-team/topology/rig/CRAFT.md +21 -0
- package/daemon/specs/rigs/preview/product-team/topology/rig/ORCHESTRATION-CRAFT.md +50 -0
- package/daemon/specs/rigs/preview/product-team/topology/seats/dev1-qa/CRAFT.md +13 -0
- package/daemon/specs/rigs/preview/product-team/topology/seats/orch1-lead/CRAFT.md +17 -0
- package/daemon/specs/rigs/preview/product-team/topology/seats/rev1-r1/CRAFT.md +17 -0
- package/daemon/specs/rigs/preview/product-team/topology/seats/rev1-r2/CRAFT.md +15 -0
- package/dist/build-info.js +3 -3
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +8 -0
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +353 -48
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/proof.d.ts.map +1 -1
- package/dist/commands/proof.js +70 -12
- package/dist/commands/proof.js.map +1 -1
- package/dist/commands/rig.d.ts.map +1 -1
- package/dist/commands/rig.js +5 -0
- package/dist/commands/rig.js.map +1 -1
- package/dist/commands/transcript.d.ts.map +1 -1
- package/dist/commands/transcript.js +25 -1
- package/dist/commands/transcript.js.map +1 -1
- package/dist/commands/walk.d.ts.map +1 -1
- package/dist/commands/walk.js +279 -26
- package/dist/commands/walk.js.map +1 -1
- package/dist/config-store.d.ts +15 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +35 -1
- package/dist/config-store.js.map +1 -1
- package/dist/lib/scope/logical-checkbox.d.ts +26 -0
- package/dist/lib/scope/logical-checkbox.d.ts.map +1 -0
- package/dist/lib/scope/logical-checkbox.js +65 -0
- package/dist/lib/scope/logical-checkbox.js.map +1 -0
- package/dist/lib/scope/scaffold-placeholder.d.ts +22 -0
- package/dist/lib/scope/scaffold-placeholder.d.ts.map +1 -1
- package/dist/lib/scope/scaffold-placeholder.js +24 -0
- package/dist/lib/scope/scaffold-placeholder.js.map +1 -1
- package/dist/lib/topology-trace.d.ts +36 -0
- package/dist/lib/topology-trace.d.ts.map +1 -0
- package/dist/lib/topology-trace.js +91 -0
- package/dist/lib/topology-trace.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/adapters/claude-code-adapter.js +7 -4
- package/node_modules/@openrig/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/adapters/claude-resume.js +2 -2
- package/node_modules/@openrig/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/adapters/tmux.d.ts +10 -2
- package/node_modules/@openrig/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/adapters/tmux.js +27 -7
- package/node_modules/@openrig/daemon/dist/adapters/tmux.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/adapters/yolo-mode.d.ts +18 -0
- package/node_modules/@openrig/daemon/dist/adapters/yolo-mode.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/adapters/yolo-mode.js +21 -0
- package/node_modules/@openrig/daemon/dist/adapters/yolo-mode.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/build-info.js +3 -3
- package/node_modules/@openrig/daemon/dist/domain/codex-thread-id.d.ts +95 -0
- package/node_modules/@openrig/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/codex-thread-id.js +171 -2
- package/node_modules/@openrig/daemon/dist/domain/codex-thread-id.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.d.ts +48 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.js +8 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.js +234 -2
- package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/context-packs/probe-eval-bridge.d.ts +34 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/probe-eval-bridge.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/probe-eval-bridge.js +38 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/probe-eval-bridge.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.d.ts +49 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.js +125 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.d.ts +53 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.js +129 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/seat-recap-store.d.ts +48 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/seat-recap-store.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/seat-recap-store.js +123 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/seat-recap-store.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/markdown-address.d.ts +56 -0
- package/node_modules/@openrig/daemon/dist/domain/markdown-address.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/markdown-address.js +188 -0
- package/node_modules/@openrig/daemon/dist/domain/markdown-address.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.d.ts +8 -2
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.js +1 -1
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts +33 -21
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/model-divergence-monitor.js +64 -55
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/model-divergence-monitor.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/periodic-snapshot-scheduler.d.ts +4 -0
- package/node_modules/@openrig/daemon/dist/domain/periodic-snapshot-scheduler.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/periodic-snapshot-scheduler.js +5 -1
- package/node_modules/@openrig/daemon/dist/domain/periodic-snapshot-scheduler.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/permission-drift-observer.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/permission-drift-observer.js +6 -1
- package/node_modules/@openrig/daemon/dist/domain/permission-drift-observer.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/process-census.d.ts +25 -0
- package/node_modules/@openrig/daemon/dist/domain/process-census.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/process-census.js +47 -0
- package/node_modules/@openrig/daemon/dist/domain/process-census.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/resume-metadata-refresher.d.ts +31 -2
- package/node_modules/@openrig/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/resume-metadata-refresher.js +64 -29
- package/node_modules/@openrig/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/review/compose.d.ts +5 -26
- package/node_modules/@openrig/daemon/dist/domain/review/compose.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/review/compose.js +31 -57
- package/node_modules/@openrig/daemon/dist/domain/review/compose.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.d.ts +4 -0
- package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.js +39 -0
- package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.js +19 -3
- package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/scope/logical-checkbox.d.ts +26 -0
- package/node_modules/@openrig/daemon/dist/domain/scope/logical-checkbox.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/scope/logical-checkbox.js +65 -0
- package/node_modules/@openrig/daemon/dist/domain/scope/logical-checkbox.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/scope/plan-lock-artifacts.d.ts +1 -1
- package/node_modules/@openrig/daemon/dist/domain/scope/plan-lock-artifacts.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/scope/plan-lock-artifacts.js +2 -2
- package/node_modules/@openrig/daemon/dist/domain/scope/plan-lock-artifacts.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/scope/scaffold-placeholder.d.ts +22 -0
- package/node_modules/@openrig/daemon/dist/domain/scope/scaffold-placeholder.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/scope/scaffold-placeholder.js +24 -0
- package/node_modules/@openrig/daemon/dist/domain/scope/scaffold-placeholder.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/seat-activity-service.d.ts +1 -0
- package/node_modules/@openrig/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/seat-activity-service.js +39 -23
- package/node_modules/@openrig/daemon/dist/domain/seat-activity-service.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/seat-handover-service.d.ts +22 -0
- package/node_modules/@openrig/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/seat-handover-service.js +32 -2
- package/node_modules/@openrig/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/session-transport.d.ts +8 -0
- package/node_modules/@openrig/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/session-transport.js +116 -0
- package/node_modules/@openrig/daemon/dist/domain/session-transport.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/shell-classifier.d.ts +23 -0
- package/node_modules/@openrig/daemon/dist/domain/shell-classifier.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/shell-classifier.js +36 -0
- package/node_modules/@openrig/daemon/dist/domain/shell-classifier.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/slices/slice-detail-projector.js +10 -1
- package/node_modules/@openrig/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/spec-validation-advisory.d.ts +17 -0
- package/node_modules/@openrig/daemon/dist/domain/spec-validation-advisory.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/spec-validation-advisory.js +38 -0
- package/node_modules/@openrig/daemon/dist/domain/spec-validation-advisory.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/successor-session-launcher.d.ts +7 -0
- package/node_modules/@openrig/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/successor-session-launcher.js +38 -1
- package/node_modules/@openrig/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.d.ts +47 -0
- package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.js +92 -0
- package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/transcript-rotation.d.ts +4 -0
- package/node_modules/@openrig/daemon/dist/domain/transcript-rotation.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/transcript-rotation.js +61 -3
- package/node_modules/@openrig/daemon/dist/domain/transcript-rotation.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/transcript-store.js +9 -2
- package/node_modules/@openrig/daemon/dist/domain/transcript-store.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/types.d.ts +3 -0
- package/node_modules/@openrig/daemon/dist/domain/types.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.d.ts +10 -1
- package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.js +39 -0
- package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/context-packs.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/context-packs.js +205 -0
- package/node_modules/@openrig/daemon/dist/routes/context-packs.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/seat.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/seat.js +11 -0
- package/node_modules/@openrig/daemon/dist/routes/seat.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/sessions.js +55 -0
- package/node_modules/@openrig/daemon/dist/routes/sessions.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/transport.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/transport.js +12 -3
- package/node_modules/@openrig/daemon/dist/routes/transport.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/seat-recap-store-surface.d.ts +2 -0
- package/node_modules/@openrig/daemon/dist/seat-recap-store-surface.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/seat-recap-store-surface.js +6 -0
- package/node_modules/@openrig/daemon/dist/seat-recap-store-surface.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/startup.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/startup.js +37 -6
- package/node_modules/@openrig/daemon/dist/startup.js.map +1 -1
- package/node_modules/@openrig/daemon/package.json +6 -1
- package/package.json +1 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Orchestration Craft — shipped defaults (product-team)
|
|
2
|
+
|
|
3
|
+
<!-- Shipped by the product-team rig spec (copy-if-absent; append freely).
|
|
4
|
+
Pod-class tactical reminders, shipped at the RIG altitude by ruling (the
|
|
5
|
+
pod level is deliberately skipped; revisit someday, not now). These are
|
|
6
|
+
the reminders you need AT THE MOMENT OF ACTING on another seat. -->
|
|
7
|
+
|
|
8
|
+
## Reading another seat's pane
|
|
9
|
+
|
|
10
|
+
- **Ghost text vs staged text.** Both Claude Code and Codex render
|
|
11
|
+
autocomplete GHOST TEXT in the input box, and a capture cannot show font
|
|
12
|
+
color. Discriminators: cursor at the END of the text → possibly
|
|
13
|
+
typed-and-left (staged); cursor at the BEGINNING → ghost text.
|
|
14
|
+
Behaviorally: an Enter that does not consume it → ghost. Misreading ghost
|
|
15
|
+
as staged (or vice versa) has caused real misdiagnoses — check the cursor
|
|
16
|
+
before you conclude anything about an un-submitted line.
|
|
17
|
+
- **Text sitting AT the prompt = staged, not consumed.** The fix is one
|
|
18
|
+
`C-m`, never a re-send (a re-send delivers twice).
|
|
19
|
+
- **The spinner renders ABOVE the input box.** A capture of fewer than ~20
|
|
20
|
+
lines shows a bare prompt for a seat deep in work; never lower the line
|
|
21
|
+
count to "simplify" a liveness read.
|
|
22
|
+
|
|
23
|
+
## Watching without burning the fleet
|
|
24
|
+
|
|
25
|
+
- **One capture, then arrange to be told.** You cannot watch — only glance,
|
|
26
|
+
and every glance costs a turn. If you must poll: two minutes minimum, and
|
|
27
|
+
identical output twice means STOP polling, not poll harder. A tight loop on
|
|
28
|
+
a shared provider can exhaust the usage limit and stop every seat on it.
|
|
29
|
+
- **Liveness is not health.** A pane can render while nothing progresses.
|
|
30
|
+
Cross the screen (`rig capture`) with `claimedAt` and
|
|
31
|
+
`rig queue transitions` before you call a seat stuck.
|
|
32
|
+
|
|
33
|
+
## Acting on another seat
|
|
34
|
+
|
|
35
|
+
- **A wake, a refocus, and a checkpoint are three different interventions.**
|
|
36
|
+
A wake restores liveness and must not reframe the work; a refocus corrects
|
|
37
|
+
drift and opens with "finish your current action first"; a checkpoint is a
|
|
38
|
+
deliberate phase-boundary pause. Sending the heavy one is the most common
|
|
39
|
+
self-inflicted stall.
|
|
40
|
+
- **Never compact a peer to unblock something.** What comes back believes it
|
|
41
|
+
knows everything and no longer does — and you are the only one who knows it
|
|
42
|
+
happened. Deposit first, announce, and state what the seat no longer holds.
|
|
43
|
+
|
|
44
|
+
## Adding a practice to these files
|
|
45
|
+
|
|
46
|
+
Discovery (it appears where it was earned — a LEARNED, a field note, a review
|
|
47
|
+
observation) → curation (is it generally applicable, or project-specific?) →
|
|
48
|
+
ship (add it to the spec's `topology/` defaults in source, one motivating
|
|
49
|
+
incident per line). Editing this installed copy helps THIS rig now; shipping
|
|
50
|
+
it helps every future install. See docs/reference/chain-file-convention.md.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Seat Craft — dev1-qa (shipped default)
|
|
2
|
+
|
|
3
|
+
<!-- Copy-if-absent; this seat's occupants append what the position learns. -->
|
|
4
|
+
|
|
5
|
+
- QA owns the test-fix-feedback LOOP: fix in-slice issues directly, rerun the
|
|
6
|
+
proof, hill-climb, then ask the driver to check. The banned pattern is
|
|
7
|
+
find-bug → file RED → hand back → wait → repeat.
|
|
8
|
+
- You may author a fix; you may not be its sole final verifier.
|
|
9
|
+
- Reproduce before you fix; if the proof apparatus grows bigger than the fix,
|
|
10
|
+
stop and use the product instead — a human clicking finds in minutes what
|
|
11
|
+
immaculate rigor misses for days.
|
|
12
|
+
- A green suite is not proof the user path works: drive the real path on the
|
|
13
|
+
running artifact, pass/fail named before you run it.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Seat Craft — orch1-lead (shipped default)
|
|
2
|
+
|
|
3
|
+
<!-- Copy-if-absent; this seat's occupants append what the position learns. -->
|
|
4
|
+
|
|
5
|
+
- You are the seat whose wrong claim gets believed downstream. Verify at
|
|
6
|
+
SOURCE before ruling — the handler body, not the summary; "merged" means on
|
|
7
|
+
the branch tip, checked with git.
|
|
8
|
+
- Do not do the work yourself: lock what *good* looks like, then delegate.
|
|
9
|
+
Hand-building converts your context — the scarce thing — into output
|
|
10
|
+
someone else could have produced.
|
|
11
|
+
- You are the shock absorber, not the wire: absorb upstream churn, relay only
|
|
12
|
+
settled decisions.
|
|
13
|
+
- Only this seat may park, and only with a watchdog armed
|
|
14
|
+
(`rig watchdog register`). Every other seat passes the baton.
|
|
15
|
+
- Never invent work to look busy; if every action this session was a reaction
|
|
16
|
+
to an inbound message, you have not chosen work once — that is drift even
|
|
17
|
+
when each response was correct.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Seat Craft — rev1-r1 (shipped default)
|
|
2
|
+
|
|
3
|
+
<!-- Copy-if-absent; this seat's occupants append what the position learns. -->
|
|
4
|
+
|
|
5
|
+
- A CLEAR from this seat means you RAN it, not that you read a receipt.
|
|
6
|
+
Reading the handler body is still contract review; the completing check is
|
|
7
|
+
a behavioral probe of the running mechanism.
|
|
8
|
+
- Verdicts are BASE-SCOPED. If main moves during your review, say so in the
|
|
9
|
+
verdict: name both bases and the disposition (restack + patch-id proof
|
|
10
|
+
carries a CLEAR only on MATCH).
|
|
11
|
+
- Gates have a third state: INDETERMINATE. A killed, starved, or
|
|
12
|
+
contention-timed run is not RED and not green — attribute before ruling,
|
|
13
|
+
with a base A/B where possible.
|
|
14
|
+
- Predict before you check: state what a failing result would look like
|
|
15
|
+
BEFORE running the discriminator. If your finding appeared verbatim in the
|
|
16
|
+
dispatch, go read the artifact.
|
|
17
|
+
- Never review your own authorship; name the exclusion in the verdict.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Seat Craft — rev1-r2 (shipped default)
|
|
2
|
+
|
|
3
|
+
<!-- Copy-if-absent; this seat's occupants append what the position learns. -->
|
|
4
|
+
|
|
5
|
+
- Your gate asks a DIFFERENT question than r1's: does each claim survive
|
|
6
|
+
contact with source, on your runtime. Two gates that ask the same question
|
|
7
|
+
are one gate.
|
|
8
|
+
- Check claims at source, not at the summary: open the named files at the
|
|
9
|
+
frozen sha, confirm ancestry from the stated base, run the focused suites
|
|
10
|
+
yourself.
|
|
11
|
+
- Mark every claim you relay: verified-at-source, inherited-unverified, or
|
|
12
|
+
believed. Fluency reads as reliability, so unmarked confidence transfers.
|
|
13
|
+
- An author's green is evidence, not a verdict; your independent count is the
|
|
14
|
+
verdict. Disclose any check you could not complete as INDETERMINATE with
|
|
15
|
+
its cause — never fold it into the CLEAR silently.
|
package/dist/build-info.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// GENERATED by scripts/build-package.sh — the packaged build-identity stamp.
|
|
2
2
|
export const BUILD_INFO = {
|
|
3
|
-
semver: "0.5.
|
|
4
|
-
commit: "
|
|
3
|
+
semver: "0.5.3",
|
|
4
|
+
commit: "e6add8b86b4bd008b8d46ec31a16fb09aff3b8f2",
|
|
5
5
|
dirty: false,
|
|
6
|
-
builtAt: "2026-08-
|
|
6
|
+
builtAt: "2026-08-26T02:55:45Z",
|
|
7
7
|
};
|
|
8
8
|
export function stampFields(info = BUILD_INFO) {
|
|
9
9
|
if (!info.commit) return {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/commands/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsBpC,wBAAgB,aAAa,CAC3B,UAAU,CAAC,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE;IACL,mFAAmF;IACnF,kBAAkB,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CAC7C,GACA,OAAO,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/commands/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsBpC,wBAAgB,aAAa,CAC3B,UAAU,CAAC,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE;IACL,mFAAmF;IACnF,kBAAkB,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CAC7C,GACA,OAAO,CA+JT"}
|
package/dist/commands/config.js
CHANGED
|
@@ -49,8 +49,16 @@ Keys:
|
|
|
49
49
|
daemon.* port, host
|
|
50
50
|
db.path
|
|
51
51
|
transcripts.* enabled, path, lines, poll_interval_seconds
|
|
52
|
+
(lines/poll_interval set scrollback CAPTURE depth + cadence.
|
|
53
|
+
Thin CLAUDE transcripts usually are NOT these — they mean the
|
|
54
|
+
seat's fullscreen renderer, whose alternate screen emits no
|
|
55
|
+
scrollback. OpenRig launches Claude with
|
|
56
|
+
CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 by default; set
|
|
57
|
+
OPENRIG_CLAUDE_DISABLE_ALTERNATE_SCREEN=0 to opt back into fullscreen.)
|
|
52
58
|
workspace.* root, slices_root, steering_path, field_notes_root,
|
|
53
59
|
specs_root, dogfood_evidence_root, operator_seat_name
|
|
60
|
+
topology.root the topology tree root (instance altitude at its top; default $OPENRIG_HOME/topology)
|
|
61
|
+
context.packs_root context-pack library landing zone for 'rig context add' (default $OPENRIG_HOME/context-packs)
|
|
54
62
|
files.allowlist name:/abs/path,name:/abs/path
|
|
55
63
|
progress.scan_roots name:/abs/path,name:/abs/path
|
|
56
64
|
ui.preview.* refresh_interval_seconds, max_pins, default_lines
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/commands/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,O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/commands/context.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/commands/context.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoBpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AA6Q9C,wBAAgB,cAAc,CAAC,YAAY,CAAC,EAAE,UAAU,GAAG,OAAO,CA0fjE"}
|
package/dist/commands/context.js
CHANGED
|
@@ -10,10 +10,11 @@
|
|
|
10
10
|
// ~/.openrig/context-packs/<name>/ — host-symlink-free contract,
|
|
11
11
|
// matches `rig specs add` shape (regular files only; no symlinks).
|
|
12
12
|
import { Command } from "commander";
|
|
13
|
-
import { cpSync, existsSync, lstatSync, mkdirSync, readdirSync, readFileSync, } from "node:fs";
|
|
13
|
+
import { cpSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, renameSync, rmSync, writeFileSync, } from "node:fs";
|
|
14
|
+
import { dirname } from "node:path";
|
|
14
15
|
import { basename, extname, isAbsolute, join, resolve } from "node:path";
|
|
15
16
|
import { parse as parseYaml } from "yaml";
|
|
16
|
-
import {
|
|
17
|
+
import { ConfigStore } from "../config-store.js";
|
|
17
18
|
import { DaemonClient } from "../client.js";
|
|
18
19
|
import { getDaemonStatus, getDaemonUrl, statusGuardMessage } from "../daemon-lifecycle.js";
|
|
19
20
|
import { realDeps } from "./daemon.js";
|
|
@@ -75,7 +76,10 @@ function assertDestinationNamespaceContained(targetRoot, installName) {
|
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
|
-
|
|
79
|
+
// Kept in lockstep with the daemon parser's ALLOWED_FILE_SUFFIXES (manifest-parser.ts).
|
|
80
|
+
// OPR.0.5.3.7 R2 added .sh/.ts (skill helper assets, served as text); the install
|
|
81
|
+
// validator must accept what the daemon will serve.
|
|
82
|
+
const ALLOWED_CONTEXT_PACK_SUFFIXES = new Set([".md", ".markdown", ".yaml", ".yml", ".txt", ".sh", ".ts"]);
|
|
79
83
|
function validateContextPackManifestForInstall(manifestPath) {
|
|
80
84
|
let parsed;
|
|
81
85
|
try {
|
|
@@ -124,6 +128,80 @@ function validateContextPackManifestForInstall(manifestPath) {
|
|
|
124
128
|
}
|
|
125
129
|
}
|
|
126
130
|
}
|
|
131
|
+
function isHttpUrl(source) {
|
|
132
|
+
return /^https?:\/\//i.test(source);
|
|
133
|
+
}
|
|
134
|
+
async function fetchTextOrThrow(url, what) {
|
|
135
|
+
let res;
|
|
136
|
+
try {
|
|
137
|
+
res = await fetch(url);
|
|
138
|
+
}
|
|
139
|
+
catch (err) {
|
|
140
|
+
throw new Error(`Could not reach ${what} at ${url}: ${err.message}`);
|
|
141
|
+
}
|
|
142
|
+
if (!res.ok)
|
|
143
|
+
throw new Error(`Could not fetch ${what} at ${url}: HTTP ${res.status} ${res.statusText}`.trim());
|
|
144
|
+
// res.url is the FINAL url after any redirects — declared files must resolve
|
|
145
|
+
// relative to it, not the caller's original spelling (r2 MEDIUM-1).
|
|
146
|
+
return { text: await res.text(), finalUrl: res.url || url };
|
|
147
|
+
}
|
|
148
|
+
// OPR.0.5.3.7 R4 — install a context pack from a URL. <url> points at the pack's
|
|
149
|
+
// manifest.yaml (a trailing '/' is treated as '<url>manifest.yaml'); every
|
|
150
|
+
// files[].path is fetched relative to that manifest. ATOMIC BY CONSTRUCTION:
|
|
151
|
+
// everything stages into a temp SIBLING of the target and is published by one
|
|
152
|
+
// renameSync, so a malformed manifest, an unreachable URL, or a missing declared
|
|
153
|
+
// file leaves NO partial pack behind. Deliberately dumb: no registry, no cache.
|
|
154
|
+
async function installPackFromUrl(url, overrideName, targetRoot) {
|
|
155
|
+
const manifestUrl = url.endsWith("/") ? `${url}manifest.yaml` : url;
|
|
156
|
+
mkdirSync(targetRoot, { recursive: true });
|
|
157
|
+
const staging = mkdtempSync(join(targetRoot, ".tmp-add-"));
|
|
158
|
+
try {
|
|
159
|
+
// Fetch + validate the manifest before touching the target namespace.
|
|
160
|
+
const { text: manifestText, finalUrl: finalManifestUrl } = await fetchTextOrThrow(manifestUrl, "manifest");
|
|
161
|
+
writeFileSync(join(staging, "manifest.yaml"), manifestText);
|
|
162
|
+
validateContextPackManifestForInstall(join(staging, "manifest.yaml"));
|
|
163
|
+
const manifest = parseYaml(manifestText);
|
|
164
|
+
const installName = overrideName ?? manifest.name;
|
|
165
|
+
assertSafeInstallRef(installName);
|
|
166
|
+
assertDestinationNamespaceContained(targetRoot, installName);
|
|
167
|
+
const targetDir = join(targetRoot, installName);
|
|
168
|
+
if (existsSync(targetDir)) {
|
|
169
|
+
throw new Error(`A context pack named '${installName}' already exists at ${targetDir}. Remove it first or use --name to install under a different name.`);
|
|
170
|
+
}
|
|
171
|
+
// Fetch every declared file relative to the manifest's FINAL url (after
|
|
172
|
+
// redirects), via the platform URL resolver — never the caller's original
|
|
173
|
+
// spelling (r2 MEDIUM-1: a redirected manifest must not resolve files against
|
|
174
|
+
// the stale request base).
|
|
175
|
+
//
|
|
176
|
+
// BOUNDARY (r2 HIGH-1): new URL() also honors an ABSOLUTE f.path, and the
|
|
177
|
+
// manifest validator accepts a URL-shaped value as a filesystem-relative
|
|
178
|
+
// path. Require every resolved file URL to stay under the manifest's own
|
|
179
|
+
// directory (same origin + path prefix) so a stranger-supplied manifest can
|
|
180
|
+
// never make add fetch cross-origin or climb out of its pack. The trailing
|
|
181
|
+
// slash on the base defeats prefix-sibling ('/pack' vs '/pack-evil') tricks.
|
|
182
|
+
const manifestDirUrl = new URL("./", finalManifestUrl).href;
|
|
183
|
+
for (const f of manifest.files) {
|
|
184
|
+
const fileUrl = new URL(f.path, finalManifestUrl).href;
|
|
185
|
+
if (!fileUrl.startsWith(manifestDirUrl)) {
|
|
186
|
+
throw new Error(`manifest file '${f.path}' resolves to ${fileUrl}, outside the pack directory ${manifestDirUrl}. ` +
|
|
187
|
+
`Declared files must be relative to the manifest (no absolute URLs, no escaping the pack).`);
|
|
188
|
+
}
|
|
189
|
+
const { text: fileText } = await fetchTextOrThrow(fileUrl, `file '${f.path}'`);
|
|
190
|
+
const dest = join(staging, f.path);
|
|
191
|
+
mkdirSync(dirname(dest), { recursive: true });
|
|
192
|
+
writeFileSync(dest, fileText);
|
|
193
|
+
}
|
|
194
|
+
// Re-validate the on-disk staged pack, then publish atomically.
|
|
195
|
+
validateContextPackManifestForInstall(join(staging, "manifest.yaml"));
|
|
196
|
+
assertTreeHasNoSymlinks(staging);
|
|
197
|
+
renameSync(staging, targetDir);
|
|
198
|
+
return { targetDir, installName };
|
|
199
|
+
}
|
|
200
|
+
catch (err) {
|
|
201
|
+
rmSync(staging, { recursive: true, force: true });
|
|
202
|
+
throw err;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
127
205
|
async function resolvePack(client, nameOrRef) {
|
|
128
206
|
if (nameOrRef.startsWith("context-pack:")) {
|
|
129
207
|
throw new Error("Context pack colon-id addressing ('context-pack:<name>:<version>') was removed. " +
|
|
@@ -167,6 +245,7 @@ Examples:
|
|
|
167
245
|
rig context add ./my-pack
|
|
168
246
|
rig context rm packs/compaction-restore
|
|
169
247
|
rig context sync
|
|
248
|
+
rig context trace --rig product-team --seat orch1-lead --name LEARNED.md
|
|
170
249
|
`);
|
|
171
250
|
const getDeps = () => depsOverride ?? {
|
|
172
251
|
lifecycleDeps: realDeps(),
|
|
@@ -182,6 +261,56 @@ Examples:
|
|
|
182
261
|
}
|
|
183
262
|
return deps.clientFactory(getDaemonUrl(status));
|
|
184
263
|
}
|
|
264
|
+
// OPR.0.5.3.6 — the productized chain-file trace. Daemon-independent by
|
|
265
|
+
// design: the walk is a config read + filesystem reads, so it works on a
|
|
266
|
+
// box whose daemon is down (orientation is exactly when that happens).
|
|
267
|
+
cmd.command("trace")
|
|
268
|
+
.description("Walk the topology tree for one chain filename (instance -> rig -> seat), keyed off topology.root")
|
|
269
|
+
.requiredOption("--rig <rig>", "Rig name (the rigs/<rig> altitude)")
|
|
270
|
+
.option("--seat <seat>", "Seat id (the seats/<seat> altitude); omit for a rig-level trace")
|
|
271
|
+
.requiredOption("--name <file>", "Chain filename, identical at every altitude (e.g. LEARNED.md, CULTURE.md)")
|
|
272
|
+
.option("--json", "JSON output for agents")
|
|
273
|
+
.action(async (opts) => {
|
|
274
|
+
const { ConfigStore } = await import("../config-store.js");
|
|
275
|
+
const { traceTopologyChain } = await import("../lib/topology-trace.js");
|
|
276
|
+
const store = new ConfigStore();
|
|
277
|
+
const resolved = store.resolveWithSource("topology.root");
|
|
278
|
+
let result;
|
|
279
|
+
try {
|
|
280
|
+
result = traceTopologyChain({
|
|
281
|
+
topologyRoot: String(resolved.value),
|
|
282
|
+
name: opts.name,
|
|
283
|
+
rig: opts.rig,
|
|
284
|
+
seat: opts.seat ?? null,
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
catch (err) {
|
|
288
|
+
// r2-B3: traversal-shaped input is a clean refusal, never a stack trace.
|
|
289
|
+
console.error(err instanceof Error ? err.message : String(err));
|
|
290
|
+
process.exitCode = 1;
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
// Advisories go to stderr on BOTH output modes — a legacy read must
|
|
294
|
+
// never pass silently, and stdout stays clean for piping.
|
|
295
|
+
for (const level of result.levels) {
|
|
296
|
+
if (level.advisory)
|
|
297
|
+
console.error(`ADVISORY ${level.advisory}`);
|
|
298
|
+
}
|
|
299
|
+
if (opts.json) {
|
|
300
|
+
console.log(JSON.stringify({ topologyRootSource: resolved.source, ...result }, null, 2));
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
console.log(`chain "${result.name}" under topology.root=${result.topologyRoot} (source: ${resolved.source})`);
|
|
304
|
+
for (const level of result.levels) {
|
|
305
|
+
if (level.source === "absent") {
|
|
306
|
+
console.log(`\n== ${level.altitude} — absent (${level.path})`);
|
|
307
|
+
continue;
|
|
308
|
+
}
|
|
309
|
+
const origin = level.source === "legacy" ? ` [LEGACY: ${level.resolvedPath}]` : "";
|
|
310
|
+
console.log(`\n== ${level.altitude} — ${level.path}${origin}`);
|
|
311
|
+
console.log(level.content?.trimEnd() ?? "");
|
|
312
|
+
}
|
|
313
|
+
});
|
|
185
314
|
cmd.command("compose")
|
|
186
315
|
.description("Compose ordered files into a durable context-pack ref (never delivers)")
|
|
187
316
|
.requiredOption("--out <ref>", "Path-like durable output ref")
|
|
@@ -305,6 +434,175 @@ Examples:
|
|
|
305
434
|
process.exitCode = 1;
|
|
306
435
|
}
|
|
307
436
|
});
|
|
437
|
+
// OPR.0.5.3.7 R1 — the PULL verb: an agent-facing serving verb over the EXISTING assembler
|
|
438
|
+
// path (the same by-ref/preview machinery `preview` uses — never a parallel assembler).
|
|
439
|
+
// `preview` is the operator's pre-send check; `get` is what a seat runs on demand to LOAD a
|
|
440
|
+
// library entry. Output is the assembled bundle itself (so the agent consumes exactly those
|
|
441
|
+
// bytes), warnings to stderr; `--json` for programmatic use. Naming ruled: `rig context get`
|
|
442
|
+
// (one library, one verb — NOT `rig skills get`; "skills" is an org category in the library).
|
|
443
|
+
cmd.command("get")
|
|
444
|
+
.argument("<name-or-ref>", "Context library entry name, path-like ref, or address (<pack-ref>/<file>#H2-slug/H3-slug)")
|
|
445
|
+
.description("Serve the assembled bundle for an agent to load on demand (the pull verb)")
|
|
446
|
+
.option("--json", "JSON output")
|
|
447
|
+
.action(async (nameOrRef, opts) => {
|
|
448
|
+
try {
|
|
449
|
+
const client = await getClient();
|
|
450
|
+
// OPR.0.5.3.5 Atom 4c (Q4: one `name#H2/H3` form across the verb
|
|
451
|
+
// family): an address routes to the daemon's single resolver home;
|
|
452
|
+
// stdout is exactly the resolved span bytes so an agent consumes the
|
|
453
|
+
// addressed section and nothing else. Fail-loud passthrough — the
|
|
454
|
+
// daemon names every failure; this verb adds nothing to it.
|
|
455
|
+
if (nameOrRef.includes("#")) {
|
|
456
|
+
const res = await client.get(`/api/context-packs/library/resolve-address?address=${encodeURIComponent(nameOrRef)}`);
|
|
457
|
+
if (res.status !== 200) {
|
|
458
|
+
throw new Error(res.data?.message ?? res.data?.error ?? `Daemon returned HTTP ${res.status} for resolve-address`);
|
|
459
|
+
}
|
|
460
|
+
if (opts.json)
|
|
461
|
+
console.log(JSON.stringify(res.data, null, 2));
|
|
462
|
+
else
|
|
463
|
+
console.log(res.data.text);
|
|
464
|
+
return;
|
|
465
|
+
}
|
|
466
|
+
const entry = await resolvePack(client, nameOrRef);
|
|
467
|
+
const res = await client.get(`/api/context-packs/library/by-ref/preview?ref=${encodeURIComponent(entry.relativePath)}`);
|
|
468
|
+
if (res.status !== 200)
|
|
469
|
+
throw new Error(`Daemon returned HTTP ${res.status}`);
|
|
470
|
+
const bundle = res.data;
|
|
471
|
+
if (opts.json) {
|
|
472
|
+
console.log(JSON.stringify(bundle, null, 2));
|
|
473
|
+
return;
|
|
474
|
+
}
|
|
475
|
+
// Warnings go to stderr so stdout is exactly the served bundle bytes.
|
|
476
|
+
if (bundle.missingFiles.length > 0) {
|
|
477
|
+
console.error(`Warning: ${bundle.missingFiles.length} file(s) referenced by manifest are missing on disk.`);
|
|
478
|
+
for (const m of bundle.missingFiles)
|
|
479
|
+
console.error(` - ${m.path} (role: ${m.role})`);
|
|
480
|
+
}
|
|
481
|
+
console.log(bundle.bundleText);
|
|
482
|
+
}
|
|
483
|
+
catch (err) {
|
|
484
|
+
console.error(err.message);
|
|
485
|
+
process.exitCode = 1;
|
|
486
|
+
}
|
|
487
|
+
});
|
|
488
|
+
// OPR.0.5.3.5 Atom 4d — situation-composed delivery (the profile verb).
|
|
489
|
+
// Serving only: pieces to stdout with their source labels (Q2-Amendment 1),
|
|
490
|
+
// budget report + provenance warnings to stderr. Delivery-free like every
|
|
491
|
+
// library verb — nothing here sends to a seat. Naming rig/seat (or mission)
|
|
492
|
+
// is the caller's explicit grant of read access to that directory subtree.
|
|
493
|
+
cmd.command("profile")
|
|
494
|
+
.argument("<name-or-ref>", "Context pack name or path-like ref (its manifest must declare atoms)")
|
|
495
|
+
.requiredOption("--situation <situation>", "fresh | handover | post-compaction")
|
|
496
|
+
// r1 4d obs 2: default from the seat's own environment — a codex seat that
|
|
497
|
+
// forgets the flag must not silently get a claude profile (mini-req 3 is
|
|
498
|
+
// the rule that the runtimes compose DIFFERENT profiles). Flag beats env;
|
|
499
|
+
// an unrecognized env value falls back to claude rather than erroring a
|
|
500
|
+
// surface the env owner may not control.
|
|
501
|
+
.option("--runtime <runtime>", "claude | codex (default: $OPENRIG_RUNTIME, else claude)")
|
|
502
|
+
.option("--budget <tokens>", "Situation token budget — overage is REPORTED, never truncated")
|
|
503
|
+
.option("--rig <rig>", "With --seat: grant read access to that seat's tree (seat: atoms)")
|
|
504
|
+
.option("--seat <seat>", "With --rig: the seat whose tree seat: atoms may read")
|
|
505
|
+
.option("--mission <mission>", "Grant read access to that mission's tree (mission: atoms)")
|
|
506
|
+
.option("--json", "JSON output (the full composed profile)")
|
|
507
|
+
.action(async (nameOrRef, opts) => {
|
|
508
|
+
try {
|
|
509
|
+
const client = await getClient();
|
|
510
|
+
const entry = await resolvePack(client, nameOrRef);
|
|
511
|
+
// r1 F2: the product's runtime vocabulary is "claude-code" / "codex"
|
|
512
|
+
// (the adapters' values, live on real seats) — map it EXPLICITLY. A
|
|
513
|
+
// genuinely unknown value falls back to claude WITH A VOICE: a future
|
|
514
|
+
// third runtime must not silently get a claude profile (the exact
|
|
515
|
+
// mini-req 3 hazard this default exists to close).
|
|
516
|
+
const envRuntime = process.env["OPENRIG_RUNTIME"];
|
|
517
|
+
let runtime = opts.runtime;
|
|
518
|
+
if (runtime === undefined) {
|
|
519
|
+
if (envRuntime === "codex")
|
|
520
|
+
runtime = "codex";
|
|
521
|
+
else if (envRuntime === "claude-code" || envRuntime === "claude")
|
|
522
|
+
runtime = "claude";
|
|
523
|
+
else {
|
|
524
|
+
if (envRuntime)
|
|
525
|
+
console.error(`Warning: unrecognized OPENRIG_RUNTIME '${envRuntime}' — composing the claude profile; pass --runtime to override.`);
|
|
526
|
+
runtime = "claude";
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
const params = new URLSearchParams({ ref: entry.relativePath, situation: opts.situation, runtime });
|
|
530
|
+
if (opts.budget !== undefined)
|
|
531
|
+
params.set("budget", opts.budget);
|
|
532
|
+
if (opts.rig !== undefined)
|
|
533
|
+
params.set("rig", opts.rig);
|
|
534
|
+
if (opts.seat !== undefined)
|
|
535
|
+
params.set("seat", opts.seat);
|
|
536
|
+
if (opts.mission !== undefined)
|
|
537
|
+
params.set("mission", opts.mission);
|
|
538
|
+
const res = await client.get(`/api/context-packs/library/by-ref/profile?${params.toString()}`);
|
|
539
|
+
if (res.status !== 200) {
|
|
540
|
+
throw new Error(res.data?.message ?? res.data?.error ?? `Daemon returned HTTP ${res.status} for by-ref/profile`);
|
|
541
|
+
}
|
|
542
|
+
const profile = res.data;
|
|
543
|
+
if (opts.json) {
|
|
544
|
+
console.log(JSON.stringify(profile, null, 2));
|
|
545
|
+
return;
|
|
546
|
+
}
|
|
547
|
+
// Warnings and the budget report ride stderr so stdout is exactly the
|
|
548
|
+
// composed walk an agent consumes.
|
|
549
|
+
for (const w of profile.provenanceWarnings ?? [])
|
|
550
|
+
console.error(`PROVENANCE ${w}`);
|
|
551
|
+
if (profile.budget) {
|
|
552
|
+
console.error(`BUDGET: over by ~${profile.budget.overageTokens} tokens (limit ${profile.budget.limitTokens}); ` +
|
|
553
|
+
`drop candidates in order: ${profile.budget.dropCandidates.map((d) => `${d.atomId} (${d.priority}, ~${d.estimatedTokens})`).join(", ")}`);
|
|
554
|
+
}
|
|
555
|
+
for (const p of profile.pieces ?? []) {
|
|
556
|
+
// r1 4d obs 1: the escape marker rides the FRAMING header, so an
|
|
557
|
+
// agent that discards stderr still learns a piece's bytes came from
|
|
558
|
+
// outside its root — self-describing payload, zero composed bytes
|
|
559
|
+
// touched.
|
|
560
|
+
const escaped = p.provenance?.escapesRoot ? " !ESCAPED-ROOT" : "";
|
|
561
|
+
console.log(`=== ${p.atomId} [${p.sourceKind}${escaped}] ${p.address} (~${p.estimatedTokens} tokens)`);
|
|
562
|
+
console.log(p.text);
|
|
563
|
+
console.log("");
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
catch (err) {
|
|
567
|
+
console.error(err.message);
|
|
568
|
+
process.exitCode = 1;
|
|
569
|
+
}
|
|
570
|
+
});
|
|
571
|
+
// OPR.0.5.3.5 mini-req 7 — the outgoing occupant's boundary write (the Q2
|
|
572
|
+
// requirement the store alone does not satisfy). Daemon-independent like
|
|
573
|
+
// trace: the seat dir resolves from topology.root CONFIG; the write flows
|
|
574
|
+
// through the ONE store (supersession + addressability gate); advisory
|
|
575
|
+
// contract findings ride stderr while the write still lands — the boundary
|
|
576
|
+
// is never blocked on prose shape.
|
|
577
|
+
cmd.command("recap-write")
|
|
578
|
+
.description("Write this seat's authored RECAP (decisions-with-rationale) at the handover boundary; supersedes the previous recap into the seat's chain")
|
|
579
|
+
.requiredOption("--rig <rig>", "Rig name (the rigs/<rig> altitude)")
|
|
580
|
+
.requiredOption("--seat <seat>", "Seat id (the seats/<seat> altitude)")
|
|
581
|
+
.requiredOption("--file <path>", "Markdown file containing the recap content")
|
|
582
|
+
.action(async (opts) => {
|
|
583
|
+
try {
|
|
584
|
+
const { writeSeatRecap, validateRecapContract, listRecapChain } = await import("@openrig/daemon/seat-recap-store");
|
|
585
|
+
const content = readFileSync(opts.file, "utf-8");
|
|
586
|
+
const store = new ConfigStore();
|
|
587
|
+
const topologyRoot = String(store.resolveWithSource("topology.root").value);
|
|
588
|
+
const seatDir = join(topologyRoot, "rigs", opts.rig, "seats", opts.seat);
|
|
589
|
+
if (!existsSync(seatDir)) {
|
|
590
|
+
throw new Error(`seat directory ${seatDir} does not exist — check --rig/--seat against the topology tree (topology.root=${topologyRoot}).`);
|
|
591
|
+
}
|
|
592
|
+
for (const f of validateRecapContract(content)) {
|
|
593
|
+
console.error(f.kind === "no-decisions-section"
|
|
594
|
+
? "ADVISORY no-decisions-section: the authoring contract asks for decisions WITH rationale — conclusions alone are the lossy handoff shape."
|
|
595
|
+
: `ADVISORY nonstandard-unverified-marker (line ${f.line}): use the canonical 'UNVERIFIED:' form so uncertain facts stay findable.`);
|
|
596
|
+
}
|
|
597
|
+
writeSeatRecap({ seatDir, content });
|
|
598
|
+
const chain = listRecapChain(seatDir);
|
|
599
|
+
console.log(`Recap written: ${join(seatDir, "RECAP.md")}${chain.length > 0 ? ` (${chain.length} superseded predecessor${chain.length === 1 ? "" : "s"} retained)` : ""}`);
|
|
600
|
+
}
|
|
601
|
+
catch (err) {
|
|
602
|
+
console.error(err.message);
|
|
603
|
+
process.exitCode = 1;
|
|
604
|
+
}
|
|
605
|
+
});
|
|
308
606
|
cmd.command("sync")
|
|
309
607
|
.description("Re-walk discovery roots and refresh the library index")
|
|
310
608
|
.option("--json", "JSON output")
|
|
@@ -332,56 +630,63 @@ Examples:
|
|
|
332
630
|
}
|
|
333
631
|
});
|
|
334
632
|
cmd.command("add")
|
|
335
|
-
.argument("<source
|
|
336
|
-
.description("Install a context pack from a local directory into
|
|
337
|
-
.option("--name <name>", "Override the install name (defaults to source
|
|
633
|
+
.argument("<source>", "Local directory OR http(s):// URL of a context pack (manifest.yaml + files)")
|
|
634
|
+
.description("Install a context pack from a local directory or a URL into the context-packs landing zone")
|
|
635
|
+
.option("--name <name>", "Override the install name (defaults to the manifest name / source basename)")
|
|
338
636
|
.option("--json", "JSON output")
|
|
339
|
-
.action(async (
|
|
637
|
+
.action(async (source, opts) => {
|
|
340
638
|
try {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
const
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
639
|
+
// OPR.0.5.3.7 R4 — config-resolved landing zone (env > config > $OPENRIG_HOME/context-packs),
|
|
640
|
+
// never a hardcoded ~/.openrig literal; the daemon resolves the same key.
|
|
641
|
+
const targetRoot = new ConfigStore().resolve().context.packsRoot;
|
|
642
|
+
let targetDir;
|
|
643
|
+
if (isHttpUrl(source)) {
|
|
644
|
+
// R4 — URL install: fetch → validate → atomic stage+rename (no partial pack).
|
|
645
|
+
({ targetDir } = await installPackFromUrl(source, opts.name, targetRoot));
|
|
646
|
+
}
|
|
647
|
+
else {
|
|
648
|
+
// Local directory install.
|
|
649
|
+
if (!existsSync(source))
|
|
650
|
+
throw new Error(`Source directory not found: ${source}`);
|
|
651
|
+
const stat = lstatSync(source);
|
|
652
|
+
if (stat.isSymbolicLink())
|
|
653
|
+
throw new Error(`Source must not be a symlink: ${source}`);
|
|
654
|
+
if (!stat.isDirectory())
|
|
655
|
+
throw new Error(`Source must be a directory containing manifest.yaml: ${source}`);
|
|
656
|
+
const manifestPath = join(source, "manifest.yaml");
|
|
657
|
+
if (!existsSync(manifestPath)) {
|
|
658
|
+
throw new Error(`Source directory must contain manifest.yaml: ${source}`);
|
|
659
|
+
}
|
|
660
|
+
validateContextPackManifestForInstall(manifestPath);
|
|
661
|
+
const installName = opts.name ?? (() => {
|
|
662
|
+
try {
|
|
663
|
+
const raw = readFileSync(manifestPath, "utf-8");
|
|
664
|
+
const m = raw.match(/^name:\s*['"]?([^'"\n]+)['"]?\s*$/m);
|
|
665
|
+
return m?.[1]?.trim() || basename(source);
|
|
666
|
+
}
|
|
667
|
+
catch {
|
|
668
|
+
return basename(source);
|
|
669
|
+
}
|
|
670
|
+
})();
|
|
671
|
+
assertSafeInstallRef(installName);
|
|
672
|
+
assertTreeHasNoSymlinks(source);
|
|
673
|
+
mkdirSync(targetRoot, { recursive: true });
|
|
674
|
+
assertDestinationNamespaceContained(targetRoot, installName);
|
|
675
|
+
targetDir = join(targetRoot, installName);
|
|
676
|
+
let targetExists = false;
|
|
357
677
|
try {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
return m?.[1]?.trim() || basename(sourceDir);
|
|
678
|
+
lstatSync(targetDir);
|
|
679
|
+
targetExists = true;
|
|
361
680
|
}
|
|
362
|
-
catch {
|
|
363
|
-
|
|
681
|
+
catch (err) {
|
|
682
|
+
if (err.code !== "ENOENT")
|
|
683
|
+
throw err;
|
|
364
684
|
}
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
assertDestinationNamespaceContained(targetRoot, installName);
|
|
371
|
-
const targetDir = join(targetRoot, installName);
|
|
372
|
-
let targetExists = false;
|
|
373
|
-
try {
|
|
374
|
-
lstatSync(targetDir);
|
|
375
|
-
targetExists = true;
|
|
376
|
-
}
|
|
377
|
-
catch (err) {
|
|
378
|
-
if (err.code !== "ENOENT")
|
|
379
|
-
throw err;
|
|
380
|
-
}
|
|
381
|
-
if (targetExists) {
|
|
382
|
-
throw new Error(`A context pack named '${installName}' already exists at ${targetDir}. Remove it first or use --name to install under a different name.`);
|
|
383
|
-
}
|
|
384
|
-
cpSync(sourceDir, targetDir, { recursive: true });
|
|
685
|
+
if (targetExists) {
|
|
686
|
+
throw new Error(`A context pack named '${installName}' already exists at ${targetDir}. Remove it first or use --name to install under a different name.`);
|
|
687
|
+
}
|
|
688
|
+
cpSync(source, targetDir, { recursive: true });
|
|
689
|
+
}
|
|
385
690
|
// Sync the daemon library so the new pack appears immediately.
|
|
386
691
|
const client = await getClient();
|
|
387
692
|
const syncRes = await client.post("/api/context-packs/library/sync");
|