UNPKG

eve

Version:

Filesystem-first framework for durable backend AI agents that run anywhere.

33 lines (32 loc) 1.47 kB
import type { SessionContext } from "#context/session-context.js"; import { type WorkflowToolRunOutcome, type WorkflowToolRunOwner, type WorkflowToolRunRef } from "#execution/tools/workflow/messages.js"; import type { JsonObject, JsonValue } from "#shared/json.js"; export interface WorkflowBodyDefinition { /** Advertised by the parent driver; absent on runs started before this capability. */ readonly authorizationSupported?: boolean; readonly callId: string; readonly executeInput?: JsonValue; readonly input: JsonObject; readonly resultKind?: "subagent" | "tool"; readonly session: SessionContext["session"]; readonly stepIndex: number; readonly taskId?: string; readonly toolName: string; readonly workflowId: string; } export interface WorkflowBodyInput extends WorkflowBodyDefinition { readonly owner: WorkflowToolRunOwner; } export interface WorkflowBodyResult { readonly outcome: WorkflowToolRunOutcome; readonly reportCount: number; } /** Executes one registered workflow body and reports progress to its owner. */ export declare function executeWorkflowBody(input: WorkflowBodyInput & { readonly execution: "background" | "blocking"; readonly runId?: string; }, signal: AbortSignal): Promise<WorkflowBodyResult>; export declare function createWorkflowBodyRef(input: WorkflowBodyDefinition & { readonly execution: "background" | "blocking"; readonly runId?: string; }): WorkflowToolRunRef;