Documentation
¶
Overview ¶
Package sessionctx threads the current chat session id through the per-call context.Context so tool callbacks can access it without the framework having to pass it explicitly through every layer.
Sessions are per-chat-turn, not per-process — the runtime hosts many sessions over its lifetime — so env vars are the wrong channel. Putting the value on ctx mirrors how cancellation, deadlines, and tracing IDs already flow.
Producers: pkg/agent/service.go's ChatStream wraps the ctx before invoking the model loop. Consumers: tool callbacks pull the session id when they want to stamp it onto outbound work (e.g. job_submit attaches it as the io.openotters.session-id label so /jobs filtering by session works).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.