Skip to content

Commit a2dcf7e

Browse files
committed
Specify client capabilities for e2e tests
1 parent bc30dd4 commit a2dcf7e

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

src/__tests__/CodexACPAgent/e2e/acp-e2e-test-utils.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,24 @@ export async function createGatewayFixture(
7777
});
7878
}
7979

80+
function buildClientCapabilities(): acp.ClientCapabilities {
81+
return {
82+
fs: {
83+
readTextFile: true,
84+
writeTextFile: true,
85+
},
86+
terminal: true,
87+
auth: {
88+
_meta: {
89+
gateway: true,
90+
},
91+
},
92+
_meta: {
93+
"terminal-auth": true,
94+
},
95+
};
96+
}
97+
8098
type Authenticator = (connection: acp.ClientSideConnection, authMethods: acp.AuthMethod[]) => Promise<void>;
8199

82100
async function createSpawnedFixture(
@@ -88,7 +106,7 @@ async function createSpawnedFixture(
88106

89107
const initializeResponse = await connection.initialize({
90108
protocolVersion: acp.PROTOCOL_VERSION,
91-
clientCapabilities: {},
109+
clientCapabilities: buildClientCapabilities(),
92110
clientInfo: {
93111
name: "vitest",
94112
version: "1.0.0",

0 commit comments

Comments
 (0)