@maintainer-pro/ai-bridge 0.1.26 → 0.1.27
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/package.json +3 -3
- package/src/daemon.mjs +4 -24
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maintainer-pro/ai-bridge",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.27",
|
|
4
4
|
"description": "Local bridge daemon that pairs a machine to Maintainer Pro and configures multiple client sandboxes.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"maintainer-pro",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"node": ">=22"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@maintainer-pro/ai-cli": "^0.1.
|
|
32
|
-
"@maintainer-pro/ai-server": "^0.1.
|
|
31
|
+
"@maintainer-pro/ai-cli": "^0.1.14",
|
|
32
|
+
"@maintainer-pro/ai-server": "^0.1.8"
|
|
33
33
|
}
|
|
34
34
|
}
|
package/src/daemon.mjs
CHANGED
|
@@ -2098,31 +2098,11 @@ function collectOfferedFolders() {
|
|
|
2098
2098
|
return [browseRootFromCwd()];
|
|
2099
2099
|
}
|
|
2100
2100
|
|
|
2101
|
-
/**
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
* macOS/Linux: `~/projects/app` → `~/projects`.
|
|
2105
|
-
*/
|
|
2101
|
+
/** Directory where the bridge process was started — folder picker stays here. */
|
|
2102
|
+
const LAUNCH_CWD = path.resolve(process.cwd());
|
|
2103
|
+
|
|
2106
2104
|
function browseRootFromCwd() {
|
|
2107
|
-
|
|
2108
|
-
if (process.platform === "win32") {
|
|
2109
|
-
const drive = path.parse(cwd).root;
|
|
2110
|
-
const first = cwd.slice(drive.length).split(/[\\/]/).filter(Boolean)[0];
|
|
2111
|
-
if (first) return path.resolve(path.join(drive, first));
|
|
2112
|
-
return cwd;
|
|
2113
|
-
}
|
|
2114
|
-
const home = path.resolve(os.homedir());
|
|
2115
|
-
if (pathInside(cwd, home)) {
|
|
2116
|
-
const first = cwd.slice(home.length).split("/").filter(Boolean)[0];
|
|
2117
|
-
if (first) return path.join(home, first);
|
|
2118
|
-
return home;
|
|
2119
|
-
}
|
|
2120
|
-
const bits = cwd.split("/").filter(Boolean);
|
|
2121
|
-
if (bits[0] === "Volumes" && bits[1]) {
|
|
2122
|
-
return path.join("/", bits[0], bits[1]);
|
|
2123
|
-
}
|
|
2124
|
-
if (bits[0]) return path.join("/", bits[0]);
|
|
2125
|
-
return cwd;
|
|
2105
|
+
return LAUNCH_CWD;
|
|
2126
2106
|
}
|
|
2127
2107
|
|
|
2128
2108
|
function normalizeFsPath(p) {
|