/** * MCP / first-party tool naming helpers. * * Wire names are often `__` (see prefixedMcpToolName). * Matching and titles must use the leaf tool name so `opengeni__session_create` * and bare `session_create` resolve the same UI — without inventing previews * from argument JSON. */ import type { ToolDisplayMetadata } from "@opengeni/sdk"; import { type OpenGeniText } from "../messages/runtime.js"; import { type ToolStepPhase } from "./tool-steps.js"; /** Leaf tool name after the first `__` server boundary (or the whole name). */ export declare function mcpToolLeaf(name: string): string; /** * True when `wireName` is exactly `leaf` or ends with `__${leaf}` (MCP prefix). * Does not treat arbitrary suffixes as matches — the leaf must be the full * right-hand side after `__`. */ export declare function toolMatchesLeaf(wireName: string, leaf: string): boolean; /** * Readable label for a tool call. Opengeni's own tools read as plain steps in * the given phase ("opengeni__session_create" → "Starting a worker" while * running, "Started a worker" once done; see * `tool-steps`). Any other tool title-cases its leaf ("list_issues" → "List * issues"). A connector account is named only when the connector has several * ("List issues · alice@example.com"); the connector itself shows as its logo. */ export declare function toolDisplayName(t: OpenGeniText, name: string, display?: ToolDisplayMetadata, phase?: ToolStepPhase): string;