UNPKG

@code-yeongyu/senpi

Version:

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

33 lines • 1.62 kB
import { Type } from "typebox"; import type { ToolDefinition } from "../../types.ts"; import type { Bm25Result } from "./engine/bm25.ts"; import type { ToolSearchSource } from "./engine/document.ts"; import type { HiddenToolHint, ToolSearchService } from "./service.ts"; export declare const TOOL_SEARCH_TOOL_NAME = "tool_search"; declare const ParamsSchema: Type.TObject<{ query: Type.TString; source: Type.TOptional<Type.TUnion<[Type.TLiteral<"mcp">, Type.TLiteral<"extension">]>>; group: Type.TOptional<Type.TString>; }>; export interface ToolSearchDetails { readonly query: string; readonly matched: readonly string[]; /** Matching tools the session routes through eval only; listed, never activated (senpi#6886). */ readonly evalOnly?: readonly string[]; } /** Everything the result text needs beyond the ranked matches. */ export interface ToolSearchResultInput { readonly query: string; readonly matches: readonly Bm25Result[]; readonly evalOnlyMatches?: readonly Bm25Result[]; readonly hiddenHints: readonly HiddenToolHint[]; readonly source: ToolSearchSource | undefined; readonly group: string | undefined; readonly parametersOf: (name: string) => unknown; } type ToolSearchTool = ToolDefinition<typeof ParamsSchema, ToolSearchDetails, unknown>; /** Author the single shared tool-search definition registered by this builtin. */ export declare function createToolSearchTool(service: ToolSearchService): ToolSearchTool; export declare function buildToolSearchResultText(input: ToolSearchResultInput): string; export {}; //# sourceMappingURL=tool.d.ts.map