@goodandready/dsh-voice 0.9.6 → 0.9.8

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/lib/index.js CHANGED
@@ -12,28 +12,25 @@
12
12
  // Provider keys are resolved on the host via ctx.credentials and never reach
13
13
  // the browser.
14
14
 
15
- import z from '@deepseek-ai/schemastery'
16
- import { defineTool } from '@deepseek-ai/dsh-tools'
17
- import { credentialRef } from '@deepseek-ai/dsh-credentials'
18
- import { readFile, stat } from 'node:fs/promises'
19
- import path from 'node:path'
20
- import { runChain } from './chain.js'
21
- import { makeProviders, PROVIDER_KEYS, PRESET_KEYS, KNOWN_KEYS, DEFAULT_MODELS, CUSTOM_TEMPLATES } from './providers.js'
22
- import { toWav16k } from './wav.js'
23
- import { normalizePhrase, applyJargonDictionary, extractVoiceActions } from './normalize.js'
24
- import { createStatsTracker, mergeContextVocabulary } from './stats.js'
25
- import { writeJson, readBody, isTrustedCaller } from './http-util.js'
26
- import { createPolishText } from './polish.js'
27
- import { createUserMessage } from '@deepseek-ai/dsh-llm'
28
- import { buildProviderOrder, sessionCommand } from './transcribe-core.js'
29
- import { registerPluginUpdater } from './updater.js'
30
- import { registerSensevoiceInstaller, findTokensFile } from './sensevoice-installer.js'
31
- import { createConfigReader } from './config-compat.js'
32
- import { registerConfigRoutes } from './config-routes.js'
33
- import { getAllowedAudioRoots, validateAudioPath, validateAudioContent } from './audio-guard.js'
34
- import { isAutoLang } from './provider-http.js'
35
- import { ChainEntry, CustomProvider, BaseConfig } from './schema.js'
36
- import { registerTranscribeAudioTool, MIME_BY_EXT } from './tool.js'
15
+ import z from "@deepseek-ai/schemastery"
16
+ import { credentialRef } from "@deepseek-ai/dsh-credentials"
17
+ import path from "node:path"
18
+ import { runChain } from "./chain.js"
19
+ import { makeProviders, KNOWN_KEYS, DEFAULT_MODELS } from "./providers.js"
20
+ import { toWav16k } from "./wav.js"
21
+ import { applyJargonDictionary, extractVoiceActions } from "./normalize.js"
22
+ import { createStatsTracker, mergeContextVocabulary } from "./stats.js"
23
+ import { writeJson, readBody, isTrustedCaller } from "./http-util.js"
24
+ import { createPolishText } from "./polish.js"
25
+ import { createUserMessage } from "@deepseek-ai/dsh-llm"
26
+ import { buildProviderOrder, sessionCommand } from "./transcribe-core.js"
27
+ import { registerPluginUpdater } from "./updater.js"
28
+ import { registerSensevoiceInstaller, findTokensFile } from "./sensevoice-installer.js"
29
+ import { createConfigReader } from "./config-compat.js"
30
+ import { registerConfigRoutes } from "./config-routes.js"
31
+ import { isAutoLang } from "./provider-http.js"
32
+ import { ChainEntry, CustomProvider, BaseConfig } from "./schema.js"
33
+ import { registerTranscribeAudioTool } from "./tool.js"
37
34
  export { ChainEntry, CustomProvider, BaseConfig }
38
35
 
39
36
  export const name = '@goodandready/dsh-voice'
@@ -249,10 +246,16 @@ export function apply(ctx, baseConfig) {
249
246
  triggerAutostart()
250
247
  })
251
248
 
252
- if (typeof ctx.on === 'function') {
253
- ctx.on('loader/volatile-update', () => triggerAutostart())
254
- ctx.on('settings/document-updated', () => triggerAutostart())
255
- ctx.on('config', () => triggerAutostart())
249
+ if (typeof ctx.on === "function") {
250
+ if (typeof ctx.effect === "function") {
251
+ ctx.effect(() => ctx.on('loader/volatile-update', () => triggerAutostart()), "dsh-voice: volatile autostart")
252
+ ctx.effect(() => ctx.on('settings/document-updated', () => triggerAutostart()), "dsh-voice: settings autostart")
253
+ ctx.effect(() => ctx.on('config', () => triggerAutostart()), "dsh-voice: config autostart")
254
+ } else {
255
+ ctx.on('loader/volatile-update', () => triggerAutostart())
256
+ ctx.on('settings/document-updated', () => triggerAutostart())
257
+ ctx.on('config', () => triggerAutostart())
258
+ }
256
259
  }
257
260
 
258
261
  triggerAutostart()
@@ -2,7 +2,7 @@
2
2
  // Downloads pre-quantized ONNX model and configures autostart on the host.
3
3
 
4
4
  import { createWriteStream, existsSync, readdirSync } from 'node:fs'
5
- import { mkdir, stat, unlink } from 'node:fs/promises'
5
+ import { mkdir, unlink } from 'node:fs/promises'
6
6
  import { homedir } from 'node:os'
7
7
  import path from 'node:path'
8
8
  import { spawn } from 'node:child_process'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-voice",
3
- "version": "0.9.6",
3
+ "version": "0.9.8",
4
4
  "description": "Voice input for DeepSeek Harness: dictation chunked by pauses and voice messages, each with its own provider fallback chain (Deepgram, Groq, HuggingFace, local whisper.cpp, plus any OpenAI-compatible API of your own).",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -63,10 +63,10 @@
63
63
  },
64
64
  "peerDependencies": {
65
65
  "@deepseek-ai/cordis": "^4.0.1",
66
- "@deepseek-ai/dsh-tools": "^0.1.0-rc.6",
67
- "@deepseek-ai/dsh-credentials": "^0.1.0-rc.6",
68
- "@deepseek-ai/dsh-host-webserver": "^0.1.0-rc.6",
69
- "@deepseek-ai/dsh-llm": "^0.1.0-rc.6",
66
+ "@deepseek-ai/dsh-tools": "^0.1.7-rc.2 || ^0.2.0-rc.1",
67
+ "@deepseek-ai/dsh-credentials": "^0.1.7-rc.2 || ^0.2.0-rc.1",
68
+ "@deepseek-ai/dsh-host-webserver": "^0.1.7-rc.2 || ^0.2.0-rc.1",
69
+ "@deepseek-ai/dsh-llm": "^0.1.7-rc.2 || ^0.2.0-rc.1",
70
70
  "@deepseek-ai/schemastery": "^3.18.1"
71
71
  }
72
72
  }