@codemation/core-nodes 0.3.0 → 0.4.0
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 +15 -1
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -22
- package/dist/index.d.ts +30 -22
- package/dist/index.js +7 -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/workflowAuthoring/WorkflowBranchBuilder.types.ts +9 -7
- package/src/workflowAuthoring/WorkflowChain.types.ts +9 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @codemation/core-nodes
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#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.
|
|
8
|
+
- allow `.node(...)` and branch `.node(...)` calls to accept helper-node params that use `itemExpr(...)`
|
|
9
|
+
- preserve type safety when the current workflow item is a superset of the helper node's declared input shape
|
|
10
|
+
- remove the need for common casts around empty-config helper nodes
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [[`88844f7`](https://github.com/MadeRelevant/codemation/commit/88844f75a48fe051e4cb895c710408855de14da4)]:
|
|
15
|
+
- @codemation/core@0.7.0
|
|
16
|
+
|
|
3
17
|
## 0.3.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -25,7 +39,7 @@
|
|
|
25
39
|
|
|
26
40
|
`WorkflowAgentOptions` now takes `messages` (the same `AgentMessageConfig` as `AIAgent`) instead of
|
|
27
41
|
`prompt`. The workflow helper passes `messages` through unchanged. Docs, workflow DSL skills, and the
|
|
28
|
-
test-dev sample use `
|
|
42
|
+
test-dev sample use `itemExpr(...)` for per-item prompts; execution docs note `itemExpr` on agent
|
|
29
43
|
`messages`.
|
|
30
44
|
|
|
31
45
|
### 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();
|