Skip to content

Commit 981b6d5

Browse files
committed
fix(acp-client): enforce schema properties
Updated the structured-output schema in the ACP client test to set additionalProperties:false, resolving the Codex validation error. Re-ran npm run acp:e2e and confirmed the stream writes successfully to /tmp/headless-coder-sdk.
1 parent 900d576 commit 981b6d5

File tree

1 file changed

+9
-8
lines changed
  • packages/acp-server/client/src

1 file changed

+9
-8
lines changed

packages/acp-server/client/src/test.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,15 @@ async function createSession(provider: string) {
4141
async function streamMessage(sessionId: string): Promise<string> {
4242
await mkdir(STREAM_DIR, { recursive: true });
4343
const outPath = path.join(STREAM_DIR, `stream-${Date.now()}.ndjson`);
44-
const schema = {
45-
type: 'object',
46-
properties: {
47-
summary: { type: 'string' },
48-
risks: { type: 'array', items: { type: 'string' }, minItems: 1 },
49-
},
50-
required: ['summary', 'risks'],
51-
} as const;
44+
const schema = {
45+
type: 'object',
46+
properties: {
47+
summary: { type: 'string' },
48+
risks: { type: 'array', items: { type: 'string' }, minItems: 1 },
49+
},
50+
required: ['summary', 'risks'],
51+
additionalProperties: false,
52+
} as const;
5253

5354
const response = await fetch(`${BASE_URL}/api/acp/messages?stream=true`, {
5455
method: 'POST',

0 commit comments

Comments
 (0)