@openape/apes 0.21.1 → 0.21.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
|
@@ -3236,14 +3236,17 @@ async function runAudienceMode(audience, action, args) {
|
|
|
3236
3236
|
throw new CliExit(getAsyncExitCode());
|
|
3237
3237
|
}
|
|
3238
3238
|
consola23.success(`Grant requested: ${grant.id}`);
|
|
3239
|
+
consola23.info(`Approve at: ${idp}/grant-approval?grant_id=${grant.id}`);
|
|
3239
3240
|
consola23.info("Waiting for approval...");
|
|
3240
|
-
const maxWait =
|
|
3241
|
+
const maxWait = 15 * 60 * 1e3;
|
|
3241
3242
|
const interval = 3e3;
|
|
3242
3243
|
const start = Date.now();
|
|
3244
|
+
let approved = false;
|
|
3243
3245
|
while (Date.now() - start < maxWait) {
|
|
3244
3246
|
const status = await apiFetch(`${grantsUrl}/${grant.id}`);
|
|
3245
3247
|
if (status.status === "approved") {
|
|
3246
3248
|
consola23.success("Grant approved!");
|
|
3249
|
+
approved = true;
|
|
3247
3250
|
break;
|
|
3248
3251
|
}
|
|
3249
3252
|
if (status.status === "denied" || status.status === "revoked") {
|
|
@@ -3251,6 +3254,12 @@ async function runAudienceMode(audience, action, args) {
|
|
|
3251
3254
|
}
|
|
3252
3255
|
await new Promise((r) => setTimeout(r, interval));
|
|
3253
3256
|
}
|
|
3257
|
+
if (!approved) {
|
|
3258
|
+
const minutes = Math.round(maxWait / 6e4);
|
|
3259
|
+
throw new CliError(
|
|
3260
|
+
`Grant approval timed out after ${minutes} min (still pending). Check your DDISA inbox at ${idp}/grant-approval?grant_id=${grant.id} \u2014 if approved later, re-run the same \`apes run\` command and it will reuse the grant.`
|
|
3261
|
+
);
|
|
3262
|
+
}
|
|
3254
3263
|
consola23.info("Fetching grant token...");
|
|
3255
3264
|
const { authz_jwt } = await apiFetch(`${grantsUrl}/${grant.id}/token`, {
|
|
3256
3265
|
method: "POST"
|
|
@@ -3761,7 +3770,7 @@ var mcpCommand = defineCommand32({
|
|
|
3761
3770
|
if (transport !== "stdio" && transport !== "sse") {
|
|
3762
3771
|
throw new Error('Transport must be "stdio" or "sse"');
|
|
3763
3772
|
}
|
|
3764
|
-
const { startMcpServer } = await import("./server-
|
|
3773
|
+
const { startMcpServer } = await import("./server-FO4XBTPU.js");
|
|
3765
3774
|
await startMcpServer(transport, port);
|
|
3766
3775
|
}
|
|
3767
3776
|
});
|
|
@@ -4399,7 +4408,7 @@ async function bestEffortGrantCount(idp) {
|
|
|
4399
4408
|
}
|
|
4400
4409
|
}
|
|
4401
4410
|
async function runHealth(args) {
|
|
4402
|
-
const version = true ? "0.21.
|
|
4411
|
+
const version = true ? "0.21.2" : "0.0.0";
|
|
4403
4412
|
const auth = loadAuth();
|
|
4404
4413
|
if (!auth) {
|
|
4405
4414
|
throw new CliError("Not logged in. Run `apes login` first.", 1);
|
|
@@ -4601,10 +4610,10 @@ if (shellRewrite) {
|
|
|
4601
4610
|
if (shellRewrite.action === "rewrite") {
|
|
4602
4611
|
process.argv = shellRewrite.argv;
|
|
4603
4612
|
} else if (shellRewrite.action === "version") {
|
|
4604
|
-
console.log(`ape-shell ${"0.21.
|
|
4613
|
+
console.log(`ape-shell ${"0.21.2"} (OpenApe DDISA shell wrapper)`);
|
|
4605
4614
|
process.exit(0);
|
|
4606
4615
|
} else if (shellRewrite.action === "help") {
|
|
4607
|
-
console.log(`ape-shell ${"0.21.
|
|
4616
|
+
console.log(`ape-shell ${"0.21.2"} \u2014 OpenApe DDISA shell wrapper`);
|
|
4608
4617
|
console.log("");
|
|
4609
4618
|
console.log("Usage:");
|
|
4610
4619
|
console.log(" ape-shell Start interactive grant-mediated REPL");
|
|
@@ -4662,7 +4671,7 @@ var configCommand = defineCommand44({
|
|
|
4662
4671
|
var main = defineCommand44({
|
|
4663
4672
|
meta: {
|
|
4664
4673
|
name: "apes",
|
|
4665
|
-
version: "0.21.
|
|
4674
|
+
version: "0.21.2",
|
|
4666
4675
|
description: "Unified CLI for OpenApe"
|
|
4667
4676
|
},
|
|
4668
4677
|
subCommands: {
|