@codemation/core 0.14.0 → 0.15.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 (208) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/dist/{CostCatalogContract-B9aYIqJu.d.cts → CostCatalogContract-Dwo-ZamG.d.cts} +2 -2
  3. package/dist/EngineRuntimeRegistration.types-BiNasx3G.d.cts +54 -0
  4. package/dist/EngineRuntimeRegistration.types-Dq4ucrdo.d.ts +21 -0
  5. package/dist/{InMemoryRunDataFactory-C3rIszrW.d.cts → InMemoryRunDataFactory-D2U9azmZ.d.cts} +2 -20
  6. package/dist/{InMemoryRunEventBusRegistry-Sa86VxuV.cjs → InMemoryRunEventBusRegistry-DO0WM9Lw.cjs} +1 -1
  7. package/dist/{InMemoryRunEventBusRegistry-Sa86VxuV.cjs.map → InMemoryRunEventBusRegistry-DO0WM9Lw.cjs.map} +1 -1
  8. package/dist/{InMemoryRunEventBusRegistry-Bwunvt1T.js → InMemoryRunEventBusRegistry-Layt2xgm.js} +1 -1
  9. package/dist/{InMemoryRunEventBusRegistry-Bwunvt1T.js.map → InMemoryRunEventBusRegistry-Layt2xgm.js.map} +1 -1
  10. package/dist/{ItemsInputNormalizer-UCpn7luX.d.cts → ItemsInputNormalizer-A5txcOWX.d.cts} +3 -98
  11. package/dist/{ItemsInputNormalizer-B9SdLG24.cjs → ItemsInputNormalizer-C1fv3sMW.cjs} +2 -2
  12. package/dist/ItemsInputNormalizer-C1fv3sMW.cjs.map +1 -0
  13. package/dist/{ItemsInputNormalizer-DoOawd9R.d.ts → ItemsInputNormalizer-D2vrMrX1.d.ts} +2 -62
  14. package/dist/{ItemsInputNormalizer-CZEODg94.js → ItemsInputNormalizer-fUYo4GLV.js} +2 -2
  15. package/dist/ItemsInputNormalizer-fUYo4GLV.js.map +1 -0
  16. package/dist/{RunIntentService-0f3ICjAz.d.cts → RunIntentService-DKxuHTUz.d.cts} +2 -15
  17. package/dist/{RunIntentService-Dx_HHxDX.d.ts → RunIntentService-DrpKli2k.d.ts} +2 -22
  18. package/dist/{agentMcpTypes-B11B3Hd-.d.cts → agentMcpTypes-BHX4RQCC.d.cts} +24 -524
  19. package/dist/bootstrap/index.cjs +9 -5
  20. package/dist/bootstrap/index.d.cts +32 -106
  21. package/dist/bootstrap/index.d.ts +18 -17
  22. package/dist/bootstrap/index.js +6 -5
  23. package/dist/{bootstrap-Be0LB0nh.cjs → bootstrap-CTB53rEF.cjs} +9 -60
  24. package/dist/bootstrap-CTB53rEF.cjs.map +1 -0
  25. package/dist/{bootstrap-pSQdsMfa.js → bootstrap-DmqKheCI.js} +6 -57
  26. package/dist/bootstrap-DmqKheCI.js.map +1 -0
  27. package/dist/browser.cjs +12 -11
  28. package/dist/browser.d.cts +4 -4
  29. package/dist/browser.d.ts +3 -3
  30. package/dist/browser.js +3 -2
  31. package/dist/contracts-7L1wJHdk.cjs +569 -0
  32. package/dist/contracts-7L1wJHdk.cjs.map +1 -0
  33. package/dist/contracts-CjJ5CZ7N.js +447 -0
  34. package/dist/contracts-CjJ5CZ7N.js.map +1 -0
  35. package/dist/contracts.cjs +9 -2
  36. package/dist/contracts.d.cts +5 -5
  37. package/dist/contracts.d.ts +2 -2
  38. package/dist/contracts.js +3 -2
  39. package/dist/{executionPersistenceContracts-CX9Ql8N1.d.cts → deploymentManifestTypes-B8CDmZZK.d.cts} +65 -81
  40. package/dist/di-C6Ubf9o5.cjs +179 -0
  41. package/dist/di-C6Ubf9o5.cjs.map +1 -0
  42. package/dist/di-Cjiil7U-.js +114 -0
  43. package/dist/di-Cjiil7U-.js.map +1 -0
  44. package/dist/{index-CbJdbIHe.d.ts → index-CRv3_pY3.d.ts} +87 -870
  45. package/dist/{index-uPnD9EE6.d.ts → index-mnLS0iQl.d.ts} +27 -400
  46. package/dist/index.cjs +44 -115
  47. package/dist/index.cjs.map +1 -1
  48. package/dist/index.d.cts +17 -524
  49. package/dist/index.d.ts +5 -5
  50. package/dist/index.js +21 -98
  51. package/dist/index.js.map +1 -1
  52. package/dist/{params-Dwl10Ws9.d.cts → params-CrK4iuG1.d.cts} +2 -11
  53. package/dist/{runtime-CSunvf7A.js → runtime-CBFDpmiz.js} +46 -679
  54. package/dist/runtime-CBFDpmiz.js.map +1 -0
  55. package/dist/{runtime-n2tqRwaf.cjs → runtime-Due-FOZ2.cjs} +69 -752
  56. package/dist/runtime-Due-FOZ2.cjs.map +1 -0
  57. package/dist/testing.cjs +8 -40
  58. package/dist/testing.cjs.map +1 -1
  59. package/dist/testing.d.cts +3 -32
  60. package/dist/testing.d.ts +3 -32
  61. package/dist/testing.js +6 -38
  62. package/dist/testing.js.map +1 -1
  63. package/dist/{di-DhwtDRgs.cjs → workflowTypes-BW6Hhee7.cjs} +4 -229
  64. package/dist/workflowTypes-BW6Hhee7.cjs.map +1 -0
  65. package/dist/{di-CEV6wTc4.js → workflowTypes-DZtBTmKf.js} +3 -162
  66. package/dist/workflowTypes-DZtBTmKf.js.map +1 -0
  67. package/package.json +1 -1
  68. package/src/ai/AgentConnectionNodeCollector.ts +0 -4
  69. package/src/ai/AgentMessageConfigNormalizerFactory.ts +0 -4
  70. package/src/ai/AiHost.ts +0 -38
  71. package/src/ai/CallableToolConfig.ts +0 -9
  72. package/src/ai/CallableToolKindToken.ts +0 -4
  73. package/src/authoring/callableTool.types.ts +0 -3
  74. package/src/authoring/defineCollection.types.ts +0 -11
  75. package/src/authoring/defineHumanApprovalNode.types.ts +0 -116
  76. package/src/authoring/defineNode.types.ts +0 -25
  77. package/src/authoring/definePollingTrigger.types.ts +18 -152
  78. package/src/authoring/definePollingTriggerInternals.ts +0 -4
  79. package/src/authoring/nodeBaseOptions.types.ts +0 -14
  80. package/src/binaries/boundedReadBinary.types.ts +0 -16
  81. package/src/bootstrap/index.ts +8 -2
  82. package/src/bootstrap/runtime/EngineRuntimeRegistrar.ts +0 -5
  83. package/src/bootstrap/runtime/EngineRuntimeRegistration.types.ts +0 -23
  84. package/src/browser.ts +0 -3
  85. package/src/contracts/AgentBindError.ts +0 -5
  86. package/src/contracts/Clock.ts +0 -1
  87. package/src/contracts/CodemationTelemetryAttributeNames.ts +0 -10
  88. package/src/contracts/NoOpAgentMcpIntegration.ts +0 -6
  89. package/src/contracts/NoOpTelemetrySpanScope.ts +0 -7
  90. package/src/contracts/RetryPolicy.ts +0 -2
  91. package/src/contracts/agentMcpTypes.ts +0 -34
  92. package/src/contracts/assertionTypes.ts +0 -33
  93. package/src/contracts/baseTypes.ts +0 -6
  94. package/src/contracts/collectionTypes.ts +0 -25
  95. package/src/contracts/credentialTypes.ts +13 -60
  96. package/src/contracts/deploymentManifestTypes.ts +158 -0
  97. package/src/contracts/dispatchTypes.ts +29 -0
  98. package/src/contracts/executionPersistenceContracts.ts +0 -33
  99. package/src/contracts/hitlSeamTypes.ts +0 -14
  100. package/src/contracts/humanTaskStoreTypes.ts +0 -2
  101. package/src/contracts/inboxChannelTypes.ts +0 -9
  102. package/src/contracts/index.ts +3 -0
  103. package/src/contracts/itemExpr.ts +0 -18
  104. package/src/contracts/itemMeta.ts +0 -3
  105. package/src/contracts/mcpTypes.ts +0 -16
  106. package/src/contracts/retryPolicySpec.types.ts +0 -10
  107. package/src/contracts/runFinishedAtFactory.ts +0 -1
  108. package/src/contracts/runTypes.ts +0 -74
  109. package/src/contracts/runtimeTypes.ts +4 -131
  110. package/src/contracts/telemetryTypes.ts +0 -7
  111. package/src/contracts/testTriggerTypes.ts +0 -43
  112. package/src/contracts/triggerInvokerTypes.ts +6 -0
  113. package/src/contracts/webhookTypes.ts +0 -8
  114. package/src/contracts/workflowActivationPolicy.ts +0 -5
  115. package/src/contracts/workflowTypes.ts +4 -86
  116. package/src/contracts/workspaceFileTypes.ts +0 -72
  117. package/src/contracts.ts +18 -10
  118. package/src/credentials/CredentialMaterialProvider.types.ts +0 -28
  119. package/src/credentials/ManagedCredentialMaterialWriteError.ts +0 -6
  120. package/src/credentials/ManagedMaterialFetchError.ts +0 -6
  121. package/src/credentials/OAuthFlowExecutor.types.ts +0 -15
  122. package/src/di/CoreTokens.ts +2 -6
  123. package/src/events/ConnectionInvocationEventPublisher.ts +0 -7
  124. package/src/events/NodeEventPublisher.ts +0 -1
  125. package/src/events/runEvents.ts +0 -8
  126. package/src/execution/ActivationEnqueueService.ts +0 -10
  127. package/src/execution/ChildExecutionScopeFactory.ts +0 -13
  128. package/src/execution/FanInMergeByOriginMerger.ts +0 -11
  129. package/src/execution/InProcessRetryRunner.ts +0 -1
  130. package/src/execution/ItemExprResolver.ts +0 -3
  131. package/src/execution/NodeActivationRequestComposer.ts +0 -3
  132. package/src/execution/NodeActivationRequestInputPreparer.ts +0 -5
  133. package/src/execution/NodeExecutionSnapshotFactory.ts +0 -1
  134. package/src/execution/NodeExecutor.ts +1 -17
  135. package/src/execution/NodeSuspensionHandler.ts +1 -39
  136. package/src/execution/PersistedRunStateTerminalBuilder.ts +0 -5
  137. package/src/execution/RunSuspendedError.ts +0 -10
  138. package/src/execution/WorkflowRunExecutionContextFactory.ts +0 -3
  139. package/src/orchestration/AbortControllerFactory.ts +0 -4
  140. package/src/orchestration/Engine.ts +0 -9
  141. package/src/orchestration/NodeExecutionRequestHandlerService.ts +3 -4
  142. package/src/orchestration/RunContinuationService.ts +7 -39
  143. package/src/orchestration/RunStartService.ts +0 -7
  144. package/src/orchestration/TestSuiteOrchestrator.ts +0 -18
  145. package/src/orchestration/TestSuiteRunIdFactory.ts +0 -4
  146. package/src/orchestration/TriggerRuntimeService.ts +3 -2
  147. package/src/planning/CurrentStateFrontierPlanner.ts +0 -1
  148. package/src/planning/RunQueuePlanner.ts +0 -6
  149. package/src/policies/executionLimits/EngineExecutionLimitsPolicy.ts +0 -8
  150. package/src/policies/executionLimits/EngineExecutionLimitsPolicyFactory.ts +0 -3
  151. package/src/runStorage/RunSummaryMapper.ts +0 -1
  152. package/src/runtime/EngineFactory.ts +6 -11
  153. package/src/runtime/RunIntentService.ts +0 -4
  154. package/src/runtime/WorkflowRepositoryWebhookTriggerMatcher.ts +0 -4
  155. package/src/runtime-types/InjectableRuntimeDecoratorComposerRegistry.ts +0 -4
  156. package/src/runtime-types/PersistedRuntimeTypeMetadataStoreRegistry.ts +0 -4
  157. package/src/runtime-types/PersistedRuntimeTypeNameResolver.ts +0 -1
  158. package/src/runtime-types/persistedRuntimeTypeModelRegistry.ts +0 -4
  159. package/src/runtime-types/runtimeTypeDecorators.types.ts +0 -12
  160. package/src/scheduler/ConfigDrivenOffloadPolicy.ts +0 -1
  161. package/src/scheduler/DefaultDrivingScheduler.ts +0 -6
  162. package/src/scheduler/InlineDrivingScheduler.ts +0 -13
  163. package/src/serialization/ItemsInputNormalizer.ts +0 -5
  164. package/src/testing/CapturingScheduler.ts +0 -3
  165. package/src/testing/EngineTestKitRunIdFactory.ts +0 -3
  166. package/src/testing/ItemHarnessNode.ts +0 -3
  167. package/src/testing/ItemHarnessNodeConfig.ts +0 -4
  168. package/src/testing/PrefixedSequentialIdGenerator.ts +0 -3
  169. package/src/testing/RegistrarEngineTestKit.types.ts +0 -2
  170. package/src/testing/RejectingCredentialSessionService.ts +0 -4
  171. package/src/testing/SubWorkflowRunnerTestNode.ts +0 -3
  172. package/src/testing/WorkflowTestHarnessManualTrigger.ts +0 -3
  173. package/src/testing/WorkflowTestKitBuilder.ts +0 -4
  174. package/src/testing/WorkflowTestKitRunNodeWorkflowFactory.ts +0 -3
  175. package/src/testing.ts +0 -3
  176. package/src/triggers/polling/PollingTriggerDedupWindow.ts +0 -4
  177. package/src/triggers/polling/PollingTriggerLogger.ts +0 -5
  178. package/src/triggers/polling/PollingTriggerRuntime.ts +0 -5
  179. package/src/types/index.ts +0 -6
  180. package/src/validation/WorkflowEdgePortValidator.ts +0 -5
  181. package/src/workflow/definition/ConnectionInvocationIdFactory.ts +0 -7
  182. package/src/workflow/definition/ConnectionNodeIdFactory.ts +0 -6
  183. package/src/workflow/definition/NodeIterationIdFactory.ts +0 -13
  184. package/src/workflow/definition/WorkflowExecutableNodeClassifier.ts +0 -6
  185. package/src/workflow/dsl/ChainCursorResolver.ts +0 -20
  186. package/src/workflow/dsl/NodeIdSlugifier.ts +0 -9
  187. package/src/workflow/dsl/WhenBuilder.ts +0 -17
  188. package/src/workflow/dsl/WorkflowDefinitionError.ts +0 -9
  189. package/src/workflow/dsl/workflowBuilderTypes.ts +0 -24
  190. package/src/workflowSnapshots/MissingRuntimeParityGuard.ts +24 -0
  191. package/src/workflowSnapshots/PersistedWorkflowTokenRegistry.ts +0 -6
  192. package/src/workflowSnapshots/WorkflowParityMismatchError.ts +18 -0
  193. package/src/workflowSnapshots/WorkflowSnapshotCodec.ts +0 -5
  194. package/src/workflowSnapshots/index.ts +3 -0
  195. package/dist/EngineRuntimeRegistration.types-BYAmGMdS.d.cts +0 -81
  196. package/dist/EngineRuntimeRegistration.types-CVLI8DsJ.d.ts +0 -44
  197. package/dist/ItemsInputNormalizer-B9SdLG24.cjs.map +0 -1
  198. package/dist/ItemsInputNormalizer-CZEODg94.js.map +0 -1
  199. package/dist/bootstrap-Be0LB0nh.cjs.map +0 -1
  200. package/dist/bootstrap-pSQdsMfa.js.map +0 -1
  201. package/dist/contracts-CK0x6w_G.cjs +0 -74
  202. package/dist/contracts-CK0x6w_G.cjs.map +0 -1
  203. package/dist/contracts-DXdfTdpW.js +0 -50
  204. package/dist/contracts-DXdfTdpW.js.map +0 -1
  205. package/dist/di-CEV6wTc4.js.map +0 -1
  206. package/dist/di-DhwtDRgs.cjs.map +0 -1
  207. package/dist/runtime-CSunvf7A.js.map +0 -1
  208. package/dist/runtime-n2tqRwaf.cjs.map +0 -1
@@ -4,11 +4,6 @@ import { ZodType, z } from "zod";
4
4
  import { ReadableStream } from "node:stream/web";
5
5
 
6
6
  //#region src/contracts/baseTypes.d.ts
7
- /**
8
- * Minimal base types that have no dependencies on other contracts.
9
- * Used by credentialTypes, workflowTypes, and other contract layers
10
- * to avoid circular dependencies.
11
- */
12
7
  type WorkflowId = string;
13
8
  type NodeId = string;
14
9
  type OutputPortKey = string;
@@ -17,21 +12,12 @@ type PersistedTokenId = string;
17
12
  type NodeConnectionName = string;
18
13
  //#endregion
19
14
  //#region src/triggers/polling/PollingTriggerDedupWindow.d.ts
20
- /**
21
- * Merges processed-ID windows for polling triggers, capping the total to avoid unbounded growth.
22
- * Plugin code receives an instance of this class via {@link PollingTriggerHandle.dedup}.
23
- */
24
15
  declare class PollingTriggerDedupWindow {
25
16
  static readonly defaultCapN = 2000;
26
17
  merge(previous: ReadonlyArray<string>, incoming: ReadonlyArray<string>, capN?: number): ReadonlyArray<string>;
27
18
  }
28
19
  //#endregion
29
20
  //#region src/triggers/polling/PollingTriggerLogger.d.ts
