@locusai/cli 0.22.3 → 0.22.4
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 +17 -14
- package/package.json +2 -2
package/bin/locus.js
CHANGED
|
@@ -1037,25 +1037,28 @@ ${yellow2("⚠")} Docker sandbox not available. Install Docker Desktop 4.58+ fo
|
|
|
1037
1037
|
function detectContainerWorkdir(sandboxName, hostProjectRoot) {
|
|
1038
1038
|
const log = getLogger();
|
|
1039
1039
|
try {
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1040
|
+
execSync2(`docker sandbox exec ${sandboxName} test -d ${JSON.stringify(hostProjectRoot)}`, { stdio: ["pipe", "pipe", "pipe"], timeout: 5000 });
|
|
1041
|
+
log.debug("Container workdir matches host path", { hostProjectRoot });
|
|
1042
|
+
return null;
|
|
1043
|
+
} catch {
|
|
1044
|
+
log.debug("Host path not found in container, probing for mount point...");
|
|
1045
|
+
}
|
|
1046
|
+
try {
|
|
1047
|
+
const gitDir = execSync2(`docker sandbox exec ${sandboxName} sh -c "find / -maxdepth 4 -name .git -type d ! -path '*/proc/*' ! -path '*/sys/*' 2>/dev/null | head -1"`, { encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"], timeout: 1e4 }).trim();
|
|
1048
|
+
if (gitDir) {
|
|
1049
|
+
const containerPath = gitDir.replace(/\/\.git$/, "") || "/";
|
|
1050
|
+
log.debug("Detected container workdir from .git marker", {
|
|
1051
|
+
hostProjectRoot,
|
|
1052
|
+
containerWorkdir: containerPath
|
|
1053
|
+
});
|
|
1054
|
+
return containerPath;
|
|
1048
1055
|
}
|
|
1049
|
-
log.debug("Detected container workdir differs from host", {
|
|
1050
|
-
hostProjectRoot,
|
|
1051
|
-
containerWorkdir: containerPath
|
|
1052
|
-
});
|
|
1053
|
-
return containerPath;
|
|
1054
1056
|
} catch (err) {
|
|
1055
|
-
log.debug("Container workdir detection via
|
|
1057
|
+
log.debug("Container workdir detection via .git probe failed", {
|
|
1056
1058
|
error: err instanceof Error ? err.message : String(err)
|
|
1057
1059
|
});
|
|
1058
1060
|
}
|
|
1061
|
+
log.debug("Could not detect container workdir, falling back to host path");
|
|
1059
1062
|
return null;
|
|
1060
1063
|
}
|
|
1061
1064
|
function waitForEnter() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@locusai/cli",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.4",
|
|
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.22.
|
|
39
|
+
"@locusai/sdk": "^0.22.4",
|
|
40
40
|
"@types/bun": "latest",
|
|
41
41
|
"typescript": "^5.8.3"
|
|
42
42
|
},
|