@codemation/core 0.0.19 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/EngineRuntimeRegistration.types-0sgV2XL2.d.ts +42 -0
- package/dist/EngineWorkflowRunnerService-Dx7bJsJR.d.cts +73 -0
- package/dist/InMemoryRunDataFactory-qIYQEar7.d.cts +94 -0
- package/dist/{InMemoryLiveWorkflowRepository-DxoualoC.d.ts → RunIntentService-BCvGdOSY.d.ts} +438 -9
- package/dist/{RunIntentService-C1nu_YwM.js → RunIntentService-BFA48UpH.js} +252 -67
- package/dist/RunIntentService-BFA48UpH.js.map +1 -0
- package/dist/{InMemoryLiveWorkflowRepository-orY1VsWG.d.cts → RunIntentService-CV8izV8t.d.cts} +214 -7
- package/dist/{RunIntentService-ZkjpY7MS.cjs → RunIntentService-DcxXf_AM.cjs} +262 -65
- package/dist/RunIntentService-DcxXf_AM.cjs.map +1 -0
- package/dist/bootstrap/index.cjs +14 -1135
- package/dist/bootstrap/index.d.cts +7 -60
- package/dist/bootstrap/index.d.ts +4 -40
- package/dist/bootstrap/index.js +3 -1122
- package/dist/bootstrap-D67Sf2BF.js +1136 -0
- package/dist/bootstrap-D67Sf2BF.js.map +1 -0
- package/dist/bootstrap-DoQHAEQJ.cjs +1203 -0
- package/dist/bootstrap-DoQHAEQJ.cjs.map +1 -0
- package/dist/{index-BIewO9-9.d.ts → index-CueSzHsf.d.ts} +37 -260
- package/dist/index.cjs +99 -223
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +201 -6
- package/dist/index.d.ts +3 -3
- package/dist/index.js +93 -218
- package/dist/index.js.map +1 -1
- package/dist/testing.cjs +329 -3
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +181 -4
- package/dist/testing.d.ts +181 -3
- package/dist/testing.js +319 -2
- package/dist/testing.js.map +1 -1
- package/dist/workflowActivationPolicy-B8HzTk3o.js +201 -0
- package/dist/workflowActivationPolicy-B8HzTk3o.js.map +1 -0
- package/dist/workflowActivationPolicy-BzyzXLa_.cjs +231 -0
- package/dist/workflowActivationPolicy-BzyzXLa_.cjs.map +1 -0
- package/package.json +1 -1
- package/src/ai/AgentConnectionNodeCollector.ts +99 -0
- package/src/ai/AgentToolFactory.ts +38 -2
- package/src/ai/AiHost.ts +1 -1
- package/src/authoring/defineNode.types.ts +6 -0
- package/src/browser.ts +11 -0
- package/src/contracts/executionPersistenceContracts.ts +186 -0
- package/src/contracts/index.ts +1 -0
- package/src/contracts/runFinishedAtFactory.ts +5 -2
- package/src/contracts/runTypes.ts +10 -0
- package/src/contracts/runtimeTypes.ts +6 -2
- package/src/contracts/workflowTypes.ts +3 -2
- package/src/events/EventPublishingWorkflowExecutionRepository.ts +5 -0
- package/src/execution/ActivationEnqueueService.ts +8 -8
- package/src/execution/PersistedRunStateTerminalBuilder.ts +3 -0
- package/src/index.ts +6 -0
- package/src/orchestration/NodeExecutionRequestHandlerService.ts +11 -6
- package/src/orchestration/RunContinuationService.ts +94 -24
- package/src/runStorage/InMemoryWorkflowExecutionRepository.ts +14 -1
- package/src/scheduler/DefaultDrivingScheduler.ts +21 -11
- package/src/scheduler/InlineDrivingScheduler.ts +17 -21
- package/src/testing/CapturingScheduler.ts +15 -0
- package/src/testing/EngineTestKitRunIdFactory.ts +24 -0
- package/src/testing/InMemoryTriggerSetupStateRepository.ts +21 -0
- package/src/testing/PrefixedSequentialIdGenerator.ts +17 -0
- package/src/testing/RegistrarEngineTestKit.types.ts +76 -0
- package/src/testing/RegistrarEngineTestKitFactory.ts +154 -0
- package/src/testing/SubWorkflowRunnerTestNode.ts +83 -0
- package/src/testing/WorkflowTestHarnessManualTrigger.ts +39 -0
- package/src/testing/WorkflowTestKit.types.ts +9 -0
- package/src/testing/WorkflowTestKitBuilder.ts +77 -0
- package/src/testing/WorkflowTestKitNodeRegistrationContextFactory.ts +17 -0
- package/src/testing/WorkflowTestKitRunNodeWorkflowFactory.ts +26 -0
- package/src/testing.ts +19 -0
- package/src/types/index.ts +1 -0
- package/src/workflow/definition/ConnectionNodeIdFactory.ts +28 -0
- package/dist/InMemoryLiveWorkflowRepository-BTzHpQ6e.cjs +0 -151
- package/dist/InMemoryLiveWorkflowRepository-BTzHpQ6e.cjs.map +0 -1
- package/dist/InMemoryLiveWorkflowRepository-BoLNnVLg.js +0 -139
- package/dist/InMemoryLiveWorkflowRepository-BoLNnVLg.js.map +0 -1
- package/dist/RunIntentService-C1nu_YwM.js.map +0 -1
- package/dist/RunIntentService-DjbxzBBP.d.cts +0 -288
- package/dist/RunIntentService-ZkjpY7MS.cjs.map +0 -1
- package/dist/WorkflowSnapshotCodec-DSEzKyt3.d.cts +0 -22
- package/dist/bootstrap/index.cjs.map +0 -1
- package/dist/bootstrap/index.js.map +0 -1
|
@@ -1,140 +1,6 @@
|
|
|
1
|
-
import { $
|
|
1
|
+
import { $t as RunnableNodeInputJson, An as BinaryStorageWriteResult, At as NodeActivationId, Bn as NodeActivationContinuation, Bt as NodeOutputs, Cr as WorkflowActivationPolicy, Di as RunEventBus, Dn as BinaryStorageReadResult, Ei as RunEvent, En as BinaryStorage, Fi as RetryPolicySpec, Fn as ExecutionContext, Gn as NodeBinaryAttachmentService, Gt as ParentExecutionRef, Hn as NodeActivationRequest, Ht as NodeSchedulerDecision, In as ExecutionContextFactory, Jr as RunPruneCandidate, Jt as RunDataFactory, K as AnyCredentialType, Kn as NodeExecutionContext, Lt as NodeId, Mt as NodeConnectionName, Nt as NodeDefinition, Oi as RunEventSubscription, On as BinaryStorageStatResult, Or as EngineRunCounters, Ot as JsonValue, Pn as ExecutionBinaryService, Qn as NodeResolver, Qt as RunnableNodeConfig, Rr as PersistedRunSchedulingState, St as Item, Tn as BinaryBody, Vr as PersistedWorkflowSnapshotNode, Wn as NodeActivationScheduler, X as CredentialFieldSchema, Xn as NodeExecutionStatePublisher, Xt as RunId, Yn as NodeExecutionScheduler, Yt as RunDataSnapshot, Z as CredentialHealth, _t as BinaryAttachment, an as WorkflowDefinition, at as CredentialRequirement, bt as ExecutionMode, ct as CredentialSessionService, di as TypeToken, dn as WorkflowId, dt as CredentialTypeDefinition, ei as RunSummary, er as PreparedNodeActivationDispatch, ft as CredentialTypeId, hr as HttpMethod, ii as WorkflowExecutionRepository, jn as EngineDeps, jr as NodeExecutionSnapshot, jt as NodeConfigBase, kt as MutableRunData, l as WorkflowSnapshotCodec, lr as WorkflowNodeInstanceFactory, ni as WorkflowExecutionListingRepository, nt as CredentialJsonRecord, qn as NodeExecutionRequest, ri as WorkflowExecutionPruneRepository, st as CredentialSessionFactoryArgs, u as Engine, ur as WorkflowRepository, ut as CredentialType, vr as WebhookInvocationMatch, wi as EngineExecutionLimitsPolicy, wt as Items, xr as WebhookTriggerRoutingDiagnostics, yr as WebhookTriggerMatcher, zr as PersistedRunState, zt as NodeOffloadPolicy } from "./RunIntentService-BCvGdOSY.js";
|
|
2
2
|
import { ZodType, input, output, z } from "zod";
|
|
3
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<WorkflowExecutionRepository["load"]>>>["workflowSnapshot"];
|
|
17
|
-
mutableState?: NonNullable<Awaited<ReturnType<WorkflowExecutionRepository["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 EngineNodeExecutionRequestHandler {
|
|
58
|
-
handleNodeExecutionRequest(request: NodeExecutionRequest): Promise<void>;
|
|
59
|
-
}
|
|
60
|
-
interface EngineFacadeDeps {
|
|
61
|
-
liveWorkflowRepository: LiveWorkflowRepository;
|
|
62
|
-
tokenRegistry: PersistedWorkflowTokenRegistryLike;
|
|
63
|
-
webhookTriggerMatcher: WebhookTriggerMatcher;
|
|
64
|
-
workflowSnapshotResolver: WorkflowSnapshotResolver;
|
|
65
|
-
triggerRuntime: EngineTriggerRuntime;
|
|
66
|
-
runStartService: EngineRunStartService;
|
|
67
|
-
runContinuationService: EngineRunContinuationService;
|
|
68
|
-
nodeExecutionRequestHandler: EngineNodeExecutionRequestHandler;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Runtime facade for orchestration, continuation, triggers, and webhook routing.
|
|
72
|
-
* Prefer {@link import("../intents/RunIntentService").RunIntentService} for host/HTTP invocation boundaries.
|
|
73
|
-
* The class token is exported from `@codemation/core/bootstrap` (not the main `@codemation/core` barrel).
|
|
74
|
-
*/
|
|
75
|
-
declare class Engine implements NodeActivationContinuation, NodeExecutionRequestHandler {
|
|
76
|
-
private readonly deps;
|
|
77
|
-
constructor(deps: EngineFacadeDeps);
|
|
78
|
-
loadWorkflows(workflows: ReadonlyArray<WorkflowDefinition>): void;
|
|
79
|
-
getTokenRegistry(): EngineFacadeDeps["tokenRegistry"];
|
|
80
|
-
resolveWorkflowSnapshot(args: {
|
|
81
|
-
workflowId: WorkflowId;
|
|
82
|
-
workflowSnapshot?: NonNullable<Awaited<ReturnType<WorkflowExecutionRepository["load"]>>>["workflowSnapshot"];
|
|
83
|
-
}): WorkflowDefinition | undefined;
|
|
84
|
-
startTriggers(): Promise<void>;
|
|
85
|
-
syncWorkflowTriggersForActivation(workflowId: WorkflowId): Promise<void>;
|
|
86
|
-
start(workflows: WorkflowDefinition[]): Promise<void>;
|
|
87
|
-
stop(): Promise<void>;
|
|
88
|
-
resolveWebhookTrigger(args: {
|
|
89
|
-
endpointPath: string;
|
|
90
|
-
method: HttpMethod;
|
|
91
|
-
}): WebhookTriggerResolution;
|
|
92
|
-
createTriggerTestItems(args: {
|
|
93
|
-
workflow: WorkflowDefinition;
|
|
94
|
-
nodeId: NodeId;
|
|
95
|
-
}): Promise<Items | undefined>;
|
|
96
|
-
runWorkflow(wf: WorkflowDefinition, startAt: NodeId, items: Items, parent?: ParentExecutionRef, executionOptions?: RunExecutionOptions, persistedStateOverrides?: Readonly<{
|
|
97
|
-
workflowSnapshot?: NonNullable<Awaited<ReturnType<WorkflowExecutionRepository["load"]>>>["workflowSnapshot"];
|
|
98
|
-
mutableState?: NonNullable<Awaited<ReturnType<WorkflowExecutionRepository["load"]>>>["mutableState"];
|
|
99
|
-
}>): Promise<RunResult>;
|
|
100
|
-
runWorkflowFromState(request: CurrentStateExecutionRequest): Promise<RunResult>;
|
|
101
|
-
markNodeRunning(args: {
|
|
102
|
-
runId: RunId;
|
|
103
|
-
activationId: NodeActivationId;
|
|
104
|
-
nodeId: NodeId;
|
|
105
|
-
inputsByPort: NodeInputsByPort;
|
|
106
|
-
}): Promise<void>;
|
|
107
|
-
resumeFromNodeResult(args: {
|
|
108
|
-
runId: RunId;
|
|
109
|
-
activationId: NodeActivationId;
|
|
110
|
-
nodeId: NodeId;
|
|
111
|
-
outputs: NodeOutputs;
|
|
112
|
-
}): Promise<RunResult>;
|
|
113
|
-
resumeFromNodeError(args: {
|
|
114
|
-
runId: RunId;
|
|
115
|
-
activationId: NodeActivationId;
|
|
116
|
-
nodeId: NodeId;
|
|
117
|
-
error: Error;
|
|
118
|
-
}): Promise<RunResult>;
|
|
119
|
-
resumeFromStepResult(args: {
|
|
120
|
-
runId: RunId;
|
|
121
|
-
activationId: NodeActivationId;
|
|
122
|
-
nodeId: NodeId;
|
|
123
|
-
outputs: NodeOutputs;
|
|
124
|
-
}): Promise<RunResult>;
|
|
125
|
-
resumeFromStepError(args: {
|
|
126
|
-
runId: RunId;
|
|
127
|
-
activationId: NodeActivationId;
|
|
128
|
-
nodeId: NodeId;
|
|
129
|
-
error: Error;
|
|
130
|
-
}): Promise<RunResult>;
|
|
131
|
-
waitForCompletion(runId: RunId): Promise<Extract<RunResult, {
|
|
132
|
-
status: "completed" | "failed";
|
|
133
|
-
}>>;
|
|
134
|
-
waitForWebhookResponse(runId: RunId): Promise<WebhookRunResult>;
|
|
135
|
-
handleNodeExecutionRequest(request: NodeExecutionRequest): Promise<void>;
|
|
136
|
-
}
|
|
137
|
-
//#endregion
|
|
138
4
|
//#region src/workflowSnapshots/MissingRuntimeFallbacksFactory.d.ts
|
|
139
5
|
declare class MissingRuntimeFallbacks {
|
|
140
6
|
createDefinition(snapshotNode: PersistedWorkflowSnapshotNode): NodeDefinition;
|
|
@@ -278,6 +144,11 @@ interface DefineNodeOptions<TKey$1 extends string, TConfig$1 extends CredentialJ
|
|
|
278
144
|
readonly key: TKey$1;
|
|
279
145
|
readonly title: string;
|
|
280
146
|
readonly description?: string;
|
|
147
|
+
/**
|
|
148
|
+
* Canvas icon for this node (same contract as `NodeConfigBase.icon` on runnable configs).
|
|
149
|
+
* The Next host resolves Lucide (`lucide:…`), built-in SVGs (`builtin:…`), Simple Icons (`si:…`), and image URLs (`https:`, `data:`, `/…`).
|
|
150
|
+
*/
|
|
151
|
+
readonly icon?: string;
|
|
281
152
|
readonly input?: Readonly<Record<keyof TConfig$1 & string, unknown>>;
|
|
282
153
|
readonly configSchema?: z.ZodType<TConfig$1>;
|
|
283
154
|
readonly credentials?: TBindings;
|
|
@@ -340,6 +211,9 @@ declare class AgentToolFactoryImpl {
|
|
|
340
211
|
asTool<TNodeConfig extends RunnableNodeConfig<any, any>, TInputSchema extends ZodSchemaAny, TOutputSchema extends ZodSchemaAny>(node: TNodeConfig, options: Readonly<{
|
|
341
212
|
name?: string;
|
|
342
213
|
} & NodeBackedToolConfigOptions<TNodeConfig, TInputSchema, TOutputSchema>>): NodeBackedToolConfig<TNodeConfig, TInputSchema, TOutputSchema>;
|
|
214
|
+
private withDefaultAgentInputMapper;
|
|
215
|
+
private mergeAgentToolInputWithCurrentItem;
|
|
216
|
+
private isMergeableRecord;
|
|
343
217
|
}
|
|
344
218
|
declare const AgentToolFactory: AgentToolFactoryImpl;
|
|
345
219
|
//#endregion
|
|
@@ -487,7 +361,27 @@ interface AgentNodeConfig<TInputJson = unknown, TOutputJson = unknown> extends R
|
|
|
487
361
|
readonly tools?: ReadonlyArray<ToolConfig>;
|
|
488
362
|
readonly guardrails?: AgentGuardrailConfig;
|
|
489
363
|
}
|
|
490
|
-
type AgentAttachmentRole = "languageModel" | "tool";
|
|
364
|
+
type AgentAttachmentRole = "languageModel" | "tool" | "nestedAgent";
|
|
365
|
+
//#endregion
|
|
366
|
+
//#region src/ai/AgentConnectionNodeCollector.d.ts
|
|
367
|
+
type AgentConnectionNodeRole = "languageModel" | "tool" | "nestedAgent";
|
|
368
|
+
type AgentConnectionCredentialSource = Readonly<{
|
|
369
|
+
getCredentialRequirements?(): ReadonlyArray<CredentialRequirement>;
|
|
370
|
+
}>;
|
|
371
|
+
type AgentConnectionNodeDescriptor = Readonly<{
|
|
372
|
+
nodeId: NodeId;
|
|
373
|
+
parentNodeId: NodeId;
|
|
374
|
+
connectionName: NodeConnectionName;
|
|
375
|
+
role: AgentConnectionNodeRole;
|
|
376
|
+
name: string;
|
|
377
|
+
typeName: string;
|
|
378
|
+
icon?: string;
|
|
379
|
+
credentialSource: AgentConnectionCredentialSource;
|
|
380
|
+
}>;
|
|
381
|
+
type AgentConnectionNodeCollectorApi = Readonly<{
|
|
382
|
+
collect(parentNodeId: NodeId, agentConfig: AgentNodeConfig<any, any>): ReadonlyArray<AgentConnectionNodeDescriptor>;
|
|
383
|
+
}>;
|
|
384
|
+
declare const AgentConnectionNodeCollector: AgentConnectionNodeCollectorApi;
|
|
491
385
|
//#endregion
|
|
492
386
|
//#region src/events/InMemoryRunEventBusRegistry.d.ts
|
|
493
387
|
declare class InMemoryRunEventBus implements RunEventBus {
|
|
@@ -506,6 +400,7 @@ declare class EventPublishingWorkflowExecutionRepository implements WorkflowExec
|
|
|
506
400
|
constructor(inner: WorkflowExecutionRepository, eventBus: RunEventBus, now?: () => Date);
|
|
507
401
|
createRun(args: Parameters<WorkflowExecutionRepository["createRun"]>[0]): Promise<void>;
|
|
508
402
|
load(runId: RunId): Promise<PersistedRunState | undefined>;
|
|
403
|
+
loadSchedulingState(runId: RunId): Promise<PersistedRunSchedulingState | undefined>;
|
|
509
404
|
save(state: PersistedRunState): Promise<void>;
|
|
510
405
|
deleteRun(runId: RunId): Promise<void>;
|
|
511
406
|
listRuns(args?: Readonly<{
|
|
@@ -615,48 +510,6 @@ declare class DefaultExecutionBinaryService implements ExecutionBinaryService {
|
|
|
615
510
|
openReadStream(attachment: BinaryAttachment): Promise<BinaryStorageReadResult | undefined>;
|
|
616
511
|
}
|
|
617
512
|
//#endregion
|
|
618
|
-
//#region src/policies/executionLimits/EngineExecutionLimitsPolicyFactory.d.ts
|
|
619
|
-
/**
|
|
620
|
-
* Builds {@link EngineExecutionLimitsPolicy} by merging {@link ENGINE_EXECUTION_LIMITS_DEFAULTS} with optional `overrides` (e.g. host `runtime.engineExecutionLimits`).
|
|
621
|
-
*/
|
|
622
|
-
declare class EngineExecutionLimitsPolicyFactory {
|
|
623
|
-
create(overrides?: Partial<EngineExecutionLimitsPolicyConfig>): EngineExecutionLimitsPolicy;
|
|
624
|
-
}
|
|
625
|
-
//#endregion
|
|
626
|
-
//#region src/policies/storage/RunPolicySnapshotFactory.d.ts
|
|
627
|
-
declare class RunPolicySnapshotFactory {
|
|
628
|
-
static create(workflow: WorkflowDefinition, defaults?: WorkflowPolicyRuntimeDefaults): PersistedRunPolicySnapshot;
|
|
629
|
-
}
|
|
630
|
-
//#endregion
|
|
631
|
-
//#region src/policies/storage/WorkflowStoragePolicyEvaluator.d.ts
|
|
632
|
-
declare class WorkflowStoragePolicyEvaluator {
|
|
633
|
-
private readonly nodeResolver;
|
|
634
|
-
constructor(nodeResolver: NodeResolver);
|
|
635
|
-
shouldPersist(workflow: WorkflowDefinition, snapshot: PersistedRunPolicySnapshot | undefined, args: WorkflowStoragePolicyDecisionArgs): Promise<boolean>;
|
|
636
|
-
private modeMatches;
|
|
637
|
-
}
|
|
638
|
-
//#endregion
|
|
639
|
-
//#region src/policies/storage/RunTerminalPersistenceCoordinator.d.ts
|
|
640
|
-
declare class RunTerminalPersistenceCoordinator {
|
|
641
|
-
private readonly runRepository;
|
|
642
|
-
private readonly storageEvaluator;
|
|
643
|
-
constructor(runRepository: WorkflowExecutionRepository, storageEvaluator: WorkflowStoragePolicyEvaluator);
|
|
644
|
-
maybeDeleteAfterTerminalState(args: {
|
|
645
|
-
workflow: WorkflowDefinition;
|
|
646
|
-
state: PersistedRunState;
|
|
647
|
-
finalStatus: "completed" | "failed";
|
|
648
|
-
finishedAt: string;
|
|
649
|
-
}): Promise<void>;
|
|
650
|
-
}
|
|
651
|
-
//#endregion
|
|
652
|
-
//#region src/policies/WorkflowPolicyErrorServices.d.ts
|
|
653
|
-
declare class WorkflowPolicyErrorServices {
|
|
654
|
-
private readonly nodeResolver;
|
|
655
|
-
constructor(nodeResolver: NodeResolver);
|
|
656
|
-
resolveNodeErrorHandler(spec: NodeErrorHandlerSpec | undefined): NodeErrorHandler | undefined;
|
|
657
|
-
resolveWorkflowErrorHandler(spec: WorkflowErrorHandlerSpec | undefined): WorkflowErrorHandler | undefined;
|
|
658
|
-
}
|
|
659
|
-
//#endregion
|
|
660
513
|
//#region src/runStorage/InMemoryBinaryStorageRegistry.d.ts
|
|
661
514
|
declare class InMemoryBinaryStorage implements BinaryStorage {
|
|
662
515
|
readonly driverName = "memory";
|
|
@@ -691,6 +544,7 @@ declare class InMemoryWorkflowExecutionRepository implements WorkflowExecutionRe
|
|
|
691
544
|
engineCounters?: EngineRunCounters;
|
|
692
545
|
}): Promise<void>;
|
|
693
546
|
load(runId: RunId): Promise<PersistedRunState | undefined>;
|
|
547
|
+
loadSchedulingState(runId: RunId): Promise<PersistedRunSchedulingState | undefined>;
|
|
694
548
|
save(state: PersistedRunState): Promise<void>;
|
|
695
549
|
deleteRun(runId: RunId): Promise<void>;
|
|
696
550
|
listRuns(args?: Readonly<{
|
|
@@ -709,80 +563,6 @@ declare class RunSummaryMapper {
|
|
|
709
563
|
static fromPersistedState(state: PersistedRunState): RunSummary;
|
|
710
564
|
}
|
|
711
565
|
//#endregion
|
|
712
|
-
//#region src/runtime/EngineWorkflowRunnerService.d.ts
|
|
713
|
-
declare class EngineWorkflowRunnerService {
|
|
714
|
-
private readonly engine;
|
|
715
|
-
private readonly workflowRepository;
|
|
716
|
-
constructor(engine: Engine, workflowRepository: WorkflowRepository);
|
|
717
|
-
runById(args: {
|
|
718
|
-
workflowId: WorkflowId;
|
|
719
|
-
startAt?: NodeId;
|
|
720
|
-
items: Items;
|
|
721
|
-
parent?: ParentExecutionRef;
|
|
722
|
-
}): Promise<RunResult>;
|
|
723
|
-
private findDefaultStartNodeId;
|
|
724
|
-
}
|
|
725
|
-
//#endregion
|
|
726
|
-
//#region src/runtime/RunIntentService.d.ts
|
|
727
|
-
type StartWorkflowIntent = {
|
|
728
|
-
workflow: WorkflowDefinition;
|
|
729
|
-
startAt?: string;
|
|
730
|
-
items: Items;
|
|
731
|
-
synthesizeTriggerItems?: boolean;
|
|
732
|
-
parent?: CurrentStateExecutionRequest["parent"];
|
|
733
|
-
executionOptions?: RunExecutionOptions;
|
|
734
|
-
workflowSnapshot?: CurrentStateExecutionRequest["workflowSnapshot"];
|
|
735
|
-
mutableState?: CurrentStateExecutionRequest["mutableState"];
|
|
736
|
-
currentState?: RunCurrentState;
|
|
737
|
-
stopCondition?: RunStopCondition;
|
|
738
|
-
reset?: CurrentStateExecutionRequest["reset"];
|
|
739
|
-
};
|
|
740
|
-
type RerunFromNodeIntent = {
|
|
741
|
-
workflow: WorkflowDefinition;
|
|
742
|
-
nodeId: NodeId;
|
|
743
|
-
currentState: RunCurrentState;
|
|
744
|
-
items?: Items;
|
|
745
|
-
synthesizeTriggerItems?: boolean;
|
|
746
|
-
parent?: CurrentStateExecutionRequest["parent"];
|
|
747
|
-
executionOptions?: RunExecutionOptions;
|
|
748
|
-
workflowSnapshot?: CurrentStateExecutionRequest["workflowSnapshot"];
|
|
749
|
-
mutableState?: CurrentStateExecutionRequest["mutableState"];
|
|
750
|
-
};
|
|
751
|
-
type MatchedWebhookRunIntent = {
|
|
752
|
-
endpointPath: string;
|
|
753
|
-
method: HttpMethod;
|
|
754
|
-
requestItem: Items[number];
|
|
755
|
-
};
|
|
756
|
-
type WebhookMatchRunIntent = {
|
|
757
|
-
match: WebhookInvocationMatch;
|
|
758
|
-
requestItem: Items[number];
|
|
759
|
-
};
|
|
760
|
-
declare class RunIntentService {
|
|
761
|
-
private readonly engine;
|
|
762
|
-
private readonly workflowRepository;
|
|
763
|
-
constructor(engine: Engine, workflowRepository: WorkflowRepository);
|
|
764
|
-
startWorkflow(args: StartWorkflowIntent): Promise<RunResult>;
|
|
765
|
-
rerunFromNode(args: RerunFromNodeIntent): Promise<RunResult>;
|
|
766
|
-
private resolveStartWorkflowItems;
|
|
767
|
-
private resolveRerunItems;
|
|
768
|
-
private resolveStartWorkflowTriggerNodeId;
|
|
769
|
-
private resolveRerunTriggerNodeId;
|
|
770
|
-
private firstTriggerNodeId;
|
|
771
|
-
private isTriggerNode;
|
|
772
|
-
private hasNonEmptyItems;
|
|
773
|
-
resolveWebhookTrigger(args: {
|
|
774
|
-
endpointPath: string;
|
|
775
|
-
method: HttpMethod;
|
|
776
|
-
}): WebhookTriggerResolution;
|
|
777
|
-
runMatchedWebhook(args: MatchedWebhookRunIntent): Promise<WebhookRunResult>;
|
|
778
|
-
runWebhookMatch(args: WebhookMatchRunIntent): Promise<WebhookRunResult>;
|
|
779
|
-
/**
|
|
780
|
-
* Webhook-triggered runs always force inline execution first.
|
|
781
|
-
* This is the highest-precedence scheduler override: it wins over node hints and container defaults.
|
|
782
|
-
*/
|
|
783
|
-
private createWebhookExecutionOptions;
|
|
784
|
-
}
|
|
785
|
-
//#endregion
|
|
786
566
|
//#region src/runtime/WorkflowRepositoryWebhookTriggerMatcher.d.ts
|
|
787
567
|
/**
|
|
788
568
|
* Resolves webhook HTTP routes from the live workflow repository (no trigger setup / registration).
|
|
@@ -827,11 +607,9 @@ declare class InlineDrivingScheduler implements NodeActivationScheduler {
|
|
|
827
607
|
private readonly drainingRuns;
|
|
828
608
|
private readonly queuesByRunId;
|
|
829
609
|
private readonly scheduledRuns;
|
|
830
|
-
private seq;
|
|
831
610
|
constructor(nodeExecutor: NodeExecutor);
|
|
832
611
|
setContinuation(continuation: NodeActivationContinuation): void;
|
|
833
|
-
|
|
834
|
-
notifyPendingStatePersisted(runId: RunId): void;
|
|
612
|
+
prepareDispatch(request: NodeActivationRequest): Promise<PreparedNodeActivationDispatch>;
|
|
835
613
|
private drainRun;
|
|
836
614
|
private scheduleDrain;
|
|
837
615
|
private resumeAfterExecutionResult;
|
|
@@ -848,8 +626,7 @@ declare class DefaultDrivingScheduler implements NodeActivationScheduler {
|
|
|
848
626
|
private readonly inline;
|
|
849
627
|
constructor(offloadPolicy: NodeOffloadPolicy, workerScheduler: NodeExecutionScheduler, inline: InlineDrivingScheduler);
|
|
850
628
|
setContinuation(continuation: NodeActivationContinuation): void;
|
|
851
|
-
|
|
852
|
-
notifyPendingStatePersisted(runId: string): void;
|
|
629
|
+
prepareDispatch(request: NodeActivationRequest): Promise<PreparedNodeActivationDispatch>;
|
|
853
630
|
/**
|
|
854
631
|
* Scheduler precedence is explicit:
|
|
855
632
|
* 1. run-intent override (`executionOptions.localOnly`)
|
|
@@ -858,7 +635,7 @@ declare class DefaultDrivingScheduler implements NodeActivationScheduler {
|
|
|
858
635
|
*/
|
|
859
636
|
private selectScheduler;
|
|
860
637
|
private hasNodeSchedulingPreference;
|
|
861
|
-
private
|
|
638
|
+
private prepareInlineDispatch;
|
|
862
639
|
}
|
|
863
640
|
//#endregion
|
|
864
641
|
//#region src/scheduler/HintOnlyOffloadPolicy.d.ts
|
|
@@ -877,5 +654,5 @@ declare class LocalOnlyScheduler implements NodeExecutionScheduler {
|
|
|
877
654
|
}>;
|
|
878
655
|
}
|
|
879
656
|
//#endregion
|
|
880
|
-
export {
|
|
881
|
-
//# sourceMappingURL=index-
|
|
657
|
+
export { LangChainChatModelLike as $, AgentConnectionNodeRole as A, AsyncSleeper as At, AgentMessageTemplate as B, PersistedRuntimeTypeKind as C, Clock as Ct, AgentConnectionCredentialSource as D, InProcessRetryRunner as Dt, InMemoryRunEventBus as E, NodeExecutor as Et, AgentMessageBuildArgs as F, AgentToolCall as G, AgentModelInvocationOptions as H, AgentMessageConfig as I, AgentToolExecuteArgs as J, AgentToolCallPlanner as K, AgentMessageDto as L, AgentCanvasPresentation as M, NodeEventPublisher as Mt, AgentGuardrailConfig as N, EngineCompositionDeps as Nt, AgentConnectionNodeCollector as O, DefaultExecutionContextFactory as Ot, AgentGuardrailDefaults as P, EngineFactory as Pt, ChatModelFactory as Q, AgentMessageLine as R, PersistedRuntimeTypeDecoratorOptions as S, defineNode as St, EventPublishingWorkflowExecutionRepository as T, NodeInstanceFactory as Tt, AgentNodeConfig as U, AgentMessageTemplateContent as V, AgentTool as W, AgentTurnLimitBehavior as X, AgentToolToken as Y, ChatModelConfig as Z, tool as _, DefinedNode as _t, ConfigDrivenOffloadPolicy as a, Tool as at, PersistedRuntimeTypeMetadataStore as b, DefinedNodeCredentialBindings as bt, InMemoryWorkflowExecutionRepository as c, ZodSchemaAny as ct, DefaultExecutionBinaryService as d, AgentToolFactory as dt, NodeBackedToolConfigOptions as et, UnavailableBinaryStorage as f, NodeBackedToolConfig as ft, node as g, DefineNodeOptions as gt, getPersistedRuntimeTypeMetadata as h, DefinedNodeRegistry as ht, InlineDrivingScheduler as i, NodeBackedToolOutputMapperArgs as it, AgentAttachmentRole as j, CredentialResolverFactory as jt, AgentConnectionNodeDescriptor as k, DefaultAsyncSleeper as kt, InMemoryRunDataFactory as l, AgentConfigInspector as lt, chatModel as m, defineCredential as mt, HintOnlyOffloadPolicy as n, NodeBackedToolInputMapperArgs as nt, WorkflowRepositoryWebhookTriggerMatcher as o, ToolConfig as ot, ItemsInputNormalizer as p, DefineCredentialOptions as pt, AgentToolDefinition as q, DefaultDrivingScheduler as r, NodeBackedToolOutputMapper as rt, RunSummaryMapper as s, ToolExecuteArgs as st, LocalOnlyScheduler as t, NodeBackedToolInputMapper as tt, InMemoryBinaryStorage as u, AgentMessageConfigNormalizer as ut, StackTraceCallSitePathResolver as v, DefinedNodeCredentialAccessors as vt, PersistedRuntimeTypeMetadata as w, SystemClock as wt, InjectableRuntimeDecoratorComposer as x, DefinedNodeRunContext as xt, PersistedRuntimeTypeNameResolver as y, DefinedNodeCredentialBinding as yt, AgentMessageRole as z };
|
|
658
|
+
//# sourceMappingURL=index-CueSzHsf.d.ts.map
|