osborn 0.9.61 → 0.9.62

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.
Files changed (2) hide show
  1. package/dist/index.js +38 -35
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2113,51 +2113,54 @@ async function main() {
2113
2113
  tts,
2114
2114
  turnDetection: 'stt',
2115
2115
  });
2116
+ // 0.9.62: REVERT to the AgentSession config that was deployed during the
2117
+ // user's known-good month (0.9.52, Jun 09). Pre-48h evidence shows the
2118
+ // explicit interruption block introduced in 0.9.60 + the timer bumps in
2119
+ // 0.9.61 made things WORSE, not better — osbornojure logs showed 5+
2120
+ // consecutive TTS stalls on a single TTS-say, each one re-triggering
2121
+ // because the underlying pause-and-resume deadlock (workflow finding:
2122
+ // waitUntilTimeout signal-blind, audioOutput.pause without _currentSpeech.interrupt,
2123
+ // captureFrame parked on playbackEnabledFuture) is INHERENT to the
2124
+ // 1.4.x pause path and our tuned thresholds (minDuration: 1000, minWords: 3)
2125
+ // simply make each rare-but-deadlocking trigger more catastrophic.
2126
+ //
2127
+ // Stripped back to SDK defaults for every interrupt-related knob. SDK
2128
+ // 1.4.6 defaults (aecWarmupDuration: 3000, minDuration: 500, minWords: 0,
2129
+ // falseInterruptionTimeout: 2000, resumeFalseInterruption: true,
2130
+ // discardAudioIfUninterruptible: true, ttsReadIdleTimeout: 10000,
2131
+ // maxUnrecoverableErrors: 3) are what was silently running via caret-resolved
2132
+ // 1.4.5 throughout the user's working month. Restoring them.
2116
2133
  const session = new voice.AgentSession({
2117
2134
  turnDetection: 'stt',
2118
2135
  preemptiveGeneration: false, // Only fire LLM on final committed transcript, not partial preemptives
2119
- // First-line echo defense: drop mic frames from BOTH the recognition stream
2120
- // and the realtime audio stream for this many ms after the agent first
2121
- // enters 'speaking' state. STT receives no audio during the warmup → no
2122
- // interim/final transcripts can fire echo cannot trigger an interrupt.
2123
- // 1.4.x default is 3000; bumping to 5000 widens the safe zone at session start.
2124
- // One-shot per session (NOT re-armed each turn), so this protects only the
2125
- // first agent response. After that the in-block interruption settings handle it.
2126
- aecWarmupDuration: 5000,
2127
- // TTS stall mitigations (0.9.61). The 1.4.x SDK added a 10s default
2128
- // readIdleTimeout in generation.js:519 (PR livekit/agents-js#1461) — when
2129
- // the TTS stream goes silent for >10s, it force-closes via reader.cancel()
2130
- // which trips the OpenAI SDK's AbortSignal → APIUserAbortError →
2131
- // tts_error recoverable:false. Root cause is upstream: the OpenAI plugin
2132
- // BUFFERS the entire tts-1 PCM response (arrayBuffer()) before emitting a
2133
- // single frame. Long sentences intermittently exceed 10s end-to-end with
2134
- // tts-1. Raising both watchdogs to 30s gives slow OpenAI responses room
2135
- // to complete; raising maxUnrecoverableErrors from default 3 to 15 prevents
2136
- // a transient burst of stalls from killing the AgentSession outright (the
2137
- // counter resets on every successful speaking transition).
2138
- ttsReadIdleTimeout: 30_000,
2139
- forwardAudioIdleTimeout: 30_000,
2140
- connOptions: {
2141
- maxUnrecoverableErrors: 15,
2142
- },
2136
+ // Commented out kept for reference. These were added across 0.9.60/0.9.61
2137
+ // to try to harden interrupt + TTS handling, but evidence (osbornojure
2138
+ // 2026-06-16/17 logs + the interrupt-stall workflow) showed they made
2139
+ // things worse: tighter gates concentrated the rare-but-deadlocking pause
2140
+ // path triggers into longer events that the SDK's signal-blind read loop
2141
+ // (utils.js:624 waitUntilTimeout) couldn't recover from. Defaults from
2142
+ // SDK 1.4.6 (matching what silently ran via caret-resolved 1.4.5 throughout
2143
+ // the user's last-working month) are restored by leaving these unset.
2144
+ //
2145
+ // aecWarmupDuration: 5000, // default 3000
2146
+ // ttsReadIdleTimeout: 30_000, // default 10000
2147
+ // forwardAudioIdleTimeout: 30_000, // default 10000
2148
+ // connOptions: {
2149
+ // maxUnrecoverableErrors: 15, // default 3
2150
+ // },
2143
2151
  turnHandling: {
2144
2152
  endpointing: {
2145
2153
  mode: 'fixed',
2146
2154
  minDelay: 500, // Wait 500ms after STT commits before generating reply
2147
2155
  maxDelay: 2000, // Force end-of-turn after 2s to prevent hangs
2148
2156
  },
2149
- // 1.4.x SDK fully wires these minDuration now applies to the STT path
2150
- // (not just VAD), falseInterruptionTimeout actually fires the
2151
- // agentFalseInterruption event with auto-resume, discardAudioIfUninterruptible
2152
- // is checked at runtime. All inert in 1.2.1; live in 1.4.x.
2157
+ // Commented outsee note above the AgentSession constructor.
2153
2158
  interruption: {
2154
- // enabled defaults true — kept default (don't set to false; cascades into
2155
- // allowInterruptions:false which breaks manual interrupt() calls).
2156
- minDuration: 1000, // 1.4.x: now gates STT-path; require 1s sustained speech
2157
- minWords: 3, // require ≥3 words in interim transcript
2158
- falseInterruptionTimeout: 2000, // emit agentFalseInterruption after 2s silence
2159
- resumeFalseInterruption: true, // auto-resume TTS on false interrupt detection
2160
- discardAudioIfUninterruptible: true, // drop buffered echo audio
2159
+ minDuration: 2000, // default 500
2160
+ minWords: 3, // default 0
2161
+ falseInterruptionTimeout: 3000, // default 2000 (same)
2162
+ // resumeFalseInterruption: true, // default true (same)
2163
+ // discardAudioIfUninterruptible: true,// default true (same)
2161
2164
  },
2162
2165
  },
2163
2166
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "osborn",
3
- "version": "0.9.61",
3
+ "version": "0.9.62",
4
4
  "description": "Voice AI coding assistant - local agent that connects to Osborn frontend",
5
5
  "type": "module",
6
6
  "bin": {