import type { RuntimeActionRequest, RuntimeActionResult } from "#shared/action-types.js"; import type { InputRequest } from "#shared/input.js"; import type { EveMessageInputRequest, EveMessageToolMetadata } from "#client/message-reducer-types.js"; /** * Normalized tool descriptor derived from a runtime action request or result. * * The default message reducer projects load-skill, subagent, remote-agent, and * plain tool calls onto a single `dynamic-tool` UI part; this descriptor is the * shared shape those variants collapse to before rendering. */ interface ActionDescriptor { readonly kind: "load-skill" | "subagent-call" | "tool-call"; readonly name: string; readonly toolName: string; } /** Projects a runtime input request onto its UI-facing subset. */ export declare function toMessageInputRequest(request: InputRequest): EveMessageInputRequest; /** Builds tool metadata for a freshly projected tool part. */ export declare function createToolMetadata(descriptor: ActionDescriptor, extra?: { readonly inputRequest?: EveMessageInputRequest; readonly label?: string; }): EveMessageToolMetadata; /** * Merges freshly derived tool metadata over any metadata already attached to a * tool part, preferring the new values while preserving earlier request and * response context. */ export declare function mergeToolMetadata(current: EveMessageToolMetadata | undefined, next: EveMessageToolMetadata): EveMessageToolMetadata; /** Maps a runtime action request onto its normalized tool descriptor. */ export declare function normalizeActionRequest(action: RuntimeActionRequest): ActionDescriptor; /** Maps a runtime action result onto its normalized tool descriptor. */ export declare function normalizeActionResult(result: RuntimeActionResult): ActionDescriptor; /** A settling call reads as its update or completion label, else as it already did. */ export declare function settledLabel(current: EveMessageToolMetadata | undefined, label: string | undefined, descriptor: ActionDescriptor): string; /** Best-effort string rendering of an unknown tool output for error display. */ export declare function stringifyUnknown(value: unknown): string; export {};