Skip to content

Commit 71e7c46

Browse files
Update codex to 0.137.0 & fix acp skills (#183)
* chore: update codex to 0.137.0 and regenerate app-server types * chore: update codex to 0.137.0 - fix type errors * fix: skills in 0.137.0
1 parent 7e18de9 commit 71e7c46

141 files changed

Lines changed: 916 additions & 184 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package-lock.json

Lines changed: 28 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
},
6363
"dependencies": {
6464
"@agentclientprotocol/sdk": "^0.22.1",
65-
"@openai/codex": "^0.128.0",
65+
"@openai/codex": "^0.137.0",
6666
"diff": "^8.0.3",
6767
"open": "^11.0.0",
6868
"vscode-jsonrpc": "^8.2.1"

src/CodexAcpClient.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ export class CodexAcpClient {
217217
sessionId: request.sessionId,
218218
currentModelId: currentModelId,
219219
models: codexModels,
220-
currentServiceTier: response.serviceTier ?? null,
220+
currentServiceTier: response.serviceTier as ServiceTier ?? null,
221221
}
222222
}
223223

@@ -235,7 +235,7 @@ export class CodexAcpClient {
235235
sessionId: request.sessionId,
236236
currentModelId: currentModelId,
237237
models: codexModels,
238-
currentServiceTier: response.serviceTier ?? null,
238+
currentServiceTier: response.serviceTier as ServiceTier ?? null,
239239
thread: response.thread,
240240
};
241241
}
@@ -258,7 +258,7 @@ export class CodexAcpClient {
258258
sessionId: response.thread.id,
259259
currentModelId: currentModelId,
260260
models: codexModels,
261-
currentServiceTier: response.serviceTier ?? null,
261+
currentServiceTier: response.serviceTier as ServiceTier ?? null,
262262
};
263263
}
264264

@@ -332,14 +332,14 @@ export class CodexAcpClient {
332332
if (!cwd) {
333333
return;
334334
}
335-
const additionalRoots = readAdditionalRoots(meta);
335+
336+
const additionalRoots = readAdditionalRoots(meta).map(root => path.join(root, ".agents", "skills"));
337+
if (additionalRoots.length > 0) {
338+
await this.codexClient.skillsExtraRootsSet({ extraRoots: additionalRoots });
339+
}
336340
await this.codexClient.listSkills({
337341
cwds: [cwd],
338342
forceReload: true,
339-
perCwdExtraUserRoots: [{
340-
cwd: cwd,
341-
extraUserRoots: additionalRoots
342-
}]
343343
});
344344
}
345345

