@openape/ape-agent 2.8.9 → 2.8.10

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 +12 -3
  2. package/package.json +3 -3
package/dist/bridge.mjs CHANGED
@@ -4038,6 +4038,17 @@ function readTaskSpecs() {
4038
4038
  }
4039
4039
  return out;
4040
4040
  }
4041
+ function composeTaskOutput(command, exitCode, stdout2, stderr) {
4042
+ const tail = (s2, n2) => s2.length > n2 ? `\u2026${s2.slice(-n2)}` : s2;
4043
+ const parts = [`\`${command}\` exited ${exitCode}`];
4044
+ const out = stdout2.trim();
4045
+ const err = stderr.trim();
4046
+ if (out) parts.push(`stdout:
4047
+ ${tail(out, 2500)}`);
4048
+ if (err) parts.push(`stderr:
4049
+ ${tail(err, 2500)}`);
4050
+ return parts.join("\n\n");
4051
+ }
4041
4052
  function readSystemPrompt() {
4042
4053
  if (!existsSync4(AGENT_CONFIG_PATH)) return "";
4043
4054
  try {
@@ -4162,9 +4173,7 @@ var CronRunner = class {
4162
4173
  const turn = this.pending.get(sessionId);
4163
4174
  if (!turn) return;
4164
4175
  turn.status = res.exit_code === 0 ? "ok" : "error";
4165
- turn.accumulated = `\`${spec.command}\` exited ${res.exit_code}
4166
-
4167
- ${(res.stdout || res.stderr).slice(0, 4e3)}`;
4176
+ turn.accumulated = composeTaskOutput(spec.command, res.exit_code, res.stdout, res.stderr);
4168
4177
  await this.finaliseRun(turn, 1);
4169
4178
  await this.postResult(sessionId, turn);
4170
4179
  this.pending.delete(sessionId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openape/ape-agent",
3
- "version": "2.8.9",
3
+ "version": "2.8.10",
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",
@@ -24,8 +24,8 @@
24
24
  "ws": "^8.18.0",
25
25
  "yaml": "^2.8.0",
26
26
  "@openape/apes": "1.28.9",
27
- "@openape/cli-auth": "0.4.1",
28
- "@openape/prompt-injection-detector": "0.1.0"
27
+ "@openape/prompt-injection-detector": "0.1.0",
28
+ "@openape/cli-auth": "0.4.1"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@antfu/eslint-config": "^7.6.1",