@brasalabs/goblins 0.128.1 → 0.142.3-beta.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/README.md +1 -1
- package/bin/goblin.js +25 -48
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ Goblins uses the same local-agent foundation as Codex CLI: it can inspect files,
|
|
|
24
24
|
|
|
25
25
|
## Release Base
|
|
26
26
|
|
|
27
|
-
Goblins `0.
|
|
27
|
+
Goblins `0.142.3` is based on upstream `rust-v0.142.3` / `@openai/codex@0.142.3`, the latest stable release verified for this fork update via the upstream [GitHub release](https://github.com/openai/codex/releases/tag/rust-v0.142.3) and [npm package](https://www.npmjs.com/package/@openai/codex/v/0.142.3).
|
|
28
28
|
|
|
29
29
|
The fork keeps the internal Rust binary named `codex` for compatibility with upstream build artifacts. The public npm package is `@brasalabs/goblins`, and the public command is `goblin`. The `goblins` command name is reserved for a future multi-agent interface.
|
|
30
30
|
|
package/bin/goblin.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Unified entry point for the Goblins CLI.
|
|
3
3
|
|
|
4
4
|
import { spawn } from "node:child_process";
|
|
5
|
-
import { existsSync } from "fs";
|
|
5
|
+
import { existsSync, realpathSync } from "fs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import path from "path";
|
|
8
8
|
import { fileURLToPath } from "url";
|
|
@@ -56,34 +56,26 @@ if (!platformPackage) {
|
|
|
56
56
|
// Keep the internal Rust binary named `codex` so Goblins can reuse upstream
|
|
57
57
|
// release artifacts and minimize long-term fork drift.
|
|
58
58
|
const codexBinaryName = process.platform === "win32" ? "codex.exe" : "codex";
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
packageManager === "bun"
|
|
78
|
-
? "bun install -g @brasalabs/goblins@latest"
|
|
79
|
-
: "npm install -g @brasalabs/goblins@latest";
|
|
80
|
-
throw new Error(
|
|
81
|
-
`Missing optional dependency ${platformPackage}. Reinstall Goblins: ${updateCommand}`,
|
|
82
|
-
);
|
|
59
|
+
|
|
60
|
+
function findCodexExecutable() {
|
|
61
|
+
let vendorRoot;
|
|
62
|
+
try {
|
|
63
|
+
const packageJsonPath = require.resolve(`${platformPackage}/package.json`);
|
|
64
|
+
vendorRoot = path.join(path.dirname(packageJsonPath), "vendor");
|
|
65
|
+
} catch {
|
|
66
|
+
vendorRoot = path.join(__dirname, "..", "vendor");
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const codexExecutable = path.join(
|
|
70
|
+
vendorRoot,
|
|
71
|
+
targetTriple,
|
|
72
|
+
"codex",
|
|
73
|
+
codexBinaryName,
|
|
74
|
+
);
|
|
75
|
+
if (existsSync(codexExecutable)) {
|
|
76
|
+
return codexExecutable;
|
|
83
77
|
}
|
|
84
|
-
}
|
|
85
78
|
|
|
86
|
-
if (!vendorRoot) {
|
|
87
79
|
const packageManager = detectPackageManager();
|
|
88
80
|
const updateCommand =
|
|
89
81
|
packageManager === "bun"
|
|
@@ -94,8 +86,7 @@ if (!vendorRoot) {
|
|
|
94
86
|
);
|
|
95
87
|
}
|
|
96
88
|
|
|
97
|
-
const
|
|
98
|
-
const binaryPath = path.join(archRoot, "codex", codexBinaryName);
|
|
89
|
+
const binaryPath = findCodexExecutable();
|
|
99
90
|
|
|
100
91
|
// Use an asynchronous spawn instead of spawnSync so that Node is able to
|
|
101
92
|
// respond to signals (e.g. Ctrl-C / SIGINT) while the native binary is
|
|
@@ -103,16 +94,6 @@ const binaryPath = path.join(archRoot, "codex", codexBinaryName);
|
|
|
103
94
|
// and guarantees that when either the child terminates or the parent
|
|
104
95
|
// receives a fatal signal, both processes exit in a predictable manner.
|
|
105
96
|
|
|
106
|
-
function getUpdatedPath(newDirs) {
|
|
107
|
-
const pathSep = process.platform === "win32" ? ";" : ":";
|
|
108
|
-
const existingPath = process.env.PATH || "";
|
|
109
|
-
const updatedPath = [
|
|
110
|
-
...newDirs,
|
|
111
|
-
...existingPath.split(pathSep).filter(Boolean),
|
|
112
|
-
].join(pathSep);
|
|
113
|
-
return updatedPath;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
97
|
/**
|
|
117
98
|
* Use heuristics to detect the package manager that was used to install Goblins
|
|
118
99
|
* in order to give the user a hint about how to update it.
|
|
@@ -138,19 +119,15 @@ function detectPackageManager() {
|
|
|
138
119
|
return userAgent ? "npm" : null;
|
|
139
120
|
}
|
|
140
121
|
|
|
141
|
-
const additionalDirs = [];
|
|
142
|
-
const pathDir = path.join(archRoot, "path");
|
|
143
|
-
if (existsSync(pathDir)) {
|
|
144
|
-
additionalDirs.push(pathDir);
|
|
145
|
-
}
|
|
146
|
-
const updatedPath = getUpdatedPath(additionalDirs);
|
|
147
|
-
|
|
148
|
-
const env = { ...process.env, PATH: updatedPath };
|
|
149
122
|
const packageManagerEnvVar =
|
|
150
123
|
detectPackageManager() === "bun"
|
|
151
124
|
? "GOBLINS_MANAGED_BY_BUN"
|
|
152
125
|
: "GOBLINS_MANAGED_BY_NPM";
|
|
153
|
-
env
|
|
126
|
+
const env = {
|
|
127
|
+
...process.env,
|
|
128
|
+
[packageManagerEnvVar]: "1",
|
|
129
|
+
GOBLINS_MANAGED_PACKAGE_ROOT: realpathSync(path.join(__dirname, "..")),
|
|
130
|
+
};
|
|
154
131
|
|
|
155
132
|
const child = spawn(binaryPath, process.argv.slice(2), {
|
|
156
133
|
stdio: "inherit",
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brasalabs/goblins",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.142.3-beta.1",
|
|
4
|
+
"description": "Goblins is a community fork of OpenAI Codex CLI that runs locally on your computer.",
|
|
4
5
|
"license": "Apache-2.0",
|
|
5
6
|
"bin": {
|
|
6
7
|
"goblin": "bin/goblin.js"
|
|
@@ -19,7 +20,6 @@
|
|
|
19
20
|
},
|
|
20
21
|
"packageManager": "pnpm@10.33.0+sha512.10568bb4a6afb58c9eb3630da90cc9516417abebd3fabbe6739f0ae795728da1491e9db5a544c76ad8eb7570f5c4bb3d6c637b2cb41bfdcdb47fa823c8649319",
|
|
21
22
|
"optionalDependencies": {
|
|
22
|
-
"@brasalabs/goblins-linux-x64": "0.
|
|
23
|
-
"@brasalabs/goblins-win32-x64": "0.128.1-win32-x64"
|
|
23
|
+
"@brasalabs/goblins-linux-x64": "0.142.3-beta.1-linux-x64"
|
|
24
24
|
}
|
|
25
25
|
}
|