import type { ExtensionAPI, ExtensionUIContext, ModelRegistry } from "@earendil-works/pi-coding-agent"; import type { HostAdapter, NudgeCapability } from "#src/host/adapter"; /** * Pi implementation of `HostAdapter` (ADR 0001). The sole production * adapter — see `test/host-import-boundary.test.ts` for the enforced * confinement of `@earendil-works/*` imports to this directory. */ export declare class PiHostAdapter implements HostAdapter { readonly nudgeCapability: NudgeCapability; readonly configDir: string; private readonly pi; /** * Set once `session_start` fires and pi hands us an `ExtensionUIContext`. * `ExtensionAPI` itself exposes no UI surface, so `notify()` before that * point falls back to the debug log rather than throwing. */ private ui?; /** * Parent pi `ModelRegistry`, bound at `session_start` (same lifecycle as * `ui`). Backs {@link lookupContextWindow}; absent → `undefined` (fallback). */ private modelRegistry?; constructor(pi: ExtensionAPI, configDir?: string); /** Bind the UI context obtained at `session_start` — enables `notify()`. */ setUi(ui: ExtensionUIContext): void; /** Bind the model registry obtained at `session_start`. */ setModelRegistry(registry: ModelRegistry): void; notifyParent(text: string): Promise; notify(message: string, level?: "info" | "warn" | "error"): void; /** * Resolve a model's real context window from the parent registry. Prefers an * exact `find(provider, model)` when both ids are present; with only a model * id, falls back to the first exact id match in `getAll()` (ambiguous across * providers — provider+model is preferred). Any miss, non-positive window, * or registry error yields `undefined` — never throws into the spawn path. */ lookupContextWindow(provider: string | undefined, model: string | undefined): number | undefined; } //# sourceMappingURL=adapter.d.ts.map