@link-assistant/hive-mind 1.10.0 → 1.10.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,18 @@
1
1
  # @link-assistant/hive-mind
2
2
 
3
+ ## 1.10.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 24e70f8: Fix agent --verbose output by properly handling stderr stream
8
+ - Agent CLI sends ALL output (including verbose logs and structured events) to stderr, not stdout
9
+ - Previous code only processed stdout with JSON parsing, treating stderr as plain error text
10
+ - Now stderr is processed the same way as stdout: NDJSON line-by-line parsing with JSON formatting
11
+ - Session IDs are now correctly extracted from stderr messages
12
+ - stderr output is now collected for error detection
13
+
14
+ Fixes #1151
15
+
3
16
  ## 1.10.0
4
17
 
5
18
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@link-assistant/hive-mind",
3
- "version": "1.10.0",
3
+ "version": "1.10.1",
4
4
  "description": "AI-powered issue solver and hive mind for collaborative problem solving",
5
5
  "main": "src/hive.mjs",
6
6
  "type": "module",
package/src/agent.lib.mjs CHANGED
@@ -440,7 +440,27 @@ export const executeAgentCommand = async params => {
440
440
  if (chunk.type === 'stderr') {
441
441
  const errorOutput = chunk.data.toString();
442
442
  if (errorOutput) {
443
- await log(errorOutput, { stream: 'stderr' });
443
+ // Agent sends all output (including verbose logs and structured events) to stderr
444
+ // Process each line as NDJSON, same as stdout handling
445
+ const stderrLines = errorOutput.split('\n');
446
+ for (const stderrLine of stderrLines) {
447
+ if (!stderrLine.trim()) continue;
448
+ try {
449
+ const stderrData = JSON.parse(stderrLine);
450
+ // Output formatted JSON (same formatting as stdout)
451
+ await log(JSON.stringify(stderrData, null, 2));
452
+ // Capture session ID from stderr too (agent sends it via stderr)
453
+ if (!sessionId && stderrData.sessionID) {
454
+ sessionId = stderrData.sessionID;
455
+ await log(`📌 Session ID: ${sessionId}`);
456
+ }
457
+ } catch {
458
+ // Not JSON - log as plain text
459
+ await log(stderrLine);
460
+ }
461
+ }
462
+ // Also collect stderr for error detection
463
+ fullOutput += errorOutput;
444
464
  }
445
465
  } else if (chunk.type === 'exit') {
446
466
  exitCode = chunk.code;