@openape/apes 0.25.1 → 0.25.2
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
|
@@ -2583,10 +2583,35 @@ mkdir -p "$NPM_CONFIG_PREFIX"
|
|
|
2583
2583
|
# upgrades on the next launchctl restart instead of needing manual touch.
|
|
2584
2584
|
npm install -g --silent @openape/chat-bridge@latest
|
|
2585
2585
|
|
|
2586
|
+
# apes is needed to refresh the agent's IdP token before each boot \u2014
|
|
2587
|
+
# agents auth via SSH key signing, the resulting token has no
|
|
2588
|
+
# refresh_token and expires after ~1h. Without re-running 'apes login'
|
|
2589
|
+
# the bridge would crashloop after the first hour. KeepAlive's 10s
|
|
2590
|
+
# throttle then bounds the recovery gap to ~10s.
|
|
2591
|
+
if ! command -v apes >/dev/null 2>&1; then
|
|
2592
|
+
npm install -g --silent @openape/apes
|
|
2593
|
+
fi
|
|
2594
|
+
|
|
2586
2595
|
if ! command -v pi >/dev/null 2>&1; then
|
|
2587
2596
|
npm install -g --silent @mariozechner/pi-coding-agent
|
|
2588
2597
|
fi
|
|
2589
2598
|
|
|
2599
|
+
# Refresh IdP token. Read the agent's own email + idp out of the auth
|
|
2600
|
+
# file spawn wrote, then re-sign via the registered SSH key. python3 is
|
|
2601
|
+
# always available on macOS \u2014 avoids a jq dep.
|
|
2602
|
+
if [ -f "$HOME/.config/apes/auth.json" ]; then
|
|
2603
|
+
agent_email=$(python3 -c "import json,os,sys
|
|
2604
|
+
try: print(json.load(open(os.path.expanduser('~/.config/apes/auth.json')))['email'])
|
|
2605
|
+
except Exception: sys.exit(1)" 2>/dev/null || true)
|
|
2606
|
+
agent_idp=$(python3 -c "import json,os,sys
|
|
2607
|
+
try: print(json.load(open(os.path.expanduser('~/.config/apes/auth.json')))['idp'])
|
|
2608
|
+
except Exception: sys.exit(1)" 2>/dev/null || true)
|
|
2609
|
+
if [ -n "$agent_email" ] && [ -n "$agent_idp" ]; then
|
|
2610
|
+
apes login "$agent_email" --idp "$agent_idp" >/dev/null 2>&1 \\
|
|
2611
|
+
|| echo "warn: apes login failed for $agent_email; continuing with cached token"
|
|
2612
|
+
fi
|
|
2613
|
+
fi
|
|
2614
|
+
|
|
2590
2615
|
EXT_DIR="$HOME/.pi/agent/extensions"
|
|
2591
2616
|
mkdir -p "$EXT_DIR"
|
|
2592
2617
|
if [ ! -f "$EXT_DIR/litellm.ts" ]; then
|
|
@@ -4139,7 +4164,7 @@ var mcpCommand = defineCommand32({
|
|
|
4139
4164
|
if (transport !== "stdio" && transport !== "sse") {
|
|
4140
4165
|
throw new Error('Transport must be "stdio" or "sse"');
|
|
4141
4166
|
}
|
|
4142
|
-
const { startMcpServer } = await import("./server-
|
|
4167
|
+
const { startMcpServer } = await import("./server-LEI7F46S.js");
|
|
4143
4168
|
await startMcpServer(transport, port);
|
|
4144
4169
|
}
|
|
4145
4170
|
});
|
|
@@ -4777,7 +4802,7 @@ async function bestEffortGrantCount(idp) {
|
|
|
4777
4802
|
}
|
|
4778
4803
|
}
|
|
4779
4804
|
async function runHealth(args) {
|
|
4780
|
-
const version = true ? "0.25.
|
|
4805
|
+
const version = true ? "0.25.2" : "0.0.0";
|
|
4781
4806
|
const auth = loadAuth();
|
|
4782
4807
|
if (!auth) {
|
|
4783
4808
|
throw new CliError("Not logged in. Run `apes login` first.", 1);
|
|
@@ -5050,10 +5075,10 @@ if (shellRewrite) {
|
|
|
5050
5075
|
if (shellRewrite.action === "rewrite") {
|
|
5051
5076
|
process.argv = shellRewrite.argv;
|
|
5052
5077
|
} else if (shellRewrite.action === "version") {
|
|
5053
|
-
console.log(`ape-shell ${"0.25.
|
|
5078
|
+
console.log(`ape-shell ${"0.25.2"} (OpenApe DDISA shell wrapper)`);
|
|
5054
5079
|
process.exit(0);
|
|
5055
5080
|
} else if (shellRewrite.action === "help") {
|
|
5056
|
-
console.log(`ape-shell ${"0.25.
|
|
5081
|
+
console.log(`ape-shell ${"0.25.2"} \u2014 OpenApe DDISA shell wrapper`);
|
|
5057
5082
|
console.log("");
|
|
5058
5083
|
console.log("Usage:");
|
|
5059
5084
|
console.log(" ape-shell Start interactive grant-mediated REPL");
|
|
@@ -5111,7 +5136,7 @@ var configCommand = defineCommand44({
|
|
|
5111
5136
|
var main = defineCommand44({
|
|
5112
5137
|
meta: {
|
|
5113
5138
|
name: "apes",
|
|
5114
|
-
version: "0.25.
|
|
5139
|
+
version: "0.25.2",
|
|
5115
5140
|
description: "Unified CLI for OpenApe"
|
|
5116
5141
|
},
|
|
5117
5142
|
subCommands: {
|
|
@@ -5166,7 +5191,7 @@ async function maybeRefreshAuth() {
|
|
|
5166
5191
|
}
|
|
5167
5192
|
}
|
|
5168
5193
|
await maybeRefreshAuth();
|
|
5169
|
-
await maybeWarnStaleVersion("0.25.
|
|
5194
|
+
await maybeWarnStaleVersion("0.25.2").catch(() => {
|
|
5170
5195
|
});
|
|
5171
5196
|
runMain(main).catch((err) => {
|
|
5172
5197
|
if (err instanceof CliExit) {
|