[AT-230]: Add follow_up_refinement agent event type - #487
Open
dmitrycnstrc wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The newly added test introduces inconsistent string quoting that likely violates existing style/lint conventions in the spec file.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds support for a new Agent SSE event type (follow_up_refinement) so it is no longer dropped by the stream listener, and updates typings/tests to match.
Changes:
- Added
FOLLOW_UP_REFINEMENTtoAgent.EventTypesso the listener subscribes to it. - Extended TypeScript declarations with
AgentEventTypesandFollowUpRefinementEventData. - Added a unit test asserting
follow_up_refinementevents are enqueued into the stream.
File summaries
| File | Description |
|---|---|
| src/types/agent.d.ts | Adds typings for Agent.EventTypes and the new refinement event payload shape. |
| src/modules/agent.js | Registers follow_up_refinement in the static EventTypes map so it’s listened for. |
| spec/src/modules/agent.js | Adds coverage ensuring the new event type is enqueued into the readable stream. |
Review details
- Files reviewed: 2/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The change is small, consistent across runtime + typings, and includes a focused test verifying the new event type is forwarded.
Review details
- Files reviewed: 2/3 changed files
- Comments generated: 0 new
- Review effort level: Lite
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.
The agent now emits a
follow_up_refinementSSE event (a narrowing question withselectable options). The Agent module only subscribes to event types listed in
Agent.EventTypes, so the event was silently dropped from the stream.