eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
14 lines (13 loc) • 874 B
TypeScript
import type { BackgroundWorkflowToolRunInput } from "#execution/tools/workflow/types.js";
import type { WorkflowToolRunMessage } from "#execution/tools/workflow/messages.js";
import { type ChannelReader } from "#execution/tools/workflow/owner-channels.js";
import { type TaskRunInboundPayload } from "#tasks/types.js";
export interface BackgroundWorkflowOwner {
readonly kind: "session";
readonly commands: ChannelReader<"commands", TaskRunInboundPayload>;
readonly signal: AbortSignal;
handleCommand(payload: TaskRunInboundPayload): Promise<"start" | "stop" | undefined>;
handleMessage(message: WorkflowToolRunMessage): Promise<void>;
}
/** Routes child messages; the parent session owns persisted task state. */
export declare function createBackgroundWorkflowOwner(input: BackgroundWorkflowToolRunInput): Promise<BackgroundWorkflowOwner | undefined>;