@algosuite/vo-mcp 0.2.0-beta.17 → 0.2.0-beta.18
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/cli.js +146 -7
- package/dist/cli.js.map +4 -4
- package/dist/index.js +141 -3
- package/dist/index.js.map +4 -4
- package/dist/runner-cli.js +335 -38
- package/dist/runner-cli.js.map +4 -4
- package/dist/runner-supervisor.js +20 -2
- package/dist/runner-supervisor.js.map +2 -2
- package/package.json +1 -1
|
@@ -947,6 +947,7 @@ import {
|
|
|
947
947
|
rmSync,
|
|
948
948
|
writeFileSync
|
|
949
949
|
} from "node:fs";
|
|
950
|
+
import { homedir } from "node:os";
|
|
950
951
|
import { dirname as dirname2, isAbsolute as isAbsolute2, join as join2, relative as relative2, resolve as resolve3 } from "node:path";
|
|
951
952
|
var SLOT_ID_RE = /^vo-mcp-[0-9A-Za-z._-]{1,96}$/u;
|
|
952
953
|
var ACTION_ID_RE = /^[0-9A-Za-z._-]{1,128}$/u;
|
|
@@ -962,9 +963,26 @@ function within(parent, candidate) {
|
|
|
962
963
|
const rel = relative2(resolve3(parent), resolve3(candidate));
|
|
963
964
|
return rel === "" || !rel.startsWith("..") && !isAbsolute2(rel);
|
|
964
965
|
}
|
|
965
|
-
|
|
966
|
+
var APP_IDENTIFIER = "ai.algosuite.vo-runner";
|
|
967
|
+
var RUNNER_RUNTIME_DIR = "runner-runtime";
|
|
968
|
+
function defaultRuntimeRoot({ platform = process.platform, env = process.env, home = homedir() } = {}) {
|
|
969
|
+
if (platform === "win32") {
|
|
970
|
+
const appData = String(env.APPDATA || "").trim();
|
|
971
|
+
return appData && isAbsolute2(appData) ? join2(appData, APP_IDENTIFIER, RUNNER_RUNTIME_DIR) : null;
|
|
972
|
+
}
|
|
973
|
+
if (!home) return null;
|
|
974
|
+
if (platform === "darwin") {
|
|
975
|
+
return join2(home, "Library", "Application Support", APP_IDENTIFIER, RUNNER_RUNTIME_DIR);
|
|
976
|
+
}
|
|
977
|
+
const xdg = String(env.XDG_CONFIG_HOME || "").trim();
|
|
978
|
+
const base = xdg && isAbsolute2(xdg) ? xdg : join2(home, ".config");
|
|
979
|
+
return join2(base, APP_IDENTIFIER, RUNNER_RUNTIME_DIR);
|
|
980
|
+
}
|
|
981
|
+
function runtimeRootFromEnv(env = process.env, { platform, home } = {}) {
|
|
966
982
|
const value = String(env.VO_RUNNER_RUNTIME_ROOT || "").trim();
|
|
967
|
-
|
|
983
|
+
if (value) return isAbsolute2(value) ? resolve3(value) : null;
|
|
984
|
+
const derived = defaultRuntimeRoot({ platform, env, home });
|
|
985
|
+
return derived ? resolve3(derived) : null;
|
|
968
986
|
}
|
|
969
987
|
function hashFileSha512(file) {
|
|
970
988
|
return `sha512-${createHash3("sha512").update(readFileSync3(file)).digest("base64")}`;
|