@codemation/core 1.0.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +293 -0
- package/dist/{EngineRuntimeRegistration.types-kxQA5NLt.d.ts → EngineRuntimeRegistration.types-D1fyApMI.d.ts} +2 -2
- package/dist/{EngineWorkflowRunnerService-Ba2AvBnL.d.cts → EngineRuntimeRegistration.types-pB3FnzqR.d.cts} +17 -17
- package/dist/{InMemoryRunDataFactory-Ou4tQUOS.d.cts → InMemoryRunDataFactory-Xw7v4-sj.d.cts} +31 -29
- package/dist/InMemoryRunEventBusRegistry-VM3OWnHo.cjs +47 -0
- package/dist/InMemoryRunEventBusRegistry-VM3OWnHo.cjs.map +1 -0
- package/dist/InMemoryRunEventBusRegistry-sM4z4n_i.js +41 -0
- package/dist/InMemoryRunEventBusRegistry-sM4z4n_i.js.map +1 -0
- package/dist/{RunIntentService-dteLjNiT.d.ts → RunIntentService-BE9CAkbf.d.ts} +602 -213
- package/dist/{RunIntentService-Dyh_dH0k.d.cts → RunIntentService-siBSjaaY.d.cts} +430 -125
- package/dist/bootstrap/index.cjs +5 -2
- package/dist/bootstrap/index.d.cts +212 -135
- package/dist/bootstrap/index.d.ts +4 -4
- package/dist/bootstrap/index.js +3 -3
- package/dist/{bootstrap-Cko6udwL.cjs → bootstrap-Cm5ruQxx.cjs} +253 -3
- package/dist/bootstrap-Cm5ruQxx.cjs.map +1 -0
- package/dist/{bootstrap-CL68rqWg.js → bootstrap-D3r505ko.js} +236 -4
- package/dist/bootstrap-D3r505ko.js.map +1 -0
- package/dist/{index-CyfGTfU1.d.ts → index-DeLl1Tne.d.ts} +574 -242
- package/dist/index.cjs +328 -180
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +441 -103
- package/dist/index.d.ts +3 -3
- package/dist/index.js +305 -163
- package/dist/index.js.map +1 -1
- package/dist/{runtime-284ok0cm.js → runtime-BGNbRnqs.js} +764 -75
- package/dist/runtime-BGNbRnqs.js.map +1 -0
- package/dist/{runtime-B3Og-_St.cjs → runtime-DKXJwTNv.cjs} +841 -80
- package/dist/runtime-DKXJwTNv.cjs.map +1 -0
- package/dist/testing.cjs +4 -4
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +3 -3
- package/package.json +7 -2
- package/src/authoring/DefinedCollectionRegistry.ts +17 -0
- package/src/authoring/defineCollection.types.ts +181 -0
- package/src/authoring/definePollingTrigger.types.ts +396 -0
- package/src/authoring/definePollingTriggerInternals.ts +74 -0
- package/src/authoring/index.ts +19 -0
- package/src/bootstrap/index.ts +9 -0
- package/src/bootstrap/runtime/EngineRuntimeRegistrar.ts +5 -1
- package/src/contracts/assertionTypes.ts +63 -0
- package/src/contracts/baseTypes.ts +12 -0
- package/src/contracts/collectionTypes.ts +44 -0
- package/src/contracts/credentialTypes.ts +23 -1
- package/src/contracts/index.ts +4 -0
- package/src/contracts/runTypes.ts +27 -1
- package/src/contracts/runtimeTypes.ts +34 -0
- package/src/contracts/testTriggerTypes.ts +66 -0
- package/src/contracts/workflowTypes.ts +30 -7
- package/src/contracts.ts +59 -0
- package/src/events/runEvents.ts +49 -0
- package/src/execution/ChildExecutionScopeFactory.ts +4 -7
- package/src/execution/DefaultExecutionContextFactory.ts +6 -0
- package/src/execution/NodeInstanceFactory.ts +13 -1
- package/src/execution/NodeInstantiationError.ts +16 -0
- package/src/execution/WorkflowRunExecutionContextFactory.ts +3 -0
- package/src/execution/index.ts +1 -0
- package/src/index.ts +7 -0
- package/src/orchestration/AbortControllerFactory.ts +9 -0
- package/src/orchestration/NodeExecutionRequestHandlerService.ts +1 -0
- package/src/orchestration/RunContinuationService.ts +3 -0
- package/src/orchestration/RunStartService.ts +114 -2
- package/src/orchestration/TestSuiteOrchestrator.ts +350 -0
- package/src/orchestration/TestSuiteRunIdFactory.ts +11 -0
- package/src/orchestration/TriggerRuntimeService.ts +34 -7
- package/src/orchestration/index.ts +9 -0
- package/src/runtime/EngineFactory.ts +11 -0
- package/src/triggers/polling/PollingTriggerDedupWindow.ts +23 -0
- package/src/triggers/polling/PollingTriggerLogger.ts +18 -0
- package/src/triggers/polling/PollingTriggerRuntime.ts +122 -0
- package/src/triggers/polling/index.ts +5 -0
- package/src/types/index.ts +12 -9
- package/src/workflow/dsl/NodeIdSlugifier.ts +18 -0
- package/src/workflow/dsl/WorkflowBuilder.ts +71 -3
- package/src/workflow/dsl/WorkflowDefinitionError.ts +15 -0
- package/src/workflow/index.ts +2 -0
- package/dist/InMemoryRunEventBusRegistry-B0_C4OnP.cjs +0 -262
- package/dist/InMemoryRunEventBusRegistry-B0_C4OnP.cjs.map +0 -1
- package/dist/InMemoryRunEventBusRegistry-C2U83Hmv.js +0 -238
- package/dist/InMemoryRunEventBusRegistry-C2U83Hmv.js.map +0 -1
- package/dist/bootstrap-CL68rqWg.js.map +0 -1
- package/dist/bootstrap-Cko6udwL.cjs.map +0 -1
- package/dist/runtime-284ok0cm.js.map +0 -1
- package/dist/runtime-B3Og-_St.cjs.map +0 -1
|
@@ -1,8 +1,263 @@
|
|
|
1
|
-
import { ReadableStream } from "node:stream/web";
|
|
2
1
|
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";
|
|
2
|
+
import { ReadableStream } from "node:stream/web";
|
|
3
3
|
import { ZodType } from "zod";
|
|
4
4
|
|
|
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
|
+
type WorkflowId = string;
|
|
12
|
+
type NodeId = string;
|
|
13
|
+
type OutputPortKey = string;
|
|
14
|
+
type InputPortKey = string;
|
|
15
|
+
type PersistedTokenId = string;
|
|
16
|
+
type NodeConnectionName = string;
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/contracts/testTriggerTypes.d.ts
|
|
19
|
+
/**
|
|
20
|
+
* Identifier minted by the host (or in-memory test runner) for one execution of a test suite.
|
|
21
|
+
* One TestSuiteRun produces N child workflow runs, one per item yielded by `generateItems`.
|
|
22
|
+
*/
|
|
23
|
+
type TestSuiteRunId = string;
|
|
24
|
+
/**
|
|
25
|
+
* Setup context passed to a {@link TestTriggerNodeConfig.generateItems} callback. Distinct from
|
|
26
|
+
* {@link import("./runtimeTypes").TriggerSetupContext} on purpose: test triggers are not
|
|
27
|
+
* activated by the live trigger lifecycle (webhooks, cron, polling) and never call `emit` —
|
|
28
|
+
* the orchestrator pulls from the iterable they return and dispatches one run per item.
|
|
29
|
+
*/
|
|
30
|
+
interface TestTriggerSetupContext<TConfig extends TestTriggerNodeConfig<unknown> = TestTriggerNodeConfig<unknown>> {
|
|
31
|
+
readonly workflowId: WorkflowId;
|
|
32
|
+
readonly nodeId: NodeId;
|
|
33
|
+
readonly config: TConfig;
|
|
34
|
+
readonly testSuiteRunId: TestSuiteRunId;
|
|
35
|
+
/**
|
|
36
|
+
* Resolves a credential session for a slot declared on this trigger's
|
|
37
|
+
* {@link import("./workflowTypes").NodeConfigBase.getCredentialRequirements}. Same contract as
|
|
38
|
+
* {@link import("./runtimeTypes").ExecutionContext.getCredential}.
|
|
39
|
+
*/
|
|
40
|
+
getCredential<TSession = unknown>(slotKey: string): Promise<TSession>;
|
|
41
|
+
/** AbortSignal raised when the suite is cancelled — long-running pulls should bail out. */
|
|
42
|
+
readonly signal: AbortSignal;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* A trigger config that emits **test cases**. Each item yielded by {@link generateItems}
|
|
46
|
+
* becomes one workflow run (with `executionOptions.testContext` set), so 10 yielded items
|
|
47
|
+
* → 10 runs marked under the same TestSuiteRun.
|
|
48
|
+
*
|
|
49
|
+
* The trigger is otherwise a normal {@link TriggerNodeConfig} (so the canvas treats it like
|
|
50
|
+
* any other trigger), but its `triggerKind` is `"test"` so the live activation policy skips it.
|
|
51
|
+
*/
|
|
52
|
+
interface TestTriggerNodeConfig<TOutputJson$1 = unknown> extends TriggerNodeConfig<TOutputJson$1, undefined> {
|
|
53
|
+
readonly triggerKind: "test";
|
|
54
|
+
/**
|
|
55
|
+
* Author-supplied async iterable of items, evaluated lazily. Implementations may fetch from
|
|
56
|
+
* credentialed APIs, read fixture files, or yield hard-coded items. The orchestrator iterates
|
|
57
|
+
* and dispatches one run per item, with concurrency capped by {@link concurrency} (default 4).
|
|
58
|
+
*/
|
|
59
|
+
generateItems(ctx: TestTriggerSetupContext<TestTriggerNodeConfig<TOutputJson$1>>): AsyncIterable<Item<TOutputJson$1>>;
|
|
60
|
+
/** Per-suite-run cap on simultaneously-executing test cases. Default: 4. */
|
|
61
|
+
readonly concurrency?: number;
|
|
62
|
+
/**
|
|
63
|
+
* Free-form description of where the test cases come from — surfaced in the node properties
|
|
64
|
+
* panel and the suite-detail header so authors revisiting the workflow six months later
|
|
65
|
+
* remember which mailbox / folder / fixture file the cases originate from.
|
|
66
|
+
*
|
|
67
|
+
* Example: `"All emails in the Gmail label \"test/triage-fixtures\" — 14 messages as of 2026-05-03."`
|
|
68
|
+
*/
|
|
69
|
+
readonly description?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Resolves a human-readable label for one yielded test case (e.g. email subject). The
|
|
72
|
+
* orchestrator calls this once per yielded item, persists the result on the run, and the
|
|
73
|
+
* Tests-tab UI uses it to render the case row instead of the opaque runId. Return
|
|
74
|
+
* `undefined` to fall back to "Case #N".
|
|
75
|
+
*/
|
|
76
|
+
caseLabel?(item: Item<TOutputJson$1>): string | undefined;
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/events/runEvents.d.ts
|
|
80
|
+
/**
|
|
81
|
+
* Outcome of a single test case (one workflow run dispatched by the test-suite orchestrator).
|
|
82
|
+
* - `running`: workflow still in flight
|
|
83
|
+
* - `succeeded`: workflow completed AND all assertions passed (or no assertions)
|
|
84
|
+
* - `failed`: workflow failed OR (workflow completed but ≥1 assertion failed)
|
|
85
|
+
* - `errored` / `cancelled`: workflow itself errored or was cancelled
|
|
86
|
+
*/
|
|
87
|
+
type TestCaseRunStatus = "running" | "succeeded" | "failed" | "errored" | "cancelled";
|
|
88
|
+
/** Aggregate outcome of a TestSuiteRun. */
|
|
89
|
+
type TestSuiteRunStatus = "succeeded" | "failed" | "partial" | "errored" | "cancelled";
|
|
90
|
+
type RunEvent = Readonly<{
|
|
91
|
+
kind: "runCreated";
|
|
92
|
+
runId: RunId;
|
|
93
|
+
workflowId: WorkflowId;
|
|
94
|
+
parent?: ParentExecutionRef;
|
|
95
|
+
at: string;
|
|
96
|
+
}> | Readonly<{
|
|
97
|
+
kind: "runSaved";
|
|
98
|
+
runId: RunId;
|
|
99
|
+
workflowId: WorkflowId;
|
|
100
|
+
parent?: ParentExecutionRef;
|
|
101
|
+
at: string;
|
|
102
|
+
state: PersistedRunState;
|
|
103
|
+
}> | Readonly<{
|
|
104
|
+
kind: "nodeQueued";
|
|
105
|
+
runId: RunId;
|
|
106
|
+
workflowId: WorkflowId;
|
|
107
|
+
parent?: ParentExecutionRef;
|
|
108
|
+
at: string;
|
|
109
|
+
snapshot: NodeExecutionSnapshot;
|
|
110
|
+
}> | Readonly<{
|
|
111
|
+
kind: "nodeStarted";
|
|
112
|
+
runId: RunId;
|
|
113
|
+
workflowId: WorkflowId;
|
|
114
|
+
parent?: ParentExecutionRef;
|
|
115
|
+
at: string;
|
|
116
|
+
snapshot: NodeExecutionSnapshot;
|
|
117
|
+
}> | Readonly<{
|
|
118
|
+
kind: "nodeCompleted";
|
|
119
|
+
runId: RunId;
|
|
120
|
+
workflowId: WorkflowId;
|
|
121
|
+
parent?: ParentExecutionRef;
|
|
122
|
+
at: string;
|
|
123
|
+
snapshot: NodeExecutionSnapshot;
|
|
124
|
+
}> | Readonly<{
|
|
125
|
+
kind: "nodeFailed";
|
|
126
|
+
runId: RunId;
|
|
127
|
+
workflowId: WorkflowId;
|
|
128
|
+
parent?: ParentExecutionRef;
|
|
129
|
+
at: string;
|
|
130
|
+
snapshot: NodeExecutionSnapshot;
|
|
131
|
+
}> | Readonly<{
|
|
132
|
+
kind: "connectionInvocationStarted";
|
|
133
|
+
runId: RunId;
|
|
134
|
+
workflowId: WorkflowId;
|
|
135
|
+
parent?: ParentExecutionRef;
|
|
136
|
+
at: string;
|
|
137
|
+
record: ConnectionInvocationRecord;
|
|
138
|
+
}> | Readonly<{
|
|
139
|
+
kind: "connectionInvocationCompleted";
|
|
140
|
+
runId: RunId;
|
|
141
|
+
workflowId: WorkflowId;
|
|
142
|
+
parent?: ParentExecutionRef;
|
|
143
|
+
at: string;
|
|
144
|
+
record: ConnectionInvocationRecord;
|
|
145
|
+
}> | Readonly<{
|
|
146
|
+
kind: "connectionInvocationFailed";
|
|
147
|
+
runId: RunId;
|
|
148
|
+
workflowId: WorkflowId;
|
|
149
|
+
parent?: ParentExecutionRef;
|
|
150
|
+
at: string;
|
|
151
|
+
record: ConnectionInvocationRecord;
|
|
152
|
+
}> | Readonly<{
|
|
153
|
+
kind: "testSuiteStarted";
|
|
154
|
+
testSuiteRunId: TestSuiteRunId;
|
|
155
|
+
workflowId: WorkflowId;
|
|
156
|
+
triggerNodeId: string;
|
|
157
|
+
triggerNodeName?: string;
|
|
158
|
+
concurrency: number;
|
|
159
|
+
at: string;
|
|
160
|
+
}> | Readonly<{
|
|
161
|
+
kind: "testSuiteFinished";
|
|
162
|
+
testSuiteRunId: TestSuiteRunId;
|
|
163
|
+
workflowId: WorkflowId;
|
|
164
|
+
status: TestSuiteRunStatus;
|
|
165
|
+
totalCases: number;
|
|
166
|
+
passedCases: number;
|
|
167
|
+
failedCases: number;
|
|
168
|
+
at: string;
|
|
169
|
+
}> | Readonly<{
|
|
170
|
+
kind: "testCaseStarted";
|
|
171
|
+
testSuiteRunId: TestSuiteRunId;
|
|
172
|
+
testCaseIndex: number;
|
|
173
|
+
runId: RunId;
|
|
174
|
+
workflowId: WorkflowId;
|
|
175
|
+
testCaseLabel?: string;
|
|
176
|
+
at: string;
|
|
177
|
+
}> | Readonly<{
|
|
178
|
+
kind: "testCaseCompleted";
|
|
179
|
+
testSuiteRunId: TestSuiteRunId;
|
|
180
|
+
testCaseIndex: number;
|
|
181
|
+
runId: RunId;
|
|
182
|
+
workflowId: WorkflowId;
|
|
183
|
+
status: TestCaseRunStatus;
|
|
184
|
+
at: string;
|
|
185
|
+
}>;
|
|
186
|
+
interface RunEventSubscription {
|
|
187
|
+
close(): Promise<void>;
|
|
188
|
+
}
|
|
189
|
+
interface RunEventBus {
|
|
190
|
+
publish(event: RunEvent): Promise<void>;
|
|
191
|
+
subscribe(onEvent: (event: RunEvent) => void): Promise<RunEventSubscription>;
|
|
192
|
+
subscribeToWorkflow(workflowId: WorkflowId, onEvent: (event: RunEvent) => void): Promise<RunEventSubscription>;
|
|
193
|
+
}
|
|
194
|
+
//#endregion
|
|
195
|
+
//#region src/policies/executionLimits/EngineExecutionLimitsPolicy.d.ts
|
|
196
|
+
interface EngineExecutionLimitsPolicyConfig {
|
|
197
|
+
readonly defaultMaxNodeActivations: number;
|
|
198
|
+
readonly hardMaxNodeActivations: number;
|
|
199
|
+
readonly defaultMaxSubworkflowDepth: number;
|
|
200
|
+
readonly hardMaxSubworkflowDepth: number;
|
|
201
|
+
}
|
|
202
|
+
/** Framework defaults for {@link EngineExecutionLimitsPolicy} (merged with host `runtime.engineExecutionLimits`). */
|
|
203
|
+
declare const ENGINE_EXECUTION_LIMITS_DEFAULTS: EngineExecutionLimitsPolicyConfig;
|
|
204
|
+
/**
|
|
205
|
+
* Resolves per-run execution limits: defaults, hard ceilings, and subworkflow depth for new runs.
|
|
206
|
+
*/
|
|
207
|
+
declare class EngineExecutionLimitsPolicy {
|
|
208
|
+
private readonly config;
|
|
209
|
+
constructor(config?: EngineExecutionLimitsPolicyConfig);
|
|
210
|
+
/**
|
|
211
|
+
* Effective options for a new root run (depth 0): defaults merged with engine ceilings.
|
|
212
|
+
* Replaces a separate one-method factory for root-run bootstrap.
|
|
213
|
+
*/
|
|
214
|
+
createRootExecutionOptions(): RunExecutionOptions;
|
|
215
|
+
mergeExecutionOptionsForNewRun(parent: ParentExecutionRef | undefined, user: RunExecutionOptions | undefined): RunExecutionOptions;
|
|
216
|
+
private capNumber;
|
|
217
|
+
}
|
|
218
|
+
//#endregion
|
|
219
|
+
//#region src/di/CoreTokens.d.ts
|
|
220
|
+
declare const CoreTokens: {
|
|
221
|
+
readonly PersistedWorkflowTokenRegistry: TypeToken<PersistedWorkflowTokenRegistryLike>;
|
|
222
|
+
readonly CredentialSessionService: TypeToken<CredentialSessionService>;
|
|
223
|
+
readonly CredentialTypeRegistry: TypeToken<CredentialTypeRegistry>;
|
|
224
|
+
readonly WorkflowRunnerService: TypeToken<WorkflowRunnerService>;
|
|
225
|
+
readonly LiveWorkflowRepository: TypeToken<LiveWorkflowRepository>;
|
|
226
|
+
readonly WorkflowRepository: TypeToken<WorkflowRepository>;
|
|
227
|
+
readonly NodeResolver: TypeToken<NodeResolver>;
|
|
228
|
+
readonly WorkflowNodeInstanceFactory: TypeToken<WorkflowNodeInstanceFactory>;
|
|
229
|
+
readonly RunIdFactory: TypeToken<RunIdFactory>;
|
|
230
|
+
readonly ActivationIdFactory: TypeToken<ActivationIdFactory>;
|
|
231
|
+
readonly WorkflowExecutionRepository: TypeToken<WorkflowExecutionRepository>;
|
|
232
|
+
readonly TriggerSetupStateRepository: TypeToken<TriggerSetupStateRepository>;
|
|
233
|
+
readonly NodeActivationScheduler: TypeToken<NodeActivationScheduler>;
|
|
234
|
+
readonly RunDataFactory: TypeToken<RunDataFactory>;
|
|
235
|
+
readonly ExecutionContextFactory: TypeToken<ExecutionContextFactory>;
|
|
236
|
+
readonly RunEventBus: TypeToken<RunEventBus>;
|
|
237
|
+
readonly BinaryStorage: TypeToken<BinaryStorage>;
|
|
238
|
+
readonly WebhookBasePath: TypeToken<string>;
|
|
239
|
+
/** Engine execution limits (defaults + optional host overrides). Consumers may bind a custom instance to override. */
|
|
240
|
+
readonly EngineExecutionLimitsPolicy: TypeToken<EngineExecutionLimitsPolicy>;
|
|
241
|
+
readonly WorkflowActivationPolicy: TypeToken<WorkflowActivationPolicy>;
|
|
242
|
+
};
|
|
243
|
+
//#endregion
|
|
5
244
|
//#region src/contracts/runTypes.d.ts
|
|
245
|
+
/**
|
|
246
|
+
* Test-suite linkage for a run. When set, this run was started by a TestSuiteOrchestrator
|
|
247
|
+
* as one test case inside a TestSuiteRun. The `IsTestRun` node and host-side persisters key
|
|
248
|
+
* off the presence of this field. Subworkflow runs inherit it from their parent run.
|
|
249
|
+
*/
|
|
250
|
+
interface RunTestContext {
|
|
251
|
+
readonly testSuiteRunId: string;
|
|
252
|
+
readonly testCaseIndex: number;
|
|
253
|
+
/**
|
|
254
|
+
* Optional human-friendly label for this test case (e.g. an email subject when fixtures
|
|
255
|
+
* are loaded from a mailbox). Resolved per item by `TestTrigger.caseLabel(item)` if set,
|
|
256
|
+
* persisted on `Run.test_case_label` so the Tests-tab tree-table can show "RFQ for batch 14"
|
|
257
|
+
* instead of "run_1777755971399_bbb86beac1396".
|
|
258
|
+
*/
|
|
259
|
+
readonly testCaseLabel?: string;
|
|
260
|
+
}
|
|
6
261
|
interface RunExecutionOptions {
|
|
7
262
|
/** Run-intent override: force the inline scheduler and bypass node-level offload decisions. */
|
|
8
263
|
localOnly?: boolean;
|
|
@@ -19,6 +274,8 @@ interface RunExecutionOptions {
|
|
|
19
274
|
maxNodeActivations?: number;
|
|
20
275
|
/** Effective cap after engine policy merge (subworkflow nesting). */
|
|
21
276
|
maxSubworkflowDepth?: number;
|
|
277
|
+
/** Present iff started by a TestSuiteOrchestrator; propagates to subworkflow runs via {@link ParentExecutionRef.testContext}. */
|
|
278
|
+
testContext?: RunTestContext;
|
|
22
279
|
}
|
|
23
280
|
/** Engine-owned counters persisted with the run (worker-safe). */
|
|
24
281
|
interface EngineRunCounters {
|
|
@@ -182,6 +439,13 @@ interface RunSummary {
|
|
|
182
439
|
workflowId: WorkflowId;
|
|
183
440
|
startedAt: string;
|
|
184
441
|
status: RunStatus;
|
|
442
|
+
/**
|
|
443
|
+
* Test-case status for runs dispatched as part of a TestSuiteRun. Carries the
|
|
444
|
+
* assertion-rollup-corrected outcome the test orchestrator persists onto the row, so the
|
|
445
|
+
* executions list can show "failed" for a run whose workflow completed cleanly but whose
|
|
446
|
+
* assertions caught regressions. Absent for non-test runs and legacy rows.
|
|
447
|
+
*/
|
|
448
|
+
testCaseStatus?: TestCaseRunStatus;
|
|
185
449
|
/** ISO timestamp when the run finished (derived from node snapshots or store `updatedAt`); omit while running/pending. */
|
|
186
450
|
finishedAt?: string;
|
|
187
451
|
parent?: ParentExecutionRef;
|
|
@@ -308,127 +572,34 @@ interface RunEventPublisherDeps {
|
|
|
308
572
|
eventBus?: RunEventBus;
|
|
309
573
|
}
|
|
310
574
|
//#endregion
|
|
311
|
-
//#region src/
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
kind: "runSaved";
|
|
320
|
-
runId: RunId;
|
|
321
|
-
workflowId: WorkflowId;
|
|
322
|
-
parent?: ParentExecutionRef;
|
|
323
|
-
at: string;
|
|
324
|
-
state: PersistedRunState;
|
|
325
|
-
}> | Readonly<{
|
|
326
|
-
kind: "nodeQueued";
|
|
327
|
-
runId: RunId;
|
|
328
|
-
workflowId: WorkflowId;
|
|
329
|
-
parent?: ParentExecutionRef;
|
|
330
|
-
at: string;
|
|
331
|
-
snapshot: NodeExecutionSnapshot;
|
|
332
|
-
}> | Readonly<{
|
|
333
|
-
kind: "nodeStarted";
|
|
334
|
-
runId: RunId;
|
|
335
|
-
workflowId: WorkflowId;
|
|
336
|
-
parent?: ParentExecutionRef;
|
|
337
|
-
at: string;
|
|
338
|
-
snapshot: NodeExecutionSnapshot;
|
|
339
|
-
}> | Readonly<{
|
|
340
|
-
kind: "nodeCompleted";
|
|
341
|
-
runId: RunId;
|
|
342
|
-
workflowId: WorkflowId;
|
|
343
|
-
parent?: ParentExecutionRef;
|
|
344
|
-
at: string;
|
|
345
|
-
snapshot: NodeExecutionSnapshot;
|
|
346
|
-
}> | Readonly<{
|
|
347
|
-
kind: "nodeFailed";
|
|
348
|
-
runId: RunId;
|
|
349
|
-
workflowId: WorkflowId;
|
|
350
|
-
parent?: ParentExecutionRef;
|
|
351
|
-
at: string;
|
|
352
|
-
snapshot: NodeExecutionSnapshot;
|
|
353
|
-
}> | Readonly<{
|
|
354
|
-
kind: "connectionInvocationStarted";
|
|
355
|
-
runId: RunId;
|
|
356
|
-
workflowId: WorkflowId;
|
|
357
|
-
parent?: ParentExecutionRef;
|
|
358
|
-
at: string;
|
|
359
|
-
record: ConnectionInvocationRecord;
|
|
360
|
-
}> | Readonly<{
|
|
361
|
-
kind: "connectionInvocationCompleted";
|
|
362
|
-
runId: RunId;
|
|
363
|
-
workflowId: WorkflowId;
|
|
364
|
-
parent?: ParentExecutionRef;
|
|
365
|
-
at: string;
|
|
366
|
-
record: ConnectionInvocationRecord;
|
|
367
|
-
}> | Readonly<{
|
|
368
|
-
kind: "connectionInvocationFailed";
|
|
369
|
-
runId: RunId;
|
|
370
|
-
workflowId: WorkflowId;
|
|
371
|
-
parent?: ParentExecutionRef;
|
|
372
|
-
at: string;
|
|
373
|
-
record: ConnectionInvocationRecord;
|
|
374
|
-
}>;
|
|
375
|
-
interface RunEventSubscription {
|
|
376
|
-
close(): Promise<void>;
|
|
377
|
-
}
|
|
378
|
-
interface RunEventBus {
|
|
379
|
-
publish(event: RunEvent): Promise<void>;
|
|
380
|
-
subscribe(onEvent: (event: RunEvent) => void): Promise<RunEventSubscription>;
|
|
381
|
-
subscribeToWorkflow(workflowId: WorkflowId, onEvent: (event: RunEvent) => void): Promise<RunEventSubscription>;
|
|
575
|
+
//#region src/triggers/polling/PollingTriggerDedupWindow.d.ts
|
|
576
|
+
/**
|
|
577
|
+
* Merges processed-ID windows for polling triggers, capping the total to avoid unbounded growth.
|
|
578
|
+
* Plugin code receives an instance of this class via {@link PollingTriggerHandle.dedup}.
|
|
579
|
+
*/
|
|
580
|
+
declare class PollingTriggerDedupWindow {
|
|
581
|
+
static readonly defaultCapN = 2000;
|
|
582
|
+
merge(previous: ReadonlyArray<string>, incoming: ReadonlyArray<string>, capN?: number): ReadonlyArray<string>;
|
|
382
583
|
}
|
|
383
584
|
//#endregion
|
|
384
|
-
//#region src/
|
|
385
|
-
interface EngineExecutionLimitsPolicyConfig {
|
|
386
|
-
readonly defaultMaxNodeActivations: number;
|
|
387
|
-
readonly hardMaxNodeActivations: number;
|
|
388
|
-
readonly defaultMaxSubworkflowDepth: number;
|
|
389
|
-
readonly hardMaxSubworkflowDepth: number;
|
|
390
|
-
}
|
|
391
|
-
/** Framework defaults for {@link EngineExecutionLimitsPolicy} (merged with host `runtime.engineExecutionLimits`). */
|
|
392
|
-
declare const ENGINE_EXECUTION_LIMITS_DEFAULTS: EngineExecutionLimitsPolicyConfig;
|
|
585
|
+
//#region src/triggers/polling/PollingTriggerLogger.d.ts
|
|
393
586
|
/**
|
|
394
|
-
*
|
|
587
|
+
* Minimal logger surface for the polling-trigger runtime.
|
|
588
|
+
* Hosts supply this via {@link EngineDeps.pollingTriggerLogger};
|
|
589
|
+
* when absent the runtime is silent.
|
|
395
590
|
*/
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
591
|
+
interface PollingTriggerLogger {
|
|
592
|
+
info(message: string): void;
|
|
593
|
+
warn(message: string): void;
|
|
594
|
+
error(message: string, exception?: Error): void;
|
|
595
|
+
debug(message: string): void;
|
|
596
|
+
}
|
|
597
|
+
declare class NoOpPollingTriggerLogger implements PollingTriggerLogger {
|
|
598
|
+
info(): void;
|
|
599
|
+
warn(): void;
|
|
600
|
+
error(): void;
|
|
601
|
+
debug(): void;
|
|
406
602
|
}
|
|
407
|
-
//#endregion
|
|
408
|
-
//#region src/di/CoreTokens.d.ts
|
|
409
|
-
declare const CoreTokens: {
|
|
410
|
-
readonly PersistedWorkflowTokenRegistry: TypeToken<PersistedWorkflowTokenRegistryLike>;
|
|
411
|
-
readonly CredentialSessionService: TypeToken<CredentialSessionService>;
|
|
412
|
-
readonly CredentialTypeRegistry: TypeToken<CredentialTypeRegistry>;
|
|
413
|
-
readonly WorkflowRunnerService: TypeToken<WorkflowRunnerService>;
|
|
414
|
-
readonly LiveWorkflowRepository: TypeToken<LiveWorkflowRepository>;
|
|
415
|
-
readonly WorkflowRepository: TypeToken<WorkflowRepository>;
|
|
416
|
-
readonly NodeResolver: TypeToken<NodeResolver>;
|
|
417
|
-
readonly WorkflowNodeInstanceFactory: TypeToken<WorkflowNodeInstanceFactory>;
|
|
418
|
-
readonly RunIdFactory: TypeToken<RunIdFactory>;
|
|
419
|
-
readonly ActivationIdFactory: TypeToken<ActivationIdFactory>;
|
|
420
|
-
readonly WorkflowExecutionRepository: TypeToken<WorkflowExecutionRepository>;
|
|
421
|
-
readonly TriggerSetupStateRepository: TypeToken<TriggerSetupStateRepository>;
|
|
422
|
-
readonly NodeActivationScheduler: TypeToken<NodeActivationScheduler>;
|
|
423
|
-
readonly RunDataFactory: TypeToken<RunDataFactory>;
|
|
424
|
-
readonly ExecutionContextFactory: TypeToken<ExecutionContextFactory>;
|
|
425
|
-
readonly RunEventBus: TypeToken<RunEventBus>;
|
|
426
|
-
readonly BinaryStorage: TypeToken<BinaryStorage>;
|
|
427
|
-
readonly WebhookBasePath: TypeToken<string>;
|
|
428
|
-
/** Engine execution limits (defaults + optional host overrides). Consumers may bind a custom instance to override. */
|
|
429
|
-
readonly EngineExecutionLimitsPolicy: TypeToken<EngineExecutionLimitsPolicy>;
|
|
430
|
-
readonly WorkflowActivationPolicy: TypeToken<WorkflowActivationPolicy>;
|
|
431
|
-
};
|
|
432
603
|
//#endregion
|
|
433
604
|
//#region src/contracts/credentialTypes.d.ts
|
|
434
605
|
type CredentialTypeId = string;
|
|
@@ -510,6 +681,27 @@ type CredentialOAuth2AuthDefinition = Readonly<{
|
|
|
510
681
|
scopesFromPublicConfig?: CredentialOAuth2ScopesFromPublicConfig;
|
|
511
682
|
clientIdFieldKey?: string;
|
|
512
683
|
clientSecretFieldKey?: string;
|
|
684
|
+
} | {
|
|
685
|
+
kind: "oauth2";
|
|
686
|
+
/**
|
|
687
|
+
* Free-form provider identifier for telemetry, DB rows, and Better Auth provider naming.
|
|
688
|
+
* Not used for any registry lookup — URLs come from {@link authorizeUrl} / {@link tokenUrl}.
|
|
689
|
+
*/
|
|
690
|
+
providerId: string;
|
|
691
|
+
/**
|
|
692
|
+
* Authorization endpoint. May contain `{publicFieldKey}` placeholders that the runtime
|
|
693
|
+
* substitutes from the credential's resolved public config (URL-encoded).
|
|
694
|
+
* Example: `https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/authorize`
|
|
695
|
+
*/
|
|
696
|
+
authorizeUrl: string;
|
|
697
|
+
/** Token endpoint. Same templating rules as {@link authorizeUrl}. */
|
|
698
|
+
tokenUrl: string;
|
|
699
|
+
/** Optional userinfo endpoint. Same templating rules as {@link authorizeUrl}. */
|
|
700
|
+
userInfoUrl?: string;
|
|
701
|
+
scopes: ReadonlyArray<string>;
|
|
702
|
+
scopesFromPublicConfig?: CredentialOAuth2ScopesFromPublicConfig;
|
|
703
|
+
clientIdFieldKey?: string;
|
|
704
|
+
clientSecretFieldKey?: string;
|
|
513
705
|
}>;
|
|
514
706
|
type CredentialAuthDefinition = CredentialOAuth2AuthDefinition;
|
|
515
707
|
type CredentialAdvancedSectionPresentation = Readonly<{
|
|
@@ -600,6 +792,71 @@ declare class CredentialUnboundError extends Error {
|
|
|
600
792
|
private static createMessage;
|
|
601
793
|
}
|
|
602
794
|
//#endregion
|
|
795
|
+
//#region src/contracts/collectionTypes.d.ts
|
|
796
|
+
/**
|
|
797
|
+
* Represents a typed store for a single collection.
|
|
798
|
+
* All rows include auto-managed id, created_at, and updated_at fields.
|
|
799
|
+
*/
|
|
800
|
+
interface CollectionStore<TRow extends Record<string, unknown> = Record<string, unknown>> {
|
|
801
|
+
/**
|
|
802
|
+
* Insert a new row. id, created_at, and updated_at are auto-populated.
|
|
803
|
+
*/
|
|
804
|
+
insert(row: TRow): Promise<TRow & {
|
|
805
|
+
id: string;
|
|
806
|
+
created_at: Date;
|
|
807
|
+
updated_at: Date;
|
|
808
|
+
}>;
|
|
809
|
+
/**
|
|
810
|
+
* Get a single row by id.
|
|
811
|
+
*/
|
|
812
|
+
get(id: string): Promise<(TRow & {
|
|
813
|
+
id: string;
|
|
814
|
+
created_at: Date;
|
|
815
|
+
updated_at: Date;
|
|
816
|
+
}) | null>;
|
|
817
|
+
/**
|
|
818
|
+
* Find a single row matching the provided filter.
|
|
819
|
+
*/
|
|
820
|
+
findOne(filter: Partial<TRow>): Promise<(TRow & {
|
|
821
|
+
id: string;
|
|
822
|
+
created_at: Date;
|
|
823
|
+
updated_at: Date;
|
|
824
|
+
}) | null>;
|
|
825
|
+
/**
|
|
826
|
+
* List rows with optional pagination and filtering.
|
|
827
|
+
*/
|
|
828
|
+
list(opts?: {
|
|
829
|
+
limit?: number;
|
|
830
|
+
offset?: number;
|
|
831
|
+
where?: Partial<TRow>;
|
|
832
|
+
}): Promise<{
|
|
833
|
+
rows: ReadonlyArray<TRow & {
|
|
834
|
+
id: string;
|
|
835
|
+
created_at: Date;
|
|
836
|
+
updated_at: Date;
|
|
837
|
+
}>;
|
|
838
|
+
total: number;
|
|
839
|
+
}>;
|
|
840
|
+
/**
|
|
841
|
+
* Update a row by id with partial data.
|
|
842
|
+
*/
|
|
843
|
+
update(id: string, patch: Partial<TRow>): Promise<TRow & {
|
|
844
|
+
id: string;
|
|
845
|
+
created_at: Date;
|
|
846
|
+
updated_at: Date;
|
|
847
|
+
}>;
|
|
848
|
+
/**
|
|
849
|
+
* Delete a row by id. Hard delete only (no soft delete).
|
|
850
|
+
*/
|
|
851
|
+
delete(id: string): Promise<{
|
|
852
|
+
deleted: boolean;
|
|
853
|
+
}>;
|
|
854
|
+
}
|
|
855
|
+
/**
|
|
856
|
+
* Runtime collections context: keyed by collection name.
|
|
857
|
+
*/
|
|
858
|
+
type CollectionsContext = Readonly<Record<string, CollectionStore>>;
|
|
859
|
+
//#endregion
|
|
603
860
|
//#region src/contracts/CostTrackingTelemetryContract.d.ts
|
|
604
861
|
type CostTrackingComponent = "chat" | "ocr" | "rag";
|
|
605
862
|
declare const CostTrackingTelemetryMetricNames: {
|
|
@@ -979,6 +1236,15 @@ interface ExecutionContext {
|
|
|
979
1236
|
itemIndex?: number;
|
|
980
1237
|
/** When set, this ctx is executing inside a sub-agent triggered by the named parent invocation. */
|
|
981
1238
|
parentInvocationId?: ConnectionInvocationId;
|
|
1239
|
+
/**
|
|
1240
|
+
* Present iff the run was started by a TestSuiteOrchestrator. The {@link IsTestRunNode}
|
|
1241
|
+
* branches on this; assertion-emitting nodes use it to decide whether to record results.
|
|
1242
|
+
*/
|
|
1243
|
+
testContext?: RunTestContext;
|
|
1244
|
+
/**
|
|
1245
|
+
* Collections registered in the codemation config, keyed by collection name.
|
|
1246
|
+
*/
|
|
1247
|
+
readonly collections?: CollectionsContext;
|
|
982
1248
|
}
|
|
983
1249
|
interface ExecutionContextFactory {
|
|
984
1250
|
create(args: {
|
|
@@ -993,6 +1259,7 @@ interface ExecutionContextFactory {
|
|
|
993
1259
|
nodeState?: NodeExecutionStatePublisher;
|
|
994
1260
|
telemetry?: ExecutionTelemetry;
|
|
995
1261
|
getCredential<TSession = unknown>(slotKey: string): Promise<TSession>;
|
|
1262
|
+
testContext?: RunTestContext;
|
|
996
1263
|
}): ExecutionContext;
|
|
997
1264
|
}
|
|
998
1265
|
interface NodeExecutionContext<TConfig extends NodeConfigBase = NodeConfigBase> extends ExecutionContext {
|
|
@@ -1002,12 +1269,34 @@ interface NodeExecutionContext<TConfig extends NodeConfigBase = NodeConfigBase>
|
|
|
1002
1269
|
telemetry: NodeExecutionTelemetry;
|
|
1003
1270
|
binary: NodeBinaryAttachmentService;
|
|
1004
1271
|
}
|
|
1272
|
+
interface PollingTriggerHandle {
|
|
1273
|
+
/**
|
|
1274
|
+
* Start the polling loop. The runtime registers its own cleanup handle so callers do not need to
|
|
1275
|
+
* call {@link TriggerSetupContext.registerCleanup} for the loop.
|
|
1276
|
+
* @returns The state returned by the first cycle (or `undefined` when the overlap guard fired).
|
|
1277
|
+
*/
|
|
1278
|
+
start<TState, TItem>(args: {
|
|
1279
|
+
intervalMs: number;
|
|
1280
|
+
seedState?: TState;
|
|
1281
|
+
runCycle: (cycleCtx: {
|
|
1282
|
+
previousState: TState | undefined;
|
|
1283
|
+
signal: AbortSignal;
|
|
1284
|
+
}) => Promise<{
|
|
1285
|
+
items: Items<TItem>;
|
|
1286
|
+
nextState: TState;
|
|
1287
|
+
}>;
|
|
1288
|
+
}): Promise<TState | undefined>;
|
|
1289
|
+
/** Convenience dedup-window helper. */
|
|
1290
|
+
readonly dedup: PollingTriggerDedupWindow;
|
|
1291
|
+
}
|
|
1005
1292
|
interface TriggerSetupContext<TConfig extends TriggerNodeConfig<any, any> = TriggerNodeConfig<any, any>, TSetupState$1 extends JsonValue | undefined = TriggerNodeSetupState<TConfig>> extends ExecutionContext {
|
|
1006
1293
|
trigger: TriggerInstanceId;
|
|
1007
1294
|
config: TConfig;
|
|
1008
1295
|
previousState: TSetupState$1;
|
|
1009
1296
|
registerCleanup(cleanup: TriggerCleanupHandle): void;
|
|
1010
1297
|
emit(items: Items): Promise<void>;
|
|
1298
|
+
/** Generic polling-trigger surface. Pre-binds trigger id, emit, and registerCleanup. */
|
|
1299
|
+
readonly polling: PollingTriggerHandle;
|
|
1011
1300
|
}
|
|
1012
1301
|
interface TriggerTestItemsContext<TConfig extends TriggerNodeConfig<any, any> = TriggerNodeConfig<any, any>, TSetupState$1 extends JsonValue | undefined = TriggerNodeSetupState<TConfig>> extends ExecutionContext {
|
|
1013
1302
|
trigger: TriggerInstanceId;
|
|
@@ -1202,6 +1491,8 @@ interface EngineDeps {
|
|
|
1202
1491
|
workflowPolicyRuntimeDefaults?: WorkflowPolicyRuntimeDefaults;
|
|
1203
1492
|
/** When set, logs inactive-workflow skips at boot and trigger start/stop on activation changes. */
|
|
1204
1493
|
triggerRuntimeDiagnostics?: TriggerRuntimeDiagnostics;
|
|
1494
|
+
/** When set, the polling-trigger runtime uses this logger for cycle info/debug/error. */
|
|
1495
|
+
pollingTriggerLogger?: PollingTriggerLogger;
|
|
1205
1496
|
}
|
|
1206
1497
|
//#endregion
|
|
1207
1498
|
//#region src/contracts/retryPolicySpec.types.d.ts
|
|
@@ -1233,14 +1524,9 @@ interface ExponentialRetryPolicySpec {
|
|
|
1233
1524
|
}
|
|
1234
1525
|
//#endregion
|
|
1235
1526
|
//#region src/contracts/workflowTypes.d.ts
|
|
1236
|
-
type WorkflowId = string;
|
|
1237
|
-
type NodeId = string;
|
|
1238
1527
|
type NodeIdRef<TJson = unknown> = NodeId & Readonly<{
|
|
1239
1528
|
__codemationNodeJson?: TJson;
|
|
1240
1529
|
}>;
|
|
1241
|
-
type OutputPortKey = string;
|
|
1242
|
-
type InputPortKey = string;
|
|
1243
|
-
type PersistedTokenId = string;
|
|
1244
1530
|
type NodeKind = "trigger" | "node";
|
|
1245
1531
|
type JsonPrimitive = string | number | boolean | null;
|
|
1246
1532
|
interface JsonObject {
|
|
@@ -1260,7 +1546,6 @@ interface Edge {
|
|
|
1260
1546
|
input: InputPortKey;
|
|
1261
1547
|
};
|
|
1262
1548
|
}
|
|
1263
|
-
type NodeConnectionName = string;
|
|
1264
1549
|
/**
|
|
1265
1550
|
* Named connection from a parent node to child nodes that exist in {@link WorkflowDefinition.nodes}
|
|
1266
1551
|
* but are not traversed by the main execution graph. Parents are commonly executable nodes, but may
|
|
@@ -1326,6 +1611,14 @@ interface NodeConfigBase {
|
|
|
1326
1611
|
readonly declaredOutputPorts?: ReadonlyArray<OutputPortKey>;
|
|
1327
1612
|
readonly declaredInputPorts?: ReadonlyArray<InputPortKey>;
|
|
1328
1613
|
getCredentialRequirements?(): ReadonlyArray<CredentialRequirement>;
|
|
1614
|
+
/**
|
|
1615
|
+
* Marker: this node emits {@link import("./assertionTypes").AssertionResult}-shaped items on its
|
|
1616
|
+
* `main` port. The TestSuiteOrchestrator (and host-side TestAssertionPersister) listen for
|
|
1617
|
+
* `nodeCompleted` events from nodes with this flag set, and persist their output items as
|
|
1618
|
+
* TestAssertion records (only when the run carries a `testContext`). Set on assertion node
|
|
1619
|
+
* configs (e.g. `AssertionNodeConfig`, `StringEqualsAssertionNodeConfig`).
|
|
1620
|
+
*/
|
|
1621
|
+
readonly emitsAssertions?: true;
|
|
1329
1622
|
}
|
|
1330
1623
|
declare const runnableNodeInputType: unique symbol;
|
|
1331
1624
|
declare const runnableNodeOutputType: unique symbol;
|
|
@@ -1355,6 +1648,12 @@ interface TriggerNodeConfig<TOutputJson$1 = unknown, TSetupState$1 extends JsonV
|
|
|
1355
1648
|
readonly kind: "trigger";
|
|
1356
1649
|
readonly [triggerNodeOutputType]?: TOutputJson$1;
|
|
1357
1650
|
readonly [triggerNodeSetupStateType]?: TSetupState$1;
|
|
1651
|
+
/**
|
|
1652
|
+
* Distinguishes triggers driven by the live activation policy (webhooks, cron, polling) from
|
|
1653
|
+
* triggers driven only by the {@link TestSuiteOrchestrator}. `WorkflowActivation` skips
|
|
1654
|
+
* `"test"` triggers; the orchestrator skips `"live"` triggers. Defaults to `"live"` when omitted.
|
|
1655
|
+
*/
|
|
1656
|
+
readonly triggerKind?: "live" | "test";
|
|
1358
1657
|
}
|
|
1359
1658
|
type RunnableNodeInputJson<TConfig extends RunnableNodeConfig<any, any>> = TConfig extends RunnableNodeConfig<infer TInputJson, any> ? TInputJson : never;
|
|
1360
1659
|
type RunnableNodeOutputJson<TConfig extends RunnableNodeConfig<any, any>> = TConfig extends RunnableNodeConfig<any, infer TOutputJson> ? TOutputJson : never;
|
|
@@ -1421,6 +1720,12 @@ interface ParentExecutionRef {
|
|
|
1421
1720
|
engineMaxNodeActivations?: number;
|
|
1422
1721
|
/** Effective max subworkflow depth from the parent run (propagated to child policy merge). */
|
|
1423
1722
|
engineMaxSubworkflowDepth?: number;
|
|
1723
|
+
/**
|
|
1724
|
+
* Test-suite linkage inherited by the child subworkflow run. Set by whichever node
|
|
1725
|
+
* spawns the subworkflow when its own `ctx.testContext` is present, so assertions
|
|
1726
|
+
* emitted inside a subworkflow land under the correct parent test case.
|
|
1727
|
+
*/
|
|
1728
|
+
testContext?: RunTestContext;
|
|
1424
1729
|
}
|
|
1425
1730
|
interface RunDataSnapshot {
|
|
1426
1731
|
getOutputs(nodeId: NodeId): NodeOutputs | undefined;
|
|
@@ -1719,5 +2024,5 @@ declare class RunIntentService {
|
|
|
1719
2024
|
private createWebhookExecutionOptions;
|
|
1720
2025
|
}
|
|
1721
2026
|
//#endregion
|
|
1722
|
-
export {
|
|
1723
|
-
//# sourceMappingURL=RunIntentService-
|
|
2027
|
+
export { WorkflowPrunePolicySpec as $, CredentialHealth as $n, RunTestContext as $r, TriggerSetupStateFor as $t, NodeSchedulerDecision as A, TestSuiteRunId as Ai, CodemationTelemetryMetricNames as An, NodeExecutionStatus as Ar, NodeActivationContinuation as At, RunnableNodeOutputJson as B, CostTrackingTelemetry as Bn, PersistedWorkflowTokenRegistryLike as Br, NodeExecutionStatePublisher as Bt, NodeErrorHandlerSpec as C, EngineExecutionLimitsPolicy as Ci, TelemetryAttributes as Cn, ConnectionInvocationId as Cr, ExecutableTriggerNode as Ct, NodeOffloadPolicy as D, RunEventSubscription as Di, TelemetrySpanEnd as Dn, ExecutionFrontierPlan as Dr, ItemNode as Dt, NodeKind as E, RunEventBus as Ei, TelemetryScope as En, EngineRunCounters as Er, ExecutionContextFactory as Et, RunDataSnapshot as F, NodeId as Fi, NoOpNodeExecutionTelemetry as Fn, PersistedRunControlState as Fr, NodeBinaryAttachmentService as Ft, WorkflowDefinition as G, CollectionStore as Gn, RunExecutionOptions as Gr, PreparedNodeActivationDispatch as Gt, TriggerNodeOutputJson as H, CostTrackingTelemetryFactory as Hn, RunCompletionNotifier as Hr, NodeResolver as Ht, RunId as I, OutputPortKey as Ii, NoOpTelemetrySpanScope as In, PersistedRunSchedulingState as Ir, NodeExecutionContext as It, WorkflowErrorHandlerSpec as J, CredentialAdvancedSectionPresentation as Jn, RunResult as Jr, TestableTriggerNode as Jt, WorkflowErrorContext as K, CollectionsContext as Kn, RunPruneCandidate as Kr, RunnableNode as Kt, RunIdFactory as L, PersistedTokenId as Li, NoOpTelemetryArtifactReference as Ln, PersistedRunState as Lr, NodeExecutionRequest as Lt, ParentExecutionRef as M, TestTriggerSetupContext as Mi, CodemationTelemetryAttributeNames as Mn, PendingNodeExecution as Mr, NodeActivationRequest as Mt, PersistedRunPolicySnapshot as N, InputPortKey as Ni, NoOpExecutionTelemetryFactory as Nn, PersistedMutableNodeState as Nr, NodeActivationRequestBase as Nt, NodeOutputs as O, TestCaseRunStatus as Oi, TelemetrySpanEventRecord as On, NodeExecutionError as Or, LiveWorkflowRepository as Ot, RunDataFactory as P, NodeConnectionName as Pi, NoOpExecutionTelemetry as Pn, PersistedMutableRunState as Pr, NodeActivationScheduler as Pt, WorkflowPolicyRuntimeDefaults as Q, CredentialFieldSchema as Qn, RunSummary as Qr, TriggerSetupContext as Qt, RunnableNodeConfig as R, WorkflowId as Ri, CostTrackingComponent as Rn, PersistedWorkflowSnapshot as Rr, NodeExecutionRequestHandler as Rt, NodeErrorHandlerArgs as S, ENGINE_EXECUTION_LIMITS_DEFAULTS as Si, TelemetryAttributePrimitive as Sn, ConnectionInvocationAppendArgs as Sr, EngineHost as St, NodeIterationId as T, RunEvent as Ti, TelemetryMetricRecord as Tn, CurrentStateExecutionRequest as Tr, ExecutionContext as Tt, TriggerNodeSetupState as U, CostTrackingTelemetryMetricNames as Un, RunCurrentState as Ur, PersistedTriggerSetupState as Ut, TriggerNodeConfig as V, CostTrackingTelemetryAttributeNames as Vn, PinnedNodeOutputsByPort as Vr, NodeExecutor as Vt, UpstreamRefPlaceholder as W, CostTrackingUsageRecord as Wn, RunEventPublisherDeps as Wr, PollingTriggerHandle as Wt, WorkflowGraphFactory as X, CredentialBinding as Xn, RunStatus as Xr, TriggerNode as Xt, WorkflowGraph as Y, CredentialAuthDefinition as Yn, RunStateResetRequest as Yr, TriggerCleanupHandle as Yt, WorkflowNodeConnection as Z, CredentialBindingKey as Zn, RunStopCondition as Zr, TriggerRuntimeDiagnostics as Zt, MutableRunData as _, instancePerContainerCachingFactory as _i, ExecutionTelemetry as _n, CredentialUnboundError as _r, BinaryStorageReadResult as _t, BinaryAttachment as a, DependencyContainer$1 as ai, WorkflowRunnerService as an, CredentialMaterialSourceKind as ar, nodeRef as at, NodeDefinition as b, singleton as bi, TelemetryArtifactAttachment as bn, PollingTriggerLogger as br, BinaryStorageWriteResult as bt, ExecutionMode as c, Lifecycle as ci, HttpMethod as cn, CredentialRequirement as cr, triggerNodeOutputType as ct, Items as d, container as di, WebhookInvocationMatch as dn, CredentialSessionService as dr, FixedRetryPolicySpec as dt, WebhookRunResult as ei, TriggerSetupStateRepository as en, CredentialHealthStatus as er, WorkflowStoragePolicyDecisionArgs as et, JsonArray as f, delay as fi, WebhookTriggerMatcher as fn, CredentialSetupStatus as fr, NoneRetryPolicySpec as ft, JsonValue as g, instanceCachingFactory as gi, WorkflowActivationPolicy as gn, CredentialTypeRegistry as gr, BinaryStorage as gt, JsonPrimitive as h, injectable as hi, AllWorkflowsActiveWorkflowActivationPolicy as hn, CredentialTypeId as hr, BinaryBody as ht, ActivationIdFactory as i, Container as ii, WorkflowRunnerResolver as in, CredentialJsonRecord as ir, branchRef as it, PairedItemRef as j, TestTriggerNodeConfig as ji, GenAiTelemetryAttributeNames as jn, NodeInputsByPort as jr, NodeActivationReceipt as jt, NodeRef as k, TestSuiteRunStatus as ki, TelemetrySpanScope as kn, NodeExecutionSnapshot as kr, MultiInputNode as kt, Item as l, RegistrationOptions as li, TriggerInstanceId as ln, CredentialSessionFactory as lr, triggerNodeSetupStateType as lt, JsonObject as m, injectAll as mi, WebhookTriggerRoutingDiagnostics as mn, CredentialTypeDefinition as mr, BinaryAttachmentCreateRequest as mt, InMemoryLiveWorkflowRepository as n, WorkflowExecutionPruneRepository as ni, WorkflowNodeInstanceFactory as nn, CredentialInstanceId as nr, WorkflowStoragePolicyResolver as nt, BinaryPreviewKind as o, Disposable as oi, WorkflowSnapshotFactory as on, CredentialOAuth2AuthDefinition as or, runnableNodeInputType as ot, JsonNonArray as p, inject as pi, WebhookTriggerResolution as pn, CredentialType as pr, RetryPolicySpec as pt, WorkflowErrorHandler as q, AnyCredentialType as qn, RunQueueEntry as qr, RunnableNodeExecuteArgs as qt, Engine as r, WorkflowExecutionRepository as ri, WorkflowRepository as rn, CredentialInstanceRecord as rr, WorkflowStoragePolicySpec as rt, Edge as s, InjectionToken$1 as si, WorkflowSnapshotResolver as sn, CredentialOAuth2ScopesFromPublicConfig as sr, runnableNodeOutputType as st, RunIntentService as t, WorkflowExecutionListingRepository as ti, TriggerTestItemsContext as tn, CredentialHealthTester as tr, WorkflowStoragePolicyMode as tt, ItemBinary as u, TypeToken as ui, WebhookControlSignal as un, CredentialSessionFactoryArgs as ur, ExponentialRetryPolicySpec as ut, NodeActivationId as v, predicateAwareClassFactory as vi, ExecutionTelemetryFactory as vn, OAuth2ProviderFromPublicConfig as vr, BinaryStorageStatResult as vt, NodeIdRef as w, EngineExecutionLimitsPolicyConfig as wi, TelemetryChildSpanStart as wn, ConnectionInvocationRecord as wr, ExecutionBinaryService as wt, NodeErrorHandler as x, CoreTokens as xi, TelemetryArtifactReference as xn, PollingTriggerDedupWindow as xr, EngineDeps as xt, NodeConfigBase as y, registry as yi, NodeExecutionTelemetry as yn, NoOpPollingTriggerLogger as yr, BinaryStorageWriteRequest as yt, RunnableNodeInputJson as z, CostTrackingPriceQuote as zn, PersistedWorkflowSnapshotNode as zr, NodeExecutionScheduler as zt };
|
|
2028
|
+
//# sourceMappingURL=RunIntentService-siBSjaaY.d.cts.map
|