@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
@@ -3,11 +3,6 @@ import { ZodType } from "zod";
3
3
  import { DependencyContainer as Container, DependencyContainer as DependencyContainer$1, Disposable, InjectionToken as InjectionToken$1, InjectionToken as TypeToken, Lifecycle, RegistrationOptions, container, delay, inject, injectAll, injectable, instanceCachingFactory, instancePerContainerCachingFactory, predicateAwareClassFactory, registry, singleton } from "tsyringe";
4
4
 
5
5
  //#region src/contracts/baseTypes.d.ts
6
- /**
7
- * Minimal base types that have no dependencies on other contracts.
8
- * Used by credentialTypes, workflowTypes, and other contract layers
9
- * to avoid circular dependencies.
10
- */
11
6
  type WorkflowId = string;
12
7
  type NodeId = string;
13
8
  type OutputPortKey = string;
@@ -16,21 +11,12 @@ type PersistedTokenId = string;
16
11
  type NodeConnectionName = string;
17
12
  //#endregion
18
13
  //#region src/triggers/polling/PollingTriggerDedupWindow.d.ts
19
- /**
20
- * Merges processed-ID windows for polling triggers, capping the total to avoid unbounded growth.
21
- * Plugin code receives an instance of this class via {@link PollingTriggerHandle.dedup}.
22
- */
23
14
  declare class PollingTriggerDedupWindow {
24
15
  static readonly defaultCapN = 2000;
25
16
  merge(previous: ReadonlyArray<string>, incoming: ReadonlyArray<string>, capN?: number): ReadonlyArray<string>;
26
17
  }
27
18
  //#endregion
28
19
  //#region src/triggers/polling/PollingTriggerLogger.d.ts
