ai-data-workflow-logic 0.1.5 → 0.1.6
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 +8 -7
- package/src/filesystem.ts +10 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-data-workflow-logic",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "EagerDataFlow-backed AI Data Workflow RunGraph helpers",
|
|
6
6
|
"type": "module",
|
|
@@ -11,12 +11,13 @@
|
|
|
11
11
|
"./filesystem": "./src/filesystem.ts"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"ai-data-workflow-contract": "0.1.
|
|
15
|
-
"ai-workflow-contract": "0.1.
|
|
16
|
-
"ai-workflow-logic": "0.1.
|
|
17
|
-
"eager-data-flow-contract": "0.1.
|
|
18
|
-
"eager-data-flow-logic": "0.1.
|
|
19
|
-
"
|
|
14
|
+
"ai-data-workflow-contract": "0.1.2",
|
|
15
|
+
"ai-workflow-contract": "0.1.5",
|
|
16
|
+
"ai-workflow-logic": "0.1.5",
|
|
17
|
+
"eager-data-flow-contract": "0.1.2",
|
|
18
|
+
"eager-data-flow-logic": "0.1.3",
|
|
19
|
+
"flow-step-space-logic": "0.1.0",
|
|
20
|
+
"work-ctrl-flow-logic": "0.1.2"
|
|
20
21
|
},
|
|
21
22
|
"files": [
|
|
22
23
|
"src"
|
package/src/filesystem.ts
CHANGED
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
createFilesystemCodeResolver,
|
|
21
21
|
materializeEagerDataFlowPlan,
|
|
22
22
|
} from 'eager-data-flow-logic';
|
|
23
|
+
import { assembleDefinitionStepProfileDirectory } from 'flow-step-space-logic/filesystem';
|
|
23
24
|
import { FilesystemFlowRunCheckpointStore } from 'ai-workflow-logic/checkpoint-filesystem';
|
|
24
25
|
import {
|
|
25
26
|
normalizeAIWorkflowProfileDurableState,
|
|
@@ -360,17 +361,19 @@ function validateAIDataDefinition(definitionDir: string): void {
|
|
|
360
361
|
}
|
|
361
362
|
|
|
362
363
|
function loadAIDataBinding(definitionDir: string) {
|
|
363
|
-
const
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
364
|
+
const assembled = assembleDefinitionStepProfileDirectory(definitionDir, 'AIDataWorkflow');
|
|
365
|
+
if (assembled.diagnostics.length > 0) {
|
|
366
|
+
throw new Error(`AIDataWorkflow StepSpace is invalid: ${assembled.diagnostics.map((item) => item.code).join(', ')}`);
|
|
367
|
+
}
|
|
368
|
+
const sources = Object.fromEntries((assembled.sources as readonly ({ readonly ref: string; readonly content: string } | { readonly name: string; readonly content: string })[])
|
|
369
|
+
.map((source) => ['name' in source ? source.name : source.ref, source.content]));
|
|
369
370
|
const loaded = loadAIDataWorkflowSources(sources, { baseUri: definitionDir });
|
|
370
371
|
if (!loaded.binding || loaded.diagnostics.length > 0) {
|
|
371
372
|
throw new Error(`AIDataWorkflow definition is invalid: ${loaded.diagnostics.map((item) => item.code).join(', ')}`);
|
|
372
373
|
}
|
|
373
|
-
return
|
|
374
|
+
return assembled.forest
|
|
375
|
+
? { ...loaded.binding, definition: { ...loaded.binding.definition, definitionStepForest: assembled.forest } }
|
|
376
|
+
: loaded.binding;
|
|
374
377
|
}
|
|
375
378
|
|
|
376
379
|
function durableGraph(graph: AIDataWorkflowRunGraph): AIDataWorkflowRunGraph {
|