v0.2.0
Breaking Changes
-
The plural
Server.AddXXXmethods have been removed, along with theServerXXXtypes and theNewServerToolfunction.
Instead use the singularServermethodsAddTool,AddPrompt,AddResourceandAddResourceTemplate.
TheAddToolfunction partially replacesNewServerTool. -
All
ToolOptions have been removed. Instead, construct ajsonschema.Schemadirectly, using a struct literal for example, or infer a schema from a struct withjsonschema.For[T]. Struct inference now supports property descriptions by means of thejsonschemastruct tag. -
The
NewClientandNewServerfunctions take anImplementationas a first argument instead of a name and version. This allows the implementation title to be provided, and future-proofs against subsequent additions to theImplementationtype. -
The four symbols beginning
JSONPRChave been moved into a separatejsonrpcpackage.
What's Changed
-
Protocol version negotiation now follows the algorithm of the TypeScript SDK.
-
Servers advertise that they have a capability only if the corresponding feature was added. For example, a server will advertise the "prompts" capability only if
AddPromptwas called before the client and server exchange initialization messages. -
Resource template matching is now done by the full-featured github.com/yosida95/uritemplate/v3 package. By @cryo-zd.
-
The
jsonchema.For[T]function now detects cycles instead of crashing. By @albertsundjaja. -
Server.Runnow honors context cancellation. By @chriscasola. -
examples/memoryis a knowledge-graph memory server based on the one in the servers repo. By @MegaGrindStone. -
examples/rate-limitingshows how to perform session-based rate limiting. By @samthanawalla.
New Contributors
- @martinemde made their first contribution in #91
- @crspeller made their first contribution in #105
- @chriscasola made their first contribution in #111
Previous Contributors
Full Changelog: v0.1.0...v0.2.0