@ryanfw/prompt-orchestration-pipeline 0.17.5 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -10
- package/package.json +23 -18
- package/src/api/index.ts +61 -0
- package/src/api/validators/json.ts +67 -0
- package/src/cli/__tests__/analyze-task.test.ts +51 -0
- package/src/cli/__tests__/constants.test.ts +33 -0
- package/src/cli/__tests__/index.test.ts +386 -0
- package/src/cli/__tests__/self-reexec.test.ts +26 -0
- package/src/cli/__tests__/types.test.ts +56 -0
- package/src/cli/__tests__/update-pipeline-json.test.ts +67 -0
- package/src/cli/analyze-task.ts +33 -0
- package/src/cli/constants.ts +33 -0
- package/src/cli/index.ts +505 -0
- package/src/cli/self-reexec.ts +25 -0
- package/src/cli/types.ts +29 -0
- package/src/cli/update-pipeline-json.ts +33 -0
- package/src/config/__tests__/log-events.test.ts +162 -0
- package/src/config/__tests__/models.test.ts +317 -0
- package/src/config/__tests__/paths.test.ts +121 -0
- package/src/config/__tests__/statuses.test.ts +191 -0
- package/src/config/index.ts +4 -0
- package/src/config/log-events.ts +74 -0
- package/src/config/models.ts +475 -0
- package/src/config/paths.ts +54 -0
- package/src/config/statuses.ts +93 -0
- package/src/core/__tests__/batch-runner.test.ts +431 -0
- package/src/core/__tests__/config.test.ts +121 -0
- package/src/core/__tests__/environment.test.ts +68 -0
- package/src/core/__tests__/file-io.test.ts +38 -0
- package/src/core/__tests__/logger.test.ts +72 -0
- package/src/core/__tests__/module-loader.test.ts +46 -0
- package/src/core/__tests__/retry.test.ts +119 -0
- package/src/core/__tests__/task-runner.test.ts +59 -0
- package/src/core/__tests__/validation.test.ts +87 -0
- package/src/core/batch-runner.ts +221 -0
- package/src/core/config.ts +423 -0
- package/src/core/environment.ts +77 -0
- package/src/core/file-io.ts +354 -0
- package/src/core/lifecycle-policy.ts +52 -0
- package/src/core/logger.ts +147 -0
- package/src/core/module-loader.ts +60 -0
- package/src/core/orchestrator.ts +399 -0
- package/src/core/pipeline-runner.ts +570 -0
- package/src/core/progress.ts +33 -0
- package/src/core/retry.ts +52 -0
- package/src/core/status-initializer.ts +69 -0
- package/src/core/status-writer.ts +388 -0
- package/src/core/symlink-bridge.ts +45 -0
- package/src/core/symlink-utils.ts +78 -0
- package/src/core/task-runner.ts +830 -0
- package/src/core/validation.ts +110 -0
- package/src/index.ts +1 -0
- package/src/jsdom.d.ts +11 -0
- package/src/llm/__tests__/index.test.ts +642 -0
- package/src/llm/index.ts +534 -0
- package/src/providers/__tests__/anthropic.test.ts +236 -0
- package/src/providers/__tests__/base.test.ts +321 -0
- package/src/providers/__tests__/claude-code.test.ts +214 -0
- package/src/providers/__tests__/deepseek.test.ts +338 -0
- package/src/providers/__tests__/gemini.test.ts +365 -0
- package/src/providers/__tests__/moonshot.test.ts +363 -0
- package/src/providers/__tests__/openai.test.ts +331 -0
- package/src/providers/__tests__/types.test.ts +93 -0
- package/src/providers/__tests__/zhipu.test.ts +371 -0
- package/src/providers/anthropic.ts +157 -0
- package/src/providers/base.ts +219 -0
- package/src/providers/claude-code.ts +123 -0
- package/src/providers/deepseek.ts +291 -0
- package/src/providers/gemini.ts +229 -0
- package/src/providers/moonshot.ts +180 -0
- package/src/providers/openai.ts +272 -0
- package/src/providers/types.ts +285 -0
- package/src/providers/zhipu.ts +207 -0
- package/src/react-dom-client.d.ts +10 -0
- package/src/react-syntax-highlighter.d.ts +14 -0
- package/src/task-analysis/__tests__/enrichers-analysis-writer.test.ts +86 -0
- package/src/task-analysis/__tests__/enrichers-artifact-resolver.test.ts +124 -0
- package/src/task-analysis/__tests__/enrichers-schema-deducer.test.ts +146 -0
- package/src/task-analysis/__tests__/enrichers-schema-writer.test.ts +169 -0
- package/src/task-analysis/__tests__/extractors-artifacts.test.ts +133 -0
- package/src/task-analysis/__tests__/extractors-llm-calls.test.ts +46 -0
- package/src/task-analysis/__tests__/extractors-stages.test.ts +52 -0
- package/src/task-analysis/__tests__/index.test.ts +143 -0
- package/src/task-analysis/__tests__/parser.test.ts +41 -0
- package/src/task-analysis/__tests__/types.test.ts +165 -0
- package/src/task-analysis/__tests__/utils-ast.test.ts +82 -0
- package/src/task-analysis/enrichers/analysis-writer.ts +75 -0
- package/src/task-analysis/enrichers/artifact-resolver.ts +89 -0
- package/src/task-analysis/enrichers/schema-deducer.ts +95 -0
- package/src/task-analysis/enrichers/schema-writer.ts +68 -0
- package/src/task-analysis/extractors/artifacts.ts +143 -0
- package/src/task-analysis/extractors/llm-calls.ts +117 -0
- package/src/task-analysis/extractors/stages.ts +45 -0
- package/src/task-analysis/index.ts +40 -0
- package/src/task-analysis/parser.ts +20 -0
- package/src/task-analysis/types.ts +83 -0
- package/src/task-analysis/utils/ast.ts +45 -0
- package/src/ui/client/__tests__/api-errors.test.ts +41 -0
- package/src/ui/client/__tests__/api.test.ts +62 -0
- package/src/ui/client/__tests__/bootstrap.test.ts +106 -0
- package/src/ui/client/__tests__/job-adapter.test.ts +133 -0
- package/src/ui/client/__tests__/main.test.tsx +32 -0
- package/src/ui/client/__tests__/sse-fetch.test.ts +95 -0
- package/src/ui/client/__tests__/time-store.test.ts +138 -0
- package/src/ui/client/__tests__/types.test.ts +64 -0
- package/src/ui/client/__tests__/useAnalysisProgress.test.ts +36 -0
- package/src/ui/client/__tests__/useJobDetailWithUpdates.test.ts +74 -0
- package/src/ui/client/__tests__/useJobList.test.ts +40 -0
- package/src/ui/client/__tests__/useJobListWithUpdates.test.ts +67 -0
- package/src/ui/client/adapters/job-adapter.ts +200 -0
- package/src/ui/client/api.ts +172 -0
- package/src/ui/client/bootstrap.ts +56 -0
- package/src/ui/client/hooks/useAnalysisProgress.ts +108 -0
- package/src/ui/client/hooks/useJobDetailWithUpdates.ts +227 -0
- package/src/ui/client/hooks/useJobList.ts +75 -0
- package/src/ui/client/hooks/useJobListWithUpdates.ts +191 -0
- package/src/ui/client/index.css +52 -99
- package/src/ui/client/index.html +2 -2
- package/src/ui/client/main.tsx +51 -0
- package/src/ui/client/sse-fetch.ts +97 -0
- package/src/ui/client/time-store.ts +103 -0
- package/src/ui/client/types.ts +199 -0
- package/src/ui/components/AddPipelineSidebar.tsx +105 -0
- package/src/ui/components/AnalysisProgressTray.tsx +56 -0
- package/src/ui/components/DAGGrid.tsx +410 -0
- package/src/ui/components/JobCard.tsx +34 -0
- package/src/ui/components/JobDetail.tsx +69 -0
- package/src/ui/components/JobTable.tsx +116 -0
- package/src/ui/components/Layout.tsx +124 -0
- package/src/ui/components/LiveText.tsx +29 -0
- package/src/ui/components/MarkdownRenderer.tsx +80 -0
- package/src/ui/components/PageSubheader.tsx +38 -0
- package/src/ui/components/PipelineDAGGrid.tsx +52 -0
- package/src/ui/components/PipelineTypeTaskSidebar.tsx +49 -0
- package/src/ui/components/SchemaPreviewPanel.tsx +56 -0
- package/src/ui/components/StageTimeline.tsx +31 -0
- package/src/ui/components/TaskAnalysisDisplay.tsx +111 -0
- package/src/ui/components/TaskCreationSidebar.tsx +187 -0
- package/src/ui/components/TaskDetailSidebar.tsx +96 -0
- package/src/ui/components/TaskFilePane.tsx +143 -0
- package/src/ui/components/TimerText.tsx +28 -0
- package/src/ui/components/UploadSeed.tsx +100 -0
- package/src/ui/components/__tests__/AddPipelineSidebar.test.tsx +45 -0
- package/src/ui/components/__tests__/DAGGrid.test.tsx +119 -0
- package/src/ui/components/__tests__/JobTable.test.tsx +45 -0
- package/src/ui/components/__tests__/LiveText.test.tsx +15 -0
- package/src/ui/components/__tests__/MarkdownRenderer.test.tsx +32 -0
- package/src/ui/components/__tests__/StageTimeline.test.tsx +39 -0
- package/src/ui/components/__tests__/TimerText.test.tsx +15 -0
- package/src/ui/components/__tests__/UploadSeed.test.tsx +68 -0
- package/src/ui/components/__tests__/dag-shared.test.ts +119 -0
- package/src/ui/components/__tests__/test-dom.ts +65 -0
- package/src/ui/components/__tests__/types.test.ts +56 -0
- package/src/ui/components/dag-shared.ts +120 -0
- package/src/ui/components/onboarding/EmptyState.tsx +23 -0
- package/src/ui/components/onboarding/HintBanner.tsx +55 -0
- package/src/ui/components/onboarding/HotspotBeacon.tsx +12 -0
- package/src/ui/components/onboarding/OnboardingChecklist.tsx +95 -0
- package/src/ui/components/onboarding/SetupStepper.tsx +64 -0
- package/src/ui/components/onboarding/SuccessState.tsx +22 -0
- package/src/ui/components/onboarding/WelcomeModal.tsx +90 -0
- package/src/ui/components/onboarding/index.ts +7 -0
- package/src/ui/components/types.ts +221 -0
- package/src/ui/components/ui/Badge.tsx +34 -0
- package/src/ui/components/ui/Button.tsx +63 -0
- package/src/ui/components/ui/Card.tsx +37 -0
- package/src/ui/components/ui/CopyableCode.tsx +85 -0
- package/src/ui/components/ui/Logo.tsx +18 -0
- package/src/ui/components/ui/Progress.tsx +32 -0
- package/src/ui/components/ui/RestartJobModal.tsx +87 -0
- package/src/ui/components/ui/Separator.tsx +8 -0
- package/src/ui/components/ui/Sidebar.tsx +78 -0
- package/src/ui/components/ui/StopJobModal.tsx +78 -0
- package/src/ui/components/ui/Toast.tsx +80 -0
- package/src/ui/components/ui/__tests__/Badge.test.tsx +21 -0
- package/src/ui/components/ui/__tests__/Button.test.tsx +21 -0
- package/src/ui/components/ui/__tests__/CopyableCode.test.tsx +28 -0
- package/src/ui/components/ui/__tests__/Progress.test.tsx +20 -0
- package/src/ui/components/ui/__tests__/RestartJobModal.test.tsx +35 -0
- package/src/ui/components/ui/__tests__/Sidebar.test.tsx +31 -0
- package/src/ui/components/ui/__tests__/StopJobModal.test.tsx +52 -0
- package/src/ui/components/ui/__tests__/Toast.test.tsx +35 -0
- package/src/ui/dist/assets/{index-BidlfsSr.js → index-bRQpD9rj.js} +47459 -55387
- package/src/ui/dist/assets/{index-BidlfsSr.js.map → index-bRQpD9rj.js.map} +1 -1
- package/src/ui/dist/assets/style-DA1Ma4YS.css +2 -0
- package/src/ui/dist/index.html +3 -3
- package/src/ui/embedded-assets.js +12 -0
- package/src/ui/pages/Code.tsx +692 -0
- package/src/ui/pages/PipelineDetail.tsx +99 -0
- package/src/ui/pages/PipelineList.tsx +78 -0
- package/src/ui/pages/PipelineTypeDetail.tsx +94 -0
- package/src/ui/pages/PromptPipelineDashboard.tsx +70 -0
- package/src/ui/pages/__tests__/PromptPipelineDashboard.test.tsx +71 -0
- package/src/ui/pages/__tests__/pages.test.tsx +182 -0
- package/src/ui/server/__tests__/config-bridge-node.test.ts +54 -0
- package/src/ui/server/__tests__/config-bridge.test.ts +41 -0
- package/src/ui/server/__tests__/file-endpoints.test.ts +130 -0
- package/src/ui/server/__tests__/file-reader.test.ts +69 -0
- package/src/ui/server/__tests__/index.test.ts +36 -0
- package/src/ui/server/__tests__/job-index.test.ts +39 -0
- package/src/ui/server/__tests__/job-reader.test.ts +61 -0
- package/src/ui/server/__tests__/job-scanner.test.ts +44 -0
- package/src/ui/server/__tests__/router.test.ts +41 -0
- package/src/ui/server/__tests__/sse-broadcast.test.ts +32 -0
- package/src/ui/server/__tests__/sse-enhancer.test.ts +56 -0
- package/src/ui/server/__tests__/sse-registry.test.ts +90 -0
- package/src/ui/server/__tests__/utils.test.ts +62 -0
- package/src/ui/server/__tests__/zip-utils.test.ts +23 -0
- package/src/ui/server/config-bridge-node.ts +119 -0
- package/src/ui/server/config-bridge.ts +65 -0
- package/src/ui/server/embedded-assets.ts +7 -0
- package/src/ui/server/endpoints/create-pipeline-endpoint.ts +52 -0
- package/src/ui/server/endpoints/file-endpoints.ts +86 -0
- package/src/ui/server/endpoints/job-control-endpoints.ts +211 -0
- package/src/ui/server/endpoints/job-endpoints.ts +45 -0
- package/src/ui/server/endpoints/pipeline-analysis-endpoint.ts +46 -0
- package/src/ui/server/endpoints/pipeline-artifacts-endpoint.ts +8 -0
- package/src/ui/server/endpoints/pipeline-type-detail-endpoint.ts +26 -0
- package/src/ui/server/endpoints/pipelines-endpoint.ts +25 -0
- package/src/ui/server/endpoints/schema-file-endpoint.ts +12 -0
- package/src/ui/server/endpoints/sse-endpoints.ts +24 -0
- package/src/ui/server/endpoints/state-endpoint.ts +11 -0
- package/src/ui/server/endpoints/task-analysis-endpoint.ts +12 -0
- package/src/ui/server/endpoints/task-creation-endpoint.ts +12 -0
- package/src/ui/server/endpoints/task-save-endpoint.ts +16 -0
- package/src/ui/server/endpoints/upload-endpoints.ts +64 -0
- package/src/ui/server/file-reader.ts +131 -0
- package/src/ui/server/index.ts +148 -0
- package/src/ui/server/job-index.ts +100 -0
- package/src/ui/server/job-reader.ts +82 -0
- package/src/ui/server/job-scanner.ts +57 -0
- package/src/ui/server/router.ts +115 -0
- package/src/ui/server/sse-broadcast.ts +40 -0
- package/src/ui/server/sse-enhancer.ts +61 -0
- package/src/ui/server/sse-registry.ts +141 -0
- package/src/ui/server/utils/http-utils.ts +90 -0
- package/src/ui/server/utils/mime-types.ts +58 -0
- package/src/ui/server/utils/slug.ts +27 -0
- package/src/ui/server/zip-utils.ts +22 -0
- package/src/ui/state/__tests__/analysis-lock.test.ts +36 -0
- package/src/ui/state/__tests__/change-tracker.test.ts +61 -0
- package/src/ui/state/__tests__/index.test.ts +29 -0
- package/src/ui/state/__tests__/job-change-detector.test.ts +32 -0
- package/src/ui/state/__tests__/mention-parser.test.ts +18 -0
- package/src/ui/state/__tests__/schema-loader.test.ts +68 -0
- package/src/ui/state/__tests__/snapshot.test.ts +84 -0
- package/src/ui/state/__tests__/sse-stream.test.ts +57 -0
- package/src/ui/state/__tests__/task-reviewer.test.ts +48 -0
- package/src/ui/state/__tests__/types.test.ts +103 -0
- package/src/ui/state/__tests__/watcher.test.ts +135 -0
- package/src/ui/state/analysis-lock.ts +37 -0
- package/src/ui/state/change-tracker.ts +59 -0
- package/src/ui/state/index.ts +12 -0
- package/src/ui/state/job-change-detector.ts +47 -0
- package/src/ui/state/mention-parser.ts +16 -0
- package/src/ui/state/schema-loader.ts +61 -0
- package/src/ui/state/snapshot.ts +165 -0
- package/src/ui/state/sse-stream.ts +63 -0
- package/src/ui/state/task-reviewer.ts +26 -0
- package/src/ui/state/transformers/__tests__/list-transformer.test.ts +91 -0
- package/src/ui/state/transformers/__tests__/status-transformer.test.ts +79 -0
- package/src/ui/state/transformers/list-transformer.ts +187 -0
- package/src/ui/state/transformers/status-transformer.ts +193 -0
- package/src/ui/state/types.ts +231 -0
- package/src/ui/state/watcher.ts +178 -0
- package/src/utils/dag.ts +35 -0
- package/src/utils/duration.ts +10 -0
- package/src/utils/formatters.ts +11 -0
- package/src/utils/geometry-equality.ts +28 -0
- package/src/utils/jobs.ts +6 -0
- package/src/utils/task-files.ts +15 -0
- package/src/utils/time-utils.ts +18 -0
- package/src/utils/ui.tsx +21 -0
- package/src/api/files.js +0 -48
- package/src/api/index.js +0 -353
- package/src/api/validators/json.js +0 -46
- package/src/api/validators/seed.js +0 -140
- package/src/cli/analyze-task.js +0 -51
- package/src/cli/index.js +0 -493
- package/src/cli/run-orchestrator.js +0 -39
- package/src/cli/update-pipeline-json.js +0 -47
- package/src/components/AddPipelineSidebar.jsx +0 -144
- package/src/components/AnalysisProgressTray.jsx +0 -87
- package/src/components/DAGGrid.jsx +0 -868
- package/src/components/JobCard.jsx +0 -98
- package/src/components/JobDetail.jsx +0 -173
- package/src/components/JobTable.jsx +0 -252
- package/src/components/Layout.jsx +0 -244
- package/src/components/LiveText.jsx +0 -47
- package/src/components/MarkdownRenderer.jsx +0 -149
- package/src/components/PageSubheader.jsx +0 -75
- package/src/components/PipelineDAGGrid.jsx +0 -404
- package/src/components/PipelineTypeTaskSidebar.jsx +0 -96
- package/src/components/SchemaPreviewPanel.jsx +0 -97
- package/src/components/StageTimeline.jsx +0 -36
- package/src/components/TaskAnalysisDisplay.jsx +0 -227
- package/src/components/TaskCreationSidebar.jsx +0 -598
- package/src/components/TaskDetailSidebar.jsx +0 -242
- package/src/components/TaskFilePane.jsx +0 -625
- package/src/components/TimerText.jsx +0 -82
- package/src/components/UploadSeed.jsx +0 -169
- package/src/components/ui/CopyableCode.jsx +0 -110
- package/src/components/ui/Logo.jsx +0 -16
- package/src/components/ui/RestartJobModal.jsx +0 -174
- package/src/components/ui/StopJobModal.jsx +0 -183
- package/src/components/ui/badge.jsx +0 -20
- package/src/components/ui/button.jsx +0 -75
- package/src/components/ui/card.jsx +0 -20
- package/src/components/ui/focus-styles.css +0 -60
- package/src/components/ui/progress.jsx +0 -26
- package/src/components/ui/separator.jsx +0 -6
- package/src/components/ui/sidebar.jsx +0 -118
- package/src/components/ui/toast.jsx +0 -138
- package/src/config/log-events.js +0 -77
- package/src/config/models.js +0 -443
- package/src/config/paths.js +0 -99
- package/src/config/statuses.js +0 -119
- package/src/core/batch-runner.js +0 -277
- package/src/core/config.js +0 -583
- package/src/core/environment.js +0 -56
- package/src/core/file-io.js +0 -418
- package/src/core/lifecycle-policy.js +0 -62
- package/src/core/logger.js +0 -219
- package/src/core/module-loader.js +0 -171
- package/src/core/orchestrator.js +0 -433
- package/src/core/pipeline-runner.js +0 -510
- package/src/core/progress.js +0 -66
- package/src/core/retry.js +0 -83
- package/src/core/status-initializer.js +0 -155
- package/src/core/status-writer.js +0 -641
- package/src/core/symlink-bridge.js +0 -55
- package/src/core/symlink-utils.js +0 -282
- package/src/core/task-runner.js +0 -928
- package/src/core/validation.js +0 -236
- package/src/llm/README.md +0 -454
- package/src/llm/index.js +0 -1013
- package/src/pages/Code.jsx +0 -823
- package/src/pages/PipelineDetail.jsx +0 -302
- package/src/pages/PipelineList.jsx +0 -214
- package/src/pages/PipelineTypeDetail.jsx +0 -234
- package/src/pages/PromptPipelineDashboard.jsx +0 -169
- package/src/providers/anthropic.js +0 -138
- package/src/providers/base.js +0 -167
- package/src/providers/claude-code.js +0 -156
- package/src/providers/deepseek.js +0 -178
- package/src/providers/gemini.js +0 -230
- package/src/providers/moonshot.js +0 -198
- package/src/providers/openai.js +0 -275
- package/src/providers/zhipu.js +0 -161
- package/src/task-analysis/enrichers/analysis-writer.js +0 -94
- package/src/task-analysis/enrichers/artifact-resolver.js +0 -98
- package/src/task-analysis/enrichers/schema-deducer.js +0 -151
- package/src/task-analysis/enrichers/schema-writer.js +0 -74
- package/src/task-analysis/extractors/artifacts.js +0 -181
- package/src/task-analysis/extractors/llm-calls.js +0 -176
- package/src/task-analysis/extractors/stages.js +0 -51
- package/src/task-analysis/index.js +0 -105
- package/src/task-analysis/parser.js +0 -28
- package/src/task-analysis/utils/ast.js +0 -43
- package/src/ui/README.md +0 -86
- package/src/ui/client/adapters/job-adapter.js +0 -351
- package/src/ui/client/api.js +0 -362
- package/src/ui/client/bootstrap.js +0 -120
- package/src/ui/client/hooks/useAnalysisProgress.js +0 -145
- package/src/ui/client/hooks/useJobDetailWithUpdates.js +0 -597
- package/src/ui/client/hooks/useJobList.js +0 -63
- package/src/ui/client/hooks/useJobListWithUpdates.js +0 -335
- package/src/ui/client/main.jsx +0 -47
- package/src/ui/client/sse-fetch.js +0 -120
- package/src/ui/client/time-store.js +0 -161
- package/src/ui/config-bridge.js +0 -140
- package/src/ui/config-bridge.node.js +0 -301
- package/src/ui/dist/app.js +0 -262
- package/src/ui/dist/assets/style-CdV-vuS0.css +0 -180
- package/src/ui/dist/favicon.svg +0 -12
- package/src/ui/endpoints/create-pipeline-endpoint.js +0 -194
- package/src/ui/endpoints/file-endpoints.js +0 -330
- package/src/ui/endpoints/job-control-endpoints.js +0 -1038
- package/src/ui/endpoints/job-endpoints.js +0 -362
- package/src/ui/endpoints/pipeline-analysis-endpoint.js +0 -305
- package/src/ui/endpoints/pipeline-artifacts-endpoint.js +0 -109
- package/src/ui/endpoints/pipeline-type-detail-endpoint.js +0 -181
- package/src/ui/endpoints/pipelines-endpoint.js +0 -133
- package/src/ui/endpoints/schema-file-endpoint.js +0 -105
- package/src/ui/endpoints/sse-endpoints.js +0 -223
- package/src/ui/endpoints/state-endpoint.js +0 -85
- package/src/ui/endpoints/task-analysis-endpoint.js +0 -104
- package/src/ui/endpoints/task-creation-endpoint.js +0 -155
- package/src/ui/endpoints/task-save-endpoint.js +0 -154
- package/src/ui/endpoints/upload-endpoints.js +0 -406
- package/src/ui/express-app.js +0 -231
- package/src/ui/file-reader.js +0 -216
- package/src/ui/job-change-detector.js +0 -83
- package/src/ui/job-index.js +0 -231
- package/src/ui/job-reader.js +0 -167
- package/src/ui/job-scanner.js +0 -188
- package/src/ui/lib/analysis-lock.js +0 -67
- package/src/ui/lib/mention-parser.js +0 -24
- package/src/ui/lib/schema-loader.js +0 -69
- package/src/ui/lib/sse.js +0 -30
- package/src/ui/lib/task-reviewer.js +0 -51
- package/src/ui/public/app.js +0 -262
- package/src/ui/public/favicon.svg +0 -12
- package/src/ui/server.js +0 -300
- package/src/ui/sse-broadcast.js +0 -93
- package/src/ui/sse-enhancer.js +0 -148
- package/src/ui/sse.js +0 -204
- package/src/ui/state-snapshot.js +0 -252
- package/src/ui/state.js +0 -67
- package/src/ui/transformers/list-transformer.js +0 -367
- package/src/ui/transformers/status-transformer.js +0 -294
- package/src/ui/utils/http-utils.js +0 -139
- package/src/ui/utils/mime-types.js +0 -196
- package/src/ui/utils/slug.js +0 -31
- package/src/ui/vite.config.js +0 -22
- package/src/ui/watcher.js +0 -179
- package/src/ui/zip-utils.js +0 -103
- package/src/utils/dag.js +0 -105
- package/src/utils/duration.js +0 -120
- package/src/utils/formatters.js +0 -27
- package/src/utils/geometry-equality.js +0 -83
- package/src/utils/id-generator.js +0 -30
- package/src/utils/jobs.js +0 -46
- package/src/utils/pipelines.js +0 -48
- package/src/utils/task-files.js +0 -271
- package/src/utils/time-utils.js +0 -40
- package/src/utils/token-cost-calculator.js +0 -294
- package/src/utils/ui.jsx +0 -74
package/README.md
CHANGED
|
@@ -104,34 +104,66 @@ flowchart LR
|
|
|
104
104
|
|
|
105
105
|
## Getting Started
|
|
106
106
|
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
Choose one runtime path:
|
|
108
|
+
- **Bun CLI path**: for Bun-based projects (`bunx pipeline-orchestrator ...`).
|
|
109
|
+
- **Standalone binary path**: download a prebuilt release binary, no Bun runtime required.
|
|
110
|
+
|
|
111
|
+
### 1A. Install for Bun projects
|
|
112
|
+
Add the orchestrator as a dependency:
|
|
109
113
|
```bash
|
|
110
|
-
|
|
114
|
+
bun add @ryanfw/prompt-orchestration-pipeline
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### 1B. Install standalone binary (no Bun required)
|
|
118
|
+
Download a release asset from:
|
|
119
|
+
`https://github.com/ryan-mahoney/prompt-orchestration-pipeline/releases`
|
|
120
|
+
|
|
121
|
+
Available assets:
|
|
122
|
+
- `pipeline-orchestrator-linux-x64`
|
|
123
|
+
- `pipeline-orchestrator-macos-x64`
|
|
124
|
+
- `pipeline-orchestrator-macos-arm64`
|
|
125
|
+
- `pipeline-orchestrator-windows-x64.exe`
|
|
126
|
+
|
|
127
|
+
Linux/macOS example:
|
|
128
|
+
```bash
|
|
129
|
+
curl -L -o pipeline-orchestrator \
|
|
130
|
+
https://github.com/ryan-mahoney/prompt-orchestration-pipeline/releases/latest/download/pipeline-orchestrator-macos-arm64
|
|
131
|
+
chmod +x pipeline-orchestrator
|
|
111
132
|
```
|
|
112
133
|
|
|
113
134
|
### 2. Initialize Structure
|
|
114
|
-
|
|
135
|
+
Use one of:
|
|
115
136
|
```bash
|
|
116
|
-
|
|
137
|
+
# Bun path
|
|
138
|
+
bunx pipeline-orchestrator init --root ./pipelines
|
|
139
|
+
|
|
140
|
+
# Standalone binary path
|
|
141
|
+
./pipeline-orchestrator init --root ./pipelines
|
|
117
142
|
```
|
|
118
143
|
|
|
119
|
-
### 3. Configure Scripts
|
|
120
|
-
|
|
144
|
+
### 3. Configure Scripts (Bun path)
|
|
145
|
+
For Bun projects, add:
|
|
121
146
|
```json
|
|
122
147
|
{
|
|
123
148
|
"scripts": {
|
|
124
|
-
"pipeline": "
|
|
149
|
+
"pipeline": "bunx pipeline-orchestrator start --root pipelines --port 3010"
|
|
125
150
|
}
|
|
126
151
|
}
|
|
127
152
|
```
|
|
128
153
|
|
|
129
154
|
### 4. Start the System
|
|
155
|
+
Use one of:
|
|
130
156
|
```bash
|
|
131
|
-
|
|
157
|
+
# Bun path
|
|
158
|
+
bun run pipeline
|
|
159
|
+
|
|
160
|
+
# Standalone binary path
|
|
161
|
+
./pipeline-orchestrator start --root pipelines --port 3010
|
|
132
162
|
```
|
|
133
163
|
This starts the file watcher and the web dashboard at `http://localhost:3010`.
|
|
134
164
|
|
|
165
|
+
> Note: `npx pipeline-orchestrator ...` requires Bun to be installed because the npm bin entry runs through a Bun shebang.
|
|
166
|
+
|
|
135
167
|
### 5. Run a Job
|
|
136
168
|
Drop a JSON file into `pipelines/pipeline-data/pending/`:
|
|
137
169
|
```json
|
|
@@ -142,4 +174,4 @@ Drop a JSON file into `pipelines/pipeline-data/pending/`:
|
|
|
142
174
|
}
|
|
143
175
|
```
|
|
144
176
|
|
|
145
|
-
The Orchestrator will pick it up, move it to `current/`, and start processing.
|
|
177
|
+
The Orchestrator will pick it up, move it to `current/`, and start processing.
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ryanfw/prompt-orchestration-pipeline",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "A Prompt-orchestration pipeline (POP) is a framework for building, running, and experimenting with complex chains of LLM tasks.",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "src/ui/server.
|
|
6
|
+
"main": "src/ui/server/index.ts",
|
|
7
7
|
"bin": {
|
|
8
|
-
"pipeline-orchestrator": "src/cli/index.
|
|
8
|
+
"pipeline-orchestrator": "src/cli/index.ts"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"src",
|
|
@@ -21,20 +21,24 @@
|
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
|
-
"analyze": "
|
|
25
|
-
"
|
|
26
|
-
"
|
|
24
|
+
"analyze": "bun src/cli/index.ts analyze",
|
|
25
|
+
"build:bin": "bun run ui:build && bun build --compile src/cli/index.ts",
|
|
26
|
+
"build:bin:local": "bun run build:bin --outfile=dist/pipeline-orchestrator",
|
|
27
|
+
"deduce-schemas": "bun scripts/deduce-schemas.js",
|
|
28
|
+
"test": "bash scripts/test.sh",
|
|
27
29
|
"lint": "eslint . --ext .js,.jsx",
|
|
28
|
-
"backend": "NODE_ENV=development
|
|
29
|
-
"ui": "NODE_ENV=development
|
|
30
|
+
"backend": "NODE_ENV=development bun --watch src/ui/server/index.ts",
|
|
31
|
+
"ui": "NODE_ENV=development bun --watch src/ui/server/index.ts",
|
|
30
32
|
"ui:dev": "vite",
|
|
31
|
-
"ui:build": "vite build",
|
|
32
|
-
"prepack": "
|
|
33
|
-
"ui:prod": "
|
|
34
|
-
"demo:ui": "NODE_ENV=production PO_ROOT=demo
|
|
35
|
-
"demo:orchestrator": "PO_ROOT=demo NODE_ENV=production
|
|
36
|
-
"demo:all": "NODE_ENV=development PO_ROOT=demo
|
|
37
|
-
"demo:prod": "
|
|
33
|
+
"ui:build": "vite build && bun run generate:embedded-assets",
|
|
34
|
+
"prepack": "bun run ui:build",
|
|
35
|
+
"ui:prod": "bun src/ui/server/index.ts",
|
|
36
|
+
"demo:ui": "NODE_ENV=production PO_ROOT=demo bun src/ui/server/index.ts",
|
|
37
|
+
"demo:orchestrator": "PO_ROOT=demo NODE_ENV=production bun -e \"import('./src/core/orchestrator.ts').then(m => m.startOrchestrator({ dataDir: process.env.PO_ROOT || 'demo' })).catch(err => { console.error(err); process.exit(1) })\"",
|
|
38
|
+
"demo:all": "NODE_ENV=development PO_ROOT=demo bun run ui:build && concurrently \"bun:demo:ui\" \"bun:demo:orchestrator\" --kill-others-on-fail",
|
|
39
|
+
"demo:prod": "bun run ui:build && NODE_ENV=production PO_ROOT=demo bun src/ui/server/index.ts",
|
|
40
|
+
"generate:embedded-assets": "bun scripts/generate-embedded-assets.js",
|
|
41
|
+
"typecheck": "tsc --noEmit"
|
|
38
42
|
},
|
|
39
43
|
"dependencies": {
|
|
40
44
|
"@babel/parser": "^7.28.5",
|
|
@@ -47,12 +51,12 @@
|
|
|
47
51
|
"@radix-ui/themes": "^3.2.1",
|
|
48
52
|
"ajv": "^8.17.1",
|
|
49
53
|
"ajv-formats": "^3.0.1",
|
|
50
|
-
"better-sqlite3": "^11.7.0",
|
|
51
54
|
"chokidar": "^3.5.3",
|
|
52
55
|
"commander": "^14.0.2",
|
|
53
56
|
"dotenv": "^17.2.3",
|
|
54
57
|
"express": "^4.19.2",
|
|
55
58
|
"fflate": "^0.8.2",
|
|
59
|
+
"highlight.js": "^11.11.1",
|
|
56
60
|
"lucide-react": "^0.544.0",
|
|
57
61
|
"openai": "^5.23.1",
|
|
58
62
|
"p-limit": "^6.1.0",
|
|
@@ -72,6 +76,7 @@
|
|
|
72
76
|
"@testing-library/jest-dom": "^6.9.1",
|
|
73
77
|
"@testing-library/react": "^16.3.0",
|
|
74
78
|
"@testing-library/user-event": "^14.6.1",
|
|
79
|
+
"@types/bun": "^1.3.9",
|
|
75
80
|
"@vitejs/plugin-react": "^5.0.4",
|
|
76
81
|
"@vitest/coverage-v8": "^3.2.4",
|
|
77
82
|
"concurrently": "^9.2.1",
|
|
@@ -80,14 +85,14 @@
|
|
|
80
85
|
"eslint-plugin-react-hooks": "^6.1.1",
|
|
81
86
|
"eslint-plugin-react-refresh": "^0.4.23",
|
|
82
87
|
"jsdom": "^27.0.0",
|
|
83
|
-
"nodemon": "^3.1.10",
|
|
84
88
|
"prettier": "^3.6.2",
|
|
85
89
|
"tailwindcss": "^4.1.14",
|
|
90
|
+
"typescript": "^5.9.3",
|
|
86
91
|
"vite": "^7.1.9",
|
|
87
92
|
"vitest": "^3.2.4"
|
|
88
93
|
},
|
|
89
94
|
"engines": {
|
|
90
|
-
"
|
|
95
|
+
"bun": ">=1.1.0"
|
|
91
96
|
},
|
|
92
97
|
"keywords": [
|
|
93
98
|
"llm",
|
package/src/api/index.ts
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/** Result of a successful job submission. */
|
|
2
|
+
export interface SubmitSuccessResult {
|
|
3
|
+
success: true;
|
|
4
|
+
jobId: string;
|
|
5
|
+
jobName: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/** Result of a failed job submission. */
|
|
9
|
+
export interface SubmitFailureResult {
|
|
10
|
+
success: false;
|
|
11
|
+
message: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type SubmitResult = SubmitSuccessResult | SubmitFailureResult;
|
|
15
|
+
|
|
16
|
+
/** Options for submitJobWithValidation. */
|
|
17
|
+
export interface SubmitJobOptions {
|
|
18
|
+
dataDir: string;
|
|
19
|
+
seedObject: unknown;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** Job status record returned by getStatus. */
|
|
23
|
+
export interface JobStatusRecord {
|
|
24
|
+
jobId: string;
|
|
25
|
+
jobName: string;
|
|
26
|
+
pipeline: string;
|
|
27
|
+
state: string;
|
|
28
|
+
createdAt: string;
|
|
29
|
+
[key: string]: unknown;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** Orchestrator construction options. */
|
|
33
|
+
export interface OrchestratorOptions {
|
|
34
|
+
autoStart: boolean;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Validates and submits a job to the pipeline data directory.
|
|
39
|
+
* Stub implementation — to be replaced when api module is fully migrated.
|
|
40
|
+
*/
|
|
41
|
+
export async function submitJobWithValidation(
|
|
42
|
+
_opts: SubmitJobOptions
|
|
43
|
+
): Promise<SubmitResult> {
|
|
44
|
+
throw new Error("submitJobWithValidation: not yet implemented");
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Pipeline orchestrator class for status/job management.
|
|
49
|
+
* Stub implementation — to be replaced when api module is fully migrated.
|
|
50
|
+
*/
|
|
51
|
+
export class PipelineOrchestrator {
|
|
52
|
+
constructor(_opts: OrchestratorOptions) {}
|
|
53
|
+
|
|
54
|
+
async getStatus(_jobName: string): Promise<JobStatusRecord> {
|
|
55
|
+
throw new Error("PipelineOrchestrator.getStatus: not yet implemented");
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async listJobs(): Promise<JobStatusRecord[]> {
|
|
59
|
+
throw new Error("PipelineOrchestrator.listJobs: not yet implemented");
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import Ajv from "ajv";
|
|
2
|
+
import addFormats from "ajv-formats";
|
|
3
|
+
|
|
4
|
+
const ajv = new Ajv({ allErrors: true, strict: false });
|
|
5
|
+
addFormats(ajv);
|
|
6
|
+
|
|
7
|
+
export interface SchemaValidationResult {
|
|
8
|
+
valid: boolean;
|
|
9
|
+
errors?: Array<{
|
|
10
|
+
instancePath: string;
|
|
11
|
+
schemaPath: string;
|
|
12
|
+
keyword: string;
|
|
13
|
+
params: Record<string, unknown>;
|
|
14
|
+
message?: string;
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const validateWithSchema = (
|
|
19
|
+
schema: unknown,
|
|
20
|
+
data: unknown,
|
|
21
|
+
): SchemaValidationResult => {
|
|
22
|
+
let parsedData = data;
|
|
23
|
+
|
|
24
|
+
if (typeof data === "string") {
|
|
25
|
+
try {
|
|
26
|
+
parsedData = JSON.parse(data);
|
|
27
|
+
} catch {
|
|
28
|
+
return {
|
|
29
|
+
valid: false,
|
|
30
|
+
errors: [
|
|
31
|
+
{
|
|
32
|
+
instancePath: "",
|
|
33
|
+
schemaPath: "#/type",
|
|
34
|
+
keyword: "type",
|
|
35
|
+
params: { type: "object" },
|
|
36
|
+
message: "must be a valid JSON object (string parsing failed)",
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const schemaObj = schema as Record<string, unknown>;
|
|
44
|
+
let validateFunction = schemaObj.$id
|
|
45
|
+
? ajv.getSchema(schemaObj.$id as string)
|
|
46
|
+
: null;
|
|
47
|
+
if (!validateFunction) {
|
|
48
|
+
validateFunction = ajv.compile(schemaObj);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const isValid = validateFunction(parsedData);
|
|
52
|
+
|
|
53
|
+
if (isValid) {
|
|
54
|
+
return { valid: true };
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return {
|
|
58
|
+
valid: false,
|
|
59
|
+
errors: validateFunction.errors?.map((e) => ({
|
|
60
|
+
instancePath: e.instancePath ?? "",
|
|
61
|
+
schemaPath: e.schemaPath ?? "",
|
|
62
|
+
keyword: e.keyword ?? "",
|
|
63
|
+
params: (e.params as Record<string, unknown>) ?? {},
|
|
64
|
+
message: e.message,
|
|
65
|
+
})),
|
|
66
|
+
};
|
|
67
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { describe, it, expect, beforeEach, afterEach, spyOn } from "bun:test";
|
|
2
|
+
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
|
|
6
|
+
describe("analyzeTaskFile", () => {
|
|
7
|
+
let tmpDir: string;
|
|
8
|
+
let exitSpy: ReturnType<typeof spyOn>;
|
|
9
|
+
let stdoutSpy: ReturnType<typeof spyOn>;
|
|
10
|
+
|
|
11
|
+
beforeEach(async () => {
|
|
12
|
+
tmpDir = await mkdtemp(join(tmpdir(), "analyze-task-test-"));
|
|
13
|
+
exitSpy = spyOn(process, "exit").mockImplementation((() => {
|
|
14
|
+
throw new Error("process.exit called");
|
|
15
|
+
}) as never);
|
|
16
|
+
stdoutSpy = spyOn(process.stdout, "write").mockImplementation((() => true) as never);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
afterEach(async () => {
|
|
20
|
+
await rm(tmpDir, { recursive: true, force: true });
|
|
21
|
+
exitSpy.mockRestore();
|
|
22
|
+
stdoutSpy.mockRestore();
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it("outputs JSON result for a valid task file", async () => {
|
|
26
|
+
const taskFile = join(tmpDir, "task.ts");
|
|
27
|
+
await writeFile(
|
|
28
|
+
taskFile,
|
|
29
|
+
'export async function ingestion({ io, llm }) { await io.readArtifact("seed.json"); await llm.openai.complete({ prompt: "json" }); }',
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
const { analyzeTaskFile } = await import("../analyze-task.ts");
|
|
33
|
+
await analyzeTaskFile(taskFile);
|
|
34
|
+
|
|
35
|
+
expect(stdoutSpy).toHaveBeenCalledTimes(1);
|
|
36
|
+
const written = (stdoutSpy.mock.calls[0] as [string])[0];
|
|
37
|
+
const parsed = JSON.parse(written);
|
|
38
|
+
expect(parsed.taskFilePath).toBe(taskFile);
|
|
39
|
+
expect(parsed.stages).toEqual([{ name: "ingestion", order: 1, isAsync: true }]);
|
|
40
|
+
expect(parsed.artifacts.reads).toEqual([{ fileName: "seed.json", stage: "ingestion", required: true }]);
|
|
41
|
+
expect(parsed.models).toEqual([{ provider: "openai", method: "complete", stage: "ingestion" }]);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it("calls process.exit(1) for a non-existent file", async () => {
|
|
45
|
+
const { analyzeTaskFile } = await import("../analyze-task.ts");
|
|
46
|
+
await expect(analyzeTaskFile(join(tmpDir, "does-not-exist.ts"))).rejects.toThrow(
|
|
47
|
+
"process.exit called"
|
|
48
|
+
);
|
|
49
|
+
expect(exitSpy).toHaveBeenCalledWith(1);
|
|
50
|
+
});
|
|
51
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { KEBAB_CASE_REGEX, STAGE_NAMES, getStagePurpose } from "../constants";
|
|
3
|
+
|
|
4
|
+
describe("STAGE_NAMES", () => {
|
|
5
|
+
it("has exactly 11 entries", () => {
|
|
6
|
+
expect(STAGE_NAMES).toHaveLength(11);
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
it("starts with ingestion and ends with integration", () => {
|
|
10
|
+
expect(STAGE_NAMES[0]).toBe("ingestion");
|
|
11
|
+
expect(STAGE_NAMES[10]).toBe("integration");
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
describe("getStagePurpose", () => {
|
|
16
|
+
it("returns a non-empty string for a known stage", () => {
|
|
17
|
+
expect(getStagePurpose("ingestion").length).toBeGreaterThan(0);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it("returns an empty string for an unknown stage", () => {
|
|
21
|
+
expect(getStagePurpose("unknown")).toBe("");
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
describe("KEBAB_CASE_REGEX", () => {
|
|
26
|
+
it("matches valid kebab-case slugs", () => {
|
|
27
|
+
expect(KEBAB_CASE_REGEX.test("valid-slug")).toBe(true);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it("rejects slugs with uppercase or underscores", () => {
|
|
31
|
+
expect(KEBAB_CASE_REGEX.test("Invalid_Slug")).toBe(false);
|
|
32
|
+
});
|
|
33
|
+
});
|