From c96165fb2f8dca7b28f27d0c658eebdf5599e026 Mon Sep 17 00:00:00 2001 From: William Valentin Date: Thu, 5 Feb 2026 17:40:13 -0800 Subject: [PATCH] feat(tools): add barrel exports and allBuiltinTools list --- src/tools/builtin/index.ts | 23 +++++++++++++++++++++++ src/tools/index.ts | 12 ++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 src/tools/builtin/index.ts create mode 100644 src/tools/index.ts diff --git a/src/tools/builtin/index.ts b/src/tools/builtin/index.ts new file mode 100644 index 0000000..00895f5 --- /dev/null +++ b/src/tools/builtin/index.ts @@ -0,0 +1,23 @@ +export { shellExecTool } from './shell.js'; +export { fileReadTool } from './file-read.js'; +export { fileWriteTool } from './file-write.js'; +export { fileEditTool } from './file-edit.js'; +export { fileListTool } from './file-list.js'; +export { webFetchTool } from './web-fetch.js'; + +import type { Tool } from '../types.js'; +import { shellExecTool } from './shell.js'; +import { fileReadTool } from './file-read.js'; +import { fileWriteTool } from './file-write.js'; +import { fileEditTool } from './file-edit.js'; +import { fileListTool } from './file-list.js'; +import { webFetchTool } from './web-fetch.js'; + +export const allBuiltinTools: Tool[] = [ + shellExecTool, + fileReadTool, + fileWriteTool, + fileEditTool, + fileListTool, + webFetchTool, +]; diff --git a/src/tools/index.ts b/src/tools/index.ts new file mode 100644 index 0000000..e7667fd --- /dev/null +++ b/src/tools/index.ts @@ -0,0 +1,12 @@ +export type { Tool, ToolCall, ToolResult, ToolInputSchema, ToolUseBlock, ToolResultBlock, ToolUseMessage, ToolResultMessage } from './types.js'; +export { ToolRegistry } from './registry.js'; +export type { AnthropicToolDef, OpenAIToolDef } from './registry.js'; +export { ToolExecutor } from './executor.js'; +export type { ToolExecutorConfig } from './executor.js'; +export { allBuiltinTools } from './builtin/index.js'; +export { shellExecTool } from './builtin/shell.js'; +export { fileReadTool } from './builtin/file-read.js'; +export { fileWriteTool } from './builtin/file-write.js'; +export { fileEditTool } from './builtin/file-edit.js'; +export { fileListTool } from './builtin/file-list.js'; +export { webFetchTool } from './builtin/web-fetch.js';