@epoch-agent/cli 0.10.0 → 0.10.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/dist/index.js +5 -2
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -2573,7 +2573,7 @@ import {
|
|
|
2573
2573
|
matchPreauthorization,
|
|
2574
2574
|
mergeHeadlessPolicy
|
|
2575
2575
|
} from "@epoch-agent/core";
|
|
2576
|
-
import { t as t18 } from "@epoch-agent/infra";
|
|
2576
|
+
import { createStreamDecoder, t as t18 } from "@epoch-agent/infra";
|
|
2577
2577
|
import { APPROVAL_OUTCOMES as APPROVAL_OUTCOMES2, isApprovalOutcome as isApprovalOutcome2 } from "@epoch-agent/protocol";
|
|
2578
2578
|
var APPROVER_TIMEOUT_MS = 6e4;
|
|
2579
2579
|
var MAX_STDOUT_BYTES = 64 * 1024;
|
|
@@ -2640,8 +2640,10 @@ function askExternalApprover(program2, payload, opts = {}) {
|
|
|
2640
2640
|
clearTimeout(timer);
|
|
2641
2641
|
settle(v);
|
|
2642
2642
|
};
|
|
2643
|
+
let decoder = null;
|
|
2643
2644
|
child.stdout?.on("data", (d) => {
|
|
2644
|
-
|
|
2645
|
+
decoder ??= createStreamDecoder();
|
|
2646
|
+
out2 += decoder.write(d);
|
|
2645
2647
|
if (out2.length > MAX_STDOUT_BYTES) {
|
|
2646
2648
|
child.kill("SIGKILL");
|
|
2647
2649
|
done({ ok: false, why: t18("approver.too_much_output", { bytes: MAX_STDOUT_BYTES }) });
|
|
@@ -2651,6 +2653,7 @@ function askExternalApprover(program2, payload, opts = {}) {
|
|
|
2651
2653
|
done({ ok: false, why: t18("approver.spawn_failed", { message: err2.message }) });
|
|
2652
2654
|
});
|
|
2653
2655
|
child.on("close", (code) => {
|
|
2656
|
+
out2 += decoder?.end() ?? "";
|
|
2654
2657
|
if (code !== 0) {
|
|
2655
2658
|
done({ ok: false, why: t18("approver.bad_exit", { code: code ?? -1 }) });
|
|
2656
2659
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epoch-agent/cli",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "epoch-agent CLI 入口",
|
|
6
6
|
"repository": {
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"commander": "^15.0.0",
|
|
23
23
|
"ink": "^7.1.1",
|
|
24
24
|
"react": "^19.2.8",
|
|
25
|
-
"@epoch-agent/protocol": "0.10.
|
|
26
|
-
"@epoch-agent/
|
|
27
|
-
"@epoch-agent/runtime": "0.10.
|
|
28
|
-
"@epoch-agent/
|
|
29
|
-
"@epoch-agent/
|
|
30
|
-
"@epoch-agent/
|
|
25
|
+
"@epoch-agent/protocol": "0.10.1",
|
|
26
|
+
"@epoch-agent/tui": "^0.10.1",
|
|
27
|
+
"@epoch-agent/runtime": "0.10.1",
|
|
28
|
+
"@epoch-agent/core": "0.10.1",
|
|
29
|
+
"@epoch-agent/server": "0.10.1",
|
|
30
|
+
"@epoch-agent/infra": "0.10.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/node": "^22.20.1",
|