Add ui/notifications/request-teardown notification for view-initiated termination (#215)
* Add ui/close-resource request for UI to initiate termination * Add missing METHOD export * Fix typo in remaining ui/request-close * Align spec terminology to teardown/termination instead of close/clearnup * Implement final comments * Removing view behavior on initiation of request termination
This commit is contained in:
parent
296b5921fb
commit
c026b398a1
1 changed files with 195 additions and 5 deletions
13
src/generated/schema.ts
generated
13
src/generated/schema.ts
generated
|
|
@ -478,6 +478,19 @@ export const McpUiSupportedContentBlockModalitiesSchema = z.object({
|
|||
.describe("Host supports structured content."),
|
||||
});
|
||||
|
||||
/**
|
||||
* @description Notification for app-initiated teardown request (View -> Host).
|
||||
* Views send this to request that the host tear them down. The host decides
|
||||
* whether to proceed - if approved, the host will send
|
||||
* `ui/resource-teardown` to allow the view to perform cleanup before being
|
||||
* unmounted.
|
||||
* @see {@link app.App.requestTeardown} for the app method that sends this
|
||||
*/
|
||||
export const McpUiRequestTeardownNotificationSchema = z.object({
|
||||
method: z.literal("ui/notifications/request-teardown"),
|
||||
params: z.object({}).optional(),
|
||||
});
|
||||
|
||||
/**
|
||||
* @description Capabilities supported by the host application.
|
||||
* @see {@link McpUiInitializeResult `McpUiInitializeResult`} for the initialization result that includes these capabilities
|
||||
|
|
|
|||
Loading…
Reference in a new issue