src/CodexAppServerClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import type {
2121
McpServerStatusUpdatedNotification,
2222
ModelListParams,
2323
ModelListResponse,
24+
SkillsExtraRootsSetParams,
2425
SkillsListParams,
2526
SkillsListResponse,
2627
ThreadLoadedListParams,
@@ -302,6 +303,7 @@ export class CodexAppServerClient {
302303
turn: {
303304
id: turnId,
304305
items: [],
306+
itemsView: "notLoaded",
305307
status: "interrupted",
306308
error: null,
307309
startedAt: null,
@@ -315,6 +317,10 @@ export class CodexAppServerClient {
315317
return await this.sendRequest({ method: "model/list", params });
316318
}
317319

320+
async skillsExtraRootsSet(params: SkillsExtraRootsSetParams): Promise<void> {
321+
return await this.sendRequest({ method: "skills/extraRoots/set", params });
322+
}
323+
318324
async listSkills(params: SkillsListParams): Promise<SkillsListResponse> {
319325
return await this.sendRequest({ method: "skills/list", params });
320326
}

src/CodexEventHandler.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ export class CodexEventHandler {
178178
case "thread/goal/cleared":
179179
case "remoteControl/status/changed":
180180
case "app/list/updated":
181+
case "thread/settings/updated":
182+
case "process/outputDelta":
183+
case "process/exited":
181184
return null;
182185
}
183186
}

src/__tests__/CodexACPAgent/CodexAcpClient.test.ts

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ describe('ACP server test', { timeout: 40_000 }, () => {
246246
inputModalities: ["text"],
247247
supportsPersonality: false,
248248
additionalSpeedTiers: [],
249+
serviceTiers: [],
250+
defaultServiceTier: null,
249251
isDefault: true
250252
}],
251253
nextCursor: null
@@ -262,10 +264,6 @@ describe('ACP server test', { timeout: 40_000 }, () => {
262264
expect(listSkillsSpy).toHaveBeenCalledWith({
263265
cwds: ["/workspace"],
264266
forceReload: true,
265-
perCwdExtraUserRoots: [{
266-
cwd: "/workspace",
267-
extraUserRoots: ["/skills/one", "/skills/two"]
268-
}]
269267
});
270268
expect(listSkillsSpy.mock.invocationCallOrder[0]!).toBeLessThan(threadStartSpy.mock.invocationCallOrder[0]!);
271269
});
@@ -450,10 +448,6 @@ describe('ACP server test', { timeout: 40_000 }, () => {
450448
expect(listSkillsSpy).toHaveBeenCalledWith({
451449
cwds: ["/workspace"],
452450
forceReload: true,
453-
perCwdExtraUserRoots: [{
454-
cwd: "/workspace",
455-
extraUserRoots: ["/skills/one", "/skills/two"]
456-
}]
457451
});
458452
expect(listSkillsSpy.mock.invocationCallOrder[0]!).toBeLessThan(turnStartSpy.mock.invocationCallOrder[0]!);
459453
});
@@ -477,6 +471,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
477471
return {
478472
id,
479473
items: [],
474+
itemsView: "notLoaded" as const,
480475
status,
481476
error: null,
482477
startedAt: null,
@@ -718,6 +713,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
718713
turn: {
719714
id: "turn-id",
720715
items: [],
716+
itemsView: "notLoaded",
721717
status: "completed",
722718
error: null,
723719
startedAt: null,
@@ -750,7 +746,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
750746

751747
await expect(
752748
fixture.getCodexAcpAgent().resumeSession({cwd: "", sessionId: sessionId})
753-
).rejects.toThrow("invalid thread id");
749+
).rejects.toThrow("invalid session id");
754750
});
755751

756752
it('should return available builtin commands', async () => {
@@ -867,13 +863,15 @@ describe('ACP server test', { timeout: 40_000 }, () => {
867863
data: [
868864
{
869865
name: "fs",
866+
serverInfo: null,
870867
tools: {listFiles: {name: "listFiles", inputSchema: {type: "object"}}},
871868
resources: [{name: "workspace", uri: "file:///workspace"}],
872869
resourceTemplates: [],
873870
authStatus: "bearerToken"
874871
},
875872
{
876873
name: "browser",
874+
serverInfo: null,
877875
tools: {},
878876
resources: [],
879877
resourceTemplates: [],
@@ -931,6 +929,8 @@ describe('ACP server test', { timeout: 40_000 }, () => {
931929
defaultReasoningEffort: 'medium',
932930
supportsPersonality: false,
933931
additionalSpeedTiers: [],
932+
serviceTiers: [],
933+
defaultServiceTier: null,
934934
isDefault: false,
935935
inputModalities: []
936936
},
@@ -949,6 +949,8 @@ describe('ACP server test', { timeout: 40_000 }, () => {
949949
defaultReasoningEffort: 'low',
950950
supportsPersonality: false,
951951
additionalSpeedTiers: [],
952+
serviceTiers: [],
953+
defaultServiceTier: null,
952954
isDefault: true,
953955
inputModalities: []
954956
}
@@ -975,6 +977,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
975977
turn: {
976978
id: "turn-id",
977979
items: [],
980+
itemsView: "notLoaded",
978981
status: "inProgress",
979982
error: null,
980983
startedAt: null,
@@ -987,6 +990,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
987990
turn: {
988991
id: "turn-id",
989992
items: [],
993+
itemsView: "notLoaded",
990994
status: "completed",
991995
error: null,
992996
startedAt: null,
@@ -1086,6 +1090,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
10861090
primary: { usedPercent: 25, resetsAt: null, windowDurationMins: 60 },
10871091
secondary: null,
10881092
credits: null,
1093+
individualLimit: null,
10891094
planType: null,
10901095
rateLimitReachedType: null,
10911096
}
@@ -1099,6 +1104,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
10991104
primary: { usedPercent: 80, resetsAt: null, windowDurationMins: 1440 },
11001105
secondary: null,
11011106
credits: null,
1107+
individualLimit: null,
11021108
planType: null,
11031109
rateLimitReachedType: null,
11041110
}
@@ -1152,6 +1158,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
11521158
primary: { usedPercent: 30, resetsAt: null, windowDurationMins: 60 },
11531159
secondary: null,
11541160
credits: null,
1161+
individualLimit: null,
11551162
planType: null,
11561163
rateLimitReachedType: null,
11571164
}
@@ -1167,6 +1174,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
11671174
primary: { usedPercent: 50, resetsAt: null, windowDurationMins: 1440 },
11681175
secondary: null,
11691176
credits: null,
1177+
individualLimit: null,
11701178
planType: null,
11711179
rateLimitReachedType: null,
11721180
}
@@ -1185,6 +1193,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
11851193
primary: { usedPercent: 30, resetsAt: null, windowDurationMins: 60 },
11861194
secondary: null,
11871195
credits: null,
1196+
individualLimit: null,
11881197
planType: null,
11891198
rateLimitReachedType: null,
11901199
}
@@ -1198,6 +1207,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
11981207
primary: { usedPercent: 50, resetsAt: null, windowDurationMins: 1440 },
11991208
secondary: null,
12001209
credits: null,
1210+
individualLimit: null,
12011211
planType: null,
12021212
rateLimitReachedType: null,
12031213
}

0 commit comments

Comments
 (0)