import type { InterruptibleEngine, EngineRunOpts, EngineResult } from "../shared/types.js"; import { PtyLifecycleManager } from "./pty-lifecycle.js"; import type { PtyControlEvent, PtyViewEngine, PtyIdleSpawnOpts, PtySnapshotSubscription } from "./pty-view-engine.js"; export declare class AntigravityEngine implements InterruptibleEngine, PtyViewEngine { private lifecycle; name: "antigravity"; private active; private streams; private lastGeom; private spawnParams; private mcpConfigs; constructor(lifecycle: PtyLifecycleManager); run(opts: EngineRunOpts): Promise; private buildPtyEnv; private buildArgs; private prepareCwd; private spawnParamsChanged; private updateSpawnResumeSessionId; private spawn; /** Wait for agy's TUI to settle before submitting. A fresh TUI can still be * verifying the account after it settles, so retry that explicit rejection. */ private scheduleColdInject; private injectPromptToProc; private injectPrompt; private wireProcToStream; /** Spawn an idle PTY for the xterm view (before the user sends a message). * Resumes `engineSessionId` if given, else a fresh agy TUI. */ ensureIdleSpawn(jinnSessionId: string, opts: PtyIdleSpawnOpts): void; subscribeWithSnapshot(sessionId: string, cb: (data: Buffer) => void, onControl?: (event: PtyControlEvent) => void): PtySnapshotSubscription; restartPty(sessionId: string, opts: PtyIdleSpawnOpts): void; writeStdin(sessionId: string, text: string): void; writeRaw(sessionId: string, data: string): void; resizePty(sessionId: string, cols: number, rows: number): void; setViewing(sessionId: string, viewing: boolean): void; hasWarmPty(sessionId: string): boolean; isTurnRunning(sessionId: string): boolean; kill(sessionId: string, reason?: string): void; killAll(): void; /** Recycle idle warm PTYs only (org-reload). Sessions with an in-flight turn * (`this.active`) are skipped so the active turn is never interrupted. */ killIdle(): void; isAlive(sessionId: string): boolean; } /** * env for the agy PTY: inherit EVERYTHING, force a real TERM. Do NOT strip * GEMINI_* (agy shares the ~/.gemini account dir for its cached credential). * * Antigravity reads MCP servers from Gemini's config file, while per-session * Jinn identity rides the agy child env. This full-inherit env builder keeps * agy's cached Google credential path intact and adds the caller id/capability * only when the resolved built-in jinn MCP server is attached. */ export declare function buildAntigravityPtyEnv(sessionId?: string, resolvedMcp?: EngineRunOpts["resolvedMcp"]): Record; //# sourceMappingURL=antigravity.d.ts.map