@openape/apes 1.21.0 → 1.22.1
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
|
@@ -4240,7 +4240,7 @@ async function resolveClaudeToken(opts) {
|
|
|
4240
4240
|
}
|
|
4241
4241
|
|
|
4242
4242
|
// src/commands/agents/sync.ts
|
|
4243
|
-
import { chownSync, existsSync as existsSync10, mkdirSync as mkdirSync3, readFileSync as readFileSync9, statSync, writeFileSync as writeFileSync5 } from "fs";
|
|
4243
|
+
import { chownSync, existsSync as existsSync10, mkdirSync as mkdirSync3, readdirSync, readFileSync as readFileSync9, rmSync as rmSync3, statSync, writeFileSync as writeFileSync5 } from "fs";
|
|
4244
4244
|
import { homedir as homedir9 } from "os";
|
|
4245
4245
|
import { join as join8 } from "path";
|
|
4246
4246
|
import { defineCommand as defineCommand27 } from "citty";
|
|
@@ -4334,9 +4334,11 @@ var syncAgentCommand = defineCommand27({
|
|
|
4334
4334
|
ownerEmail: auth.owner_email
|
|
4335
4335
|
});
|
|
4336
4336
|
consola24.info(sync.first_sync ? "\u2713 first sync \u2014 agent registered" : "\u2713 presence updated");
|
|
4337
|
-
const { system_prompt: systemPrompt, tools, tasks } = await client.listTasks();
|
|
4337
|
+
const { system_prompt: systemPrompt, tools, soul, skills, tasks } = await client.listTasks();
|
|
4338
4338
|
consola24.info(`Pulled ${tasks.length} task${tasks.length === 1 ? "" : "s"}`);
|
|
4339
4339
|
consola24.info(`Tools enabled: ${tools.length === 0 ? "(none)" : tools.join(", ")}`);
|
|
4340
|
+
consola24.info(`Skills: ${skills.length === 0 ? "(none)" : skills.map((s) => s.name).join(", ")}`);
|
|
4341
|
+
consola24.info(`SOUL.md: ${soul.length > 0 ? `${soul.length} chars` : "(empty)"}`);
|
|
4340
4342
|
let agentUid = null;
|
|
4341
4343
|
let agentGid = null;
|
|
4342
4344
|
if (process.geteuid?.() === 0) {
|
|
@@ -4375,6 +4377,33 @@ var syncAgentCommand = defineCommand27({
|
|
|
4375
4377
|
`, { mode: 384 });
|
|
4376
4378
|
chownToAgent(path2);
|
|
4377
4379
|
}
|
|
4380
|
+
const soulPath = join8(agentDir, "SOUL.md");
|
|
4381
|
+
writeFileSync5(soulPath, soul.endsWith("\n") ? soul : `${soul}
|
|
4382
|
+
`, { mode: 384 });
|
|
4383
|
+
chownToAgent(soulPath);
|
|
4384
|
+
const skillsDir = join8(agentDir, "skills");
|
|
4385
|
+
mkdirSync3(skillsDir, { recursive: true });
|
|
4386
|
+
chownToAgent(skillsDir);
|
|
4387
|
+
const incomingNames = new Set(skills.map((s) => s.name));
|
|
4388
|
+
try {
|
|
4389
|
+
for (const entry of readdirSync(skillsDir)) {
|
|
4390
|
+
if (incomingNames.has(entry)) continue;
|
|
4391
|
+
try {
|
|
4392
|
+
rmSync3(join8(skillsDir, entry), { recursive: true, force: true });
|
|
4393
|
+
} catch {
|
|
4394
|
+
}
|
|
4395
|
+
}
|
|
4396
|
+
} catch {
|
|
4397
|
+
}
|
|
4398
|
+
for (const skill of skills) {
|
|
4399
|
+
const skillDir = join8(skillsDir, skill.name);
|
|
4400
|
+
mkdirSync3(skillDir, { recursive: true });
|
|
4401
|
+
chownToAgent(skillDir);
|
|
4402
|
+
const skillPath = join8(skillDir, "SKILL.md");
|
|
4403
|
+
writeFileSync5(skillPath, skill.body.endsWith("\n") ? skill.body : `${skill.body}
|
|
4404
|
+
`, { mode: 384 });
|
|
4405
|
+
chownToAgent(skillPath);
|
|
4406
|
+
}
|
|
4378
4407
|
consola24.success("Sync complete.");
|
|
4379
4408
|
}
|
|
4380
4409
|
});
|
|
@@ -4728,17 +4757,18 @@ function installAdapter2() {
|
|
|
4728
4757
|
return true;
|
|
4729
4758
|
}
|
|
4730
4759
|
function writeBridgeModelDefault(model) {
|
|
4731
|
-
const envDir
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4760
|
+
for (const envDir of [join11(homedir11(), "litellm"), join11(NEST_DATA_DIR, "litellm")]) {
|
|
4761
|
+
const envFile = join11(envDir, ".env");
|
|
4762
|
+
mkdirSync5(envDir, { recursive: true });
|
|
4763
|
+
let lines = [];
|
|
4764
|
+
if (existsSync13(envFile)) {
|
|
4765
|
+
lines = readFileSync11(envFile, "utf8").split("\n").filter((l) => !l.startsWith("APE_CHAT_BRIDGE_MODEL="));
|
|
4766
|
+
}
|
|
4767
|
+
lines.push(`APE_CHAT_BRIDGE_MODEL=${model}`);
|
|
4768
|
+
while (lines.length > 0 && lines.at(-1).trim() === "") lines.pop();
|
|
4769
|
+
writeFileSync7(envFile, `${lines.join("\n")}
|
|
4741
4770
|
`, { mode: 384 });
|
|
4771
|
+
}
|
|
4742
4772
|
}
|
|
4743
4773
|
function findBinary(name) {
|
|
4744
4774
|
for (const dir of [
|
|
@@ -5976,7 +6006,7 @@ note = "VPC-internal hostname suffix"
|
|
|
5976
6006
|
|
|
5977
6007
|
// src/proxy/local-proxy.ts
|
|
5978
6008
|
import { spawn } from "child_process";
|
|
5979
|
-
import { mkdtempSync as mkdtempSync3, rmSync as
|
|
6009
|
+
import { mkdtempSync as mkdtempSync3, rmSync as rmSync4, writeFileSync as writeFileSync8 } from "fs";
|
|
5980
6010
|
import { createRequire } from "module";
|
|
5981
6011
|
import { tmpdir as tmpdir3 } from "os";
|
|
5982
6012
|
import { dirname as dirname4, join as join13, resolve as resolve3 } from "path";
|
|
@@ -6001,7 +6031,7 @@ async function startEphemeralProxy(configToml) {
|
|
|
6001
6031
|
});
|
|
6002
6032
|
const cleanupTmp = () => {
|
|
6003
6033
|
try {
|
|
6004
|
-
|
|
6034
|
+
rmSync4(tmpDir, { recursive: true, force: true });
|
|
6005
6035
|
} catch {
|
|
6006
6036
|
}
|
|
6007
6037
|
};
|
|
@@ -6428,7 +6458,7 @@ var mcpCommand = defineCommand48({
|
|
|
6428
6458
|
if (transport !== "stdio" && transport !== "sse") {
|
|
6429
6459
|
throw new Error('Transport must be "stdio" or "sse"');
|
|
6430
6460
|
}
|
|
6431
|
-
const { startMcpServer } = await import("./server-
|
|
6461
|
+
const { startMcpServer } = await import("./server-KCZQXFGH.js");
|
|
6432
6462
|
await startMcpServer(transport, port);
|
|
6433
6463
|
}
|
|
6434
6464
|
});
|
|
@@ -7066,7 +7096,7 @@ async function bestEffortGrantCount(idp) {
|
|
|
7066
7096
|
}
|
|
7067
7097
|
}
|
|
7068
7098
|
async function runHealth(args) {
|
|
7069
|
-
const version = true ? "1.
|
|
7099
|
+
const version = true ? "1.22.1" : "0.0.0";
|
|
7070
7100
|
const auth = loadAuth();
|
|
7071
7101
|
if (!auth) {
|
|
7072
7102
|
throw new CliError("Not logged in. Run `apes login` first.", 1);
|
|
@@ -7339,10 +7369,10 @@ if (shellRewrite) {
|
|
|
7339
7369
|
if (shellRewrite.action === "rewrite") {
|
|
7340
7370
|
process.argv = shellRewrite.argv;
|
|
7341
7371
|
} else if (shellRewrite.action === "version") {
|
|
7342
|
-
console.log(`ape-shell ${"1.
|
|
7372
|
+
console.log(`ape-shell ${"1.22.1"} (OpenApe DDISA shell wrapper)`);
|
|
7343
7373
|
process.exit(0);
|
|
7344
7374
|
} else if (shellRewrite.action === "help") {
|
|
7345
|
-
console.log(`ape-shell ${"1.
|
|
7375
|
+
console.log(`ape-shell ${"1.22.1"} \u2014 OpenApe DDISA shell wrapper`);
|
|
7346
7376
|
console.log("");
|
|
7347
7377
|
console.log("Usage:");
|
|
7348
7378
|
console.log(" ape-shell Start interactive grant-mediated REPL");
|
|
@@ -7400,7 +7430,7 @@ var configCommand = defineCommand60({
|
|
|
7400
7430
|
var main = defineCommand60({
|
|
7401
7431
|
meta: {
|
|
7402
7432
|
name: "apes",
|
|
7403
|
-
version: "1.
|
|
7433
|
+
version: "1.22.1",
|
|
7404
7434
|
description: "Unified CLI for OpenApe"
|
|
7405
7435
|
},
|
|
7406
7436
|
subCommands: {
|
|
@@ -7457,7 +7487,7 @@ async function maybeRefreshAuth() {
|
|
|
7457
7487
|
}
|
|
7458
7488
|
}
|
|
7459
7489
|
await maybeRefreshAuth();
|
|
7460
|
-
await maybeWarnStaleVersion("1.
|
|
7490
|
+
await maybeWarnStaleVersion("1.22.1").catch(() => {
|
|
7461
7491
|
});
|
|
7462
7492
|
runMain(main).catch((err) => {
|
|
7463
7493
|
if (err instanceof CliExit) {
|