import { $n as NodeActivationContinuation, $t as RunId, D as RunCurrentState, Et as Items, H as WorkflowExecutionRepository, I as RunStopCondition, Jt as ParentExecutionRef, Lr as WebhookInvocationMatch, N as RunResult, Nr as WorkflowSnapshotResolver, Nt as NodeActivationId, Pr as HttpMethod, Qi as NodeId, Rr as WebhookTriggerMatcher, Wt as NodeOutputs, Zn as LiveWorkflowRepository, cn as WorkflowDefinition, hr as ResumeContext, k as RunExecutionOptions, kr as WorkflowRepository, or as NodeExecutionRequest, p as NodeInputsByPort, s as CurrentStateExecutionRequest, sr as NodeExecutionRequestHandler, ta as WorkflowId, w as PersistedWorkflowTokenRegistryLike, z as WebhookRunResult, zr as WebhookTriggerResolution } from "./agentMcpTypes-BHX4RQCC.cjs"; //#region src/orchestration/Engine.d.ts interface EngineTriggerRuntime { startTriggers(): Promise; stop(): Promise; syncWorkflowTriggersForActivation(workflowId: WorkflowId): Promise; createTriggerTestItems(args: { workflow: WorkflowDefinition; nodeId: NodeId; }): Promise; } interface EngineRunStartService { runWorkflow(wf: WorkflowDefinition, startAt: NodeId, items: Items, parent?: ParentExecutionRef, executionOptions?: RunExecutionOptions, persistedStateOverrides?: Readonly<{ workflowSnapshot?: NonNullable>>["workflowSnapshot"]; mutableState?: NonNullable>>["mutableState"]; }>): Promise; runWorkflowFromState(request: CurrentStateExecutionRequest): Promise; } interface EngineRunContinuationService { markNodeRunning(args: { runId: RunId; activationId: NodeActivationId; nodeId: NodeId; inputsByPort: NodeInputsByPort; }): Promise; resumeFromNodeResult(args: { runId: RunId; activationId: NodeActivationId; nodeId: NodeId; outputs: NodeOutputs; }): Promise; resumeFromNodeError(args: { runId: RunId; activationId: NodeActivationId; nodeId: NodeId; error: Error; }): Promise; resumeFromStepResult(args: { runId: RunId; activationId: NodeActivationId; nodeId: NodeId; outputs: NodeOutputs; }): Promise; resumeFromStepError(args: { runId: RunId; activationId: NodeActivationId; nodeId: NodeId; error: Error; }): Promise; waitForCompletion(runId: RunId): Promise>; waitForWebhookResponse(runId: RunId): Promise; resumeRun(args: { runId: RunId; taskId: string; resumeContext: ResumeContext; }): Promise; } interface EngineNodeExecutionRequestHandler { handleNodeExecutionRequest(request: NodeExecutionRequest): Promise; } interface EngineFacadeDeps { liveWorkflowRepository: LiveWorkflowRepository; tokenRegistry: PersistedWorkflowTokenRegistryLike; webhookTriggerMatcher: WebhookTriggerMatcher; workflowSnapshotResolver: WorkflowSnapshotResolver; triggerRuntime: EngineTriggerRuntime; runStartService: EngineRunStartService; runContinuationService: EngineRunContinuationService; nodeExecutionRequestHandler: EngineNodeExecutionRequestHandler; } declare class Engine implements NodeActivationContinuation, NodeExecutionRequestHandler { private readonly deps; constructor(deps: EngineFacadeDeps); loadWorkflows(workflows: ReadonlyArray): void; getTokenRegistry(): EngineFacadeDeps["tokenRegistry"]; resolveWorkflowSnapshot(args: { workflowId: WorkflowId; workflowSnapshot?: NonNullable>>["workflowSnapshot"]; }): WorkflowDefinition | undefined; startTriggers(): Promise; syncWorkflowTriggersForActivation(workflowId: WorkflowId): Promise; start(workflows: WorkflowDefinition[]): Promise; stop(): Promise; resolveWebhookTrigger(args: { endpointPath: string; method: HttpMethod; }): WebhookTriggerResolution; createTriggerTestItems(args: { workflow: WorkflowDefinition; nodeId: NodeId; }): Promise; runWorkflow(wf: WorkflowDefinition, startAt: NodeId, items: Items, parent?: ParentExecutionRef, executionOptions?: RunExecutionOptions, persistedStateOverrides?: Readonly<{ workflowSnapshot?: NonNullable>>["workflowSnapshot"]; mutableState?: NonNullable>>["mutableState"]; }>): Promise; runWorkflowFromState(request: CurrentStateExecutionRequest): Promise; markNodeRunning(args: { runId: RunId; activationId: NodeActivationId; nodeId: NodeId; inputsByPort: NodeInputsByPort; }): Promise; resumeFromNodeResult(args: { runId: RunId; activationId: NodeActivationId; nodeId: NodeId; outputs: NodeOutputs; }): Promise; resumeFromNodeError(args: { runId: RunId; activationId: NodeActivationId; nodeId: NodeId; error: Error; }): Promise; resumeFromStepResult(args: { runId: RunId; activationId: NodeActivationId; nodeId: NodeId; outputs: NodeOutputs; }): Promise; resumeFromStepError(args: { runId: RunId; activationId: NodeActivationId; nodeId: NodeId; error: Error; }): Promise; waitForCompletion(runId: RunId): Promise>; waitForWebhookResponse(runId: RunId): Promise; resumeRun(args: { runId: RunId; taskId: string; resumeContext: ResumeContext; }): Promise; handleNodeExecutionRequest(request: NodeExecutionRequest): Promise; } //#endregion //#region src/runtime/InMemoryLiveWorkflowRepository.d.ts declare class InMemoryLiveWorkflowRepository implements LiveWorkflowRepository { private readonly workflowsById; setWorkflows(workflows: ReadonlyArray): void; list(): ReadonlyArray; get(workflowId: WorkflowId): WorkflowDefinition | undefined; } //#endregion //#region src/runtime/RunIntentService.d.ts type StartWorkflowIntent = { workflow: WorkflowDefinition; startAt?: string; items: Items; synthesizeTriggerItems?: boolean; parent?: CurrentStateExecutionRequest["parent"]; executionOptions?: RunExecutionOptions; workflowSnapshot?: CurrentStateExecutionRequest["workflowSnapshot"]; mutableState?: CurrentStateExecutionRequest["mutableState"]; currentState?: RunCurrentState; stopCondition?: RunStopCondition; reset?: CurrentStateExecutionRequest["reset"]; }; type RerunFromNodeIntent = { workflow: WorkflowDefinition; nodeId: NodeId; currentState: RunCurrentState; items?: Items; synthesizeTriggerItems?: boolean; parent?: CurrentStateExecutionRequest["parent"]; executionOptions?: RunExecutionOptions; workflowSnapshot?: CurrentStateExecutionRequest["workflowSnapshot"]; mutableState?: CurrentStateExecutionRequest["mutableState"]; }; type MatchedWebhookRunIntent = { endpointPath: string; method: HttpMethod; requestItem: Items[number]; }; type WebhookMatchRunIntent = { match: WebhookInvocationMatch; requestItem: Items[number]; }; declare class RunIntentService { private readonly engine; private readonly workflowRepository; constructor(engine: Engine, workflowRepository: WorkflowRepository); startWorkflow(args: StartWorkflowIntent): Promise; rerunFromNode(args: RerunFromNodeIntent): Promise; private resolveStartWorkflowItems; private resolveRerunItems; private resolveStartWorkflowTriggerNodeId; private resolveRerunTriggerNodeId; private firstTriggerNodeId; private isTriggerNode; private hasNonEmptyItems; resolveWebhookTrigger(args: { endpointPath: string; method: HttpMethod; }): WebhookTriggerResolution; runMatchedWebhook(args: MatchedWebhookRunIntent): Promise; runWebhookMatch(args: WebhookMatchRunIntent): Promise; private createWebhookExecutionOptions; } //#endregion export { InMemoryLiveWorkflowRepository as n, Engine as r, RunIntentService as t }; //# sourceMappingURL=RunIntentService-DKxuHTUz.d.cts.map