import { An as RunStopCondition, Ar as NodeErrorHandler, Ca as WorkflowRepository, Cn as RunExecutionOptions, Da as WorkflowSnapshotResolver, Dn as RunResult, Dr as NodeActivationId, Gi as LiveWorkflowRepository, Hr as ParentExecutionRef, In as WorkflowExecutionRepository, Ko as NodeId, Ma as WebhookTriggerMatcher, Mr as NodeErrorHandlerSpec, Na as WebhookTriggerResolution, Nn as WebhookRunResult, Oa as HttpMethod, Or as NodeConfigBase, Rr as NodeOutputs, Ur as PersistedRunPolicySnapshot, Yo as WorkflowId, _n as PersistedWorkflowSnapshotNode, aa as NodeResolver, ai as WorkflowErrorHandlerSpec, br as Items, di as WorkflowStoragePolicyDecisionArgs, ea as NodeExecutionRequest, gn as PersistedWorkflowSnapshot, ii as WorkflowErrorHandler, ir as EngineExecutionLimitsPolicyConfig, ja as WebhookInvocationMatch, la as ResumeContext, li as WorkflowPolicyRuntimeDefaults, mn as PersistedRunState, ni as WorkflowDefinition, qi as NodeActivationContinuation, qr as RunId, rr as EngineExecutionLimitsPolicy, sn as NodeInputsByPort, ta as NodeExecutionRequestHandler, tn as CurrentStateExecutionRequest, vn as PersistedWorkflowTokenRegistryLike, xn as RunCurrentState } from "./index-CRv3_pY3.js"; //#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/policies/storage/WorkflowStoragePolicyEvaluator.d.ts declare class WorkflowStoragePolicyEvaluator { private readonly nodeResolver; constructor(nodeResolver: NodeResolver); shouldPersist(workflow: WorkflowDefinition, snapshot: PersistedRunPolicySnapshot | undefined, args: WorkflowStoragePolicyDecisionArgs): Promise; private modeMatches; } //#endregion //#region src/policies/storage/RunTerminalPersistenceCoordinator.d.ts declare class RunTerminalPersistenceCoordinator { private readonly runRepository; private readonly storageEvaluator; constructor(runRepository: WorkflowExecutionRepository, storageEvaluator: WorkflowStoragePolicyEvaluator); maybeDeleteAfterTerminalState(args: { workflow: WorkflowDefinition; state: PersistedRunState; finalStatus: "completed" | "failed"; finishedAt: string; }): Promise; } //#endregion //#region src/policies/WorkflowPolicyErrorServices.d.ts declare class WorkflowPolicyErrorServices { private readonly nodeResolver; constructor(nodeResolver: NodeResolver); resolveNodeErrorHandler(spec: NodeErrorHandlerSpec | undefined): NodeErrorHandler | undefined; resolveWorkflowErrorHandler(spec: WorkflowErrorHandlerSpec | undefined): WorkflowErrorHandler | undefined; } //#endregion //#region src/policies/executionLimits/EngineExecutionLimitsPolicyFactory.d.ts declare class EngineExecutionLimitsPolicyFactory { create(overrides?: Partial): EngineExecutionLimitsPolicy; } //#endregion //#region src/policies/storage/RunPolicySnapshotFactory.d.ts declare class RunPolicySnapshotFactory { static create(workflow: WorkflowDefinition, defaults?: WorkflowPolicyRuntimeDefaults): PersistedRunPolicySnapshot; } //#endregion //#region src/workflowSnapshots/WorkflowSnapshotCodec.d.ts declare class WorkflowSnapshotCodec { private readonly tokenRegistry; constructor(tokenRegistry: PersistedWorkflowTokenRegistryLike); create(workflow: WorkflowDefinition): PersistedWorkflowSnapshot; hydrate(snapshotNode: PersistedWorkflowSnapshotNode, liveConfig: NodeConfigBase): NodeConfigBase; private serializeConfig; private safeInspectorSummary; private injectTokenIds; private mergeValue; private mergeNestedValue; private restoreNonSerializableProperties; private restoreTypeProperty; private resolveTokenId; private resolveTokenName; private asTypeToken; private asRecord; } //#endregion //#region src/runtime/EngineWorkflowRunnerService.d.ts declare class EngineWorkflowRunnerService { private readonly engine; private readonly workflowRepository; constructor(engine: Engine, workflowRepository: WorkflowRepository); runById(args: { workflowId: WorkflowId; startAt?: NodeId; items: Items; parent?: ParentExecutionRef; }): Promise; private findDefaultStartNodeId; } //#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 { RunPolicySnapshotFactory as a, RunTerminalPersistenceCoordinator as c, WorkflowSnapshotCodec as i, WorkflowStoragePolicyEvaluator as l, InMemoryLiveWorkflowRepository as n, EngineExecutionLimitsPolicyFactory as o, EngineWorkflowRunnerService as r, WorkflowPolicyErrorServices as s, RunIntentService as t, Engine as u }; //# sourceMappingURL=RunIntentService-DrpKli2k.d.ts.map