Allow servers / clients to advertise extensions in the capability object (#1630)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9aed95a79b
commit
677511b5a7
2 changed files with 66 additions and 4 deletions
|
|
@ -586,7 +586,7 @@ export interface ClientCapabilities {
|
|||
* @example Extensions — UI extension with MIME type support
|
||||
* {@includeCode ./examples/ClientCapabilities/extensions-ui-mime-types.json}
|
||||
*/
|
||||
extensions?: { [key: string]: object };
|
||||
extensions?: { [key: string]: JSONObject };
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -703,7 +703,7 @@ export interface ServerCapabilities {
|
|||
* @example Extensions — UI extension support
|
||||
* {@includeCode ./examples/ServerCapabilities/extensions-ui.json}
|
||||
*/
|
||||
extensions?: { [key: string]: object };
|
||||
extensions?: { [key: string]: JSONObject };
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -557,7 +557,11 @@ export const ClientCapabilitiesSchema = z.object({
|
|||
/**
|
||||
* Present if the client supports task creation.
|
||||
*/
|
||||
tasks: ClientTasksCapabilitySchema.optional()
|
||||
tasks: ClientTasksCapabilitySchema.optional(),
|
||||
/**
|
||||
* Extensions that the client supports. Keys are extension identifiers (vendor-prefix/extension-name).
|
||||
*/
|
||||
extensions: z.record(z.string(), JSONObjectSchema).optional()
|
||||
});
|
||||
|
||||
export const InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
|
||||
|
|
@ -635,7 +639,11 @@ export const ServerCapabilitiesSchema = z.object({
|
|||
/**
|
||||
* Present if the server supports task creation.
|
||||
*/
|
||||
tasks: ServerTasksCapabilitySchema.optional()
|
||||
tasks: ServerTasksCapabilitySchema.optional(),
|
||||
/**
|
||||
* Extensions that the server supports. Keys are extension identifiers (vendor-prefix/extension-name).
|
||||
*/
|
||||
extensions: z.record(z.string(), JSONObjectSchema).optional()
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue