@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.
Files changed (81) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/EngineRuntimeRegistration.types-0sgV2XL2.d.ts +42 -0
  3. package/dist/EngineWorkflowRunnerService-Dx7bJsJR.d.cts +73 -0
  4. package/dist/InMemoryRunDataFactory-qIYQEar7.d.cts +94 -0
  5. package/dist/{InMemoryLiveWorkflowRepository-DxoualoC.d.ts → RunIntentService-BCvGdOSY.d.ts} +438 -9
  6. package/dist/{RunIntentService-C1nu_YwM.js → RunIntentService-BFA48UpH.js} +252 -67
  7. package/dist/RunIntentService-BFA48UpH.js.map +1 -0
  8. package/dist/{InMemoryLiveWorkflowRepository-orY1VsWG.d.cts → RunIntentService-CV8izV8t.d.cts} +214 -7
  9. package/dist/{RunIntentService-ZkjpY7MS.cjs → RunIntentService-DcxXf_AM.cjs} +262 -65
  10. package/dist/RunIntentService-DcxXf_AM.cjs.map +1 -0
  11. package/dist/bootstrap/index.cjs +14 -1135
  12. package/dist/bootstrap/index.d.cts +7 -60
  13. package/dist/bootstrap/index.d.ts +4 -40
  14. package/dist/bootstrap/index.js +3 -1122
  15. package/dist/bootstrap-D67Sf2BF.js +1136 -0
  16. package/dist/bootstrap-D67Sf2BF.js.map +1 -0
  17. package/dist/bootstrap-DoQHAEQJ.cjs +1203 -0
  18. package/dist/bootstrap-DoQHAEQJ.cjs.map +1 -0
  19. package/dist/{index-BIewO9-9.d.ts → index-CueSzHsf.d.ts} +37 -260
  20. package/dist/index.cjs +99 -223
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.cts +201 -6
  23. package/dist/index.d.ts +3 -3
  24. package/dist/index.js +93 -218
  25. package/dist/index.js.map +1 -1
  26. package/dist/testing.cjs +329 -3
  27. package/dist/testing.cjs.map +1 -1
  28. package/dist/testing.d.cts +181 -4
  29. package/dist/testing.d.ts +181 -3
  30. package/dist/testing.js +319 -2
  31. package/dist/testing.js.map +1 -1
  32. package/dist/workflowActivationPolicy-B8HzTk3o.js +201 -0
  33. package/dist/workflowActivationPolicy-B8HzTk3o.js.map +1 -0
  34. package/dist/workflowActivationPolicy-BzyzXLa_.cjs +231 -0
  35. package/dist/workflowActivationPolicy-BzyzXLa_.cjs.map +1 -0
  36. package/package.json +1 -1
  37. package/src/ai/AgentConnectionNodeCollector.ts +99 -0
  38. package/src/ai/AgentToolFactory.ts +38 -2
  39. package/src/ai/AiHost.ts +1 -1
  40. package/src/authoring/defineNode.types.ts +6 -0
  41. package/src/browser.ts +11 -0
  42. package/src/contracts/executionPersistenceContracts.ts +186 -0
  43. package/src/contracts/index.ts +1 -0
  44. package/src/contracts/runFinishedAtFactory.ts +5 -2
  45. package/src/contracts/runTypes.ts +10 -0
  46. package/src/contracts/runtimeTypes.ts +6 -2
  47. package/src/contracts/workflowTypes.ts +3 -2
  48. package/src/events/EventPublishingWorkflowExecutionRepository.ts +5 -0
  49. package/src/execution/ActivationEnqueueService.ts +8 -8
  50. package/src/execution/PersistedRunStateTerminalBuilder.ts +3 -0
  51. package/src/index.ts +6 -0
  52. package/src/orchestration/NodeExecutionRequestHandlerService.ts +11 -6
  53. package/src/orchestration/RunContinuationService.ts +94 -24
  54. package/src/runStorage/InMemoryWorkflowExecutionRepository.ts +14 -1
  55. package/src/scheduler/DefaultDrivingScheduler.ts +21 -11
  56. package/src/scheduler/InlineDrivingScheduler.ts +17 -21
  57. package/src/testing/CapturingScheduler.ts +15 -0
  58. package/src/testing/EngineTestKitRunIdFactory.ts +24 -0
  59. package/src/testing/InMemoryTriggerSetupStateRepository.ts +21 -0
  60. package/src/testing/PrefixedSequentialIdGenerator.ts +17 -0
  61. package/src/testing/RegistrarEngineTestKit.types.ts +76 -0
  62. package/src/testing/RegistrarEngineTestKitFactory.ts +154 -0
  63. package/src/testing/SubWorkflowRunnerTestNode.ts +83 -0
  64. package/src/testing/WorkflowTestHarnessManualTrigger.ts +39 -0
  65. package/src/testing/WorkflowTestKit.types.ts +9 -0
  66. package/src/testing/WorkflowTestKitBuilder.ts +77 -0
  67. package/src/testing/WorkflowTestKitNodeRegistrationContextFactory.ts +17 -0
  68. package/src/testing/WorkflowTestKitRunNodeWorkflowFactory.ts +26 -0
  69. package/src/testing.ts +19 -0
  70. package/src/types/index.ts +1 -0
  71. package/src/workflow/definition/ConnectionNodeIdFactory.ts +28 -0
  72. package/dist/InMemoryLiveWorkflowRepository-BTzHpQ6e.cjs +0 -151
  73. package/dist/InMemoryLiveWorkflowRepository-BTzHpQ6e.cjs.map +0 -1
  74. package/dist/InMemoryLiveWorkflowRepository-BoLNnVLg.js +0 -139
  75. package/dist/InMemoryLiveWorkflowRepository-BoLNnVLg.js.map +0 -1
  76. package/dist/RunIntentService-C1nu_YwM.js.map +0 -1
  77. package/dist/RunIntentService-DjbxzBBP.d.cts +0 -288
  78. package/dist/RunIntentService-ZkjpY7MS.cjs.map +0 -1
  79. package/dist/WorkflowSnapshotCodec-DSEzKyt3.d.cts +0 -22
  80. package/dist/bootstrap/index.cjs.map +0 -1
  81. package/dist/bootstrap/index.js.map +0 -1
