import type { ToolResultRenderMode, ToolResultRenderModeConfig } from '../types/config.js'; import type { Tool } from '../types/tool.js'; export declare const DEFAULT_TOOL_RESULT_RENDER_MODE: ToolResultRenderMode; /** * Normalize a raw value to a {@link ToolResultRenderMode}. Accepts the * canonical strings (`'extend' | 'simple'`) plus a few synonyms so the * slash command feels forgiving (`extended`/`full` → `extend`, * `short`/`brief` → `simple`). Returns `undefined` for anything else so * the caller can reject unknown input without throwing. */ export declare function normalizeToolResultRenderMode(value: unknown): ToolResultRenderMode | undefined; /** * Look up the result-render mode for `toolName` from a config map. Falls * back to the default `'extend'` when the map is missing the entry. */ export declare function resolveToolResultRenderMode(modes: ToolResultRenderModeConfig | undefined, toolName: string): ToolResultRenderMode; /** * Subset of {@link import('../registry/tool-registry.js').ToolRegistry} * the result-render-mode setters need. Decouples this module from the * concrete registry class so it can be reused by tests and by tools * that wrap their own registry. */ export interface ToolResultRenderModeRegistryLike { get(name: string): Tool | undefined; setResultRenderMode?(name: string, mode: ToolResultRenderMode): boolean; applyResultRenderModes?(modes?: ToolResultRenderModeConfig): { applied: number; missing: string[]; }; getResultRenderMode?(name: string): ToolResultRenderMode; } /** * Set a single tool's result-render mode on a registry. Prefers the * registry's native accessor (so it can update any internal state, e.g. * usage caches); falls back to a no-op so callers stay decoupled from * the registry implementation. */ export declare function setToolResultRenderMode(registry: ToolResultRenderModeRegistryLike, name: string, mode: ToolResultRenderMode): boolean; /** * Look up the current result-render mode for a single tool. Returns the * registry's view if it has one, otherwise the default. This is what the * tool-executor calls on each tool invocation to decide whether the next * `writeToolResult` should be `simple` or `extend`. */ export declare function getToolResultRenderMode(registry: ToolResultRenderModeRegistryLike, name: string): ToolResultRenderMode; /** * Bulk-apply a config map (`tools.resultRenderMode`) to a registry. * Mirrors {@link import('./tool-description-mode.js').applyToolDescriptionModes} * for symmetry with the LLM-side description mode. */ export declare function applyToolResultRenderModes(registry: ToolResultRenderModeRegistryLike, modes?: ToolResultRenderModeConfig): { applied: number; missing: string[]; }; //# sourceMappingURL=tool-result-render-mode.d.ts.map