diff --git a/packages/server/src/server/agent/providers/codex-app-server-agent.ts b/packages/server/src/server/agent/providers/codex-app-server-agent.ts index 97dd19131..069fc466a 100644 --- a/packages/server/src/server/agent/providers/codex-app-server-agent.ts +++ b/packages/server/src/server/agent/providers/codex-app-server-agent.ts @@ -2630,12 +2630,7 @@ class CodexAppServerAgentSession implements AgentSession { if (typeof skill?.name !== "string" || typeof skill?.path !== "string") continue; skills.push({ name: skill.name, - description: - typeof skill.description === "string" - ? skill.description - : typeof skill.shortDescription === "string" - ? skill.shortDescription - : "Skill", + description: resolveSkillDescription(skill), path: skill.path, }); } @@ -4458,6 +4453,16 @@ export class CodexAppServerAgentClient implements AgentClient { } } +function resolveSkillDescription(skill: Record): string { + if (typeof skill.description === "string") { + return skill.description; + } + if (typeof skill.shortDescription === "string") { + return skill.shortDescription; + } + return "Skill"; +} + export const __codexAppServerInternals = { buildCodexAppServerEnv, CodexAppServerClient, diff --git a/packages/server/src/server/voice-roundtrip.e2e.test.ts b/packages/server/src/server/voice-roundtrip.e2e.test.ts index 168762531..112c0d308 100644 --- a/packages/server/src/server/voice-roundtrip.e2e.test.ts +++ b/packages/server/src/server/voice-roundtrip.e2e.test.ts @@ -296,10 +296,10 @@ for (const targetProvider of [ }); const format = "audio/pcm;rate=24000;bits=16"; - const chunkBytes = 4800; // 100ms @ 24kHz mono PCM16 - for (let offset = 0; offset < inputPcm.length; offset += chunkBytes) { - const chunk = inputPcm.subarray(offset, Math.min(inputPcm.length, offset + chunkBytes)); - const isLast = offset + chunkBytes >= inputPcm.length; + const CHUNK_SIZE = 4800; // 100ms @ 24kHz mono PCM16 + for (let offset = 0; offset < inputPcm.length; offset += CHUNK_SIZE) { + const chunk = inputPcm.subarray(offset, Math.min(inputPcm.length, offset + CHUNK_SIZE)); + const isLast = offset + CHUNK_SIZE >= inputPcm.length; await withTimeout( ctx.client.sendVoiceAudioChunk(chunk.toString("base64"), format, isLast), 5000, diff --git a/packages/server/src/server/worktree-bootstrap.test.ts b/packages/server/src/server/worktree-bootstrap.test.ts index a430e8d73..822af00df 100644 --- a/packages/server/src/server/worktree-bootstrap.test.ts +++ b/packages/server/src/server/worktree-bootstrap.test.ts @@ -694,9 +694,9 @@ describe("runAsyncWorktreeBootstrap", () => { terminalRecords: StubTerminalRecord[]; repoDir: string; }): void { - const { createTerminalCalls, terminalRecords, repoDir } = params; + const { createTerminalCalls, terminalRecords, repoDir: testRepoDir } = params; expect(createTerminalCalls).toHaveLength(1); - expect(createTerminalCalls[0]?.cwd).toBe(repoDir); + expect(createTerminalCalls[0]?.cwd).toBe(testRepoDir); expect(createTerminalCalls[0]?.name).toBe("api"); expect(terminalRecords[0]?.sentInputs).toEqual(["npm run api\r"]); expect(createTerminalCalls[0]?.env).not.toHaveProperty("PORT"); @@ -717,9 +717,9 @@ describe("runAsyncWorktreeBootstrap", () => { createTerminalCalls: CreateTerminalCall[]; repoDir: string; }): Promise { - const { createTerminalCalls, repoDir } = params; + const { createTerminalCalls, repoDir: testRepoDir } = params; const plannedPorts = await ensureWorkspaceServicePortPlan({ - workspaceId: repoDir, + workspaceId: testRepoDir, services: [{ scriptName: "api" }, { scriptName: "app-server" }], allocatePort: async () => { throw new Error("Peer env test should reuse the existing service port plan");