@codemation/core 0.0.7 → 0.0.11
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/package.json +6 -1
- package/dist/EngineExecutionLimitsPolicy-8MEFIYx1.d.cts +0 -160
- package/dist/EngineExecutionLimitsPolicy-BWAXW9D6.d.cts +0 -160
- package/dist/EngineExecutionLimitsPolicy-Bp8PS1Ss.d.cts +0 -159
- package/dist/EngineExecutionLimitsPolicy-CLxcN-D2.d.ts +0 -159
- package/dist/EngineExecutionLimitsPolicy-DZXuix51.d.ts +0 -160
- package/dist/EngineExecutionLimitsPolicy-Gfz6ngFd.d.ts +0 -160
- package/dist/EngineFactory-CBnntY3J.cjs +0 -3152
- package/dist/EngineFactory-CBnntY3J.cjs.map +0 -1
- package/dist/EngineFactory-Cwn3R2YA.js +0 -3087
- package/dist/EngineFactory-Cwn3R2YA.js.map +0 -1
- package/dist/EngineFactory-DWCnNocp.js +0 -3063
- package/dist/EngineFactory-DWCnNocp.js.map +0 -1
- package/dist/EngineFactory-DhPFou4p.cjs +0 -3188
- package/dist/EngineFactory-DhPFou4p.cjs.map +0 -1
- package/dist/EngineFactory-l_9xmBtv.cjs +0 -3190
- package/dist/EngineFactory-l_9xmBtv.cjs.map +0 -1
- package/dist/EngineFactory-w-aOWuqh.js +0 -3089
- package/dist/EngineFactory-w-aOWuqh.js.map +0 -1
- package/dist/InMemoryLiveWorkflowRepository-1J9MHN_I.js +0 -18
- package/dist/InMemoryLiveWorkflowRepository-1J9MHN_I.js.map +0 -1
- package/dist/InMemoryLiveWorkflowRepository-CULNqv96.d.ts +0 -1300
- package/dist/InMemoryLiveWorkflowRepository-D6eiiXxF.d.cts +0 -1168
- package/dist/InMemoryLiveWorkflowRepository-D7l8cjdZ.d.cts +0 -1130
- package/dist/InMemoryLiveWorkflowRepository-DL7LmC9S.d.ts +0 -1340
- package/dist/InMemoryLiveWorkflowRepository-jnv-OnOP.d.ts +0 -1300
- package/dist/InMemoryLiveWorkflowRepository-xny1_Z6i.cjs +0 -24
- package/dist/InMemoryLiveWorkflowRepository-xny1_Z6i.cjs.map +0 -1
- package/dist/InMemoryLiveWorkflowRepository-xr7b4kvi.d.ts +0 -1338
- package/dist/InMemoryWorkflowCatalog-BIdFpwbK.d.ts +0 -1205
- package/dist/InMemoryWorkflowCatalog-BW00_3N3.d.cts +0 -12
- package/dist/InMemoryWorkflowCatalog-BiYHGoPw.cjs +0 -24
- package/dist/InMemoryWorkflowCatalog-BiYHGoPw.cjs.map +0 -1
- package/dist/InMemoryWorkflowCatalog-BrG0ApMO.d.cts +0 -1115
- package/dist/InMemoryWorkflowCatalog-BzrAr--Y.js +0 -139
- package/dist/InMemoryWorkflowCatalog-BzrAr--Y.js.map +0 -1
- package/dist/InMemoryWorkflowCatalog-C-EJlJ7y.d.cts +0 -1120
- package/dist/InMemoryWorkflowCatalog-C4482bpw.cjs +0 -24
- package/dist/InMemoryWorkflowCatalog-C4482bpw.cjs.map +0 -1
- package/dist/InMemoryWorkflowCatalog-CZ0kZpOv.d.ts +0 -1289
- package/dist/InMemoryWorkflowCatalog-C_ACeLyW.d.cts +0 -1119
- package/dist/InMemoryWorkflowCatalog-CiHWIu5E.d.cts +0 -12
- package/dist/InMemoryWorkflowCatalog-CkH7gkya.js +0 -18
- package/dist/InMemoryWorkflowCatalog-CkH7gkya.js.map +0 -1
- package/dist/InMemoryWorkflowCatalog-CnpZVJM9.d.ts +0 -1205
- package/dist/InMemoryWorkflowCatalog-Cu68S8YR.js +0 -18
- package/dist/InMemoryWorkflowCatalog-Cu68S8YR.js.map +0 -1
- package/dist/InMemoryWorkflowCatalog-D2w9nMj2.cjs +0 -151
- package/dist/InMemoryWorkflowCatalog-D2w9nMj2.cjs.map +0 -1
- package/dist/InMemoryWorkflowCatalog-D5eMxEf7.js +0 -18
- package/dist/InMemoryWorkflowCatalog-D5eMxEf7.js.map +0 -1
- package/dist/InMemoryWorkflowCatalog-D5nCp2yZ.d.ts +0 -1267
- package/dist/InMemoryWorkflowCatalog-DIq0bjqN.d.ts +0 -12
- package/dist/InMemoryWorkflowCatalog-DLgaEaw_.d.ts +0 -1288
- package/dist/InMemoryWorkflowCatalog-DNBFdK-x.d.cts +0 -1120
- package/dist/InMemoryWorkflowCatalog-DQBkCzb7.cjs +0 -24
- package/dist/InMemoryWorkflowCatalog-DQBkCzb7.cjs.map +0 -1
- package/dist/InMemoryWorkflowCatalog-DS4-eX6i.d.cts +0 -1118
- package/dist/InMemoryWorkflowCatalog-DdVfy8MY.d.ts +0 -12
- package/dist/InMemoryWorkflowCatalog-DeVZu3g8.d.ts +0 -12
- package/dist/InMemoryWorkflowCatalog-GxkQjvt5.d.ts +0 -1200
- package/dist/InMemoryWorkflowCatalog-qaVRn1Lc.d.cts +0 -1115
- package/dist/InMemoryWorkflowCatalog-z1aIT4TC.d.cts +0 -12
- package/dist/InMemoryWorkflowRegistry-BBuOovLL.d.ts +0 -1007
- package/dist/InMemoryWorkflowRegistry-BIFnSl3k.d.ts +0 -1201
- package/dist/InMemoryWorkflowRegistry-BnGilthz.d.ts +0 -1137
- package/dist/InMemoryWorkflowRegistry-CEp5I8No.d.ts +0 -1146
- package/dist/InMemoryWorkflowRegistry-CHyMB9jW.d.cts +0 -976
- package/dist/InMemoryWorkflowRegistry-CUN7K86m.d.cts +0 -1061
- package/dist/InMemoryWorkflowRegistry-CVfHyELh.d.cts +0 -971
- package/dist/InMemoryWorkflowRegistry-CXXJrwAr.d.cts +0 -1052
- package/dist/InMemoryWorkflowRegistry-DDGfPTJy.d.ts +0 -1013
- package/dist/InMemoryWorkflowRegistry-DnYSOoT5.d.ts +0 -1120
- package/dist/InMemoryWorkflowRegistry-Dp5GiFF2.d.cts +0 -1035
- package/dist/InMemoryWorkflowRegistry-DypDBeOw.d.cts +0 -1116
- package/dist/InMemoryWorkflowRegistry-SzwJCAxT.d.ts +0 -1012
- package/dist/InMemoryWorkflowRegistry-jupvqyGc.d.cts +0 -977
- package/dist/InMemoryWorkflowRegistry-rAdKVWYT.d.ts +0 -1117
- package/dist/InProcessRetryRunner-BBNPkXjy.d.cts +0 -292
- package/dist/PersistedWorkflowSnapshotFactory-7RkOL3Kg.d.ts +0 -14
- package/dist/PersistedWorkflowSnapshotFactory-BmANa46W.cjs +0 -141
- package/dist/PersistedWorkflowSnapshotFactory-BmANa46W.cjs.map +0 -1
- package/dist/PersistedWorkflowSnapshotFactory-Bwb_etSt.js +0 -118
- package/dist/PersistedWorkflowSnapshotFactory-Bwb_etSt.js.map +0 -1
- package/dist/PersistedWorkflowSnapshotFactory-CRkKGNV6.js +0 -123
- package/dist/PersistedWorkflowSnapshotFactory-CRkKGNV6.js.map +0 -1
- package/dist/PersistedWorkflowSnapshotFactory-CZolnGy5.js +0 -101
- package/dist/PersistedWorkflowSnapshotFactory-CZolnGy5.js.map +0 -1
- package/dist/PersistedWorkflowSnapshotFactory-Ca_oysOv.cjs +0 -131
- package/dist/PersistedWorkflowSnapshotFactory-Ca_oysOv.cjs.map +0 -1
- package/dist/PersistedWorkflowSnapshotFactory-CqIcShnX.js +0 -103
- package/dist/PersistedWorkflowSnapshotFactory-CqIcShnX.js.map +0 -1
- package/dist/PersistedWorkflowSnapshotFactory-D-tBk4_G.js +0 -119
- package/dist/PersistedWorkflowSnapshotFactory-D-tBk4_G.js.map +0 -1
- package/dist/PersistedWorkflowSnapshotFactory-D4cXl2e2.cjs +0 -131
- package/dist/PersistedWorkflowSnapshotFactory-D4cXl2e2.cjs.map +0 -1
- package/dist/PersistedWorkflowSnapshotFactory-DINoP12r.cjs +0 -131
- package/dist/PersistedWorkflowSnapshotFactory-DINoP12r.cjs.map +0 -1
- package/dist/PersistedWorkflowSnapshotFactory-DJAwSuHU.js +0 -103
- package/dist/PersistedWorkflowSnapshotFactory-DJAwSuHU.js.map +0 -1
- package/dist/PersistedWorkflowSnapshotFactory-DSUjVCcf.cjs +0 -131
- package/dist/PersistedWorkflowSnapshotFactory-DSUjVCcf.cjs.map +0 -1
- package/dist/PersistedWorkflowSnapshotFactory-DdHuhkDb.cjs +0 -107
- package/dist/PersistedWorkflowSnapshotFactory-DdHuhkDb.cjs.map +0 -1
- package/dist/PersistedWorkflowSnapshotFactory-Dqc6NHis.js +0 -119
- package/dist/PersistedWorkflowSnapshotFactory-Dqc6NHis.js.map +0 -1
- package/dist/PersistedWorkflowSnapshotFactory-Dxa2dSrw.cjs +0 -130
- package/dist/PersistedWorkflowSnapshotFactory-Dxa2dSrw.cjs.map +0 -1
- package/dist/PersistedWorkflowSnapshotFactory-Ep79Ah1G.js +0 -123
- package/dist/PersistedWorkflowSnapshotFactory-Ep79Ah1G.js.map +0 -1
- package/dist/PersistedWorkflowSnapshotFactory-GyLfRuiJ.js +0 -119
- package/dist/PersistedWorkflowSnapshotFactory-GyLfRuiJ.js.map +0 -1
- package/dist/PersistedWorkflowSnapshotFactory-HTpBsBzn.js +0 -102
- package/dist/PersistedWorkflowSnapshotFactory-HTpBsBzn.js.map +0 -1
- package/dist/PersistedWorkflowSnapshotFactory-LVmaaf3t.cjs +0 -141
- package/dist/PersistedWorkflowSnapshotFactory-LVmaaf3t.cjs.map +0 -1
- package/dist/PersistedWorkflowSnapshotFactory-PZCpo2ZS.js +0 -119
- package/dist/PersistedWorkflowSnapshotFactory-PZCpo2ZS.js.map +0 -1
- package/dist/PersistedWorkflowSnapshotFactory-UjQ1SJev.cjs +0 -109
- package/dist/PersistedWorkflowSnapshotFactory-UjQ1SJev.cjs.map +0 -1
- package/dist/PersistedWorkflowSnapshotFactory-Y8kCrhcy.cjs +0 -109
- package/dist/PersistedWorkflowSnapshotFactory-Y8kCrhcy.cjs.map +0 -1
- package/dist/PersistedWorkflowSnapshotFactory-Z_nB-fmB.cjs +0 -108
- package/dist/PersistedWorkflowSnapshotFactory-Z_nB-fmB.cjs.map +0 -1
- package/dist/RunIntentService-1EE6N8ZL.cjs +0 -963
- package/dist/RunIntentService-1EE6N8ZL.cjs.map +0 -1
- package/dist/RunIntentService-2ivFmNQh.cjs +0 -3462
- package/dist/RunIntentService-2ivFmNQh.cjs.map +0 -1
- package/dist/RunIntentService-B0sUL5q-.js +0 -761
- package/dist/RunIntentService-B0sUL5q-.js.map +0 -1
- package/dist/RunIntentService-BFVbsOcg.js +0 -3131
- package/dist/RunIntentService-BFVbsOcg.js.map +0 -1
- package/dist/RunIntentService-BsBOwpVN.cjs +0 -1051
- package/dist/RunIntentService-BsBOwpVN.cjs.map +0 -1
- package/dist/RunIntentService-CSk3ETyn.js +0 -858
- package/dist/RunIntentService-CSk3ETyn.js.map +0 -1
- package/dist/RunIntentService-Ckn3u3tA.d.cts +0 -326
- package/dist/RunIntentService-DEo6GTTo.d.cts +0 -289
- package/dist/RunIntentService-DKrGtL0B.js +0 -782
- package/dist/RunIntentService-DKrGtL0B.js.map +0 -1
- package/dist/RunIntentService-DNOJc1R7.cjs +0 -942
- package/dist/RunIntentService-DNOJc1R7.cjs.map +0 -1
- package/dist/RunIntentService-Dq3pV53j.d.cts +0 -289
- package/dist/RunIntentService-NKobsfMQ.d.cts +0 -274
- package/dist/WorkflowSnapshotCodec-C3fuuS_R.d.cts +0 -22
- package/dist/WorkflowSnapshotCodec-CUudUo6f.js +0 -123
- package/dist/WorkflowSnapshotCodec-CUudUo6f.js.map +0 -1
- package/dist/WorkflowSnapshotCodec-CuCPQZTc.cjs +0 -129
- package/dist/WorkflowSnapshotCodec-CuCPQZTc.cjs.map +0 -1
- package/dist/WorkflowSnapshotCodec-DLiXQNvV.d.cts +0 -22
- package/dist/WorkflowSnapshotCodec-DNtdrZ7l.d.cts +0 -22
- package/dist/WorkflowSnapshotCodec-DTdWkoW_.d.cts +0 -22
- package/dist/credentialTypes-B5h3dI7r.d.cts +0 -1107
- package/dist/credentialTypes-B9okPCVo.d.cts +0 -963
- package/dist/credentialTypes-BFL70rgZ.d.cts +0 -964
- package/dist/credentialTypes-BGkh1O07.d.ts +0 -1010
- package/dist/credentialTypes-BNLi4Q7u.d.ts +0 -1030
- package/dist/credentialTypes-CeSoZGj3.d.cts +0 -994
- package/dist/credentialTypes-CpHc32Ig.d.cts +0 -984
- package/dist/credentialTypes-D0m7MQQl.d.cts +0 -1107
- package/dist/credentialTypes-D4nL2sUd.d.ts +0 -1000
- package/dist/credentialTypes-DBYK2Qbu.d.ts +0 -999
- package/dist/credentialTypes-DMJVy0r1.d.ts +0 -1000
- package/dist/credentialTypes-DhUAjYQp.d.ts +0 -1020
- package/dist/credentialTypes-gGITj5KL.d.cts +0 -964
- package/dist/credentialTypes-r3KVBJBE.d.cts +0 -974
- package/dist/diTokens-ClO27tjK.cjs +0 -34
- package/dist/diTokens-ClO27tjK.cjs.map +0 -1
- package/dist/diTokens-CoHBkwG6.js +0 -28
- package/dist/diTokens-CoHBkwG6.js.map +0 -1
- package/dist/index-6Doxmfnd.d.ts +0 -857
- package/dist/index-9g6Pfe9Z.d.ts +0 -689
- package/dist/index-AZ72Ej-K.d.ts +0 -920
- package/dist/index-BEk9V-q-.d.ts +0 -667
- package/dist/index-Bjt7_7oS.d.ts +0 -1192
- package/dist/index-CFGxsYXy.d.ts +0 -708
- package/dist/index-C_u8xFgn.d.ts +0 -690
- package/dist/index-CpbfsvOJ.d.ts +0 -1192
- package/dist/index-CsReNJN_.d.ts +0 -859
- package/dist/index-D5iNnXaW.d.ts +0 -667
- package/dist/index-DD_Eft1q.d.ts +0 -708
- package/dist/index-DiSYUe0G.d.ts +0 -1192
- package/dist/index-gIcH60sp.d.ts +0 -674
- package/dist/runtime-BIvd-1JA.cjs +0 -4112
- package/dist/runtime-BIvd-1JA.cjs.map +0 -1
- package/dist/runtime-D3eWKSQK.cjs +0 -3986
- package/dist/runtime-D3eWKSQK.cjs.map +0 -1
- package/dist/runtime-Dvp4xAjg.js +0 -3799
- package/dist/runtime-Dvp4xAjg.js.map +0 -1
- package/dist/runtime-vc76SSAa.js +0 -3685
- package/dist/runtime-vc76SSAa.js.map +0 -1
- package/dist/runtimeTypes-BK0b8SaG.d.cts +0 -884
- package/dist/runtimeTypes-CoYZkYQq.d.cts +0 -851
- package/dist/runtimeTypes-D-Pm0Uas.d.cts +0 -849
- package/dist/types-Cb5UK7Y6.d.ts +0 -857
|
@@ -1,964 +0,0 @@
|
|
|
1
|
-
import { DependencyContainer, DependencyContainer as Container, Disposable, InjectionToken, 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
|
-
|
|
4
|
-
//#region src/contracts/retryPolicySpec.types.d.ts
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* In-process retry policy for runnable nodes. Serialized configs use the same
|
|
8
|
-
* `kind` discriminator (`JSON.stringify` / persisted workflows).
|
|
9
|
-
*
|
|
10
|
-
* `maxAttempts` is the total number of tries including the first (e.g. 3 means up to 2 delays after failures).
|
|
11
|
-
*/
|
|
12
|
-
type RetryPolicySpec = NoneRetryPolicySpec | FixedRetryPolicySpec | ExponentialRetryPolicySpec;
|
|
13
|
-
interface NoneRetryPolicySpec {
|
|
14
|
-
readonly kind: "none";
|
|
15
|
-
}
|
|
16
|
-
interface FixedRetryPolicySpec {
|
|
17
|
-
readonly kind: "fixed";
|
|
18
|
-
/** Total attempts including the first execution. Must be >= 1. */
|
|
19
|
-
readonly maxAttempts: number;
|
|
20
|
-
readonly delayMs: number;
|
|
21
|
-
}
|
|
22
|
-
interface ExponentialRetryPolicySpec {
|
|
23
|
-
readonly kind: "exponential";
|
|
24
|
-
/** Total attempts including the first execution. Must be >= 1. */
|
|
25
|
-
readonly maxAttempts: number;
|
|
26
|
-
readonly initialDelayMs: number;
|
|
27
|
-
readonly multiplier: number;
|
|
28
|
-
readonly maxDelayMs?: number;
|
|
29
|
-
/** When true, each delay is multiplied by a random factor in [1, 1.2). */
|
|
30
|
-
readonly jitter?: boolean;
|
|
31
|
-
}
|
|
32
|
-
//#endregion
|
|
33
|
-
//#region src/contracts/runTypes.d.ts
|
|
34
|
-
interface RunExecutionOptions {
|
|
35
|
-
localOnly?: boolean;
|
|
36
|
-
webhook?: boolean;
|
|
37
|
-
mode?: "manual" | "debug";
|
|
38
|
-
sourceWorkflowId?: WorkflowId;
|
|
39
|
-
sourceRunId?: RunId;
|
|
40
|
-
derivedFromRunId?: RunId;
|
|
41
|
-
isMutable?: boolean;
|
|
42
|
-
/** Set by the engine for this run: 0 = root, 1 = first child subworkflow, … */
|
|
43
|
-
subworkflowDepth?: number;
|
|
44
|
-
/** Effective cap after engine policy merge (successful node completions per run). */
|
|
45
|
-
maxNodeActivations?: number;
|
|
46
|
-
/** Effective cap after engine policy merge (subworkflow nesting). */
|
|
47
|
-
maxSubworkflowDepth?: number;
|
|
48
|
-
}
|
|
49
|
-
/** Engine-owned counters persisted with the run (worker-safe). */
|
|
50
|
-
interface EngineRunCounters {
|
|
51
|
-
completedNodeActivations: number;
|
|
52
|
-
}
|
|
53
|
-
type RunStopCondition = Readonly<{
|
|
54
|
-
kind: "workflowCompleted";
|
|
55
|
-
}> | Readonly<{
|
|
56
|
-
kind: "nodeCompleted";
|
|
57
|
-
nodeId: NodeId;
|
|
58
|
-
}>;
|
|
59
|
-
interface RunStateResetRequest {
|
|
60
|
-
clearFromNodeId: NodeId;
|
|
61
|
-
}
|
|
62
|
-
interface PersistedRunControlState {
|
|
63
|
-
stopCondition?: RunStopCondition;
|
|
64
|
-
}
|
|
65
|
-
interface PersistedWorkflowSnapshotNode {
|
|
66
|
-
id: NodeId;
|
|
67
|
-
kind: NodeKind;
|
|
68
|
-
name?: string;
|
|
69
|
-
nodeTokenId: PersistedTokenId;
|
|
70
|
-
configTokenId: PersistedTokenId;
|
|
71
|
-
tokenName?: string;
|
|
72
|
-
configTokenName?: string;
|
|
73
|
-
config: unknown;
|
|
74
|
-
}
|
|
75
|
-
interface PersistedWorkflowSnapshot {
|
|
76
|
-
id: WorkflowId;
|
|
77
|
-
name: string;
|
|
78
|
-
nodes: ReadonlyArray<PersistedWorkflowSnapshotNode>;
|
|
79
|
-
edges: ReadonlyArray<Edge>;
|
|
80
|
-
/** When the snapshot was built from a live workflow definition that configured a workflow error handler. */
|
|
81
|
-
workflowErrorHandlerConfigured?: boolean;
|
|
82
|
-
}
|
|
83
|
-
type PinnedNodeOutputsByPort = Readonly<Record<OutputPortKey, Items>>;
|
|
84
|
-
interface PersistedMutableNodeState {
|
|
85
|
-
pinnedOutputsByPort?: PinnedNodeOutputsByPort;
|
|
86
|
-
lastDebugInput?: Items;
|
|
87
|
-
}
|
|
88
|
-
interface PersistedMutableRunState {
|
|
89
|
-
nodesById: Readonly<Record<NodeId, PersistedMutableNodeState>>;
|
|
90
|
-
}
|
|
91
|
-
type NodeInputsByPort = Readonly<Record<InputPortKey, Items>>;
|
|
92
|
-
interface RunQueueEntry {
|
|
93
|
-
nodeId: NodeId;
|
|
94
|
-
input: Items;
|
|
95
|
-
toInput?: InputPortKey;
|
|
96
|
-
batchId?: string;
|
|
97
|
-
from?: Readonly<{
|
|
98
|
-
nodeId: NodeId;
|
|
99
|
-
output: OutputPortKey;
|
|
100
|
-
}>;
|
|
101
|
-
collect?: Readonly<{
|
|
102
|
-
expectedInputs: ReadonlyArray<InputPortKey>;
|
|
103
|
-
received: Readonly<Record<InputPortKey, Items>>;
|
|
104
|
-
}>;
|
|
105
|
-
}
|
|
106
|
-
type NodeExecutionStatus = "pending" | "queued" | "running" | "completed" | "failed" | "skipped";
|
|
107
|
-
interface NodeExecutionError {
|
|
108
|
-
message: string;
|
|
109
|
-
name?: string;
|
|
110
|
-
stack?: string;
|
|
111
|
-
}
|
|
112
|
-
interface NodeExecutionSnapshot {
|
|
113
|
-
runId: RunId;
|
|
114
|
-
workflowId: WorkflowId;
|
|
115
|
-
nodeId: NodeId;
|
|
116
|
-
activationId?: NodeActivationId;
|
|
117
|
-
parent?: ParentExecutionRef;
|
|
118
|
-
status: NodeExecutionStatus;
|
|
119
|
-
usedPinnedOutput?: boolean;
|
|
120
|
-
queuedAt?: string;
|
|
121
|
-
startedAt?: string;
|
|
122
|
-
finishedAt?: string;
|
|
123
|
-
updatedAt: string;
|
|
124
|
-
inputsByPort?: NodeInputsByPort;
|
|
125
|
-
outputs?: NodeOutputs;
|
|
126
|
-
error?: NodeExecutionError;
|
|
127
|
-
}
|
|
128
|
-
interface RunCurrentState {
|
|
129
|
-
outputsByNode: Record<NodeId, NodeOutputs>;
|
|
130
|
-
nodeSnapshotsByNodeId: Record<NodeId, NodeExecutionSnapshot>;
|
|
131
|
-
mutableState?: PersistedMutableRunState;
|
|
132
|
-
}
|
|
133
|
-
interface CurrentStateExecutionRequest {
|
|
134
|
-
workflow: WorkflowDefinition;
|
|
135
|
-
items?: Items;
|
|
136
|
-
parent?: ParentExecutionRef;
|
|
137
|
-
executionOptions?: RunExecutionOptions;
|
|
138
|
-
workflowSnapshot?: PersistedWorkflowSnapshot;
|
|
139
|
-
mutableState?: PersistedMutableRunState;
|
|
140
|
-
currentState?: RunCurrentState;
|
|
141
|
-
stopCondition?: RunStopCondition;
|
|
142
|
-
reset?: RunStateResetRequest;
|
|
143
|
-
}
|
|
144
|
-
interface ExecutionFrontierPlan {
|
|
145
|
-
rootNodeId?: NodeId;
|
|
146
|
-
rootNodeInput?: Items;
|
|
147
|
-
queue: RunQueueEntry[];
|
|
148
|
-
currentState: RunCurrentState;
|
|
149
|
-
stopCondition: RunStopCondition;
|
|
150
|
-
satisfiedNodeIds: ReadonlyArray<NodeId>;
|
|
151
|
-
skippedNodeIds: ReadonlyArray<NodeId>;
|
|
152
|
-
clearedNodeIds: ReadonlyArray<NodeId>;
|
|
153
|
-
preservedPinnedNodeIds: ReadonlyArray<NodeId>;
|
|
154
|
-
}
|
|
155
|
-
type RunStatus = "running" | "pending" | "completed" | "failed";
|
|
156
|
-
interface RunSummary {
|
|
157
|
-
runId: RunId;
|
|
158
|
-
workflowId: WorkflowId;
|
|
159
|
-
startedAt: string;
|
|
160
|
-
status: RunStatus;
|
|
161
|
-
/** ISO timestamp when the run finished (derived from node snapshots or store `updatedAt`); omit while running/pending. */
|
|
162
|
-
finishedAt?: string;
|
|
163
|
-
parent?: ParentExecutionRef;
|
|
164
|
-
executionOptions?: RunExecutionOptions;
|
|
165
|
-
}
|
|
166
|
-
interface PendingNodeExecution {
|
|
167
|
-
runId: RunId;
|
|
168
|
-
activationId: NodeActivationId;
|
|
169
|
-
workflowId: WorkflowId;
|
|
170
|
-
nodeId: NodeId;
|
|
171
|
-
itemsIn: number;
|
|
172
|
-
inputsByPort: NodeInputsByPort;
|
|
173
|
-
receiptId: string;
|
|
174
|
-
queue?: string;
|
|
175
|
-
batchId?: string;
|
|
176
|
-
enqueuedAt: string;
|
|
177
|
-
}
|
|
178
|
-
interface PersistedRunState {
|
|
179
|
-
runId: RunId;
|
|
180
|
-
workflowId: WorkflowId;
|
|
181
|
-
startedAt: string;
|
|
182
|
-
parent?: ParentExecutionRef;
|
|
183
|
-
executionOptions?: RunExecutionOptions;
|
|
184
|
-
control?: PersistedRunControlState;
|
|
185
|
-
workflowSnapshot?: PersistedWorkflowSnapshot;
|
|
186
|
-
mutableState?: PersistedMutableRunState;
|
|
187
|
-
/** Frozen at createRun from workflow + runtime defaults for prune/storage decisions. */
|
|
188
|
-
policySnapshot?: PersistedRunPolicySnapshot;
|
|
189
|
-
/** Successful node completions so far (for activation budget). */
|
|
190
|
-
engineCounters?: EngineRunCounters;
|
|
191
|
-
status: RunStatus;
|
|
192
|
-
pending?: PendingNodeExecution;
|
|
193
|
-
queue: RunQueueEntry[];
|
|
194
|
-
outputsByNode: Record<NodeId, NodeOutputs>;
|
|
195
|
-
nodeSnapshotsByNodeId: Record<NodeId, NodeExecutionSnapshot>;
|
|
196
|
-
}
|
|
197
|
-
interface RunStateStore {
|
|
198
|
-
createRun(args: {
|
|
199
|
-
runId: RunId;
|
|
200
|
-
workflowId: WorkflowId;
|
|
201
|
-
startedAt: string;
|
|
202
|
-
parent?: ParentExecutionRef;
|
|
203
|
-
executionOptions?: RunExecutionOptions;
|
|
204
|
-
control?: PersistedRunControlState;
|
|
205
|
-
workflowSnapshot?: PersistedWorkflowSnapshot;
|
|
206
|
-
mutableState?: PersistedMutableRunState;
|
|
207
|
-
policySnapshot?: PersistedRunPolicySnapshot;
|
|
208
|
-
engineCounters?: EngineRunCounters;
|
|
209
|
-
}): Promise<void>;
|
|
210
|
-
load(runId: RunId): Promise<PersistedRunState | undefined>;
|
|
211
|
-
save(state: PersistedRunState): Promise<void>;
|
|
212
|
-
deleteRun?(runId: RunId): Promise<void>;
|
|
213
|
-
}
|
|
214
|
-
interface RunListingStore {
|
|
215
|
-
listRuns(args?: Readonly<{
|
|
216
|
-
workflowId?: WorkflowId;
|
|
217
|
-
limit?: number;
|
|
218
|
-
}>): Promise<ReadonlyArray<RunSummary>>;
|
|
219
|
-
}
|
|
220
|
-
/** Runs eligible for retention-based pruning (completed or failed, older than cutoff). */
|
|
221
|
-
interface RunPruneCandidate {
|
|
222
|
-
readonly runId: RunId;
|
|
223
|
-
readonly workflowId: WorkflowId;
|
|
224
|
-
readonly startedAt: string;
|
|
225
|
-
readonly finishedAt: string;
|
|
226
|
-
}
|
|
227
|
-
interface RunPruneListingStore {
|
|
228
|
-
listRunsOlderThan(args: Readonly<{
|
|
229
|
-
beforeIso: string;
|
|
230
|
-
limit?: number;
|
|
231
|
-
}>): Promise<ReadonlyArray<RunPruneCandidate>>;
|
|
232
|
-
}
|
|
233
|
-
type RunResult = {
|
|
234
|
-
runId: RunId;
|
|
235
|
-
workflowId: WorkflowId;
|
|
236
|
-
startedAt: string;
|
|
237
|
-
status: "completed";
|
|
238
|
-
outputs: Items;
|
|
239
|
-
} | {
|
|
240
|
-
runId: RunId;
|
|
241
|
-
workflowId: WorkflowId;
|
|
242
|
-
startedAt: string;
|
|
243
|
-
status: "pending";
|
|
244
|
-
pending: PendingNodeExecution;
|
|
245
|
-
} | {
|
|
246
|
-
runId: RunId;
|
|
247
|
-
workflowId: WorkflowId;
|
|
248
|
-
startedAt: string;
|
|
249
|
-
status: "failed";
|
|
250
|
-
error: {
|
|
251
|
-
message: string;
|
|
252
|
-
};
|
|
253
|
-
};
|
|
254
|
-
type WebhookRunResult = Readonly<{
|
|
255
|
-
runId: RunId;
|
|
256
|
-
workflowId: WorkflowId;
|
|
257
|
-
startedAt: string;
|
|
258
|
-
runStatus: "pending" | "completed";
|
|
259
|
-
response: Items;
|
|
260
|
-
}>;
|
|
261
|
-
interface PersistedWorkflowTokenRegistryLike {
|
|
262
|
-
register(type: TypeToken<unknown>, packageId: string, persistedNameOverride?: string): string;
|
|
263
|
-
getTokenId(type: TypeToken<unknown>): string | undefined;
|
|
264
|
-
resolve(tokenId: string): TypeToken<unknown> | undefined;
|
|
265
|
-
registerFromWorkflows?(workflows: ReadonlyArray<WorkflowDefinition>): void;
|
|
266
|
-
}
|
|
267
|
-
interface RunCompletionNotifier {
|
|
268
|
-
resolveRunCompletion(result: RunResult): void;
|
|
269
|
-
resolveWebhookResponse(result: WebhookRunResult): void;
|
|
270
|
-
}
|
|
271
|
-
interface RunEventPublisherDeps {
|
|
272
|
-
eventBus?: RunEventBus;
|
|
273
|
-
}
|
|
274
|
-
//#endregion
|
|
275
|
-
//#region src/contracts/webhookTypes.d.ts
|
|
276
|
-
type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
277
|
-
interface WebhookControlSignal {
|
|
278
|
-
readonly __webhookControl: true;
|
|
279
|
-
readonly kind: "respondNow" | "respondNowAndContinue";
|
|
280
|
-
readonly responseItems: Items;
|
|
281
|
-
readonly continueItems?: Items;
|
|
282
|
-
}
|
|
283
|
-
interface WebhookTriggerRoutingDiagnostics {
|
|
284
|
-
warn(message: string): void;
|
|
285
|
-
}
|
|
286
|
-
interface TriggerInstanceId {
|
|
287
|
-
workflowId: WorkflowId;
|
|
288
|
-
nodeId: NodeId;
|
|
289
|
-
}
|
|
290
|
-
/** Match for an incoming HTTP request: user-defined URL segment + workflow trigger node. */
|
|
291
|
-
interface WebhookInvocationMatch {
|
|
292
|
-
/** Same value as the webhook trigger's configured endpoint key (URL segment under the webhook base path). */
|
|
293
|
-
endpointPath: string;
|
|
294
|
-
workflowId: WorkflowId;
|
|
295
|
-
nodeId: NodeId;
|
|
296
|
-
methods: ReadonlyArray<HttpMethod>;
|
|
297
|
-
parseJsonBody?: (body: unknown) => unknown;
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* Resolves webhook routes from workflow definitions (catalog-backed index, no registration at trigger setup).
|
|
301
|
-
*/
|
|
302
|
-
interface WebhookTriggerMatcher {
|
|
303
|
-
match(args: {
|
|
304
|
-
endpointPath: string;
|
|
305
|
-
method: HttpMethod;
|
|
306
|
-
}): WebhookInvocationMatch | undefined;
|
|
307
|
-
lookup(endpointPath: string): WebhookInvocationMatch | undefined;
|
|
308
|
-
onEngineWorkflowsLoaded?(): void;
|
|
309
|
-
onEngineStopped?(): void;
|
|
310
|
-
}
|
|
311
|
-
//#endregion
|
|
312
|
-
//#region src/events/runEvents.d.ts
|
|
313
|
-
type RunEvent = Readonly<{
|
|
314
|
-
kind: "runCreated";
|
|
315
|
-
runId: RunId;
|
|
316
|
-
workflowId: WorkflowId;
|
|
317
|
-
parent?: ParentExecutionRef;
|
|
318
|
-
at: string;
|
|
319
|
-
}> | Readonly<{
|
|
320
|
-
kind: "runSaved";
|
|
321
|
-
runId: RunId;
|
|
322
|
-
workflowId: WorkflowId;
|
|
323
|
-
parent?: ParentExecutionRef;
|
|
324
|
-
at: string;
|
|
325
|
-
state: PersistedRunState;
|
|
326
|
-
}> | Readonly<{
|
|
327
|
-
kind: "nodeQueued";
|
|
328
|
-
runId: RunId;
|
|
329
|
-
workflowId: WorkflowId;
|
|
330
|
-
parent?: ParentExecutionRef;
|
|
331
|
-
at: string;
|
|
332
|
-
snapshot: NodeExecutionSnapshot;
|
|
333
|
-
}> | Readonly<{
|
|
334
|
-
kind: "nodeStarted";
|
|
335
|
-
runId: RunId;
|
|
336
|
-
workflowId: WorkflowId;
|
|
337
|
-
parent?: ParentExecutionRef;
|
|
338
|
-
at: string;
|
|
339
|
-
snapshot: NodeExecutionSnapshot;
|
|
340
|
-
}> | Readonly<{
|
|
341
|
-
kind: "nodeCompleted";
|
|
342
|
-
runId: RunId;
|
|
343
|
-
workflowId: WorkflowId;
|
|
344
|
-
parent?: ParentExecutionRef;
|
|
345
|
-
at: string;
|
|
346
|
-
snapshot: NodeExecutionSnapshot;
|
|
347
|
-
}> | Readonly<{
|
|
348
|
-
kind: "nodeFailed";
|
|
349
|
-
runId: RunId;
|
|
350
|
-
workflowId: WorkflowId;
|
|
351
|
-
parent?: ParentExecutionRef;
|
|
352
|
-
at: string;
|
|
353
|
-
snapshot: NodeExecutionSnapshot;
|
|
354
|
-
}>;
|
|
355
|
-
interface RunEventSubscription {
|
|
356
|
-
close(): Promise<void>;
|
|
357
|
-
}
|
|
358
|
-
interface RunEventBus {
|
|
359
|
-
publish(event: RunEvent): Promise<void>;
|
|
360
|
-
subscribe(onEvent: (event: RunEvent) => void): Promise<RunEventSubscription>;
|
|
361
|
-
subscribeToWorkflow(workflowId: WorkflowId, onEvent: (event: RunEvent) => void): Promise<RunEventSubscription>;
|
|
362
|
-
}
|
|
363
|
-
//#endregion
|
|
364
|
-
//#region src/contracts/runtimeTypes.d.ts
|
|
365
|
-
interface WorkflowRunnerService {
|
|
366
|
-
runById(args: {
|
|
367
|
-
workflowId: WorkflowId;
|
|
368
|
-
startAt?: NodeId;
|
|
369
|
-
items: Items;
|
|
370
|
-
parent?: ParentExecutionRef;
|
|
371
|
-
}): Promise<RunResult>;
|
|
372
|
-
}
|
|
373
|
-
interface WorkflowRunnerResolver {
|
|
374
|
-
resolve(): WorkflowRunnerService | undefined;
|
|
375
|
-
}
|
|
376
|
-
interface WorkflowRepository {
|
|
377
|
-
list(): ReadonlyArray<WorkflowDefinition>;
|
|
378
|
-
get(workflowId: WorkflowId): WorkflowDefinition | undefined;
|
|
379
|
-
}
|
|
380
|
-
interface WorkflowCatalog extends WorkflowRepository {
|
|
381
|
-
setWorkflows(workflows: ReadonlyArray<WorkflowDefinition>): void;
|
|
382
|
-
}
|
|
383
|
-
type WorkflowRegistry = WorkflowCatalog;
|
|
384
|
-
interface NodeResolver {
|
|
385
|
-
resolve<T>(token: TypeToken<T>): T;
|
|
386
|
-
getContainer(): Container | undefined;
|
|
387
|
-
}
|
|
388
|
-
interface NodeActivationObserver {
|
|
389
|
-
onNodeActivation(stats: NodeActivationStats): void;
|
|
390
|
-
}
|
|
391
|
-
interface NodeExecutionStatePublisher {
|
|
392
|
-
markQueued(args: {
|
|
393
|
-
nodeId: NodeId;
|
|
394
|
-
activationId?: NodeActivationId;
|
|
395
|
-
inputsByPort?: NodeInputsByPort;
|
|
396
|
-
}): Promise<void>;
|
|
397
|
-
markRunning(args: {
|
|
398
|
-
nodeId: NodeId;
|
|
399
|
-
activationId?: NodeActivationId;
|
|
400
|
-
inputsByPort?: NodeInputsByPort;
|
|
401
|
-
}): Promise<void>;
|
|
402
|
-
markCompleted(args: {
|
|
403
|
-
nodeId: NodeId;
|
|
404
|
-
activationId?: NodeActivationId;
|
|
405
|
-
inputsByPort?: NodeInputsByPort;
|
|
406
|
-
outputs?: NodeOutputs;
|
|
407
|
-
}): Promise<void>;
|
|
408
|
-
markFailed(args: {
|
|
409
|
-
nodeId: NodeId;
|
|
410
|
-
activationId?: NodeActivationId;
|
|
411
|
-
inputsByPort?: NodeInputsByPort;
|
|
412
|
-
error: Error;
|
|
413
|
-
}): Promise<void>;
|
|
414
|
-
}
|
|
415
|
-
type BinaryBody = ReadableStream<Uint8Array> | AsyncIterable<Uint8Array> | Uint8Array | ArrayBuffer;
|
|
416
|
-
interface BinaryStorageWriteRequest {
|
|
417
|
-
storageKey: string;
|
|
418
|
-
body: BinaryBody;
|
|
419
|
-
}
|
|
420
|
-
interface BinaryStorageWriteResult {
|
|
421
|
-
storageKey: string;
|
|
422
|
-
size: number;
|
|
423
|
-
sha256?: string;
|
|
424
|
-
}
|
|
425
|
-
interface BinaryStorageReadResult {
|
|
426
|
-
body: ReadableStream<Uint8Array>;
|
|
427
|
-
size?: number;
|
|
428
|
-
}
|
|
429
|
-
interface BinaryStorageStatResult {
|
|
430
|
-
exists: boolean;
|
|
431
|
-
size?: number;
|
|
432
|
-
}
|
|
433
|
-
interface BinaryStorage {
|
|
434
|
-
readonly driverName: string;
|
|
435
|
-
write(args: BinaryStorageWriteRequest): Promise<BinaryStorageWriteResult>;
|
|
436
|
-
openReadStream(storageKey: string): Promise<BinaryStorageReadResult | undefined>;
|
|
437
|
-
stat(storageKey: string): Promise<BinaryStorageStatResult>;
|
|
438
|
-
delete(storageKey: string): Promise<void>;
|
|
439
|
-
}
|
|
440
|
-
interface BinaryAttachmentCreateRequest {
|
|
441
|
-
name: string;
|
|
442
|
-
body: BinaryBody;
|
|
443
|
-
mimeType: string;
|
|
444
|
-
filename?: string;
|
|
445
|
-
previewKind?: BinaryAttachment["previewKind"];
|
|
446
|
-
}
|
|
447
|
-
interface NodeBinaryAttachmentService extends ExecutionBinaryService {
|
|
448
|
-
attach(args: BinaryAttachmentCreateRequest): Promise<BinaryAttachment>;
|
|
449
|
-
withAttachment<TJson>(item: Item<TJson>, name: string, attachment: BinaryAttachment): Item<TJson>;
|
|
450
|
-
}
|
|
451
|
-
interface ExecutionBinaryService {
|
|
452
|
-
forNode(args: {
|
|
453
|
-
nodeId: NodeId;
|
|
454
|
-
activationId: NodeActivationId;
|
|
455
|
-
}): NodeBinaryAttachmentService;
|
|
456
|
-
openReadStream(attachment: BinaryAttachment): Promise<BinaryStorageReadResult | undefined>;
|
|
457
|
-
}
|
|
458
|
-
interface ExecutionContext {
|
|
459
|
-
runId: RunId;
|
|
460
|
-
workflowId: WorkflowId;
|
|
461
|
-
parent?: ParentExecutionRef;
|
|
462
|
-
/** This run's subworkflow depth (0 = root). */
|
|
463
|
-
subworkflowDepth: number;
|
|
464
|
-
/** Effective activation budget cap for this run (after policy merge). */
|
|
465
|
-
engineMaxNodeActivations: number;
|
|
466
|
-
/** Effective subworkflow nesting cap for this run (after policy merge). */
|
|
467
|
-
engineMaxSubworkflowDepth: number;
|
|
468
|
-
now: () => Date;
|
|
469
|
-
data: RunDataSnapshot;
|
|
470
|
-
nodeState?: NodeExecutionStatePublisher;
|
|
471
|
-
binary: ExecutionBinaryService;
|
|
472
|
-
getCredential<TSession = unknown>(slotKey: string): Promise<TSession>;
|
|
473
|
-
}
|
|
474
|
-
interface ExecutionContextFactory {
|
|
475
|
-
create(args: {
|
|
476
|
-
runId: RunId;
|
|
477
|
-
workflowId: WorkflowId;
|
|
478
|
-
parent?: ParentExecutionRef;
|
|
479
|
-
subworkflowDepth: number;
|
|
480
|
-
engineMaxNodeActivations: number;
|
|
481
|
-
engineMaxSubworkflowDepth: number;
|
|
482
|
-
data: RunDataSnapshot;
|
|
483
|
-
nodeState?: NodeExecutionStatePublisher;
|
|
484
|
-
getCredential<TSession = unknown>(slotKey: string): Promise<TSession>;
|
|
485
|
-
}): ExecutionContext;
|
|
486
|
-
}
|
|
487
|
-
interface NodeExecutionContext<TConfig extends NodeConfigBase = NodeConfigBase> extends ExecutionContext {
|
|
488
|
-
nodeId: NodeId;
|
|
489
|
-
activationId: NodeActivationId;
|
|
490
|
-
config: TConfig;
|
|
491
|
-
binary: NodeBinaryAttachmentService;
|
|
492
|
-
}
|
|
493
|
-
interface TriggerSetupContext<TConfig extends TriggerNodeConfig<any, any> = TriggerNodeConfig<any, any>, TSetupState$1 extends JsonValue | undefined = TriggerNodeSetupState<TConfig>> extends ExecutionContext {
|
|
494
|
-
trigger: TriggerInstanceId;
|
|
495
|
-
config: TConfig;
|
|
496
|
-
previousState: TSetupState$1;
|
|
497
|
-
registerCleanup(cleanup: TriggerCleanupHandle): void;
|
|
498
|
-
emit(items: Items): Promise<void>;
|
|
499
|
-
}
|
|
500
|
-
interface TriggerTestItemsContext<TConfig extends TriggerNodeConfig<any, any> = TriggerNodeConfig<any, any>, TSetupState$1 extends JsonValue | undefined = TriggerNodeSetupState<TConfig>> extends ExecutionContext {
|
|
501
|
-
trigger: TriggerInstanceId;
|
|
502
|
-
nodeId: NodeId;
|
|
503
|
-
config: TConfig;
|
|
504
|
-
previousState: TSetupState$1;
|
|
505
|
-
}
|
|
506
|
-
/**
|
|
507
|
-
* Trigger setup state is intentionally engine-owned so future ownership and
|
|
508
|
-
* leader-election metadata can be coordinated centrally rather than pushed into
|
|
509
|
-
* package-level setup code.
|
|
510
|
-
*/
|
|
511
|
-
interface PersistedTriggerSetupState<TState extends JsonValue | undefined = JsonValue | undefined> {
|
|
512
|
-
trigger: TriggerInstanceId;
|
|
513
|
-
updatedAt: string;
|
|
514
|
-
state: TState;
|
|
515
|
-
}
|
|
516
|
-
interface TriggerSetupStateStore {
|
|
517
|
-
load(trigger: TriggerInstanceId): Promise<PersistedTriggerSetupState | undefined>;
|
|
518
|
-
save(state: PersistedTriggerSetupState): Promise<void>;
|
|
519
|
-
delete(trigger: TriggerInstanceId): Promise<void>;
|
|
520
|
-
}
|
|
521
|
-
interface TriggerCleanupHandle {
|
|
522
|
-
stop(): Promise<void> | void;
|
|
523
|
-
}
|
|
524
|
-
interface NodeActivationStats {
|
|
525
|
-
activationId: NodeActivationId;
|
|
526
|
-
nodeId: NodeId;
|
|
527
|
-
itemsIn: number;
|
|
528
|
-
itemsOutByPort: Readonly<Record<OutputPortKey, number>>;
|
|
529
|
-
}
|
|
530
|
-
interface EngineHost {
|
|
531
|
-
credentialSessions: CredentialSessionService;
|
|
532
|
-
workflows?: WorkflowRunnerService;
|
|
533
|
-
onNodeActivation(stats: NodeActivationStats): void;
|
|
534
|
-
}
|
|
535
|
-
interface Node<TConfig extends NodeConfigBase = NodeConfigBase> {
|
|
536
|
-
kind: "node";
|
|
537
|
-
outputPorts: ReadonlyArray<OutputPortKey>;
|
|
538
|
-
execute(items: Items, ctx: NodeExecutionContext<TConfig>): Promise<NodeOutputs>;
|
|
539
|
-
}
|
|
540
|
-
interface MultiInputNode<TConfig extends NodeConfigBase = NodeConfigBase> {
|
|
541
|
-
kind: "node";
|
|
542
|
-
outputPorts: ReadonlyArray<OutputPortKey>;
|
|
543
|
-
executeMulti(inputsByPort: NodeInputsByPort, ctx: NodeExecutionContext<TConfig>): Promise<NodeOutputs>;
|
|
544
|
-
}
|
|
545
|
-
type TriggerSetupStateFor<TConfig extends TriggerNodeConfig<any, any>> = TriggerNodeSetupState<TConfig>;
|
|
546
|
-
interface TriggerNode<TConfig extends TriggerNodeConfig<any, any> = TriggerNodeConfig<any, any>> {
|
|
547
|
-
kind: "trigger";
|
|
548
|
-
outputPorts: readonly ["main"];
|
|
549
|
-
setup(ctx: TriggerSetupContext<TConfig>): Promise<TriggerSetupStateFor<TConfig>>;
|
|
550
|
-
execute(items: Items, ctx: NodeExecutionContext<TConfig>): Promise<NodeOutputs>;
|
|
551
|
-
}
|
|
552
|
-
interface TestableTriggerNode<TConfig extends TriggerNodeConfig<any, any> = TriggerNodeConfig<any, any>> extends TriggerNode<TConfig> {
|
|
553
|
-
getTestItems(ctx: TriggerTestItemsContext<TConfig>): Promise<Items>;
|
|
554
|
-
}
|
|
555
|
-
type ExecutableTriggerNode<TConfig extends TriggerNodeConfig<any, any> = TriggerNodeConfig<any, any>> = TriggerNode<TConfig>;
|
|
556
|
-
interface NodeExecutionRequest {
|
|
557
|
-
runId: RunId;
|
|
558
|
-
activationId: NodeActivationId;
|
|
559
|
-
workflowId: WorkflowId;
|
|
560
|
-
nodeId: NodeId;
|
|
561
|
-
input: Items;
|
|
562
|
-
parent?: ParentExecutionRef;
|
|
563
|
-
queue?: string;
|
|
564
|
-
executionOptions?: RunExecutionOptions;
|
|
565
|
-
}
|
|
566
|
-
interface NodeExecutionScheduler {
|
|
567
|
-
enqueue(request: NodeExecutionRequest): Promise<{
|
|
568
|
-
receiptId: string;
|
|
569
|
-
}>;
|
|
570
|
-
cancel?(receiptId: string): Promise<void>;
|
|
571
|
-
}
|
|
572
|
-
type NodeActivationRequestBase = Readonly<{
|
|
573
|
-
runId: RunId;
|
|
574
|
-
activationId: NodeActivationId;
|
|
575
|
-
workflowId: WorkflowId;
|
|
576
|
-
nodeId: NodeId;
|
|
577
|
-
parent?: ParentExecutionRef;
|
|
578
|
-
executionOptions?: RunExecutionOptions;
|
|
579
|
-
batchId?: string;
|
|
580
|
-
ctx: NodeExecutionContext;
|
|
581
|
-
}>;
|
|
582
|
-
type NodeActivationRequest = (NodeActivationRequestBase & Readonly<{
|
|
583
|
-
kind: "single";
|
|
584
|
-
input: Items;
|
|
585
|
-
}>) | (NodeActivationRequestBase & Readonly<{
|
|
586
|
-
kind: "multi";
|
|
587
|
-
inputsByPort: NodeInputsByPort;
|
|
588
|
-
}>);
|
|
589
|
-
interface NodeActivationReceipt {
|
|
590
|
-
receiptId: string;
|
|
591
|
-
mode?: "local" | "worker";
|
|
592
|
-
queue?: string;
|
|
593
|
-
}
|
|
594
|
-
interface NodeActivationContinuation {
|
|
595
|
-
markNodeRunning(args: {
|
|
596
|
-
runId: RunId;
|
|
597
|
-
activationId: NodeActivationId;
|
|
598
|
-
nodeId: NodeId;
|
|
599
|
-
inputsByPort: NodeInputsByPort;
|
|
600
|
-
}): Promise<void>;
|
|
601
|
-
resumeFromNodeResult(args: {
|
|
602
|
-
runId: RunId;
|
|
603
|
-
activationId: NodeActivationId;
|
|
604
|
-
nodeId: NodeId;
|
|
605
|
-
outputs: NodeOutputs;
|
|
606
|
-
}): Promise<RunResult>;
|
|
607
|
-
resumeFromNodeError(args: {
|
|
608
|
-
runId: RunId;
|
|
609
|
-
activationId: NodeActivationId;
|
|
610
|
-
nodeId: NodeId;
|
|
611
|
-
error: Error;
|
|
612
|
-
}): Promise<RunResult>;
|
|
613
|
-
}
|
|
614
|
-
interface NodeActivationScheduler {
|
|
615
|
-
setContinuation?(continuation: NodeActivationContinuation): void;
|
|
616
|
-
enqueue(request: NodeActivationRequest): Promise<NodeActivationReceipt>;
|
|
617
|
-
notifyPendingStatePersisted?(runId: RunId): void;
|
|
618
|
-
cancel?(receiptId: string): Promise<void>;
|
|
619
|
-
}
|
|
620
|
-
interface WorkflowNodeInstanceFactory {
|
|
621
|
-
createNodes(workflow: WorkflowDefinition): ReadonlyMap<NodeId, unknown>;
|
|
622
|
-
}
|
|
623
|
-
interface WorkflowSnapshotFactory {
|
|
624
|
-
create(workflow: WorkflowDefinition): PersistedWorkflowSnapshot;
|
|
625
|
-
}
|
|
626
|
-
interface WorkflowSnapshotResolver {
|
|
627
|
-
resolve(args: {
|
|
628
|
-
workflowId: WorkflowId;
|
|
629
|
-
workflowSnapshot?: PersistedWorkflowSnapshot;
|
|
630
|
-
}): WorkflowDefinition | undefined;
|
|
631
|
-
}
|
|
632
|
-
interface EngineDeps {
|
|
633
|
-
credentialSessions: CredentialSessionService;
|
|
634
|
-
workflowRunnerResolver: WorkflowRunnerResolver;
|
|
635
|
-
workflowCatalog: WorkflowCatalog;
|
|
636
|
-
workflowRepository: WorkflowRepository;
|
|
637
|
-
nodeResolver: NodeResolver;
|
|
638
|
-
triggerSetupStateStore: TriggerSetupStateStore;
|
|
639
|
-
webhookTriggerMatcher: WebhookTriggerMatcher;
|
|
640
|
-
nodeActivationObserver: NodeActivationObserver;
|
|
641
|
-
runIdFactory: RunIdFactory;
|
|
642
|
-
activationIdFactory: ActivationIdFactory;
|
|
643
|
-
runStore: RunStateStore;
|
|
644
|
-
activationScheduler: NodeActivationScheduler;
|
|
645
|
-
runDataFactory: RunDataFactory;
|
|
646
|
-
executionContextFactory: ExecutionContextFactory;
|
|
647
|
-
eventBus?: RunEventBus;
|
|
648
|
-
tokenRegistry: PersistedWorkflowTokenRegistryLike;
|
|
649
|
-
workflowNodeInstanceFactory: WorkflowNodeInstanceFactory;
|
|
650
|
-
/** Defaults for prune/storage snapshot when workflow omits explicit policy fields. */
|
|
651
|
-
workflowPolicyRuntimeDefaults?: WorkflowPolicyRuntimeDefaults;
|
|
652
|
-
}
|
|
653
|
-
//#endregion
|
|
654
|
-
//#region src/contracts/workflowTypes.d.ts
|
|
655
|
-
type WorkflowId = string;
|
|
656
|
-
type NodeId = string;
|
|
657
|
-
type OutputPortKey = string;
|
|
658
|
-
type InputPortKey = string;
|
|
659
|
-
type PersistedTokenId = string;
|
|
660
|
-
type NodeKind = "trigger" | "node";
|
|
661
|
-
type JsonPrimitive = string | number | boolean | null;
|
|
662
|
-
interface JsonObject {
|
|
663
|
-
readonly [key: string]: JsonValue;
|
|
664
|
-
}
|
|
665
|
-
type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
|
666
|
-
type JsonArray = ReadonlyArray<JsonValue>;
|
|
667
|
-
interface Edge {
|
|
668
|
-
from: {
|
|
669
|
-
nodeId: NodeId;
|
|
670
|
-
output: OutputPortKey;
|
|
671
|
-
};
|
|
672
|
-
to: {
|
|
673
|
-
nodeId: NodeId;
|
|
674
|
-
input: InputPortKey;
|
|
675
|
-
};
|
|
676
|
-
}
|
|
677
|
-
interface WorkflowDefinition {
|
|
678
|
-
id: WorkflowId;
|
|
679
|
-
name: string;
|
|
680
|
-
nodes: NodeDefinition[];
|
|
681
|
-
edges: Edge[];
|
|
682
|
-
/** Directory + file-stem path under a workflow discovery root (for UI grouping only). */
|
|
683
|
-
discoveryPathSegments?: readonly string[];
|
|
684
|
-
/** Retention for run JSON and binaries (seconds). Host/env may supply defaults when omitted. */
|
|
685
|
-
readonly prunePolicy?: WorkflowPrunePolicySpec;
|
|
686
|
-
/** Whether to keep run data after completion. Host/env may supply defaults when omitted. */
|
|
687
|
-
readonly storagePolicy?: WorkflowStoragePolicySpec;
|
|
688
|
-
/** Invoked after a node fails permanently (retries exhausted) and node error handler did not recover. */
|
|
689
|
-
readonly workflowErrorHandler?: WorkflowErrorHandlerSpec;
|
|
690
|
-
}
|
|
691
|
-
interface WorkflowGraph {
|
|
692
|
-
next(nodeId: NodeId, output: OutputPortKey): ReadonlyArray<Readonly<{
|
|
693
|
-
nodeId: NodeId;
|
|
694
|
-
input: InputPortKey;
|
|
695
|
-
}>>;
|
|
696
|
-
}
|
|
697
|
-
interface WorkflowGraphFactory {
|
|
698
|
-
create(def: WorkflowDefinition): WorkflowGraph;
|
|
699
|
-
}
|
|
700
|
-
interface NodeConfigBase {
|
|
701
|
-
readonly kind: NodeKind;
|
|
702
|
-
readonly type: TypeToken<unknown>;
|
|
703
|
-
readonly name?: string;
|
|
704
|
-
readonly id?: NodeId;
|
|
705
|
-
readonly icon?: string;
|
|
706
|
-
readonly execution?: Readonly<{
|
|
707
|
-
hint?: "local" | "worker";
|
|
708
|
-
queue?: string;
|
|
709
|
-
}>;
|
|
710
|
-
/** In-process execute retries (runnable nodes). Triggers typically omit this. */
|
|
711
|
-
readonly retryPolicy?: RetryPolicySpec;
|
|
712
|
-
/** Recover from execute failures; return outputs to continue, or rethrow to fail the node. */
|
|
713
|
-
readonly nodeErrorHandler?: NodeErrorHandlerSpec;
|
|
714
|
-
getCredentialRequirements?(): ReadonlyArray<CredentialRequirement>;
|
|
715
|
-
}
|
|
716
|
-
declare const runnableNodeInputType: unique symbol;
|
|
717
|
-
declare const runnableNodeOutputType: unique symbol;
|
|
718
|
-
declare const triggerNodeOutputType: unique symbol;
|
|
719
|
-
interface RunnableNodeConfig<TInputJson$1 = unknown, TOutputJson$1 = unknown> extends NodeConfigBase {
|
|
720
|
-
readonly kind: "node";
|
|
721
|
-
readonly [runnableNodeInputType]?: TInputJson$1;
|
|
722
|
-
readonly [runnableNodeOutputType]?: TOutputJson$1;
|
|
723
|
-
}
|
|
724
|
-
declare const triggerNodeSetupStateType: unique symbol;
|
|
725
|
-
interface TriggerNodeConfig<TOutputJson$1 = unknown, TSetupState$1 extends JsonValue | undefined = undefined> extends NodeConfigBase {
|
|
726
|
-
readonly kind: "trigger";
|
|
727
|
-
readonly [triggerNodeOutputType]?: TOutputJson$1;
|
|
728
|
-
readonly [triggerNodeSetupStateType]?: TSetupState$1;
|
|
729
|
-
}
|
|
730
|
-
type RunnableNodeInputJson<TConfig extends RunnableNodeConfig<any, any>> = TConfig extends RunnableNodeConfig<infer TInputJson, any> ? TInputJson : never;
|
|
731
|
-
type RunnableNodeOutputJson<TConfig extends RunnableNodeConfig<any, any>> = TConfig extends RunnableNodeConfig<any, infer TOutputJson> ? TOutputJson : never;
|
|
732
|
-
type TriggerNodeOutputJson<TConfig extends TriggerNodeConfig<any, any>> = TConfig extends TriggerNodeConfig<infer TOutputJson, any> ? TOutputJson : never;
|
|
733
|
-
type TriggerNodeSetupState<TConfig extends TriggerNodeConfig<any, any>> = TConfig extends TriggerNodeConfig<any, infer TSetupState> ? TSetupState : never;
|
|
734
|
-
interface NodeDefinition {
|
|
735
|
-
id: NodeId;
|
|
736
|
-
kind: NodeKind;
|
|
737
|
-
type: TypeToken<unknown>;
|
|
738
|
-
name?: string;
|
|
739
|
-
config: NodeConfigBase;
|
|
740
|
-
}
|
|
741
|
-
interface NodeRef {
|
|
742
|
-
id: NodeId;
|
|
743
|
-
kind: NodeKind;
|
|
744
|
-
name?: string;
|
|
745
|
-
}
|
|
746
|
-
type PairedItemRef = Readonly<{
|
|
747
|
-
nodeId: NodeId;
|
|
748
|
-
output: OutputPortKey;
|
|
749
|
-
itemIndex: number;
|
|
750
|
-
}>;
|
|
751
|
-
type BinaryPreviewKind = "image" | "audio" | "video" | "download";
|
|
752
|
-
type BinaryAttachment = Readonly<{
|
|
753
|
-
id: string;
|
|
754
|
-
storageKey: string;
|
|
755
|
-
mimeType: string;
|
|
756
|
-
size: number;
|
|
757
|
-
storageDriver: string;
|
|
758
|
-
previewKind: BinaryPreviewKind;
|
|
759
|
-
createdAt: string;
|
|
760
|
-
runId: RunId;
|
|
761
|
-
workflowId: WorkflowId;
|
|
762
|
-
nodeId: NodeId;
|
|
763
|
-
activationId: NodeActivationId;
|
|
764
|
-
filename?: string;
|
|
765
|
-
sha256?: string;
|
|
766
|
-
}>;
|
|
767
|
-
type ItemBinary = Readonly<Record<string, BinaryAttachment>>;
|
|
768
|
-
type Item<TJson = unknown> = Readonly<{
|
|
769
|
-
json: TJson;
|
|
770
|
-
binary?: ItemBinary;
|
|
771
|
-
meta?: Readonly<Record<string, unknown>>;
|
|
772
|
-
paired?: ReadonlyArray<PairedItemRef>;
|
|
773
|
-
}>;
|
|
774
|
-
type Items<TJson = unknown> = ReadonlyArray<Item<TJson>>;
|
|
775
|
-
type NodeOutputs = Partial<Record<OutputPortKey, Items>>;
|
|
776
|
-
type RunId = string;
|
|
777
|
-
type NodeActivationId = string;
|
|
778
|
-
interface ParentExecutionRef {
|
|
779
|
-
runId: RunId;
|
|
780
|
-
workflowId: WorkflowId;
|
|
781
|
-
nodeId: NodeId;
|
|
782
|
-
/** Subworkflow depth of the **spawning** run (0 = root). Passed when starting a child run. */
|
|
783
|
-
subworkflowDepth?: number;
|
|
784
|
-
/** Effective max node activations from the parent run (propagated to child policy merge). */
|
|
785
|
-
engineMaxNodeActivations?: number;
|
|
786
|
-
/** Effective max subworkflow depth from the parent run (propagated to child policy merge). */
|
|
787
|
-
engineMaxSubworkflowDepth?: number;
|
|
788
|
-
}
|
|
789
|
-
interface RunDataSnapshot {
|
|
790
|
-
getOutputs(nodeId: NodeId): NodeOutputs | undefined;
|
|
791
|
-
getOutputItems(nodeId: NodeId, output?: OutputPortKey): Items;
|
|
792
|
-
getOutputItem(nodeId: NodeId, itemIndex: number, output?: OutputPortKey): Item | undefined;
|
|
793
|
-
}
|
|
794
|
-
interface MutableRunData extends RunDataSnapshot {
|
|
795
|
-
setOutputs(nodeId: NodeId, outputs: NodeOutputs): void;
|
|
796
|
-
dump(): Record<NodeId, NodeOutputs>;
|
|
797
|
-
}
|
|
798
|
-
interface RunDataFactory {
|
|
799
|
-
create(initial?: Record<NodeId, NodeOutputs>): MutableRunData;
|
|
800
|
-
}
|
|
801
|
-
interface RunIdFactory {
|
|
802
|
-
makeRunId(): RunId;
|
|
803
|
-
}
|
|
804
|
-
interface ActivationIdFactory {
|
|
805
|
-
makeActivationId(): NodeActivationId;
|
|
806
|
-
}
|
|
807
|
-
type UpstreamRefPlaceholder = `$${number}`;
|
|
808
|
-
declare const branchRef: (index: number) => UpstreamRefPlaceholder;
|
|
809
|
-
type ExecutionMode = "local" | "worker";
|
|
810
|
-
interface NodeSchedulerDecision {
|
|
811
|
-
mode: ExecutionMode;
|
|
812
|
-
queue?: string;
|
|
813
|
-
}
|
|
814
|
-
interface NodeOffloadPolicy {
|
|
815
|
-
decide(args: {
|
|
816
|
-
workflowId: WorkflowId;
|
|
817
|
-
nodeId: NodeId;
|
|
818
|
-
config: NodeConfigBase;
|
|
819
|
-
}): NodeSchedulerDecision;
|
|
820
|
-
}
|
|
821
|
-
/** Whether to persist run execution data after the workflow finishes. */
|
|
822
|
-
type WorkflowStoragePolicyMode = "ALL" | "SUCCESS" | "ERROR" | "NEVER";
|
|
823
|
-
type WorkflowStoragePolicySpec = WorkflowStoragePolicyMode | TypeToken<WorkflowStoragePolicyResolver>;
|
|
824
|
-
interface WorkflowStoragePolicyResolver {
|
|
825
|
-
shouldPersist(args: WorkflowStoragePolicyDecisionArgs): boolean | Promise<boolean>;
|
|
826
|
-
}
|
|
827
|
-
interface WorkflowStoragePolicyDecisionArgs {
|
|
828
|
-
readonly runId: RunId;
|
|
829
|
-
readonly workflowId: WorkflowId;
|
|
830
|
-
readonly workflow: WorkflowDefinition;
|
|
831
|
-
readonly finalStatus: "completed" | "failed";
|
|
832
|
-
readonly startedAt: string;
|
|
833
|
-
readonly finishedAt: string;
|
|
834
|
-
}
|
|
835
|
-
interface WorkflowPrunePolicySpec {
|
|
836
|
-
readonly runDataRetentionSeconds?: number;
|
|
837
|
-
readonly binaryRetentionSeconds?: number;
|
|
838
|
-
}
|
|
839
|
-
interface PersistedRunPolicySnapshot {
|
|
840
|
-
readonly retentionSeconds?: number;
|
|
841
|
-
readonly binaryRetentionSeconds?: number;
|
|
842
|
-
readonly storagePolicy: WorkflowStoragePolicyMode;
|
|
843
|
-
}
|
|
844
|
-
interface WorkflowErrorHandler {
|
|
845
|
-
onError(ctx: WorkflowErrorContext): void | Promise<void>;
|
|
846
|
-
}
|
|
847
|
-
interface WorkflowErrorContext {
|
|
848
|
-
readonly runId: RunId;
|
|
849
|
-
readonly workflowId: WorkflowId;
|
|
850
|
-
readonly workflow: WorkflowDefinition;
|
|
851
|
-
readonly failedNodeId: NodeId;
|
|
852
|
-
readonly error: Error;
|
|
853
|
-
readonly startedAt: string;
|
|
854
|
-
readonly finishedAt: string;
|
|
855
|
-
}
|
|
856
|
-
type WorkflowErrorHandlerSpec = TypeToken<WorkflowErrorHandler> | WorkflowErrorHandler;
|
|
857
|
-
interface NodeErrorHandlerArgs<TConfig extends NodeConfigBase = NodeConfigBase> {
|
|
858
|
-
readonly kind: "single" | "multi";
|
|
859
|
-
readonly items: Items;
|
|
860
|
-
readonly inputsByPort: Readonly<Record<InputPortKey, Items>> | undefined;
|
|
861
|
-
readonly ctx: NodeExecutionContext<TConfig>;
|
|
862
|
-
readonly error: Error;
|
|
863
|
-
}
|
|
864
|
-
interface NodeErrorHandler {
|
|
865
|
-
handle<TConfig extends NodeConfigBase>(args: NodeErrorHandlerArgs<TConfig>): Promise<NodeOutputs>;
|
|
866
|
-
}
|
|
867
|
-
type NodeErrorHandlerSpec = TypeToken<NodeErrorHandler> | NodeErrorHandler;
|
|
868
|
-
/** Runtime defaults when workflow omits prune/storage fields (typically from host env). */
|
|
869
|
-
interface WorkflowPolicyRuntimeDefaults {
|
|
870
|
-
readonly retentionSeconds?: number;
|
|
871
|
-
readonly binaryRetentionSeconds?: number;
|
|
872
|
-
readonly storagePolicy?: WorkflowStoragePolicyMode;
|
|
873
|
-
}
|
|
874
|
-
//#endregion
|
|
875
|
-
//#region src/contracts/credentialTypes.d.ts
|
|
876
|
-
type CredentialTypeId = string;
|
|
877
|
-
type CredentialInstanceId = string;
|
|
878
|
-
type CredentialMaterialSourceKind = "db" | "env" | "code";
|
|
879
|
-
type CredentialSetupStatus = "draft" | "ready";
|
|
880
|
-
type CredentialHealthStatus = "unknown" | "healthy" | "failing";
|
|
881
|
-
type CredentialFieldSchema = Readonly<{
|
|
882
|
-
key: string;
|
|
883
|
-
label: string;
|
|
884
|
-
type: "string" | "password" | "textarea" | "json" | "boolean";
|
|
885
|
-
required?: true;
|
|
886
|
-
order?: number;
|
|
887
|
-
placeholder?: string;
|
|
888
|
-
helpText?: string;
|
|
889
|
-
/** When set, host resolves this field from process.env at runtime; env wins over stored values. */
|
|
890
|
-
envVarName?: string;
|
|
891
|
-
}>;
|
|
892
|
-
type CredentialRequirement = Readonly<{
|
|
893
|
-
slotKey: string;
|
|
894
|
-
label: string;
|
|
895
|
-
acceptedTypes: ReadonlyArray<CredentialTypeId>;
|
|
896
|
-
optional?: true;
|
|
897
|
-
helpText?: string;
|
|
898
|
-
helpUrl?: string;
|
|
899
|
-
}>;
|
|
900
|
-
type CredentialBindingKey = Readonly<{
|
|
901
|
-
workflowId: WorkflowId;
|
|
902
|
-
nodeId: NodeId;
|
|
903
|
-
slotKey: string;
|
|
904
|
-
}>;
|
|
905
|
-
type CredentialBinding = Readonly<{
|
|
906
|
-
key: CredentialBindingKey;
|
|
907
|
-
instanceId: CredentialInstanceId;
|
|
908
|
-
updatedAt: string;
|
|
909
|
-
}>;
|
|
910
|
-
type CredentialHealth = Readonly<{
|
|
911
|
-
status: CredentialHealthStatus;
|
|
912
|
-
message?: string;
|
|
913
|
-
testedAt?: string;
|
|
914
|
-
expiresAt?: string;
|
|
915
|
-
details?: Readonly<Record<string, unknown>>;
|
|
916
|
-
}>;
|
|
917
|
-
type OAuth2ProviderFromPublicConfig = Readonly<{
|
|
918
|
-
authorizeUrlFieldKey: string;
|
|
919
|
-
tokenUrlFieldKey: string;
|
|
920
|
-
userInfoUrlFieldKey?: string;
|
|
921
|
-
}>;
|
|
922
|
-
type CredentialOAuth2AuthDefinition = Readonly<{
|
|
923
|
-
kind: "oauth2";
|
|
924
|
-
providerId: string;
|
|
925
|
-
scopes: ReadonlyArray<string>;
|
|
926
|
-
clientIdFieldKey?: string;
|
|
927
|
-
clientSecretFieldKey?: string;
|
|
928
|
-
} | {
|
|
929
|
-
kind: "oauth2";
|
|
930
|
-
providerFromPublicConfig: OAuth2ProviderFromPublicConfig;
|
|
931
|
-
scopes: ReadonlyArray<string>;
|
|
932
|
-
clientIdFieldKey?: string;
|
|
933
|
-
clientSecretFieldKey?: string;
|
|
934
|
-
}>;
|
|
935
|
-
type CredentialAuthDefinition = CredentialOAuth2AuthDefinition;
|
|
936
|
-
type CredentialTypeDefinition = Readonly<{
|
|
937
|
-
typeId: CredentialTypeId;
|
|
938
|
-
displayName: string;
|
|
939
|
-
description?: string;
|
|
940
|
-
publicFields?: ReadonlyArray<CredentialFieldSchema>;
|
|
941
|
-
secretFields?: ReadonlyArray<CredentialFieldSchema>;
|
|
942
|
-
supportedSourceKinds?: ReadonlyArray<CredentialMaterialSourceKind>;
|
|
943
|
-
auth?: CredentialAuthDefinition;
|
|
944
|
-
}>;
|
|
945
|
-
interface CredentialSessionService {
|
|
946
|
-
getSession<TSession = unknown>(args: Readonly<{
|
|
947
|
-
workflowId: WorkflowId;
|
|
948
|
-
nodeId: NodeId;
|
|
949
|
-
slotKey: string;
|
|
950
|
-
}>): Promise<TSession>;
|
|
951
|
-
}
|
|
952
|
-
interface CredentialTypeRegistry {
|
|
953
|
-
listTypes(): ReadonlyArray<CredentialTypeDefinition>;
|
|
954
|
-
getType(typeId: CredentialTypeId): CredentialTypeDefinition | undefined;
|
|
955
|
-
}
|
|
956
|
-
declare class CredentialUnboundError extends Error {
|
|
957
|
-
readonly bindingKey: CredentialBindingKey;
|
|
958
|
-
readonly acceptedTypes: ReadonlyArray<CredentialTypeId>;
|
|
959
|
-
constructor(bindingKey: CredentialBindingKey, acceptedTypes?: ReadonlyArray<CredentialTypeId>);
|
|
960
|
-
private static createMessage;
|
|
961
|
-
}
|
|
962
|
-
//#endregion
|
|
963
|
-
export { RunnableNodeConfig as $, WebhookRunResult as $n, TestableTriggerNode as $t, JsonValue as A, PendingNodeExecution as An, BinaryStorageWriteResult as At, NodeOffloadPolicy as B, RunCurrentState as Bn, NodeActivationObserver as Bt, InputPortKey as C, CurrentStateExecutionRequest as Cn, triggerNodeSetupStateType as Ct, JsonArray as D, NodeExecutionSnapshot as Dn, BinaryStorageReadResult as Dt, Items as E, NodeExecutionError as En, BinaryStorage as Et, NodeErrorHandler as F, PersistedWorkflowSnapshot as Fn, ExecutionContext as Ft, PairedItemRef as G, RunPruneListingStore as Gn, NodeActivationStats as Gt, NodeRef as H, RunExecutionOptions as Hn, NodeActivationRequest as Ht, NodeErrorHandlerArgs as I, PersistedWorkflowSnapshotNode as In, ExecutionContextFactory as It, PersistedTokenId as J, RunStateResetRequest as Jn, NodeExecutionRequest as Jt, ParentExecutionRef as K, RunQueueEntry as Kn, NodeBinaryAttachmentService as Kt, NodeErrorHandlerSpec as L, PersistedWorkflowTokenRegistryLike as Ln, MultiInputNode as Lt, NodeActivationId as M, PersistedMutableRunState as Mn, EngineHost as Mt, NodeConfigBase as N, PersistedRunControlState as Nn, ExecutableTriggerNode as Nt, JsonObject as O, NodeExecutionStatus as On, BinaryStorageStatResult as Ot, NodeDefinition as P, PersistedRunState as Pn, ExecutionBinaryService as Pt, RunIdFactory as Q, RunSummary as Qn, PersistedTriggerSetupState as Qt, NodeId as R, PinnedNodeOutputsByPort as Rn, Node as Rt, ExecutionMode as S, WebhookTriggerRoutingDiagnostics as Sn, triggerNodeOutputType as St, ItemBinary as T, ExecutionFrontierPlan as Tn, BinaryBody as Tt, NodeSchedulerDecision as U, RunListingStore as Un, NodeActivationRequestBase as Ut, NodeOutputs as V, RunEventPublisherDeps as Vn, NodeActivationReceipt as Vt, OutputPortKey as W, RunPruneCandidate as Wn, NodeActivationScheduler as Wt, RunDataSnapshot as X, RunStatus as Xn, NodeExecutionStatePublisher as Xt, RunDataFactory as Y, RunStateStore as Yn, NodeExecutionScheduler as Yt, RunId as Z, RunStopCondition as Zn, NodeResolver as Zt, OAuth2ProviderFromPublicConfig as _, HttpMethod as _n, instancePerContainerCachingFactory as _r, WorkflowStoragePolicyResolver as _t, CredentialHealth as a, TriggerTestItemsContext as an, DependencyContainer as ar, UpstreamRefPlaceholder as at, BinaryPreviewKind as b, WebhookInvocationMatch as bn, singleton as br, runnableNodeInputType as bt, CredentialMaterialSourceKind as c, WorkflowRegistry as cn, Lifecycle as cr, WorkflowErrorHandler as ct, CredentialSessionService as d, WorkflowRunnerService as dn, container as dr, WorkflowGraphFactory as dt, TriggerCleanupHandle as en, ExponentialRetryPolicySpec as er, RunnableNodeInputJson as et, CredentialSetupStatus as f, WorkflowSnapshotFactory as fn, delay as fr, WorkflowId as ft, CredentialUnboundError as g, RunEventSubscription as gn, instanceCachingFactory as gr, WorkflowStoragePolicyMode as gt, CredentialTypeRegistry as h, RunEventBus as hn, injectable as hr, WorkflowStoragePolicyDecisionArgs as ht, CredentialFieldSchema as i, TriggerSetupStateStore as in, Container as ir, TriggerNodeSetupState as it, MutableRunData as j, PersistedMutableNodeState as jn, EngineDeps as jt, JsonPrimitive as k, NodeInputsByPort as kn, BinaryStorageWriteRequest as kt, CredentialOAuth2AuthDefinition as l, WorkflowRepository as ln, RegistrationOptions as lr, WorkflowErrorHandlerSpec as lt, CredentialTypeId as m, RunEvent as mn, injectAll as mr, WorkflowPrunePolicySpec as mt, CredentialBinding as n, TriggerSetupContext as nn, NoneRetryPolicySpec as nr, TriggerNodeConfig as nt, CredentialHealthStatus as o, WorkflowCatalog as on, Disposable as or, WorkflowDefinition as ot, CredentialTypeDefinition as p, WorkflowSnapshotResolver as pn, inject as pr, WorkflowPolicyRuntimeDefaults as pt, PersistedRunPolicySnapshot as q, RunResult as qn, NodeExecutionContext as qt, CredentialBindingKey as r, TriggerSetupStateFor as rn, RetryPolicySpec as rr, TriggerNodeOutputJson as rt, CredentialInstanceId as s, WorkflowNodeInstanceFactory as sn, InjectionToken as sr, WorkflowErrorContext as st, CredentialAuthDefinition as t, TriggerNode as tn, FixedRetryPolicySpec as tr, RunnableNodeOutputJson as tt, CredentialRequirement as u, WorkflowRunnerResolver as un, TypeToken as ur, WorkflowGraph as ut, ActivationIdFactory as v, TriggerInstanceId as vn, predicateAwareClassFactory as vr, WorkflowStoragePolicySpec as vt, Item as w, EngineRunCounters as wn, BinaryAttachmentCreateRequest as wt, Edge as x, WebhookTriggerMatcher as xn, runnableNodeOutputType as xt, BinaryAttachment as y, WebhookControlSignal as yn, registry as yr, branchRef as yt, NodeKind as z, RunCompletionNotifier as zn, NodeActivationContinuation as zt };
|
|
964
|
-
//# sourceMappingURL=credentialTypes-gGITj5KL.d.cts.map
|