import { CopilotClient, type PermissionHandler } from "@github/copilot-sdk"; import { LocalProjectRegistry } from "./agent-project-registry.ts"; export { LocalProjectRegistry } from "./agent-project-registry.ts"; export interface IdeaRoute { readonly projectUrl: string; readonly ideaId: string; } export interface AdapterCapabilities { readonly resumeSession: boolean; readonly observation: "session" | "activity" | "activityDetails"; readonly sendWhileRunning: boolean; } export type Delivery = { readonly state: "queued"; readonly boundary: string; } | { readonly state: "delivered"; readonly boundary: string; } | { readonly state: "processed"; readonly boundary: string; } | { readonly state: "unknown"; readonly reason: string; }; export type SessionObservation = { readonly type: "session"; readonly state: "running" | "idle" | "gone"; } | { readonly type: "session"; readonly state: "unknown"; readonly reason: string; } | { readonly type: "message"; readonly text: string; } | { readonly type: "tool"; readonly toolCallId: string; readonly name: string; readonly state: "started" | "succeeded" | "failed"; } | { readonly type: "toolDetails"; readonly toolCallId: string; readonly name: string; readonly state: "started"; readonly input: string; } | { readonly type: "toolDetails"; readonly toolCallId: string; readonly name: string; readonly state: "succeeded"; readonly output: string; } | { readonly type: "toolDetails"; readonly toolCallId: string; readonly name: string; readonly state: "failed"; readonly error: string; }; export interface AgentAdapter { capabilities(): Promise; start(route: IdeaRoute): Promise; observe(route: IdeaRoute): AsyncIterable; send(route: IdeaRoute, message: string): AsyncIterable; events(route: IdeaRoute): AsyncIterable; close(): Promise; } export declare class CopilotAdapter implements AgentAdapter { #private; constructor(options: { onPermissionRequest: PermissionHandler; client?: CopilotClient; registry?: LocalProjectRegistry; }); capabilities(): Promise; start(route: IdeaRoute): Promise; close(): Promise; observe(route: IdeaRoute): AsyncIterable; send(route: IdeaRoute, message: string): AsyncIterableIterator; events(route: IdeaRoute): AsyncIterable; } //# sourceMappingURL=agent-copilot.d.ts.map