UNPKG

eve

Version:

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

82 lines (81 loc) 3.78 kB
import type { ActivityObserverConfig } from "#channel/types.js"; import type { WorkflowToolAuthorizationRequest, WorkflowToolRunRequestMessage } from "#execution/tools/workflow/messages.js"; import type { WorkflowToolRunTaskInputRequest } from "./workflow.js"; import type { AnswerHookRoute } from "#harness/proxy-input-requests.js"; import type { ActivityEventV1 } from "#protocol/activity.js"; import { type TaskInboundAnswerInput, type TaskInboundMessage, type TaskInboundUpdate, type TaskProgress, type TaskView } from "#tasks/types.js"; /** * Appends one full task view to the owning task run's `eve.task` * stream. Only the task run workflow calls this, which is what makes * the run the single writer readers can trust without re-validating. */ export declare function appendTaskViewStep(input: { readonly activityObserver?: ActivityObserverConfig; readonly view: TaskView; }): Promise<void>; export declare function projectTaskActivity(input: { readonly activityObserver: ActivityObserverConfig | undefined; readonly settledAt: string; readonly view: TaskView; }): readonly ActivityEventV1[]; /** Appends task progress without starting a parent turn. */ export declare function appendTaskProgressStep(input: { readonly progress: TaskProgress; }): Promise<void>; /** * Wakes the parent session with a framework task notification. * * Rides the ordinary session delivery path: a parked parent starts a * turn carrying this message, while an active turn observes it at the * next safe boundary through the driver's normal delivery routing. A * parent whose session already ended is a tolerated no-op. */ export declare function wakeTaskParentStep(input: { readonly token: string; readonly view: TaskView; }): Promise<void>; /** Forwards a running child's intermediate update to its parent session. */ export declare function wakeTaskUpdateParentStep(input: { readonly token: string; readonly update: TaskInboundUpdate; readonly view: TaskView; }): Promise<void>; /** Delivers one task-authored message to the parent as a new turn. */ export declare function wakeTaskMessageParentStep(input: { readonly message: TaskInboundMessage; readonly taskId: string; readonly token: string; }): Promise<void>; /** Forwards one agent spawn or settlement request to the parent session. */ export declare function wakeTaskAgentRequestParentStep(input: { readonly request: WorkflowToolRunRequestMessage; readonly taskId: string; readonly token: string; }): Promise<void>; /** Re-emits a task child's authorization event through the parent channel. */ export declare function wakeTaskAuthorizationParentStep(input: { readonly request: WorkflowToolAuthorizationRequest; readonly taskId: string; readonly token: string; }): Promise<void>; /** Sends a workflow-body question to the owning parent's pre-model router. */ export declare function wakeWorkflowTaskInputRequestParentStep(input: { readonly request: WorkflowToolRunTaskInputRequest; readonly taskId: string; readonly token: string; }): Promise<void>; /** * Forwards answered input to the blocked child. * * The task run performs this itself so the child unblocks and the * view leaves `input_required` under one durable decision. Returns * `unreachable` when the child hook is already gone, which leaves the * outstanding batch untouched rather than reporting a task as working * when nothing received the answer. */ export declare function deliverTaskInputResponsesStep(input: { readonly answer: TaskInboundAnswerInput; readonly answerHook?: AnswerHookRoute; readonly requestIds: readonly string[]; }): Promise<"delivered" | "unreachable">; export declare function formatTaskNotification(view: TaskView): string;