@codemation/core-nodes 0.7.0 → 0.7.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/CHANGELOG.md +9 -0
- package/dist/index.cjs +5 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/nodes/SubWorkflowNode.ts +4 -0
- package/src/nodes/subWorkflow.ts +1 -0
package/dist/index.d.cts
CHANGED
|
@@ -942,6 +942,15 @@ interface NodeExecutionStatePublisher {
|
|
|
942
942
|
error: Error;
|
|
943
943
|
}): Promise<void>;
|
|
944
944
|
appendConnectionInvocation(args: ConnectionInvocationAppendArgs): Promise<void>;
|
|
945
|
+
/**
|
|
946
|
+
* Annotates the current snapshot for `nodeId` with the id of the child run spawned by a
|
|
947
|
+
* SubWorkflow invocation. Called from `SubWorkflowNode.execute` after `runById` resolves.
|
|
948
|
+
* The engine's subsequent `markCompleted` call preserves the value via `previous.childRunId`.
|
|
949
|
+
*/
|
|
950
|
+
setChildRunId?(args: {
|
|
951
|
+
nodeId: NodeId;
|
|
952
|
+
childRunId: RunId;
|
|
953
|
+
}): Promise<void>;
|
|
945
954
|
}
|
|
946
955
|
type BinaryBody = ReadableStream<Uint8Array> | AsyncIterable<Uint8Array> | Uint8Array | ArrayBuffer;
|
|
947
956
|
interface BinaryStorageReadResult {
|
|
@@ -2812,6 +2821,7 @@ declare class SubWorkflow<TInputJson$1 = unknown, TOutputJson$1 = unknown> imple
|
|
|
2812
2821
|
readonly id?: string | undefined;
|
|
2813
2822
|
readonly kind: "node";
|
|
2814
2823
|
readonly type: TypeToken<unknown>;
|
|
2824
|
+
readonly icon = "lucide:workflow";
|
|
2815
2825
|
constructor(name: string, workflowId: string, upstreamRefs?: Array<{
|
|
2816
2826
|
nodeId: NodeId;
|
|
2817
2827
|
} | UpstreamRefPlaceholder> | undefined, startAt?: NodeId | undefined, id?: string | undefined);
|
package/dist/index.d.ts
CHANGED
|
@@ -942,6 +942,15 @@ interface NodeExecutionStatePublisher {
|
|
|
942
942
|
error: Error;
|
|
943
943
|
}): Promise<void>;
|
|
944
944
|
appendConnectionInvocation(args: ConnectionInvocationAppendArgs): Promise<void>;
|
|
945
|
+
/**
|
|
946
|
+
* Annotates the current snapshot for `nodeId` with the id of the child run spawned by a
|
|
947
|
+
* SubWorkflow invocation. Called from `SubWorkflowNode.execute` after `runById` resolves.
|
|
948
|
+
* The engine's subsequent `markCompleted` call preserves the value via `previous.childRunId`.
|
|
949
|
+
*/
|
|
950
|
+
setChildRunId?(args: {
|
|
951
|
+
nodeId: NodeId;
|
|
952
|
+
childRunId: RunId;
|
|
953
|
+
}): Promise<void>;
|
|
945
954
|
}
|
|
946
955
|
type BinaryBody = ReadableStream<Uint8Array> | AsyncIterable<Uint8Array> | Uint8Array | ArrayBuffer;
|
|
947
956
|
interface BinaryStorageReadResult {
|
|
@@ -2812,6 +2821,7 @@ declare class SubWorkflow<TInputJson$1 = unknown, TOutputJson$1 = unknown> imple
|
|
|
2812
2821
|
readonly id?: string | undefined;
|
|
2813
2822
|
readonly kind: "node";
|
|
2814
2823
|
readonly type: TypeToken<unknown>;
|
|
2824
|
+
readonly icon = "lucide:workflow";
|
|
2815
2825
|
constructor(name: string, workflowId: string, upstreamRefs?: Array<{
|
|
2816
2826
|
nodeId: NodeId;
|
|
2817
2827
|
} | UpstreamRefPlaceholder> | undefined, startAt?: NodeId | undefined, id?: string | undefined);
|
package/dist/index.js
CHANGED
|
@@ -7210,6 +7210,10 @@ let SubWorkflowNode = class SubWorkflowNode$1 {
|
|
|
7210
7210
|
engineMaxSubworkflowDepth: args.ctx.engineMaxSubworkflowDepth
|
|
7211
7211
|
}
|
|
7212
7212
|
});
|
|
7213
|
+
await args.ctx.nodeState?.setChildRunId?.({
|
|
7214
|
+
nodeId: args.ctx.nodeId,
|
|
7215
|
+
childRunId: result.runId
|
|
7216
|
+
});
|
|
7213
7217
|
if (result.status !== "completed") throw new Error(`Subworkflow ${args.ctx.config.workflowId} did not complete (status=${result.status})`);
|
|
7214
7218
|
const out = [];
|
|
7215
7219
|
for (const produced of result.outputs) {
|
|
@@ -7241,6 +7245,7 @@ SubWorkflowNode = __decorate([
|
|
|
7241
7245
|
var SubWorkflow = class {
|
|
7242
7246
|
kind = "node";
|
|
7243
7247
|
type = SubWorkflowNode;
|
|
7248
|
+
icon = "lucide:workflow";
|
|
7244
7249
|
constructor(name, workflowId, upstreamRefs, startAt, id) {
|
|
7245
7250
|
this.name = name;
|
|
7246
7251
|
this.workflowId = workflowId;
|