@archme/cli 0.12.1 → 0.12.2
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 +15 -6
- package/package.json +1 -1
- package/sandbox-image.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -9967,7 +9967,6 @@ var init_install = __esm({
|
|
|
9967
9967
|
"ARCHME_SANDBOX_PROJECTS",
|
|
9968
9968
|
"ARCHME_SANDBOX_RUNTIME",
|
|
9969
9969
|
"ARCHME_SANDBOX_IMAGE",
|
|
9970
|
-
"ARCHME_SANDBOX_SLOTS",
|
|
9971
9970
|
"ARCHME_SANDBOX_BOX_MEMORY_MIB",
|
|
9972
9971
|
"ARCHME_SANDBOX_VOLUME_GIB",
|
|
9973
9972
|
"ARCHME_SANDBOX_MAX_MODEL_REQUESTS",
|
|
@@ -18110,7 +18109,7 @@ function expandHome(p, home2) {
|
|
|
18110
18109
|
if (p.startsWith("~/")) return join20(home2, p.slice(2));
|
|
18111
18110
|
return p;
|
|
18112
18111
|
}
|
|
18113
|
-
function readSandboxSettings(env, home2 = homedir6(), shippedImage = () => null) {
|
|
18112
|
+
function readSandboxSettings(env, concurrency, home2 = homedir6(), shippedImage = () => null) {
|
|
18114
18113
|
const modeRaw = (env.ARCHME_SANDBOX ?? "").trim().toLowerCase() || "off";
|
|
18115
18114
|
if (modeRaw !== "off" && modeRaw !== "shadow" && modeRaw !== "required") {
|
|
18116
18115
|
throw new SandboxSettingsError(`ARCHME_SANDBOX must be off, shadow or required (got "${env.ARCHME_SANDBOX}")`);
|
|
@@ -18120,7 +18119,7 @@ function readSandboxSettings(env, home2 = homedir6(), shippedImage = () => null)
|
|
|
18120
18119
|
projects: /* @__PURE__ */ new Set(),
|
|
18121
18120
|
runtime: "apple-container",
|
|
18122
18121
|
image: "",
|
|
18123
|
-
slots:
|
|
18122
|
+
slots: concurrency,
|
|
18124
18123
|
boxMemoryMiB: SANDBOX_DEFAULTS.boxMemoryMiB,
|
|
18125
18124
|
boxCpus: SANDBOX_DEFAULTS.boxCpus,
|
|
18126
18125
|
volumeGiB: SANDBOX_DEFAULTS.volumeGiB,
|
|
@@ -18133,6 +18132,14 @@ function readSandboxSettings(env, home2 = homedir6(), shippedImage = () => null)
|
|
|
18133
18132
|
"ARCHME_SANDBOX=required needs network confinement (pf + the GitHub gatekeeper, step 19.3), which this release does not have; use ARCHME_SANDBOX=shadow"
|
|
18134
18133
|
);
|
|
18135
18134
|
}
|
|
18135
|
+
if (!Number.isInteger(concurrency)) {
|
|
18136
|
+
throw new SandboxSettingsError(`MAX_CONCURRENT_JOBS must be a whole number (got ${concurrency})`);
|
|
18137
|
+
}
|
|
18138
|
+
if (concurrency > MAX_SLOTS) {
|
|
18139
|
+
throw new SandboxSettingsError(
|
|
18140
|
+
`the sandbox supports at most ${MAX_SLOTS} concurrent jobs, but MAX_CONCURRENT_JOBS is ${concurrency}; lower MAX_CONCURRENT_JOBS to ${MAX_SLOTS} or less, or set ARCHME_SANDBOX=off`
|
|
18141
|
+
);
|
|
18142
|
+
}
|
|
18136
18143
|
const runtime = (env.ARCHME_SANDBOX_RUNTIME ?? "").trim() || "apple-container";
|
|
18137
18144
|
if (runtime !== "apple-container") {
|
|
18138
18145
|
throw new SandboxSettingsError(`ARCHME_SANDBOX_RUNTIME must be apple-container (got "${runtime}")`);
|
|
@@ -18159,7 +18166,7 @@ function readSandboxSettings(env, home2 = homedir6(), shippedImage = () => null)
|
|
|
18159
18166
|
projects,
|
|
18160
18167
|
runtime: "apple-container",
|
|
18161
18168
|
image,
|
|
18162
|
-
slots:
|
|
18169
|
+
slots: concurrency,
|
|
18163
18170
|
boxMemoryMiB: intEnv(env, "ARCHME_SANDBOX_BOX_MEMORY_MIB", SANDBOX_DEFAULTS.boxMemoryMiB, {
|
|
18164
18171
|
min: SANDBOX_DEFAULTS.minBoxMemoryMiB
|
|
18165
18172
|
}),
|
|
@@ -18190,7 +18197,6 @@ var init_setting = __esm({
|
|
|
18190
18197
|
}
|
|
18191
18198
|
};
|
|
18192
18199
|
SANDBOX_DEFAULTS = {
|
|
18193
|
-
slots: 2,
|
|
18194
18200
|
boxMemoryMiB: 2048,
|
|
18195
18201
|
boxCpus: 2,
|
|
18196
18202
|
volumeGiB: 8,
|
|
@@ -21939,7 +21945,7 @@ async function runDaemon() {
|
|
|
21939
21945
|
console.log(` max concurrent jobs: ${MAX_CONCURRENT_JOBS}`);
|
|
21940
21946
|
let sandboxSettings;
|
|
21941
21947
|
try {
|
|
21942
|
-
sandboxSettings = readSandboxSettings(process.env, void 0, () => readShippedImage());
|
|
21948
|
+
sandboxSettings = readSandboxSettings(process.env, MAX_CONCURRENT_JOBS, void 0, () => readShippedImage());
|
|
21943
21949
|
} catch (err4) {
|
|
21944
21950
|
if (!(err4 instanceof SandboxSettingsError)) throw err4;
|
|
21945
21951
|
console.error(err4.message);
|
|
@@ -21951,6 +21957,9 @@ async function runDaemon() {
|
|
|
21951
21957
|
}
|
|
21952
21958
|
exitDaemon(1);
|
|
21953
21959
|
}
|
|
21960
|
+
if (process.env.ARCHME_SANDBOX_SLOTS !== void 0) {
|
|
21961
|
+
console.log(" ARCHME_SANDBOX_SLOTS is no longer read; sandbox slots follow MAX_CONCURRENT_JOBS");
|
|
21962
|
+
}
|
|
21954
21963
|
console.log(` sandbox: ${sandboxSettings.mode}${sandboxSettings.mode === "shadow" ? ` (projects: ${sandboxSettings.projects.size ? [...sandboxSettings.projects].join(", ") : "all"}; ${sandboxSettings.slots} slot(s))` : ""}`);
|
|
21955
21964
|
const bearerCfg = {
|
|
21956
21965
|
supabaseUrl: SUPABASE_URL,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@archme/cli",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"description": "Map your codebase into a living architecture diagram: run `archme init` in a repo to scan it, `archme daemon start` to keep it current on every commit.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
package/sandbox-image.json
CHANGED