@epoch-agent/plugin-terminal 0.7.1 → 0.8.1
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/README.md +7 -0
- package/dist/index.js +1 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -287,6 +287,13 @@ per-call 覆盖等于让「哪个 shell 在跑」有第二个说了算的地方
|
|
|
287
287
|
还剩一条 **10 MB** 的硬上限,超了才恢复截断 + 杀进程 —— 一条命令吐 10 MB 到 stdout
|
|
288
288
|
不是一次正常的命令输出。三条路径共用同一句措辞(`OVER_CAPTURE_NOTICE`)。
|
|
289
289
|
|
|
290
|
+
⚠️ **这一整套要成立,`terminal` 必须声明 `governsOwnOutput: true`**(2026-09-08 补的
|
|
291
|
+
一格,在 [index.ts](./src/index.ts) 的工具定义上)。少了它,引擎的输出预算会落在
|
|
292
|
+
`spillOutput()` **之后**:刚拼好的「头 2000 + 省略标记 + 尾 2000 + 落盘路径」被按
|
|
293
|
+
预算再切一遍,省略标记、尾部和那条取回路径一起没了 —— 而上面那句「最需要看最后几行」
|
|
294
|
+
正是这一整套的动机。判据在 `EpochTool.governsOwnOutput` 的 JSDoc 上;
|
|
295
|
+
⚠️ **失败路径不吃这个豁免**(那条路上 `spillOutput()` 一次都没被调到)。
|
|
296
|
+
|
|
290
297
|
落盘一律 **best-effort**:写不进去就退回纯截断、如实说明,**不把一次成功的调用变成
|
|
291
298
|
失败**。真正写盘的那几行在 [infra 的 artifact-store](../../infra/src/artifact-store.ts)
|
|
292
299
|
(`0700` 目录、`0600` 文件、`open(path,'wx')` 独占写,所以预埋 symlink
|
package/dist/index.js
CHANGED
|
@@ -1252,6 +1252,7 @@ var terminalTool = {
|
|
|
1252
1252
|
},
|
|
1253
1253
|
operation: "command",
|
|
1254
1254
|
describeTarget: (args) => String(args["command"] ?? ""),
|
|
1255
|
+
governsOwnOutput: true,
|
|
1255
1256
|
async execute(args, ctx) {
|
|
1256
1257
|
const command = String(args["command"] ?? "");
|
|
1257
1258
|
const isBackground = Boolean(args["background"]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epoch-agent/plugin-terminal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "epoch-agent 终端命令执行插件",
|
|
6
6
|
"repository": {
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"node-pty": "^1.1.0",
|
|
25
|
-
"@epoch-agent/infra": "0.
|
|
26
|
-
"@epoch-agent/protocol": "0.
|
|
25
|
+
"@epoch-agent/infra": "0.8.1",
|
|
26
|
+
"@epoch-agent/protocol": "0.8.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/node": "^26.1.2",
|