@openape/ape-agent 2.7.1 → 2.8.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/bridge.mjs +24 -1
- package/package.json +2 -2
package/dist/bridge.mjs
CHANGED
|
@@ -1510,7 +1510,7 @@ import { existsSync as existsSync4, mkdirSync as mkdirSync3, readdirSync as read
|
|
|
1510
1510
|
import { homedir as homedir6 } from "os";
|
|
1511
1511
|
import { join as join6 } from "path";
|
|
1512
1512
|
|
|
1513
|
-
// ../../packages/apes/dist/chunk-
|
|
1513
|
+
// ../../packages/apes/dist/chunk-AFTJZVOQ.js
|
|
1514
1514
|
import { spawn } from "child_process";
|
|
1515
1515
|
import { mkdirSync as mkdirSync2, readFileSync as readFileSync3, writeFileSync as writeFileSync2 } from "fs";
|
|
1516
1516
|
import { homedir as homedir3 } from "os";
|
|
@@ -4146,6 +4146,29 @@ var CronRunner = class {
|
|
|
4146
4146
|
void this.runTask(sessionId, systemPrompt, spec);
|
|
4147
4147
|
}
|
|
4148
4148
|
async runTask(sessionId, systemPrompt, spec) {
|
|
4149
|
+
if (spec.command) {
|
|
4150
|
+
try {
|
|
4151
|
+
const res = await runApeShell(spec.command, 30 * 60 * 1e3);
|
|
4152
|
+
const turn = this.pending.get(sessionId);
|
|
4153
|
+
if (!turn) return;
|
|
4154
|
+
turn.status = res.exit_code === 0 ? "ok" : "error";
|
|
4155
|
+
turn.accumulated = `\`${spec.command}\` exited ${res.exit_code}
|
|
4156
|
+
|
|
4157
|
+
${(res.stdout || res.stderr).slice(0, 4e3)}`;
|
|
4158
|
+
await this.finaliseRun(turn, 1);
|
|
4159
|
+
await this.postResult(sessionId, turn);
|
|
4160
|
+
this.pending.delete(sessionId);
|
|
4161
|
+
} catch (err) {
|
|
4162
|
+
const turn = this.pending.get(sessionId);
|
|
4163
|
+
if (!turn) return;
|
|
4164
|
+
turn.status = "error";
|
|
4165
|
+
turn.accumulated = `(command error: ${err instanceof Error ? err.message : String(err)})`;
|
|
4166
|
+
await this.finaliseRun(turn, 0);
|
|
4167
|
+
await this.postResult(sessionId, turn);
|
|
4168
|
+
this.pending.delete(sessionId);
|
|
4169
|
+
}
|
|
4170
|
+
return;
|
|
4171
|
+
}
|
|
4149
4172
|
try {
|
|
4150
4173
|
const result = await runLoop({
|
|
4151
4174
|
config: this.deps.runtimeConfig,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openape/ape-agent",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"description": "OpenApe agent runtime: per-agent process that connects to chat.openape.ai, runs the LLM loop with tools + cron tasks, and streams replies back to owners.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"ofetch": "^1.4.1",
|
|
24
24
|
"ws": "^8.18.0",
|
|
25
25
|
"yaml": "^2.8.0",
|
|
26
|
-
"@openape/apes": "1.
|
|
26
|
+
"@openape/apes": "1.28.0",
|
|
27
27
|
"@openape/cli-auth": "0.4.1",
|
|
28
28
|
"@openape/prompt-injection-detector": "0.1.0"
|
|
29
29
|
},
|