@openape/apes 1.0.5 → 1.1.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/cli.js
CHANGED
|
@@ -3392,6 +3392,7 @@ function readLitellmEnv(envPath = join5(homedir8(), "litellm", ".env")) {
|
|
|
3392
3392
|
const value = trimmed.slice(eq + 1).trim();
|
|
3393
3393
|
if (key === "LITELLM_MASTER_KEY" || key === "LITELLM_API_KEY") out.apiKey = value;
|
|
3394
3394
|
if (key === "LITELLM_BASE_URL") out.baseUrl = value;
|
|
3395
|
+
if (key === "APE_CHAT_BRIDGE_MODEL") out.model = value;
|
|
3395
3396
|
}
|
|
3396
3397
|
return out;
|
|
3397
3398
|
} catch {
|
|
@@ -3402,12 +3403,13 @@ function resolveBridgeConfig(opts) {
|
|
|
3402
3403
|
const env = readLitellmEnv(opts.envPath);
|
|
3403
3404
|
const apiKey = opts.cliKey ?? env?.apiKey;
|
|
3404
3405
|
const baseUrl = opts.cliBaseUrl ?? env?.baseUrl ?? "http://127.0.0.1:4000/v1";
|
|
3406
|
+
const model = opts.cliModel ?? env?.model;
|
|
3405
3407
|
if (!apiKey) {
|
|
3406
3408
|
throw new Error(
|
|
3407
3409
|
"No LITELLM_API_KEY resolved. Pass --bridge-key sk-\u2026 or write LITELLM_MASTER_KEY into ~/litellm/.env first."
|
|
3408
3410
|
);
|
|
3409
3411
|
}
|
|
3410
|
-
return { baseUrl, apiKey };
|
|
3412
|
+
return { baseUrl, apiKey, model };
|
|
3411
3413
|
}
|
|
3412
3414
|
function bridgePlistLabel(agentName) {
|
|
3413
3415
|
return `${PLIST_LABEL_PREFIX}.${agentName}`;
|
|
@@ -3416,11 +3418,13 @@ function bridgePlistPath(agentName) {
|
|
|
3416
3418
|
return `/Library/LaunchDaemons/${bridgePlistLabel(agentName)}.plist`;
|
|
3417
3419
|
}
|
|
3418
3420
|
function buildBridgeEnvFile(cfg) {
|
|
3421
|
+
const modelLine = cfg.model ? `APE_CHAT_BRIDGE_MODEL=${cfg.model}
|
|
3422
|
+
` : "";
|
|
3419
3423
|
return `# Auto-generated by 'apes agents spawn --bridge'.
|
|
3420
3424
|
# Read by the chat-bridge daemon at boot to talk to the local LLM proxy.
|
|
3421
3425
|
LITELLM_BASE_URL=${cfg.baseUrl}
|
|
3422
3426
|
LITELLM_API_KEY=${cfg.apiKey}
|
|
3423
|
-
`;
|
|
3427
|
+
${modelLine}`;
|
|
3424
3428
|
}
|
|
3425
3429
|
function buildBridgeStartScript() {
|
|
3426
3430
|
return `#!/usr/bin/env bash
|
|
@@ -3528,6 +3532,10 @@ var spawnAgentCommand = defineCommand26({
|
|
|
3528
3532
|
"bridge-base-url": {
|
|
3529
3533
|
type: "string",
|
|
3530
3534
|
description: "Override LITELLM_BASE_URL for the bridge (default: read from ~/litellm/.env or http://127.0.0.1:4000/v1)."
|
|
3535
|
+
},
|
|
3536
|
+
"bridge-model": {
|
|
3537
|
+
type: "string",
|
|
3538
|
+
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
3539
|
}
|
|
3532
3540
|
},
|
|
3533
3541
|
async run({ args }) {
|
|
@@ -3603,7 +3611,8 @@ and try again.`
|
|
|
3603
3611
|
const bridge = args.bridge ? (() => {
|
|
3604
3612
|
const cfg = resolveBridgeConfig({
|
|
3605
3613
|
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
|
|
3614
|
+
cliBaseUrl: typeof args["bridge-base-url"] === "string" ? args["bridge-base-url"] : void 0,
|
|
3615
|
+
cliModel: typeof args["bridge-model"] === "string" ? args["bridge-model"] : void 0
|
|
3607
3616
|
});
|
|
3608
3617
|
return {
|
|
3609
3618
|
plistLabel: bridgePlistLabel(name),
|
|
@@ -5266,7 +5275,7 @@ var mcpCommand = defineCommand36({
|
|
|
5266
5275
|
if (transport !== "stdio" && transport !== "sse") {
|
|
5267
5276
|
throw new Error('Transport must be "stdio" or "sse"');
|
|
5268
5277
|
}
|
|
5269
|
-
const { startMcpServer } = await import("./server-
|
|
5278
|
+
const { startMcpServer } = await import("./server-YKLZLQKX.js");
|
|
5270
5279
|
await startMcpServer(transport, port);
|
|
5271
5280
|
}
|
|
5272
5281
|
});
|
|
@@ -5904,7 +5913,7 @@ async function bestEffortGrantCount(idp) {
|
|
|
5904
5913
|
}
|
|
5905
5914
|
}
|
|
5906
5915
|
async function runHealth(args) {
|
|
5907
|
-
const version = true ? "1.0
|
|
5916
|
+
const version = true ? "1.1.0" : "0.0.0";
|
|
5908
5917
|
const auth = loadAuth();
|
|
5909
5918
|
if (!auth) {
|
|
5910
5919
|
throw new CliError("Not logged in. Run `apes login` first.", 1);
|
|
@@ -6177,10 +6186,10 @@ if (shellRewrite) {
|
|
|
6177
6186
|
if (shellRewrite.action === "rewrite") {
|
|
6178
6187
|
process.argv = shellRewrite.argv;
|
|
6179
6188
|
} else if (shellRewrite.action === "version") {
|
|
6180
|
-
console.log(`ape-shell ${"1.0
|
|
6189
|
+
console.log(`ape-shell ${"1.1.0"} (OpenApe DDISA shell wrapper)`);
|
|
6181
6190
|
process.exit(0);
|
|
6182
6191
|
} else if (shellRewrite.action === "help") {
|
|
6183
|
-
console.log(`ape-shell ${"1.0
|
|
6192
|
+
console.log(`ape-shell ${"1.1.0"} \u2014 OpenApe DDISA shell wrapper`);
|
|
6184
6193
|
console.log("");
|
|
6185
6194
|
console.log("Usage:");
|
|
6186
6195
|
console.log(" ape-shell Start interactive grant-mediated REPL");
|
|
@@ -6238,7 +6247,7 @@ var configCommand = defineCommand48({
|
|
|
6238
6247
|
var main = defineCommand48({
|
|
6239
6248
|
meta: {
|
|
6240
6249
|
name: "apes",
|
|
6241
|
-
version: "1.0
|
|
6250
|
+
version: "1.1.0",
|
|
6242
6251
|
description: "Unified CLI for OpenApe"
|
|
6243
6252
|
},
|
|
6244
6253
|
subCommands: {
|
|
@@ -6293,7 +6302,7 @@ async function maybeRefreshAuth() {
|
|
|
6293
6302
|
}
|
|
6294
6303
|
}
|
|
6295
6304
|
await maybeRefreshAuth();
|
|
6296
|
-
await maybeWarnStaleVersion("1.0
|
|
6305
|
+
await maybeWarnStaleVersion("1.1.0").catch(() => {
|
|
6297
6306
|
});
|
|
6298
6307
|
runMain(main).catch((err) => {
|
|
6299
6308
|
if (err instanceof CliExit) {
|