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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/flow.ts +2 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-agent-flow",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Flow-state delegation extension for Pi coding agent.",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
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
- // Stage 1: Send timeout instruction to child via stdin
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";