diff --git a/apps/server/src/codexAppServerManager.test.ts b/apps/server/src/codexAppServerManager.test.ts index 65a0687fbd527a0648bdb076dd4beedc6fef0e24..afb23d48a768f7c1a52b386659e1e919625682f1 100644 --- a/apps/server/src/codexAppServerManager.test.ts +++ b/apps/server/src/codexAppServerManager.test.ts @@ -350,94 +350,3 @@ describe("thread checkpoint control", () => { }); }); }); - -describe("notification forwarding", () => { - it("suppresses streamed assistant message notifications", () => { - const manager = new CodexAppServerManager(); - const emittedMethods: string[] = []; - manager.on("event", (event) => { - emittedMethods.push(event.method); - }); - - const context = { - session: { - sessionId: "sess_1", - provider: "codex", - status: "running", - threadId: "thread_1", - createdAt: "2026-02-10T00:00:00.000Z", - updatedAt: "2026-02-10T00:00:00.000Z", - }, - }; - - const handleServerNotification = ( - manager as unknown as { - handleServerNotification: ( - context: unknown, - notification: { method: string; params?: unknown }, - ) => void; - } - ).handleServerNotification.bind(manager); - - handleServerNotification(context, { - method: "item/agentMessage/delta", - params: { - itemId: "item_msg_1", - delta: "Partial text", - }, - }); - handleServerNotification(context, { - method: "item/started", - params: { - item: { - id: "item_msg_1", - type: "agentMessage", - text: "Working...", - }, - }, - }); - - expect(emittedMethods).toEqual([]); - }); - - it("keeps completed assistant message notifications", () => { - const manager = new CodexAppServerManager(); - const emittedMethods: string[] = []; - manager.on("event", (event) => { - emittedMethods.push(event.method); - }); - - const context = { - session: { - sessionId: "sess_1", - provider: "codex", - status: "running", - threadId: "thread_1", - createdAt: "2026-02-10T00:00:00.000Z", - updatedAt: "2026-02-10T00:00:00.000Z", - }, - }; - - const handleServerNotification = ( - manager as unknown as { - handleServerNotification: ( - context: unknown, - notification: { method: string; params?: unknown }, - ) => void; - } - ).handleServerNotification.bind(manager); - - handleServerNotification(context, { - method: "item/completed", - params: { - item: { - id: "item_msg_1", - type: "agentMessage", - text: "Final response", - }, - }, - }); - - expect(emittedMethods).toEqual(["item/completed"]); - }); -}); diff --git a/apps/server/src/codexAppServerManager.ts b/apps/server/src/codexAppServerManager.ts index b6cd09956f8299f248b3dfce933b8e116b8892c5..912f9b2db867aabd380a17fa2e83ab348dc97dd7 100644 --- a/apps/server/src/codexAppServerManager.ts +++ b/apps/server/src/codexAppServerManager.ts @@ -584,10 +584,6 @@ export class CodexAppServerManager extends EventEmitter