/** * Shared formatting utilities for action output. * * Contains HTML cleaning, quote extraction, message formatting helpers, * transcript grouping, and output format dispatch. */ import type { Message, TranscriptEntry } from "../types.js"; export interface ActionParameter { /** Parameter name in camelCase (CLI flags auto-converted to kebab-case). */ name: string; /** Parameter type. Determines CLI flag syntax and MCP Zod schema. */ type: "string" | "number" | "boolean" | "string[]"; /** Description for CLI help, MCP tool description, and documentation. */ description: string; /** Whether the parameter must be provided. */ required: boolean; /** Default value when parameter is omitted. */ default?: string | number | boolean; } export interface ActionDefinition { /** Kebab-case name. CLI command name; MCP tool name is `teams_` + snake_case. */ name: string; /** Human-readable title (MCP tool title). */ title: string; /** Full description shared across CLI help, MCP, and documentation. */ description: string; /** Typed parameter definitions. */ parameters: ActionParameter[]; /** Execute the action against a TeamsClient. */ execute: (client: import("../teams-client.js").TeamsClient, parameters: Record) => Promise; /** Format result as concise Markdown — human-readable, action-complete, with actionable IDs. */ formatConcise: (result: unknown) => string; } export type OutputFormat = "concise" | "detailed"; export type MessageOrder = "newest-first" | "oldest-first"; /** Format an action result in the specified output format. */ export declare function formatOutput(action: ActionDefinition, result: unknown, format?: OutputFormat): string; /** Strip HTML tags and decode entities from message content. */ export declare function cleanContent(content: string): string; /** Extract quoted text from HTML blockquotes, returning quote and body separately. */ export declare function extractQuote(content: string): { quote: string | null; body: string; }; /** Build a map from message ID to sender display name. */ export declare function buildSenderLookup(messages: Message[]): Map; /** Format a VTT timestamp (HH:MM:SS.mmm) as a compact time string. */ export declare function formatTimestamp(timestamp: string): string; /** Group consecutive entries by the same speaker for more readable output. */ export declare function groupBySpeaker(entries: TranscriptEntry[]): Array<{ speaker: string; startTime: string; segments: string[]; }>; //# sourceMappingURL=formatters.d.ts.map