eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
13 lines (12 loc) • 779 B
TypeScript
import { type ChannelReader } from "#execution/tools/workflow/owner-channels.js";
import { type WorkflowToolRunMessage, type WorkflowToolRunControlMessage } from "#execution/tools/workflow/messages.js";
import type { WorkflowToolRunInput } from "#execution/tools/workflow/types.js";
export interface BlockingWorkflowOwner {
readonly kind: "turn";
readonly commands: ChannelReader<"control", WorkflowToolRunControlMessage>;
readonly signal: AbortSignal;
handleCommand(message: WorkflowToolRunControlMessage): void;
handleMessage(message: WorkflowToolRunMessage): Promise<void>;
}
/** Routes invocation messages to the waiting turn and accepts cancellation. */
export declare function createBlockingWorkflow(input: WorkflowToolRunInput): BlockingWorkflowOwner;