@openape/apes 1.28.1 → 1.28.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
|
@@ -1805,7 +1805,12 @@ var TroopClient = class {
|
|
|
1805
1805
|
hostname: input.hostname,
|
|
1806
1806
|
host_id: input.hostId,
|
|
1807
1807
|
owner_email: input.ownerEmail,
|
|
1808
|
-
...input.pubkeySsh ? { pubkey_ssh: input.pubkeySsh } : {}
|
|
1808
|
+
...input.pubkeySsh ? { pubkey_ssh: input.pubkeySsh } : {},
|
|
1809
|
+
// Without this the agent's encryption pubkey never reaches troop,
|
|
1810
|
+
// so every sealed-capability bind 409s ("no X25519 public key
|
|
1811
|
+
// yet"). The keypair is written at spawn (agent-bootstrap); we
|
|
1812
|
+
// just have to report the public half here.
|
|
1813
|
+
...input.pubkeyX25519 ? { pubkey_x25519: input.pubkeyX25519 } : {}
|
|
1809
1814
|
})
|
|
1810
1815
|
});
|
|
1811
1816
|
}
|
|
@@ -3553,6 +3558,7 @@ import { openString } from "@openape/core";
|
|
|
3553
3558
|
var CONFIG_DIR2 = join5(homedir6(), ".config", "openape");
|
|
3554
3559
|
var SECRETS_DIR = join5(CONFIG_DIR2, "secrets.d");
|
|
3555
3560
|
var X25519_KEY_PATH = join5(CONFIG_DIR2, "agent-x25519.key");
|
|
3561
|
+
var X25519_PUBKEY_PATH = `${X25519_KEY_PATH}.pub`;
|
|
3556
3562
|
function envNameFromFile(file) {
|
|
3557
3563
|
if (!file.endsWith(".blob")) return null;
|
|
3558
3564
|
const env = file.slice(0, -".blob".length);
|
|
@@ -3563,6 +3569,11 @@ function readAgentEncryptionKey(keyPath = X25519_KEY_PATH) {
|
|
|
3563
3569
|
const k = readFileSync6(keyPath, "utf8").trim();
|
|
3564
3570
|
return k.length > 0 ? k : null;
|
|
3565
3571
|
}
|
|
3572
|
+
function readAgentEncryptionPublicKey(pubPath = X25519_PUBKEY_PATH) {
|
|
3573
|
+
if (!existsSync7(pubPath)) return null;
|
|
3574
|
+
const k = readFileSync6(pubPath, "utf8").trim();
|
|
3575
|
+
return k.length > 0 ? k : null;
|
|
3576
|
+
}
|
|
3566
3577
|
function materializeSecrets(opts = {}) {
|
|
3567
3578
|
const dir = opts.dir ?? SECRETS_DIR;
|
|
3568
3579
|
const env = opts.env ?? process.env;
|
|
@@ -4490,12 +4501,15 @@ var syncAgentCommand = defineCommand31({
|
|
|
4490
4501
|
throw new CliError(`${AUTH_PATH3} is missing owner_email \u2014 re-run \`apes agents spawn\` to update.`);
|
|
4491
4502
|
}
|
|
4492
4503
|
consola27.start(`Syncing ${agentName} (${host}, hostId ${hostId.slice(0, 8)}\u2026) with ${troopUrl}`);
|
|
4504
|
+
const pubkeyX25519 = readAgentEncryptionPublicKey() ?? void 0;
|
|
4493
4505
|
const sync = await client.sync({
|
|
4494
4506
|
hostname: host,
|
|
4495
4507
|
hostId,
|
|
4496
|
-
ownerEmail: auth.owner_email
|
|
4508
|
+
ownerEmail: auth.owner_email,
|
|
4509
|
+
...pubkeyX25519 ? { pubkeyX25519 } : {}
|
|
4497
4510
|
});
|
|
4498
4511
|
consola27.info(sync.first_sync ? "\u2713 first sync \u2014 agent registered" : "\u2713 presence updated");
|
|
4512
|
+
if (!pubkeyX25519) consola27.warn("No X25519 public key found on disk \u2014 sealed capability secrets cannot be bound until the agent is re-spawned.");
|
|
4499
4513
|
const { system_prompt: systemPrompt, tools, skills, tasks } = await client.listTasks();
|
|
4500
4514
|
consola27.info(`Pulled ${tasks.length} task${tasks.length === 1 ? "" : "s"}`);
|
|
4501
4515
|
consola27.info(`Tools enabled: ${tools.length === 0 ? "(none)" : tools.join(", ")}`);
|
|
@@ -6702,7 +6716,7 @@ var mcpCommand = defineCommand52({
|
|
|
6702
6716
|
if (transport !== "stdio" && transport !== "sse") {
|
|
6703
6717
|
throw new Error('Transport must be "stdio" or "sse"');
|
|
6704
6718
|
}
|
|
6705
|
-
const { startMcpServer } = await import("./server-
|
|
6719
|
+
const { startMcpServer } = await import("./server-WOOJEA67.js");
|
|
6706
6720
|
await startMcpServer(transport, port);
|
|
6707
6721
|
}
|
|
6708
6722
|
});
|
|
@@ -7340,7 +7354,7 @@ async function bestEffortGrantCount(idp) {
|
|
|
7340
7354
|
}
|
|
7341
7355
|
}
|
|
7342
7356
|
async function runHealth(args) {
|
|
7343
|
-
const version = true ? "1.28.
|
|
7357
|
+
const version = true ? "1.28.2" : "0.0.0";
|
|
7344
7358
|
const auth = loadAuth();
|
|
7345
7359
|
if (!auth) {
|
|
7346
7360
|
throw new CliError("Not logged in. Run `apes login` first.", 1);
|
|
@@ -7613,10 +7627,10 @@ if (shellRewrite) {
|
|
|
7613
7627
|
if (shellRewrite.action === "rewrite") {
|
|
7614
7628
|
process.argv = shellRewrite.argv;
|
|
7615
7629
|
} else if (shellRewrite.action === "version") {
|
|
7616
|
-
console.log(`ape-shell ${"1.28.
|
|
7630
|
+
console.log(`ape-shell ${"1.28.2"} (OpenApe DDISA shell wrapper)`);
|
|
7617
7631
|
process.exit(0);
|
|
7618
7632
|
} else if (shellRewrite.action === "help") {
|
|
7619
|
-
console.log(`ape-shell ${"1.28.
|
|
7633
|
+
console.log(`ape-shell ${"1.28.2"} \u2014 OpenApe DDISA shell wrapper`);
|
|
7620
7634
|
console.log("");
|
|
7621
7635
|
console.log("Usage:");
|
|
7622
7636
|
console.log(" ape-shell Start interactive grant-mediated REPL");
|
|
@@ -7674,7 +7688,7 @@ var configCommand = defineCommand64({
|
|
|
7674
7688
|
var main = defineCommand64({
|
|
7675
7689
|
meta: {
|
|
7676
7690
|
name: "apes",
|
|
7677
|
-
version: "1.28.
|
|
7691
|
+
version: "1.28.2",
|
|
7678
7692
|
description: "Unified CLI for OpenApe"
|
|
7679
7693
|
},
|
|
7680
7694
|
subCommands: {
|
|
@@ -7732,7 +7746,7 @@ async function maybeRefreshAuth() {
|
|
|
7732
7746
|
}
|
|
7733
7747
|
}
|
|
7734
7748
|
await maybeRefreshAuth();
|
|
7735
|
-
await maybeWarnStaleVersion("1.28.
|
|
7749
|
+
await maybeWarnStaleVersion("1.28.2").catch(() => {
|
|
7736
7750
|
});
|
|
7737
7751
|
runMain(main).catch((err) => {
|
|
7738
7752
|
if (err instanceof CliExit) {
|