-
Notifications
You must be signed in to change notification settings - Fork 1.2k
SEP-1319: Decouple Request Payloads + _meta erasure fix (#1284) + "breaking" arbitrary params fix #1692
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
SEP-1319: Decouple Request Payloads + _meta erasure fix (#1284) + "breaking" arbitrary params fix #1692
Conversation
|
Note that the failed workflow appears to be an issue with the E: rebased since GHA workflows seem to be happier now |
Co-authored-by: Jonathan Hefner <[email protected]>
7437471 to
48b7231
Compare
|
Thank you |
|
@ccreighton-apptio @dsp-ant I think this change is causing build failures in the TS SDK now because they don't have complementary type compatibility tests. Mind helping me figure out the right path forward for a (somewhat) unrelated PR of mine: https://github.com/modelcontextprotocol/typescript-sdk/pull/816/files? |
|
@ksinder looks like there's a couple things going on - the first is that the removal of arbitrary params is causing some failures, but after that, it looks like I made a mistake while initially combining and later separating
I've opened #1770 to fix the arguments type change. Poking at the arbitrary params change, some of that is just removing E: I've stolen your list of |
Adds definitions for
params?on allRequests that avoid overwriting extended interfaces, while still allowing base models to be extended with custom functionality, implementing SEP-1319 in the process, and fixing allowance for arbitraryparamsin 7 models.Motivation and Context
In #1284, it's suggested to use
_metaontools/list& other requests, but this isn't currently possible.The cleanest approach, IMO, to solving that issue involves implementing SEP-1319.
While doing so, I believe it would make sense to "bite the bullet" on a breaking change to what I believe is unintentional behavior present in the 7 models which were not affected by
_metaerasure.This PR represents what I believe is the preferred approach over #1520 which does not include the breaking changes to 7 models. If 1520 is merged, this PR will be updated to reflect a continued desire to address the bug that allows usage of arbitrary params in models that don't override them.
Please note that the introduction of non-arbitrary params to any of these 7 models would also be a breaking change in the future unless support for arbitrary params is retained at that time. In the event someone has already made "unofficial" use of the support for arbitrary params, even defining a non-arbitrary param while retaining support for other arbitrary params would also be a potentially breaking change. As a result, I believe it is best to address this issue sooner than later.
How Has This Been Tested?
Defined a sample
ListToolsRequestto ensure that both_metaandcursorwere supported params:Defined a sample
PingRequestto ensure that arbitrary params are no longer allowed:Breaking Changes
Yes, if people have used the spec-supported ability to send arbitrary
paramsfor the models which do not override it:[key: string]: unknown;was part of theparamsdefinition for any type which didn't override the definition fromRequestorNotification. If support for arbitrary params was used, this will no longer be allowed.This is breaking for the following types:
PingRequestListRootsRequestInitializedNotificationResourceListChangedNotificationPromptListChangedNotificationToolListChangedNotificationRootsListChangedNotificationPlease see further discussion here, and follow-up here.
Types of changes
Checklist
Additional context