@codemation/core 0.10.1 → 0.11.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.
Files changed (71) hide show
  1. package/CHANGELOG.md +195 -0
  2. package/dist/{EngineRuntimeRegistration.types-D1fyApMI.d.ts → EngineRuntimeRegistration.types-BZ_1XWAJ.d.ts} +2 -2
  3. package/dist/{EngineRuntimeRegistration.types-pB3FnzqR.d.cts → EngineRuntimeRegistration.types-MPYWsEM0.d.cts} +7 -2
  4. package/dist/{InMemoryRunDataFactory-Xw7v4-sj.d.cts → InMemoryRunDataFactory-hmkh0lzR.d.cts} +8 -3
  5. package/dist/{RunIntentService-BE9CAkbf.d.ts → RunIntentService-BrEq6Jm6.d.ts} +1802 -1605
  6. package/dist/{RunIntentService-siBSjaaY.d.cts → RunIntentService-MUHJ1bhO.d.cts} +1722 -1598
  7. package/dist/bootstrap/index.cjs +2 -2
  8. package/dist/bootstrap/index.d.cts +6 -3
  9. package/dist/bootstrap/index.d.ts +4 -3
  10. package/dist/bootstrap/index.js +2 -2
  11. package/dist/{bootstrap-D3r505ko.js → bootstrap-Dgzsjoj7.js} +7 -2
  12. package/dist/bootstrap-Dgzsjoj7.js.map +1 -0
  13. package/dist/{bootstrap-Cm5ruQxx.cjs → bootstrap-dVmpU1ju.cjs} +7 -2
  14. package/dist/bootstrap-dVmpU1ju.cjs.map +1 -0
  15. package/dist/{index-DeLl1Tne.d.ts → index-Bes88mxT.d.ts} +113 -6
  16. package/dist/index.cjs +71 -3
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +173 -6
  19. package/dist/index.d.ts +3 -3
  20. package/dist/index.js +69 -4
  21. package/dist/index.js.map +1 -1
  22. package/dist/{runtime-BGNbRnqs.js → runtime-Duf3ClPw.js} +202 -53
  23. package/dist/runtime-Duf3ClPw.js.map +1 -0
  24. package/dist/{runtime-DKXJwTNv.cjs → runtime-vH0EeZzH.cjs} +208 -53
  25. package/dist/runtime-vH0EeZzH.cjs.map +1 -0
  26. package/dist/testing.cjs +6 -2
  27. package/dist/testing.cjs.map +1 -1
  28. package/dist/testing.d.cts +3 -3
  29. package/dist/testing.d.ts +2 -2
  30. package/dist/testing.js +6 -2
  31. package/dist/testing.js.map +1 -1
  32. package/package.json +4 -13
  33. package/src/ai/AgentConnectionNodeCollector.ts +47 -5
  34. package/src/authoring/defineNode.types.ts +21 -1
  35. package/src/authoring/definePollingTrigger.types.ts +20 -0
  36. package/src/binaries/UnavailableBinaryStorage.ts +6 -0
  37. package/src/bootstrap/runtime/EngineRuntimeRegistrar.ts +9 -0
  38. package/src/browser.ts +1 -0
  39. package/src/contracts/AgentBindError.ts +11 -0
  40. package/src/contracts/CodemationTelemetryAttributeNames.ts +4 -0
  41. package/src/contracts/NoOpAgentMcpIntegration.ts +13 -0
  42. package/src/contracts/agentMcpTypes.ts +64 -0
  43. package/src/contracts/executionPersistenceContracts.ts +5 -0
  44. package/src/contracts/index.ts +4 -0
  45. package/src/contracts/mcpTypes.ts +29 -0
  46. package/src/contracts/runTypes.ts +13 -0
  47. package/src/contracts/runtimeTypes.ts +10 -0
  48. package/src/contracts/workflowTypes.ts +21 -0
  49. package/src/contracts.ts +3 -0
  50. package/src/credentials/OAuthFlowExecutor.types.ts +45 -0
  51. package/src/di/CoreTokens.ts +7 -0
  52. package/src/execution/InProcessRetryRunner.ts +31 -5
  53. package/src/execution/NodeExecutionSnapshotFactory.ts +3 -0
  54. package/src/execution/NodeExecutor.ts +27 -7
  55. package/src/execution/NodeRunStateWriter.ts +14 -0
  56. package/src/index.ts +10 -0
  57. package/src/orchestration/RunContinuationService.ts +6 -2
  58. package/src/runStorage/InMemoryBinaryStorageRegistry.ts +10 -0
  59. package/src/scheduler/InlineDrivingScheduler.ts +26 -22
  60. package/src/testing/SubWorkflowRunnerTestNode.ts +1 -0
  61. package/src/types/index.ts +1 -0
  62. package/src/validation/WorkflowEdgePortError.types.ts +16 -0
  63. package/src/validation/WorkflowEdgePortValidator.ts +52 -0
  64. package/src/workflow/definition/ConnectionInvocationIdFactory.ts +4 -3
  65. package/src/workflow/definition/ConnectionNodeIdFactory.ts +25 -0
  66. package/src/workflow/definition/NodeIterationIdFactory.ts +5 -3
  67. package/src/workflowSnapshots/WorkflowSnapshotCodec.ts +42 -10
  68. package/dist/bootstrap-Cm5ruQxx.cjs.map +0 -1
  69. package/dist/bootstrap-D3r505ko.js.map +0 -1
  70. package/dist/runtime-BGNbRnqs.js.map +0 -1
  71. package/dist/runtime-DKXJwTNv.cjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,200 @@
