UNPKG

eve

Version:

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

31 lines (30 loc) 2.4 kB
import type { DeliverHookPayload } from "#channel/types.js"; import type { SessionStateMap, StepInput } from "#harness/types.js"; export declare const TASK_DELIVERY_CONTEXT_LABEL = "[Task state]"; export declare const TASK_DELIVERY_INITIATING_INSTRUCTION = "Background task reporting: launch acknowledgement\nThe latest [Task state] message is runtime-authored and lists background tasks accepted so far from the current turn. They continue independently after this turn.\n\nContinue carrying out the user's request, including starting any remaining background work. When no further tool calls are needed in this turn, send one brief user-facing acknowledgement that the background work has started. Do not wait for results or report results that are not available yet. End the turn after the acknowledgement."; export declare const TASK_DELIVERY_SETTLED_INSTRUCTION = "Background task reporting\nThis turn was triggered by background task activity. The accompanying [Task state] message is runtime-authored and lists overlapping background tasks in the same cohort, potentially started across different user turns, all settled, with every available terminal output. Do not reply with <eve-empty-delivery/>. Send one user-facing response that combines their useful results."; type BackgroundTaskDelivery = DeliverHookPayload & { readonly taskDeliveryId: string; }; /** Returns task delivery provenance when a child task wakes its parent. */ export declare function getBackgroundTaskDelivery(input: unknown): BackgroundTaskDelivery | undefined; /** Marks a task-produced user message before the harness coalesces delivery results. */ export declare function markBackgroundTaskStepInput(input: StepInput): StepInput; /** Groups overlapping tasks without changing the delivered task's activity root. */ export declare function resolveTaskDeliveryContext(input: { readonly state: SessionStateMap | undefined; readonly taskDeliveryId: string; }): { readonly context: string; readonly phase: "pending" | "settled"; readonly rootTurnId: string; } | undefined; /** Returns model context for durable tasks launched by the active parent turn. */ export declare function resolveInitiatingTaskContext(input: { readonly state: SessionStateMap | undefined; readonly turnId: string; }): { readonly context: string; readonly phase: "initiating"; } | undefined; export {};