@agentv/core 4.12.8-next.1 → 4.13.0-next.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/dist/index.cjs +42 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +51 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9057,8 +9057,50 @@ function resolvePlatformCliPath() {
|
|
|
9057
9057
|
if (parent === searchDir) break;
|
|
9058
9058
|
searchDir = parent;
|
|
9059
9059
|
}
|
|
9060
|
+
for (const root of globalNpmRoots()) {
|
|
9061
|
+
const hoisted = import_node_path17.default.join(root, "@github", `copilot-${osPart}-${archPart}`, binaryName);
|
|
9062
|
+
if ((0, import_node_fs7.existsSync)(hoisted)) {
|
|
9063
|
+
return hoisted;
|
|
9064
|
+
}
|
|
9065
|
+
const nested = import_node_path17.default.join(
|
|
9066
|
+
root,
|
|
9067
|
+
"@github",
|
|
9068
|
+
"copilot",
|
|
9069
|
+
"node_modules",
|
|
9070
|
+
"@github",
|
|
9071
|
+
`copilot-${osPart}-${archPart}`,
|
|
9072
|
+
binaryName
|
|
9073
|
+
);
|
|
9074
|
+
if ((0, import_node_fs7.existsSync)(nested)) {
|
|
9075
|
+
return nested;
|
|
9076
|
+
}
|
|
9077
|
+
}
|
|
9060
9078
|
return void 0;
|
|
9061
9079
|
}
|
|
9080
|
+
function globalNpmRoots() {
|
|
9081
|
+
const roots = [];
|
|
9082
|
+
const os4 = (0, import_node_os2.platform)();
|
|
9083
|
+
const home = (0, import_node_os2.homedir)();
|
|
9084
|
+
if (os4 === "win32") {
|
|
9085
|
+
if (process.env.APPDATA) {
|
|
9086
|
+
roots.push(import_node_path17.default.join(process.env.APPDATA, "npm", "node_modules"));
|
|
9087
|
+
}
|
|
9088
|
+
roots.push(import_node_path17.default.join(home, "AppData", "Roaming", "npm", "node_modules"));
|
|
9089
|
+
} else {
|
|
9090
|
+
roots.push("/opt/homebrew/lib/node_modules");
|
|
9091
|
+
roots.push("/usr/local/lib/node_modules");
|
|
9092
|
+
roots.push("/usr/lib/node_modules");
|
|
9093
|
+
roots.push(import_node_path17.default.join(home, ".npm-global", "lib", "node_modules"));
|
|
9094
|
+
roots.push(import_node_path17.default.join(home, ".local", "lib", "node_modules"));
|
|
9095
|
+
}
|
|
9096
|
+
if (process.env.npm_config_prefix) {
|
|
9097
|
+
const prefix = process.env.npm_config_prefix;
|
|
9098
|
+
roots.push(
|
|
9099
|
+
os4 === "win32" ? import_node_path17.default.join(prefix, "node_modules") : import_node_path17.default.join(prefix, "lib", "node_modules")
|
|
9100
|
+
);
|
|
9101
|
+
}
|
|
9102
|
+
return Array.from(new Set(roots));
|
|
9103
|
+
}
|
|
9062
9104
|
function buildLogFilename4(request, targetName, fallbackId) {
|
|
9063
9105
|
const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
9064
9106
|
const evalId = sanitizeForFilename4(request.evalCaseId ?? fallbackId);
|