/** * Host-neutral adapter contract (ADR 0001). Core modules depend on this * interface only — never on a specific host's package (e.g. pi). This file * MUST import nothing from any host package. */ /** * Declares how (or whether) a host can deliver a parent notification. * Core MUST branch on this rather than assuming an interrupting channel * exists — see `NudgeManager` for the capability gate. */ export type NudgeCapability = "steer" | "followUp" | "unsupported"; export interface HostAdapter { /** Declared once at construction; core must branch on this, never assume "steer". */ readonly nudgeCapability: NudgeCapability; /** Deliver a parent notification using the host's best channel for its declared capability. */ notifyParent(text: string): Promise; /** Non-interrupting UI notification (toast/status line). */ notify(message: string, level?: "info" | "warn" | "error"): void; /** Host-resolved config directory (pi: PI_CODING_AGENT_DIR ?? ~/.pi/agent). */ readonly configDir: string; /** * Optional: resolve a model's REAL context window (tokens) from the host's * model registry, used at spawn to stamp `record.contextWindow` so the * health bar's denominator reflects long-context models (e.g. 1M) rather * than the conservative static table. An adapter that omits this is treated * as returning `undefined` (static-table fallback). MUST never throw into * the spawn path — a miss or registry error returns `undefined`. */ lookupContextWindow?(provider: string | undefined, model: string | undefined): number | undefined; } //# sourceMappingURL=adapter.d.ts.map