@openape/ape-agent 2.7.2 → 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.
Files changed (2) hide show
  1. package/dist/bridge.mjs +23 -0
  2. package/package.json +2 -2
package/dist/bridge.mjs CHANGED
@@ -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.7.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.27.0",
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
  },