Skip to content

refactor: move transport logic to a ToolboxTransport class#188

Merged
twishabansal merged 13 commits intomainfrom
transport-refactor
Jan 9, 2026
Merged

refactor: move transport logic to a ToolboxTransport class#188
twishabansal merged 13 commits intomainfrom
transport-refactor

Conversation

@twishabansal
Copy link
Contributor

@twishabansal twishabansal commented Jan 5, 2026

PR 1 for MCP support

Summary

Refactors the SDK's core logic to decouple transport-level concerns from the ToolboxClient and ToolboxTool classes. This change introduces a dedicated ToolboxTransport class to handle low-level HTTP communication, mirroring recent architectural improvements made in the Python SDK.

Changes

  • New ToolboxTransport Class: Created a standalone transport layer responsible for managing Axios instances, resolving dynamic client headers, and executing GET/POST requests.
  • Client Refactoring: Updated ToolboxClient to delegate manifest fetching and session management to the new transport layer.
  • Tool Refactoring: Updated ToolboxTool to utilize the transport layer for tool invocation, ensuring a cleaner separation between parameter validation and network execution.
  • Error Handling: Standardized API error logging and response validation within the transport layer to improve maintainability.
  • Testing: Added/updated test coverage to ensure the refactored transport logic correctly handles header resolution and error states.

@twishabansal twishabansal changed the title Transport refactor refactor: move transport logic to a ToolboxTransport class Jan 5, 2026
@twishabansal twishabansal marked this pull request as ready for review January 5, 2026 14:34
@twishabansal twishabansal requested a review from a team January 5, 2026 14:34
@twishabansal twishabansal merged commit 202ebab into main Jan 9, 2026
9 checks passed
@twishabansal twishabansal deleted the transport-refactor branch January 9, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants