@openrig/cli 0.2.0 → 0.3.1
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/.claude-plugin/plugin.json +15 -0
- package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +24 -0
- package/daemon/assets/plugins/openrig-core/LICENSE +200 -0
- package/daemon/assets/plugins/openrig-core/README.md +42 -0
- package/daemon/assets/plugins/openrig-core/hooks/claude.json +78 -0
- package/daemon/assets/plugins/openrig-core/hooks/codex.json +37 -0
- package/daemon/assets/{openrig-activity-hook-relay.cjs → plugins/openrig-core/hooks/scripts/activity-relay.cjs} +12 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/compaction-restore-bridge.cjs +172 -0
- package/daemon/assets/plugins/openrig-core/skills/agent-startup-and-context-ingestion/SKILL.md +104 -0
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +131 -0
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +174 -0
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +433 -0
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/templates/compact-instruction.md +1 -0
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/templates/post-compact-restore-instruction.md +1 -0
- package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +305 -0
- package/daemon/{specs/agents/shared/skills/rig-architect → assets/plugins/openrig-core/skills/openrig-architect}/SKILL.md +38 -19
- package/daemon/assets/plugins/openrig-core/skills/openrig-operator/SKILL.md +222 -0
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +597 -0
- package/daemon/assets/plugins/openrig-core/skills/queue-handoff/SKILL.md +122 -0
- package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +137 -0
- package/daemon/assets/vm-preview-fixtures/README.md +48 -0
- package/daemon/assets/vm-preview-fixtures/workflows/sample-basic-loop.yaml +79 -0
- package/daemon/dist/adapters/claude-code-adapter.d.ts +11 -3
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +58 -60
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/cmux-transport.d.ts.map +1 -1
- package/daemon/dist/adapters/cmux-transport.js +81 -2
- package/daemon/dist/adapters/cmux-transport.js.map +1 -1
- package/daemon/dist/adapters/cmux.d.ts +4 -0
- package/daemon/dist/adapters/cmux.d.ts.map +1 -1
- package/daemon/dist/adapters/cmux.js +87 -0
- package/daemon/dist/adapters/cmux.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +14 -3
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +43 -57
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/builtins/workflow-specs/basic-loop.yaml +76 -0
- package/daemon/dist/builtins/workflow-specs/conveyor.yaml +80 -0
- package/daemon/dist/db/migrations/026_inbox_entries.d.ts +1 -1
- package/daemon/dist/db/migrations/026_inbox_entries.js +1 -1
- package/daemon/dist/db/migrations/029_classifier_leases.d.ts +1 -1
- package/daemon/dist/db/migrations/029_classifier_leases.js +1 -1
- package/daemon/dist/db/migrations/037_mission_control_actions.d.ts +51 -0
- package/daemon/dist/db/migrations/037_mission_control_actions.d.ts.map +1 -0
- package/daemon/dist/db/migrations/037_mission_control_actions.js +74 -0
- package/daemon/dist/db/migrations/037_mission_control_actions.js.map +1 -0
- package/daemon/dist/db/migrations/038_workspace_primitive.d.ts +16 -0
- package/daemon/dist/db/migrations/038_workspace_primitive.d.ts.map +1 -0
- package/daemon/dist/db/migrations/038_workspace_primitive.js +20 -0
- package/daemon/dist/db/migrations/038_workspace_primitive.js.map +1 -0
- package/daemon/dist/db/migrations/039_queue_target_repo.d.ts +16 -0
- package/daemon/dist/db/migrations/039_queue_target_repo.d.ts.map +1 -0
- package/daemon/dist/db/migrations/039_queue_target_repo.js +21 -0
- package/daemon/dist/db/migrations/039_queue_target_repo.js.map +1 -0
- package/daemon/dist/db/migrations/040_workflow_specs_diagnostic.d.ts +32 -0
- package/daemon/dist/db/migrations/040_workflow_specs_diagnostic.d.ts.map +1 -0
- package/daemon/dist/db/migrations/040_workflow_specs_diagnostic.js +37 -0
- package/daemon/dist/db/migrations/040_workflow_specs_diagnostic.js.map +1 -0
- package/daemon/dist/domain/active-lens-store.d.ts +23 -0
- package/daemon/dist/domain/active-lens-store.d.ts.map +1 -0
- package/daemon/dist/domain/active-lens-store.js +87 -0
- package/daemon/dist/domain/active-lens-store.js.map +1 -0
- package/daemon/dist/domain/agent-images/agent-image-library-service.d.ts +68 -0
- package/daemon/dist/domain/agent-images/agent-image-library-service.d.ts.map +1 -0
- package/daemon/dist/domain/agent-images/agent-image-library-service.js +339 -0
- package/daemon/dist/domain/agent-images/agent-image-library-service.js.map +1 -0
- package/daemon/dist/domain/agent-images/agent-image-types.d.ts +113 -0
- package/daemon/dist/domain/agent-images/agent-image-types.d.ts.map +1 -0
- package/daemon/dist/domain/agent-images/agent-image-types.js +24 -0
- package/daemon/dist/domain/agent-images/agent-image-types.js.map +1 -0
- package/daemon/dist/domain/agent-images/evidence-guard.d.ts +26 -0
- package/daemon/dist/domain/agent-images/evidence-guard.d.ts.map +1 -0
- package/daemon/dist/domain/agent-images/evidence-guard.js +185 -0
- package/daemon/dist/domain/agent-images/evidence-guard.js.map +1 -0
- package/daemon/dist/domain/agent-images/manifest-parser.d.ts +3 -0
- package/daemon/dist/domain/agent-images/manifest-parser.d.ts.map +1 -0
- package/daemon/dist/domain/agent-images/manifest-parser.js +114 -0
- package/daemon/dist/domain/agent-images/manifest-parser.js.map +1 -0
- package/daemon/dist/domain/agent-images/resume-token-discovery.d.ts +28 -0
- package/daemon/dist/domain/agent-images/resume-token-discovery.d.ts.map +1 -0
- package/daemon/dist/domain/agent-images/resume-token-discovery.js +83 -0
- package/daemon/dist/domain/agent-images/resume-token-discovery.js.map +1 -0
- package/daemon/dist/domain/agent-images/snapshot-capturer.d.ts +36 -0
- package/daemon/dist/domain/agent-images/snapshot-capturer.d.ts.map +1 -0
- package/daemon/dist/domain/agent-images/snapshot-capturer.js +58 -0
- package/daemon/dist/domain/agent-images/snapshot-capturer.js.map +1 -0
- package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
- package/daemon/dist/domain/agent-manifest.js +116 -37
- package/daemon/dist/domain/agent-manifest.js.map +1 -1
- package/daemon/dist/domain/agent-resolver.js +1 -1
- package/daemon/dist/domain/agent-resolver.js.map +1 -1
- package/daemon/dist/domain/agent-starter-resolver.d.ts +10 -16
- package/daemon/dist/domain/agent-starter-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/agent-starter-resolver.js +11 -13
- package/daemon/dist/domain/agent-starter-resolver.js.map +1 -1
- package/daemon/dist/domain/classifier-lease-manager.d.ts +1 -1
- package/daemon/dist/domain/classifier-lease-manager.js +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +81 -0
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -0
- package/daemon/dist/domain/claude-compaction-enforcer.js +242 -0
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -0
- package/daemon/dist/domain/cmux-layout-service.d.ts +41 -0
- package/daemon/dist/domain/cmux-layout-service.d.ts.map +1 -0
- package/daemon/dist/domain/cmux-layout-service.js +184 -0
- package/daemon/dist/domain/cmux-layout-service.js.map +1 -0
- package/daemon/dist/domain/conflict-detector.d.ts.map +1 -1
- package/daemon/dist/domain/conflict-detector.js +6 -3
- package/daemon/dist/domain/conflict-detector.js.map +1 -1
- package/daemon/dist/domain/context-monitor.d.ts +20 -5
- package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/context-monitor.js +63 -13
- package/daemon/dist/domain/context-monitor.js.map +1 -1
- package/daemon/dist/domain/context-packs/bundle-assembler.d.ts +49 -0
- package/daemon/dist/domain/context-packs/bundle-assembler.d.ts.map +1 -0
- package/daemon/dist/domain/context-packs/bundle-assembler.js +81 -0
- package/daemon/dist/domain/context-packs/bundle-assembler.js.map +1 -0
- package/daemon/dist/domain/context-packs/context-pack-library-service.d.ts +41 -0
- package/daemon/dist/domain/context-packs/context-pack-library-service.d.ts.map +1 -0
- package/daemon/dist/domain/context-packs/context-pack-library-service.js +148 -0
- package/daemon/dist/domain/context-packs/context-pack-library-service.js.map +1 -0
- package/daemon/dist/domain/context-packs/context-pack-types.d.ts +64 -0
- package/daemon/dist/domain/context-packs/context-pack-types.d.ts.map +1 -0
- package/daemon/dist/domain/context-packs/context-pack-types.js +22 -0
- package/daemon/dist/domain/context-packs/context-pack-types.js.map +1 -0
- package/daemon/dist/domain/context-packs/manifest-parser.d.ts +3 -0
- package/daemon/dist/domain/context-packs/manifest-parser.d.ts.map +1 -0
- package/daemon/dist/domain/context-packs/manifest-parser.js +74 -0
- package/daemon/dist/domain/context-packs/manifest-parser.js.map +1 -0
- package/daemon/dist/domain/context-usage-store.d.ts +14 -1
- package/daemon/dist/domain/context-usage-store.d.ts.map +1 -1
- package/daemon/dist/domain/context-usage-store.js +156 -1
- package/daemon/dist/domain/context-usage-store.js.map +1 -1
- package/daemon/dist/domain/files/file-write-service.d.ts +61 -0
- package/daemon/dist/domain/files/file-write-service.d.ts.map +1 -0
- package/daemon/dist/domain/files/file-write-service.js +180 -0
- package/daemon/dist/domain/files/file-write-service.js.map +1 -0
- package/daemon/dist/domain/files/path-safety.d.ts +47 -0
- package/daemon/dist/domain/files/path-safety.d.ts.map +1 -0
- package/daemon/dist/domain/files/path-safety.js +176 -0
- package/daemon/dist/domain/files/path-safety.js.map +1 -0
- package/daemon/dist/domain/graph-projection.d.ts +14 -1
- package/daemon/dist/domain/graph-projection.d.ts.map +1 -1
- package/daemon/dist/domain/graph-projection.js +8 -0
- package/daemon/dist/domain/graph-projection.js.map +1 -1
- package/daemon/dist/domain/install-engine.d.ts.map +1 -1
- package/daemon/dist/domain/install-engine.js +22 -6
- package/daemon/dist/domain/install-engine.js.map +1 -1
- package/daemon/dist/domain/install-verifier.d.ts.map +1 -1
- package/daemon/dist/domain/install-verifier.js +10 -5
- package/daemon/dist/domain/install-verifier.js.map +1 -1
- package/daemon/dist/domain/kernel-boot-tracker.d.ts +74 -0
- package/daemon/dist/domain/kernel-boot-tracker.d.ts.map +1 -0
- package/daemon/dist/domain/kernel-boot-tracker.js +213 -0
- package/daemon/dist/domain/kernel-boot-tracker.js.map +1 -0
- package/daemon/dist/domain/kernel-boot.d.ts +50 -0
- package/daemon/dist/domain/kernel-boot.d.ts.map +1 -0
- package/daemon/dist/domain/kernel-boot.js +147 -0
- package/daemon/dist/domain/kernel-boot.js.map +1 -0
- package/daemon/dist/domain/managed-blocks.d.ts.map +1 -1
- package/daemon/dist/domain/managed-blocks.js +22 -3
- package/daemon/dist/domain/managed-blocks.js.map +1 -1
- package/daemon/dist/domain/mission-control/audit-browse.d.ts +26 -0
- package/daemon/dist/domain/mission-control/audit-browse.d.ts.map +1 -0
- package/daemon/dist/domain/mission-control/audit-browse.js +101 -0
- package/daemon/dist/domain/mission-control/audit-browse.js.map +1 -0
- package/daemon/dist/domain/mission-control/mission-control-action-log.d.ts +51 -0
- package/daemon/dist/domain/mission-control/mission-control-action-log.d.ts.map +1 -0
- package/daemon/dist/domain/mission-control/mission-control-action-log.js +124 -0
- package/daemon/dist/domain/mission-control/mission-control-action-log.js.map +1 -0
- package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.d.ts +131 -0
- package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.d.ts.map +1 -0
- package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.js +232 -0
- package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.js.map +1 -0
- package/daemon/dist/domain/mission-control/mission-control-read-layer.d.ts +90 -0
- package/daemon/dist/domain/mission-control/mission-control-read-layer.d.ts.map +1 -0
- package/daemon/dist/domain/mission-control/mission-control-read-layer.js +279 -0
- package/daemon/dist/domain/mission-control/mission-control-read-layer.js.map +1 -0
- package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts +69 -0
- package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -0
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js +302 -0
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -0
- package/daemon/dist/domain/mission-control/notification-adapter-ntfy.d.ts +18 -0
- package/daemon/dist/domain/mission-control/notification-adapter-ntfy.d.ts.map +1 -0
- package/daemon/dist/domain/mission-control/notification-adapter-ntfy.js +48 -0
- package/daemon/dist/domain/mission-control/notification-adapter-ntfy.js.map +1 -0
- package/daemon/dist/domain/mission-control/notification-adapter-types.d.ts +25 -0
- package/daemon/dist/domain/mission-control/notification-adapter-types.d.ts.map +1 -0
- package/daemon/dist/domain/mission-control/notification-adapter-types.js +7 -0
- package/daemon/dist/domain/mission-control/notification-adapter-types.js.map +1 -0
- package/daemon/dist/domain/mission-control/notification-adapter-webhook.d.ts +27 -0
- package/daemon/dist/domain/mission-control/notification-adapter-webhook.d.ts.map +1 -0
- package/daemon/dist/domain/mission-control/notification-adapter-webhook.js +47 -0
- package/daemon/dist/domain/mission-control/notification-adapter-webhook.js.map +1 -0
- package/daemon/dist/domain/mission-control/notification-dispatcher.d.ts +53 -0
- package/daemon/dist/domain/mission-control/notification-dispatcher.d.ts.map +1 -0
- package/daemon/dist/domain/mission-control/notification-dispatcher.js +181 -0
- package/daemon/dist/domain/mission-control/notification-dispatcher.js.map +1 -0
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +24 -0
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +7 -5
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/plugin-discovery-service.d.ts +150 -0
- package/daemon/dist/domain/plugin-discovery-service.d.ts.map +1 -0
- package/daemon/dist/domain/plugin-discovery-service.js +468 -0
- package/daemon/dist/domain/plugin-discovery-service.js.map +1 -0
- package/daemon/dist/domain/plugin-vendor-service.d.ts +54 -0
- package/daemon/dist/domain/plugin-vendor-service.d.ts.map +1 -0
- package/daemon/dist/domain/plugin-vendor-service.js +111 -0
- package/daemon/dist/domain/plugin-vendor-service.js.map +1 -0
- package/daemon/dist/domain/preview/preview-rate-limiter.d.ts +20 -0
- package/daemon/dist/domain/preview/preview-rate-limiter.d.ts.map +1 -0
- package/daemon/dist/domain/preview/preview-rate-limiter.js +46 -0
- package/daemon/dist/domain/preview/preview-rate-limiter.js.map +1 -0
- package/daemon/dist/domain/profile-resolver.d.ts +8 -3
- package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/profile-resolver.js +69 -15
- package/daemon/dist/domain/profile-resolver.js.map +1 -1
- package/daemon/dist/domain/progress/progress-indexer.d.ts +73 -0
- package/daemon/dist/domain/progress/progress-indexer.d.ts.map +1 -0
- package/daemon/dist/domain/progress/progress-indexer.js +210 -0
- package/daemon/dist/domain/progress/progress-indexer.js.map +1 -0
- package/daemon/dist/domain/project-classifier.d.ts +1 -1
- package/daemon/dist/domain/projection-planner.d.ts +7 -1
- package/daemon/dist/domain/projection-planner.d.ts.map +1 -1
- package/daemon/dist/domain/projection-planner.js +44 -4
- package/daemon/dist/domain/projection-planner.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +30 -5
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +94 -27
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/rehydrate-eligibility.d.ts +16 -0
- package/daemon/dist/domain/rehydrate-eligibility.d.ts.map +1 -0
- package/daemon/dist/domain/rehydrate-eligibility.js +43 -0
- package/daemon/dist/domain/rehydrate-eligibility.js.map +1 -0
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js +19 -6
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +4 -2
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/rig-repository.d.ts +14 -0
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +41 -0
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +5 -0
- package/daemon/dist/domain/rig-teardown.js.map +1 -1
- package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-codec.js +15 -0
- package/daemon/dist/domain/rigspec-codec.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +29 -0
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +136 -4
- 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 +157 -4
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +11 -0
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-adapter.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +33 -0
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/skill-discovery.d.ts +51 -0
- package/daemon/dist/domain/skill-discovery.d.ts.map +1 -0
- package/daemon/dist/domain/skill-discovery.js +144 -0
- package/daemon/dist/domain/skill-discovery.js.map +1 -0
- package/daemon/dist/domain/skill-library-discovery.d.ts +68 -0
- package/daemon/dist/domain/skill-library-discovery.d.ts.map +1 -0
- package/daemon/dist/domain/skill-library-discovery.js +144 -0
- package/daemon/dist/domain/skill-library-discovery.js.map +1 -0
- package/daemon/dist/domain/slices/slice-detail-projector.d.ts +182 -0
- package/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -0
- package/daemon/dist/domain/slices/slice-detail-projector.js +508 -0
- package/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -0
- package/daemon/dist/domain/slices/slice-indexer.d.ts +137 -0
- package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -0
- package/daemon/dist/domain/slices/slice-indexer.js +585 -0
- package/daemon/dist/domain/slices/slice-indexer.js.map +1 -0
- package/daemon/dist/domain/spec-library-service.d.ts +23 -2
- package/daemon/dist/domain/spec-library-service.d.ts.map +1 -1
- package/daemon/dist/domain/spec-library-service.js +31 -1
- package/daemon/dist/domain/spec-library-service.js.map +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.d.ts +124 -0
- package/daemon/dist/domain/spec-library-workflow-scanner.d.ts.map +1 -0
- package/daemon/dist/domain/spec-library-workflow-scanner.js +325 -0
- package/daemon/dist/domain/spec-library-workflow-scanner.js.map +1 -0
- package/daemon/dist/domain/spec-review-service.d.ts +1 -1
- package/daemon/dist/domain/spec-review-service.d.ts.map +1 -1
- package/daemon/dist/domain/spec-review-service.js +14 -1
- package/daemon/dist/domain/spec-review-service.js.map +1 -1
- package/daemon/dist/domain/startup-validation.d.ts.map +1 -1
- package/daemon/dist/domain/startup-validation.js +57 -11
- package/daemon/dist/domain/startup-validation.js.map +1 -1
- package/daemon/dist/domain/steering/health-summary.d.ts +39 -0
- package/daemon/dist/domain/steering/health-summary.d.ts.map +1 -0
- package/daemon/dist/domain/steering/health-summary.js +100 -0
- package/daemon/dist/domain/steering/health-summary.js.map +1 -0
- package/daemon/dist/domain/steering/steering-composer.d.ts +102 -0
- package/daemon/dist/domain/steering/steering-composer.d.ts.map +1 -0
- package/daemon/dist/domain/steering/steering-composer.js +263 -0
- package/daemon/dist/domain/steering/steering-composer.js.map +1 -0
- package/daemon/dist/domain/transcript-capture.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-capture.js +7 -4
- package/daemon/dist/domain/transcript-capture.js.map +1 -1
- package/daemon/dist/domain/transcript-rotation.d.ts +29 -0
- package/daemon/dist/domain/transcript-rotation.d.ts.map +1 -0
- package/daemon/dist/domain/transcript-rotation.js +109 -0
- package/daemon/dist/domain/transcript-rotation.js.map +1 -0
- package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-store.js +7 -1
- package/daemon/dist/domain/transcript-store.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +128 -9
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js +8 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts +66 -0
- package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -0
- package/daemon/dist/domain/user-settings/settings-store.js +546 -0
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -0
- package/daemon/dist/domain/view-event-bridge.d.ts.map +1 -1
- package/daemon/dist/domain/view-event-bridge.js +2 -3
- package/daemon/dist/domain/view-event-bridge.js.map +1 -1
- package/daemon/dist/domain/whoami-service.d.ts +29 -0
- package/daemon/dist/domain/whoami-service.d.ts.map +1 -1
- package/daemon/dist/domain/whoami-service.js +68 -0
- package/daemon/dist/domain/whoami-service.js.map +1 -1
- package/daemon/dist/domain/workflow/slice-workflow-binding.d.ts +21 -0
- package/daemon/dist/domain/workflow/slice-workflow-binding.d.ts.map +1 -0
- package/daemon/dist/domain/workflow/slice-workflow-binding.js +103 -0
- package/daemon/dist/domain/workflow/slice-workflow-binding.js.map +1 -0
- package/daemon/dist/domain/workflow/slice-workflow-projection.d.ts +81 -0
- package/daemon/dist/domain/workflow/slice-workflow-projection.d.ts.map +1 -0
- package/daemon/dist/domain/workflow/slice-workflow-projection.js +127 -0
- package/daemon/dist/domain/workflow/slice-workflow-projection.js.map +1 -0
- package/daemon/dist/domain/workflow/starter-spec-loader.d.ts +51 -0
- package/daemon/dist/domain/workflow/starter-spec-loader.d.ts.map +1 -0
- package/daemon/dist/domain/workflow/starter-spec-loader.js +140 -0
- package/daemon/dist/domain/workflow/starter-spec-loader.js.map +1 -0
- package/daemon/dist/domain/workflow-projector.js +11 -3
- package/daemon/dist/domain/workflow-projector.js.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.d.ts +34 -0
- package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.js +121 -15
- package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
- package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts +6 -0
- package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts.map +1 -0
- package/daemon/dist/domain/workspace/default-workspace-scaffold.js +252 -0
- package/daemon/dist/domain/workspace/default-workspace-scaffold.js.map +1 -0
- package/daemon/dist/domain/workspace/frontmatter-validator.d.ts +40 -0
- package/daemon/dist/domain/workspace/frontmatter-validator.d.ts.map +1 -0
- package/daemon/dist/domain/workspace/frontmatter-validator.js +185 -0
- package/daemon/dist/domain/workspace/frontmatter-validator.js.map +1 -0
- package/daemon/dist/domain/workspace/getting-started-narrative.d.ts +15 -0
- package/daemon/dist/domain/workspace/getting-started-narrative.d.ts.map +1 -0
- package/daemon/dist/domain/workspace/getting-started-narrative.js +237 -0
- package/daemon/dist/domain/workspace/getting-started-narrative.js.map +1 -0
- package/daemon/dist/domain/workspace/workspace-resolver.d.ts +25 -0
- package/daemon/dist/domain/workspace/workspace-resolver.d.ts.map +1 -0
- package/daemon/dist/domain/workspace/workspace-resolver.js +86 -0
- package/daemon/dist/domain/workspace/workspace-resolver.js.map +1 -0
- package/daemon/dist/index.d.ts +2 -1
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +56 -12
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/lib/pane-envelope.d.ts +7 -0
- package/daemon/dist/lib/pane-envelope.d.ts.map +1 -0
- package/daemon/dist/lib/pane-envelope.js +38 -0
- package/daemon/dist/lib/pane-envelope.js.map +1 -0
- package/daemon/dist/middleware/auth-bearer-token.d.ts +91 -0
- package/daemon/dist/middleware/auth-bearer-token.d.ts.map +1 -0
- package/daemon/dist/middleware/auth-bearer-token.js +236 -0
- package/daemon/dist/middleware/auth-bearer-token.js.map +1 -0
- package/daemon/dist/openrig-compat.d.ts +1 -1
- package/daemon/dist/openrig-compat.d.ts.map +1 -1
- package/daemon/dist/openrig-compat.js +6 -4
- package/daemon/dist/openrig-compat.js.map +1 -1
- package/daemon/dist/routes/agent-images.d.ts +8 -0
- package/daemon/dist/routes/agent-images.d.ts.map +1 -0
- package/daemon/dist/routes/agent-images.js +253 -0
- package/daemon/dist/routes/agent-images.js.map +1 -0
- package/daemon/dist/routes/config.d.ts +3 -0
- package/daemon/dist/routes/config.d.ts.map +1 -0
- package/daemon/dist/routes/config.js +109 -0
- package/daemon/dist/routes/config.js.map +1 -0
- package/daemon/dist/routes/context-packs.d.ts +3 -0
- package/daemon/dist/routes/context-packs.d.ts.map +1 -0
- package/daemon/dist/routes/context-packs.js +129 -0
- package/daemon/dist/routes/context-packs.js.map +1 -0
- package/daemon/dist/routes/files.d.ts +17 -0
- package/daemon/dist/routes/files.d.ts.map +1 -0
- package/daemon/dist/routes/files.js +262 -0
- package/daemon/dist/routes/files.js.map +1 -0
- package/daemon/dist/routes/health-summary.d.ts +9 -0
- package/daemon/dist/routes/health-summary.d.ts.map +1 -0
- package/daemon/dist/routes/health-summary.js +33 -0
- package/daemon/dist/routes/health-summary.js.map +1 -0
- package/daemon/dist/routes/kernel-status.d.ts +3 -0
- package/daemon/dist/routes/kernel-status.d.ts.map +1 -0
- package/daemon/dist/routes/kernel-status.js +40 -0
- package/daemon/dist/routes/kernel-status.js.map +1 -0
- package/daemon/dist/routes/mission-control.d.ts +37 -0
- package/daemon/dist/routes/mission-control.d.ts.map +1 -0
- package/daemon/dist/routes/mission-control.js +306 -0
- package/daemon/dist/routes/mission-control.js.map +1 -0
- package/daemon/dist/routes/missions.d.ts +3 -0
- package/daemon/dist/routes/missions.d.ts.map +1 -0
- package/daemon/dist/routes/missions.js +195 -0
- package/daemon/dist/routes/missions.js.map +1 -0
- package/daemon/dist/routes/plugins.d.ts +3 -0
- package/daemon/dist/routes/plugins.d.ts.map +1 -0
- package/daemon/dist/routes/plugins.js +223 -0
- package/daemon/dist/routes/plugins.js.map +1 -0
- package/daemon/dist/routes/progress.d.ts +7 -0
- package/daemon/dist/routes/progress.d.ts.map +1 -0
- package/daemon/dist/routes/progress.js +33 -0
- package/daemon/dist/routes/progress.js.map +1 -0
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +52 -1
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/rig-cmux.d.ts +3 -0
- package/daemon/dist/routes/rig-cmux.d.ts.map +1 -0
- package/daemon/dist/routes/rig-cmux.js +121 -0
- package/daemon/dist/routes/rig-cmux.js.map +1 -0
- package/daemon/dist/routes/rigs.d.ts +3 -0
- package/daemon/dist/routes/rigs.d.ts.map +1 -1
- package/daemon/dist/routes/rigs.js +73 -7
- package/daemon/dist/routes/rigs.js.map +1 -1
- package/daemon/dist/routes/rigspec.js +6 -3
- package/daemon/dist/routes/rigspec.js.map +1 -1
- package/daemon/dist/routes/sessions.d.ts.map +1 -1
- package/daemon/dist/routes/sessions.js +119 -0
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/skills.d.ts +3 -0
- package/daemon/dist/routes/skills.d.ts.map +1 -0
- package/daemon/dist/routes/skills.js +147 -0
- package/daemon/dist/routes/skills.js.map +1 -0
- package/daemon/dist/routes/slices.d.ts +9 -0
- package/daemon/dist/routes/slices.d.ts.map +1 -0
- package/daemon/dist/routes/slices.js +207 -0
- package/daemon/dist/routes/slices.js.map +1 -0
- package/daemon/dist/routes/spec-library.d.ts.map +1 -1
- package/daemon/dist/routes/spec-library.js +87 -5
- package/daemon/dist/routes/spec-library.js.map +1 -1
- package/daemon/dist/routes/steering.d.ts +7 -0
- package/daemon/dist/routes/steering.d.ts.map +1 -0
- package/daemon/dist/routes/steering.js +27 -0
- package/daemon/dist/routes/steering.js.map +1 -0
- package/daemon/dist/routes/up.d.ts.map +1 -1
- package/daemon/dist/routes/up.js +21 -3
- package/daemon/dist/routes/up.js.map +1 -1
- package/daemon/dist/routes/whoami.d.ts.map +1 -1
- package/daemon/dist/routes/whoami.js +6 -1
- package/daemon/dist/routes/whoami.js.map +1 -1
- package/daemon/dist/routes/workflow.d.ts.map +1 -1
- package/daemon/dist/routes/workflow.js +43 -0
- package/daemon/dist/routes/workflow.js.map +1 -1
- package/daemon/dist/routes/workspace.d.ts +3 -0
- package/daemon/dist/routes/workspace.d.ts.map +1 -0
- package/daemon/dist/routes/workspace.js +53 -0
- package/daemon/dist/routes/workspace.js.map +1 -0
- package/daemon/dist/server.d.ts +82 -0
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +82 -1
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/startup.d.ts +9 -0
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +577 -5
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/docs/reference/agent-spec.md +7 -7
- package/daemon/docs/reference/agent-startup-guide.md +2 -2
- package/daemon/docs/reference/project-workspace.md +102 -0
- package/daemon/specs/agents/apps/vault-specialist/agent.yaml +1 -2
- package/daemon/specs/agents/apps/vault-specialist/guidance/role.md +0 -1
- package/daemon/specs/agents/conveyor/builder/agent.yaml +34 -0
- package/daemon/specs/agents/conveyor/builder/guidance/role.md +31 -0
- package/daemon/specs/agents/conveyor/builder/startup/context.md +9 -0
- package/daemon/specs/agents/conveyor/lead/agent.yaml +34 -0
- package/daemon/specs/agents/conveyor/lead/guidance/role.md +34 -0
- package/daemon/specs/agents/conveyor/lead/startup/context.md +15 -0
- package/daemon/specs/agents/conveyor/planner/agent.yaml +34 -0
- package/daemon/specs/agents/conveyor/planner/guidance/role.md +29 -0
- package/daemon/specs/agents/conveyor/planner/startup/context.md +12 -0
- package/daemon/specs/agents/conveyor/reviewer/agent.yaml +34 -0
- package/daemon/specs/agents/conveyor/reviewer/guidance/role.md +29 -0
- package/daemon/specs/agents/conveyor/reviewer/startup/context.md +10 -0
- package/daemon/specs/agents/design/product-designer/agent.yaml +0 -1
- package/daemon/specs/agents/development/implementer/agent.yaml +1 -2
- package/daemon/specs/agents/development/implementer/guidance/role.md +0 -1
- package/daemon/specs/agents/development/qa/agent.yaml +0 -1
- package/daemon/specs/agents/development/qa/guidance/role.md +0 -2
- package/daemon/specs/agents/orchestration/orchestrator/agent.yaml +1 -2
- package/daemon/specs/agents/orchestration/orchestrator/guidance/role.md +2 -3
- package/daemon/specs/agents/research/analyst/agent.yaml +0 -1
- package/daemon/specs/agents/research/synthesizer/agent.yaml +0 -1
- package/daemon/specs/agents/review/independent-reviewer/agent.yaml +0 -1
- package/daemon/specs/agents/shared/agent.yaml +6 -8
- package/daemon/specs/agents/shared/skills/core/openrig-architect/SKILL.md +361 -0
- package/daemon/specs/agents/shared/skills/core/openrig-installer/SKILL.md +142 -0
- package/daemon/specs/agents/shared/skills/core/openrig-user/SKILL.md +30 -0
- package/daemon/specs/agents/shared/skills/core/openrig-user-settings/SKILL.md +153 -0
- package/daemon/specs/agents/shared/skills/core/rig-lifecycle/SKILL.md +116 -0
- package/daemon/specs/agents/shared/skills/pods/development-team/SKILL.md +0 -1
- package/daemon/specs/agents/shared/skills/pods/orchestration-team/SKILL.md +2 -2
- package/daemon/specs/agents/shared/skills/process/agent-browser/LOCAL-INSIGHTS.md +6 -6
- package/daemon/specs/agents/shared/skills/process/agent-browser/OPENRIG.md +40 -0
- package/daemon/specs/agents/shared/skills/process/agent-browser/SKILL.md +10 -0
- package/daemon/specs/agents/shared/skills/process/brainstorming/OPENRIG.md +48 -0
- package/daemon/specs/agents/shared/skills/process/brainstorming/SKILL.md +11 -0
- package/daemon/specs/agents/shared/skills/process/dogfood/SKILL.md +5 -0
- package/daemon/specs/agents/shared/skills/process/executing-plans/OPENRIG.md +56 -0
- package/daemon/specs/agents/shared/skills/process/executing-plans/SKILL.md +10 -0
- package/daemon/specs/agents/shared/skills/process/frontend-design/SKILL.md +5 -0
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/SKILL.md +5 -0
- package/daemon/specs/agents/shared/skills/process/test-driven-development/SKILL.md +5 -0
- package/daemon/specs/agents/shared/skills/process/using-superpowers/OPENRIG.md +48 -0
- package/daemon/specs/agents/shared/skills/process/using-superpowers/SKILL.md +11 -0
- package/daemon/specs/agents/shared/skills/process/verification-before-completion/SKILL.md +5 -0
- package/daemon/specs/agents/shared/skills/process/writing-plans/OPENRIG.md +52 -0
- package/daemon/specs/agents/shared/skills/process/writing-plans/SKILL.md +12 -2
- package/daemon/specs/rigs/launch/conveyor/CULTURE.md +34 -0
- package/daemon/specs/rigs/launch/conveyor/README.md +33 -0
- package/daemon/specs/rigs/launch/conveyor/rig.yaml +72 -0
- package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/agent.yaml +35 -0
- package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/guidance/role.md +50 -0
- package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/startup/context.md +37 -0
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/agent.yaml +35 -0
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +49 -0
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/startup/context.md +63 -0
- package/daemon/specs/rigs/launch/kernel/agents/queue/worker/agent.yaml +35 -0
- package/daemon/specs/rigs/launch/kernel/agents/queue/worker/guidance/role.md +33 -0
- package/daemon/specs/rigs/launch/kernel/agents/queue/worker/startup/context.md +30 -0
- package/daemon/specs/rigs/launch/kernel/culture/CULTURE.md +69 -0
- package/daemon/specs/rigs/launch/kernel/rig-claude-only.yaml +59 -0
- package/daemon/specs/rigs/launch/kernel/rig-codex-only.yaml +59 -0
- package/daemon/specs/rigs/launch/kernel/rig.yaml +69 -0
- package/daemon/specs/rigs/preview/product-team/CULTURE.md +2 -2
- package/daemon/specs/rigs/preview/product-team/rig.yaml +3 -4
- package/dist/commands/agent-image.d.ts +4 -0
- package/dist/commands/agent-image.d.ts.map +1 -0
- package/dist/commands/agent-image.js +352 -0
- package/dist/commands/agent-image.js.map +1 -0
- package/dist/commands/config-init-workspace.d.ts +35 -0
- package/dist/commands/config-init-workspace.d.ts.map +1 -0
- package/dist/commands/config-init-workspace.js +553 -0
- package/dist/commands/config-init-workspace.js.map +1 -0
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +86 -18
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/context-pack.d.ts +4 -0
- package/dist/commands/context-pack.d.ts.map +1 -0
- package/dist/commands/context-pack.js +357 -0
- package/dist/commands/context-pack.js.map +1 -0
- package/dist/commands/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +61 -1
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/heartbeat.d.ts.map +1 -1
- package/dist/commands/heartbeat.js +0 -5
- package/dist/commands/heartbeat.js.map +1 -1
- package/dist/commands/import.d.ts.map +1 -1
- package/dist/commands/import.js +7 -2
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/plugin.d.ts +4 -0
- package/dist/commands/plugin.d.ts.map +1 -0
- package/dist/commands/plugin.js +395 -0
- package/dist/commands/plugin.js.map +1 -0
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +173 -14
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +9 -0
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/send.d.ts +15 -0
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +32 -1
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/specs.d.ts +4 -2
- package/dist/commands/specs.d.ts.map +1 -1
- package/dist/commands/specs.js +12 -8
- package/dist/commands/specs.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +30 -4
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +9 -4
- package/dist/commands/whoami.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +37 -0
- package/dist/commands/workflow.js.map +1 -1
- package/dist/commands/workspace.d.ts +6 -0
- package/dist/commands/workspace.d.ts.map +1 -0
- package/dist/commands/workspace.js +83 -0
- package/dist/commands/workspace.js.map +1 -0
- package/dist/config-store.d.ts +90 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +477 -42
- package/dist/config-store.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts +42 -1
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +98 -7
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/host-registry.d.ts +1 -1
- package/dist/host-registry.js +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/openrig-compat.d.ts +1 -1
- package/dist/openrig-compat.d.ts.map +1 -1
- package/dist/openrig-compat.js +6 -4
- package/dist/openrig-compat.js.map +1 -1
- package/dist/restore-packet/claude-transcript-parser.js +1 -1
- package/dist/restore-packet/claude-transcript-parser.js.map +1 -1
- package/dist/restore-packet/codex-jsonl-parser.js +1 -1
- package/dist/restore-packet/codex-jsonl-parser.js.map +1 -1
- package/package.json +2 -2
- package/ui/dist/assets/index-C_Q5FczU.css +1 -0
- package/ui/dist/assets/index-Rl3ZBrUg.js +547 -0
- package/ui/dist/graphics/operator-climber-monochrome.png +0 -0
- package/ui/dist/index.html +3 -2
- package/daemon/specs/agents/shared/skills/claude-compact-in-place/SKILL.md +0 -100
- package/daemon/specs/agents/shared/skills/mental-model-ha/SKILL.md +0 -956
- package/daemon/specs/agents/shared/skills/process/containerized-e2e/SKILL.md +0 -256
- package/daemon/specs/agents/shared/skills/process/containerized-e2e/scripts/Dockerfile +0 -39
- package/daemon/specs/agents/shared/skills/process/containerized-e2e/scripts/build-e2e-image.sh +0 -37
- package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/control-plane-test.yaml +0 -40
- package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/e2e-report-template.md +0 -94
- package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/expansion-collision-fragment.yaml +0 -13
- package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/expansion-pod-fragment.yaml +0 -14
- package/ui/dist/assets/index-B09doO8H.js +0 -139
- package/ui/dist/assets/index-Dec25siz.css +0 -1
- package/ui/dist/assets/index-GNYaWmBj.js +0 -225
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
// V0.3.1 slice 21 onboarding-conveyor.
|
|
2
|
+
//
|
|
3
|
+
// Narrative tab content for the getting-started mission's two slices.
|
|
4
|
+
// The scaffold writes these as README.md / timeline.md / PROGRESS.md
|
|
5
|
+
// inside each slice folder so a new operator's fresh install ships
|
|
6
|
+
// with a click-through-to-learn experience: opening each tab teaches
|
|
7
|
+
// both (a) what a conveyor run is and (b) what each Project tab does.
|
|
8
|
+
//
|
|
9
|
+
// PARITY CONTRACT with CLI:
|
|
10
|
+
// `packages/cli/src/commands/config-init-workspace.ts` duplicates the
|
|
11
|
+
// same narrative inline because cli + daemon don't cross-import today.
|
|
12
|
+
// `packages/daemon/test/getting-started-narrative-parity.test.ts`
|
|
13
|
+
// asserts byte-identical content with the CLI counterpart so drift
|
|
14
|
+
// fails CI. If you update this content, update the CLI mirror in
|
|
15
|
+
// lockstep.
|
|
16
|
+
//
|
|
17
|
+
// Content authored from the slice 21 onboarding-conveyor IMPLEMENTATION-PRD (Appendix A) in the substrate openrig-work tree.
|
|
18
|
+
export const FIRST_CONVEYOR_RUN_README = `# First Conveyor Run
|
|
19
|
+
|
|
20
|
+
Welcome to OpenRig. This is the first slice in your getting-started mission. It exists to teach you what a **conveyor run** is + how OpenRig moves work through a multi-agent topology.
|
|
21
|
+
|
|
22
|
+
## What a conveyor run is
|
|
23
|
+
|
|
24
|
+
A **conveyor** is OpenRig's central work-movement primitive. One conveyor run = one complete flow of work through your topology:
|
|
25
|
+
|
|
26
|
+
1. **Slice declared** — operator (you) or an agent declares a slice with intent + acceptance criteria
|
|
27
|
+
2. **Work routed** — orchestrator picks the slice up + routes it to the right agent
|
|
28
|
+
3. **Agents collaborate** — work moves agent-to-agent via durable handoffs (queue items)
|
|
29
|
+
4. **Evidence accumulates** — each step leaves a trail: commits, files, proof packets, screenshots
|
|
30
|
+
5. **Slice closes** — acceptance criteria met; orchestrator routes the result back
|
|
31
|
+
|
|
32
|
+
You're looking at a mocked conveyor run RIGHT NOW. The other tabs (Story / Progress / Artifacts / Tests / Queue / Topology) each show a different slice of this same run.
|
|
33
|
+
|
|
34
|
+
## Walking the tabs
|
|
35
|
+
|
|
36
|
+
- **Overview** (you're here) — read what a slice intends + how to use the rest of the tabs
|
|
37
|
+
- **Story** — narrative timeline of what happened, beat by beat
|
|
38
|
+
- **Progress** — acceptance checklist; what's done, what's pending
|
|
39
|
+
- **Artifacts** — files produced, commits, proof packets — the durable evidence trail
|
|
40
|
+
- **Tests** — pass/fail summaries + screenshots + verification proof
|
|
41
|
+
- **Queue** — operational qitems showing how work moved between agents
|
|
42
|
+
- **Topology** — the rig graph; which agents touched this slice + which edges fired
|
|
43
|
+
|
|
44
|
+
## Click through
|
|
45
|
+
|
|
46
|
+
Try them in order. Each tab teaches itself.
|
|
47
|
+
`;
|
|
48
|
+
export const FIRST_CONVEYOR_RUN_TIMELINE = `# Story — First Conveyor Run
|
|
49
|
+
|
|
50
|
+
## 2026-04-15 09:00 — Slice declared
|
|
51
|
+
|
|
52
|
+
Operator request: "Build a CLI tool that lints todo lists." Slice declared in \`getting-started/slices/first-conveyor-run/\`. Acceptance: \`tdl lint <file>\` exits non-zero on malformed entries.
|
|
53
|
+
|
|
54
|
+
## 09:02 — Orchestrator routes
|
|
55
|
+
|
|
56
|
+
\`orch-lead@getting-started\` picks up the slice. Routes to \`driver@getting-started\` via \`rig queue handoff\`. Driver receives nudge; opens IMPL-PRD; reads acceptance.
|
|
57
|
+
|
|
58
|
+
## 09:05 — Driver picks up
|
|
59
|
+
|
|
60
|
+
Driver claims qitem. Reads slice scope. Surveys existing tdl repo (this is a worked example — imagine the repo is real). Plans: parse YAML; validate entries; exit code per finding.
|
|
61
|
+
|
|
62
|
+
## 09:30 — First commit
|
|
63
|
+
|
|
64
|
+
\`feat(lint): parse + validate todo entries\` — driver commits 4 files. Stream event emitted; visible in Artifacts tab.
|
|
65
|
+
|
|
66
|
+
## 10:15 — Driver hands to reviewer
|
|
67
|
+
|
|
68
|
+
Acceptance met locally. Driver hands off to \`reviewer@getting-started\`. Reviewer opens diff; reads tests.
|
|
69
|
+
|
|
70
|
+
## 10:25 — Reviewer flags concern
|
|
71
|
+
|
|
72
|
+
"Edge case: what about UTF-8 entries with combining characters?" Hands back to driver as \`concerning\`.
|
|
73
|
+
|
|
74
|
+
## 10:40 — Driver addresses
|
|
75
|
+
|
|
76
|
+
Driver fixes UTF-8 handling. Re-runs tests; all pass. Hands back.
|
|
77
|
+
|
|
78
|
+
## 11:00 — Reviewer accepts
|
|
79
|
+
|
|
80
|
+
\`accept\` decision; closes qitem with \`closure-reason: handed_off_to orch-lead\`. Conveyor proceeds.
|
|
81
|
+
|
|
82
|
+
## 11:05 — Slice ships
|
|
83
|
+
|
|
84
|
+
Orchestrator merges. Proof packet generated. Slice marked SHIPPED.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
**What you just read**: one conveyor run from declaration to ship. ~2 hours wall-clock; 3 agents involved; 1 handoff with concern + remediation; 5 stream events; 1 proof packet.
|
|
89
|
+
|
|
90
|
+
The Story tab shows this kind of narrative for any real slice. Driver-authored \`timeline.md\` files live in each slice folder; this is yours to read + your operator's to update as work moves.
|
|
91
|
+
`;
|
|
92
|
+
export const FIRST_CONVEYOR_RUN_PROGRESS = `---
|
|
93
|
+
title: First Conveyor Run Progress
|
|
94
|
+
status: active
|
|
95
|
+
mission: getting-started
|
|
96
|
+
rail-item: getting-started
|
|
97
|
+
slice: first-conveyor-run
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
# Progress — First Conveyor Run
|
|
101
|
+
|
|
102
|
+
## Acceptance criteria
|
|
103
|
+
|
|
104
|
+
- [x] Parse YAML todo entries
|
|
105
|
+
- [x] Validate per-entry shape (id, title, status, due-date)
|
|
106
|
+
- [x] Exit non-zero on malformed entries
|
|
107
|
+
- [x] Handle UTF-8 entries with combining characters
|
|
108
|
+
- [x] Tests pass (12/12)
|
|
109
|
+
- [x] Reviewer accepts
|
|
110
|
+
- [x] Slice merged
|
|
111
|
+
|
|
112
|
+
## Status: SHIPPED
|
|
113
|
+
|
|
114
|
+
This was a mocked conveyor run — no real code was produced. But the Progress tab works the same way for real work: as acceptance criteria are met, boxes get checked; the operator can scan at a glance whether the slice is on track.
|
|
115
|
+
|
|
116
|
+
## How the Progress tab works
|
|
117
|
+
|
|
118
|
+
The tab renders the slice's \`PROGRESS.md\` markdown file. Driver updates it as work progresses. Operator scans it during walks. Founder reviews at slice closure.
|
|
119
|
+
|
|
120
|
+
Try writing one for a real slice you start. It's just markdown; live updates appear here.
|
|
121
|
+
`;
|
|
122
|
+
export const INSPECT_PROJECT_EVIDENCE_README = `# Inspect Project Evidence
|
|
123
|
+
|
|
124
|
+
The previous slice (First Conveyor Run) showed you what a conveyor run looks like as it happens. This slice teaches you how to inspect the evidence after a run completes.
|
|
125
|
+
|
|
126
|
+
## Why inspect evidence?
|
|
127
|
+
|
|
128
|
+
In OpenRig, agents work autonomously. The operator (you) doesn't watch every keystroke. Instead, the operator:
|
|
129
|
+
|
|
130
|
+
1. Declares slices with clear acceptance
|
|
131
|
+
2. Routes them to agents
|
|
132
|
+
3. Inspects evidence when slices close
|
|
133
|
+
|
|
134
|
+
The Artifacts + Tests + Queue + Topology tabs are your inspection surface. They show you what happened, with enough detail to:
|
|
135
|
+
|
|
136
|
+
- Verify the acceptance was actually met
|
|
137
|
+
- Spot subtle issues a passing test might miss
|
|
138
|
+
- Build trust in the agents over time
|
|
139
|
+
|
|
140
|
+
## Walking the tabs
|
|
141
|
+
|
|
142
|
+
- **Overview** — you're here; learn what to look for
|
|
143
|
+
- **Story** — read the narrative of what happened (high-level)
|
|
144
|
+
- **Progress** — acceptance status at a glance
|
|
145
|
+
- **Artifacts** — the durable evidence: files, commits, proof packets. **THIS IS THE TAB YOU LEARN MOST FROM.**
|
|
146
|
+
- **Tests** — pass/fail + screenshots + verification proof
|
|
147
|
+
- **Queue** — who handed what to whom (audit trail of decisions)
|
|
148
|
+
- **Topology** — which agents touched this; which edges fired
|
|
149
|
+
|
|
150
|
+
## Key inspection skills
|
|
151
|
+
|
|
152
|
+
When walking a finished slice:
|
|
153
|
+
|
|
154
|
+
1. **Read the Story** for context — what was the operator trying to do?
|
|
155
|
+
2. **Check Progress** — did acceptance actually pass? Any TODO boxes?
|
|
156
|
+
3. **Open Artifacts → Files** — sample-read 2-3 files; does the code match what the Story claimed?
|
|
157
|
+
4. **Open Tests → Proof packets** — do screenshots actually show what was claimed?
|
|
158
|
+
5. **Read Queue** — were there concerning decisions? Hand-offs to escalation?
|
|
159
|
+
6. **Skim Topology** — were unexpected agents involved?
|
|
160
|
+
|
|
161
|
+
Trust comes from repeated successful inspections, not from a single proof packet.
|
|
162
|
+
`;
|
|
163
|
+
export const INSPECT_PROJECT_EVIDENCE_TIMELINE = `# Story — Inspect Project Evidence
|
|
164
|
+
|
|
165
|
+
This slice mirrors the previous one (First Conveyor Run). The same agents shipped the same work. But this view is from the inspector's angle, not the runner's.
|
|
166
|
+
|
|
167
|
+
## 11:10 — Operator opens project
|
|
168
|
+
|
|
169
|
+
Operator (you, in the real world) opens \`/project/slice/first-conveyor-run\` after the slice ships. First read: the Progress tab. All boxes checked.
|
|
170
|
+
|
|
171
|
+
## 11:12 — Read Story
|
|
172
|
+
|
|
173
|
+
Operator reads the Story narrative. Notices the reviewer's UTF-8 concern + driver's remediation. Confidence-building: there was friction, friction was caught, friction was addressed.
|
|
174
|
+
|
|
175
|
+
## 11:15 — Open Artifacts
|
|
176
|
+
|
|
177
|
+
Operator clicks Artifacts. Sees 4 commits, 5 files, 1 proof packet, 2 screenshots. Opens commit \`feat(lint): parse + validate todo entries\`. Reads the diff.
|
|
178
|
+
|
|
179
|
+
## 11:18 — Read tests
|
|
180
|
+
|
|
181
|
+
Operator opens Tests tab. 12/12 passing. Opens the proof packet — screenshot shows CLI output \`Error: malformed entry at line 3\`. Visually verifies the acceptance was met.
|
|
182
|
+
|
|
183
|
+
## 11:22 — Skim Queue
|
|
184
|
+
|
|
185
|
+
Operator scrolls Queue. 4 qitems in chronological order. Sees the \`concerning\` decision + subsequent \`accept\`. Confidence reinforced.
|
|
186
|
+
|
|
187
|
+
## 11:25 — Mark complete
|
|
188
|
+
|
|
189
|
+
Operator marks slice acceptance complete. Closes the inspection.
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
**What you just read**: a clean inspection in ~15 minutes. Operator builds trust through the evidence trail. This is the OpenRig usage pattern at scale: declare → route → inspect.
|
|
194
|
+
`;
|
|
195
|
+
export const INSPECT_PROJECT_EVIDENCE_PROGRESS = `---
|
|
196
|
+
title: Inspect Project Evidence Progress
|
|
197
|
+
status: active
|
|
198
|
+
mission: getting-started
|
|
199
|
+
rail-item: getting-started
|
|
200
|
+
slice: inspect-project-evidence
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
# Progress — Inspect Project Evidence
|
|
204
|
+
|
|
205
|
+
## Inspection checklist
|
|
206
|
+
|
|
207
|
+
- [x] Read Story (context: what was being done)
|
|
208
|
+
- [x] Check Progress (acceptance status)
|
|
209
|
+
- [x] Sample-read Artifacts files
|
|
210
|
+
- [x] Verify Tests proof packets visually
|
|
211
|
+
- [x] Skim Queue for concerning decisions
|
|
212
|
+
- [x] Skim Topology for unexpected agents
|
|
213
|
+
|
|
214
|
+
## Status: COMPLETE
|
|
215
|
+
|
|
216
|
+
This was a mocked inspection — a worked example of the inspection workflow.
|
|
217
|
+
|
|
218
|
+
## How to apply this
|
|
219
|
+
|
|
220
|
+
For any real slice that ships in YOUR project: open the slice page, walk the tabs in this order, check each box mentally. Over time you'll develop instincts for what passes the smell test vs what needs deeper investigation.
|
|
221
|
+
`;
|
|
222
|
+
/** Slice id → narrative content map. Scaffold callers use this to
|
|
223
|
+
* override the boilerplate sliceReadme / sliceProgress for the two
|
|
224
|
+
* getting-started slices. Other slices keep the boilerplate. */
|
|
225
|
+
export const GETTING_STARTED_NARRATIVE = {
|
|
226
|
+
"first-conveyor-run": {
|
|
227
|
+
readme: FIRST_CONVEYOR_RUN_README,
|
|
228
|
+
timeline: FIRST_CONVEYOR_RUN_TIMELINE,
|
|
229
|
+
progress: FIRST_CONVEYOR_RUN_PROGRESS,
|
|
230
|
+
},
|
|
231
|
+
"inspect-project-evidence": {
|
|
232
|
+
readme: INSPECT_PROJECT_EVIDENCE_README,
|
|
233
|
+
timeline: INSPECT_PROJECT_EVIDENCE_TIMELINE,
|
|
234
|
+
progress: INSPECT_PROJECT_EVIDENCE_PROGRESS,
|
|
235
|
+
},
|
|
236
|
+
};
|
|
237
|
+
//# sourceMappingURL=getting-started-narrative.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getting-started-narrative.js","sourceRoot":"","sources":["../../../src/domain/workspace/getting-started-narrative.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,EAAE;AACF,sEAAsE;AACtE,qEAAqE;AACrE,mEAAmE;AACnE,qEAAqE;AACrE,sEAAsE;AACtE,EAAE;AACF,4BAA4B;AAC5B,sEAAsE;AACtE,uEAAuE;AACvE,kEAAkE;AAClE,mEAAmE;AACnE,iEAAiE;AACjE,YAAY;AACZ,EAAE;AACF,6HAA6H;AAE7H,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BxC,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2C1C,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6B1C,CAAC;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwC9C,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BhD,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BhD,CAAC;AAEF;;iEAEiE;AACjE,MAAM,CAAC,MAAM,yBAAyB,GAGlC;IACF,oBAAoB,EAAE;QACpB,MAAM,EAAE,yBAAyB;QACjC,QAAQ,EAAE,2BAA2B;QACrC,QAAQ,EAAE,2BAA2B;KACtC;IACD,0BAA0B,EAAE;QAC1B,MAAM,EAAE,+BAA+B;QACvC,QAAQ,EAAE,iCAAiC;QAC3C,QAAQ,EAAE,iCAAiC;KAC5C;CACF,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { WorkspaceSpec, WorkspaceKind, NodeWorkspaceInfo } from "../types.js";
|
|
2
|
+
export interface WhoamiWorkspaceBlock {
|
|
3
|
+
workspaceRoot: string;
|
|
4
|
+
activeRepo: string | null;
|
|
5
|
+
repos: Array<{
|
|
6
|
+
name: string;
|
|
7
|
+
path: string;
|
|
8
|
+
kind: WorkspaceKind;
|
|
9
|
+
}>;
|
|
10
|
+
knowledgeRoot: string | null;
|
|
11
|
+
knowledgeKind: WorkspaceKind | null;
|
|
12
|
+
}
|
|
13
|
+
export declare function resolveWorkspaceContext(opts: {
|
|
14
|
+
spec: WorkspaceSpec | null;
|
|
15
|
+
cwd: string | null;
|
|
16
|
+
envOverride: string | null;
|
|
17
|
+
}): WhoamiWorkspaceBlock | null;
|
|
18
|
+
/** PL-007 — per-node workspace summary derived from a node's cwd against
|
|
19
|
+
* the rig's WorkspaceSpec. Used by NodeInventory. Returns null when the
|
|
20
|
+
* rig has no workspace declaration. */
|
|
21
|
+
export declare function resolveNodeWorkspace(opts: {
|
|
22
|
+
spec: WorkspaceSpec | null;
|
|
23
|
+
cwd: string | null;
|
|
24
|
+
}): NodeWorkspaceInfo | null;
|
|
25
|
+
//# sourceMappingURL=workspace-resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-resolver.d.ts","sourceRoot":"","sources":["../../../src/domain/workspace/workspace-resolver.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEnF,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,aAAa,CAAA;KAAE,CAAC,CAAC;IAClE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;CACrC;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE;IAC5C,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC;IAC3B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,GAAG,oBAAoB,GAAG,IAAI,CAsB9B;AAED;;wCAEwC;AACxC,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACzC,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC;IAC3B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACpB,GAAG,iBAAiB,GAAG,IAAI,CAmC3B"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// PL-007 Workspace Primitive v0 — runtime resolution of typed workspace
|
|
2
|
+
// context for whoami / node-inventory consumers.
|
|
3
|
+
//
|
|
4
|
+
// Given a persisted RigSpec.workspace block + a node's cwd + an optional
|
|
5
|
+
// per-session env override, derive:
|
|
6
|
+
// - workspaceRoot — verbatim from the spec
|
|
7
|
+
// - activeRepo — env override, else default_repo, else null
|
|
8
|
+
// - repos — typed list (name, path, kind)
|
|
9
|
+
// - knowledgeRoot, knowledgeKind — verbatim when declared
|
|
10
|
+
//
|
|
11
|
+
// Per-node kind resolution (used by node-inventory) walks the cwd up the
|
|
12
|
+
// directory tree looking for the longest containing repo path; falls back
|
|
13
|
+
// to "knowledge" when cwd is under knowledgeRoot, else null.
|
|
14
|
+
import * as path from "node:path";
|
|
15
|
+
export function resolveWorkspaceContext(opts) {
|
|
16
|
+
const { spec, envOverride } = opts;
|
|
17
|
+
if (!spec)
|
|
18
|
+
return null;
|
|
19
|
+
// env override wins when it names a declared repo; otherwise fall through
|
|
20
|
+
// to default_repo. Unknown override is honored verbatim per PL-007 PRD §
|
|
21
|
+
// Item 3 — operators set OPENRIG_TARGET_REPO consciously.
|
|
22
|
+
const repoNames = new Set(spec.repos.map((r) => r.name));
|
|
23
|
+
let activeRepo = null;
|
|
24
|
+
if (envOverride && envOverride.trim() !== "") {
|
|
25
|
+
activeRepo = envOverride;
|
|
26
|
+
}
|
|
27
|
+
else if (spec.defaultRepo && repoNames.has(spec.defaultRepo)) {
|
|
28
|
+
activeRepo = spec.defaultRepo;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
workspaceRoot: spec.workspaceRoot,
|
|
32
|
+
activeRepo,
|
|
33
|
+
repos: spec.repos.map((r) => ({ name: r.name, path: r.path, kind: r.kind })),
|
|
34
|
+
knowledgeRoot: spec.knowledgeRoot ?? null,
|
|
35
|
+
knowledgeKind: spec.knowledgeRoot ? "knowledge" : null,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/** PL-007 — per-node workspace summary derived from a node's cwd against
|
|
39
|
+
* the rig's WorkspaceSpec. Used by NodeInventory. Returns null when the
|
|
40
|
+
* rig has no workspace declaration. */
|
|
41
|
+
export function resolveNodeWorkspace(opts) {
|
|
42
|
+
const { spec, cwd } = opts;
|
|
43
|
+
if (!spec)
|
|
44
|
+
return null;
|
|
45
|
+
let activeRepo = null;
|
|
46
|
+
let kind = null;
|
|
47
|
+
if (cwd) {
|
|
48
|
+
// Find the longest-prefix repo whose path contains cwd.
|
|
49
|
+
let best = null;
|
|
50
|
+
for (const r of spec.repos) {
|
|
51
|
+
if (isInside(cwd, r.path) && r.path.length > (best?.len ?? -1)) {
|
|
52
|
+
best = { name: r.name, kind: r.kind, len: r.path.length };
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (best) {
|
|
56
|
+
activeRepo = best.name;
|
|
57
|
+
kind = best.kind;
|
|
58
|
+
}
|
|
59
|
+
else if (spec.knowledgeRoot && isInside(cwd, spec.knowledgeRoot)) {
|
|
60
|
+
kind = "knowledge";
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
// Fall back to the rig's default_repo when cwd doesn't resolve.
|
|
64
|
+
if (!activeRepo && spec.defaultRepo) {
|
|
65
|
+
activeRepo = spec.defaultRepo;
|
|
66
|
+
if (!kind) {
|
|
67
|
+
const r = spec.repos.find((x) => x.name === spec.defaultRepo);
|
|
68
|
+
if (r)
|
|
69
|
+
kind = r.kind;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
workspaceRoot: spec.workspaceRoot,
|
|
74
|
+
activeRepo,
|
|
75
|
+
kind,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function isInside(child, parent) {
|
|
79
|
+
const normChild = path.resolve(child);
|
|
80
|
+
const normParent = path.resolve(parent);
|
|
81
|
+
if (normChild === normParent)
|
|
82
|
+
return true;
|
|
83
|
+
const rel = path.relative(normParent, normChild);
|
|
84
|
+
return rel !== "" && !rel.startsWith("..") && !path.isAbsolute(rel);
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=workspace-resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-resolver.js","sourceRoot":"","sources":["../../../src/domain/workspace/workspace-resolver.ts"],"names":[],"mappings":"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"}
|
package/daemon/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAQ3D,wBAAsB,WAAW,CAAC,IAAI,CAAC,EAAE,MAAM,uBAgF9C"}
|
package/daemon/dist/index.js
CHANGED
|
@@ -1,22 +1,56 @@
|
|
|
1
1
|
import { serve } from "@hono/node-server";
|
|
2
2
|
import { readOpenRigEnv } from "./openrig-compat.js";
|
|
3
3
|
import { createDaemon } from "./startup.js";
|
|
4
|
+
import { assertBindAuthInvariant, detectTailscaleInterface, } from "./middleware/auth-bearer-token.js";
|
|
4
5
|
export async function startServer(port) {
|
|
5
6
|
const p = port ?? parseInt(readOpenRigEnv("OPENRIG_PORT", "RIGGED_PORT") ?? "7433", 10);
|
|
6
7
|
const dbPath = readOpenRigEnv("OPENRIG_DB", "RIGGED_DB") ?? "openrig.sqlite";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
// bug-fix slice auth-bearer-tailscale-trust: distinguish "explicit
|
|
9
|
+
// operator opt-in" from "default" by treating an undefined env as
|
|
10
|
+
// default. When explicit, the operator takes responsibility (and the
|
|
11
|
+
// bearer invariant applies to their chosen host). When default, the
|
|
12
|
+
// daemon always binds loopback and ALSO binds the active tailscale
|
|
13
|
+
// interface (if present) — both accepted paths in the invariant.
|
|
14
|
+
const explicitHost = readOpenRigEnv("OPENRIG_HOST", "RIGGED_HOST");
|
|
15
|
+
// PL-005 Phase B: bearer token for Mission Control write verbs.
|
|
16
|
+
// No legacy alias (this env var is new in Phase B).
|
|
17
|
+
const bearerToken = process.env.OPENRIG_AUTH_BEARER_TOKEN ?? null;
|
|
18
|
+
let bindHosts;
|
|
19
|
+
if (explicitHost) {
|
|
20
|
+
// Operator opt-in path — invariant enforces bearer requirement for
|
|
21
|
+
// genuinely public/LAN binds; loopback/tailscale binds short-circuit.
|
|
22
|
+
await assertBindAuthInvariant({ host: explicitHost, bearerToken });
|
|
23
|
+
bindHosts = [explicitHost];
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
// Default path — loopback always, plus tailscale auto-add when active.
|
|
27
|
+
const tailscaleIp = detectTailscaleInterface();
|
|
28
|
+
bindHosts = tailscaleIp ? ["127.0.0.1", tailscaleIp] : ["127.0.0.1"];
|
|
29
|
+
}
|
|
30
|
+
const { app, contextMonitor, deps } = await createDaemon({ dbPath, bearerToken });
|
|
31
|
+
// Multi-bind via N serve() instances sharing the same Hono app.
|
|
32
|
+
// Hono's serve() targets a single host:port; for multi-bind we spawn
|
|
33
|
+
// one per host. The contextMonitor + watchdog scheduler only start
|
|
34
|
+
// once after the first successful bind callback fires.
|
|
35
|
+
let monitorsStarted = false;
|
|
36
|
+
const servers = [];
|
|
37
|
+
for (const host of bindHosts) {
|
|
38
|
+
const srv = serve({ fetch: app.fetch, port: p, hostname: host }, (info) => {
|
|
39
|
+
console.log(`OpenRig daemon listening on http://${host}:${info.port}`);
|
|
40
|
+
if (!monitorsStarted) {
|
|
41
|
+
monitorsStarted = true;
|
|
42
|
+
contextMonitor.start();
|
|
43
|
+
// PL-004 Phase C: start watchdog scheduler. Joins the supervision
|
|
44
|
+
// tree post-bind so the HTTP surface is ready before the first
|
|
45
|
+
// tick (matches contextMonitor pattern).
|
|
46
|
+
deps.watchdogScheduler?.start();
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
servers.push(srv);
|
|
50
|
+
}
|
|
18
51
|
// PL-004 Phase C: graceful shutdown — stop scheduler before process
|
|
19
52
|
// exit so any in-flight policy evaluation completes (or is awaited).
|
|
53
|
+
// Multi-bind: close every serve() instance in parallel.
|
|
20
54
|
const shutdown = async (sig) => {
|
|
21
55
|
console.log(`OpenRig daemon received ${sig}; shutting down`);
|
|
22
56
|
try {
|
|
@@ -25,11 +59,21 @@ export async function startServer(port) {
|
|
|
25
59
|
catch (err) {
|
|
26
60
|
console.error("[watchdog] shutdown error", err);
|
|
27
61
|
}
|
|
62
|
+
await Promise.all(servers.map((srv) => new Promise((resolve) => {
|
|
63
|
+
try {
|
|
64
|
+
srv.close(() => resolve());
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
resolve();
|
|
68
|
+
}
|
|
69
|
+
})));
|
|
28
70
|
process.exit(0);
|
|
29
71
|
};
|
|
30
72
|
process.once("SIGINT", () => void shutdown("SIGINT"));
|
|
31
73
|
process.once("SIGTERM", () => void shutdown("SIGTERM"));
|
|
32
|
-
return
|
|
74
|
+
// Backward-compatible single-server return (callers that just need a
|
|
75
|
+
// handle reference; multi-bind shutdown is wired via signal handlers).
|
|
76
|
+
return servers[0];
|
|
33
77
|
}
|
|
34
78
|
// Only start the server when this file is executed directly (not imported).
|
|
35
79
|
const isDirectRun = process.argv[1] &&
|
package/daemon/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Wrap a tmux-pane body with the canonical From/To envelope. The
|
|
2
|
+
* recipient pane sees both the sender's identity and a reply hint.
|
|
3
|
+
* Cross-host nudges should NOT double-wrap: the remote rig wraps
|
|
4
|
+
* when it processes the same command (matches `wrapSendBody`'s
|
|
5
|
+
* cross-host carve-out). */
|
|
6
|
+
export declare function wrapPaneEnvelope(sender: string | undefined, recipient: string, body: string): string;
|
|
7
|
+
//# sourceMappingURL=pane-envelope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pane-envelope.d.ts","sourceRoot":"","sources":["../../src/lib/pane-envelope.ts"],"names":[],"mappings":"AAuBA;;;;6BAI6B;AAC7B,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,GACX,MAAM,CAUR"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// V0.3.1 slice 23 founder-walk-queue-handoff-envelope.
|
|
2
|
+
//
|
|
3
|
+
// Daemon-side renderer for the email-style envelope the recipient's
|
|
4
|
+
// tmux pane shows when a peer sends them a message (`rig send`) or
|
|
5
|
+
// when a queue handoff/create nudges them. Wrapping the body with
|
|
6
|
+
// From / To / --- / body / --- / ↩ Reply gives both a sender
|
|
7
|
+
// identity and a copy-pasteable reply hint.
|
|
8
|
+
//
|
|
9
|
+
// PARITY CONTRACT with CLI:
|
|
10
|
+
// `packages/cli/src/commands/send.ts :: wrapSendBody` must produce
|
|
11
|
+
// BYTE-IDENTICAL output for the same inputs. The two implementations
|
|
12
|
+
// live in separate packages because cli + daemon don't cross-import
|
|
13
|
+
// today; the contract is enforced via:
|
|
14
|
+
// 1. Identical function body (visual diff)
|
|
15
|
+
// 2. `packages/daemon/test/pane-envelope.test.ts` mirroring the
|
|
16
|
+
// assertions in `packages/cli/test/send-header.test.ts`
|
|
17
|
+
// 3. Live integration parity (HG-5): a queue handoff nudge and a
|
|
18
|
+
// rig send to the same destination render byte-identical
|
|
19
|
+
// output except for the body content
|
|
20
|
+
// If you update this function, update wrapSendBody in lockstep.
|
|
21
|
+
const SENDER_FALLBACK = "<unknown sender>";
|
|
22
|
+
/** Wrap a tmux-pane body with the canonical From/To envelope. The
|
|
23
|
+
* recipient pane sees both the sender's identity and a reply hint.
|
|
24
|
+
* Cross-host nudges should NOT double-wrap: the remote rig wraps
|
|
25
|
+
* when it processes the same command (matches `wrapSendBody`'s
|
|
26
|
+
* cross-host carve-out). */
|
|
27
|
+
export function wrapPaneEnvelope(sender, recipient, body) {
|
|
28
|
+
const senderLabel = sender && sender.trim().length > 0 ? sender : SENDER_FALLBACK;
|
|
29
|
+
return [
|
|
30
|
+
`From: ${senderLabel}`,
|
|
31
|
+
`To: ${recipient}`,
|
|
32
|
+
"---",
|
|
33
|
+
body,
|
|
34
|
+
"---",
|
|
35
|
+
`↩ Reply: rig send ${senderLabel} "..."`,
|
|
36
|
+
].join("\n");
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=pane-envelope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pane-envelope.js","sourceRoot":"","sources":["../../src/lib/pane-envelope.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,EAAE;AACF,oEAAoE;AACpE,mEAAmE;AACnE,kEAAkE;AAClE,6DAA6D;AAC7D,4CAA4C;AAC5C,EAAE;AACF,4BAA4B;AAC5B,mEAAmE;AACnE,qEAAqE;AACrE,oEAAoE;AACpE,uCAAuC;AACvC,6CAA6C;AAC7C,kEAAkE;AAClE,6DAA6D;AAC7D,mEAAmE;AACnE,8DAA8D;AAC9D,0CAA0C;AAC1C,gEAAgE;AAEhE,MAAM,eAAe,GAAG,kBAAkB,CAAC;AAE3C;;;;6BAI6B;AAC7B,MAAM,UAAU,gBAAgB,CAC9B,MAA0B,EAC1B,SAAiB,EACjB,IAAY;IAEZ,MAAM,WAAW,GAAG,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC;IAClF,OAAO;QACL,SAAS,WAAW,EAAE;QACtB,OAAO,SAAS,EAAE;QAClB,KAAK;QACL,IAAI;QACJ,KAAK;QACL,qBAAqB,WAAW,QAAQ;KACzC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { type NetworkInterfaceInfo } from "node:os";
|
|
2
|
+
import type { MiddlewareHandler } from "hono";
|
|
3
|
+
/**
|
|
4
|
+
* Constant-time string equality using Node's timingSafeEqual.
|
|
5
|
+
* Returns false when lengths differ (timingSafeEqual throws on
|
|
6
|
+
* length mismatch; we pad-compare to keep a constant-ish branch
|
|
7
|
+
* profile while still returning the honest false).
|
|
8
|
+
*/
|
|
9
|
+
export declare function constantTimeEqual(a: string, b: string): boolean;
|
|
10
|
+
export interface AuthBearerTokenOpts {
|
|
11
|
+
/**
|
|
12
|
+
* The expected bearer token. When this is null, the middleware
|
|
13
|
+
* lets all requests through (the daemon-level startup check
|
|
14
|
+
* elsewhere ensures this only happens when bound on loopback).
|
|
15
|
+
*/
|
|
16
|
+
expectedToken: string | null;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Hono middleware that enforces bearer-token auth on the routes it
|
|
20
|
+
* is mounted on. Returns 401 with a three-part error body for missing
|
|
21
|
+
* or mismatched tokens.
|
|
22
|
+
*
|
|
23
|
+
* When `expectedToken` is null, the middleware passes through. The
|
|
24
|
+
* startup check in `startup.ts` ensures null is only valid when the
|
|
25
|
+
* bind interface is loopback.
|
|
26
|
+
*/
|
|
27
|
+
export declare function authBearerTokenMiddleware(opts: AuthBearerTokenOpts): MiddlewareHandler;
|
|
28
|
+
/**
|
|
29
|
+
* Detect whether a host bind value is loopback-only (safe to skip
|
|
30
|
+
* bearer requirement) vs non-loopback (tailnet / public; requires
|
|
31
|
+
* bearer). Loopback set: `127.x.x.x`, `::1`, `localhost`. Anything
|
|
32
|
+
* else (including `0.0.0.0`, `::`, named hostnames, tailnet IPs) is
|
|
33
|
+
* treated as non-loopback.
|
|
34
|
+
*/
|
|
35
|
+
export declare function isLoopbackBind(host: string | undefined | null): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Detect tailscale CGNAT IPv4 (100.64.0.0/10) and ULA IPv6 prefix
|
|
38
|
+
* (fd7a:115c:a1e0::/48). Returns true for tailnet-literal IP addresses
|
|
39
|
+
* only; hostname callers must first resolve via {@link resolveToIpOrNull}.
|
|
40
|
+
*
|
|
41
|
+
* Rationale: tailscale's WireGuard mesh + ACLs ARE the auth boundary, so
|
|
42
|
+
* a tailnet-bound daemon does not need an additional bearer token. The
|
|
43
|
+
* CGNAT IPv4 range and ULA IPv6 prefix are reserved by tailscale and
|
|
44
|
+
* documented; collisions on real-world networks are essentially zero.
|
|
45
|
+
*
|
|
46
|
+
* Boundary semantics for HG-3: CGNAT is 100.64.0.0/10 → first octet
|
|
47
|
+
* exactly 100, second octet 64..127 inclusive. 100.63.x.x and
|
|
48
|
+
* 100.128.x.x are NOT tailnet.
|
|
49
|
+
*/
|
|
50
|
+
export declare function isTailscaleBind(host: string | undefined | null): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Pure helper for {@link detectTailscaleInterface}: takes a NetworkInterfaces
|
|
53
|
+
* dictionary (the shape returned by os.networkInterfaces()) and returns the
|
|
54
|
+
* first non-internal address that matches the tailnet IP ranges, or null.
|
|
55
|
+
* Factored out so tests can supply synthetic interface fixtures without
|
|
56
|
+
* mocking node:os.
|
|
57
|
+
*/
|
|
58
|
+
export declare function findTailscaleIpInInterfaces(interfaces: NodeJS.Dict<NetworkInterfaceInfo[]>): string | null;
|
|
59
|
+
/**
|
|
60
|
+
* Probe the host's network interfaces and return the first tailscale-IP
|
|
61
|
+
* address found (CGNAT IPv4 or tailnet ULA IPv6), or null when no tailnet
|
|
62
|
+
* interface is currently active. Used at daemon startup to decide whether
|
|
63
|
+
* to multi-bind (loopback + tailnet) or loopback-only. Detection is
|
|
64
|
+
* IP-based, not interface-name-based, so it survives platform differences
|
|
65
|
+
* in how tailscale names its tun device.
|
|
66
|
+
*/
|
|
67
|
+
export declare function detectTailscaleInterface(): string | null;
|
|
68
|
+
/**
|
|
69
|
+
* Resolve a hostname to its first IP via node:dns/promises lookup.
|
|
70
|
+
* Returns null on resolution failure (DNS error, timeout, no such host).
|
|
71
|
+
* Wrapped with a 5s race-timeout per Risk 9.2 in the slice IMPL-PRD so an
|
|
72
|
+
* unresponsive resolver does not stall daemon startup indefinitely.
|
|
73
|
+
*/
|
|
74
|
+
export declare function resolveToIpOrNull(host: string): Promise<string | null>;
|
|
75
|
+
export declare class AuthBearerTokenStartupError extends Error {
|
|
76
|
+
constructor(message: string);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Startup-side check (HARD-GATE audit row 8). Throws an explicit
|
|
80
|
+
* AuthBearerTokenStartupError when the bind interface is genuinely
|
|
81
|
+
* public/LAN AND the bearer token is empty. Loopback or tailscale-IP
|
|
82
|
+
* binds short-circuit (the tailnet is the auth boundary). Hostname
|
|
83
|
+
* binds resolve via DNS first; if resolution yields a loopback or
|
|
84
|
+
* tailnet IP, the same short-circuit applies. Public/LAN binds without
|
|
85
|
+
* a bearer throw and the daemon refuses to start.
|
|
86
|
+
*/
|
|
87
|
+
export declare function assertBindAuthInvariant(opts: {
|
|
88
|
+
host: string;
|
|
89
|
+
bearerToken: string | null;
|
|
90
|
+
}): Promise<void>;
|
|
91
|
+
//# sourceMappingURL=auth-bearer-token.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-bearer-token.d.ts","sourceRoot":"","sources":["../../src/middleware/auth-bearer-token.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAqB,KAAK,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAE9C;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAe/D;AAwBD,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,mBAAmB,GACxB,iBAAiB,CAyBnB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAWvE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAaxE;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC,GAC9C,MAAM,GAAG,IAAI,CASf;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,IAAI,MAAM,GAAG,IAAI,CAExD;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAa5E;AAED,qBAAa,2BAA4B,SAAQ,KAAK;gBACxC,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAAC,IAAI,EAAE;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBhB"}
|