-
Notifications
You must be signed in to change notification settings - Fork 3
refactor!: remove unused experimental features and internal exports #221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
BREAKING CHANGE: Remove unused public exports from the SDK Removed exports: - DEFAULT_BASE_URL: Internal implementation detail, users can override via baseUrl option - DEFAULT_HYBRID_ALPHA: Internal constant for meta tools search - Experimental_SchemaOverride: Unused type for schema overrides - Experimental_PreExecuteFunction: Unused type for pre-execute hooks - Experimental_ToolCreationOptions: Unused interface for tool creation Also removed the associated implementation in BaseTool and Tools.getTool() that supported experimental_preExecute and experimental_schemaOverride options. These features were implemented but never used in examples, tests, or documentation. This simplifies the public API surface and removes dead code.
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR removes unused experimental features and internal constants from the public API to simplify the SDK's interface. The changes are breaking but affect only undocumented functionality that was never used in examples or tests.
Key changes:
- Removed three experimental types:
Experimental_SchemaOverride,Experimental_PreExecuteFunction, andExperimental_ToolCreationOptions - Removed two internal constants from public exports:
DEFAULT_BASE_URLandDEFAULT_HYBRID_ALPHA(both remain available internally) - Simplified
BaseToolconstructor by removingexperimental_preExecuteparameter and the corresponding property - Simplified
Tools.getTool()method by removing the unused options parameter and all schema override logic
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/types.ts | Removes experimental type definitions for schema override, pre-execute function, and tool creation options |
| src/tool.ts | Removes experimental pre-execute functionality from BaseTool class and simplifies getTool() to a straightforward find operation |
| src/index.ts | Removes public exports of internal constants and experimental types while maintaining internal access |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 3 files
glebedel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary
Remove unused experimental features and internal implementation details from the public API.
What Changed
Removed exports:
DEFAULT_BASE_URL- Internal constant (users override viabaseUrloption)DEFAULT_HYBRID_ALPHA- Internal constant for meta tools searchExperimental_SchemaOverride- Unused typeExperimental_PreExecuteFunction- Unused typeExperimental_ToolCreationOptions- Unused interfaceRemoved implementation:
BaseTool.experimental_preExecuteproperty and constructor parameterTools.getTool()options parameter and associated schema override logicWhy
These experimental features were implemented but never documented, tested, or used in examples. Removing them:
Breaking Change
This is a breaking change for any users who were importing these types/constants, though usage is expected to be minimal given they were undocumented.
Summary by cubic
Removed undocumented experimental hooks and internal constants from the public API to simplify the SDK and remove dead code. This is a breaking change for anyone importing those exports or using pre-execute/schema override options.
Refactors
Migration
Written for commit e0e7023. Summary will update automatically on new commits.