@codemation/core 0.13.2 → 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 (212) hide show
  1. package/CHANGELOG.md +167 -0
  2. package/dist/{CostCatalogContract-Dxq1BTyi.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-Csy2evr_.d.cts → InMemoryRunDataFactory-D2U9azmZ.d.cts} +4 -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-Bi8m-Ijs.d.cts → ItemsInputNormalizer-A5txcOWX.d.cts} +3 -98
  11. package/dist/{ItemsInputNormalizer-BbQTSEkZ.cjs → ItemsInputNormalizer-C1fv3sMW.cjs} +2 -2
  12. package/dist/ItemsInputNormalizer-C1fv3sMW.cjs.map +1 -0
  13. package/dist/{ItemsInputNormalizer-BYljnXU0.d.ts → ItemsInputNormalizer-D2vrMrX1.d.ts} +2 -62
  14. package/dist/{ItemsInputNormalizer-CSZGMgl3.js → ItemsInputNormalizer-fUYo4GLV.js} +2 -2
  15. package/dist/ItemsInputNormalizer-fUYo4GLV.js.map +1 -0
  16. package/dist/{RunIntentService-BitgkKaT.d.cts → RunIntentService-DKxuHTUz.d.cts} +2 -15
  17. package/dist/{RunIntentService-DYpqfu6D.d.ts → RunIntentService-DrpKli2k.d.ts} +2 -22
  18. package/dist/{agentMcpTypes-DGIwk6Ue.d.cts → agentMcpTypes-BHX4RQCC.d.cts} +25 -518
  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-DIv-vloi.cjs → bootstrap-CTB53rEF.cjs} +9 -60
  24. package/dist/bootstrap-CTB53rEF.cjs.map +1 -0
  25. package/dist/{bootstrap-Bkd-Nfbn.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-CN9d7AnL.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-rllWL4r-.d.ts → index-CRv3_pY3.d.ts} +112 -808
  45. package/dist/{index-BSQ2LoIh.d.ts → index-mnLS0iQl.d.ts} +39 -372
  46. package/dist/index.cjs +53 -111
  47. package/dist/index.cjs.map +1 -1
  48. package/dist/index.d.cts +50 -438
  49. package/dist/index.d.ts +5 -5
  50. package/dist/index.js +28 -94
  51. package/dist/index.js.map +1 -1
  52. package/dist/{params-DRUr0F5v.d.cts → params-CrK4iuG1.d.cts} +3 -13
  53. package/dist/{runtime-CWPdvJpC.js → runtime-CBFDpmiz.js} +112 -648
  54. package/dist/runtime-CBFDpmiz.js.map +1 -0
  55. package/dist/{runtime-_VdHwGkJ.cjs → runtime-Due-FOZ2.cjs} +137 -717
  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-LP2qSHkY.cjs → workflowTypes-BW6Hhee7.cjs} +4 -230
  64. package/dist/workflowTypes-BW6Hhee7.cjs.map +1 -0
  65. package/dist/{di-tom0pM2h.js → workflowTypes-DZtBTmKf.js} +3 -163
  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 +18 -32
  77. package/src/authoring/definePollingTrigger.types.ts +36 -155
  78. package/src/authoring/definePollingTriggerInternals.ts +0 -4
  79. package/src/authoring/index.ts +1 -0
  80. package/src/authoring/nodeBaseOptions.types.ts +4 -0
  81. package/src/binaries/boundedReadBinary.types.ts +0 -16
  82. package/src/bootstrap/index.ts +8 -2
  83. package/src/bootstrap/runtime/EngineRuntimeRegistrar.ts +0 -5
  84. package/src/bootstrap/runtime/EngineRuntimeRegistration.types.ts +0 -23
  85. package/src/browser.ts +0 -3
  86. package/src/contracts/AgentBindError.ts +0 -5
  87. package/src/contracts/Clock.ts +0 -1
  88. package/src/contracts/CodemationTelemetryAttributeNames.ts +0 -10
  89. package/src/contracts/NoOpAgentMcpIntegration.ts +0 -6
  90. package/src/contracts/NoOpTelemetrySpanScope.ts +0 -7
  91. package/src/contracts/RetryPolicy.ts +0 -2
  92. package/src/contracts/agentMcpTypes.ts +0 -34
  93. package/src/contracts/assertionTypes.ts +0 -33
  94. package/src/contracts/baseTypes.ts +0 -6
  95. package/src/contracts/collectionTypes.ts +0 -25
  96. package/src/contracts/credentialTypes.ts +13 -60
  97. package/src/contracts/deploymentManifestTypes.ts +158 -0
  98. package/src/contracts/dispatchTypes.ts +29 -0
  99. package/src/contracts/executionPersistenceContracts.ts +0 -33
  100. package/src/contracts/hitlSeamTypes.ts +0 -14
  101. package/src/contracts/humanTaskStoreTypes.ts +0 -2
  102. package/src/contracts/inboxChannelTypes.ts +0 -9
  103. package/src/contracts/index.ts +3 -0
  104. package/src/contracts/itemExpr.ts +7 -21
  105. package/src/contracts/itemMeta.ts +0 -3
  106. package/src/contracts/mcpTypes.ts +0 -16
  107. package/src/contracts/retryPolicySpec.types.ts +0 -10
  108. package/src/contracts/runFinishedAtFactory.ts +0 -1
  109. package/src/contracts/runTypes.ts +0 -74
  110. package/src/contracts/runtimeTypes.ts +4 -131
  111. package/src/contracts/telemetryTypes.ts +0 -7
  112. package/src/contracts/testTriggerTypes.ts +0 -43
  113. package/src/contracts/triggerInvokerTypes.ts +6 -0
  114. package/src/contracts/webhookTypes.ts +0 -8
  115. package/src/contracts/workflowActivationPolicy.ts +0 -5
  116. package/src/contracts/workflowTypes.ts +5 -80
  117. package/src/contracts/workspaceFileTypes.ts +10 -42
  118. package/src/contracts.ts +18 -10
  119. package/src/credentials/CredentialMaterialProvider.types.ts +0 -28
  120. package/src/credentials/ManagedCredentialMaterialWriteError.ts +0 -6
  121. package/src/credentials/ManagedMaterialFetchError.ts +0 -6
  122. package/src/credentials/OAuthFlowExecutor.types.ts +0 -15
  123. package/src/di/CoreTokens.ts +2 -6
  124. package/src/events/ConnectionInvocationEventPublisher.ts +0 -7
  125. package/src/events/NodeEventPublisher.ts +0 -1
  126. package/src/events/runEvents.ts +0 -8
  127. package/src/execution/ActivationEnqueueService.ts +0 -10
  128. package/src/execution/ChildExecutionScopeFactory.ts +0 -13
  129. package/src/execution/FanInMergeByOriginMerger.ts +0 -11
  130. package/src/execution/InProcessRetryRunner.ts +0 -1
  131. package/src/execution/ItemExprResolver.ts +0 -3
  132. package/src/execution/NodeActivationRequestComposer.ts +0 -3
  133. package/src/execution/NodeActivationRequestInputPreparer.ts +0 -5
  134. package/src/execution/NodeExecutionSnapshotFactory.ts +0 -1
  135. package/src/execution/NodeExecutor.ts +1 -17
  136. package/src/execution/NodeOutputNormalizer.ts +8 -1
  137. package/src/execution/NodeSuspensionHandler.ts +1 -39
  138. package/src/execution/PersistedRunStateTerminalBuilder.ts +0 -5
  139. package/src/execution/RunSuspendedError.ts +0 -10
  140. package/src/execution/RunnableOutputBehaviorResolver.ts +12 -0
  141. package/src/execution/WorkflowRunExecutionContextFactory.ts +0 -3
  142. package/src/index.ts +10 -2
  143. package/src/orchestration/AbortControllerFactory.ts +0 -4
  144. package/src/orchestration/Engine.ts +0 -9
  145. package/src/orchestration/NodeExecutionRequestHandlerService.ts +3 -4
  146. package/src/orchestration/RunContinuationService.ts +7 -39
  147. package/src/orchestration/RunStartService.ts +0 -7
  148. package/src/orchestration/TestSuiteOrchestrator.ts +0 -18
  149. package/src/orchestration/TestSuiteRunIdFactory.ts +0 -4
  150. package/src/orchestration/TriggerRuntimeService.ts +3 -2
  151. package/src/planning/CurrentStateFrontierPlanner.ts +0 -1
  152. package/src/planning/RunQueuePlanner.ts +0 -6
  153. package/src/policies/executionLimits/EngineExecutionLimitsPolicy.ts +0 -8
  154. package/src/policies/executionLimits/EngineExecutionLimitsPolicyFactory.ts +0 -3
  155. package/src/runStorage/RunSummaryMapper.ts +0 -1
  156. package/src/runtime/EngineFactory.ts +6 -11
  157. package/src/runtime/RunIntentService.ts +0 -4
  158. package/src/runtime/WorkflowRepositoryWebhookTriggerMatcher.ts +0 -4
  159. package/src/runtime-types/InjectableRuntimeDecoratorComposerRegistry.ts +0 -4
  160. package/src/runtime-types/PersistedRuntimeTypeMetadataStoreRegistry.ts +0 -4
  161. package/src/runtime-types/PersistedRuntimeTypeNameResolver.ts +0 -1
  162. package/src/runtime-types/persistedRuntimeTypeModelRegistry.ts +0 -4
  163. package/src/runtime-types/runtimeTypeDecorators.types.ts +0 -12
  164. package/src/scheduler/ConfigDrivenOffloadPolicy.ts +0 -1
  165. package/src/scheduler/DefaultDrivingScheduler.ts +0 -6
  166. package/src/scheduler/InlineDrivingScheduler.ts +0 -13
  167. package/src/serialization/ItemsInputNormalizer.ts +0 -5
  168. package/src/testing/CapturingScheduler.ts +0 -3
  169. package/src/testing/EngineTestKitRunIdFactory.ts +0 -3
  170. package/src/testing/ItemHarnessNode.ts +0 -3
  171. package/src/testing/ItemHarnessNodeConfig.ts +0 -4
  172. package/src/testing/PrefixedSequentialIdGenerator.ts +0 -3
  173. package/src/testing/RegistrarEngineTestKit.types.ts +0 -2
  174. package/src/testing/RejectingCredentialSessionService.ts +0 -4
  175. package/src/testing/SubWorkflowRunnerTestNode.ts +0 -3
  176. package/src/testing/WorkflowTestHarnessManualTrigger.ts +0 -3
  177. package/src/testing/WorkflowTestKitBuilder.ts +0 -4
  178. package/src/testing/WorkflowTestKitRunNodeWorkflowFactory.ts +0 -3
  179. package/src/testing.ts +0 -3
  180. package/src/triggers/polling/PollingTriggerDedupWindow.ts +0 -4
  181. package/src/triggers/polling/PollingTriggerLogger.ts +0 -5
  182. package/src/triggers/polling/PollingTriggerRuntime.ts +0 -5
  183. package/src/types/index.ts +0 -6
  184. package/src/validation/WorkflowEdgePortValidator.ts +0 -5
  185. package/src/workflow/definition/ConnectionInvocationIdFactory.ts +0 -7
  186. package/src/workflow/definition/ConnectionNodeIdFactory.ts +0 -6
  187. package/src/workflow/definition/NodeIterationIdFactory.ts +0 -13
  188. package/src/workflow/definition/WorkflowExecutableNodeClassifier.ts +0 -6
  189. package/src/workflow/dsl/ChainCursorResolver.ts +8 -15
  190. package/src/workflow/dsl/NodeIdSlugifier.ts +0 -9
  191. package/src/workflow/dsl/WhenBuilder.ts +49 -2
  192. package/src/workflow/dsl/WorkflowDefinitionError.ts +0 -9
  193. package/src/workflow/dsl/workflowBuilderTypes.ts +5 -0
  194. package/src/workflowSnapshots/MissingRuntimeParityGuard.ts +24 -0
  195. package/src/workflowSnapshots/PersistedWorkflowTokenRegistry.ts +0 -6
  196. package/src/workflowSnapshots/WorkflowParityMismatchError.ts +18 -0
  197. package/src/workflowSnapshots/WorkflowSnapshotCodec.ts +1 -5
  198. package/src/workflowSnapshots/index.ts +3 -0
  199. package/dist/EngineRuntimeRegistration.types-CqcTWexS.d.cts +0 -81
  200. package/dist/EngineRuntimeRegistration.types-Cr75cSfL.d.ts +0 -44
  201. package/dist/ItemsInputNormalizer-BbQTSEkZ.cjs.map +0 -1
  202. package/dist/ItemsInputNormalizer-CSZGMgl3.js.map +0 -1
  203. package/dist/bootstrap-Bkd-Nfbn.js.map +0 -1
  204. package/dist/bootstrap-DIv-vloi.cjs.map +0 -1
  205. package/dist/contracts-CK0x6w_G.cjs +0 -74
  206. package/dist/contracts-CK0x6w_G.cjs.map +0 -1
  207. package/dist/contracts-DXdfTdpW.js +0 -50
  208. package/dist/contracts-DXdfTdpW.js.map +0 -1
  209. package/dist/di-LP2qSHkY.cjs.map +0 -1
  210. package/dist/di-tom0pM2h.js.map +0 -1
  211. package/dist/runtime-CWPdvJpC.js.map +0 -1
  212. package/dist/runtime-_VdHwGkJ.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,52 +932,26 @@ interface NodeConfigBase {
1199
932
  readonly name?: string;
1200
933
  readonly id?: NodeId;
1201
934
  readonly icon?: string;
935
+ readonly description?: string;
1202
936
  readonly execution?: Readonly<{
1203
937
  hint?: "local" | "worker";
1204
938
  queue?: string;
1205
939
  }>;
1206
- /** In-process execute retries (runnable nodes). Triggers typically omit this. */
1207
940
  readonly retryPolicy?: RetryPolicySpec;
1208
- /** Recover from execute failures; return outputs to continue, or rethrow to fail the node. */
1209
941
  readonly nodeErrorHandler?: NodeErrorHandlerSpec;
1210
- /**
1211
- * When true, edges carrying zero items on an output port still schedule single-input downstream nodes.
1212
- * Decided from the **source** node that produced the (empty) output. Default (false/undefined): empty
1213
- * main batches skip downstream execution and propagate the empty path.
1214
- */
1215
942
  readonly continueWhenEmptyOutput?: boolean;
1216
- /**
1217
- * Declared I/O port names for canvas authoring (unioned with ports inferred from edges).
1218
- * Use for dynamic routers (Switch) and future error ports.
1219
- */
1220
943
  readonly declaredOutputPorts?: ReadonlyArray<OutputPortKey>;
1221
944
  readonly declaredInputPorts?: ReadonlyArray<InputPortKey>;
1222
945
  getCredentialRequirements?(): ReadonlyArray<CredentialRequirement>;
1223
- /**
1224
- * Marker: this node emits {@link import("./assertionTypes").AssertionResult}-shaped items on its
1225
- * `main` port. The TestSuiteOrchestrator (and host-side TestAssertionPersister) listen for
1226
- * `nodeCompleted` events from nodes with this flag set, and persist their output items as
1227
- * TestAssertion records (only when the run carries a `testContext`). Set on assertion node
1228
- * configs (e.g. `AssertionNodeConfig`, `StringEqualsAssertionNodeConfig`).
1229
- */
1230
946
  readonly emitsAssertions?: true;
1231
- /**
1232
- * Static configuration summary surfaced in the workflow inspector — the design-time
1233
- * "what does this node do" panel that renders before any run telemetry exists.
1234
- *
1235
- * Return 2–6 short label/value pairs derived from this config (method + url for an HTTP
1236
- * call, model + tool list for an agent, schedule + timezone for a cron trigger, etc.).
1237
- * Values are truncated by the UI; aim for one line each. Return `undefined` to opt out
1238
- * — the inspector hides the section when no rows are produced.
1239
- *
1240
- * Implement on the config class instance so the function can read sibling config fields.
1241
- * `defineNode({ inspectorSummary })` plumbs through to this.
1242
- */
1243
947
  inspectorSummary?(): ReadonlyArray<NodeInspectorSummaryRow> | undefined;
1244
948
  }
