feat(server): session-scoped elicitation sink for API/server runtimes (#3584)#3625
Merged
Conversation
aheritier
force-pushed
the
feat/tui-background-elicitations
branch
from
July 15, 2026 19:33
d2926c8 to
4b4ed27
Compare
aheritier
force-pushed
the
feat/server-session-elicitation-sink
branch
from
July 15, 2026 19:33
85124bc to
836e723
Compare
aheritier
force-pushed
the
feat/server-session-elicitation-sink
branch
from
July 15, 2026 20:32
836e723 to
3c7d997
Compare
aheritier
force-pushed
the
feat/tui-background-elicitations
branch
from
July 15, 2026 20:47
af5ba07 to
f445d3e
Compare
aheritier
force-pushed
the
feat/server-session-elicitation-sink
branch
from
July 15, 2026 20:47
3c7d997 to
a91131a
Compare
aheritier
force-pushed
the
feat/server-session-elicitation-sink
branch
from
July 16, 2026 08:05
a91131a to
53f2f40
Compare
aheritier
marked this pull request as ready for review
July 16, 2026 08:07
melmennaoui
approved these changes
Jul 16, 2026
Sayt-0
approved these changes
Jul 16, 2026
Member
|
@aheritier some commits are not signed can you check ? |
dgageot
approved these changes
Jul 16, 2026
aheritier
force-pushed
the
feat/server-session-elicitation-sink
branch
from
July 16, 2026 10:04
53f2f40 to
affcf18
Compare
Register a session-scoped elicitation sink on every API/server runtime so that background elicitations are routed to a lazily-created session event log rather than being fast-declined by the headless path (which fires when no sink is registered). Previously only the TUI registered an OnElicitationRequest sink, meaning every API-created runtime had none. The headless elicitation handler therefore declined all background elicitations immediately, even when a remote SSE client could have answered them via `POST .../elicitation`. The session-scoped event log is now created on demand the first time an out-of-band event is raised, making the session's `GET .../events` stream replayable without requiring an attached `--listen` runtime. Tests pin the lazy-creation behaviour and confirm that repeated sink invocations accumulate events rather than overwriting an existing event log. Documentation is updated to reflect that `GET .../events` is also available for any API-created session that has raised at least one out-of-band event. Closes: #3584
aheritier
force-pushed
the
feat/server-session-elicitation-sink
branch
from
July 16, 2026 10:05
affcf18 to
6a685c8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(server): session-scoped elicitation sink for API/server runtimes (#3584)
Summary
Lets elicitation (user-input) requests raised by API/server-created runtimes — including background jobs — reach a connected client, instead of being misclassified as headless and silently fast-declined. Part 4 (top) of the #3584 stack.
Stacked on the TUI/app PR — review the diff against that branch.
What changed
runtimeForSessionregisters a per-sessionOnElicitationRequestsink that appends elicitation events to a lazily created session event log, replayable viaGET /api/sessions/:id/events./eventsstream receivessession_exitedand terminates rather than blocking forever./eventsout-of-band elicitation flow on API-created sessions, and the answer-vs-raise wording on the POST endpoint.Testing
/eventsstream; server-side background elicitations surface instead of fast-declining.task dev+-race— green.