@wildix/wilma-agents-client 1.0.34 → 1.0.37

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.
@@ -1,5 +1,5 @@
1
1
  import type { DocumentType as __DocumentType } from "@smithy/types";
2
- import type { ActorType, AgentGuardrailErrorMode, AgentGuardrailMode, AgentGuardrailPreset, AgentGuardrailSensitivity, AgentGuardrailWindow, AgentHandoverPipelineType, AgentHandoverVariant, AgentHangupPipelineType, AgentStatus, AgentToolPipelineType, AgentTransferPipelineType, AgentTransferVariant, AgentVariableType, AgentVisibility, AgentWorkflowEntryBehavior, AgentWorkflowFailureKind, AgentWorkflowLayout, AgentWorkflowMessageButtonVariant, ChannelType, SandboxNetworkAccess, SandboxSize, WebSearchContextSize } from "./enums";
2
+ import type { ActorType, AgentGuardrailErrorMode, AgentGuardrailMode, AgentGuardrailPreset, AgentGuardrailSensitivity, AgentGuardrailWindow, AgentHandoverPipelineType, AgentHandoverVariant, AgentHangupPipelineType, AgentStatus, AgentToolPipelineType, AgentTransferPipelineType, AgentTransferVariant, AgentVariableType, AgentVisibility, AgentWorkflowEntryBehavior, AgentWorkflowFailureKind, AgentWorkflowLayout, AgentWorkflowMessageButtonVariant, ChannelType, SandboxNetworkAccess, SandboxSize, VoicePronunciationEncoding, WebSearchContextSize } from "./enums";
3
3
  /**
4
4
  * A user or group that access is granted to.
5
5
  * @public
@@ -140,6 +140,29 @@ export interface ChatChannelSettings {
140
140
  */
141
141
  discoverable?: boolean | undefined;
142
142
  }
