@decaf-ts/integrations 0.10.5 → 0.10.8
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/dist/integrations.cjs +1 -1
- package/lib/cjs/graph/engine/catalog/GraphBuiltInRegistrations.cjs +12 -73
- package/lib/cjs/graph/engine/catalog/GraphBuiltInRegistrations.cjs.map +1 -1
- package/lib/cjs/graph/engine/execution/GraphExecutionContext.cjs +5 -1
- package/lib/cjs/graph/engine/execution/GraphExecutionContext.cjs.map +1 -1
- package/lib/cjs/graph/engine/execution/GraphExecutionEngine.cjs +66 -1
- package/lib/cjs/graph/engine/execution/GraphExecutionEngine.cjs.map +1 -1
- package/lib/cjs/graph/engine/execution/GraphExecutionFrame.cjs +16 -0
- package/lib/cjs/graph/engine/execution/GraphExecutionFrame.cjs.map +1 -1
- package/lib/cjs/graph/engine/execution/index.cjs +0 -4
- package/lib/cjs/graph/engine/execution/index.cjs.map +1 -1
- package/lib/cjs/graph/engine/index.cjs +0 -7
- package/lib/cjs/graph/engine/index.cjs.map +1 -1
- package/lib/cjs/graph/engine/loops/index.cjs +0 -3
- package/lib/cjs/graph/engine/loops/index.cjs.map +1 -1
- package/lib/cjs/graph/engine/validation/GraphLooseNodeValidation.cjs +36 -0
- package/lib/cjs/graph/engine/validation/GraphLooseNodeValidation.cjs.map +1 -0
- package/lib/cjs/graph/engine/validation/GraphParameterValidator.cjs +36 -3
- package/lib/cjs/graph/engine/validation/GraphParameterValidator.cjs.map +1 -1
- package/lib/cjs/graph/engine/validation/GraphWorkflowDocumentValidator.cjs +32 -1
- package/lib/cjs/graph/engine/validation/GraphWorkflowDocumentValidator.cjs.map +1 -1
- package/lib/cjs/graph/engine/validation/index.cjs +1 -0
- package/lib/cjs/graph/engine/validation/index.cjs.map +1 -1
- package/lib/cjs/graph/nodes/agents/agent.cjs +118 -0
- package/lib/cjs/graph/nodes/agents/agent.cjs.map +1 -0
- package/lib/cjs/graph/nodes/base.cjs +61 -0
- package/lib/cjs/graph/nodes/base.cjs.map +1 -0
- package/lib/cjs/graph/nodes/boundary/input-value.cjs +59 -0
- package/lib/cjs/graph/nodes/boundary/input-value.cjs.map +1 -0
- package/lib/cjs/graph/nodes/flow-control/break.cjs +71 -0
- package/lib/cjs/graph/nodes/flow-control/break.cjs.map +1 -0
- package/lib/cjs/graph/nodes/flow-control/error-boundary.cjs +72 -0
- package/lib/cjs/graph/nodes/flow-control/error-boundary.cjs.map +1 -0
- package/lib/cjs/graph/nodes/flow-control/human-approval.cjs +80 -0
- package/lib/cjs/graph/nodes/flow-control/human-approval.cjs.map +1 -0
- package/lib/cjs/graph/nodes/flow-control/if.cjs +82 -0
- package/lib/cjs/graph/nodes/flow-control/if.cjs.map +1 -0
- package/lib/cjs/graph/nodes/flow-control/parallel.cjs +69 -0
- package/lib/cjs/graph/nodes/flow-control/parallel.cjs.map +1 -0
- package/lib/cjs/graph/nodes/flow-control/switch.cjs +190 -0
- package/lib/cjs/graph/nodes/flow-control/switch.cjs.map +1 -0
- package/lib/cjs/graph/nodes/index.cjs +162 -0
- package/lib/cjs/graph/nodes/index.cjs.map +1 -0
- package/lib/cjs/graph/nodes/loops/foreach.cjs +189 -0
- package/lib/cjs/graph/nodes/loops/foreach.cjs.map +1 -0
- package/lib/cjs/graph/nodes/loops/loop-metadata.cjs +48 -0
- package/lib/cjs/graph/nodes/loops/loop-metadata.cjs.map +1 -0
- package/lib/cjs/graph/nodes/loops/until.cjs +136 -0
- package/lib/cjs/graph/nodes/loops/until.cjs.map +1 -0
- package/lib/cjs/graph/nodes/loops/while.cjs +133 -0
- package/lib/cjs/graph/nodes/loops/while.cjs.map +1 -0
- package/lib/cjs/graph/nodes/manifests.cjs +342 -0
- package/lib/cjs/graph/nodes/manifests.cjs.map +1 -0
- package/lib/cjs/graph/nodes/triggers/chat.cjs +82 -0
- package/lib/cjs/graph/nodes/triggers/chat.cjs.map +1 -0
- package/lib/cjs/graph/nodes/triggers/event.cjs +63 -0
- package/lib/cjs/graph/nodes/triggers/event.cjs.map +1 -0
- package/lib/cjs/graph/nodes/triggers/form.cjs +64 -0
- package/lib/cjs/graph/nodes/triggers/form.cjs.map +1 -0
- package/lib/cjs/graph/nodes/triggers/manual.cjs +65 -0
- package/lib/cjs/graph/nodes/triggers/manual.cjs.map +1 -0
- package/lib/cjs/graph/nodes/triggers/schedule.cjs +65 -0
- package/lib/cjs/graph/nodes/triggers/schedule.cjs.map +1 -0
- package/lib/cjs/graph/nodes/triggers/webhook.cjs +67 -0
- package/lib/cjs/graph/nodes/triggers/webhook.cjs.map +1 -0
- package/lib/cjs/graph/nodes/utility/code.cjs +139 -0
- package/lib/cjs/graph/nodes/utility/code.cjs.map +1 -0
- package/lib/cjs/graph/nodes/utility/delay.cjs +66 -0
- package/lib/cjs/graph/nodes/utility/delay.cjs.map +1 -0
- package/lib/cjs/graph/nodes/utility/log.cjs +70 -0
- package/lib/cjs/graph/nodes/utility/log.cjs.map +1 -0
- package/lib/cjs/graph/nodes/utility/map.cjs +69 -0
- package/lib/cjs/graph/nodes/utility/map.cjs.map +1 -0
- package/lib/cjs/graph/nodes/utility/merge.cjs +67 -0
- package/lib/cjs/graph/nodes/utility/merge.cjs.map +1 -0
- package/lib/cjs/graph/nodes/utility/return.cjs +69 -0
- package/lib/cjs/graph/nodes/utility/return.cjs.map +1 -0
- package/lib/cjs/graph/nodes/utility/utility-log.cjs +77 -0
- package/lib/cjs/graph/nodes/utility/utility-log.cjs.map +1 -0
- package/lib/cjs/index.cjs +3 -3
- package/lib/cjs/nest/graph/GraphExecutorRegistryFactory.cjs +8 -4
- package/lib/cjs/nest/graph/GraphExecutorRegistryFactory.cjs.map +1 -1
- package/lib/cjs/nest/graph/GraphWorkflowBoundaryValidation.cjs +2 -0
- package/lib/cjs/nest/graph/GraphWorkflowBoundaryValidation.cjs.map +1 -1
- package/lib/cjs/nest/graph/GraphWorkflowService.cjs +1 -13
- package/lib/cjs/nest/graph/GraphWorkflowService.cjs.map +1 -1
- package/lib/esm/graph/engine/catalog/GraphBuiltInRegistrations.js +11 -72
- package/lib/esm/graph/engine/catalog/GraphBuiltInRegistrations.js.map +1 -1
- package/lib/esm/graph/engine/execution/GraphExecutionContext.js +5 -1
- package/lib/esm/graph/engine/execution/GraphExecutionContext.js.map +1 -1
- package/lib/esm/graph/engine/execution/GraphExecutionEngine.js +66 -1
- package/lib/esm/graph/engine/execution/GraphExecutionEngine.js.map +1 -1
- package/lib/esm/graph/engine/execution/GraphExecutionFrame.js +16 -0
- package/lib/esm/graph/engine/execution/GraphExecutionFrame.js.map +1 -1
- package/lib/esm/graph/engine/execution/index.js +0 -4
- package/lib/esm/graph/engine/execution/index.js.map +1 -1
- package/lib/esm/graph/engine/index.js +0 -7
- package/lib/esm/graph/engine/index.js.map +1 -1
- package/lib/esm/graph/engine/loops/index.js +0 -3
- package/lib/esm/graph/engine/loops/index.js.map +1 -1
- package/lib/esm/graph/engine/validation/GraphLooseNodeValidation.js +32 -0
- package/lib/esm/graph/engine/validation/GraphLooseNodeValidation.js.map +1 -0
- package/lib/esm/graph/engine/validation/GraphParameterValidator.js +36 -3
- package/lib/esm/graph/engine/validation/GraphParameterValidator.js.map +1 -1
- package/lib/esm/graph/engine/validation/GraphWorkflowDocumentValidator.js +32 -1
- package/lib/esm/graph/engine/validation/GraphWorkflowDocumentValidator.js.map +1 -1
- package/lib/esm/graph/engine/validation/index.js +1 -0
- package/lib/esm/graph/engine/validation/index.js.map +1 -1
- package/lib/esm/graph/nodes/agents/agent.js +109 -0
- package/lib/esm/graph/nodes/agents/agent.js.map +1 -0
- package/lib/esm/graph/nodes/base.js +56 -0
- package/lib/esm/graph/nodes/base.js.map +1 -0
- package/lib/esm/graph/nodes/boundary/input-value.js +50 -0
- package/lib/esm/graph/nodes/boundary/input-value.js.map +1 -0
- package/lib/esm/graph/nodes/flow-control/break.js +62 -0
- package/lib/esm/graph/nodes/flow-control/break.js.map +1 -0
- package/lib/esm/graph/nodes/flow-control/error-boundary.js +63 -0
- package/lib/esm/graph/nodes/flow-control/error-boundary.js.map +1 -0
- package/lib/esm/graph/nodes/flow-control/human-approval.js +71 -0
- package/lib/esm/graph/nodes/flow-control/human-approval.js.map +1 -0
- package/lib/esm/graph/nodes/flow-control/if.js +73 -0
- package/lib/esm/graph/nodes/flow-control/if.js.map +1 -0
- package/lib/esm/graph/nodes/flow-control/parallel.js +60 -0
- package/lib/esm/graph/nodes/flow-control/parallel.js.map +1 -0
- package/lib/esm/graph/nodes/flow-control/switch.js +181 -0
- package/lib/esm/graph/nodes/flow-control/switch.js.map +1 -0
- package/lib/esm/graph/nodes/index.js +144 -0
- package/lib/esm/graph/nodes/index.js.map +1 -0
- package/lib/esm/graph/nodes/loops/foreach.js +180 -0
- package/lib/esm/graph/nodes/loops/foreach.js.map +1 -0
- package/lib/esm/graph/nodes/loops/loop-metadata.js +44 -0
- package/lib/esm/graph/nodes/loops/loop-metadata.js.map +1 -0
- package/lib/esm/graph/nodes/loops/until.js +127 -0
- package/lib/esm/graph/nodes/loops/until.js.map +1 -0
- package/lib/esm/graph/nodes/loops/while.js +124 -0
- package/lib/esm/graph/nodes/loops/while.js.map +1 -0
- package/lib/esm/graph/nodes/manifests.js +338 -0
- package/lib/esm/graph/nodes/manifests.js.map +1 -0
- package/lib/esm/graph/nodes/triggers/chat.js +73 -0
- package/lib/esm/graph/nodes/triggers/chat.js.map +1 -0
- package/lib/esm/graph/nodes/triggers/event.js +54 -0
- package/lib/esm/graph/nodes/triggers/event.js.map +1 -0
- package/lib/esm/graph/nodes/triggers/form.js +55 -0
- package/lib/esm/graph/nodes/triggers/form.js.map +1 -0
- package/lib/esm/graph/nodes/triggers/manual.js +56 -0
- package/lib/esm/graph/nodes/triggers/manual.js.map +1 -0
- package/lib/esm/graph/nodes/triggers/schedule.js +56 -0
- package/lib/esm/graph/nodes/triggers/schedule.js.map +1 -0
- package/lib/esm/graph/nodes/triggers/webhook.js +58 -0
- package/lib/esm/graph/nodes/triggers/webhook.js.map +1 -0
- package/lib/esm/graph/nodes/utility/code.js +130 -0
- package/lib/esm/graph/nodes/utility/code.js.map +1 -0
- package/lib/esm/graph/nodes/utility/delay.js +57 -0
- package/lib/esm/graph/nodes/utility/delay.js.map +1 -0
- package/lib/esm/graph/nodes/utility/log.js +61 -0
- package/lib/esm/graph/nodes/utility/log.js.map +1 -0
- package/lib/esm/graph/nodes/utility/map.js +60 -0
- package/lib/esm/graph/nodes/utility/map.js.map +1 -0
- package/lib/esm/graph/nodes/utility/merge.js +58 -0
- package/lib/esm/graph/nodes/utility/merge.js.map +1 -0
- package/lib/esm/graph/nodes/utility/return.js +60 -0
- package/lib/esm/graph/nodes/utility/return.js.map +1 -0
- package/lib/esm/graph/nodes/utility/utility-log.js +68 -0
- package/lib/esm/graph/nodes/utility/utility-log.js.map +1 -0
- package/lib/esm/index.js +3 -3
- package/lib/esm/nest/graph/GraphExecutorRegistryFactory.js +8 -4
- package/lib/esm/nest/graph/GraphExecutorRegistryFactory.js.map +1 -1
- package/lib/esm/nest/graph/GraphWorkflowBoundaryValidation.js +2 -0
- package/lib/esm/nest/graph/GraphWorkflowBoundaryValidation.js.map +1 -1
- package/lib/esm/nest/graph/GraphWorkflowService.js +2 -14
- package/lib/esm/nest/graph/GraphWorkflowService.js.map +1 -1
- package/lib/types/graph/engine/catalog/GraphBuiltInRegistrations.d.cts +4 -7
- package/lib/types/graph/engine/catalog/GraphBuiltInRegistrations.d.mts +4 -7
- package/lib/types/graph/engine/execution/GraphExecutionContext.d.cts +6 -1
- package/lib/types/graph/engine/execution/GraphExecutionContext.d.mts +6 -1
- package/lib/types/graph/engine/execution/GraphExecutionEngine.d.cts +27 -0
- package/lib/types/graph/engine/execution/GraphExecutionEngine.d.mts +27 -0
- package/lib/types/graph/engine/execution/GraphExecutionFrame.d.cts +12 -0
- package/lib/types/graph/engine/execution/GraphExecutionFrame.d.mts +12 -0
- package/lib/types/graph/engine/execution/index.d.cts +0 -4
- package/lib/types/graph/engine/execution/index.d.mts +0 -4
- package/lib/types/graph/engine/index.d.cts +0 -7
- package/lib/types/graph/engine/index.d.mts +0 -7
- package/lib/types/graph/engine/loops/index.d.cts +0 -3
- package/lib/types/graph/engine/loops/index.d.mts +0 -3
- package/lib/types/graph/engine/validation/GraphLooseNodeValidation.d.cts +21 -0
- package/lib/types/graph/engine/validation/GraphLooseNodeValidation.d.mts +21 -0
- package/lib/types/graph/engine/validation/GraphParameterValidator.d.cts +25 -1
- package/lib/types/graph/engine/validation/GraphParameterValidator.d.mts +25 -1
- package/lib/types/graph/engine/validation/index.d.cts +1 -0
- package/lib/types/graph/engine/validation/index.d.mts +1 -0
- package/lib/types/graph/nodes/agents/agent.d.cts +31 -0
- package/lib/types/graph/nodes/agents/agent.d.mts +31 -0
- package/lib/types/graph/nodes/base.d.cts +58 -0
- package/lib/types/graph/nodes/base.d.mts +58 -0
- package/lib/types/graph/nodes/boundary/input-value.d.cts +6 -0
- package/lib/types/graph/nodes/boundary/input-value.d.mts +6 -0
- package/lib/types/graph/nodes/flow-control/break.d.cts +8 -0
- package/lib/types/graph/nodes/flow-control/break.d.mts +8 -0
- package/lib/types/graph/nodes/flow-control/error-boundary.d.cts +8 -0
- package/lib/types/graph/nodes/flow-control/error-boundary.d.mts +8 -0
- package/lib/types/graph/nodes/flow-control/human-approval.d.cts +8 -0
- package/lib/types/graph/nodes/flow-control/human-approval.d.mts +8 -0
- package/lib/types/graph/nodes/flow-control/if.d.cts +8 -0
- package/lib/types/graph/nodes/flow-control/if.d.mts +8 -0
- package/lib/types/graph/nodes/flow-control/parallel.d.cts +7 -0
- package/lib/types/graph/nodes/flow-control/parallel.d.mts +7 -0
- package/lib/types/graph/nodes/flow-control/switch.d.cts +23 -0
- package/lib/types/graph/nodes/flow-control/switch.d.mts +23 -0
- package/lib/types/graph/nodes/index.d.cts +93 -0
- package/lib/types/graph/nodes/index.d.mts +93 -0
- package/lib/types/graph/nodes/loops/foreach.d.cts +11 -0
- package/lib/types/graph/nodes/loops/foreach.d.mts +11 -0
- package/lib/types/graph/nodes/loops/loop-metadata.d.cts +20 -0
- package/lib/types/graph/nodes/loops/loop-metadata.d.mts +20 -0
- package/lib/types/graph/nodes/loops/until.d.cts +8 -0
- package/lib/types/graph/nodes/loops/until.d.mts +8 -0
- package/lib/types/graph/nodes/loops/while.d.cts +8 -0
- package/lib/types/graph/nodes/loops/while.d.mts +8 -0
- package/lib/types/graph/nodes/manifests.d.cts +62 -0
- package/lib/types/graph/nodes/manifests.d.mts +62 -0
- package/lib/types/graph/nodes/triggers/chat.d.cts +8 -0
- package/lib/types/graph/nodes/triggers/chat.d.mts +8 -0
- package/lib/types/graph/nodes/triggers/event.d.cts +6 -0
- package/lib/types/graph/nodes/triggers/event.d.mts +6 -0
- package/lib/types/graph/nodes/triggers/form.d.cts +6 -0
- package/lib/types/graph/nodes/triggers/form.d.mts +6 -0
- package/lib/types/graph/nodes/triggers/manual.d.cts +6 -0
- package/lib/types/graph/nodes/triggers/manual.d.mts +6 -0
- package/lib/types/graph/nodes/triggers/schedule.d.cts +6 -0
- package/lib/types/graph/nodes/triggers/schedule.d.mts +6 -0
- package/lib/types/graph/nodes/triggers/webhook.d.cts +6 -0
- package/lib/types/graph/nodes/triggers/webhook.d.mts +6 -0
- package/lib/types/graph/nodes/utility/code.d.cts +36 -0
- package/lib/types/graph/nodes/utility/code.d.mts +36 -0
- package/lib/types/graph/nodes/utility/delay.d.cts +7 -0
- package/lib/types/graph/nodes/utility/delay.d.mts +7 -0
- package/lib/types/graph/nodes/utility/log.d.cts +8 -0
- package/lib/types/graph/nodes/utility/log.d.mts +8 -0
- package/lib/types/graph/nodes/utility/map.d.cts +7 -0
- package/lib/types/graph/nodes/utility/map.d.mts +7 -0
- package/lib/types/graph/nodes/utility/merge.d.cts +7 -0
- package/lib/types/graph/nodes/utility/merge.d.mts +7 -0
- package/lib/types/graph/nodes/utility/return.d.cts +7 -0
- package/lib/types/graph/nodes/utility/return.d.mts +7 -0
- package/lib/types/graph/nodes/utility/utility-log.d.cts +10 -0
- package/lib/types/graph/nodes/utility/utility-log.d.mts +10 -0
- package/lib/types/index.d.cts +2 -2
- package/lib/types/index.d.mts +2 -2
- package/lib/types/nest/graph/GraphExecutorRegistryFactory.d.cts +5 -3
- package/lib/types/nest/graph/GraphExecutorRegistryFactory.d.mts +5 -3
- package/package.json +1 -1
- package/lib/cjs/graph/engine/execution/BreakGraphNodeExecutor.cjs +0 -24
- package/lib/cjs/graph/engine/execution/BreakGraphNodeExecutor.cjs.map +0 -1
- package/lib/cjs/graph/engine/execution/CodeGraphNodeExecutor.cjs +0 -103
- package/lib/cjs/graph/engine/execution/CodeGraphNodeExecutor.cjs.map +0 -1
- package/lib/cjs/graph/engine/execution/LogGraphNodeExecutor.cjs +0 -47
- package/lib/cjs/graph/engine/execution/LogGraphNodeExecutor.cjs.map +0 -1
- package/lib/cjs/graph/engine/execution/SwitchGraphNodeExecutor.cjs +0 -121
- package/lib/cjs/graph/engine/execution/SwitchGraphNodeExecutor.cjs.map +0 -1
- package/lib/cjs/graph/engine/loops/ForeachGraphNodeExecutor.cjs +0 -146
- package/lib/cjs/graph/engine/loops/ForeachGraphNodeExecutor.cjs.map +0 -1
- package/lib/cjs/graph/engine/loops/UntilGraphNodeExecutor.cjs +0 -102
- package/lib/cjs/graph/engine/loops/UntilGraphNodeExecutor.cjs.map +0 -1
- package/lib/cjs/graph/engine/loops/WhileGraphNodeExecutor.cjs +0 -103
- package/lib/cjs/graph/engine/loops/WhileGraphNodeExecutor.cjs.map +0 -1
- package/lib/esm/graph/engine/execution/BreakGraphNodeExecutor.js +0 -19
- package/lib/esm/graph/engine/execution/BreakGraphNodeExecutor.js.map +0 -1
- package/lib/esm/graph/engine/execution/CodeGraphNodeExecutor.js +0 -98
- package/lib/esm/graph/engine/execution/CodeGraphNodeExecutor.js.map +0 -1
- package/lib/esm/graph/engine/execution/LogGraphNodeExecutor.js +0 -42
- package/lib/esm/graph/engine/execution/LogGraphNodeExecutor.js.map +0 -1
- package/lib/esm/graph/engine/execution/SwitchGraphNodeExecutor.js +0 -116
- package/lib/esm/graph/engine/execution/SwitchGraphNodeExecutor.js.map +0 -1
- package/lib/esm/graph/engine/loops/ForeachGraphNodeExecutor.js +0 -141
- package/lib/esm/graph/engine/loops/ForeachGraphNodeExecutor.js.map +0 -1
- package/lib/esm/graph/engine/loops/UntilGraphNodeExecutor.js +0 -97
- package/lib/esm/graph/engine/loops/UntilGraphNodeExecutor.js.map +0 -1
- package/lib/esm/graph/engine/loops/WhileGraphNodeExecutor.js +0 -98
- package/lib/esm/graph/engine/loops/WhileGraphNodeExecutor.js.map +0 -1
- package/lib/types/graph/engine/execution/BreakGraphNodeExecutor.d.cts +0 -22
- package/lib/types/graph/engine/execution/BreakGraphNodeExecutor.d.mts +0 -22
- package/lib/types/graph/engine/execution/CodeGraphNodeExecutor.d.cts +0 -65
- package/lib/types/graph/engine/execution/CodeGraphNodeExecutor.d.mts +0 -65
- package/lib/types/graph/engine/execution/LogGraphNodeExecutor.d.cts +0 -25
- package/lib/types/graph/engine/execution/LogGraphNodeExecutor.d.mts +0 -25
- package/lib/types/graph/engine/execution/SwitchGraphNodeExecutor.d.cts +0 -43
- package/lib/types/graph/engine/execution/SwitchGraphNodeExecutor.d.mts +0 -43
- package/lib/types/graph/engine/loops/ForeachGraphNodeExecutor.d.cts +0 -35
- package/lib/types/graph/engine/loops/ForeachGraphNodeExecutor.d.mts +0 -35
- package/lib/types/graph/engine/loops/UntilGraphNodeExecutor.d.cts +0 -22
- package/lib/types/graph/engine/loops/UntilGraphNodeExecutor.d.mts +0 -22
- package/lib/types/graph/engine/loops/WhileGraphNodeExecutor.d.cts +0 -26
- package/lib/types/graph/engine/loops/WhileGraphNodeExecutor.d.mts +0 -26
|
@@ -161,6 +161,24 @@ export declare class GraphExecutionEngine implements Observable<[GraphExecutionO
|
|
|
161
161
|
* Executes a single node, honouring disabled-node semantics (§4.9).
|
|
162
162
|
*/
|
|
163
163
|
private executeNode;
|
|
164
|
+
/**
|
|
165
|
+
* Resolves whether a plan node is activated for execution under the
|
|
166
|
+
* DECAF-50 §4.9 branch semantics. A node with no incoming data edges is
|
|
167
|
+
* a root/source node and always runs. A node fed by one or more data
|
|
168
|
+
* edges runs only when at least one of those edges was activated by a
|
|
169
|
+
* routed upstream output port — a branch the upstream switch (or any
|
|
170
|
+
* partial-output node) did not select leaves its downstream edges
|
|
171
|
+
* unactivated, so the branch is never executed. Workflow-boundary edges
|
|
172
|
+
* are active from the start because workflow inputs are seeded before
|
|
173
|
+
* execution begins.
|
|
174
|
+
*/
|
|
175
|
+
private isNodeActivated;
|
|
176
|
+
/**
|
|
177
|
+
* Skips a node whose incoming data edges were all left unactivated by an
|
|
178
|
+
* upstream branch selection. The node is not executed and its outputs are
|
|
179
|
+
* never routed or collected into workflow outputs (DECAF-50 §4.9).
|
|
180
|
+
*/
|
|
181
|
+
private skipInactiveNode;
|
|
164
182
|
/**
|
|
165
183
|
* Applies the explicit disabled-node semantics (§4.9):
|
|
166
184
|
* `skip`, `passThroughFirstInput`, or `emitDefaults`, resolved from the
|
|
@@ -218,6 +236,15 @@ export declare class GraphExecutionEngine implements Observable<[GraphExecutionO
|
|
|
218
236
|
/**
|
|
219
237
|
* Routes a node's outputs to downstream inputs and workflow outputs along
|
|
220
238
|
* data edges (connection edges are structural and never route values).
|
|
239
|
+
*
|
|
240
|
+
* An edge is traversed only when the source node actually emitted the
|
|
241
|
+
* edge's `sourcePort` (DECAF-50 §4.9 branch semantics). A node that
|
|
242
|
+
* emitted a subset of its declared outputs — e.g. a switch that selected
|
|
243
|
+
* one case — therefore activates only the downstream branch edges of the
|
|
244
|
+
* emitted ports; unselected branch edges are left unactivated, so their
|
|
245
|
+
* downstream nodes are skipped and never contribute to workflow outputs.
|
|
246
|
+
* Emitting an output port explicitly with `undefined` still counts as
|
|
247
|
+
* activated (the port was produced by the executor).
|
|
221
248
|
*/
|
|
222
249
|
private routeOutgoingEdges;
|
|
223
250
|
/**
|
|
@@ -19,10 +19,22 @@ export declare class GraphExecutionFrame {
|
|
|
19
19
|
readonly startedAt: Date;
|
|
20
20
|
readonly nodeResults: Map<string, GraphNodeExecutionResult>;
|
|
21
21
|
readonly events: GraphExecutionEvent[];
|
|
22
|
+
/**
|
|
23
|
+
* Ids of the data edges activated by a routed upstream output port
|
|
24
|
+
* (DECAF-50 §4.9 branch semantics). A data edge is activated only when
|
|
25
|
+
* its source node actually emitted the edge's source port; downstream
|
|
26
|
+
* nodes with no activated incoming data edge are skipped rather than run
|
|
27
|
+
* with undefined inputs.
|
|
28
|
+
*/
|
|
29
|
+
private readonly activeDataEdges;
|
|
22
30
|
finishedAt?: Date;
|
|
23
31
|
constructor(runId: GraphRunId, plan: GraphExecutionPlan, valueStore: GraphValueStore, eventFactory: GraphExecutionEventFactory);
|
|
24
32
|
/** Records a node execution result. */
|
|
25
33
|
recordNodeResult(result: GraphNodeExecutionResult): void;
|
|
34
|
+
/** Marks a data edge as activated by its routed source output port. */
|
|
35
|
+
activateDataEdge(edgeId: string): void;
|
|
36
|
+
/** Returns whether a data edge has been activated during this run. */
|
|
37
|
+
isDataEdgeActive(edgeId: string): boolean;
|
|
26
38
|
/** Appends an event to the run's event log. */
|
|
27
39
|
appendEvent(event: GraphExecutionEvent): void;
|
|
28
40
|
/** Marks the run as finished. */
|
|
@@ -19,10 +19,22 @@ export declare class GraphExecutionFrame {
|
|
|
19
19
|
readonly startedAt: Date;
|
|
20
20
|
readonly nodeResults: Map<string, GraphNodeExecutionResult>;
|
|
21
21
|
readonly events: GraphExecutionEvent[];
|
|
22
|
+
/**
|
|
23
|
+
* Ids of the data edges activated by a routed upstream output port
|
|
24
|
+
* (DECAF-50 §4.9 branch semantics). A data edge is activated only when
|
|
25
|
+
* its source node actually emitted the edge's source port; downstream
|
|
26
|
+
* nodes with no activated incoming data edge are skipped rather than run
|
|
27
|
+
* with undefined inputs.
|
|
28
|
+
*/
|
|
29
|
+
private readonly activeDataEdges;
|
|
22
30
|
finishedAt?: Date;
|
|
23
31
|
constructor(runId: GraphRunId, plan: GraphExecutionPlan, valueStore: GraphValueStore, eventFactory: GraphExecutionEventFactory);
|
|
24
32
|
/** Records a node execution result. */
|
|
25
33
|
recordNodeResult(result: GraphNodeExecutionResult): void;
|
|
34
|
+
/** Marks a data edge as activated by its routed source output port. */
|
|
35
|
+
activateDataEdge(edgeId: string): void;
|
|
36
|
+
/** Returns whether a data edge has been activated during this run. */
|
|
37
|
+
isDataEdgeActive(edgeId: string): boolean;
|
|
26
38
|
/** Appends an event to the run's event log. */
|
|
27
39
|
appendEvent(event: GraphExecutionEvent): void;
|
|
28
40
|
/** Marks the run as finished. */
|
|
@@ -9,8 +9,4 @@ export * from "./GraphExecutionResult.d.cts";
|
|
|
9
9
|
export * from "./GraphExecutionFrame.d.cts";
|
|
10
10
|
export * from "./GraphExecutionEngine.d.cts";
|
|
11
11
|
export * from "./CodeSandboxEvaluator.d.cts";
|
|
12
|
-
export * from "./SwitchGraphNodeExecutor.d.cts";
|
|
13
|
-
export * from "./CodeGraphNodeExecutor.d.cts";
|
|
14
|
-
export * from "./LogGraphNodeExecutor.d.cts";
|
|
15
|
-
export * from "./BreakGraphNodeExecutor.d.cts";
|
|
16
12
|
export * from "./IsolatedVmCodeSandboxEvaluator.d.cts";
|
|
@@ -9,8 +9,4 @@ export * from "./GraphExecutionResult.d.mts";
|
|
|
9
9
|
export * from "./GraphExecutionFrame.d.mts";
|
|
10
10
|
export * from "./GraphExecutionEngine.d.mts";
|
|
11
11
|
export * from "./CodeSandboxEvaluator.d.mts";
|
|
12
|
-
export * from "./SwitchGraphNodeExecutor.d.mts";
|
|
13
|
-
export * from "./CodeGraphNodeExecutor.d.mts";
|
|
14
|
-
export * from "./LogGraphNodeExecutor.d.mts";
|
|
15
|
-
export * from "./BreakGraphNodeExecutor.d.mts";
|
|
16
12
|
export * from "./IsolatedVmCodeSandboxEvaluator.d.mts";
|
|
@@ -29,10 +29,6 @@ export * from "./execution/GraphExecutionFrame.d.cts";
|
|
|
29
29
|
export * from "./execution/GraphExecutionResult.d.cts";
|
|
30
30
|
export * from "./execution/GraphExecutionEngine.d.cts";
|
|
31
31
|
export * from "./execution/CodeSandboxEvaluator.d.cts";
|
|
32
|
-
export * from "./execution/SwitchGraphNodeExecutor.d.cts";
|
|
33
|
-
export * from "./execution/CodeGraphNodeExecutor.d.cts";
|
|
34
|
-
export * from "./execution/LogGraphNodeExecutor.d.cts";
|
|
35
|
-
export * from "./execution/BreakGraphNodeExecutor.d.cts";
|
|
36
32
|
export * from "./execution/IsolatedVmCodeSandboxEvaluator.d.cts";
|
|
37
33
|
export * from "./registry/GraphNodeExecutorRegistry.d.cts";
|
|
38
34
|
export * from "./registry/GraphNodeExecutorResolver.d.cts";
|
|
@@ -52,9 +48,6 @@ export * from "./validation/index.d.cts";
|
|
|
52
48
|
export * from "./loops/GraphConditionEvaluator.d.cts";
|
|
53
49
|
export * from "./loops/ConditionExpressionEvaluator.d.cts";
|
|
54
50
|
export * from "./loops/GraphLoopExecutionContext.d.cts";
|
|
55
|
-
export * from "./loops/ForeachGraphNodeExecutor.d.cts";
|
|
56
|
-
export * from "./loops/WhileGraphNodeExecutor.d.cts";
|
|
57
|
-
export * from "./loops/UntilGraphNodeExecutor.d.cts";
|
|
58
51
|
export * from "./pinning/GraphPinningMetadata.d.cts";
|
|
59
52
|
export * from "./pinning/GraphPinningPolicy.d.cts";
|
|
60
53
|
export * from "./pinning/GraphPinningDependencyResolver.d.cts";
|
|
@@ -29,10 +29,6 @@ export * from "./execution/GraphExecutionFrame.d.mts";
|
|
|
29
29
|
export * from "./execution/GraphExecutionResult.d.mts";
|
|
30
30
|
export * from "./execution/GraphExecutionEngine.d.mts";
|
|
31
31
|
export * from "./execution/CodeSandboxEvaluator.d.mts";
|
|
32
|
-
export * from "./execution/SwitchGraphNodeExecutor.d.mts";
|
|
33
|
-
export * from "./execution/CodeGraphNodeExecutor.d.mts";
|
|
34
|
-
export * from "./execution/LogGraphNodeExecutor.d.mts";
|
|
35
|
-
export * from "./execution/BreakGraphNodeExecutor.d.mts";
|
|
36
32
|
export * from "./execution/IsolatedVmCodeSandboxEvaluator.d.mts";
|
|
37
33
|
export * from "./registry/GraphNodeExecutorRegistry.d.mts";
|
|
38
34
|
export * from "./registry/GraphNodeExecutorResolver.d.mts";
|
|
@@ -52,9 +48,6 @@ export * from "./validation/index.d.mts";
|
|
|
52
48
|
export * from "./loops/GraphConditionEvaluator.d.mts";
|
|
53
49
|
export * from "./loops/ConditionExpressionEvaluator.d.mts";
|
|
54
50
|
export * from "./loops/GraphLoopExecutionContext.d.mts";
|
|
55
|
-
export * from "./loops/ForeachGraphNodeExecutor.d.mts";
|
|
56
|
-
export * from "./loops/WhileGraphNodeExecutor.d.mts";
|
|
57
|
-
export * from "./loops/UntilGraphNodeExecutor.d.mts";
|
|
58
51
|
export * from "./pinning/GraphPinningMetadata.d.mts";
|
|
59
52
|
export * from "./pinning/GraphPinningPolicy.d.mts";
|
|
60
53
|
export * from "./pinning/GraphPinningDependencyResolver.d.mts";
|
|
@@ -6,6 +6,3 @@
|
|
|
6
6
|
export * from "./GraphConditionEvaluator.d.cts";
|
|
7
7
|
export * from "./ConditionExpressionEvaluator.d.cts";
|
|
8
8
|
export * from "./GraphLoopExecutionContext.d.cts";
|
|
9
|
-
export * from "./ForeachGraphNodeExecutor.d.cts";
|
|
10
|
-
export * from "./WhileGraphNodeExecutor.d.cts";
|
|
11
|
-
export * from "./UntilGraphNodeExecutor.d.cts";
|
|
@@ -6,6 +6,3 @@
|
|
|
6
6
|
export * from "./GraphConditionEvaluator.d.mts";
|
|
7
7
|
export * from "./ConditionExpressionEvaluator.d.mts";
|
|
8
8
|
export * from "./GraphLoopExecutionContext.d.mts";
|
|
9
|
-
export * from "./ForeachGraphNodeExecutor.d.mts";
|
|
10
|
-
export * from "./WhileGraphNodeExecutor.d.mts";
|
|
11
|
-
export * from "./UntilGraphNodeExecutor.d.mts";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/engine/validation/GraphLooseNodeValidation
|
|
3
|
+
* @summary Loose-node validation (DECAF-50 §4.26 R2-3 item 8).
|
|
4
|
+
* @description A node connected to nothing is a loose node and fails workflow
|
|
5
|
+
* validation: every node instance must participate in at least one edge
|
|
6
|
+
* (data or connection). The rule is shared by the execution gate
|
|
7
|
+
* ({@link GraphWorkflowDocumentValidator}) and the persistence gate
|
|
8
|
+
* ({@link validateGraphWorkflowDocumentAtBoundary}) so both start and save
|
|
9
|
+
* reject a loose node. Nested loop-body documents are checked recursively.
|
|
10
|
+
*/
|
|
11
|
+
import type { GraphWorkflowDocument } from "@decaf-ts/ui-decorators/graph";
|
|
12
|
+
import type { GraphValidationIssue } from "./GraphValidationIssue.d.cts";
|
|
13
|
+
/**
|
|
14
|
+
* Records a `topology.loose-node` issue for every node instance that no edge
|
|
15
|
+
* references, recursively across nested loop-body documents.
|
|
16
|
+
*
|
|
17
|
+
* @param document - The canonical workflow document to inspect.
|
|
18
|
+
* @param issues - The accumulating issue list.
|
|
19
|
+
* @param path - Dotted path prefix for reported issues.
|
|
20
|
+
*/
|
|
21
|
+
export declare function collectLooseNodeIssues(document: GraphWorkflowDocument, issues: GraphValidationIssue[], path?: string): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/engine/validation/GraphLooseNodeValidation
|
|
3
|
+
* @summary Loose-node validation (DECAF-50 §4.26 R2-3 item 8).
|
|
4
|
+
* @description A node connected to nothing is a loose node and fails workflow
|
|
5
|
+
* validation: every node instance must participate in at least one edge
|
|
6
|
+
* (data or connection). The rule is shared by the execution gate
|
|
7
|
+
* ({@link GraphWorkflowDocumentValidator}) and the persistence gate
|
|
8
|
+
* ({@link validateGraphWorkflowDocumentAtBoundary}) so both start and save
|
|
9
|
+
* reject a loose node. Nested loop-body documents are checked recursively.
|
|
10
|
+
*/
|
|
11
|
+
import type { GraphWorkflowDocument } from "@decaf-ts/ui-decorators/graph";
|
|
12
|
+
import type { GraphValidationIssue } from "./GraphValidationIssue.d.mts";
|
|
13
|
+
/**
|
|
14
|
+
* Records a `topology.loose-node` issue for every node instance that no edge
|
|
15
|
+
* references, recursively across nested loop-body documents.
|
|
16
|
+
*
|
|
17
|
+
* @param document - The canonical workflow document to inspect.
|
|
18
|
+
* @param issues - The accumulating issue list.
|
|
19
|
+
* @param path - Dotted path prefix for reported issues.
|
|
20
|
+
*/
|
|
21
|
+
export declare function collectLooseNodeIssues(document: GraphWorkflowDocument, issues: GraphValidationIssue[], path?: string): void;
|
|
@@ -45,15 +45,34 @@ export declare class GraphParameterValidator {
|
|
|
45
45
|
* behavior, and binding shapes against the effective manifest.
|
|
46
46
|
*
|
|
47
47
|
* Called at stage 3 (parameters) with the manifest resolved at stage 2.
|
|
48
|
+
* `edgeSatisfiedInputPorts` carries the input port ids targeted by an
|
|
49
|
+
* incoming data edge so required parameters can be cross-satisfied by
|
|
50
|
+
* the matching input surface (§4.4.5 rules 1/5/7).
|
|
48
51
|
*/
|
|
49
|
-
validate(node: GraphNodeInstance, manifest: GraphResolvedNodeManifest, issues: GraphValidationIssue[], path: string): void;
|
|
52
|
+
validate(node: GraphNodeInstance, manifest: GraphResolvedNodeManifest, issues: GraphValidationIssue[], path: string, edgeSatisfiedInputPorts?: ReadonlySet<string>): void;
|
|
50
53
|
/**
|
|
51
54
|
* Declared-ness, required presence, typing, and declarative validation
|
|
52
55
|
* rules for parameter values. Validation is visibility-invariant: hidden
|
|
53
56
|
* parameters are validated identically (visibility cannot bypass
|
|
54
57
|
* security-sensitive validation).
|
|
58
|
+
*
|
|
59
|
+
* Cross-satisfaction (§4.4.5 rules 1/5/7): when the manifest declares
|
|
60
|
+
* both a parameter and an input port with the same `id`, the single logical
|
|
61
|
+
* value may be carried on either surface. A required parameter is therefore
|
|
62
|
+
* satisfied when the instance provides `parameters[id]`, carries an
|
|
63
|
+
* `inputBindings[id]` (an edge-, literal-, or expression-bound value), or
|
|
64
|
+
* has an incoming data edge targeting port `id` (passed in via
|
|
65
|
+
* `edgeSatisfiedInputPorts`, computed from the raw document before the
|
|
66
|
+
* normative stage order reaches edge resolution).
|
|
55
67
|
*/
|
|
56
68
|
private validateParameters;
|
|
69
|
+
/**
|
|
70
|
+
* Cross-satisfaction of a required parameter by the matching input surface
|
|
71
|
+
* (§4.4.5 rules 1/5/7): an `inputBindings[id]` entry or an incoming
|
|
72
|
+
* data edge targeting port `id` carries the same logical value, so the
|
|
73
|
+
* parameter is satisfied without a redundant `parameters[id]` entry.
|
|
74
|
+
*/
|
|
75
|
+
private isParameterSatisfiedByInput;
|
|
57
76
|
/**
|
|
58
77
|
* Type-checks a parameter value against its parameter definition.
|
|
59
78
|
*/
|
|
@@ -80,6 +99,11 @@ export declare class GraphParameterValidator {
|
|
|
80
99
|
* not also carry a literal binding (unless explicitly allowed), and every
|
|
81
100
|
* required effective input port must be satisfiable (incoming edge,
|
|
82
101
|
* literal, or expression binding).
|
|
102
|
+
*
|
|
103
|
+
* Cross-satisfaction (§4.4.5 rules 1/5/7): a required input port whose
|
|
104
|
+
* `id` is also a declared parameter may be satisfied by a provided
|
|
105
|
+
* `parameters[id]` value, exactly as the parameter pass accepts the
|
|
106
|
+
* input/binding surface for that same id.
|
|
83
107
|
*/
|
|
84
108
|
validateBindingSatisfaction(node: GraphNodeInstance, manifest: GraphResolvedNodeManifest, incoming: GraphResolvedEdgeInstance[], issues: GraphValidationIssue[], path: string, options?: {
|
|
85
109
|
allowLiteralAndEdgeBindings?: boolean;
|
|
@@ -45,15 +45,34 @@ export declare class GraphParameterValidator {
|
|
|
45
45
|
* behavior, and binding shapes against the effective manifest.
|
|
46
46
|
*
|
|
47
47
|
* Called at stage 3 (parameters) with the manifest resolved at stage 2.
|
|
48
|
+
* `edgeSatisfiedInputPorts` carries the input port ids targeted by an
|
|
49
|
+
* incoming data edge so required parameters can be cross-satisfied by
|
|
50
|
+
* the matching input surface (§4.4.5 rules 1/5/7).
|
|
48
51
|
*/
|
|
49
|
-
validate(node: GraphNodeInstance, manifest: GraphResolvedNodeManifest, issues: GraphValidationIssue[], path: string): void;
|
|
52
|
+
validate(node: GraphNodeInstance, manifest: GraphResolvedNodeManifest, issues: GraphValidationIssue[], path: string, edgeSatisfiedInputPorts?: ReadonlySet<string>): void;
|
|
50
53
|
/**
|
|
51
54
|
* Declared-ness, required presence, typing, and declarative validation
|
|
52
55
|
* rules for parameter values. Validation is visibility-invariant: hidden
|
|
53
56
|
* parameters are validated identically (visibility cannot bypass
|
|
54
57
|
* security-sensitive validation).
|
|
58
|
+
*
|
|
59
|
+
* Cross-satisfaction (§4.4.5 rules 1/5/7): when the manifest declares
|
|
60
|
+
* both a parameter and an input port with the same `id`, the single logical
|
|
61
|
+
* value may be carried on either surface. A required parameter is therefore
|
|
62
|
+
* satisfied when the instance provides `parameters[id]`, carries an
|
|
63
|
+
* `inputBindings[id]` (an edge-, literal-, or expression-bound value), or
|
|
64
|
+
* has an incoming data edge targeting port `id` (passed in via
|
|
65
|
+
* `edgeSatisfiedInputPorts`, computed from the raw document before the
|
|
66
|
+
* normative stage order reaches edge resolution).
|
|
55
67
|
*/
|
|
56
68
|
private validateParameters;
|
|
69
|
+
/**
|
|
70
|
+
* Cross-satisfaction of a required parameter by the matching input surface
|
|
71
|
+
* (§4.4.5 rules 1/5/7): an `inputBindings[id]` entry or an incoming
|
|
72
|
+
* data edge targeting port `id` carries the same logical value, so the
|
|
73
|
+
* parameter is satisfied without a redundant `parameters[id]` entry.
|
|
74
|
+
*/
|
|
75
|
+
private isParameterSatisfiedByInput;
|
|
57
76
|
/**
|
|
58
77
|
* Type-checks a parameter value against its parameter definition.
|
|
59
78
|
*/
|
|
@@ -80,6 +99,11 @@ export declare class GraphParameterValidator {
|
|
|
80
99
|
* not also carry a literal binding (unless explicitly allowed), and every
|
|
81
100
|
* required effective input port must be satisfiable (incoming edge,
|
|
82
101
|
* literal, or expression binding).
|
|
102
|
+
*
|
|
103
|
+
* Cross-satisfaction (§4.4.5 rules 1/5/7): a required input port whose
|
|
104
|
+
* `id` is also a declared parameter may be satisfied by a provided
|
|
105
|
+
* `parameters[id]` value, exactly as the parameter pass accepts the
|
|
106
|
+
* input/binding surface for that same id.
|
|
83
107
|
*/
|
|
84
108
|
validateBindingSatisfaction(node: GraphNodeInstance, manifest: GraphResolvedNodeManifest, incoming: GraphResolvedEdgeInstance[], issues: GraphValidationIssue[], path: string, options?: {
|
|
85
109
|
allowLiteralAndEdgeBindings?: boolean;
|
|
@@ -17,3 +17,4 @@ export * from "./GraphEdgeInstanceValidator.d.cts";
|
|
|
17
17
|
export * from "./GraphConnectionPolicyValidator.d.cts";
|
|
18
18
|
export * from "./GraphCredentialReferenceValidator.d.cts";
|
|
19
19
|
export * from "./GraphWorkflowDocumentValidator.d.cts";
|
|
20
|
+
export * from "./GraphLooseNodeValidation.d.cts";
|
|
@@ -17,3 +17,4 @@ export * from "./GraphEdgeInstanceValidator.d.mts";
|
|
|
17
17
|
export * from "./GraphConnectionPolicyValidator.d.mts";
|
|
18
18
|
export * from "./GraphCredentialReferenceValidator.d.mts";
|
|
19
19
|
export * from "./GraphWorkflowDocumentValidator.d.mts";
|
|
20
|
+
export * from "./GraphLooseNodeValidation.d.mts";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { GraphNode } from "../base.d.cts";
|
|
2
|
+
import type { GraphExecutionValues, GraphNodeExecutionRequest } from "../../engine/types.d.cts";
|
|
3
|
+
/**
|
|
4
|
+
* Agent node — an AI agent that orchestrates a model, memory, and workspace.
|
|
5
|
+
*
|
|
6
|
+
* The agent has:
|
|
7
|
+
* - `@input` port on the **left**: `prompt` (the task prompt; supports
|
|
8
|
+
* placeholder expressions like `{{ $input.something }}` per §22.4).
|
|
9
|
+
* - `@output` ports on the **right**: `response` (the agent's output), `actions`
|
|
10
|
+
* (any actions the agent decided to take).
|
|
11
|
+
* - `@connection` ports on the **bottom**: `model` (LLM), `memory` (memory
|
|
12
|
+
* store), `workspace` (workspace/context). Each connection has a distinct
|
|
13
|
+
* category color.
|
|
14
|
+
*
|
|
15
|
+
* The node is rectangular (not rounded) to visually distinguish it from
|
|
16
|
+
* regular processing nodes. The `color` and `icon` are omitted from `@node()`
|
|
17
|
+
* so they are resolved from the `"Agent"` category style.
|
|
18
|
+
*/
|
|
19
|
+
export declare class AgentNode extends GraphNode {
|
|
20
|
+
static execute(request: GraphNodeExecutionRequest): GraphExecutionValues;
|
|
21
|
+
prompt: string;
|
|
22
|
+
response: string;
|
|
23
|
+
actions: unknown[];
|
|
24
|
+
model: unknown;
|
|
25
|
+
memory: unknown;
|
|
26
|
+
workspace: unknown;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* All built-in agent node constructors.
|
|
30
|
+
*/
|
|
31
|
+
export declare const GRAPH_AGENT_NODES: readonly [typeof AgentNode];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { GraphNode } from "../base.d.mts";
|
|
2
|
+
import type { GraphExecutionValues, GraphNodeExecutionRequest } from "../../engine/types.d.mts";
|
|
3
|
+
/**
|
|
4
|
+
* Agent node — an AI agent that orchestrates a model, memory, and workspace.
|
|
5
|
+
*
|
|
6
|
+
* The agent has:
|
|
7
|
+
* - `@input` port on the **left**: `prompt` (the task prompt; supports
|
|
8
|
+
* placeholder expressions like `{{ $input.something }}` per §22.4).
|
|
9
|
+
* - `@output` ports on the **right**: `response` (the agent's output), `actions`
|
|
10
|
+
* (any actions the agent decided to take).
|
|
11
|
+
* - `@connection` ports on the **bottom**: `model` (LLM), `memory` (memory
|
|
12
|
+
* store), `workspace` (workspace/context). Each connection has a distinct
|
|
13
|
+
* category color.
|
|
14
|
+
*
|
|
15
|
+
* The node is rectangular (not rounded) to visually distinguish it from
|
|
16
|
+
* regular processing nodes. The `color` and `icon` are omitted from `@node()`
|
|
17
|
+
* so they are resolved from the `"Agent"` category style.
|
|
18
|
+
*/
|
|
19
|
+
export declare class AgentNode extends GraphNode {
|
|
20
|
+
static execute(request: GraphNodeExecutionRequest): GraphExecutionValues;
|
|
21
|
+
prompt: string;
|
|
22
|
+
response: string;
|
|
23
|
+
actions: unknown[];
|
|
24
|
+
model: unknown;
|
|
25
|
+
memory: unknown;
|
|
26
|
+
workspace: unknown;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* All built-in agent node constructors.
|
|
30
|
+
*/
|
|
31
|
+
export declare const GRAPH_AGENT_NODES: readonly [typeof AgentNode];
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/nodes/base
|
|
3
|
+
* @summary Base class for backend graph node declarations.
|
|
4
|
+
* @description `GraphNode` is the single authoritative backend representation of
|
|
5
|
+
* a built-in node kind (DECAF-50 §4.26 R2-1): the `@node`-decorated class
|
|
6
|
+
* carries both the published manifest metadata and the executable behaviour via
|
|
7
|
+
* `execute`. The catalogue derives each kind's executor from the class, so there
|
|
8
|
+
* is exactly one authority per node kind.
|
|
9
|
+
*/
|
|
10
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
11
|
+
import type { NodeMetadataChange } from "@decaf-ts/ui-decorators/graph";
|
|
12
|
+
import type { GraphExecutionContext } from "../engine/execution/GraphExecutionContext.d.cts";
|
|
13
|
+
import type { GraphExecutionValues, GraphNodeExecutionRequest } from "../engine/types.d.cts";
|
|
14
|
+
/**
|
|
15
|
+
* Constructor shape of a built-in backend node class: a `Model` subclass whose
|
|
16
|
+
* static `execute` performs the node's work.
|
|
17
|
+
*/
|
|
18
|
+
export interface GraphNodeClass {
|
|
19
|
+
/** Node kind discriminator declared via the `@node` decorator. */
|
|
20
|
+
readonly kind?: string;
|
|
21
|
+
/** The node's executable behaviour. */
|
|
22
|
+
execute(request: GraphNodeExecutionRequest, context: GraphExecutionContext): GraphExecutionValues | Promise<GraphExecutionValues>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Base class for the built-in backend node kinds.
|
|
26
|
+
*
|
|
27
|
+
* Extends `Model` so the `@node`/`@uielement` decorators and the manifest
|
|
28
|
+
* compiler keep working unchanged. Concrete kinds override `execute`; the default
|
|
29
|
+
* throws so a kind that forgets to implement behaviour fails fast rather than
|
|
30
|
+
* silently producing no output.
|
|
31
|
+
*/
|
|
32
|
+
export declare class GraphNode extends Model {
|
|
33
|
+
/**
|
|
34
|
+
* Executes the node's behaviour against the request inputs and run context.
|
|
35
|
+
*
|
|
36
|
+
* @param _request - The node execution request (inputs, parameters,
|
|
37
|
+
* credentials, metadata).
|
|
38
|
+
* @param _context - The run-scoped execution context.
|
|
39
|
+
* @returns The node's output values keyed by port name.
|
|
40
|
+
* @throws {GraphExecutionError} when the kind does not implement `execute`.
|
|
41
|
+
*/
|
|
42
|
+
static execute(_request: GraphNodeExecutionRequest, _context: GraphExecutionContext): GraphExecutionValues | Promise<GraphExecutionValues>;
|
|
43
|
+
/**
|
|
44
|
+
* Applies a metadata patch to this node class, returning the resulting
|
|
45
|
+
* ports, size, and data patches.
|
|
46
|
+
*
|
|
47
|
+
* The default implementation returns `null` (no changes). Concrete node
|
|
48
|
+
* kinds that support dynamic metadata override this to compute their own
|
|
49
|
+
* ports and size from the metadata — the caller (renderer) simply relays
|
|
50
|
+
* the result to the diagram model.
|
|
51
|
+
*
|
|
52
|
+
* @param _meta - The metadata patch (node-kind-specific, e.g.
|
|
53
|
+
* `SwitchNodeMetadata`).
|
|
54
|
+
* @returns The computed change, or `null` when the node kind does not
|
|
55
|
+
* support dynamic metadata.
|
|
56
|
+
*/
|
|
57
|
+
static applyMetadata(_meta: unknown): NodeMetadataChange | null;
|
|
58
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/nodes/base
|
|
3
|
+
* @summary Base class for backend graph node declarations.
|
|
4
|
+
* @description `GraphNode` is the single authoritative backend representation of
|
|
5
|
+
* a built-in node kind (DECAF-50 §4.26 R2-1): the `@node`-decorated class
|
|
6
|
+
* carries both the published manifest metadata and the executable behaviour via
|
|
7
|
+
* `execute`. The catalogue derives each kind's executor from the class, so there
|
|
8
|
+
* is exactly one authority per node kind.
|
|
9
|
+
*/
|
|
10
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
11
|
+
import type { NodeMetadataChange } from "@decaf-ts/ui-decorators/graph";
|
|
12
|
+
import type { GraphExecutionContext } from "../engine/execution/GraphExecutionContext.d.mts";
|
|
13
|
+
import type { GraphExecutionValues, GraphNodeExecutionRequest } from "../engine/types.d.mts";
|
|
14
|
+
/**
|
|
15
|
+
* Constructor shape of a built-in backend node class: a `Model` subclass whose
|
|
16
|
+
* static `execute` performs the node's work.
|
|
17
|
+
*/
|
|
18
|
+
export interface GraphNodeClass {
|
|
19
|
+
/** Node kind discriminator declared via the `@node` decorator. */
|
|
20
|
+
readonly kind?: string;
|
|
21
|
+
/** The node's executable behaviour. */
|
|
22
|
+
execute(request: GraphNodeExecutionRequest, context: GraphExecutionContext): GraphExecutionValues | Promise<GraphExecutionValues>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Base class for the built-in backend node kinds.
|
|
26
|
+
*
|
|
27
|
+
* Extends `Model` so the `@node`/`@uielement` decorators and the manifest
|
|
28
|
+
* compiler keep working unchanged. Concrete kinds override `execute`; the default
|
|
29
|
+
* throws so a kind that forgets to implement behaviour fails fast rather than
|
|
30
|
+
* silently producing no output.
|
|
31
|
+
*/
|
|
32
|
+
export declare class GraphNode extends Model {
|
|
33
|
+
/**
|
|
34
|
+
* Executes the node's behaviour against the request inputs and run context.
|
|
35
|
+
*
|
|
36
|
+
* @param _request - The node execution request (inputs, parameters,
|
|
37
|
+
* credentials, metadata).
|
|
38
|
+
* @param _context - The run-scoped execution context.
|
|
39
|
+
* @returns The node's output values keyed by port name.
|
|
40
|
+
* @throws {GraphExecutionError} when the kind does not implement `execute`.
|
|
41
|
+
*/
|
|
42
|
+
static execute(_request: GraphNodeExecutionRequest, _context: GraphExecutionContext): GraphExecutionValues | Promise<GraphExecutionValues>;
|
|
43
|
+
/**
|
|
44
|
+
* Applies a metadata patch to this node class, returning the resulting
|
|
45
|
+
* ports, size, and data patches.
|
|
46
|
+
*
|
|
47
|
+
* The default implementation returns `null` (no changes). Concrete node
|
|
48
|
+
* kinds that support dynamic metadata override this to compute their own
|
|
49
|
+
* ports and size from the metadata — the caller (renderer) simply relays
|
|
50
|
+
* the result to the diagram model.
|
|
51
|
+
*
|
|
52
|
+
* @param _meta - The metadata patch (node-kind-specific, e.g.
|
|
53
|
+
* `SwitchNodeMetadata`).
|
|
54
|
+
* @returns The computed change, or `null` when the node kind does not
|
|
55
|
+
* support dynamic metadata.
|
|
56
|
+
*/
|
|
57
|
+
static applyMetadata(_meta: unknown): NodeMetadataChange | null;
|
|
58
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { GraphNode } from "../base.d.cts";
|
|
2
|
+
import type { GraphExecutionValues, GraphNodeExecutionRequest } from "../../engine/types.d.cts";
|
|
3
|
+
export declare class GraphInputValueNode extends GraphNode {
|
|
4
|
+
static execute(request: GraphNodeExecutionRequest): GraphExecutionValues;
|
|
5
|
+
value: unknown;
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { GraphNode } from "../base.d.mts";
|
|
2
|
+
import type { GraphExecutionValues, GraphNodeExecutionRequest } from "../../engine/types.d.mts";
|
|
3
|
+
export declare class GraphInputValueNode extends GraphNode {
|
|
4
|
+
static execute(request: GraphNodeExecutionRequest): GraphExecutionValues;
|
|
5
|
+
value: unknown;
|
|
6
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GraphNode } from "../base.d.cts";
|
|
2
|
+
import type { GraphExecutionContext } from "../../engine/execution/GraphExecutionContext.d.cts";
|
|
3
|
+
import type { GraphExecutionValues, GraphNodeExecutionRequest } from "../../engine/types.d.cts";
|
|
4
|
+
export declare class BreakFlowNode extends GraphNode {
|
|
5
|
+
static execute(request: GraphNodeExecutionRequest, _context: GraphExecutionContext): GraphExecutionValues;
|
|
6
|
+
value: unknown;
|
|
7
|
+
broken: unknown;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GraphNode } from "../base.d.mts";
|
|
2
|
+
import type { GraphExecutionContext } from "../../engine/execution/GraphExecutionContext.d.mts";
|
|
3
|
+
import type { GraphExecutionValues, GraphNodeExecutionRequest } from "../../engine/types.d.mts";
|
|
4
|
+
export declare class BreakFlowNode extends GraphNode {
|
|
5
|
+
static execute(request: GraphNodeExecutionRequest, _context: GraphExecutionContext): GraphExecutionValues;
|
|
6
|
+
value: unknown;
|
|
7
|
+
broken: unknown;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GraphNode } from "../base.d.cts";
|
|
2
|
+
import type { GraphExecutionValues, GraphNodeExecutionRequest } from "../../engine/types.d.cts";
|
|
3
|
+
export declare class ErrorBoundaryFlowNode extends GraphNode {
|
|
4
|
+
static execute(request: GraphNodeExecutionRequest): GraphExecutionValues;
|
|
5
|
+
value: unknown;
|
|
6
|
+
result: unknown;
|
|
7
|
+
error: unknown;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GraphNode } from "../base.d.mts";
|
|
2
|
+
import type { GraphExecutionValues, GraphNodeExecutionRequest } from "../../engine/types.d.mts";
|
|
3
|
+
export declare class ErrorBoundaryFlowNode extends GraphNode {
|
|
4
|
+
static execute(request: GraphNodeExecutionRequest): GraphExecutionValues;
|
|
5
|
+
value: unknown;
|
|
6
|
+
result: unknown;
|
|
7
|
+
error: unknown;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GraphNode } from "../base.d.cts";
|
|
2
|
+
import type { GraphExecutionValues, GraphNodeExecutionRequest } from "../../engine/types.d.cts";
|
|
3
|
+
export declare class HumanApprovalFlowNode extends GraphNode {
|
|
4
|
+
static execute(request: GraphNodeExecutionRequest): GraphExecutionValues;
|
|
5
|
+
value: unknown;
|
|
6
|
+
approved: unknown;
|
|
7
|
+
rejected: unknown;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GraphNode } from "../base.d.mts";
|
|
2
|
+
import type { GraphExecutionValues, GraphNodeExecutionRequest } from "../../engine/types.d.mts";
|
|
3
|
+
export declare class HumanApprovalFlowNode extends GraphNode {
|
|
4
|
+
static execute(request: GraphNodeExecutionRequest): GraphExecutionValues;
|
|
5
|
+
value: unknown;
|
|
6
|
+
approved: unknown;
|
|
7
|
+
rejected: unknown;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GraphNode } from "../base.d.cts";
|
|
2
|
+
import type { GraphExecutionValues, GraphNodeExecutionRequest } from "../../engine/types.d.cts";
|
|
3
|
+
export declare class IfFlowNode extends GraphNode {
|
|
4
|
+
static execute(request: GraphNodeExecutionRequest): GraphExecutionValues;
|
|
5
|
+
value: unknown;
|
|
6
|
+
then: unknown;
|
|
7
|
+
else: unknown;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GraphNode } from "../base.d.mts";
|
|
2
|
+
import type { GraphExecutionValues, GraphNodeExecutionRequest } from "../../engine/types.d.mts";
|
|
3
|
+
export declare class IfFlowNode extends GraphNode {
|
|
4
|
+
static execute(request: GraphNodeExecutionRequest): GraphExecutionValues;
|
|
5
|
+
value: unknown;
|
|
6
|
+
then: unknown;
|
|
7
|
+
else: unknown;
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GraphNode } from "../base.d.cts";
|
|
2
|
+
import type { GraphExecutionValues, GraphNodeExecutionRequest } from "../../engine/types.d.cts";
|
|
3
|
+
export declare class ParallelFlowNode extends GraphNode {
|
|
4
|
+
static execute(request: GraphNodeExecutionRequest): GraphExecutionValues;
|
|
5
|
+
value: unknown;
|
|
6
|
+
branches: unknown[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GraphNode } from "../base.d.mts";
|
|
2
|
+
import type { GraphExecutionValues, GraphNodeExecutionRequest } from "../../engine/types.d.mts";
|
|
3
|
+
export declare class ParallelFlowNode extends GraphNode {
|
|
4
|
+
static execute(request: GraphNodeExecutionRequest): GraphExecutionValues;
|
|
5
|
+
value: unknown;
|
|
6
|
+
branches: unknown[];
|
|
7
|
+
}
|