flight-rules 0.13.4 → 0.13.5
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/dist/commands/ralph.js +9 -3
- package/package.json +1 -1
- package/payload/AGENTS.md +1 -1
package/dist/commands/ralph.js
CHANGED
|
@@ -116,13 +116,19 @@ async function runClaudeWithPrompt(promptContent, verbose) {
|
|
|
116
116
|
});
|
|
117
117
|
let output = '';
|
|
118
118
|
let errorOutput = '';
|
|
119
|
+
let lineBuffer = ''; // Buffer for incomplete JSON lines
|
|
119
120
|
claude.stdout?.on('data', (data) => {
|
|
120
121
|
const text = data.toString();
|
|
121
122
|
output += text;
|
|
122
123
|
if (verbose) {
|
|
123
|
-
//
|
|
124
|
-
const
|
|
124
|
+
// Prepend any buffered partial line from previous chunk
|
|
125
|
+
const fullText = lineBuffer + text;
|
|
126
|
+
const lines = fullText.split('\n');
|
|
127
|
+
// Last element might be incomplete - save it for next chunk
|
|
128
|
+
lineBuffer = lines.pop() || '';
|
|
125
129
|
for (const line of lines) {
|
|
130
|
+
if (!line.trim())
|
|
131
|
+
continue;
|
|
126
132
|
try {
|
|
127
133
|
const parsed = JSON.parse(line);
|
|
128
134
|
// Handle different message types in stream-json format
|
|
@@ -142,7 +148,7 @@ async function runClaudeWithPrompt(promptContent, verbose) {
|
|
|
142
148
|
}
|
|
143
149
|
}
|
|
144
150
|
catch {
|
|
145
|
-
// Not valid JSON
|
|
151
|
+
// Not valid JSON, skip
|
|
146
152
|
}
|
|
147
153
|
}
|
|
148
154
|
}
|
package/package.json
CHANGED