UNPKG

@code-yeongyu/senpi

Version:

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

32 lines • 1.78 kB
import type { AgentToolResult } from "@earendil-works/pi-agent-core"; import type { Progress } from "@modelcontextprotocol/sdk/types.js"; import type { TSchema } from "typebox"; import type { ToolDefinition } from "../../../types.ts"; import type { McpToolCatalogEntry } from "../catalog.ts"; import type { McpInvocation, McpInvocationError } from "../invocation.ts"; export interface McpToolDetails { server: string; tool: string; preview?: string; progress?: Progress; error?: McpInvocationError; } export type McpToolDefinition = ToolDefinition<TSchema, McpToolDetails | undefined, unknown>; type WarnFn = (message: string) => void; export interface McpCatalogRegistrationOptions { readonly refreshActiveSetWhenEmpty?: boolean; } export interface McpNamedCatalogEntry { readonly entry: McpToolCatalogEntry; readonly name: string; } /** Pair each catalog entry with its stable, collision-resolved mcp tool name. * Shared by the full-tool builder and the Tier-B search catalog so names never * drift between the two. */ export declare function mapMcpCatalogNames(entries: readonly McpToolCatalogEntry[], warn?: WarnFn): McpNamedCatalogEntry[]; export declare function buildMcpToolDefinitions(entries: readonly McpToolCatalogEntry[], warn?: WarnFn): McpToolDefinition[]; /** Full guarded call path for one catalog entry (lifecycle + retry + output * guard). Shared by direct/search tool definitions and the Tier-C proxy. */ export declare function executeMcpCatalogEntry(entry: McpToolCatalogEntry, args: Record<string, unknown>, signal: AbortSignal | undefined, onUpdate: Parameters<McpToolDefinition["execute"]>[3], invocation?: McpInvocation): Promise<AgentToolResult<McpToolDetails | undefined>>; export {}; //# sourceMappingURL=register.d.ts.map