arcane-os 0.13.2 → 0.13.3

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,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.13.3
4
+
5
+ - Skip automatic TTS finalization calls when a model stream completes while
6
+ muted. Preserve pending speech cleanup, unmuted flushing, explicit public
7
+ speech methods, and model response callbacks across all streaming routes.
8
+
3
9
  ## 0.13.2
4
10
 
5
11
  - Correct the PWA development guide to describe live descriptor refresh and
@@ -598,6 +598,12 @@ boundary; `finishTTS()` flushes any remaining text. It is not a playback-ended
598
598
  notification. Do not mute or dispose immediately after it if playback should
599
599
  continue.
600
600
 
601
+ Automatic model-stream completion reads the AI instance's current mute state.
602
+ While muted, it clears pending speech text and formatting state and stops
603
+ prepared playback without invoking `finishTTS()` or `streamTTS()`. Unmuted
604
+ completion keeps its ordinary speech flush. Explicit calls to either public
605
+ speech method retain their existing behavior.
606
+
601
607
  ## Automatic speech-input formatting cleanup
602
608
 
603
609
  Every TTS entrypoint removes repeated same formatting marks from the outbound
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arcane-os",
3
- "version": "0.13.2",
3
+ "version": "0.13.3",
4
4
  "description": "Arcane OS JavaScript SDK, project-local CLI, browser runtime, and repository-portable application packager.",
5
5
  "type": "module",
6
6
  "main": "./src/index.mjs",
@@ -4589,7 +4589,7 @@ class AI {
4589
4589
  if(signal?.aborted){
4590
4590
  throw normalizeAIRequestAbort();
4591
4591
  }
4592
- this.finishTTS();
4592
+ this.#finishStreamingSpeech();
4593
4593
  return result;
4594
4594
  }catch(error){
4595
4595
  if(handle){
@@ -4645,7 +4645,7 @@ class AI {
4645
4645
  if(signal?.aborted){
4646
4646
  throw normalizeAIRequestAbort();
4647
4647
  }
4648
- this.finishTTS();
4648
+ this.#finishStreamingSpeech();
4649
4649
  return result;
4650
4650
  }catch(error){
4651
4651
  this.stopAudio();
@@ -4928,7 +4928,7 @@ class AI {
4928
4928
 
4929
4929
  const nativeResult=this.#providerCompletionOutput(nativeCompletion);
4930
4930
  if(finishSpeech){
4931
- this.finishTTS();
4931
+ this.#finishStreamingSpeech();
4932
4932
  }
4933
4933
  await streamComplete(nativeResult,`M-${id}`,isThinking);
4934
4934
  speechTurnCompleted=true;
@@ -5392,7 +5392,7 @@ class AI {
5392
5392
  }
5393
5393
  const streamResult=this.#providerCompletionOutput(completion);
5394
5394
  if(finishSpeech){
5395
- this.finishTTS();
5395
+ this.#finishStreamingSpeech();
5396
5396
  }
5397
5397
  await streamComplete(streamResult, `M-${id}`,isThinking);
5398
5398
 
@@ -6075,6 +6075,16 @@ class AI {
6075
6075
  );
6076
6076
  }
6077
6077
 
6078
+ #finishStreamingSpeech(){
6079
+ if(this.muted){
6080
+ for(const playback of this.#preparedSpeechPlaybacks) playback.stop();
6081
+ this.audioMessageChunks='';
6082
+ this.#markdownSpeech.reset();
6083
+ return;
6084
+ }
6085
+ this.finishTTS();
6086
+ }
6087
+
6078
6088
  finishTTS(){
6079
6089
  this.#traceSpeech('finishTTS.call');
6080
6090
  return this.streamTTS('',true);