@openape/apes 1.22.1 → 1.22.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
CHANGED
|
@@ -3216,21 +3216,34 @@ ${consequences.join("\n")}`);
|
|
|
3216
3216
|
throw new CliError("`sudo` not found on PATH; required for OS teardown.");
|
|
3217
3217
|
}
|
|
3218
3218
|
const adminUser = userInfo().username;
|
|
3219
|
-
|
|
3220
|
-
const scratch = mkdtempSync(join3(tmpdir(), `apes-destroy-${name}-`));
|
|
3221
|
-
const scriptPath = join3(scratch, "teardown.sh");
|
|
3219
|
+
let adminPassword;
|
|
3222
3220
|
try {
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3221
|
+
adminPassword = await collectAdminPassword({ adminUser });
|
|
3222
|
+
} catch (err) {
|
|
3223
|
+
const headless = !process.stdin.isTTY && !process.env.APES_ADMIN_PASSWORD;
|
|
3224
|
+
if (headless) {
|
|
3225
|
+
consola19.warn(`Legacy OS teardown for ${name} requires a TTY or APES_ADMIN_PASSWORD; skipping. Run \`apes agents destroy ${name}\` from a shell later to fully clean up /Users/${name} + dscl record.`);
|
|
3226
|
+
adminPassword = "";
|
|
3227
|
+
} else {
|
|
3228
|
+
throw err;
|
|
3229
|
+
}
|
|
3230
|
+
}
|
|
3231
|
+
if (adminPassword) {
|
|
3232
|
+
const scratch = mkdtempSync(join3(tmpdir(), `apes-destroy-${name}-`));
|
|
3233
|
+
const scriptPath = join3(scratch, "teardown.sh");
|
|
3234
|
+
try {
|
|
3235
|
+
const script = buildDestroyTeardownScript({ name, homeDir, adminUser });
|
|
3236
|
+
writeFileSync2(scriptPath, script, { mode: 448 });
|
|
3237
|
+
consola19.start("Running teardown via sudo\u2026");
|
|
3238
|
+
execFileSync4(sudo, ["-S", "--prompt=", "--", "bash", scriptPath], {
|
|
3239
|
+
input: `${adminPassword}
|
|
3228
3240
|
${adminPassword}
|
|
3229
3241
|
`,
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3242
|
+
stdio: ["pipe", "inherit", "inherit"]
|
|
3243
|
+
});
|
|
3244
|
+
} finally {
|
|
3245
|
+
rmSync(scratch, { recursive: true, force: true });
|
|
3246
|
+
}
|
|
3234
3247
|
}
|
|
3235
3248
|
}
|
|
3236
3249
|
} else if (!args["keep-os-user"] && isDarwin()) {
|
|
@@ -6458,7 +6471,7 @@ var mcpCommand = defineCommand48({
|
|
|
6458
6471
|
if (transport !== "stdio" && transport !== "sse") {
|
|
6459
6472
|
throw new Error('Transport must be "stdio" or "sse"');
|
|
6460
6473
|
}
|
|
6461
|
-
const { startMcpServer } = await import("./server-
|
|
6474
|
+
const { startMcpServer } = await import("./server-PKEGSN5E.js");
|
|
6462
6475
|
await startMcpServer(transport, port);
|
|
6463
6476
|
}
|
|
6464
6477
|
});
|
|
@@ -7096,7 +7109,7 @@ async function bestEffortGrantCount(idp) {
|
|
|
7096
7109
|
}
|
|
7097
7110
|
}
|
|
7098
7111
|
async function runHealth(args) {
|
|
7099
|
-
const version = true ? "1.22.
|
|
7112
|
+
const version = true ? "1.22.2" : "0.0.0";
|
|
7100
7113
|
const auth = loadAuth();
|
|
7101
7114
|
if (!auth) {
|
|
7102
7115
|
throw new CliError("Not logged in. Run `apes login` first.", 1);
|
|
@@ -7369,10 +7382,10 @@ if (shellRewrite) {
|
|
|
7369
7382
|
if (shellRewrite.action === "rewrite") {
|
|
7370
7383
|
process.argv = shellRewrite.argv;
|
|
7371
7384
|
} else if (shellRewrite.action === "version") {
|
|
7372
|
-
console.log(`ape-shell ${"1.22.
|
|
7385
|
+
console.log(`ape-shell ${"1.22.2"} (OpenApe DDISA shell wrapper)`);
|
|
7373
7386
|
process.exit(0);
|
|
7374
7387
|
} else if (shellRewrite.action === "help") {
|
|
7375
|
-
console.log(`ape-shell ${"1.22.
|
|
7388
|
+
console.log(`ape-shell ${"1.22.2"} \u2014 OpenApe DDISA shell wrapper`);
|
|
7376
7389
|
console.log("");
|
|
7377
7390
|
console.log("Usage:");
|
|
7378
7391
|
console.log(" ape-shell Start interactive grant-mediated REPL");
|
|
@@ -7430,7 +7443,7 @@ var configCommand = defineCommand60({
|
|
|
7430
7443
|
var main = defineCommand60({
|
|
7431
7444
|
meta: {
|
|
7432
7445
|
name: "apes",
|
|
7433
|
-
version: "1.22.
|
|
7446
|
+
version: "1.22.2",
|
|
7434
7447
|
description: "Unified CLI for OpenApe"
|
|
7435
7448
|
},
|
|
7436
7449
|
subCommands: {
|
|
@@ -7487,7 +7500,7 @@ async function maybeRefreshAuth() {
|
|
|
7487
7500
|
}
|
|
7488
7501
|
}
|
|
7489
7502
|
await maybeRefreshAuth();
|
|
7490
|
-
await maybeWarnStaleVersion("1.22.
|
|
7503
|
+
await maybeWarnStaleVersion("1.22.2").catch(() => {
|
|
7491
7504
|
});
|
|
7492
7505
|
runMain(main).catch((err) => {
|
|
7493
7506
|
if (err instanceof CliExit) {
|