yarn build

This commit is contained in:
Justin Spahr-Summers 2024-10-21 12:36:57 +01:00
commit adfe2cb7f3
No known key found for this signature in database

19
dist/server/index.js generated vendored
View file

@ -39,15 +39,20 @@ export class Server extends Protocol {
getClientVersion() {
return this._clientVersion;
}
getCapability(reqType) {
return this._requestHandlers.has(reqType) ? {} : undefined;
}
getCapabilities() {
return {
prompts: this.getCapability(ListPromptsRequestSchema.shape.method.value),
resources: this.getCapability(ListResourcesRequestSchema.shape.method.value),
tools: this.getCapability(ListToolsRequestSchema.shape.method.value),
logging: this.getCapability(SetLevelRequestSchema.shape.method.value),
prompts: this._requestHandlers.has(ListPromptsRequestSchema.shape.method.value)
? {}
: undefined,
resources: this._requestHandlers.has(ListResourcesRequestSchema.shape.method.value)
? {}
: undefined,
tools: this._requestHandlers.has(ListToolsRequestSchema.shape.method.value)
? {}
: undefined,
logging: this._requestHandlers.has(SetLevelRequestSchema.shape.method.value)
? {}
: undefined,
};
}
}