UNPKG

eve

Version:

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

38 lines (37 loc) 1.97 kB
import type { ContextReader } from "#context/key.js"; import { type PreparedCoordinationDispatch } from "#execution/coordination-dispatch-shared.js"; import { type DurableSessionState } from "#execution/durable-session-store.js"; import type { RuntimeAgentDispatchRequest } from "#shared/action-types.js"; import type { RuntimeSubagentDispatchFailure } from "#shared/action-types.js"; import type { AgentInvocationRequest } from "#execution/tools/subagent/invoke-agent.js"; import { type CompiledBundle } from "#runtime/sessions/runtime-context-keys.js"; import type { DynamicRemoteAgentConfig } from "#runtime/subagents/dynamic-remote-agent-config.js"; import { type RuntimeAgentHandleAction, type RuntimeSession } from "#subagents/handle-dispatch.js"; import type { SubagentStartTarget } from "#execution/tools/subagent/start.js"; export type OwnerAgentDispatchPlanEntry = { readonly kind: "resume"; readonly action: RuntimeAgentHandleAction; readonly agentId: string; readonly dynamicRemoteAgent?: DynamicRemoteAgentConfig; } | { readonly kind: "reject"; readonly result: RuntimeSubagentDispatchFailure; } | { readonly kind: "start"; readonly target: SubagentStartTarget; }; /** Prepares one workflow-owner agent invocation from durable inputs. */ export declare function prepareOwnerAgentInvocation(input: { readonly invocation: AgentInvocationRequest["input"]; readonly invocationId: string; readonly knownAgentIds?: readonly string[]; readonly serializedContext: Record<string, unknown>; readonly sessionState: DurableSessionState; }): Promise<Omit<PreparedCoordinationDispatch<OwnerAgentDispatchPlanEntry>, "sessionState">>; export declare function planAgentDispatch(input: { readonly action: RuntimeAgentDispatchRequest; readonly bundle: CompiledBundle; readonly ctx: ContextReader; readonly knownAgentIds?: readonly string[]; readonly session: RuntimeSession; }): OwnerAgentDispatchPlanEntry;