Repository navigation
feat(mcp): stack-nudge's events over MCP Events, push and poll - #288
Merged
Merged
Conversation
StuBehan
force-pushed
the
feat/mcp-write
branch
from
November 25, 2026 00:34
22427ab to
ccb827a
Compare
StuBehan
force-pushed
the
feat/mcp-events
branch
from
November 25, 2026 00:34
8cbe510 to
6be3751
Compare
As sessions_list and event:session do, and as the design lists them. The filter is repo too.
StuBehan
force-pushed
the
feat/mcp-events
branch
from
November 25, 2026 00:45
6be3751 to
876480d
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.
Third of four for the local MCP server, following #287. This is the subscribe side, over the MCP Events extension (
io.modelcontextprotocol/events), so a client can be told what stack-nudge knows instead of pollingsessions_list.Six event types:
session.waitinga session is blocked on you,session.stoppeda turn finished,session.stalledthe stalled rule fired. Filter byagentorreponudge.raisedanything that isn't an agent's own lands in Events: GitHub, a script, an extension, a client's notify. Filter bysourceortagquota.thresholda usage window crossed the alert thresholdsettings.changedwith the old and new value and who changed it (Settings, the config file, or the MCP client by name)Payloads are kept to who and where: no prompt text, tool input or message body, and the repo's name rather than its path, the same as
sessions_list.events/list,events/pollandevents/stream(push, with a heartbeat the client can tune between 5 s and 5 min). Webhook delivery isn't offered, that needs an authenticated https callback and belongs to the relay in the design doctruncatedrather than silently skippingsubscriptions/listengetseventsListChanged, which phase 4 uses when extensions' event types come and goLocally I had a client listening to
settings.changedwhile another changed settings, and streams filtered by key or source only got their own. It's also where the config-load fix in #286 came from, every launch used to stream 17 changes.Tests:
MCPEventsTests(the hub, cursors and gaps, filters, payloads without prompt text, streams and heartbeats on a session) pass.