@wildix/wilma-agents-client 1.0.41 → 1.0.43

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.
@@ -57,6 +57,102 @@ export interface AgentAccess {
57
57
  */
58
58
  grants?: AgentGrantPrincipal[] | undefined;
59
59
  }
60
+ /**
61
+ * One language the assistant audio channel can recognise and speak. There is deliberately no
62
+ * greeting here: an assistant conversation is already open when its audio call starts, so there
63
+ * is no new conversation to welcome and no initial phrase for the runtime to choose or repeat.
64
+ * @public
65
+ */
66
+ export interface AssistantLanguage {
67
+ /**
68
+ * BCP-47 code with locale, e.g. 'en-US', 'it-IT'. Reuses the channel-neutral language value so assistant and voice configuration accept the same codes without sharing policy structures.
69
+ * @public
70
+ */
71
+ code: string;
72
+ /**
73
+ * Voice this language speaks with. Reuses the channel-neutral URI value so providers and synthesis parameters have the same representation in every channel without coupling their language rules.
74
+ * @public
75
+ */
76
+ voice: string;
77
+ /**
78
+ * Marks the language used when the caller's language matches nothing configured.
79
+ *
80
+ * THE FULL RESOLUTION ORDER, because a client author reading only this contract cannot
81
+ * otherwise find it: an exact match on the call's language, then a match on its primary
82
+ * subtag (`fr` finds `fr-FR`), then the language marked here, then a language whose primary
83
+ * subtag is `en`, then the first entry in the list. The same order the voice channel resolves
84
+ * by — the rule belongs to choosing a language, not to a channel.
85
+ *
86
+ * At most one language may carry it. A record with two — reachable through the API, where no
87
+ * form prevents it — resolves to the first marked one in list order: refusing an
88
+ * already-open assistant conversation over configuration drift is worse than serving it.
89
+ * @public
90
+ */
91
+ isDefault?: boolean | undefined;
92
+ }
93
+ /**
94
+ * Speech-to-text configuration owned by the assistant channel, so changes to assistant recognition policy cannot alter telephony calls.
95
+ * @public
96
+ */
97
+ export interface AssistantTranscriptionSettings {
98
+ /**
99
+ * Recogniser used for assistant audio. Absent resolves to the platform default, resolved by the server so exactly one component decides it.
100
+ * @public
101
+ */
102
+ engine?: string | undefined;
103
+ /**
104
+ * Identify the caller's language per utterance and switch voice and reply language while the
105
+ * audio call is open. Absent means off. It requires at least two configured languages and a
106
+ * recogniser that can identify them; the server clamps it to false otherwise because passing
107
+ * one candidate to an identifying recogniser can make it reject the stream.
108
+ * @public
109
+ */
110
+ autoDetect?: boolean | undefined;
111
+ }
112
+ /**
113
+ * Recognition and synthesis policy for assistant audio. This is assistant-owned rather than a
114
+ * VoiceSpeechSettings reuse so telephony and assistant audio can evolve independently. It has no
115
+ * language greeting and no greet-every-language switch because an assistant conversation is
116
+ * already open when its audio call starts, leaving nothing for the channel to greet.
117
+ * @public
118
+ */
119
+ export interface AssistantSpeechSettings {
120
+ /**
121
+ * Languages the assistant audio channel can recognise and speak. The @length bound is a
122
+ * STORAGE ceiling, not the product rule: the real cap is the recogniser's own candidate limit,
123
+ * enforced in the service so a recogniser with a different limit needs no model change.
124
+ * @public
125
+ */
126
+ languages: AssistantLanguage[];
127
+ /**
128
+ * Which recogniser listens to assistant audio and whether it identifies the language. Absent uses the platform default recogniser without language identification.
129
+ * @public
130
+ */
131
+ transcription?: AssistantTranscriptionSettings | undefined;
132
+ }
133
+ /**
134
+ * Switchable audio for the assistant channel. The settings object keeps enablement beside its
135
+ * speech policy, matching the voice channel's switchable blocks so a disabled configuration can
136
+ * be retained without serving audio.
137
+ * @public
138
+ */
139
+ export interface AssistantAudioSettings {
140
+ /**
141
+ * Whether the assistant accepts audio calls. Required so the presence of saved speech configuration is never mistaken for enablement.
142
+ * @public
143
+ */
144
+ enabled: boolean;
145
+ /**
146
+ * Which runtime carries the call. Absent is 'voice'.
147
+ * @public
148
+ */
149
+ engine?: string | undefined;
150
+ /**
151
+ * Languages, voices and recognition policy for assistant audio. Absent leaves those choices to platform defaults, including when audio is enabled.
152
+ * @public
153
+ */
154
+ speech?: AssistantSpeechSettings | undefined;
155
+ }
60
156
  /**
61
157
  * A starter prompt offered as a card on an empty thread. Picking it sends `prompt` as the user's first message, so the user never types it.
62
158
  * @public
@@ -116,6 +212,7 @@ export interface AssistantUiSettings {
116
212
  placeholder?: string | undefined;
117
213
  }
118
214
  /**
215
+ * Assistant channel settings. Presence enables the in-app assistant surface; audio remains unavailable unless its separate settings are present and enabled.
119
216
  * @public
120
217
  */
