UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

32 lines • 1.63 kB
import type { McpToolDefinition } from "./expose/register.ts"; import type { Client } from "./wrap.ts"; import { type McpAsyncErrorSink } from "./wrap.ts"; export interface McpCatalogDiff { readonly added: string[]; readonly removed: string[]; readonly unchanged: string[]; } /** Deterministic set diff between two catalogs, keyed by tool name. */ export declare function diffMcpToolNames(prev: readonly string[], next: readonly string[]): McpCatalogDiff; /** `/mcp status` delta line, e.g. `3 added (inactive), 1 removed`. */ export declare function formatMcpListChangedDelta(diff: McpCatalogDiff): string; export interface McpListChangeCoalescerOptions { readonly onRefresh: () => void | Promise<void>; readonly sink: McpAsyncErrorSink; readonly delayMs?: number; readonly minIntervalMs?: number; readonly scope?: string; readonly now?: () => number; } export interface McpListChangeCoalescer { notify(): void; dispose(): void; } export declare function createMcpListChangeCoalescer(options: McpListChangeCoalescerOptions): McpListChangeCoalescer; /** Register list_changed handlers for tools/resources/prompts. `setNotificationHandler` * takes effect regardless of the server's declared capabilities. Malformed * notifications fail schema validation and are dropped by the SDK before * reaching `onChange`, so the connection stays up. */ export declare function subscribeMcpListChanged(client: Client, onChange: () => void): void; export declare function buildMcpTombstoneDefinition(name: string, server: string): McpToolDefinition; //# sourceMappingURL=notifications.d.ts.map