@openai/codex 0.39.0 → 0.41.0-alpha.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/bin/codex.js +10 -23
- package/bin/rg +79 -0
- package/package.json +2 -8
- package/{bin/codex-aarch64-apple-darwin → vendor/aarch64-apple-darwin/codex/codex} +0 -0
- package/vendor/aarch64-apple-darwin/path/rg +0 -0
- package/{bin/codex-aarch64-pc-windows-msvc.exe → vendor/aarch64-pc-windows-msvc/codex/codex.exe} +0 -0
- package/vendor/aarch64-pc-windows-msvc/path/rg.exe +0 -0
- package/{bin/codex-aarch64-unknown-linux-musl → vendor/aarch64-unknown-linux-musl/codex/codex} +0 -0
- package/vendor/aarch64-unknown-linux-musl/path/rg +0 -0
- package/{bin/codex-x86_64-apple-darwin → vendor/x86_64-apple-darwin/codex/codex} +0 -0
- package/vendor/x86_64-apple-darwin/path/rg +0 -0
- package/{bin/codex-x86_64-pc-windows-msvc.exe → vendor/x86_64-pc-windows-msvc/codex/codex.exe} +0 -0
- package/vendor/x86_64-pc-windows-msvc/path/rg.exe +0 -0
- package/{bin/codex-x86_64-unknown-linux-musl → vendor/x86_64-unknown-linux-musl/codex/codex} +0 -0
- package/vendor/x86_64-unknown-linux-musl/path/rg +0 -0
package/bin/codex.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// Unified entry point for the Codex CLI.
|
|
3
3
|
|
|
4
|
+
import { existsSync } from "fs";
|
|
4
5
|
import path from "path";
|
|
5
6
|
import { fileURLToPath } from "url";
|
|
6
7
|
|
|
@@ -40,10 +41,10 @@ switch (platform) {
|
|
|
40
41
|
case "win32":
|
|
41
42
|
switch (arch) {
|
|
42
43
|
case "x64":
|
|
43
|
-
targetTriple = "x86_64-pc-windows-msvc
|
|
44
|
+
targetTriple = "x86_64-pc-windows-msvc";
|
|
44
45
|
break;
|
|
45
46
|
case "arm64":
|
|
46
|
-
targetTriple = "aarch64-pc-windows-msvc
|
|
47
|
+
targetTriple = "aarch64-pc-windows-msvc";
|
|
47
48
|
break;
|
|
48
49
|
default:
|
|
49
50
|
break;
|
|
@@ -57,7 +58,10 @@ if (!targetTriple) {
|
|
|
57
58
|
throw new Error(`Unsupported platform: ${platform} (${arch})`);
|
|
58
59
|
}
|
|
59
60
|
|
|
60
|
-
const
|
|
61
|
+
const vendorRoot = path.join(__dirname, "..", "vendor");
|
|
62
|
+
const archRoot = path.join(vendorRoot, targetTriple);
|
|
63
|
+
const codexBinaryName = process.platform === "win32" ? "codex.exe" : "codex";
|
|
64
|
+
const binaryPath = path.join(archRoot, "codex", codexBinaryName);
|
|
61
65
|
|
|
62
66
|
// Use an asynchronous spawn instead of spawnSync so that Node is able to
|
|
63
67
|
// respond to signals (e.g. Ctrl-C / SIGINT) while the native binary is
|
|
@@ -66,23 +70,6 @@ const binaryPath = path.join(__dirname, "..", "bin", `codex-${targetTriple}`);
|
|
|
66
70
|
// receives a fatal signal, both processes exit in a predictable manner.
|
|
67
71
|
const { spawn } = await import("child_process");
|
|
68
72
|
|
|
69
|
-
async function tryImport(moduleName) {
|
|
70
|
-
try {
|
|
71
|
-
// eslint-disable-next-line node/no-unsupported-features/es-syntax
|
|
72
|
-
return await import(moduleName);
|
|
73
|
-
} catch (err) {
|
|
74
|
-
return null;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
async function resolveRgDir() {
|
|
79
|
-
const ripgrep = await tryImport("@vscode/ripgrep");
|
|
80
|
-
if (!ripgrep?.rgPath) {
|
|
81
|
-
return null;
|
|
82
|
-
}
|
|
83
|
-
return path.dirname(ripgrep.rgPath);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
73
|
function getUpdatedPath(newDirs) {
|
|
87
74
|
const pathSep = process.platform === "win32" ? ";" : ":";
|
|
88
75
|
const existingPath = process.env.PATH || "";
|
|
@@ -94,9 +81,9 @@ function getUpdatedPath(newDirs) {
|
|
|
94
81
|
}
|
|
95
82
|
|
|
96
83
|
const additionalDirs = [];
|
|
97
|
-
const
|
|
98
|
-
if (
|
|
99
|
-
additionalDirs.push(
|
|
84
|
+
const pathDir = path.join(archRoot, "path");
|
|
85
|
+
if (existsSync(pathDir)) {
|
|
86
|
+
additionalDirs.push(pathDir);
|
|
100
87
|
}
|
|
101
88
|
const updatedPath = getUpdatedPath(additionalDirs);
|
|
102
89
|
|
package/bin/rg
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
#!/usr/bin/env dotslash
|
|
2
|
+
|
|
3
|
+
{
|
|
4
|
+
"name": "rg",
|
|
5
|
+
"platforms": {
|
|
6
|
+
"macos-aarch64": {
|
|
7
|
+
"size": 1787248,
|
|
8
|
+
"hash": "blake3",
|
|
9
|
+
"digest": "8d9942032585ea8ee805937634238d9aee7b210069f4703c88fbe568e26fb78a",
|
|
10
|
+
"format": "tar.gz",
|
|
11
|
+
"path": "ripgrep-14.1.1-aarch64-apple-darwin/rg",
|
|
12
|
+
"providers": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://github.com/BurntSushi/ripgrep/releases/download/14.1.1/ripgrep-14.1.1-aarch64-apple-darwin.tar.gz"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"linux-aarch64": {
|
|
19
|
+
"size": 2047405,
|
|
20
|
+
"hash": "blake3",
|
|
21
|
+
"digest": "0b670b8fa0a3df2762af2fc82cc4932f684ca4c02dbd1260d4f3133fd4b2a515",
|
|
22
|
+
"format": "tar.gz",
|
|
23
|
+
"path": "ripgrep-14.1.1-aarch64-unknown-linux-gnu/rg",
|
|
24
|
+
"providers": [
|
|
25
|
+
{
|
|
26
|
+
"url": "https://github.com/BurntSushi/ripgrep/releases/download/14.1.1/ripgrep-14.1.1-aarch64-unknown-linux-gnu.tar.gz"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"macos-x86_64": {
|
|
31
|
+
"size": 2082672,
|
|
32
|
+
"hash": "blake3",
|
|
33
|
+
"digest": "e9b862fc8da3127f92791f0ff6a799504154ca9d36c98bf3e60a81c6b1f7289e",
|
|
34
|
+
"format": "tar.gz",
|
|
35
|
+
"path": "ripgrep-14.1.1-x86_64-apple-darwin/rg",
|
|
36
|
+
"providers": [
|
|
37
|
+
{
|
|
38
|
+
"url": "https://github.com/BurntSushi/ripgrep/releases/download/14.1.1/ripgrep-14.1.1-x86_64-apple-darwin.tar.gz"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"linux-x86_64": {
|
|
43
|
+
"size": 2566310,
|
|
44
|
+
"hash": "blake3",
|
|
45
|
+
"digest": "f73cca4e54d78c31f832c7f6e2c0b4db8b04fa3eaa747915727d570893dbee76",
|
|
46
|
+
"format": "tar.gz",
|
|
47
|
+
"path": "ripgrep-14.1.1-x86_64-unknown-linux-musl/rg",
|
|
48
|
+
"providers": [
|
|
49
|
+
{
|
|
50
|
+
"url": "https://github.com/BurntSushi/ripgrep/releases/download/14.1.1/ripgrep-14.1.1-x86_64-unknown-linux-musl.tar.gz"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"windows-x86_64": {
|
|
55
|
+
"size": 2058893,
|
|
56
|
+
"hash": "blake3",
|
|
57
|
+
"digest": "a8ce1a6fed4f8093ee997e57f33254e94b2cd18e26358b09db599c89882eadbd",
|
|
58
|
+
"format": "zip",
|
|
59
|
+
"path": "ripgrep-14.1.1-x86_64-pc-windows-msvc/rg.exe",
|
|
60
|
+
"providers": [
|
|
61
|
+
{
|
|
62
|
+
"url": "https://github.com/BurntSushi/ripgrep/releases/download/14.1.1/ripgrep-14.1.1-x86_64-pc-windows-msvc.zip"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"windows-aarch64": {
|
|
67
|
+
"size": 1667740,
|
|
68
|
+
"hash": "blake3",
|
|
69
|
+
"digest": "47b971a8c4fca1d23a4e7c19bd4d88465ebc395598458133139406d3bf85f3fa",
|
|
70
|
+
"format": "zip",
|
|
71
|
+
"path": "rg.exe",
|
|
72
|
+
"providers": [
|
|
73
|
+
{
|
|
74
|
+
"url": "https://github.com/microsoft/ripgrep-prebuilt/releases/download/v13.0.0-13/ripgrep-v13.0.0-13-aarch64-pc-windows-msvc.zip"
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openai/codex",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.0-alpha.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"bin": {
|
|
6
6
|
"codex": "bin/codex.js"
|
|
@@ -11,17 +11,11 @@
|
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
13
|
"bin",
|
|
14
|
-
"
|
|
14
|
+
"vendor"
|
|
15
15
|
],
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
18
18
|
"url": "git+https://github.com/openai/codex.git",
|
|
19
19
|
"directory": "codex-cli"
|
|
20
|
-
},
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"@vscode/ripgrep": "^1.15.14"
|
|
23
|
-
},
|
|
24
|
-
"devDependencies": {
|
|
25
|
-
"prettier": "^3.3.3"
|
|
26
20
|
}
|
|
27
21
|
}
|
|
index f0eff91..34587c2 100755
|
|
|
Binary file
|
|
Binary file
|
package/{bin/codex-aarch64-pc-windows-msvc.exe → vendor/aarch64-pc-windows-msvc/codex/codex.exe}
RENAMED
|
index 69e44bb..a9f318f 100644
|
|
|
Binary file
|
|
Binary file
|
package/{bin/codex-aarch64-unknown-linux-musl → vendor/aarch64-unknown-linux-musl/codex/codex}
RENAMED
|
index 86b7bc4..1008114 100755
|
|
|
Binary file
|
|
Binary file
|
|
index f48d0e3..1c4f410 100755
|
|
|
Binary file
|
|
Binary file
|
package/{bin/codex-x86_64-pc-windows-msvc.exe → vendor/x86_64-pc-windows-msvc/codex/codex.exe}
RENAMED
|
index 74798e7..821e3d2 100644
|
|
|
Binary file
|
|
Binary file
|
package/{bin/codex-x86_64-unknown-linux-musl → vendor/x86_64-unknown-linux-musl/codex/codex}
RENAMED
|
index 96712c9..49242da 100755
|
|
|
Binary file
|
|
Binary file
|