kotlin-sdk/kotlin-sdk-server/api
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jeff Clyne 2f1b659efd
Adds 'instructions' string to the Server and propagates to the InitializeResult (#290)
<!-- Provide a brief summary of your changes -->

## Motivation and Context
The
[schema](cca15204f6/schema/2025-03-26/schema.ts (L192))
for the InitializeResult contains an optional 'instructions' string

## Additional context
The instructions string is included in the schema for for version
"2025-03-26"

The instructions in the Server class are given as a provider function
with the result of the provider propagated to the underlying
ServerSession. As the ServerSession change is meant to allow for a
'Singleton scoped' server class, this provides the ability to
dynamically modify the instructions at the server level but have them be
immutable per session.
 
This also refactors the `serverInfo` and `instructions` properties to be
protected. This `Server` class is open and meant to be overridden, there
is no harm in having these immutable properties available to subclasses.

This adds the serverInstructions to the client as returned from the
InitializeResult. This is used to verify the response in the Server
tests.
2025-10-03 18:12:37 +02:00
..
kotlin-sdk-server.api Adds 'instructions' string to the Server and propagates to the InitializeResult (#290) 2025-10-03 18:12:37 +02:00