/** * KHAELOR * File: src/tools/index.ts * Description: Public barrel for the tools module (Layer 2 — imports workspace and shared only). * * Author: Simon-Pierre Boucher * Contact: contact@spboucher.ai */ export type { ToolCapabilityHint, ToolContext, ToolEmittedEvent, ToolName, ToolResult, ToolResultMetadata, TruncationInfo, } from "./types.js"; export { CANCELLED_RESULT_CONTENT } from "./types.js"; export type { ParsedInput, ToolJsonSchema, ToolPropertySchema } from "./schema.js"; export { missingConditionalParam, validateToolInput } from "./schema.js"; export type { AnthropicToolParam, ToolDefinition } from "./registry.js"; export { ToolRegistry, parseToolInput } from "./registry.js"; export type { TruncateLimits, TruncatedText } from "./truncate.js"; export { needsTruncation, omissionMarker, truncateMiddleOut } from "./truncate.js"; export type { UnifiedDiff } from "./diff.js"; export { capDiff, unifiedDiff } from "./diff.js"; export type { CascadeResult, MatchSpan, NearMiss, ReplacerStrategy } from "./replacers.js"; export { STRATEGY_PHRASES, runCascade, runMultiOccurrence } from "./replacers.js"; export type { ReadInput } from "./read.js"; export { createReadTool } from "./read.js"; export type { WriteInput } from "./write.js"; export { createWriteTool } from "./write.js"; export type { EditInput } from "./edit.js"; export { createEditTool } from "./edit.js"; export type { GrepInput, GrepToolOptions } from "./grep.js"; export { createGrepTool } from "./grep.js"; export type { GlobInput } from "./glob.js"; export { createGlobTool } from "./glob.js"; export type { BashInput } from "./bash.js"; export { createBashTool } from "./bash.js"; export type { ProcessAction, ProcessInput } from "./process.js"; export { createProcessTool } from "./process.js"; import { createBashTool } from "./bash.js"; import { createEditTool } from "./edit.js"; import { createGlobTool } from "./glob.js"; import type { GrepToolOptions } from "./grep.js"; import { createGrepTool } from "./grep.js"; import { createProcessTool } from "./process.js"; import { createReadTool } from "./read.js"; import { ToolRegistry } from "./registry.js"; import { createWriteTool } from "./write.js"; /** Build the V1 registry with all seven tools (ADR-8). */ export function createDefaultToolRegistry(options: { grep?: GrepToolOptions } = {}): ToolRegistry { const registry = new ToolRegistry(); registry.register(createReadTool()); registry.register(createWriteTool()); registry.register(createEditTool()); registry.register(createGrepTool(options.grep ?? {})); registry.register(createGlobTool()); registry.register(createBashTool()); registry.register(createProcessTool()); return registry; }