@ryanfw/prompt-orchestration-pipeline 0.11.0 → 0.13.0
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/package.json +11 -1
- package/src/cli/analyze-task.js +51 -0
- package/src/cli/index.js +8 -0
- package/src/components/AddPipelineSidebar.jsx +144 -0
- package/src/components/AnalysisProgressTray.jsx +87 -0
- package/src/components/DAGGrid.jsx +157 -47
- package/src/components/JobTable.jsx +4 -3
- package/src/components/Layout.jsx +142 -139
- package/src/components/MarkdownRenderer.jsx +149 -0
- package/src/components/PipelineDAGGrid.jsx +404 -0
- package/src/components/PipelineTypeTaskSidebar.jsx +96 -0
- package/src/components/SchemaPreviewPanel.jsx +97 -0
- package/src/components/StageTimeline.jsx +36 -0
- package/src/components/TaskAnalysisDisplay.jsx +227 -0
- package/src/components/TaskCreationSidebar.jsx +447 -0
- package/src/components/TaskDetailSidebar.jsx +119 -117
- package/src/components/TaskFilePane.jsx +94 -39
- package/src/components/ui/RestartJobModal.jsx +26 -6
- package/src/components/ui/StopJobModal.jsx +183 -0
- package/src/components/ui/button.jsx +59 -27
- package/src/components/ui/sidebar.jsx +118 -0
- package/src/config/models.js +99 -67
- package/src/core/config.js +11 -4
- package/src/core/lifecycle-policy.js +62 -0
- package/src/core/pipeline-runner.js +312 -217
- package/src/core/status-writer.js +84 -0
- package/src/llm/index.js +129 -9
- package/src/pages/Code.jsx +8 -1
- package/src/pages/PipelineDetail.jsx +84 -2
- package/src/pages/PipelineList.jsx +214 -0
- package/src/pages/PipelineTypeDetail.jsx +234 -0
- package/src/pages/PromptPipelineDashboard.jsx +10 -11
- package/src/providers/deepseek.js +76 -16
- package/src/providers/openai.js +61 -34
- package/src/task-analysis/enrichers/analysis-writer.js +62 -0
- package/src/task-analysis/enrichers/schema-deducer.js +145 -0
- package/src/task-analysis/enrichers/schema-writer.js +74 -0
- package/src/task-analysis/extractors/artifacts.js +137 -0
- package/src/task-analysis/extractors/llm-calls.js +176 -0
- package/src/task-analysis/extractors/stages.js +51 -0
- package/src/task-analysis/index.js +103 -0
- package/src/task-analysis/parser.js +28 -0
- package/src/task-analysis/utils/ast.js +43 -0
- package/src/ui/client/adapters/job-adapter.js +60 -0
- package/src/ui/client/api.js +233 -8
- package/src/ui/client/hooks/useAnalysisProgress.js +145 -0
- package/src/ui/client/hooks/useJobList.js +14 -1
- package/src/ui/client/index.css +64 -0
- package/src/ui/client/main.jsx +4 -0
- package/src/ui/client/sse-fetch.js +120 -0
- package/src/ui/dist/app.js +262 -0
- package/src/ui/dist/assets/index-cjHV9mYW.js +82578 -0
- package/src/ui/dist/assets/index-cjHV9mYW.js.map +1 -0
- package/src/ui/dist/assets/style-CoM9SoQF.css +180 -0
- package/src/ui/dist/favicon.svg +12 -0
- package/src/ui/dist/index.html +2 -2
- package/src/ui/endpoints/create-pipeline-endpoint.js +194 -0
- package/src/ui/endpoints/file-endpoints.js +330 -0
- package/src/ui/endpoints/job-control-endpoints.js +1001 -0
- package/src/ui/endpoints/job-endpoints.js +62 -0
- package/src/ui/endpoints/pipeline-analysis-endpoint.js +246 -0
- package/src/ui/endpoints/pipeline-type-detail-endpoint.js +181 -0
- package/src/ui/endpoints/pipelines-endpoint.js +133 -0
- package/src/ui/endpoints/schema-file-endpoint.js +105 -0
- package/src/ui/endpoints/sse-endpoints.js +223 -0
- package/src/ui/endpoints/state-endpoint.js +85 -0
- package/src/ui/endpoints/task-analysis-endpoint.js +104 -0
- package/src/ui/endpoints/task-creation-endpoint.js +114 -0
- package/src/ui/endpoints/task-save-endpoint.js +101 -0
- package/src/ui/endpoints/upload-endpoints.js +406 -0
- package/src/ui/express-app.js +227 -0
- package/src/ui/lib/analysis-lock.js +67 -0
- package/src/ui/lib/sse.js +30 -0
- package/src/ui/server.js +42 -1880
- package/src/ui/sse-broadcast.js +93 -0
- package/src/ui/utils/http-utils.js +139 -0
- package/src/ui/utils/mime-types.js +196 -0
- package/src/ui/utils/slug.js +31 -0
- package/src/ui/vite.config.js +22 -0
- package/src/ui/watcher.js +28 -2
- package/src/utils/jobs.js +39 -0
- package/src/ui/dist/assets/index-DeDzq-Kk.js +0 -23863
- package/src/ui/dist/assets/style-aBtD_Yrs.css +0 -62
package/src/core/config.js
CHANGED
|
@@ -39,9 +39,12 @@ function resolveWithBase(rootDir, maybePath) {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
function normalizeRegistryEntry(slug, entry, rootDir) {
|
|
42
|
+
// Support both pipelinePath (legacy) and pipelineJsonPath fields
|
|
42
43
|
const pipelineJsonPath = entry?.pipelineJsonPath
|
|
43
44
|
? resolveWithBase(rootDir, entry.pipelineJsonPath)
|
|
44
|
-
:
|
|
45
|
+
: entry?.pipelinePath
|
|
46
|
+
? resolveWithBase(rootDir, entry.pipelinePath)
|
|
47
|
+
: undefined;
|
|
45
48
|
|
|
46
49
|
const configDir = entry?.configDir
|
|
47
50
|
? resolveWithBase(rootDir, entry.configDir)
|
|
@@ -515,9 +518,13 @@ export function getConfig() {
|
|
|
515
518
|
Object.keys(currentConfig.pipelines).length === 0
|
|
516
519
|
) {
|
|
517
520
|
const repoRoot = resolveRepoRoot(currentConfig);
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
)
|
|
521
|
+
// In test environment, we might start without pipelines and add them later
|
|
522
|
+
// so we just warn instead of throwing, or handle it gracefully
|
|
523
|
+
if (process.env.NODE_ENV !== "test") {
|
|
524
|
+
throw new Error(
|
|
525
|
+
`No pipelines are registered. Create pipeline-config/registry.json in ${repoRoot} to register pipelines.`
|
|
526
|
+
);
|
|
527
|
+
}
|
|
521
528
|
}
|
|
522
529
|
}
|
|
523
530
|
return currentConfig;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static Lifecycle Policy - Pure decision engine for task transitions
|
|
3
|
+
*
|
|
4
|
+
* This module implements centralized lifecycle rules without configuration
|
|
5
|
+
* or runtime toggles, following the principle of explicit failure.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Decide if a task transition is allowed based on static lifecycle rules
|
|
10
|
+
* @param {Object} params - Decision parameters
|
|
11
|
+
* @param {string} params.op - Operation: "start" | "restart"
|
|
12
|
+
* @param {string} params.taskState - Current task state
|
|
13
|
+
* @param {boolean} params.dependenciesReady - Whether all upstream dependencies are satisfied
|
|
14
|
+
* @returns {Object} Decision result - { ok: true } | { ok: false, code: "unsupported_lifecycle", reason: "dependencies"|"policy" }
|
|
15
|
+
*/
|
|
16
|
+
export function decideTransition({ op, taskState, dependenciesReady }) {
|
|
17
|
+
// Validate inputs early - let it crash on invalid data
|
|
18
|
+
if (typeof op !== "string" || !["start", "restart"].includes(op)) {
|
|
19
|
+
throw new Error(`Invalid operation: ${op}. Must be "start" or "restart"`);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (typeof taskState !== "string") {
|
|
23
|
+
throw new Error(`Invalid taskState: ${taskState}. Must be a string`);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (typeof dependenciesReady !== "boolean") {
|
|
27
|
+
throw new Error(
|
|
28
|
+
`Invalid dependenciesReady: ${dependenciesReady}. Must be boolean`
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Handle start operation
|
|
33
|
+
if (op === "start") {
|
|
34
|
+
if (!dependenciesReady) {
|
|
35
|
+
return Object.freeze({
|
|
36
|
+
ok: false,
|
|
37
|
+
code: "unsupported_lifecycle",
|
|
38
|
+
reason: "dependencies",
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
return Object.freeze({ ok: true });
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Handle restart operation
|
|
45
|
+
if (op === "restart") {
|
|
46
|
+
if (taskState === "completed") {
|
|
47
|
+
return Object.freeze({ ok: true });
|
|
48
|
+
}
|
|
49
|
+
return Object.freeze({
|
|
50
|
+
ok: false,
|
|
51
|
+
code: "unsupported_lifecycle",
|
|
52
|
+
reason: "policy",
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// This should never be reached due to input validation
|
|
57
|
+
return Object.freeze({
|
|
58
|
+
ok: false,
|
|
59
|
+
code: "unsupported_lifecycle",
|
|
60
|
+
reason: "policy",
|
|
61
|
+
});
|
|
62
|
+
}
|