1
1
  # @codemation/core
2
2
 
3
+ ## 0.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 8285ec0: Add a `statusLabel` field to `ConnectionInvocationRecord` / `ConnectionInvocationAppendArgs` so connection invocations can carry a short human-readable description of what they are doing (e.g. `"calling search_messages"`). The engine-side `NodeRunStateWriter` persists it; the canvas-side mirror picks it up via the standard patch projection.
8
+
9
+ Wire per-MCP-tool-call lifecycle invocations through `AgentMcpIntegration`. `prepareMcpTools` now accepts an optional `appendMcpInvocation` callback (plus the agent activation / iteration / item / parent-invocation context). When the host-side `AgentMcpIntegrationImpl` wraps a tool's `execute`, it emits a `running` record with `statusLabel: "calling <toolName>"` and a matching `completed` or `failed` record; the existing telemetry span and 403 `NeedsReconsentEvent` paths are preserved. `@codemation/canvas-core` exposes a `CurrentStatusLabelSelector` and `WorkflowCanvasNodeData.currentStatusLabel`; `@codemation/canvas` renders the latest non-empty label as a sub-line under the node card. The two capabilities work together: MCP tool calls under an agent now stream the same invocation events the LLM and node-backed tool paths already emit, and the canvas surfaces the running label per-node.
10
+
11
+ - 8285ec0: Add optional `subjectName?: string` to `ConnectionInvocationRecord` and `ConnectionInvocationAppendArgs` — a stable identifier for the thing an invocation acts on that persists across status transitions. The MCP integration's `wrapToolExecutes` sets it to the tool name on every transition (running / completed / failed), so the inspector's tool-call timeline entries can render `"Tool call · <toolName>"` for MCP servers (which expose many tools through a single connection node) instead of an opaque `"Tool call"`.
12
+
13
+ For node-backed agent tools, the parent connection node id already encodes the tool name — `subjectName` stays unset there and the inspector renders the existing `"Tool call"` title unchanged.
14
+
15
+ `statusLabel` (the running-only sentence rendered on the canvas card sub-line) is unchanged; `subjectName` is the persistent structural sibling used by the inspector.
16
+
17
+ - 8285ec0: Export `McpServerDeclaration` and `McpServerTransport` from `@codemation/core` main entry point and contracts subpath.
18
+ - 7b50018: feat(core-nodes,msgraph,gmail): inspectorSummary on every built-in node
19
+
20
+ Implements `inspectorSummary()` on all built-in node and trigger config classes so the workflow
21
+ inspector panel introduced in #136 has content for every shipped node.
22
+ - `@codemation/core`: extends `definePollingTrigger` to accept and plumb an `inspectorSummary`
23
+ option, mirroring the existing `defineNode` / `defineBatchNode` pattern. Also extends
24
+ `defineRestNode` (in `@codemation/core-nodes`) with the same option.
25
+ - `@codemation/core-nodes`: `inspectorSummary()` on `HttpRequest`, `AIAgent`, `CronTrigger`,
26
+ `ManualTrigger`, `SubWorkflow`, `Callback`, `If`, `Switch`, `Filter`, `Split`, `Merge`,
27
+ `Wait`, `WebhookTrigger`, `TestTrigger`, `Aggregate`, `MapData`, `Assertion`.
28
+ - `@codemation/core-nodes-msgraph`: `inspectorSummary` option on all 17 mail/drive/excel nodes
29
+ plus the `onNewMsGraphMailTrigger` polling trigger.
30
+ - `@codemation/core-nodes-gmail`: `inspectorSummary()` on `OnNewGmailTrigger`.
31
+ Gmail action nodes (`SendGmailMessage`, `ReplyToGmailMessage`, `ModifyGmailLabels`) return
32
+ `undefined` — all their config is per-item via `inputSchema`, nothing to surface at design time.
33
+ - `@codemation/core`: `WorkflowSnapshotCodec.serializeConfig` now pre-serializes the result of
34
+ `inspectorSummary()` into the snapshot JSON as `_inspectorSummary` so the browser-side mapper
35
+ can surface the same rows without calling class methods.
36
+ - `@codemation/next-host`: `PersistedWorkflowSnapshotMapper` now reads `_inspectorSummary` from
37
+ the serialized config and includes it in the node DTO, maintaining parity with the live mapper.
38
+
39
+ - 8285ec0: Add LocalOAuthFlowExecutor for framework (OSS/standalone) mode. Reads clientId from the credential instance's publicConfig and clientSecret from its secret material; builds PKCE-protected consent URLs; exchanges auth codes and refresh tokens directly against the provider's token endpoint. Also patches OAuthFlowExecutor.refresh to accept typeId and instanceId alongside the material, since looking up the tokenUrl and app credentials requires the instance.
40
+ - 8285ec0: Remove the MCP credential bypass on AI agents. `AIAgent.mcpServers` is now a plain
41
+ `ReadonlyArray<string>` of server ids — the inline `{ credential }` field is gone. Each
42
+ declared server surfaces a standard credential slot on the agent node (key
43
+ `mcp:<serverId>`, label and accepted types from the MCP catalog) and binds through the
44
+ same `CredentialBinding` table as every other slot. At execute time the host resolves the
45
+ binding via `getBinding({ workflowId, agentNodeId, slotKey: mcp:<serverId> })`, then opens
46
+ the MCP pool with the resolved credential instance — no more reading the credential id
47
+ out of the workflow config.
48
+
49
+ Breaking — config shape change. Replace:
50
+
51
+ ```ts
52
+ mcpServers: {
53
+ gmail: {
54
+ credential: "<instanceId>";
55
+ }
56
+ }
57
+ ```
58
+
59
+ with:
60
+
61
+ ```ts
62
+ mcpServers: ["gmail"];
63
+ ```
64
+
65
+ Then bind the credential through the canvas credential dropdown before activating the
66
+ workflow, the same way trigger credentials are bound. The `McpServerBindings` /
67
+ `McpServerExplicitBinding` types are removed from `@codemation/core`;
68
+ `AgentMcpIntegration.prepareMcpTools` now takes `{ workflowId, agentNodeId, serverIds }`.
69
+
70
+ - 8285ec0: Replace `McpServerDeclaration.credentialKind` / `credentialTypeId` / `oauthAppKey` with `acceptedCredentialTypes?: ReadonlyArray<string>`, matching the `CredentialRequirement.acceptedTypes` shape. Absent or empty array means no credential required. Gmail MCP declaration now uses `["oauth.google.gmail"]`, the same type as the Gmail trigger node.
71
+ - 8285ec0: Add `McpServerDeclaration` type and `McpServerCatalog` service (Story 7).
72
+ - `@codemation/core` exports `McpServerDeclaration` and `McpServerTransport` from `packages/core/src/contracts/mcpTypes.ts`.
73
+ - `CodemationPlugin` gains an optional `mcpServers?: ReadonlyArray<McpServerDeclaration>` field.
74
+ - `CodemationConfig` gains an optional `mcpServers?: ReadonlyArray<McpServerDeclaration>` field (also threaded through `AppConfig` and `DefineCodemationAppOptions`).
75
+ - `McpServerCatalog` in `packages/host/src/mcp/` merges declarations from three sources (`plugin`, `config`, `controlPlane`) with deterministic precedence and validation (id regex, stdio gate, credential requirements).
76
+ - `CodemationPluginDiscovery.isPluginConfig` now recognises `mcpServers`-only plugins.
77
+ - Plugin registrar and app container factory wire catalog merge on startup.
78
+
79
+ - 8285ec0: MCP servers are now first-class agent connection slots with credential pickers.
80
+
81
+ `AgentConnectionNodeCollector.collect()` accepts an optional `mcpServerResolver` callback (Pattern A). When provided, each entry in `agentConfig.mcpServers` is resolved and emitted as a `"tools"` connection slot descriptor — identical pattern to tools. Each MCP slot gets a stable node id via `ConnectionNodeIdFactory.mcpConnectionNodeId()` and exposes `getCredentialRequirements()` from the resolved `McpServerDeclaration`.
82
+
83
+ `AIAgentConnectionWorkflowExpander` accepts the resolver in its constructor; `AppContainerFactory` wires `McpServerCatalog.get` there. MCP credential pickers are now visible on the canvas alongside tool slots.
84
+
85
+ Removes the `AIAgent.inspectorSummary()` band-aid that listed MCP server ids as plain text — those are now first-class connection nodes rendered on the canvas directly.
86
+
87
+ - 0082ab5: Adds an `inspectorSummary` hook on node configs (and `defineNode({ inspectorSummary })` for plugin-author nodes). Returns 2–6 short label/value pairs that describe what the node will do at design time — model + prompt for an agent, method + URL for an HTTP call, schedule + timezone for a cron, etc. Surfaced in the workflow editor's node-properties panel as a new "Configuration" section that renders before any run telemetry exists. Hidden when no rows are produced; node configs that don't implement the hook contribute nothing. Built-in nodes will fill these in across follow-up PRs.
88
+ - 8285ec0: Define `OAuthFlowExecutor` interface — the mode-agnostic contract for the OAuth dance (start → callback → token storage) and refresh. Implementations (local and managed) will register behind this single interface via DI.
89
+ - 8285ec0: Remove deprecated broker-era MCP fields: `NeedsReconsentEvent.oauthAppKey`, shorthand `McpServerBindings` string array form, and `AgentMcpIntegrationImpl.autoResolveCredential`. Explicit binding (`{ serverId: { credential: "<instanceId>" } }`) is now the only supported form — eliminating ambiguity when multiple credential instances of the same type exist.
90
+ - 8285ec0: feat(host/binary): S3BinaryStorage implementation + boot connectivity check (Sprint 15 Story 03)
91
+
92
+ Adds `S3BinaryStorage` — a Scaleway-compatible S3 implementation of `BinaryStorage` using
93
+ `@aws-sdk/client-s3` + `@aws-sdk/lib-storage` (multipart for large payloads). Key scheme:
94
+ `<workspaceId>/<runId>/<binaryId>`.
95
+
96
+ Runtime selection is controlled by `BINARY_STORAGE_KIND` env var (`"local"` default | `"s3"`).
97
+ When `"s3"`, all `BINARY_STORAGE_S3_*` vars are required and validated at boot. A `HeadBucket`
98
+ connectivity check fails loudly on startup if the bucket is unreachable.
99
+
100
+ Extends `BinaryStorage` interface (core) with `deleteMany(keys)` and `listByPrefix(prefix)` for
101
+ bulk-delete (1000-key S3 batching) and workspace-prefix enumeration (GDPR erasure). All existing
102
+ implementations (`InMemoryBinaryStorage`, `LocalFilesystemBinaryStorage`, `UnavailableBinaryStorage`)
103
+ updated with correct implementations.
104
+
105
+ - 8285ec0: feat(story-11): Wire MCP catalog into agent — explicit and shorthand binding, scope validation, pool integration, telemetry, and runtime 403 detection
106
+ - `@codemation/core`: `AgentMcpIntegration` interface + token, `McpServerBindings` types, `NeedsReconsentEvent`, `AgentBindError`, `NoOpAgentMcpIntegration` fallback, `CodemationTelemetryAttributeNames.mcpServerId/mcpToolName`
107
+ - `@codemation/core-nodes`: `AIAgentConfig` + `AIAgent` extended with `mcpServers` and `pinnedMcpTools`; `DeferredMetaToolStrategy.ownsToolName` covers MCP tools; `AIAgentNode` injects `AgentMcpIntegration` and strips AI SDK auto-execute from strategy tools
108
+ - `@codemation/host`: `AgentMcpIntegrationImpl` — resolves bindings, validates scopes, opens pool, wraps tool execute with telemetry spans and 403/permission error detection
109
+
110
+ ### Patch Changes
111
+
112
+ - 8285ec0: Fix workflow detail screen hydration mismatch caused by overlay siblings (tabs, run button, error banner, realtime badge) being rendered conditionally on controller state that diverges between SSR and a warm React Query client cache. Overlay siblings are now gated behind the same `hasMounted` flag as the canvas root.
113
+
114
+ Render AIAgent MCP-server attachments in the canvas. `WorkflowDefinitionMapper` (the server-side mapper that feeds `/api/workflows/:id`) now passes an `McpServerResolver` backed by the host's `McpServerCatalog` to `AgentConnectionNodeCollector.collect`, so virtual connection nodes for declared `mcpServers` are emitted alongside the LLM and tool children. The MCP descriptor itself carries `icon: "lucide:plug"` and `lucide:plug` is added to the curated `WorkflowCanvasLucideIconRegistry` so MCP servers render with a distinct icon on the synchronous zero-HTTP path.
115
+
116
+ - 8285ec0: test: push @codemation/core coverage to ≥90% (Sprint 16 Story 01)
117
+ - 8285ec0: Stop leaking `node:crypto` and `node:module` into canvas's browser bundle. `NodeIterationIdFactory` and `ConnectionInvocationIdFactory` now use `globalThis.crypto.randomUUID()` instead of importing `randomUUID` from `node:crypto`. Canvas's `tsdown` build is configured with `platform: "neutral"` so the dist no longer ships `createRequire(import.meta.url)` from `node:module`. Fixes consumer Turbopack OOMs when the canvas dist is included in a Next.js client bundle.
118
+ - e4d3e1a: perf(core): yield event loop between node activations in InlineDrivingScheduler
119
+
120
+ Switch `scheduleDrain` from `setTimeout(0)` to `setImmediate` and process one
121
+ activation per drain call instead of draining the entire queue in a while loop.
122
+ This ensures HTTP responses and WebSocket frames can flush to clients between
123
+ node activations — previously synchronous SQLite writes during a 20-node run
124
+ could block the proxy event loop for 3–4 s, making the canvas appear frozen
125
+ until the run completed.
126
+
127
+ - 8285ec0: MCP credential slots now live on the MCP connection node, matching ChatModel and Tool
128
+ connection nodes. Each declared `mcpServers` entry materializes an MCP connection node
129
+ and the credential slot is attached to that node with slot key `"credential"` (label
130
+ and accepted types derived from the MCP catalog declaration). The standard credential
131
+ slot traversal picks them up via `AgentConnectionNodeCollector` — no special-case path.
132
+
133
+ Removed the agent-owned `mcp:<serverId>` slot key. Removed the `mcpSlotKey(serverId)`
134
+ helper from `@codemation/core` (and its re-export from the type-only `contracts`
135
+ subpath). At runtime, `AgentMcpIntegration.prepareMcpTools` now resolves the binding at
136
+ `(workflowId, ConnectionNodeIdFactory.mcpConnectionNodeId(agentNodeId, serverId), "credential")`.
137
+
138
+ Gmail MCP `requiredScopes` trimmed to `["https://www.googleapis.com/auth/gmail.modify"]`
139
+ — `gmail.modify` is a superset of `gmail.readonly` + `gmail.send` for messages, threads,
140
+ drafts, and labels, so the previous list was redundant.
141
+
142
+ - e4d3e1a: perf(core): fail fast on unbound required credential slots before node execution
143
+
144
+ `NodeExecutor` now checks all required (non-optional) credential slots via
145
+ `ctx.getCredential` before entering the retry runner or calling the node's
146
+ `execute`. This means a misconfigured credential surfaces as an immediate error
147
+ without burning the retry budget or running any node setup work. The session is
148
+ created and cached during the pre-flight, so the node itself pays no extra cost
149
+ when it subsequently calls `getCredential`. Optional slots (`optional: true` in
150
+ `getCredentialRequirements`) are skipped.
151
+
152
+ Also adds a `shouldRetry` predicate to `InProcessRetryRunner.run` and uses it
153
+ in `NodeExecutor` to skip all retry delays when the node throws a
154
+ `CredentialUnboundError` (or an error whose `.cause` is one). Previously, nodes
155
+ like `AIAgent` that check credentials inside `execute` rather than via
156
+ `getCredentialRequirements` would burn their full retry budget (e.g. 3 × 2 s
157
+ for AI agents) before surfacing the "slot not bound" error.
158
+
159
+ - 8285ec0: fix: validate edge output ports against declared node ports at load time
160
+
161
+ Adds `WorkflowEdgePortValidator` to `@codemation/core`. The validator checks that every edge's `from.output` port is declared by the source node's `declaredOutputPorts`; nodes without declared ports are treated as unconstrained (legacy behaviour).
162
+
163
+ The validator is wired into `WorkflowDefinitionExportsResolver` in `@codemation/host`, which is the common chokepoint for both the `CodemationConsumerConfigLoader` and `CodemationConsumerAppResolver` load paths. On violation, all errors are reported at once so an agent can self-correct in a single pass.
164
+
165
+ `WorkflowElkPortInfoResolver` in `@codemation/canvas-core` is tightened to render _exactly_ the declared ports (plus the synthetic `error` port when applicable) when a node has `declaredOutputPorts`, preventing phantom handles from rogue edges on the canvas. Legacy nodes without declared ports continue to infer ports from edges as before.
166
+
167
+ Root cause: an LLM agent created an `If` workflow node (declares `["true", "false"]`) with a rogue edge using `output: "main"`, which the canvas unioned into the port list, producing a phantom third handle.
168
+
169
+ - 8285ec0: Sprint 14 coverage: tests for WhenBuilder DSL helper, InMemoryWorkflowExecutionRepository retention paths, DevTrackedProcessTreeKiller edge cases, ConsumerCliTsconfigPreparation resolution, ListenPortConflictDescriber ss fallback, RedisRunEventBus publish/subscribe/teardown, CodemationChatModelFactory HMAC signing, registerCoreNodes smoke, single-react-component-per-file rule branches, and CodemationAgentSkillsCli error/help paths. No production code changes.
170
+ - 8285ec0: Remove the `development` export condition from `@codemation/canvas`, `@codemation/core`, and `@codemation/host` package.json exports. Module resolution now consistently uses the built `dist/` regardless of `NODE_ENV`.
171
+
172
+ **Why:** the `development` condition is auto-applied by bundlers (Next.js dev mode, Vite dev, etc.) and was making every cross-repo monorepo consumer fall through to TypeScript source. For the framework's own `@codemation/next-host`, this was fine — turbo's `dev` already runs `tsdown --watch` on these packages so dist is always fresh in dev. For external consumers (notably the managed control plane), it caused multi-hundred-file recursive source compiles on every cold page load.
173
+
174
+ **Impact:** zero behavior change for normal users (they consume published `dist/`). Framework monorepo devs editing canvas/core/host source still see live updates as long as `tsdown --watch` is running for the package — which is what `pnpm dev` (turbo) orchestrates by default. If you're running an app in isolation without the package's watch task, you now need to start it explicitly.
175
+
176
+ ## 0.10.2
177
+
178
+ ### Patch Changes
179
+
180
+ - [#133](https://github.com/MadeRelevant/codemation/pull/133) [`d283b48`](https://github.com/MadeRelevant/codemation/commit/d283b481f01a1a259d38d25c1482006eff963384) Thanks [@cblokland90](https://github.com/cblokland90)! - feat: deep-link from parent run to specific subworkflow execution
181
+
182
+ Adds `childRunId` to `NodeExecutionSnapshot` so the UI can navigate directly to the
183
+ child run when a `SubWorkflow` node is selected in the execution inspector, instead of
184
+ only linking to the child workflow's editor. Fixes the gap from PR [#131](https://github.com/MadeRelevant/codemation/issues/131).
185
+ - `@codemation/core` (patch): `NodeExecutionSnapshot` gains `childRunId?: RunId`;
186
+ `ExecutionInstanceDto` gains `childRunId?: string`;
187
+ `NodeExecutionStatePublisher` gains optional `setChildRunId` method;
188
+ `NodeExecutionSnapshotFactory` propagates `previous.childRunId` through
189
+ `completed`, `failed`, and `skipped` transitions.
190
+ - `@codemation/host` (minor): `ExecutionInstance` table gains `child_run_id` column
191
+ (nullable, backward-compatible); `PrismaWorkflowRunRepository` persists and reads
192
+ `childRunId` on node-activation snapshots.
193
+ - `@codemation/next-host` (minor): `NodeExecutionSnapshot` type gains `childRunId`;
194
+ `WorkflowExecutionInspectorDetailBody` renders "Open subworkflow run" (with
195
+ `?run=<childRunId>`) when a child run id is present, falling back to
196
+ "Open subworkflow editor" for pre-existing snapshots.
197
+
3
198
  ## 0.10.1
4
199
 
5
200
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import { Mr as WebhookTriggerMatcher, Pr as WebhookTriggerRoutingDiagnostics, Ta as DependencyContainer, Wa as EngineExecutionLimitsPolicyConfig, _r as TriggerRuntimeDiagnostics, vn as WorkflowPolicyRuntimeDefaults } from "./RunIntentService-BE9CAkbf.js";
1
+ import { $i as WebhookTriggerRoutingDiagnostics, Ii as TriggerRuntimeDiagnostics, Lr as WorkflowPolicyRuntimeDefaults, Nn as EngineExecutionLimitsPolicyConfig, Zi as WebhookTriggerMatcher, mn as DependencyContainer } from "./RunIntentService-BrEq6Jm6.js";
2
2
 
3
3
  //#region src/bootstrap/runtime/EngineRuntimeRegistration.types.d.ts
4
4
 
@@ -41,4 +41,4 @@ interface EngineRuntimeRegistrationOptions {
41
41
  }
42
42
  //#endregion
43
43
  export { TriggerRuntimeDiagnosticsProvider as n, WebhookTriggerMatcherProvider as r, EngineRuntimeRegistrationOptions as t };
44
- //# sourceMappingURL=EngineRuntimeRegistration.types-D1fyApMI.d.ts.map
44
+ //# sourceMappingURL=EngineRuntimeRegistration.types-BZ_1XWAJ.d.ts.map
@@ -1,4 +1,4 @@
1
- import { Br as PersistedWorkflowTokenRegistryLike, Fi as NodeId, G as WorkflowDefinition, Jr as RunResult, M as ParentExecutionRef, Q as WorkflowPolicyRuntimeDefaults, Ri as WorkflowId, Rr as PersistedWorkflowSnapshot, Zt as TriggerRuntimeDiagnostics, ai as DependencyContainer, d as Items, fn as WebhookTriggerMatcher, mn as WebhookTriggerRoutingDiagnostics, r as Engine, rn as WorkflowRepository, wi as EngineExecutionLimitsPolicyConfig, y as NodeConfigBase, zr as PersistedWorkflowSnapshotNode } from "./RunIntentService-siBSjaaY.cjs";
1
+ import { C as PersistedWorkflowSnapshot, Dr as WebhookTriggerMatcher, Hi as WorkflowId, N as RunResult, Nt as NodeConfigBase, T as PersistedWorkflowTokenRegistryLike, Tt as Items, W as DependencyContainer, fr as TriggerRuntimeDiagnostics, kr as WebhookTriggerRoutingDiagnostics, lt as EngineExecutionLimitsPolicyConfig, on as WorkflowDefinition, pn as WorkflowPolicyRuntimeDefaults, qt as ParentExecutionRef, r as Engine, vr as WorkflowRepository, w as PersistedWorkflowSnapshotNode, zi as NodeId } from "./RunIntentService-MUHJ1bhO.cjs";
2
2
 
3
3
  //#region src/workflowSnapshots/WorkflowSnapshotCodec.d.ts
4
4
  declare class WorkflowSnapshotCodec {
@@ -7,6 +7,11 @@ declare class WorkflowSnapshotCodec {
7
7
  create(workflow: WorkflowDefinition): PersistedWorkflowSnapshot;
8
8
  hydrate(snapshotNode: PersistedWorkflowSnapshotNode, liveConfig: NodeConfigBase): NodeConfigBase;
9
9
  private serializeConfig;
10
+ /**
11
+ * Safely call `config.inspectorSummary()` and return a plain JSON-safe array, or undefined.
12
+ * Returns undefined if the method is absent, throws, or produces no valid rows.
13
+ */
14
+ private safeInspectorSummary;
10
15
  private injectTokenIds;
11
16
  private mergeValue;
12
17
  private mergeNestedValue;
@@ -72,4 +77,4 @@ interface EngineRuntimeRegistrationOptions {
72
77
  }
73
78
  //#endregion
74
79
  export { WorkflowSnapshotCodec as a, EngineWorkflowRunnerService as i, TriggerRuntimeDiagnosticsProvider as n, WebhookTriggerMatcherProvider as r, EngineRuntimeRegistrationOptions as t };
75
- //# sourceMappingURL=EngineRuntimeRegistration.types-pB3FnzqR.d.cts.map
80
+ //# sourceMappingURL=EngineRuntimeRegistration.types-MPYWsEM0.d.cts.map
@@ -1,4 +1,4 @@
1
- import { $r as RunTestContext, Bt as NodeExecutionStatePublisher, Et as ExecutionContextFactory, F as RunDataSnapshot, Fi as NodeId, Ft as NodeBinaryAttachmentService, Hn as CostTrackingTelemetryFactory, I as RunId, It as NodeExecutionContext, Kn as CollectionsContext, M as ParentExecutionRef, N as PersistedRunPolicySnapshot, O as NodeOutputs, P as RunDataFactory, R as RunnableNodeConfig, Ri as WorkflowId, Tt as ExecutionContext, Wn as CostTrackingUsageRecord, _ as MutableRunData, _t as BinaryStorageReadResult, a as BinaryAttachment, bt as BinaryStorageWriteResult, dr as CredentialSessionService, gt as BinaryStorage, ht as BinaryBody, l as Item, pt as RetryPolicySpec, v as NodeActivationId, vn as ExecutionTelemetryFactory, vt as BinaryStorageStatResult, wt as ExecutionBinaryService } from "./RunIntentService-siBSjaaY.cjs";
1
+ import { $t as RunnableNodeConfig, An as BinaryBody, Bn as ExecutionContext, Ct as Item, Ei as CredentialSessionService, Fn as BinaryStorageWriteResult, Hi as WorkflowId, Jt as PersistedRunPolicySnapshot, Mn as BinaryStorageReadResult, Mt as NodeActivationId, Nn as BinaryStorageStatResult, Nr as ExecutionTelemetryFactory, On as RetryPolicySpec, R as RunTestContext, Ut as NodeOutputs, Vn as ExecutionContextFactory, Xn as NodeBinaryAttachmentService, Xt as RunDataSnapshot, Yt as RunDataFactory, Zn as NodeExecutionContext, Zt as RunId, ai as CostTrackingUsageRecord, jn as BinaryStorage, jt as MutableRunData, qt as ParentExecutionRef, ri as CostTrackingTelemetryFactory, si as CollectionsContext, tr as NodeExecutionStatePublisher, yt as BinaryAttachment, zi as NodeId, zn as ExecutionBinaryService } from "./RunIntentService-MUHJ1bhO.cjs";
2
2
 
3
3
  //#region src/contracts/CostCatalogContract.d.ts
4
4
  interface CostCatalogEntry {
@@ -31,6 +31,8 @@ declare class UnavailableBinaryStorage implements BinaryStorage {
31
31
  exists: false;
32
32
  }>;
33
33
  delete(): Promise<void>;
34
+ deleteMany(): Promise<void>;
35
+ listByPrefix(): Promise<ReadonlyArray<string>>;
34
36
  }
35
37
  //#endregion
36
38
  //#region src/binaries/DefaultExecutionBinaryServiceFactory.d.ts
@@ -86,9 +88,10 @@ declare class DefaultExecutionContextFactory implements ExecutionContextFactory
86
88
  declare class InProcessRetryRunner {
87
89
  private readonly sleeper;
88
90
  constructor(sleeper: AsyncSleeper);
89
- run<T>(policy: RetryPolicySpec | undefined, work: () => Promise<T>): Promise<T>;
91
+ run<T>(policy: RetryPolicySpec | undefined, work: () => Promise<T>, shouldRetry?: (error: unknown) => boolean, warn?: (message: string) => void): Promise<T>;
90
92
  private static delayAfterFailureMs;
91
93
  private static normalizePolicy;
94
+ private static clampMaxAttempts;
92
95
  private static assertPositiveInt;
93
96
  private static assertNonNegativeFinite;
94
97
  private static assertMultiplier;
@@ -122,6 +125,8 @@ declare class InMemoryBinaryStorage implements BinaryStorage {
122
125
  openReadStream(storageKey: string): Promise<BinaryStorageReadResult | undefined>;
123
126
  stat(storageKey: string): Promise<BinaryStorageStatResult>;
124
127
  delete(storageKey: string): Promise<void>;
128
+ deleteMany(storageKeys: ReadonlyArray<string>): Promise<void>;
129
+ listByPrefix(prefix: string): Promise<ReadonlyArray<string>>;
125
130
  }
126
131
  //#endregion
127
132
  //#region src/runStorage/InMemoryRunDataFactory.d.ts
@@ -130,4 +135,4 @@ declare class InMemoryRunDataFactory implements RunDataFactory {
130
135
  }
131
136
  //#endregion
132
137
  export { ItemExprResolver as a, DefaultAsyncSleeper as c, UnavailableBinaryStorage as d, CredentialResolverFactory as f, RunnableOutputBehaviorResolver as i, AsyncSleeper as l, CostCatalogEntry as m, InMemoryBinaryStorage as n, InProcessRetryRunner as o, CostCatalog as p, RunnableOutputBehavior as r, DefaultExecutionContextFactory as s, InMemoryRunDataFactory as t, DefaultExecutionBinaryService as u };
133
- //# sourceMappingURL=InMemoryRunDataFactory-Xw7v4-sj.d.cts.map
138
+ //# sourceMappingURL=InMemoryRunDataFactory-hmkh0lzR.d.cts.map