@reconcrap/boss-recruit-mcp 1.0.18 → 1.0.19
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 +1 -1
- package/src/cli.js +33 -8
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -133,14 +133,39 @@ function writeInstalledSkillVersion(version) {
|
|
|
133
133
|
fs.writeFileSync(markerPath, `${version}\n`, "utf8");
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
function getChromeUserDataDir(port, options = {}) {
|
|
137
|
-
const rawProvided = options.userDataDir ?? options["user-data-dir"];
|
|
138
|
-
const provided = typeof rawProvided === "string" ? rawProvided.trim() : "";
|
|
139
|
-
const basePath = provided ||
|
|
140
|
-
const targetPath = path.resolve(basePath);
|
|
141
|
-
ensureDir(targetPath);
|
|
142
|
-
return targetPath;
|
|
143
|
-
}
|
|
136
|
+
function getChromeUserDataDir(port, options = {}) {
|
|
137
|
+
const rawProvided = options.userDataDir ?? options["user-data-dir"];
|
|
138
|
+
const provided = typeof rawProvided === "string" ? rawProvided.trim() : "";
|
|
139
|
+
const basePath = provided || resolveDefaultChromeUserDataDir(port);
|
|
140
|
+
const targetPath = path.resolve(basePath);
|
|
141
|
+
ensureDir(targetPath);
|
|
142
|
+
return targetPath;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function getSharedChromeUserDataDir(port) {
|
|
146
|
+
return path.join(getCodexHome(), "boss-mcp", `chrome-profile-${port}`);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function getLegacyRecruitChromeUserDataDir(port) {
|
|
150
|
+
return path.join(getCodexHome(), "boss-recruit-mcp", `chrome-profile-${port}`);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function getLegacyRecommendChromeUserDataDir(port) {
|
|
154
|
+
return path.join(os.homedir(), ".boss-recommend-mcp", `chrome-profile-${port}`);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function resolveDefaultChromeUserDataDir(port) {
|
|
158
|
+
const sharedPath = getSharedChromeUserDataDir(port);
|
|
159
|
+
if (pathExists(sharedPath)) {
|
|
160
|
+
return sharedPath;
|
|
161
|
+
}
|
|
162
|
+
const legacyPaths = [
|
|
163
|
+
getLegacyRecruitChromeUserDataDir(port),
|
|
164
|
+
getLegacyRecommendChromeUserDataDir(port)
|
|
165
|
+
];
|
|
166
|
+
const legacyExisting = legacyPaths.find((candidate) => pathExists(candidate));
|
|
167
|
+
return legacyExisting || sharedPath;
|
|
168
|
+
}
|
|
144
169
|
|
|
145
170
|
function parseOptions(args) {
|
|
146
171
|
const options = {};
|