Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
},
"dependencies": {
"@agentclientprotocol/sdk": "^0.28.1",
"@openai/codex": "^0.141.0",
"@openai/codex": "^0.142.0",
"diff": "^8.0.3",
"open": "^11.0.0",
"vscode-jsonrpc": "^8.2.1",
Expand Down
4 changes: 2 additions & 2 deletions src/CodexAcpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export class CodexAcpClient {
case "chatgpt":
return {
type: "chat-gpt",
email: account.email,
email: account.email ?? "",
};
case "amazonBedrock":
return {
Expand All @@ -178,7 +178,7 @@ export class CodexAcpClient {
return sessionModelProvider;
}
const settingsModelProvider = await this.codexClient.configRead({includeLayers: false});
return settingsModelProvider.config.model_provider;
return settingsModelProvider.config.model_provider ?? null;
}

async logout(): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion src/CodexElicitationHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export class CodexElicitationHandler implements ElicitationHandler {
? buildToolApprovalOptions(parsePersistOptions(meta))
: ELICITATION_OPTIONS;

if (params.mode === "form") {
if (params.mode === "form" || params.mode === "openai/form") {
const correlatedCallId = isToolApproval
? this.popPendingApproval(params.threadId, params.serverName)
: undefined;
Expand Down
2 changes: 2 additions & 0 deletions src/CodexEventHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ export class CodexEventHandler {
case "mcpServer/startupStatus/updated":
case "serverRequest/resolved":
case "model/verification":
case "model/safetyBuffering/updated":
case "windows/worldWritableWarning":
case "thread/realtime/started":
case "thread/realtime/itemAdded":
Expand All @@ -207,6 +208,7 @@ export class CodexEventHandler {
case "remoteControl/status/changed":
case "app/list/updated":
case "thread/settings/updated":
case "externalAgentConfig/import/progress":
case "process/outputDelta":
case "process/exited":
return null;
Expand Down
8 changes: 8 additions & 0 deletions src/__tests__/CodexACPAgent/approval-events.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ describe('Approval Events', () => {
itemId: `item-${optionId}`,
reason: 'Test command',
startedAtMs: 0,
environmentId: null,
proposedExecpolicyAmendment: null,
};

Expand All @@ -98,6 +99,7 @@ describe('Approval Events', () => {
threadId: sessionId,
turnId: 'turn-1',
startedAtMs: 0,
environmentId: null,
itemId: 'item-cancelled',
reason: null,
proposedExecpolicyAmendment: null,
Expand Down Expand Up @@ -126,6 +128,7 @@ describe('Approval Events', () => {
turnId: 'turn-1',
itemId: 'item-execpolicy-amendment',
startedAtMs: 0,
environmentId: null,
reason: 'Installing dependencies',
command: 'npm install',
cwd: '/home/user/project',
Expand Down Expand Up @@ -172,6 +175,7 @@ describe('Approval Events', () => {
turnId: 'turn-1',
itemId: 'item-network-policy-amendment',
startedAtMs: 0,
environmentId: null,
reason: 'Needs network access',
networkApprovalContext: { host: 'registry.npmjs.org', protocol: 'https' },
proposedNetworkPolicyAmendments: [networkPolicyAmendment],
Expand Down Expand Up @@ -209,6 +213,7 @@ describe('Approval Events', () => {
threadId: 'non-existent-session',
turnId: 'turn-1',
startedAtMs: 0,
environmentId: null,
itemId: 'item-no-handler',
reason: null,
proposedExecpolicyAmendment: null,
Expand All @@ -232,6 +237,7 @@ describe('Approval Events', () => {
threadId: sessionId,
turnId: 'turn-1',
startedAtMs: 0,
environmentId: null,
itemId: 'item-snapshot',
reason: 'Running npm install',
proposedExecpolicyAmendment: null,
Expand Down Expand Up @@ -260,6 +266,7 @@ describe('Approval Events', () => {
threadId: sessionId,
turnId: 'turn-1',
startedAtMs: 0,
environmentId: null,
itemId: 'item-with-command',
reason: 'Installing dependencies',
command: 'npm install',
Expand Down Expand Up @@ -298,6 +305,7 @@ describe('Approval Events', () => {
threadId: sessionId,
turnId: 'turn-1',
startedAtMs: 0,
environmentId: null,
itemId: 'item-shell-prefix',
reason: 'Installing dependencies',
command,
Expand Down
5 changes: 5 additions & 0 deletions src/__tests__/CodexACPAgent/command-action-events.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ describe('CodexEventHandler - command action events', () => {
tool: "tool-name",
status: "inProgress",
arguments: { argument: "example"},
appContext: null,
pluginId: null,
result: null,
error: null,
Expand Down Expand Up @@ -320,6 +321,7 @@ describe('CodexEventHandler - command action events', () => {
tool: "read_file",
status: "inProgress",
arguments: { file_path: ".ai/local.md", mode: "slice", start_line: 1, max_lines: 200 },
appContext: null,
pluginId: null,
result: null,
error: null,
Expand Down Expand Up @@ -349,6 +351,7 @@ describe('CodexEventHandler - command action events', () => {
tool: "read_file",
status: "failed",
arguments: { file_path: ".ai/local.md", mode: "slice", start_line: 1, max_lines: 200 },
appContext: null,
pluginId: null,
result: null,
error: {
Expand Down Expand Up @@ -383,6 +386,7 @@ describe('CodexEventHandler - command action events', () => {
tool: "tool-name",
status: "inProgress",
arguments: { argument: "example" },
appContext: null,
pluginId: null,
result: null,
error: null,
Expand Down Expand Up @@ -421,6 +425,7 @@ describe('CodexEventHandler - command action events', () => {
tool: "tool-name",
status: "failed",
arguments: { argument: "example" },
appContext: null,
pluginId: null,
result: null,
error: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"threadId": "test-session-id",
"turnId": "turn-1",
"startedAtMs": 0,
"environmentId": null,
"itemId": "item-snapshot",
"reason": "Running npm install",
"proposedExecpolicyAmendment": null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"threadId": "test-session-id",
"turnId": "turn-1",
"startedAtMs": 0,
"environmentId": null,
"itemId": "item-with-command",
"reason": "Installing dependencies",
"command": "npm install",
Expand Down
3 changes: 3 additions & 0 deletions src/__tests__/CodexACPAgent/elicitation-events.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ describe('Elicitation Events', () => {
tool: "tool-name",
status: "inProgress",
arguments: { argument: "example" },
appContext: null,
pluginId: null,
result: null,
error: null,
Expand All @@ -282,6 +283,7 @@ describe('Elicitation Events', () => {
tool: "tool-name",
status: "completed",
arguments: { argument: "example" },
appContext: null,
pluginId: null,
result: { content: [], structuredContent: null, _meta: null },
error: null,
Expand Down Expand Up @@ -330,6 +332,7 @@ describe('Elicitation Events', () => {
tool: "tool-name",
status: "inProgress",
arguments: { argument: "example" },
appContext: null,
pluginId: null,
result: null,
error: null,
Expand Down
4 changes: 4 additions & 0 deletions src/__tests__/CodexACPAgent/list-sessions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ describe("CodexACPAgent - list sessions", () => {
modelProvider: "openai",
createdAt: 100,
updatedAt: 200,
recencyAt: null,
status: { type: "idle" },
path: null,
cwd: "/repo/project",
Expand All @@ -45,6 +46,7 @@ describe("CodexACPAgent - list sessions", () => {
modelProvider: "openai",
createdAt: 300,
updatedAt: 400,
recencyAt: null,
status: { type: "idle" },
path: null,
cwd: "/repo/other",
Expand Down Expand Up @@ -111,6 +113,7 @@ describe("CodexACPAgent - list sessions", () => {
modelProvider: "openai",
createdAt: 100,
updatedAt: 200,
recencyAt: null,
status: { type: "idle" },
path: null,
cwd: "/repo/project",
Expand Down Expand Up @@ -184,6 +187,7 @@ describe("CodexACPAgent - list sessions", () => {
modelProvider: "openai",
createdAt: 100,
updatedAt: 200,
recencyAt: null,
status: { type: "idle" },
path: null,
cwd: "/repo/project",
Expand Down
5 changes: 5 additions & 0 deletions src/__tests__/CodexACPAgent/load-session.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ describe("CodexACPAgent - loadSession", () => {
modelProvider: "openai",
createdAt: 123,
updatedAt: 124,
recencyAt: null,
status: { type: "idle" },
path: null,
cwd: "/test/project",
Expand Down Expand Up @@ -130,6 +131,7 @@ describe("CodexACPAgent - loadSession", () => {
tool: "search",
status: "completed",
arguments: {},
appContext: null,
pluginId: null,
result: null,
error: null,
Expand Down Expand Up @@ -250,6 +252,7 @@ describe("CodexACPAgent - loadSession", () => {
modelProvider: "openai",
createdAt: 0,
updatedAt: 0,
recencyAt: null,
status: { type: "idle" },
path: null,
cwd: "/test/project",
Expand Down Expand Up @@ -460,6 +463,7 @@ describe("CodexACPAgent - loadSession", () => {
modelProvider: "openai",
createdAt: 123,
updatedAt: 124,
recencyAt: null,
status: { type: "idle" },
path: rolloutPath,
cwd: "/test/project",
Expand Down Expand Up @@ -590,6 +594,7 @@ describe("CodexACPAgent - loadSession", () => {
modelProvider: "openai",
createdAt: 0,
updatedAt: 0,
recencyAt: null,
status: { type: "idle" },
path: null,
cwd: "/test/project",
Expand Down
5 changes: 5 additions & 0 deletions src/app-server/AmazonBedrockCredentialSource.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// GENERATED CODE! DO NOT MODIFY BY HAND!

// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export type AmazonBedrockCredentialSource = "codexManaged" | "awsManaged";
Loading
Loading