eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
67 lines (66 loc) • 3.41 kB
TypeScript
import type { CancelTurnInput, CancelTurnResult, Runtime } from "#channel/types.js";
import { type Run, type StartOptionsWithoutDeploymentId, type WorkflowFunction, type WorkflowMetadata } from "#internal/workflow/runtime.js";
import type { RuntimeCompiledArtifactsSource } from "#runtime/compiled-artifacts-source.js";
import type { DynamicSubagentAgentConfig } from "#runtime/subagents/dynamic-agent-config.js";
interface WorkflowHookRecord {
readonly runId: string;
}
/**
* Stable workflow reference used by `start()` to locate the workflow
* entrypoint registered by the Workflow DevKit builder. The id omits
* the package version stamp so the long-lived driver can rotate across
* deployments without rewriting the registry key.
*/
export declare const workflowEntryReference: {
workflowId: string;
};
/**
* Stable workflow reference used by the driver to dispatch per-turn
* child workflow runs. The id omits the package version stamp so an
* explicitly stamped accepting deployment can resolve the workflow even
* when its eve version differs from the driver's deployment.
*/
export declare const turnWorkflowReference: {
workflowId: string;
};
/** Stable workflow reference for session deadline timers. */
export declare const sessionTimeoutWorkflowReference: {
workflowId: string;
};
/** Stable workflow reference for durable task runs (`experimental.tasks`). */
export declare const taskRunWorkflowReference: {
workflowId: string;
};
/** Stable workflow reference for root-session activity collectors. */
export declare const activityCollectorWorkflowReference: {
workflowId: string;
};
/** Stable workflow reference for authored workflow tool runs. */
export declare const workflowToolRunWorkflowReference: {
workflowId: string;
};
/**
* Creates a workflow-backed runtime whose long-lived driver owns the
* event stream and dispatches each turn as a child workflow run.
*/
export declare function createWorkflowRuntime(config: {
readonly compiledArtifactsSource: RuntimeCompiledArtifactsSource;
readonly dynamicSubagentAgentConfig?: DynamicSubagentAgentConfig;
readonly nodeId?: string;
}): Runtime;
/** Requests cancellation through a session's stable command inbox. */
export declare function requestWorkflowTurnCancellation(input: CancelTurnInput): Promise<CancelTurnResult>;
/**
* Resolves hook ownership for replay-idempotent work already running inside a
* durable step. Request handlers must return from start/resume acceptance and
* leave ownership arbitration to the workflow.
*/
export declare function waitForCommandHookOwner(token: string): Promise<WorkflowHookRecord>;
/** Starts a workflow on the deployment executing this call. */
export declare function startWorkflowOnCurrentDeployment<TArgs extends unknown[], TResult>(workflow: WorkflowFunction<TArgs, TResult> | WorkflowMetadata, args: TArgs, options?: StartOptionsWithoutDeploymentId): Promise<Run<unknown> | Run<TResult>>;
/**
* Starts on the deployment that accepted a delivery when one was stamped,
* otherwise stays on the deployment executing this call.
*/
export declare function startWorkflowOnAcceptedDeployment<TArgs extends unknown[], TResult>(workflow: WorkflowFunction<TArgs, TResult> | WorkflowMetadata, args: TArgs, acceptedDeploymentId: string | undefined, options?: StartOptionsWithoutDeploymentId): Promise<Run<unknown> | Run<TResult>>;
export {};