@tea-agent/loop-agent 0.39.0-next.21 → 0.39.0-next.22

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "version": "0.37.0",
4
- "gitSha": "8512d440d297980cf2bcb7f4d77f3520950ee051",
5
- "builtAt": "2026-08-19T17:24:57.980Z"
4
+ "gitSha": "d9988c6066bf4bee704758d6c98aaf7990b32972",
5
+ "builtAt": "2026-08-20T02:47:19.956Z"
6
6
  }
@@ -162,9 +162,12 @@ async function readNodeText(runDir, nodeId) {
162
162
  if (record.status !== "FINISHED") {
163
163
  throw new Error(`frontend prewrite gate requires FINISHED node ${nodeId} (got ${String(record.status)})`);
164
164
  }
165
- const text = [record.assistantText, record.stdout]
166
- .filter((value) => Boolean(value?.trim()))
167
- .join("\n");
165
+ // Pi execution mirrors a successful structured-contract normalization into
166
+ // both assistantText and stdout. Treat node output the same way as the DAG
167
+ // runtime's canonicalNodeOutput(): assistantText is authoritative and stdout
168
+ // is only a fallback. Concatenating the two duplicate fields makes a single
169
+ // canonical plan appear as two complete JSON contracts to the prewrite gate.
170
+ const text = record.assistantText?.trim() || record.stdout?.trim() || "";
168
171
  if (!text)
169
172
  throw new Error(`frontend prewrite gate empty output from ${nodeId}`);
170
173
  return text;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tea-agent/loop-agent",
3
- "version": "0.39.0-next.21",
3
+ "version": "0.39.0-next.22",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "loop-agent": "bin/loop-agent.js",