🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
🔨 chore: remove redundant update-status call from GatewayStreamNotifier (#13655)
Arvin Xu53786e30b6df
diff --git a/src/server/modules/AgentRuntime/GatewayStreamNotifier.ts b/src/server/modules/AgentRuntime/GatewayStreamNotifier.tsindex 4dbcd96fe51..933b70d51aa 100644--- a/src/server/modules/AgentRuntime/GatewayStreamNotifier.ts+++ b/src/server/modules/AgentRuntime/GatewayStreamNotifier.ts@@ -96,14 +96,6 @@ export class GatewayStreamNotifier implements IStreamEventManager {type: 'agent_runtime_end',});- const status =- reason === 'error' ? 'error' : reason === 'interrupted' ? 'interrupted' : 'completed';- this.httpPost('/api/operations/update-status', {- operationId,- status,- summary: reasonDetail,- });-return result;}diff --git a/src/server/modules/AgentRuntime/__tests__/GatewayStreamNotifier.test.ts b/src/server/modules/AgentRuntime/__tests__/GatewayStreamNotifier.test.tsindex bd3c6e8a7cd..da3e109592d 100644--- a/src/server/modules/AgentRuntime/__tests__/GatewayStreamNotifier.test.ts+++ b/src/server/modules/AgentRuntime/__tests__/GatewayStreamNotifier.test.ts@@ -144,27 +144,15 @@ describe('GatewayStreamNotifier', () => {]);});- it('calls gateway push-event and update-status endpoints', async () => {+ it('calls gateway push-event endpoint only (no update-status)', async () => {await notifier.publishAgentRuntimeEnd('op-1', 2, {}, 'completed', 'All done');await new Promise((r) => setTimeout(r, 50));const urls = mockFetch.mock.calls.map((c: any[]) => c[0]);expect(urls).toContain(`${gatewayUrl}/api/operations/push-event`);- expect(urls).toContain(`${gatewayUrl}/api/operations/update-status`);- });-- it('maps error reason to error status', async () => {- await notifier.publishAgentRuntimeEnd('op-1', 0, {}, 'error', 'Something broke');-- await new Promise((r) => setTimeout(r, 50));-- const statusCall = mockFetch.mock.calls.find(- (c: any[]) => c[0] === `${gatewayUrl}/api/operations/update-status`,- );- expect(statusCall).toBeDefined();- const body = JSON.parse(statusCall![1].body);- expect(body.status).toBe('error');+ // Gateway handles session completion directly in pushEvent on agent_runtime_end+ expect(urls).not.toContain(`${gatewayUrl}/api/operations/update-status`);});});