pi-agent-flow 1.4.1 → 1.4.2
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/package.json +1 -1
- package/src/flow.ts +2 -15
package/package.json
CHANGED
package/src/flow.ts
CHANGED
|
@@ -471,6 +471,7 @@ export async function runFlow(opts: RunFlowOptions): Promise<SingleResult> {
|
|
|
471
471
|
proc.stdin.on("error", () => {
|
|
472
472
|
/* ignore broken pipe on fast exits */
|
|
473
473
|
});
|
|
474
|
+
proc.stdin.end();
|
|
474
475
|
|
|
475
476
|
let abortHandler: (() => void) | undefined;
|
|
476
477
|
let buffer = "";
|
|
@@ -620,21 +621,7 @@ export async function runFlow(opts: RunFlowOptions): Promise<SingleResult> {
|
|
|
620
621
|
result.stderr += `\nFlow timed out after ${Math.round(effectiveTimeout / 1000)}s.`;
|
|
621
622
|
emitUpdate();
|
|
622
623
|
|
|
623
|
-
//
|
|
624
|
-
try {
|
|
625
|
-
if (!stdinEnded) {
|
|
626
|
-
proc.stdin.write(
|
|
627
|
-
JSON.stringify({
|
|
628
|
-
type: "flow_timeout",
|
|
629
|
-
instruction: "stop and report all findings immediately",
|
|
630
|
-
}) + "\n",
|
|
631
|
-
);
|
|
632
|
-
}
|
|
633
|
-
} catch {
|
|
634
|
-
/* ignore broken pipe */
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
// Stage 2: Grace period before hard kill
|
|
624
|
+
// Grace period before hard kill
|
|
638
625
|
const graceTimer = setTimeout(() => {
|
|
639
626
|
if (didClose || settled) return;
|
|
640
627
|
result.stopReason = "timeout";
|