eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
24 lines (23 loc) • 1.11 kB
TypeScript
import type { DurableSessionState } from "#execution/durable-session-store.js";
import type { TaskAgentRequestDelivery } from "#tasks/types.js";
export interface AgentRequestDelivery {
readonly ownerId: string;
readonly replyTo: TaskAgentRequestDelivery["replyTo"];
readonly request: TaskAgentRequestDelivery["request"];
readonly taskId?: string;
}
export interface TaskAgentRequestContext {
readonly sessionWritable: WritableStream<Uint8Array>;
readonly serializedContext: Record<string, unknown>;
readonly sessionState: DurableSessionState;
}
export interface AppliedTaskAgentRequest {
readonly serializedContext: Record<string, unknown>;
readonly sessionState: DurableSessionState;
}
/**
* Applies one workflow-owned agent request to the parent session: `agent-invoke`
* spawns the child with parent-owned material and `agent-settled` releases the
* handle. Child authorization and HITL ride their own task envelope arms.
*/
export declare function applyTaskAgentRequest(delivery: AgentRequestDelivery, ctx: TaskAgentRequestContext): Promise<AppliedTaskAgentRequest>;