Implementation of SEP 973 - Additional metadata + icons support (#1357)
Some checks failed
Main branch checks / checks (push) Has been cancelled

This commit is contained in:
Peter Alexander 2025-09-24 20:29:04 +01:00 • committed by GitHub
commit 71889d7387
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -136,6 +136,8 @@ class Server(Generic[LifespanResultT, RequestT]):
name: str,
version: str | None = None,
instructions: str | None = None,
website_url: str | None = None,
icons: list[types.Icon] | None = None,
lifespan: Callable[
[Server[LifespanResultT, RequestT]],
AbstractAsyncContextManager[LifespanResultT],
@ -144,6 +146,8 @@ class Server(Generic[LifespanResultT, RequestT]):
self.name = name
self.version = version
self.instructions = instructions
self.website_url = website_url
self.icons = icons
self.lifespan = lifespan
self.request_handlers: dict[type, Callable[..., Awaitable[types.ServerResult]]] = {
types.PingRequest: _ping_handler,
@ -177,6 +181,8 @@ class Server(Generic[LifespanResultT, RequestT]):
experimental_capabilities or {},
),
instructions=self.instructions,
website_url=self.website_url,
icons=self.icons,
)
def get_capabilities(