UNPKG

eve

Version:

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

45 lines (44 loc) • 1.93 kB
import type { ActivityObserverConfig } from "#channel/types.js"; import type { AnswerHookRoute } from "#harness/proxy-input-requests.js"; import type { ActivityEventV1 } from "#protocol/activity.js"; import type { WorkflowToolRunRequestMessage, WorkflowToolRunReport } from "#execution/tools/workflow/messages.js"; import { type TaskView, type TaskInboundAnswerInput } from "#tasks/types.js"; type TaskParentNotification = { readonly view: TaskView; readonly update?: { readonly report: WorkflowToolRunReport; readonly index: number; }; } | { readonly taskId: string; readonly request: WorkflowToolRunRequestMessage; }; /** Delivers task outcomes, updates, and requests through the parent's session inbox. */ export declare function notifyTaskParent(input: TaskParentNotification & { readonly token: string; }): Promise<void>; /** Emits task activity without storing a second task-state record. */ export declare function emitTaskActivityStep(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[]; /** * 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 {};