143
+ /**
144
+ * Ambient background audio played under the call.
145
+ *
146
+ * A SETTINGS OBJECT like `interruptions` and `endCall`, rather than a loose name on the channel:
147
+ * it is one switchable call behaviour, it reads the same way as its siblings, and the volume and
148
+ * fade controls the console will want next have somewhere to go.
149
+ *
150
+ * ABSENT MEANS OFF — a bot that never touches it behaves exactly as every call did before this
151
+ * setting existed, and the PBX needs no new case.
152
+ * @public
153
+ */
154
+ export interface VoiceBackgroundSoundSettings {
155
+ /**
156
+ * Whether ambient background audio plays under the call.
157
+ * @public
158
+ */
159
+ enabled: boolean;
160
+ /**
161
+ * Music-on-hold class the PBX plays. Absent with `enabled` true leaves the choice of class to the PBX.
162
+ * @public
163
+ */
164
+ sound?: string | undefined;
165
+ }
143
166
  /**
144
167
  * Caller context injected into the model prompt.
145
168
  * @public
@@ -282,6 +305,150 @@ export interface VoiceSilenceTimeoutSettings {
282
305
  seconds: number;
283
306
  action: VoiceTerminateAction;
284
307
  }
308
+ /**
309
+ * A pronunciation rule for one phrase. Belongs to a LANGUAGE, not to the agent: 'Wildix' is
310
+ * respelled differently for an Italian and a German voice, so one list shared ACROSS languages
311
+ * would fight itself. That is why the rules hang off the language and nowhere else — there is no
312
+ * company-wide dictionary above them to inherit from, or to disagree with.
313
+ * @public
314
+ */
315
+ export interface VoicePronunciation {
316
+ /**
317
+ * The phrase as it appears in the text, e.g. 'Wildix'. Bounded because every rule is compiled into ONE regular expression — see the list below.
318
+ * @public
319
+ */
320
+ phrase: string;
321
+ /**
322
+ * Respelling (ALIAS) or phonetic transcription (IPA), e.g. 'Wil-dix'.
323
+ * @public
324
+ */
325
+ as: string;
326
+ /**
327
+ * Defaults to ALIAS.
328
+ * @public
329
+ */
330
+ encoding?: VoicePronunciationEncoding | undefined;
331
+ }
332
+ /**
333
+ * One configured language: its voice, its initial phrase and its pronunciation rules.
334
+ * @public
335
+ */
336
+ export interface VoiceLanguage {
337
+ /**
338
+ * BCP-47 code with locale, e.g. 'en-US', 'it-IT'.
339
+ * @public
340
+ */
341
+ code: string;
342
+ /**
343
+ * Voice this language speaks with, as a URI — provider, voice id, synthesis parameters and,
344
+ * where the company uses its own provider account, an `apiKey=secrets:\{secretId\}` reference.
345
+ * See VoiceUri.
346
+ *
347
+ * PER LANGUAGE, and that is the whole reason the member is here rather than on the settings
348
+ * above: provider quality is not uniform across languages, a voice id belongs to exactly one
349
+ * provider, and a bot-wide provider made changing it invalidate every configured voice at
350
+ * once.
351
+ * @public
352
+ */
353
+ voice: string;
354
+ /**
355
+ * Initial phrase spoken when the call starts in this language. Absent or empty means
356
+ * the agent says nothing and waits — it does NOT fall back to VoiceChannelSettings.greeting,
357
+ * which would speak one language's text in another language's voice.
358
+ * @public
359
+ */
360
+ greeting?: string | undefined;
361
+ /**
362
+ * Marks the language a caller hears when their own matches nothing configured.
363
+ *
364
+ * THE FULL RESOLUTION ORDER, since a client author reading only this contract cannot
365
+ * otherwise find it: an exact match on the call's language, then a match on its primary
366
+ * subtag (`fr` finds `fr-FR`), then the language marked here, then a language whose
367
+ * primary subtag is `en`, then the first entry in the list.
368
+ *
369
+ * Marked is consulted BEFORE the English step, so a record with none marked resolves
370
+ * exactly as it did before this member existed. English is deliberate rather than
371
+ * arbitrary — it is the language a caller the agent was not built for is likeliest to
372
+ * understand — and the last step exists only to keep the rule total, which is why list
373
+ * order should not be treated as configuration.
374
+ *
375
+ * At most one language may carry it. A record with two — reachable through the API or
376
+ * the CLI, where no form prevents it — resolves to the first marked one in list order,
377
+ * because refusing a call over configuration drift is worse than serving it and saying
378
+ * so in the trace.
379
+ * @public
380
+ */
381
+ isDefault?: boolean | undefined;
382
+ /**
383
+ * The rules this language is spoken with. THE WHOLE SET rather than an override layer: an
384
+ * agent's respellings are stored here and read from here, so what this list says is what the
385
+ * caller hears.
386
+ *
387
+ * THERE IS NOTHING ABOVE IT. An earlier draft of this contract carried a company-wide
388
+ * dictionary per language that every agent speaking it inherited, with a merge order over this
389
+ * member and an identity rule ('Wildix' -> 'Wildix') for declining an inherited respelling.
390
+ * It bought correcting a handful of names in one place, and cost a second store, a merge on
391
+ * every synthesis path, a screen of its own, and a reader who could not tell from an agent
392
+ * what that agent would actually say. Per language per agent is where the divergence that
393
+ * matters already lives.
394
+ * @public
395
+ */
396
+ pronunciations?: VoicePronunciation[] | undefined;
397
+ }
398
+ /**
399
+ * Speech-to-text configuration: which recogniser listens to the caller, and whether it identifies the language while it does.
400
+ * @public
401
+ */
402
+ export interface VoiceTranscriptionSettings {
403
+ /**
404
+ * Recogniser to transcribe the caller with. Absent resolves to the platform default ('aws://transcribe' today), resolved by the server so exactly one component decides it.
405
+ * @public
406
+ */
407
+ engine?: string | undefined;
408
+ /**
409
+ * Identify the caller's language per utterance and switch voice and reply language mid-call.
410
+ *
411
+ * HERE RATHER THAN ON `VoiceSpeechSettings`, because identifying a language is something the
412
+ * RECOGNISER does: it becomes identify-multiple-languages plus language-options on the
413
+ * recognition stream, and nothing about synthesis reads it.
414
+ *
415
+ * Requires at least two configured languages and a recogniser that can identify them; the
416
+ * server clamps it to false otherwise, because forwarding true with a single candidate makes
417
+ * Amazon reject the stream outright.
418
+ * @public
419
+ */
420
+ autoDetect?: boolean | undefined;
421
+ }
422
+ /**
423
+ * Speech configuration for the voice channel. When present it WINS over the dialplan's `voice` and
424
+ * `initialMessage` connect parameters; `language` is the single exception, because it is the
425
+ * channel's own input signal and the feature has no starting point without it.
426
+ * @public
427
+ */
428
+ export interface VoiceSpeechSettings {
429
+ /**
430
+ * Configured languages. The @length bound is a STORAGE ceiling, not the product rule: the real
431
+ * cap is the recogniser's own candidate limit (five for Amazon Transcribe), enforced in the
432
+ * service so a recogniser with a different limit needs no model change.
433
+ * @public
434
+ */
435
+ languages: VoiceLanguage[];
436
+ /**
437
+ * Speak the first message of every configured language in turn when the call is answered, each
438
+ * in the voice, provider account and pronunciation rules of its own language, instead of only the
439
+ * language the call resolved to. Languages whose first message is empty, and languages the PBX
440
+ * synthesizes itself, are skipped. Absent means off. Requires at least two languages carrying a
441
+ * first message; below that the runtime speaks only the resolved language's phrase, and the
442
+ * console clamps the member on save.
443
+ * @public
444
+ */
445
+ greetEveryLanguage?: boolean | undefined;
446
+ /**
447
+ * Which recogniser listens to the caller, and whether it identifies the language. Absent takes the platform default recogniser with no language identification.
448
+ * @public
449
+ */
450
+ transcription?: VoiceTranscriptionSettings | undefined;
451
+ }
285
452
  /**
286
453
  * Voice channel settings. Note: a voice agent's AgentAccess.grants are ignored — inbound calls are routed by the PBX dialplan and data ACL is the agent-level `settings.pbxGroupId`, not per-user grants.
287
454
  * @public
@@ -292,6 +459,21 @@ export interface VoiceChannelSettings {
292
459
  * @public
293
460
  */