121
218
  export interface AssistantChannelSettings {
@@ -129,6 +226,11 @@ export interface AssistantChannelSettings {
129
226
  * @public
130
227
  */
131
228
  ui?: AssistantUiSettings | undefined;
229
+ /**
230
+ * Audio configuration owned by the assistant channel. Absent means the assistant has no audio at all, preserving the behaviour of every existing agent without consulting `channels.voice`.
231
+ * @public
232
+ */
233
+ audio?: AssistantAudioSettings | undefined;
132
234
  }
133
235
  /**
134
236
  * @public
@@ -220,41 +322,15 @@ export interface VoiceInterruptionSettings {
220
322
  */
221
323
  minWords?: number | undefined;
222
324
  }
223
- /**
224
- * One phrase in one language, for a capability that speaks a fixed line on the voice channel.
225
- * Which entry is spoken is decided by the call's current language — the one the call resolved
226
- * to at connect, or the one automatic detection switched to — matched on `language`
227
- * CASE-INSENSITIVELY, the same rule `VoiceBotSpokenPhrase` states for the legacy stack, so a
228
- * code written in either case reaches the same entry on either. Blank `text` means the agent
229
- * says nothing in that language; it does NOT fall back to the language-agnostic member beside
230
- * the list, which would speak one language's text in another language's voice.
231
- * @public
232
- */
233
- export interface AgentSpokenPhrase {
234
- /**
235
- * BCP-47 language tag, optionally with a region subtag: 'en', 'en-US', 'pt-BR'. Deliberately a
236
- * constrained string rather than an enum: the offerable set is a property of the selected
237
- * recogniser and changes with it, so an enumeration here would cap the set at whatever was known
238
- * when the model was released.
239
- * @public
240
- */
241
- language: string;
242
- text: string;
243
- }
244
325
  /**
245
326
  * @public
246
327
  */
247
328
  export interface VoiceTerminateHangupAction {
248
329
  /**
249
- * Message played before hanging up. Played in every language of the call while `messages` is absent or empty; not consulted once `messages` carries any entry.
330
+ * Message played before hanging up.
250
331
  * @public
251
332
  */
252
333
  message?: string | undefined;
253
- /**
254
- * Per-language messages played before hanging up. Same rule as `AgentTool.startMessages`: the entry for the call's current language is played, a language with no entry is silent, and with no effective speech configuration `message` is played.
255
- * @public
256
- */
257
- messages?: AgentSpokenPhrase[] | undefined;
258
334
  }
259
335
  /**
260
336
  * @public
@@ -521,6 +597,10 @@ export interface AgentChannels {
521
597
  */
522
598
  voice?: VoiceChannelSettings | undefined;
523
599
  chat?: ChatChannelSettings | undefined;
600
+ /**
601
+ * Assistant channel settings. Presence enables the in-app assistant surface; audio remains unavailable unless its separate settings are present and enabled.
602
+ * @public
603
+ */
524
604
  assistant?: AssistantChannelSettings | undefined;
525
605
  }
526
606
  /**
@@ -841,15 +921,10 @@ export interface AgentConnectorCapability {
841
921
  */
842
922
  id: string;
843
923
  /**
844
- * Message spoken when a connector action call starts. Honoured on the voice channel. Mirrors `AgentTool.startMessage`. Not applied to the read-only `help` action. Not consulted once `startMessages` carries any entry.
924
+ * Message spoken when a connector action call starts. Honoured on the voice channel. Mirrors `AgentTool.startMessage`. Not applied to the read-only `help` action.
845
925
  * @public
846
926
  */
847
927
  startMessage?: string | undefined;
