@openape/ape-agent 2.8.9 → 2.8.11
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 +15 -4
- 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-66NFSMCY.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";
|
|
@@ -1949,9 +1949,11 @@ function buildCreateCommand(repo, taskId, branch) {
|
|
|
1949
1949
|
`git -C ${q(baseDir)} worktree prune 2>/dev/null || true`,
|
|
1950
1950
|
`rm -rf ${q(wt)} 2>/dev/null || true`
|
|
1951
1951
|
].join("; ");
|
|
1952
|
+
const ghAuth = /github\.com/i.test(source) ? `git -C ${q(baseDir)} config credential.helper '!f() { echo username=x-access-token; echo "password=$GH_TOKEN"; }; f'` : "true";
|
|
1952
1953
|
return [
|
|
1953
1954
|
`mkdir -p ${q(reposRoot())} ${q(workRoot())}`,
|
|
1954
1955
|
clone,
|
|
1956
|
+
ghAuth,
|
|
1955
1957
|
`git -C ${q(baseDir)} fetch --quiet || true`,
|
|
1956
1958
|
`{ ${reset}; }`,
|
|
1957
1959
|
`git -C ${q(baseDir)} worktree add -B ${q(br)} ${q(wt)}`,
|
|
@@ -4038,6 +4040,17 @@ function readTaskSpecs() {
|
|
|
4038
4040
|
}
|
|
4039
4041
|
return out;
|
|
4040
4042
|
}
|
|
4043
|
+
function composeTaskOutput(command, exitCode, stdout2, stderr) {
|
|
4044
|
+
const tail = (s2, n2) => s2.length > n2 ? `\u2026${s2.slice(-n2)}` : s2;
|
|
4045
|
+
const parts = [`\`${command}\` exited ${exitCode}`];
|
|
4046
|
+
const out = stdout2.trim();
|
|
4047
|
+
const err = stderr.trim();
|
|
4048
|
+
if (out) parts.push(`stdout:
|
|
4049
|
+
${tail(out, 2500)}`);
|
|
4050
|
+
if (err) parts.push(`stderr:
|
|
4051
|
+
${tail(err, 2500)}`);
|
|
4052
|
+
return parts.join("\n\n");
|
|
4053
|
+
}
|
|
4041
4054
|
function readSystemPrompt() {
|
|
4042
4055
|
if (!existsSync4(AGENT_CONFIG_PATH)) return "";
|
|
4043
4056
|
try {
|
|
@@ -4162,9 +4175,7 @@ var CronRunner = class {
|
|
|
4162
4175
|
const turn = this.pending.get(sessionId);
|
|
4163
4176
|
if (!turn) return;
|
|
4164
4177
|
turn.status = res.exit_code === 0 ? "ok" : "error";
|
|
4165
|
-
turn.accumulated =
|
|
4166
|
-
|
|
4167
|
-
${(res.stdout || res.stderr).slice(0, 4e3)}`;
|
|
4178
|
+
turn.accumulated = composeTaskOutput(spec.command, res.exit_code, res.stdout, res.stderr);
|
|
4168
4179
|
await this.finaliseRun(turn, 1);
|
|
4169
4180
|
await this.postResult(sessionId, turn);
|
|
4170
4181
|
this.pending.delete(sessionId);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openape/ape-agent",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.11",
|
|
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.28.
|
|
26
|
+
"@openape/apes": "1.28.10",
|
|
27
27
|
"@openape/cli-auth": "0.4.1",
|
|
28
28
|
"@openape/prompt-injection-detector": "0.1.0"
|
|
29
29
|
},
|