294
461
  greeting?: string | undefined;
462
+ /**
463
+ * Ambient background audio played under the call.
464
+ *
465
+ * It belongs to the CHANNEL rather than to `speech`, even though the console shows the control
466
+ * under the automatic-language switch. `speech` is the recognition and synthesis
467
+ * configuration and is sent only when languages are configured — background audio has nothing
468
+ * to do with either, and a bot with no languages must still be able to have it.
469
+ * @public
470
+ */
471
+ backgroundSound?: VoiceBackgroundSoundSettings | undefined;
472
+ /**
473
+ * Languages, voices, initial phrases, recogniser and pronunciation. Absent means the legacy behavior: voice URI from the dialplan connect parameter, one voice, language as prompt context only.
474
+ * @public
475
+ */
476
+ speech?: VoiceSpeechSettings | undefined;
295
477
  interruptions?: VoiceInterruptionSettings | undefined;
296
478
  silenceTimeout?: VoiceSilenceTimeoutSettings | undefined;
297
479
  maxDuration?: VoiceMaxDurationSettings | undefined;
@@ -303,7 +485,7 @@ export interface VoiceChannelSettings {
303
485
  callerMetadata?: VoiceCallerMetadataSettings | undefined;
304
486
  }
305
487
  /**
306
- * The channels an agent serves and their channel-specific settings. Presence of a member enables that channel; at least one must be set. Enabled channels are mirrored as ChannelType values on AgentInfo.
488
+ * The channels an agent serves and their channel-specific settings. Presence of a member enables that channel. Empty means the agent serves no channel: it is not reachable on its own and runs only as an automation's task or when another agent calls it. Enabled channels are mirrored as ChannelType values on AgentInfo.
307
489
  * @public
308
490
  */
