UNPKG

@mastra/core

Version:
28 lines • 2.01 kB
import type { PostableMessage } from './types.js'; export declare function stripToolPrefix(name: string): string; export declare function formatArgsSummary(args: unknown): string; /** * One-line title for a tool's row in a plan/task widget. A tool that * describes itself (e.g. `execute_command`'s `description`) gets that line * verbatim — "Listing files in /workspace" reads better than * "execute_command ls -la". Otherwise fall back to `name args`. * * Not every `description` is a one-liner — issue/PR creators and MCP tools * take multi-paragraph bodies under that name — so only the first non-blank * line is used, with runs of whitespace collapsed. */ export declare function formatTaskTitle(displayName: string, argsSummary: string, args: unknown): string; export declare function formatResult(result: unknown, isError?: boolean): string; /** Format the tool header line: **toolName** `args` */ export declare function formatToolHeader(toolName: string, argsSummary: string): string; /** Format a "running" tool call message */ export declare function formatToolRunning(toolName: string, argsSummary: string, useCards: boolean): PostableMessage; /** Format a tool result message */ export declare function formatToolResult(toolName: string, argsSummary: string, resultText: string, isError: boolean, durationMs: number | undefined, useCards: boolean): PostableMessage; /** Format a tool approval request message */ export declare function formatToolApproval(toolName: string, argsSummary: string, toolCallId: string, useCards: boolean): PostableMessage; /** Format an "approved" status message (shown while tool runs) */ export declare function formatToolApproved(toolName: string, argsSummary: string, useCards: boolean, byUser?: string): PostableMessage; /** Format a "denied" status message */ export declare function formatToolDenied(toolName: string, argsSummary: string, byUser: string | undefined, useCards: boolean): PostableMessage; //# sourceMappingURL=formatting.d.ts.map