acp-extension-codex 0.16.0 → 1.0.1
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/LICENSE +190 -0
- package/README.md +52 -44
- package/dist/index.js +28411 -0
- package/package.json +59 -21
- package/bin/acp-extension-codex.js +0 -103
package/package.json
CHANGED
|
@@ -1,17 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "acp-extension-codex",
|
|
3
|
-
"
|
|
4
|
-
|
|
3
|
+
"publishConfig": {
|
|
4
|
+
"access": "public"
|
|
5
|
+
},
|
|
6
|
+
"version": "1.0.1",
|
|
5
7
|
"description": "An ACP-compatible coding agent powered by Codex",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"bin": {
|
|
10
|
+
"acp-extension-codex": "dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist/index.js",
|
|
14
|
+
"README.md",
|
|
15
|
+
"LICENSE",
|
|
16
|
+
"package.json"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"prepublishOnly": "npm run build",
|
|
20
|
+
"build": "node build.mjs",
|
|
21
|
+
"bundle:all": "npm run bundle:linux-x64 && npm run bundle:linux-arm64 && npm run bundle:darwin-x64 && npm run bundle:darwin-arm64 && npm run bundle:win-x64",
|
|
22
|
+
"bundle:linux-x64": "bun build src/index.ts --minify --sourcemap --compile --target=bun-linux-x64-baseline --outfile dist/bin/acp-extension-codex-x64-linux",
|
|
23
|
+
"bundle:linux-arm64": "bun build src/index.ts --minify --sourcemap --compile --target=bun-linux-arm64 --outfile dist/bin/acp-extension-codex-arm64-linux",
|
|
24
|
+
"bundle:darwin-x64": "bun build src/index.ts --minify --sourcemap --compile --target=bun-darwin-x64-baseline --outfile dist/bin/acp-extension-codex-x64-darwin",
|
|
25
|
+
"bundle:darwin-arm64": "bun build src/index.ts --minify --sourcemap --compile --target=bun-darwin-arm64 --outfile dist/bin/acp-extension-codex-arm64-darwin",
|
|
26
|
+
"bundle:win-x64": "bun build src/index.ts --minify --sourcemap --compile --target=bun-windows-x64-baseline --outfile dist/bin/acp-extension-codex-x64-windows.exe",
|
|
27
|
+
"package:all": "npm run package:linux-x64 && npm run package:linux-arm64 && npm run package:darwin-x64 && npm run package:darwin-arm64 && npm run package:win-x64",
|
|
28
|
+
"package:linux-x64": "cd dist/bin && zip acp-extension-codex-x64-linux.zip acp-extension-codex-x64-linux",
|
|
29
|
+
"package:linux-arm64": "cd dist/bin && zip acp-extension-codex-arm64-linux.zip acp-extension-codex-arm64-linux",
|
|
30
|
+
"package:darwin-x64": "cd dist/bin && zip acp-extension-codex-x64-darwin.zip acp-extension-codex-x64-darwin",
|
|
31
|
+
"package:darwin-arm64": "cd dist/bin && zip acp-extension-codex-arm64-darwin.zip acp-extension-codex-arm64-darwin",
|
|
32
|
+
"package:win-x64": "cd dist/bin && zip acp-extension-codex-x64-windows.zip acp-extension-codex-x64-windows.exe",
|
|
33
|
+
"start": "node --import tsx src/index.ts",
|
|
34
|
+
"generate-types": "./node_modules/.bin/codex app-server generate-ts --out src/app-server",
|
|
35
|
+
"test": "vitest run",
|
|
36
|
+
"test:e2e": "npm run build && RUN_E2E_TESTS=true vitest run src/__tests__/CodexACPAgent/e2e",
|
|
37
|
+
"test:watch": "vitest",
|
|
38
|
+
"typecheck": "tsc --noEmit",
|
|
39
|
+
"codex-test": "tsx .claude/skills/run-codex/scripts/run-codex-test.ts"
|
|
12
40
|
},
|
|
41
|
+
"homepage": "https://github.com/Leeeon233/acp-extension-codex#readme",
|
|
13
42
|
"bugs": {
|
|
14
|
-
"url": "https://github.com/Leeeon233/acp-extension/issues"
|
|
43
|
+
"url": "https://github.com/Leeeon233/acp-extension-codex/issues"
|
|
44
|
+
},
|
|
45
|
+
"repository": {
|
|
46
|
+
"type": "git",
|
|
47
|
+
"url": "git+https://github.com/Leeeon233/acp-extension-codex.git"
|
|
15
48
|
},
|
|
16
49
|
"keywords": [
|
|
17
50
|
"codex",
|
|
@@ -21,18 +54,23 @@
|
|
|
21
54
|
"ai",
|
|
22
55
|
"assistant"
|
|
23
56
|
],
|
|
24
|
-
"
|
|
25
|
-
|
|
57
|
+
"author": "lody <agent@lody.ai>",
|
|
58
|
+
"license": "Apache-2.0",
|
|
59
|
+
"type": "module",
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@types/node": "^24.10.1",
|
|
62
|
+
"esbuild": "^0.28.1",
|
|
63
|
+
"mcp-hello-world": "^1.1.2",
|
|
64
|
+
"tsx": "^4.20.6",
|
|
65
|
+
"typescript": "^5.9.3",
|
|
66
|
+
"vitest": "^4.0.10"
|
|
26
67
|
},
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"acp-extension-codex-linux-x64": "0.16.0",
|
|
35
|
-
"acp-extension-codex-win32-arm64": "0.16.0",
|
|
36
|
-
"acp-extension-codex-win32-x64": "0.16.0"
|
|
68
|
+
"dependencies": {
|
|
69
|
+
"@agentclientprotocol/sdk": "^0.28.1",
|
|
70
|
+
"@openai/codex": "^0.142.0",
|
|
71
|
+
"diff": "^8.0.3",
|
|
72
|
+
"open": "^11.0.0",
|
|
73
|
+
"vscode-jsonrpc": "^8.2.1",
|
|
74
|
+
"zod": "^4.0.0"
|
|
37
75
|
}
|
|
38
76
|
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { spawnSync } from "node:child_process";
|
|
4
|
-
import { chmodSync, existsSync, statSync } from "node:fs";
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
6
|
-
|
|
7
|
-
// Map Node.js platform/arch to package names
|
|
8
|
-
function getPlatformPackage() {
|
|
9
|
-
const platform = process.platform;
|
|
10
|
-
const arch = process.arch;
|
|
11
|
-
const baseName = "acp-extension-codex";
|
|
12
|
-
|
|
13
|
-
const platformMap = {
|
|
14
|
-
darwin: {
|
|
15
|
-
arm64: `${baseName}-darwin-arm64`,
|
|
16
|
-
x64: `${baseName}-darwin-x64`,
|
|
17
|
-
},
|
|
18
|
-
linux: {
|
|
19
|
-
arm64: `${baseName}-linux-arm64`,
|
|
20
|
-
x64: `${baseName}-linux-x64`,
|
|
21
|
-
},
|
|
22
|
-
win32: {
|
|
23
|
-
arm64: `${baseName}-win32-arm64`,
|
|
24
|
-
x64: `${baseName}-win32-x64`,
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const packages = platformMap[platform];
|
|
29
|
-
if (!packages) {
|
|
30
|
-
console.error(`Unsupported platform: ${platform}`);
|
|
31
|
-
process.exit(1);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const packageName = packages[arch];
|
|
35
|
-
if (!packageName) {
|
|
36
|
-
console.error(`Unsupported architecture: ${arch} on ${platform}`);
|
|
37
|
-
process.exit(1);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return packageName;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// Locate the binary
|
|
44
|
-
function getBinaryPath() {
|
|
45
|
-
const packageName = getPlatformPackage();
|
|
46
|
-
const binaryName =
|
|
47
|
-
process.platform === "win32"
|
|
48
|
-
? "acp-extension-codex.exe"
|
|
49
|
-
: "acp-extension-codex";
|
|
50
|
-
|
|
51
|
-
try {
|
|
52
|
-
// Try to resolve the platform-specific package
|
|
53
|
-
const binaryPath = fileURLToPath(
|
|
54
|
-
import.meta.resolve(`${packageName}/bin/${binaryName}`),
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
if (existsSync(binaryPath)) {
|
|
58
|
-
return binaryPath;
|
|
59
|
-
}
|
|
60
|
-
} catch (e) {
|
|
61
|
-
console.error(`Error resolving package: ${e}`);
|
|
62
|
-
// Package not found
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
console.error(
|
|
66
|
-
`Failed to locate ${packageName} binary. This usually means the optional dependency was not installed.`,
|
|
67
|
-
);
|
|
68
|
-
console.error(`Platform: ${process.platform}, Architecture: ${process.arch}`);
|
|
69
|
-
process.exit(1);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function ensureExecutable(binaryPath) {
|
|
73
|
-
if (process.platform === "win32") return;
|
|
74
|
-
|
|
75
|
-
try {
|
|
76
|
-
const st = statSync(binaryPath);
|
|
77
|
-
// If it has no execute bits, add them (preserve existing mode bits).
|
|
78
|
-
if ((st.mode & 0o111) === 0) {
|
|
79
|
-
chmodSync(binaryPath, st.mode | 0o111);
|
|
80
|
-
}
|
|
81
|
-
} catch {
|
|
82
|
-
// Best-effort: if we can't stat/chmod, spawnSync will surface the error.
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// Execute the binary
|
|
87
|
-
function run() {
|
|
88
|
-
const binaryPath = getBinaryPath();
|
|
89
|
-
ensureExecutable(binaryPath);
|
|
90
|
-
const result = spawnSync(binaryPath, process.argv.slice(2), {
|
|
91
|
-
stdio: "inherit",
|
|
92
|
-
windowsHide: true,
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
if (result.error) {
|
|
96
|
-
console.error(`Failed to execute ${binaryPath}:`, result.error);
|
|
97
|
-
process.exit(1);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
process.exit(result.status || 0);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
run();
|