848
- /**
849
- * Forward-compatible per-language connector start messages, mirroring `AgentTool.startMessages`. Accepted and stored so clients can configure connector and tool phrases consistently, but currently ignored at execution time because the voice runtime does not read connector start messages yet. Runtime enablement is tracked in wilma-services docs/todo.md item 8.
850
- * @public
851
- */
852
- startMessages?: AgentSpokenPhrase[] | undefined;
853
928
  /**
854
929
  * How the model waits for a connector action and whether it synthesizes a reply from the result. The `help` action carries no pipeline.
855
930
  * @public
@@ -1221,19 +1296,10 @@ export interface AgentTool {
1221
1296
  */
1222
1297
  fields?: AgentToolField[] | undefined;
1223
1298
  /**
1224
- * Message spoken when the tool call starts. Honoured on the voice channel. Spoken in every language of the call while `startMessages` is absent or empty; not consulted once `startMessages` carries any entry.
1299
+ * Message spoken when the tool call starts. Honoured on the voice channel.
1225
1300
  * @public
1226
1301
  */
1227
1302
  startMessage?: string | undefined;
1228
- /**
1229
- * Per-language start messages. When present and non-empty, the entry for the call's current
1230
- * language is spoken and `startMessage` is not consulted; a language with no entry is silent.
1231
- * When absent or empty, `startMessage` is spoken as before. On a call with no effective speech
1232
- * configuration — no configured languages, or a PBX below protocol 2 — `startMessage` is spoken
1233
- * regardless, because there is no current language to choose by.
1234
- * @public
1235
- */
1236
- startMessages?: AgentSpokenPhrase[] | undefined;
1237
1303
  /**
1238
1304
  * How the model waits for the tool and whether it synthesizes a reply from the result.
1239
1305
  * @public
@@ -1316,15 +1382,10 @@ export interface AgentWaitCapability {
1316
1382
  */
1317
1383
  description?: string | undefined;
1318
1384
  /**
1319
- * Message spoken when entering the wait state. Spoken in every language of the call while `messages` is absent or empty; not consulted once `messages` carries any entry.
1385
+ * Message spoken when entering the wait state.
1320
1386
  * @public
1321
1387
  */
1322
1388
  message?: string | undefined;
