@openrig/cli 0.4.4 → 0.4.7
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/guidance/CULTURE-default.md +19 -0
- package/daemon/assets/guidance/openrig-start.md +20 -5
- package/daemon/assets/plugins/openrig-core/README.md +1 -1
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +9 -6
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +11 -72
- package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +34 -22
- package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +108 -0
- package/daemon/assets/plugins/openrig-core/skills/mission-slice-sop/SKILL.md +11 -16
- package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +95 -0
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +819 -101
- package/daemon/assets/plugins/openrig-core/skills/queue-handoff/SKILL.md +26 -9
- package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +11 -9
- package/daemon/assets/plugins/openrig-core/skills/session-compaction-and-restore/SKILL.md +162 -0
- package/daemon/assets/plugins/openrig-core/skills/software-for-agents/SKILL.md +165 -0
- package/daemon/dist/adapters/cmux-transport.d.ts.map +1 -1
- package/daemon/dist/adapters/cmux-transport.js +8 -1
- package/daemon/dist/adapters/cmux-transport.js.map +1 -1
- package/daemon/dist/adapters/cmux.d.ts +9 -0
- package/daemon/dist/adapters/cmux.d.ts.map +1 -1
- package/daemon/dist/adapters/cmux.js +21 -0
- package/daemon/dist/adapters/cmux.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +3 -0
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +32 -12
- 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/claude-compaction-enforcer.d.ts +3 -0
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +19 -3
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/cmux-layout-service.d.ts +36 -0
- package/daemon/dist/domain/cmux-layout-service.d.ts.map +1 -1
- package/daemon/dist/domain/cmux-layout-service.js +100 -28
- package/daemon/dist/domain/cmux-layout-service.js.map +1 -1
- package/daemon/dist/domain/context-monitor.d.ts +2 -0
- package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/context-monitor.js +14 -0
- package/daemon/dist/domain/context-monitor.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/feed/attention-aggregator.js +1 -1
- package/daemon/dist/domain/feed/attention-aggregator.js.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 +31 -10
- 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 +55 -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 +56 -4
- package/daemon/dist/domain/hosts/remote-daemon-http.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts +10 -1
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +250 -97
- 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/plugin-vendor-service.d.ts +2 -0
- package/daemon/dist/domain/plugin-vendor-service.d.ts.map +1 -1
- package/daemon/dist/domain/plugin-vendor-service.js +23 -0
- package/daemon/dist/domain/plugin-vendor-service.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/projection-lane.d.ts +7 -0
- package/daemon/dist/domain/projection-lane.d.ts.map +1 -0
- package/daemon/dist/domain/projection-lane.js +28 -0
- package/daemon/dist/domain/projection-lane.js.map +1 -0
- package/daemon/dist/domain/ps-projection.d.ts +19 -0
- package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
- package/daemon/dist/domain/ps-projection.js +81 -30
- package/daemon/dist/domain/ps-projection.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +116 -7
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +226 -16
- 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 +127 -5
- package/daemon/dist/domain/review/compose.d.ts.map +1 -1
- package/daemon/dist/domain/review/compose.js +244 -19
- 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 +17 -2
- package/daemon/dist/domain/review/gather.d.ts.map +1 -1
- package/daemon/dist/domain/review/gather.js +269 -108
- package/daemon/dist/domain/review/gather.js.map +1 -1
- package/daemon/dist/domain/review/proof-io.d.ts +2 -0
- package/daemon/dist/domain/review/proof-io.d.ts.map +1 -0
- package/daemon/dist/domain/review/proof-io.js +38 -0
- package/daemon/dist/domain/review/proof-io.js.map +1 -0
- 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 +26 -2
- 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/scope/plan-lock-artifacts.d.ts +8 -0
- package/daemon/dist/domain/scope/plan-lock-artifacts.d.ts.map +1 -0
- package/daemon/dist/domain/scope/plan-lock-artifacts.js +57 -0
- package/daemon/dist/domain/scope/plan-lock-artifacts.js.map +1 -0
- package/daemon/dist/domain/scope/scaffold-placeholder.d.ts +38 -0
- package/daemon/dist/domain/scope/scaffold-placeholder.d.ts.map +1 -0
- package/daemon/dist/domain/scope/scaffold-placeholder.js +98 -0
- package/daemon/dist/domain/scope/scaffold-placeholder.js.map +1 -0
- package/daemon/dist/domain/scope/scope-approve.d.ts.map +1 -1
- package/daemon/dist/domain/scope/scope-approve.js +22 -1
- package/daemon/dist/domain/scope/scope-approve.js.map +1 -1
- package/daemon/dist/domain/scope/scope-audit.d.ts.map +1 -1
- package/daemon/dist/domain/scope/scope-audit.js +57 -20
- package/daemon/dist/domain/scope/scope-audit.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/session-transport.d.ts +17 -0
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +44 -0
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/slices/qitem-membership.d.ts +17 -0
- package/daemon/dist/domain/slices/qitem-membership.d.ts.map +1 -0
- package/daemon/dist/domain/slices/qitem-membership.js +60 -0
- package/daemon/dist/domain/slices/qitem-membership.js.map +1 -0
- package/daemon/dist/domain/slices/slice-detail-projector.d.ts +5 -0
- package/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-detail-projector.js +161 -16
- package/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.d.ts +86 -0
- package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.js +422 -45
- package/daemon/dist/domain/slices/slice-indexer.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-orchestrator.d.ts +9 -0
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +71 -3
- package/daemon/dist/domain/startup-orchestrator.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 +28 -0
- package/daemon/dist/domain/terminal/cmux-provider-adapter.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/cmux-provider-adapter.js +100 -0
- package/daemon/dist/domain/terminal/cmux-provider-adapter.js.map +1 -0
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts +94 -0
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/herdr-adapter.js +307 -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/transcript-capture.d.ts +3 -0
- package/daemon/dist/domain/transcript-capture.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-capture.js +28 -0
- package/daemon/dist/domain/transcript-capture.js.map +1 -1
- package/daemon/dist/domain/transcript-store.d.ts +10 -0
- package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-store.js +26 -0
- package/daemon/dist/domain/transcript-store.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +38 -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/domain/workspace/default-workspace-scaffold.d.ts.map +1 -1
- package/daemon/dist/domain/workspace/default-workspace-scaffold.js +9 -4
- package/daemon/dist/domain/workspace/default-workspace-scaffold.js.map +1 -1
- package/daemon/dist/domain/workspace/workspace-doctor.js +1 -1
- package/daemon/dist/domain/workspace/workspace-doctor.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/mission-control.js +1 -1
- package/daemon/dist/routes/mission-control.js.map +1 -1
- package/daemon/dist/routes/missions.d.ts +7 -0
- package/daemon/dist/routes/missions.d.ts.map +1 -1
- package/daemon/dist/routes/missions.js +6 -1
- package/daemon/dist/routes/missions.js.map +1 -1
- package/daemon/dist/routes/ps.d.ts.map +1 -1
- package/daemon/dist/routes/ps.js +5 -1
- package/daemon/dist/routes/ps.js.map +1 -1
- 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 +272 -10
- 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/rigs.d.ts.map +1 -1
- package/daemon/dist/routes/rigs.js +21 -10
- package/daemon/dist/routes/rigs.js.map +1 -1
- package/daemon/dist/routes/scope-audit.d.ts.map +1 -1
- package/daemon/dist/routes/scope-audit.js +141 -135
- package/daemon/dist/routes/scope-audit.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/sessions.js +2 -1
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/slices.d.ts.map +1 -1
- package/daemon/dist/routes/slices.js +48 -38
- package/daemon/dist/routes/slices.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/transcripts.d.ts.map +1 -1
- package/daemon/dist/routes/transcripts.js +62 -33
- package/daemon/dist/routes/transcripts.js.map +1 -1
- 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 +235 -12
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/docs/reference/agent-startup-guide.md +1 -0
- package/daemon/specs/agents/apps/vault-specialist/agent.yaml +2 -1
- package/daemon/specs/agents/conveyor/builder/agent.yaml +2 -1
- package/daemon/specs/agents/conveyor/lead/agent.yaml +2 -1
- package/daemon/specs/agents/conveyor/planner/agent.yaml +2 -1
- package/daemon/specs/agents/conveyor/reviewer/agent.yaml +2 -1
- package/daemon/specs/agents/design/product-designer/agent.yaml +12 -2
- package/daemon/specs/agents/development/implementer/agent.yaml +12 -2
- package/daemon/specs/agents/development/qa/agent.yaml +12 -2
- package/daemon/specs/agents/development/qa/guidance/role.md +1 -0
- package/daemon/specs/agents/factory-rsi/dogfood/agent.yaml +30 -0
- package/daemon/specs/agents/factory-rsi/dogfood/guidance/role.md +37 -0
- package/daemon/specs/agents/factory-rsi/release-manager/agent.yaml +30 -0
- package/daemon/specs/agents/factory-rsi/release-manager/guidance/role.md +40 -0
- package/daemon/specs/agents/orchestration/orchestrator/agent.yaml +12 -2
- package/daemon/specs/agents/product-management/pm/agent.yaml +1 -2
- package/daemon/specs/agents/research/analyst/agent.yaml +2 -1
- package/daemon/specs/agents/research/synthesizer/agent.yaml +2 -1
- package/daemon/specs/agents/review/independent-reviewer/agent.yaml +12 -2
- package/daemon/specs/agents/shared/agent.yaml +5 -8
- package/daemon/specs/agents/shared/runtime/claude-settings.fragment.json +13 -1
- package/daemon/specs/agents/shared/skills/core/agent-starters/SKILL.md +132 -0
- package/daemon/{assets/plugins/openrig-core/skills → specs/agents/shared/skills/core}/agent-startup-and-context-ingestion/SKILL.md +27 -19
- package/daemon/specs/agents/shared/skills/core/attention-queue/SKILL.md +264 -0
- package/daemon/specs/agents/shared/skills/core/cross-host-rig-commands/SKILL.md +190 -0
- package/daemon/specs/agents/shared/skills/core/human-in-the-loop/SKILL.md +104 -0
- package/daemon/specs/agents/shared/skills/core/openrig-architect/SKILL.md +25 -8
- package/daemon/specs/agents/shared/skills/core/openrig-cmux/SKILL.md +81 -0
- package/daemon/specs/agents/shared/skills/core/openrig-herdr/SKILL.md +153 -0
- package/daemon/specs/agents/shared/skills/core/openrig-upgrade/SKILL.md +460 -0
- package/daemon/specs/agents/shared/skills/core/rig-bundles-and-shareable-artifacts/SKILL.md +101 -0
- package/daemon/specs/agents/shared/skills/core/rig-lifecycle/SKILL.md +22 -11
- package/daemon/specs/agents/shared/skills/core/session-source-fork/SKILL.md +160 -0
- package/daemon/specs/agents/shared/skills/core/specification-system/SKILL.md +103 -0
- package/daemon/specs/agents/shared/skills/core/topology-mutation-and-seat-management/SKILL.md +118 -0
- package/daemon/specs/agents/shared/skills/core/watchdog/SKILL.md +125 -0
- package/daemon/specs/agents/shared/skills/pods/orchestration-team/SKILL.md +4 -4
- package/daemon/specs/agents/shared/skills/pods/review-team/SKILL.md +3 -0
- package/daemon/specs/agents/shared/skills/process/brainstorming/OPENRIG.md +3 -3
- package/daemon/specs/agents/shared/skills/process/executing-plans/OPENRIG.md +1 -1
- package/daemon/specs/agents/shared/skills/process/frontend-design/SKILL.md +6 -3
- package/daemon/specs/agents/shared/skills/process/test-driven-development/SKILL.md +1 -1
- package/daemon/specs/agents/shared/skills/process/using-superpowers/OPENRIG.md +1 -1
- package/daemon/specs/agents/shared/skills/process/verification-before-completion/SKILL.md +12 -2
- package/daemon/specs/agents/shared/skills/process/writing-plans/OPENRIG.md +1 -1
- package/daemon/specs/rigs/focused/pm-team/CULTURE.md +1 -1
- package/daemon/specs/rigs/launch/factory-rsi/CULTURE.md +47 -0
- package/daemon/specs/rigs/launch/factory-rsi/rig.yaml +115 -0
- package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/agent.yaml +2 -2
- package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/guidance/role.md +5 -4
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/agent.yaml +2 -2
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +3 -5
- package/daemon/specs/rigs/launch/kernel/agents/queue/worker/agent.yaml +2 -2
- package/daemon/specs/rigs/launch/kernel/culture/CULTURE.md +3 -4
- package/daemon/specs/rigs/preview/product-team/CULTURE.md +1 -1
- package/dist/bin-wrapper.d.ts.map +1 -1
- package/dist/bin-wrapper.js +3 -1
- package/dist/bin-wrapper.js.map +1 -1
- package/dist/build-info.js +3 -3
- package/dist/cli-error.d.ts +33 -0
- package/dist/cli-error.d.ts.map +1 -0
- package/dist/cli-error.js +94 -0
- package/dist/cli-error.js.map +1 -0
- 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-init-workspace.js +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/doctor.d.ts +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +17 -11
- package/dist/commands/doctor.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 +361 -23
- 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/proof.js +1 -1
- package/dist/commands/proof.js.map +1 -1
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +26 -6
- 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 +176 -31
- 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/rig.d.ts.map +1 -1
- package/dist/commands/rig.js +122 -0
- package/dist/commands/rig.js.map +1 -1
- package/dist/commands/scope.js +2 -2
- package/dist/commands/scope.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +229 -30
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/slack.d.ts +37 -0
- package/dist/commands/slack.d.ts.map +1 -0
- package/dist/commands/slack.js +274 -0
- package/dist/commands/slack.js.map +1 -0
- 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/ui.d.ts +1 -0
- package/dist/commands/ui.d.ts.map +1 -1
- package/dist/commands/ui.js +2 -0
- package/dist/commands/ui.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +10 -1
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +14 -3
- 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/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +45 -14
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/host-registry.d.ts +14 -1
- package/dist/host-registry.d.ts.map +1 -1
- package/dist/host-registry.js +47 -6
- 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 +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/scope/scaffold-placeholder.d.ts +38 -0
- package/dist/lib/scope/scaffold-placeholder.d.ts.map +1 -0
- package/dist/lib/scope/scaffold-placeholder.js +98 -0
- package/dist/lib/scope/scaffold-placeholder.js.map +1 -0
- package/dist/lib/scope/scope-audit.d.ts.map +1 -1
- package/dist/lib/scope/scope-audit.js +57 -20
- package/dist/lib/scope/scope-audit.js.map +1 -1
- package/dist/lib/scope-templates/backlog-deprecation.md +1 -1
- package/dist/lib/scope-templates/backlog-tech-debt.md +1 -1
- package/dist/lib/scope-templates/bug-fix.md +1 -1
- package/dist/lib/scope-templates/implementation-prd.md +1 -1
- package/dist/lib/scope-templates/mission-notes.md +7 -2
- package/dist/lib/scope-templates/mission-placeholder.md +1 -1
- package/dist/lib/scope-templates/mission-progress.md +1 -1
- package/dist/lib/scope-templates/mission-release.md +1 -1
- package/dist/lib/scope-templates/placeholder.md +1 -1
- package/dist/lib/scope-templates/proof.md +1 -1
- package/dist/lib/scope-templates/release-feature.md +1 -1
- package/dist/lib/scope-templates/research.md +1 -1
- package/dist/lib/scope-templates/slice-progress.md +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 +13 -6
- 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/dist/slack/config.d.ts +41 -0
- package/dist/slack/config.d.ts.map +1 -0
- package/dist/slack/config.js +60 -0
- package/dist/slack/config.js.map +1 -0
- package/dist/slack/inbound.d.ts +75 -0
- package/dist/slack/inbound.d.ts.map +1 -0
- package/dist/slack/inbound.js +133 -0
- package/dist/slack/inbound.js.map +1 -0
- package/dist/slack/message.d.ts +26 -0
- package/dist/slack/message.d.ts.map +1 -0
- package/dist/slack/message.js +60 -0
- package/dist/slack/message.js.map +1 -0
- package/dist/slack/outbound.d.ts +39 -0
- package/dist/slack/outbound.d.ts.map +1 -0
- package/dist/slack/outbound.js +52 -0
- package/dist/slack/outbound.js.map +1 -0
- package/dist/slack/queue-bridge.d.ts +56 -0
- package/dist/slack/queue-bridge.d.ts.map +1 -0
- package/dist/slack/queue-bridge.js +114 -0
- package/dist/slack/queue-bridge.js.map +1 -0
- package/dist/slack/secrets.d.ts +21 -0
- package/dist/slack/secrets.d.ts.map +1 -0
- package/dist/slack/secrets.js +73 -0
- package/dist/slack/secrets.js.map +1 -0
- package/dist/slack/slack-api.d.ts +49 -0
- package/dist/slack/slack-api.d.ts.map +1 -0
- package/dist/slack/slack-api.js +110 -0
- package/dist/slack/slack-api.js.map +1 -0
- package/dist/slack/state-store.d.ts +62 -0
- package/dist/slack/state-store.d.ts.map +1 -0
- package/dist/slack/state-store.js +132 -0
- package/dist/slack/state-store.js.map +1 -0
- package/package.json +1 -1
- package/ui/dist/assets/index-DkNi0RT8.js +623 -0
- package/ui/dist/assets/index-N-SdPj-I.css +32 -0
- package/ui/dist/index.html +2 -2
- package/daemon/assets/plugins/openrig-core/skills/openrig-architect/SKILL.md +0 -361
- package/daemon/assets/plugins/openrig-core/skills/openrig-operator/SKILL.md +0 -222
- package/daemon/docs/reference/product-factory-vps-runbook.md +0 -132
- package/daemon/specs/agents/shared/skills/core/mission-slice-sop/SKILL.md +0 -115
- package/daemon/specs/agents/shared/skills/core/openrig-installer/SKILL.md +0 -142
- package/daemon/specs/agents/shared/skills/core/openrig-operator/SKILL.md +0 -110
- package/daemon/specs/agents/shared/skills/core/openrig-user/SKILL.md +0 -1245
- package/daemon/specs/agents/shared/skills/core/openrig-user-settings/SKILL.md +0 -153
- package/ui/dist/assets/index-D69ZhNIr.js +0 -598
- package/ui/dist/assets/index-DJYun-8d.css +0 -32
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OPR.0.4.6.WF3 FR-1 — the shared follow engine behind `rig workflow
|
|
3
|
+
* run` and `rig workflow watch`: two verbs, ONE renderer (the argo
|
|
4
|
+
* shape: same render at attach and live).
|
|
5
|
+
*
|
|
6
|
+
* Transport: the SHIPPED workflow SSE endpoint (`GET
|
|
7
|
+
* /api/workflow/sse`) consumed with the in-repo chatroom reader
|
|
8
|
+
* pattern (fetch + event-stream line decode). Zero daemon changes
|
|
9
|
+
* (BR-2) — this file only reads.
|
|
10
|
+
*
|
|
11
|
+
* Attach race (arch R2, snapshot-first-then-stream): the stream is
|
|
12
|
+
* OPENED first, then a state snapshot (`/trace`) is rendered, then
|
|
13
|
+
* live events flow. Events that duplicate a trail row already in the
|
|
14
|
+
* snapshot are deduped by priorQitemId, so fast early steps that
|
|
15
|
+
* close before attach are still shown exactly once.
|
|
16
|
+
*
|
|
17
|
+
* Exit codes (arch n1 — outcome codes DISTINCT from error codes):
|
|
18
|
+
* 0 = workflow completed
|
|
19
|
+
* 3 = workflow FAILED (the outcome-as-exit-code kubectl default —
|
|
20
|
+
* a workflow that fails is a command that fails; never collides
|
|
21
|
+
* with the shipped 1=4xx / 2=5xx transport codes)
|
|
22
|
+
*/
|
|
23
|
+
export const EXIT_WORKFLOW_FAILED = 3;
|
|
24
|
+
/** Terminal statuses a follow run resolves on. */
|
|
25
|
+
const TERMINAL_STATUSES = new Set(["completed", "failed"]);
|
|
26
|
+
export function realFollowIo() {
|
|
27
|
+
return {
|
|
28
|
+
out: (line) => console.log(line),
|
|
29
|
+
err: (line) => process.stderr.write(`${line}\n`),
|
|
30
|
+
sleep: (ms) => new Promise((resolve) => setTimeout(resolve, ms)),
|
|
31
|
+
fetchImpl: fetch,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
const STATUS_GLYPH = {
|
|
35
|
+
completed: "✔",
|
|
36
|
+
failed: "✖",
|
|
37
|
+
active: "●",
|
|
38
|
+
waiting: "◐",
|
|
39
|
+
};
|
|
40
|
+
function glyphFor(status) {
|
|
41
|
+
return STATUS_GLYPH[status] ?? "●";
|
|
42
|
+
}
|
|
43
|
+
function renderTrailRow(row) {
|
|
44
|
+
const exitGlyph = row.closureReason === "failed" ? "✖" : "✔";
|
|
45
|
+
const next = row.nextQitemId ? ` → ${row.nextQitemId}` : "";
|
|
46
|
+
return ` ${exitGlyph} ${row.stepId} ${row.closureReason} by ${row.actorSession}${next}`;
|
|
47
|
+
}
|
|
48
|
+
function renderEvent(event) {
|
|
49
|
+
switch (event.type) {
|
|
50
|
+
case "workflow.instantiated":
|
|
51
|
+
return ` ● instance ${event.instanceId ?? ""} created${event.workflowName ? ` (${event.workflowName})` : ""}`;
|
|
52
|
+
case "workflow.step_closed":
|
|
53
|
+
return ` ${event.closureReason === "failed" ? "✖" : "✔"} ${event.stepId ?? "(step)"} ${event.closureReason ?? ""} by ${event.actorSession ?? "(unknown)"}`;
|
|
54
|
+
case "workflow.next_qitem_projected":
|
|
55
|
+
return ` → ${event.nextStepId ?? "(next)"} owner ${event.nextOwner ?? "(unresolved)"} packet ${event.nextQitemId ?? ""}`;
|
|
56
|
+
case "workflow.completed":
|
|
57
|
+
return ` ✔ workflow completed`;
|
|
58
|
+
case "workflow.failed":
|
|
59
|
+
return ` ✖ workflow FAILED: ${event.reason ?? "(no reason recorded)"}`;
|
|
60
|
+
default:
|
|
61
|
+
// routing_table_changed and future additive types render as a
|
|
62
|
+
// neutral one-liner rather than being silently dropped.
|
|
63
|
+
return ` · ${event.type}`;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/** Outcome → process exit code, per the FR-1 contract. */
|
|
67
|
+
export function outcomeExitCode(status) {
|
|
68
|
+
if (status === "failed")
|
|
69
|
+
return EXIT_WORKFLOW_FAILED;
|
|
70
|
+
return 0;
|
|
71
|
+
}
|
|
72
|
+
async function fetchSnapshot(client, instanceId) {
|
|
73
|
+
const res = await client.get(`/api/workflow/${encodeURIComponent(instanceId)}/trace`);
|
|
74
|
+
if (res.status >= 400 || !res.data?.instance) {
|
|
75
|
+
return { ok: false, status: res.status, body: res.data };
|
|
76
|
+
}
|
|
77
|
+
return { ok: true, snapshot: { instance: res.data.instance, trail: res.data.trail ?? [] } };
|
|
78
|
+
}
|
|
79
|
+
function renderSnapshot(snapshot, io, json) {
|
|
80
|
+
if (json) {
|
|
81
|
+
io.out(JSON.stringify({ type: "snapshot", instance: snapshot.instance, trail: snapshot.trail }));
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const inst = snapshot.instance;
|
|
85
|
+
io.out(`${glyphFor(inst.status)} ${inst.instanceId}${inst.workflowName ? ` ${inst.workflowName}` : ""} status=${inst.status}`);
|
|
86
|
+
for (const row of snapshot.trail)
|
|
87
|
+
io.out(renderTrailRow(row));
|
|
88
|
+
if (inst.currentStepId) {
|
|
89
|
+
io.out(` ▸ at step ${inst.currentStepId} frontier=[${(inst.currentFrontier ?? []).join(", ")}]`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Follow one instance to a terminal state. Returns the exit code the
|
|
94
|
+
* caller should set (0 completed / 3 failed / 1 transport-4xx / 2
|
|
95
|
+
* transport-5xx). Never throws for stream drops — those degrade
|
|
96
|
+
* honestly (reconnect notice → poll-fallback notice), per the
|
|
97
|
+
* chatroom precedent: the render may fall back, it never freezes
|
|
98
|
+
* silently.
|
|
99
|
+
*/
|
|
100
|
+
export async function followInstance(client, instanceId, opts) {
|
|
101
|
+
const io = opts.io ?? realFollowIo();
|
|
102
|
+
const maxReconnects = opts.maxReconnects ?? 3;
|
|
103
|
+
const pollIntervalMs = opts.pollIntervalMs ?? 3000;
|
|
104
|
+
// Walk-caught (VM iteration 2): without aborting the SSE connection
|
|
105
|
+
// on return, the open socket keeps the node event loop alive and the
|
|
106
|
+
// process hangs ~minutes after the terminal event before exiting —
|
|
107
|
+
// a kubectl-style verb must exit PROMPTLY on outcome. Every return
|
|
108
|
+
// path aborts via the finally below.
|
|
109
|
+
const aborter = new AbortController();
|
|
110
|
+
try {
|
|
111
|
+
// 1. Open the stream FIRST (arch R2) so no event can fall between
|
|
112
|
+
// snapshot and attach. Events are buffered by the reader until
|
|
113
|
+
// the snapshot has rendered.
|
|
114
|
+
const sseUrl = `${client.baseUrl}/api/workflow/sse`;
|
|
115
|
+
let streamRes = null;
|
|
116
|
+
try {
|
|
117
|
+
streamRes = await io.fetchImpl(sseUrl, {
|
|
118
|
+
headers: { Accept: "text/event-stream" },
|
|
119
|
+
signal: aborter.signal,
|
|
120
|
+
});
|
|
121
|
+
if (!streamRes.ok || !streamRes.body)
|
|
122
|
+
streamRes = null;
|
|
123
|
+
}
|
|
124
|
+
catch {
|
|
125
|
+
streamRes = null;
|
|
126
|
+
}
|
|
127
|
+
// 2. Snapshot + render.
|
|
128
|
+
const snap = await fetchSnapshot(client, instanceId);
|
|
129
|
+
if (!snap.ok) {
|
|
130
|
+
io.out(JSON.stringify(snap.body ?? { error: "trace_failed" }, null, opts.json ? 0 : 2));
|
|
131
|
+
return snap.status >= 500 ? 2 : 1;
|
|
132
|
+
}
|
|
133
|
+
renderSnapshot(snap.snapshot, io, opts.json);
|
|
134
|
+
if (TERMINAL_STATUSES.has(snap.snapshot.instance.status)) {
|
|
135
|
+
return outcomeExitCode(snap.snapshot.instance.status);
|
|
136
|
+
}
|
|
137
|
+
// Dedup guard: trail rows already rendered by the snapshot must not
|
|
138
|
+
// re-render when the (already-open) stream replays their events.
|
|
139
|
+
const seenClosures = new Set(snap.snapshot.trail.map((row) => row.priorQitemId));
|
|
140
|
+
let reconnectsLeft = maxReconnects;
|
|
141
|
+
// 3. Stream loop with honest degradation.
|
|
142
|
+
while (true) {
|
|
143
|
+
if (streamRes?.body) {
|
|
144
|
+
const outcome = await consumeStream(streamRes.body, instanceId, seenClosures, io, opts.json);
|
|
145
|
+
if (outcome !== null)
|
|
146
|
+
return outcome;
|
|
147
|
+
// Stream ended without a terminal event — the drop path.
|
|
148
|
+
streamRes = null;
|
|
149
|
+
}
|
|
150
|
+
if (reconnectsLeft > 0) {
|
|
151
|
+
reconnectsLeft -= 1;
|
|
152
|
+
io.err(`stream dropped — reconnecting (${maxReconnects - reconnectsLeft}/${maxReconnects})`);
|
|
153
|
+
try {
|
|
154
|
+
const retry = await io.fetchImpl(sseUrl, {
|
|
155
|
+
headers: { Accept: "text/event-stream" },
|
|
156
|
+
signal: aborter.signal,
|
|
157
|
+
});
|
|
158
|
+
if (retry.ok && retry.body) {
|
|
159
|
+
streamRes = retry;
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
catch {
|
|
164
|
+
// fall through to next reconnect / poll fallback
|
|
165
|
+
}
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
// 4. Poll fallback — announced, never silent (the chatroom rule).
|
|
169
|
+
io.err(`stream unavailable — degrading to poll fallback every ${Math.round(pollIntervalMs / 1000)}s`);
|
|
170
|
+
while (true) {
|
|
171
|
+
await io.sleep(pollIntervalMs);
|
|
172
|
+
const poll = await fetchSnapshot(client, instanceId);
|
|
173
|
+
if (!poll.ok) {
|
|
174
|
+
io.out(JSON.stringify(poll.body ?? { error: "poll_failed" }, null, opts.json ? 0 : 2));
|
|
175
|
+
return poll.status >= 500 ? 2 : 1;
|
|
176
|
+
}
|
|
177
|
+
// Render only trail rows not yet seen, preserving exactly-once.
|
|
178
|
+
for (const row of poll.snapshot.trail) {
|
|
179
|
+
if (seenClosures.has(row.priorQitemId))
|
|
180
|
+
continue;
|
|
181
|
+
seenClosures.add(row.priorQitemId);
|
|
182
|
+
if (opts.json)
|
|
183
|
+
io.out(JSON.stringify({ type: "trail", row }));
|
|
184
|
+
else
|
|
185
|
+
io.out(renderTrailRow(row));
|
|
186
|
+
}
|
|
187
|
+
if (TERMINAL_STATUSES.has(poll.snapshot.instance.status)) {
|
|
188
|
+
if (opts.json)
|
|
189
|
+
io.out(JSON.stringify({ type: "terminal", status: poll.snapshot.instance.status }));
|
|
190
|
+
else
|
|
191
|
+
io.out(` ${glyphFor(poll.snapshot.instance.status)} workflow ${poll.snapshot.instance.status}`);
|
|
192
|
+
return outcomeExitCode(poll.snapshot.instance.status);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
finally {
|
|
198
|
+
// Kill the SSE socket so the process exits promptly on outcome
|
|
199
|
+
// (the walk-caught hang: an un-aborted keep-alive held the event
|
|
200
|
+
// loop open for minutes after workflow.completed).
|
|
201
|
+
aborter.abort();
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Consume one SSE body until a terminal event for the instance (→
|
|
206
|
+
* exit code) or stream end (→ null: caller reconnects/degrades).
|
|
207
|
+
*/
|
|
208
|
+
async function consumeStream(body, instanceId, seenClosures, io, json) {
|
|
209
|
+
const reader = body.getReader();
|
|
210
|
+
const decoder = new TextDecoder();
|
|
211
|
+
let buffer = "";
|
|
212
|
+
try {
|
|
213
|
+
while (true) {
|
|
214
|
+
const { done, value } = await reader.read();
|
|
215
|
+
if (done)
|
|
216
|
+
return null;
|
|
217
|
+
buffer += decoder.decode(value, { stream: true });
|
|
218
|
+
const lines = buffer.split("\n");
|
|
219
|
+
buffer = lines.pop() ?? "";
|
|
220
|
+
for (const line of lines) {
|
|
221
|
+
if (!line.startsWith("data:"))
|
|
222
|
+
continue;
|
|
223
|
+
let event;
|
|
224
|
+
try {
|
|
225
|
+
event = JSON.parse(line.slice(5).trim());
|
|
226
|
+
}
|
|
227
|
+
catch {
|
|
228
|
+
continue; // malformed data line — skip (chatroom precedent)
|
|
229
|
+
}
|
|
230
|
+
if (event.instanceId !== instanceId)
|
|
231
|
+
continue;
|
|
232
|
+
if (event.type === "workflow.step_closed" && typeof event.priorQitemId === "string") {
|
|
233
|
+
if (seenClosures.has(event.priorQitemId))
|
|
234
|
+
continue; // snapshot already showed it
|
|
235
|
+
seenClosures.add(event.priorQitemId);
|
|
236
|
+
}
|
|
237
|
+
if (json) {
|
|
238
|
+
io.out(JSON.stringify(event));
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
const rendered = renderEvent(event);
|
|
242
|
+
if (rendered !== null)
|
|
243
|
+
io.out(rendered);
|
|
244
|
+
}
|
|
245
|
+
if (event.type === "workflow.completed")
|
|
246
|
+
return 0;
|
|
247
|
+
if (event.type === "workflow.failed")
|
|
248
|
+
return EXIT_WORKFLOW_FAILED;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
catch {
|
|
253
|
+
return null; // read error = drop; caller handles honestly
|
|
254
|
+
}
|
|
255
|
+
finally {
|
|
256
|
+
reader.releaseLock();
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
//# sourceMappingURL=workflow-follow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-follow.js","sourceRoot":"","sources":["../../src/commands/workflow-follow.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAEtC,kDAAkD;AAClD,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;AA8C3D,MAAM,UAAU,YAAY;IAC1B,OAAO;QACL,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;QAChC,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC;QAChD,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QAChE,SAAS,EAAE,KAAK;KACjB,CAAC;AACJ,CAAC;AAWD,MAAM,YAAY,GAA2B;IAC3C,SAAS,EAAE,GAAG;IACd,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,GAAG;IACX,OAAO,EAAE,GAAG;CACb,CAAC;AAEF,SAAS,QAAQ,CAAC,MAAc;IAC9B,OAAO,YAAY,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC;AACrC,CAAC;AAED,SAAS,cAAc,CAAC,GAAmB;IACzC,MAAM,SAAS,GAAG,GAAG,CAAC,aAAa,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC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YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;gBACvC,CAAC;gBACD,IAAI,IAAI,EAAE,CAAC;oBACT,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;gBAChC,CAAC;qBAAM,CAAC;oBACN,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;oBACpC,IAAI,QAAQ,KAAK,IAAI;wBAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;gBAC1C,CAAC;gBACD,IAAI,KAAK,CAAC,IAAI,KAAK,oBAAoB;oBAAE,OAAO,CAAC,CAAC;gBAClD,IAAI,KAAK,CAAC,IAAI,KAAK,iBAAiB;oBAAE,OAAO,oBAAoB,CAAC;YACpE,CAAC;QACH,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC,CAAC,6CAA6C;IAC5D,CAAC;YAAS,CAAC;QACT,MAAM,CAAC,WAAW,EAAE,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
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
|
+
export interface RenderInstance {
|
|
18
|
+
instanceId: string;
|
|
19
|
+
workflowName?: string;
|
|
20
|
+
workflowVersion?: string;
|
|
21
|
+
status: string;
|
|
22
|
+
createdBySession?: string;
|
|
23
|
+
createdAt?: string;
|
|
24
|
+
currentStepId?: string | null;
|
|
25
|
+
currentFrontier?: string[];
|
|
26
|
+
hopCount?: number;
|
|
27
|
+
/** OPR.0.4.6.FAC1: the instance's bound rig (API-carried; null/absent = unbound, renders nothing). */
|
|
28
|
+
boundRig?: string | null;
|
|
29
|
+
/**
|
|
30
|
+
* WF-1 FR-2's API-carried classification (present since the
|
|
31
|
+
* completion fixback at 384e60f1). RAIL 1 (arch ruling): the CLI
|
|
32
|
+
* CONSUMES this verbatim and never recomputes a threshold or class.
|
|
33
|
+
*/
|
|
34
|
+
deadline?: {
|
|
35
|
+
state: string;
|
|
36
|
+
evidence?: {
|
|
37
|
+
stepId?: string | null;
|
|
38
|
+
ownerSession?: string;
|
|
39
|
+
overdueBySeconds?: number;
|
|
40
|
+
ageSeconds?: number;
|
|
41
|
+
} | null;
|
|
42
|
+
};
|
|
43
|
+
/** Present on waiting instances that recorded their park decision. */
|
|
44
|
+
lastContinuationDecision?: {
|
|
45
|
+
blockedOn?: string | null;
|
|
46
|
+
} | null;
|
|
47
|
+
}
|
|
48
|
+
export interface RenderTrailRow {
|
|
49
|
+
stepId: string;
|
|
50
|
+
stepRole?: string;
|
|
51
|
+
closedAt?: string;
|
|
52
|
+
closureReason: string;
|
|
53
|
+
closureEvidence?: Record<string, unknown> | null;
|
|
54
|
+
actorSession: string;
|
|
55
|
+
nextQitemId?: string | null;
|
|
56
|
+
priorQitemId?: string;
|
|
57
|
+
}
|
|
58
|
+
export declare function statusGlyph(status: string): string;
|
|
59
|
+
/** Compact human duration between two ISO timestamps ("3s", "4m", "2h", "5d"). */
|
|
60
|
+
export declare function humanDuration(fromIso: string | undefined, toIso: string | undefined): string;
|
|
61
|
+
/** Instance age relative to a supplied "now" (injectable for tests). */
|
|
62
|
+
export declare function humanAge(createdAt: string | undefined, nowIso: string): string;
|
|
63
|
+
/** Compact render of a plain seconds quantity (same scale rules). */
|
|
64
|
+
export declare function humanSeconds(seconds: number): string;
|
|
65
|
+
/**
|
|
66
|
+
* The trace tree (mini-req 2's bar: where it is + how it got there,
|
|
67
|
+
* one screen, no JSON literacy required).
|
|
68
|
+
*/
|
|
69
|
+
export declare function renderTraceTree(instance: RenderInstance, trail: RenderTrailRow[], nowIso?: string): string[];
|
|
70
|
+
/**
|
|
71
|
+
* OPR.0.4.6.WF3 FR-3 — the attention marker for a list row (the
|
|
72
|
+
* single marker home). Classes: failed · stuck (consumed VERBATIM
|
|
73
|
+
* from the API-carried deadline classification — rail 1: the CLI
|
|
74
|
+
* never recomputes a threshold or class) · waiting. A row shows its
|
|
75
|
+
* highest-priority class; the `status` verb shows ALL classes per
|
|
76
|
+
* instance (exactly-once, combined reasons).
|
|
77
|
+
*/
|
|
78
|
+
export declare function attentionMarker(instance: RenderInstance): string;
|
|
79
|
+
export interface AttentionRow {
|
|
80
|
+
instanceId: string;
|
|
81
|
+
workflowName: string;
|
|
82
|
+
/** All classes for this instance — exactly-once row, combined. */
|
|
83
|
+
classes: string[];
|
|
84
|
+
reasons: string[];
|
|
85
|
+
/** The actionable affordance (what-to-do-next), per class priority. */
|
|
86
|
+
affordance: string;
|
|
87
|
+
}
|
|
88
|
+
export interface AttentionRollup {
|
|
89
|
+
counts: {
|
|
90
|
+
total: number;
|
|
91
|
+
active: number;
|
|
92
|
+
waiting: number;
|
|
93
|
+
completed: number;
|
|
94
|
+
failed: number;
|
|
95
|
+
};
|
|
96
|
+
attention: AttentionRow[];
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Compose the rollup from list rows. Pure arithmetic over
|
|
100
|
+
* pre-classified rows (the arch ruling's boundary: counting +
|
|
101
|
+
* grouping + rendering is render-side; the ONE correctness-rule
|
|
102
|
+
* composition — the threshold classification — arrives ALREADY DONE
|
|
103
|
+
* in instance.deadline). Per-instance dedup by instanceId (rail 2):
|
|
104
|
+
* an instance with multiple attention reasons renders ONCE with all
|
|
105
|
+
* of them.
|
|
106
|
+
*/
|
|
107
|
+
export declare function composeAttentionRollup(instances: RenderInstance[]): AttentionRollup;
|
|
108
|
+
/** Human render of the rollup — proven-empty, never blank. */
|
|
109
|
+
export declare function renderStatus(rollup: AttentionRollup): string[];
|
|
110
|
+
/** The list table: INSTANCE · WORKFLOW · STATUS · STEP · AGE · ATTN. */
|
|
111
|
+
export declare function renderInstanceList(instances: RenderInstance[], nowIso?: string): string[];
|
|
112
|
+
/** The show summary, headed by the status line. */
|
|
113
|
+
export declare function renderInstanceShow(instance: RenderInstance, nowIso?: string): string[];
|
|
114
|
+
//# sourceMappingURL=workflow-render.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-render.d.ts","sourceRoot":"","sources":["../../src/commands/workflow-render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sGAAsG;IACtG,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;;;OAIG;IACH,QAAQ,CAAC,EAAE;QACT,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE;YACT,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;YACvB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AW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,uEAAuE;IACvE,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9F,SAAS,EAAE,YAAY,EAAE,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,cAAc,EAAE,GAAG,eAAe,CA6CnF;AAED,8DAA8D;AAC9D,wBAAgB,YAAY,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,EAAE,CAmB9D;AAED,wEAAwE;AACxE,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,cAAc,EAAE,EAC3B,MAAM,GAAE,MAAiC,GACxC,MAAM,EAAE,CAUV;AAED,mDAAmD;AACnD,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,cAAc,EACxB,MAAM,GAAE,MAAiC,GACxC,MAAM,EAAE,CAWV"}
|
|
@@ -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,GAAG;IACX,MAAM,EAAE,GAAG;IACX,OAAO,EAAE,GAAG;CACb,CAAC;AAEF,MAAM,UAAU,WAAW,CAAC,MAAc;IACxC,OAAO,YAAY,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC;AACrC,CAAC;AAED,SAAS,QAAQ,CAAC,CAAS,EAAE,GAAW;IACtC,OAAO,CAAC,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACxD,CAAC;AAED,SAAS,OAAO,CAAC,KAAa,EAAE,KAAa;IAC3C,OAAO,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC9C,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,aAAa,CAAC,OAA2B,EAAE,KAAyB;IAClF,IAAI,CAAC,OAAO,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IAClC,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACnD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC;QAAE,OAAO,EAAE,CAA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AAG,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC,OAAO,QAAQ,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,QAAQ,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;IAC7L,IAAI,QAAQ,CAAC,aAAa;QAAE,KAAK,CAAC,IAAI,CAAC,eAAe,QAAQ,CAAC,aAAa,eAAe,CAAC,QAAQ,CAAC,eAAe,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3I,IAAI,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"}
|