@codemation/core-nodes 0.10.1 → 0.12.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 +125 -0
- package/dist/index.cjs +273 -108
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +212 -71
- package/dist/index.d.ts +213 -72
- package/dist/index.js +273 -105
- package/dist/index.js.map +1 -1
- package/dist/metadata.json +1 -1
- package/package.json +3 -2
- package/src/chatModels/CodemationChatModelConfig.ts +9 -21
- package/src/chatModels/CodemationChatModelFactory.ts +12 -9
- package/src/chatModels/OpenAIChatModelFactory.ts +3 -2
- package/src/http/HttpBodyBuilder.ts +9 -0
- package/src/http/httpRequest.types.ts +10 -1
- package/src/index.ts +1 -1
- package/src/nodes/AIAgentConfig.ts +28 -0
- package/src/nodes/AIAgentNode.ts +84 -17
- package/src/nodes/AgentBinaryContentFactory.ts +74 -0
- package/src/nodes/CallbackNodeFactory.ts +9 -6
- package/src/nodes/CronTriggerFactory.ts +6 -2
- package/src/nodes/DeferredMetaToolStrategy.ts +8 -2
- package/src/nodes/ManualTriggerFactory.ts +15 -11
- package/src/nodes/WebhookTriggerFactory.ts +9 -2
- package/src/nodes/aggregate.ts +9 -2
- package/src/nodes/assertion.ts +3 -0
- package/src/nodes/filter.ts +9 -2
- package/src/nodes/httpRequest.ts +7 -2
- package/src/nodes/if.ts +9 -2
- package/src/nodes/isTestRun.ts +6 -2
- package/src/nodes/mapData.ts +4 -2
- package/src/nodes/merge.ts +9 -2
- package/src/nodes/noOp.ts +9 -2
- package/src/nodes/nodeOptions.types.ts +12 -0
- package/src/nodes/split.ts +9 -2
- package/src/nodes/subWorkflow.ts +9 -2
- package/src/nodes/switch.ts +7 -1
- package/src/nodes/wait.ts +9 -2
- package/src/workflowAuthoring/WorkflowChatModelFactory.types.ts +8 -2
- package/src/chatModels/ManagedModelFetcher.ts +0 -23
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,130 @@
|
|
|
1
1
|
# @codemation/core-nodes
|
|
2
2
|
|
|
3
|
+
## 0.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#239](https://github.com/MadeRelevant/codemation/pull/239) [`bc164ef`](https://github.com/MadeRelevant/codemation/commit/bc164ef3dc1433af97beaf642a47a881ab702c62) Thanks [@cblokland90](https://github.com/cblokland90)! - The AI agent node now passes file binaries to its chat model as native inline multimodal blocks.
|
|
8
|
+
Every attachment on `item.binary` is resolved through `ctx.binary` (storage-backed, by reference —
|
|
9
|
+
never base64 on `item.json`) and injected on the last user message — images (`image/*`) as AI SDK
|
|
10
|
+
`image` parts and every other type (PDF, office docs, CSV, JSON, …) as `file` parts, which providers
|
|
11
|
+
map to the wire-level `image` / `document` blocks the model reads natively. Binaries are not filtered
|
|
12
|
+
by type: if a provider doesn't support a given file type the error surfaces at runtime, and the
|
|
13
|
+
workflow can filter the binary upstream. Built automations can now reason over documents and images
|
|
14
|
+
the way the concierge does.
|
|
15
|
+
|
|
16
|
+
Two config options control this passdown:
|
|
17
|
+
- `passBinariesToModel` (default `true`) — set to `false` to skip the passdown entirely.
|
|
18
|
+
- `binaries` — a static `BinaryAttachment[]` or a per-item function `({ item, itemIndex, items, ctx }) => BinaryAttachment[]`.
|
|
19
|
+
When provided, these replace the current item's `item.binary` as the passdown source, so an author
|
|
20
|
+
can forward binaries produced by an earlier node further back in the workflow.
|
|
21
|
+
|
|
22
|
+
## 0.11.0
|
|
23
|
+
|
|
24
|
+
### Minor Changes
|
|
25
|
+
|
|
26
|
+
- [#227](https://github.com/MadeRelevant/codemation/pull/227) [`2130eab`](https://github.com/MadeRelevant/codemation/commit/2130eab49bcba708eca898f45fc400913470b11f) Thanks [@cblokland90](https://github.com/cblokland90)! - feat(core-nodes): replace managed model-id with complexity token
|
|
27
|
+
|
|
28
|
+
`CodemationChatModelConfig` now takes a `complexity: ManagedComplexity` token
|
|
29
|
+
(`"low" | "medium" | "high" | "xhigh"`) instead of a free model-id string.
|
|
30
|
+
The managed LLM broker maps the token to a concrete provider model and thinking
|
|
31
|
+
effort server-side — the framework never references concrete model ids.
|
|
32
|
+
|
|
33
|
+
Breaking changes:
|
|
34
|
+
- `CodemationChatModelConfig(name, model)` → `CodemationChatModelConfig(name, complexity)`
|
|
35
|
+
where `complexity` is one of `"low" | "medium" | "high" | "xhigh"`.
|
|
36
|
+
- `temperature` option removed from `CodemationChatModelConfig` — Anthropic rejects
|
|
37
|
+
temperature when thinking is engaged; the broker injects thinking for medium/high.
|
|
38
|
+
- `ManagedModelDto`, `CodemationManagedModel` types removed.
|
|
39
|
+
- `ManagedModelFetcher` class removed — the `/api/llm/managed-models` discovery
|
|
40
|
+
endpoint is no longer part of the complexity-token contract.
|
|
41
|
+
|
|
42
|
+
Factory change: `CodemationChatModelFactory` now uses `@ai-sdk/anthropic` +
|
|
43
|
+
`createAnthropic` (Anthropic-native route) instead of `@ai-sdk/openai` +
|
|
44
|
+
`createOpenAI` (OpenAI-compat route). This is required so the broker's injected
|
|
45
|
+
`thinking` / `output_config.effort` fields survive the round-trip — they are
|
|
46
|
+
stripped by the OpenAI-compat route.
|
|
47
|
+
|
|
48
|
+
Examples and agent-skills updated to use complexity tokens throughout.
|
|
49
|
+
|
|
50
|
+
- [#234](https://github.com/MadeRelevant/codemation/pull/234) [`13f9f11`](https://github.com/MadeRelevant/codemation/commit/13f9f11454855f44cd0849ea7e8f0c60f4a28964) Thanks [@cblokland90](https://github.com/cblokland90)! - feat(core): make `description` a first-class config option every authorable node accepts directly
|
|
51
|
+
|
|
52
|
+
A node's plain-language `description` (the non-technical "what does this step do" line rendered in
|
|
53
|
+
the node properties sidebar) is now a normal option passed inline alongside `id`, exactly like any
|
|
54
|
+
other config field — no wrapper or clone helper:
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
new Callback("Tag order as received", markReceived, { id: "mark", description: "Tags the order." });
|
|
58
|
+
new If("High value?", (i) => i.json.total > 1000, { id: "gate", description: "Routes big orders." });
|
|
59
|
+
new CronTrigger("Nightly", { schedule: "0 2 * * *" }, { id: "nightly", description: "Runs nightly." });
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
- `NodeConfigBase` gains `readonly description?: string` (mirrors `icon`), and the
|
|
63
|
+
`WorkflowSnapshotCodec` carries it into the persisted snapshot config the host / canvas mappers
|
|
64
|
+
read — so the sidebar renders it. (`description` was added to the codec's non-serializable
|
|
65
|
+
fallback whitelist for parity with `icon`.)
|
|
66
|
+
- Every authorable built-in node threads `description` into its config: options-object nodes
|
|
67
|
+
(`Callback`, `MapData`, `Assertion`, `HttpRequest`, `AIAgent`, `TestTrigger`) accept it in their
|
|
68
|
+
options; bare-id nodes (`If`, `Split`, `Filter`, `Aggregate`, `Wait`, `Switch`, `SubWorkflow`,
|
|
69
|
+
`Merge`, `NoOp`, `IsTestRun`, `CronTrigger`, `WebhookTrigger`, `ManualTrigger`) now take a final
|
|
70
|
+
`string | { id?: string; description?: string }` argument — a bare `"id"` string still works
|
|
71
|
+
(back-compat).
|
|
72
|
+
- The `define*` factory helpers carry it too: `defineNode`, `defineBatchNode`,
|
|
73
|
+
`definePollingTrigger` (and everything layered on `defineNode` — `defineRestNode`,
|
|
74
|
+
`defineHumanApprovalNode`/`inboxApproval`, and the collection CRUD nodes) now accept
|
|
75
|
+
`{ id?, description? }` in the trailing `create(config, name, idOrOptions)` slot, so a per-instance
|
|
76
|
+
`description` survives into the persisted snapshot. A bare string id still works (back-compat).
|
|
77
|
+
- The `workflow-dsl` skill teaches business-action node titles and a one-line `description` set
|
|
78
|
+
directly in each node's options.
|
|
79
|
+
|
|
80
|
+
This supersedes the rejected `present(node, { description })` clone-helper approach (PR [#232](https://github.com/MadeRelevant/codemation/issues/232)/[#233](https://github.com/MadeRelevant/codemation/issues/233)):
|
|
81
|
+
`description` is a normal inline option, not a prototype clone.
|
|
82
|
+
|
|
83
|
+
### Patch Changes
|
|
84
|
+
|
|
85
|
+
- [#221](https://github.com/MadeRelevant/codemation/pull/221) [`0cc3b13`](https://github.com/MadeRelevant/codemation/commit/0cc3b134e41fb38e6d89f48724da60a63ad4ae2e) Thanks [@cblokland90](https://github.com/cblokland90)! - perf(host): keep heavy conditional deps off the always-on boot graph
|
|
86
|
+
|
|
87
|
+
The always-on workspace Host pays its boot RSS for every workspace, idle or not. Three heavy dependencies were loaded eagerly at boot even though the managed pod never uses them in its default configuration:
|
|
88
|
+
- `@aws-sdk/client-s3` + `@aws-sdk/lib-storage` (~31MB) — only needed for S3 binary/workspace-file storage; the pod uses local/presigned storage.
|
|
89
|
+
- `bullmq` (~32MB) — only needed for the BullMQ scheduler and HITL-timeout worker; the pod runs `inline` execution with no Redis.
|
|
90
|
+
- `ai` / `@ai-sdk/openai` / `@ai-sdk/mcp` (~28MB) — only needed when an AI Agent node or chat model actually executes.
|
|
91
|
+
|
|
92
|
+
Each is now loaded lazily (`await import()`) at its selection/use site, behind the runtime gate that already decided not to use it. Measured host boot RSS drops ~224MB → ~170MB (-24%) with no behavior change. A spawned-process regression test (`eagerBootGraph.integration.test.ts`) asserts these modules stay off the boot graph.
|
|
93
|
+
|
|
94
|
+
- [#226](https://github.com/MadeRelevant/codemation/pull/226) [`6720268`](https://github.com/MadeRelevant/codemation/commit/672026861d15bfd8f64ea3e405e506a7184a2e77) Thanks [@cblokland90](https://github.com/cblokland90)! - test(core-nodes): regression tests for explicit id acceptance on Assertion and TestTrigger
|
|
95
|
+
|
|
96
|
+
Adds three regression tests that prove `Assertion` and `TestTrigger` accept an explicit `id`
|
|
97
|
+
in their options object and that the id survives into `WorkflowDefinition.nodes[].id` through
|
|
98
|
+
`WorkflowBuilder.add()`. A build-eval run had tripped on inconsistent id acceptance; this
|
|
99
|
+
establishes a permanent guard.
|
|
100
|
+
|
|
101
|
+
Also updates the `testing` skill's full example to set explicit ids on the `Assertion` and
|
|
102
|
+
`IsTestRun` nodes, consistent with the `workflow-dsl` gotcha ("Set an explicit `id` on every
|
|
103
|
+
node"). The `TestTrigger` in that example already carried an id.
|
|
104
|
+
|
|
105
|
+
- Updated dependencies [[`675260a`](https://github.com/MadeRelevant/codemation/commit/675260aa7a30c55a34b5a6107ad2222937f4a769), [`13f9f11`](https://github.com/MadeRelevant/codemation/commit/13f9f11454855f44cd0849ea7e8f0c60f4a28964), [`675260a`](https://github.com/MadeRelevant/codemation/commit/675260aa7a30c55a34b5a6107ad2222937f4a769), [`675260a`](https://github.com/MadeRelevant/codemation/commit/675260aa7a30c55a34b5a6107ad2222937f4a769), [`0881b46`](https://github.com/MadeRelevant/codemation/commit/0881b4676d2db29f36415d9b47709128d4c15e0e)]:
|
|
106
|
+
- @codemation/core@0.14.0
|
|
107
|
+
|
|
108
|
+
## 0.10.2
|
|
109
|
+
|
|
110
|
+
### Patch Changes
|
|
111
|
+
|
|
112
|
+
- [#209](https://github.com/MadeRelevant/codemation/pull/209) [`681f5a4`](https://github.com/MadeRelevant/codemation/commit/681f5a4bfcfe4496206dda1de4fcf5eeec27e0ec) Thanks [@cblokland90](https://github.com/cblokland90)! - fix(core-nodes): HttpRequest body kind:"json" encodes data exactly once
|
|
113
|
+
|
|
114
|
+
`HttpBodyBuilder` always ran `JSON.stringify(data)`, so callers that passed an
|
|
115
|
+
already-stringified string (`JSON.stringify({...})`) shipped a double-encoded
|
|
116
|
+
`"\"...\""` payload. The `kind:"json"` `data` field is now typed `object` (a bare
|
|
117
|
+
string/primitive is a compile-time error), with a runtime guard that throws a clear
|
|
118
|
+
message if a string still reaches the builder (e.g. via `unknown`/`as` or a resolved
|
|
119
|
+
expression). Six examples that passed pre-stringified data are fixed to pass the object
|
|
120
|
+
directly: node-istestrun, node-webhooktrigger, activate-with-credentials,
|
|
121
|
+
file-upload-ocr-drive, hitl-cp-inbox-approval, scenario-invoice-scan-and-post.
|
|
122
|
+
|
|
123
|
+
- [#210](https://github.com/MadeRelevant/codemation/pull/210) [`d4c7aca`](https://github.com/MadeRelevant/codemation/commit/d4c7aca5248352b82313efb16d5792cc24875005) Thanks [@cblokland90](https://github.com/cblokland90)! - AgentToolFactory.asTool() now accepts a per-binding `onRejected` ("halt" | "return"). Setting it marks that tool binding as human-in-the-loop and takes precedence over any `humanApprovalToolBehavior` default carried by the backing node, so two tools backed by the same node can reject differently without cloning the node config.
|
|
124
|
+
|
|
125
|
+
- Updated dependencies [[`3317947`](https://github.com/MadeRelevant/codemation/commit/33179472db68b2f4fc1a15961ac389df25d8cb6f), [`d4c7aca`](https://github.com/MadeRelevant/codemation/commit/d4c7aca5248352b82313efb16d5792cc24875005)]:
|
|
126
|
+
- @codemation/core@0.13.2
|
|
127
|
+
|
|
3
128
|
## 0.10.1
|
|
4
129
|
|
|
5
130
|
### Patch Changes
|