1323
- /**
1324
- * Per-language wait messages. Same rule as `AgentTool.startMessages`: the entry for the call's current language is spoken, a language with no entry is silent, and with no effective speech configuration `message` is spoken.
1325
- * @public
1326
- */
1327
- messages?: AgentSpokenPhrase[] | undefined;
1328
1389
  /**
1329
1390
  * Channels this capability is offered on. Absent or empty — the default — means every channel the agent serves
1330
1391
  * that can honour it. Listing channels narrows that set and never widens it: a `transfer` listed for `chat` is
@@ -39,7 +39,6 @@ export declare var AgentInfo$: StaticStructureSchema;
39
39
  export declare var AgentKnowledgeBase$: StaticStructureSchema;
40
40
  export declare var AgentSettings$: StaticStructureSchema;
41
41
  export declare var AgentSnapshotSandboxOptions$: StaticStructureSchema;
42
- export declare var AgentSpokenPhrase$: StaticStructureSchema;
43
42
  export declare var AgentSqsEngine$: StaticStructureSchema;
44
43
  export declare var AgentSuggestionsCapability$: StaticStructureSchema;
45
44
  export declare var AgentTool$: StaticStructureSchema;
@@ -96,8 +95,12 @@ export declare var AgentWorkflowStep$: StaticStructureSchema;
96
95
  export declare var AgentWorkflowStepPosition$: StaticStructureSchema;
97
96
  export declare var AgentWorkflowTransition$: StaticStructureSchema;
98
97
  export declare var AgentWorkflowVariablesHandler$: StaticStructureSchema;
98
+ export declare var AssistantAudioSettings$: StaticStructureSchema;
99
99
  export declare var AssistantChannelSettings$: StaticStructureSchema;
100
+ export declare var AssistantLanguage$: StaticStructureSchema;
100
101
  export declare var AssistantQuickCommand$: StaticStructureSchema;
102
+ export declare var AssistantSpeechSettings$: StaticStructureSchema;
103
+ export declare var AssistantTranscriptionSettings$: StaticStructureSchema;
101
104
  export declare var AssistantUiSettings$: StaticStructureSchema;
102
105
  export declare var AssistantWelcomeSettings$: StaticStructureSchema;
103
106
  export declare var ChatChannelSettings$: StaticStructureSchema;
package/package.json CHANGED
@@ -1,59 +1,59 @@
1
1
  {
2
- "name": "@wildix/wilma-agents-client",
3
- "description": "@wildix/wilma-agents-client client",
4
- "version": "1.0.41",
5
- "scripts": {
6
- "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
- "build:cjs": "tsc -p tsconfig.cjs.json",
8
- "build:es": "tsc -p tsconfig.es.json",
9
- "build:types": "tsc -p tsconfig.types.json",
10
- "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
11
- "clean": "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
12
- "prepack": "yarn run clean && yarn run build",
13
- "postpublish": "node ../../scripts/postpublish.js"
14
- },
15
- "main": "./dist-cjs/index.js",
16
- "types": "./dist-types/index.d.ts",
17
- "module": "./dist-es/index.js",
18
- "sideEffects": false,
19
- "dependencies": {
20
- "tslib": "^2.6.2",
21
- "@aws-crypto/sha256-browser": "5.2.0",
22
- "@aws-crypto/sha256-js": "5.2.0",
23
- "@aws-sdk/core": "^3.974.15",
24
- "@smithy/core": "^3.24.5",
25
- "@smithy/fetch-http-handler": "^5.4.5",
26
- "@smithy/node-http-handler": "^4.7.5",
27
- "@smithy/types": "^4.14.2",
28
- "@wildix/smithy-react-native": "^1.0.0"
29
- },
30
- "devDependencies": {
31
- "@tsconfig/node20": "20.1.8",
32
- "concurrently": "7.0.0",
33
- "downlevel-dts": "0.10.1",
34
- "premove": "4.0.0",
35
- "typescript": "~5.8.3",
36
- "@types/node": "^20.14.8"
37
- },
38
- "engines": {
39
- "node": ">=20.0.0"
40
- },
41
- "typesVersions": {
42
- "<4.5": {
43
- "dist-types/*": [
44
- "dist-types/ts3.4/*"
45
- ]
46
- }
47
- },
48
- "files": [
49
- "dist-*/**"
50
- ],
51
- "license": "Apache-2.0",
52
- "react-native": {
53
- "@aws-sdk/core/client": "@aws-sdk/core/dist-es/submodules/client/index.native.js",
54
- "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
55
- },
56
- "browser": {
57
- "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
2
+ "name": "@wildix/wilma-agents-client",
3
+ "description": "@wildix/wilma-agents-client client",
4
+ "version": "1.0.43",
5
+ "scripts": {
6
+ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
+ "build:cjs": "tsc -p tsconfig.cjs.json",
8
+ "build:es": "tsc -p tsconfig.es.json",
9
+ "build:types": "tsc -p tsconfig.types.json",
10
+ "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
11
+ "clean": "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
12
+ "prepack": "yarn run clean && yarn run build",
13
+ "postpublish": "node ../../scripts/postpublish.js"
14
+ },
15
+ "main": "./dist-cjs/index.js",
16
+ "types": "./dist-types/index.d.ts",
17
+ "module": "./dist-es/index.js",
18
+ "sideEffects": false,
19
+ "dependencies": {
20
+ "tslib": "^2.6.2",
21
+ "@aws-crypto/sha256-browser": "5.2.0",
22
+ "@aws-crypto/sha256-js": "5.2.0",
23
+ "@aws-sdk/core": "^3.974.15",
24
+ "@smithy/core": "^3.24.5",
25
+ "@smithy/fetch-http-handler": "^5.4.5",
26
+ "@smithy/node-http-handler": "^4.7.5",
27
+ "@smithy/types": "^4.14.2",
28
+ "@wildix/smithy-react-native": "^1.0.0"
29
+ },
30
+ "devDependencies": {
31
+ "@tsconfig/node20": "20.1.8",
32
+ "concurrently": "7.0.0",
33
+ "downlevel-dts": "0.10.1",
34
+ "premove": "4.0.0",
35
+ "typescript": "~5.8.3",
36
+ "@types/node": "^20.14.8"
37
+ },
38
+ "engines": {
39
+ "node": ">=20.0.0"
40
+ },
41
+ "typesVersions": {
42
+ "<4.5": {
43
+ "dist-types/*": [
44
+ "dist-types/ts3.4/*"
45
+ ]
58
46
  }
47
+ },
48
+ "files": [
49
+ "dist-*/**"
50
+ ],
51
+ "license": "Apache-2.0",
52
+ "react-native": {
53
+ "@aws-sdk/core/client": "@aws-sdk/core/dist-es/submodules/client/index.native.js",
54
+ "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
55
+ },
56
+ "browser": {
57
+ "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
58
+ }
59
59
  }