Repository navigation
feat(server): send plugins only their agent's subagent updates - #102
Open
jtomaszewski wants to merge 3 commits into
Open
jtomaszewski wants to merge 3 commits into
jtomaszewski wants to merge 3 commits into
Conversation
session.events.set_subscription.request takes an optional providerSubagentFilter (parentAgentIds, kinds). The daemon applies it before sending agent.provider_subagents.update to that subscription and advertises features.providerSubagentEventFilter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…used subscriptions providerSubagents.subscribe() sends a filter for its agent's upserts and removes when the host supports it. Both providerSubagents and backgroundWork subscribe() now pass a refused event subscription to onError. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Follow-up to #101. A plugin that follows provider subagents now receives only its own agent's subagent changes. Before, every
providerSubagents.subscribe()received the whole host's subagent stream, including every streamed timeline row, and dropped most of it. A subscription the host refuses now reachesonErrorinstead of ending silently.🔧 The daemon filters subagent updates per subscription
session.events.set_subscription.requesttakes an optionalproviderSubagentFilter: { parentAgentIds?: string[]; kinds?: ("upsert" | "timeline" | "remove")[] }.agent.provider_subagents.update. An omitted field doesn't filter.server_info.features.providerSubagentEventFilter. COMPAT tags are on the field, the flag and the client gate.agents.ref(id).providerSubagents.subscribe()asks for{ parentAgentIds: [id], kinds: ["upsert", "remove"] }, only from hosts that advertise the flag.providerSubagents.subscribe()andbackgroundWork.subscribe()now pass a failed event subscription toonError. The subscription ends; subscribe again to retry. Before, it ended silently and only the client log showed it.✅ Testing
session.test.tspasses (162/162).onErrorfor both handles;index.test.tspasses (40/40).These are minors from the review, left on purpose for the reviewer to decide:
onErrorfires when the host refuses the subscription. It fires on any failure of the subscribe request, including a timeout or a failure on resubscribe after a reconnect, and the subscription ends in each case. The wording should say "fails".onErrorstays silent after unsubscribe.server_infoarrives, or against an old host that later upgrades, stays unfiltered. Results are still correct, just less efficient.ownedSubscriptions, test harnesses only) sends without the filter.filtersmap would generalize better. An empty array matches nothing, and the arrays have no size limit.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.