@agentclientprotocol/codex-acp 1.1.4 → 1.1.5
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/dist/index.js +22 -6
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -25687,7 +25687,7 @@ var package_default = {
|
|
|
25687
25687
|
publishConfig: {
|
|
25688
25688
|
access: "public"
|
|
25689
25689
|
},
|
|
25690
|
-
version: "1.1.
|
|
25690
|
+
version: "1.1.5",
|
|
25691
25691
|
description: "",
|
|
25692
25692
|
main: "dist/index.js",
|
|
25693
25693
|
bin: {
|
|
@@ -25746,7 +25746,7 @@ var package_default = {
|
|
|
25746
25746
|
},
|
|
25747
25747
|
dependencies: {
|
|
25748
25748
|
"@agentclientprotocol/sdk": "^1.2.1",
|
|
25749
|
-
"@openai/codex": "^0.144.
|
|
25749
|
+
"@openai/codex": "^0.144.6",
|
|
25750
25750
|
diff: "^9.0.0",
|
|
25751
25751
|
open: "^11.0.0",
|
|
25752
25752
|
"vscode-jsonrpc": "^9.0.1",
|
|
@@ -25803,6 +25803,7 @@ var CodexAcpClient = class {
|
|
|
25803
25803
|
pendingAccountUpdated = null;
|
|
25804
25804
|
sessionNotificationQueues = /* @__PURE__ */ new Map();
|
|
25805
25805
|
skillExtraRoots = [];
|
|
25806
|
+
configPath = null;
|
|
25806
25807
|
constructor(codexClient, codexConfig, modelProvider) {
|
|
25807
25808
|
this.codexClient = codexClient;
|
|
25808
25809
|
this.config = codexConfig ?? {};
|
|
@@ -25815,7 +25816,7 @@ var CodexAcpClient = class {
|
|
|
25815
25816
|
version: `${package_default.version}`
|
|
25816
25817
|
};
|
|
25817
25818
|
async initialize(request) {
|
|
25818
|
-
await this.codexClient.initialize({
|
|
25819
|
+
const response = await this.codexClient.initialize({
|
|
25819
25820
|
capabilities: {
|
|
25820
25821
|
experimentalApi: true,
|
|
25821
25822
|
requestAttestation: false
|
|
@@ -25826,6 +25827,10 @@ var CodexAcpClient = class {
|
|
|
25826
25827
|
title: request.clientInfo?.title ?? this.defaultClientInfo.title
|
|
25827
25828
|
}
|
|
25828
25829
|
});
|
|
25830
|
+
this.configPath = response?.codexHome ?? null;
|
|
25831
|
+
}
|
|
25832
|
+
getHomePath() {
|
|
25833
|
+
return this.configPath;
|
|
25829
25834
|
}
|
|
25830
25835
|
async authenticate(authRequest) {
|
|
25831
25836
|
if (!isCodexAuthRequest(authRequest)) {
|
|
@@ -26178,11 +26183,16 @@ var CodexAcpClient = class {
|
|
|
26178
26183
|
}
|
|
26179
26184
|
async getConfigMcpServerNames(projectPath) {
|
|
26180
26185
|
const response = await this.codexClient.configRead({ includeLayers: true, cwd: projectPath });
|
|
26181
|
-
const
|
|
26182
|
-
|
|
26186
|
+
const effectiveMcpServers = response?.config?.["mcp_servers"];
|
|
26187
|
+
const configLayers = response?.layers ?? [];
|
|
26188
|
+
const layerMcpServers = configLayers.map((layer) => {
|
|
26189
|
+
return isJsonObject(layer.config) ? layer.config["mcp_servers"] : void 0;
|
|
26190
|
+
});
|
|
26191
|
+
const configuredMcpServers = [effectiveMcpServers, ...layerMcpServers].filter(isJsonObject);
|
|
26192
|
+
if (configuredMcpServers.length === 0) {
|
|
26183
26193
|
return /* @__PURE__ */ new Set();
|
|
26184
26194
|
}
|
|
26185
|
-
return new Set(Object.keys(
|
|
26195
|
+
return new Set(configuredMcpServers.flatMap((server) => Object.keys(server)));
|
|
26186
26196
|
}
|
|
26187
26197
|
getModelProvider() {
|
|
26188
26198
|
return this.gatewayConfig?.modelProvider ?? this.modelProvider;
|
|
@@ -28283,6 +28293,12 @@ var CodexAcpServer = class _CodexAcpServer {
|
|
|
28283
28293
|
|
|
28284
28294
|
You have been logged out. Please try again.`);
|
|
28285
28295
|
}
|
|
28296
|
+
const configPath = this.codexAcpClient.getHomePath() ?? "global";
|
|
28297
|
+
if (e.message.includes("load config")) {
|
|
28298
|
+
throw RequestError.internalError(`${e.message}
|
|
28299
|
+
|
|
28300
|
+
Check ${configPath} and project .codex directories, especially their config.toml files, or any CODEX_CONFIG override.`);
|
|
28301
|
+
}
|
|
28286
28302
|
}
|
|
28287
28303
|
beginSessionOpen(sessionId) {
|
|
28288
28304
|
const generation = this.getSessionGeneration(sessionId);
|
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.5",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"bin": {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@agentclientprotocol/sdk": "^1.2.1",
|
|
65
|
-
"@openai/codex": "^0.144.
|
|
65
|
+
"@openai/codex": "^0.144.6",
|
|
66
66
|
"diff": "^9.0.0",
|
|
67
67
|
"open": "^11.0.0",
|
|
68
68
|
"vscode-jsonrpc": "^9.0.1",
|