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