@mjasnikovs/pi-task 0.4.1 → 0.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.
|
@@ -59,7 +59,15 @@ export function runChild(spawn, invocation, cwd, signal, opts) {
|
|
|
59
59
|
drainJsonEvents(lineBuffer + '\n', opts);
|
|
60
60
|
lineBuffer = '';
|
|
61
61
|
}
|
|
62
|
-
|
|
62
|
+
let text;
|
|
63
|
+
if (isJsonEvents) {
|
|
64
|
+
const extracted = (finalText || textDeltaAccum).trim();
|
|
65
|
+
// When json-events mode extracts no text but stderr has content,
|
|
66
|
+
// surface the stderr as the text so the caller sees the real error
|
|
67
|
+
// instead of the generic "X child produced no output". Without this,
|
|
68
|
+
// a model API crash that exits 0 with an error on stderr is invisible.
|
|
69
|
+
text = extracted.length > 0 ? extracted : (stderr.trim() || undefined);
|
|
70
|
+
}
|
|
63
71
|
resolve({ stdout, stderr, exitCode: code ?? 0, aborted, text });
|
|
64
72
|
});
|
|
65
73
|
proc.on('error', () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mjasnikovs/pi-task",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Deterministic spec-orchestration for local models, with a bundled real-time remote web view and web/docs/fetch/worker subagent tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|