@codemation/core-nodes 0.3.0 → 0.4.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 +23 -1
- package/dist/index.cjs +8 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -22
- package/dist/index.d.ts +32 -22
- package/dist/index.js +9 -7
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/nodes/AIAgentNode.ts +1 -1
- package/src/nodes/NodeBackedToolRuntime.ts +4 -4
- package/src/nodes/aggregate.ts +1 -0
- package/src/nodes/split.ts +1 -0
- package/src/workflowAuthoring/WorkflowBranchBuilder.types.ts +9 -7
- package/src/workflowAuthoring/WorkflowChain.types.ts +9 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @codemation/core-nodes
|
|
2
2
|
|
|
3
|
+
## 0.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#83](https://github.com/MadeRelevant/codemation/pull/83) [`1c74067`](https://github.com/MadeRelevant/codemation/commit/1c74067a474b54a8d6c73f55db4c3d8d3e20e2ae) Thanks [@cblokland90](https://github.com/cblokland90)! - Preserve input binaries by default for `Split` and `Aggregate`.
|
|
8
|
+
- keep `binary` attachments on split fan-out items so downstream nodes do not silently lose files
|
|
9
|
+
- keep `binary` attachments on aggregate output items so batch reductions preserve the originating payload
|
|
10
|
+
|
|
11
|
+
## 0.4.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#81](https://github.com/MadeRelevant/codemation/pull/81) [`88844f7`](https://github.com/MadeRelevant/codemation/commit/88844f75a48fe051e4cb895c710408855de14da4) Thanks [@cblokland90](https://github.com/cblokland90)! - Improve workflow DSL typing for helper-defined nodes.
|
|
16
|
+
- allow `.node(...)` and branch `.node(...)` calls to accept helper-node params that use `itemExpr(...)`
|
|
17
|
+
- preserve type safety when the current workflow item is a superset of the helper node's declared input shape
|
|
18
|
+
- remove the need for common casts around empty-config helper nodes
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [[`88844f7`](https://github.com/MadeRelevant/codemation/commit/88844f75a48fe051e4cb895c710408855de14da4)]:
|
|
23
|
+
- @codemation/core@0.7.0
|
|
24
|
+
|
|
3
25
|
## 0.3.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
|
@@ -25,7 +47,7 @@
|
|
|
25
47
|
|
|
26
48
|
`WorkflowAgentOptions` now takes `messages` (the same `AgentMessageConfig` as `AIAgent`) instead of
|
|
27
49
|
`prompt`. The workflow helper passes `messages` through unchanged. Docs, workflow DSL skills, and the
|
|
28
|
-
test-dev sample use `
|
|
50
|
+
test-dev sample use `itemExpr(...)` for per-item prompts; execution docs note `itemExpr` on agent
|
|
29
51
|
`messages`.
|
|
30
52
|
|
|
31
53
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -2720,9 +2720,9 @@ var AgentToolCallPortMap = class {
|
|
|
2720
2720
|
//#region src/nodes/NodeBackedToolRuntime.ts
|
|
2721
2721
|
var _ref$1, _ref2$1, _ref3$1;
|
|
2722
2722
|
let NodeBackedToolRuntime = class NodeBackedToolRuntime$1 {
|
|
2723
|
-
constructor(nodeResolver,
|
|
2723
|
+
constructor(nodeResolver, itemExprResolver, outputNormalizer, outputBehaviorResolver) {
|
|
2724
2724
|
this.nodeResolver = nodeResolver;
|
|
2725
|
-
this.
|
|
2725
|
+
this.itemExprResolver = itemExprResolver;
|
|
2726
2726
|
this.outputNormalizer = outputNormalizer;
|
|
2727
2727
|
this.outputBehaviorResolver = outputBehaviorResolver;
|
|
2728
2728
|
}
|
|
@@ -2764,7 +2764,7 @@ let NodeBackedToolRuntime = class NodeBackedToolRuntime$1 {
|
|
|
2764
2764
|
item: nodeInput,
|
|
2765
2765
|
itemIndex: 0,
|
|
2766
2766
|
items,
|
|
2767
|
-
ctx: await this.
|
|
2767
|
+
ctx: await this.itemExprResolver.resolveConfigForItem(ctx, nodeInput, 0, items)
|
|
2768
2768
|
};
|
|
2769
2769
|
const raw = await Promise.resolve(runnable.execute(execArgs));
|
|
2770
2770
|
return this.outputNormalizer.normalizeExecuteResult({
|
|
@@ -2785,12 +2785,12 @@ let NodeBackedToolRuntime = class NodeBackedToolRuntime$1 {
|
|
|
2785
2785
|
NodeBackedToolRuntime = __decorate([
|
|
2786
2786
|
(0, __codemation_core.injectable)(),
|
|
2787
2787
|
__decorateParam(0, (0, __codemation_core.inject)(__codemation_core.CoreTokens.NodeResolver)),
|
|
2788
|
-
__decorateParam(1, (0, __codemation_core.inject)(__codemation_core.
|
|
2788
|
+
__decorateParam(1, (0, __codemation_core.inject)(__codemation_core.ItemExprResolver)),
|
|
2789
2789
|
__decorateParam(2, (0, __codemation_core.inject)(__codemation_core.NodeOutputNormalizer)),
|
|
2790
2790
|
__decorateParam(3, (0, __codemation_core.inject)(__codemation_core.RunnableOutputBehaviorResolver)),
|
|
2791
2791
|
__decorateMetadata("design:paramtypes", [
|
|
2792
2792
|
Object,
|
|
2793
|
-
typeof (_ref$1 = typeof __codemation_core.
|
|
2793
|
+
typeof (_ref$1 = typeof __codemation_core.ItemExprResolver !== "undefined" && __codemation_core.ItemExprResolver) === "function" ? _ref$1 : Object,
|
|
2794
2794
|
typeof (_ref2$1 = typeof __codemation_core.NodeOutputNormalizer !== "undefined" && __codemation_core.NodeOutputNormalizer) === "function" ? _ref2$1 : Object,
|
|
2795
2795
|
typeof (_ref3$1 = typeof __codemation_core.RunnableOutputBehaviorResolver !== "undefined" && __codemation_core.RunnableOutputBehaviorResolver) === "function" ? _ref3$1 : Object
|
|
2796
2796
|
])
|
|
@@ -2812,7 +2812,7 @@ let AIAgentNode = class AIAgentNode$1 {
|
|
|
2812
2812
|
outputPorts = ["main"];
|
|
2813
2813
|
/**
|
|
2814
2814
|
* Engine validates {@link RunnableNodeConfig.inputSchema} (Zod) on {@code item.json} before enqueue, then resolves
|
|
2815
|
-
* per-item **`
|
|
2815
|
+
* per-item **`itemExpr`** leaves on config before {@link #execute}. Prefer modeling prompts as
|
|
2816
2816
|
* {@code { messages: [{ role, content }, ...] }} (on input or config) so persisted inputs are visible in the UI.
|
|
2817
2817
|
*/
|
|
2818
2818
|
inputSchema = unknown();
|
|
@@ -3458,6 +3458,7 @@ var Aggregate = class {
|
|
|
3458
3458
|
kind = "node";
|
|
3459
3459
|
type = AggregateNode;
|
|
3460
3460
|
execution = { hint: "local" };
|
|
3461
|
+
keepBinaries = true;
|
|
3461
3462
|
icon = "lucide:layers";
|
|
3462
3463
|
constructor(name, aggregate, id) {
|
|
3463
3464
|
this.name = name;
|
|
@@ -3612,6 +3613,7 @@ var Split = class {
|
|
|
3612
3613
|
kind = "node";
|
|
3613
3614
|
type = SplitNode;
|
|
3614
3615
|
execution = { hint: "local" };
|
|
3616
|
+
keepBinaries = true;
|
|
3615
3617
|
/**
|
|
3616
3618
|
* When splitting yields zero items for a batch, downstream single-input nodes still run once with an empty batch.
|
|
3617
3619
|
* Mirrors {@link MapData}'s empty-output behavior.
|