@openape/apes 1.8.0 → 1.8.1

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
@@ -1366,7 +1366,7 @@ var delegateCommand = defineCommand14({
1366
1366
  const body = {
1367
1367
  delegate: args.to,
1368
1368
  audience: args.at,
1369
- approval: args.approval
1369
+ grant_type: args.approval
1370
1370
  };
1371
1371
  if (args.scopes) {
1372
1372
  body.scopes = args.scopes.split(",").map((s) => s.trim());
@@ -2514,15 +2514,20 @@ async function tryDelegatedEnrollToken(idp) {
2514
2514
  const idpUrl = idp ?? auth.idp;
2515
2515
  if (!idpUrl) return null;
2516
2516
  const grantId = await findEnrollDelegationGrantId(idpUrl, ownerEmail, myEmail);
2517
- if (!grantId) return null;
2517
+ if (!grantId) {
2518
+ console.warn(`[agent-bootstrap] no enroll-agent delegation from ${ownerEmail} to ${myEmail} \u2014 falling back to direct enroll`);
2519
+ return null;
2520
+ }
2518
2521
  const result = await exchangeWithDelegation({
2519
2522
  idp: idpUrl,
2520
2523
  actorToken: auth.access_token,
2521
2524
  audience: ENROLL_AUDIENCE,
2522
2525
  delegationGrantId: grantId
2523
2526
  });
2527
+ console.log(`[agent-bootstrap] using delegated token from grant ${grantId} (sub=${ownerEmail}, act=${myEmail})`);
2524
2528
  return result.access_token;
2525
- } catch {
2529
+ } catch (err) {
2530
+ console.warn(`[agent-bootstrap] delegated-enroll exchange failed: ${err instanceof Error ? err.message : String(err)} \u2014 falling back to direct enroll`);
2526
2531
  return null;
2527
2532
  }
2528
2533
  }
@@ -6870,7 +6875,7 @@ var mcpCommand = defineCommand49({
6870
6875
  if (transport !== "stdio" && transport !== "sse") {
6871
6876
  throw new Error('Transport must be "stdio" or "sse"');
6872
6877
  }
6873
- const { startMcpServer } = await import("./server-6B26NNLZ.js");
6878
+ const { startMcpServer } = await import("./server-EKUVZDZC.js");
6874
6879
  await startMcpServer(transport, port);
6875
6880
  }
6876
6881
  });
@@ -7508,7 +7513,7 @@ async function bestEffortGrantCount(idp) {
7508
7513
  }
7509
7514
  }
7510
7515
  async function runHealth(args) {
7511
- const version = true ? "1.8.0" : "0.0.0";
7516
+ const version = true ? "1.8.1" : "0.0.0";
7512
7517
  const auth = loadAuth();
7513
7518
  if (!auth) {
7514
7519
  throw new CliError("Not logged in. Run `apes login` first.", 1);
@@ -7781,10 +7786,10 @@ if (shellRewrite) {
7781
7786
  if (shellRewrite.action === "rewrite") {
7782
7787
  process.argv = shellRewrite.argv;
7783
7788
  } else if (shellRewrite.action === "version") {
7784
- console.log(`ape-shell ${"1.8.0"} (OpenApe DDISA shell wrapper)`);
7789
+ console.log(`ape-shell ${"1.8.1"} (OpenApe DDISA shell wrapper)`);
7785
7790
  process.exit(0);
7786
7791
  } else if (shellRewrite.action === "help") {
7787
- console.log(`ape-shell ${"1.8.0"} \u2014 OpenApe DDISA shell wrapper`);
7792
+ console.log(`ape-shell ${"1.8.1"} \u2014 OpenApe DDISA shell wrapper`);
7788
7793
  console.log("");
7789
7794
  console.log("Usage:");
7790
7795
  console.log(" ape-shell Start interactive grant-mediated REPL");
@@ -7842,7 +7847,7 @@ var configCommand = defineCommand61({
7842
7847
  var main = defineCommand61({
7843
7848
  meta: {
7844
7849
  name: "apes",
7845
- version: "1.8.0",
7850
+ version: "1.8.1",
7846
7851
  description: "Unified CLI for OpenApe"
7847
7852
  },
7848
7853
  subCommands: {
@@ -7899,7 +7904,7 @@ async function maybeRefreshAuth() {
7899
7904
  }
7900
7905
  }
7901
7906
  await maybeRefreshAuth();
7902
- await maybeWarnStaleVersion("1.8.0").catch(() => {
7907
+ await maybeWarnStaleVersion("1.8.1").catch(() => {
7903
7908
  });
7904
7909
  runMain(main).catch((err) => {
7905
7910
  if (err instanceof CliExit) {