@goodandready/dsh-tts 0.4.25 → 0.4.26

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,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.26
4
+
5
+ ### Fixed
6
+ - **Cloud Timeout Cancellation Forwarding** (#145): Fixed unquoted `abort` identifier in `lib/providers.js:21` inside `withCloudTimeout()`. Passing an active `AbortSignal` in `synthesize()` now cleanly attaches cancellation listeners without throwing `ReferenceError`.
7
+ - **Settings Save Handler Runtime Crash** (#146): Added a defensive `settingsApi` adapter to `lib/index.js` and bound `getSettingsApi()` in `apply()`. `PUT /dsh-tts/config` now updates live configuration and persists changes without `ReferenceError: settingsApi is not defined`.
8
+ - **Client Bundle Parity Verification** (#147): Added non-destructive `--check` mode to `scripts/build-client.mjs`, registered `check:client` npm script, and added automated test in `test/client-redesign.test.mjs` to prevent bundle drift.
9
+
3
10
  ## 0.4.24
4
11
 
5
12
  ### Fixed
package/lib/index.js CHANGED
@@ -191,9 +191,28 @@ let utteranceSeq = 0
191
191
  export function apply(ctx, config) {
192
192
  const providerBreaker = createProviderBreaker()
193
193
 
194
- let getConfig = () => config
194
+ let currentConfig = plainConfig(config)
195
+ let getConfig = () => currentConfig
195
196
  const live = () => plainConfig(Config(structuredClone(getConfig() ?? {})) ?? config)
196
197
 
198
+ const settingsApi = {
199
+ get: () => live(),
200
+ replace: async (next) => {
201
+ const plain = plainConfig(next)
202
+ currentConfig = plain
203
+ const svc = ctx?.get?.('settings')
204
+ if (svc) {
205
+ const rev = svc.getSnapshot?.()?.revision ?? svc.getSnapshot?.()?.entries?.[NS]?.revision
206
+ if (typeof svc.replace === 'function') {
207
+ await svc.replace(NS, plain, rev)
208
+ } else if (typeof svc.update === 'function') {
209
+ await svc.update(NS, plain, rev)
210
+ }
211
+ }
212
+ return plain
213
+ },
214
+ }
215
+
197
216
  // settings.register was removed before 0.1.7-rc.2. The host hands the profile entry
198
217
  // config to apply() directly; live() below re-resolves it through the schema and
199
218
  // unwraps, so the Loader's in-place box updates are picked up without a service.
package/lib/providers.js CHANGED
@@ -18,7 +18,7 @@ export function makeProviders(deps, req) {
18
18
  }, cloudTimeoutMs)
19
19
  if (parentSignal) {
20
20
  if (parentSignal.aborted) controller.abort(parentSignal.reason)
21
- else parentSignal.addEventListener(abort, () => controller.abort(parentSignal.reason), { once: true })
21
+ else parentSignal.addEventListener('abort', () => controller.abort(parentSignal.reason), { once: true })
22
22
  }
23
23
  return {
24
24
  signal: controller.signal,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-tts",
3
- "version": "0.4.25",
3
+ "version": "0.4.26",
4
4
  "description": "Text-to-speech for DeepSeek Harness: speak agent replies in the Web UI with a provider fallback chain (OpenAI, ElevenLabs, Google, Azure, Groq, Deepgram, OpenRouter, Edge, Piper, eSpeak).",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -45,7 +45,8 @@
45
45
  "scripts": {
46
46
  "test": "node --test test/*.test.mjs",
47
47
  "build:client": "node scripts/build-client.mjs",
48
- "pretest": "node scripts/build-client.mjs"
48
+ "pretest": "node scripts/build-client.mjs",
49
+ "check:client": "node scripts/build-client.mjs --check"
49
50
  },
50
51
  "dsh": {
51
52
  "bundle": {