@alia.onl/sdk 8.0.0 → 10.0.1

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/src/voice.ts CHANGED
@@ -8,6 +8,8 @@ export { VoiceSession } from './components/voice/VoiceSession';
8
8
  export { AudioWaveVisualizer } from './components/voice/AudioWaveVisualizer';
9
9
  export { VoiceOverlay } from './components/voice/VoiceOverlay';
10
10
  export { VoiceControls } from './components/voice/VoiceControls';
11
+ export { VOICE_CONTROLS_LABELS } from './components/voice/VoiceControls';
12
+ export type { VoiceControlsLabels, VoiceControlsProps } from './components/voice/VoiceControls';
11
13
 
12
14
  // ── Voice hooks ──
13
15
  export { useVoiceRoom } from './hooks/useVoiceRoom';
@@ -15,6 +17,8 @@ export type { UseVoiceRoomOptions } from './hooks/useVoiceRoom';
15
17
  export { createAliaVoiceTurnSender } from './lib/voice-turn';
16
18
  export type { VoiceTurn, VoiceTurnMessage, VoiceTurnSender, AliaVoiceTurnSenderOptions } from './lib/voice-turn';
17
19
  export type { VoiceLevelSource } from './lib/voice-levels';
20
+ export { VOICE_ERROR_MESSAGES } from './lib/speech-messages';
21
+ export type { VoiceErrorCode } from './lib/speech-messages';
18
22
  export { useAudioLevelMonitor } from './hooks/useAudioLevelMonitor';
19
23
  export { useAudioLevels } from './hooks/useAudioLevels';
20
24
  export { useAmbientWave } from './hooks/useAmbientWave';
package/src/lib/config.ts DELETED
@@ -1,36 +0,0 @@
1
- /**
2
- * Build-time preferences for the SDK.
3
- *
4
- * These mirror `packages/app/lib/config.ts`, and carry the same warning it does:
5
- * **a value here is never trusted.** The catalogue carries no default of its own
6
- * — it orders entries by price and says explicitly that position is not a
7
- * recommendation — so a build-time value is the only mechanism available for
8
- * "what should this ask for first". `resolveSelection` then checks it against
9
- * what the server actually offers and falls through when the catalogue does not
10
- * list it.
11
- *
12
- * Overridable per build so a consumer is not stranded on a retired identifier
13
- * until the SDK ships a new version, which is the failure the hardcoded
14
- * `'route:auto'` inside `useAliaChat` used to guarantee.
15
- */
16
-
17
- /** What a chat request asks for when the caller names no model. Checked against the catalogue. */
18
- export const PREFERRED_CHAT_MODEL_ID = 'mode:auto';
19
-
20
- /**
21
- * What speech synthesis and the voice session ask for.
22
- *
23
- * **Not resolved against the chat catalogue, and that is deliberate.**
24
- * `GET /catalogue` describes what a chat PICKER may offer, and
25
- * `resolveSelection` filters to `chat_visible` entries; a voice identifier is
26
- * not one of those. Passing this through the chat resolver would replace it with
27
- * a chat model the moment the catalogue did not list it, and `/v1/audio/speech`
28
- * would then be asked to synthesize with something that cannot speak — a
29
- * plausible-looking substitution that fails at the far end, which is worse than
30
- * the 400 it replaces.
31
- *
32
- * So this stays a preference the consumer can override and the server validates.
33
- * Resolving it properly needs a catalogue that describes voice capability as a
34
- * first-class filter; that is workstream 5's business, not a thing to fake here.
35
- */
36
- export const PREFERRED_VOICE_MODEL_ID = 'route:voice';