@openape/apes 0.17.0 → 0.18.0
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/{auth-lock-NYI376IM.js → auth-lock-GPLHRXOM.js} +2 -2
- package/dist/chunk-7NUT2PFT.js +220 -0
- package/dist/chunk-7NUT2PFT.js.map +1 -0
- package/dist/{chunk-OFIVF6NH.js → chunk-EDYICCBC.js} +2 -2
- package/dist/{chunk-6GPSKAMU.js → chunk-IDPV5SNB.js} +1 -1
- package/dist/{chunk-O7GSG3OE.js → chunk-IT6T6AKX.js} +31 -240
- package/dist/chunk-IT6T6AKX.js.map +1 -0
- package/dist/cli.js +46 -16
- package/dist/cli.js.map +1 -1
- package/dist/config-JH2IEPIR.js +30 -0
- package/dist/config-JH2IEPIR.js.map +1 -0
- package/dist/http-JZT4XV5I.js +23 -0
- package/dist/http-JZT4XV5I.js.map +1 -0
- package/dist/index.js +7 -5
- package/dist/{orchestrator-PUAO57CY.js → orchestrator-FJVDWH45.js} +8 -6
- package/dist/{orchestrator-PUAO57CY.js.map → orchestrator-FJVDWH45.js.map} +1 -1
- package/dist/{server-YGRMW3OW.js → server-RPC46G4J.js} +8 -6
- package/dist/{server-YGRMW3OW.js.map → server-RPC46G4J.js.map} +1 -1
- package/package.json +3 -3
- package/dist/chunk-O7GSG3OE.js.map +0 -1
- /package/dist/{auth-lock-NYI376IM.js.map → auth-lock-GPLHRXOM.js.map} +0 -0
- /package/dist/{chunk-OFIVF6NH.js.map → chunk-EDYICCBC.js.map} +0 -0
- /package/dist/{chunk-6GPSKAMU.js.map → chunk-IDPV5SNB.js.map} +0 -0
package/dist/cli.js
CHANGED
|
@@ -12,11 +12,9 @@ import {
|
|
|
12
12
|
checkSudoRejection,
|
|
13
13
|
isApesSelfDispatch,
|
|
14
14
|
notifyGrantPending
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-EDYICCBC.js";
|
|
16
16
|
import {
|
|
17
|
-
ApiError,
|
|
18
17
|
GENERIC_OPERATION_ID,
|
|
19
|
-
apiFetch,
|
|
20
18
|
buildGenericResolved,
|
|
21
19
|
buildStructuredCliGrantRequest,
|
|
22
20
|
createShapesGrant,
|
|
@@ -28,10 +26,6 @@ import {
|
|
|
28
26
|
findAdapter,
|
|
29
27
|
findConflictingAdapters,
|
|
30
28
|
findExistingGrant,
|
|
31
|
-
getAgentAuthenticateEndpoint,
|
|
32
|
-
getAgentChallengeEndpoint,
|
|
33
|
-
getDelegationsEndpoint,
|
|
34
|
-
getGrantsEndpoint,
|
|
35
29
|
getInstalledDigest,
|
|
36
30
|
installAdapter,
|
|
37
31
|
isInstalled,
|
|
@@ -46,7 +40,15 @@ import {
|
|
|
46
40
|
searchAdapters,
|
|
47
41
|
verifyAndExecute,
|
|
48
42
|
waitForGrantStatus
|
|
49
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-IT6T6AKX.js";
|
|
44
|
+
import {
|
|
45
|
+
ApiError,
|
|
46
|
+
apiFetch,
|
|
47
|
+
getAgentAuthenticateEndpoint,
|
|
48
|
+
getAgentChallengeEndpoint,
|
|
49
|
+
getDelegationsEndpoint,
|
|
50
|
+
getGrantsEndpoint
|
|
51
|
+
} from "./chunk-7NUT2PFT.js";
|
|
50
52
|
import {
|
|
51
53
|
AUTH_FILE,
|
|
52
54
|
CONFIG_DIR,
|
|
@@ -58,7 +60,7 @@ import {
|
|
|
58
60
|
loadConfig,
|
|
59
61
|
saveAuth,
|
|
60
62
|
saveConfig
|
|
61
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-IDPV5SNB.js";
|
|
62
64
|
|
|
63
65
|
// src/cli.ts
|
|
64
66
|
import consola33 from "consola";
|
|
@@ -462,7 +464,7 @@ var whoamiCommand = defineCommand3({
|
|
|
462
464
|
console.log(`IdP: ${auth.idp}`);
|
|
463
465
|
console.log(`Token: ${isExpired ? "\u26A0 EXPIRED" : "valid"} (until ${expiresAt})`);
|
|
464
466
|
if (isExpired) {
|
|
465
|
-
consola4.warn("Token is expired. Run `apes login` to re-authenticate.");
|
|
467
|
+
consola4.warn("Token is expired and could not be auto-refreshed. Run `apes login` to re-authenticate.");
|
|
466
468
|
}
|
|
467
469
|
}
|
|
468
470
|
});
|
|
@@ -3699,7 +3701,7 @@ var mcpCommand = defineCommand32({
|
|
|
3699
3701
|
if (transport !== "stdio" && transport !== "sse") {
|
|
3700
3702
|
throw new Error('Transport must be "stdio" or "sse"');
|
|
3701
3703
|
}
|
|
3702
|
-
const { startMcpServer } = await import("./server-
|
|
3704
|
+
const { startMcpServer } = await import("./server-RPC46G4J.js");
|
|
3703
3705
|
await startMcpServer(transport, port);
|
|
3704
3706
|
}
|
|
3705
3707
|
});
|
|
@@ -4267,7 +4269,7 @@ async function bestEffortGrantCount(idp) {
|
|
|
4267
4269
|
}
|
|
4268
4270
|
}
|
|
4269
4271
|
async function runHealth(args) {
|
|
4270
|
-
const version = true ? "0.
|
|
4272
|
+
const version = true ? "0.18.0" : "0.0.0";
|
|
4271
4273
|
const auth = loadAuth();
|
|
4272
4274
|
if (!auth) {
|
|
4273
4275
|
throw new CliError("Not logged in. Run `apes login` first.", 1);
|
|
@@ -4469,10 +4471,10 @@ if (shellRewrite) {
|
|
|
4469
4471
|
if (shellRewrite.action === "rewrite") {
|
|
4470
4472
|
process.argv = shellRewrite.argv;
|
|
4471
4473
|
} else if (shellRewrite.action === "version") {
|
|
4472
|
-
console.log(`ape-shell ${"0.
|
|
4474
|
+
console.log(`ape-shell ${"0.18.0"} (OpenApe DDISA shell wrapper)`);
|
|
4473
4475
|
process.exit(0);
|
|
4474
4476
|
} else if (shellRewrite.action === "help") {
|
|
4475
|
-
console.log(`ape-shell ${"0.
|
|
4477
|
+
console.log(`ape-shell ${"0.18.0"} \u2014 OpenApe DDISA shell wrapper`);
|
|
4476
4478
|
console.log("");
|
|
4477
4479
|
console.log("Usage:");
|
|
4478
4480
|
console.log(" ape-shell Start interactive grant-mediated REPL");
|
|
@@ -4487,7 +4489,7 @@ if (shellRewrite) {
|
|
|
4487
4489
|
console.log(" --help, -h Show this help message");
|
|
4488
4490
|
process.exit(0);
|
|
4489
4491
|
} else if (shellRewrite.action === "interactive") {
|
|
4490
|
-
const { runInteractiveShell } = await import("./orchestrator-
|
|
4492
|
+
const { runInteractiveShell } = await import("./orchestrator-FJVDWH45.js");
|
|
4491
4493
|
await runInteractiveShell();
|
|
4492
4494
|
process.exit(0);
|
|
4493
4495
|
} else {
|
|
@@ -4530,7 +4532,7 @@ var configCommand = defineCommand41({
|
|
|
4530
4532
|
var main = defineCommand41({
|
|
4531
4533
|
meta: {
|
|
4532
4534
|
name: "apes",
|
|
4533
|
-
version: "0.
|
|
4535
|
+
version: "0.18.0",
|
|
4534
4536
|
description: "Unified CLI for OpenApe"
|
|
4535
4537
|
},
|
|
4536
4538
|
subCommands: {
|
|
@@ -4556,6 +4558,34 @@ var main = defineCommand41({
|
|
|
4556
4558
|
workflows: workflowsCommand
|
|
4557
4559
|
}
|
|
4558
4560
|
});
|
|
4561
|
+
var NO_REFRESH_COMMANDS = /* @__PURE__ */ new Set([
|
|
4562
|
+
"login",
|
|
4563
|
+
"logout",
|
|
4564
|
+
"init",
|
|
4565
|
+
"enroll",
|
|
4566
|
+
"register-user",
|
|
4567
|
+
"dns-check",
|
|
4568
|
+
"utils",
|
|
4569
|
+
"explain",
|
|
4570
|
+
"workflows",
|
|
4571
|
+
"--help",
|
|
4572
|
+
"-h",
|
|
4573
|
+
"help",
|
|
4574
|
+
"--version",
|
|
4575
|
+
"-v"
|
|
4576
|
+
]);
|
|
4577
|
+
async function maybeRefreshAuth() {
|
|
4578
|
+
const sub = process.argv[2];
|
|
4579
|
+
if (!sub || NO_REFRESH_COMMANDS.has(sub)) return;
|
|
4580
|
+
const { loadAuth: loadAuth2 } = await import("./config-JH2IEPIR.js");
|
|
4581
|
+
if (!loadAuth2()) return;
|
|
4582
|
+
try {
|
|
4583
|
+
const { ensureFreshToken } = await import("./http-JZT4XV5I.js");
|
|
4584
|
+
await ensureFreshToken();
|
|
4585
|
+
} catch {
|
|
4586
|
+
}
|
|
4587
|
+
}
|
|
4588
|
+
await maybeRefreshAuth();
|
|
4559
4589
|
runMain(main).catch((err) => {
|
|
4560
4590
|
if (err instanceof CliExit) {
|
|
4561
4591
|
process.exit(err.exitCode);
|