@alia.onl/sdk 5.1.0 → 7.0.0

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.
@@ -0,0 +1,38 @@
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
+ * `'alia-v1'` 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 =
19
+ process.env.EXPO_PUBLIC_ALIA_DEFAULT_MODEL ?? 'profile:v1';
20
+
21
+ /**
22
+ * What speech synthesis and the voice session ask for.
23
+ *
24
+ * **Not resolved against the chat catalogue, and that is deliberate.**
25
+ * `GET /catalogue` describes what a chat PICKER may offer, and
26
+ * `resolveSelection` filters to `chat_visible` entries; a voice identifier is
27
+ * not one of those. Passing this through the chat resolver would replace it with
28
+ * a chat model the moment the catalogue did not list it, and `/v1/audio/speech`
29
+ * would then be asked to synthesize with something that cannot speak — a
30
+ * plausible-looking substitution that fails at the far end, which is worse than
31
+ * the 400 it replaces.
32
+ *
33
+ * So this stays a preference the consumer can override and the server validates.
34
+ * Resolving it properly needs a catalogue that describes voice capability as a
35
+ * first-class filter; that is workstream 5's business, not a thing to fake here.
36
+ */
37
+ export const PREFERRED_VOICE_MODEL_ID =
38
+ process.env.EXPO_PUBLIC_ALIA_VOICE_MODEL ?? 'profile:v1-voice';
@@ -16,7 +16,7 @@ const TOOL_REGISTRY: Record<string, ToolDefinition> = {
16
16
  sendWhatsAppMessage: { label: 'Sending WhatsApp message', category: 'communication' },
17
17
  getWhatsAppChats: { label: 'Loading WhatsApp chats', category: 'communication' },
18
18
  getWhatsAppMessages: { label: 'Reading WhatsApp messages', category: 'communication' },
19
- sendTelegram: { label: 'Sending Telegram message', category: 'communication' },
19
+ sendTelegramMessage: { label: 'Sending Telegram message', category: 'communication' },
20
20
 
21
21
  // Utility
22
22
  getCurrentDate: { label: 'Getting current date', category: 'utility' },