import { ModelRuntime } from "@earendil-works/pi-coding-agent"; export type PiAgentTool = "read" | "grep" | "find" | "ls"; export type PiAgentThinkingLevel = "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max"; export type PiAgentRequest = { id: string; role: string; prompt: string; cwd: string; tools: PiAgentTool[]; timeoutMs?: number; model?: { provider: string; id: string; }; thinkingLevel?: PiAgentThinkingLevel; }; export type PiAgentResult = { id: string; text: string; model: string; thinkingLevel: PiAgentThinkingLevel; durationMs: number; }; export type PiAgentLifecycleState = "running" | "completed" | "failed" | "cancelled"; export type PiAgentLifecycleEvent = { id: string; role: string; state: PiAgentLifecycleState; phase: string; elapsedMs: number; model?: string; thinkingLevel?: PiAgentThinkingLevel; }; type PiAgentEvent = Record; type PiAgentSession = { prompt(text: string, options?: { preflightResult?: (accepted: boolean) => void; }): Promise; subscribe(listener: (event: PiAgentEvent) => void): () => void; abort(): Promise; dispose(): void | Promise; model: { provider: string; id: string; } | undefined; thinkingLevel: PiAgentThinkingLevel; }; export type PiAgentSessionFactory = (request: PiAgentRequest, context: { signal: AbortSignal; }) => Promise; export type PiAgentGroupOptions = { maxConcurrency: number; signal: AbortSignal; failFast?: boolean; maxFinalChars?: number; onLifecycle?: (event: PiAgentLifecycleEvent) => void | Promise; sessionFactory?: PiAgentSessionFactory; behaviorExtensionPaths?: string[]; now?: () => number; }; export declare class PiAgentGroupError extends Error { readonly agentId: string; readonly code: string; constructor(agentId: string, code: string, message: string); } export declare function runPiAgentGroup(input: PiAgentRequest[], options: PiAgentGroupOptions): Promise; type ModelRuntimeCreateOptions = NonNullable[0]>; type CredentialStore = NonNullable; type ModelStore = NonNullable; export declare function createEphemeralCredentialStore(signal: AbortSignal): Promise; export declare function createEphemeralModelStore(signal: AbortSignal): Promise; export {};