-
Notifications
You must be signed in to change notification settings - Fork 49
refactor: rename request methods to remove send prefix #161
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
commit: |
Following the MCP TS SDK convention where request methods don't have the "send" prefix (reserved for notifications): - App.sendMessage() → App.message() - App.sendOpenLink() → App.openLink() - AppBridge.sendResourceTeardown() → AppBridge.resourceTeardown() The old method names are kept as deprecated aliases for backwards compatibility. Updated all examples to use the new method names. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
3292924 to
a11a022
Compare
- Update existing tests to use new method names (message, openLink) - Add tests verifying deprecated aliases are same reference as new methods - Add tests verifying deprecated aliases still work functionally 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
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.
My thought is that this convention only works when the method name already contains a verb. For example, openLink() works, but resourceTeardown() doesn't quite work — it would need to be teardownResource(). And message() is very borderline.
But I will defer to you.
- App.message() → App.sendMessage() (with deprecated message alias) - AppBridge.resourceTeardown() → AppBridge.teardownResource() (with deprecated aliases) This better follows the pattern where methods that send data have 'send' or action verb prefix.
|
Thanks @jonathanhefner! As discussed offline:
|
The app.message alias was removed since sendMessage is the correct name. sendResourceTeardown already exists in AppBridge.
Summary
Following the MCP TS SDK convention where request methods don't have the "send" prefix (reserved for notifications):
App.sendOpenLink()→App.openLink()AppBridge.sendResourceTeardown()→AppBridge.teardownResource()The old method names are kept as deprecated aliases for backwards compatibility.
Changes
AppandAppBridgeclasses@deprecatedaliases for old method namesBackwards Compatibility
✅ Non-breaking change - deprecated aliases ensure existing code continues to work.
🤖 Generated with Claude Code