import type { ThinkingLevel } from "@ch1nyzzz/pi-ai"; import type { EvoCapabilityResourceUsage, EvoCapabilityService } from "./service.ts"; export interface EvoSpawnAgentRequest { model: string; prompt: string; maxOutputTokens: number; tools: string[]; reasoning?: ThinkingLevel; } export interface EvoSpawnAgentHostResult { /** Complete JSON-safe run result. The broker persists this value in its audit log. */ result: unknown; /** Aggregate usage across every model turn in the spawned run. */ usage: EvoCapabilityResourceUsage; } export interface EvoSpawnAgentHostRunOptions { signal: AbortSignal; } /** * Trusted host adapter for creating one isolated child-agent run. * * TModel is an opaque host-only resolved-model handle. It is never serialized or * returned to the sandbox. The adapter must not place credentials in `result`, * must disable Evo/extensions in the child, and must expose only `request.tools`. */ export interface EvoRawSpawnAgentHost { resolveModel(route: string): TModel | undefined; /** * Return a deterministic conservative bound for the entire multi-turn run, * including host prompt/tool-schema overhead and the host's fixed turn limit. */ estimateReservation(model: TModel, request: EvoSpawnAgentRequest): EvoCapabilityResourceUsage; /** Enforce maxOutputTokens as an aggregate run limit and honor options.signal. */ runAgent(model: TModel, request: EvoSpawnAgentRequest, options: EvoSpawnAgentHostRunOptions): Promise; } export declare function createSpawnAgentCapabilityService(host: EvoRawSpawnAgentHost): EvoCapabilityService; //# sourceMappingURL=spawn-agent.d.ts.map