@locusai/cli 0.23.0 → 0.23.2
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/locus.js +38 -3
- package/package.json +2 -2
package/bin/locus.js
CHANGED
|
@@ -900,12 +900,20 @@ __export(exports_sandbox, {
|
|
|
900
900
|
detectContainerWorkdir: () => detectContainerWorkdir,
|
|
901
901
|
checkProviderSandboxMismatch: () => checkProviderSandboxMismatch,
|
|
902
902
|
buildSandboxEnvWrapper: () => buildSandboxEnvWrapper,
|
|
903
|
-
|
|
903
|
+
buildBinaryOverrideSnippet: () => buildBinaryOverrideSnippet,
|
|
904
|
+
SANDBOX_DEPS_DIR: () => SANDBOX_DEPS_DIR,
|
|
905
|
+
SANDBOX_BINARY_OVERRIDES: () => SANDBOX_BINARY_OVERRIDES
|
|
904
906
|
});
|
|
905
907
|
import { execFile, execSync as execSync2 } from "node:child_process";
|
|
906
908
|
import { createInterface } from "node:readline";
|
|
909
|
+
function buildBinaryOverrideSnippet() {
|
|
910
|
+
return SANDBOX_BINARY_OVERRIDES.map(([envVar, candidates]) => {
|
|
911
|
+
const paths = candidates.map((p) => `"${SANDBOX_DEPS_DIR}/${p}"`).join(" ");
|
|
912
|
+
return `for _b in ${paths}; do [ -x "$_b" ] && ${envVar}="$_b" && export ${envVar} && break; done;`;
|
|
913
|
+
}).join(" ");
|
|
914
|
+
}
|
|
907
915
|
function buildSandboxEnvWrapper(workdir) {
|
|
908
|
-
return 'PATH="' + SANDBOX_DEPS_DIR + "/node_modules/.bin:" + workdir + '/node_modules/.bin:$PATH"; export PATH; ' + 'NODE_PATH="' + SANDBOX_DEPS_DIR + '/node_modules${NODE_PATH:+:$NODE_PATH}"; export NODE_PATH; ' + 'exec "$@"';
|
|
916
|
+
return 'PATH="' + SANDBOX_DEPS_DIR + "/node_modules/.bin:" + workdir + '/node_modules/.bin:$PATH"; export PATH; ' + 'NODE_PATH="' + SANDBOX_DEPS_DIR + '/node_modules${NODE_PATH:+:$NODE_PATH}"; export NODE_PATH; ' + buildBinaryOverrideSnippet() + " " + 'exec "$@"';
|
|
909
917
|
}
|
|
910
918
|
function getProviderSandboxName(config, provider) {
|
|
911
919
|
return config.providers[provider];
|
|
@@ -1122,11 +1130,34 @@ function waitForEnter() {
|
|
|
1122
1130
|
});
|
|
1123
1131
|
});
|
|
1124
1132
|
}
|
|
1125
|
-
var SANDBOX_DEPS_DIR = "/tmp/sandbox-deps", TIMEOUT_MS = 5000, cachedStatus = null;
|
|
1133
|
+
var SANDBOX_DEPS_DIR = "/tmp/sandbox-deps", SANDBOX_BINARY_OVERRIDES, TIMEOUT_MS = 5000, cachedStatus = null;
|
|
1126
1134
|
var init_sandbox = __esm(() => {
|
|
1127
1135
|
init_terminal();
|
|
1128
1136
|
init_ai_models();
|
|
1129
1137
|
init_logger();
|
|
1138
|
+
SANDBOX_BINARY_OVERRIDES = [
|
|
1139
|
+
[
|
|
1140
|
+
"BIOME_BINARY",
|
|
1141
|
+
[
|
|
1142
|
+
"node_modules/@biomejs/cli-linux-arm64/biome",
|
|
1143
|
+
"node_modules/@biomejs/cli-linux-x64/biome"
|
|
1144
|
+
]
|
|
1145
|
+
],
|
|
1146
|
+
[
|
|
1147
|
+
"ESBUILD_BINARY_PATH",
|
|
1148
|
+
[
|
|
1149
|
+
"node_modules/@esbuild/linux-arm64/bin/esbuild",
|
|
1150
|
+
"node_modules/@esbuild/linux-x64/bin/esbuild"
|
|
1151
|
+
]
|
|
1152
|
+
],
|
|
1153
|
+
[
|
|
1154
|
+
"TURBO_BINARY_PATH",
|
|
1155
|
+
[
|
|
1156
|
+
"node_modules/turbo-linux-arm64/bin/turbo",
|
|
1157
|
+
"node_modules/turbo-linux-64/bin/turbo"
|
|
1158
|
+
]
|
|
1159
|
+
]
|
|
1160
|
+
];
|
|
1130
1161
|
});
|
|
1131
1162
|
|
|
1132
1163
|
// src/commands/upgrade.ts
|
|
@@ -13715,6 +13746,10 @@ async function handleShell(projectRoot, args) {
|
|
|
13715
13746
|
`export PATH`,
|
|
13716
13747
|
'NODE_PATH="' + SANDBOX_DEPS_DIR + '/node_modules${NODE_PATH:+:$NODE_PATH}"',
|
|
13717
13748
|
`export NODE_PATH`,
|
|
13749
|
+
...SANDBOX_BINARY_OVERRIDES.map(([envVar, candidates]) => {
|
|
13750
|
+
const paths = candidates.map((p) => `"${SANDBOX_DEPS_DIR}/${p}"`).join(" ");
|
|
13751
|
+
return `for _b in ${paths}; do [ -x "$_b" ] && export ${envVar}="$_b" && break; done`;
|
|
13752
|
+
}),
|
|
13718
13753
|
`[ -f "${workdir}/.locus/sandbox-profile.sh" ] && . "${workdir}/.locus/sandbox-profile.sh"`,
|
|
13719
13754
|
`exec sh`
|
|
13720
13755
|
].join(`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@locusai/cli",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.2",
|
|
4
4
|
"description": "GitHub-native AI engineering assistant",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"license": "MIT",
|
|
37
37
|
"dependencies": {},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@locusai/sdk": "^0.23.
|
|
39
|
+
"@locusai/sdk": "^0.23.2",
|
|
40
40
|
"@types/bun": "latest",
|
|
41
41
|
"typescript": "^5.8.3"
|
|
42
42
|
},
|