@openape/apes 1.0.5 → 1.1.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
|
@@ -1909,7 +1909,11 @@ function buildBridgeBootstrapBlock(bridge, name) {
|
|
|
1909
1909
|
echo "==> Installing bridge stack as ${name} via bun (one-time)\u2026"
|
|
1910
1910
|
su - ${shQuote(name)} -c '
|
|
1911
1911
|
set -euo pipefail
|
|
1912
|
-
|
|
1912
|
+
if ! command -v bun >/dev/null 2>&1 && [ ! -x "$HOME/.bun/bin/bun" ]; then
|
|
1913
|
+
echo "==> bun not found \u2014 installing via official installer"
|
|
1914
|
+
curl -fsSL https://bun.sh/install | bash
|
|
1915
|
+
fi
|
|
1916
|
+
export PATH="$HOME/.bun/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:$HOME/.bun/install/global/bin"
|
|
1913
1917
|
bun add -g @openape/chat-bridge @openape/apes
|
|
1914
1918
|
'
|
|
1915
1919
|
|
|
@@ -3392,6 +3396,7 @@ function readLitellmEnv(envPath = join5(homedir8(), "litellm", ".env")) {
|
|
|
3392
3396
|
const value = trimmed.slice(eq + 1).trim();
|
|
3393
3397
|
if (key === "LITELLM_MASTER_KEY" || key === "LITELLM_API_KEY") out.apiKey = value;
|
|
3394
3398
|
if (key === "LITELLM_BASE_URL") out.baseUrl = value;
|
|
3399
|
+
if (key === "APE_CHAT_BRIDGE_MODEL") out.model = value;
|
|
3395
3400
|
}
|
|
3396
3401
|
return out;
|
|
3397
3402
|
} catch {
|
|
@@ -3402,12 +3407,13 @@ function resolveBridgeConfig(opts) {
|
|
|
3402
3407
|
const env = readLitellmEnv(opts.envPath);
|
|
3403
3408
|
const apiKey = opts.cliKey ?? env?.apiKey;
|
|
3404
3409
|
const baseUrl = opts.cliBaseUrl ?? env?.baseUrl ?? "http://127.0.0.1:4000/v1";
|
|
3410
|
+
const model = opts.cliModel ?? env?.model;
|
|
3405
3411
|
if (!apiKey) {
|
|
3406
3412
|
throw new Error(
|
|
3407
3413
|
"No LITELLM_API_KEY resolved. Pass --bridge-key sk-\u2026 or write LITELLM_MASTER_KEY into ~/litellm/.env first."
|
|
3408
3414
|
);
|
|
3409
3415
|
}
|
|
3410
|
-
return { baseUrl, apiKey };
|
|
3416
|
+
return { baseUrl, apiKey, model };
|
|
3411
3417
|
}
|
|
3412
3418
|
function bridgePlistLabel(agentName) {
|
|
3413
3419
|
return `${PLIST_LABEL_PREFIX}.${agentName}`;
|
|
@@ -3416,11 +3422,13 @@ function bridgePlistPath(agentName) {
|
|
|
3416
3422
|
return `/Library/LaunchDaemons/${bridgePlistLabel(agentName)}.plist`;
|
|
3417
3423
|
}
|
|
3418
3424
|
function buildBridgeEnvFile(cfg) {
|
|
3425
|
+
const modelLine = cfg.model ? `APE_CHAT_BRIDGE_MODEL=${cfg.model}
|
|
3426
|
+
` : "";
|
|
3419
3427
|
return `# Auto-generated by 'apes agents spawn --bridge'.
|
|
3420
3428
|
# Read by the chat-bridge daemon at boot to talk to the local LLM proxy.
|
|
3421
3429
|
LITELLM_BASE_URL=${cfg.baseUrl}
|
|
3422
3430
|
LITELLM_API_KEY=${cfg.apiKey}
|
|
3423
|
-
`;
|
|
3431
|
+
${modelLine}`;
|
|
3424
3432
|
}
|
|
3425
3433
|
function buildBridgeStartScript() {
|
|
3426
3434
|
return `#!/usr/bin/env bash
|
|
@@ -3528,6 +3536,10 @@ var spawnAgentCommand = defineCommand26({
|
|
|
3528
3536
|
"bridge-base-url": {
|
|
3529
3537
|
type: "string",
|
|
3530
3538
|
description: "Override LITELLM_BASE_URL for the bridge (default: read from ~/litellm/.env or http://127.0.0.1:4000/v1)."
|
|
3539
|
+
},
|
|
3540
|
+
"bridge-model": {
|
|
3541
|
+
type: "string",
|
|
3542
|
+
description: "Model the bridge sends in chat-completion requests (default: claude-haiku-4-5). Override when fronting a proxy that doesn't route the default \u2014 e.g. ChatGPT-only proxy needs `gpt-5.4`."
|
|
3531
3543
|
}
|
|
3532
3544
|
},
|
|
3533
3545
|
async run({ args }) {
|
|
@@ -3603,7 +3615,8 @@ and try again.`
|
|
|
3603
3615
|
const bridge = args.bridge ? (() => {
|
|
3604
3616
|
const cfg = resolveBridgeConfig({
|
|
3605
3617
|
cliKey: typeof args["bridge-key"] === "string" ? args["bridge-key"] : void 0,
|
|
3606
|
-
cliBaseUrl: typeof args["bridge-base-url"] === "string" ? args["bridge-base-url"] : void 0
|
|
3618
|
+
cliBaseUrl: typeof args["bridge-base-url"] === "string" ? args["bridge-base-url"] : void 0,
|
|
3619
|
+
cliModel: typeof args["bridge-model"] === "string" ? args["bridge-model"] : void 0
|
|
3607
3620
|
});
|
|
3608
3621
|
return {
|
|
3609
3622
|
plistLabel: bridgePlistLabel(name),
|
|
@@ -5266,7 +5279,7 @@ var mcpCommand = defineCommand36({
|
|
|
5266
5279
|
if (transport !== "stdio" && transport !== "sse") {
|
|
5267
5280
|
throw new Error('Transport must be "stdio" or "sse"');
|
|
5268
5281
|
}
|
|
5269
|
-
const { startMcpServer } = await import("./server-
|
|
5282
|
+
const { startMcpServer } = await import("./server-PZEAFXN6.js");
|
|
5270
5283
|
await startMcpServer(transport, port);
|
|
5271
5284
|
}
|
|
5272
5285
|
});
|
|
@@ -5904,7 +5917,7 @@ async function bestEffortGrantCount(idp) {
|
|
|
5904
5917
|
}
|
|
5905
5918
|
}
|
|
5906
5919
|
async function runHealth(args) {
|
|
5907
|
-
const version = true ? "1.
|
|
5920
|
+
const version = true ? "1.1.1" : "0.0.0";
|
|
5908
5921
|
const auth = loadAuth();
|
|
5909
5922
|
if (!auth) {
|
|
5910
5923
|
throw new CliError("Not logged in. Run `apes login` first.", 1);
|
|
@@ -6177,10 +6190,10 @@ if (shellRewrite) {
|
|
|
6177
6190
|
if (shellRewrite.action === "rewrite") {
|
|
6178
6191
|
process.argv = shellRewrite.argv;
|
|
6179
6192
|
} else if (shellRewrite.action === "version") {
|
|
6180
|
-
console.log(`ape-shell ${"1.
|
|
6193
|
+
console.log(`ape-shell ${"1.1.1"} (OpenApe DDISA shell wrapper)`);
|
|
6181
6194
|
process.exit(0);
|
|
6182
6195
|
} else if (shellRewrite.action === "help") {
|
|
6183
|
-
console.log(`ape-shell ${"1.
|
|
6196
|
+
console.log(`ape-shell ${"1.1.1"} \u2014 OpenApe DDISA shell wrapper`);
|
|
6184
6197
|
console.log("");
|
|
6185
6198
|
console.log("Usage:");
|
|
6186
6199
|
console.log(" ape-shell Start interactive grant-mediated REPL");
|
|
@@ -6238,7 +6251,7 @@ var configCommand = defineCommand48({
|
|
|
6238
6251
|
var main = defineCommand48({
|
|
6239
6252
|
meta: {
|
|
6240
6253
|
name: "apes",
|
|
6241
|
-
version: "1.
|
|
6254
|
+
version: "1.1.1",
|
|
6242
6255
|
description: "Unified CLI for OpenApe"
|
|
6243
6256
|
},
|
|
6244
6257
|
subCommands: {
|
|
@@ -6293,7 +6306,7 @@ async function maybeRefreshAuth() {
|
|
|
6293
6306
|
}
|
|
6294
6307
|
}
|
|
6295
6308
|
await maybeRefreshAuth();
|
|
6296
|
-
await maybeWarnStaleVersion("1.
|
|
6309
|
+
await maybeWarnStaleVersion("1.1.1").catch(() => {
|
|
6297
6310
|
});
|
|
6298
6311
|
runMain(main).catch((err) => {
|
|
6299
6312
|
if (err instanceof CliExit) {
|