Răsfoiți Sursa

fix(subagent-codex): drop unused initialize metadata gate

pku-xht 2 luni în urmă
părinte
comite
075b6b0756

+ 1 - 2
packages/subagent/subagent-codex/src/wire.ts

@@ -130,7 +130,7 @@ export class CodexAppServerWire {
    * @param signal - unpublished-start cancellation.
    */
   async initialize(signal: AbortSignal): Promise<void> {
-    const response = object(await this.guarded(this.transport.request('initialize', {
+    object(await this.guarded(this.transport.request('initialize', {
       clientInfo: {
         name: 'deepseek-harness',
         title: 'DeepSeek Harness',
@@ -141,7 +141,6 @@ export class CodexAppServerWire {
         requestAttestation: false,
       },
     }, signal), signal), 'initialize response')
-    string(response.userAgent, 'initialize userAgent')
     this.transport.notify('initialized')
     await this.guarded(this.transport.flush(), signal)
   }

+ 2 - 2
packages/subagent/subagent-codex/tests/subagent-codex.spec.ts

@@ -934,8 +934,8 @@ describe('run lifecycle and quiescence', () => {
     const child = fakeChild()
     const starting = startCodexRun(request(), runSpec(child))
     const initialize = await child.peer.nextMethod('initialize')
-    child.peer.respond(initialize, { userAgent: '' })
-    await expect(starting).rejects.toThrow('initialize userAgent')
+    child.peer.respond(initialize, null)
+    await expect(starting).rejects.toThrow('invalid initialize response')
     expect(child.terminate).toHaveBeenCalledTimes(1)
   })