@ryanfw/prompt-orchestration-pipeline 0.6.0 → 0.8.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.
Files changed (62) hide show
  1. package/README.md +1 -2
  2. package/package.json +1 -2
  3. package/src/api/validators/json.js +39 -0
  4. package/src/components/DAGGrid.jsx +392 -303
  5. package/src/components/JobCard.jsx +13 -11
  6. package/src/components/JobDetail.jsx +41 -71
  7. package/src/components/JobTable.jsx +32 -22
  8. package/src/components/Layout.jsx +0 -21
  9. package/src/components/LiveText.jsx +47 -0
  10. package/src/components/TaskDetailSidebar.jsx +216 -0
  11. package/src/components/TimerText.jsx +82 -0
  12. package/src/components/ui/RestartJobModal.jsx +140 -0
  13. package/src/components/ui/toast.jsx +138 -0
  14. package/src/config/models.js +322 -0
  15. package/src/config/statuses.js +119 -0
  16. package/src/core/config.js +2 -164
  17. package/src/core/file-io.js +1 -1
  18. package/src/core/module-loader.js +54 -40
  19. package/src/core/pipeline-runner.js +52 -26
  20. package/src/core/status-writer.js +147 -3
  21. package/src/core/symlink-bridge.js +55 -0
  22. package/src/core/symlink-utils.js +94 -0
  23. package/src/core/task-runner.js +267 -443
  24. package/src/llm/index.js +167 -52
  25. package/src/pages/Code.jsx +57 -3
  26. package/src/pages/PipelineDetail.jsx +92 -22
  27. package/src/pages/PromptPipelineDashboard.jsx +15 -36
  28. package/src/providers/anthropic.js +83 -69
  29. package/src/providers/base.js +52 -0
  30. package/src/providers/deepseek.js +17 -34
  31. package/src/providers/gemini.js +226 -0
  32. package/src/providers/openai.js +36 -106
  33. package/src/providers/zhipu.js +136 -0
  34. package/src/ui/client/adapters/job-adapter.js +16 -26
  35. package/src/ui/client/api.js +134 -0
  36. package/src/ui/client/hooks/useJobDetailWithUpdates.js +65 -178
  37. package/src/ui/client/index.css +9 -0
  38. package/src/ui/client/index.html +1 -0
  39. package/src/ui/client/main.jsx +18 -15
  40. package/src/ui/client/time-store.js +161 -0
  41. package/src/ui/config-bridge.js +15 -24
  42. package/src/ui/config-bridge.node.js +15 -24
  43. package/src/ui/dist/assets/{index-WgJUlSmE.js → index-DqkbzXZ1.js} +1408 -771
  44. package/src/ui/dist/assets/style-DBF9NQGk.css +62 -0
  45. package/src/ui/dist/index.html +3 -2
  46. package/src/ui/public/favicon.svg +12 -0
  47. package/src/ui/server.js +231 -38
  48. package/src/ui/transformers/status-transformer.js +18 -31
  49. package/src/ui/watcher.js +5 -1
  50. package/src/utils/dag.js +8 -4
  51. package/src/utils/duration.js +13 -19
  52. package/src/utils/formatters.js +27 -0
  53. package/src/utils/geometry-equality.js +83 -0
  54. package/src/utils/pipelines.js +5 -1
  55. package/src/utils/time-utils.js +40 -0
  56. package/src/utils/token-cost-calculator.js +4 -7
  57. package/src/utils/ui.jsx +14 -16
  58. package/src/components/ui/select.jsx +0 -27
  59. package/src/lib/utils.js +0 -6
  60. package/src/ui/client/hooks/useTicker.js +0 -26
  61. package/src/ui/config-bridge.browser.js +0 -149
  62. package/src/ui/dist/assets/style-x0V-5m8e.css +0 -62
package/README.md CHANGED
@@ -61,8 +61,7 @@ flowchart TD
61
61
  B --> D["init pipeline-data/current/{jobId}/tasks-status.json"]
62
62
  B --> E[Read pipeline-config/pipeline.json]
63
63
  E --> F[Spawn task runner]
64
- F --> G["write tasks/<task>/letter.json"]
65
- G --> H[Run task inner pipeline]
64
+ F --> H[Run task inner pipeline]
66
65
  H --> I["write tasks/<task>/output.json"]
67
66
  I --> J[Update tasks-status.json]
68
67
  J --> K{More tasks?}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryanfw/prompt-orchestration-pipeline",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
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
6
  "main": "src/ui/server.js",
@@ -41,7 +41,6 @@
41
41
  "@radix-ui/themes": "^3.2.1",
42
42
  "ajv": "^8.17.1",
43
43
  "chokidar": "^3.5.3",
44
- "clsx": "^2.1.1",
45
44
  "commander": "^14.0.2",
46
45
  "dotenv": "^17.2.3",
47
46
  "lucide-react": "^0.544.0",
@@ -0,0 +1,39 @@
1
+ import Ajv from "ajv";
2
+
3
+ const ajv = new Ajv({ allErrors: true, strict: false });
4
+
5
+ export const validateWithSchema = (schema, data) => {
6
+ let parsedData = data;
7
+
8
+ // Parse string data to JSON object
9
+ if (typeof data === "string") {
10
+ try {
11
+ parsedData = JSON.parse(data);
12
+ } catch (parseError) {
13
+ return {
14
+ valid: false,
15
+ errors: [
16
+ {
17
+ instancePath: "",
18
+ schemaPath: "#/type",
19
+ keyword: "type",
20
+ params: { type: "object" },
21
+ message: "must be a valid JSON object (string parsing failed)",
22
+ },
23
+ ],
24
+ };
25
+ }
26
+ }
27
+
28
+ const validateFunction = ajv.compile(schema);
29
+ const isValid = validateFunction(parsedData);
30
+
31
+ if (isValid) {
32
+ return { valid: true };
33
+ } else {
34
+ return {
35
+ valid: false,
36
+ errors: validateFunction.errors,
37
+ };
38
+ }
39
+ };