@agentclientprotocol/codex-acp 1.1.9 → 1.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/index.js +141 -69
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,8 +13,9 @@ Use [OpenAI Codex](https://github.com/openai/codex) from [Agent Client Protocol]
|
|
|
13
13
|
- Text prompts, embedded context, images, resource links, and additional workspace directories.
|
|
14
14
|
- Shell command, file change, permission request, MCP tool call, terminal output, reasoning, plan, web search, image generation, image view, token usage, and review events.
|
|
15
15
|
- Subagent launches as standard ACP tool calls, with Codex thread identity and activity details in namespaced `_meta.codex.subagent` metadata.
|
|
16
|
+
- Session-scoped long-running goals through the provider-neutral [goal extension](docs/goal-extension.md).
|
|
16
17
|
- Client-provided MCP servers over command-based stdio config and HTTP transport.
|
|
17
|
-
- Slash commands: `/status`, `/mcp`, `/skills`, `/review`, `/review-branch`, `/review-commit`, `/compact`, and `/logout`, as well as configured skills.
|
|
18
|
+
- Slash commands: `/status`, `/mcp`, `/skills`, `/goal`, `/review`, `/review-branch`, `/review-commit`, `/compact`, and `/logout`, as well as configured skills.
|
|
18
19
|
|
|
19
20
|
## Installation
|
|
20
21
|
|
package/dist/index.js
CHANGED
|
@@ -23556,22 +23556,37 @@ function createAgentTextThoughtChunk(text, messageId, meta3) {
|
|
|
23556
23556
|
return createAgentThoughtChunk({ type: "text", text }, messageId, meta3);
|
|
23557
23557
|
}
|
|
23558
23558
|
|
|
23559
|
-
// src/
|
|
23560
|
-
var
|
|
23561
|
-
var
|
|
23562
|
-
var
|
|
23563
|
-
|
|
23564
|
-
return request.method === "authentication/status" || request.method === "authentication/logout" || request.method === LEGACY_SET_SESSION_MODEL_METHOD || request.method === GOAL_CONTROL_METHOD || request.method === SESSION_STEERING_METHOD;
|
|
23565
|
-
}
|
|
23559
|
+
// src/GoalExtension.ts
|
|
23560
|
+
var GOAL_EXTENSION_VERSION = 1;
|
|
23561
|
+
var GOAL_CONTROL_METHOD = "_session/goal";
|
|
23562
|
+
var LEGACY_GOAL_CONTROL_METHOD = "_codex/session/goal_control";
|
|
23563
|
+
var GOAL_CONTROL_ACTIONS = ["pause", "resume", "clear"];
|
|
23566
23564
|
|
|
23567
23565
|
// src/ThreadGoalSnapshot.ts
|
|
23566
|
+
function toGoalStatus(status) {
|
|
23567
|
+
switch (status) {
|
|
23568
|
+
case "active":
|
|
23569
|
+
case "paused":
|
|
23570
|
+
case "blocked":
|
|
23571
|
+
case "complete":
|
|
23572
|
+
return status;
|
|
23573
|
+
case "usageLimited":
|
|
23574
|
+
case "budgetLimited":
|
|
23575
|
+
return "limited";
|
|
23576
|
+
}
|
|
23577
|
+
}
|
|
23578
|
+
function toUnixMilliseconds(timestampSeconds) {
|
|
23579
|
+
return timestampSeconds * 1e3;
|
|
23580
|
+
}
|
|
23568
23581
|
function toThreadGoalSnapshot(goal) {
|
|
23569
23582
|
return {
|
|
23570
23583
|
objective: goal.objective.trim(),
|
|
23571
|
-
status: goal.status,
|
|
23584
|
+
status: toGoalStatus(goal.status),
|
|
23572
23585
|
tokenBudget: goal.tokenBudget,
|
|
23586
|
+
tokensUsed: goal.tokensUsed,
|
|
23573
23587
|
timeUsedSeconds: goal.timeUsedSeconds,
|
|
23574
|
-
createdAt: goal.createdAt,
|
|
23588
|
+
createdAt: toUnixMilliseconds(goal.createdAt),
|
|
23589
|
+
updatedAt: toUnixMilliseconds(goal.updatedAt),
|
|
23575
23590
|
controlMethod: GOAL_CONTROL_METHOD
|
|
23576
23591
|
};
|
|
23577
23592
|
}
|
|
@@ -23809,9 +23824,7 @@ ${event.details}` : "";
|
|
|
23809
23824
|
return null;
|
|
23810
23825
|
}
|
|
23811
23826
|
this.sessionState.currentGoal = goalSnapshot;
|
|
23812
|
-
return this.
|
|
23813
|
-
goal: goalSnapshot
|
|
23814
|
-
});
|
|
23827
|
+
return this.createGoalSessionInfoUpdate(goalSnapshot);
|
|
23815
23828
|
}
|
|
23816
23829
|
createThreadGoalClearedEvent(_event) {
|
|
23817
23830
|
this.sessionState.goalRevision += 1;
|
|
@@ -23819,9 +23832,13 @@ ${event.details}` : "";
|
|
|
23819
23832
|
return null;
|
|
23820
23833
|
}
|
|
23821
23834
|
this.sessionState.currentGoal = null;
|
|
23822
|
-
return this.
|
|
23823
|
-
|
|
23824
|
-
|
|
23835
|
+
return this.createGoalSessionInfoUpdate(null);
|
|
23836
|
+
}
|
|
23837
|
+
createGoalSessionInfoUpdate(goal) {
|
|
23838
|
+
return {
|
|
23839
|
+
sessionUpdate: "session_info_update",
|
|
23840
|
+
_meta: { goal }
|
|
23841
|
+
};
|
|
23825
23842
|
}
|
|
23826
23843
|
createReasoningDeltaEvent(event) {
|
|
23827
23844
|
this.seenReasoningDeltaItemIds.add(event.itemId);
|
|
@@ -25350,6 +25367,11 @@ var ChatGptAuthMethod = {
|
|
|
25350
25367
|
name: "ChatGPT",
|
|
25351
25368
|
description: "Use ChatGPT to authenticate"
|
|
25352
25369
|
};
|
|
25370
|
+
var ChatGptDeviceCodeAuthMethod = {
|
|
25371
|
+
id: "chat-gpt-device-code",
|
|
25372
|
+
name: "ChatGPT (device code)",
|
|
25373
|
+
description: "Sign in to ChatGPT by opening a verification page and entering a one-time code"
|
|
25374
|
+
};
|
|
25353
25375
|
var GatewayAuthMethod = {
|
|
25354
25376
|
id: "gateway",
|
|
25355
25377
|
name: "Custom model gateway",
|
|
@@ -25366,6 +25388,9 @@ function getCodexAuthMethods(clientCapabilities, env = process.env) {
|
|
|
25366
25388
|
if (!env["NO_BROWSER"]) {
|
|
25367
25389
|
authMethods.push(ChatGptAuthMethod);
|
|
25368
25390
|
}
|
|
25391
|
+
if (clientSupportsUrlElicitation(clientCapabilities)) {
|
|
25392
|
+
authMethods.push(ChatGptDeviceCodeAuthMethod);
|
|
25393
|
+
}
|
|
25369
25394
|
const supportsGatewayAuth = clientCapabilities?.auth?._meta?.["gateway"] === true;
|
|
25370
25395
|
if (supportsGatewayAuth) {
|
|
25371
25396
|
authMethods.push(GatewayAuthMethod);
|
|
@@ -25373,7 +25398,7 @@ function getCodexAuthMethods(clientCapabilities, env = process.env) {
|
|
|
25373
25398
|
return authMethods;
|
|
25374
25399
|
}
|
|
25375
25400
|
function isCodexAuthRequest(request) {
|
|
25376
|
-
return request.methodId === "api-key" || request.methodId === "chat-gpt" || request.methodId === "gateway";
|
|
25401
|
+
return request.methodId === "api-key" || request.methodId === "chat-gpt" || request.methodId === "chat-gpt-device-code" || request.methodId === "gateway";
|
|
25377
25402
|
}
|
|
25378
25403
|
|
|
25379
25404
|
// node_modules/open/index.js
|
|
@@ -26136,7 +26161,7 @@ var package_default = {
|
|
|
26136
26161
|
publishConfig: {
|
|
26137
26162
|
access: "public"
|
|
26138
26163
|
},
|
|
26139
|
-
version: "1.1.
|
|
26164
|
+
version: "1.1.11",
|
|
26140
26165
|
description: "",
|
|
26141
26166
|
main: "dist/index.js",
|
|
26142
26167
|
bin: {
|
|
@@ -26197,7 +26222,7 @@ var package_default = {
|
|
|
26197
26222
|
},
|
|
26198
26223
|
dependencies: {
|
|
26199
26224
|
"@agentclientprotocol/sdk": "^1.3.0",
|
|
26200
|
-
"@openai/codex": "^0.
|
|
26225
|
+
"@openai/codex": "^0.146.1",
|
|
26201
26226
|
diff: "^9.0.0",
|
|
26202
26227
|
open: "^11.0.0",
|
|
26203
26228
|
"vscode-jsonrpc": "^9.0.1",
|
|
@@ -26283,43 +26308,24 @@ var CodexAcpClient = class {
|
|
|
26283
26308
|
getHomePath() {
|
|
26284
26309
|
return this.configPath;
|
|
26285
26310
|
}
|
|
26286
|
-
async authenticate(authRequest) {
|
|
26311
|
+
async authenticate(authRequest, urlElicitationRequester) {
|
|
26287
26312
|
if (!isCodexAuthRequest(authRequest)) {
|
|
26288
26313
|
throw RequestError.invalidRequest();
|
|
26289
26314
|
}
|
|
26290
26315
|
this.gatewayConfig = null;
|
|
26291
26316
|
switch (authRequest.methodId) {
|
|
26292
|
-
case "api-key":
|
|
26293
|
-
|
|
26294
|
-
|
|
26295
|
-
|
|
26296
|
-
case "chat-gpt":
|
|
26297
|
-
|
|
26298
|
-
if (accountResponse.account?.type === "chatgpt") {
|
|
26299
|
-
return true;
|
|
26300
|
-
}
|
|
26301
|
-
const loginCompletedPromise = this.awaitNextLoginCompleted();
|
|
26302
|
-
const loginResponse = await this.codexClient.accountLogin({ type: "chatgpt" });
|
|
26303
|
-
if (loginResponse.type == "chatgpt") {
|
|
26304
|
-
await open_default(loginResponse.authUrl);
|
|
26305
|
-
}
|
|
26306
|
-
const result = await loginCompletedPromise;
|
|
26307
|
-
return result.success;
|
|
26308
|
-
}
|
|
26317
|
+
case "api-key":
|
|
26318
|
+
return await this.authenticateWithApiKey(authRequest);
|
|
26319
|
+
case "chat-gpt":
|
|
26320
|
+
return await this.authenticateWithChatGpt();
|
|
26321
|
+
case "chat-gpt-device-code":
|
|
26322
|
+
return await this.authenticateWithChatGptDeviceCode(urlElicitationRequester);
|
|
26309
26323
|
case "gateway":
|
|
26310
|
-
|
|
26311
|
-
const gatewaySettings = authRequest._meta["gateway"];
|
|
26312
|
-
if (!gatewaySettings) throw RequestError.invalidRequest();
|
|
26313
|
-
this.applyGatewayConfig({
|
|
26314
|
-
baseUrl: gatewaySettings.baseUrl,
|
|
26315
|
-
apiType: GatewayAuthMethod._meta.gateway.protocol,
|
|
26316
|
-
headers: gatewaySettings.headers,
|
|
26317
|
-
providerName: gatewaySettings.providerName
|
|
26318
|
-
});
|
|
26319
|
-
return true;
|
|
26324
|
+
return this.authenticateWithGateway(authRequest);
|
|
26320
26325
|
}
|
|
26321
26326
|
}
|
|
26322
|
-
async authenticateWithApiKey(
|
|
26327
|
+
async authenticateWithApiKey(authRequest) {
|
|
26328
|
+
const apiKey = authRequest._meta?.["api-key"]?.apiKey ?? this.readApiKeyFromEnv();
|
|
26323
26329
|
const loginCompletedPromise = this.awaitNextLoginCompleted();
|
|
26324
26330
|
await this.codexClient.accountLogin({
|
|
26325
26331
|
type: "apiKey",
|
|
@@ -26328,6 +26334,56 @@ var CodexAcpClient = class {
|
|
|
26328
26334
|
const result = await loginCompletedPromise;
|
|
26329
26335
|
return result.success;
|
|
26330
26336
|
}
|
|
26337
|
+
async authenticateWithChatGpt() {
|
|
26338
|
+
const accountResponse = await this.codexClient.accountRead({ refreshToken: true });
|
|
26339
|
+
if (accountResponse.account?.type === "chatgpt") {
|
|
26340
|
+
return true;
|
|
26341
|
+
}
|
|
26342
|
+
const loginCompletedPromise = this.awaitNextLoginCompleted();
|
|
26343
|
+
const loginResponse = await this.codexClient.accountLogin({ type: "chatgpt" });
|
|
26344
|
+
if (loginResponse.type == "chatgpt") {
|
|
26345
|
+
await open_default(loginResponse.authUrl);
|
|
26346
|
+
}
|
|
26347
|
+
const result = await loginCompletedPromise;
|
|
26348
|
+
return result.success;
|
|
26349
|
+
}
|
|
26350
|
+
async authenticateWithChatGptDeviceCode(urlElicitationRequester) {
|
|
26351
|
+
const accountResponse = await this.codexClient.accountRead({ refreshToken: true });
|
|
26352
|
+
if (accountResponse.account?.type === "chatgpt") {
|
|
26353
|
+
return true;
|
|
26354
|
+
}
|
|
26355
|
+
if (!urlElicitationRequester) {
|
|
26356
|
+
throw RequestError.invalidRequest(void 0, "Device code authentication requires URL elicitation support");
|
|
26357
|
+
}
|
|
26358
|
+
const loginCompletedPromise = this.awaitNextLoginCompleted();
|
|
26359
|
+
const loginResponse = await this.codexClient.accountLogin({ type: "chatgptDeviceCode" });
|
|
26360
|
+
if (loginResponse.type !== "chatgptDeviceCode") {
|
|
26361
|
+
return false;
|
|
26362
|
+
}
|
|
26363
|
+
const elicitationResponse = await urlElicitationRequester.elicitUrl({
|
|
26364
|
+
url: loginResponse.verificationUrl,
|
|
26365
|
+
message: `Sign in to ChatGPT and enter this code: ${loginResponse.userCode}`,
|
|
26366
|
+
elicitationId: loginResponse.loginId
|
|
26367
|
+
});
|
|
26368
|
+
if (!CreateElicitationResponse.isAccept(elicitationResponse)) {
|
|
26369
|
+
await this.codexClient.accountLoginCancel({ loginId: loginResponse.loginId });
|
|
26370
|
+
return false;
|
|
26371
|
+
}
|
|
26372
|
+
const result = await loginCompletedPromise;
|
|
26373
|
+
return result.success;
|
|
26374
|
+
}
|
|
26375
|
+
authenticateWithGateway(authRequest) {
|
|
26376
|
+
if (!authRequest._meta) throw RequestError.invalidRequest();
|
|
26377
|
+
const gatewaySettings = authRequest._meta["gateway"];
|
|
26378
|
+
if (!gatewaySettings) throw RequestError.invalidRequest();
|
|
26379
|
+
this.applyGatewayConfig({
|
|
26380
|
+
baseUrl: gatewaySettings.baseUrl,
|
|
26381
|
+
apiType: GatewayAuthMethod._meta.gateway.protocol,
|
|
26382
|
+
headers: gatewaySettings.headers,
|
|
26383
|
+
providerName: gatewaySettings.providerName
|
|
26384
|
+
});
|
|
26385
|
+
return true;
|
|
26386
|
+
}
|
|
26331
26387
|
readApiKeyFromEnv() {
|
|
26332
26388
|
for (const envVar of [CODEX_API_KEY_ENV_VAR, OPENAI_API_KEY_ENV_VAR]) {
|
|
26333
26389
|
const value = process.env[envVar]?.trim();
|
|
@@ -28577,6 +28633,13 @@ function numberValue(value) {
|
|
|
28577
28633
|
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
28578
28634
|
}
|
|
28579
28635
|
|
|
28636
|
+
// src/AcpExtensions.ts
|
|
28637
|
+
var LEGACY_SET_SESSION_MODEL_METHOD = "session/set_model";
|
|
28638
|
+
var SESSION_STEERING_METHOD = "_session/steering";
|
|
28639
|
+
function isExtMethodRequest(request) {
|
|
28640
|
+
return request.method === "authentication/status" || request.method === "authentication/logout" || request.method === LEGACY_SET_SESSION_MODEL_METHOD || request.method === GOAL_CONTROL_METHOD || request.method === LEGACY_GOAL_CONTROL_METHOD || request.method === SESSION_STEERING_METHOD;
|
|
28641
|
+
}
|
|
28642
|
+
|
|
28580
28643
|
// src/FastModeConfig.ts
|
|
28581
28644
|
var FAST_MODE_CONFIG_ID = "fast-mode";
|
|
28582
28645
|
var FAST_MODE_CATEGORY = "model_config";
|
|
@@ -28734,6 +28797,11 @@ var CodexAcpServer = class _CodexAcpServer {
|
|
|
28734
28797
|
_meta: {
|
|
28735
28798
|
steering: {
|
|
28736
28799
|
supported: true
|
|
28800
|
+
},
|
|
28801
|
+
goal: {
|
|
28802
|
+
version: GOAL_EXTENSION_VERSION,
|
|
28803
|
+
controlMethod: GOAL_CONTROL_METHOD,
|
|
28804
|
+
actions: [...GOAL_CONTROL_ACTIONS]
|
|
28737
28805
|
}
|
|
28738
28806
|
}
|
|
28739
28807
|
};
|
|
@@ -28754,14 +28822,16 @@ var CodexAcpServer = class _CodexAcpServer {
|
|
|
28754
28822
|
return await this.unstable_setSessionModel(this.parseLegacySetSessionModelParams(methodRequest.params));
|
|
28755
28823
|
case SESSION_STEERING_METHOD:
|
|
28756
28824
|
return await this.executeOrQueueSteeringRequest(this.parseSessionSteerParams(methodRequest.params));
|
|
28757
|
-
case GOAL_CONTROL_METHOD:
|
|
28825
|
+
case GOAL_CONTROL_METHOD:
|
|
28826
|
+
case LEGACY_GOAL_CONTROL_METHOD: {
|
|
28758
28827
|
const sessionState = this.sessions.get(methodRequest.params.sessionId);
|
|
28759
28828
|
if (!sessionState) {
|
|
28760
28829
|
throw RequestError.invalidParams(void 0, `Unknown session: ${methodRequest.params.sessionId}`);
|
|
28761
28830
|
}
|
|
28762
28831
|
const sessionGeneration = this.getSessionGeneration(sessionState.sessionId);
|
|
28763
|
-
if (methodRequest.params.action === "pause") {
|
|
28764
|
-
const
|
|
28832
|
+
if (methodRequest.params.action === "pause" || methodRequest.params.action === "resume") {
|
|
28833
|
+
const status = methodRequest.params.action === "pause" ? "paused" : "active";
|
|
28834
|
+
const goal = await this.runWithProcessCheck(() => this.codexAcpClient.setGoalStatus(sessionState.sessionId, status));
|
|
28765
28835
|
if (this.goalPublishIsCurrent(sessionState, sessionGeneration)) {
|
|
28766
28836
|
await this.publishGoalSnapshot(sessionState, toThreadGoalSnapshot(goal), false);
|
|
28767
28837
|
}
|
|
@@ -29105,9 +29175,10 @@ Check ${configPath} and project .codex directories, especially their config.toml
|
|
|
29105
29175
|
...this.createSessionConfigOptionsResponse(this.getSessionState(sessionId))
|
|
29106
29176
|
};
|
|
29107
29177
|
}
|
|
29108
|
-
async authenticate(_params) {
|
|
29178
|
+
async authenticate(_params, requestId) {
|
|
29109
29179
|
logger.log("Authenticate request received");
|
|
29110
|
-
const
|
|
29180
|
+
const elicitationRequester = this.createUrlElicitationRequester(requestId);
|
|
29181
|
+
const isAuthenticated = await this.runWithProcessCheck(() => this.codexAcpClient.authenticate(_params, elicitationRequester));
|
|
29111
29182
|
if (!isAuthenticated) {
|
|
29112
29183
|
logger.log("Authenticate request failed");
|
|
29113
29184
|
throw RequestError.invalidParams();
|
|
@@ -29116,6 +29187,18 @@ Check ${configPath} and project .codex directories, especially their config.toml
|
|
|
29116
29187
|
logger.log("Authenticate request completed");
|
|
29117
29188
|
return {};
|
|
29118
29189
|
}
|
|
29190
|
+
createUrlElicitationRequester(requestId) {
|
|
29191
|
+
if (requestId == null || !clientSupportsUrlElicitation(this.clientCapabilities)) {
|
|
29192
|
+
return void 0;
|
|
29193
|
+
}
|
|
29194
|
+
return {
|
|
29195
|
+
elicitUrl: (request) => this.connection.request(methods.client.elicitation.create, {
|
|
29196
|
+
mode: "url",
|
|
29197
|
+
requestId,
|
|
29198
|
+
...request
|
|
29199
|
+
})
|
|
29200
|
+
};
|
|
29201
|
+
}
|
|
29119
29202
|
async logout(_params) {
|
|
29120
29203
|
logger.log("Logout request received");
|
|
29121
29204
|
await this.runWithProcessCheck(() => this.codexAcpClient.logout());
|
|
@@ -29542,9 +29625,7 @@ Check ${configPath} and project .codex directories, especially their config.toml
|
|
|
29542
29625
|
await session.update({
|
|
29543
29626
|
sessionUpdate: "session_info_update",
|
|
29544
29627
|
_meta: {
|
|
29545
|
-
|
|
29546
|
-
goal: snapshot
|
|
29547
|
-
}
|
|
29628
|
+
goal: snapshot
|
|
29548
29629
|
}
|
|
29549
29630
|
});
|
|
29550
29631
|
}
|
|
@@ -30178,7 +30259,6 @@ Check ${configPath} and project .codex directories, especially their config.toml
|
|
|
30178
30259
|
logger.log("Prompt handled by a command");
|
|
30179
30260
|
await this.codexAcpClient.waitForSessionNotifications(params.sessionId);
|
|
30180
30261
|
if (commandResult.turnCompleted?.turn.status === "interrupted") {
|
|
30181
|
-
await this.notifyConversationInterrupted(params.sessionId);
|
|
30182
30262
|
return this.cancelledPromptResponse(sessionState);
|
|
30183
30263
|
}
|
|
30184
30264
|
const error52 = eventHandler.getFailure();
|
|
@@ -30251,7 +30331,6 @@ Check ${configPath} and project .codex directories, especially their config.toml
|
|
|
30251
30331
|
await this.codexAcpClient.waitForSessionNotifications(params.sessionId);
|
|
30252
30332
|
if (turnCompleted.turn.status === "interrupted") {
|
|
30253
30333
|
await eventHandler.flushPendingPlanUpdates();
|
|
30254
|
-
await this.notifyConversationInterrupted(params.sessionId);
|
|
30255
30334
|
return this.cancelledPromptResponse(sessionState);
|
|
30256
30335
|
}
|
|
30257
30336
|
const error51 = eventHandler.getFailure();
|
|
@@ -30318,7 +30397,6 @@ Check ${configPath} and project .codex directories, especially their config.toml
|
|
|
30318
30397
|
await this.codexAcpClient.waitForSessionNotifications(params.sessionId);
|
|
30319
30398
|
if (turnCompleted.turn.status === "interrupted") {
|
|
30320
30399
|
await eventHandler.flushPendingPlanUpdates();
|
|
30321
|
-
await this.notifyConversationInterrupted(params.sessionId);
|
|
30322
30400
|
return this.cancelledPromptResponse(sessionState);
|
|
30323
30401
|
}
|
|
30324
30402
|
const implementationError = eventHandler.getFailure();
|
|
@@ -30410,15 +30488,6 @@ Check ${configPath} and project .codex directories, especially their config.toml
|
|
|
30410
30488
|
_meta: this.buildQuotaMeta(sessionState)
|
|
30411
30489
|
};
|
|
30412
30490
|
}
|
|
30413
|
-
async notifyConversationInterrupted(sessionId) {
|
|
30414
|
-
if (this.sessionIsClosing(sessionId) || !this.sessions.has(sessionId)) {
|
|
30415
|
-
return;
|
|
30416
|
-
}
|
|
30417
|
-
await this.connection.notify(methods.client.session.update, {
|
|
30418
|
-
sessionId,
|
|
30419
|
-
update: createAgentTextMessageChunk("*Conversation interrupted*")
|
|
30420
|
-
});
|
|
30421
|
-
}
|
|
30422
30491
|
buildQuotaMeta(sessionState) {
|
|
30423
30492
|
const lastTokenUsage = sessionState.lastTokenUsage;
|
|
30424
30493
|
const modelName = sessionState.currentModelId.replace(/\[.*?]$/, "");
|
|
@@ -30936,6 +31005,9 @@ var CodexAppServerClient = class {
|
|
|
30936
31005
|
async accountLogin(params) {
|
|
30937
31006
|
return await this.sendRequest({ method: "account/login/start", params });
|
|
30938
31007
|
}
|
|
31008
|
+
async accountLoginCancel(params) {
|
|
31009
|
+
return await this.sendRequest({ method: "account/login/cancel", params });
|
|
31010
|
+
}
|
|
30939
31011
|
async accountLogout() {
|
|
30940
31012
|
return await this.sendRequest({ method: "account/logout", params: void 0 });
|
|
30941
31013
|
}
|
|
@@ -31462,7 +31534,7 @@ var sessionSteerParamsParser = external_exports.object({
|
|
|
31462
31534
|
}).passthrough();
|
|
31463
31535
|
var goalControlParamsParser = external_exports.object({
|
|
31464
31536
|
sessionId: external_exports.string(),
|
|
31465
|
-
action: external_exports.enum(["pause", "clear"])
|
|
31537
|
+
action: external_exports.enum(["pause", "resume", "clear"])
|
|
31466
31538
|
}).passthrough();
|
|
31467
31539
|
if (process.argv.includes("--version")) {
|
|
31468
31540
|
console.log(`${package_default.name} ${package_default.version}`);
|
|
@@ -31536,5 +31608,5 @@ function startAcpServer() {
|
|
|
31536
31608
|
codexAcpServer = null;
|
|
31537
31609
|
}
|
|
31538
31610
|
});
|
|
31539
|
-
}).onRequest(methods.agent.initialize, (ctx) => getAgent().initialize(ctx.params)).onRequest(methods.agent.session.new, (ctx) => getAgent().newSession(ctx.params)).onRequest(methods.agent.session.load, (ctx) => getAgent().loadSession(ctx.params)).onRequest(methods.agent.session.list, (ctx) => getAgent().listSessions(ctx.params)).onRequest(methods.agent.session.delete, (ctx) => getAgent().deleteSession(ctx.params)).onRequest(methods.agent.session.resume, (ctx) => getAgent().resumeSession(ctx.params)).onRequest(methods.agent.session.close, (ctx) => getAgent().closeSession(ctx.params)).onRequest(methods.agent.session.setMode, (ctx) => getAgent().setSessionMode(ctx.params)).onRequest(methods.agent.session.setConfigOption, (ctx) => getAgent().setSessionConfigOption(ctx.params)).onRequest(methods.agent.authenticate, (ctx) => getAgent().authenticate(ctx.params)).onRequest(methods.agent.logout, (ctx) => getAgent().logout(ctx.params)).onRequest(methods.agent.providers.list, (ctx) => getAgent().listProviders(ctx.params)).onRequest(methods.agent.providers.set, (ctx) => getAgent().setProvider(ctx.params)).onRequest(methods.agent.providers.disable, (ctx) => getAgent().disableProvider(ctx.params)).onRequest(methods.agent.session.prompt, (ctx) => getAgent().prompt(ctx.params, ctx.signal)).onNotification(methods.agent.session.cancel, (ctx) => getAgent().cancel(ctx.params)).onRequest("authentication/status", emptyExtensionParamsParser, (ctx) => getAgent().extMethod("authentication/status", ctx.params)).onRequest("authentication/logout", emptyExtensionParamsParser, (ctx) => getAgent().extMethod("authentication/logout", ctx.params)).onRequest(LEGACY_SET_SESSION_MODEL_METHOD, legacySetSessionModelParamsParser, (ctx) => getAgent().extMethod(LEGACY_SET_SESSION_MODEL_METHOD, ctx.params)).onRequest(SESSION_STEERING_METHOD, sessionSteerParamsParser, (ctx) => getAgent().extMethod(SESSION_STEERING_METHOD, ctx.params)).onRequest(GOAL_CONTROL_METHOD, goalControlParamsParser, (ctx) => getAgent().extMethod(GOAL_CONTROL_METHOD, ctx.params)).connect(acpJsonStream);
|
|
31611
|
+
}).onRequest(methods.agent.initialize, (ctx) => getAgent().initialize(ctx.params)).onRequest(methods.agent.session.new, (ctx) => getAgent().newSession(ctx.params)).onRequest(methods.agent.session.load, (ctx) => getAgent().loadSession(ctx.params)).onRequest(methods.agent.session.list, (ctx) => getAgent().listSessions(ctx.params)).onRequest(methods.agent.session.delete, (ctx) => getAgent().deleteSession(ctx.params)).onRequest(methods.agent.session.resume, (ctx) => getAgent().resumeSession(ctx.params)).onRequest(methods.agent.session.close, (ctx) => getAgent().closeSession(ctx.params)).onRequest(methods.agent.session.setMode, (ctx) => getAgent().setSessionMode(ctx.params)).onRequest(methods.agent.session.setConfigOption, (ctx) => getAgent().setSessionConfigOption(ctx.params)).onRequest(methods.agent.authenticate, (ctx) => getAgent().authenticate(ctx.params, ctx.requestId)).onRequest(methods.agent.logout, (ctx) => getAgent().logout(ctx.params)).onRequest(methods.agent.providers.list, (ctx) => getAgent().listProviders(ctx.params)).onRequest(methods.agent.providers.set, (ctx) => getAgent().setProvider(ctx.params)).onRequest(methods.agent.providers.disable, (ctx) => getAgent().disableProvider(ctx.params)).onRequest(methods.agent.session.prompt, (ctx) => getAgent().prompt(ctx.params, ctx.signal)).onNotification(methods.agent.session.cancel, (ctx) => getAgent().cancel(ctx.params)).onRequest("authentication/status", emptyExtensionParamsParser, (ctx) => getAgent().extMethod("authentication/status", ctx.params)).onRequest("authentication/logout", emptyExtensionParamsParser, (ctx) => getAgent().extMethod("authentication/logout", ctx.params)).onRequest(LEGACY_SET_SESSION_MODEL_METHOD, legacySetSessionModelParamsParser, (ctx) => getAgent().extMethod(LEGACY_SET_SESSION_MODEL_METHOD, ctx.params)).onRequest(SESSION_STEERING_METHOD, sessionSteerParamsParser, (ctx) => getAgent().extMethod(SESSION_STEERING_METHOD, ctx.params)).onRequest(GOAL_CONTROL_METHOD, goalControlParamsParser, (ctx) => getAgent().extMethod(GOAL_CONTROL_METHOD, ctx.params)).connect(acpJsonStream);
|
|
31540
31612
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.1.
|
|
6
|
+
"version": "1.1.11",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"bin": {
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@agentclientprotocol/sdk": "^1.3.0",
|
|
67
|
-
"@openai/codex": "^0.
|
|
67
|
+
"@openai/codex": "^0.146.1",
|
|
68
68
|
"diff": "^9.0.0",
|
|
69
69
|
"open": "^11.0.0",
|
|
70
70
|
"vscode-jsonrpc": "^9.0.1",
|