@openape/apes 1.0.2 → 1.0.3
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
|
@@ -1926,21 +1926,20 @@ function buildTroopBlock(troop) {
|
|
|
1926
1926
|
return `
|
|
1927
1927
|
mkdir -p "$HOME_DIR/Library/LaunchAgents" "$HOME_DIR/Library/Logs" "$HOME_DIR/.openape/agent/tasks"
|
|
1928
1928
|
cat > ${shQuote(troop.plistPath)} ${shHeredoc(troop.plistContent)}
|
|
1929
|
+
chown root:wheel ${shQuote(troop.plistPath)}
|
|
1929
1930
|
chmod 644 ${shQuote(troop.plistPath)}
|
|
1930
1931
|
`;
|
|
1931
1932
|
}
|
|
1932
1933
|
function buildTroopBootstrapBlock(troop, name) {
|
|
1933
1934
|
if (!troop) return "";
|
|
1934
1935
|
return `
|
|
1935
|
-
# Bootstrap the troop sync launchd
|
|
1936
|
-
#
|
|
1937
|
-
#
|
|
1938
|
-
# SP within seconds of spawn finishing.
|
|
1936
|
+
# Bootstrap the troop sync launchd in the system domain. setup.sh runs
|
|
1937
|
+
# as root via \`apes run --as root\`, so we have permission. Stale label
|
|
1938
|
+
# is bootouted first to make re-spawn idempotent.
|
|
1939
1939
|
echo "==> Installing troop sync launchd as ${name}\u2026"
|
|
1940
|
-
|
|
1941
|
-
launchctl
|
|
1942
|
-
|
|
1943
|
-
echo "warn: troop sync bootstrap failed; run \\\`apes agents sync\\\` manually as ${name} to register at troop.openape.ai"
|
|
1940
|
+
launchctl bootout "system/${troop.plistLabel}" 2>/dev/null || true
|
|
1941
|
+
launchctl bootstrap system ${shQuote(troop.plistPath)} || \\
|
|
1942
|
+
echo "warn: troop sync bootstrap failed; check ${troop.plistPath}"
|
|
1944
1943
|
`;
|
|
1945
1944
|
}
|
|
1946
1945
|
function buildDestroyTeardownScript(input) {
|
|
@@ -3293,6 +3292,8 @@ function buildSyncPlist(input) {
|
|
|
3293
3292
|
<dict>
|
|
3294
3293
|
<key>Label</key>
|
|
3295
3294
|
<string>${escape(syncPlistLabel(input.agentName))}</string>
|
|
3295
|
+
<key>UserName</key>
|
|
3296
|
+
<string>${escape(input.userName)}</string>
|
|
3296
3297
|
<key>ProgramArguments</key>
|
|
3297
3298
|
<array>
|
|
3298
3299
|
<string>${escape(input.apesBin)}</string>
|
|
@@ -3611,11 +3612,11 @@ and try again.`
|
|
|
3611
3612
|
};
|
|
3612
3613
|
})() : null;
|
|
3613
3614
|
const troopPlistLabel = `openape.troop.sync.${name}`;
|
|
3614
|
-
const troopPlistPath =
|
|
3615
|
+
const troopPlistPath = `/Library/LaunchDaemons/${troopPlistLabel}.plist`;
|
|
3615
3616
|
const troop = {
|
|
3616
3617
|
plistLabel: troopPlistLabel,
|
|
3617
3618
|
plistPath: troopPlistPath,
|
|
3618
|
-
plistContent: buildSyncPlist({ agentName: name, apesBin: apes, homeDir })
|
|
3619
|
+
plistContent: buildSyncPlist({ agentName: name, apesBin: apes, homeDir, userName: name })
|
|
3619
3620
|
};
|
|
3620
3621
|
const script = buildSpawnSetupScript({
|
|
3621
3622
|
name,
|
|
@@ -5260,7 +5261,7 @@ var mcpCommand = defineCommand36({
|
|
|
5260
5261
|
if (transport !== "stdio" && transport !== "sse") {
|
|
5261
5262
|
throw new Error('Transport must be "stdio" or "sse"');
|
|
5262
5263
|
}
|
|
5263
|
-
const { startMcpServer } = await import("./server-
|
|
5264
|
+
const { startMcpServer } = await import("./server-E5RX55NL.js");
|
|
5264
5265
|
await startMcpServer(transport, port);
|
|
5265
5266
|
}
|
|
5266
5267
|
});
|
|
@@ -5898,7 +5899,7 @@ async function bestEffortGrantCount(idp) {
|
|
|
5898
5899
|
}
|
|
5899
5900
|
}
|
|
5900
5901
|
async function runHealth(args) {
|
|
5901
|
-
const version = true ? "1.0.
|
|
5902
|
+
const version = true ? "1.0.3" : "0.0.0";
|
|
5902
5903
|
const auth = loadAuth();
|
|
5903
5904
|
if (!auth) {
|
|
5904
5905
|
throw new CliError("Not logged in. Run `apes login` first.", 1);
|
|
@@ -6171,10 +6172,10 @@ if (shellRewrite) {
|
|
|
6171
6172
|
if (shellRewrite.action === "rewrite") {
|
|
6172
6173
|
process.argv = shellRewrite.argv;
|
|
6173
6174
|
} else if (shellRewrite.action === "version") {
|
|
6174
|
-
console.log(`ape-shell ${"1.0.
|
|
6175
|
+
console.log(`ape-shell ${"1.0.3"} (OpenApe DDISA shell wrapper)`);
|
|
6175
6176
|
process.exit(0);
|
|
6176
6177
|
} else if (shellRewrite.action === "help") {
|
|
6177
|
-
console.log(`ape-shell ${"1.0.
|
|
6178
|
+
console.log(`ape-shell ${"1.0.3"} \u2014 OpenApe DDISA shell wrapper`);
|
|
6178
6179
|
console.log("");
|
|
6179
6180
|
console.log("Usage:");
|
|
6180
6181
|
console.log(" ape-shell Start interactive grant-mediated REPL");
|
|
@@ -6232,7 +6233,7 @@ var configCommand = defineCommand48({
|
|
|
6232
6233
|
var main = defineCommand48({
|
|
6233
6234
|
meta: {
|
|
6234
6235
|
name: "apes",
|
|
6235
|
-
version: "1.0.
|
|
6236
|
+
version: "1.0.3",
|
|
6236
6237
|
description: "Unified CLI for OpenApe"
|
|
6237
6238
|
},
|
|
6238
6239
|
subCommands: {
|
|
@@ -6287,7 +6288,7 @@ async function maybeRefreshAuth() {
|
|
|
6287
6288
|
}
|
|
6288
6289
|
}
|
|
6289
6290
|
await maybeRefreshAuth();
|
|
6290
|
-
await maybeWarnStaleVersion("1.0.
|
|
6291
|
+
await maybeWarnStaleVersion("1.0.3").catch(() => {
|
|
6291
6292
|
});
|
|
6292
6293
|
runMain(main).catch((err) => {
|
|
6293
6294
|
if (err instanceof CliExit) {
|