30
- /**
31
- * Minimal logger surface for the polling-trigger runtime.
32
- * Hosts supply this via {@link EngineDeps.pollingTriggerLogger};
33
- * when absent the runtime is silent.
34
- */
35
21
  interface PollingTriggerLogger {
36
22
  info(message: string): void;
37
23
  warn(message: string): void;
@@ -57,22 +43,11 @@ type CredentialFieldSchema = Readonly<{
57
43
  type: "string" | "password" | "textarea" | "json" | "boolean";
58
44
  required?: true;
59
45
  order?: number;
60
- /**
61
- * Where this field appears in the credential dialog. Use `"advanced"` for optional or
62
- * power-user fields; they render inside a collapsible section (see `CredentialTypeDefinition.advancedSection`).
63
- * Defaults to `"default"` when omitted.
64
- */
65
46
  visibility?: "default" | "advanced";
66
47
  placeholder?: string;
67
48
  helpText?: string;
68
- /** When set, host resolves this field from process.env at runtime; env wins over stored values. */
69
49
  envVarName?: string;
70
- /**
71
- * When set, the dialog shows a copy action for this exact string (e.g. a static OAuth redirect URI
72
- * pattern or documentation URL). Do not use for secret values.
73
- */
74
50
  copyValue?: string;
75
- /** Accessible label for the copy control (default: Copy). */
76
51
  copyButtonLabel?: string;
77
52
  }>;
78
53
  type CredentialRequirement = Readonly<{
@@ -127,20 +102,9 @@ type CredentialOAuth2AuthDefinition = Readonly<{
127
102
  clientSecretFieldKey?: string;
128
103
  } | {
129
104
  kind: "oauth2";
130
- /**
131
- * Free-form provider identifier for telemetry, DB rows, and Better Auth provider naming.
132
- * Not used for any registry lookup — URLs come from {@link authorizeUrl} / {@link tokenUrl}.
133
- */
134
105
  providerId: string;
135
- /**
136
- * Authorization endpoint. May contain `{publicFieldKey}` placeholders that the runtime
137
- * substitutes from the credential's resolved public config (URL-encoded).
138
- * Example: `https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/authorize`
139
- */
140
106
  authorizeUrl: string;
141
- /** Token endpoint. Same templating rules as {@link authorizeUrl}. */
142
107
  tokenUrl: string;
143
- /** Optional userinfo endpoint. Same templating rules as {@link authorizeUrl}. */
144
108
  userInfoUrl?: string;
145
109
  scopes: ReadonlyArray<string>;
146
110
  scopesFromPublicConfig?: CredentialOAuth2ScopesFromPublicConfig;
@@ -149,11 +113,8 @@ type CredentialOAuth2AuthDefinition = Readonly<{
149
113
  }>;
150
114
  type CredentialAuthDefinition = CredentialOAuth2AuthDefinition;
151
115
  type CredentialAdvancedSectionPresentation = Readonly<{
152
- /** Collapsible section title (default: "Advanced"). */
153
116
  title?: string;
154
- /** Optional short helper text shown inside the section (above the fields). */
155
117
  description?: string;
156
- /** When true, the advanced section starts expanded. Default: false (collapsed). */
157
118
  defaultOpen?: boolean;
158
119
  }>;
159
120
  type CredentialTypeDefinition = Readonly<{
@@ -162,23 +123,11 @@ type CredentialTypeDefinition = Readonly<{
162
123
  description?: string;
163
124
  publicFields?: ReadonlyArray<CredentialFieldSchema>;
164
125
  secretFields?: ReadonlyArray<CredentialFieldSchema>;
165
- /**
166
- * Optional labels for the collapsible block that contains every field with `visibility: "advanced"`.
167
- * If omitted, the UI still shows that block with defaults (title "Advanced", collapsed).
168
- */
169
126
  advancedSection?: CredentialAdvancedSectionPresentation;
170
127
  supportedSourceKinds?: ReadonlyArray<CredentialMaterialSourceKind>;
171
128
  auth?: CredentialAuthDefinition;
172
129
  }>;
173
- /**
174
- * JSON-shaped credential field bag (public config, resolved secret material, etc.).
175
- */
176
130
  type CredentialJsonRecord = Readonly<Record<string, unknown>>;
177
- /**
178
- * Persisted credential instance with typed `publicConfig`.
179
- * Hosts may specialize `secretRef` with a stricter union while remaining
180
- * assignable here for session/test callbacks.
181
- */
182
131
  type CredentialInstanceRecord<TPublicConfig extends CredentialJsonRecord = CredentialJsonRecord> = Readonly<{
183
132
  instanceId: CredentialInstanceId;
184
133
  typeId: CredentialTypeId;
@@ -190,46 +139,30 @@ type CredentialInstanceRecord<TPublicConfig extends CredentialJsonRecord = Crede
190
139
  setupStatus: CredentialSetupStatus;
191
140
  createdAt: string;
192
141
  updatedAt: string;
193
- /**
194
- * Pointer to where the credential material bytes live. For OSS / standalone
195
- * rows this is `{source: "local", ref: instanceId}` and the bytes co-locate
196
- * with the row in the workspace DB. For managed-mode rows this is
197
- * `{source: "control-plane", ref: <cp_id>}` and the bytes live at CP.
198
- *
199
- * The seam is read through `CredentialMaterialProvider`. See
200
- * `docs/design/credentials-oauth-unification.md` ("Material provider seam").
201
- */
202
142
  material: Readonly<{
203
143
  source: "local" | "control-plane";
204
144
  ref: string;
205
145
  }>;
206
146
  }>;
207
- /**
208
- * Arguments passed to `CredentialType.createSession` and `CredentialType.test`.
209
- * Declare `TPublicConfig` / `TMaterial` on `CredentialType` so implementations are checked
210
- * against your credential shapes (similar to `NodeExecutionContext.config` for nodes).
211
- */
212
147
  type CredentialSessionFactoryArgs<TPublicConfig extends CredentialJsonRecord = CredentialJsonRecord, TMaterial extends CredentialJsonRecord = CredentialJsonRecord> = Readonly<{
213
148
  instance: CredentialInstanceRecord<TPublicConfig>;
214
149
  material: TMaterial;
215
150
  publicConfig: TPublicConfig;
216
151
  }>;
217
152
  type CredentialSessionFactory<TPublicConfig extends CredentialJsonRecord = CredentialJsonRecord, TMaterial extends CredentialJsonRecord = CredentialJsonRecord, TSession = unknown> = (args: CredentialSessionFactoryArgs<TPublicConfig, TMaterial>) => Promise<TSession>;
153
+ type CredentialAccessTokenSessionArgs<TPublicConfig extends CredentialJsonRecord = CredentialJsonRecord> = Readonly<{
154
+ accessToken: string;
155
+ grantedScopes: ReadonlyArray<string>;
156
+ publicConfig: TPublicConfig;
157
+ }>;
158
+ type CredentialAccessTokenSessionFactory<TPublicConfig extends CredentialJsonRecord = CredentialJsonRecord, TSession = unknown> = (args: CredentialAccessTokenSessionArgs<TPublicConfig>) => Promise<TSession>;
218
159
  type CredentialHealthTester<TPublicConfig extends CredentialJsonRecord = CredentialJsonRecord, TMaterial extends CredentialJsonRecord = CredentialJsonRecord> = (args: CredentialSessionFactoryArgs<TPublicConfig, TMaterial>) => Promise<CredentialHealth>;
219
- /**
220
- * Full credential type implementation: `definition` (UI/schema), `createSession`, and `test`.
221
- * Use this at registration and config boundaries; `CredentialTypeDefinition` is only the schema slice.
222
- */
223
160
  type CredentialType<TPublicConfig extends CredentialJsonRecord = CredentialJsonRecord, TMaterial extends CredentialJsonRecord = CredentialJsonRecord, TSession = unknown> = Readonly<{
224
161
  definition: CredentialTypeDefinition;
225
162
  createSession: CredentialSessionFactory<TPublicConfig, TMaterial, TSession>;
163
+ createSessionFromAccessToken?: CredentialAccessTokenSessionFactory<TPublicConfig, TSession>;
226
164
  test: CredentialHealthTester<TPublicConfig, TMaterial>;
227
165
  }>;
228
- /**
229
- * Credential type with unspecified generics — used for `CodemationConfig.credentialTypes`, the host registry,
230
- * and anywhere a concrete `CredentialType<YourPublic, YourMaterial, YourSession>` is placed in a heterogeneous list.
231
- * Using `any` here avoids unsafe `as` casts while keeping typed `satisfies CredentialType<…>` definitions.
232
- */
233
166
  type AnyCredentialType = CredentialType<any, any, unknown>;
234
167
  interface CredentialSessionService {
235
168
  getSession<TSession = unknown>(args: Readonly<{
@@ -250,38 +183,22 @@ declare class CredentialUnboundError extends Error {
250
183
  }
251
184
  //#endregion
252
185
  //#region src/contracts/collectionTypes.d.ts
253
- /**
254
- * Represents a typed store for a single collection.
255
- * All rows include auto-managed id, created_at, and updated_at fields.
256
- */
257
186
  interface CollectionStore<TRow extends Record<string, unknown> = Record<string, unknown>> {
258
- /**
259
- * Insert a new row. id, created_at, and updated_at are auto-populated.
260
- */
261
187
  insert(row: TRow): Promise<TRow & {
262
188
  id: string;
263
189
  created_at: Date;
264
190
  updated_at: Date;
265
191
  }>;
266
- /**
267
- * Get a single row by id.
268
- */
269
192
  get(id: string): Promise<(TRow & {
270
193
  id: string;
271
194
  created_at: Date;
272
195
  updated_at: Date;
273
196
  }) | null>;
274
- /**
275
- * Find a single row matching the provided filter.
276
- */
277
197
  findOne(filter: Partial<TRow>): Promise<(TRow & {
278
198
  id: string;
279
199
  created_at: Date;
280
200
  updated_at: Date;
281
201
  }) | null>;
282
- /**
283
- * List rows with optional pagination and filtering.
284
- */
285
202
  list(opts?: {
286
203
  limit?: number;
287
204
  offset?: number;
@@ -294,24 +211,15 @@ interface CollectionStore<TRow extends Record<string, unknown> = Record<string,
294
211
  }>;
295
212
  total: number;
296
213
  }>;
297
- /**
298
- * Update a row by id with partial data.
299
- */
300
214
  update(id: string, patch: Partial<TRow>): Promise<TRow & {
301
215
  id: string;
302
216
  created_at: Date;
303
217
  updated_at: Date;
304
218
  }>;
305
- /**
306
- * Delete a row by id. Hard delete only (no soft delete).
307
- */
308
219
  delete(id: string): Promise<{
309
220
  deleted: boolean;
310
221
  }>;
311
222
  }
312
- /**
313
- * Runtime collections context: keyed by collection name.
314
- */
315
223
  type CollectionsContext = Readonly<Record<string, CollectionStore>>;
316
224
  //#endregion
317
225
  //#region src/contracts/CostTrackingTelemetryContract.d.ts
@@ -364,7 +272,6 @@ declare class NoOpTelemetryArtifactReference {
364
272
  //#region src/contracts/NoOpTelemetrySpanScope.d.ts
365
273
  declare class NoOpTelemetrySpanScope {
366
274
  static readonly value: TelemetrySpanScope;
367
- /** Internal: the shared no-op {@link NodeExecutionTelemetry} that {@link NoOpNodeExecutionTelemetry} re-exposes. */
368
275
  static readonly nodeExecutionTelemetryValue: NodeExecutionTelemetry;
369
276
  }
370
277
  //#endregion
@@ -400,25 +307,15 @@ declare class CodemationTelemetryAttributeNames {
400
307
  static readonly connectionInvocationId = "codemation.connection.invocation_id";
401
308
  static readonly toolName = "codemation.tool.name";
402
309
  static readonly traceParentRunId = "codemation.parent.run.id";
403
- /** Per-item iteration that emitted this span/metric. Set on spans recorded inside a runnable per-item loop. */
404
310
  static readonly iterationId = "codemation.iteration.id";
405
- /** Item index (0-based) of the iteration. */
406
311
  static readonly iterationIndex = "codemation.iteration.index";
407
- /** Set when this span/metric was recorded under a sub-agent triggered by an outer LLM/tool call. */
408
312
  static readonly parentInvocationId = "codemation.parent.invocation_id";
409
- /** MCP server id on spans created for callTool invocations. */
410
313
  static readonly mcpServerId = "mcp.server_id";
411
- /** MCP tool name on spans created for callTool invocations. */
412
314
  static readonly mcpToolName = "mcp.tool_name";
413
- /** Terminal node-execution status (e.g. `"hitl-approved"`, `"hitl-rejected"`) on HITL outcome spans. */
414
315
  static readonly nodeExecutionStatus = "codemation.node.execution_status";
415
- /** Populated on run-halted spans; discriminates the halt reason (e.g. `"hitl-rejected"`). */
416
316
  static readonly runHaltReason = "codemation.run.halt_reason";
417
- /** Human task ID on `hitl.task.*` span events. */
418
317
  static readonly hitlTaskId = "codemation.hitl.task_id";
419
- /** HITL channel name (e.g. `"inbox"`, `"control-plane-inbox"`) on `hitl.task.*` span events. */
420
318
  static readonly hitlChannel = "codemation.hitl.channel";
421
- /** Decision outcome (e.g. `"approved"`, `"rejected"`) on `hitl.task.decided` span events. */
422
319
  static readonly hitlDecisionStatus = "codemation.hitl.decision_status";
423
320
  }
424
321
  //#endregion
@@ -499,13 +396,6 @@ interface TelemetrySpanScope extends TelemetryScope {
499
396
  readonly traceId: string;
500
397
  readonly spanId: string;
501
398
  end(args?: TelemetrySpanEnd): Promise<void> | void;
502
- /**
503
- * Lift this span into a {@link NodeExecutionTelemetry} scoped to a different (nodeId, activationId).
504
- * Children created via the returned telemetry's `startChildSpan` get this span as their parent.
505
- *
506
- * Used at the sub-agent boundary so that nested runtime telemetry parents under the agent.tool.call
507
- * span instead of the orchestrator's node-level span.
508
- */
509
399
  asNodeTelemetry(args: Readonly<{
510
400
  nodeId: NodeId;
511
401
  activationId: NodeActivationId;
@@ -532,14 +422,9 @@ interface ExecutionTelemetryFactory {
532
422
  }
533
423
  //#endregion
534
424
  //#region src/contracts/workflowActivationPolicy.d.ts
535
- /**
536
- * Host-controlled policy: when false, trigger {@link TriggerNode} setup is skipped and webhook routes
537
- * for that workflow are not registered (see engine trigger runtime + webhook matcher).
538
- */
539
425
  interface WorkflowActivationPolicy {
540
426
  isActive(workflowId: WorkflowId): boolean;
541
427
  }
542
- /** Default for tests and harnesses: every workflow is treated as active (legacy behavior). */
543
428
  declare class AllWorkflowsActiveWorkflowActivationPolicy implements WorkflowActivationPolicy {
544
429
  isActive(_workflowId: WorkflowId): boolean;
545
430
  }
@@ -554,23 +439,19 @@ interface WebhookControlSignal {
554
439
  }
555
440
  interface WebhookTriggerRoutingDiagnostics {
556
441
  warn(message: string): void;
557
- /** Inactive workflows omitted from the webhook route index (optional; host should wire for clarity at boot/reload). */
558
442
  info?(message: string): void;
559
443
  }
560
444
  interface TriggerInstanceId {
561
445
  workflowId: WorkflowId;
562
446
  nodeId: NodeId;
563
447
  }
564
- /** Match for an incoming HTTP request: user-defined URL segment + workflow trigger node. */
565
448
  interface WebhookInvocationMatch {
566
- /** Same value as the webhook trigger's configured endpoint key (URL segment under the webhook base path). */
567
449
  endpointPath: string;
568
450
  workflowId: WorkflowId;
569
451
  nodeId: NodeId;
570
452
  methods: ReadonlyArray<HttpMethod>;
571
453
  parseJsonBody?: (body: unknown) => unknown;
572
454
  }
573
- /** Result of resolving an HTTP method + endpoint path against the catalog webhook index (404 vs 405 vs match). */
574
455
  type WebhookTriggerResolution = {
575
456
  status: "notFound";
576
457
  } | {
@@ -580,9 +461,6 @@ type WebhookTriggerResolution = {
580
461
  status: "ok";
581
462
  match: WebhookInvocationMatch;
582
463
  };
583
- /**
584
- * Resolves webhook routes from workflow definitions (catalog-backed index, no registration at trigger setup).
585
- */
586
464
  interface WebhookTriggerMatcher {
587
465
  match(args: {
588
466
  endpointPath: string;
@@ -591,52 +469,29 @@ interface WebhookTriggerMatcher {
591
469
  lookup(endpointPath: string): WebhookInvocationMatch | undefined;
592
470
  onEngineWorkflowsLoaded?(): void;
593
471
  onEngineStopped?(): void;
594
- /** Rebuild route index after activation changes without stopping the engine. */
595
472
  reloadWebhookRoutes?(): void;
596
473
  }
597
474
  //#endregion
598
475
  //#region src/contracts/runtimeTypes.d.ts
599
- /** Opaque unique identifier for a single HumanTask instance. */
600
476
  type HumanTaskId = string;
601
- /**
602
- * Duration string — ISO 8601 duration ("PT24H") or shorthand ("24h").
603
- * Parsed by the timeout job; stored as-is in the suspension record.
604
- */
605
477
  type Duration = string;
606
- /**
607
- * Minimal handle handed to the `deliver` callback so it can route to the correct
608
- * inbox channel.
609
- */
610
478
  interface HumanTaskHandle {
611
479
  readonly taskId: HumanTaskId;
612
480
  readonly runId: string;
613
481
  readonly nodeId: string;
614
482
  readonly expiresAt: Date;
615
- /** TODO: real signed URL; placeholder empty string for now. */
616
483
  readonly resumeUrl: string;
617
- /**
618
- * Arbitrary JSON metadata copied from `SuspensionRequest.request.metadata` at suspension time.
619
- * Used by the agent runtime to round-trip the `agentCheckpoint` back to the
620
- * resumed node via `ctx.resumeContext.task.metadata`.
621
- */
622
484
  readonly metadata?: Readonly<Record<string, JsonValue>>;
623
485
  }
624
- /** Human-readable description surface shown to the reviewer. */
625
486
  interface HumanTaskSubject {
626
487
  readonly title: string;
627
488
  readonly summary: string;
628
489
  readonly attributes?: JsonValue;
629
490
  }
630
- /** Identity of the person who made a decision on the task. */
631
491
  interface HumanTaskActor {
632
492
  readonly actorId: string;
633
493
  readonly displayName?: string;
634
494
  }
635
- /**
636
- * Resume context injected into `NodeExecutionContext` when the engine re-activates
637
- * a previously suspended node. `defineHumanApprovalNode` wraps this with parsed
638
- * `TDecision`; at the engine layer `decision.value` is `unknown`.
639
- */
640
495
  interface ResumeContext {
641
496
  readonly decision: Readonly<{
642
497
  kind: "decided";
@@ -653,25 +508,6 @@ interface ResumeContext {
653
508
  readonly delivery: JsonValue;
654
509
  readonly task: HumanTaskHandle;
655
510
  }
656
- /**
657
- * Thrown by a node's `execute()` to request durable suspension of the current item.
658
- * The engine catches this, persists the suspension entry, calls `deliver`, and
659
- * continues to the next item (per-item semantics).
660
- *
661
- * @example
662
- * ```ts
663
- * throw new SuspensionRequest({
664
- * decisionSchema: z.object({ approved: z.boolean() }),
665
- * timeout: "PT24H",
666
- * onTimeout: "halt",
667
- * subject: { title: "Approve invoice", summary: "Invoice #1234 needs approval" },
668
- * deliver: async (handle) => {
669
- * await notifySlack(handle);
670
- * return { channel: "slack", ts: "..." };
671
- * },
672
- * });
673
- * ```
674
- */
675
511
  declare class SuspensionRequest<TDecision = unknown, TDelivery extends JsonValue = JsonValue> extends Error {
676
512
  readonly request: Readonly<{
677
513
  decisionSchema: ZodType<TDecision>;
@@ -735,11 +571,6 @@ interface NodeExecutionStatePublisher {
735
571
  error: Error;
736
572
  }): Promise<void>;
737
573
  appendConnectionInvocation(args: ConnectionInvocationAppendArgs): Promise<void>;
738
- /**
739
- * Annotates the current snapshot for `nodeId` with the id of the child run spawned by a
740
- * SubWorkflow invocation. Called from `SubWorkflowNode.execute` after `runById` resolves.
741
- * The engine's subsequent `markCompleted` call preserves the value via `previous.childRunId`.
742
- */
743
574
  setChildRunId?(args: {
744
575
  nodeId: NodeId;
745
576
  childRunId: RunId;
@@ -769,9 +600,7 @@ interface BinaryStorage {
769
600
  openReadStream(storageKey: string): Promise<BinaryStorageReadResult | undefined>;
770
601
  stat(storageKey: string): Promise<BinaryStorageStatResult>;
771
602
  delete(storageKey: string): Promise<void>;
772
- /** Deletes multiple objects in bulk. Keys are batched internally. */
773
603
  deleteMany(storageKeys: ReadonlyArray<string>): Promise<void>;
774
- /** Lists all keys sharing a common prefix. Returns keys in arbitrary order. */
775
604
  listByPrefix(prefix: string): Promise<ReadonlyArray<string>>;
776
605
  }
777
606
  interface BinaryAttachmentCreateRequest {
@@ -785,7 +614,6 @@ interface NodeBinaryAttachmentService extends ExecutionBinaryService {
785
614
  attach(args: BinaryAttachmentCreateRequest): Promise<BinaryAttachment>;
786
615
  withAttachment<TJson>(item: Item<TJson>, name: string, attachment: BinaryAttachment): Item<TJson>;
787
616
  }
788
- /** Default maximum bytes read into memory by the bounded helpers (50 MiB). */
789
617
  declare const BINARY_DEFAULT_MAX_BYTES: number;
790
618
  interface ExecutionBinaryService {
791
619
  forNode(args: {
@@ -793,32 +621,16 @@ interface ExecutionBinaryService {
793
621
  activationId: NodeActivationId;
794
622
  }): NodeBinaryAttachmentService;
795
623
  openReadStream(attachment: BinaryAttachment): Promise<BinaryStorageReadResult | undefined>;
796
- /**
797
- * Reads all bytes from the attachment into a contiguous `Uint8Array`.
798
- * Checks `attachment.size` against `maxBytes` *before* any allocation; throws a bounded-read
799
- * error when exceeded (no OOM). Throws if the stream is unavailable or the byte count mismatches.
800
- */
801
624
  getBytes(attachment: BinaryAttachment, maxBytes?: number): Promise<Uint8Array>;
802
- /**
803
- * Reads the attachment and decodes the bytes as UTF-8 text.
804
- * Subject to the same bounded-read safety as `getBytes`.
805
- */
806
625
  getText(attachment: BinaryAttachment, maxBytes?: number): Promise<string>;
807
- /**
808
- * Reads the attachment, decodes as UTF-8 text, and parses as JSON.
809
- * Throws a clear error on invalid JSON. Subject to the same bounded-read safety.
810
- */
811
626
  getJson<T = unknown>(attachment: BinaryAttachment, maxBytes?: number): Promise<T>;
812
627
  }
813
628
  interface ExecutionContext {
814
629
  runId: RunId;
815
630
  workflowId: WorkflowId;
816
631
  parent?: ParentExecutionRef;
817
- /** This run's subworkflow depth (0 = root). */
818
632
  subworkflowDepth: number;
819
- /** Effective activation budget cap for this run (after policy merge). */
820
633
  engineMaxNodeActivations: number;
821
- /** Effective subworkflow nesting cap for this run (after policy merge). */
822
634
  engineMaxSubworkflowDepth: number;
823
635
  now: () => Date;
824
636
  data: RunDataSnapshot;
@@ -826,28 +638,11 @@ interface ExecutionContext {
826
638
  telemetry: ExecutionTelemetry;
827
639
  binary: ExecutionBinaryService;
828
640
  getCredential<TSession = unknown>(slotKey: string): Promise<TSession>;
829
- /** Per-item iteration id, set by {@link NodeExecutor} on the ctx passed into runnable `execute`. */
830
641
  iterationId?: NodeIterationId;
831
- /** Item index (0-based) within the current activation's batch; set alongside {@link iterationId}. */
832
642
  itemIndex?: number;
833
- /** When set, this ctx is executing inside a sub-agent triggered by the named parent invocation. */
834
643
  parentInvocationId?: ConnectionInvocationId;
835
- /**
836
- * Present iff the run was started by a TestSuiteOrchestrator. The {@link IsTestRunNode}
837
- * branches on this; assertion-emitting nodes use it to decide whether to record results.
838
- */
839
644
  testContext?: RunTestContext;
840
- /**
841
- * Collections registered in the codemation config, keyed by collection name.
842
- */
843
645
  readonly collections?: CollectionsContext;
844
- /**
845
- * Resolve a DI token from the host container.
846
- * Allows nodes to reach host-side services (e.g. `InboxChannelResolverToken`)
847
- * without importing host code. Wired by `DefaultExecutionContextFactory`; throws
848
- * a clear error when no resolver is configured (e.g. in unit tests that don't
849
- * set up the full container).
850
- */
851
646
  resolve<T>(token: TypeToken<T>): T;
852
647
  }
853
648
  interface ExecutionContextFactory {
@@ -872,18 +667,9 @@ interface NodeExecutionContext<TConfig extends NodeConfigBase = NodeConfigBase>
872
667
  config: TConfig;
873
668
  telemetry: NodeExecutionTelemetry;
874
669
  binary: NodeBinaryAttachmentService;
875
- /**
876
- * Present when this node activation is a HITL resume.
877
- * The node checks `ctx.resumeContext !== undefined` and takes the resume branch.
878
- */
879
670
  resumeContext?: ResumeContext;
880
671
  }
881
- interface PollingTriggerHandle {
882
- /**
883
- * Start the polling loop. The runtime registers its own cleanup handle so callers do not need to
884
- * call {@link TriggerSetupContext.registerCleanup} for the loop.
885
- * @returns The state returned by the first cycle (or `undefined` when the overlap guard fired).
886
- */
672
+ interface TriggerPollingPort {
887
673
  start<TState, TItem>(args: {
888
674
  intervalMs: number;
889
675
  seedState?: TState;
@@ -895,7 +681,8 @@ interface PollingTriggerHandle {
895
681
  nextState: TState;
896
682
  }>;
897
683
  }): Promise<TState | undefined>;
898
- /** Convenience dedup-window helper. */
684
+ }
685
+ interface PollingTriggerHandle extends TriggerPollingPort {
899
686
  readonly dedup: PollingTriggerDedupWindow;
900
687
  }
901
688
  interface TriggerSetupContext<TConfig extends TriggerNodeConfig<any, any> = TriggerNodeConfig<any, any>, TSetupState$1 extends JsonValue | undefined = TriggerNodeSetupState<TConfig>> extends ExecutionContext {
@@ -904,7 +691,6 @@ interface TriggerSetupContext<TConfig extends TriggerNodeConfig<any, any> = Trig
904
691
  previousState: TSetupState$1;
905
692
  registerCleanup(cleanup: TriggerCleanupHandle): void;
906
693
  emit(items: Items): Promise<void>;
907
- /** Generic polling-trigger surface. Pre-binds trigger id, emit, and registerCleanup. */
908
694
  readonly polling: PollingTriggerHandle;
909
695
  }
910
696
  interface TriggerTestItemsContext<TConfig extends TriggerNodeConfig<any, any> = TriggerNodeConfig<any, any>, TSetupState$1 extends JsonValue | undefined = TriggerNodeSetupState<TConfig>> extends ExecutionContext {
@@ -913,11 +699,6 @@ interface TriggerTestItemsContext<TConfig extends TriggerNodeConfig<any, any> =
913
699
  config: TConfig;
914
700
  previousState: TSetupState$1;
915
701
  }
916
- /**
917
- * Trigger setup state is intentionally engine-owned so future ownership and
918
- * leader-election metadata can be coordinated centrally rather than pushed into
919
- * package-level setup code.
920
- */
921
702
  interface PersistedTriggerSetupState<TState extends JsonValue | undefined = JsonValue | undefined> {
922
703
  trigger: TriggerInstanceId;
923
704
  updatedAt: string;
@@ -935,12 +716,6 @@ interface EngineHost {
935
716
  credentialSessions: CredentialSessionService;
936
717
  workflows?: WorkflowRunnerService;
937
718
  }
938
- /**
939
- * Per-item runnable node: return JSON, an array to fan-out on `main`, an explicit `Item`, or {@link emitPorts}
940
- * for multi-port emission. Engine applies `inputSchema.parse(item.json)` and passes the result as `args.input`
941
- * (wire `item.json` is unchanged). Transform helpers may opt into binary preservation, while routers and
942
- * pass-through nodes should return explicit items when they need to preserve full item state.
943
- */
944
719
  interface RunnableNodeExecuteArgs<TConfig extends RunnableNodeConfig<any, any> = RunnableNodeConfig<any, any>, TInputJson$1 = unknown> {
945
720
  readonly input: TInputJson$1;
946
721
  readonly item: Item;
@@ -950,27 +725,13 @@ interface RunnableNodeExecuteArgs<TConfig extends RunnableNodeConfig<any, any> =
950
725
  }
951
726
  interface RunnableNode<TConfig extends RunnableNodeConfig<any, any> = RunnableNodeConfig<any, any>, TInputJson$1 = unknown, _TOutputJson = unknown> {
952
727
  readonly kind: "node";
953
- /**
954
- * Declared output ports (e.g. `["main"]`).
955
- *
956
- * Prefer describing dynamic router ports (Switch) and fixed multi-ports (If true/false)
957
- * via {@link NodeConfigBase.declaredOutputPorts}. Engine defaults to `["main"]` when omitted.
958
- */
959
728
  readonly outputPorts?: ReadonlyArray<OutputPortKey>;
960
- /** When omitted, engine uses {@link RunnableNodeConfig.inputSchema} or `z.unknown()`. */
961
729
  readonly inputSchema?: ZodType<TInputJson$1>;
962
730
  execute(args: RunnableNodeExecuteArgs<TConfig, TInputJson$1>): Promise<unknown> | unknown;
963
731
  }
964
- /** @deprecated Use {@link RunnableNode} */
965
732
  type ItemNode<TConfig extends RunnableNodeConfig<any, any> = RunnableNodeConfig<any, any>, TInputJson$1 = unknown, TOutputJson$1 = unknown> = RunnableNode<TConfig, TInputJson$1, TOutputJson$1>;
966
733
  interface MultiInputNode<TConfig extends NodeConfigBase = NodeConfigBase> {
967
734
  kind: "node";
968
- /**
969
- * Declared output ports (typically `["main"]`).
970
- *
971
- * Prefer describing ports for authoring/canvas via {@link NodeConfigBase.declaredOutputPorts}.
972
- * Engine defaults to `["main"]` when omitted.
973
- */
974
735
  outputPorts?: ReadonlyArray<OutputPortKey>;
975
736
  executeMulti(inputsByPort: NodeInputsByPort, ctx: NodeExecutionContext<TConfig>): Promise<NodeOutputs>;
976
737
  }
@@ -1071,7 +832,6 @@ interface WorkflowSnapshotResolver {
1071
832
  workflowSnapshot?: PersistedWorkflowSnapshot;
1072
833
  }): WorkflowDefinition | undefined;
1073
834
  }
1074
- /** Optional host wiring for trigger lifecycle logs (boot skip + activation sync). */
1075
835
  interface TriggerRuntimeDiagnostics {
1076
836
  info(message: string): void;
1077
837
  warn(message: string): void;
@@ -1080,7 +840,6 @@ interface EngineDeps {
1080
840
  credentialSessions: CredentialSessionService;
1081
841
  liveWorkflowRepository: LiveWorkflowRepository;
1082
842
  workflowRepository: WorkflowRepository;
1083
- /** When {@link AllWorkflowsActiveWorkflowActivationPolicy}, all workflows behave as active (tests). */
1084
843
  workflowActivationPolicy: WorkflowActivationPolicy;
1085
844
  nodeResolver: NodeResolver;
1086
845
  triggerSetupStateRepository: TriggerSetupStateRepository;
@@ -1096,39 +855,27 @@ interface EngineDeps {
1096
855
  eventBus?: RunEventBus;
1097
856
  tokenRegistry: PersistedWorkflowTokenRegistryLike;
1098
857
  workflowNodeInstanceFactory: WorkflowNodeInstanceFactory;
1099
- /** Defaults for prune/storage snapshot when workflow omits explicit policy fields. */
1100
858
  workflowPolicyRuntimeDefaults?: WorkflowPolicyRuntimeDefaults;
1101
- /** When set, logs inactive-workflow skips at boot and trigger start/stop on activation changes. */
1102
859
  triggerRuntimeDiagnostics?: TriggerRuntimeDiagnostics;
1103
- /** When set, the polling-trigger runtime uses this logger for cycle info/debug/error. */
1104
860
  pollingTriggerLogger?: PollingTriggerLogger;
1105
861
  }
1106
862
  //#endregion
1107
863
  //#region src/contracts/retryPolicySpec.types.d.ts
1108
- /**
1109
- * In-process retry policy for runnable nodes. Serialized configs use the same
1110
- * `kind` discriminator (`JSON.stringify` / persisted workflows).
1111
- *
1112
- * `maxAttempts` is the total number of tries including the first (e.g. 3 means up to 2 delays after failures).
1113
- */
1114
864
  type RetryPolicySpec = NoneRetryPolicySpec | FixedRetryPolicySpec | ExponentialRetryPolicySpec;
1115
865
  interface NoneRetryPolicySpec {
1116
866
  readonly kind: "none";
1117
867
  }
1118
868
  interface FixedRetryPolicySpec {
1119
869
  readonly kind: "fixed";
1120
- /** Total attempts including the first execution. Must be >= 1. */
1121
870
  readonly maxAttempts: number;
1122
871
  readonly delayMs: number;
1123
872
  }
1124
873
  interface ExponentialRetryPolicySpec {
1125
874
  readonly kind: "exponential";
1126
- /** Total attempts including the first execution. Must be >= 1. */
1127
875
  readonly maxAttempts: number;
1128
876
  readonly initialDelayMs: number;
1129
877
  readonly multiplier: number;
1130
878
  readonly maxDelayMs?: number;
1131
- /** When true, each delay is multiplied by a random factor in [1, 1.2). */
1132
879
  readonly jitter?: boolean;
1133
880
  }
1134
881
  //#endregion
@@ -1143,7 +890,6 @@ interface JsonObject {
1143
890
  }
1144
891
  type JsonValue = JsonPrimitive | JsonObject | JsonArray;
1145
892
  type JsonArray = ReadonlyArray<JsonValue>;
1146
- /** JSON value that is not a top-level array (nested arrays inside objects are allowed). */
1147
893
  type JsonNonArray = JsonPrimitive | JsonObject;
1148
894
  interface Edge {
1149
895
  from: {
@@ -1155,11 +901,6 @@ interface Edge {
1155
901
  input: InputPortKey;
1156
902
  };
1157
903
  }
1158
- /**
1159
- * Named connection from a parent node to child nodes that exist in {@link WorkflowDefinition.nodes}
1160
- * but are not traversed by the main execution graph. Parents are commonly executable nodes, but may
1161
- * also be connection-owned nodes for recursive agent attachments.
1162
- */
1163
904
  interface WorkflowNodeConnection {
1164
905
  readonly parentNodeId: NodeId;
1165
906
  readonly connectionName: NodeConnectionName;
@@ -1170,18 +911,10 @@ interface WorkflowDefinition {
1170
911
  name: string;
1171
912
  nodes: NodeDefinition[];
1172
913
  edges: Edge[];
1173
- /**
1174
- * Optional metadata: which nodes are connection-owned children (e.g. AI agent `llm` / `tools` slots).
1175
- * When omitted, all nodes in {@link nodes} are treated as executable for topology.
1176
- */
1177
914
  readonly connections?: ReadonlyArray<WorkflowNodeConnection>;
1178
- /** Directory + file-stem path under a workflow discovery root (for UI grouping only). */
1179
915
  discoveryPathSegments?: readonly string[];
1180
- /** Retention for run JSON and binaries (seconds). Host/env may supply defaults when omitted. */
1181
916
  readonly prunePolicy?: WorkflowPrunePolicySpec;
1182
- /** Whether to keep run data after completion. Host/env may supply defaults when omitted. */
1183
917
  readonly storagePolicy?: WorkflowStoragePolicySpec;
1184
- /** Invoked after a node fails permanently (retries exhausted) and node error handler did not recover. */
1185
918
  readonly workflowErrorHandler?: WorkflowErrorHandlerSpec;
1186
919
  }
1187
920
  interface WorkflowGraph {
@@ -1199,59 +932,26 @@ interface NodeConfigBase {
1199
932
  readonly name?: string;
1200
933
  readonly id?: NodeId;
1201
934
  readonly icon?: string;
1202
- /**
1203
- * Plain-language, non-technical explanation of what this node does, surfaced in the workflow
1204
- * inspector / node properties sidebar. A first-class config option every authorable node accepts
1205
- * directly (alongside `id`), so it flows into the persisted config the mappers read. Distinct from
1206
- * {@link inspectorSummary} (config-derived label/value rows).
1207
- */
1208
935
  readonly description?: string;
1209
936
  readonly execution?: Readonly<{
1210
937
  hint?: "local" | "worker";
1211
938
  queue?: string;
1212
939
  }>;
1213
- /** In-process execute retries (runnable nodes). Triggers typically omit this. */
1214
940
  readonly retryPolicy?: RetryPolicySpec;
1215
- /** Recover from execute failures; return outputs to continue, or rethrow to fail the node. */
1216
941
  readonly nodeErrorHandler?: NodeErrorHandlerSpec;
1217
- /**
1218
- * When true, edges carrying zero items on an output port still schedule single-input downstream nodes.
1219
- * Decided from the **source** node that produced the (empty) output. Default (false/undefined): empty
1220
- * main batches skip downstream execution and propagate the empty path.
1221
- */
1222
942
  readonly continueWhenEmptyOutput?: boolean;
1223
- /**
1224
- * Declared I/O port names for canvas authoring (unioned with ports inferred from edges).
1225
- * Use for dynamic routers (Switch) and future error ports.
1226
- */
1227
943
  readonly declaredOutputPorts?: ReadonlyArray<OutputPortKey>;
1228
944
  readonly declaredInputPorts?: ReadonlyArray<InputPortKey>;
1229
945
  getCredentialRequirements?(): ReadonlyArray<CredentialRequirement>;
1230
- /**
1231
- * Marker: this node emits {@link import("./assertionTypes").AssertionResult}-shaped items on its
1232
- * `main` port. The TestSuiteOrchestrator (and host-side TestAssertionPersister) listen for
1233
- * `nodeCompleted` events from nodes with this flag set, and persist their output items as
1234
- * TestAssertion records (only when the run carries a `testContext`). Set on assertion node
1235
- * configs (e.g. `AssertionNodeConfig`, `StringEqualsAssertionNodeConfig`).
1236
- */
1237
946
  readonly emitsAssertions?: true;
1238
- /**
1239
- * Static configuration summary surfaced in the workflow inspector — the design-time
1240
- * "what does this node do" panel that renders before any run telemetry exists.
1241
- *
1242
- * Return 2–6 short label/value pairs derived from this config (method + url for an HTTP
1243
- * call, model + tool list for an agent, schedule + timezone for a cron trigger, etc.).
1244
- * Values are truncated by the UI; aim for one line each. Return `undefined` to opt out
1245
- * — the inspector hides the section when no rows are produced.
1246
- *
1247
- * Implement on the config class instance so the function can read sibling config fields.
1248
- * `defineNode({ inspectorSummary })` plumbs through to this.
1249
- */
1250
947
  inspectorSummary?(): ReadonlyArray<NodeInspectorSummaryRow> | undefined;
1251
948
  }
1252
- /**
1253
- * One row of a node's static configuration summary. See {@link NodeConfigBase.inspectorSummary}.
1254
- */
949
+ interface PollingTriggerConfig {
950
+ getTriggerPollConfig(): Readonly<{
951
+ config: JsonObject;
952
+ pollIntervalMs?: number;
953
+ }>;
954
+ }
1255
955
  interface NodeInspectorSummaryRow {
1256
956
  readonly label: string;
1257
957
  readonly value: string;
@@ -1259,24 +959,11 @@ interface NodeInspectorSummaryRow {
1259
959
  declare const runnableNodeInputType: unique symbol;
1260
960
  declare const runnableNodeOutputType: unique symbol;
1261
961
  declare const triggerNodeOutputType: unique symbol;
1262
- /**
1263
- * Runnable node: **`TInputJson`** is what **`inputSchema`** validates on **`item.json`** (the wire payload).
1264
- * **`TOutputJson`** is emitted `item.json` on outputs.
1265
- */
1266
962
  interface RunnableNodeConfig<TInputJson$1 = unknown, TOutputJson$1 = unknown> extends NodeConfigBase {
1267
963
  readonly kind: "node";
1268
964
  readonly [runnableNodeInputType]?: TInputJson$1;
1269
965
  readonly [runnableNodeOutputType]?: TOutputJson$1;
1270
- /**
1271
- * Optional Zod input contract for {@link RunnableNode} when not set on the node class.
1272
- * Resolution order: node instance `inputSchema`, then config `inputSchema`, then `z.unknown()`.
1273
- */
1274
966
  readonly inputSchema?: ZodType<TInputJson$1>;
1275
- /**
1276
- * When an activation receives **zero** input items, the engine normally runs `execute` zero times.
1277
- * Set to **`runOnce`** to run `execute` once with an empty `items` batch (and a synthetic wire item for schema parsing).
1278
- * Used by batch-style callback nodes (built-in `Callback`) so `callback([], ctx)` still runs.
1279
- */
1280
967
  readonly emptyBatchExecution?: "skip" | "runOnce";
1281
968
  }
1282
969
  declare const triggerNodeSetupStateType: unique symbol;
@@ -1284,11 +971,6 @@ interface TriggerNodeConfig<TOutputJson$1 = unknown, TSetupState$1 extends JsonV
1284
971
  readonly kind: "trigger";
1285
972
  readonly [triggerNodeOutputType]?: TOutputJson$1;
1286
973
  readonly [triggerNodeSetupStateType]?: TSetupState$1;
1287
- /**
1288
- * Distinguishes triggers driven by the live activation policy (webhooks, cron, polling) from
1289
- * triggers driven only by the {@link TestSuiteOrchestrator}. `WorkflowActivation` skips
1290
- * `"test"` triggers; the orchestrator skips `"live"` triggers. Defaults to `"live"` when omitted.
1291
- */
1292
974
  readonly triggerKind?: "live" | "test";
1293
975
  }
1294
976
  type RunnableNodeInputJson<TConfig extends RunnableNodeConfig<any, any>> = TConfig extends RunnableNodeConfig<infer TInputJson, any> ? TInputJson : never;
@@ -1340,27 +1022,14 @@ type Items<TJson = unknown> = ReadonlyArray<Item<TJson>>;
1340
1022
  type NodeOutputs = Partial<Record<OutputPortKey, Items>>;
1341
1023
  type RunId = string;
1342
1024
  type NodeActivationId = string;
1343
- /**
1344
- * One per-item iteration of a runnable node's execute loop. Refines `NodeActivationId` for
1345
- * per-item connection invocations and telemetry. Undefined when the executing node is a batch
1346
- * node or trigger that does not iterate items.
1347
- */
1348
1025
  type NodeIterationId = string;
1349
1026
  interface ParentExecutionRef {
1350
1027
  runId: RunId;
1351
1028
  workflowId: WorkflowId;
1352
1029
  nodeId: NodeId;
1353
- /** Subworkflow depth of the **spawning** run (0 = root). Passed when starting a child run. */
1354
1030
  subworkflowDepth?: number;
1355
- /** Effective max node activations from the parent run (propagated to child policy merge). */
1356
1031
  engineMaxNodeActivations?: number;
1357
- /** Effective max subworkflow depth from the parent run (propagated to child policy merge). */
1358
1032
  engineMaxSubworkflowDepth?: number;
1359
- /**
1360
- * Test-suite linkage inherited by the child subworkflow run. Set by whichever node
1361
- * spawns the subworkflow when its own `ctx.testContext` is present, so assertions
1362
- * emitted inside a subworkflow land under the correct parent test case.
1363
- */
1364
1033
  testContext?: RunTestContext;
1365
1034
  }
1366
1035
  interface RunDataSnapshot {
@@ -1395,7 +1064,6 @@ interface NodeOffloadPolicy {
1395
1064
  config: NodeConfigBase;
1396
1065
  }): NodeSchedulerDecision;
1397
1066
  }
1398
- /** Whether to persist run execution data after the workflow finishes. */
1399
1067
  type WorkflowStoragePolicyMode = "ALL" | "SUCCESS" | "ERROR" | "NEVER";
1400
1068
  type WorkflowStoragePolicySpec = WorkflowStoragePolicyMode | TypeToken<WorkflowStoragePolicyResolver>;
1401
1069
  interface WorkflowStoragePolicyResolver {
@@ -1448,7 +1116,6 @@ interface NodeErrorHandler {
1448
1116
  handle<TConfig extends NodeConfigBase>(args: NodeErrorHandlerArgs<TConfig>): Promise<NodeOutputs>;
1449
1117
  }
1450
1118
  type NodeErrorHandlerSpec = TypeToken<NodeErrorHandler> | NodeErrorHandler;
1451
- /** Runtime defaults when workflow omits prune/storage fields (typically from host env). */
1452
1119
  interface WorkflowPolicyRuntimeDefaults {
1453
1120
  readonly retentionSeconds?: number;
1454
1121
  readonly binaryRetentionSeconds?: number;
@@ -1459,76 +1126,25 @@ interface WorkflowPolicyRuntimeDefaults {
1459
1126
  }
1460
1127
  //#endregion
1461
1128
  //#region src/contracts/testTriggerTypes.d.ts
1462
- /**
1463
- * Identifier minted by the host (or in-memory test runner) for one execution of a test suite.
1464
- * One TestSuiteRun produces N child workflow runs, one per item yielded by `generateItems`.
1465
- */
1466
1129
  type TestSuiteRunId = string;
1467
- /**
1468
- * Setup context passed to a {@link TestTriggerNodeConfig.generateItems} callback. Distinct from
1469
- * {@link import("./runtimeTypes").TriggerSetupContext} on purpose: test triggers are not
1470
- * activated by the live trigger lifecycle (webhooks, cron, polling) and never call `emit` —
1471
- * the orchestrator pulls from the iterable they return and dispatches one run per item.
1472
- */
1473
1130
  interface TestTriggerSetupContext<TConfig extends TestTriggerNodeConfig<unknown> = TestTriggerNodeConfig<unknown>> {
1474
1131
  readonly workflowId: WorkflowId;
1475
1132
  readonly nodeId: NodeId;
1476
1133
  readonly config: TConfig;
1477
1134
  readonly testSuiteRunId: TestSuiteRunId;
1478
- /**
1479
- * Resolves a credential session for a slot declared on this trigger's
1480
- * {@link import("./workflowTypes").NodeConfigBase.getCredentialRequirements}. Same contract as
1481
- * {@link import("./runtimeTypes").ExecutionContext.getCredential}.
1482
- */
1483
1135
  getCredential<TSession = unknown>(slotKey: string): Promise<TSession>;
1484
- /** AbortSignal raised when the suite is cancelled — long-running pulls should bail out. */
1485
1136
  readonly signal: AbortSignal;
1486
1137
  }
1487
- /**
1488
- * A trigger config that emits **test cases**. Each item yielded by {@link generateItems}
1489
- * becomes one workflow run (with `executionOptions.testContext` set), so 10 yielded items
1490
- * → 10 runs marked under the same TestSuiteRun.
1491
- *
1492
- * The trigger is otherwise a normal {@link TriggerNodeConfig} (so the canvas treats it like
1493
- * any other trigger), but its `triggerKind` is `"test"` so the live activation policy skips it.
1494
- */
1495
1138
  interface TestTriggerNodeConfig<TOutputJson$1 = unknown> extends TriggerNodeConfig<TOutputJson$1, undefined> {
1496
1139
  readonly triggerKind: "test";
1497
- /**
1498
- * Author-supplied async iterable of items, evaluated lazily. Implementations may fetch from
1499
- * credentialed APIs, read fixture files, or yield hard-coded items. The orchestrator iterates
1500
- * and dispatches one run per item, with concurrency capped by {@link concurrency} (default 4).
1501
- */
1502
1140
  generateItems(ctx: TestTriggerSetupContext<TestTriggerNodeConfig<TOutputJson$1>>): AsyncIterable<Item<TOutputJson$1>>;
1503
- /** Per-suite-run cap on simultaneously-executing test cases. Default: 4. */
1504
1141
  readonly concurrency?: number;
1505
- /**
1506
- * Free-form description of where the test cases come from — surfaced in the node properties
1507
- * panel and the suite-detail header so authors revisiting the workflow six months later
1508
- * remember which mailbox / folder / fixture file the cases originate from.
1509
- *
1510
- * Example: `"All emails in the Gmail label \"test/triage-fixtures\" — 14 messages as of 2026-05-03."`
1511
- */
1512
1142
  readonly description?: string;
1513
- /**
1514
- * Resolves a human-readable label for one yielded test case (e.g. email subject). The
1515
- * orchestrator calls this once per yielded item, persists the result on the run, and the
1516
- * Tests-tab UI uses it to render the case row instead of the opaque runId. Return
1517
- * `undefined` to fall back to "Case #N".
1518
- */
1519
1143
  caseLabel?(item: Item<TOutputJson$1>): string | undefined;
1520
1144
  }
1521
1145
  //#endregion
1522
1146
  //#region src/events/runEvents.d.ts
1523
- /**
1524
- * Outcome of a single test case (one workflow run dispatched by the test-suite orchestrator).
1525
- * - `running`: workflow still in flight
1526
- * - `succeeded`: workflow completed AND all assertions passed (or no assertions)
1527
- * - `failed`: workflow failed OR (workflow completed but ≥1 assertion failed)
1528
- * - `errored` / `cancelled`: workflow itself errored or was cancelled
1529
- */
1530
1147
  type TestCaseRunStatus = "running" | "succeeded" | "failed" | "errored" | "cancelled";
1531
- /** Aggregate outcome of a TestSuiteRun. */
1532
1148
  type TestSuiteRunStatus = "succeeded" | "failed" | "partial" | "errored" | "cancelled";
1533
1149
  type RunEvent = Readonly<{
1534
1150
  kind: "runCreated";
@@ -1642,23 +1258,20 @@ interface EngineExecutionLimitsPolicyConfig {
1642
1258
  readonly defaultMaxSubworkflowDepth: number;
1643
1259
  readonly hardMaxSubworkflowDepth: number;
1644
1260
  }
1645
- /** Framework defaults for {@link EngineExecutionLimitsPolicy} (merged with host `runtime.engineExecutionLimits`). */
1646
1261
  declare const ENGINE_EXECUTION_LIMITS_DEFAULTS: EngineExecutionLimitsPolicyConfig;
1647
- /**
1648
- * Resolves per-run execution limits: defaults, hard ceilings, and subworkflow depth for new runs.
1649
- */
1650
1262
  declare class EngineExecutionLimitsPolicy {
1651
1263
  private readonly config;
1652
1264
  constructor(config?: EngineExecutionLimitsPolicyConfig);
1653
- /**
1654
- * Effective options for a new root run (depth 0): defaults merged with engine ceilings.
1655
- * Replaces a separate one-method factory for root-run bootstrap.
1656
- */
1657
1265
  createRootExecutionOptions(): RunExecutionOptions;
1658
1266
  mergeExecutionOptionsForNewRun(parent: ParentExecutionRef | undefined, user: RunExecutionOptions | undefined): RunExecutionOptions;
1659
1267
  private capNumber;
1660
1268
  }
1661
1269
  //#endregion
1270
+ //#region src/contracts/triggerInvokerTypes.d.ts
1271
+ interface TriggerInvoker {
1272
+ invoke(trigger: TriggerInstanceId, config: TriggerNodeConfig, lastRanAt: string | undefined): Promise<Items>;
1273
+ }
1274
+ //#endregion
1662
1275
  //#region src/di/CoreTokens.d.ts
1663
1276
  declare const CoreTokens: {
1664
1277
  readonly PersistedWorkflowTokenRegistry: TypeToken<PersistedWorkflowTokenRegistryLike>;
@@ -1679,54 +1292,31 @@ declare const CoreTokens: {
1679
1292
  readonly RunEventBus: TypeToken<RunEventBus>;
1680
1293
  readonly BinaryStorage: TypeToken<BinaryStorage>;
1681
1294
  readonly WebhookBasePath: TypeToken<string>;
1682
- /** Engine execution limits (defaults + optional host overrides). Consumers may bind a custom instance to override. */
1683
1295
  readonly EngineExecutionLimitsPolicy: TypeToken<EngineExecutionLimitsPolicy>;
1684
1296
  readonly WorkflowActivationPolicy: TypeToken<WorkflowActivationPolicy>;
1685
- /**
1686
- * Optional. When registered, AIAgentNode uses it to resolve mcpServers bindings,
1687
- * validate scopes, open pool connections, and prepare the MCP ToolSet map.
1688
- * Not registered in the default core bootstrap — the host provides the implementation.
1689
- */
1690
1297
  readonly AgentMcpIntegration: TypeToken<AgentMcpIntegration>;
1298
+ readonly TriggerInvoker: TypeToken<TriggerInvoker>;
1691
1299
  };
1692
1300
  //#endregion
1693
1301
  //#region src/contracts/runTypes.d.ts
1694
- /**
1695
- * Test-suite linkage for a run. When set, this run was started by a TestSuiteOrchestrator
1696
- * as one test case inside a TestSuiteRun. The `IsTestRun` node and host-side persisters key
1697
- * off the presence of this field. Subworkflow runs inherit it from their parent run.
1698
- */
1699
1302
  interface RunTestContext {
1700
1303
  readonly testSuiteRunId: string;
1701
1304
  readonly testCaseIndex: number;
1702
- /**
1703
- * Optional human-friendly label for this test case (e.g. an email subject when fixtures
1704
- * are loaded from a mailbox). Resolved per item by `TestTrigger.caseLabel(item)` if set,
1705
- * persisted on `Run.test_case_label` so the Tests-tab tree-table can show "RFQ for batch 14"
1706
- * instead of "run_1777755971399_bbb86beac1396".
1707
- */
1708
1305
  readonly testCaseLabel?: string;
1709
1306
  }
1710
1307
  interface RunExecutionOptions {
1711
- /** Run-intent override: force the inline scheduler and bypass node-level offload decisions. */
1712
1308
  localOnly?: boolean;
1713
- /** Marks runs started from webhook handling so orchestration can apply webhook-specific continuation rules. */
1714
1309
  webhook?: boolean;
1715
1310
  mode?: "manual" | "debug";
1716
1311
  sourceWorkflowId?: WorkflowId;
1717
1312
  sourceRunId?: RunId;
1718
1313
  derivedFromRunId?: RunId;
1719
1314
  isMutable?: boolean;
1720
- /** Set by the engine for this run: 0 = root, 1 = first child subworkflow, … */
1721
1315
  subworkflowDepth?: number;
1722
- /** Effective cap after engine policy merge (successful node completions per run). */
1723
1316
  maxNodeActivations?: number;
1724
- /** Effective cap after engine policy merge (subworkflow nesting). */
1725
1317
  maxSubworkflowDepth?: number;
1726
- /** Present iff started by a TestSuiteOrchestrator; propagates to subworkflow runs via {@link ParentExecutionRef.testContext}. */
1727
1318
  testContext?: RunTestContext;
1728
1319
  }
1729
- /** Engine-owned counters persisted with the run (worker-safe). */
1730
1320
  interface EngineRunCounters {
1731
1321
  completedNodeActivations: number;
1732
1322
  }
@@ -1751,7 +1341,6 @@ interface PersistedWorkflowSnapshotNode {
1751
1341
  tokenName?: string;
1752
1342
  configTokenName?: string;
1753
1343
  config: unknown;
1754
- /** Pre-computed static configuration summary; populated by WorkflowSnapshotCodec. */
1755
1344
  inspectorSummary?: ReadonlyArray<Readonly<{
1756
1345
  label: string;
1757
1346
  value: string;
@@ -1762,9 +1351,7 @@ interface PersistedWorkflowSnapshot {
1762
1351
  name: string;
1763
1352
  nodes: ReadonlyArray<PersistedWorkflowSnapshotNode>;
1764
1353
  edges: ReadonlyArray<Edge>;
1765
- /** When the snapshot was built from a live workflow definition that configured a workflow error handler. */
1766
1354
  workflowErrorHandlerConfigured?: boolean;
1767
- /** Connection metadata for child nodes not in the execution graph (e.g. AI agent attachments). */
1768
1355
  connections?: ReadonlyArray<WorkflowNodeConnection>;
1769
1356
  }
1770
1357
  type PinnedNodeOutputsByPort = Readonly<Record<OutputPortKey, Items>>;
@@ -1812,18 +1399,9 @@ interface NodeExecutionSnapshot {
1812
1399
  inputsByPort?: NodeInputsByPort;
1813
1400
  outputs?: NodeOutputs;
1814
1401
  error?: NodeExecutionError;
1815
- /**
1816
- * When the node is a SubWorkflow invocation, the run id of the child run it spawned.
1817
- * Populated after the child run completes so the UI can deep-link to that specific execution.
1818
- */
1819
1402
  childRunId?: RunId;
1820
1403
  }
1821
- /** Stable id for a single connection invocation row in {@link ConnectionInvocationRecord}. */
1822
1404
  type ConnectionInvocationId = string;
1823
- /**
1824
- * One logical LLM or tool call under an owning workflow node (e.g. AI agent).
1825
- * The owning node defines what {@link managedInput} and {@link managedOutput} contain.
1826
- */
1827
1405
  interface ConnectionInvocationRecord {
1828
1406
  readonly invocationId: ConnectionInvocationId;
1829
1407
  readonly runId: RunId;
@@ -1834,23 +1412,17 @@ interface ConnectionInvocationRecord {
1834
1412
  readonly status: NodeExecutionStatus;
1835
1413
  readonly managedInput?: JsonValue;
1836
1414
  readonly managedOutput?: JsonValue;
1837
- /** Short human-readable description of what this invocation is doing right now (e.g. `"calling search_messages"`). Rendered as a sub-line on the canvas node card. */
1838
1415
  readonly statusLabel?: string;
1839
- /** Stable identifier for the thing this invocation acts on (e.g. an MCP tool name like `"search_messages"`). Persists across status transitions so the inspector can show it on completed/failed entries too. Connection nodes that ARE the tool (e.g. node-backed agent tools) leave this unset — the parent node id already identifies the subject. */
1840
1416
  readonly subjectName?: string;
1841
1417
  readonly error?: NodeExecutionError;
1842
1418
  readonly queuedAt?: string;
1843
1419
  readonly startedAt?: string;
1844
1420
  readonly finishedAt?: string;
1845
1421
  readonly updatedAt: string;
1846
- /** Per-item iteration id minted by the engine when this invocation occurred inside a runnable node's per-item loop. */
1847
1422
  readonly iterationId?: NodeIterationId;
1848
- /** Item index (0-based) of the iteration that produced this invocation. */
1849
1423
  readonly itemIndex?: number;
1850
- /** When set, this invocation was produced inside a sub-agent triggered by the named parent invocation. */
1851
1424
  readonly parentInvocationId?: ConnectionInvocationId;
1852
1425
  }
1853
- /** Arguments for appending a {@link ConnectionInvocationRecord} (engine fills run/workflow ids and timestamps). */
1854
1426
  type ConnectionInvocationAppendArgs = Readonly<{
1855
1427
  invocationId: ConnectionInvocationId;
1856
1428
  connectionNodeId: NodeId;
@@ -1872,7 +1444,6 @@ type ConnectionInvocationAppendArgs = Readonly<{
1872
1444
  interface RunCurrentState {
1873
1445
  outputsByNode: Record<NodeId, NodeOutputs>;
1874
1446
  nodeSnapshotsByNodeId: Record<NodeId, NodeExecutionSnapshot>;
1875
- /** Append-only history of connection-scoped invocations (LLM/tool) for inspector and canvas. */
1876
1447
  connectionInvocations?: ReadonlyArray<ConnectionInvocationRecord>;
1877
1448
  mutableState?: PersistedMutableRunState;
1878
1449
  }
@@ -1899,21 +1470,13 @@ interface ExecutionFrontierPlan {
1899
1470
  preservedPinnedNodeIds: ReadonlyArray<NodeId>;
1900
1471
  }
1901
1472
  type RunStatus = "running" | "pending" | "completed" | "failed" | "suspended" | "halted";
1902
- /** Reason a run transitioned to {@link RunStatus} `"halted"`. */
1903
1473
  type RunHaltReason = "hitl-rejected" | "hitl-timeout" | "hitl-cancelled";
1904
1474
  interface RunSummary {
1905
1475
  runId: RunId;
1906
1476
  workflowId: WorkflowId;
1907
1477
  startedAt: string;
1908
1478
  status: RunStatus;
1909
- /**
1910
- * Test-case status for runs dispatched as part of a TestSuiteRun. Carries the
1911
- * assertion-rollup-corrected outcome the test orchestrator persists onto the row, so the
1912
- * executions list can show "failed" for a run whose workflow completed cleanly but whose
1913
- * assertions caught regressions. Absent for non-test runs and legacy rows.
1914
- */
1915
1479
  testCaseStatus?: TestCaseRunStatus;
1916
- /** ISO timestamp when the run finished (derived from node snapshots or store `updatedAt`); omit while running/pending. */
1917
1480
  finishedAt?: string;
1918
1481
  parent?: ParentExecutionRef;
1919
1482
  executionOptions?: RunExecutionOptions;
@@ -1934,70 +1497,42 @@ interface PersistedRunSchedulingState {
1934
1497
  pending?: PendingNodeExecution;
1935
1498
  queue: RunQueueEntry[];
1936
1499
  }
1937
- /** One persisted suspension entry per suspended item. */
1938
1500
  interface PersistedSuspensionEntry {
1939
- /** Opaque task identifier (UUID v4). */
1940
1501
  readonly taskId: string;
1941
1502
  readonly nodeId: NodeId;
1942
1503
  readonly activationId: NodeActivationId;
1943
1504
  readonly itemIndex: number;
1944
- /** SHA-256 hex digest of the decision schema JSON (for schema-drift detection). */
1945
1505
  readonly decisionSchemaHash: string;
1946
- /** Serialized return value from `SuspensionRequest.deliver` (stored on the HumanTask row). */
1947
1506
  readonly deliveryRef: JsonValue;
1948
- /** ISO timestamp when the task expires. */
1949
1507
  readonly timeoutAt: string;
1950
1508
  readonly onTimeout: "halt" | "auto-accept";
1951
1509
  }
1952
- /**
1953
- * When a node is re-activated after suspension, the engine writes the resume context here
1954
- * so `NodeExecutionRequestHandlerService` can splice `resumeContext` into ctx.
1955
- * Cleared once the re-activation is consumed.
1956
- */
1957
1510
  interface PendingResumeEntry {
1958
1511
  readonly activationId: NodeActivationId;
1959
1512
  readonly nodeId: NodeId;
1960
- /**
1961
- * Typed as `unknown` here to avoid a circular import between runTypes ↔ runtimeTypes.
1962
- * `NodeExecutionRequestHandlerService` casts this to `ResumeContext` from runtimeTypes.
1963
- */
1964
1513
  readonly resumeContext: unknown;
1965
1514
  }
1966
1515
  interface PersistedRunState {
1967
1516
  runId: RunId;
1968
1517
  workflowId: WorkflowId;
1969
1518
  startedAt: string;
1970
- /** Canonical terminal time for listings and retention when persisted on the run root. */
1971
1519
  finishedAt?: string;
1972
- /** Optimistic concurrency / CAS on the run aggregate (repository may increment on save). */
1973
1520
  revision?: number;
1974
1521
  parent?: ParentExecutionRef;
1975
1522
  executionOptions?: RunExecutionOptions;
1976
1523
  control?: PersistedRunControlState;
1977
1524
  workflowSnapshot?: PersistedWorkflowSnapshot;
1978
1525
  mutableState?: PersistedMutableRunState;
1979
- /** Frozen at createRun from workflow + runtime defaults for prune/storage decisions. */
1980
1526
  policySnapshot?: PersistedRunPolicySnapshot;
1981
- /** Successful node completions so far (for activation budget). */
1982
1527
  engineCounters?: EngineRunCounters;
1983
1528
  status: RunStatus;
1984
- /** Populated when `status === "halted"` to discriminate why the run was halted. */
1985
1529
  reason?: RunHaltReason;
1986
1530
  pending?: PendingNodeExecution;
1987
1531
  queue: RunQueueEntry[];
1988
1532
  outputsByNode: Record<NodeId, NodeOutputs>;
1989
1533
  nodeSnapshotsByNodeId: Record<NodeId, NodeExecutionSnapshot>;
1990
- /** Append-only history of connection invocations (LLM/tool) nested under owning nodes. */
1991
1534
  connectionInvocations?: ReadonlyArray<ConnectionInvocationRecord>;
1992
- /**
1993
- * One entry per outstanding HITL suspension (per-item).
1994
- * Present and non-empty iff `status === "suspended"`.
1995
- */
1996
1535
  suspension?: ReadonlyArray<PersistedSuspensionEntry>;
1997
- /**
1998
- * Written by `resumeRun()` so `NodeExecutionRequestHandlerService` can splice `resumeContext`
1999
- * into the ctx when re-executing the suspended node. Cleared once consumed.
2000
- */
2001
1536
  pendingResume?: PendingResumeEntry;
2002
1537
  }
2003
1538
  interface WorkflowExecutionRepository {
@@ -2024,7 +1559,6 @@ interface WorkflowExecutionListingRepository {
2024
1559
  limit?: number;
2025
1560
  }>): Promise<ReadonlyArray<RunSummary>>;
2026
1561
  }
2027
- /** Runs eligible for retention-based pruning (completed or failed, older than cutoff). */
2028
1562
  interface RunPruneCandidate {
2029
1563
  readonly runId: RunId;
2030
1564
  readonly workflowId: WorkflowId;
@@ -2087,42 +1621,13 @@ interface RunEventPublisherDeps {
2087
1621
  }
2088
1622
  //#endregion
2089
1623
  //#region src/contracts/agentMcpTypes.d.ts
2090
- /**
2091
- * Emitted as a span event when a credential is missing required scopes
2092
- * (bind-time) or when callTool returns a permission error (runtime).
2093
- * The credential type id can be looked up from the credential instance when needed.
2094
- */
2095
1624
  interface NeedsReconsentEvent {
2096
1625
  readonly serverId: string;
2097
1626
  readonly credentialInstanceId: string;
2098
1627
  readonly missingScopesHint?: readonly string[];
2099
1628
  }
2100
- /**
2101
- * An opaque MCP tool map: keyed by serverId → (toolName → tool definition).
2102
- * Typed as unknown so core does not depend on the AI SDK's ToolSet type.
2103
- * AIAgentNode (in core-nodes, which does depend on ai) casts this to
2104
- * ReadonlyMap<string, ToolSet> before passing to DeferredMetaToolStrategyFactory.
2105
- */
2106
1629
  type AgentMcpToolMap = ReadonlyMap<string, Readonly<Record<string, unknown>>>;
2107
- /**
2108
- * Contract implemented by the host. Resolves MCP server bindings for an agent run
2109
- * via the standard credential-binding table (one slot per declared server, keyed
2110
- * by `(workflowId, mcpConnectionNodeId, "credential")`), and returns a ready-to-use
2111
- * tool map with wrapped execute callbacks for telemetry and 403 detection.
2112
- * Core-nodes imports this interface so AIAgentNode can inject it without
2113
- * depending on the host.
2114
- */
2115
1630
  interface AgentMcpIntegration {
2116
- /**
2117
- * Look up the credential binding per server, validate scopes, open pool
2118
- * connections, and return a tool map keyed by serverId. Each tool's
2119
- * execute callback includes:
2120
- * - Telemetry child span (mcp.server_id, mcp.tool_name attributes)
2121
- * - 403/permission error detection → emits a NeedsReconsentEvent span event
2122
- *
2123
- * Throws `AgentBindError` on validation failures (missing server, unbound
2124
- * credential slot, missing credential instance, insufficient scopes).
2125
- */
2126
1631
  prepareMcpTools(args: {
2127
1632
  readonly workflowId: WorkflowId;
2128
1633
  readonly agentNodeId: NodeId;
@@ -2138,93 +1643,63 @@ interface AgentMcpIntegration {
2138
1643
  statusMessage?: string;
2139
1644
  }) => void;
2140
1645
  };
2141
- /** Per-MCP-tool-call invocation appender. Optional; when omitted the wrapper emits only telemetry spans. */
2142
1646
  readonly appendMcpInvocation?: (args: ConnectionInvocationAppendArgs) => Promise<void>;
2143
- /** Agent activation id to attach to each invocation record (used by canvas + inspector grouping). */
2144
1647
  readonly parentAgentActivationId?: NodeActivationId;
2145
- /** Per-item iteration id when the agent runs inside a per-item loop. */
2146
1648
  readonly iterationId?: NodeIterationId;
2147
- /** Item index (0-based) of the iteration that owns these tool calls. */
2148
1649
  readonly itemIndex?: number;
2149
- /** Parent invocation id when this agent is itself executing as a sub-agent. */
2150
1650
  readonly parentInvocationId?: ConnectionInvocationId;
2151
1651
  }): Promise<AgentMcpToolMap>;
2152
1652
  }
2153
1653
  //#endregion
1654
+ //#region src/contracts/dispatchTypes.d.ts
1655
+ type WorkspaceId = string;
1656
+ type DispatchBinaryRef = BinaryAttachment;
1657
+ interface DispatchItemMeta {
1658
+ readonly id: string;
1659
+ readonly json?: JsonValue;
1660
+ readonly binary?: Readonly<Record<string, DispatchBinaryRef>>;
1661
+ }
1662
+ interface WorkflowDispatch {
1663
+ readonly runId: RunId;
1664
+ readonly workspaceId: WorkspaceId;
1665
+ readonly workflowId: WorkflowId;
1666
+ readonly triggerNodeId: NodeId;
1667
+ readonly items: ReadonlyArray<DispatchItemMeta>;
1668
+ readonly triggerContext: JsonValue;
1669
+ }
1670
+ declare function serializeDispatch(dispatch: WorkflowDispatch): string;
1671
+ declare function deserializeDispatch(raw: string): WorkflowDispatch;
1672
+ //#endregion
2154
1673
  //#region src/contracts/AgentBindError.d.ts
2155
- /**
2156
- * Thrown at agent bind time when mcpServers declarations cannot be resolved.
2157
- * Causes include: unknown server id, missing credential instance, insufficient scopes,
2158
- * and ambiguous shorthand binding (multiple credential instances match).
2159
- */
2160
1674
  declare class AgentBindError extends Error {
2161
1675
  constructor(message: string);
2162
1676
  }
2163
1677
  //#endregion
2164
1678
  //#region src/contracts/NoOpAgentMcpIntegration.d.ts
2165
- /**
2166
- * No-op implementation of AgentMcpIntegration.
2167
- * Registered by the core engine runtime as a fallback when the host does not
2168
- * supply a real implementation (e.g. in unit tests or headless engine setups).
2169
- * Always returns an empty tool map so the agent runs with node-backed tools only.
2170
- */
2171
1679
  declare class NoOpAgentMcpIntegration implements AgentMcpIntegration {
2172
1680
  prepareMcpTools(): Promise<AgentMcpToolMap>;
2173
1681
  }
2174
1682
  //#endregion
2175
1683
  //#region src/contracts/assertionTypes.d.ts
2176
- /**
2177
- * One assertion emitted by an assertion-emitting node (a node whose config sets
2178
- * `emitsAssertions: true`). Each emitted item on `main` carries one of these as `item.json`.
2179
- *
2180
- * Pass/fail is derived from `score >= (passThreshold ?? 0.5)` — see {@link deriveAssertionPassed}.
2181
- * The `errored` marker is for cases where the assertion code itself threw (distinct from
2182
- * "the assertion was evaluated and the score was low") and is treated as a hard fail in rollups
2183
- * regardless of `score`.
2184
- */
2185
1684
  interface AssertionResult {
2186
1685
  readonly name: string;
2187
- /** 0..1 score. Source of truth for pass/fail (compared against `passThreshold`). */
2188
1686
  readonly score: number;
2189
- /** 0..1 threshold for "passed". When omitted, consumers default to 0.5. */
2190
1687
  readonly passThreshold?: number;
2191
- /** True when evaluating the assertion threw — treated as fail regardless of `score`. */
2192
1688
  readonly errored?: true;
2193
- /** What the assertion expected. Free-form JSON; UIs render with a JSON viewer. */
2194
1689
  readonly expected?: JsonValue;
2195
- /** What the workflow actually produced. */
2196
1690
  readonly actual?: JsonValue;
2197
- /** Short human-readable explanation, especially for fails / errors. */
2198
1691
  readonly message?: string;
2199
- /** Bag of supplemental fields (e.g. judge prompt, judge raw response, comparison method). */
2200
1692
  readonly details?: Readonly<Record<string, JsonValue>>;
2201
1693
  }
2202
- /**
2203
- * Default {@link AssertionResult.passThreshold} when authors omit it. Boolean-style assertions
2204
- * (assertEqual / contains / etc.) emit `score: 1` or `score: 0` so this default works for them;
2205
- * AI-judge assertions are expected to set their own threshold.
2206
- */
2207
1694
  declare const DEFAULT_ASSERTION_PASS_THRESHOLD = 0.5;
2208
- /**
2209
- * Derive whether an assertion result is considered "passing" using the score-based contract:
2210
- * `errored` always fails, otherwise `score >= (passThreshold ?? 0.5)`. This is the canonical
2211
- * derivation — UI and rollup code should call it rather than inlining the comparison so future
2212
- * tweaks (e.g. NaN handling) land in one place.
2213
- */
2214
1695
  declare function deriveAssertionPassed(result: {
2215
1696
  readonly score: number;
2216
1697
  readonly passThreshold?: number;
2217
1698
  readonly errored?: true;
2218
1699
  }): boolean;
2219
- /**
2220
- * Provenance for a persisted {@link AssertionResult}: which node produced it and where in the
2221
- * per-item iteration tree it landed. Filled in by the host-side persister, not the node itself.
2222
- */
2223
1700
  interface AssertionResultProvenance {
2224
1701
  readonly nodeId: NodeId;
2225
- /** Per-item iteration id when the emitting node ran inside a per-item loop. */
2226
1702
  readonly iterationId?: string;
2227
- /** Item index (0-based) within the activation that produced this assertion. */
2228
1703
  readonly itemIndex?: number;
2229
1704
  }
2230
1705
  //#endregion
@@ -2236,9 +1711,6 @@ type ItemExprResolvedContext = Readonly<{
2236
1711
  activationId: NodeActivationId;
2237
1712
  data: RunDataSnapshot;
2238
1713
  }>;
2239
- /**
2240
- * Context aligned with former {@link ItemInputMapperContext} — use **`data`** to read any completed upstream node.
2241
- */
2242
1714
  type ItemExprContext = ItemExprResolvedContext;
2243
1715
  type ItemExprArgs<TItemJson = unknown> = Readonly<{
2244
1716
  item: Item<TItemJson>;
@@ -2253,13 +1725,7 @@ type ItemExpr<T, TItemJson = unknown> = Readonly<{
2253
1725
  }>;
2254
1726
  declare function itemExpr<T, TItemJson = unknown>(fn: ItemExprCallback<T, TItemJson>): ItemExpr<T, TItemJson>;
2255
1727
  declare function isItemExpr<T, TItemJson = unknown>(value: unknown): value is ItemExpr<T, TItemJson>;
2256
- /**
2257
- * Deep-resolves {@link itemExpr} leaves. Returns a new graph (does not mutate the original config object).
2258
- */
2259
1728
  declare function resolveItemExprsInUnknown(value: unknown, args: ItemExprArgs, seen?: WeakSet<object>): Promise<unknown>;
2260
- /**
2261
- * Clones runnable config (best-effort) so per-item {@link itemExpr} resolution never mutates shared instances.
2262
- */
2263
1729
  declare function resolveItemExprsForExecution(config: unknown, nodeCtx: NodeExecutionContext, item: Item, itemIndex: number, items: Items): Promise<unknown | undefined>;
2264
1730
  //#endregion
2265
1731
  //#region src/contracts/params.d.ts
@@ -2283,23 +1749,15 @@ interface CostCatalog {
2283
1749
  }
2284
1750
  //#endregion
2285
1751
  //#region src/contracts/executionPersistenceContracts.d.ts
2286
- /** Canonical id for persisted execution rows (activation or connection invocation). */
2287
1752
  type ExecutionInstanceId = string;
2288
- /** Stable id for persisted work-queue rows. */
2289
1753
  type WorkItemId = string;
2290
- /** Batch grouping for planner activations. */
2291
1754
  type BatchId = string;
2292
- /** Optimistic concurrency on the run root. */
2293
1755
  type RunRevision = number;
2294
1756
  type PersistedRunWorkItemKind = "queue" | "pending";
2295
1757
  type WorkItemStatus = "queued" | "claimed" | "completed" | "failed" | "cancelled";
2296
1758
  type PersistedExecutionInstanceKind = "workflowNodeActivation" | "connectionInvocation";
2297
1759
  type ConnectionInvocationKind = "languageModel" | "tool" | "nestedAgent";
2298
1760
  type PayloadStorageKind = "inline" | "external" | "omitted";
2299
- /**
2300
- * Persisted run-work-queue row (queue entry or pending activation).
2301
- * Serialized to {@link RunWorkItem} in Prisma; engine still uses {@link PersistedRunState} queue + pending.
2302
- */
2303
1761
  interface PersistedRunWorkItemRecord {
2304
1762
  readonly workItemId: WorkItemId;
2305
1763
  readonly runId: RunId;
@@ -2318,13 +1776,9 @@ interface PersistedRunWorkItemRecord {
2318
1776
  readonly sourceInstanceId?: ExecutionInstanceId;
2319
1777
  readonly parentInstanceId?: ExecutionInstanceId;
2320
1778
  readonly itemsIn: number;
2321
- /** Queue entry when kind is queue; pending activation when kind is pending. */
2322
1779
  readonly payloadJson: string;
2323
1780
  readonly error?: Readonly<NodeExecutionError>;
2324
1781
  }
2325
- /**
2326
- * Payload policy fields for large-batch externalization (optional on first rollout).
2327
- */
2328
1782
  interface ExecutionPayloadPolicyFields {
2329
1783
  readonly inputStorageKind: PayloadStorageKind;
2330
1784
  readonly outputStorageKind: PayloadStorageKind;
@@ -2337,9 +1791,6 @@ interface ExecutionPayloadPolicyFields {
2337
1791
  readonly inputTruncated?: boolean;
2338
1792
  readonly outputTruncated?: boolean;
2339
1793
  }
2340
- /**
2341
- * One persisted execution row (workflow node activation or connection invocation).
2342
- */
2343
1794
  interface PersistedExecutionInstanceRecord {
2344
1795
  readonly instanceId: ExecutionInstanceId;
2345
1796
  readonly runId: RunId;
@@ -2374,9 +1825,6 @@ interface PersistedExecutionInstanceRecord {
2374
1825
  readonly usedPinnedOutput?: boolean;
2375
1826
  readonly payloadPolicy?: ExecutionPayloadPolicyFields;
2376
1827
  }
2377
- /**
2378
- * Cached slot projection for planner/debugger/UI (not canonical history).
2379
- */
2380
1828
  interface RunSlotProjectionState {
2381
1829
  readonly runId: RunId;
2382
1830
  readonly workflowId: WorkflowId;
@@ -2409,12 +1857,6 @@ interface WorkflowRunDetailDto {
2409
1857
  readonly executionInstances: ReadonlyArray<ExecutionInstanceDto>;
2410
1858
  readonly iterations?: ReadonlyArray<RunIterationDto>;
2411
1859
  }
2412
- /**
2413
- * Per-item iteration projected from connection invocations and node activations.
2414
- *
2415
- * One iteration = one item processed by an agent within an activation. Multiple invocations
2416
- * (LLM rounds, tool calls) belonging to the same iteration share the iterationId.
2417
- */
2418
1860
  interface RunIterationDto {
2419
1861
  readonly iterationId: string;
2420
1862
  readonly agentNodeId: NodeId;
@@ -2426,9 +1868,7 @@ interface RunIterationDto {
2426
1868
  readonly finishedAt?: string;
2427
1869
  readonly invocationIds: ReadonlyArray<string>;
2428
1870
  readonly parentInvocationId?: string;
2429
- /** Estimated cost rolled up from telemetry cost metric points, keyed by ISO currency code (e.g. "USD"). Values are minor units (cents-of-cents per the metric's `cost.currency_scale`). */
2430
1871
  readonly estimatedCostMinorByCurrency?: Readonly<Record<string, number>>;
2431
- /** Currency scale (denominator) per currency, when present on the metric points. Joined with `estimatedCostMinorByCurrency` to format human-readable amounts. */
2432
1872
  readonly estimatedCostCurrencyScaleByCurrency?: Readonly<Record<string, number>>;
2433
1873
  }
2434
1874
  interface SlotExecutionStateDto {
@@ -2458,16 +1898,9 @@ interface ExecutionInstanceDto {
2458
1898
  readonly inputJson?: JsonValue;
2459
1899
  readonly outputJson?: JsonValue;
2460
1900
  readonly error?: Readonly<NodeExecutionError>;
2461
- /** Per-item iteration that produced this instance. Set on connectionInvocation rows produced inside per-item runnable loops. */
2462
1901
  readonly iterationId?: string;
2463
- /** Item index (0-based) of the iteration. */
2464
1902
  readonly itemIndex?: number;
2465
- /** Parent invocation id when this instance was emitted by a sub-agent triggered by an outer LLM/tool call. */
2466
1903
  readonly parentInvocationId?: string;
2467
- /**
2468
- * When this instance is a SubWorkflow node activation, the run id of the child run it spawned.
2469
- * Used by the UI to deep-link directly to the child execution.
2470
- */
2471
1904
  readonly childRunId?: string;
2472
1905
  }
2473
1906
  interface WorkflowDetailSelectionState {
@@ -2475,32 +1908,60 @@ interface WorkflowDetailSelectionState {
2475
1908
  readonly selectedInstanceId: ExecutionInstanceId | null;
2476
1909
  }
2477
1910
  //#endregion
1911
+ //#region src/contracts/deploymentManifestTypes.d.ts
1912
+ declare const DEPLOYMENT_MANIFEST_SCHEMA_VERSION: 2;
1913
+ type DeploymentManifestSchemaVersion = typeof DEPLOYMENT_MANIFEST_SCHEMA_VERSION;
1914
+ type ManifestTriggerConfig = Readonly<{
1915
+ nodeId: NodeId;
1916
+ triggerKind: "live" | "test";
1917
+ config: JsonObject;
1918
+ pollIntervalMs?: number;
1919
+ nodeTypeId?: string;
1920
+ }>;
1921
+ type ManifestNodeCredentialShape = Readonly<{
1922
+ nodeId: NodeId;
1923
+ requirements: ReadonlyArray<CredentialRequirement>;
1924
+ }>;
1925
+ type WorkflowDeploymentManifest<TCanvas = JsonObject> = Readonly<{
1926
+ manifestId: string;
1927
+ schemaVersion: DeploymentManifestSchemaVersion;
1928
+ workflowId: WorkflowId;
1929
+ canvas: TCanvas;
1930
+ snapshot: PersistedWorkflowSnapshot;
1931
+ triggers: ReadonlyArray<ManifestTriggerConfig>;
1932
+ credentialShapes: ReadonlyArray<ManifestNodeCredentialShape>;
1933
+ }>;
1934
+ declare function serializeManifest<TCanvas>(manifest: WorkflowDeploymentManifest<TCanvas>): string;
1935
+ declare function deserializeManifest<TCanvas = JsonObject>(raw: string): WorkflowDeploymentManifest<TCanvas>;
1936
+ type ManifestCanvasNode = Readonly<{
1937
+ id: NodeId;
1938
+ kind: string;
1939
+ name: string | undefined;
1940
+ type?: string;
1941
+ role?: string;
1942
+ triggerKind?: "live" | "test";
1943
+ declaredOutputPorts?: ReadonlyArray<string>;
1944
+ declaredInputPorts?: ReadonlyArray<string>;
1945
+ }>;
1946
+ type ManifestCanvas = Readonly<{
1947
+ id: WorkflowId;
1948
+ name: string;
1949
+ nodes: ReadonlyArray<ManifestCanvasNode>;
1950
+ edges: WorkflowDefinition["edges"];
1951
+ }>;
1952
+ declare function emitWorkflowManifest(workflow: WorkflowDefinition): WorkflowDeploymentManifest<ManifestCanvas>;
1953
+ //#endregion
2478
1954
  //#region src/contracts/mcpTypes.d.ts
2479
1955
  type McpServerTransport = "http";
2480
1956
  interface McpServerDeclaration {
2481
- /** Globally unique slug, e.g. "gmail". Workflow authors reference this. */
2482
1957
  id: string;
2483
1958
  displayName: string;
2484
1959
  description: string;
2485
1960
  transport: McpServerTransport;
2486
1961
  url: string;
2487
- /**
2488
- * Credential types accepted by this MCP server, matching CredentialRequirement.acceptedTypes.
2489
- * Absent or empty means no credential is required.
2490
- */
2491
1962
  acceptedCredentialTypes?: ReadonlyArray<string>;
2492
- /**
2493
- * Documentation only in MVP. The bind-time validator checks
2494
- * requiredScopes ⊆ CredentialInstance.scopesGranted.
2495
- */
2496
1963
  requiredScopes?: string[];
2497
- /** Non-secret static headers merged onto every MCP request. */
2498
1964
  staticHeaders?: Record<string, string>;
2499
- /**
2500
- * Overrides for tool descriptions advertised by the MCP server.
2501
- * Applied by the connection pool after tools/list.
2502
- * Key: exact tool name as returned by the server.
2503
- */
2504
1965
  toolDescriptionOverrides?: Record<string, string>;
2505
1966
  }
2506
1967
  //#endregion
@@ -2517,9 +1978,6 @@ declare function isUnbrandedPortsEmissionShape(value: unknown): value is Readonl
2517
1978
  }>;
2518
1979
  //#endregion
2519
1980
  //#region src/contracts/itemMeta.d.ts
2520
- /**
2521
- * Reads `meta._cm.originIndex` when present (used for fan-in merge-by-origin and Merge routing).
2522
- */
2523
1981
  declare function getOriginIndexFromItem(item: Item): number | undefined;
2524
1982
  //#endregion
2525
1983
  //#region src/contracts/NoRetryPolicy.d.ts
@@ -2533,9 +1991,7 @@ declare class RetryPolicy implements FixedRetryPolicySpec {
2533
1991
  readonly delayMs: number;
2534
1992
  readonly kind: "fixed";
2535
1993
  constructor(maxAttempts: number, delayMs: number);
2536
- /** Default for HTTP-style transient failures: 3 tries, 1s between attempts. */
2537
1994
  static readonly defaultForHttp: FixedRetryPolicySpec;
2538
- /** Default for LLM / agent calls: 3 tries, 2s fixed backoff. */
2539
1995
  static readonly defaultForAiAgent: FixedRetryPolicySpec;
2540
1996
  }
2541
1997
  //#endregion
@@ -2565,26 +2021,11 @@ declare class NoOpCostTrackingTelemetryFactory implements CostTrackingTelemetryF
2565
2021
  //#endregion
2566
2022
  //#region src/contracts/runFinishedAtFactory.d.ts
2567
2023
  type RunFinishedAtSource = Pick<PersistedRunState, "status" | "nodeSnapshotsByNodeId" | "finishedAt">;
2568
- /** Derives workflow end time from persisted run root or node snapshots for run listings. */
2569
2024
  declare class RunFinishedAtFactory {
2570
2025
  static resolveIso(state: RunFinishedAtSource): string | undefined;
2571
2026
  }
2572
2027
  //#endregion
2573
2028
  //#region src/authoring/nodeBaseOptions.types.d.ts
2574
- /**
2575
- * Core-local copy of the per-instance authoring options every `define*` factory's `create(...)`
2576
- * accepts in its trailing argument: a stable `id` plus a plain-language `description` (the
2577
- * non-technical "what does this step do" line surfaced in the node sidebar).
2578
- *
2579
- * `description` is a first-class option — passed inline exactly like `id` — and is threaded onto
2580
- * the config instance as an OWN ENUMERABLE field so it flows into the persisted workflow snapshot
2581
- * (`WorkflowSnapshotCodec` serializes via `JSON.parse(JSON.stringify(config))`, which only captures
2582
- * own enumerable properties — never a getter).
2583
- *
2584
- * `@codemation/core-nodes` declares an identical `NodeBaseOptions` for its bare-id built-in nodes;
2585
- * core keeps its own copy because core must not depend on `@codemation/core-nodes` (dependency
2586
- * direction). The two types are structurally identical by design.
2587
- */
2588
2029
  interface NodeBaseOptions {
2589
2030
  readonly id?: string;
2590
2031
  readonly description?: string;
@@ -2611,10 +2052,6 @@ interface DefinedNodeRunContext<TConfig extends CredentialJsonRecord, TBindings
2611
2052
  readonly credentials: DefinedNodeCredentialAccessors<TBindings>;
2612
2053
  readonly execution: NodeExecutionContext<RunnableNodeConfig<TConfig, unknown>>;
2613
2054
  }
2614
- /**
2615
- * Arguments for {@link defineNode} `execute` (engine `ctx` matches {@link RunnableNode.execute};
2616
- * the second callback parameter adds {@link DefinedNodeRunContext} for credential accessors).
2617
- */
2618
2055
  type DefineNodeExecuteArgs<TConfig extends CredentialJsonRecord, TInputJson$1> = Readonly<{
2619
2056
  input: TInputJson$1;
2620
2057
  item: Item;
@@ -2635,42 +2072,21 @@ interface DefinedNode<TKey$1 extends string, TConfig extends CredentialJsonRecor
2635
2072
  registerNode<TValue>(token: TypeToken<TValue>, implementation?: TypeToken<TValue>): void;
2636
2073
  }): void;
2637
2074
  }
2638
- /**
2639
- * Plugin / DSL-friendly node: per-item `execute` with optional {@link RunnableNodeConfig.inputSchema}.
2640
- */
2641
2075
  interface DefineNodeOptions<TKey$1 extends string, TConfig extends CredentialJsonRecord, TInputJson$1, TOutputJson$1, TBindings extends DefinedNodeCredentialBindings | undefined = undefined> {
2642
2076
  readonly key: TKey$1;
2643
2077
  readonly title: string;
2644
2078
  readonly description?: string;
2645
- /**
2646
- * Canvas icon for this node (same contract as `NodeConfigBase.icon` on runnable configs).
2647
- * The Next host resolves Lucide (`lucide:…`), built-in SVGs (`builtin:…`), Simple Icons (`si:…`), and image URLs (`https:`, `data:`, `/…`).
2648
- */
2649
2079
  readonly icon?: string;
2650
- /** Default values / form hints for **static** node configuration (credentials, retry, IDs), not per-item payload. */
2651
2080
  readonly input?: Readonly<Record<keyof TConfig & string, unknown>>;
2652
2081
  readonly configSchema?: z.ZodType<TConfig>;
2653
2082
  readonly credentials?: TBindings;
2654
- /**
2655
- * Validates **`input`** (engine also accepts `inputSchema` on the node class).
2656
- */
2657
2083
  readonly inputSchema?: ZodType<TInputJson$1>;
2658
- /** Preserve inbound `item.binary` when `execute` returns plain JSON or item-shaped results without `binary`. */
2659
2084
  readonly keepBinaries?: boolean;
2660
- /**
2661
- * Static configuration summary surfaced in the workflow inspector — see
2662
- * {@link import("../contracts/workflowTypes").NodeConfigBase.inspectorSummary}.
2663
- *
2664
- * Receives the static config; returns 2–6 short label/value pairs (or `undefined` to skip).
2665
- */
2666
2085
  readonly inspectorSummary?: (args: Readonly<{
2667
2086
  config: TConfig;
2668
2087
  }>) => ReadonlyArray<NodeInspectorSummaryRow> | undefined;
2669
2088
  execute(args: DefineNodeExecuteArgs<TConfig, TInputJson$1>, context: DefinedNodeRunContext<TConfig, TBindings>): MaybePromise<TOutputJson$1>;
2670
2089
  }
2671
- /**
2672
- * Batch-oriented defined node: `run` receives all item JSON once (last item in activation); emits one output per input row.
2673
- */
2674
2090
  interface DefineBatchNodeOptions<TKey$1 extends string, TConfig extends CredentialJsonRecord, TInputJson$1, TOutputJson$1, TBindings extends DefinedNodeCredentialBindings | undefined = undefined> {
2675
2091
  readonly key: TKey$1;
2676
2092
  readonly title: string;
@@ -2688,103 +2104,22 @@ declare function defineNode<TKey$1 extends string, TConfig extends CredentialJso
2688
2104
  declare function defineBatchNode<TKey$1 extends string, TConfig extends CredentialJsonRecord, TInputJson$1, TOutputJson$1, TBindings extends DefinedNodeCredentialBindings | undefined = undefined>(options: DefineBatchNodeOptions<TKey$1, TConfig, TInputJson$1, TOutputJson$1, TBindings>): DefinedNode<TKey$1, TConfig, TInputJson$1, TOutputJson$1, TBindings>;
2689
2105
  //#endregion
2690
2106
  //#region src/authoring/defineHumanApprovalNode.types.d.ts
2691
- /**
2692
- * Decision shape merged into `item.json` after a HITL approval task resolves.
2693
- *
2694
- * - `"approved"` / `"rejected"` — from a human decision (uses `approvedPredicate`).
2695
- * - `"timed-out"` — timeout fired with `onTimeout: "halt"`.
2696
- * - `"auto-accepted"` — timeout fired with `onTimeout: "auto-accept"`.
2697
- */
2698
2107
  interface HumanApprovalDecisionResult {
2699
2108
  readonly status: "approved" | "rejected" | "timed-out" | "auto-accepted";
2700
- /** Identity of the person who decided; absent for automated outcomes. */
2701
2109
  readonly actor?: HumanTaskActor;
2702
- /** ISO 8601 timestamp of the decision. */
2703
2110
  readonly decidedAt?: Date;
2704
- /** Optional free-text note from the reviewer. */
2705
2111
  readonly note?: string;
2706
- /**
2707
- * Full raw decision payload (only present for `"approved"` / `"rejected"`).
2708
- * Shape is determined by the channel's `decisionSchema`.
2709
- */
2710
2112
  readonly payload?: Record<string, unknown>;
2711
2113
  }
2712
- /**
2713
- * Output item shape emitted by a `defineHumanApprovalNode`-based node.
2714
- * Original `item.json` fields are preserved and `decision` is merged in.
2715
- * If the input `item.json` already contained a `decision` key it is **overwritten**.
2716
- */
2717
2114
  type HumanApprovalOutputJson<TInputJson$1 extends Record<string, unknown>> = TInputJson$1 & {
2718
2115
  readonly decision: HumanApprovalDecisionResult;
2719
2116
  };
2720
- /**
2721
- * Extends {@link DefinedNode} with the `humanApprovalToolBehavior` metadata marker.
2722
- * Story 10 reads this field when attaching the node as an agent tool.
2723
- */
2724
2117
  interface DefinedHumanApprovalNode<TKey$1 extends string, TConfig extends CredentialJsonRecord, TInputJson$1 extends Record<string, unknown>, TBindings extends DefinedNodeCredentialBindings | undefined = undefined> extends DefinedNode<TKey$1, TConfig, TInputJson$1, HumanApprovalOutputJson<TInputJson$1>, TBindings> {
2725
- /**
2726
- * Behavior hint consumed by the agent runtime (story 10) when this node is attached as a tool.
2727
- * `"return"` (default) — return the rejection to the agent as a tool result.
2728
- * `"halt"` — halt the agent run on rejection.
2729
- *
2730
- * Standalone DSL usage ignores this field.
2731
- */
2732
2118
  readonly humanApprovalToolBehavior: {
2733
2119
  onRejected: "return" | "halt";
2734
2120
  };
2735
2121
  }
2736
- /**
2737
- * Returns `true` when `node` was created by {@link defineHumanApprovalNode}.
2738
- * Uses the `humanApprovalToolBehavior` typed field as the discriminant.
2739
- */
2740
2122
  declare function isHumanApprovalNode(node: unknown): node is DefinedHumanApprovalNode<string, Record<string, unknown>, Record<string, unknown>, undefined>;
2741
- /**
2742
- * Authoring helper that compiles a HITL approval channel down to a regular
2743
- * {@link defineNode}-backed node with `SuspensionRequest` semantics.
2744
- *
2745
- * **Fast-forward decision semantics:**
2746
- * - On the first `execute` call (no `ctx.resumeContext`): throws a `SuspensionRequest`
2747
- * that calls the author's `deliver`. The engine persists the suspension and continues.
2748
- * - On resume (`ctx.resumeContext` set): calls `onDecision`/`onTimeout` as appropriate,
2749
- * merges a `decision` key into `item.json`, and returns an item with the original
2750
- * `binary` map passed by reference (no copy).
2751
- *
2752
- * **Output shape per item:**
2753
- * ```ts
2754
- * // Input: { json: { invoiceId: 42 }, binary?: {...} }
2755
- * // Output: { json: { invoiceId: 42, decision: { status: "approved", actor, decidedAt } }, binary: <unchanged> }
2756
- * ```
2757
- * If `item.json` already has a `decision` key it is **overwritten**. Namespace as
2758
- * needed if your schema reserves that key for another purpose.
2759
- *
2760
- * **Predicate persistence:**
2761
- * The `approvedPredicate` function is NOT serialized to the suspension record (except
2762
- * as an audit-only string via `toString()`). On resume, the workflow definition is
2763
- * reloaded from code at process start and the predicate closure is rebuilt naturally.
2764
- * If a deploy ships a changed predicate between suspend and resume, the *new* predicate
2765
- * runs — document this in your runbook when the predicate carries business logic that
2766
- * may change across deploys.
2767
- *
2768
- * @example
2769
- * ```ts
2770
- * export const slackApprovalNode = defineHumanApprovalNode({
2771
- * key: "my-plugin.slackApproval",
2772
- * title: "Slack Approval",
2773
- * channel: "slack",
2774
- * configSchema: z.object({ channel: z.string(), message: z.string() }),
2775
- * decisionSchema: z.object({ approved: z.boolean(), note: z.string().optional() }),
2776
- *
2777
- * async deliver({ task, config, item }, ctx) {
2778
- * const ts = await postSlackMessage(config.channel, `Approve? <${task.resumeUrl}>`);
2779
- * return { channel: config.channel, ts };
2780
- * },
2781
- *
2782
- * async onDecision({ decision, actor, delivery }, ctx) {
2783
- * await updateSlackMessage(delivery.channel, delivery.ts, decision.approved ? "✅" : "❌");
2784
- * },
2785
- * });
2786
- * ```
2787
- */
2788
2123
  declare function defineHumanApprovalNode<TKey$1 extends string, TConfig extends CredentialJsonRecord, TInputJson$1 extends Record<string, unknown>, TDecision extends Record<string, unknown>, TDelivery extends JsonValue, TBindings extends DefinedNodeCredentialBindings | undefined = undefined>(opts: {
2789
2124
  key: TKey$1;
2790
2125
  title: string;
@@ -2795,16 +2130,8 @@ declare function defineHumanApprovalNode<TKey$1 extends string, TConfig extends
2795
2130
  inputSchema?: ZodType<TInputJson$1>;
2796
2131
  decisionSchema: ZodType<TDecision>;
2797
2132
  credentials?: TBindings;
2798
- /**
2799
- * Custom predicate that decides whether a decision counts as "approved".
2800
- * When omitted, the helper checks if `decisionSchema` is a Zod object with an
2801
- * `approved: boolean` field; if so it uses `decision.approved === true`.
2802
- * If neither holds, `defineHumanApprovalNode` throws at **definition time** (not runtime).
2803
- */
2804
2133
  approvedPredicate?: (decision: TDecision) => boolean;
2805
- /** Default suspension timeout. Defaults to `"24h"`. */
2806
2134
  defaultTimeout?: Duration;
2807
- /** What to do when the task times out. Defaults to `"halt"`. */
2808
2135
  defaultOnTimeout?: "halt" | "auto-accept";
2809
2136
  inspectorSummary?: (config: TConfig) => ReadonlyArray<NodeInspectorSummaryRow> | undefined;
2810
2137
  deliver: (args: {
@@ -2829,30 +2156,6 @@ declare function defineHumanApprovalNode<TKey$1 extends string, TConfig extends
2829
2156
  }): DefinedHumanApprovalNode<TKey$1, TConfig, TInputJson$1, TBindings>;
2830
2157
  //#endregion
2831
2158
  //#region src/workflow/dsl/workflowBuilderTypes.d.ts
2832
- /**
2833
- * Flags a node's config so its output is MERGED onto `item.json` (shallow, output-wins) instead of
2834
- * replacing it — the config-level twin of {@link ChainCursor.thenMerge}.
2835
- *
2836
- * Unlike `.thenMerge` (a cursor method that only works on the trunk), `mergeForward` operates on a
2837
- * bare config, so it is usable in ANY position — including inside a `.when({ true: [...] })` branch
2838
- * arm, where the steps are a flat array of configs (not a cursor). Wrap a payload-REPLACING node
2839
- * (e.g. an extractor) in `mergeForward(node.create(...))` so prior fields survive into the next step.
2840
- *
2841
- * The OUTPUT type becomes `TIn & TOut` (the intersection), mirroring `.thenMerge`'s return type at
2842
- * the config level — so the next step in the branch array sees both the prior fields and the node's
2843
- * output. The INPUT type stays `TIn` (the node still receives the pre-merge item).
2844
- *
2845
- * @example
2846
- * ```ts
2847
- * workflow
2848
- * .trigger(...)
2849
- * .when({
2850
- * true: [mergeForward(extractor.create(...))], // output merges onto item.json; { a } survives
2851
- * false: [...],
2852
- * })
2853
- * .build();
2854
- * ```
2855
- */
2856
2159
  declare function mergeForward<TIn, TOut>(config: RunnableNodeConfig<TIn, TOut>): RunnableNodeConfig<TIn, TIn & TOut>;
2857
2160
  type AnyRunnableNodeConfig = RunnableNodeConfig<any, any>;
2858
2161
  type AnyTriggerNodeConfig = TriggerNodeConfig<any>;
@@ -2868,7 +2171,6 @@ type BooleanWhenOverloads<TCurrentJson, TReturn> = {
2868
2171
  };
2869
2172
  //#endregion
2870
2173
  //#region src/workflow/dsl/WhenBuilder.d.ts
2871
- /** Structurally identical to ChainCursorResolver's (unexported) ChainCursorEndpoint. */
2872
2174
  type WhenEndpoint = Readonly<{
2873
2175
  node: NodeRef;
2874
2176
  output: OutputPortKey;
@@ -2878,32 +2180,17 @@ declare class WhenBuilder<TCurrentJson> {
2878
2180
  private readonly wf;
2879
2181
  private readonly from;
2880
2182
  private readonly branchPort;
2881
- /** Tails of arms added by earlier `.when(...)` calls in this chain. */
2882
2183
  private readonly priorEndpoints;
2883
- /** Tail endpoint of the arm this builder added (set by addBranch). */
2884
2184
  private armEndpoint;
2885
- constructor(wf: WorkflowBuilder, from: NodeRef, branchPort: OutputPortKey, /** Tails of arms added by earlier `.when(...)` calls in this chain. */
2886
- priorEndpoints?: ReadonlyArray<WhenEndpoint>);
2185
+ constructor(wf: WorkflowBuilder, from: NodeRef, branchPort: OutputPortKey, priorEndpoints?: ReadonlyArray<WhenEndpoint>);
2887
2186
  addBranch<TSteps extends ReadonlyArray<AnyRunnableNodeConfig>>(steps: TSteps & ValidStepSequence<TCurrentJson, TSteps>): this;
2888
2187
  readonly when: BooleanWhenOverloads<TCurrentJson, WhenBuilder<TCurrentJson>>;
2889
- /**
2890
- * Continue the trunk after a boolean `.when(...)` branch chain, auto-merging EVERY branch
2891
- * tail accumulated across the chain into the next node — the same fan-in the object form
2892
- * produces. Typed as `ChainCursor<TCurrentJson>` (the pre-branch item type): boolean arms
2893
- * carry no output guard so the merged item type is underdetermined — use the object form
2894
- * `.when({ true: [...], false: [...] })` when you need a precise merged type inline.
2895
- */
2896
2188
  then<TOutputJson$1, TConfig extends RunnableNodeConfig<TCurrentJson, TOutputJson$1>>(config: TConfig): ChainCursor<RunnableNodeOutputJson<TConfig>>;
2897
- /**
2898
- * Chainable human-approval step after a boolean `.when(...)` branch chain — merges every
2899
- * branch tail into the approval node. Mirrors `ChainCursor.humanApproval`.
2900
- */
2901
2189
  humanApproval<TKey$1 extends string, TConfig extends Record<string, unknown>, TBindings extends DefinedNodeCredentialBindings | undefined = undefined>(node: DefinedHumanApprovalNode<TKey$1, TConfig, TCurrentJson & Record<string, unknown>, TBindings>, config: TConfig, metadata?: {
2902
2190
  name?: string;
2903
2191
  nodeId?: string;
2904
2192
  }): ChainCursor<HumanApprovalOutputJson<TCurrentJson & Record<string, unknown>>>;
2905
2193
  build(): WorkflowDefinition;
2906
- /** Endpoints of every arm added so far in this chain (prior arms + this one). */
2907
2194
  private get accumulatedEndpoints();
2908
2195
  private toCursor;
2909
2196
  }
@@ -2925,30 +2212,10 @@ declare class ChainCursor<TCurrentJson> {
2925
2212
  private readonly endpoints;
2926
2213
  constructor(wf: WorkflowBuilder, endpoints: ReadonlyArray<ChainCursorEndpoint>);
2927
2214
  then<TOutputJson$1, TConfig extends RunnableNodeConfig<TCurrentJson, TOutputJson$1>>(config: TConfig): ChainCursor<RunnableNodeOutputJson<TConfig>>;
2928
- /**
2929
- * Append a step whose output is MERGED onto `item.json` (shallow, output-wins) instead of
2930
- * replacing it — so earlier fields (e.g. trigger metadata) survive a transform/OCR/extraction
2931
- * node. Use for any node in a pipeline where you need data from before it.
2932
- */
2933
2215
  thenMerge<TOutputJson$1, TConfig extends RunnableNodeConfig<TCurrentJson, TOutputJson$1>>(config: TConfig): ChainCursor<TCurrentJson & RunnableNodeOutputJson<TConfig>>;
2934
2216
  thenIntoInputHints<TOutputJson$1, TConfig extends RunnableNodeConfig<any, TOutputJson$1>>(config: TConfig): ChainCursor<RunnableNodeOutputJson<TConfig>>;
2935
2217
  readonly when: ChainCursorWhenOverloads<TCurrentJson>;
2936
2218
  route<TNextJson$1>(branches: Readonly<Record<OutputPortKey, (branch: ChainCursor<TCurrentJson>) => ChainCursor<TNextJson$1> | undefined>>): ChainCursor<TNextJson$1>;
2937
- /**
2938
- * Chainable shorthand for `.then(node.create(config, metadata?.name, metadata?.nodeId))`.
2939
- *
2940
- * Signals to readers that this step suspends the run and waits for a human decision.
2941
- * Throws at workflow-build time if `node` was not created via `defineHumanApprovalNode`.
2942
- *
2943
- * @example
2944
- * ```ts
2945
- * workflow
2946
- * .trigger(...)
2947
- * .humanApproval(inboxApproval, { title: "Approve?", body: "...", priority: "normal" })
2948
- * .then(nextStep.create(...))
2949
- * .build();
2950
- * ```
2951
- */
2952
2219
  humanApproval<TKey$1 extends string, TConfig extends Record<string, unknown>, TBindings extends DefinedNodeCredentialBindings | undefined = undefined>(node: DefinedHumanApprovalNode<TKey$1, TConfig, TCurrentJson & Record<string, unknown>, TBindings>, config: TConfig, metadata?: {
2953
2220
  name?: string;
2954
2221
  nodeId?: string;
@@ -2976,51 +2243,22 @@ declare class WorkflowBuilder {
2976
2243
  }
2977
2244
  //#endregion
2978
2245
  //#region src/workflow/dsl/WorkflowDefinitionError.d.ts
2979
- /**
2980
- * Thrown by {@link WorkflowBuilder.build} when the workflow definition is structurally invalid.
2981
- *
2982
- * Common causes:
2983
- * - A node has an empty effective id (label is blank and no explicit `id` was given).
2984
- * - Two or more nodes share the same effective id (label slugs collide or explicit ids clash).
2985
- *
2986
- * Fix: provide an explicit `id:` on the offending node configs.
2987
- */
2988
2246
  declare class WorkflowDefinitionError extends Error {
2989
2247
  constructor(message: string);
2990
2248
  }
2991
2249
  //#endregion
2992
2250
  //#region src/workflow/dsl/NodeIdSlugifier.d.ts
2993
- /**
2994
- * Converts a human-readable node label into a stable, URL-safe identifier segment.
2995
- *
2996
- * Rules:
2997
- * - Lowercase the entire string.
2998
- * - Replace every run of characters outside `[a-z0-9]` with a single `-`.
2999
- * - Strip any leading or trailing `-` characters.
3000
- * - Return `""` for blank/empty input.
3001
- */
3002
2251
  declare const NodeIdSlugifier: {
3003
2252
  slugify(label: string): string;
3004
2253
  };
3005
2254
  //#endregion
3006
2255
  //#region src/workflow/definition/ConnectionInvocationIdFactory.d.ts
3007
- /**
3008
- * Unique ids for persisted connection invocation history rows (LLM/tool calls under an owning node).
3009
- *
3010
- * Uses Web Crypto's `randomUUID` so this module is safe in browser-bundle contexts —
3011
- * paired with `NodeIterationIdFactory` which had the same `node:crypto` regression.
3012
- */
3013
2256
  declare class ConnectionInvocationIdFactory {
3014
2257
  static create(): string;
3015
- /** Deterministic id for tests when a stable sequence is needed. */
3016
2258
  static createForTest(runId: string, connectionNodeId: NodeId, sequence: number): string;
3017
2259
  }
3018
2260
  //#endregion
3019
2261
  //#region src/workflow/definition/ConnectionNodeIdFactory.d.ts
3020
- /**
3021
- * Deterministic ids for workflow connection-owned child nodes (LLM slot, tools, etc.).
3022
- * These are stable across loads.
3023
- */
3024
2262
  declare class ConnectionNodeIdFactory {
3025
2263
  static readonly connectionSegment: "__conn__";
3026
2264
  static languageModelConnectionNodeId(parentNodeId: NodeId): NodeId;
@@ -3040,36 +2278,18 @@ declare class ConnectionNodeIdFactory {
3040
2278
  parentNodeId: NodeId;
3041
2279
  normalizedToolName: string;
3042
2280
  }> | undefined;
3043
- /** True when `nodeId` is a connection-owned child of `parentNodeId` (LLM or tool slot). */
3044
2281
  static isConnectionOwnedDescendantOf(parentNodeId: NodeId, nodeId: NodeId): boolean;
3045
- /** Normalizes a tool display name to a stable id segment. */
3046
2282
  static normalizeToolName(toolName: string): string;
3047
2283
  }
3048
2284
  //#endregion
3049
2285
  //#region src/workflow/definition/NodeIterationIdFactory.d.ts
3050
- /**
3051
- * Unique ids for one per-item iteration of a runnable node's execute loop.
3052
- *
3053
- * Activations are per-batch (one scheduled execution of a node, possibly with N items).
3054
- * Iterations refine that to one identifier per item-index inside the batch loop, so per-item
3055
- * connection invocations and telemetry can be grouped without time-window heuristics.
3056
- *
3057
- * Uses Web Crypto's `randomUUID` (Node 19+ and all modern browsers) so this module is safe
3058
- * to include in the browser entry. Importing `node:crypto` here previously leaked into the
3059
- * canvas client bundle through `browser.ts` and OOM'd consumers' Turbopack builds.
3060
- */
3061
2286
  declare class NodeIterationIdFactory {
3062
2287
  static create(): string;
3063
- /** Deterministic id for tests when a stable sequence is needed. */
3064
2288
  static createForTest(seed: string, sequence: number): string;
3065
- /** Deterministic id derived from a connection node id (for sub-agent / tool-call scopes). */
3066
2289
  static createForConnection(connectionNodeId: NodeId, sequence: number): string;
3067
2290
  }
3068
2291
  //#endregion
3069
2292
  //#region src/workflow/definition/WorkflowExecutableNodeClassifier.d.ts
3070
- /**
3071
- * Derives which workflow nodes participate in the main execution graph vs connection-only children.
3072
- */
3073
2293
  declare class WorkflowExecutableNodeClassifier {
3074
2294
  private readonly connectionOwnedIds;
3075
2295
  constructor(workflow: WorkflowDefinition);
@@ -3077,9 +2297,6 @@ declare class WorkflowExecutableNodeClassifier {
3077
2297
  isExecutableNodeId(nodeId: NodeId): boolean;
3078
2298
  filterExecutableNodeDefinitions(nodes: ReadonlyArray<NodeDefinition>): ReadonlyArray<NodeDefinition>;
3079
2299
  private collectConnectionOwnedIds;
3080
- /**
3081
- * Resolves the default start node: first trigger, else first executable node with no incoming edges from executable nodes.
3082
- */
3083
2300
  findDefaultExecutableStartNodeId(workflow: WorkflowDefinition): NodeId;
3084
2301
  firstExecutableNodeIdInDefinitionOrder(workflow: WorkflowDefinition): NodeId | undefined;
3085
2302
  lastExecutableNodeIdInDefinitionOrder(workflow: WorkflowDefinition): NodeId;
@@ -3095,5 +2312,5 @@ declare class DefaultWorkflowGraphFactory implements WorkflowGraphFactory {
3095
2312
  create(def: WorkflowDefinition): WorkflowGraph;
3096
2313
  }
3097
2314
  //#endregion
3098
- export { ExecutionInstanceDto as $, CredentialAuthDefinition as $a, TriggerCleanupHandle as $i, ActivationIdFactory as $n, WorkflowStoragePolicySpec as $r, PersistedRunControlState as $t, DefinedNodeConfigInput as A, TelemetryScope as Aa, LiveWorkflowRepository as Ai, TypeToken as An, PersistedTokenId as Ao, RunDataFactory as Ar, AssertionResult as At, NoOpCostTrackingTelemetry as B, NoOpTelemetrySpanScope as Ba, NodeExecutionRequestHandler as Bi, singleton as Bn, UpstreamRefPlaceholder as Br, ConnectionInvocationId as Bt, HumanApprovalOutputJson as C, NodeExecutionTelemetry as Ca, ExecutionContext as Ci, WorkflowExecutionRepository as Cn, NoOpPollingTriggerLogger as Co, NodeOffloadPolicy as Cr, ItemExprCallback as Ct, DefineNodeExecuteArgs as D, TelemetryAttributes as Da, HumanTaskId as Di, InjectionToken$1 as Dn, NodeConnectionName as Do, PairedItemRef as Dr, itemExpr as Dt, DefineBatchNodeOptions as E, TelemetryAttributePrimitive as Ea, HumanTaskHandle as Ei, Disposable as En, InputPortKey as Eo, NodeSchedulerDecision as Er, isItemExpr as Et, defineBatchNode as F, GenAiTelemetryAttributeNames as Fa, NodeActivationRequestBase as Fi, injectable as Fn, RunnableNodeInputJson as Fr, AgentBindError as Ft, PortsEmission as G, CostTrackingTelemetryAttributeNames as Ga, PersistedTriggerSetupState as Gi, RunEvent as Gn, WorkflowGraph as Gr, NodeExecutionError as Gt, RetryPolicy as H, CostTrackingComponent as Ha, NodeExecutionStatePublisher as Hi, ENGINE_EXECUTION_LIMITS_DEFAULTS as Hn, WorkflowErrorContext as Hr, CurrentStateExecutionRequest as Ht, defineNode as I, CodemationTelemetryAttributeNames as Ia, NodeActivationScheduler as Ii, instanceCachingFactory as In, RunnableNodeOutputJson as Ir, AgentMcpIntegration as It, isUnbrandedPortsEmissionShape as J, CostTrackingUsageRecord as Ja, ResumeContext as Ji, TestCaseRunStatus as Jn, WorkflowPolicyRuntimeDefaults as Jr, NodeInputsByPort as Jt, emitPorts as K, CostTrackingTelemetryFactory as Ka, PollingTriggerHandle as Ki, RunEventBus as Kn, WorkflowGraphFactory as Kr, NodeExecutionSnapshot as Kt, NodeBaseOptions as L, NoOpExecutionTelemetryFactory as La, NodeBinaryAttachmentService as Li, instancePerContainerCachingFactory as Ln, TriggerNodeConfig as Lr, AgentMcpToolMap as Lt, DefinedNodeCredentialBinding as M, TelemetrySpanEventRecord as Ma, NodeActivationContinuation as Mi, delay as Mn, RunId as Mr, DEFAULT_ASSERTION_PASS_THRESHOLD as Mt, DefinedNodeCredentialBindings as N, TelemetrySpanScope as Na, NodeActivationReceipt as Ni, inject as Nn, RunIdFactory as Nr, deriveAssertionPassed as Nt, DefineNodeOptions as O, TelemetryChildSpanStart as Oa, HumanTaskSubject as Oi, Lifecycle as On, NodeId as Oo, ParentExecutionRef as Or, resolveItemExprsForExecution as Ot, DefinedNodeRunContext as P, CodemationTelemetryMetricNames as Pa, NodeActivationRequest as Pi, injectAll as Pn, RunnableNodeConfig as Pr, NoOpAgentMcpIntegration as Pt, ConnectionInvocationKind as Q, CredentialAdvancedSectionPresentation as Qa, TestableTriggerNode as Qi, TestTriggerSetupContext as Qn, WorkflowStoragePolicyResolver as Qr, PersistedMutableRunState as Qt, RunFinishedAtFactory as R, NoOpExecutionTelemetry as Ra, NodeExecutionContext as Ri, predicateAwareClassFactory as Rn, TriggerNodeOutputJson as Rr, NeedsReconsentEvent as Rt, HumanApprovalDecisionResult as S, ExecutionTelemetryFactory as Sa, ExecutionBinaryService as Si, WorkflowExecutionPruneRepository as Sn, OAuth2ProviderFromPublicConfig as So, NodeKind as Sr, ItemExprArgs as St, isHumanApprovalNode as T, TelemetryArtifactReference as Ta, HumanTaskActor as Ti, DependencyContainer$1 as Tn, PollingTriggerDedupWindow as To, NodeRef as Tr, ItemExprResolvedContext as Tt, NoRetryPolicy as U, CostTrackingPriceQuote as Ua, NodeExecutor as Ui, EngineExecutionLimitsPolicy as Un, WorkflowErrorHandler as Ur, EngineRunCounters as Ut, ExpRetryPolicy as V, NoOpTelemetryArtifactReference as Va, NodeExecutionScheduler as Vi, CoreTokens as Vn, WorkflowDefinition as Vr, ConnectionInvocationRecord as Vt, getOriginIndexFromItem as W, CostTrackingTelemetry as Wa, NodeResolver as Wi, EngineExecutionLimitsPolicyConfig as Wn, WorkflowErrorHandlerSpec as Wr, ExecutionFrontierPlan as Wt, McpServerTransport as X, CollectionsContext as Xa, RunnableNodeExecuteArgs as Xi, TestSuiteRunId as Xn, WorkflowStoragePolicyDecisionArgs as Xr, PendingResumeEntry as Xt, McpServerDeclaration as Y, CollectionStore as Ya, RunnableNode as Yi, TestSuiteRunStatus as Yn, WorkflowPrunePolicySpec as Yr, PendingNodeExecution as Yt, BatchId as Z, AnyCredentialType as Za, SuspensionRequest as Zi, TestTriggerNodeConfig as Zn, WorkflowStoragePolicyMode as Zr, PersistedMutableNodeState as Zt, BranchStepsArg as _, WebhookTriggerResolution as _a, BinaryStorageWriteResult as _i, RunStopCondition as _n, CredentialType as _o, NodeErrorHandlerArgs as _r, CostCatalogEntry as _t, ConnectionNodeIdFactory as a, TriggerTestItemsContext as aa, triggerNodeSetupStateType as ai, PersistedWorkflowTokenRegistryLike as an, CredentialHealthTester as ao, ItemBinary as ar, PersistedRunSlotProjectionRecord as at, mergeForward as b, WorkflowActivationPolicy as ba, EngineHost as bi, WebhookRunResult as bn, CredentialTypeRegistry as bo, NodeInspectorSummaryRow as br, ParamDeep as bt, WorkflowDefinitionError as c, WorkflowRunnerResolver as ca, NoneRetryPolicySpec as ci, RunCurrentState as cn, CredentialJsonRecord as co, JsonNonArray as cr, RunIterationDto as ct, WhenBuilder as d, WorkflowSnapshotResolver as da, BinaryAttachmentCreateRequest as di, RunHaltReason as dn, CredentialOAuth2ScopesFromPublicConfig as do, JsonValue as dr, SlotExecutionStateDto as dt, TriggerNode as ea, branchRef as ei, PersistedRunSchedulingState as en, CredentialBinding as eo, BinaryAttachment as er, ExecutionInstanceId as et, AnyRunnableNodeConfig as f, HttpMethod as fa, BinaryBody as fi, RunPruneCandidate as fn, CredentialRequirement as fo, MutableRunData as fr, WorkItemId as ft, BranchOutputGuard as g, WebhookTriggerMatcher as ga, BinaryStorageWriteRequest as gi, RunStatus as gn, CredentialSetupStatus as go, NodeErrorHandler as gr, CostCatalog as gt, BranchMoreArgs as h, WebhookInvocationMatch as ha, BinaryStorageStatResult as hi, RunStateResetRequest as hn, CredentialSessionService as ho, NodeDefinition as hr, WorkflowRunDetailDto as ht, NodeIterationIdFactory as i, TriggerSetupStateRepository as ia, triggerNodeOutputType as ii, PersistedWorkflowSnapshotNode as in, CredentialHealthStatus as io, Item as ir, PersistedExecutionInstanceRecord as it, DefinedNodeCredentialAccessors as j, TelemetrySpanEnd as ja, MultiInputNode as ji, container$1 as jn, WorkflowId as jo, RunDataSnapshot as jr, AssertionResultProvenance as jt, DefinedNode as k, TelemetryMetricRecord as ka, ItemNode as ki, RegistrationOptions as kn, OutputPortKey as ko, PersistedRunPolicySnapshot as kr, resolveItemExprsInUnknown as kt, WorkflowBuilder as l, WorkflowRunnerService as la, RetryPolicySpec as li, RunEventPublisherDeps as ln, CredentialMaterialSourceKind as lo, JsonObject as lr, RunRevision as lt, BooleanWhenOverloads as m, WebhookControlSignal as ma, BinaryStorageReadResult as mi, RunResult as mn, CredentialSessionFactoryArgs as mo, NodeConfigBase as mr, WorkflowDetailSelectionState as mt, WorkflowExecutableNodeClassifierFactory as n, TriggerSetupContext as na, runnableNodeInputType as ni, PersistedSuspensionEntry as nn, CredentialFieldSchema as no, Edge as nr, PayloadStorageKind as nt, ConnectionInvocationIdFactory as o, WorkflowNodeInstanceFactory as oa, ExponentialRetryPolicySpec as oi, PinnedNodeOutputsByPort as on, CredentialInstanceId as oo, Items as or, PersistedRunWorkItemKind as ot, AnyTriggerNodeConfig as p, TriggerInstanceId as pa, BinaryStorage as pi, RunQueueEntry as pn, CredentialSessionFactory as po, NodeActivationId as pr, WorkItemStatus as pt, isPortsEmission as q, CostTrackingTelemetryMetricNames as qa, PreparedNodeActivationDispatch as qi, RunEventSubscription as qn, WorkflowNodeConnection as qr, NodeExecutionStatus as qt, WorkflowExecutableNodeClassifier as r, TriggerSetupStateFor as ra, runnableNodeOutputType as ri, PersistedWorkflowSnapshot as rn, CredentialHealth as ro, ExecutionMode as rr, PersistedExecutionInstanceKind as rt, NodeIdSlugifier as s, WorkflowRepository as sa, FixedRetryPolicySpec as si, RunCompletionNotifier as sn, CredentialInstanceRecord as so, JsonArray as sr, PersistedRunWorkItemRecord as st, DefaultWorkflowGraphFactory as t, TriggerRuntimeDiagnostics as ta, nodeRef as ti, PersistedRunState as tn, CredentialBindingKey as to, BinaryPreviewKind as tr, ExecutionPayloadPolicyFields as tt, ChainCursor as u, WorkflowSnapshotFactory as ua, BINARY_DEFAULT_MAX_BYTES as ui, RunExecutionOptions as un, CredentialOAuth2AuthDefinition as uo, JsonPrimitive as ur, RunSlotProjectionState as ut, StepSequenceOutput as v, WebhookTriggerRoutingDiagnostics as va, Duration as vi, RunSummary as vn, CredentialTypeDefinition as vo, NodeErrorHandlerSpec as vr, Expr as vt, defineHumanApprovalNode as w, TelemetryArtifactAttachment as wa, ExecutionContextFactory as wi, Container as wn, PollingTriggerLogger as wo, NodeOutputs as wr, ItemExprContext as wt, DefinedHumanApprovalNode as x, ExecutionTelemetry as xa, ExecutableTriggerNode as xi, WorkflowExecutionListingRepository as xn, CredentialUnboundError as xo, NodeIterationId as xr, ItemExpr as xt, ValidStepSequence as y, AllWorkflowsActiveWorkflowActivationPolicy as ya, EngineDeps as yi, RunTestContext as yn, CredentialTypeId as yo, NodeIdRef as yr, Param as yt, NoOpCostTrackingTelemetryFactory as z, NoOpNodeExecutionTelemetry as za, NodeExecutionRequest as zi, registry as zn, TriggerNodeSetupState as zr, ConnectionInvocationAppendArgs as zt };
3099
- //# sourceMappingURL=index-CbJdbIHe.d.ts.map
2315
+ export { ManifestNodeCredentialShape as $, NoOpExecutionTelemetryFactory as $a, NodeExecutionContext as $i, singleton as $n, TriggerNodeOutputJson as $r, ConnectionInvocationId as $t, DefinedNodeConfigInput as A, WebhookControlSignal as Aa, BinaryStorageStatResult as Ai, RunStopCondition as An, CredentialRequirement as Ao, NodeErrorHandler as Ar, ItemExprArgs as At, NoOpCostTrackingTelemetry as B, TelemetryArtifactAttachment as Ba, HumanTaskActor as Bi, InjectionToken$1 as Bn, OAuth2ProviderFromPublicConfig as Bo, NodeSchedulerDecision as Br, DEFAULT_ASSERTION_PASS_THRESHOLD as Bt, HumanApprovalOutputJson as C, WorkflowRepository as Ca, NoneRetryPolicySpec as Ci, RunExecutionOptions as Cn, CredentialHealthTester as Co, JsonObject as Cr, WorkflowRunDetailDto as Ct, DefineNodeExecuteArgs as D, WorkflowSnapshotResolver as Da, BinaryBody as Di, RunResult as Dn, CredentialMaterialSourceKind as Do, NodeActivationId as Dr, Param as Dt, DefineBatchNodeOptions as E, WorkflowSnapshotFactory as Ea, BinaryAttachmentCreateRequest as Ei, RunQueueEntry as En, CredentialJsonRecord as Eo, MutableRunData as Er, Expr as Et, defineBatchNode as F, AllWorkflowsActiveWorkflowActivationPolicy as Fa, EngineHost as Fi, WorkflowExecutionPruneRepository as Fn, CredentialType as Fo, NodeIterationId as Fr, itemExpr as Ft, PortsEmission as G, TelemetryMetricRecord as Ga, LiveWorkflowRepository as Gi, delay as Gn, NodeConnectionName as Go, RunDataFactory as Gr, WorkflowDispatch as Gt, RetryPolicy as H, TelemetryAttributePrimitive as Ha, HumanTaskId as Hi, RegistrationOptions as Hn, PollingTriggerLogger as Ho, ParentExecutionRef as Hr, NoOpAgentMcpIntegration as Ht, defineNode as I, WorkflowActivationPolicy as Ia, ExecutableTriggerNode as Ii, WorkflowExecutionRepository as In, CredentialTypeDefinition as Io, NodeKind as Ir, resolveItemExprsForExecution as It, isUnbrandedPortsEmissionShape as J, TelemetrySpanEventRecord as Ja, NodeActivationReceipt as Ji, injectable as Jn, PersistedTokenId as Jo, RunIdFactory as Jr, serializeDispatch as Jt, emitPorts as K, TelemetryScope as Ka, MultiInputNode as Ki, inject as Kn, NodeId as Ko, RunDataSnapshot as Kr, WorkspaceId as Kt, NodeBaseOptions as L, ExecutionTelemetry as La, ExecutionBinaryService as Li, Container as Ln, CredentialTypeId as Lo, NodeOffloadPolicy as Lr, resolveItemExprsInUnknown as Lt, DefinedNodeCredentialBinding as M, WebhookTriggerMatcher as Ma, BinaryStorageWriteResult as Mi, RunTestContext as Mn, CredentialSessionFactoryArgs as Mo, NodeErrorHandlerSpec as Mr, ItemExprContext as Mt, DefinedNodeCredentialBindings as N, WebhookTriggerResolution as Na, Duration as Ni, WebhookRunResult as Nn, CredentialSessionService as No, NodeIdRef as Nr, ItemExprResolvedContext as Nt, DefineNodeOptions as O, HttpMethod as Oa, BinaryStorage as Oi, RunStateResetRequest as On, CredentialOAuth2AuthDefinition as Oo, NodeConfigBase as Or, ParamDeep as Ot, DefinedNodeRunContext as P, WebhookTriggerRoutingDiagnostics as Pa, EngineDeps as Pi, WorkflowExecutionListingRepository as Pn, CredentialSetupStatus as Po, NodeInspectorSummaryRow as Pr, isItemExpr as Pt, DeploymentManifestSchemaVersion as Q, CodemationTelemetryAttributeNames as Qa, NodeBinaryAttachmentService as Qi, registry as Qn, TriggerNodeConfig as Qr, ConnectionInvocationAppendArgs as Qt, RunFinishedAtFactory as R, ExecutionTelemetryFactory as Ra, ExecutionContext as Ri, DependencyContainer$1 as Rn, CredentialTypeRegistry as Ro, NodeOutputs as Rr, AssertionResult as Rt, HumanApprovalDecisionResult as S, WorkflowNodeInstanceFactory as Sa, FixedRetryPolicySpec as Si, RunEventPublisherDeps as Sn, CredentialHealthStatus as So, JsonNonArray as Sr, WorkflowDetailSelectionState as St, isHumanApprovalNode as T, WorkflowRunnerService as Ta, BINARY_DEFAULT_MAX_BYTES as Ti, RunPruneCandidate as Tn, CredentialInstanceRecord as To, JsonValue as Tr, CostCatalogEntry as Tt, NoRetryPolicy as U, TelemetryAttributes as Ua, HumanTaskSubject as Ui, TypeToken as Un, PollingTriggerDedupWindow as Uo, PersistedRunPolicySnapshot as Ur, AgentBindError as Ut, ExpRetryPolicy as V, TelemetryArtifactReference as Va, HumanTaskHandle as Vi, Lifecycle as Vn, NoOpPollingTriggerLogger as Vo, PairedItemRef as Vr, deriveAssertionPassed as Vt, getOriginIndexFromItem as W, TelemetryChildSpanStart as Wa, ItemNode as Wi, container$1 as Wn, InputPortKey as Wo, PollingTriggerConfig as Wr, DispatchItemMeta as Wt, McpServerTransport as X, CodemationTelemetryMetricNames as Xa, NodeActivationRequestBase as Xi, instancePerContainerCachingFactory as Xn, RunnableNodeInputJson as Xr, AgentMcpToolMap as Xt, McpServerDeclaration as Y, TelemetrySpanScope as Ya, NodeActivationRequest as Yi, instanceCachingFactory as Yn, WorkflowId as Yo, RunnableNodeConfig as Yr, AgentMcpIntegration as Yt, DEPLOYMENT_MANIFEST_SCHEMA_VERSION as Z, GenAiTelemetryAttributeNames as Za, NodeActivationScheduler as Zi, predicateAwareClassFactory as Zn, RunnableNodeOutputJson as Zr, NeedsReconsentEvent as Zt, BranchStepsArg as _, TriggerRuntimeDiagnostics as _a, runnableNodeInputType as _i, PersistedWorkflowSnapshotNode as _n, CredentialAuthDefinition as _o, ExecutionMode as _r, RunRevision as _t, ConnectionNodeIdFactory as a, NodeResolver as aa, WorkflowErrorHandlerSpec as ai, NodeExecutionSnapshot as an, CostTrackingPriceQuote as ao, RunEvent as ar, BatchId as at, mergeForward as b, TriggerSetupStateRepository as ba, triggerNodeSetupStateType as bi, RunCompletionNotifier as bn, CredentialFieldSchema as bo, Items as br, WorkItemId as bt, WorkflowDefinitionError as c, PreparedNodeActivationDispatch as ca, WorkflowNodeConnection as ci, PendingNodeExecution as cn, CostTrackingTelemetryFactory as co, TestCaseRunStatus as cr, ExecutionInstanceId as ct, WhenBuilder as d, RunnableNodeExecuteArgs as da, WorkflowStoragePolicyDecisionArgs as di, PersistedMutableRunState as dn, CollectionStore as do, TestTriggerNodeConfig as dr, PersistedExecutionInstanceKind as dt, NodeExecutionRequest as ea, TriggerNodeSetupState as ei, ConnectionInvocationRecord as en, NoOpExecutionTelemetry as eo, CoreTokens as er, ManifestTriggerConfig as et, AnyRunnableNodeConfig as f, SuspensionRequest as fa, WorkflowStoragePolicyMode as fi, PersistedRunControlState as fn, CollectionsContext as fo, TestTriggerSetupContext as fr, PersistedExecutionInstanceRecord as ft, BranchOutputGuard as g, TriggerPollingPort as ga, nodeRef as gi, PersistedWorkflowSnapshot as gn, CredentialAdvancedSectionPresentation as go, Edge as gr, RunIterationDto as gt, BranchMoreArgs as h, TriggerNode as ha, branchRef as hi, PersistedSuspensionEntry as hn, CredentialAccessTokenSessionFactory as ho, BinaryPreviewKind as hr, PersistedRunWorkItemRecord as ht, NodeIterationIdFactory as i, NodeExecutor as ia, WorkflowErrorHandler as ii, NodeExecutionError as in, CostTrackingComponent as io, EngineExecutionLimitsPolicyConfig as ir, serializeManifest as it, DefinedNodeCredentialAccessors as j, WebhookInvocationMatch as ja, BinaryStorageWriteRequest as ji, RunSummary as jn, CredentialSessionFactory as jo, NodeErrorHandlerArgs as jr, ItemExprCallback as jt, DefinedNode as k, TriggerInstanceId as ka, BinaryStorageReadResult as ki, RunStatus as kn, CredentialOAuth2ScopesFromPublicConfig as ko, NodeDefinition as kr, ItemExpr as kt, WorkflowBuilder as l, ResumeContext as la, WorkflowPolicyRuntimeDefaults as li, PendingResumeEntry as ln, CostTrackingTelemetryMetricNames as lo, TestSuiteRunStatus as lr, ExecutionPayloadPolicyFields as lt, BooleanWhenOverloads as m, TriggerCleanupHandle as ma, WorkflowStoragePolicySpec as mi, PersistedRunState as mn, CredentialAccessTokenSessionArgs as mo, BinaryAttachment as mr, PersistedRunWorkItemKind as mt, WorkflowExecutableNodeClassifierFactory as n, NodeExecutionScheduler as na, WorkflowDefinition as ni, EngineRunCounters as nn, NoOpTelemetrySpanScope as no, ENGINE_EXECUTION_LIMITS_DEFAULTS as nr, deserializeManifest as nt, ConnectionInvocationIdFactory as o, PersistedTriggerSetupState as oa, WorkflowGraph as oi, NodeExecutionStatus as on, CostTrackingTelemetry as oo, RunEventBus as or, ConnectionInvocationKind as ot, AnyTriggerNodeConfig as p, TestableTriggerNode as pa, WorkflowStoragePolicyResolver as pi, PersistedRunSchedulingState as pn, AnyCredentialType as po, ActivationIdFactory as pr, PersistedRunSlotProjectionRecord as pt, isPortsEmission as q, TelemetrySpanEnd as qa, NodeActivationContinuation as qi, injectAll as qn, OutputPortKey as qo, RunId as qr, deserializeDispatch as qt, WorkflowExecutableNodeClassifier as r, NodeExecutionStatePublisher as ra, WorkflowErrorContext as ri, ExecutionFrontierPlan as rn, NoOpTelemetryArtifactReference as ro, EngineExecutionLimitsPolicy as rr, emitWorkflowManifest as rt, NodeIdSlugifier as s, PollingTriggerHandle as sa, WorkflowGraphFactory as si, NodeInputsByPort as sn, CostTrackingTelemetryAttributeNames as so, RunEventSubscription as sr, ExecutionInstanceDto as st, DefaultWorkflowGraphFactory as t, NodeExecutionRequestHandler as ta, UpstreamRefPlaceholder as ti, CurrentStateExecutionRequest as tn, NoOpNodeExecutionTelemetry as to, TriggerInvoker as tr, WorkflowDeploymentManifest as tt, ChainCursor as u, RunnableNode as ua, WorkflowPrunePolicySpec as ui, PersistedMutableNodeState as un, CostTrackingUsageRecord as uo, TestSuiteRunId as ur, PayloadStorageKind as ut, StepSequenceOutput as v, TriggerSetupContext as va, runnableNodeOutputType as vi, PersistedWorkflowTokenRegistryLike as vn, CredentialBinding as vo, Item as vr, RunSlotProjectionState as vt, defineHumanApprovalNode as w, WorkflowRunnerResolver as wa, RetryPolicySpec as wi, RunHaltReason as wn, CredentialInstanceId as wo, JsonPrimitive as wr, CostCatalog as wt, DefinedHumanApprovalNode as x, TriggerTestItemsContext as xa, ExponentialRetryPolicySpec as xi, RunCurrentState as xn, CredentialHealth as xo, JsonArray as xr, WorkItemStatus as xt, ValidStepSequence as y, TriggerSetupStateFor as ya, triggerNodeOutputType as yi, PinnedNodeOutputsByPort as yn, CredentialBindingKey as yo, ItemBinary as yr, SlotExecutionStateDto as yt, NoOpCostTrackingTelemetryFactory as z, NodeExecutionTelemetry as za, ExecutionContextFactory as zi, Disposable as zn, CredentialUnboundError as zo, NodeRef as zr, AssertionResultProvenance as zt };
2316
+ //# sourceMappingURL=index-CRv3_pY3.d.ts.map