@openrig/cli 0.4.4 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/daemon/assets/plugins/openrig-core/skills/mission-slice-sop/SKILL.md +6 -8
- package/daemon/assets/plugins/openrig-core/skills/openrig-cmux/SKILL.md +86 -0
- package/daemon/assets/plugins/openrig-core/skills/openrig-herdr/SKILL.md +158 -0
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +744 -96
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +12 -8
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/pi-resume.d.ts +32 -0
- package/daemon/dist/adapters/pi-resume.d.ts.map +1 -0
- package/daemon/dist/adapters/pi-resume.js +125 -0
- package/daemon/dist/adapters/pi-resume.js.map +1 -0
- package/daemon/dist/adapters/pi-runner-protocol.d.ts +88 -0
- package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -0
- package/daemon/dist/adapters/pi-runner-protocol.js +153 -0
- package/daemon/dist/adapters/pi-runner-protocol.js.map +1 -0
- package/daemon/dist/adapters/pi-runner.d.ts +99 -0
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -0
- package/daemon/dist/adapters/pi-runner.js +519 -0
- package/daemon/dist/adapters/pi-runner.js.map +1 -0
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts +61 -0
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -0
- package/daemon/dist/adapters/pi-runtime-adapter.js +356 -0
- package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -0
- package/daemon/dist/adapters/tmux.d.ts +22 -1
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +40 -1
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/builtins/workflow-specs/branched-remediation.yaml +31 -0
- package/daemon/dist/builtins/workflow-specs/factory-rsi.yaml +152 -0
- package/daemon/dist/builtins/workflow-specs/gated-release.yaml +26 -0
- package/daemon/dist/builtins/workflow-specs/linear-build.yaml +21 -0
- package/daemon/dist/db/migrations/049_workflow_instance_version.d.ts +20 -0
- package/daemon/dist/db/migrations/049_workflow_instance_version.d.ts.map +1 -0
- package/daemon/dist/db/migrations/049_workflow_instance_version.js +24 -0
- package/daemon/dist/db/migrations/049_workflow_instance_version.js.map +1 -0
- package/daemon/dist/db/migrations/050_workflow_spec_json.d.ts +22 -0
- package/daemon/dist/db/migrations/050_workflow_spec_json.d.ts.map +1 -0
- package/daemon/dist/db/migrations/050_workflow_spec_json.js +26 -0
- package/daemon/dist/db/migrations/050_workflow_spec_json.js.map +1 -0
- package/daemon/dist/db/migrations/051_workflow_resume.d.ts +22 -0
- package/daemon/dist/db/migrations/051_workflow_resume.d.ts.map +1 -0
- package/daemon/dist/db/migrations/051_workflow_resume.js +27 -0
- package/daemon/dist/db/migrations/051_workflow_resume.js.map +1 -0
- package/daemon/dist/db/migrations/052_workflow_instance_bound_rig.d.ts +26 -0
- package/daemon/dist/db/migrations/052_workflow_instance_bound_rig.d.ts.map +1 -0
- package/daemon/dist/db/migrations/052_workflow_instance_bound_rig.js +30 -0
- package/daemon/dist/db/migrations/052_workflow_instance_bound_rig.js.map +1 -0
- package/daemon/dist/db/migrations/053_sessions_node_id_index.d.ts +48 -0
- package/daemon/dist/db/migrations/053_sessions_node_id_index.d.ts.map +1 -0
- package/daemon/dist/db/migrations/053_sessions_node_id_index.js +53 -0
- package/daemon/dist/db/migrations/053_sessions_node_id_index.js.map +1 -0
- package/daemon/dist/db/migrations/054_queue_transitions_archive.d.ts +34 -0
- package/daemon/dist/db/migrations/054_queue_transitions_archive.d.ts.map +1 -0
- package/daemon/dist/db/migrations/054_queue_transitions_archive.js +49 -0
- package/daemon/dist/db/migrations/054_queue_transitions_archive.js.map +1 -0
- package/daemon/dist/domain/claim-service.d.ts +11 -0
- package/daemon/dist/domain/claim-service.d.ts.map +1 -1
- package/daemon/dist/domain/claim-service.js +3 -1
- package/daemon/dist/domain/claim-service.js.map +1 -1
- package/daemon/dist/domain/discovery-types.d.ts +1 -1
- package/daemon/dist/domain/discovery-types.d.ts.map +1 -1
- package/daemon/dist/domain/hosts/hosts-registry-reader.d.ts +1 -0
- package/daemon/dist/domain/hosts/hosts-registry-reader.d.ts.map +1 -1
- package/daemon/dist/domain/hosts/hosts-registry-reader.js +19 -0
- package/daemon/dist/domain/hosts/hosts-registry-reader.js.map +1 -1
- package/daemon/dist/domain/hosts/hosts-registry-writer.d.ts +11 -0
- package/daemon/dist/domain/hosts/hosts-registry-writer.d.ts.map +1 -0
- package/daemon/dist/domain/hosts/hosts-registry-writer.js +54 -0
- package/daemon/dist/domain/hosts/hosts-registry-writer.js.map +1 -0
- package/daemon/dist/domain/hosts/read-through.d.ts +28 -0
- package/daemon/dist/domain/hosts/read-through.d.ts.map +1 -0
- package/daemon/dist/domain/hosts/read-through.js +139 -0
- package/daemon/dist/domain/hosts/read-through.js.map +1 -0
- package/daemon/dist/domain/hosts/remote-daemon-http.d.ts +21 -0
- package/daemon/dist/domain/hosts/remote-daemon-http.d.ts.map +1 -1
- package/daemon/dist/domain/hosts/remote-daemon-http.js +49 -0
- package/daemon/dist/domain/hosts/remote-daemon-http.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts +18 -0
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +206 -95
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +11 -0
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +10 -0
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/policies/workflow-keepalive.d.ts +7 -0
- package/daemon/dist/domain/policies/workflow-keepalive.d.ts.map +1 -1
- package/daemon/dist/domain/policies/workflow-keepalive.js +93 -13
- package/daemon/dist/domain/policies/workflow-keepalive.js.map +1 -1
- package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
- package/daemon/dist/domain/ps-projection.js +37 -26
- package/daemon/dist/domain/ps-projection.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +105 -0
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +193 -4
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-retention.d.ts +130 -0
- package/daemon/dist/domain/queue-retention.d.ts.map +1 -0
- package/daemon/dist/domain/queue-retention.js +224 -0
- package/daemon/dist/domain/queue-retention.js.map +1 -0
- package/daemon/dist/domain/restore-orchestrator.d.ts +5 -0
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +29 -2
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/resume-token-capture.d.ts +13 -0
- package/daemon/dist/domain/resume-token-capture.d.ts.map +1 -1
- package/daemon/dist/domain/resume-token-capture.js +14 -1
- package/daemon/dist/domain/resume-token-capture.js.map +1 -1
- package/daemon/dist/domain/resume-token-validation.d.ts +1 -1
- package/daemon/dist/domain/resume-token-validation.d.ts.map +1 -1
- package/daemon/dist/domain/resume-token-validation.js +58 -10
- package/daemon/dist/domain/resume-token-validation.js.map +1 -1
- package/daemon/dist/domain/review/compose.d.ts +50 -1
- package/daemon/dist/domain/review/compose.d.ts.map +1 -1
- package/daemon/dist/domain/review/compose.js +92 -3
- package/daemon/dist/domain/review/compose.js.map +1 -1
- package/daemon/dist/domain/review/fleet-compose.d.ts +52 -0
- package/daemon/dist/domain/review/fleet-compose.d.ts.map +1 -0
- package/daemon/dist/domain/review/fleet-compose.js +294 -0
- package/daemon/dist/domain/review/fleet-compose.js.map +1 -0
- package/daemon/dist/domain/review/gather.d.ts +16 -1
- package/daemon/dist/domain/review/gather.d.ts.map +1 -1
- package/daemon/dist/domain/review/gather.js +177 -41
- package/daemon/dist/domain/review/gather.js.map +1 -1
- package/daemon/dist/domain/review/types.d.ts +104 -1
- package/daemon/dist/domain/review/types.d.ts.map +1 -1
- package/daemon/dist/domain/rig-expansion-service.d.ts.map +1 -1
- package/daemon/dist/domain/rig-expansion-service.js +3 -0
- package/daemon/dist/domain/rig-expansion-service.js.map +1 -1
- package/daemon/dist/domain/rig-repository.d.ts +7 -6
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +33 -11
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-codec.js +3 -0
- package/daemon/dist/domain/rigspec-codec.js.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.js +4 -0
- package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +11 -0
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts +6 -0
- package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.js +26 -1
- package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
- package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +20 -1
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/runtime-verifier.d.ts +7 -1
- package/daemon/dist/domain/runtime-verifier.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-verifier.js +39 -1
- package/daemon/dist/domain/runtime-verifier.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts +9 -0
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +2 -0
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-identity-store.d.ts +7 -0
- package/daemon/dist/domain/seat-identity-store.d.ts.map +1 -1
- package/daemon/dist/domain/seat-identity-store.js +27 -0
- package/daemon/dist/domain/seat-identity-store.js.map +1 -1
- package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-status-service.js +6 -4
- package/daemon/dist/domain/seat-status-service.js.map +1 -1
- package/daemon/dist/domain/session-name.d.ts +22 -0
- package/daemon/dist/domain/session-name.d.ts.map +1 -1
- package/daemon/dist/domain/session-name.js +29 -0
- package/daemon/dist/domain/session-name.js.map +1 -1
- package/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-detail-projector.js +4 -5
- package/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.d.ts +18 -2
- package/daemon/dist/domain/spec-library-workflow-scanner.d.ts.map +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.js +23 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.js.map +1 -1
- package/daemon/dist/domain/startup-proof.d.ts +10 -6
- package/daemon/dist/domain/startup-proof.d.ts.map +1 -1
- package/daemon/dist/domain/startup-proof.js +35 -7
- package/daemon/dist/domain/startup-proof.js.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts +16 -0
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +13 -0
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/terminal/cmux-provider-adapter.d.ts +27 -0
- package/daemon/dist/domain/terminal/cmux-provider-adapter.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/cmux-provider-adapter.js +67 -0
- package/daemon/dist/domain/terminal/cmux-provider-adapter.js.map +1 -0
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts +77 -0
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/herdr-adapter.js +266 -0
- package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -0
- package/daemon/dist/domain/terminal/herdr-transport.d.ts +50 -0
- package/daemon/dist/domain/terminal/herdr-transport.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/herdr-transport.js +145 -0
- package/daemon/dist/domain/terminal/herdr-transport.js.map +1 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts +88 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/terminal-provider.js +17 -0
- package/daemon/dist/domain/terminal/terminal-provider.js.map +1 -0
- package/daemon/dist/domain/terminal/terminal-service.d.ts +60 -0
- package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/terminal-service.js +174 -0
- package/daemon/dist/domain/terminal/terminal-service.js.map +1 -0
- package/daemon/dist/domain/terminal/terminal-views-store.d.ts +77 -0
- package/daemon/dist/domain/terminal/terminal-views-store.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/terminal-views-store.js +146 -0
- package/daemon/dist/domain/terminal/terminal-views-store.js.map +1 -0
- package/daemon/dist/domain/terminal/view-composer.d.ts +42 -0
- package/daemon/dist/domain/terminal/view-composer.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/view-composer.js +137 -0
- package/daemon/dist/domain/terminal/view-composer.js.map +1 -0
- package/daemon/dist/domain/tmux-option-defaults.d.ts +89 -0
- package/daemon/dist/domain/tmux-option-defaults.d.ts.map +1 -0
- package/daemon/dist/domain/tmux-option-defaults.js +132 -0
- package/daemon/dist/domain/tmux-option-defaults.js.map +1 -0
- package/daemon/dist/domain/types.d.ts +34 -1
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.js +92 -0
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/workflow/slice-workflow-projection.d.ts.map +1 -1
- package/daemon/dist/domain/workflow/slice-workflow-projection.js +6 -2
- package/daemon/dist/domain/workflow/slice-workflow-projection.js.map +1 -1
- package/daemon/dist/domain/workflow-boot-sweep.d.ts +28 -0
- package/daemon/dist/domain/workflow-boot-sweep.d.ts.map +1 -0
- package/daemon/dist/domain/workflow-boot-sweep.js +102 -0
- package/daemon/dist/domain/workflow-boot-sweep.js.map +1 -0
- package/daemon/dist/domain/workflow-deadline.d.ts +74 -0
- package/daemon/dist/domain/workflow-deadline.d.ts.map +1 -0
- package/daemon/dist/domain/workflow-deadline.js +165 -0
- package/daemon/dist/domain/workflow-deadline.js.map +1 -0
- package/daemon/dist/domain/workflow-exception-escalation.d.ts +33 -0
- package/daemon/dist/domain/workflow-exception-escalation.d.ts.map +1 -0
- package/daemon/dist/domain/workflow-exception-escalation.js +104 -0
- package/daemon/dist/domain/workflow-exception-escalation.js.map +1 -0
- package/daemon/dist/domain/workflow-exception-router.d.ts +33 -0
- package/daemon/dist/domain/workflow-exception-router.d.ts.map +1 -0
- package/daemon/dist/domain/workflow-exception-router.js +96 -0
- package/daemon/dist/domain/workflow-exception-router.js.map +1 -0
- package/daemon/dist/domain/workflow-exception.d.ts +90 -0
- package/daemon/dist/domain/workflow-exception.d.ts.map +1 -0
- package/daemon/dist/domain/workflow-exception.js +122 -0
- package/daemon/dist/domain/workflow-exception.js.map +1 -0
- package/daemon/dist/domain/workflow-frontier-guard.d.ts +24 -0
- package/daemon/dist/domain/workflow-frontier-guard.d.ts.map +1 -0
- package/daemon/dist/domain/workflow-frontier-guard.js +30 -0
- package/daemon/dist/domain/workflow-frontier-guard.js.map +1 -0
- package/daemon/dist/domain/workflow-instance-store.d.ts +28 -0
- package/daemon/dist/domain/workflow-instance-store.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-instance-store.js +66 -10
- package/daemon/dist/domain/workflow-instance-store.js.map +1 -1
- package/daemon/dist/domain/workflow-keepalive-arming.d.ts +35 -0
- package/daemon/dist/domain/workflow-keepalive-arming.d.ts.map +1 -0
- package/daemon/dist/domain/workflow-keepalive-arming.js +87 -0
- package/daemon/dist/domain/workflow-keepalive-arming.js.map +1 -0
- package/daemon/dist/domain/workflow-projector.d.ts +117 -2
- package/daemon/dist/domain/workflow-projector.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-projector.js +672 -41
- package/daemon/dist/domain/workflow-projector.js.map +1 -1
- package/daemon/dist/domain/workflow-role-context.d.ts +57 -0
- package/daemon/dist/domain/workflow-role-context.d.ts.map +1 -0
- package/daemon/dist/domain/workflow-role-context.js +120 -0
- package/daemon/dist/domain/workflow-role-context.js.map +1 -0
- package/daemon/dist/domain/workflow-role-resolver.d.ts +65 -0
- package/daemon/dist/domain/workflow-role-resolver.d.ts.map +1 -0
- package/daemon/dist/domain/workflow-role-resolver.js +108 -0
- package/daemon/dist/domain/workflow-role-resolver.js.map +1 -0
- package/daemon/dist/domain/workflow-runtime.d.ts +157 -1
- package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-runtime.js +718 -11
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.d.ts +26 -1
- package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.js +327 -13
- package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
- package/daemon/dist/domain/workflow-types.d.ts +143 -8
- package/daemon/dist/domain/workflow-types.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-types.js +14 -1
- package/daemon/dist/domain/workflow-types.js.map +1 -1
- package/daemon/dist/domain/workflow-validator.d.ts +11 -1
- package/daemon/dist/domain/workflow-validator.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-validator.js +246 -1
- package/daemon/dist/domain/workflow-validator.js.map +1 -1
- package/daemon/dist/index.d.ts +17 -0
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +44 -0
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/routes/activity.js +22 -0
- package/daemon/dist/routes/activity.js.map +1 -1
- package/daemon/dist/routes/hosts.d.ts +5 -0
- package/daemon/dist/routes/hosts.d.ts.map +1 -0
- package/daemon/dist/routes/hosts.js +346 -0
- package/daemon/dist/routes/hosts.js.map +1 -0
- package/daemon/dist/routes/queue.d.ts +2 -7
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +264 -9
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/review.d.ts.map +1 -1
- package/daemon/dist/routes/review.js +26 -0
- package/daemon/dist/routes/review.js.map +1 -1
- package/daemon/dist/routes/seat.js +13 -0
- package/daemon/dist/routes/seat.js.map +1 -1
- package/daemon/dist/routes/terminal.d.ts +11 -0
- package/daemon/dist/routes/terminal.d.ts.map +1 -0
- package/daemon/dist/routes/terminal.js +104 -0
- package/daemon/dist/routes/terminal.js.map +1 -0
- package/daemon/dist/routes/workflow.d.ts.map +1 -1
- package/daemon/dist/routes/workflow.js +102 -10
- package/daemon/dist/routes/workflow.js.map +1 -1
- package/daemon/dist/server.d.ts +5 -0
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +22 -0
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +221 -12
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/specs/agents/factory-rsi/dogfood/agent.yaml +29 -0
- package/daemon/specs/agents/factory-rsi/dogfood/guidance/role.md +37 -0
- package/daemon/specs/agents/factory-rsi/release-manager/agent.yaml +29 -0
- package/daemon/specs/agents/factory-rsi/release-manager/guidance/role.md +40 -0
- package/daemon/specs/agents/shared/skills/core/mission-slice-sop/SKILL.md +6 -8
- package/daemon/specs/agents/shared/skills/core/openrig-cmux/SKILL.md +86 -0
- package/daemon/specs/agents/shared/skills/core/openrig-herdr/SKILL.md +158 -0
- package/daemon/specs/agents/shared/skills/core/openrig-user/SKILL.md +6 -6
- package/daemon/specs/rigs/launch/factory-rsi/CULTURE.md +47 -0
- package/daemon/specs/rigs/launch/factory-rsi/rig.yaml +115 -0
- package/dist/build-info.js +3 -3
- package/dist/commands/broadcast.d.ts +6 -1
- package/dist/commands/broadcast.d.ts.map +1 -1
- package/dist/commands/broadcast.js +101 -15
- package/dist/commands/broadcast.js.map +1 -1
- package/dist/commands/capture.d.ts.map +1 -1
- package/dist/commands/capture.js +99 -8
- package/dist/commands/capture.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +4 -0
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +5 -0
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/host.d.ts +14 -0
- package/dist/commands/host.d.ts.map +1 -1
- package/dist/commands/host.js +338 -14
- package/dist/commands/host.js.map +1 -1
- package/dist/commands/launch.d.ts.map +1 -1
- package/dist/commands/launch.js +5 -0
- package/dist/commands/launch.js.map +1 -1
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +10 -4
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts +36 -0
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +73 -7
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/restore-packet.d.ts.map +1 -1
- package/dist/commands/restore-packet.js +13 -2
- package/dist/commands/restore-packet.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +114 -9
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/terminal.d.ts +6 -0
- package/dist/commands/terminal.d.ts.map +1 -0
- package/dist/commands/terminal.js +116 -0
- package/dist/commands/terminal.js.map +1 -0
- package/dist/commands/transcript.d.ts +6 -1
- package/dist/commands/transcript.d.ts.map +1 -1
- package/dist/commands/transcript.js +113 -30
- package/dist/commands/transcript.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +9 -0
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +11 -0
- package/dist/commands/whoami.js.map +1 -1
- package/dist/commands/workflow-errors.d.ts +23 -0
- package/dist/commands/workflow-errors.d.ts.map +1 -0
- package/dist/commands/workflow-errors.js +100 -0
- package/dist/commands/workflow-errors.js.map +1 -0
- package/dist/commands/workflow-follow.d.ts +71 -0
- package/dist/commands/workflow-follow.d.ts.map +1 -0
- package/dist/commands/workflow-follow.js +259 -0
- package/dist/commands/workflow-follow.js.map +1 -0
- package/dist/commands/workflow-render.d.ts +114 -0
- package/dist/commands/workflow-render.d.ts.map +1 -0
- package/dist/commands/workflow-render.js +223 -0
- package/dist/commands/workflow-render.js.map +1 -0
- package/dist/commands/workflow.d.ts +1 -0
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +278 -14
- package/dist/commands/workflow.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 +103 -0
- package/dist/config-store.js.map +1 -1
- package/dist/cross-host-cli-helpers.d.ts +13 -0
- package/dist/cross-host-cli-helpers.d.ts.map +1 -1
- package/dist/cross-host-cli-helpers.js +27 -0
- package/dist/cross-host-cli-helpers.js.map +1 -1
- package/dist/cross-host-target.d.ts +49 -0
- package/dist/cross-host-target.d.ts.map +1 -0
- package/dist/cross-host-target.js +35 -0
- package/dist/cross-host-target.js.map +1 -0
- package/dist/host-registry.d.ts +8 -0
- package/dist/host-registry.d.ts.map +1 -1
- package/dist/host-registry.js +32 -0
- package/dist/host-registry.js.map +1 -1
- package/dist/host-selection.d.ts +13 -0
- package/dist/host-selection.d.ts.map +1 -0
- package/dist/host-selection.js +54 -0
- package/dist/host-selection.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/remote-host-ops.d.ts +1 -0
- package/dist/remote-host-ops.d.ts.map +1 -1
- package/dist/remote-host-ops.js +11 -4
- package/dist/remote-host-ops.js.map +1 -1
- package/dist/session-name.d.ts +23 -0
- package/dist/session-name.d.ts.map +1 -0
- package/dist/session-name.js +61 -0
- package/dist/session-name.js.map +1 -0
- package/package.json +1 -1
- package/ui/dist/assets/index-CFqxa0zW.css +32 -0
- package/ui/dist/assets/index-zrFqS7gL.js +623 -0
- package/ui/dist/index.html +2 -2
- package/ui/dist/assets/index-D69ZhNIr.js +0 -598
- package/ui/dist/assets/index-DJYun-8d.css +0 -32
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OPR.0.4.6.WF3 FR-2 — the glanceable human renderers for
|
|
3
|
+
* trace/list/show. RENDER-SIDE ONLY (BR-2): these functions format
|
|
4
|
+
* daemon payloads the CLI already receives; `--json` paths never come
|
|
5
|
+
* through here and stay byte-identical to the shipped output.
|
|
6
|
+
*
|
|
7
|
+
* Shapes ported from in-repo precedent: the `rig ps` table mechanics
|
|
8
|
+
* (fitCell/truncate) and the argo-get per-step tree bar (STEP / ACTOR
|
|
9
|
+
* / EXIT / DURATION columns with status glyphs).
|
|
10
|
+
*
|
|
11
|
+
* Present-tolerant fields: WF-2's branch/gate additions
|
|
12
|
+
* (closureEvidence.branch_taken etc.) render when the payload carries
|
|
13
|
+
* them and leave no residue when absent — this module never requires
|
|
14
|
+
* them (WF-3 builds against the pre-WF-2 tip; the fields land with
|
|
15
|
+
* WF-2).
|
|
16
|
+
*/
|
|
17
|
+
const STATUS_GLYPH = {
|
|
18
|
+
completed: "✔",
|
|
19
|
+
failed: "✖",
|
|
20
|
+
active: "●",
|
|
21
|
+
waiting: "◐",
|
|
22
|
+
};
|
|
23
|
+
export function statusGlyph(status) {
|
|
24
|
+
return STATUS_GLYPH[status] ?? "●";
|
|
25
|
+
}
|
|
26
|
+
function truncate(s, max) {
|
|
27
|
+
return s.length > max ? s.slice(0, max - 1) + "…" : s;
|
|
28
|
+
}
|
|
29
|
+
function fitCell(value, width) {
|
|
30
|
+
return truncate(value, width).padEnd(width);
|
|
31
|
+
}
|
|
32
|
+
/** Compact human duration between two ISO timestamps ("3s", "4m", "2h", "5d"). */
|
|
33
|
+
export function humanDuration(fromIso, toIso) {
|
|
34
|
+
if (!fromIso || !toIso)
|
|
35
|
+
return "";
|
|
36
|
+
const ms = Date.parse(toIso) - Date.parse(fromIso);
|
|
37
|
+
if (!Number.isFinite(ms) || ms < 0)
|
|
38
|
+
return "";
|
|
39
|
+
const s = Math.round(ms / 1000);
|
|
40
|
+
if (s < 60)
|
|
41
|
+
return `${s}s`;
|
|
42
|
+
const m = Math.round(s / 60);
|
|
43
|
+
// Minutes render up to AND INCLUDING 120 so sub-/at-2h durations keep
|
|
44
|
+
// their precision ("90m"/"120m" beat a rounded-up "2h" for judging
|
|
45
|
+
// step latency). Guard prepass catch: `m < 120` excluded exactly 120.
|
|
46
|
+
if (m <= 120)
|
|
47
|
+
return `${m}m`;
|
|
48
|
+
const h = Math.round(m / 60);
|
|
49
|
+
if (h < 48)
|
|
50
|
+
return `${h}h`;
|
|
51
|
+
return `${Math.round(h / 24)}d`;
|
|
52
|
+
}
|
|
53
|
+
/** Instance age relative to a supplied "now" (injectable for tests). */
|
|
54
|
+
export function humanAge(createdAt, nowIso) {
|
|
55
|
+
return humanDuration(createdAt, nowIso);
|
|
56
|
+
}
|
|
57
|
+
/** Compact render of a plain seconds quantity (same scale rules). */
|
|
58
|
+
export function humanSeconds(seconds) {
|
|
59
|
+
return humanDuration("1970-01-01T00:00:00.000Z", new Date(seconds * 1000).toISOString());
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The trace tree (mini-req 2's bar: where it is + how it got there,
|
|
63
|
+
* one screen, no JSON literacy required).
|
|
64
|
+
*/
|
|
65
|
+
export function renderTraceTree(instance, trail, nowIso = new Date().toISOString()) {
|
|
66
|
+
const lines = [];
|
|
67
|
+
const name = instance.workflowName ? `${instance.workflowName}${instance.workflowVersion ? ` v${instance.workflowVersion}` : ""}` : "";
|
|
68
|
+
lines.push(`${statusGlyph(instance.status)} ${instance.instanceId} ${name} status=${instance.status}${instance.hopCount !== undefined ? ` hops=${instance.hopCount}` : ""}${instance.boundRig ? ` rig=${instance.boundRig}` : ""}`);
|
|
69
|
+
if (instance.createdAt) {
|
|
70
|
+
lines.push(` created ${instance.createdAt}${instance.createdBySession ? ` by ${instance.createdBySession}` : ""} age ${humanAge(instance.createdAt, nowIso)}`);
|
|
71
|
+
}
|
|
72
|
+
lines.push("");
|
|
73
|
+
lines.push(` ${fitCell("STEP", 22)}${fitCell("ACTOR", 28)}${fitCell("EXIT", 10)}DURATION`);
|
|
74
|
+
let prevClosed = instance.createdAt;
|
|
75
|
+
for (let i = 0; i < trail.length; i++) {
|
|
76
|
+
const row = trail[i];
|
|
77
|
+
if (!row)
|
|
78
|
+
continue;
|
|
79
|
+
const glyph = row.closureReason === "failed" ? "✖" : "✔";
|
|
80
|
+
const bar = i === trail.length - 1 && !instance.currentStepId ? "└─" : "├─";
|
|
81
|
+
const duration = humanDuration(prevClosed, row.closedAt);
|
|
82
|
+
lines.push(` ${bar} ${glyph} ${fitCell(row.stepId, 20)}${fitCell(row.actorSession, 28)}${fitCell(row.closureReason, 10)}${duration}`);
|
|
83
|
+
const branchTaken = row.closureEvidence?.["branch_taken"];
|
|
84
|
+
if (typeof branchTaken === "string" && branchTaken.length > 0) {
|
|
85
|
+
lines.push(` │ ↳ branch: ${branchTaken}`);
|
|
86
|
+
}
|
|
87
|
+
prevClosed = row.closedAt ?? prevClosed;
|
|
88
|
+
}
|
|
89
|
+
if (instance.currentStepId) {
|
|
90
|
+
const owner = ""; // frontier owner is a queue-side fact; the frontier packet ids are what the payload carries
|
|
91
|
+
lines.push(` └─ ▸ ${fitCell(instance.currentStepId, 20)}${fitCell(owner || "(current)", 28)}${fitCell("open", 10)}frontier=[${(instance.currentFrontier ?? []).join(", ")}]`);
|
|
92
|
+
}
|
|
93
|
+
else if (trail.length === 0) {
|
|
94
|
+
lines.push(` (no steps closed yet)`);
|
|
95
|
+
}
|
|
96
|
+
return lines;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* OPR.0.4.6.WF3 FR-3 — the attention marker for a list row (the
|
|
100
|
+
* single marker home). Classes: failed · stuck (consumed VERBATIM
|
|
101
|
+
* from the API-carried deadline classification — rail 1: the CLI
|
|
102
|
+
* never recomputes a threshold or class) · waiting. A row shows its
|
|
103
|
+
* highest-priority class; the `status` verb shows ALL classes per
|
|
104
|
+
* instance (exactly-once, combined reasons).
|
|
105
|
+
*/
|
|
106
|
+
export function attentionMarker(instance) {
|
|
107
|
+
if (instance.status === "failed")
|
|
108
|
+
return "▲ failed";
|
|
109
|
+
if (isStuck(instance))
|
|
110
|
+
return "▲ stuck";
|
|
111
|
+
if (instance.status === "waiting")
|
|
112
|
+
return "▲ waiting";
|
|
113
|
+
return "";
|
|
114
|
+
}
|
|
115
|
+
/** Rail 1: stuck-ness is READ from the API field, never derived. */
|
|
116
|
+
function isStuck(instance) {
|
|
117
|
+
const state = instance.deadline?.state;
|
|
118
|
+
return typeof state === "string" && state.startsWith("overdue");
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Compose the rollup from list rows. Pure arithmetic over
|
|
122
|
+
* pre-classified rows (the arch ruling's boundary: counting +
|
|
123
|
+
* grouping + rendering is render-side; the ONE correctness-rule
|
|
124
|
+
* composition — the threshold classification — arrives ALREADY DONE
|
|
125
|
+
* in instance.deadline). Per-instance dedup by instanceId (rail 2):
|
|
126
|
+
* an instance with multiple attention reasons renders ONCE with all
|
|
127
|
+
* of them.
|
|
128
|
+
*/
|
|
129
|
+
export function composeAttentionRollup(instances) {
|
|
130
|
+
const counts = { total: instances.length, active: 0, waiting: 0, completed: 0, failed: 0 };
|
|
131
|
+
const attention = [];
|
|
132
|
+
for (const inst of instances) {
|
|
133
|
+
if (inst.status === "active")
|
|
134
|
+
counts.active += 1;
|
|
135
|
+
else if (inst.status === "waiting")
|
|
136
|
+
counts.waiting += 1;
|
|
137
|
+
else if (inst.status === "completed")
|
|
138
|
+
counts.completed += 1;
|
|
139
|
+
else if (inst.status === "failed")
|
|
140
|
+
counts.failed += 1;
|
|
141
|
+
const classes = [];
|
|
142
|
+
const reasons = [];
|
|
143
|
+
if (inst.status === "failed") {
|
|
144
|
+
classes.push("failed");
|
|
145
|
+
reasons.push("workflow failed");
|
|
146
|
+
}
|
|
147
|
+
if (isStuck(inst)) {
|
|
148
|
+
classes.push("stuck");
|
|
149
|
+
const ev = inst.deadline?.evidence;
|
|
150
|
+
reasons.push(`${inst.deadline?.state}${ev?.stepId ? ` at step ${ev.stepId}` : ""}${ev?.ownerSession ? ` (owner ${ev.ownerSession})` : ""}${typeof ev?.overdueBySeconds === "number" ? `, overdue ${humanSeconds(ev.overdueBySeconds)}` : ""}`);
|
|
151
|
+
}
|
|
152
|
+
if (inst.status === "waiting") {
|
|
153
|
+
classes.push("waiting");
|
|
154
|
+
const blocker = inst.lastContinuationDecision?.blockedOn;
|
|
155
|
+
reasons.push(`waiting${blocker ? ` on ${blocker}` : " (blocker unrecorded)"}`);
|
|
156
|
+
}
|
|
157
|
+
if (classes.length === 0)
|
|
158
|
+
continue;
|
|
159
|
+
// Affordance by highest-priority class. `route` ships in this same
|
|
160
|
+
// slice (commit 6) — the verbs land together at merge (BR-1 holds
|
|
161
|
+
// at the shipped boundary).
|
|
162
|
+
const affordance = classes.includes("failed")
|
|
163
|
+
? `inspect: rig workflow trace ${inst.instanceId}`
|
|
164
|
+
: classes.includes("stuck")
|
|
165
|
+
? `re-route: rig workflow route ${inst.instanceId} --to <seat>`
|
|
166
|
+
: `resolve the blocker, then the owner projects (rig workflow trace ${inst.instanceId})`;
|
|
167
|
+
attention.push({
|
|
168
|
+
instanceId: inst.instanceId,
|
|
169
|
+
workflowName: inst.workflowName ?? "",
|
|
170
|
+
classes,
|
|
171
|
+
reasons,
|
|
172
|
+
affordance,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
return { counts, attention };
|
|
176
|
+
}
|
|
177
|
+
/** Human render of the rollup — proven-empty, never blank. */
|
|
178
|
+
export function renderStatus(rollup) {
|
|
179
|
+
const c = rollup.counts;
|
|
180
|
+
const lines = [];
|
|
181
|
+
lines.push(`${c.total} instance${c.total === 1 ? "" : "s"}: ${c.active} active · ${c.waiting} waiting · ${c.completed} completed · ${c.failed} failed`);
|
|
182
|
+
if (rollup.attention.length === 0) {
|
|
183
|
+
lines.push("No instances need attention (proven empty — every in-flight instance reads healthy).");
|
|
184
|
+
return lines;
|
|
185
|
+
}
|
|
186
|
+
lines.push("");
|
|
187
|
+
lines.push(`${fitCell("", 2)}${fitCell("INSTANCE", 30)}${fitCell("WORKFLOW", 20)}${fitCell("CLASS", 16)}REASON`);
|
|
188
|
+
for (const row of rollup.attention) {
|
|
189
|
+
lines.push(`${fitCell("▲", 2)}${fitCell(row.instanceId, 30)}${fitCell(row.workflowName, 20)}${fitCell(row.classes.join("+"), 16)}${row.reasons.join("; ")}`);
|
|
190
|
+
lines.push(` ${fitCell("", 2)}└ ${row.affordance}`);
|
|
191
|
+
}
|
|
192
|
+
return lines;
|
|
193
|
+
}
|
|
194
|
+
/** The list table: INSTANCE · WORKFLOW · STATUS · STEP · AGE · ATTN. */
|
|
195
|
+
export function renderInstanceList(instances, nowIso = new Date().toISOString()) {
|
|
196
|
+
if (instances.length === 0)
|
|
197
|
+
return ["No workflow instances."];
|
|
198
|
+
const lines = [];
|
|
199
|
+
lines.push(`${fitCell("", 2)}${fitCell("INSTANCE", 30)}${fitCell("WORKFLOW", 22)}${fitCell("STATUS", 11)}${fitCell("STEP", 20)}${fitCell("AGE", 6)}ATTN`);
|
|
200
|
+
for (const inst of instances) {
|
|
201
|
+
lines.push(`${fitCell(statusGlyph(inst.status), 2)}${fitCell(inst.instanceId, 30)}${fitCell(inst.workflowName ?? "", 22)}${fitCell(inst.status, 11)}${fitCell(inst.currentStepId ?? "-", 20)}${fitCell(humanAge(inst.createdAt, nowIso), 6)}${attentionMarker(inst)}`);
|
|
202
|
+
}
|
|
203
|
+
return lines;
|
|
204
|
+
}
|
|
205
|
+
/** The show summary, headed by the status line. */
|
|
206
|
+
export function renderInstanceShow(instance, nowIso = new Date().toISOString()) {
|
|
207
|
+
const lines = [];
|
|
208
|
+
lines.push(`${statusGlyph(instance.status)} ${instance.instanceId} status=${instance.status}`);
|
|
209
|
+
if (instance.workflowName)
|
|
210
|
+
lines.push(` workflow: ${instance.workflowName}${instance.workflowVersion ? ` v${instance.workflowVersion}` : ""}`);
|
|
211
|
+
// OPR.0.4.6.FAC1: the bound rig renders when present (unbound rows unchanged).
|
|
212
|
+
if (instance.boundRig)
|
|
213
|
+
lines.push(` rig: ${instance.boundRig}`);
|
|
214
|
+
if (instance.createdAt)
|
|
215
|
+
lines.push(` created: ${instance.createdAt}${instance.createdBySession ? ` by ${instance.createdBySession}` : ""} (age ${humanAge(instance.createdAt, nowIso)})`);
|
|
216
|
+
if (instance.currentStepId)
|
|
217
|
+
lines.push(` at step: ${instance.currentStepId} frontier=[${(instance.currentFrontier ?? []).join(", ")}]`);
|
|
218
|
+
if (instance.hopCount !== undefined)
|
|
219
|
+
lines.push(` hops: ${instance.hopCount}`);
|
|
220
|
+
lines.push(` next: rig workflow trace ${instance.instanceId}`);
|
|
221
|
+
return lines;
|
|
222
|
+
}
|
|
223
|
+
//# sourceMappingURL=workflow-render.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-render.js","sourceRoot":"","sources":["../../src/commands/workflow-render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AA2CH,MAAM,YAAY,GAA2B;IAC3C,SAAS,EAAE,GAAG;IACd,MAAM,EAAE,GAA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,QAAQ,CAAC,QAAQ,KAAK,SAAS;QAAE,KAAK,CAAC,IAAI,CAAC,eAAe,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IACpF,KAAK,CAAC,IAAI,CAAC,kCAAkC,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;IACpE,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -22,5 +22,6 @@ export declare const PROJECT_EXIT_KINDS: readonly ["handoff", "waiting", "done",
|
|
|
22
22
|
export type ProjectExitKind = (typeof PROJECT_EXIT_KINDS)[number];
|
|
23
23
|
export declare function isProjectExitKind(value: unknown): value is ProjectExitKind;
|
|
24
24
|
export declare function printOutcomeSummary(json: boolean, status: number, summary: OutcomeSummary | null): void;
|
|
25
|
+
export declare function printWorkflowAdvisories(advisories: string[] | undefined): void;
|
|
25
26
|
export declare function workflowCommand(depsOverride?: WorkflowDeps): Command;
|
|
26
27
|
//# sourceMappingURL=workflow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/commands/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/commands/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAW9C;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,YAAa,SAAQ,UAAU;CAAG;AAwCnD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAOD,eAAO,MAAM,kBAAkB,mDAAoD,CAAC;AACpF,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAE1E;AAWD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI,GAAG,IAAI,CAMvG;AAYD,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG,IAAI,CAK9E;AAED,wBAAgB,eAAe,CAAC,YAAY,CAAC,EAAE,YAAY,GAAG,OAAO,CA8jBpE"}
|
|
@@ -2,6 +2,9 @@ import { Command } from "commander";
|
|
|
2
2
|
import { DaemonClient } from "../client.js";
|
|
3
3
|
import { getDaemonStatus, getDaemonUrl, printDaemonNotRunning } from "../daemon-lifecycle.js";
|
|
4
4
|
import { realDeps } from "./daemon.js";
|
|
5
|
+
import { followInstance } from "./workflow-follow.js";
|
|
6
|
+
import { composeAttentionRollup, renderInstanceList, renderInstanceShow, renderStatus, renderTraceTree, } from "./workflow-render.js";
|
|
7
|
+
import { describeDaemonRejection, formatThreePart } from "./workflow-errors.js";
|
|
5
8
|
async function withClient(deps, fn) {
|
|
6
9
|
const status = await getDaemonStatus(deps.lifecycleDeps);
|
|
7
10
|
if (status.state !== "running" || status.healthy === false) {
|
|
@@ -15,6 +18,20 @@ function printResult(json, body, status) {
|
|
|
15
18
|
if (json) {
|
|
16
19
|
console.log(JSON.stringify(body));
|
|
17
20
|
}
|
|
21
|
+
else if (status >= 400) {
|
|
22
|
+
// WF3 FR-5: named daemon rejections render the house what/why/fix
|
|
23
|
+
// 3-part in human mode; unrecognized bodies keep the raw-JSON
|
|
24
|
+
// fallback. --json (above) stays the RAW body byte-identically;
|
|
25
|
+
// exit codes below are unchanged.
|
|
26
|
+
const rejection = describeDaemonRejection(body);
|
|
27
|
+
if (rejection) {
|
|
28
|
+
for (const line of formatThreePart(rejection))
|
|
29
|
+
process.stderr.write(`${line}\n`);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
console.log(JSON.stringify(body, null, 2));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
18
35
|
else {
|
|
19
36
|
console.log(JSON.stringify(body, null, 2));
|
|
20
37
|
}
|
|
@@ -50,6 +67,19 @@ export function printOutcomeSummary(json, status, summary) {
|
|
|
50
67
|
function asString(value) {
|
|
51
68
|
return typeof value === "string" && value.length > 0 ? value : undefined;
|
|
52
69
|
}
|
|
70
|
+
// OPR.0.4.6.FAC1 (arch ruling 2026-07-07): instantiate-time advisories
|
|
71
|
+
// (currently the spec-default-target.rig degrade-to-unbound notice) MUST
|
|
72
|
+
// be LOUD. Always write to STDERR — even in --json mode the structured
|
|
73
|
+
// body already carries `advisories`, but an operator piping stdout to a
|
|
74
|
+
// consumer still needs to see the warning, so it lands on stderr in both
|
|
75
|
+
// modes. Non-fatal: never sets a non-zero exit code.
|
|
76
|
+
export function printWorkflowAdvisories(advisories) {
|
|
77
|
+
if (!advisories || advisories.length === 0)
|
|
78
|
+
return;
|
|
79
|
+
for (const line of advisories) {
|
|
80
|
+
process.stderr.write(`⚠ workflow advisory: ${line}\n`);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
53
83
|
export function workflowCommand(depsOverride) {
|
|
54
84
|
const cmd = new Command("workflow").description("Daemon-native Workflow Runtime — declarative spec + transactional-scribe step projection (PL-004 Phase D)");
|
|
55
85
|
const getDeps = () => depsOverride ?? {
|
|
@@ -78,6 +108,7 @@ Examples:
|
|
|
78
108
|
.requiredOption("--root-objective <text>", "Root objective for the run")
|
|
79
109
|
.requiredOption("--created-by <session>", "Session creating the instance (canonical <member>@<rig>)")
|
|
80
110
|
.option("--entry-owner <session>", "Override default entry-step owner")
|
|
111
|
+
.option("--rig <name>", "Bind the instance to this rig (overrides the spec's target.rig default; roles resolve to seats on this rig)")
|
|
81
112
|
.option("--json", "JSON output for agents")
|
|
82
113
|
.addHelpText("after", `
|
|
83
114
|
Examples:
|
|
@@ -98,15 +129,18 @@ Examples:
|
|
|
98
129
|
rootObjective: opts.rootObjective,
|
|
99
130
|
createdBySession: opts.createdBy,
|
|
100
131
|
entryOwnerSession: opts.entryOwner,
|
|
132
|
+
targetRig: opts.rig,
|
|
101
133
|
});
|
|
102
134
|
printResult(opts.json ?? false, res.data, res.status);
|
|
135
|
+
printWorkflowAdvisories(res.data?.advisories);
|
|
103
136
|
const body = res.data ?? {};
|
|
104
137
|
const instanceId = asString(body.instanceId) ?? "(no instance id)";
|
|
105
138
|
const entryStepId = asString(body.entryStepId);
|
|
106
139
|
const owner = asString(body.entryOwnerSession) ?? opts.entryOwner ?? "(default from spec)";
|
|
140
|
+
const boundRig = asString(body.instance?.boundRig ?? undefined);
|
|
107
141
|
printOutcomeSummary(opts.json ?? false, res.status, {
|
|
108
142
|
what: `Instantiated workflow from ${specPath} (instance ${instanceId})`,
|
|
109
|
-
state: `${body.status ?? "active"}; entry packet ${entryStepId ?? "pending"} owned by ${owner}`,
|
|
143
|
+
state: `${body.status ?? "active"}${boundRig ? `; bound to rig ${boundRig}` : ""}; entry packet ${entryStepId ?? "pending"} owned by ${owner}`,
|
|
110
144
|
next: entryStepId
|
|
111
145
|
? `Inspect: rig workflow show ${instanceId} | Open packet: rig queue show ${entryStepId}`
|
|
112
146
|
: `Inspect: rig workflow show ${instanceId}`,
|
|
@@ -202,7 +236,15 @@ Examples:
|
|
|
202
236
|
const qs = params.toString();
|
|
203
237
|
await withClient(deps, async (client) => {
|
|
204
238
|
const res = await client.get(`/api/workflow/list${qs ? `?${qs}` : ""}`);
|
|
205
|
-
|
|
239
|
+
// WF3 FR-2: human mode renders the table; --json byte-identical (BR-2).
|
|
240
|
+
if (opts.json || res.status >= 400) {
|
|
241
|
+
printResult(opts.json ?? false, res.data, res.status);
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
const body = res.data;
|
|
245
|
+
const rows = (Array.isArray(body) ? body : body?.instances ?? []);
|
|
246
|
+
for (const line of renderInstanceList(rows))
|
|
247
|
+
console.log(line);
|
|
206
248
|
});
|
|
207
249
|
});
|
|
208
250
|
// List cached workflow_specs (NOT instances). The existing
|
|
@@ -260,7 +302,13 @@ Examples:
|
|
|
260
302
|
const deps = getDeps();
|
|
261
303
|
await withClient(deps, async (client) => {
|
|
262
304
|
const res = await client.get(`/api/workflow/${encodeURIComponent(instanceId)}`);
|
|
263
|
-
|
|
305
|
+
// WF3 FR-2: human summary headed by the status line; --json byte-identical (BR-2).
|
|
306
|
+
if (opts.json || res.status >= 400) {
|
|
307
|
+
printResult(opts.json ?? false, res.data, res.status);
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
for (const line of renderInstanceShow(res.data))
|
|
311
|
+
console.log(line);
|
|
264
312
|
});
|
|
265
313
|
});
|
|
266
314
|
cmd
|
|
@@ -276,14 +324,36 @@ Examples:
|
|
|
276
324
|
const deps = getDeps();
|
|
277
325
|
await withClient(deps, async (client) => {
|
|
278
326
|
const res = await client.get(`/api/workflow/${encodeURIComponent(instanceId)}/trace`);
|
|
279
|
-
|
|
327
|
+
// WF3 FR-2: human mode renders the per-step tree (mini-req 2's
|
|
328
|
+
// one-screen bar); --json byte-identical (BR-2).
|
|
329
|
+
if (opts.json || res.status >= 400 || !res.data?.instance) {
|
|
330
|
+
printResult(opts.json ?? false, res.data, res.status);
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
const instance = res.data.instance;
|
|
334
|
+
const trail = (res.data.trail ?? []);
|
|
335
|
+
for (const line of renderTraceTree(instance, trail))
|
|
336
|
+
console.log(line);
|
|
280
337
|
});
|
|
281
338
|
});
|
|
339
|
+
// OPR.0.4.6.WF1 FR-8 (G6): `continue` RELABELED to its real
|
|
340
|
+
// inspector semantics. The wire has been a read-only frontier+trail
|
|
341
|
+
// inspector since Phase D v1, but the label said "Mechanically
|
|
342
|
+
// advance" and the summary printed "Advanced instance ..." — the
|
|
343
|
+
// label-vs-wire lie dies here. A true mechanical advance would mint
|
|
344
|
+
// a closure without the owner's truthful exit, violating
|
|
345
|
+
// owner-as-author + BR-2 (project is the sole advance write path) —
|
|
346
|
+
// arch-endorsed as architecture, not just wording.
|
|
282
347
|
cmd
|
|
283
348
|
.command("continue <instanceId>")
|
|
284
|
-
.description("
|
|
349
|
+
.description("Inspect an instance's current frontier + step trail (read-only; advancing happens via 'rig workflow project')")
|
|
285
350
|
.option("--json", "JSON output for agents")
|
|
286
351
|
.addHelpText("after", `
|
|
352
|
+
Read-only: reports where the instance is and how it got there so the
|
|
353
|
+
frontier owner can continue truthfully. To actually advance, the packet
|
|
354
|
+
OWNER closes it via:
|
|
355
|
+
$ rig workflow project --instance <id> --current-packet <qitem> --exit <exit> --actor-session <you>
|
|
356
|
+
|
|
287
357
|
Examples:
|
|
288
358
|
$ rig workflow continue WF01ABC
|
|
289
359
|
$ rig workflow continue WF01ABC --json
|
|
@@ -294,19 +364,213 @@ Examples:
|
|
|
294
364
|
const res = await client.post(`/api/workflow/${encodeURIComponent(instanceId)}/continue`, {});
|
|
295
365
|
printResult(opts.json ?? false, res.data, res.status);
|
|
296
366
|
const body = res.data ?? {};
|
|
297
|
-
const
|
|
298
|
-
const
|
|
299
|
-
const
|
|
300
|
-
const
|
|
367
|
+
const status = body.instance?.status ?? "(unknown)";
|
|
368
|
+
const frontier = body.instance?.currentFrontier ?? [];
|
|
369
|
+
const stepId = body.instance?.currentStepId ?? null;
|
|
370
|
+
const trailLen = body.trail?.length ?? 0;
|
|
371
|
+
printOutcomeSummary(opts.json ?? false, res.status, {
|
|
372
|
+
what: `Inspected instance ${instanceId} (read-only; no state changed)`,
|
|
373
|
+
state: `status = ${status}; step = ${stepId ?? "(terminal)"}; frontier = [${frontier.join(", ")}]; trail rows = ${trailLen}`,
|
|
374
|
+
next: frontier.length > 0
|
|
375
|
+
? `The frontier owner advances via: rig workflow project --instance ${instanceId} --current-packet ${frontier[0]} --exit <handoff|waiting|done|failed> --actor-session <owner>`
|
|
376
|
+
: `Terminal or empty frontier - see: rig workflow trace ${instanceId}`,
|
|
377
|
+
});
|
|
378
|
+
});
|
|
379
|
+
});
|
|
380
|
+
// OPR.0.4.6.WF3 FR-1 — the follow verbs. Two verbs, ONE renderer
|
|
381
|
+
// (workflow-follow.ts). BR-1 verb honesty: `run` instantiates AND
|
|
382
|
+
// follows; `watch` ONLY watches — neither advances a step (project
|
|
383
|
+
// remains the sole advance path). Outcome-as-exit-code by default
|
|
384
|
+
// (the kubectl choice): completed=0, workflow-failed=3 (distinct
|
|
385
|
+
// from the shipped 1=4xx / 2=5xx transport codes), so
|
|
386
|
+
// `rig workflow run … && next-thing` is honest in scripts.
|
|
387
|
+
cmd
|
|
388
|
+
.command("run <specPath>")
|
|
389
|
+
.description("Instantiate a workflow AND follow it live to a terminal state (exit 0 completed / 3 failed)")
|
|
390
|
+
.requiredOption("--root-objective <text>", "Root objective for the run")
|
|
391
|
+
.requiredOption("--created-by <session>", "Session creating the instance (canonical <member>@<rig>)")
|
|
392
|
+
.option("--entry-owner <session>", "Override default entry-step owner")
|
|
393
|
+
.option("--rig <name>", "Bind the instance to this rig (overrides the spec's target.rig default; roles resolve to seats on this rig)")
|
|
394
|
+
.option("--json", "Stream events as JSON lines for agents")
|
|
395
|
+
.addHelpText("after", `
|
|
396
|
+
Streams each step event as it happens; exits when the workflow reaches
|
|
397
|
+
a terminal state. Exit codes: 0 = completed, 3 = workflow failed,
|
|
398
|
+
1/2 = transport errors (4xx/5xx). If the event stream drops, the
|
|
399
|
+
command reconnects, then degrades to polling — announced, never a
|
|
400
|
+
silent freeze.
|
|
401
|
+
|
|
402
|
+
Examples:
|
|
403
|
+
$ rig workflow run workflows/conveyor.workflow.md \\
|
|
404
|
+
--root-objective "Ship it" --created-by orch-lead@my-rig
|
|
405
|
+
$ rig workflow run ./spec.yaml --root-objective x --created-by a@b --json
|
|
406
|
+
`)
|
|
407
|
+
.action(async (specPath, opts) => {
|
|
408
|
+
const deps = getDeps();
|
|
409
|
+
await withClient(deps, async (client) => {
|
|
410
|
+
const res = await client.post("/api/workflow/instantiate", {
|
|
411
|
+
specPath,
|
|
412
|
+
rootObjective: opts.rootObjective,
|
|
413
|
+
createdBySession: opts.createdBy,
|
|
414
|
+
entryOwnerSession: opts.entryOwner,
|
|
415
|
+
targetRig: opts.rig,
|
|
416
|
+
});
|
|
417
|
+
printWorkflowAdvisories(res.data?.advisories);
|
|
418
|
+
// The daemon returns the nested InstantiateResult shape
|
|
419
|
+
// ({instance:{instanceId}}); tolerate a flattened {instanceId}
|
|
420
|
+
// too (walk-caught: reading only the flat field made `run`
|
|
421
|
+
// print-and-exit-0 without ever following — the same
|
|
422
|
+
// flattening confusion as the pre-existing instantiate
|
|
423
|
+
// summary polish note from WF-1 rev1-r2).
|
|
424
|
+
const instanceId = asString(res.data?.instance?.instanceId) ?? asString(res.data?.instanceId);
|
|
425
|
+
if (res.status >= 400 || !instanceId) {
|
|
426
|
+
printResult(opts.json ?? false, res.data, res.status);
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
if (!opts.json)
|
|
430
|
+
console.log(`● instance ${instanceId} created — following`);
|
|
431
|
+
const code = await followInstance(client, instanceId, { json: opts.json ?? false });
|
|
432
|
+
if (code !== 0)
|
|
433
|
+
process.exitCode = code;
|
|
434
|
+
});
|
|
435
|
+
});
|
|
436
|
+
cmd
|
|
437
|
+
.command("watch <instanceId>")
|
|
438
|
+
.description("Attach to an in-flight instance and follow it live (read-only; exit mirrors the outcome)")
|
|
439
|
+
.option("--json", "Stream events as JSON lines for agents")
|
|
440
|
+
.addHelpText("after", `
|
|
441
|
+
Read-only: renders the instance's current state (snapshot), then
|
|
442
|
+
streams live events until a terminal state. Attaching to an already
|
|
443
|
+
fast-moving instance is safe — steps that closed before attach render
|
|
444
|
+
from the snapshot exactly once. Exit codes: 0 = completed, 3 =
|
|
445
|
+
workflow failed, 1/2 = transport errors.
|
|
446
|
+
|
|
447
|
+
Examples:
|
|
448
|
+
$ rig workflow watch WF01ABC
|
|
449
|
+
$ rig workflow watch WF01ABC --json
|
|
450
|
+
`)
|
|
451
|
+
.action(async (instanceId, opts) => {
|
|
452
|
+
const deps = getDeps();
|
|
453
|
+
await withClient(deps, async (client) => {
|
|
454
|
+
const code = await followInstance(client, instanceId, { json: opts.json ?? false });
|
|
455
|
+
if (code !== 0)
|
|
456
|
+
process.exitCode = code;
|
|
457
|
+
});
|
|
458
|
+
});
|
|
459
|
+
// OPR.0.4.6.WF3 FR-4 — the ONE WF-3 mutation. BR-1: `route` routes;
|
|
460
|
+
// it NEVER advances a step (hop count untouched; project remains the
|
|
461
|
+
// sole advance path). Exception-lane by usage, not by gate.
|
|
462
|
+
cmd
|
|
463
|
+
.command("route <instanceId>")
|
|
464
|
+
.description("Re-route the current frontier step to a new owner (same step, honest handoff closure; never advances)")
|
|
465
|
+
.requiredOption("--to <session>", "New owner session (canonical <member>@<rig>)")
|
|
466
|
+
.requiredOption("--actor-session <session>", "Session performing the re-route (recorded as provenance)")
|
|
467
|
+
.option("--reason <text>", "Why the step is being re-routed (recorded in the audit trail)")
|
|
468
|
+
.option("--json", "JSON output for agents")
|
|
469
|
+
.addHelpText("after", `
|
|
470
|
+
Use when a step's owner is unresponsive (dead seat, compaction) and the
|
|
471
|
+
work should continue from the SAME step under a new owner. The old
|
|
472
|
+
owner's stale close attempts are structurally rejected afterwards
|
|
473
|
+
(packet_not_on_frontier).
|
|
474
|
+
|
|
475
|
+
Examples:
|
|
476
|
+
$ rig workflow route WF01ABC --to dev2-driver@my-rig \\
|
|
477
|
+
--actor-session orch-lead@my-rig --reason "owner seat dead"
|
|
478
|
+
`)
|
|
479
|
+
.action(async (instanceId, opts) => {
|
|
480
|
+
const deps = getDeps();
|
|
481
|
+
await withClient(deps, async (client) => {
|
|
482
|
+
const res = await client.post(`/api/workflow/${encodeURIComponent(instanceId)}/route`, {
|
|
483
|
+
toSession: opts.to,
|
|
484
|
+
actorSession: opts.actorSession,
|
|
485
|
+
reason: opts.reason,
|
|
486
|
+
});
|
|
487
|
+
printResult(opts.json ?? false, res.data, res.status);
|
|
488
|
+
const body = res.data ?? {};
|
|
301
489
|
printOutcomeSummary(opts.json ?? false, res.status, {
|
|
302
|
-
what:
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
state: `instance status = ${status}${nextId ? `; next owner = ${nextOwner}` : ""}`,
|
|
306
|
-
next: nextId ? `Inspect: rig queue show ${nextId}` : `Inspect: rig workflow trace ${instanceId}`,
|
|
490
|
+
what: `Re-routed step ${body.stepId ?? "?"} from ${body.fromSession ?? "?"} to ${body.toSession ?? opts.to} (packet ${body.closedPacketId ?? "?"} → ${body.newPacketId ?? "?"})`,
|
|
491
|
+
state: `instance ${instanceId} = ${body.instanceStatus ?? "active"}; same step, new owner; no step advanced`,
|
|
492
|
+
next: `The new owner advances via: rig workflow project --instance ${instanceId} --current-packet ${body.newPacketId ?? "<packet>"} --exit <exit> --actor-session ${opts.to}`,
|
|
307
493
|
});
|
|
308
494
|
});
|
|
309
495
|
});
|
|
496
|
+
// OPR.0.4.6.WF5 FR-4 — resume: redrive a FAILED instance from the
|
|
497
|
+
// failed step (BR-1 verb honesty: resume re-drives, it never advances
|
|
498
|
+
// a step itself and never re-runs completed steps; waiting instances
|
|
499
|
+
// resume via the shipped project path, not this verb).
|
|
500
|
+
cmd
|
|
501
|
+
.command("resume <instanceId>")
|
|
502
|
+
.description("Redrive a FAILED instance from its failed step (completed steps never re-run; one fresh max_hops window)")
|
|
503
|
+
.requiredOption("--actor-session <session>", "Session performing the resume (recorded as provenance)")
|
|
504
|
+
.option("--decision <text>", "Durable instruction for the step owner (lands in the redrive packet)")
|
|
505
|
+
.option("--json", "JSON output for agents")
|
|
506
|
+
.addHelpText("after", `
|
|
507
|
+
Use after diagnosing an exception item: the instance returns to active,
|
|
508
|
+
REBOUND to the step that failed, with a fresh packet routed to that
|
|
509
|
+
step's re-resolved owner. The trail is preserved and extended; the
|
|
510
|
+
resolved exception occurrence closes; a NEW failure of the same step
|
|
511
|
+
raises a NEW occurrence honestly.
|
|
512
|
+
|
|
513
|
+
Examples:
|
|
514
|
+
$ rig workflow resume WF01ABC --actor-session orch-lead@my-rig \\
|
|
515
|
+
--decision "flaky fixture fixed in commit abc123 — retry"
|
|
516
|
+
`)
|
|
517
|
+
.action(async (instanceId, opts) => {
|
|
518
|
+
const deps = getDeps();
|
|
519
|
+
await withClient(deps, async (client) => {
|
|
520
|
+
const res = await client.post(`/api/workflow/${encodeURIComponent(instanceId)}/resume`, {
|
|
521
|
+
actorSession: opts.actorSession,
|
|
522
|
+
decision: opts.decision,
|
|
523
|
+
});
|
|
524
|
+
printResult(opts.json ?? false, res.data, res.status);
|
|
525
|
+
const body = res.data ?? {};
|
|
526
|
+
printOutcomeSummary(opts.json ?? false, res.status, {
|
|
527
|
+
what: `Redrove instance ${instanceId} from step ${body.stepId ?? "?"} (redrive #${body.resumeCount ?? "?"}; packet ${body.newPacketId ?? "?"} → ${body.ownerSession ?? "?"}; ${body.exceptionItemsClosed ?? 0} exception item(s) resolved)`,
|
|
528
|
+
state: `instance ${instanceId} = active, rebound to ${body.stepId ?? "?"}; completed steps untouched; fresh max_hops window`,
|
|
529
|
+
next: `The owner advances via: rig workflow project --instance ${instanceId} --current-packet ${body.newPacketId ?? "<packet>"} --exit <exit> --actor-session ${body.ownerSession ?? "<owner>"}`,
|
|
530
|
+
});
|
|
531
|
+
});
|
|
532
|
+
});
|
|
533
|
+
// OPR.0.4.6.WF3 FR-3 part B — the needs-attention rollup. CLI-SIDE
|
|
534
|
+
// composition per the arch ruling (Rev-4 rails): consumes the
|
|
535
|
+
// API-carried instance.deadline classification + instance.status
|
|
536
|
+
// from the SHIPPED read surface; counting/grouping/rendering only —
|
|
537
|
+
// NO threshold or class is ever computed here, NO daemon route was
|
|
538
|
+
// added (the WF-4-era web UI adds a daemon rollup endpoint under its
|
|
539
|
+
// own authorization when it needs one; this verb is not the
|
|
540
|
+
// permanent home of that composition).
|
|
541
|
+
cmd
|
|
542
|
+
.command("status")
|
|
543
|
+
.description("Which instances need attention: counts + one row per failed/stuck/waiting instance with reason + next action (read-only)")
|
|
544
|
+
.option("--json", "Rollup as JSON for agents")
|
|
545
|
+
.addHelpText("after", `
|
|
546
|
+
Answers "what needs me" (list answers "what exists"). Every
|
|
547
|
+
attention-worthy instance appears exactly once with ALL its classes
|
|
548
|
+
(failed / stuck / waiting) and the actionable next step. A clean fleet
|
|
549
|
+
renders the proven-empty statement with counts — never a blank.
|
|
550
|
+
|
|
551
|
+
Examples:
|
|
552
|
+
$ rig workflow status
|
|
553
|
+
$ rig workflow status --json | jq '.attention[] | {instanceId, classes}'
|
|
554
|
+
`)
|
|
555
|
+
.action(async (opts) => {
|
|
556
|
+
const deps = getDeps();
|
|
557
|
+
await withClient(deps, async (client) => {
|
|
558
|
+
const res = await client.get("/api/workflow/list");
|
|
559
|
+
if (res.status >= 400) {
|
|
560
|
+
printResult(opts.json ?? false, res.data, res.status);
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
const body = res.data;
|
|
564
|
+
const rows = (Array.isArray(body) ? body : body?.instances ?? []);
|
|
565
|
+
const rollup = composeAttentionRollup(rows);
|
|
566
|
+
if (opts.json) {
|
|
567
|
+
console.log(JSON.stringify(rollup));
|
|
568
|
+
return;
|
|
569
|
+
}
|
|
570
|
+
for (const line of renderStatus(rollup))
|
|
571
|
+
console.log(line);
|
|
572
|
+
});
|
|
573
|
+
});
|
|
310
574
|
return cmd;
|
|
311
575
|
}
|
|
312
576
|
//# sourceMappingURL=workflow.js.map
|