osborn 0.9.282 → 0.9.283

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/index.js CHANGED
@@ -4432,6 +4432,18 @@ async function main() {
4432
4432
  console.error(`[COMPACT-AGENT-ERROR] ${err.message}`);
4433
4433
  }
4434
4434
  };
4435
+ // Pipeline fast brain → provisional chat answer. Both pipeline sessions (connect and recovery) use it.
4436
+ const onPipelineFastBrainResult = (r) => {
4437
+ console.log(`🧠⚡ [FAST_BRAIN ${r.type.toUpperCase()} +${r.elapsedMs}ms]: "${r.answer.substring(0, 60)}"`);
4438
+ // A hand-off to the main agent has nothing to say yet; its answer follows.
4439
+ if (r.type === 'research_needed')
4440
+ return;
4441
+ sendToFrontend({
4442
+ type: 'fast_brain_response', text: r.answer, responseType: r.type,
4443
+ elapsedMs: r.elapsedMs, question: r.question, toolsUsed: r.toolsUsed,
4444
+ agentRole: 'pipeline-fast-brain',
4445
+ });
4446
+ };
4435
4447
  // Create DIRECT session (STT + Claude Agent SDK + TTS)
4436
4448
  async function createDirectSession(resumeSessionId, llmOverride) {
4437
4449
  console.log('🎯 Creating direct session...');
@@ -5492,18 +5504,7 @@ async function main() {
5492
5504
  },
5493
5505
  getAndConsumeInterruptionContext,
5494
5506
  getAndConsumeClientNotes,
5495
- onFastBrainResult: (result) => {
5496
- console.log(`🧠⚡ [FAST_BRAIN ${result.type.toUpperCase()} +${result.elapsedMs}ms]: "${result.answer.substring(0, 60)}"`);
5497
- sendToFrontend({
5498
- type: 'fast_brain_response',
5499
- text: result.answer,
5500
- responseType: result.type,
5501
- elapsedMs: result.elapsedMs,
5502
- question: result.question,
5503
- toolsUsed: result.toolsUsed,
5504
- agentRole: 'pipeline-fast-brain',
5505
- });
5506
- },
5507
+ onFastBrainResult: onPipelineFastBrainResult,
5507
5508
  });
5508
5509
  // Pass pipelineLLM to createDirectSession so it uses it instead of creating a new ClaudeLLM
5509
5510
  const result = await createDirectSession(resumeSessionId, pipelineLLM);
@@ -5992,14 +5993,7 @@ async function main() {
5992
5993
  },
5993
5994
  getAndConsumeInterruptionContext,
5994
5995
  getAndConsumeClientNotes,
5995
- onFastBrainResult: (r) => {
5996
- console.log(`🧠⚡ [FAST_BRAIN ${r.type.toUpperCase()} +${r.elapsedMs}ms]: "${r.answer.substring(0, 60)}"`);
5997
- sendToFrontend({
5998
- type: 'fast_brain_response', text: r.answer, responseType: r.type,
5999
- elapsedMs: r.elapsedMs, question: r.question, toolsUsed: r.toolsUsed,
6000
- agentRole: 'pipeline-fast-brain',
6001
- });
6002
- },
5996
+ onFastBrainResult: onPipelineFastBrainResult,
6003
5997
  });
6004
5998
  result = await createDirectSession(recoverySessionId, pipelineLLM);
6005
5999
  }
File without changes