import type { Api, AssistantMessage, Model } from '@earendil-works/pi-ai'; import type { AgentEndEvent, ExtensionAPI, ExtensionContext } from '@earendil-works/pi-coding-agent'; /** * Registers the extension: after each turn, rephrases the reply for * speech with a small model and speaks it via macOS `say`. Falls back to * raw text if unavailable, or notifies instead of speaking when audio * can't play. * * @param pi - Subscribes to `agent_end`. */ export default function audioSummaryExtension(pi: ExtensionAPI): void; /** * Extracts spoken-candidate text from the last `agent_end` message: the * last text part of an assistant/tool message, or a user message's raw * string content. Returns `undefined` if there's no last message or its * last part isn't text (e.g. a tool call). */ export declare function extractLastMessageText(messages: AgentEndEvent['messages']): string | undefined; /** Joins every text part of an assistant response into a single string, discarding thinking/tool-call parts. */ export declare function extractAssistantMessageText(response: AssistantMessage): string; /** * Resolves the summarization model: {@link SUMMARY_MODEL} parsed as * `/` and looked up in `ctx.modelRegistry`, falling back to * `ctx.model` when unset, malformed, or unresolved. */ export declare function selectSummaryModel(ctx: ExtensionContext): Model | undefined; /** Notifies the user once that {@link SUMMARY_MODEL} didn't resolve and summarization is using the current model instead. */ export declare function notifyUnresolvedSummaryModel(ctx: ExtensionContext): void;