309
491
  export interface AgentChannels {
@@ -1724,6 +1906,11 @@ export interface AgentGuardrailInput {
1724
1906
  * @public
1725
1907
  */
1726
1908
  model?: string | undefined;
1909
+ /**
1910
+ * Action for checks that declare none. Defaults to a block.
1911
+ * @public
1912
+ */
1913
+ action?: AgentGuardrailAction | undefined;
1727
1914
  /**
1728
1915
  * Runs the checker before the agent's model (BLOCKING) or alongside it (PARALLEL). Blocking costs the checker's latency on every turn but guarantees that a refused turn spent no tokens and fired no tool; parallel adds no latency and is the right trade on voice, where the delay is audible, at the risk that part of a reply reaches the caller and that a tool has already run before the cancellation lands. Defaults to BLOCKING.
1729
1916
  * @public
@@ -3013,7 +3200,7 @@ export interface Agent {
3013
3200
  */
3014
3201
  picture?: string | undefined;
3015
3202
  /**
3016
- * The channels this agent serves and their channel-specific settings. A channel is enabled when its member is present; at least one must be set. An agent may serve multiple channels (e.g. chat + assistant) over the shared engine.
3203
+ * The channels this agent serves and their channel-specific settings. A channel is enabled when its member is present. An agent may serve multiple channels (e.g. chat + assistant) over the shared engine, or none at all — an empty structure is an agent that is only run as an automation's task or called by another agent, and is not reachable on any delivery surface.
3017
3204
  * @public
3018
3205
  */
3019
3206
  channels: AgentChannels;
@@ -3129,7 +3316,7 @@ export interface AgentDefinitionSnapshot {
3129
3316
  */
3130
3317
  picture?: string | undefined;
3131
3318
  /**
3132
- * The channels this agent serves and their channel-specific settings. A channel is enabled when its member is present; at least one must be set. An agent may serve multiple channels (e.g. chat + assistant) over the shared engine.
3319
+ * The channels this agent serves and their channel-specific settings. A channel is enabled when its member is present. An agent may serve multiple channels (e.g. chat + assistant) over the shared engine, or none at all — an empty structure is an agent that is only run as an automation's task or called by another agent, and is not reachable on any delivery surface.
3133
3320
  * @public
3134
3321
  */
3135
3322
  channels: AgentChannels;
@@ -3170,10 +3357,15 @@ export interface AgentInfo {
3170
3357
  category?: string | undefined;
3171
3358
  status: AgentStatus;
3172
3359
  /**
3173
- * The channels this agent serves (voice / chat / assistant).
3360
+ * The channels this agent serves (voice / chat / assistant). Empty for an agent that serves none — one only an automation runs or another agent calls.
3174
3361
  * @public
3175
3362
  */
3176
3363
  channels: ChannelType[];
3364
+ /**
3365
+ * Whether the voice channel has at least one configured speech language. A dialplan form partitions its application lists on this, so the answer has to travel with the list rather than cost one lookup per entry — it is the reason this member exists and the reason removing it broke that form. Absent is read as false.
3366
+ * @public
3367
+ */
3368
+ speechConfigured?: boolean | undefined;
3177
3369
  /**
3178
3370
  * Ids of the skills attached to this agent. Always active in this agent's sessions; user skill preferences cannot disable them.
3179
3371
  * @public
@@ -3335,7 +3527,7 @@ export interface CreateAgentInput {
3335
3527
  */
3336
3528
  picture?: string | undefined;
3337
3529
  /**
3338
- * The channels this agent serves and their channel-specific settings. A channel is enabled when its member is present; at least one must be set. An agent may serve multiple channels (e.g. chat + assistant) over the shared engine.
3530
+ * The channels this agent serves and their channel-specific settings. A channel is enabled when its member is present. An agent may serve multiple channels (e.g. chat + assistant) over the shared engine, or none at all — an empty structure is an agent that is only run as an automation's task or called by another agent, and is not reachable on any delivery surface.
3339
3531
  * @public
3340
3532
  */
3341
3533
  channels: AgentChannels;
@@ -3490,7 +3682,7 @@ export interface ListAgentApiKeysOutput {
3490
3682
  export interface ListAgentsInput {
3491
3683
  company?: string | undefined;
3492
3684
  /**
3493
- * Only agents that have this channel enabled (voice / chat / assistant).
3685
+ * Only agents that have this channel enabled (voice / chat / assistant). An agent serving no channel matches no value of this filter, so a caller listing agents to run as a task — rather than to reach on a surface — must leave it unset.
3494
3686
  * @public
3495
3687
  */
3496
3688
  channel?: ChannelType | undefined;
@@ -3671,7 +3863,7 @@ export interface UpdateAgentInput {
3671
3863
  */
3672
3864
  picture?: string | undefined;
3673
3865
  /**
3674
- * The channels this agent serves and their channel-specific settings. A channel is enabled when its member is present; at least one must be set. An agent may serve multiple channels (e.g. chat + assistant) over the shared engine.
3866
+ * The channels this agent serves and their channel-specific settings. A channel is enabled when its member is present. An agent may serve multiple channels (e.g. chat + assistant) over the shared engine, or none at all — an empty structure is an agent that is only run as an automation's task or called by another agent, and is not reachable on any delivery surface.
3675
3867
  * @public
3676
3868
  */
3677
3869
  channels: AgentChannels;
@@ -134,13 +134,18 @@ export declare var RestoreAgentVersionToDraftInput$: StaticStructureSchema;
134
134
  export declare var RestoreAgentVersionToDraftOutput$: StaticStructureSchema;
135
135
  export declare var UpdateAgentInput$: StaticStructureSchema;
136
136
  export declare var UpdateAgentOutput$: StaticStructureSchema;
137
+ export declare var VoiceBackgroundSoundSettings$: StaticStructureSchema;
137
138
  export declare var VoiceCallerMetadataSettings$: StaticStructureSchema;
138
139
  export declare var VoiceChannelSettings$: StaticStructureSchema;
139
140
  export declare var VoiceEndCallSettings$: StaticStructureSchema;
140
141
  export declare var VoiceInterruptionSettings$: StaticStructureSchema;
142
+ export declare var VoiceLanguage$: StaticStructureSchema;
141
143
  export declare var VoiceMaxDurationSettings$: StaticStructureSchema;
144
+ export declare var VoicePronunciation$: StaticStructureSchema;
142
145
  export declare var VoiceSilenceTimeoutSettings$: StaticStructureSchema;
146
+ export declare var VoiceSpeechSettings$: StaticStructureSchema;
143
147
  export declare var VoiceTerminateHangupAction$: StaticStructureSchema;
148
+ export declare var VoiceTranscriptionSettings$: StaticStructureSchema;
144
149
  export declare var VoiceTransferTarget$: StaticStructureSchema;
145
150
  export declare var WebSearchUserLocation$: StaticStructureSchema;
146
151
  export declare var Actor$: StaticStructureSchema;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wildix/wilma-agents-client",
3
3
  "description": "@wildix/wilma-agents-client client",
4
- "version": "1.0.34",
4
+ "version": "1.0.37",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",