pi-cohort 6.0.0 → 6.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [6.0.1] - 2026-09-07
4
+
5
+ ### Fixed
6
+
7
+ - `getFinalOutput` no longer truncates a multi-block assistant reply to its last text block; it now joins all non-empty text blocks with `\n`. Previously a `BLOCKED:` line in an earlier block was dropped, so the `BLOCKED:` classifier misread a blocked reply as successful (or a completed reply whose trailing block happened to start with `BLOCKED:` as failed).
8
+
3
9
  ## [6.0.0] - 2026-09-07
4
10
 
5
11
  ### Removed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-cohort",
3
- "version": "6.0.0",
3
+ "version": "6.0.1",
4
4
  "description": "Delegate Pi work to focused child agents: code review, scouting, implementation, parallel audits, saved chains, and background jobs.",
5
5
  "author": "Jacek Juraszek",
6
6
  "license": "MIT",
@@ -192,10 +192,8 @@ export function getFinalOutput(messages: Message[]): string {
192
192
  const hasAssistantError = ("errorMessage" in msg && typeof msg.errorMessage === "string" && msg.errorMessage.length > 0)
193
193
  || ("stopReason" in msg && msg.stopReason === "error");
194
194
  if (hasAssistantError) continue;
195
- for (let j = msg.content.length - 1; j >= 0; j--) {
196
- const part = msg.content[j];
197
- if (part.type === "text" && part.text.trim().length > 0) return part.text;
198
- }
195
+ const parts = msg.content.flatMap((part) => (part.type === "text" && part.text.trim().length > 0 ? [part.text] : []));
196
+ if (parts.length > 0) return parts.join("\n");
199
197
  }
200
198
  }
201
199
  return "";