import type { Message, Provider } from "@kenkaiiii/gg-ai"; import type { AgentTool } from "@kenkaiiii/gg-agent"; import type { LazyHost } from "../core/hosts/lazy.js"; export interface AppProps { /** * Provider + model + auth — passed straight to useAgentLoop. Avoids needing * a fully-constructed Agent (hook manages its own loop internally). */ provider: Provider; model: string; apiKey: string; accountId?: string; /** * Resolve fresh OAuth credentials before each turn (and on 401 retry with * `forceRefresh: true`). Without this, the static `apiKey` above is reused * forever — sessions die when the token expires mid-conversation. * Receives the *current* provider, since the user can swap via /model. */ resolveCredentials?: (provider: Provider, opts?: { forceRefresh?: boolean; }) => Promise<{ apiKey: string; accountId?: string; }>; tools: AgentTool[]; systemPrompt: string; /** * Cached host-independent prompt body. Contains a `{HOST_BLOCK}` sentinel * that the App splices a fresh host block into whenever the live host * changes. Splitting prevents reflowing tens of KB of static workflow * recipes every 3s on the polling tick. */ staticPromptBody: string; /** * Lazy host shared with the CLI. Re-detects on demand (cached 2s) so the * polling loop and the agent's tool calls see the same live adapter, * instead of each spawning their own. */ host: LazyHost; /** Prior messages for resume; empty array for fresh session. */ priorMessages: Message[]; hostName: string; hostDisplayName: string; hostAvailable: boolean; hostReason?: string; cwd: string; /** Package version for the banner. */ version: string; /** Providers the user has credentials for — used by /model selector. */ loggedInProviders: Provider[]; /** Persist session for `ggeditor continue` after each completed turn. */ persistSessions?: boolean; onShutdown: () => void; } export declare function App(props: AppProps): import("react/jsx-runtime").JSX.Element; export declare function parseModelSelection(value: string): { provider?: Provider; model: string; } | undefined; export declare function formatAgentError(err: unknown): string; //# sourceMappingURL=App.d.ts.map