@openape/apes 1.28.8 → 1.28.9

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
@@ -2899,7 +2899,7 @@ Worktree: ${worktree}`,
2899
2899
  if (commitRes.exit_code !== 0) {
2900
2900
  return { branch, worktree, runStatus: "ok", changedFiles, decision, outcome: "run-failed", prRef: branch, reason: `commit failed: ${(commitRes.stderr || commitRes.stdout).slice(0, 300)}` };
2901
2901
  }
2902
- const pushRes = await shell(`git -C '${worktree}' -c credential.helper='!gh auth git-credential' push -u origin '${branch}'`);
2902
+ const pushRes = await shell(buildPushCommand(input.forge, input.repo, worktree, branch));
2903
2903
  if (pushRes.exit_code !== 0) {
2904
2904
  return { branch, worktree, runStatus: "ok", changedFiles, decision, outcome: "run-failed", prRef: branch, reason: `push failed: ${(pushRes.stderr || pushRes.stdout).slice(0, 300)}` };
2905
2905
  }
@@ -2931,6 +2931,14 @@ Automated by the OpenApe coding agent.`;
2931
2931
  function shqMsg(issue) {
2932
2932
  return `'${prTitle(issue).replace(/'/g, "'\\''")}'`;
2933
2933
  }
2934
+ function buildPushCommand(forge, repo, worktree, branch) {
2935
+ const base = `GIT_TERMINAL_PROMPT=0 git -C '${worktree}'`;
2936
+ if (forge === "github") {
2937
+ const slug = repo.replace(/^[a-z]+:\/\/[^/]+\//i, "").replace(/\.git$/, "").replace(/['"\s]/g, "");
2938
+ return `${base} push "https://x-access-token:\${GH_TOKEN}@github.com/${slug}.git" '${branch}'`;
2939
+ }
2940
+ return `${base} push -u origin '${branch}'`;
2941
+ }
2934
2942
 
2935
2943
  // src/lib/coding/llm-review.ts
2936
2944
  var DIFF_CAP2 = 48 * 1024;
@@ -3105,9 +3113,10 @@ function readLitellmConfig(model) {
3105
3113
  for (const k of ["LITELLM_API_KEY", "LITELLM_MASTER_KEY", "LITELLM_BASE_URL"]) {
3106
3114
  if (process2.env[k]) env[k] = process2.env[k];
3107
3115
  }
3108
- const apiKey = env.LITELLM_API_KEY || env.LITELLM_MASTER_KEY;
3109
3116
  const apiBase = (env.LITELLM_BASE_URL || "http://127.0.0.1:4000/v1").replace(/\/$/, "");
3110
- if (!apiKey) throw new CliError2("No LITELLM_API_KEY / LITELLM_MASTER_KEY in ~/litellm/.env or env.");
3117
+ const isLoopback = /^https?:\/\/(?:127\.0\.0\.1|localhost|\[::1\])(?::\d+)?(?:\/|$)/.test(apiBase);
3118
+ const apiKey = env.LITELLM_API_KEY || env.LITELLM_MASTER_KEY || (isLoopback ? "sk-loopback-noauth" : "");
3119
+ if (!apiKey) throw new CliError2("No LITELLM_API_KEY / LITELLM_MASTER_KEY for non-loopback LITELLM_BASE_URL.");
3111
3120
  return { apiBase, apiKey, model: model || process2.env.APE_CHAT_BRIDGE_MODEL || "claude-haiku-4-5" };
3112
3121
  }
3113
3122
  function readPersona(file) {
@@ -6751,7 +6760,7 @@ var mcpCommand = defineCommand52({
6751
6760
  if (transport !== "stdio" && transport !== "sse") {
6752
6761
  throw new Error('Transport must be "stdio" or "sse"');
6753
6762
  }
6754
- const { startMcpServer } = await import("./server-2VKIFWFT.js");
6763
+ const { startMcpServer } = await import("./server-TEPOASFL.js");
6755
6764
  await startMcpServer(transport, port);
6756
6765
  }
6757
6766
  });
@@ -7389,7 +7398,7 @@ async function bestEffortGrantCount(idp) {
7389
7398
  }
7390
7399
  }
7391
7400
  async function runHealth(args) {
7392
- const version = true ? "1.28.8" : "0.0.0";
7401
+ const version = true ? "1.28.9" : "0.0.0";
7393
7402
  const auth = loadAuth();
7394
7403
  if (!auth) {
7395
7404
  throw new CliError("Not logged in. Run `apes login` first.", 1);
@@ -7662,10 +7671,10 @@ if (shellRewrite) {
7662
7671
  if (shellRewrite.action === "rewrite") {
7663
7672
  process.argv = shellRewrite.argv;
7664
7673
  } else if (shellRewrite.action === "version") {
7665
- console.log(`ape-shell ${"1.28.8"} (OpenApe DDISA shell wrapper)`);
7674
+ console.log(`ape-shell ${"1.28.9"} (OpenApe DDISA shell wrapper)`);
7666
7675
  process.exit(0);
7667
7676
  } else if (shellRewrite.action === "help") {
7668
- console.log(`ape-shell ${"1.28.8"} \u2014 OpenApe DDISA shell wrapper`);
7677
+ console.log(`ape-shell ${"1.28.9"} \u2014 OpenApe DDISA shell wrapper`);
7669
7678
  console.log("");
7670
7679
  console.log("Usage:");
7671
7680
  console.log(" ape-shell Start interactive grant-mediated REPL");
@@ -7723,7 +7732,7 @@ var configCommand = defineCommand64({
7723
7732
  var main = defineCommand64({
7724
7733
  meta: {
7725
7734
  name: "apes",
7726
- version: "1.28.8",
7735
+ version: "1.28.9",
7727
7736
  description: "Unified CLI for OpenApe"
7728
7737
  },
7729
7738
  subCommands: {
@@ -7781,7 +7790,7 @@ async function maybeRefreshAuth() {
7781
7790
  }
7782
7791
  }
7783
7792
  await maybeRefreshAuth();
7784
- await maybeWarnStaleVersion("1.28.8").catch(() => {
7793
+ await maybeWarnStaleVersion("1.28.9").catch(() => {
7785
7794
  });
7786
7795
  runMain(main).catch((err) => {
7787
7796
  if (err instanceof CliExit) {