diff --git a/backend/src/services/sse-aggregator.ts b/backend/src/services/sse-aggregator.ts index 2aa2d9aa..00f733a1 100644 --- a/backend/src/services/sse-aggregator.ts +++ b/backend/src/services/sse-aggregator.ts @@ -34,7 +34,7 @@ type ReplayEventType = 'permission.asked' | 'form.created' | 'session.status' const { RECONNECT_DELAY_MS, MAX_RECONNECT_DELAY_MS } = DEFAULTS.SSE const MULTILINE_PATTERN = /[\r\n]/ -const LOCATION_CATALOG_EVENT_TYPES = new Set(['command.updated', 'agent.updated', 'skill.updated']) +const LOCATION_CATALOG_EVENT_TYPES = new Set(['command.updated', 'agent.updated', 'skill.updated', 'model.updated', 'provider.updated', 'integration.updated']) function serializeEnvelope(directory: string | null, payloadJson: string): string { return '{"directory":' + JSON.stringify(directory) + ',"payload":' + payloadJson + '}' diff --git a/backend/test/services/sse-aggregator.test.ts b/backend/test/services/sse-aggregator.test.ts index f4545f41..dfbf1c06 100644 --- a/backend/test/services/sse-aggregator.test.ts +++ b/backend/test/services/sse-aggregator.test.ts @@ -805,7 +805,7 @@ describe('SSEAggregator location-scoped catalog event broadcast', () => { sseAggregator.setScheduledSessionsResolver(() => []) }) - it.each(['command.updated', 'agent.updated', 'skill.updated'])( + it.each(['command.updated', 'agent.updated', 'skill.updated', 'model.updated', 'provider.updated', 'integration.updated'])( 'broadcasts a location-scoped %s catalog event to every client without leaking other location-scoped events', (type) => { const subscribed = createCapturingClient() diff --git a/frontend/src/contexts/EventContext.test.tsx b/frontend/src/contexts/EventContext.test.tsx index 31218351..3ebf199d 100644 --- a/frontend/src/contexts/EventContext.test.tsx +++ b/frontend/src/contexts/EventContext.test.tsx @@ -856,6 +856,7 @@ describe('EventProvider permissions and forms', () => { expect(invalidateQueries).toHaveBeenCalledWith({ queryKey: ['opencode', 'commands'] }) expect(invalidateQueries).toHaveBeenCalledWith({ queryKey: ['opencode', 'agents'] }) expect(invalidateQueries).toHaveBeenCalledWith({ queryKey: ['opencode', 'skills'] }) + expect(invalidateQueries).toHaveBeenCalledWith({ queryKey: ['opencode', 'providers'] }) }) }) @@ -880,6 +881,7 @@ describe('EventProvider permissions and forms', () => { expect(invalidateQueries).toHaveBeenCalledWith({ queryKey: ['opencode', 'commands'] }) expect(invalidateQueries).toHaveBeenCalledWith({ queryKey: ['opencode', 'agents'] }) expect(invalidateQueries).toHaveBeenCalledWith({ queryKey: ['opencode', 'skills'] }) + expect(invalidateQueries).toHaveBeenCalledWith({ queryKey: ['opencode', 'providers'] }) }) }) diff --git a/frontend/src/contexts/EventContext.tsx b/frontend/src/contexts/EventContext.tsx index cd8fd19c..ad23bbc3 100644 --- a/frontend/src/contexts/EventContext.tsx +++ b/frontend/src/contexts/EventContext.tsx @@ -33,6 +33,7 @@ const LOCATION_CATALOG_QUERY_KEYS = [ ['opencode', 'commands'], ['opencode', 'agents'], ['opencode', 'skills'], + ['opencode', 'providers'], ] as const type PermissionsBySession = Record