1245
- /**
1246
- * One row of a node's static configuration summary. See {@link NodeConfigBase.inspectorSummary}.
1247
- */
949
+ interface PollingTriggerConfig {
950
+ getTriggerPollConfig(): Readonly<{
951
+ config: JsonObject;
952
+ pollIntervalMs?: number;
953
+ }>;
954
+ }
1248
955
  interface NodeInspectorSummaryRow {
1249
956
  readonly label: string;
1250
957
  readonly value: string;
@@ -1252,24 +959,11 @@ interface NodeInspectorSummaryRow {
1252
959
  declare const runnableNodeInputType: unique symbol;
1253
960
  declare const runnableNodeOutputType: unique symbol;
1254
961
  declare const triggerNodeOutputType: unique symbol;
1255
- /**
1256
- * Runnable node: **`TInputJson`** is what **`inputSchema`** validates on **`item.json`** (the wire payload).
1257
- * **`TOutputJson`** is emitted `item.json` on outputs.
1258
- */
1259
962
  interface RunnableNodeConfig<TInputJson$1 = unknown, TOutputJson$1 = unknown> extends NodeConfigBase {
1260
963
  readonly kind: "node";
1261
964
  readonly [runnableNodeInputType]?: TInputJson$1;
1262
965
  readonly [runnableNodeOutputType]?: TOutputJson$1;
1263
- /**
1264
- * Optional Zod input contract for {@link RunnableNode} when not set on the node class.
1265
- * Resolution order: node instance `inputSchema`, then config `inputSchema`, then `z.unknown()`.
1266
- */
1267
966
  readonly inputSchema?: ZodType<TInputJson$1>;
1268
- /**
1269
- * When an activation receives **zero** input items, the engine normally runs `execute` zero times.
1270
- * Set to **`runOnce`** to run `execute` once with an empty `items` batch (and a synthetic wire item for schema parsing).
1271
- * Used by batch-style callback nodes (built-in `Callback`) so `callback([], ctx)` still runs.
1272
- */
1273
967
  readonly emptyBatchExecution?: "skip" | "runOnce";
1274
968
  }
1275
969
  declare const triggerNodeSetupStateType: unique symbol;
@@ -1277,11 +971,6 @@ interface TriggerNodeConfig<TOutputJson$1 = unknown, TSetupState$1 extends JsonV
1277
971
  readonly kind: "trigger";
1278
972
  readonly [triggerNodeOutputType]?: TOutputJson$1;
1279
973
  readonly [triggerNodeSetupStateType]?: TSetupState$1;
1280
- /**
1281
- * Distinguishes triggers driven by the live activation policy (webhooks, cron, polling) from
1282
- * triggers driven only by the {@link TestSuiteOrchestrator}. `WorkflowActivation` skips
1283
- * `"test"` triggers; the orchestrator skips `"live"` triggers. Defaults to `"live"` when omitted.
1284
- */
1285
974
  readonly triggerKind?: "live" | "test";
1286
975
  }
1287
976
  type RunnableNodeInputJson<TConfig extends RunnableNodeConfig<any, any>> = TConfig extends RunnableNodeConfig<infer TInputJson, any> ? TInputJson : never;
@@ -1333,27 +1022,14 @@ type Items<TJson = unknown> = ReadonlyArray<Item<TJson>>;
1333
1022
  type NodeOutputs = Partial<Record<OutputPortKey, Items>>;
1334
1023
  type RunId = string;
1335
1024
  type NodeActivationId = string;
1336
- /**
1337
- * One per-item iteration of a runnable node's execute loop. Refines `NodeActivationId` for
1338
- * per-item connection invocations and telemetry. Undefined when the executing node is a batch
1339
- * node or trigger that does not iterate items.
1340
- */
1341
1025
  type NodeIterationId = string;
1342
1026
  interface ParentExecutionRef {
1343
1027
  runId: RunId;
1344
1028
  workflowId: WorkflowId;
1345
1029
  nodeId: NodeId;
1346
- /** Subworkflow depth of the **spawning** run (0 = root). Passed when starting a child run. */
1347
1030
  subworkflowDepth?: number;
1348
- /** Effective max node activations from the parent run (propagated to child policy merge). */
1349
1031
  engineMaxNodeActivations?: number;
1350
- /** Effective max subworkflow depth from the parent run (propagated to child policy merge). */
1351
1032
  engineMaxSubworkflowDepth?: number;
1352
- /**
1353
- * Test-suite linkage inherited by the child subworkflow run. Set by whichever node
1354
- * spawns the subworkflow when its own `ctx.testContext` is present, so assertions
1355
- * emitted inside a subworkflow land under the correct parent test case.
1356
- */
1357
1033
  testContext?: RunTestContext;
1358
1034
  }
1359
1035
  interface RunDataSnapshot {
@@ -1388,7 +1064,6 @@ interface NodeOffloadPolicy {
1388
1064
  config: NodeConfigBase;
1389
1065
  }): NodeSchedulerDecision;
1390
1066
  }
1391
- /** Whether to persist run execution data after the workflow finishes. */
1392
1067
  type WorkflowStoragePolicyMode = "ALL" | "SUCCESS" | "ERROR" | "NEVER";
1393
1068
  type WorkflowStoragePolicySpec = WorkflowStoragePolicyMode | TypeToken<WorkflowStoragePolicyResolver>;
