@ryanfw/prompt-orchestration-pipeline 0.16.4 → 0.17.1
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 +1 -1
- package/src/api/validators/json.js +6 -1
- package/src/config/models.js +63 -1
- package/src/core/orchestrator.js +28 -56
- package/src/core/pipeline-runner.js +51 -1
- package/src/core/task-runner.js +17 -7
- package/src/llm/index.js +148 -0
- package/src/pages/Code.jsx +201 -2
- package/src/providers/anthropic.js +3 -2
- package/src/providers/base.js +19 -0
- package/src/providers/deepseek.js +3 -2
- package/src/providers/moonshot.js +218 -0
- package/src/ui/dist/assets/{index-DI_nRqVI.js → index-xx8otyG0.js} +142 -1
- package/src/ui/dist/assets/{index-DI_nRqVI.js.map → index-xx8otyG0.js.map} +1 -1
- package/src/ui/dist/index.html +1 -1
|
@@ -26930,10 +26930,65 @@ function CopyableCodeBlock({ children, className = "", maxHeight }) {
|
|
|
26930
26930
|
const sections = [
|
|
26931
26931
|
{ id: "environment", label: "Environment", icon: Key },
|
|
26932
26932
|
{ id: "getting-started", label: "Getting Started", icon: FileText },
|
|
26933
|
+
{ id: "pipeline-config", label: "Pipeline Config", icon: Folder },
|
|
26933
26934
|
{ id: "io-api", label: "IO API", icon: Database },
|
|
26934
26935
|
{ id: "llm-api", label: "LLM API", icon: Cpu },
|
|
26935
26936
|
{ id: "validation", label: "Validation", icon: Shield }
|
|
26936
26937
|
];
|
|
26938
|
+
const samplePipelineJson = {
|
|
26939
|
+
name: "content-generation",
|
|
26940
|
+
version: "1.0.0",
|
|
26941
|
+
description: "Demo pipeline showcasing multi-stage LLM workflows",
|
|
26942
|
+
tasks: ["research", "analysis", "synthesis", "formatting"],
|
|
26943
|
+
taskConfig: {
|
|
26944
|
+
research: {
|
|
26945
|
+
maxRetries: 3
|
|
26946
|
+
}
|
|
26947
|
+
},
|
|
26948
|
+
llm: {
|
|
26949
|
+
provider: "anthropic",
|
|
26950
|
+
model: "claude-sonnet-4-20250514"
|
|
26951
|
+
}
|
|
26952
|
+
};
|
|
26953
|
+
const pipelineFields = [
|
|
26954
|
+
{
|
|
26955
|
+
name: "name",
|
|
26956
|
+
required: true,
|
|
26957
|
+
type: "string",
|
|
26958
|
+
description: "Unique identifier for the pipeline. Used to reference this pipeline from seed files."
|
|
26959
|
+
},
|
|
26960
|
+
{
|
|
26961
|
+
name: "version",
|
|
26962
|
+
required: false,
|
|
26963
|
+
type: "string",
|
|
26964
|
+
description: 'Semantic version of the pipeline (e.g., "1.0.0"). Useful for tracking changes.'
|
|
26965
|
+
},
|
|
26966
|
+
{
|
|
26967
|
+
name: "description",
|
|
26968
|
+
required: false,
|
|
26969
|
+
type: "string",
|
|
26970
|
+
description: "Human-readable description of what this pipeline does."
|
|
26971
|
+
},
|
|
26972
|
+
{
|
|
26973
|
+
name: "tasks",
|
|
26974
|
+
required: true,
|
|
26975
|
+
type: "string[]",
|
|
26976
|
+
description: "Ordered array of task names to execute. Each task must be registered in the task index."
|
|
26977
|
+
},
|
|
26978
|
+
{
|
|
26979
|
+
name: "taskConfig",
|
|
26980
|
+
required: false,
|
|
26981
|
+
type: "object",
|
|
26982
|
+
description: "Per-task configuration overrides. Keys are task names, values are config objects passed to stages."
|
|
26983
|
+
},
|
|
26984
|
+
{
|
|
26985
|
+
name: "llm",
|
|
26986
|
+
required: false,
|
|
26987
|
+
type: "{ provider, model }",
|
|
26988
|
+
description: "Pipeline-level LLM override. When set, ALL task LLM calls are routed to this provider/model.",
|
|
26989
|
+
isNew: true
|
|
26990
|
+
}
|
|
26991
|
+
];
|
|
26937
26992
|
const writeFunctions = [
|
|
26938
26993
|
{
|
|
26939
26994
|
name: "writeArtifact",
|
|
@@ -27024,7 +27079,8 @@ const envVars = [
|
|
|
27024
27079
|
{ name: "ANTHROPIC_API_KEY", provider: "Anthropic" },
|
|
27025
27080
|
{ name: "GEMINI_API_KEY", provider: "Google Gemini" },
|
|
27026
27081
|
{ name: "DEEPSEEK_API_KEY", provider: "DeepSeek" },
|
|
27027
|
-
{ name: "ZHIPU_API_KEY", provider: "Zhipu" }
|
|
27082
|
+
{ name: "ZHIPU_API_KEY", provider: "Zhipu" },
|
|
27083
|
+
{ name: "MOONSHOT_API_KEY", provider: "Moonshot" }
|
|
27028
27084
|
];
|
|
27029
27085
|
function CollapsibleSection({
|
|
27030
27086
|
id,
|
|
@@ -27244,6 +27300,91 @@ function CodePage() {
|
|
|
27244
27300
|
]
|
|
27245
27301
|
}
|
|
27246
27302
|
),
|
|
27303
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
27304
|
+
CollapsibleSection,
|
|
27305
|
+
{
|
|
27306
|
+
id: "pipeline-config",
|
|
27307
|
+
title: "Pipeline Configuration (pipeline.json)",
|
|
27308
|
+
icon: Folder,
|
|
27309
|
+
defaultOpen: true,
|
|
27310
|
+
children: [
|
|
27311
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(p$d, { as: "p", size: "3", className: "text-gray-600 mb-4", children: [
|
|
27312
|
+
"Each pipeline is defined by a ",
|
|
27313
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "2", children: "pipeline.json" }),
|
|
27314
|
+
" ",
|
|
27315
|
+
"file in its directory. This file specifies which tasks to run and optional configuration overrides."
|
|
27316
|
+
] }),
|
|
27317
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-6", children: [
|
|
27318
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
27319
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { size: "2", weight: "medium", className: "mb-3 block", children: "Fields" }),
|
|
27320
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border border-gray-200 rounded-lg overflow-hidden", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(m$1, { children: [
|
|
27321
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(d, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(P$1, { children: [
|
|
27322
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(f$1, { className: "bg-gray-50", children: "Field" }),
|
|
27323
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(f$1, { className: "bg-gray-50", children: "Type" }),
|
|
27324
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(f$1, { className: "bg-gray-50", children: "Required" }),
|
|
27325
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(f$1, { className: "bg-gray-50", children: "Description" })
|
|
27326
|
+
] }) }),
|
|
27327
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(b$1, { children: pipelineFields.map((field) => /* @__PURE__ */ jsxRuntimeExports.jsxs(P$1, { children: [
|
|
27328
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(R, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(p$6, { align: "center", gap: "2", children: [
|
|
27329
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "2", children: field.name }),
|
|
27330
|
+
field.isNew && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "px-1.5 py-0.5 text-xs font-medium bg-green-100 text-green-700 rounded", children: "NEW" })
|
|
27331
|
+
] }) }),
|
|
27332
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(T, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "1", className: "text-gray-600", children: field.type }) }),
|
|
27333
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(T, { children: field.required ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-red-600 font-medium", children: "Yes" }) : /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-gray-400", children: "No" }) }),
|
|
27334
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(T, { className: "text-gray-600 text-sm", children: field.description })
|
|
27335
|
+
] }, field.name)) })
|
|
27336
|
+
] }) })
|
|
27337
|
+
] }),
|
|
27338
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
27339
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { size: "2", weight: "medium", className: "mb-2 block", children: "Example" }),
|
|
27340
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CopyableCodeBlock, { maxHeight: "280px", children: JSON.stringify(samplePipelineJson, null, 2) })
|
|
27341
|
+
] }),
|
|
27342
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-blue-50 border border-blue-200 rounded-lg p-4", children: [
|
|
27343
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(p$6, { align: "center", gap: "2", className: "mb-2", children: [
|
|
27344
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Cpu, { className: "h-4 w-4 text-blue-600" }),
|
|
27345
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { size: "2", weight: "medium", className: "text-blue-800", children: "Pipeline-Level LLM Override" }),
|
|
27346
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "px-1.5 py-0.5 text-xs font-medium bg-green-100 text-green-700 rounded", children: "NEW" })
|
|
27347
|
+
] }),
|
|
27348
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(p$d, { as: "p", size: "2", className: "text-blue-700 mb-3", children: [
|
|
27349
|
+
"When the ",
|
|
27350
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "2", children: "llm" }),
|
|
27351
|
+
" field is set in pipeline.json, ALL LLM calls from task stages are automatically routed to the specified provider and model — regardless of what the task code requests."
|
|
27352
|
+
] }),
|
|
27353
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("ul", { className: "space-y-1 text-sm text-blue-700", children: [
|
|
27354
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("li", { className: "flex items-start gap-2", children: [
|
|
27355
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-blue-500 mt-0.5", children: "•" }),
|
|
27356
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
27357
|
+
"Tasks calling ",
|
|
27358
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "1", children: "llm.deepseek.chat()" }),
|
|
27359
|
+
" ",
|
|
27360
|
+
"will use the override provider/model"
|
|
27361
|
+
] })
|
|
27362
|
+
] }),
|
|
27363
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("li", { className: "flex items-start gap-2", children: [
|
|
27364
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-blue-500 mt-0.5", children: "•" }),
|
|
27365
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
27366
|
+
"Original provider/model is preserved in",
|
|
27367
|
+
" ",
|
|
27368
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "1", children: "metadata.originalProvider" })
|
|
27369
|
+
] })
|
|
27370
|
+
] }),
|
|
27371
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("li", { className: "flex items-start gap-2", children: [
|
|
27372
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-blue-500 mt-0.5", children: "•" }),
|
|
27373
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Useful for A/B testing, cost control, or switching providers during outages" })
|
|
27374
|
+
] })
|
|
27375
|
+
] })
|
|
27376
|
+
] }),
|
|
27377
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-sm text-gray-500", children: [
|
|
27378
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Location: " }),
|
|
27379
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(p$4, { size: "2", children: [
|
|
27380
|
+
"{pipelineDir}",
|
|
27381
|
+
"/pipeline.json"
|
|
27382
|
+
] })
|
|
27383
|
+
] })
|
|
27384
|
+
] })
|
|
27385
|
+
]
|
|
27386
|
+
}
|
|
27387
|
+
),
|
|
27247
27388
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
27248
27389
|
CollapsibleSection,
|
|
27249
27390
|
{
|