@modelcontextprotocol/ext-apps 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -4
- package/dist/src/app-bridge.d.ts +2 -2
- package/dist/src/app-bridge.js +35 -17
- package/dist/src/app.d.ts +6 -6
- package/dist/src/app.js +35 -17
- package/dist/src/generated/schema.d.ts +66 -26
- package/dist/src/message-transport.d.ts +2 -2
- package/dist/src/react/index.js +35 -17
- package/dist/src/server/index.d.ts +7 -5
- package/dist/src/server/index.js +32 -14
- package/dist/src/spec.types.d.ts +50 -14
- package/dist/src/types.d.ts +1 -1
- package/package.json +4 -4
package/dist/src/app.d.ts
CHANGED
|
@@ -97,7 +97,7 @@ type RequestHandlerExtra = Parameters<Parameters<App["setRequestHandler"]>[1]>[1
|
|
|
97
97
|
* - `ontoolinput` - Complete tool arguments from host
|
|
98
98
|
* - `ontoolinputpartial` - Streaming partial tool arguments
|
|
99
99
|
* - `ontoolresult` - Tool execution results
|
|
100
|
-
* - `onhostcontextchanged` - Host context changes (theme,
|
|
100
|
+
* - `onhostcontextchanged` - Host context changes (theme, locale, etc.)
|
|
101
101
|
*
|
|
102
102
|
* These setters are convenience wrappers around `setNotificationHandler()`.
|
|
103
103
|
* Both patterns work; use whichever fits your coding style better.
|
|
@@ -216,7 +216,7 @@ export declare class App extends Protocol<AppRequest, AppNotification, AppResult
|
|
|
216
216
|
* Get the host context discovered during initialization.
|
|
217
217
|
*
|
|
218
218
|
* Returns the host context that was provided in the initialization response,
|
|
219
|
-
* including tool info, theme,
|
|
219
|
+
* including tool info, theme, locale, and other environment details.
|
|
220
220
|
* This context is automatically updated when the host sends
|
|
221
221
|
* `ui/notifications/host-context-changed` notifications.
|
|
222
222
|
*
|
|
@@ -370,12 +370,12 @@ export declare class App extends Protocol<AppRequest, AppNotification, AppResult
|
|
|
370
370
|
*/
|
|
371
371
|
set ontoolcancelled(callback: (params: McpUiToolCancelledNotification["params"]) => void);
|
|
372
372
|
/**
|
|
373
|
-
* Convenience handler for host context changes (theme,
|
|
373
|
+
* Convenience handler for host context changes (theme, locale, etc.).
|
|
374
374
|
*
|
|
375
375
|
* Set this property to register a handler that will be called when the host's
|
|
376
|
-
* context changes, such as theme switching (light/dark),
|
|
377
|
-
*
|
|
378
|
-
*
|
|
376
|
+
* context changes, such as theme switching (light/dark), locale changes, or
|
|
377
|
+
* other environmental updates. Apps should respond by updating their UI
|
|
378
|
+
* accordingly.
|
|
379
379
|
*
|
|
380
380
|
* This setter is a convenience wrapper around `setNotificationHandler()` that
|
|
381
381
|
* automatically handles the notification schema and extracts the params for you.
|