1394
1069
  interface WorkflowStoragePolicyResolver {
@@ -1441,7 +1116,6 @@ interface NodeErrorHandler {
1441
1116
  handle<TConfig extends NodeConfigBase>(args: NodeErrorHandlerArgs<TConfig>): Promise<NodeOutputs>;
1442
1117
  }
1443
1118
  type NodeErrorHandlerSpec = TypeToken<NodeErrorHandler> | NodeErrorHandler;
1444
- /** Runtime defaults when workflow omits prune/storage fields (typically from host env). */
1445
1119
  interface WorkflowPolicyRuntimeDefaults {
1446
1120
  readonly retentionSeconds?: number;
1447
1121
  readonly binaryRetentionSeconds?: number;
@@ -1452,76 +1126,25 @@ interface WorkflowPolicyRuntimeDefaults {
1452
1126
  }
1453
1127
  //#endregion
1454
1128
  //#region src/contracts/testTriggerTypes.d.ts
1455
- /**
1456
- * Identifier minted by the host (or in-memory test runner) for one execution of a test suite.
1457
- * One TestSuiteRun produces N child workflow runs, one per item yielded by `generateItems`.
1458
- */
1459
1129
  type TestSuiteRunId = string;
1460
- /**
1461
- * Setup context passed to a {@link TestTriggerNodeConfig.generateItems} callback. Distinct from
1462
- * {@link import("./runtimeTypes").TriggerSetupContext} on purpose: test triggers are not
1463
- * activated by the live trigger lifecycle (webhooks, cron, polling) and never call `emit` —
1464
- * the orchestrator pulls from the iterable they return and dispatches one run per item.
1465
- */
1466
1130
  interface TestTriggerSetupContext<TConfig extends TestTriggerNodeConfig<unknown> = TestTriggerNodeConfig<unknown>> {
1467
1131
  readonly workflowId: WorkflowId;
1468
1132
  readonly nodeId: NodeId;
1469
1133
  readonly config: TConfig;
1470
1134
  readonly testSuiteRunId: TestSuiteRunId;
1471
- /**
1472
- * Resolves a credential session for a slot declared on this trigger's
1473
- * {@link import("./workflowTypes").NodeConfigBase.getCredentialRequirements}. Same contract as
1474
- * {@link import("./runtimeTypes").ExecutionContext.getCredential}.
1475
- */
1476
1135
  getCredential<TSession = unknown>(slotKey: string): Promise<TSession>;
1477
- /** AbortSignal raised when the suite is cancelled — long-running pulls should bail out. */
1478
1136
  readonly signal: AbortSignal;
1479
1137
  }
1480
- /**
1481
- * A trigger config that emits **test cases**. Each item yielded by {@link generateItems}
1482
- * becomes one workflow run (with `executionOptions.testContext` set), so 10 yielded items
1483
- * → 10 runs marked under the same TestSuiteRun.
1484
- *
1485
- * The trigger is otherwise a normal {@link TriggerNodeConfig} (so the canvas treats it like
1486
- * any other trigger), but its `triggerKind` is `"test"` so the live activation policy skips it.
1487
- */
1488
1138
  interface TestTriggerNodeConfig<TOutputJson$1 = unknown> extends TriggerNodeConfig<TOutputJson$1, undefined> {
1489
1139
  readonly triggerKind: "test";
1490
- /**
1491
- * Author-supplied async iterable of items, evaluated lazily. Implementations may fetch from
1492
- * credentialed APIs, read fixture files, or yield hard-coded items. The orchestrator iterates
1493
- * and dispatches one run per item, with concurrency capped by {@link concurrency} (default 4).
1494
- */
1495
1140
  generateItems(ctx: TestTriggerSetupContext<TestTriggerNodeConfig<TOutputJson$1>>): AsyncIterable<Item<TOutputJson$1>>;
1496
- /** Per-suite-run cap on simultaneously-executing test cases. Default: 4. */
1497
1141
  readonly concurrency?: number;
1498
- /**
1499
- * Free-form description of where the test cases come from — surfaced in the node properties
1500
- * panel and the suite-detail header so authors revisiting the workflow six months later
1501
- * remember which mailbox / folder / fixture file the cases originate from.
1502
- *
1503
- * Example: `"All emails in the Gmail label \"test/triage-fixtures\" — 14 messages as of 2026-05-03."`
1504
- */
1505
1142
  readonly description?: string;
1506
- /**
1507
- * Resolves a human-readable label for one yielded test case (e.g. email subject). The
1508
- * orchestrator calls this once per yielded item, persists the result on the run, and the
1509
- * Tests-tab UI uses it to render the case row instead of the opaque runId. Return
1510
- * `undefined` to fall back to "Case #N".
1511
- */
1512
1143
  caseLabel?(item: Item<TOutputJson$1>): string | undefined;
1513
1144
  }
1514
1145
  //#endregion
1515
1146
  //#region src/events/runEvents.d.ts
1516
- /**
1517
- * Outcome of a single test case (one workflow run dispatched by the test-suite orchestrator).
1518
- * - `running`: workflow still in flight
1519
- * - `succeeded`: workflow completed AND all assertions passed (or no assertions)
1520
- * - `failed`: workflow failed OR (workflow completed but ≥1 assertion failed)
1521
- * - `errored` / `cancelled`: workflow itself errored or was cancelled
1522
- */
1523
1147
  type TestCaseRunStatus = "running" | "succeeded" | "failed" | "errored" | "cancelled";
1524
- /** Aggregate outcome of a TestSuiteRun. */
1525
1148
  type TestSuiteRunStatus = "succeeded" | "failed" | "partial" | "errored" | "cancelled";
1526
1149
  type RunEvent = Readonly<{
1527
1150
  kind: "runCreated";
@@ -1635,23 +1258,20 @@ interface EngineExecutionLimitsPolicyConfig {
1635
1258
  readonly defaultMaxSubworkflowDepth: number;
1636
1259
  readonly hardMaxSubworkflowDepth: number;
1637
1260
  }
1638
- /** Framework defaults for {@link EngineExecutionLimitsPolicy} (merged with host `runtime.engineExecutionLimits`). */
1639
1261
  declare const ENGINE_EXECUTION_LIMITS_DEFAULTS: EngineExecutionLimitsPolicyConfig;
1640
- /**
1641
- * Resolves per-run execution limits: defaults, hard ceilings, and subworkflow depth for new runs.
1642
- */
1643
1262
  declare class EngineExecutionLimitsPolicy {
1644
1263
  private readonly config;
1645
1264
  constructor(config?: EngineExecutionLimitsPolicyConfig);
1646
- /**
1647
- * Effective options for a new root run (depth 0): defaults merged with engine ceilings.
1648
- * Replaces a separate one-method factory for root-run bootstrap.
1649
- */
1650
1265
  createRootExecutionOptions(): RunExecutionOptions;
1651
1266
  mergeExecutionOptionsForNewRun(parent: ParentExecutionRef | undefined, user: RunExecutionOptions | undefined): RunExecutionOptions;
1652
1267
  private capNumber;
1653
1268
  }
1654
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
1655
1275
  //#region src/di/CoreTokens.d.ts
1656
1276
  declare const CoreTokens: {
1657
1277
  readonly PersistedWorkflowTokenRegistry: TypeToken<PersistedWorkflowTokenRegistryLike>;
@@ -1672,54 +1292,31 @@ declare const CoreTokens: {
1672
1292
  readonly RunEventBus: TypeToken<RunEventBus>;
1673
1293
  readonly BinaryStorage: TypeToken<BinaryStorage>;
1674
1294
  readonly WebhookBasePath: TypeToken<string>;
1675
- /** Engine execution limits (defaults + optional host overrides). Consumers may bind a custom instance to override. */
1676
1295
  readonly EngineExecutionLimitsPolicy: TypeToken<EngineExecutionLimitsPolicy>;
1677
1296
  readonly WorkflowActivationPolicy: TypeToken<WorkflowActivationPolicy>;
1678
- /**
1679
- * Optional. When registered, AIAgentNode uses it to resolve mcpServers bindings,
1680
- * validate scopes, open pool connections, and prepare the MCP ToolSet map.
1681
- * Not registered in the default core bootstrap — the host provides the implementation.
1682
- */
1683
1297
  readonly AgentMcpIntegration: TypeToken<AgentMcpIntegration>;
1298
+ readonly TriggerInvoker: TypeToken<TriggerInvoker>;
1684
1299
  };
1685
1300
  //#endregion
1686
1301
  //#region src/contracts/runTypes.d.ts
1687
- /**
1688
- * Test-suite linkage for a run. When set, this run was started by a TestSuiteOrchestrator
1689
- * as one test case inside a TestSuiteRun. The `IsTestRun` node and host-side persisters key
1690
- * off the presence of this field. Subworkflow runs inherit it from their parent run.
1691
- */
1692
1302
  interface RunTestContext {
1693
1303
  readonly testSuiteRunId: string;
1694
1304
  readonly testCaseIndex: number;
1695
- /**
1696
- * Optional human-friendly label for this test case (e.g. an email subject when fixtures
1697
- * are loaded from a mailbox). Resolved per item by `TestTrigger.caseLabel(item)` if set,
1698
- * persisted on `Run.test_case_label` so the Tests-tab tree-table can show "RFQ for batch 14"
1699
- * instead of "run_1777755971399_bbb86beac1396".
1700
- */
1701
1305
  readonly testCaseLabel?: string;
1702
1306
  }
1703
1307
  interface RunExecutionOptions {
1704
- /** Run-intent override: force the inline scheduler and bypass node-level offload decisions. */
1705
1308
  localOnly?: boolean;
1706
- /** Marks runs started from webhook handling so orchestration can apply webhook-specific continuation rules. */
1707
1309
  webhook?: boolean;
1708
1310
  mode?: "manual" | "debug";
1709
1311
  sourceWorkflowId?: WorkflowId;
1710
1312
  sourceRunId?: RunId;
1711
1313
  derivedFromRunId?: RunId;
1712
1314
  isMutable?: boolean;
1713
- /** Set by the engine for this run: 0 = root, 1 = first child subworkflow, … */
1714
1315
  subworkflowDepth?: number;
1715
- /** Effective cap after engine policy merge (successful node completions per run). */
1716
1316
  maxNodeActivations?: number;
1717
- /** Effective cap after engine policy merge (subworkflow nesting). */
1718
1317
  maxSubworkflowDepth?: number;
1719
- /** Present iff started by a TestSuiteOrchestrator; propagates to subworkflow runs via {@link ParentExecutionRef.testContext}. */
1720
1318
  testContext?: RunTestContext;
1721
1319
  }
1722
- /** Engine-owned counters persisted with the run (worker-safe). */
1723
1320
  interface EngineRunCounters {
1724
1321
  completedNodeActivations: number;
1725
1322
  }
@@ -1744,7 +1341,6 @@ interface PersistedWorkflowSnapshotNode {
1744
1341
  tokenName?: string;
1745
1342
  configTokenName?: string;
1746
1343
  config: unknown;
1747
- /** Pre-computed static configuration summary; populated by WorkflowSnapshotCodec. */
1748
1344
  inspectorSummary?: ReadonlyArray<Readonly<{
1749
1345
  label: string;
1750
1346
  value: string;
@@ -1755,9 +1351,7 @@ interface PersistedWorkflowSnapshot {
1755
1351
  name: string;
1756
1352
  nodes: ReadonlyArray<PersistedWorkflowSnapshotNode>;
1757
1353
  edges: ReadonlyArray<Edge>;
1758
- /** When the snapshot was built from a live workflow definition that configured a workflow error handler. */
1759
1354
  workflowErrorHandlerConfigured?: boolean;
1760
- /** Connection metadata for child nodes not in the execution graph (e.g. AI agent attachments). */
1761
1355
  connections?: ReadonlyArray<WorkflowNodeConnection>;
1762
1356
  }
1763
1357
  type PinnedNodeOutputsByPort = Readonly<Record<OutputPortKey, Items>>;
@@ -1805,18 +1399,9 @@ interface NodeExecutionSnapshot {
1805
1399
  inputsByPort?: NodeInputsByPort;
1806
1400
  outputs?: NodeOutputs;
1807
1401
  error?: NodeExecutionError;
1808
- /**
1809
- * When the node is a SubWorkflow invocation, the run id of the child run it spawned.
1810
- * Populated after the child run completes so the UI can deep-link to that specific execution.
1811
- */
1812
1402
  childRunId?: RunId;
1813
1403
  }
1814
- /** Stable id for a single connection invocation row in {@link ConnectionInvocationRecord}. */
1815
1404
  type ConnectionInvocationId = string;
1816
- /**
1817
- * One logical LLM or tool call under an owning workflow node (e.g. AI agent).
1818
- * The owning node defines what {@link managedInput} and {@link managedOutput} contain.
1819
- */
1820
1405
  interface ConnectionInvocationRecord {
1821
1406
  readonly invocationId: ConnectionInvocationId;
1822
1407
  readonly runId: RunId;
@@ -1827,23 +1412,17 @@ interface ConnectionInvocationRecord {
1827
1412
  readonly status: NodeExecutionStatus;
1828
1413
  readonly managedInput?: JsonValue;
1829
1414
  readonly managedOutput?: JsonValue;
1830
- /** 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. */
1831
1415
  readonly statusLabel?: string;
1832
- /** 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. */
1833
1416
  readonly subjectName?: string;
1834
1417
  readonly error?: NodeExecutionError;
1835
1418
  readonly queuedAt?: string;
1836
1419
  readonly startedAt?: string;
1837
1420
  readonly finishedAt?: string;
1838
1421
  readonly updatedAt: string;
1839
- /** Per-item iteration id minted by the engine when this invocation occurred inside a runnable node's per-item loop. */
1840
1422
  readonly iterationId?: NodeIterationId;
1841
- /** Item index (0-based) of the iteration that produced this invocation. */
1842
1423
  readonly itemIndex?: number;
1843
- /** When set, this invocation was produced inside a sub-agent triggered by the named parent invocation. */
1844
1424
  readonly parentInvocationId?: ConnectionInvocationId;
1845
1425
  }
1846
- /** Arguments for appending a {@link ConnectionInvocationRecord} (engine fills run/workflow ids and timestamps). */
1847
1426
  type ConnectionInvocationAppendArgs = Readonly<{
1848
1427
  invocationId: ConnectionInvocationId;
1849
1428
  connectionNodeId: NodeId;
@@ -1865,7 +1444,6 @@ type ConnectionInvocationAppendArgs = Readonly<{
1865
1444
  interface RunCurrentState {
1866
1445
  outputsByNode: Record<NodeId, NodeOutputs>;
1867
1446
  nodeSnapshotsByNodeId: Record<NodeId, NodeExecutionSnapshot>;
1868
- /** Append-only history of connection-scoped invocations (LLM/tool) for inspector and canvas. */
1869
1447
  connectionInvocations?: ReadonlyArray<ConnectionInvocationRecord>;
1870
1448
  mutableState?: PersistedMutableRunState;
1871
1449
  }
@@ -1892,21 +1470,13 @@ interface ExecutionFrontierPlan {
1892
1470
  preservedPinnedNodeIds: ReadonlyArray<NodeId>;
1893
1471
  }
1894
1472
  type RunStatus = "running" | "pending" | "completed" | "failed" | "suspended" | "halted";
1895
- /** Reason a run transitioned to {@link RunStatus} `"halted"`. */
1896
1473
  type RunHaltReason = "hitl-rejected" | "hitl-timeout" | "hitl-cancelled";
1897
1474
  interface RunSummary {
1898
1475
  runId: RunId;
1899
1476
  workflowId: WorkflowId;
1900
1477
  startedAt: string;
1901
1478
  status: RunStatus;
1902
- /**
1903
- * Test-case status for runs dispatched as part of a TestSuiteRun. Carries the
1904
- * assertion-rollup-corrected outcome the test orchestrator persists onto the row, so the
1905
- * executions list can show "failed" for a run whose workflow completed cleanly but whose
1906
- * assertions caught regressions. Absent for non-test runs and legacy rows.
1907
- */
1908
1479
  testCaseStatus?: TestCaseRunStatus;
1909
- /** ISO timestamp when the run finished (derived from node snapshots or store `updatedAt`); omit while running/pending. */
1910
1480
  finishedAt?: string;
1911
1481
  parent?: ParentExecutionRef;
1912
1482
  executionOptions?: RunExecutionOptions;
@@ -1927,70 +1497,42 @@ interface PersistedRunSchedulingState {
1927
1497
  pending?: PendingNodeExecution;
1928
1498
  queue: RunQueueEntry[];
1929
1499
  }
1930
- /** One persisted suspension entry per suspended item. */
1931
1500
  interface PersistedSuspensionEntry {
1932
- /** Opaque task identifier (UUID v4). */
1933
1501
  readonly taskId: string;
1934
1502
  readonly nodeId: NodeId;
1935
1503
  readonly activationId: NodeActivationId;
1936
1504
  readonly itemIndex: number;
1937
- /** SHA-256 hex digest of the decision schema JSON (for schema-drift detection). */
1938
1505
  readonly decisionSchemaHash: string;
1939
- /** Serialized return value from `SuspensionRequest.deliver` (stored on the HumanTask row). */
1940
1506
  readonly deliveryRef: JsonValue;
1941
- /** ISO timestamp when the task expires. */
1942
1507
  readonly timeoutAt: string;
1943
1508
  readonly onTimeout: "halt" | "auto-accept";
1944
1509
  }
1945
- /**
1946
- * When a node is re-activated after suspension, the engine writes the resume context here
1947
- * so `NodeExecutionRequestHandlerService` can splice `resumeContext` into ctx.
1948
- * Cleared once the re-activation is consumed.
1949
- */
1950
1510
  interface PendingResumeEntry {
1951
1511
  readonly activationId: NodeActivationId;
1952
1512
  readonly nodeId: NodeId;
1953
- /**
1954
- * Typed as `unknown` here to avoid a circular import between runTypes ↔ runtimeTypes.
1955
- * `NodeExecutionRequestHandlerService` casts this to `ResumeContext` from runtimeTypes.
1956
- */
1957
1513
  readonly resumeContext: unknown;
1958
1514
  }
1959
1515
  interface PersistedRunState {
1960
1516
  runId: RunId;
1961
1517
  workflowId: WorkflowId;
1962
1518
  startedAt: string;
1963
- /** Canonical terminal time for listings and retention when persisted on the run root. */
1964
1519
  finishedAt?: string;
1965
- /** Optimistic concurrency / CAS on the run aggregate (repository may increment on save). */
1966
1520
  revision?: number;
1967
1521
  parent?: ParentExecutionRef;
1968
1522
  executionOptions?: RunExecutionOptions;
1969
1523
  control?: PersistedRunControlState;
1970
1524
  workflowSnapshot?: PersistedWorkflowSnapshot;
1971
1525
  mutableState?: PersistedMutableRunState;
1972
- /** Frozen at createRun from workflow + runtime defaults for prune/storage decisions. */
1973
1526
  policySnapshot?: PersistedRunPolicySnapshot;
1974
- /** Successful node completions so far (for activation budget). */
1975
1527
  engineCounters?: EngineRunCounters;
1976
1528
  status: RunStatus;
1977
- /** Populated when `status === "halted"` to discriminate why the run was halted. */
1978
1529
  reason?: RunHaltReason;
1979
1530
  pending?: PendingNodeExecution;
1980
1531
  queue: RunQueueEntry[];
1981
1532
  outputsByNode: Record<NodeId, NodeOutputs>;
1982
1533
  nodeSnapshotsByNodeId: Record<NodeId, NodeExecutionSnapshot>;
1983
- /** Append-only history of connection invocations (LLM/tool) nested under owning nodes. */
1984
1534
  connectionInvocations?: ReadonlyArray<ConnectionInvocationRecord>;
1985
- /**
1986
- * One entry per outstanding HITL suspension (per-item).
1987
- * Present and non-empty iff `status === "suspended"`.
1988
- */
1989
1535
  suspension?: ReadonlyArray<PersistedSuspensionEntry>;
1990
- /**
1991
- * Written by `resumeRun()` so `NodeExecutionRequestHandlerService` can splice `resumeContext`
1992
- * into the ctx when re-executing the suspended node. Cleared once consumed.
1993
- */
1994
1536
  pendingResume?: PendingResumeEntry;
1995
1537
  }
1996
1538
  interface WorkflowExecutionRepository {
@@ -2017,7 +1559,6 @@ interface WorkflowExecutionListingRepository {
2017
1559
  limit?: number;
2018
1560
  }>): Promise<ReadonlyArray<RunSummary>>;
2019
1561
  }
2020
- /** Runs eligible for retention-based pruning (completed or failed, older than cutoff). */
2021
1562
  interface RunPruneCandidate {
2022
1563
  readonly runId: RunId;
2023
1564
  readonly workflowId: WorkflowId;
@@ -2080,42 +1621,13 @@ interface RunEventPublisherDeps {
2080
1621
  }
2081
1622
  //#endregion
2082
1623
  //#region src/contracts/agentMcpTypes.d.ts
2083
- /**
2084
- * Emitted as a span event when a credential is missing required scopes
2085
- * (bind-time) or when callTool returns a permission error (runtime).
2086
- * The credential type id can be looked up from the credential instance when needed.
2087
- */
2088
1624
  interface NeedsReconsentEvent {
2089
1625
  readonly serverId: string;
2090
1626
  readonly credentialInstanceId: string;
2091
1627
  readonly missingScopesHint?: readonly string[];
2092
1628
  }
2093
- /**
2094
- * An opaque MCP tool map: keyed by serverId → (toolName → tool definition).
2095
- * Typed as unknown so core does not depend on the AI SDK's ToolSet type.
2096
- * AIAgentNode (in core-nodes, which does depend on ai) casts this to
2097
- * ReadonlyMap<string, ToolSet> before passing to DeferredMetaToolStrategyFactory.
2098
- */
2099
1629
  type AgentMcpToolMap = ReadonlyMap<string, Readonly<Record<string, unknown>>>;
2100
- /**
2101
- * Contract implemented by the host. Resolves MCP server bindings for an agent run
2102
- * via the standard credential-binding table (one slot per declared server, keyed
2103
- * by `(workflowId, mcpConnectionNodeId, "credential")`), and returns a ready-to-use
2104
- * tool map with wrapped execute callbacks for telemetry and 403 detection.
2105
- * Core-nodes imports this interface so AIAgentNode can inject it without
2106
- * depending on the host.
2107
- */
2108
1630
  interface AgentMcpIntegration {
2109
- /**
2110
- * Look up the credential binding per server, validate scopes, open pool
2111
- * connections, and return a tool map keyed by serverId. Each tool's
2112
- * execute callback includes:
2113
- * - Telemetry child span (mcp.server_id, mcp.tool_name attributes)
2114
- * - 403/permission error detection → emits a NeedsReconsentEvent span event
2115
- *
2116
- * Throws `AgentBindError` on validation failures (missing server, unbound
2117
- * credential slot, missing credential instance, insufficient scopes).
2118
- */
2119
1631
  prepareMcpTools(args: {
2120
1632
  readonly workflowId: WorkflowId;
2121
1633
  readonly agentNodeId: NodeId;
@@ -2131,98 +1643,67 @@ interface AgentMcpIntegration {
2131
1643
  statusMessage?: string;
2132
1644
  }) => void;
2133
1645
  };
2134
- /** Per-MCP-tool-call invocation appender. Optional; when omitted the wrapper emits only telemetry spans. */
2135
1646
  readonly appendMcpInvocation?: (args: ConnectionInvocationAppendArgs) => Promise<void>;
2136
- /** Agent activation id to attach to each invocation record (used by canvas + inspector grouping). */
2137
1647
  readonly parentAgentActivationId?: NodeActivationId;
2138
- /** Per-item iteration id when the agent runs inside a per-item loop. */
2139
1648
  readonly iterationId?: NodeIterationId;
2140
- /** Item index (0-based) of the iteration that owns these tool calls. */
2141
1649
  readonly itemIndex?: number;
2142
- /** Parent invocation id when this agent is itself executing as a sub-agent. */
2143
1650
  readonly parentInvocationId?: ConnectionInvocationId;
2144
1651
  }): Promise<AgentMcpToolMap>;
2145
1652
  }
2146
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
2147
1673
  //#region src/contracts/AgentBindError.d.ts
2148
- /**
2149
- * Thrown at agent bind time when mcpServers declarations cannot be resolved.
2150
- * Causes include: unknown server id, missing credential instance, insufficient scopes,
2151
- * and ambiguous shorthand binding (multiple credential instances match).
2152
- */
2153
1674
  declare class AgentBindError extends Error {
2154
1675
  constructor(message: string);
2155
1676
  }
2156
1677
  //#endregion
2157
1678
  //#region src/contracts/NoOpAgentMcpIntegration.d.ts
2158
- /**
2159
- * No-op implementation of AgentMcpIntegration.
2160
- * Registered by the core engine runtime as a fallback when the host does not
2161
- * supply a real implementation (e.g. in unit tests or headless engine setups).
2162
- * Always returns an empty tool map so the agent runs with node-backed tools only.
2163
- */
2164
1679
  declare class NoOpAgentMcpIntegration implements AgentMcpIntegration {
2165
1680
  prepareMcpTools(): Promise<AgentMcpToolMap>;
2166
1681
  }
2167
1682
  //#endregion
2168
1683
  //#region src/contracts/assertionTypes.d.ts
2169
- /**
2170
- * One assertion emitted by an assertion-emitting node (a node whose config sets
2171
- * `emitsAssertions: true`). Each emitted item on `main` carries one of these as `item.json`.
2172
- *
2173
- * Pass/fail is derived from `score >= (passThreshold ?? 0.5)` — see {@link deriveAssertionPassed}.
2174
- * The `errored` marker is for cases where the assertion code itself threw (distinct from
2175
- * "the assertion was evaluated and the score was low") and is treated as a hard fail in rollups
2176
- * regardless of `score`.
2177
- */
2178
1684
  interface AssertionResult {
2179
1685
  readonly name: string;
2180
- /** 0..1 score. Source of truth for pass/fail (compared against `passThreshold`). */
2181
1686
  readonly score: number;
2182
- /** 0..1 threshold for "passed". When omitted, consumers default to 0.5. */
2183
1687
  readonly passThreshold?: number;
2184
- /** True when evaluating the assertion threw — treated as fail regardless of `score`. */
2185
1688
  readonly errored?: true;
2186
- /** What the assertion expected. Free-form JSON; UIs render with a JSON viewer. */
2187
1689
  readonly expected?: JsonValue;
2188
- /** What the workflow actually produced. */
2189
1690
  readonly actual?: JsonValue;
2190
- /** Short human-readable explanation, especially for fails / errors. */
2191
1691
  readonly message?: string;
2192
- /** Bag of supplemental fields (e.g. judge prompt, judge raw response, comparison method). */
2193
1692
  readonly details?: Readonly<Record<string, JsonValue>>;
2194
1693
  }
2195
- /**
2196
- * Default {@link AssertionResult.passThreshold} when authors omit it. Boolean-style assertions
2197
- * (assertEqual / contains / etc.) emit `score: 1` or `score: 0` so this default works for them;
2198
- * AI-judge assertions are expected to set their own threshold.
2199
- */
2200
1694
  declare const DEFAULT_ASSERTION_PASS_THRESHOLD = 0.5;
2201
- /**
2202
- * Derive whether an assertion result is considered "passing" using the score-based contract:
2203
- * `errored` always fails, otherwise `score >= (passThreshold ?? 0.5)`. This is the canonical
2204
- * derivation — UI and rollup code should call it rather than inlining the comparison so future
2205
- * tweaks (e.g. NaN handling) land in one place.
2206
- */
2207
1695
  declare function deriveAssertionPassed(result: {
2208
1696
  readonly score: number;
2209
1697
  readonly passThreshold?: number;
2210
1698
  readonly errored?: true;
2211
1699
  }): boolean;
2212
- /**
2213
- * Provenance for a persisted {@link AssertionResult}: which node produced it and where in the
2214
- * per-item iteration tree it landed. Filled in by the host-side persister, not the node itself.
2215
- */
2216
1700
  interface AssertionResultProvenance {
2217
1701
  readonly nodeId: NodeId;
2218
- /** Per-item iteration id when the emitting node ran inside a per-item loop. */
2219
1702
  readonly iterationId?: string;
2220
- /** Item index (0-based) within the activation that produced this assertion. */
2221
1703
  readonly itemIndex?: number;
2222
1704
  }
2223
1705
  //#endregion
2224
1706
  //#region src/contracts/itemExpr.d.ts
2225
- declare const ITEM_EXPR_BRAND: unique symbol;
2226
1707
  type ItemExprResolvedContext = Readonly<{
2227
1708
  runId: RunId;
2228
1709
  workflowId: WorkflowId;
@@ -2230,9 +1711,6 @@ type ItemExprResolvedContext = Readonly<{
2230
1711
  activationId: NodeActivationId;
2231
1712
  data: RunDataSnapshot;
2232
1713
  }>;
2233
- /**
2234
- * Context aligned with former {@link ItemInputMapperContext} — use **`data`** to read any completed upstream node.
2235
- */
2236
1714
  type ItemExprContext = ItemExprResolvedContext;
2237
1715
  type ItemExprArgs<TItemJson = unknown> = Readonly<{
2238
1716
  item: Item<TItemJson>;
@@ -2242,18 +1720,12 @@ type ItemExprArgs<TItemJson = unknown> = Readonly<{
2242
1720
  }>;
2243
1721
  type ItemExprCallback<T, TItemJson = unknown> = (args: ItemExprArgs<TItemJson>) => T | Promise<T>;
2244
1722
  type ItemExpr<T, TItemJson = unknown> = Readonly<{
2245
- readonly [ITEM_EXPR_BRAND]: true;
1723
+ readonly __codemationItemExpr: "codemation.itemExpr";
2246
1724
  readonly fn: ItemExprCallback<T, TItemJson>;
2247
1725
  }>;
2248
1726
  declare function itemExpr<T, TItemJson = unknown>(fn: ItemExprCallback<T, TItemJson>): ItemExpr<T, TItemJson>;
2249
1727
  declare function isItemExpr<T, TItemJson = unknown>(value: unknown): value is ItemExpr<T, TItemJson>;
2250
- /**
2251
- * Deep-resolves {@link itemExpr} leaves. Returns a new graph (does not mutate the original config object).
2252
- */
2253
1728
  declare function resolveItemExprsInUnknown(value: unknown, args: ItemExprArgs, seen?: WeakSet<object>): Promise<unknown>;
2254
- /**
2255
- * Clones runnable config (best-effort) so per-item {@link itemExpr} resolution never mutates shared instances.
2256
- */
2257
1729
  declare function resolveItemExprsForExecution(config: unknown, nodeCtx: NodeExecutionContext, item: Item, itemIndex: number, items: Items): Promise<unknown | undefined>;
2258
1730
  //#endregion
2259
1731
  //#region src/contracts/params.d.ts
@@ -2277,23 +1749,15 @@ interface CostCatalog {
2277
1749
  }
2278
1750
  //#endregion
2279
1751
  //#region src/contracts/executionPersistenceContracts.d.ts
2280
- /** Canonical id for persisted execution rows (activation or connection invocation). */
2281
1752
  type ExecutionInstanceId = string;
2282
- /** Stable id for persisted work-queue rows. */
2283
1753
  type WorkItemId = string;
2284
- /** Batch grouping for planner activations. */
2285
1754
  type BatchId = string;
2286
- /** Optimistic concurrency on the run root. */
2287
1755
  type RunRevision = number;
2288
1756
  type PersistedRunWorkItemKind = "queue" | "pending";
2289
1757
  type WorkItemStatus = "queued" | "claimed" | "completed" | "failed" | "cancelled";
2290
1758
  type PersistedExecutionInstanceKind = "workflowNodeActivation" | "connectionInvocation";
2291
1759
  type ConnectionInvocationKind = "languageModel" | "tool" | "nestedAgent";
2292
1760
  type PayloadStorageKind = "inline" | "external" | "omitted";
2293
- /**
2294
- * Persisted run-work-queue row (queue entry or pending activation).
2295
- * Serialized to {@link RunWorkItem} in Prisma; engine still uses {@link PersistedRunState} queue + pending.
2296
- */
2297
1761
  interface PersistedRunWorkItemRecord {
2298
1762
  readonly workItemId: WorkItemId;
2299
1763
  readonly runId: RunId;
@@ -2312,13 +1776,9 @@ interface PersistedRunWorkItemRecord {
2312
1776
  readonly sourceInstanceId?: ExecutionInstanceId;
2313
1777
  readonly parentInstanceId?: ExecutionInstanceId;
2314
1778
  readonly itemsIn: number;
2315
- /** Queue entry when kind is queue; pending activation when kind is pending. */
2316
1779
  readonly payloadJson: string;
2317
1780
  readonly error?: Readonly<NodeExecutionError>;
2318
1781
  }
2319
- /**
2320
- * Payload policy fields for large-batch externalization (optional on first rollout).
2321
- */
2322
1782
  interface ExecutionPayloadPolicyFields {
2323
1783
  readonly inputStorageKind: PayloadStorageKind;
2324
1784
  readonly outputStorageKind: PayloadStorageKind;
@@ -2331,9 +1791,6 @@ interface ExecutionPayloadPolicyFields {
2331
1791
  readonly inputTruncated?: boolean;
2332
1792
  readonly outputTruncated?: boolean;
2333
1793
  }
2334
- /**
2335
- * One persisted execution row (workflow node activation or connection invocation).
2336
- */
2337
1794
  interface PersistedExecutionInstanceRecord {
2338
1795
  readonly instanceId: ExecutionInstanceId;
2339
1796
  readonly runId: RunId;
@@ -2368,9 +1825,6 @@ interface PersistedExecutionInstanceRecord {
2368
1825
  readonly usedPinnedOutput?: boolean;
2369
1826
  readonly payloadPolicy?: ExecutionPayloadPolicyFields;
2370
1827
  }
2371
- /**
2372
- * Cached slot projection for planner/debugger/UI (not canonical history).
2373
- */
2374
1828
  interface RunSlotProjectionState {
2375
1829
  readonly runId: RunId;
2376
1830
  readonly workflowId: WorkflowId;
@@ -2403,12 +1857,6 @@ interface WorkflowRunDetailDto {
2403
1857
  readonly executionInstances: ReadonlyArray<ExecutionInstanceDto>;
2404
1858
  readonly iterations?: ReadonlyArray<RunIterationDto>;
2405
1859
  }
2406
- /**
2407
- * Per-item iteration projected from connection invocations and node activations.
2408
- *
2409
- * One iteration = one item processed by an agent within an activation. Multiple invocations
2410
- * (LLM rounds, tool calls) belonging to the same iteration share the iterationId.
2411
- */
2412
1860
  interface RunIterationDto {
2413
1861
  readonly iterationId: string;
2414
1862
  readonly agentNodeId: NodeId;
@@ -2420,9 +1868,7 @@ interface RunIterationDto {
2420
1868
  readonly finishedAt?: string;
2421
1869
  readonly invocationIds: ReadonlyArray<string>;
2422
1870
  readonly parentInvocationId?: string;
2423
- /** 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`). */
2424
1871
  readonly estimatedCostMinorByCurrency?: Readonly<Record<string, number>>;
2425
- /** Currency scale (denominator) per currency, when present on the metric points. Joined with `estimatedCostMinorByCurrency` to format human-readable amounts. */
2426
1872
  readonly estimatedCostCurrencyScaleByCurrency?: Readonly<Record<string, number>>;
2427
1873
  }
2428
1874
  interface SlotExecutionStateDto {
@@ -2452,16 +1898,9 @@ interface ExecutionInstanceDto {
2452
1898
  readonly inputJson?: JsonValue;
2453
1899
  readonly outputJson?: JsonValue;
2454
1900
  readonly error?: Readonly<NodeExecutionError>;
2455
- /** Per-item iteration that produced this instance. Set on connectionInvocation rows produced inside per-item runnable loops. */
2456
1901
  readonly iterationId?: string;
2457
- /** Item index (0-based) of the iteration. */
2458
1902
  readonly itemIndex?: number;
2459
- /** Parent invocation id when this instance was emitted by a sub-agent triggered by an outer LLM/tool call. */
2460
1903
  readonly parentInvocationId?: string;
2461
- /**
2462
- * When this instance is a SubWorkflow node activation, the run id of the child run it spawned.
2463
- * Used by the UI to deep-link directly to the child execution.
2464
- */
2465
1904
  readonly childRunId?: string;
2466
1905
  }
2467
1906
  interface WorkflowDetailSelectionState {
@@ -2469,32 +1908,60 @@ interface WorkflowDetailSelectionState {
2469
1908
  readonly selectedInstanceId: ExecutionInstanceId | null;
2470
1909
  }
2471
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
2472
1954
  //#region src/contracts/mcpTypes.d.ts
2473
1955
  type McpServerTransport = "http";
2474
1956
  interface McpServerDeclaration {
2475
- /** Globally unique slug, e.g. "gmail". Workflow authors reference this. */
2476
1957
  id: string;
2477
1958
  displayName: string;
2478
1959
  description: string;
2479
1960
  transport: McpServerTransport;
2480
1961
  url: string;
2481
- /**
2482
- * Credential types accepted by this MCP server, matching CredentialRequirement.acceptedTypes.
2483
- * Absent or empty means no credential is required.
2484
- */
2485
1962
  acceptedCredentialTypes?: ReadonlyArray<string>;
2486
- /**
2487
- * Documentation only in MVP. The bind-time validator checks
2488
- * requiredScopes ⊆ CredentialInstance.scopesGranted.
2489
- */
2490
1963
  requiredScopes?: string[];
2491
- /** Non-secret static headers merged onto every MCP request. */
2492
1964
  staticHeaders?: Record<string, string>;
2493
- /**
2494
- * Overrides for tool descriptions advertised by the MCP server.
2495
- * Applied by the connection pool after tools/list.
2496
- * Key: exact tool name as returned by the server.
2497
- */
2498
1965
  toolDescriptionOverrides?: Record<string, string>;
2499
1966
  }
2500
1967
  //#endregion
@@ -2511,9 +1978,6 @@ declare function isUnbrandedPortsEmissionShape(value: unknown): value is Readonl
2511
1978
  }>;
2512
1979
  //#endregion
2513
1980
  //#region src/contracts/itemMeta.d.ts
2514
- /**
2515
- * Reads `meta._cm.originIndex` when present (used for fan-in merge-by-origin and Merge routing).
2516
- */
2517
1981
  declare function getOriginIndexFromItem(item: Item): number | undefined;
2518
1982
  //#endregion
2519
1983
  //#region src/contracts/NoRetryPolicy.d.ts
@@ -2527,9 +1991,7 @@ declare class RetryPolicy implements FixedRetryPolicySpec {
2527
1991
  readonly delayMs: number;
2528
1992
  readonly kind: "fixed";
2529
1993
  constructor(maxAttempts: number, delayMs: number);
2530
- /** Default for HTTP-style transient failures: 3 tries, 1s between attempts. */
2531
1994
  static readonly defaultForHttp: FixedRetryPolicySpec;
2532
- /** Default for LLM / agent calls: 3 tries, 2s fixed backoff. */
2533
1995
  static readonly defaultForAiAgent: FixedRetryPolicySpec;
2534
1996
  }
2535
1997
  //#endregion
@@ -2559,11 +2021,16 @@ declare class NoOpCostTrackingTelemetryFactory implements CostTrackingTelemetryF
2559
2021
  //#endregion
2560
2022
  //#region src/contracts/runFinishedAtFactory.d.ts
2561
2023
  type RunFinishedAtSource = Pick<PersistedRunState, "status" | "nodeSnapshotsByNodeId" | "finishedAt">;
2562
- /** Derives workflow end time from persisted run root or node snapshots for run listings. */
2563
2024
  declare class RunFinishedAtFactory {
2564
2025
  static resolveIso(state: RunFinishedAtSource): string | undefined;
2565
2026
  }
2566
2027
  //#endregion
2028
+ //#region src/authoring/nodeBaseOptions.types.d.ts
2029
+ interface NodeBaseOptions {
2030
+ readonly id?: string;
2031
+ readonly description?: string;
2032
+ }
2033
+ //#endregion
2567
2034
  //#region src/authoring/defineNode.types.d.ts
2568
2035
  type MaybePromise<TValue> = TValue | Promise<TValue>;
2569
2036
  type ResolvableCredentialType = AnyCredentialType | CredentialTypeId;
@@ -2585,10 +2052,6 @@ interface DefinedNodeRunContext<TConfig extends CredentialJsonRecord, TBindings
2585
2052
  readonly credentials: DefinedNodeCredentialAccessors<TBindings>;
2586
2053
  readonly execution: NodeExecutionContext<RunnableNodeConfig<TConfig, unknown>>;
2587
2054
  }
2588
- /**
2589
- * Arguments for {@link defineNode} `execute` (engine `ctx` matches {@link RunnableNode.execute};
2590
- * the second callback parameter adds {@link DefinedNodeRunContext} for credential accessors).
2591
- */
2592
2055
  type DefineNodeExecuteArgs<TConfig extends CredentialJsonRecord, TInputJson$1> = Readonly<{
2593
2056
  input: TInputJson$1;
2594
2057
  item: Item;
@@ -2604,47 +2067,26 @@ interface DefinedNode<TKey$1 extends string, TConfig extends CredentialJsonRecor
2604
2067
  readonly key: TKey$1;
2605
2068
  readonly title: string;
2606
2069
  readonly description?: string;
2607
- create<TConfigItemJson = TInputJson$1>(config: DefinedNodeConfigInput<TConfig, TConfigItemJson>, name?: string, id?: string): RunnableNodeConfig<TInputJson$1, TOutputJson$1>;
2070
+ create<TConfigItemJson = TInputJson$1>(config: DefinedNodeConfigInput<TConfig, TConfigItemJson>, name?: string, idOrOptions?: string | NodeBaseOptions): RunnableNodeConfig<TInputJson$1, TOutputJson$1>;
2608
2071
  register(context: {
2609
2072
  registerNode<TValue>(token: TypeToken<TValue>, implementation?: TypeToken<TValue>): void;
2610
2073
  }): void;
2611
2074
  }
2612
- /**
2613
- * Plugin / DSL-friendly node: per-item `execute` with optional {@link RunnableNodeConfig.inputSchema}.
2614
- */
2615
2075
  interface DefineNodeOptions<TKey$1 extends string, TConfig extends CredentialJsonRecord, TInputJson$1, TOutputJson$1, TBindings extends DefinedNodeCredentialBindings | undefined = undefined> {
2616
2076
  readonly key: TKey$1;
2617
2077
  readonly title: string;
2618
2078
  readonly description?: string;
2619
- /**
2620
- * Canvas icon for this node (same contract as `NodeConfigBase.icon` on runnable configs).
2621
- * The Next host resolves Lucide (`lucide:…`), built-in SVGs (`builtin:…`), Simple Icons (`si:…`), and image URLs (`https:`, `data:`, `/…`).
2622
- */
2623
2079
  readonly icon?: string;
2624
- /** Default values / form hints for **static** node configuration (credentials, retry, IDs), not per-item payload. */
2625
2080
  readonly input?: Readonly<Record<keyof TConfig & string, unknown>>;
2626
2081
  readonly configSchema?: z.ZodType<TConfig>;
2627
2082
  readonly credentials?: TBindings;
2628
- /**
2629
- * Validates **`input`** (engine also accepts `inputSchema` on the node class).
2630
- */
2631
2083
  readonly inputSchema?: ZodType<TInputJson$1>;
2632
- /** Preserve inbound `item.binary` when `execute` returns plain JSON or item-shaped results without `binary`. */
2633
2084
  readonly keepBinaries?: boolean;
2634
- /**
2635
- * Static configuration summary surfaced in the workflow inspector — see
2636
- * {@link import("../contracts/workflowTypes").NodeConfigBase.inspectorSummary}.
2637
- *
2638
- * Receives the static config; returns 2–6 short label/value pairs (or `undefined` to skip).
2639
- */
2640
2085
  readonly inspectorSummary?: (args: Readonly<{
2641
2086
  config: TConfig;
2642
2087
  }>) => ReadonlyArray<NodeInspectorSummaryRow> | undefined;
2643
2088
  execute(args: DefineNodeExecuteArgs<TConfig, TInputJson$1>, context: DefinedNodeRunContext<TConfig, TBindings>): MaybePromise<TOutputJson$1>;
2644
2089
  }
2645
- /**
2646
- * Batch-oriented defined node: `run` receives all item JSON once (last item in activation); emits one output per input row.
2647
- */
2648
2090
  interface DefineBatchNodeOptions<TKey$1 extends string, TConfig extends CredentialJsonRecord, TInputJson$1, TOutputJson$1, TBindings extends DefinedNodeCredentialBindings | undefined = undefined> {
2649
2091
  readonly key: TKey$1;
2650
2092
  readonly title: string;
@@ -2662,103 +2104,22 @@ declare function defineNode<TKey$1 extends string, TConfig extends CredentialJso
2662
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>;
2663
2105
  //#endregion
2664
2106
  //#region src/authoring/defineHumanApprovalNode.types.d.ts
2665
- /**
2666
- * Decision shape merged into `item.json` after a HITL approval task resolves.
2667
- *
2668
- * - `"approved"` / `"rejected"` — from a human decision (uses `approvedPredicate`).
2669
- * - `"timed-out"` — timeout fired with `onTimeout: "halt"`.
2670
- * - `"auto-accepted"` — timeout fired with `onTimeout: "auto-accept"`.
2671
- */
2672
2107
  interface HumanApprovalDecisionResult {
2673
2108
  readonly status: "approved" | "rejected" | "timed-out" | "auto-accepted";
2674
- /** Identity of the person who decided; absent for automated outcomes. */
2675
2109
  readonly actor?: HumanTaskActor;
2676
- /** ISO 8601 timestamp of the decision. */
2677
2110
  readonly decidedAt?: Date;
2678
- /** Optional free-text note from the reviewer. */
2679
2111
  readonly note?: string;
2680
- /**
2681
- * Full raw decision payload (only present for `"approved"` / `"rejected"`).
2682
- * Shape is determined by the channel's `decisionSchema`.
2683
- */
2684
2112
  readonly payload?: Record<string, unknown>;
2685
2113
  }
2686
- /**
2687
- * Output item shape emitted by a `defineHumanApprovalNode`-based node.
2688
- * Original `item.json` fields are preserved and `decision` is merged in.
2689
- * If the input `item.json` already contained a `decision` key it is **overwritten**.
2690
- */
2691
2114
  type HumanApprovalOutputJson<TInputJson$1 extends Record<string, unknown>> = TInputJson$1 & {
2692
2115
  readonly decision: HumanApprovalDecisionResult;
2693
2116
  };
2694
- /**
2695
- * Extends {@link DefinedNode} with the `humanApprovalToolBehavior` metadata marker.
2696
- * Story 10 reads this field when attaching the node as an agent tool.
2697
- */
2698
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> {
2699
- /**
2700
- * Behavior hint consumed by the agent runtime (story 10) when this node is attached as a tool.
2701
- * `"return"` (default) — return the rejection to the agent as a tool result.
2702
- * `"halt"` — halt the agent run on rejection.
2703
- *
2704
- * Standalone DSL usage ignores this field.
2705
- */
2706
2118
  readonly humanApprovalToolBehavior: {
2707
2119
  onRejected: "return" | "halt";
2708
2120
  };
2709
2121
  }
2710
- /**
2711
- * Returns `true` when `node` was created by {@link defineHumanApprovalNode}.
2712
- * Uses the `humanApprovalToolBehavior` typed field as the discriminant.
2713
- */
2714
2122
  declare function isHumanApprovalNode(node: unknown): node is DefinedHumanApprovalNode<string, Record<string, unknown>, Record<string, unknown>, undefined>;
2715
- /**
2716
- * Authoring helper that compiles a HITL approval channel down to a regular
2717
- * {@link defineNode}-backed node with `SuspensionRequest` semantics.
2718
- *
2719
- * **Fast-forward decision semantics:**
2720
- * - On the first `execute` call (no `ctx.resumeContext`): throws a `SuspensionRequest`
2721
- * that calls the author's `deliver`. The engine persists the suspension and continues.
2722
- * - On resume (`ctx.resumeContext` set): calls `onDecision`/`onTimeout` as appropriate,
2723
- * merges a `decision` key into `item.json`, and returns an item with the original
2724
- * `binary` map passed by reference (no copy).
2725
- *
2726
- * **Output shape per item:**
2727
- * ```ts
2728
- * // Input: { json: { invoiceId: 42 }, binary?: {...} }
2729
- * // Output: { json: { invoiceId: 42, decision: { status: "approved", actor, decidedAt } }, binary: <unchanged> }
2730
- * ```
2731
- * If `item.json` already has a `decision` key it is **overwritten**. Namespace as
2732
- * needed if your schema reserves that key for another purpose.
2733
- *
2734
- * **Predicate persistence:**
2735
- * The `approvedPredicate` function is NOT serialized to the suspension record (except
2736
- * as an audit-only string via `toString()`). On resume, the workflow definition is
2737
- * reloaded from code at process start and the predicate closure is rebuilt naturally.
2738
- * If a deploy ships a changed predicate between suspend and resume, the *new* predicate
2739
- * runs — document this in your runbook when the predicate carries business logic that
2740
- * may change across deploys.
2741
- *
2742
- * @example
2743
- * ```ts
2744
- * export const slackApprovalNode = defineHumanApprovalNode({
2745
- * key: "my-plugin.slackApproval",
2746
- * title: "Slack Approval",
2747
- * channel: "slack",
2748
- * configSchema: z.object({ channel: z.string(), message: z.string() }),
2749
- * decisionSchema: z.object({ approved: z.boolean(), note: z.string().optional() }),
2750
- *
2751
- * async deliver({ task, config, item }, ctx) {
2752
- * const ts = await postSlackMessage(config.channel, `Approve? <${task.resumeUrl}>`);
2753
- * return { channel: config.channel, ts };
2754
- * },
2755
- *
2756
- * async onDecision({ decision, actor, delivery }, ctx) {
2757
- * await updateSlackMessage(delivery.channel, delivery.ts, decision.approved ? "✅" : "❌");
2758
- * },
2759
- * });
2760
- * ```
2761
- */
2762
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: {
2763
2124
  key: TKey$1;
2764
2125
  title: string;
@@ -2769,16 +2130,8 @@ declare function defineHumanApprovalNode<TKey$1 extends string, TConfig extends
2769
2130
  inputSchema?: ZodType<TInputJson$1>;
2770
2131
  decisionSchema: ZodType<TDecision>;
2771
2132
  credentials?: TBindings;
2772
- /**
2773
- * Custom predicate that decides whether a decision counts as "approved".
2774
- * When omitted, the helper checks if `decisionSchema` is a Zod object with an
2775
- * `approved: boolean` field; if so it uses `decision.approved === true`.
2776
- * If neither holds, `defineHumanApprovalNode` throws at **definition time** (not runtime).
2777
- */
2778
2133
  approvedPredicate?: (decision: TDecision) => boolean;
2779
- /** Default suspension timeout. Defaults to `"24h"`. */
2780
2134
  defaultTimeout?: Duration;
2781
- /** What to do when the task times out. Defaults to `"halt"`. */
2782
2135
  defaultOnTimeout?: "halt" | "auto-accept";
2783
2136
  inspectorSummary?: (config: TConfig) => ReadonlyArray<NodeInspectorSummaryRow> | undefined;
2784
2137
  deliver: (args: {
@@ -2803,6 +2156,7 @@ declare function defineHumanApprovalNode<TKey$1 extends string, TConfig extends
2803
2156
  }): DefinedHumanApprovalNode<TKey$1, TConfig, TInputJson$1, TBindings>;
2804
2157
  //#endregion
2805
2158
  //#region src/workflow/dsl/workflowBuilderTypes.d.ts
2159
+ declare function mergeForward<TIn, TOut>(config: RunnableNodeConfig<TIn, TOut>): RunnableNodeConfig<TIn, TIn & TOut>;
2806
2160
  type AnyRunnableNodeConfig = RunnableNodeConfig<any, any>;
2807
2161
  type AnyTriggerNodeConfig = TriggerNodeConfig<any>;
2808
2162
  type ValidStepSequence<TCurrentJson, TSteps extends ReadonlyArray<AnyRunnableNodeConfig>> = TSteps extends readonly [] ? readonly [] : TSteps extends readonly [infer TFirst, ...infer TRest] ? TFirst extends RunnableNodeConfig<TCurrentJson, infer TNextJson> ? TRest extends ReadonlyArray<AnyRunnableNodeConfig> ? readonly [TFirst, ...ValidStepSequence<TNextJson, TRest>] : never : never : TSteps;
@@ -2817,14 +2171,28 @@ type BooleanWhenOverloads<TCurrentJson, TReturn> = {
2817
2171
  };
2818
2172
  //#endregion
2819
2173
  //#region src/workflow/dsl/WhenBuilder.d.ts
2174
+ type WhenEndpoint = Readonly<{
2175
+ node: NodeRef;
2176
+ output: OutputPortKey;
2177
+ inputPortHint?: InputPortKey;
2178
+ }>;
2820
2179
  declare class WhenBuilder<TCurrentJson> {
2821
2180
  private readonly wf;
2822
2181
  private readonly from;
2823
2182
  private readonly branchPort;
2824
- constructor(wf: WorkflowBuilder, from: NodeRef, branchPort: OutputPortKey);
2183
+ private readonly priorEndpoints;
2184
+ private armEndpoint;
2185
+ constructor(wf: WorkflowBuilder, from: NodeRef, branchPort: OutputPortKey, priorEndpoints?: ReadonlyArray<WhenEndpoint>);
2825
2186
  addBranch<TSteps extends ReadonlyArray<AnyRunnableNodeConfig>>(steps: TSteps & ValidStepSequence<TCurrentJson, TSteps>): this;
2826
2187
  readonly when: BooleanWhenOverloads<TCurrentJson, WhenBuilder<TCurrentJson>>;
2188
+ then<TOutputJson$1, TConfig extends RunnableNodeConfig<TCurrentJson, TOutputJson$1>>(config: TConfig): ChainCursor<RunnableNodeOutputJson<TConfig>>;
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?: {
2190
+ name?: string;
2191
+ nodeId?: string;
2192
+ }): ChainCursor<HumanApprovalOutputJson<TCurrentJson & Record<string, unknown>>>;
2827
2193
  build(): WorkflowDefinition;
2194
+ private get accumulatedEndpoints();
2195
+ private toCursor;
2828
2196
  }
2829
2197
  //#endregion
2830
2198
  //#region src/workflow/dsl/ChainCursorResolver.d.ts
@@ -2844,24 +2212,10 @@ declare class ChainCursor<TCurrentJson> {
2844
2212
  private readonly endpoints;
2845
2213
  constructor(wf: WorkflowBuilder, endpoints: ReadonlyArray<ChainCursorEndpoint>);
2846
2214
  then<TOutputJson$1, TConfig extends RunnableNodeConfig<TCurrentJson, TOutputJson$1>>(config: TConfig): ChainCursor<RunnableNodeOutputJson<TConfig>>;
2215
+ thenMerge<TOutputJson$1, TConfig extends RunnableNodeConfig<TCurrentJson, TOutputJson$1>>(config: TConfig): ChainCursor<TCurrentJson & RunnableNodeOutputJson<TConfig>>;
2847
2216
  thenIntoInputHints<TOutputJson$1, TConfig extends RunnableNodeConfig<any, TOutputJson$1>>(config: TConfig): ChainCursor<RunnableNodeOutputJson<TConfig>>;
2848
2217
  readonly when: ChainCursorWhenOverloads<TCurrentJson>;
2849
2218
  route<TNextJson$1>(branches: Readonly<Record<OutputPortKey, (branch: ChainCursor<TCurrentJson>) => ChainCursor<TNextJson$1> | undefined>>): ChainCursor<TNextJson$1>;
2850
- /**
2851
- * Chainable shorthand for `.then(node.create(config, metadata?.name, metadata?.nodeId))`.
2852
- *
2853
- * Signals to readers that this step suspends the run and waits for a human decision.
2854
- * Throws at workflow-build time if `node` was not created via `defineHumanApprovalNode`.
2855
- *
2856
- * @example
2857
- * ```ts
2858
- * workflow
2859
- * .trigger(...)
2860
- * .humanApproval(inboxApproval, { title: "Approve?", body: "...", priority: "normal" })
2861
- * .then(nextStep.create(...))
2862
- * .build();
2863
- * ```
2864
- */
2865
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?: {
2866
2220
  name?: string;
2867
2221
  nodeId?: string;
@@ -2889,51 +2243,22 @@ declare class WorkflowBuilder {
2889
2243
  }
2890
2244
  //#endregion
2891
2245
  //#region src/workflow/dsl/WorkflowDefinitionError.d.ts
2892
- /**
2893
- * Thrown by {@link WorkflowBuilder.build} when the workflow definition is structurally invalid.
2894
- *
2895
- * Common causes:
2896
- * - A node has an empty effective id (label is blank and no explicit `id` was given).
2897
- * - Two or more nodes share the same effective id (label slugs collide or explicit ids clash).
2898
- *
2899
- * Fix: provide an explicit `id:` on the offending node configs.
2900
- */
2901
2246
  declare class WorkflowDefinitionError extends Error {
2902
2247
  constructor(message: string);
2903
2248
  }
2904
2249
  //#endregion
2905
2250
  //#region src/workflow/dsl/NodeIdSlugifier.d.ts
2906
- /**
2907
- * Converts a human-readable node label into a stable, URL-safe identifier segment.
2908
- *
2909
- * Rules:
2910
- * - Lowercase the entire string.
2911
- * - Replace every run of characters outside `[a-z0-9]` with a single `-`.
2912
- * - Strip any leading or trailing `-` characters.
2913
- * - Return `""` for blank/empty input.
2914
- */
2915
2251
  declare const NodeIdSlugifier: {
2916
2252
  slugify(label: string): string;
2917
2253
  };
2918
2254
  //#endregion
2919
2255
  //#region src/workflow/definition/ConnectionInvocationIdFactory.d.ts
2920
- /**
2921
- * Unique ids for persisted connection invocation history rows (LLM/tool calls under an owning node).
2922
- *
2923
- * Uses Web Crypto's `randomUUID` so this module is safe in browser-bundle contexts —
2924
- * paired with `NodeIterationIdFactory` which had the same `node:crypto` regression.
2925
- */
2926
2256
  declare class ConnectionInvocationIdFactory {
2927
2257
  static create(): string;
2928
- /** Deterministic id for tests when a stable sequence is needed. */
2929
2258
  static createForTest(runId: string, connectionNodeId: NodeId, sequence: number): string;
2930
2259
  }
2931
2260
  //#endregion
2932
2261
  //#region src/workflow/definition/ConnectionNodeIdFactory.d.ts
2933
- /**
2934
- * Deterministic ids for workflow connection-owned child nodes (LLM slot, tools, etc.).
2935
- * These are stable across loads.
2936
- */
2937
2262
  declare class ConnectionNodeIdFactory {
2938
2263
  static readonly connectionSegment: "__conn__";
2939
2264
  static languageModelConnectionNodeId(parentNodeId: NodeId): NodeId;
@@ -2953,36 +2278,18 @@ declare class ConnectionNodeIdFactory {
2953
2278
  parentNodeId: NodeId;
2954
2279
  normalizedToolName: string;
2955
2280
  }> | undefined;
2956
- /** True when `nodeId` is a connection-owned child of `parentNodeId` (LLM or tool slot). */
2957
2281
  static isConnectionOwnedDescendantOf(parentNodeId: NodeId, nodeId: NodeId): boolean;
2958
- /** Normalizes a tool display name to a stable id segment. */
2959
2282
  static normalizeToolName(toolName: string): string;
2960
2283
  }
2961
2284
  //#endregion
2962
2285
  //#region src/workflow/definition/NodeIterationIdFactory.d.ts
2963
- /**
2964
- * Unique ids for one per-item iteration of a runnable node's execute loop.
2965
- *
2966
- * Activations are per-batch (one scheduled execution of a node, possibly with N items).
2967
- * Iterations refine that to one identifier per item-index inside the batch loop, so per-item
2968
- * connection invocations and telemetry can be grouped without time-window heuristics.
2969
- *
2970
- * Uses Web Crypto's `randomUUID` (Node 19+ and all modern browsers) so this module is safe
2971
- * to include in the browser entry. Importing `node:crypto` here previously leaked into the
2972
- * canvas client bundle through `browser.ts` and OOM'd consumers' Turbopack builds.
2973
- */
2974
2286
  declare class NodeIterationIdFactory {
2975
2287
  static create(): string;
2976
- /** Deterministic id for tests when a stable sequence is needed. */
2977
2288
  static createForTest(seed: string, sequence: number): string;
2978
- /** Deterministic id derived from a connection node id (for sub-agent / tool-call scopes). */
2979
2289
  static createForConnection(connectionNodeId: NodeId, sequence: number): string;
2980
2290
  }
2981
2291
  //#endregion
2982
2292
  //#region src/workflow/definition/WorkflowExecutableNodeClassifier.d.ts
2983
- /**
2984
- * Derives which workflow nodes participate in the main execution graph vs connection-only children.
2985
- */
2986
2293
  declare class WorkflowExecutableNodeClassifier {
2987
2294
  private readonly connectionOwnedIds;
2988
2295
  constructor(workflow: WorkflowDefinition);
@@ -2990,9 +2297,6 @@ declare class WorkflowExecutableNodeClassifier {
2990
2297
  isExecutableNodeId(nodeId: NodeId): boolean;
2991
2298
  filterExecutableNodeDefinitions(nodes: ReadonlyArray<NodeDefinition>): ReadonlyArray<NodeDefinition>;
2992
2299
  private collectConnectionOwnedIds;
2993
- /**
2994
- * Resolves the default start node: first trigger, else first executable node with no incoming edges from executable nodes.
2995
- */
2996
2300
  findDefaultExecutableStartNodeId(workflow: WorkflowDefinition): NodeId;
2997
2301
  firstExecutableNodeIdInDefinitionOrder(workflow: WorkflowDefinition): NodeId | undefined;
2998
2302
  lastExecutableNodeIdInDefinitionOrder(workflow: WorkflowDefinition): NodeId;
@@ -3008,5 +2312,5 @@ declare class DefaultWorkflowGraphFactory implements WorkflowGraphFactory {
3008
2312
  create(def: WorkflowDefinition): WorkflowGraph;
3009
2313
  }
3010
2314
  //#endregion
3011
- export { ExecutionPayloadPolicyFields as $, CredentialBindingKey as $a, TriggerRuntimeDiagnostics as $i, BinaryPreviewKind as $n, nodeRef as $r, PersistedRunState as $t, DefinedNodeCredentialAccessors as A, TelemetrySpanEventRecord as Aa, NodeActivationContinuation as Ai, delay as An, RunId as Ar, DEFAULT_ASSERTION_PASS_THRESHOLD as At, RetryPolicy as B, CostTrackingComponent as Ba, NodeExecutionStatePublisher as Bi, ENGINE_EXECUTION_LIMITS_DEFAULTS as Bn, WorkflowErrorContext as Br, CurrentStateExecutionRequest as Bt, defineHumanApprovalNode as C, TelemetryArtifactReference as Ca, HumanTaskActor as Ci, DependencyContainer$1 as Cn, PollingTriggerDedupWindow as Co, NodeRef as Cr, ItemExprResolvedContext as Ct, DefineNodeOptions as D, TelemetryMetricRecord as Da, ItemNode as Di, RegistrationOptions as Dn, OutputPortKey as Do, PersistedRunPolicySnapshot as Dr, resolveItemExprsInUnknown as Dt, DefineNodeExecuteArgs as E, TelemetryChildSpanStart as Ea, HumanTaskSubject as Ei, Lifecycle as En, NodeId as Eo, ParentExecutionRef as Er, resolveItemExprsForExecution as Et, defineNode as F, NoOpExecutionTelemetryFactory as Fa, NodeBinaryAttachmentService as Fi, instancePerContainerCachingFactory as Fn, TriggerNodeConfig as Fr, AgentMcpToolMap as Ft, isPortsEmission as G, CostTrackingTelemetryMetricNames as Ga, PreparedNodeActivationDispatch as Gi, RunEventSubscription as Gn, WorkflowNodeConnection as Gr, NodeExecutionStatus as Gt, getOriginIndexFromItem as H, CostTrackingTelemetry as Ha, NodeResolver as Hi, EngineExecutionLimitsPolicyConfig as Hn, WorkflowErrorHandlerSpec as Hr, ExecutionFrontierPlan as Ht, RunFinishedAtFactory as I, NoOpExecutionTelemetry as Ia, NodeExecutionContext as Ii, predicateAwareClassFactory as In, TriggerNodeOutputJson as Ir, NeedsReconsentEvent as It, McpServerTransport as J, CollectionsContext as Ja, RunnableNodeExecuteArgs as Ji, TestSuiteRunId as Jn, WorkflowStoragePolicyDecisionArgs as Jr, PendingResumeEntry as Jt, isUnbrandedPortsEmissionShape as K, CostTrackingUsageRecord as Ka, ResumeContext as Ki, TestCaseRunStatus as Kn, WorkflowPolicyRuntimeDefaults as Kr, NodeInputsByPort as Kt, NoOpCostTrackingTelemetryFactory as L, NoOpNodeExecutionTelemetry as La, NodeExecutionRequest as Li, registry as Ln, TriggerNodeSetupState as Lr, ConnectionInvocationAppendArgs as Lt, DefinedNodeCredentialBindings as M, CodemationTelemetryMetricNames as Ma, NodeActivationRequest as Mi, injectAll as Mn, RunnableNodeConfig as Mr, NoOpAgentMcpIntegration as Mt, DefinedNodeRunContext as N, GenAiTelemetryAttributeNames as Na, NodeActivationRequestBase as Ni, injectable as Nn, RunnableNodeInputJson as Nr, AgentBindError as Nt, DefinedNode as O, TelemetryScope as Oa, LiveWorkflowRepository as Oi, TypeToken as On, PersistedTokenId as Oo, RunDataFactory as Or, AssertionResult as Ot, defineBatchNode as P, CodemationTelemetryAttributeNames as Pa, NodeActivationScheduler as Pi, instanceCachingFactory as Pn, RunnableNodeOutputJson as Pr, AgentMcpIntegration as Pt, ExecutionInstanceId as Q, CredentialBinding as Qa, TriggerNode as Qi, BinaryAttachment as Qn, branchRef as Qr, PersistedRunSchedulingState as Qt, NoOpCostTrackingTelemetry as R, NoOpTelemetrySpanScope as Ra, NodeExecutionRequestHandler as Ri, singleton as Rn, UpstreamRefPlaceholder as Rr, ConnectionInvocationId as Rt, HumanApprovalOutputJson as S, TelemetryArtifactAttachment as Sa, ExecutionContextFactory as Si, Container as Sn, PollingTriggerLogger as So, NodeOutputs as Sr, ItemExprContext as St, DefineBatchNodeOptions as T, TelemetryAttributes as Ta, HumanTaskId as Ti, InjectionToken$1 as Tn, NodeConnectionName as To, PairedItemRef as Tr, itemExpr as Tt, PortsEmission as U, CostTrackingTelemetryAttributeNames as Ua, PersistedTriggerSetupState as Ui, RunEvent as Un, WorkflowGraph as Ur, NodeExecutionError as Ut, NoRetryPolicy as V, CostTrackingPriceQuote as Va, NodeExecutor as Vi, EngineExecutionLimitsPolicy as Vn, WorkflowErrorHandler as Vr, EngineRunCounters as Vt, emitPorts as W, CostTrackingTelemetryFactory as Wa, PollingTriggerHandle as Wi, RunEventBus as Wn, WorkflowGraphFactory as Wr, NodeExecutionSnapshot as Wt, ConnectionInvocationKind as X, CredentialAdvancedSectionPresentation as Xa, TestableTriggerNode as Xi, TestTriggerSetupContext as Xn, WorkflowStoragePolicyResolver as Xr, PersistedMutableRunState as Xt, BatchId as Y, AnyCredentialType as Ya, SuspensionRequest as Yi, TestTriggerNodeConfig as Yn, WorkflowStoragePolicyMode as Yr, PersistedMutableNodeState as Yt, ExecutionInstanceDto as Z, CredentialAuthDefinition as Za, TriggerCleanupHandle as Zi, ActivationIdFactory as Zn, WorkflowStoragePolicySpec as Zr, PersistedRunControlState as Zt, BranchStepsArg as _, AllWorkflowsActiveWorkflowActivationPolicy as _a, EngineDeps as _i, RunTestContext as _n, CredentialTypeId as _o, NodeIdRef as _r, Param as _t, ConnectionNodeIdFactory as a, WorkflowRepository as aa, FixedRetryPolicySpec as ai, RunCompletionNotifier as an, CredentialInstanceRecord as ao, JsonArray as ar, PersistedRunWorkItemRecord as at, DefinedHumanApprovalNode as b, ExecutionTelemetryFactory as ba, ExecutionBinaryService as bi, WorkflowExecutionPruneRepository as bn, OAuth2ProviderFromPublicConfig as bo, NodeKind as br, ItemExprArgs as bt, WorkflowDefinitionError as c, WorkflowSnapshotFactory as ca, BINARY_DEFAULT_MAX_BYTES as ci, RunExecutionOptions as cn, CredentialOAuth2AuthDefinition as co, JsonPrimitive as cr, RunSlotProjectionState as ct, WhenBuilder as d, TriggerInstanceId as da, BinaryStorage as di, RunQueueEntry as dn, CredentialSessionFactory as do, NodeActivationId as dr, WorkItemStatus as dt, TriggerSetupContext as ea, runnableNodeInputType as ei, PersistedSuspensionEntry as en, CredentialFieldSchema as eo, Edge as er, PayloadStorageKind as et, AnyRunnableNodeConfig as f, WebhookControlSignal as fa, BinaryStorageReadResult as fi, RunResult as fn, CredentialSessionFactoryArgs as fo, NodeConfigBase as fr, WorkflowDetailSelectionState as ft, BranchOutputGuard as g, WebhookTriggerRoutingDiagnostics as ga, Duration as gi, RunSummary as gn, CredentialTypeDefinition as go, NodeErrorHandlerSpec as gr, Expr as gt, BranchMoreArgs as h, WebhookTriggerResolution as ha, BinaryStorageWriteResult as hi, RunStopCondition as hn, CredentialType as ho, NodeErrorHandlerArgs as hr, CostCatalogEntry as ht, NodeIterationIdFactory as i, WorkflowNodeInstanceFactory as ia, ExponentialRetryPolicySpec as ii, PinnedNodeOutputsByPort as in, CredentialInstanceId as io, Items as ir, PersistedRunWorkItemKind as it, DefinedNodeCredentialBinding as j, TelemetrySpanScope as ja, NodeActivationReceipt as ji, inject as jn, RunIdFactory as jr, deriveAssertionPassed as jt, DefinedNodeConfigInput as k, TelemetrySpanEnd as ka, MultiInputNode as ki, container$1 as kn, WorkflowId as ko, RunDataSnapshot as kr, AssertionResultProvenance as kt, WorkflowBuilder as l, WorkflowSnapshotResolver as la, BinaryAttachmentCreateRequest as li, RunHaltReason as ln, CredentialOAuth2ScopesFromPublicConfig as lo, JsonValue as lr, SlotExecutionStateDto as lt, BooleanWhenOverloads as m, WebhookTriggerMatcher as ma, BinaryStorageWriteRequest as mi, RunStatus as mn, CredentialSetupStatus as mo, NodeErrorHandler as mr, CostCatalog as mt, WorkflowExecutableNodeClassifierFactory as n, TriggerSetupStateRepository as na, triggerNodeOutputType as ni, PersistedWorkflowSnapshotNode as nn, CredentialHealthStatus as no, Item as nr, PersistedExecutionInstanceRecord as nt, ConnectionInvocationIdFactory as o, WorkflowRunnerResolver as oa, NoneRetryPolicySpec as oi, RunCurrentState as on, CredentialJsonRecord as oo, JsonNonArray as or, RunIterationDto as ot, AnyTriggerNodeConfig as p, WebhookInvocationMatch as pa, BinaryStorageStatResult as pi, RunStateResetRequest as pn, CredentialSessionService as po, NodeDefinition as pr, WorkflowRunDetailDto as pt, McpServerDeclaration as q, CollectionStore as qa, RunnableNode as qi, TestSuiteRunStatus as qn, WorkflowPrunePolicySpec as qr, PendingNodeExecution as qt, WorkflowExecutableNodeClassifier as r, TriggerTestItemsContext as ra, triggerNodeSetupStateType as ri, PersistedWorkflowTokenRegistryLike as rn, CredentialHealthTester as ro, ItemBinary as rr, PersistedRunSlotProjectionRecord as rt, NodeIdSlugifier as s, WorkflowRunnerService as sa, RetryPolicySpec as si, RunEventPublisherDeps as sn, CredentialMaterialSourceKind as so, JsonObject as sr, RunRevision as st, DefaultWorkflowGraphFactory as t, TriggerSetupStateFor as ta, runnableNodeOutputType as ti, PersistedWorkflowSnapshot as tn, CredentialHealth as to, ExecutionMode as tr, PersistedExecutionInstanceKind as tt, ChainCursor as u, HttpMethod as ua, BinaryBody as ui, RunPruneCandidate as un, CredentialRequirement as uo, MutableRunData as ur, WorkItemId as ut, StepSequenceOutput as v, WorkflowActivationPolicy as va, EngineHost as vi, WebhookRunResult as vn, CredentialTypeRegistry as vo, NodeInspectorSummaryRow as vr, ParamDeep as vt, isHumanApprovalNode as w, TelemetryAttributePrimitive as wa, HumanTaskHandle as wi, Disposable as wn, InputPortKey as wo, NodeSchedulerDecision as wr, isItemExpr as wt, HumanApprovalDecisionResult as x, NodeExecutionTelemetry as xa, ExecutionContext as xi, WorkflowExecutionRepository as xn, NoOpPollingTriggerLogger as xo, NodeOffloadPolicy as xr, ItemExprCallback as xt, ValidStepSequence as y, ExecutionTelemetry as ya, ExecutableTriggerNode as yi, WorkflowExecutionListingRepository as yn, CredentialUnboundError as yo, NodeIterationId as yr, ItemExpr as yt, ExpRetryPolicy as z, NoOpTelemetryArtifactReference as za, NodeExecutionScheduler as zi, CoreTokens as zn, WorkflowDefinition as zr, ConnectionInvocationRecord as zt };
3012
- //# sourceMappingURL=index-rllWL4r-.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