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 @@ -64,7 +64,7 @@
},
"dependencies": {
"@agentclientprotocol/sdk": "^1.3.0",
"@openai/codex": "^0.146.1",
"@openai/codex": "^0.147.0",
"diff": "^9.0.0",
"open": "^11.0.0",
"vscode-jsonrpc": "^9.0.1",
Expand Down
2 changes: 1 addition & 1 deletion src/CodexAcpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import type {Disposable} from "vscode-jsonrpc";
import type {
ClientInfo,
ReasoningEffort,
ServiceTier,
ServerNotification
} from "./app-server";
import type {ServiceTier} from "./app-server/ServiceTier";
import type {JsonValue} from "./app-server/serde_json/JsonValue";
import {ModelId} from "./ModelId";
import {AgentMode} from "./AgentMode";
Expand Down
2 changes: 1 addition & 1 deletion src/CodexEventHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import type {
TurnPlanUpdatedNotification,
WarningNotification
} from "./app-server/v2";
import type { McpStartupCompleteEvent } from "./app-server";
import type { McpStartupCompleteEvent } from "./app-server/McpStartupCompleteEvent";
import {toTokenCount} from "./TokenCount";
import {
commandExecutionUsesTerminalOutput,
Expand Down
2 changes: 1 addition & 1 deletion src/FastModeConfig.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type {SessionConfigOption} from "@agentclientprotocol/sdk";
import type * as acp from "@agentclientprotocol/sdk";
import type {ServiceTier} from "./app-server";
import type {ServiceTier} from "./app-server/ServiceTier";
import type {Model} from "./app-server/v2";

export const FAST_MODE_CONFIG_ID = "fast-mode";
Expand Down
5 changes: 4 additions & 1 deletion src/__tests__/CodexACPAgent/CodexAcpClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2880,7 +2880,10 @@ describe('ACP server test', { timeout: 40_000 }, () => {
fixture.clearAcpConnectionDump();
const prompt: acp.ContentBlock[] = [{ type: "text", text: "/logout " }];
await codexAcpAgent.prompt({sessionId: newSessionResponse.sessionId, prompt: prompt });
await expect(fixture.getAcpConnectionDump(["sessionId"])).toMatchFileSnapshot("data/command-logout.json");
const logoutEvent = fixture.getAcpConnectionEvents(["sessionId"]).find(event =>
event.args[0]?.update?.sessionUpdate === "agent_message_chunk"
);
await expect(JSON.stringify(logoutEvent, null, 2)).toMatchFileSnapshot("data/command-logout.json");
});

it('clears active session auth state when logout command signs out', async () => {
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 @@ -305,6 +305,7 @@ describe('CodexEventHandler - command action events', () => {
status: "inProgress",
arguments: { argument: "example"},
appContext: null,
readOnlyHint: null,
pluginId: null,
result: null,
error: null,
Expand Down Expand Up @@ -336,6 +337,7 @@ describe('CodexEventHandler - command action events', () => {
status: "inProgress",
arguments: { file_path: ".ai/local.md", mode: "slice", start_line: 1, max_lines: 200 },
appContext: null,
readOnlyHint: true,
pluginId: null,
result: null,
error: null,
Expand Down Expand Up @@ -366,6 +368,7 @@ describe('CodexEventHandler - command action events', () => {
status: "failed",
arguments: { file_path: ".ai/local.md", mode: "slice", start_line: 1, max_lines: 200 },
appContext: null,
readOnlyHint: true,
pluginId: null,
result: null,
error: {
Expand Down Expand Up @@ -401,6 +404,7 @@ describe('CodexEventHandler - command action events', () => {
status: "inProgress",
arguments: { argument: "example" },
appContext: null,
readOnlyHint: null,
pluginId: null,
result: null,
error: null,
Expand Down Expand Up @@ -440,6 +444,7 @@ describe('CodexEventHandler - command action events', () => {
status: "failed",
arguments: { argument: "example" },
appContext: null,
readOnlyHint: null,
pluginId: null,
result: null,
error: {
Expand Down
8 changes: 8 additions & 0 deletions src/__tests__/CodexACPAgent/elicitation-events.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ describe('Elicitation Events', () => {
status: "inProgress",
arguments: { argument: "example" },
appContext: null,
readOnlyHint: null,
pluginId: null,
result: null,
error: null,
Expand Down Expand Up @@ -467,6 +468,7 @@ describe('Elicitation Events', () => {
status: "inProgress",
arguments: { argument: "example" },
appContext: null,
readOnlyHint: null,
pluginId: null,
result: null,
error: null,
Expand All @@ -488,6 +490,7 @@ describe('Elicitation Events', () => {
status: "completed",
arguments: { argument: "example" },
appContext: null,
readOnlyHint: null,
pluginId: null,
result: { content: [], structuredContent: null, _meta: null },
error: null,
Expand Down Expand Up @@ -537,6 +540,7 @@ describe('Elicitation Events', () => {
status: "inProgress",
arguments: { argument: "example" },
appContext: null,
readOnlyHint: null,
pluginId: null,
result: null,
error: null,
Expand Down Expand Up @@ -696,6 +700,7 @@ describe('Elicitation Events', () => {
turnId: 'turn-1',
itemId: 'request-user-input-1',
autoResolutionMs: 60000,
isBlocking: true,
questions: [
{
id: 'next_step',
Expand Down Expand Up @@ -776,6 +781,7 @@ describe('Elicitation Events', () => {
turnId: 'turn-1',
itemId: 'request-user-input-1',
autoResolutionMs: null,
isBlocking: true,
questions: [{
id: 'next_step',
header: 'Next step',
Expand Down Expand Up @@ -811,6 +817,7 @@ describe('Elicitation Events', () => {
turnId: 'turn-1',
itemId: 'request-user-input-1',
autoResolutionMs: 1,
isBlocking: true,
questions: [{
id: 'next_step',
header: 'Next step',
Expand Down Expand Up @@ -846,6 +853,7 @@ describe('Elicitation Events', () => {
turnId: 'turn-1',
itemId: 'request-user-input-1',
autoResolutionMs: null,
isBlocking: true,
questions: [{
id: 'next_step',
header: 'Next step',
Expand Down
12 changes: 8 additions & 4 deletions src/__tests__/CodexACPAgent/list-sessions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ describe("CodexACPAgent - list sessions", () => {
path: null,
cwd: "/repo/project",
cliVersion: "0.0.0",
isPinned: false,
section: null,
sectionEnteredAt: null,
source: "cli",
agentNickname: null,
agentRole: null,
Expand All @@ -52,7 +53,8 @@ describe("CodexACPAgent - list sessions", () => {
path: null,
cwd: "/repo/other",
cliVersion: "0.0.0",
isPinned: false,
section: null,
sectionEnteredAt: null,
source: "cli",
agentNickname: null,
agentRole: null,
Expand Down Expand Up @@ -115,7 +117,8 @@ describe("CodexACPAgent - list sessions", () => {
path: null,
cwd: "/repo/project",
cliVersion: "0.0.0",
isPinned: false,
section: null,
sectionEnteredAt: null,
source: "cli",
agentNickname: null,
agentRole: null,
Expand Down Expand Up @@ -192,7 +195,8 @@ describe("CodexACPAgent - list sessions", () => {
path: null,
cwd: "/repo/project",
cliVersion: "0.0.0",
isPinned: false,
section: null,
sectionEnteredAt: null,
source: "cli",
agentNickname: null,
agentRole: null,
Expand Down
13 changes: 9 additions & 4 deletions src/__tests__/CodexACPAgent/load-session.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ describe("CodexACPAgent - loadSession", () => {
path: null,
cwd: "/test/project",
cliVersion: "0.0.0",
isPinned: false,
section: null,
sectionEnteredAt: null,
source: "cli",
agentNickname: null,
agentRole: null,
Expand Down Expand Up @@ -136,6 +137,7 @@ describe("CodexACPAgent - loadSession", () => {
status: "completed",
arguments: {},
appContext: null,
readOnlyHint: null,
pluginId: null,
result: null,
error: null,
Expand Down Expand Up @@ -285,7 +287,8 @@ describe("CodexACPAgent - loadSession", () => {
path: null,
cwd: "/test/project",
cliVersion: "0.0.0",
isPinned: false,
section: null,
sectionEnteredAt: null,
source: "cli",
agentNickname: null,
agentRole: null,
Expand Down Expand Up @@ -497,7 +500,8 @@ describe("CodexACPAgent - loadSession", () => {
path: rolloutPath,
cwd: "/test/project",
cliVersion: "0.139.0",
isPinned: false,
section: null,
sectionEnteredAt: null,
source: "vscode",
agentNickname: null,
agentRole: null,
Expand Down Expand Up @@ -630,7 +634,8 @@ describe("CodexACPAgent - loadSession", () => {
path: null,
cwd: "/test/project",
cliVersion: "0.0.0",
isPinned: false,
section: null,
sectionEnteredAt: null,
source: "cli",
agentNickname: null,
agentRole: null,
Expand Down
Loading