Skip to content

Conversation

bhouston
Copy link
Member

@bhouston bhouston commented Mar 5, 2025

Description

This PR refactors the toolAgent structure to complete the migration from the deprecated toolAgent.ts file to a modular directory structure.

Changes

  • Moved the main toolAgent implementation from index.ts to toolAgentCore.ts
  • Updated index.ts to re-export from toolAgentCore.ts and other modules
  • Removed the deprecated toolAgent.ts file
  • Updated all direct imports to use the new structure
  • Updated documentation in README.md
  • Fixed duplicate re-export issues in toolAgent/index.ts
  • Replaced any type with Record<string, unknown> and unknown[] where appropriate
  • Removed re-exports from non-index files
  • Standardized import paths to use the index.ts file consistently

Benefits

  • Clearer code organization with more meaningful file names
  • Reduced technical debt by removing deprecated file
  • All imports now use the recommended path
  • Improved maintainability with modular design
  • Follows best practices for re-exports (only in index.ts files)

Testing

All existing functionality continues to work with the new structure. No behavioral changes were made, only structural refactoring.

Closes #92

bhouston added 3 commits March 5, 2025 08:01
…e imports

- Move main toolAgent implementation from index.ts to toolAgentCore.ts\n- Update index.ts to re-export from toolAgentCore.ts\n- Remove deprecated toolAgent.ts file\n- Update all direct imports to use the new structure\n- Update documentation in README.md\n\nCloses #92
@bhouston
Copy link
Member Author

bhouston commented Mar 5, 2025

Also fixes #91

@bhouston bhouston merged commit 3e96869 into main Mar 5, 2025
2 checks passed
Copy link

sentry-io bot commented Mar 6, 2025

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ AI_APICallError: Bad Request toolAgent(toolAgentCore.ts) View Issue
  • ‼️ AI_RetryError: Failed after 3 attempts. Last error: Cannot connect to API: 4008BEEE01000000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355: toolAgent(toolAgentCore.ts) View Issue
  • ‼️ AI_APICallError: Invalid JSON response toolAgent(toolAgentCore.ts) View Issue
  • ‼️ Error: Error calling Anthropic API: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.2: tool_result blocks can only be in user messages"}} AnthropicProvider.generateText(anthropic.ts) View Issue

Did you find this useful? React with a 👍 or 👎

Copy link

🎉 This PR is included in version mycoder-agent-v1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@bhouston bhouston deleted the refactor-toolagent-structure branch March 12, 2025 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor toolAgent structure

1 participant