From 07a3bfa7369a447f0cc7dbeaf72cc1978bb9c4a4 Mon Sep 17 00:00:00 2001 From: Ben Houston Date: Tue, 11 Mar 2025 14:22:26 -0400 Subject: [PATCH] refactor: remove toolAgent/index.ts re-export file and update imports --- packages/agent/src/core/toolAgent/index.ts | 14 -------------- packages/agent/src/index.ts | 8 +++++++- packages/agent/src/tools/interaction/subAgent.ts | 4 ++-- 3 files changed, 9 insertions(+), 17 deletions(-) delete mode 100644 packages/agent/src/core/toolAgent/index.ts diff --git a/packages/agent/src/core/toolAgent/index.ts b/packages/agent/src/core/toolAgent/index.ts deleted file mode 100644 index 2be3443..0000000 --- a/packages/agent/src/core/toolAgent/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Main entry point for the toolAgent module - * Re-exports all functionality from the modular structure - */ - -// Export the main toolAgent function -export { toolAgent } from './toolAgentCore.js'; - -// Re-export everything from the module -export * from './config.js'; -export * from './messageUtils.js'; -export * from './toolExecutor.js'; -export * from './tokenTracking.js'; -export * from './types.js'; diff --git a/packages/agent/src/index.ts b/packages/agent/src/index.ts index e9bf527..a816669 100644 --- a/packages/agent/src/index.ts +++ b/packages/agent/src/index.ts @@ -25,7 +25,13 @@ export * from './tools/interaction/userPrompt.js'; // Core export * from './core/executeToolCall.js'; export * from './core/types.js'; -export * from './core/toolAgent/index.js'; +// Tool Agent Core +export { toolAgent } from './core/toolAgent/toolAgentCore.js'; +export * from './core/toolAgent/config.js'; +export * from './core/toolAgent/messageUtils.js'; +export * from './core/toolAgent/toolExecutor.js'; +export * from './core/toolAgent/tokenTracking.js'; +export * from './core/toolAgent/types.js'; // Utils export * from './tools/getTools.js'; diff --git a/packages/agent/src/tools/interaction/subAgent.ts b/packages/agent/src/tools/interaction/subAgent.ts index 914b18a..de61d7d 100644 --- a/packages/agent/src/tools/interaction/subAgent.ts +++ b/packages/agent/src/tools/interaction/subAgent.ts @@ -4,8 +4,8 @@ import { zodToJsonSchema } from 'zod-to-json-schema'; import { getDefaultSystemPrompt, getModel, - toolAgent, -} from '../../core/toolAgent/index.js'; +} from '../../core/toolAgent/config.js'; +import { toolAgent } from '../../core/toolAgent/toolAgentCore.js'; import { Tool, ToolContext } from '../../core/types.js'; import { getTools } from '../getTools.js';