@openape/apes 1.21.0 → 1.22.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
|
@@ -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
|
});
|
|
@@ -5976,7 +6005,7 @@ note = "VPC-internal hostname suffix"
|
|
|
5976
6005
|
|
|
5977
6006
|
// src/proxy/local-proxy.ts
|
|
5978
6007
|
import { spawn } from "child_process";
|
|
5979
|
-
import { mkdtempSync as mkdtempSync3, rmSync as
|
|
6008
|
+
import { mkdtempSync as mkdtempSync3, rmSync as rmSync4, writeFileSync as writeFileSync8 } from "fs";
|
|
5980
6009
|
import { createRequire } from "module";
|
|
5981
6010
|
import { tmpdir as tmpdir3 } from "os";
|
|
5982
6011
|
import { dirname as dirname4, join as join13, resolve as resolve3 } from "path";
|
|
@@ -6001,7 +6030,7 @@ async function startEphemeralProxy(configToml) {
|
|
|
6001
6030
|
});
|
|
6002
6031
|
const cleanupTmp = () => {
|
|
6003
6032
|
try {
|
|
6004
|
-
|
|
6033
|
+
rmSync4(tmpDir, { recursive: true, force: true });
|
|
6005
6034
|
} catch {
|
|
6006
6035
|
}
|
|
6007
6036
|
};
|
|
@@ -6428,7 +6457,7 @@ var mcpCommand = defineCommand48({
|
|
|
6428
6457
|
if (transport !== "stdio" && transport !== "sse") {
|
|
6429
6458
|
throw new Error('Transport must be "stdio" or "sse"');
|
|
6430
6459
|
}
|
|
6431
|
-
const { startMcpServer } = await import("./server-
|
|
6460
|
+
const { startMcpServer } = await import("./server-SBQ77UGP.js");
|
|
6432
6461
|
await startMcpServer(transport, port);
|
|
6433
6462
|
}
|
|
6434
6463
|
});
|
|
@@ -7066,7 +7095,7 @@ async function bestEffortGrantCount(idp) {
|
|
|
7066
7095
|
}
|
|
7067
7096
|
}
|
|
7068
7097
|
async function runHealth(args) {
|
|
7069
|
-
const version = true ? "1.
|
|
7098
|
+
const version = true ? "1.22.0" : "0.0.0";
|
|
7070
7099
|
const auth = loadAuth();
|
|
7071
7100
|
if (!auth) {
|
|
7072
7101
|
throw new CliError("Not logged in. Run `apes login` first.", 1);
|
|
@@ -7339,10 +7368,10 @@ if (shellRewrite) {
|
|
|
7339
7368
|
if (shellRewrite.action === "rewrite") {
|
|
7340
7369
|
process.argv = shellRewrite.argv;
|
|
7341
7370
|
} else if (shellRewrite.action === "version") {
|
|
7342
|
-
console.log(`ape-shell ${"1.
|
|
7371
|
+
console.log(`ape-shell ${"1.22.0"} (OpenApe DDISA shell wrapper)`);
|
|
7343
7372
|
process.exit(0);
|
|
7344
7373
|
} else if (shellRewrite.action === "help") {
|
|
7345
|
-
console.log(`ape-shell ${"1.
|
|
7374
|
+
console.log(`ape-shell ${"1.22.0"} \u2014 OpenApe DDISA shell wrapper`);
|
|
7346
7375
|
console.log("");
|
|
7347
7376
|
console.log("Usage:");
|
|
7348
7377
|
console.log(" ape-shell Start interactive grant-mediated REPL");
|
|
@@ -7400,7 +7429,7 @@ var configCommand = defineCommand60({
|
|
|
7400
7429
|
var main = defineCommand60({
|
|
7401
7430
|
meta: {
|
|
7402
7431
|
name: "apes",
|
|
7403
|
-
version: "1.
|
|
7432
|
+
version: "1.22.0",
|
|
7404
7433
|
description: "Unified CLI for OpenApe"
|
|
7405
7434
|
},
|
|
7406
7435
|
subCommands: {
|
|
@@ -7457,7 +7486,7 @@ async function maybeRefreshAuth() {
|
|
|
7457
7486
|
}
|
|
7458
7487
|
}
|
|
7459
7488
|
await maybeRefreshAuth();
|
|
7460
|
-
await maybeWarnStaleVersion("1.
|
|
7489
|
+
await maybeWarnStaleVersion("1.22.0").catch(() => {
|
|
7461
7490
|
});
|
|
7462
7491
|
runMain(main).catch((err) => {
|
|
7463
7492
|
if (err instanceof CliExit) {
|