29
- /**
30
- * Minimal logger surface for the polling-trigger runtime.
31
- * Hosts supply this via {@link EngineDeps.pollingTriggerLogger};
32
- * when absent the runtime is silent.
33
- */
34
20
  interface PollingTriggerLogger {
35
21
  info(message: string): void;
36
22
  warn(message: string): void;
@@ -56,22 +42,11 @@ type CredentialFieldSchema = Readonly<{
56
42
  type: "string" | "password" | "textarea" | "json" | "boolean";
57
43
  required?: true;
58
44
  order?: number;
59
- /**
60
- * Where this field appears in the credential dialog. Use `"advanced"` for optional or
61
- * power-user fields; they render inside a collapsible section (see `CredentialTypeDefinition.advancedSection`).
62
- * Defaults to `"default"` when omitted.
63
- */
64
45
  visibility?: "default" | "advanced";
65
46
  placeholder?: string;
66
47
  helpText?: string;
67
- /** When set, host resolves this field from process.env at runtime; env wins over stored values. */
68
48
  envVarName?: string;
69
- /**
70
- * When set, the dialog shows a copy action for this exact string (e.g. a static OAuth redirect URI
71
- * pattern or documentation URL). Do not use for secret values.
72
- */
73
49
  copyValue?: string;
74
- /** Accessible label for the copy control (default: Copy). */
75
50
  copyButtonLabel?: string;
76
51
  }>;
77
52
  type CredentialRequirement = Readonly<{
@@ -126,20 +101,9 @@ type CredentialOAuth2AuthDefinition = Readonly<{
126
101
  clientSecretFieldKey?: string;
127
102
  } | {
128
103
  kind: "oauth2";
129
- /**
130
- * Free-form provider identifier for telemetry, DB rows, and Better Auth provider naming.
131
- * Not used for any registry lookup — URLs come from {@link authorizeUrl} / {@link tokenUrl}.
132
- */
133
104
  providerId: string;
134
- /**
135
- * Authorization endpoint. May contain `{publicFieldKey}` placeholders that the runtime
136
- * substitutes from the credential's resolved public config (URL-encoded).
137
- * Example: `https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/authorize`
138
- */
139
105
  authorizeUrl: string;
140
- /** Token endpoint. Same templating rules as {@link authorizeUrl}. */
141
106
  tokenUrl: string;
142
- /** Optional userinfo endpoint. Same templating rules as {@link authorizeUrl}. */
143
107
  userInfoUrl?: string;
144
108
  scopes: ReadonlyArray<string>;
145
109
  scopesFromPublicConfig?: CredentialOAuth2ScopesFromPublicConfig;
@@ -148,11 +112,8 @@ type CredentialOAuth2AuthDefinition = Readonly<{
148
112
  }>;
149
113
  type CredentialAuthDefinition = CredentialOAuth2AuthDefinition;
150
114
  type CredentialAdvancedSectionPresentation = Readonly<{
151
- /** Collapsible section title (default: "Advanced"). */
152
115
  title?: string;
153
- /** Optional short helper text shown inside the section (above the fields). */
154
116
  description?: string;
155
- /** When true, the advanced section starts expanded. Default: false (collapsed). */
156
117
  defaultOpen?: boolean;
157
118
  }>;
158
119
  type CredentialTypeDefinition = Readonly<{
@@ -161,23 +122,11 @@ type CredentialTypeDefinition = Readonly<{
161
122
  description?: string;
162
123
  publicFields?: ReadonlyArray<CredentialFieldSchema>;
163
124
  secretFields?: ReadonlyArray<CredentialFieldSchema>;
164
- /**
165
- * Optional labels for the collapsible block that contains every field with `visibility: "advanced"`.
166
- * If omitted, the UI still shows that block with defaults (title "Advanced", collapsed).
167
- */
168
125
  advancedSection?: CredentialAdvancedSectionPresentation;
169
126
  supportedSourceKinds?: ReadonlyArray<CredentialMaterialSourceKind>;
170
127
  auth?: CredentialAuthDefinition;
171
128
  }>;
172
- /**
173
- * JSON-shaped credential field bag (public config, resolved secret material, etc.).
174
- */
175
129
  type CredentialJsonRecord = Readonly<Record<string, unknown>>;
176
- /**
177
- * Persisted credential instance with typed `publicConfig`.
178
- * Hosts may specialize `secretRef` with a stricter union while remaining
179
- * assignable here for session/test callbacks.
180
- */
181
130
  type CredentialInstanceRecord<TPublicConfig extends CredentialJsonRecord = CredentialJsonRecord> = Readonly<{
182
131
  instanceId: CredentialInstanceId;
183
132
  typeId: CredentialTypeId;
@@ -189,46 +138,30 @@ type CredentialInstanceRecord<TPublicConfig extends CredentialJsonRecord = Crede
189
138
  setupStatus: CredentialSetupStatus;
190
139
  createdAt: string;
191
140
  updatedAt: string;
192
- /**
193
- * Pointer to where the credential material bytes live. For OSS / standalone
194
- * rows this is `{source: "local", ref: instanceId}` and the bytes co-locate
195
- * with the row in the workspace DB. For managed-mode rows this is
196
- * `{source: "control-plane", ref: <cp_id>}` and the bytes live at CP.
197
- *
198
- * The seam is read through `CredentialMaterialProvider`. See
199
- * `docs/design/credentials-oauth-unification.md` ("Material provider seam").
200
- */
201
141
  material: Readonly<{
202
142
  source: "local" | "control-plane";
203
143
  ref: string;
204
144
  }>;
205
145
  }>;
206
- /**
207
- * Arguments passed to `CredentialType.createSession` and `CredentialType.test`.
208
- * Declare `TPublicConfig` / `TMaterial` on `CredentialType` so implementations are checked
209
- * against your credential shapes (similar to `NodeExecutionContext.config` for nodes).
210
- */
211
146
  type CredentialSessionFactoryArgs<TPublicConfig extends CredentialJsonRecord = CredentialJsonRecord, TMaterial extends CredentialJsonRecord = CredentialJsonRecord> = Readonly<{
212
147
  instance: CredentialInstanceRecord<TPublicConfig>;
213
148
  material: TMaterial;
214
149
  publicConfig: TPublicConfig;
215
150
  }>;
216
151
  type CredentialSessionFactory<TPublicConfig extends CredentialJsonRecord = CredentialJsonRecord, TMaterial extends CredentialJsonRecord = CredentialJsonRecord, TSession = unknown> = (args: CredentialSessionFactoryArgs<TPublicConfig, TMaterial>) => Promise<TSession>;
152
+ type CredentialAccessTokenSessionArgs<TPublicConfig extends CredentialJsonRecord = CredentialJsonRecord> = Readonly<{
153
+ accessToken: string;
154
+ grantedScopes: ReadonlyArray<string>;
155
+ publicConfig: TPublicConfig;
156
+ }>;
157
+ type CredentialAccessTokenSessionFactory<TPublicConfig extends CredentialJsonRecord = CredentialJsonRecord, TSession = unknown> = (args: CredentialAccessTokenSessionArgs<TPublicConfig>) => Promise<TSession>;
217
158
  type CredentialHealthTester<TPublicConfig extends CredentialJsonRecord = CredentialJsonRecord, TMaterial extends CredentialJsonRecord = CredentialJsonRecord> = (args: CredentialSessionFactoryArgs<TPublicConfig, TMaterial>) => Promise<CredentialHealth>;
218
- /**
219
- * Full credential type implementation: `definition` (UI/schema), `createSession`, and `test`.
220
- * Use this at registration and config boundaries; `CredentialTypeDefinition` is only the schema slice.
221
- */
222
159
  type CredentialType<TPublicConfig extends CredentialJsonRecord = CredentialJsonRecord, TMaterial extends CredentialJsonRecord = CredentialJsonRecord, TSession = unknown> = Readonly<{
223
160
  definition: CredentialTypeDefinition;
224
161
  createSession: CredentialSessionFactory<TPublicConfig, TMaterial, TSession>;
162
+ createSessionFromAccessToken?: CredentialAccessTokenSessionFactory<TPublicConfig, TSession>;
225
163
  test: CredentialHealthTester<TPublicConfig, TMaterial>;
226
164
  }>;
227
- /**
228
- * Credential type with unspecified generics — used for `CodemationConfig.credentialTypes`, the host registry,
229
- * and anywhere a concrete `CredentialType<YourPublic, YourMaterial, YourSession>` is placed in a heterogeneous list.
230
- * Using `any` here avoids unsafe `as` casts while keeping typed `satisfies CredentialType<…>` definitions.
231
- */
232
165
  type AnyCredentialType = CredentialType<any, any, unknown>;
233
166
  interface CredentialSessionService {
234
167
  getSession<TSession = unknown>(args: Readonly<{
@@ -249,38 +182,22 @@ declare class CredentialUnboundError extends Error {
249
182
  }
250
183
  //#endregion
251
184
  //#region src/contracts/collectionTypes.d.ts
252
- /**
253
- * Represents a typed store for a single collection.
254
- * All rows include auto-managed id, created_at, and updated_at fields.
255
- */
256
185
  interface CollectionStore<TRow extends Record<string, unknown> = Record<string, unknown>> {
257
- /**
258
- * Insert a new row. id, created_at, and updated_at are auto-populated.
259
- */
260
186
  insert(row: TRow): Promise<TRow & {
261
187
  id: string;
262
188
  created_at: Date;
263
189
  updated_at: Date;
264
190
  }>;
265
- /**
266
- * Get a single row by id.
267
- */
268
191
  get(id: string): Promise<(TRow & {
269
192
  id: string;
270
193
  created_at: Date;
271
194
  updated_at: Date;
272
195
  }) | null>;
273
- /**
274
- * Find a single row matching the provided filter.
275
- */
276
196
  findOne(filter: Partial<TRow>): Promise<(TRow & {
277
197
  id: string;
278
198
  created_at: Date;
279
199
  updated_at: Date;
280
200
  }) | null>;
281
- /**
282
- * List rows with optional pagination and filtering.
283
- */
284
201
  list(opts?: {
285
202
  limit?: number;
286
203
  offset?: number;
@@ -293,24 +210,15 @@ interface CollectionStore<TRow extends Record<string, unknown> = Record<string,
293
210
  }>;
294
211
  total: number;
295
212
  }>;
296
- /**
297
- * Update a row by id with partial data.
298
- */
299
213
  update(id: string, patch: Partial<TRow>): Promise<TRow & {
300
214
  id: string;
301
215
  created_at: Date;
302
216
  updated_at: Date;
303
217
  }>;
304
- /**
305
- * Delete a row by id. Hard delete only (no soft delete).
306
- */
307
218
  delete(id: string): Promise<{
308
219
  deleted: boolean;
309
220
  }>;
310
221
  }
311
- /**
312
- * Runtime collections context: keyed by collection name.
313
- */
314
222
  type CollectionsContext = Readonly<Record<string, CollectionStore>>;
315
223
  //#endregion
316
224
  //#region src/contracts/CostTrackingTelemetryContract.d.ts
@@ -363,7 +271,6 @@ declare class NoOpTelemetryArtifactReference {
363
271
  //#region src/contracts/NoOpTelemetrySpanScope.d.ts
364
272
  declare class NoOpTelemetrySpanScope {
365
273
  static readonly value: TelemetrySpanScope;
366
- /** Internal: the shared no-op {@link NodeExecutionTelemetry} that {@link NoOpNodeExecutionTelemetry} re-exposes. */
367
274
  static readonly nodeExecutionTelemetryValue: NodeExecutionTelemetry;
368
275
  }
369
276
  //#endregion
@@ -399,25 +306,15 @@ declare class CodemationTelemetryAttributeNames {
399
306
  static readonly connectionInvocationId = "codemation.connection.invocation_id";
400
307
  static readonly toolName = "codemation.tool.name";
401
308
  static readonly traceParentRunId = "codemation.parent.run.id";
402
- /** Per-item iteration that emitted this span/metric. Set on spans recorded inside a runnable per-item loop. */
403
309
  static readonly iterationId = "codemation.iteration.id";
404
- /** Item index (0-based) of the iteration. */
405
310
  static readonly iterationIndex = "codemation.iteration.index";
406
- /** Set when this span/metric was recorded under a sub-agent triggered by an outer LLM/tool call. */
407
311
  static readonly parentInvocationId = "codemation.parent.invocation_id";
408
- /** MCP server id on spans created for callTool invocations. */
409
312
  static readonly mcpServerId = "mcp.server_id";
410
- /** MCP tool name on spans created for callTool invocations. */
411
313
  static readonly mcpToolName = "mcp.tool_name";
412
- /** Terminal node-execution status (e.g. `"hitl-approved"`, `"hitl-rejected"`) on HITL outcome spans. */
413
314
  static readonly nodeExecutionStatus = "codemation.node.execution_status";
414
- /** Populated on run-halted spans; discriminates the halt reason (e.g. `"hitl-rejected"`). */
415
315
  static readonly runHaltReason = "codemation.run.halt_reason";
416
- /** Human task ID on `hitl.task.*` span events. */
417
316
  static readonly hitlTaskId = "codemation.hitl.task_id";
418
- /** HITL channel name (e.g. `"inbox"`, `"control-plane-inbox"`) on `hitl.task.*` span events. */
419
317
  static readonly hitlChannel = "codemation.hitl.channel";
420
- /** Decision outcome (e.g. `"approved"`, `"rejected"`) on `hitl.task.decided` span events. */
421
318
  static readonly hitlDecisionStatus = "codemation.hitl.decision_status";
422
319
  }
423
320
  //#endregion
@@ -498,13 +395,6 @@ interface TelemetrySpanScope extends TelemetryScope {
498
395
  readonly traceId: string;
499
396
  readonly spanId: string;
500
397
  end(args?: TelemetrySpanEnd): Promise<void> | void;
501
- /**
502
- * Lift this span into a {@link NodeExecutionTelemetry} scoped to a different (nodeId, activationId).
503
- * Children created via the returned telemetry's `startChildSpan` get this span as their parent.
504
- *
505
- * Used at the sub-agent boundary so that nested runtime telemetry parents under the agent.tool.call
506
- * span instead of the orchestrator's node-level span.
507
- */
508
398
  asNodeTelemetry(args: Readonly<{
509
399
  nodeId: NodeId;
510
400
  activationId: NodeActivationId;
@@ -531,14 +421,9 @@ interface ExecutionTelemetryFactory {
531
421
  }
532
422
  //#endregion
533
423
  //#region src/contracts/workflowActivationPolicy.d.ts
534
- /**
535
- * Host-controlled policy: when false, trigger {@link TriggerNode} setup is skipped and webhook routes
536
- * for that workflow are not registered (see engine trigger runtime + webhook matcher).
537
- */
538
424
  interface WorkflowActivationPolicy {
539
425
  isActive(workflowId: WorkflowId): boolean;
540
426
  }
541
- /** Default for tests and harnesses: every workflow is treated as active (legacy behavior). */
542
427
  declare class AllWorkflowsActiveWorkflowActivationPolicy implements WorkflowActivationPolicy {
543
428
  isActive(_workflowId: WorkflowId): boolean;
544
429
  }
@@ -553,23 +438,19 @@ interface WebhookControlSignal {
553
438
  }
554
439
  interface WebhookTriggerRoutingDiagnostics {
555
440
  warn(message: string): void;
556
- /** Inactive workflows omitted from the webhook route index (optional; host should wire for clarity at boot/reload). */
557
441
  info?(message: string): void;
558
442
  }
559
443
  interface TriggerInstanceId {
560
444
  workflowId: WorkflowId;
561
445
  nodeId: NodeId;
562
446
  }
563
- /** Match for an incoming HTTP request: user-defined URL segment + workflow trigger node. */
564
447
  interface WebhookInvocationMatch {
565
- /** Same value as the webhook trigger's configured endpoint key (URL segment under the webhook base path). */
566
448
  endpointPath: string;
567
449
  workflowId: WorkflowId;
568
450
  nodeId: NodeId;
569
451
  methods: ReadonlyArray<HttpMethod>;
570
452
  parseJsonBody?: (body: unknown) => unknown;
571
453
  }
572
- /** Result of resolving an HTTP method + endpoint path against the catalog webhook index (404 vs 405 vs match). */
573
454
  type WebhookTriggerResolution = {
574
455
  status: "notFound";
575
456
  } | {
@@ -579,9 +460,6 @@ type WebhookTriggerResolution = {
579
460
  status: "ok";
580
461
  match: WebhookInvocationMatch;
581
462
  };
582
- /**
583
- * Resolves webhook routes from workflow definitions (catalog-backed index, no registration at trigger setup).
584
- */
585
463
  interface WebhookTriggerMatcher {
586
464
  match(args: {
587
465
  endpointPath: string;
@@ -590,52 +468,29 @@ interface WebhookTriggerMatcher {
590
468
  lookup(endpointPath: string): WebhookInvocationMatch | undefined;
591
469
  onEngineWorkflowsLoaded?(): void;
592
470
  onEngineStopped?(): void;
593
- /** Rebuild route index after activation changes without stopping the engine. */
594
471
  reloadWebhookRoutes?(): void;
595
472
  }
596
473
  //#endregion
597
474
  //#region src/contracts/runtimeTypes.d.ts
598
- /** Opaque unique identifier for a single HumanTask instance. */
599
475
  type HumanTaskId = string;
600
- /**
601
- * Duration string — ISO 8601 duration ("PT24H") or shorthand ("24h").
602
- * Parsed by the timeout job; stored as-is in the suspension record.
603
- */
604
476
  type Duration = string;
605
- /**
606
- * Minimal handle handed to the `deliver` callback so it can route to the correct
607
- * inbox channel.
608
- */
609
477
  interface HumanTaskHandle {
610
478
  readonly taskId: HumanTaskId;
611
479
  readonly runId: string;
612
480
  readonly nodeId: string;
613
481
  readonly expiresAt: Date;
614
- /** TODO: real signed URL; placeholder empty string for now. */
615
482
  readonly resumeUrl: string;
616
- /**
617
- * Arbitrary JSON metadata copied from `SuspensionRequest.request.metadata` at suspension time.
618
- * Used by the agent runtime to round-trip the `agentCheckpoint` back to the
619
- * resumed node via `ctx.resumeContext.task.metadata`.
620
- */
621
483
  readonly metadata?: Readonly<Record<string, JsonValue>>;
622
484
  }
623
- /** Human-readable description surface shown to the reviewer. */
624
485
  interface HumanTaskSubject {
625
486
  readonly title: string;
626
487
  readonly summary: string;
627
488
  readonly attributes?: JsonValue;
628
489
  }
629
- /** Identity of the person who made a decision on the task. */
630
490
  interface HumanTaskActor {
631
491
  readonly actorId: string;
632
492
  readonly displayName?: string;
633
493
  }
634
- /**
635
- * Resume context injected into `NodeExecutionContext` when the engine re-activates
636
- * a previously suspended node. `defineHumanApprovalNode` wraps this with parsed
637
- * `TDecision`; at the engine layer `decision.value` is `unknown`.
638
- */
639
494
  interface ResumeContext {
640
495
  readonly decision: Readonly<{
641
496
  kind: "decided";
@@ -652,25 +507,6 @@ interface ResumeContext {
652
507
  readonly delivery: JsonValue;
653
508
  readonly task: HumanTaskHandle;
654
509
  }
655
- /**
656
- * Thrown by a node's `execute()` to request durable suspension of the current item.
657
- * The engine catches this, persists the suspension entry, calls `deliver`, and
658
- * continues to the next item (per-item semantics).
659
- *
660
- * @example
661
- * ```ts
662
- * throw new SuspensionRequest({
663
- * decisionSchema: z.object({ approved: z.boolean() }),
664
- * timeout: "PT24H",
665
- * onTimeout: "halt",
666
- * subject: { title: "Approve invoice", summary: "Invoice #1234 needs approval" },
667
- * deliver: async (handle) => {
668
- * await notifySlack(handle);
669
- * return { channel: "slack", ts: "..." };
670
- * },
671
- * });
672
- * ```
673
- */
674
510
  declare class SuspensionRequest<TDecision = unknown, TDelivery extends JsonValue = JsonValue> extends Error {
675
511
  readonly request: Readonly<{
676
512
  decisionSchema: ZodType<TDecision>;
@@ -734,11 +570,6 @@ interface NodeExecutionStatePublisher {
734
570
  error: Error;
735
571
  }): Promise<void>;
736
572
  appendConnectionInvocation(args: ConnectionInvocationAppendArgs): Promise<void>;
737
- /**
738
- * Annotates the current snapshot for `nodeId` with the id of the child run spawned by a
739
- * SubWorkflow invocation. Called from `SubWorkflowNode.execute` after `runById` resolves.
740
- * The engine's subsequent `markCompleted` call preserves the value via `previous.childRunId`.
741
- */
742
573
  setChildRunId?(args: {
743
574
  nodeId: NodeId;
744
575
  childRunId: RunId;
@@ -768,9 +599,7 @@ interface BinaryStorage {
768
599
  openReadStream(storageKey: string): Promise<BinaryStorageReadResult | undefined>;
769
600
  stat(storageKey: string): Promise<BinaryStorageStatResult>;
770
601
  delete(storageKey: string): Promise<void>;
771
- /** Deletes multiple objects in bulk. Keys are batched internally. */
772
602
  deleteMany(storageKeys: ReadonlyArray<string>): Promise<void>;
773
- /** Lists all keys sharing a common prefix. Returns keys in arbitrary order. */
774
603
  listByPrefix(prefix: string): Promise<ReadonlyArray<string>>;
775
604
  }
776
605
  interface BinaryAttachmentCreateRequest {
@@ -784,7 +613,6 @@ interface NodeBinaryAttachmentService extends ExecutionBinaryService {
784
613
  attach(args: BinaryAttachmentCreateRequest): Promise<BinaryAttachment>;
785
614
  withAttachment<TJson>(item: Item<TJson>, name: string, attachment: BinaryAttachment): Item<TJson>;
786
615
  }
787
- /** Default maximum bytes read into memory by the bounded helpers (50 MiB). */
788
616
  declare const BINARY_DEFAULT_MAX_BYTES: number;
789
617
  interface ExecutionBinaryService {
790
618
  forNode(args: {
@@ -792,32 +620,16 @@ interface ExecutionBinaryService {
792
620
  activationId: NodeActivationId;
793
621
  }): NodeBinaryAttachmentService;
794
622
  openReadStream(attachment: BinaryAttachment): Promise<BinaryStorageReadResult | undefined>;
795
- /**
796
- * Reads all bytes from the attachment into a contiguous `Uint8Array`.
797
- * Checks `attachment.size` against `maxBytes` *before* any allocation; throws a bounded-read
798
- * error when exceeded (no OOM). Throws if the stream is unavailable or the byte count mismatches.
799
- */
800
623
  getBytes(attachment: BinaryAttachment, maxBytes?: number): Promise<Uint8Array>;
801
- /**
802
- * Reads the attachment and decodes the bytes as UTF-8 text.
803
- * Subject to the same bounded-read safety as `getBytes`.
804
- */
805
624
  getText(attachment: BinaryAttachment, maxBytes?: number): Promise<string>;
806
- /**
807
- * Reads the attachment, decodes as UTF-8 text, and parses as JSON.
808
- * Throws a clear error on invalid JSON. Subject to the same bounded-read safety.
809
- */
810
625
  getJson<T = unknown>(attachment: BinaryAttachment, maxBytes?: number): Promise<T>;
811
626
  }
812
627
  interface ExecutionContext {
813
628
  runId: RunId;
814
629
  workflowId: WorkflowId;
815
630
  parent?: ParentExecutionRef;
816
- /** This run's subworkflow depth (0 = root). */
817
631
  subworkflowDepth: number;
818
- /** Effective activation budget cap for this run (after policy merge). */
819
632
  engineMaxNodeActivations: number;
820
- /** Effective subworkflow nesting cap for this run (after policy merge). */
821
633
  engineMaxSubworkflowDepth: number;
822
634
  now: () => Date;
823
635
  data: RunDataSnapshot;
@@ -825,28 +637,11 @@ interface ExecutionContext {
825
637
  telemetry: ExecutionTelemetry;
826
638
  binary: ExecutionBinaryService;
827
639
  getCredential<TSession = unknown>(slotKey: string): Promise<TSession>;
828
- /** Per-item iteration id, set by {@link NodeExecutor} on the ctx passed into runnable `execute`. */
829
640
  iterationId?: NodeIterationId;
830
- /** Item index (0-based) within the current activation's batch; set alongside {@link iterationId}. */
831
641
  itemIndex?: number;
832
- /** When set, this ctx is executing inside a sub-agent triggered by the named parent invocation. */
833
642
  parentInvocationId?: ConnectionInvocationId;
834
- /**
835
- * Present iff the run was started by a TestSuiteOrchestrator. The {@link IsTestRunNode}
836
- * branches on this; assertion-emitting nodes use it to decide whether to record results.
837
- */
838
643
  testContext?: RunTestContext;
839
- /**
840
- * Collections registered in the codemation config, keyed by collection name.
841
- */
842
644
  readonly collections?: CollectionsContext;
843
- /**
844
- * Resolve a DI token from the host container.
845
- * Allows nodes to reach host-side services (e.g. `InboxChannelResolverToken`)
846
- * without importing host code. Wired by `DefaultExecutionContextFactory`; throws
847
- * a clear error when no resolver is configured (e.g. in unit tests that don't
848
- * set up the full container).
849
- */
850
645
  resolve<T>(token: TypeToken<T>): T;
851
646
  }
852
647
  interface ExecutionContextFactory {
@@ -871,18 +666,9 @@ interface NodeExecutionContext<TConfig extends NodeConfigBase = NodeConfigBase>
871
666
  config: TConfig;
872
667
  telemetry: NodeExecutionTelemetry;
873
668
  binary: NodeBinaryAttachmentService;
874
- /**
875
- * Present when this node activation is a HITL resume.
876
- * The node checks `ctx.resumeContext !== undefined` and takes the resume branch.
877
- */
878
669
  resumeContext?: ResumeContext;
879
670
  }
880
- interface PollingTriggerHandle {
881
- /**
882
- * Start the polling loop. The runtime registers its own cleanup handle so callers do not need to
883
- * call {@link TriggerSetupContext.registerCleanup} for the loop.
884
- * @returns The state returned by the first cycle (or `undefined` when the overlap guard fired).
885
- */
671
+ interface TriggerPollingPort {
886
672
  start<TState, TItem>(args: {
887
673
  intervalMs: number;
888
674
  seedState?: TState;
@@ -894,7 +680,8 @@ interface PollingTriggerHandle {
894
680
  nextState: TState;
895
681
  }>;
896
682
  }): Promise<TState | undefined>;
897
- /** Convenience dedup-window helper. */
683
+ }
684
+ interface PollingTriggerHandle extends TriggerPollingPort {
898
685
  readonly dedup: PollingTriggerDedupWindow;
899
686
  }
900
687
  interface TriggerSetupContext<TConfig extends TriggerNodeConfig<any, any> = TriggerNodeConfig<any, any>, TSetupState$1 extends JsonValue | undefined = TriggerNodeSetupState<TConfig>> extends ExecutionContext {
@@ -903,7 +690,6 @@ interface TriggerSetupContext<TConfig extends TriggerNodeConfig<any, any> = Trig
903
690
  previousState: TSetupState$1;
904
691
  registerCleanup(cleanup: TriggerCleanupHandle): void;
905
692
  emit(items: Items): Promise<void>;
906
- /** Generic polling-trigger surface. Pre-binds trigger id, emit, and registerCleanup. */
907
693
  readonly polling: PollingTriggerHandle;
908
694
  }
909
695
  interface TriggerTestItemsContext<TConfig extends TriggerNodeConfig<any, any> = TriggerNodeConfig<any, any>, TSetupState$1 extends JsonValue | undefined = TriggerNodeSetupState<TConfig>> extends ExecutionContext {
@@ -912,11 +698,6 @@ interface TriggerTestItemsContext<TConfig extends TriggerNodeConfig<any, any> =
912
698
  config: TConfig;
913
699
  previousState: TSetupState$1;
914
700
  }
915
- /**
916
- * Trigger setup state is intentionally engine-owned so future ownership and
917
- * leader-election metadata can be coordinated centrally rather than pushed into
918
- * package-level setup code.
919
- */
920
701
  interface PersistedTriggerSetupState<TState extends JsonValue | undefined = JsonValue | undefined> {
921
702
  trigger: TriggerInstanceId;
922
703
  updatedAt: string;
@@ -934,12 +715,6 @@ interface EngineHost {
934
715
  credentialSessions: CredentialSessionService;
935
716
  workflows?: WorkflowRunnerService;
936
717
  }
937
- /**
938
- * Per-item runnable node: return JSON, an array to fan-out on `main`, an explicit `Item`, or {@link emitPorts}
939
- * for multi-port emission. Engine applies `inputSchema.parse(item.json)` and passes the result as `args.input`
940
- * (wire `item.json` is unchanged). Transform helpers may opt into binary preservation, while routers and
941
- * pass-through nodes should return explicit items when they need to preserve full item state.
942
- */
943
718
  interface RunnableNodeExecuteArgs<TConfig extends RunnableNodeConfig<any, any> = RunnableNodeConfig<any, any>, TInputJson$1 = unknown> {
944
719
  readonly input: TInputJson$1;
945
720
  readonly item: Item;
@@ -949,27 +724,13 @@ interface RunnableNodeExecuteArgs<TConfig extends RunnableNodeConfig<any, any> =
949
724
  }
950
725
  interface RunnableNode<TConfig extends RunnableNodeConfig<any, any> = RunnableNodeConfig<any, any>, TInputJson$1 = unknown, _TOutputJson = unknown> {
951
726
  readonly kind: "node";
952
- /**
953
- * Declared output ports (e.g. `["main"]`).
954
- *
955
- * Prefer describing dynamic router ports (Switch) and fixed multi-ports (If true/false)
956
- * via {@link NodeConfigBase.declaredOutputPorts}. Engine defaults to `["main"]` when omitted.
957
- */
958
727
  readonly outputPorts?: ReadonlyArray<OutputPortKey>;
959
- /** When omitted, engine uses {@link RunnableNodeConfig.inputSchema} or `z.unknown()`. */
960
728
  readonly inputSchema?: ZodType<TInputJson$1>;
961
729
  execute(args: RunnableNodeExecuteArgs<TConfig, TInputJson$1>): Promise<unknown> | unknown;
962
730
  }
963
- /** @deprecated Use {@link RunnableNode} */
964
731
  type ItemNode<TConfig extends RunnableNodeConfig<any, any> = RunnableNodeConfig<any, any>, TInputJson$1 = unknown, TOutputJson$1 = unknown> = RunnableNode<TConfig, TInputJson$1, TOutputJson$1>;
965
732
  interface MultiInputNode<TConfig extends NodeConfigBase = NodeConfigBase> {
966
733
  kind: "node";
967
- /**
968
- * Declared output ports (typically `["main"]`).
969
- *
970
- * Prefer describing ports for authoring/canvas via {@link NodeConfigBase.declaredOutputPorts}.
971
- * Engine defaults to `["main"]` when omitted.
972
- */
973
734
  outputPorts?: ReadonlyArray<OutputPortKey>;
974
735
  executeMulti(inputsByPort: NodeInputsByPort, ctx: NodeExecutionContext<TConfig>): Promise<NodeOutputs>;
975
736
  }
@@ -1070,7 +831,6 @@ interface WorkflowSnapshotResolver {
1070
831
  workflowSnapshot?: PersistedWorkflowSnapshot;
1071
832
  }): WorkflowDefinition | undefined;
1072
833
  }
1073
- /** Optional host wiring for trigger lifecycle logs (boot skip + activation sync). */
1074
834
  interface TriggerRuntimeDiagnostics {
1075
835
  info(message: string): void;
1076
836
  warn(message: string): void;
@@ -1079,7 +839,6 @@ interface EngineDeps {
1079
839
  credentialSessions: CredentialSessionService;
1080
840
  liveWorkflowRepository: LiveWorkflowRepository;
1081
841
  workflowRepository: WorkflowRepository;
1082
- /** When {@link AllWorkflowsActiveWorkflowActivationPolicy}, all workflows behave as active (tests). */
1083
842
  workflowActivationPolicy: WorkflowActivationPolicy;
1084
843
  nodeResolver: NodeResolver;
1085
844
  triggerSetupStateRepository: TriggerSetupStateRepository;
@@ -1095,39 +854,27 @@ interface EngineDeps {
1095
854
  eventBus?: RunEventBus;
1096
855
  tokenRegistry: PersistedWorkflowTokenRegistryLike;
1097
856
  workflowNodeInstanceFactory: WorkflowNodeInstanceFactory;
1098
- /** Defaults for prune/storage snapshot when workflow omits explicit policy fields. */
1099
857
  workflowPolicyRuntimeDefaults?: WorkflowPolicyRuntimeDefaults;
1100
- /** When set, logs inactive-workflow skips at boot and trigger start/stop on activation changes. */
1101
858
  triggerRuntimeDiagnostics?: TriggerRuntimeDiagnostics;
1102
- /** When set, the polling-trigger runtime uses this logger for cycle info/debug/error. */
1103
859
  pollingTriggerLogger?: PollingTriggerLogger;
1104
860
  }
1105
861
  //#endregion
1106
862
  //#region src/contracts/retryPolicySpec.types.d.ts
1107
- /**
1108
- * In-process retry policy for runnable nodes. Serialized configs use the same
1109
- * `kind` discriminator (`JSON.stringify` / persisted workflows).
1110
- *
1111
- * `maxAttempts` is the total number of tries including the first (e.g. 3 means up to 2 delays after failures).
1112
- */
1113
863
  type RetryPolicySpec = NoneRetryPolicySpec | FixedRetryPolicySpec | ExponentialRetryPolicySpec;
1114
864
  interface NoneRetryPolicySpec {
1115
865
  readonly kind: "none";
1116
866
  }
1117
867
  interface FixedRetryPolicySpec {
1118
868
  readonly kind: "fixed";
1119
- /** Total attempts including the first execution. Must be >= 1. */
1120
869
  readonly maxAttempts: number;
1121
870
  readonly delayMs: number;
1122
871
  }
1123
872
  interface ExponentialRetryPolicySpec {
1124
873
  readonly kind: "exponential";
1125
- /** Total attempts including the first execution. Must be >= 1. */
1126
874
  readonly maxAttempts: number;
1127
875
  readonly initialDelayMs: number;
1128
876
  readonly multiplier: number;
1129
877
  readonly maxDelayMs?: number;
1130
- /** When true, each delay is multiplied by a random factor in [1, 1.2). */
1131
878
  readonly jitter?: boolean;
1132
879
  }
1133
880
  //#endregion
@@ -1142,7 +889,6 @@ interface JsonObject {
1142
889
  }
1143
890
  type JsonValue = JsonPrimitive | JsonObject | JsonArray;
1144
891
  type JsonArray = ReadonlyArray<JsonValue>;
1145
- /** JSON value that is not a top-level array (nested arrays inside objects are allowed). */
1146
892
  type JsonNonArray = JsonPrimitive | JsonObject;
1147
893
  interface Edge {
1148
894
  from: {
@@ -1154,11 +900,6 @@ interface Edge {
1154
900
  input: InputPortKey;
1155
901
  };
1156
902
  }
1157
- /**
1158
- * Named connection from a parent node to child nodes that exist in {@link WorkflowDefinition.nodes}
1159
- * but are not traversed by the main execution graph. Parents are commonly executable nodes, but may
1160
- * also be connection-owned nodes for recursive agent attachments.
1161
- */
1162
903
  interface WorkflowNodeConnection {
1163
904
  readonly parentNodeId: NodeId;
1164
905
  readonly connectionName: NodeConnectionName;
@@ -1169,18 +910,10 @@ interface WorkflowDefinition {
1169
910
  name: string;
1170
911
  nodes: NodeDefinition[];
1171
912
  edges: Edge[];
1172
- /**
1173
- * Optional metadata: which nodes are connection-owned children (e.g. AI agent `llm` / `tools` slots).
1174
- * When omitted, all nodes in {@link nodes} are treated as executable for topology.
1175
- */
1176
913
  readonly connections?: ReadonlyArray<WorkflowNodeConnection>;
1177
- /** Directory + file-stem path under a workflow discovery root (for UI grouping only). */
1178
914
  discoveryPathSegments?: readonly string[];
1179
- /** Retention for run JSON and binaries (seconds). Host/env may supply defaults when omitted. */
1180
915
  readonly prunePolicy?: WorkflowPrunePolicySpec;
1181
- /** Whether to keep run data after completion. Host/env may supply defaults when omitted. */
1182
916
  readonly storagePolicy?: WorkflowStoragePolicySpec;
1183
- /** Invoked after a node fails permanently (retries exhausted) and node error handler did not recover. */
1184
917
  readonly workflowErrorHandler?: WorkflowErrorHandlerSpec;
1185
918
  }
1186
919
  interface WorkflowGraph {
@@ -1198,52 +931,26 @@ interface NodeConfigBase {
1198
931
  readonly name?: string;
1199
932
  readonly id?: NodeId;
1200
933
  readonly icon?: string;
934
+ readonly description?: string;
1201
935
  readonly execution?: Readonly<{
1202
936
  hint?: "local" | "worker";
1203
937
  queue?: string;
1204
938
  }>;
1205
- /** In-process execute retries (runnable nodes). Triggers typically omit this. */
1206
939
  readonly retryPolicy?: RetryPolicySpec;
1207
- /** Recover from execute failures; return outputs to continue, or rethrow to fail the node. */
1208
940
  readonly nodeErrorHandler?: NodeErrorHandlerSpec;
1209
- /**
1210
- * When true, edges carrying zero items on an output port still schedule single-input downstream nodes.
1211
- * Decided from the **source** node that produced the (empty) output. Default (false/undefined): empty
1212
- * main batches skip downstream execution and propagate the empty path.
1213
- */
1214
941
  readonly continueWhenEmptyOutput?: boolean;
1215
- /**
1216
- * Declared I/O port names for canvas authoring (unioned with ports inferred from edges).
1217
- * Use for dynamic routers (Switch) and future error ports.
1218
- */
1219
942
  readonly declaredOutputPorts?: ReadonlyArray<OutputPortKey>;
1220
943
  readonly declaredInputPorts?: ReadonlyArray<InputPortKey>;
1221
944
  getCredentialRequirements?(): ReadonlyArray<CredentialRequirement>;
1222
- /**
1223
- * Marker: this node emits {@link import("./assertionTypes").AssertionResult}-shaped items on its
1224
- * `main` port. The TestSuiteOrchestrator (and host-side TestAssertionPersister) listen for
1225
- * `nodeCompleted` events from nodes with this flag set, and persist their output items as
1226
- * TestAssertion records (only when the run carries a `testContext`). Set on assertion node
1227
- * configs (e.g. `AssertionNodeConfig`, `StringEqualsAssertionNodeConfig`).
1228
- */
1229
945
  readonly emitsAssertions?: true;
1230
- /**
1231
- * Static configuration summary surfaced in the workflow inspector — the design-time
1232
- * "what does this node do" panel that renders before any run telemetry exists.
1233
- *
1234
- * Return 2–6 short label/value pairs derived from this config (method + url for an HTTP
1235
- * call, model + tool list for an agent, schedule + timezone for a cron trigger, etc.).
1236
- * Values are truncated by the UI; aim for one line each. Return `undefined` to opt out
1237
- * — the inspector hides the section when no rows are produced.
1238
- *
1239
- * Implement on the config class instance so the function can read sibling config fields.
1240
- * `defineNode({ inspectorSummary })` plumbs through to this.
1241
- */
1242
946
  inspectorSummary?(): ReadonlyArray<NodeInspectorSummaryRow> | undefined;
1243
947
  }
1244
- /**
1245
- * One row of a node's static configuration summary. See {@link NodeConfigBase.inspectorSummary}.
1246
- */
948
+ interface PollingTriggerConfig {
949
+ getTriggerPollConfig(): Readonly<{
950
+ config: JsonObject;
951
+ pollIntervalMs?: number;
952
+ }>;
953
+ }
1247
954
  interface NodeInspectorSummaryRow {
1248
955
  readonly label: string;
1249
956
  readonly value: string;
@@ -1251,24 +958,11 @@ interface NodeInspectorSummaryRow {
1251
958
  declare const runnableNodeInputType: unique symbol;
1252
959
  declare const runnableNodeOutputType: unique symbol;
1253
960
  declare const triggerNodeOutputType: unique symbol;
1254
- /**
1255
- * Runnable node: **`TInputJson`** is what **`inputSchema`** validates on **`item.json`** (the wire payload).
1256
- * **`TOutputJson`** is emitted `item.json` on outputs.
1257
- */
1258
961
  interface RunnableNodeConfig<TInputJson$1 = unknown, TOutputJson$1 = unknown> extends NodeConfigBase {
1259
962
  readonly kind: "node";
1260
963
  readonly [runnableNodeInputType]?: TInputJson$1;
1261
964
  readonly [runnableNodeOutputType]?: TOutputJson$1;
1262
- /**
1263
- * Optional Zod input contract for {@link RunnableNode} when not set on the node class.
1264
- * Resolution order: node instance `inputSchema`, then config `inputSchema`, then `z.unknown()`.
1265
- */
1266
965
  readonly inputSchema?: ZodType<TInputJson$1>;
1267
- /**
1268
- * When an activation receives **zero** input items, the engine normally runs `execute` zero times.
1269
- * Set to **`runOnce`** to run `execute` once with an empty `items` batch (and a synthetic wire item for schema parsing).
1270
- * Used by batch-style callback nodes (built-in `Callback`) so `callback([], ctx)` still runs.
1271
- */
1272
966
  readonly emptyBatchExecution?: "skip" | "runOnce";
1273
967
  }
1274
968
  declare const triggerNodeSetupStateType: unique symbol;
@@ -1276,11 +970,6 @@ interface TriggerNodeConfig<TOutputJson$1 = unknown, TSetupState$1 extends JsonV
1276
970
  readonly kind: "trigger";
1277
971
  readonly [triggerNodeOutputType]?: TOutputJson$1;
1278
972
  readonly [triggerNodeSetupStateType]?: TSetupState$1;
1279
- /**
1280
- * Distinguishes triggers driven by the live activation policy (webhooks, cron, polling) from
1281
- * triggers driven only by the {@link TestSuiteOrchestrator}. `WorkflowActivation` skips
1282
- * `"test"` triggers; the orchestrator skips `"live"` triggers. Defaults to `"live"` when omitted.
1283
- */
1284
973
  readonly triggerKind?: "live" | "test";
1285
974
  }
1286
975
  type RunnableNodeInputJson<TConfig extends RunnableNodeConfig<any, any>> = TConfig extends RunnableNodeConfig<infer TInputJson, any> ? TInputJson : never;
@@ -1332,27 +1021,14 @@ type Items<TJson = unknown> = ReadonlyArray<Item<TJson>>;
1332
1021
  type NodeOutputs = Partial<Record<OutputPortKey, Items>>;
1333
1022
  type RunId = string;
1334
1023
  type NodeActivationId = string;
1335
- /**
1336
- * One per-item iteration of a runnable node's execute loop. Refines `NodeActivationId` for
1337
- * per-item connection invocations and telemetry. Undefined when the executing node is a batch
1338
- * node or trigger that does not iterate items.
1339
- */
1340
1024
  type NodeIterationId = string;
1341
1025
  interface ParentExecutionRef {
1342
1026
  runId: RunId;
1343
1027
  workflowId: WorkflowId;
1344
1028
  nodeId: NodeId;
1345
- /** Subworkflow depth of the **spawning** run (0 = root). Passed when starting a child run. */
1346
1029
  subworkflowDepth?: number;
1347
- /** Effective max node activations from the parent run (propagated to child policy merge). */
1348
1030
  engineMaxNodeActivations?: number;
1349
- /** Effective max subworkflow depth from the parent run (propagated to child policy merge). */
1350
1031
  engineMaxSubworkflowDepth?: number;
1351
- /**
1352
- * Test-suite linkage inherited by the child subworkflow run. Set by whichever node
1353
- * spawns the subworkflow when its own `ctx.testContext` is present, so assertions
1354
- * emitted inside a subworkflow land under the correct parent test case.
1355
- */
1356
1032
  testContext?: RunTestContext;
1357
1033
  }
1358
1034
  interface RunDataSnapshot {
@@ -1387,7 +1063,6 @@ interface NodeOffloadPolicy {
1387
1063
  config: NodeConfigBase;
1388
1064
  }): NodeSchedulerDecision;
1389
1065
  }
1390
- /** Whether to persist run execution data after the workflow finishes. */
1391
1066
  type WorkflowStoragePolicyMode = "ALL" | "SUCCESS" | "ERROR" | "NEVER";
1392
1067
  type WorkflowStoragePolicySpec = WorkflowStoragePolicyMode | TypeToken<WorkflowStoragePolicyResolver>;
1393
1068
  interface WorkflowStoragePolicyResolver {
@@ -1440,7 +1115,6 @@ interface NodeErrorHandler {
1440
1115
  handle<TConfig extends NodeConfigBase>(args: NodeErrorHandlerArgs<TConfig>): Promise<NodeOutputs>;
1441
1116
  }
1442
1117
  type NodeErrorHandlerSpec = TypeToken<NodeErrorHandler> | NodeErrorHandler;
1443
- /** Runtime defaults when workflow omits prune/storage fields (typically from host env). */
1444
1118
  interface WorkflowPolicyRuntimeDefaults {
1445
1119
  readonly retentionSeconds?: number;
1446
1120
  readonly binaryRetentionSeconds?: number;
@@ -1451,76 +1125,25 @@ interface WorkflowPolicyRuntimeDefaults {
1451
1125
  }
1452
1126
  //#endregion
1453
1127
  //#region src/contracts/testTriggerTypes.d.ts
1454
- /**
1455
- * Identifier minted by the host (or in-memory test runner) for one execution of a test suite.
1456
- * One TestSuiteRun produces N child workflow runs, one per item yielded by `generateItems`.
1457
- */
1458
1128
  type TestSuiteRunId = string;
1459
- /**
1460
- * Setup context passed to a {@link TestTriggerNodeConfig.generateItems} callback. Distinct from
1461
- * {@link import("./runtimeTypes").TriggerSetupContext} on purpose: test triggers are not
1462
- * activated by the live trigger lifecycle (webhooks, cron, polling) and never call `emit` —
1463
- * the orchestrator pulls from the iterable they return and dispatches one run per item.
1464
- */
1465
1129
  interface TestTriggerSetupContext<TConfig extends TestTriggerNodeConfig<unknown> = TestTriggerNodeConfig<unknown>> {
1466
1130
  readonly workflowId: WorkflowId;
1467
1131
  readonly nodeId: NodeId;
1468
1132
  readonly config: TConfig;
1469
1133
  readonly testSuiteRunId: TestSuiteRunId;
1470
- /**
1471
- * Resolves a credential session for a slot declared on this trigger's
1472
- * {@link import("./workflowTypes").NodeConfigBase.getCredentialRequirements}. Same contract as
1473
- * {@link import("./runtimeTypes").ExecutionContext.getCredential}.
1474
- */
1475
1134
  getCredential<TSession = unknown>(slotKey: string): Promise<TSession>;
1476
- /** AbortSignal raised when the suite is cancelled — long-running pulls should bail out. */
1477
1135
  readonly signal: AbortSignal;
1478
1136
  }
1479
- /**
1480
- * A trigger config that emits **test cases**. Each item yielded by {@link generateItems}
1481
- * becomes one workflow run (with `executionOptions.testContext` set), so 10 yielded items
1482
- * → 10 runs marked under the same TestSuiteRun.
1483
- *
1484
- * The trigger is otherwise a normal {@link TriggerNodeConfig} (so the canvas treats it like
1485
- * any other trigger), but its `triggerKind` is `"test"` so the live activation policy skips it.
1486
- */
1487
1137
  interface TestTriggerNodeConfig<TOutputJson$1 = unknown> extends TriggerNodeConfig<TOutputJson$1, undefined> {
1488
1138
  readonly triggerKind: "test";
1489
- /**
1490
- * Author-supplied async iterable of items, evaluated lazily. Implementations may fetch from
1491
- * credentialed APIs, read fixture files, or yield hard-coded items. The orchestrator iterates
1492
- * and dispatches one run per item, with concurrency capped by {@link concurrency} (default 4).
1493
- */
1494
1139
  generateItems(ctx: TestTriggerSetupContext<TestTriggerNodeConfig<TOutputJson$1>>): AsyncIterable<Item<TOutputJson$1>>;
1495
- /** Per-suite-run cap on simultaneously-executing test cases. Default: 4. */
1496
1140
  readonly concurrency?: number;
1497
- /**
1498
- * Free-form description of where the test cases come from — surfaced in the node properties
1499
- * panel and the suite-detail header so authors revisiting the workflow six months later
1500
- * remember which mailbox / folder / fixture file the cases originate from.
1501
- *
1502
- * Example: `"All emails in the Gmail label \"test/triage-fixtures\" — 14 messages as of 2026-05-03."`
1503
- */
1504
1141
  readonly description?: string;
1505
- /**
1506
- * Resolves a human-readable label for one yielded test case (e.g. email subject). The
1507
- * orchestrator calls this once per yielded item, persists the result on the run, and the
1508
- * Tests-tab UI uses it to render the case row instead of the opaque runId. Return
1509
- * `undefined` to fall back to "Case #N".
1510
- */
1511
1142
  caseLabel?(item: Item<TOutputJson$1>): string | undefined;
1512
1143
  }
1513
1144
  //#endregion
1514
1145
  //#region src/events/runEvents.d.ts
1515
- /**
1516
- * Outcome of a single test case (one workflow run dispatched by the test-suite orchestrator).
1517
- * - `running`: workflow still in flight
1518
- * - `succeeded`: workflow completed AND all assertions passed (or no assertions)
1519
- * - `failed`: workflow failed OR (workflow completed but ≥1 assertion failed)
1520
- * - `errored` / `cancelled`: workflow itself errored or was cancelled
1521
- */
1522
1146
  type TestCaseRunStatus = "running" | "succeeded" | "failed" | "errored" | "cancelled";
1523
- /** Aggregate outcome of a TestSuiteRun. */
1524
1147
  type TestSuiteRunStatus = "succeeded" | "failed" | "partial" | "errored" | "cancelled";
1525
1148
  type RunEvent = Readonly<{
1526
1149
  kind: "runCreated";
@@ -1634,23 +1257,20 @@ interface EngineExecutionLimitsPolicyConfig {
1634
1257
  readonly defaultMaxSubworkflowDepth: number;
1635
1258
  readonly hardMaxSubworkflowDepth: number;
1636
1259
  }
1637
- /** Framework defaults for {@link EngineExecutionLimitsPolicy} (merged with host `runtime.engineExecutionLimits`). */
1638
1260
  declare const ENGINE_EXECUTION_LIMITS_DEFAULTS: EngineExecutionLimitsPolicyConfig;
1639
- /**
1640
- * Resolves per-run execution limits: defaults, hard ceilings, and subworkflow depth for new runs.
1641
- */
1642
1261
  declare class EngineExecutionLimitsPolicy {
1643
1262
  private readonly config;
1644
1263
  constructor(config?: EngineExecutionLimitsPolicyConfig);
1645
- /**
1646
- * Effective options for a new root run (depth 0): defaults merged with engine ceilings.
1647
- * Replaces a separate one-method factory for root-run bootstrap.
1648
- */
1649
1264
  createRootExecutionOptions(): RunExecutionOptions;
1650
1265
  mergeExecutionOptionsForNewRun(parent: ParentExecutionRef | undefined, user: RunExecutionOptions | undefined): RunExecutionOptions;
1651
1266
  private capNumber;
1652
1267
  }
1653
1268
  //#endregion
1269
+ //#region src/contracts/triggerInvokerTypes.d.ts
1270
+ interface TriggerInvoker {
1271
+ invoke(trigger: TriggerInstanceId, config: TriggerNodeConfig, lastRanAt: string | undefined): Promise<Items>;
1272
+ }
1273
+ //#endregion
1654
1274
  //#region src/di/CoreTokens.d.ts
1655
1275
  declare const CoreTokens: {
1656
1276
  readonly PersistedWorkflowTokenRegistry: TypeToken<PersistedWorkflowTokenRegistryLike>;
@@ -1671,54 +1291,31 @@ declare const CoreTokens: {
1671
1291
  readonly RunEventBus: TypeToken<RunEventBus>;
1672
1292
  readonly BinaryStorage: TypeToken<BinaryStorage>;
1673
1293
  readonly WebhookBasePath: TypeToken<string>;
1674
- /** Engine execution limits (defaults + optional host overrides). Consumers may bind a custom instance to override. */
1675
1294
  readonly EngineExecutionLimitsPolicy: TypeToken<EngineExecutionLimitsPolicy>;
1676
1295
  readonly WorkflowActivationPolicy: TypeToken<WorkflowActivationPolicy>;
1677
- /**
1678
- * Optional. When registered, AIAgentNode uses it to resolve mcpServers bindings,
1679
- * validate scopes, open pool connections, and prepare the MCP ToolSet map.
1680
- * Not registered in the default core bootstrap — the host provides the implementation.
1681
- */
1682
1296
  readonly AgentMcpIntegration: TypeToken<AgentMcpIntegration>;
1297
+ readonly TriggerInvoker: TypeToken<TriggerInvoker>;
1683
1298
  };
1684
1299
  //#endregion
1685
1300
  //#region src/contracts/runTypes.d.ts
1686
- /**
1687
- * Test-suite linkage for a run. When set, this run was started by a TestSuiteOrchestrator
1688
- * as one test case inside a TestSuiteRun. The `IsTestRun` node and host-side persisters key
1689
- * off the presence of this field. Subworkflow runs inherit it from their parent run.
1690
- */
1691
1301
  interface RunTestContext {
1692
1302
  readonly testSuiteRunId: string;
1693
1303
  readonly testCaseIndex: number;
1694
- /**
1695
- * Optional human-friendly label for this test case (e.g. an email subject when fixtures
1696
- * are loaded from a mailbox). Resolved per item by `TestTrigger.caseLabel(item)` if set,
1697
- * persisted on `Run.test_case_label` so the Tests-tab tree-table can show "RFQ for batch 14"
1698
- * instead of "run_1777755971399_bbb86beac1396".
1699
- */
1700
1304
  readonly testCaseLabel?: string;
1701
1305
  }
1702
1306
  interface RunExecutionOptions {
1703
- /** Run-intent override: force the inline scheduler and bypass node-level offload decisions. */
1704
1307
  localOnly?: boolean;
1705
- /** Marks runs started from webhook handling so orchestration can apply webhook-specific continuation rules. */
1706
1308
  webhook?: boolean;
1707
1309
  mode?: "manual" | "debug";
1708
1310
  sourceWorkflowId?: WorkflowId;
1709
1311
  sourceRunId?: RunId;
1710
1312
  derivedFromRunId?: RunId;
1711
1313
  isMutable?: boolean;
1712
- /** Set by the engine for this run: 0 = root, 1 = first child subworkflow, … */
1713
1314
  subworkflowDepth?: number;
1714
- /** Effective cap after engine policy merge (successful node completions per run). */
1715
1315
  maxNodeActivations?: number;
1716
- /** Effective cap after engine policy merge (subworkflow nesting). */
1717
1316
  maxSubworkflowDepth?: number;
1718
- /** Present iff started by a TestSuiteOrchestrator; propagates to subworkflow runs via {@link ParentExecutionRef.testContext}. */
1719
1317
  testContext?: RunTestContext;
1720
1318
  }
1721
- /** Engine-owned counters persisted with the run (worker-safe). */
1722
1319
  interface EngineRunCounters {
1723
1320
  completedNodeActivations: number;
1724
1321
  }
@@ -1743,7 +1340,6 @@ interface PersistedWorkflowSnapshotNode {
1743
1340
  tokenName?: string;
1744
1341
  configTokenName?: string;
1745
1342
  config: unknown;
1746
- /** Pre-computed static configuration summary; populated by WorkflowSnapshotCodec. */
1747
1343
  inspectorSummary?: ReadonlyArray<Readonly<{
1748
1344
  label: string;
1749
1345
  value: string;
@@ -1754,9 +1350,7 @@ interface PersistedWorkflowSnapshot {
1754
1350
  name: string;
1755
1351
  nodes: ReadonlyArray<PersistedWorkflowSnapshotNode>;
1756
1352
  edges: ReadonlyArray<Edge>;
1757
- /** When the snapshot was built from a live workflow definition that configured a workflow error handler. */
1758
1353
  workflowErrorHandlerConfigured?: boolean;
1759
- /** Connection metadata for child nodes not in the execution graph (e.g. AI agent attachments). */
1760
1354
  connections?: ReadonlyArray<WorkflowNodeConnection>;
1761
1355
  }
1762
1356
  type PinnedNodeOutputsByPort = Readonly<Record<OutputPortKey, Items>>;
@@ -1804,18 +1398,9 @@ interface NodeExecutionSnapshot {
1804
1398
  inputsByPort?: NodeInputsByPort;
1805
1399
  outputs?: NodeOutputs;
1806
1400
  error?: NodeExecutionError;
1807
- /**
1808
- * When the node is a SubWorkflow invocation, the run id of the child run it spawned.
1809
- * Populated after the child run completes so the UI can deep-link to that specific execution.
1810
- */
1811
1401
  childRunId?: RunId;
1812
1402
  }
1813
- /** Stable id for a single connection invocation row in {@link ConnectionInvocationRecord}. */
1814
1403
  type ConnectionInvocationId = string;
1815
- /**
1816
- * One logical LLM or tool call under an owning workflow node (e.g. AI agent).
1817
- * The owning node defines what {@link managedInput} and {@link managedOutput} contain.
1818
- */
1819
1404
  interface ConnectionInvocationRecord {
1820
1405
  readonly invocationId: ConnectionInvocationId;
1821
1406
  readonly runId: RunId;
@@ -1826,23 +1411,17 @@ interface ConnectionInvocationRecord {
1826
1411
  readonly status: NodeExecutionStatus;
1827
1412
  readonly managedInput?: JsonValue;
1828
1413
  readonly managedOutput?: JsonValue;
1829
- /** 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. */
1830
1414
  readonly statusLabel?: string;
1831
- /** 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. */
1832
1415
  readonly subjectName?: string;
1833
1416
  readonly error?: NodeExecutionError;
1834
1417
  readonly queuedAt?: string;
1835
1418
  readonly startedAt?: string;
1836
1419
  readonly finishedAt?: string;
1837
1420
  readonly updatedAt: string;
1838
- /** Per-item iteration id minted by the engine when this invocation occurred inside a runnable node's per-item loop. */
1839
1421
  readonly iterationId?: NodeIterationId;
1840
- /** Item index (0-based) of the iteration that produced this invocation. */
1841
1422
  readonly itemIndex?: number;
1842
- /** When set, this invocation was produced inside a sub-agent triggered by the named parent invocation. */
1843
1423
  readonly parentInvocationId?: ConnectionInvocationId;
1844
1424
  }
1845
- /** Arguments for appending a {@link ConnectionInvocationRecord} (engine fills run/workflow ids and timestamps). */
1846
1425
  type ConnectionInvocationAppendArgs = Readonly<{
1847
1426
  invocationId: ConnectionInvocationId;
1848
1427
  connectionNodeId: NodeId;
@@ -1864,7 +1443,6 @@ type ConnectionInvocationAppendArgs = Readonly<{
1864
1443
  interface RunCurrentState {
1865
1444
  outputsByNode: Record<NodeId, NodeOutputs>;
1866
1445
  nodeSnapshotsByNodeId: Record<NodeId, NodeExecutionSnapshot>;
1867
- /** Append-only history of connection-scoped invocations (LLM/tool) for inspector and canvas. */
1868
1446
  connectionInvocations?: ReadonlyArray<ConnectionInvocationRecord>;
1869
1447
  mutableState?: PersistedMutableRunState;
1870
1448
  }
@@ -1891,21 +1469,13 @@ interface ExecutionFrontierPlan {
1891
1469
  preservedPinnedNodeIds: ReadonlyArray<NodeId>;
1892
1470
  }
1893
1471
  type RunStatus = "running" | "pending" | "completed" | "failed" | "suspended" | "halted";
1894
- /** Reason a run transitioned to {@link RunStatus} `"halted"`. */
1895
1472
  type RunHaltReason = "hitl-rejected" | "hitl-timeout" | "hitl-cancelled";
1896
1473
  interface RunSummary {
1897
1474
  runId: RunId;
1898
1475
  workflowId: WorkflowId;
1899
1476
  startedAt: string;
1900
1477
  status: RunStatus;
1901
- /**
1902
- * Test-case status for runs dispatched as part of a TestSuiteRun. Carries the
1903
- * assertion-rollup-corrected outcome the test orchestrator persists onto the row, so the
1904
- * executions list can show "failed" for a run whose workflow completed cleanly but whose
1905
- * assertions caught regressions. Absent for non-test runs and legacy rows.
1906
- */
1907
1478
  testCaseStatus?: TestCaseRunStatus;
1908
- /** ISO timestamp when the run finished (derived from node snapshots or store `updatedAt`); omit while running/pending. */
1909
1479
  finishedAt?: string;
1910
1480
  parent?: ParentExecutionRef;
1911
1481
  executionOptions?: RunExecutionOptions;
@@ -1926,70 +1496,42 @@ interface PersistedRunSchedulingState {
1926
1496
  pending?: PendingNodeExecution;
1927
1497
  queue: RunQueueEntry[];
1928
1498
  }
1929
- /** One persisted suspension entry per suspended item. */
1930
1499
  interface PersistedSuspensionEntry {
1931
- /** Opaque task identifier (UUID v4). */
1932
1500
  readonly taskId: string;
1933
1501
  readonly nodeId: NodeId;
1934
1502
  readonly activationId: NodeActivationId;
1935
1503
  readonly itemIndex: number;
1936
- /** SHA-256 hex digest of the decision schema JSON (for schema-drift detection). */
1937
1504
  readonly decisionSchemaHash: string;
1938
- /** Serialized return value from `SuspensionRequest.deliver` (stored on the HumanTask row). */
1939
1505
  readonly deliveryRef: JsonValue;
1940
- /** ISO timestamp when the task expires. */
1941
1506
  readonly timeoutAt: string;
1942
1507
  readonly onTimeout: "halt" | "auto-accept";
1943
1508
  }
1944
- /**
1945
- * When a node is re-activated after suspension, the engine writes the resume context here
1946
- * so `NodeExecutionRequestHandlerService` can splice `resumeContext` into ctx.
1947
- * Cleared once the re-activation is consumed.
1948
- */
1949
1509
  interface PendingResumeEntry {
1950
1510
  readonly activationId: NodeActivationId;
1951
1511
  readonly nodeId: NodeId;
1952
- /**
1953
- * Typed as `unknown` here to avoid a circular import between runTypes ↔ runtimeTypes.
1954
- * `NodeExecutionRequestHandlerService` casts this to `ResumeContext` from runtimeTypes.
1955
- */
1956
1512
  readonly resumeContext: unknown;
1957
1513
  }
1958
1514
  interface PersistedRunState {
1959
1515
  runId: RunId;
1960
1516
  workflowId: WorkflowId;
1961
1517
  startedAt: string;
1962
- /** Canonical terminal time for listings and retention when persisted on the run root. */
1963
1518
  finishedAt?: string;
1964
- /** Optimistic concurrency / CAS on the run aggregate (repository may increment on save). */
1965
1519
  revision?: number;
1966
1520
  parent?: ParentExecutionRef;
1967
1521
  executionOptions?: RunExecutionOptions;
1968
1522
  control?: PersistedRunControlState;
1969
1523
  workflowSnapshot?: PersistedWorkflowSnapshot;
1970
1524
  mutableState?: PersistedMutableRunState;
1971
- /** Frozen at createRun from workflow + runtime defaults for prune/storage decisions. */
1972
1525
  policySnapshot?: PersistedRunPolicySnapshot;
1973
- /** Successful node completions so far (for activation budget). */
1974
1526
  engineCounters?: EngineRunCounters;
1975
1527
  status: RunStatus;
1976
- /** Populated when `status === "halted"` to discriminate why the run was halted. */
1977
1528
  reason?: RunHaltReason;
1978
1529
  pending?: PendingNodeExecution;
1979
1530
  queue: RunQueueEntry[];
1980
1531
  outputsByNode: Record<NodeId, NodeOutputs>;
1981
1532
  nodeSnapshotsByNodeId: Record<NodeId, NodeExecutionSnapshot>;
1982
- /** Append-only history of connection invocations (LLM/tool) nested under owning nodes. */
1983
1533
  connectionInvocations?: ReadonlyArray<ConnectionInvocationRecord>;
1984
- /**
1985
- * One entry per outstanding HITL suspension (per-item).
1986
- * Present and non-empty iff `status === "suspended"`.
1987
- */
1988
1534
  suspension?: ReadonlyArray<PersistedSuspensionEntry>;
1989
- /**
1990
- * Written by `resumeRun()` so `NodeExecutionRequestHandlerService` can splice `resumeContext`
1991
- * into the ctx when re-executing the suspended node. Cleared once consumed.
1992
- */
1993
1535
  pendingResume?: PendingResumeEntry;
1994
1536
  }
1995
1537
  interface WorkflowExecutionRepository {
@@ -2016,7 +1558,6 @@ interface WorkflowExecutionListingRepository {
2016
1558
  limit?: number;
2017
1559
  }>): Promise<ReadonlyArray<RunSummary>>;
2018
1560
  }
2019
- /** Runs eligible for retention-based pruning (completed or failed, older than cutoff). */
2020
1561
  interface RunPruneCandidate {
2021
1562
  readonly runId: RunId;
2022
1563
  readonly workflowId: WorkflowId;
@@ -2079,42 +1620,13 @@ interface RunEventPublisherDeps {
2079
1620
  }
2080
1621
  //#endregion
2081
1622
  //#region src/contracts/agentMcpTypes.d.ts
2082
- /**
2083
- * Emitted as a span event when a credential is missing required scopes
2084
- * (bind-time) or when callTool returns a permission error (runtime).
2085
- * The credential type id can be looked up from the credential instance when needed.
2086
- */
2087
1623
  interface NeedsReconsentEvent {
2088
1624
  readonly serverId: string;
2089
1625
  readonly credentialInstanceId: string;
2090
1626
  readonly missingScopesHint?: readonly string[];
2091
1627
  }
2092
- /**
2093
- * An opaque MCP tool map: keyed by serverId → (toolName → tool definition).
2094
- * Typed as unknown so core does not depend on the AI SDK's ToolSet type.
2095
- * AIAgentNode (in core-nodes, which does depend on ai) casts this to
2096
- * ReadonlyMap<string, ToolSet> before passing to DeferredMetaToolStrategyFactory.
2097
- */
2098
1628
  type AgentMcpToolMap = ReadonlyMap<string, Readonly<Record<string, unknown>>>;
2099
- /**
2100
- * Contract implemented by the host. Resolves MCP server bindings for an agent run
2101
- * via the standard credential-binding table (one slot per declared server, keyed
2102
- * by `(workflowId, mcpConnectionNodeId, "credential")`), and returns a ready-to-use
2103
- * tool map with wrapped execute callbacks for telemetry and 403 detection.
2104
- * Core-nodes imports this interface so AIAgentNode can inject it without
2105
- * depending on the host.
2106
- */
2107
1629
  interface AgentMcpIntegration {
2108
- /**
2109
- * Look up the credential binding per server, validate scopes, open pool
2110
- * connections, and return a tool map keyed by serverId. Each tool's
2111
- * execute callback includes:
2112
- * - Telemetry child span (mcp.server_id, mcp.tool_name attributes)
2113
- * - 403/permission error detection → emits a NeedsReconsentEvent span event
2114
- *
2115
- * Throws `AgentBindError` on validation failures (missing server, unbound
2116
- * credential slot, missing credential instance, insufficient scopes).
2117
- */
2118
1630
  prepareMcpTools(args: {
2119
1631
  readonly workflowId: WorkflowId;
2120
1632
  readonly agentNodeId: NodeId;
@@ -2130,18 +1642,13 @@ interface AgentMcpIntegration {
2130
1642
  statusMessage?: string;
2131
1643
  }) => void;
2132
1644
  };
2133
- /** Per-MCP-tool-call invocation appender. Optional; when omitted the wrapper emits only telemetry spans. */
2134
1645
  readonly appendMcpInvocation?: (args: ConnectionInvocationAppendArgs) => Promise<void>;
2135
- /** Agent activation id to attach to each invocation record (used by canvas + inspector grouping). */
2136
1646
  readonly parentAgentActivationId?: NodeActivationId;
2137
- /** Per-item iteration id when the agent runs inside a per-item loop. */
2138
1647
  readonly iterationId?: NodeIterationId;
2139
- /** Item index (0-based) of the iteration that owns these tool calls. */
2140
1648
  readonly itemIndex?: number;
2141
- /** Parent invocation id when this agent is itself executing as a sub-agent. */
2142
1649
  readonly parentInvocationId?: ConnectionInvocationId;
2143
1650
  }): Promise<AgentMcpToolMap>;
2144
1651
  }
2145
1652
  //#endregion
2146
- export { injectAll as $, NodeActivationRequest as $n, CodemationTelemetryMetricNames as $r, RunnableNodeConfig as $t, RunHaltReason as A, CredentialOAuth2ScopesFromPublicConfig as Ai, BinaryAttachmentCreateRequest as An, WorkflowSnapshotResolver as Ar, JsonValue as At, WorkflowExecutionListingRepository as B, CredentialUnboundError as Bi, ExecutableTriggerNode as Bn, ExecutionTelemetry as Br, NodeIterationId as Bt, PersistedWorkflowSnapshotNode as C, CredentialHealthStatus as Ci, triggerNodeOutputType as Cn, TriggerSetupStateRepository as Cr, Item as Ct, RunCurrentState as D, CredentialJsonRecord as Di, NoneRetryPolicySpec as Dn, WorkflowRunnerResolver as Dr, JsonNonArray as Dt, RunCompletionNotifier as E, CredentialInstanceRecord as Ei, FixedRetryPolicySpec as En, WorkflowRepository as Er, JsonArray as Et, RunStatus as F, CredentialSetupStatus as Fi, BinaryStorageWriteRequest as Fn, WebhookTriggerMatcher as Fr, NodeErrorHandler as Ft, Disposable as G, InputPortKey as Gi, HumanTaskHandle as Gn, TelemetryAttributePrimitive as Gr, NodeSchedulerDecision as Gt, WorkflowExecutionRepository as H, NoOpPollingTriggerLogger as Hi, ExecutionContext as Hn, NodeExecutionTelemetry as Hr, NodeOffloadPolicy as Ht, RunStopCondition as I, CredentialType as Ii, BinaryStorageWriteResult as In, WebhookTriggerResolution as Ir, NodeErrorHandlerArgs as It, RegistrationOptions as J, OutputPortKey as Ji, ItemNode as Jn, TelemetryMetricRecord as Jr, PersistedRunPolicySnapshot as Jt, InjectionToken$1 as K, NodeConnectionName as Ki, HumanTaskId as Kn, TelemetryAttributes as Kr, PairedItemRef as Kt, RunSummary as L, CredentialTypeDefinition as Li, Duration as Ln, WebhookTriggerRoutingDiagnostics as Lr, NodeErrorHandlerSpec as Lt, RunQueueEntry as M, CredentialSessionFactory as Mi, BinaryStorage as Mn, TriggerInstanceId as Mr, NodeActivationId as Mt, RunResult as N, CredentialSessionFactoryArgs as Ni, BinaryStorageReadResult as Nn, WebhookControlSignal as Nr, NodeConfigBase as Nt, RunEventPublisherDeps as O, CredentialMaterialSourceKind as Oi, RetryPolicySpec as On, WorkflowRunnerService as Or, JsonObject as Ot, RunStateResetRequest as P, CredentialSessionService as Pi, BinaryStorageStatResult as Pn, WebhookInvocationMatch as Pr, NodeDefinition as Pt, inject as Q, NodeActivationReceipt as Qn, TelemetrySpanScope as Qr, RunIdFactory as Qt, RunTestContext as R, CredentialTypeId as Ri, EngineDeps as Rn, AllWorkflowsActiveWorkflowActivationPolicy as Rr, NodeIdRef as Rt, PersistedWorkflowSnapshot as S, CredentialHealth as Si, runnableNodeOutputType as Sn, TriggerSetupStateFor as Sr, ExecutionMode as St, PinnedNodeOutputsByPort as T, CredentialInstanceId as Ti, ExponentialRetryPolicySpec as Tn, WorkflowNodeInstanceFactory as Tr, Items as Tt, Container as U, PollingTriggerLogger as Ui, ExecutionContextFactory as Un, TelemetryArtifactAttachment as Ur, NodeOutputs as Ut, WorkflowExecutionPruneRepository as V, OAuth2ProviderFromPublicConfig as Vi, ExecutionBinaryService as Vn, ExecutionTelemetryFactory as Vr, NodeKind as Vt, DependencyContainer$1 as W, PollingTriggerDedupWindow as Wi, HumanTaskActor as Wn, TelemetryArtifactReference as Wr, NodeRef as Wt, container as X, WorkflowId as Xi, MultiInputNode as Xn, TelemetrySpanEnd as Xr, RunDataSnapshot as Xt, TypeToken as Y, PersistedTokenId as Yi, LiveWorkflowRepository as Yn, TelemetryScope as Yr, RunDataFactory as Yt, delay as Z, NodeActivationContinuation as Zn, TelemetrySpanEventRecord as Zr, RunId as Zt, PersistedMutableRunState as _, CredentialAdvancedSectionPresentation as _i, WorkflowStoragePolicyResolver as _n, TestableTriggerNode as _r, TestTriggerSetupContext as _t, ConnectionInvocationId as a, NoOpTelemetrySpanScope as ai, UpstreamRefPlaceholder as an, NodeExecutionRequestHandler as ar, singleton as at, PersistedRunState as b, CredentialBindingKey as bi, nodeRef as bn, TriggerRuntimeDiagnostics as br, BinaryPreviewKind as bt, EngineRunCounters as c, CostTrackingPriceQuote as ci, WorkflowErrorHandler as cn, NodeExecutor as cr, EngineExecutionLimitsPolicy as ct, NodeExecutionSnapshot as d, CostTrackingTelemetryFactory as di, WorkflowGraphFactory as dn, PollingTriggerHandle as dr, RunEventBus as dt, GenAiTelemetryAttributeNames as ei, RunnableNodeInputJson as en, NodeActivationRequestBase as er, injectable as et, NodeExecutionStatus as f, CostTrackingTelemetryMetricNames as fi, WorkflowNodeConnection as fn, PreparedNodeActivationDispatch as fr, RunEventSubscription as ft, PersistedMutableNodeState as g, AnyCredentialType as gi, WorkflowStoragePolicyMode as gn, SuspensionRequest as gr, TestTriggerNodeConfig as gt, PendingResumeEntry as h, CollectionsContext as hi, WorkflowStoragePolicyDecisionArgs as hn, RunnableNodeExecuteArgs as hr, TestSuiteRunId as ht, ConnectionInvocationAppendArgs as i, NoOpNodeExecutionTelemetry as ii, TriggerNodeSetupState as in, NodeExecutionRequest as ir, registry as it, RunPruneCandidate as j, CredentialRequirement as ji, BinaryBody as jn, HttpMethod as jr, MutableRunData as jt, RunExecutionOptions as k, CredentialOAuth2AuthDefinition as ki, BINARY_DEFAULT_MAX_BYTES as kn, WorkflowSnapshotFactory as kr, JsonPrimitive as kt, ExecutionFrontierPlan as l, CostTrackingTelemetry as li, WorkflowErrorHandlerSpec as ln, NodeResolver as lr, EngineExecutionLimitsPolicyConfig as lt, PendingNodeExecution as m, CollectionStore as mi, WorkflowPrunePolicySpec as mn, RunnableNode as mr, TestSuiteRunStatus as mt, AgentMcpToolMap as n, NoOpExecutionTelemetryFactory as ni, TriggerNodeConfig as nn, NodeBinaryAttachmentService as nr, instancePerContainerCachingFactory as nt, ConnectionInvocationRecord as o, NoOpTelemetryArtifactReference as oi, WorkflowDefinition as on, NodeExecutionScheduler as or, CoreTokens as ot, NodeInputsByPort as p, CostTrackingUsageRecord as pi, WorkflowPolicyRuntimeDefaults as pn, ResumeContext as pr, TestCaseRunStatus as pt, Lifecycle as q, NodeId as qi, HumanTaskSubject as qn, TelemetryChildSpanStart as qr, ParentExecutionRef as qt, NeedsReconsentEvent as r, NoOpExecutionTelemetry as ri, TriggerNodeOutputJson as rn, NodeExecutionContext as rr, predicateAwareClassFactory as rt, CurrentStateExecutionRequest as s, CostTrackingComponent as si, WorkflowErrorContext as sn, NodeExecutionStatePublisher as sr, ENGINE_EXECUTION_LIMITS_DEFAULTS as st, AgentMcpIntegration as t, CodemationTelemetryAttributeNames as ti, RunnableNodeOutputJson as tn, NodeActivationScheduler as tr, instanceCachingFactory as tt, NodeExecutionError as u, CostTrackingTelemetryAttributeNames as ui, WorkflowGraph as un, PersistedTriggerSetupState as ur, RunEvent as ut, PersistedRunControlState as v, CredentialAuthDefinition as vi, WorkflowStoragePolicySpec as vn, TriggerCleanupHandle as vr, ActivationIdFactory as vt, PersistedWorkflowTokenRegistryLike as w, CredentialHealthTester as wi, triggerNodeSetupStateType as wn, TriggerTestItemsContext as wr, ItemBinary as wt, PersistedSuspensionEntry as x, CredentialFieldSchema as xi, runnableNodeInputType as xn, TriggerSetupContext as xr, Edge as xt, PersistedRunSchedulingState as y, CredentialBinding as yi, branchRef as yn, TriggerNode as yr, BinaryAttachment as yt, WebhookRunResult as z, CredentialTypeRegistry as zi, EngineHost as zn, WorkflowActivationPolicy as zr, NodeInspectorSummaryRow as zt };
2147
- //# sourceMappingURL=agentMcpTypes-DGIwk6Ue.d.cts.map
1653
+ export { injectAll as $, OutputPortKey as $i, NodeActivationContinuation as $n, TelemetrySpanEnd as $r, RunId as $t, RunHaltReason as A, CredentialInstanceId as Ai, RetryPolicySpec as An, WorkflowRunnerResolver as Ar, JsonPrimitive as At, WorkflowExecutionListingRepository as B, CredentialSetupStatus as Bi, EngineDeps as Bn, WebhookTriggerRoutingDiagnostics as Br, NodeInspectorSummaryRow as Bt, PersistedWorkflowSnapshotNode as C, CredentialAuthDefinition as Ci, runnableNodeInputType as Cn, TriggerRuntimeDiagnostics as Cr, ExecutionMode as Ct, RunCurrentState as D, CredentialHealth as Di, ExponentialRetryPolicySpec as Dn, TriggerTestItemsContext as Dr, JsonArray as Dt, RunCompletionNotifier as E, CredentialFieldSchema as Ei, triggerNodeSetupStateType as En, TriggerSetupStateRepository as Er, Items as Et, RunStatus as F, CredentialOAuth2ScopesFromPublicConfig as Fi, BinaryStorageReadResult as Fn, TriggerInstanceId as Fr, NodeDefinition as Ft, Disposable as G, CredentialUnboundError as Gi, ExecutionContextFactory as Gn, NodeExecutionTelemetry as Gr, NodeRef as Gt, WorkflowExecutionRepository as H, CredentialTypeDefinition as Hi, ExecutableTriggerNode as Hn, WorkflowActivationPolicy as Hr, NodeKind as Ht, RunStopCondition as I, CredentialRequirement as Ii, BinaryStorageStatResult as In, WebhookControlSignal as Ir, NodeErrorHandler as It, RegistrationOptions as J, PollingTriggerLogger as Ji, HumanTaskId as Jn, TelemetryAttributePrimitive as Jr, ParentExecutionRef as Jt, InjectionToken$1 as K, OAuth2ProviderFromPublicConfig as Ki, HumanTaskActor as Kn, TelemetryArtifactAttachment as Kr, NodeSchedulerDecision as Kt, RunSummary as L, CredentialSessionFactory as Li, BinaryStorageWriteRequest as Ln, WebhookInvocationMatch as Lr, NodeErrorHandlerArgs as Lt, RunQueueEntry as M, CredentialJsonRecord as Mi, BinaryAttachmentCreateRequest as Mn, WorkflowSnapshotFactory as Mr, MutableRunData as Mt, RunResult as N, CredentialMaterialSourceKind as Ni, BinaryBody as Nn, WorkflowSnapshotResolver as Nr, NodeActivationId as Nt, RunEventPublisherDeps as O, CredentialHealthStatus as Oi, FixedRetryPolicySpec as On, WorkflowNodeInstanceFactory as Or, JsonNonArray as Ot, RunStateResetRequest as P, CredentialOAuth2AuthDefinition as Pi, BinaryStorage as Pn, HttpMethod as Pr, NodeConfigBase as Pt, inject as Q, NodeId as Qi, MultiInputNode as Qn, TelemetryScope as Qr, RunDataSnapshot as Qt, RunTestContext as R, CredentialSessionFactoryArgs as Ri, BinaryStorageWriteResult as Rn, WebhookTriggerMatcher as Rr, NodeErrorHandlerSpec as Rt, PersistedWorkflowSnapshot as S, CredentialAdvancedSectionPresentation as Si, nodeRef as Sn, TriggerPollingPort as Sr, Edge as St, PinnedNodeOutputsByPort as T, CredentialBindingKey as Ti, triggerNodeOutputType as Tn, TriggerSetupStateFor as Tr, ItemBinary as Tt, Container as U, CredentialTypeId as Ui, ExecutionBinaryService as Un, ExecutionTelemetry as Ur, NodeOffloadPolicy as Ut, WorkflowExecutionPruneRepository as V, CredentialType as Vi, EngineHost as Vn, AllWorkflowsActiveWorkflowActivationPolicy as Vr, NodeIterationId as Vt, DependencyContainer$1 as W, CredentialTypeRegistry as Wi, ExecutionContext as Wn, ExecutionTelemetryFactory as Wr, NodeOutputs as Wt, container as X, InputPortKey as Xi, ItemNode as Xn, TelemetryChildSpanStart as Xr, PollingTriggerConfig as Xt, TypeToken as Y, PollingTriggerDedupWindow as Yi, HumanTaskSubject as Yn, TelemetryAttributes as Yr, PersistedRunPolicySnapshot as Yt, delay as Z, NodeConnectionName as Zi, LiveWorkflowRepository as Zn, TelemetryMetricRecord as Zr, RunDataFactory as Zt, PersistedMutableRunState as _, CollectionStore as _i, WorkflowStoragePolicyDecisionArgs as _n, RunnableNodeExecuteArgs as _r, TestTriggerNodeConfig as _t, ConnectionInvocationId as a, NoOpExecutionTelemetryFactory as ai, TriggerNodeOutputJson as an, NodeExecutionContext as ar, singleton as at, PersistedRunState as b, CredentialAccessTokenSessionArgs as bi, WorkflowStoragePolicySpec as bn, TriggerCleanupHandle as br, BinaryAttachment as bt, EngineRunCounters as c, NoOpTelemetrySpanScope as ci, WorkflowDefinition as cn, NodeExecutionScheduler as cr, ENGINE_EXECUTION_LIMITS_DEFAULTS as ct, NodeExecutionSnapshot as d, CostTrackingPriceQuote as di, WorkflowErrorHandlerSpec as dn, NodeResolver as dr, RunEvent as dt, PersistedTokenId as ea, TelemetrySpanEventRecord as ei, RunIdFactory as en, NodeActivationReceipt as er, injectable as et, NodeExecutionStatus as f, CostTrackingTelemetry as fi, WorkflowGraph as fn, PersistedTriggerSetupState as fr, RunEventBus as ft, PersistedMutableNodeState as g, CostTrackingUsageRecord as gi, WorkflowPrunePolicySpec as gn, RunnableNode as gr, TestSuiteRunId as gt, PendingResumeEntry as h, CostTrackingTelemetryMetricNames as hi, WorkflowPolicyRuntimeDefaults as hn, ResumeContext as hr, TestSuiteRunStatus as ht, ConnectionInvocationAppendArgs as i, CodemationTelemetryAttributeNames as ii, TriggerNodeConfig as in, NodeBinaryAttachmentService as ir, registry as it, RunPruneCandidate as j, CredentialInstanceRecord as ji, BINARY_DEFAULT_MAX_BYTES as jn, WorkflowRunnerService as jr, JsonValue as jt, RunExecutionOptions as k, CredentialHealthTester as ki, NoneRetryPolicySpec as kn, WorkflowRepository as kr, JsonObject as kt, ExecutionFrontierPlan as l, NoOpTelemetryArtifactReference as li, WorkflowErrorContext as ln, NodeExecutionStatePublisher as lr, EngineExecutionLimitsPolicy as lt, PendingNodeExecution as m, CostTrackingTelemetryFactory as mi, WorkflowNodeConnection as mn, PreparedNodeActivationDispatch as mr, TestCaseRunStatus as mt, AgentMcpToolMap as n, CodemationTelemetryMetricNames as ni, RunnableNodeInputJson as nn, NodeActivationRequestBase as nr, instancePerContainerCachingFactory as nt, ConnectionInvocationRecord as o, NoOpExecutionTelemetry as oi, TriggerNodeSetupState as on, NodeExecutionRequest as or, CoreTokens as ot, NodeInputsByPort as p, CostTrackingTelemetryAttributeNames as pi, WorkflowGraphFactory as pn, PollingTriggerHandle as pr, RunEventSubscription as pt, Lifecycle as q, NoOpPollingTriggerLogger as qi, HumanTaskHandle as qn, TelemetryArtifactReference as qr, PairedItemRef as qt, NeedsReconsentEvent as r, GenAiTelemetryAttributeNames as ri, RunnableNodeOutputJson as rn, NodeActivationScheduler as rr, predicateAwareClassFactory as rt, CurrentStateExecutionRequest as s, NoOpNodeExecutionTelemetry as si, UpstreamRefPlaceholder as sn, NodeExecutionRequestHandler as sr, TriggerInvoker as st, AgentMcpIntegration as t, WorkflowId as ta, TelemetrySpanScope as ti, RunnableNodeConfig as tn, NodeActivationRequest as tr, instanceCachingFactory as tt, NodeExecutionError as u, CostTrackingComponent as ui, WorkflowErrorHandler as un, NodeExecutor as ur, EngineExecutionLimitsPolicyConfig as ut, PersistedRunControlState as v, CollectionsContext as vi, WorkflowStoragePolicyMode as vn, SuspensionRequest as vr, TestTriggerSetupContext as vt, PersistedWorkflowTokenRegistryLike as w, CredentialBinding as wi, runnableNodeOutputType as wn, TriggerSetupContext as wr, Item as wt, PersistedSuspensionEntry as x, CredentialAccessTokenSessionFactory as xi, branchRef as xn, TriggerNode as xr, BinaryPreviewKind as xt, PersistedRunSchedulingState as y, AnyCredentialType as yi, WorkflowStoragePolicyResolver as yn, TestableTriggerNode as yr, ActivationIdFactory as yt, WebhookRunResult as z, CredentialSessionService as zi, Duration as zn, WebhookTriggerResolution as zr, NodeIdRef as zt };
1654
+ //# sourceMappingURL=agentMcpTypes-BHX4RQCC.d.cts.map