Resource
session
No description available.
resource session;F id
id: func() -> string;Get the session ID.
F get
get: func(key: string) -> result<option<list<u8>>, session-error>;Get a persistent session context value by key.
F set
set: func(key: string, value: list<u8>) -> result<_, session-error>;Set a persistent session context value by key.
F elicit
elicit: func(res: borrow<response-stream>, elicitation: elicit-request, timeout-seconds: option<u8>) -> result<elicitation-response, elicitation-error>;Elicit information from the client. https://modelcontextprotocol.io/specification/2025-06-18/client/elicitation
F terminate
terminate: func(reason: option<string>) -> result<_, session-error>;Terminate the session, optionally providing a reason. is-active will return false after termination.
Data associated with the terminated session is NOT deleted. Use delete() to remove all session data.
Subsequent calls will have no effect.
F is-terminated
is-terminated: func() -> result<bool, session-error>;Check if the session is terminated. Returns true if the session has been terminated.
F new
new: func(bucket: bucket) -> result<session, session-error>;F open
open: func(bucket: bucket, id: string) -> result<option<session>, session-error>;F close
F delete
delete: func(session: session) -> result<bucket, session-error>;