@codemation/core 0.0.5 → 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/dist/{InMemoryLiveWorkflowRepository-DL7LmC9S.d.ts → InMemoryLiveWorkflowRepository-DxoualoC.d.ts} +6 -2
- package/dist/{InMemoryLiveWorkflowRepository-D6eiiXxF.d.cts → InMemoryLiveWorkflowRepository-orY1VsWG.d.cts} +6 -2
- package/dist/{RunIntentService-NKobsfMQ.d.cts → RunIntentService-ByuUYsAL.d.cts} +8 -3
- package/dist/{RunIntentService-BFVbsOcg.js → RunIntentService-CYnn140t.js} +9 -4
- package/dist/RunIntentService-CYnn140t.js.map +1 -0
- package/dist/{RunIntentService-2ivFmNQh.cjs → RunIntentService-DlQH5eZ2.cjs} +9 -4
- package/dist/RunIntentService-DlQH5eZ2.cjs.map +1 -0
- package/dist/{WorkflowSnapshotCodec-DTdWkoW_.d.cts → WorkflowSnapshotCodec-DSEzKyt3.d.cts} +2 -2
- package/dist/bootstrap/index.cjs +133 -4
- package/dist/bootstrap/index.cjs.map +1 -1
- package/dist/bootstrap/index.d.cts +4 -3
- package/dist/bootstrap/index.d.ts +3 -2
- package/dist/bootstrap/index.js +133 -4
- package/dist/bootstrap/index.js.map +1 -1
- package/dist/{index-9g6Pfe9Z.d.ts → index-CTjfVHJh.d.ts} +8 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/testing.d.cts +2 -2
- package/dist/testing.d.ts +1 -1
- package/package.json +6 -1
- package/src/bootstrap/runtime/EngineRuntimeRegistrar.ts +10 -2
- package/src/contracts/runtimeTypes.ts +5 -0
- package/src/execution/NodeActivationRequestComposer.ts +15 -4
- package/src/orchestration/Engine.ts +12 -1
- package/src/orchestration/NodeExecutionRequestHandlerService.ts +179 -0
- package/src/runtime/EngineFactory.ts +13 -0
- 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-D7l8cjdZ.d.cts +0 -1130
- 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.map +0 -1
- package/dist/RunIntentService-B0sUL5q-.js +0 -761
- package/dist/RunIntentService-B0sUL5q-.js.map +0 -1
- 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/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/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-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
package/dist/index-CFGxsYXy.d.ts
DELETED
|
@@ -1,708 +0,0 @@
|
|
|
1
|
-
import { $t as BinaryBody, Ar as RunSummary, Bn as WorkflowRunnerService, Cn as NodeExecutionStatePublisher, Ct as RunDataSnapshot, Dr as RunStateStore, Et as RunnableNodeConfig, Fr as RunEvent, Ft as WorkflowErrorHandler, G as BinaryAttachment, Hn as WorkflowSnapshotResolver, I as CredentialSessionService, In as WorkflowCatalog, Ir as RunEventBus, It as WorkflowErrorHandlerSpec, J as ExecutionMode, Jn as WebhookTriggerResolution, Kn as WebhookInvocationMatch, Ln as WorkflowNodeInstanceFactory, Lr as RunEventSubscription, Mr as WorkflowExecutionListingRepository, N as CredentialRequirement, Nn as TriggerSetupStateRepository, Nr as WorkflowExecutionPruneRepository, Nt as WorkflowDefinition, Pn as TriggerSetupStateStore, Pr as WorkflowExecutionRepository, Q as Items, Rn as WorkflowRepository, Rr as Container, Sn as NodeExecutionScheduler, Sr as RunPruneCandidate, St as RunDataFactory, Tn as NodeResolver, Tr as RunResult, Tt as RunIdFactory, Un as HttpMethod, Ut as WorkflowStoragePolicyDecisionArgs, V as CredentialTypeRegistry, Vt as WorkflowPolicyRuntimeDefaults, W as ActivationIdFactory, Wr as TypeToken, X as Item, Zn as WorkflowActivationPolicy, an as EngineDeps, ar as NodeExecutionSnapshot, at as NodeConfigBase, bn as NodeExecutionContext, br as RunExecutionOptions, bt as PersistedRunPolicySnapshot, cn as ExecutionBinaryService, ct as NodeErrorHandler, dn as LiveWorkflowRepository, dt as NodeId, en as BinaryStorage, fr as PersistedRunState, gn as NodeActivationRequest, gt as NodeSchedulerDecision, hn as NodeActivationReceipt, hr as PersistedWorkflowTokenRegistryLike, in as BinaryStorageWriteResult, it as NodeActivationId, jr as WebhookRunResult, kr as RunStopCondition, ln as ExecutionContext, mn as NodeActivationContinuation, mr as PersistedWorkflowSnapshotNode, mt as NodeOutputs, n as WorkflowSnapshotCodec, nn as BinaryStorageStatResult, nr as EngineRunCounters, pt as NodeOffloadPolicy, qn as WebhookTriggerMatcher, rt as MutableRunData, si as RetryPolicySpec, sr as NodeInputsByPort, st as NodeDefinition, tn as BinaryStorageReadResult, tr as CurrentStateExecutionRequest, un as ExecutionContextFactory, ut as NodeErrorHandlerSpec, vn as NodeActivationScheduler, vr as RunCurrentState, wt as RunId, xn as NodeExecutionRequest, yn as NodeBinaryAttachmentService, yt as ParentExecutionRef, zt as WorkflowId } from "./InMemoryLiveWorkflowRepository-CULNqv96.js";
|
|
2
|
-
import { ZodType, input, output } from "zod";
|
|
3
|
-
|
|
4
|
-
//#region src/orchestration/Engine.d.ts
|
|
5
|
-
interface EngineTriggerRuntime {
|
|
6
|
-
startTriggers(): Promise<void>;
|
|
7
|
-
stop(): Promise<void>;
|
|
8
|
-
syncWorkflowTriggersForActivation(workflowId: WorkflowId): Promise<void>;
|
|
9
|
-
createTriggerTestItems(args: {
|
|
10
|
-
workflow: WorkflowDefinition;
|
|
11
|
-
nodeId: NodeId;
|
|
12
|
-
}): Promise<Items | undefined>;
|
|
13
|
-
}
|
|
14
|
-
interface EngineRunStartService {
|
|
15
|
-
runWorkflow(wf: WorkflowDefinition, startAt: NodeId, items: Items, parent?: ParentExecutionRef, executionOptions?: RunExecutionOptions, persistedStateOverrides?: Readonly<{
|
|
16
|
-
workflowSnapshot?: NonNullable<Awaited<ReturnType<RunStateStore["load"]>>>["workflowSnapshot"];
|
|
17
|
-
mutableState?: NonNullable<Awaited<ReturnType<RunStateStore["load"]>>>["mutableState"];
|
|
18
|
-
}>): Promise<RunResult>;
|
|
19
|
-
runWorkflowFromState(request: CurrentStateExecutionRequest): Promise<RunResult>;
|
|
20
|
-
}
|
|
21
|
-
interface EngineRunContinuationService {
|
|
22
|
-
markNodeRunning(args: {
|
|
23
|
-
runId: RunId;
|
|
24
|
-
activationId: NodeActivationId;
|
|
25
|
-
nodeId: NodeId;
|
|
26
|
-
inputsByPort: NodeInputsByPort;
|
|
27
|
-
}): Promise<void>;
|
|
28
|
-
resumeFromNodeResult(args: {
|
|
29
|
-
runId: RunId;
|
|
30
|
-
activationId: NodeActivationId;
|
|
31
|
-
nodeId: NodeId;
|
|
32
|
-
outputs: NodeOutputs;
|
|
33
|
-
}): Promise<RunResult>;
|
|
34
|
-
resumeFromNodeError(args: {
|
|
35
|
-
runId: RunId;
|
|
36
|
-
activationId: NodeActivationId;
|
|
37
|
-
nodeId: NodeId;
|
|
38
|
-
error: Error;
|
|
39
|
-
}): Promise<RunResult>;
|
|
40
|
-
resumeFromStepResult(args: {
|
|
41
|
-
runId: RunId;
|
|
42
|
-
activationId: NodeActivationId;
|
|
43
|
-
nodeId: NodeId;
|
|
44
|
-
outputs: NodeOutputs;
|
|
45
|
-
}): Promise<RunResult>;
|
|
46
|
-
resumeFromStepError(args: {
|
|
47
|
-
runId: RunId;
|
|
48
|
-
activationId: NodeActivationId;
|
|
49
|
-
nodeId: NodeId;
|
|
50
|
-
error: Error;
|
|
51
|
-
}): Promise<RunResult>;
|
|
52
|
-
waitForCompletion(runId: RunId): Promise<Extract<RunResult, {
|
|
53
|
-
status: "completed" | "failed";
|
|
54
|
-
}>>;
|
|
55
|
-
waitForWebhookResponse(runId: RunId): Promise<WebhookRunResult>;
|
|
56
|
-
}
|
|
57
|
-
interface EngineFacadeDeps {
|
|
58
|
-
workflowCatalog: WorkflowCatalog;
|
|
59
|
-
tokenRegistry: PersistedWorkflowTokenRegistryLike;
|
|
60
|
-
webhookTriggerMatcher: WebhookTriggerMatcher;
|
|
61
|
-
workflowSnapshotResolver: WorkflowSnapshotResolver;
|
|
62
|
-
triggerRuntime: EngineTriggerRuntime;
|
|
63
|
-
runStartService: EngineRunStartService;
|
|
64
|
-
runContinuationService: EngineRunContinuationService;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Runtime facade for orchestration, continuation, triggers, and webhook routing.
|
|
68
|
-
* Prefer {@link import("../intents/RunIntentService").RunIntentService} for host/HTTP invocation boundaries.
|
|
69
|
-
* The class token is exported from `@codemation/core/bootstrap` (not the main `@codemation/core` barrel).
|
|
70
|
-
*/
|
|
71
|
-
declare class Engine implements NodeActivationContinuation {
|
|
72
|
-
private readonly deps;
|
|
73
|
-
constructor(deps: EngineFacadeDeps);
|
|
74
|
-
loadWorkflows(workflows: ReadonlyArray<WorkflowDefinition>): void;
|
|
75
|
-
getTokenRegistry(): EngineFacadeDeps["tokenRegistry"];
|
|
76
|
-
resolveWorkflowSnapshot(args: {
|
|
77
|
-
workflowId: WorkflowId;
|
|
78
|
-
workflowSnapshot?: NonNullable<Awaited<ReturnType<RunStateStore["load"]>>>["workflowSnapshot"];
|
|
79
|
-
}): WorkflowDefinition | undefined;
|
|
80
|
-
startTriggers(): Promise<void>;
|
|
81
|
-
syncWorkflowTriggersForActivation(workflowId: WorkflowId): Promise<void>;
|
|
82
|
-
start(workflows: WorkflowDefinition[]): Promise<void>;
|
|
83
|
-
stop(): Promise<void>;
|
|
84
|
-
resolveWebhookTrigger(args: {
|
|
85
|
-
endpointPath: string;
|
|
86
|
-
method: HttpMethod;
|
|
87
|
-
}): WebhookTriggerResolution;
|
|
88
|
-
createTriggerTestItems(args: {
|
|
89
|
-
workflow: WorkflowDefinition;
|
|
90
|
-
nodeId: NodeId;
|
|
91
|
-
}): Promise<Items | undefined>;
|
|
92
|
-
runWorkflow(wf: WorkflowDefinition, startAt: NodeId, items: Items, parent?: ParentExecutionRef, executionOptions?: RunExecutionOptions, persistedStateOverrides?: Readonly<{
|
|
93
|
-
workflowSnapshot?: NonNullable<Awaited<ReturnType<RunStateStore["load"]>>>["workflowSnapshot"];
|
|
94
|
-
mutableState?: NonNullable<Awaited<ReturnType<RunStateStore["load"]>>>["mutableState"];
|
|
95
|
-
}>): Promise<RunResult>;
|
|
96
|
-
runWorkflowFromState(request: CurrentStateExecutionRequest): Promise<RunResult>;
|
|
97
|
-
markNodeRunning(args: {
|
|
98
|
-
runId: RunId;
|
|
99
|
-
activationId: NodeActivationId;
|
|
100
|
-
nodeId: NodeId;
|
|
101
|
-
inputsByPort: NodeInputsByPort;
|
|
102
|
-
}): Promise<void>;
|
|
103
|
-
resumeFromNodeResult(args: {
|
|
104
|
-
runId: RunId;
|
|
105
|
-
activationId: NodeActivationId;
|
|
106
|
-
nodeId: NodeId;
|
|
107
|
-
outputs: NodeOutputs;
|
|
108
|
-
}): Promise<RunResult>;
|
|
109
|
-
resumeFromNodeError(args: {
|
|
110
|
-
runId: RunId;
|
|
111
|
-
activationId: NodeActivationId;
|
|
112
|
-
nodeId: NodeId;
|
|
113
|
-
error: Error;
|
|
114
|
-
}): Promise<RunResult>;
|
|
115
|
-
resumeFromStepResult(args: {
|
|
116
|
-
runId: RunId;
|
|
117
|
-
activationId: NodeActivationId;
|
|
118
|
-
nodeId: NodeId;
|
|
119
|
-
outputs: NodeOutputs;
|
|
120
|
-
}): Promise<RunResult>;
|
|
121
|
-
resumeFromStepError(args: {
|
|
122
|
-
runId: RunId;
|
|
123
|
-
activationId: NodeActivationId;
|
|
124
|
-
nodeId: NodeId;
|
|
125
|
-
error: Error;
|
|
126
|
-
}): Promise<RunResult>;
|
|
127
|
-
waitForCompletion(runId: RunId): Promise<Extract<RunResult, {
|
|
128
|
-
status: "completed" | "failed";
|
|
129
|
-
}>>;
|
|
130
|
-
waitForWebhookResponse(runId: RunId): Promise<WebhookRunResult>;
|
|
131
|
-
}
|
|
132
|
-
//#endregion
|
|
133
|
-
//#region src/workflowSnapshots/MissingRuntimeFallbacks.d.ts
|
|
134
|
-
declare class MissingRuntimeTriggerToken {}
|
|
135
|
-
declare class MissingRuntimeFallbacks {
|
|
136
|
-
createDefinition(snapshotNode: PersistedWorkflowSnapshotNode): NodeDefinition;
|
|
137
|
-
}
|
|
138
|
-
//#endregion
|
|
139
|
-
//#region src/policies/executionLimits/EngineExecutionLimitsPolicy.d.ts
|
|
140
|
-
interface EngineExecutionLimitsPolicyConfig {
|
|
141
|
-
readonly defaultMaxNodeActivations: number;
|
|
142
|
-
readonly hardMaxNodeActivations: number;
|
|
143
|
-
readonly defaultMaxSubworkflowDepth: number;
|
|
144
|
-
readonly hardMaxSubworkflowDepth: number;
|
|
145
|
-
}
|
|
146
|
-
/** Framework defaults for {@link EngineExecutionLimitsPolicy} (merged with host `runtime.engineExecutionLimits`). */
|
|
147
|
-
declare const ENGINE_EXECUTION_LIMITS_DEFAULTS: EngineExecutionLimitsPolicyConfig;
|
|
148
|
-
/**
|
|
149
|
-
* Resolves per-run execution limits: defaults, hard ceilings, and subworkflow depth for new runs.
|
|
150
|
-
*/
|
|
151
|
-
declare class EngineExecutionLimitsPolicy {
|
|
152
|
-
private readonly config;
|
|
153
|
-
constructor(config?: EngineExecutionLimitsPolicyConfig);
|
|
154
|
-
/**
|
|
155
|
-
* Effective options for a new root run (depth 0): defaults merged with engine ceilings.
|
|
156
|
-
* Replaces a separate one-method factory for root-run bootstrap.
|
|
157
|
-
*/
|
|
158
|
-
createRootExecutionOptions(): RunExecutionOptions;
|
|
159
|
-
mergeExecutionOptionsForNewRun(parent: ParentExecutionRef | undefined, user: RunExecutionOptions | undefined): RunExecutionOptions;
|
|
160
|
-
private capNumber;
|
|
161
|
-
}
|
|
162
|
-
//#endregion
|
|
163
|
-
//#region src/runtime/EngineFactory.d.ts
|
|
164
|
-
/**
|
|
165
|
-
* {@link EngineDeps} plus optional overrides for workflow-snapshot materialization.
|
|
166
|
-
* Overrides keep default construction in this factory while allowing tests or advanced wiring to inject instances.
|
|
167
|
-
*/
|
|
168
|
-
type EngineCompositionDeps = EngineDeps & {
|
|
169
|
-
workflowSnapshotCodec?: WorkflowSnapshotCodec;
|
|
170
|
-
missingRuntimeFallbacks?: MissingRuntimeFallbacks;
|
|
171
|
-
/** When set, used for run-start, trigger, and continuation limit defaults. */
|
|
172
|
-
executionLimitsPolicy?: EngineExecutionLimitsPolicy;
|
|
173
|
-
};
|
|
174
|
-
/**
|
|
175
|
-
* Composes the {@link Engine} graph from {@link EngineCompositionDeps}. Production wiring usually goes through
|
|
176
|
-
* {@link import("../bootstrap/runtime/EngineRuntimeRegistrar").EngineRuntimeRegistrar}; this factory remains for tests and custom composition.
|
|
177
|
-
* Exported from `@codemation/core/bootstrap` (not the main `@codemation/core` barrel).
|
|
178
|
-
*/
|
|
179
|
-
declare class EngineFactory {
|
|
180
|
-
create(deps: EngineCompositionDeps): Engine;
|
|
181
|
-
}
|
|
182
|
-
//#endregion
|
|
183
|
-
//#region src/policies/executionLimits/EngineExecutionLimitsPolicyFactory.d.ts
|
|
184
|
-
/**
|
|
185
|
-
* Builds {@link EngineExecutionLimitsPolicy} by merging {@link ENGINE_EXECUTION_LIMITS_DEFAULTS} with optional `overrides` (e.g. host `runtime.engineExecutionLimits`).
|
|
186
|
-
*/
|
|
187
|
-
declare class EngineExecutionLimitsPolicyFactory {
|
|
188
|
-
create(overrides?: Partial<EngineExecutionLimitsPolicyConfig>): EngineExecutionLimitsPolicy;
|
|
189
|
-
}
|
|
190
|
-
//#endregion
|
|
191
|
-
//#region src/events/NodeEventPublisher.d.ts
|
|
192
|
-
/** Publishes node lifecycle snapshots onto the run {@link RunEventBus}. */
|
|
193
|
-
declare class NodeEventPublisher {
|
|
194
|
-
private readonly eventBus;
|
|
195
|
-
constructor(eventBus: RunEventBus | undefined);
|
|
196
|
-
publish(kind: "nodeQueued" | "nodeStarted" | "nodeCompleted" | "nodeFailed", snapshot: NodeExecutionSnapshot): Promise<void>;
|
|
197
|
-
}
|
|
198
|
-
//#endregion
|
|
199
|
-
//#region src/execution/CredentialResolverFactory.d.ts
|
|
200
|
-
declare class CredentialResolverFactory {
|
|
201
|
-
private readonly credentialSessions;
|
|
202
|
-
constructor(credentialSessions: CredentialSessionService);
|
|
203
|
-
create(workflowId: WorkflowId, nodeId: NodeId, config?: NodeExecutionContext["config"]): NodeExecutionContext["getCredential"];
|
|
204
|
-
}
|
|
205
|
-
//#endregion
|
|
206
|
-
//#region src/execution/asyncSleeper.types.d.ts
|
|
207
|
-
interface AsyncSleeper {
|
|
208
|
-
sleep(ms: number): Promise<void>;
|
|
209
|
-
}
|
|
210
|
-
//#endregion
|
|
211
|
-
//#region src/execution/DefaultAsyncSleeper.d.ts
|
|
212
|
-
declare class DefaultAsyncSleeper implements AsyncSleeper {
|
|
213
|
-
sleep(ms: number): Promise<void>;
|
|
214
|
-
}
|
|
215
|
-
//#endregion
|
|
216
|
-
//#region src/execution/DefaultExecutionContextFactory.d.ts
|
|
217
|
-
declare class DefaultExecutionContextFactory implements ExecutionContextFactory {
|
|
218
|
-
private readonly binaryStorage;
|
|
219
|
-
private readonly currentDate;
|
|
220
|
-
constructor(binaryStorage?: BinaryStorage, currentDate?: () => Date);
|
|
221
|
-
create(args: {
|
|
222
|
-
runId: RunId;
|
|
223
|
-
workflowId: WorkflowId;
|
|
224
|
-
parent?: ParentExecutionRef;
|
|
225
|
-
subworkflowDepth: number;
|
|
226
|
-
engineMaxNodeActivations: number;
|
|
227
|
-
engineMaxSubworkflowDepth: number;
|
|
228
|
-
data: RunDataSnapshot;
|
|
229
|
-
nodeState?: NodeExecutionStatePublisher;
|
|
230
|
-
getCredential<TSession = unknown>(slotKey: string): Promise<TSession>;
|
|
231
|
-
}): ExecutionContext;
|
|
232
|
-
}
|
|
233
|
-
//#endregion
|
|
234
|
-
//#region src/execution/InProcessRetryRunner.d.ts
|
|
235
|
-
declare class InProcessRetryRunner {
|
|
236
|
-
private readonly sleeper;
|
|
237
|
-
constructor(sleeper: AsyncSleeper);
|
|
238
|
-
run<T>(policy: RetryPolicySpec | undefined, work: () => Promise<T>): Promise<T>;
|
|
239
|
-
private static delayAfterFailureMs;
|
|
240
|
-
private static normalizePolicy;
|
|
241
|
-
private static assertPositiveInt;
|
|
242
|
-
private static assertNonNegativeFinite;
|
|
243
|
-
private static assertMultiplier;
|
|
244
|
-
}
|
|
245
|
-
//#endregion
|
|
246
|
-
//#region src/execution/NodeExecutor.d.ts
|
|
247
|
-
declare class NodeExecutor {
|
|
248
|
-
private readonly nodeInstanceFactory;
|
|
249
|
-
private readonly retryRunner;
|
|
250
|
-
constructor(nodeInstanceFactory: WorkflowNodeInstanceFactory);
|
|
251
|
-
execute(request: NodeActivationRequest): Promise<NodeOutputs>;
|
|
252
|
-
private executeMultiInputNode;
|
|
253
|
-
private executeSingleInputNode;
|
|
254
|
-
}
|
|
255
|
-
//#endregion
|
|
256
|
-
//#region src/contracts/Clock.d.ts
|
|
257
|
-
/** Port for time; inject `SystemClock` in production and a fake/test clock in tests. */
|
|
258
|
-
interface Clock {
|
|
259
|
-
now(): Date;
|
|
260
|
-
}
|
|
261
|
-
declare class SystemClock implements Clock {
|
|
262
|
-
now(): Date;
|
|
263
|
-
}
|
|
264
|
-
//#endregion
|
|
265
|
-
//#region src/ai/AiHost.d.ts
|
|
266
|
-
interface AgentCanvasPresentation<TIcon extends string = string> {
|
|
267
|
-
readonly label?: string;
|
|
268
|
-
readonly icon?: TIcon;
|
|
269
|
-
}
|
|
270
|
-
type ZodSchemaAny = ZodType<any, any, any>;
|
|
271
|
-
interface ToolConfig {
|
|
272
|
-
readonly type: TypeToken<Tool<ToolConfig, ZodSchemaAny, ZodSchemaAny>>;
|
|
273
|
-
readonly name: string;
|
|
274
|
-
readonly description?: string;
|
|
275
|
-
readonly presentation?: AgentCanvasPresentation;
|
|
276
|
-
getCredentialRequirements?(): ReadonlyArray<CredentialRequirement>;
|
|
277
|
-
}
|
|
278
|
-
type ToolExecuteArgs<TConfig extends ToolConfig = ToolConfig, TInput = unknown> = Readonly<{
|
|
279
|
-
config: TConfig;
|
|
280
|
-
input: TInput;
|
|
281
|
-
ctx: NodeExecutionContext<any>;
|
|
282
|
-
item: Item;
|
|
283
|
-
itemIndex: number;
|
|
284
|
-
items: Items;
|
|
285
|
-
}>;
|
|
286
|
-
interface Tool<TConfig extends ToolConfig = ToolConfig, TInputSchema extends ZodSchemaAny = ZodSchemaAny, TOutputSchema extends ZodSchemaAny = ZodSchemaAny> {
|
|
287
|
-
readonly defaultDescription: string;
|
|
288
|
-
readonly inputSchema: TInputSchema;
|
|
289
|
-
readonly outputSchema: TOutputSchema;
|
|
290
|
-
execute(args: ToolExecuteArgs<TConfig, input<TInputSchema>>): Promise<output<TOutputSchema>> | output<TOutputSchema>;
|
|
291
|
-
}
|
|
292
|
-
type AgentTool<TInputSchema extends ZodSchemaAny = ZodSchemaAny, TOutputSchema extends ZodSchemaAny = ZodSchemaAny> = Tool<ToolConfig, TInputSchema, TOutputSchema>;
|
|
293
|
-
type AgentToolExecuteArgs<TInput = unknown> = ToolExecuteArgs<ToolConfig, TInput>;
|
|
294
|
-
type AgentToolToken = TypeToken<Tool<ToolConfig, ZodSchemaAny, ZodSchemaAny>>;
|
|
295
|
-
interface AgentToolDefinition {
|
|
296
|
-
readonly name: string;
|
|
297
|
-
readonly description: string;
|
|
298
|
-
readonly inputSchema: ZodSchemaAny;
|
|
299
|
-
}
|
|
300
|
-
type AgentToolCall = Readonly<{
|
|
301
|
-
id?: string;
|
|
302
|
-
name: string;
|
|
303
|
-
input: unknown;
|
|
304
|
-
}>;
|
|
305
|
-
type AgentToolCallPlanner<_TNodeConfig = unknown> = (item: Item, index: number, items: Items, ctx: NodeExecutionContext<any>) => ReadonlyArray<AgentToolCall>;
|
|
306
|
-
interface ChatModelConfig {
|
|
307
|
-
readonly type: TypeToken<ChatModelFactory<ChatModelConfig>>;
|
|
308
|
-
readonly name: string;
|
|
309
|
-
readonly presentation?: AgentCanvasPresentation;
|
|
310
|
-
getCredentialRequirements?(): ReadonlyArray<CredentialRequirement>;
|
|
311
|
-
}
|
|
312
|
-
interface LangChainChatModelLike {
|
|
313
|
-
invoke(input: unknown, options?: unknown): Promise<unknown>;
|
|
314
|
-
bindTools?(tools: ReadonlyArray<unknown>): LangChainChatModelLike;
|
|
315
|
-
}
|
|
316
|
-
interface ChatModelFactory<TConfig extends ChatModelConfig = ChatModelConfig> {
|
|
317
|
-
create(args: Readonly<{
|
|
318
|
-
config: TConfig;
|
|
319
|
-
ctx: NodeExecutionContext<any>;
|
|
320
|
-
}>): Promise<LangChainChatModelLike> | LangChainChatModelLike;
|
|
321
|
-
}
|
|
322
|
-
interface AgentNodeConfig<TInputJson = unknown, TOutputJson = unknown> extends RunnableNodeConfig<TInputJson, TOutputJson> {
|
|
323
|
-
readonly systemMessage: string;
|
|
324
|
-
readonly userMessageFormatter: (item: Item<TInputJson>, index: number, items: Items<TInputJson>, ctx: NodeExecutionContext<any>) => string;
|
|
325
|
-
readonly chatModel: ChatModelConfig;
|
|
326
|
-
readonly tools?: ReadonlyArray<ToolConfig>;
|
|
327
|
-
}
|
|
328
|
-
declare class AgentConfigInspector {
|
|
329
|
-
static isAgentNodeConfig(config: NodeConfigBase | undefined): config is AgentNodeConfig<any, any>;
|
|
330
|
-
}
|
|
331
|
-
type AgentAttachmentRole = "languageModel" | "tool";
|
|
332
|
-
//#endregion
|
|
333
|
-
//#region src/diTokens/index.d.ts
|
|
334
|
-
declare const CoreTokens: {
|
|
335
|
-
readonly PersistedWorkflowTokenRegistry: TypeToken<PersistedWorkflowTokenRegistryLike>;
|
|
336
|
-
readonly CredentialSessionService: TypeToken<CredentialSessionService>;
|
|
337
|
-
readonly CredentialTypeRegistry: TypeToken<CredentialTypeRegistry>;
|
|
338
|
-
readonly WorkflowRunnerService: TypeToken<WorkflowRunnerService>;
|
|
339
|
-
readonly WorkflowCatalog: TypeToken<WorkflowCatalog>;
|
|
340
|
-
readonly LiveWorkflowRepository: TypeToken<LiveWorkflowRepository>;
|
|
341
|
-
readonly WorkflowRepository: TypeToken<WorkflowRepository>;
|
|
342
|
-
readonly ServiceContainer: TypeToken<Container>;
|
|
343
|
-
readonly NodeResolver: TypeToken<NodeResolver>;
|
|
344
|
-
readonly WorkflowNodeInstanceFactory: TypeToken<WorkflowNodeInstanceFactory>;
|
|
345
|
-
readonly RunIdFactory: TypeToken<RunIdFactory>;
|
|
346
|
-
readonly ActivationIdFactory: TypeToken<ActivationIdFactory>;
|
|
347
|
-
readonly RunStateStore: TypeToken<RunStateStore>;
|
|
348
|
-
readonly WorkflowExecutionRepository: TypeToken<WorkflowExecutionRepository>;
|
|
349
|
-
readonly TriggerSetupStateStore: TypeToken<TriggerSetupStateStore>;
|
|
350
|
-
readonly TriggerSetupStateRepository: TypeToken<TriggerSetupStateRepository>;
|
|
351
|
-
readonly NodeActivationScheduler: TypeToken<NodeActivationScheduler>;
|
|
352
|
-
readonly RunDataFactory: TypeToken<RunDataFactory>;
|
|
353
|
-
readonly ExecutionContextFactory: TypeToken<ExecutionContextFactory>;
|
|
354
|
-
readonly RunEventBus: TypeToken<RunEventBus>;
|
|
355
|
-
readonly BinaryStorage: TypeToken<BinaryStorage>;
|
|
356
|
-
readonly WebhookBasePath: TypeToken<string>;
|
|
357
|
-
/** Engine execution limits (defaults + optional host overrides). Consumers may bind a custom instance to override. */
|
|
358
|
-
readonly EngineExecutionLimitsPolicy: TypeToken<EngineExecutionLimitsPolicy>;
|
|
359
|
-
readonly WorkflowActivationPolicy: TypeToken<WorkflowActivationPolicy>;
|
|
360
|
-
};
|
|
361
|
-
//#endregion
|
|
362
|
-
//#region src/events/InMemoryRunEventBusRegistry.d.ts
|
|
363
|
-
declare class InMemoryRunEventBus implements RunEventBus {
|
|
364
|
-
private readonly globalListeners;
|
|
365
|
-
private readonly listenersByWorkflowId;
|
|
366
|
-
publish(event: RunEvent): Promise<void>;
|
|
367
|
-
subscribe(onEvent: (event: RunEvent) => void): Promise<RunEventSubscription>;
|
|
368
|
-
subscribeToWorkflow(workflowId: WorkflowId, onEvent: (event: RunEvent) => void): Promise<RunEventSubscription>;
|
|
369
|
-
}
|
|
370
|
-
//#endregion
|
|
371
|
-
//#region src/events/EventPublishingWorkflowExecutionRepository.d.ts
|
|
372
|
-
declare class EventPublishingWorkflowExecutionRepository implements WorkflowExecutionRepository, WorkflowExecutionListingRepository, WorkflowExecutionPruneRepository {
|
|
373
|
-
private readonly inner;
|
|
374
|
-
private readonly eventBus;
|
|
375
|
-
private readonly now;
|
|
376
|
-
constructor(inner: WorkflowExecutionRepository, eventBus: RunEventBus, now?: () => Date);
|
|
377
|
-
createRun(args: Parameters<WorkflowExecutionRepository["createRun"]>[0]): Promise<void>;
|
|
378
|
-
load(runId: RunId): Promise<PersistedRunState | undefined>;
|
|
379
|
-
save(state: PersistedRunState): Promise<void>;
|
|
380
|
-
deleteRun(runId: RunId): Promise<void>;
|
|
381
|
-
listRuns(args?: Readonly<{
|
|
382
|
-
workflowId?: WorkflowId;
|
|
383
|
-
limit?: number;
|
|
384
|
-
}>): Promise<ReadonlyArray<RunSummary>>;
|
|
385
|
-
listRunsOlderThan(args: Readonly<{
|
|
386
|
-
beforeIso: string;
|
|
387
|
-
limit?: number;
|
|
388
|
-
}>): Promise<ReadonlyArray<RunPruneCandidate>>;
|
|
389
|
-
}
|
|
390
|
-
//#endregion
|
|
391
|
-
//#region src/runtime-types/persistedRuntimeTypeModelRegistry.d.ts
|
|
392
|
-
type DecoratedRuntimeType = Readonly<{
|
|
393
|
-
name?: string;
|
|
394
|
-
}> & object;
|
|
395
|
-
/** Categories of runtime classes that can be discovered and rehydrated from persisted snapshots. */
|
|
396
|
-
type PersistedRuntimeTypeKind = "node" | "tool" | "chatModel";
|
|
397
|
-
interface PersistedRuntimeTypeDecoratorOptions {
|
|
398
|
-
readonly name?: string;
|
|
399
|
-
readonly packageName?: string;
|
|
400
|
-
readonly moduleUrl?: string;
|
|
401
|
-
}
|
|
402
|
-
/** Serialized metadata attached to a decorated runtime type. */
|
|
403
|
-
interface PersistedRuntimeTypeMetadata {
|
|
404
|
-
readonly persistedName: string;
|
|
405
|
-
readonly kind: PersistedRuntimeTypeKind;
|
|
406
|
-
readonly packageName: string;
|
|
407
|
-
readonly sourceHint?: string;
|
|
408
|
-
}
|
|
409
|
-
//#endregion
|
|
410
|
-
//#region src/runtime-types/InjectableRuntimeDecoratorComposerRegistry.d.ts
|
|
411
|
-
/**
|
|
412
|
-
* Applies both tsyringe injectability and persisted runtime metadata in one decorator.
|
|
413
|
-
* This keeps runtime-type decorators thin while still recording enough data for snapshot hydration.
|
|
414
|
-
*/
|
|
415
|
-
declare class InjectableRuntimeDecoratorComposer {
|
|
416
|
-
static compose(kind: PersistedRuntimeTypeKind, options: PersistedRuntimeTypeDecoratorOptions, decoratorFileUrl: string): ClassDecorator;
|
|
417
|
-
}
|
|
418
|
-
//#endregion
|
|
419
|
-
//#region src/runtime-types/PersistedRuntimeTypeMetadataStoreRegistry.d.ts
|
|
420
|
-
/**
|
|
421
|
-
* Defines and retrieves persisted runtime metadata on decorated classes.
|
|
422
|
-
* The metadata is attached as a non-enumerable property so runtime objects stay serializable.
|
|
423
|
-
*/
|
|
424
|
-
declare class PersistedRuntimeTypeMetadataStore {
|
|
425
|
-
static define(target: DecoratedRuntimeType, kind: PersistedRuntimeTypeKind, options: PersistedRuntimeTypeDecoratorOptions, decoratorFileUrl: string): void;
|
|
426
|
-
static get(target: unknown): PersistedRuntimeTypeMetadata | undefined;
|
|
427
|
-
}
|
|
428
|
-
//#endregion
|
|
429
|
-
//#region src/runtime-types/PersistedRuntimeTypeNameResolver.d.ts
|
|
430
|
-
/** Resolves the persisted type name from either an explicit override or the class name itself. */
|
|
431
|
-
declare class PersistedRuntimeTypeNameResolver {
|
|
432
|
-
static resolve(target: DecoratedRuntimeType, override: string | undefined): string;
|
|
433
|
-
}
|
|
434
|
-
//#endregion
|
|
435
|
-
//#region src/runtime-types/StackTraceCallSitePathResolver.d.ts
|
|
436
|
-
declare class StackTraceCallSitePathResolver {
|
|
437
|
-
static resolve(decoratorFileUrl: string): string | undefined;
|
|
438
|
-
private static extractPath;
|
|
439
|
-
}
|
|
440
|
-
//#endregion
|
|
441
|
-
//#region src/runtime-types/runtimeTypeDecorators.types.d.ts
|
|
442
|
-
/** Reads persisted runtime metadata from a decorated class or object. */
|
|
443
|
-
declare function getPersistedRuntimeTypeMetadata(target: unknown): PersistedRuntimeTypeMetadata | undefined;
|
|
444
|
-
/** Marks a class as a persisted node runtime type and an injectable tsyringe service. */
|
|
445
|
-
declare function node(options?: PersistedRuntimeTypeDecoratorOptions): ClassDecorator;
|
|
446
|
-
/** Marks a class as a persisted tool runtime type and an injectable tsyringe service. */
|
|
447
|
-
declare function tool(options?: PersistedRuntimeTypeDecoratorOptions): ClassDecorator;
|
|
448
|
-
/** Marks a class as a persisted chat-model runtime type and an injectable tsyringe service. */
|
|
449
|
-
declare function chatModel(options?: PersistedRuntimeTypeDecoratorOptions): ClassDecorator;
|
|
450
|
-
//#endregion
|
|
451
|
-
//#region src/serialization/ItemsInputNormalizer.d.ts
|
|
452
|
-
/**
|
|
453
|
-
* Normalizes external inputs into the engine's canonical `Items` shape.
|
|
454
|
-
* Used at host and builder boundaries where callers may provide either a raw value,
|
|
455
|
-
* a single item-like object, or an array of item-like values.
|
|
456
|
-
*/
|
|
457
|
-
declare class ItemsInputNormalizer {
|
|
458
|
-
normalize(raw: unknown): Items;
|
|
459
|
-
private normalizeItem;
|
|
460
|
-
private isItem;
|
|
461
|
-
}
|
|
462
|
-
//#endregion
|
|
463
|
-
//#region src/binaries/UnavailableBinaryStorage.d.ts
|
|
464
|
-
declare class UnavailableBinaryStorage implements BinaryStorage {
|
|
465
|
-
readonly driverName = "unavailable";
|
|
466
|
-
write(): Promise<never>;
|
|
467
|
-
openReadStream(): Promise<undefined>;
|
|
468
|
-
stat(): Promise<{
|
|
469
|
-
exists: false;
|
|
470
|
-
}>;
|
|
471
|
-
delete(): Promise<void>;
|
|
472
|
-
}
|
|
473
|
-
//#endregion
|
|
474
|
-
//#region src/binaries/DefaultExecutionBinaryServiceFactory.d.ts
|
|
475
|
-
declare class DefaultExecutionBinaryService implements ExecutionBinaryService {
|
|
476
|
-
private readonly storage;
|
|
477
|
-
private readonly workflowId;
|
|
478
|
-
private readonly runId;
|
|
479
|
-
private readonly now;
|
|
480
|
-
constructor(storage: BinaryStorage, workflowId: WorkflowId, runId: RunId, now: () => Date);
|
|
481
|
-
forNode(args: {
|
|
482
|
-
nodeId: NodeId;
|
|
483
|
-
activationId: NodeActivationId;
|
|
484
|
-
}): NodeBinaryAttachmentService;
|
|
485
|
-
openReadStream(attachment: BinaryAttachment): Promise<BinaryStorageReadResult | undefined>;
|
|
486
|
-
}
|
|
487
|
-
//#endregion
|
|
488
|
-
//#region src/policies/storage/RunPolicySnapshotFactory.d.ts
|
|
489
|
-
declare class RunPolicySnapshotFactory {
|
|
490
|
-
static create(workflow: WorkflowDefinition, defaults?: WorkflowPolicyRuntimeDefaults): PersistedRunPolicySnapshot;
|
|
491
|
-
}
|
|
492
|
-
//#endregion
|
|
493
|
-
//#region src/policies/storage/WorkflowStoragePolicyEvaluator.d.ts
|
|
494
|
-
declare class WorkflowStoragePolicyEvaluator {
|
|
495
|
-
private readonly nodeResolver;
|
|
496
|
-
constructor(nodeResolver: NodeResolver);
|
|
497
|
-
shouldPersist(workflow: WorkflowDefinition, snapshot: PersistedRunPolicySnapshot | undefined, args: WorkflowStoragePolicyDecisionArgs): Promise<boolean>;
|
|
498
|
-
private modeMatches;
|
|
499
|
-
}
|
|
500
|
-
//#endregion
|
|
501
|
-
//#region src/policies/storage/RunTerminalPersistenceCoordinator.d.ts
|
|
502
|
-
declare class RunTerminalPersistenceCoordinator {
|
|
503
|
-
private readonly runRepository;
|
|
504
|
-
private readonly storageEvaluator;
|
|
505
|
-
constructor(runRepository: WorkflowExecutionRepository, storageEvaluator: WorkflowStoragePolicyEvaluator);
|
|
506
|
-
maybeDeleteAfterTerminalState(args: {
|
|
507
|
-
workflow: WorkflowDefinition;
|
|
508
|
-
state: PersistedRunState;
|
|
509
|
-
finalStatus: "completed" | "failed";
|
|
510
|
-
finishedAt: string;
|
|
511
|
-
}): Promise<void>;
|
|
512
|
-
}
|
|
513
|
-
//#endregion
|
|
514
|
-
//#region src/policies/WorkflowPolicyErrorServices.d.ts
|
|
515
|
-
declare class WorkflowPolicyErrorServices {
|
|
516
|
-
private readonly nodeResolver;
|
|
517
|
-
constructor(nodeResolver: NodeResolver);
|
|
518
|
-
resolveNodeErrorHandler(spec: NodeErrorHandlerSpec | undefined): NodeErrorHandler | undefined;
|
|
519
|
-
resolveWorkflowErrorHandler(spec: WorkflowErrorHandlerSpec | undefined): WorkflowErrorHandler | undefined;
|
|
520
|
-
}
|
|
521
|
-
//#endregion
|
|
522
|
-
//#region src/runStorage/InMemoryBinaryStorageRegistry.d.ts
|
|
523
|
-
declare class InMemoryBinaryStorage implements BinaryStorage {
|
|
524
|
-
readonly driverName = "memory";
|
|
525
|
-
private readonly values;
|
|
526
|
-
write(args: {
|
|
527
|
-
storageKey: string;
|
|
528
|
-
body: BinaryBody;
|
|
529
|
-
}): Promise<BinaryStorageWriteResult>;
|
|
530
|
-
openReadStream(storageKey: string): Promise<BinaryStorageReadResult | undefined>;
|
|
531
|
-
stat(storageKey: string): Promise<BinaryStorageStatResult>;
|
|
532
|
-
delete(storageKey: string): Promise<void>;
|
|
533
|
-
}
|
|
534
|
-
//#endregion
|
|
535
|
-
//#region src/runStorage/InMemoryRunDataFactory.d.ts
|
|
536
|
-
declare class InMemoryRunDataFactory implements RunDataFactory {
|
|
537
|
-
create(initial?: Record<NodeId, NodeOutputs>): MutableRunData;
|
|
538
|
-
}
|
|
539
|
-
//#endregion
|
|
540
|
-
//#region src/runStorage/InMemoryWorkflowExecutionRepository.d.ts
|
|
541
|
-
declare class InMemoryWorkflowExecutionRepository implements WorkflowExecutionRepository, WorkflowExecutionListingRepository, WorkflowExecutionPruneRepository {
|
|
542
|
-
private readonly runs;
|
|
543
|
-
createRun(args: {
|
|
544
|
-
runId: RunId;
|
|
545
|
-
workflowId: WorkflowId;
|
|
546
|
-
startedAt: string;
|
|
547
|
-
parent?: ParentExecutionRef;
|
|
548
|
-
executionOptions?: PersistedRunState["executionOptions"];
|
|
549
|
-
control?: PersistedRunState["control"];
|
|
550
|
-
workflowSnapshot?: PersistedRunState["workflowSnapshot"];
|
|
551
|
-
mutableState?: PersistedRunState["mutableState"];
|
|
552
|
-
policySnapshot?: PersistedRunState["policySnapshot"];
|
|
553
|
-
engineCounters?: EngineRunCounters;
|
|
554
|
-
}): Promise<void>;
|
|
555
|
-
load(runId: RunId): Promise<PersistedRunState | undefined>;
|
|
556
|
-
save(state: PersistedRunState): Promise<void>;
|
|
557
|
-
deleteRun(runId: RunId): Promise<void>;
|
|
558
|
-
listRuns(args?: Readonly<{
|
|
559
|
-
workflowId?: WorkflowId;
|
|
560
|
-
limit?: number;
|
|
561
|
-
}>): Promise<ReadonlyArray<RunSummary>>;
|
|
562
|
-
listRunsOlderThan(args: Readonly<{
|
|
563
|
-
beforeIso: string;
|
|
564
|
-
limit?: number;
|
|
565
|
-
}>): Promise<ReadonlyArray<RunPruneCandidate>>;
|
|
566
|
-
}
|
|
567
|
-
//#endregion
|
|
568
|
-
//#region src/runStorage/RunSummaryMapper.d.ts
|
|
569
|
-
/** Maps persisted run state to API run summaries for listings. */
|
|
570
|
-
declare class RunSummaryMapper {
|
|
571
|
-
static fromPersistedState(state: PersistedRunState): RunSummary;
|
|
572
|
-
}
|
|
573
|
-
//#endregion
|
|
574
|
-
//#region src/runtime/EngineWorkflowRunnerService.d.ts
|
|
575
|
-
declare class EngineWorkflowRunnerService {
|
|
576
|
-
private readonly engine;
|
|
577
|
-
private readonly workflowRepository;
|
|
578
|
-
constructor(engine: Engine, workflowRepository: WorkflowRepository);
|
|
579
|
-
runById(args: {
|
|
580
|
-
workflowId: WorkflowId;
|
|
581
|
-
startAt?: NodeId;
|
|
582
|
-
items: Items;
|
|
583
|
-
parent?: ParentExecutionRef;
|
|
584
|
-
}): Promise<RunResult>;
|
|
585
|
-
private findDefaultStartNodeId;
|
|
586
|
-
}
|
|
587
|
-
//#endregion
|
|
588
|
-
//#region src/runtime/RunIntentService.d.ts
|
|
589
|
-
type StartWorkflowIntent = {
|
|
590
|
-
workflow: WorkflowDefinition;
|
|
591
|
-
startAt?: string;
|
|
592
|
-
items: Items;
|
|
593
|
-
parent?: CurrentStateExecutionRequest["parent"];
|
|
594
|
-
executionOptions?: RunExecutionOptions;
|
|
595
|
-
workflowSnapshot?: CurrentStateExecutionRequest["workflowSnapshot"];
|
|
596
|
-
mutableState?: CurrentStateExecutionRequest["mutableState"];
|
|
597
|
-
currentState?: RunCurrentState;
|
|
598
|
-
stopCondition?: RunStopCondition;
|
|
599
|
-
reset?: CurrentStateExecutionRequest["reset"];
|
|
600
|
-
};
|
|
601
|
-
type RerunFromNodeIntent = {
|
|
602
|
-
workflow: WorkflowDefinition;
|
|
603
|
-
nodeId: NodeId;
|
|
604
|
-
currentState: RunCurrentState;
|
|
605
|
-
items?: Items;
|
|
606
|
-
parent?: CurrentStateExecutionRequest["parent"];
|
|
607
|
-
executionOptions?: RunExecutionOptions;
|
|
608
|
-
workflowSnapshot?: CurrentStateExecutionRequest["workflowSnapshot"];
|
|
609
|
-
mutableState?: CurrentStateExecutionRequest["mutableState"];
|
|
610
|
-
};
|
|
611
|
-
type MatchedWebhookRunIntent = {
|
|
612
|
-
endpointPath: string;
|
|
613
|
-
method: HttpMethod;
|
|
614
|
-
requestItem: Items[number];
|
|
615
|
-
};
|
|
616
|
-
type WebhookMatchRunIntent = {
|
|
617
|
-
match: WebhookInvocationMatch;
|
|
618
|
-
requestItem: Items[number];
|
|
619
|
-
};
|
|
620
|
-
declare class RunIntentService {
|
|
621
|
-
private readonly engine;
|
|
622
|
-
private readonly workflowRepository;
|
|
623
|
-
constructor(engine: Engine, workflowRepository: WorkflowRepository);
|
|
624
|
-
startWorkflow(args: StartWorkflowIntent): Promise<RunResult>;
|
|
625
|
-
rerunFromNode(args: RerunFromNodeIntent): Promise<RunResult>;
|
|
626
|
-
resolveWebhookTrigger(args: {
|
|
627
|
-
endpointPath: string;
|
|
628
|
-
method: HttpMethod;
|
|
629
|
-
}): WebhookTriggerResolution;
|
|
630
|
-
runMatchedWebhook(args: MatchedWebhookRunIntent): Promise<WebhookRunResult>;
|
|
631
|
-
runWebhookMatch(args: WebhookMatchRunIntent): Promise<WebhookRunResult>;
|
|
632
|
-
/**
|
|
633
|
-
* Webhook-triggered runs always force inline execution first.
|
|
634
|
-
* This is the highest-precedence scheduler override: it wins over node hints and container defaults.
|
|
635
|
-
*/
|
|
636
|
-
private createWebhookExecutionOptions;
|
|
637
|
-
}
|
|
638
|
-
//#endregion
|
|
639
|
-
//#region src/scheduler/ConfigDrivenOffloadPolicy.d.ts
|
|
640
|
-
declare class ConfigDrivenOffloadPolicy implements NodeOffloadPolicy {
|
|
641
|
-
private readonly defaultMode;
|
|
642
|
-
constructor(defaultMode?: ExecutionMode);
|
|
643
|
-
decide(args: {
|
|
644
|
-
workflowId: WorkflowId;
|
|
645
|
-
nodeId: NodeId;
|
|
646
|
-
config: NodeConfigBase;
|
|
647
|
-
}): NodeSchedulerDecision;
|
|
648
|
-
}
|
|
649
|
-
//#endregion
|
|
650
|
-
//#region src/scheduler/InlineDrivingScheduler.d.ts
|
|
651
|
-
declare class InlineDrivingScheduler implements NodeActivationScheduler {
|
|
652
|
-
private readonly nodeExecutor;
|
|
653
|
-
private continuation;
|
|
654
|
-
private readonly drainingRuns;
|
|
655
|
-
private readonly queuesByRunId;
|
|
656
|
-
private readonly scheduledRuns;
|
|
657
|
-
private seq;
|
|
658
|
-
constructor(nodeExecutor: NodeExecutor);
|
|
659
|
-
setContinuation(continuation: NodeActivationContinuation): void;
|
|
660
|
-
enqueue(request: NodeActivationRequest): Promise<NodeActivationReceipt>;
|
|
661
|
-
notifyPendingStatePersisted(runId: RunId): void;
|
|
662
|
-
private drainRun;
|
|
663
|
-
private scheduleDrain;
|
|
664
|
-
private resumeAfterExecutionResult;
|
|
665
|
-
private resumeAfterExecutionError;
|
|
666
|
-
private asError;
|
|
667
|
-
private rethrowUnlessIgnorableContinuationError;
|
|
668
|
-
private isIgnorableContinuationError;
|
|
669
|
-
}
|
|
670
|
-
//#endregion
|
|
671
|
-
//#region src/scheduler/DefaultDrivingScheduler.d.ts
|
|
672
|
-
declare class DefaultDrivingScheduler implements NodeActivationScheduler {
|
|
673
|
-
private readonly offloadPolicy;
|
|
674
|
-
private readonly workerScheduler;
|
|
675
|
-
private readonly inline;
|
|
676
|
-
constructor(offloadPolicy: NodeOffloadPolicy, workerScheduler: NodeExecutionScheduler, inline: InlineDrivingScheduler);
|
|
677
|
-
setContinuation(continuation: NodeActivationContinuation): void;
|
|
678
|
-
enqueue(request: NodeActivationRequest): Promise<NodeActivationReceipt>;
|
|
679
|
-
notifyPendingStatePersisted(runId: string): void;
|
|
680
|
-
/**
|
|
681
|
-
* Scheduler precedence is explicit:
|
|
682
|
-
* 1. run-intent override (`executionOptions.localOnly`)
|
|
683
|
-
* 2. node-level execution hint / queue policy
|
|
684
|
-
* 3. container-default scheduler policy fallback
|
|
685
|
-
*/
|
|
686
|
-
private selectScheduler;
|
|
687
|
-
private hasNodeSchedulingPreference;
|
|
688
|
-
private enqueueInline;
|
|
689
|
-
}
|
|
690
|
-
//#endregion
|
|
691
|
-
//#region src/scheduler/HintOnlyOffloadPolicy.d.ts
|
|
692
|
-
declare class HintOnlyOffloadPolicy implements NodeOffloadPolicy {
|
|
693
|
-
decide(args: {
|
|
694
|
-
workflowId: WorkflowId;
|
|
695
|
-
nodeId: NodeId;
|
|
696
|
-
config: NodeConfigBase;
|
|
697
|
-
}): NodeSchedulerDecision;
|
|
698
|
-
}
|
|
699
|
-
//#endregion
|
|
700
|
-
//#region src/scheduler/LocalOnlyScheduler.d.ts
|
|
701
|
-
declare class LocalOnlyScheduler implements NodeExecutionScheduler {
|
|
702
|
-
enqueue(_request: NodeExecutionRequest): Promise<{
|
|
703
|
-
receiptId: string;
|
|
704
|
-
}>;
|
|
705
|
-
}
|
|
706
|
-
//#endregion
|
|
707
|
-
export { InProcessRetryRunner as $, EventPublishingWorkflowExecutionRepository as A, AgentToolDefinition as B, StackTraceCallSitePathResolver as C, PersistedRuntimeTypeDecoratorOptions as D, InjectableRuntimeDecoratorComposer as E, AgentConfigInspector as F, LangChainChatModelLike as G, AgentToolToken as H, AgentNodeConfig as I, ToolExecuteArgs as J, Tool as K, AgentTool as L, CoreTokens as M, AgentAttachmentRole as N, PersistedRuntimeTypeKind as O, AgentCanvasPresentation as P, NodeExecutor as Q, AgentToolCall as R, tool as S, PersistedRuntimeTypeMetadataStore as T, ChatModelConfig as U, AgentToolExecuteArgs as V, ChatModelFactory as W, Clock as X, ZodSchemaAny as Y, SystemClock as Z, UnavailableBinaryStorage as _, ConfigDrivenOffloadPolicy as a, EngineExecutionLimitsPolicyFactory as at, getPersistedRuntimeTypeMetadata as b, RunSummaryMapper as c, ENGINE_EXECUTION_LIMITS_DEFAULTS as ct, InMemoryBinaryStorage as d, MissingRuntimeTriggerToken as dt, DefaultExecutionContextFactory as et, WorkflowPolicyErrorServices as f, Engine as ft, DefaultExecutionBinaryService as g, RunPolicySnapshotFactory as h, InlineDrivingScheduler as i, NodeEventPublisher as it, InMemoryRunEventBus as j, PersistedRuntimeTypeMetadata as k, InMemoryWorkflowExecutionRepository as l, EngineExecutionLimitsPolicy as lt, WorkflowStoragePolicyEvaluator as m, HintOnlyOffloadPolicy as n, AsyncSleeper as nt, RunIntentService as o, EngineCompositionDeps as ot, RunTerminalPersistenceCoordinator as p, ToolConfig as q, DefaultDrivingScheduler as r, CredentialResolverFactory as rt, EngineWorkflowRunnerService as s, EngineFactory as st, LocalOnlyScheduler as t, DefaultAsyncSleeper as tt, InMemoryRunDataFactory as u, EngineExecutionLimitsPolicyConfig as ut, ItemsInputNormalizer as v, PersistedRuntimeTypeNameResolver as w, node as x, chatModel as y, AgentToolCallPlanner as z };
|
|
708
|
-
//# sourceMappingURL=index-CFGxsYXy.d.ts.map
|