@@ -1,140 +1,6 @@
1
- import { $r as RunEventBus, $t as BinaryBody, A as CredentialJsonRecord, Ar as WorkflowExecutionRepository, B as CredentialTypeId, Cn as NodeExecutionScheduler, Ct as RunDataSnapshot, Dr as WebhookRunResult, Dt as RunnableNodeInputJson, En as NodeResolver, Er as RunSummary, Et as RunnableNodeConfig, F as CredentialSessionFactoryArgs, Ft as WorkflowErrorHandler, G as BinaryAttachment, Gn as WebhookInvocationMatch, Hn as HttpMethod, I as CredentialSessionService, In as WorkflowNodeInstanceFactory, It as WorkflowErrorHandlerSpec, J as ExecutionMode, Jn as WebhookTriggerRoutingDiagnostics, Kn as WebhookTriggerMatcher, Ln as WorkflowRepository, Lr as TypeToken, N as CredentialRequirement, Nt as WorkflowDefinition, Or as WorkflowExecutionListingRepository, Q as Items, Qr as RunEvent, R as CredentialType, Sn as NodeExecutionRequestHandler, Sr as RunResult, St as RunDataFactory, T as CredentialHealth, Tr as RunStopCondition, Ut as WorkflowStoragePolicyDecisionArgs, Vn as WorkflowSnapshotResolver, Vt as WorkflowPolicyRuntimeDefaults, X as Item, Xn as WorkflowActivationPolicy, Xr as EngineExecutionLimitsPolicy, Zr as EngineExecutionLimitsPolicyConfig, _r as RunCurrentState, an as EngineDeps, at as NodeConfigBase, b as AnyCredentialType, bn as NodeExecutionContext, br as RunPruneCandidate, bt as PersistedRunPolicySnapshot, cn as ExecutionBinaryService, ct as NodeErrorHandler, dn as LiveWorkflowRepository, dr as PersistedRunState, dt as NodeId, ei as RunEventSubscription, en as BinaryStorage, er as CurrentStateExecutionRequest, gn as NodeActivationRequest, gt as NodeSchedulerDecision, hn as NodeActivationReceipt, in as BinaryStorageWriteResult, ir as NodeExecutionSnapshot, it as NodeActivationId, kr as WorkflowExecutionPruneRepository, ln as ExecutionContext, mn as NodeActivationContinuation, mr as PersistedWorkflowTokenRegistryLike, mt as NodeOutputs, n as WorkflowSnapshotCodec, nn as BinaryStorageStatResult, nt as JsonValue, or as NodeInputsByPort, pr as PersistedWorkflowSnapshotNode, pt as NodeOffloadPolicy, qn as WebhookTriggerResolution, rt as MutableRunData, si as RetryPolicySpec, st as NodeDefinition, tn as BinaryStorageReadResult, tr as EngineRunCounters, un as ExecutionContextFactory, ut as NodeErrorHandlerSpec, vn as NodeActivationScheduler, w as CredentialFieldSchema, wn as NodeExecutionStatePublisher, wt as RunId, xn as NodeExecutionRequest, yn as NodeBinaryAttachmentService, yr as RunExecutionOptions, yt as ParentExecutionRef, z as CredentialTypeDefinition, zt as WorkflowId } from "./InMemoryLiveWorkflowRepository-DxoualoC.js";
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
- enqueue(request: NodeActivationRequest): Promise<NodeActivationReceipt>;
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
- enqueue(request: NodeActivationRequest): Promise<NodeActivationReceipt>;
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 enqueueInline;
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 { AgentTurnLimitBehavior as $, PersistedRuntimeTypeKind as A, InProcessRetryRunner as At, AgentMessageDto as B, node as C, DefinedNodeCredentialBindings as Ct, PersistedRuntimeTypeMetadataStore as D, SystemClock as Dt, PersistedRuntimeTypeNameResolver as E, Clock as Et, AgentCanvasPresentation as F, NodeEventPublisher as Ft, AgentModelInvocationOptions as G, AgentMessageRole as H, AgentGuardrailConfig as I, EngineCompositionDeps as It, AgentToolCall as J, AgentNodeConfig as K, AgentGuardrailDefaults as L, EngineFactory as Lt, EventPublishingWorkflowExecutionRepository as M, DefaultAsyncSleeper as Mt, InMemoryRunEventBus as N, AsyncSleeper as Nt, InjectableRuntimeDecoratorComposer as O, NodeInstanceFactory as Ot, AgentAttachmentRole as P, CredentialResolverFactory as Pt, AgentToolToken as Q, AgentMessageBuildArgs as R, Engine as Rt, getPersistedRuntimeTypeMetadata as S, DefinedNodeCredentialBinding as St, StackTraceCallSitePathResolver as T, defineNode as Tt, AgentMessageTemplate as U, AgentMessageLine as V, AgentMessageTemplateContent as W, AgentToolDefinition as X, AgentToolCallPlanner as Y, AgentToolExecuteArgs as Z, EngineExecutionLimitsPolicyFactory as _, defineCredential as _t, ConfigDrivenOffloadPolicy as a, NodeBackedToolInputMapperArgs as at, ItemsInputNormalizer as b, DefinedNode as bt, EngineWorkflowRunnerService as c, Tool as ct, InMemoryRunDataFactory as d, ZodSchemaAny as dt, ChatModelConfig as et, InMemoryBinaryStorage as f, AgentConfigInspector as ft, RunPolicySnapshotFactory as g, DefineCredentialOptions as gt, WorkflowStoragePolicyEvaluator as h, NodeBackedToolConfig as ht, InlineDrivingScheduler as i, NodeBackedToolInputMapper as it, PersistedRuntimeTypeMetadata as j, DefaultExecutionContextFactory as jt, PersistedRuntimeTypeDecoratorOptions as k, NodeExecutor as kt, RunSummaryMapper as l, ToolConfig as lt, RunTerminalPersistenceCoordinator as m, AgentToolFactory as mt, HintOnlyOffloadPolicy as n, LangChainChatModelLike as nt, WorkflowRepositoryWebhookTriggerMatcher as o, NodeBackedToolOutputMapper as ot, WorkflowPolicyErrorServices as p, AgentMessageConfigNormalizer as pt, AgentTool as q, DefaultDrivingScheduler as r, NodeBackedToolConfigOptions as rt, RunIntentService as s, NodeBackedToolOutputMapperArgs as st, LocalOnlyScheduler as t, ChatModelFactory as tt, InMemoryWorkflowExecutionRepository as u, ToolExecuteArgs as ut, DefaultExecutionBinaryService as v, DefinedNodeRegistry as vt, tool as w, DefinedNodeRunContext as wt, chatModel as x, DefinedNodeCredentialAccessors as xt, UnavailableBinaryStorage as y, DefineNodeOptions as yt, AgentMessageConfig as z };
881
- //# sourceMappingURL=index-BIewO9-9.d.ts.map
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