@openape/apes 0.29.0 → 0.30.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
|
@@ -2623,8 +2623,15 @@ except Exception: sys.exit(1)" 2>/dev/null || true)
|
|
|
2623
2623
|
try: print(json.load(open(os.path.expanduser('~/.config/apes/auth.json')))['idp'])
|
|
2624
2624
|
except Exception: sys.exit(1)" 2>/dev/null || true)
|
|
2625
2625
|
if [ -n "$agent_email" ] && [ -n "$agent_idp" ]; then
|
|
2626
|
-
|
|
2627
|
-
|
|
2626
|
+
# Capture full output so the failure mode is debuggable from logs
|
|
2627
|
+
# without needing an interactive grant approval. apes-login should
|
|
2628
|
+
# succeed with the SSH key under ~/.ssh/id_ed25519 written by spawn;
|
|
2629
|
+
# if it doesn't, the cached token carries us until expiry (~1h) and
|
|
2630
|
+
# the daemon will retry on the next launchd restart.
|
|
2631
|
+
login_output=$(apes login "$agent_email" --idp "$agent_idp" 2>&1) || {
|
|
2632
|
+
echo "warn: apes login failed for $agent_email; continuing with cached token" >&2
|
|
2633
|
+
echo "$login_output" | sed 's/^/ apes-login: /' >&2
|
|
2634
|
+
}
|
|
2628
2635
|
fi
|
|
2629
2636
|
fi
|
|
2630
2637
|
|
|
@@ -2672,7 +2679,7 @@ set +a
|
|
|
2672
2679
|
exec openape-chat-bridge
|
|
2673
2680
|
`;
|
|
2674
2681
|
}
|
|
2675
|
-
function buildBridgePlist(agentName, homeDir) {
|
|
2682
|
+
function buildBridgePlist(agentName, homeDir, ownerEmail) {
|
|
2676
2683
|
const startScript = `${homeDir}/Library/Application Support/openape/bridge/start.sh`;
|
|
2677
2684
|
const stdoutLog = `${homeDir}/Library/Logs/openape-chat-bridge.log`;
|
|
2678
2685
|
const stderrLog = `${homeDir}/Library/Logs/openape-chat-bridge.err.log`;
|
|
@@ -2707,6 +2714,8 @@ function buildBridgePlist(agentName, homeDir) {
|
|
|
2707
2714
|
<string>${homeDir}</string>
|
|
2708
2715
|
<key>PATH</key>
|
|
2709
2716
|
<string>${homeDir}/.bun/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin</string>
|
|
2717
|
+
<key>OPENAPE_OWNER_EMAIL</key>
|
|
2718
|
+
<string>${ownerEmail}</string>
|
|
2710
2719
|
</dict>
|
|
2711
2720
|
</dict>
|
|
2712
2721
|
</plist>
|
|
@@ -2831,7 +2840,7 @@ and try again.`
|
|
|
2831
2840
|
return {
|
|
2832
2841
|
plistLabel: bridgePlistLabel(name),
|
|
2833
2842
|
plistPath: bridgePlistPath(name),
|
|
2834
|
-
plistContent: buildBridgePlist(name, homeDir),
|
|
2843
|
+
plistContent: buildBridgePlist(name, homeDir, auth.email),
|
|
2835
2844
|
startScript: buildBridgeStartScript(),
|
|
2836
2845
|
envFile: buildBridgeEnvFile(cfg)
|
|
2837
2846
|
};
|
|
@@ -4164,7 +4173,7 @@ var mcpCommand = defineCommand33({
|
|
|
4164
4173
|
if (transport !== "stdio" && transport !== "sse") {
|
|
4165
4174
|
throw new Error('Transport must be "stdio" or "sse"');
|
|
4166
4175
|
}
|
|
4167
|
-
const { startMcpServer } = await import("./server-
|
|
4176
|
+
const { startMcpServer } = await import("./server-43TJLWMB.js");
|
|
4168
4177
|
await startMcpServer(transport, port);
|
|
4169
4178
|
}
|
|
4170
4179
|
});
|
|
@@ -4802,7 +4811,7 @@ async function bestEffortGrantCount(idp) {
|
|
|
4802
4811
|
}
|
|
4803
4812
|
}
|
|
4804
4813
|
async function runHealth(args) {
|
|
4805
|
-
const version = true ? "0.
|
|
4814
|
+
const version = true ? "0.30.0" : "0.0.0";
|
|
4806
4815
|
const auth = loadAuth();
|
|
4807
4816
|
if (!auth) {
|
|
4808
4817
|
throw new CliError("Not logged in. Run `apes login` first.", 1);
|
|
@@ -5075,10 +5084,10 @@ if (shellRewrite) {
|
|
|
5075
5084
|
if (shellRewrite.action === "rewrite") {
|
|
5076
5085
|
process.argv = shellRewrite.argv;
|
|
5077
5086
|
} else if (shellRewrite.action === "version") {
|
|
5078
|
-
console.log(`ape-shell ${"0.
|
|
5087
|
+
console.log(`ape-shell ${"0.30.0"} (OpenApe DDISA shell wrapper)`);
|
|
5079
5088
|
process.exit(0);
|
|
5080
5089
|
} else if (shellRewrite.action === "help") {
|
|
5081
|
-
console.log(`ape-shell ${"0.
|
|
5090
|
+
console.log(`ape-shell ${"0.30.0"} \u2014 OpenApe DDISA shell wrapper`);
|
|
5082
5091
|
console.log("");
|
|
5083
5092
|
console.log("Usage:");
|
|
5084
5093
|
console.log(" ape-shell Start interactive grant-mediated REPL");
|
|
@@ -5136,7 +5145,7 @@ var configCommand = defineCommand45({
|
|
|
5136
5145
|
var main = defineCommand45({
|
|
5137
5146
|
meta: {
|
|
5138
5147
|
name: "apes",
|
|
5139
|
-
version: "0.
|
|
5148
|
+
version: "0.30.0",
|
|
5140
5149
|
description: "Unified CLI for OpenApe"
|
|
5141
5150
|
},
|
|
5142
5151
|
subCommands: {
|
|
@@ -5191,7 +5200,7 @@ async function maybeRefreshAuth() {
|
|
|
5191
5200
|
}
|
|
5192
5201
|
}
|
|
5193
5202
|
await maybeRefreshAuth();
|
|
5194
|
-
await maybeWarnStaleVersion("0.
|
|
5203
|
+
await maybeWarnStaleVersion("0.30.0").catch(() => {
|
|
5195
5204
|
});
|
|
5196
5205
|
runMain(main).catch((err) => {
|
|
5197
5206
|
if (err instanceof CliExit) {
|