-
Notifications
You must be signed in to change notification settings - Fork 51
Closed
Description
Remove re-export indirection in toolAgent/index.ts
Problem
The toolAgent
module currently uses an index.ts file that simply re-exports functionality from other files in the same directory. This adds unnecessary indirection and complexity to the codebase. Re-exports within a package make the code harder to follow and can obscure the actual source of functions and types.
Current structure in /packages/agent/src/core/toolAgent/index.ts
:
export { toolAgent } from './toolAgentCore.js';
export * from './config.js';
export * from './messageUtils.js';
export * from './toolExecutor.js';
export * from './tokenTracking.js';
export * from './types.js';
Proposed Solution
Remove the index.ts
file and update all imports to reference the source files directly. This will:
- Make the code more maintainable by removing a layer of indirection
- Improve clarity by making it obvious where types/functions are defined
- Simplify the codebase structure
Affected Files
/packages/agent/src/core/toolAgent/index.ts
(to be removed)/packages/agent/src/index.ts
(update imports)/packages/agent/src/tools/interaction/subAgent.ts
(update imports)- Any other files that import from this index.ts
Implementation Notes
This is a breaking change for any external consumers that directly import from this path, but the fix is straightforward - updating import paths to point to the source files.
Metadata
Metadata
Assignees
Labels
No labels