import type { AgentMessage, AssistantMessage } from "./agent-types.js";
/**
* Runtime attestation (ADR 0005 H9). Declares the implementation status
* of each runtime export in this module. See CONTRIBUTING.md ยง Module
* attestations for the category definitions and the convention for
* updating these when sync or rebrand changes the surface.
*/
export declare const MODULE_ATTESTATIONS: {
readonly isAssistantMessage: "live";
readonly stripMinimaxToolCallXml: "live";
readonly stripDowngradedToolCallText: "live";
readonly stripThinkingTagsFromText: "live";
readonly extractAssistantText: "live";
readonly inferToolMetaFromArgs: "live";
};
export declare function isAssistantMessage(msg: AgentMessage | undefined): msg is AssistantMessage;
/**
* Strip malformed Minimax tool invocations that leak into text content.
* Minimax sometimes embeds tool calls as XML in text blocks instead of
* proper structured tool calls. This removes:
* - ... blocks
* - closing tags
*/
export declare function stripMinimaxToolCallXml(text: string): string;
/**
* Strip downgraded tool call text representations that leak into text content.
* When replaying history to Gemini, tool calls without `thought_signature` are
* downgraded to text blocks like `[Tool Call: name (ID: ...)]`. These should
* not be shown to users.
*/
export declare function stripDowngradedToolCallText(text: string): string;
/**
* Strip thinking tags and their content from text.
* This is a safety net for cases where the model outputs tags
* that slip through other filtering mechanisms.
*/
export declare function stripThinkingTagsFromText(text: string): string;
export declare function extractAssistantText(msg: AssistantMessage): string;
export declare function inferToolMetaFromArgs(toolName: string, args: unknown): string | undefined;