@openape/apes 1.0.3 → 1.0.5

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
@@ -3276,15 +3276,17 @@ function escape(s) {
3276
3276
  return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
3277
3277
  }
3278
3278
  function buildSyncPlist(input) {
3279
+ const pathLine = ` <key>PATH</key><string>${escape(input.homeDir)}/.bun/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin</string>
3280
+ `;
3279
3281
  const envBlock = input.troopUrl ? ` <key>EnvironmentVariables</key>
3280
3282
  <dict>
3281
3283
  <key>HOME</key><string>${escape(input.homeDir)}</string>
3282
- <key>OPENAPE_TROOP_URL</key><string>${escape(input.troopUrl)}</string>
3284
+ ${pathLine} <key>OPENAPE_TROOP_URL</key><string>${escape(input.troopUrl)}</string>
3283
3285
  </dict>
3284
3286
  ` : ` <key>EnvironmentVariables</key>
3285
3287
  <dict>
3286
3288
  <key>HOME</key><string>${escape(input.homeDir)}</string>
3287
- </dict>
3289
+ ${pathLine} </dict>
3288
3290
  `;
3289
3291
  return `<?xml version="1.0" encoding="UTF-8"?>
3290
3292
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
@@ -3908,17 +3910,20 @@ function readAuthJson() {
3908
3910
  }
3909
3911
  if (!parsed.access_token) throw new CliError(`${AUTH_PATH3} is missing access_token`);
3910
3912
  if (!parsed.email) throw new CliError(`${AUTH_PATH3} is missing email`);
3911
- if (!parsed.email.startsWith("agent+")) {
3913
+ if (!parsed.email.includes("+")) {
3912
3914
  throw new CliError(
3913
- `${AUTH_PATH3} email is "${parsed.email}" \u2014 expected an agent+name+domain@idp address. Run \`apes agents spawn\` rather than calling sync from a human user.`
3915
+ `${AUTH_PATH3} email is "${parsed.email}" \u2014 expected an agent address (with embedded +owner+domain). Run \`apes agents spawn\` rather than calling sync from a human user.`
3914
3916
  );
3915
3917
  }
3916
3918
  return parsed;
3917
3919
  }
3918
3920
  function agentNameFromEmail(email) {
3919
- const m = email.match(/^agent\+([^+]+)\+/);
3920
- if (!m) throw new CliError(`agent email "${email}" does not match agent+name+domain pattern`);
3921
- return m[1];
3921
+ const before = email.split("+")[0];
3922
+ const dashIdx = before.lastIndexOf("-");
3923
+ if (dashIdx <= 0) {
3924
+ return before;
3925
+ }
3926
+ return before.slice(0, dashIdx);
3922
3927
  }
3923
3928
  function findApesBin() {
3924
3929
  const argv1 = process.argv[1];
@@ -5261,7 +5266,7 @@ var mcpCommand = defineCommand36({
5261
5266
  if (transport !== "stdio" && transport !== "sse") {
5262
5267
  throw new Error('Transport must be "stdio" or "sse"');
5263
5268
  }
5264
- const { startMcpServer } = await import("./server-E5RX55NL.js");
5269
+ const { startMcpServer } = await import("./server-4R4OC66Z.js");
5265
5270
  await startMcpServer(transport, port);
5266
5271
  }
5267
5272
  });
@@ -5899,7 +5904,7 @@ async function bestEffortGrantCount(idp) {
5899
5904
  }
5900
5905
  }
5901
5906
  async function runHealth(args) {
5902
- const version = true ? "1.0.3" : "0.0.0";
5907
+ const version = true ? "1.0.5" : "0.0.0";
5903
5908
  const auth = loadAuth();
5904
5909
  if (!auth) {
5905
5910
  throw new CliError("Not logged in. Run `apes login` first.", 1);
@@ -6172,10 +6177,10 @@ if (shellRewrite) {
6172
6177
  if (shellRewrite.action === "rewrite") {
6173
6178
  process.argv = shellRewrite.argv;
6174
6179
  } else if (shellRewrite.action === "version") {
6175
- console.log(`ape-shell ${"1.0.3"} (OpenApe DDISA shell wrapper)`);
6180
+ console.log(`ape-shell ${"1.0.5"} (OpenApe DDISA shell wrapper)`);
6176
6181
  process.exit(0);
6177
6182
  } else if (shellRewrite.action === "help") {
6178
- console.log(`ape-shell ${"1.0.3"} \u2014 OpenApe DDISA shell wrapper`);
6183
+ console.log(`ape-shell ${"1.0.5"} \u2014 OpenApe DDISA shell wrapper`);
6179
6184
  console.log("");
6180
6185
  console.log("Usage:");
6181
6186
  console.log(" ape-shell Start interactive grant-mediated REPL");
@@ -6233,7 +6238,7 @@ var configCommand = defineCommand48({
6233
6238
  var main = defineCommand48({
6234
6239
  meta: {
6235
6240
  name: "apes",
6236
- version: "1.0.3",
6241
+ version: "1.0.5",
6237
6242
  description: "Unified CLI for OpenApe"
6238
6243
  },
6239
6244
  subCommands: {
@@ -6288,7 +6293,7 @@ async function maybeRefreshAuth() {
6288
6293
  }
6289
6294
  }
6290
6295
  await maybeRefreshAuth();
6291
- await maybeWarnStaleVersion("1.0.3").catch(() => {
6296
+ await maybeWarnStaleVersion("1.0.5").catch(() => {
6292
6297
  });
6293
6298
  runMain(main).catch((err) => {
6294
6299
  if (err instanceof CliExit) {