@wildix/wilma-agents-client 1.0.24 → 1.0.26

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.
Files changed (32) hide show
  1. package/dist-cjs/WilmaAgents.js +0 -6
  2. package/dist-cjs/commands/index.js +0 -3
  3. package/dist-cjs/models/enums.js +25 -13
  4. package/dist-cjs/schemas/schemas_0.js +277 -144
  5. package/dist-es/WilmaAgents.js +0 -6
  6. package/dist-es/commands/index.js +0 -3
  7. package/dist-es/models/enums.js +24 -12
  8. package/dist-es/schemas/schemas_0.js +274 -142
  9. package/dist-types/WilmaAgents.d.ts +0 -22
  10. package/dist-types/WilmaAgentsClient.d.ts +2 -5
  11. package/dist-types/commands/CreateAgentCommand.d.ts +1222 -568
  12. package/dist-types/commands/GetAgentCommand.d.ts +611 -284
  13. package/dist-types/commands/GetAgentVersionCommand.d.ts +611 -284
  14. package/dist-types/commands/ListAgentsCommand.d.ts +611 -284
  15. package/dist-types/commands/ListAgentsNamesCommand.d.ts +0 -1
  16. package/dist-types/commands/PublishAgentVersionCommand.d.ts +611 -284
  17. package/dist-types/commands/RestoreAgentVersionToDraftCommand.d.ts +611 -284
  18. package/dist-types/commands/UpdateAgentCommand.d.ts +1222 -568
  19. package/dist-types/commands/index.d.ts +0 -3
  20. package/dist-types/models/enums.d.ts +89 -42
  21. package/dist-types/models/models_0.d.ts +1146 -457
  22. package/dist-types/schemas/schemas_0.d.ts +34 -15
  23. package/package.json +1 -1
  24. package/dist-cjs/commands/DeletePronunciationDictionaryCommand.js +0 -20
  25. package/dist-cjs/commands/ListPronunciationDictionariesCommand.js +0 -20
  26. package/dist-cjs/commands/PutPronunciationDictionaryCommand.js +0 -20
  27. package/dist-es/commands/DeletePronunciationDictionaryCommand.js +0 -16
  28. package/dist-es/commands/ListPronunciationDictionariesCommand.js +0 -16
  29. package/dist-es/commands/PutPronunciationDictionaryCommand.js +0 -16
  30. package/dist-types/commands/DeletePronunciationDictionaryCommand.d.ts +0 -78
  31. package/dist-types/commands/ListPronunciationDictionariesCommand.d.ts +0 -96
  32. package/dist-types/commands/PutPronunciationDictionaryCommand.d.ts +0 -108
@@ -1,5 +1,5 @@
1
1
  import type { DocumentType as __DocumentType } from "@smithy/types";
2
- import type { ActorType, AgentHandoverPipelineType, AgentHandoverVariant, AgentHangupPipelineType, AgentStatus, AgentToolPipelineType, AgentTransferPipelineType, AgentTransferVariant, AgentVariableType, AgentVisibility, ChannelType, SandboxNetworkAccess, SandboxSize, VoicePronunciationEncoding, VoiceSpeechProvider, VoiceTranscriptionVendor, WebSearchContextSize } from "./enums";
2
+ import type { ActorType, AgentHandoverPipelineType, AgentHandoverVariant, AgentHangupPipelineType, AgentStatus, AgentToolPipelineType, AgentTransferPipelineType, AgentTransferVariant, AgentVariableType, AgentVisibility, AgentWorkflowEntryBehavior, AgentWorkflowFailureKind, AgentWorkflowLayout, AgentWorkflowMessageButtonVariant, ChannelType, SandboxNetworkAccess, SandboxSize, WebSearchContextSize } from "./enums";
3
3
  /**
4
4
  * A user or group that access is granted to.
5
5
  * @public
@@ -218,255 +218,6 @@ export interface VoiceSilenceTimeoutSettings {
218
218
  seconds: number;
219
219
  action: VoiceTerminateAction;
220
220
  }
221
- /**
222
- * A reference to a stored secret, held by other services in place of the value.
223
- * Resolved server-to-server via GetSecretValue at execution time — always to the current value.
224
- * @public
225
- */
226
- export interface SecretRef {
227
- /**
228
- * Unique identifier of a secret.
229
- * @public
230
- */
231
- id: string;
232
- }
233
- /**
234
- * A pronunciation rule for one phrase. Belongs to a LANGUAGE, not to the agent: 'Wildix' is
235
- * respelled differently for an Italian and a German voice. A dictionary shared ACROSS languages
236
- * would fight itself, which is why the company dictionary is keyed by language too — see
237
- * PronunciationDictionary.
238
- * @public
239
- */
240
- export interface VoicePronunciation {
241
- /**
242
- * 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.
243
- * @public
244
- */
245
- phrase: string;
246
- /**
247
- * Respelling (ALIAS) or phonetic transcription (IPA), e.g. 'Wil-dix'.
248
- * @public
249
- */
250
- as: string;
251
- /**
252
- * Defaults to ALIAS.
253
- * @public
254
- */
255
- encoding?: VoicePronunciationEncoding | undefined;
256
- }
257
- /**
258
- * Synthesis options, used at two levels: as provider-level defaults on VoiceSpeechSettings and as
259
- * per-language overrides on VoiceLanguage. Absent means inherit; there is no way to express
260
- * 'explicitly the same as the parent', which is the intended simplification — the merged result is
261
- * identical either way. Which members apply is a property of the provider AND the model (Chirp 3:
262
- * HD documents only speakingRate; eleven_v3 carries no stability, similarity or speaker boost), so
263
- * the console renders them from a catalog rather than unconditionally.
264
- * @public
265
- */
266
- export interface VoiceSynthesisOptions {
267
- /**
268
- * Provider model id, e.g. 'eleven_flash_v2_5'.
269
- * @public
270
- */
271
- model?: string | undefined;
272
- /**
273
- * Speaking rate. ElevenLabs 0.7-1.2 (default 1.0); Google 0.25-2.0 (default 1.0).
274
- * @public
275
- */
276
- speed?: number | undefined;
277
- /**
278
- * ElevenLabs stability, 0-1 (default 0.5). Our clamp, not a vendor-stated bound.
279
- * @public
280
- */
281
- stability?: number | undefined;
282
- /**
283
- * ElevenLabs similarity boost, 0-1 (default 0.75). Our clamp.
284
- * @public
285
- */
286
- similarity?: number | undefined;
287
- /**
288
- * ElevenLabs style exaggeration, 0-1 (default 0). Our clamp.
289
- * @public
290
- */
291
- style?: number | undefined;
292
- /**
293
- * ElevenLabs speaker boost (default true).
294
- * @public
295
- */
296
- speakerBoost?: boolean | undefined;
297
- /**
298
- * Google pitch in semitones, -20 to 20. Not offered for Chirp 3: HD voices.
299
- * @public
300
- */
301
- pitch?: number | undefined;
302
- /**
303
- * Google volume gain in dB, -96 to 16 (default 0); the vendor recommends staying under +10. Not offered for Chirp 3: HD voices.
304
- * @public
305
- */
306
- volumeGain?: number | undefined;
307
- }
308
- /**
309
- * One configured language: its voice, its initial phrase and its overrides.
310
- * @public
311
- */
312
- export interface VoiceLanguage {
313
- /**
314
- * BCP-47 code with locale, e.g. 'en-US', 'it-IT'.
315
- * @public
316
- */
317
- code: string;
318
- /**
319
- * Text-to-speech provider for THIS language. Absent falls back to
320
- * VoiceSpeechSettings.provider, which is what records written before this member
321
- * existed rely on. The console writes it on every language it creates.
322
- *
323
- * Per language rather than per bot because provider quality is not uniform across
324
- * languages, and because a single bot-wide provider made changing it invalidate
325
- * every configured voice at once: a voice id belongs to one provider, so switching
326
- * the bot meant reselecting a speaker for every language.
327
- * @public
328
- */
329
- provider?: VoiceSpeechProvider | undefined;
330
- /**
331
- * Provider voice id (ElevenLabs voice_id, Google voice name, Polly Id).
332
- * A CR OR LF IS REFUSED BY THE PATTERN, and the reason is not tidiness: this value reaches the
333
- * PBX as an AMI action parameter, and AMI frames on CRLF, so a newline inside it closes the
334
- * action and starts another one on a local, already-authenticated manager connection. Whoever
335
- * configures a voice agent in the cloud needs no PBX credential, so the model is the first place
336
- * that can refuse it. `pbx-data-engine` refuses it again on the send path — two layers, because
337
- * the AMI serializer is out of tree and neither layer can promise the other's behaviour.
338
- * @public
339
- */
340
- voice: string;
341
- /**
342
- * Initial phrase spoken when the call starts in this language. Absent or empty means
343
- * the agent says nothing and waits — it does NOT fall back to VoiceChannelSettings.greeting,
344
- * which would speak one language's text in another language's voice.
345
- * @public
346
- */
347
- greeting?: string | undefined;
348
- /**
349
- * Marks the language a caller hears when their own matches nothing configured.
350
- *
351
- * THE FULL RESOLUTION ORDER, since a client author reading only this contract cannot
352
- * otherwise find it: an exact match on the call's language, then a match on its primary
353
- * subtag (`fr` finds `fr-FR`), then the language marked here, then a language whose
354
- * primary subtag is `en`, then the first entry in the list.
355
- *
356
- * Marked is consulted BEFORE the English step, so a record with none marked resolves
357
- * exactly as it did before this member existed. English is deliberate rather than
358
- * arbitrary — it is the language a caller the agent was not built for is likeliest to
359
- * understand — and the last step exists only to keep the rule total, which is why list
360
- * order should not be treated as configuration.
361
- *
362
- * At most one language may carry it. A record with two — reachable through the API or
363
- * the CLI, where no form prevents it — resolves to the first marked one in list order,
364
- * because refusing a call over configuration drift is worse than serving it and saying
365
- * so in the trace.
366
- * @public
367
- */
368
- isDefault?: boolean | undefined;
369
- /**
370
- * Extra instructions active only while the conversation runs in this language.
371
- * @public
372
- */
373
- instructions?: string | undefined;
374
- /**
375
- * Overrides VoiceSpeechSettings.synthesis member by member.
376
- * @public
377
- */
378
- synthesis?: VoiceSynthesisOptions | undefined;
379
- /**
380
- * The company's own credential for THIS language's provider (secret variant
381
- * `auth_bearer`). Absent falls back to VoiceSpeechSettings.credential, then to the
382
- * platform key.
383
- *
384
- * It lives beside the provider because a credential belongs to one: a company's
385
- * ElevenLabs key cannot serve a language synthesized by Google, and a single
386
- * bot-wide credential would have been silently inapplicable to some languages.
387
- * @public
388
- */
389
- credential?: SecretRef | undefined;
390
- /**
391
- * This agent's OWN rules for this language. A rule whose phrase also exists in the
392
- * company dictionary replaces it; a rule whose phrase does not is simply an addition —
393
- * the two are the same member because they are the same act.
394
- * @public
395
- */
396
- pronunciations?: VoicePronunciation[] | undefined;
397
- /**
398
- * Company-dictionary phrases this agent declines. See VoicePronunciationSuppressionList.
399
- * @public
400
- */
401
- pronunciationSuppressions?: string[] | undefined;
402
- }
403
- /**
404
- * Speech-to-text configuration. Vendor-specific recognition options — term hints, custom
405
- * vocabulary — land here alongside the vendors that take them; nothing writes them today.
406
- * @public
407
- */
408
- export interface VoiceTranscriptionSettings {
409
- /**
410
- * Recognition vendor. Absent resolves to the platform default (`aws` today), resolved by the server so exactly one component decides it.
411
- * @public
412
- */
413
- vendor: VoiceTranscriptionVendor;
414
- }
415
- /**
416
- * Speech configuration for the voice channel. When present it WINS over the dialplan's `voice` and
417
- * `initialMessage` connect parameters; `language` is the single exception, because it is the
418
- * channel's own input signal and the feature has no starting point without it.
419
- * @public
420
- */
421
- export interface VoiceSpeechSettings {
422
- /**
423
- * DEFAULT text-to-speech provider, used by a language that names none of its own.
424
- * Still required, so a record always answers 'which provider' — but the console now
425
- * writes `provider` on every language, so this is what pre-existing records and API
426
- * callers fall back to rather than the primary control.
427
- * @public
428
- */
429
- provider: VoiceSpeechProvider;
430
- /**
431
- * Configured languages. The @length bound is a STORAGE ceiling, not the product rule: the real
432
- * cap is the selected transcription vendor's `maxCandidates` (five for Amazon Transcribe),
433
- * enforced in the service from its catalog so a vendor with a different limit needs no model
434
- * change.
435
- * @public
436
- */
437
- languages: VoiceLanguage[];
438
- /**
439
- * Identify the caller's language automatically and switch voice and reply language mid-call. Requires at least two languages and a vendor that can identify languages; the server clamps it to false otherwise.
440
- * @public
441
- */
442
- autoDetect?: boolean | undefined;
443
- /**
444
- * Speak the first message of every configured language in turn when the call is answered, each
445
- * in the voice, provider account and pronunciation rules of its own language, instead of only the
446
- * language the call resolved to. Languages whose first message is empty, and languages the PBX
447
- * synthesizes itself, are skipped. Absent means off. Requires at least two languages carrying a
448
- * first message; below that the runtime speaks only the resolved language's phrase, and the
449
- * console clamps the member on save.
450
- * @public
451
- */
452
- greetEveryLanguage?: boolean | undefined;
453
- /**
454
- * Speech-to-text configuration. Vendor-specific recognition options — term hints, custom
455
- * vocabulary — land here alongside the vendors that take them; nothing writes them today.
456
- * @public
457
- */
458
- transcription?: VoiceTranscriptionSettings | undefined;
459
- /**
460
- * Provider-level synthesis defaults, inherited by every language.
461
- * @public
462
- */
463
- synthesis?: VoiceSynthesisOptions | undefined;
464
- /**
465
- * The company's own provider credential (secret variant `auth_bearer`). Absent means the platform key. Has no counterpart in wim-voicebots — a deliberate parity gap.
466
- * @public
467
- */
468
- credential?: SecretRef | undefined;
469
- }
470
221
  /**
471
222
  * 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.
472
223
  * @public
@@ -477,25 +228,6 @@ export interface VoiceChannelSettings {
477
228
  * @public
478
229
  */
479
230
  greeting?: string | undefined;
480
- /**
481
- * Ambient background played under the call, as a music-on-hold class name.
482
- *
483
- * ABSENT MEANS OFF. There is no value meaning 'none': the member is simply not sent, which is
484
- * exactly the state every call was in before this setting existed, so a bot that never touches
485
- * it behaves as it always did and the PBX needs no new case.
486
- *
487
- * It belongs to the CHANNEL rather than to `speech`, even though the console shows the control
488
- * under the automatic-language switch. `speech` is the recognition and synthesis
489
- * configuration and is sent only when languages are configured — background audio has nothing
490
- * to do with either, and a bot with no languages must still be able to have it.
491
- * @public
492
- */
493
- backgroundSound?: string | undefined;
494
- /**
495
- * Provider, languages, voices, initial phrases and pronunciation. Absent means the legacy behavior: voice URI from the dialplan connect parameter, one voice, language as prompt context only.
496
- * @public
497
- */
498
- speech?: VoiceSpeechSettings | undefined;
499
231
  interruptions?: VoiceInterruptionSettings | undefined;
500
232
  silenceTimeout?: VoiceSilenceTimeoutSettings | undefined;
501
233
  maxDuration?: VoiceMaxDurationSettings | undefined;
@@ -1631,107 +1363,1180 @@ export interface AgentVariable {
1631
1363
  description?: string | undefined;
1632
1364
  }
1633
1365
  /**
1634
- * Managed AI engine: the platform runs the model, tools and knowledge lookups.
1366
+ * The capability a step performs, run by the runtime rather than chosen by the model. A subset of
1367
+ * AgentCapability, reusing its structures verbatim: these are the members that describe a single action with a
1368
+ * beginning and an end. The rest of AgentCapability (`kb`, `webSearch`, `webFetch`, `sandbox`, `suggestions`)
1369
+ * describes reach the model draws on while it talks, so it belongs on a conversation step's `capabilities`
1370
+ * rather than on a step of its own.
1371
+ *
1372
+ * Configuration comes from the capability itself and nothing is added here: a tool step's fixed arguments are
1373
+ * `AgentTool.fields` predefined handlers, its spoken lead-in is `AgentTool.startMessage`, a transfer's line
1374
+ * before the hand-off is `AgentTransferPipeline.instructions`, an invoked agent's inputs are
1375
+ * `AgentCallCapability.variables`. Anything left unpinned is filled by the model at the step, per the tool's
1376
+ * input schema.
1635
1377
  * @public
1636
1378
  */
1637
- export interface AgentAiEngine {
1638
- instructions: string;
1639
- /**
1640
- * Defaults to the platform default model when omitted.
1641
- * @public
1642
- */
1643
- model?: string | undefined;
1644
- /**
1645
- * IANA timezone the agent reasons about time in: it anchors the current date and time given to the model and how times are read from and written to tool arguments and replies. Shared by every channel the agent serves. Defaults to 'UTC'.
1646
- * @public
1647
- */
1648
- timeZone?: string | undefined;
1649
- /**
1650
- * Whether the agent can produce artifacts (wilma-artifacts): documents, code files, HTML pages or diagrams it writes and shares back during a session, on any channel it serves. When an artifact is created the channel runtime shares it company-wide by link, so every signed-in colleague can open it. Artifacts are company-internal: recipients on external transports (sms / whatsapp) or outside the company cannot open the links, so keep this disabled for customer-facing agents. Defaults to false.
1651
- * @public
1652
- */
1653
- artifacts?: boolean | undefined;
1654
- /**
1655
- * Skills attached to this agent (progressive disclosure). A skill may carry its own tools, which join this agent's toolset while that skill is active.
1656
- * @public
1657
- */
1658
- skills?: AgentSkillReference[] | undefined;
1659
- capabilities?: AgentCapability[] | undefined;
1660
- variables?: AgentVariable[] | undefined;
1661
- }
1379
+ export type AgentWorkflowAction = AgentWorkflowAction.AgentMember | AgentWorkflowAction.ConnectorMember | AgentWorkflowAction.DelegationMember | AgentWorkflowAction.HandoverMember | AgentWorkflowAction.HangupMember | AgentWorkflowAction.ToolMember | AgentWorkflowAction.TransferMember | AgentWorkflowAction.WaitMember | AgentWorkflowAction.$UnknownMember;
1662
1380
  /**
1663
- * Bring-your-own backend over SQS: turns are forwarded to the queue, replies are posted back via the API.
1664
1381
  * @public
1665
1382
  */
1666
- export interface AgentSqsEngine {
1667
- url: string;
1668
- key: string;
1383
+ export declare namespace AgentWorkflowAction {
1669
1384
  /**
1670
- * Reference to the SQS secret access key in wilma-secrets.
1385
+ * Call a tool. Continues to the step's transitions when the call completes.
1671
1386
  * @public
1672
1387
  */
1673
- secret: SecretRef;
1674
- }
1675
- /**
1676
- * Bring-your-own backend over HTTPS: each turn is POSTed to the URL, the response is the reply.
1677
- * @public
1678
- */
1679
- export interface AgentWebhookEngine {
1680
- url: string;
1388
+ interface ToolMember {
1389
+ tool: AgentTool;
1390
+ connector?: never;
1391
+ agent?: never;
1392
+ handover?: never;
1393
+ delegation?: never;
1394
+ transfer?: never;
1395
+ hangup?: never;
1396
+ wait?: never;
1397
+ $unknown?: never;
1398
+ }
1681
1399
  /**
1682
- * Shared secret used to sign requests (HMAC).
1400
+ * Dispatch a connector action. Continues to the step's transitions when the action completes.
1683
1401
  * @public
1684
1402
  */
1685
- secret: string;
1686
- timeout?: number | undefined;
1687
- }
1688
- /**
1689
- * How the agent produces replies. `ai` is the managed engine; `webhook` and `sqs` delegate to an external backend.
1690
- * @public
1691
- */
1692
- export type AgentEngine = AgentEngine.AiMember | AgentEngine.SqsMember | AgentEngine.WebhookMember | AgentEngine.$UnknownMember;
1693
- /**
1694
- * @public
1695
- */
1696
- export declare namespace AgentEngine {
1403
+ interface ConnectorMember {
1404
+ tool?: never;
1405
+ connector: AgentConnectorCapability;
1406
+ agent?: never;
1407
+ handover?: never;
1408
+ delegation?: never;
1409
+ transfer?: never;
1410
+ hangup?: never;
1411
+ wait?: never;
1412
+ $unknown?: never;
1413
+ }
1697
1414
  /**
1698
- * Managed AI engine: the platform runs the model, tools and knowledge lookups.
1415
+ * Invoke another agent — typically a workflow-channel agent — as its own execution, and continue when it returns. Its result is captured by `output`.
1699
1416
  * @public
1700
1417
  */
1701
- interface AiMember {
1702
- ai: AgentAiEngine;
1703
- webhook?: never;
1704
- sqs?: never;
1418
+ interface AgentMember {
1419
+ tool?: never;
1420
+ connector?: never;
1421
+ agent: AgentCallCapability;
1422
+ handover?: never;
1423
+ delegation?: never;
1424
+ transfer?: never;
1425
+ hangup?: never;
1426
+ wait?: never;
1705
1427
  $unknown?: never;
1706
1428
  }
1707
1429
  /**
1708
- * Bring-your-own backend over HTTPS: each turn is POSTed to the URL, the response is the reply.
1430
+ * Hand the conversation to a human or another agent and leave it. Terminal: the session is no longer this workflow's.
1709
1431
  * @public
1710
1432
  */
1711
- interface WebhookMember {
1712
- ai?: never;
1713
- webhook: AgentWebhookEngine;
1714
- sqs?: never;
1433
+ interface HandoverMember {
1434
+ tool?: never;
1435
+ connector?: never;
1436
+ agent?: never;
1437
+ handover: AgentHandoverCapability;
1438
+ delegation?: never;
1439
+ transfer?: never;
1440
+ hangup?: never;
1441
+ wait?: never;
1715
1442
  $unknown?: never;
1716
1443
  }
1717
1444
  /**
1718
- * Bring-your-own backend over SQS: turns are forwarded to the queue, replies are posted back via the API.
1445
+ * Delegate the conversation to another agent. Terminal for this workflow.
1719
1446
  * @public
1720
1447
  */
1721
- interface SqsMember {
1722
- ai?: never;
1723
- webhook?: never;
1724
- sqs: AgentSqsEngine;
1448
+ interface DelegationMember {
1449
+ tool?: never;
1450
+ connector?: never;
1451
+ agent?: never;
1452
+ handover?: never;
1453
+ delegation: AgentDelegationCapability;
1454
+ transfer?: never;
1455
+ hangup?: never;
1456
+ wait?: never;
1725
1457
  $unknown?: never;
1726
1458
  }
1727
1459
  /**
1460
+ * Transfer the call to a PBX destination. Terminal. Honoured on the voice channel.
1728
1461
  * @public
1729
1462
  */
1730
- interface $UnknownMember {
1731
- ai?: never;
1732
- webhook?: never;
1733
- sqs?: never;
1734
- $unknown: [string, any];
1463
+ interface TransferMember {
1464
+ tool?: never;
1465
+ connector?: never;
1466
+ agent?: never;
1467
+ handover?: never;
1468
+ delegation?: never;
1469
+ transfer: AgentTransferCapability;
1470
+ hangup?: never;
1471
+ wait?: never;
1472
+ $unknown?: never;
1473
+ }
1474
+ /**
1475
+ * End the call. Terminal. Honoured on the voice channel; on conversation channels use the `end` handler.
1476
+ * @public
1477
+ */
1478
+ interface HangupMember {
1479
+ tool?: never;
1480
+ connector?: never;
1481
+ agent?: never;
1482
+ handover?: never;
1483
+ delegation?: never;
1484
+ transfer?: never;
1485
+ hangup: AgentHangupCapability;
1486
+ wait?: never;
1487
+ $unknown?: never;
1488
+ }
1489
+ /**
1490
+ * Hold the call while something runs, keeping the caller on the line. Continues to the step's transitions.
1491
+ * @public
1492
+ */
1493
+ interface WaitMember {
1494
+ tool?: never;
1495
+ connector?: never;
1496
+ agent?: never;
1497
+ handover?: never;
1498
+ delegation?: never;
1499
+ transfer?: never;
1500
+ hangup?: never;
1501
+ wait: AgentWaitCapability;
1502
+ $unknown?: never;
1503
+ }
1504
+ /**
1505
+ * @public
1506
+ */
1507
+ interface $UnknownMember {
1508
+ tool?: never;
1509
+ connector?: never;
1510
+ agent?: never;
1511
+ handover?: never;
1512
+ delegation?: never;
1513
+ transfer?: never;
1514
+ hangup?: never;
1515
+ wait?: never;
1516
+ $unknown: [string, any];
1517
+ }
1518
+ /**
1519
+ * @deprecated unused in schema-serde mode.
1520
+ *
1521
+ */
1522
+ interface Visitor<T> {
1523
+ tool: (value: AgentTool) => T;
1524
+ connector: (value: AgentConnectorCapability) => T;
1525
+ agent: (value: AgentCallCapability) => T;
1526
+ handover: (value: AgentHandoverCapability) => T;
1527
+ delegation: (value: AgentDelegationCapability) => T;
1528
+ transfer: (value: AgentTransferCapability) => T;
1529
+ hangup: (value: AgentHangupCapability) => T;
1530
+ wait: (value: AgentWaitCapability) => T;
1531
+ _: (name: string, value: any) => T;
1532
+ }
1533
+ }
1534
+ /**
1535
+ * A step that performs one capability. The runtime performs it on arrival — no model decision about *whether*
1536
+ * to act, and no tool offered to the model for it. Which is the point: an action the graph reached is an action
1537
+ * that happens, at the cost of nothing.
1538
+ * @public
1539
+ */
1540
+ export interface AgentWorkflowActionHandler {
1541
+ /**
1542
+ * The capability a step performs, run by the runtime rather than chosen by the model. A subset of
1543
+ * AgentCapability, reusing its structures verbatim: these are the members that describe a single action with a
1544
+ * beginning and an end. The rest of AgentCapability (`kb`, `webSearch`, `webFetch`, `sandbox`, `suggestions`)
1545
+ * describes reach the model draws on while it talks, so it belongs on a conversation step's `capabilities`
1546
+ * rather than on a step of its own.
1547
+ *
1548
+ * Configuration comes from the capability itself and nothing is added here: a tool step's fixed arguments are
1549
+ * `AgentTool.fields` predefined handlers, its spoken lead-in is `AgentTool.startMessage`, a transfer's line
1550
+ * before the hand-off is `AgentTransferPipeline.instructions`, an invoked agent's inputs are
1551
+ * `AgentCallCapability.variables`. Anything left unpinned is filled by the model at the step, per the tool's
1552
+ * input schema.
1553
+ * @public
1554
+ */
1555
+ capability: AgentWorkflowAction;
1556
+ /**
1557
+ * Run the step as one model call with the tool choice pinned to this capability, instead of calling it
1558
+ * straight from the runtime. The model still cannot decide *whether* to call it — only what to put in the
1559
+ * arguments left unpinned, which is what a lookup keyed on something nobody can template ('the symptom the
1560
+ * caller just described') needs.
1561
+ *
1562
+ * Costs one model call where the default costs none, so it is opt-in. Honoured where the action has
1563
+ * arguments a model can write — `tool`, `connector`, `agent`, and a `transfer` whose target the model
1564
+ * chooses; ignored elsewhere. Leaving it false while a required argument is unpinned is an authoring error,
1565
+ * not a runtime one: nothing would be there to fill it.
1566
+ * @public
1567
+ */
1568
+ forceToolCall?: boolean | undefined;
1569
+ /**
1570
+ * Workflow variable the action's result is written to, so later `expression` conditions can branch on it and
1571
+ * later steps can template it (e.g. capture a lookup into `policy`, then branch on
1572
+ * `\{ "==": [\{ "var": "policy.status" \}, "active"] \}`). Absent means the result is not captured; the
1573
+ * model still sees it in the conversation per the capability's own pipeline.
1574
+ *
1575
+ * Written on success only. A failed action leaves the variable as it was and takes a `failure` transition
1576
+ * instead — see AgentWorkflowFailureCondition — so a graph can never mistake an error for a result.
1577
+ * @public
1578
+ */
1579
+ output?: string | undefined;
1580
+ }
1581
+ /**
1582
+ * Voice-channel settings for a conversation step, overriding VoiceChannelSettings while it is live. Ignored on other channels.
1583
+ * @public
1584
+ */
1585
+ export interface AgentWorkflowConversationVoiceSettings {
1586
+ /**
1587
+ * Override the voice channel's `interruptions` setting for this step, e.g. while working through a scripted verification the caller should not talk over. Defaults to the channel setting.
1588
+ * @public
1589
+ */
1590
+ interruptions?: VoiceInterruptionSettings | undefined;
1591
+ }
1592
+ /**
1593
+ * Per-channel settings of a conversation step. Only voice has anything to say about a stretch of conversation today; the chat and assistant surfaces deliver it as they deliver every other reply.
1594
+ * @public
1595
+ */
1596
+ export interface AgentWorkflowConversationChannelsSettings {
1597
+ /**
1598
+ * Voice-channel settings for a conversation step, overriding VoiceChannelSettings while it is live. Ignored on other channels.
1599
+ * @public
1600
+ */
1601
+ voice?: AgentWorkflowConversationVoiceSettings | undefined;
1602
+ }
1603
+ /**
1604
+ * A stretch of conversation with a goal: the model talks, may use the capabilities in scope, and the step's
1605
+ * transitions are evaluated against what happens. This is the only handler that leaves control where it is
1606
+ * until a transition matches — a step whose conditions all stay false simply keeps talking.
1607
+ *
1608
+ * Deliberately not configurable per step: the model, and how readily the step is left. The model is the
1609
+ * agent's (`engine.ai.model`) because a session that swaps models mid-conversation swaps voice, latency and
1610
+ * tool-calling behaviour with it. How readily a step is left is decided by how its transitions are worded —
1611
+ * conditions describing what the *caller* has done keep a model on the step, and no eagerness dial moves that
1612
+ * number.
1613
+ * @public
1614
+ */
1615
+ export interface AgentWorkflowConversationHandler {
1616
+ /**
1617
+ * What the agent is trying to achieve here, appended to the agent's `engine.ai.instructions`. Never a replacement for them: identity, tone and standing rules hold across every step, and a step that needs different ones is a different agent.
1618
+ * @public
1619
+ */
1620
+ goal: string;
1621
+ /**
1622
+ * How the step starts. Defaults to `auto`.
1623
+ * @public
1624
+ */
1625
+ entry?: AgentWorkflowEntryBehavior | undefined;
1626
+ /**
1627
+ * Per-channel settings for the stretch of conversation this step covers. Defaults to the agent's channel settings.
1628
+ * @public
1629
+ */
1630
+ channels?: AgentWorkflowConversationChannelsSettings | undefined;
1631
+ /**
1632
+ * Capabilities offered to the model *in addition* to `engine.ai.capabilities` while this step runs,
1633
+ * configured exactly as they are there — the same union, the same structures. Use it to give a step reach
1634
+ * it should not have everywhere: authoring the refund tool on the refund step, rather than on the agent, is
1635
+ * also what keeps it out of every other step.
1636
+ *
1637
+ * Additive only, by design. A step cannot drop an agent-level capability, so it cannot strand a session by
1638
+ * taking away the `handover` or `transfer` its channel needs, and the runtime keeps one rule for the turn's
1639
+ * tool set. Skills the model loads (`engine.ai.skills`) and the channel's own built-ins join it either way.
1640
+ * @public
1641
+ */
1642
+ capabilities?: AgentCapability[] | undefined;
1643
+ }
1644
+ /**
1645
+ * The session is over. Terminal and configuration-free by design: a closing line is a `message` step in front of it, and releasing a call is the `hangup` action — both already exist, and neither needs restating here.
1646
+ * @public
1647
+ */
1648
+ export interface AgentWorkflowEndHandler {
1649
+ }
1650
+ /**
1651
+ * Tapping the button opens a URL. The session stays where it is — a link is not an answer, so it cannot satisfy a transition on its own.
1652
+ * @public
1653
+ */
1654
+ export interface AgentWorkflowMessageButtonLinkHandler {
1655
+ url: string;
1656
+ }
1657
+ /**
1658
+ * Tapping the button sends a reply on the user's behalf, which then drives this step's transitions like anything else the user says.
1659
+ * @public
1660
+ */
1661
+ export interface AgentWorkflowMessageButtonReplyHandler {
1662
+ /**
1663
+ * The text sent as the user's reply. Defaults to the button's own `text`.
1664
+ * @public
1665
+ */
1666
+ text?: string | undefined;
1667
+ }
1668
+ /**
1669
+ * What tapping a button does.
1670
+ * @public
1671
+ */
1672
+ export type AgentWorkflowMessageButtonHandler = AgentWorkflowMessageButtonHandler.LinkMember | AgentWorkflowMessageButtonHandler.ReplyMember | AgentWorkflowMessageButtonHandler.$UnknownMember;
1673
+ /**
1674
+ * @public
1675
+ */
1676
+ export declare namespace AgentWorkflowMessageButtonHandler {
1677
+ /**
1678
+ * Tapping the button sends a reply on the user's behalf, which then drives this step's transitions like anything else the user says.
1679
+ * @public
1680
+ */
1681
+ interface ReplyMember {
1682
+ reply: AgentWorkflowMessageButtonReplyHandler;
1683
+ link?: never;
1684
+ $unknown?: never;
1685
+ }
1686
+ /**
1687
+ * Tapping the button opens a URL. The session stays where it is — a link is not an answer, so it cannot satisfy a transition on its own.
1688
+ * @public
1689
+ */
1690
+ interface LinkMember {
1691
+ reply?: never;
1692
+ link: AgentWorkflowMessageButtonLinkHandler;
1693
+ $unknown?: never;
1694
+ }
1695
+ /**
1696
+ * @public
1697
+ */
1698
+ interface $UnknownMember {
1699
+ reply?: never;
1700
+ link?: never;
1701
+ $unknown: [string, any];
1702
+ }
1703
+ /**
1704
+ * @deprecated unused in schema-serde mode.
1705
+ *
1706
+ */
1707
+ interface Visitor<T> {
1708
+ reply: (value: AgentWorkflowMessageButtonReplyHandler) => T;
1709
+ link: (value: AgentWorkflowMessageButtonLinkHandler) => T;
1710
+ _: (name: string, value: any) => T;
1711
+ }
1712
+ }
1713
+ /**
1714
+ * One button offered under the step's line.
1715
+ * @public
1716
+ */
1717
+ export interface AgentWorkflowMessageButton {
1718
+ /**
1719
+ * Label shown on the button. Supports handlebars resolved against workflow variables, agent variables and session context.
1720
+ * @public
1721
+ */
1722
+ text: string;
1723
+ /**
1724
+ * What tapping a button does.
1725
+ * @public
1726
+ */
1727
+ handler: AgentWorkflowMessageButtonHandler;
1728
+ /**
1729
+ * How a reply button is rendered. Matches the x-bees `ButtonVariant`. Defaults to the client's own default.
1730
+ * @public
1731
+ */
1732
+ variant?: AgentWorkflowMessageButtonVariant | undefined;
1733
+ }
1734
+ /**
1735
+ * Chat-channel settings for a message step, honoured where a line is posted rather than spoken. Ignored on voice.
1736
+ * @public
1737
+ */
1738
+ export interface AgentWorkflowMessageChatSettings {
1739
+ /**
1740
+ * Reply buttons posted with the line, e.g. 'Yes, go ahead' / 'No, not now' under a confirmation. Delivered
1741
+ * as an x-bees `actions` element of `button` elements, so a tap either sends a reply — which the step's
1742
+ * transitions then read like any other user message — or opens a link. Only offered on a fixed line: a
1743
+ * conversation step is the model's to word, and buttons authored under words it has not chosen yet would
1744
+ * contradict each other.
1745
+ * @public
1746
+ */
1747
+ suggestions?: AgentWorkflowMessageButton[] | undefined;
1748
+ }
1749
+ /**
1750
+ * Voice-channel settings for a message step, honoured while the line is spoken. Ignored on other channels.
1751
+ * @public
1752
+ */
1753
+ export interface AgentWorkflowMessageVoiceSettings {
1754
+ /**
1755
+ * Override the voice channel's `interruptions` setting while the line is spoken, e.g. to protect a legally required disclosure from being talked over. Defaults to the channel setting.
1756
+ * @public
1757
+ */
1758
+ interruptions?: VoiceInterruptionSettings | undefined;
1759
+ }
1760
+ /**
1761
+ * Per-channel settings of a message step: how the line is protected when spoken, and what is offered with it when posted.
1762
+ * @public
1763
+ */
1764
+ export interface AgentWorkflowMessageChannelsSettings {
1765
+ /**
1766
+ * Voice-channel settings for a message step, honoured while the line is spoken. Ignored on other channels.
1767
+ * @public
1768
+ */
1769
+ voice?: AgentWorkflowMessageVoiceSettings | undefined;
1770
+ /**
1771
+ * Chat-channel settings for a message step, honoured where a line is posted rather than spoken. Ignored on voice.
1772
+ * @public
1773
+ */
1774
+ chat?: AgentWorkflowMessageChatSettings | undefined;
1775
+ }
1776
+ /**
1777
+ * A line the model writes at this step, from the conversation and whatever the graph has gathered — 'greet the
1778
+ * caller by the name on the contact record and mention any open orders'. One model call, no tools offered, no
1779
+ * waiting for a reply: the agent says exactly one thing and the step's transitions are evaluated.
1780
+ *
1781
+ * The difference from a conversation step is that this is a *speech act*, not a stretch of conversation: the
1782
+ * model cannot decide to stay quiet, cannot act, and cannot keep the step. Use it where the words must fit the
1783
+ * data but the shape of the session must not depend on how they came out.
1784
+ * @public
1785
+ */
1786
+ export interface AgentWorkflowMessageGeneration {
1787
+ /**
1788
+ * What to say, as an instruction to the model rather than the words themselves. Supports handlebars resolved against workflow variables, agent variables and session context, so an action's `output` captured a step earlier is available verbatim (e.g. 'Greet \{\{contact.firstName\}\} and mention their \{\{contact.openOrders\}\} open orders').
1789
+ * @public
1790
+ */
1791
+ instructions: string;
1792
+ }
1793
+ /**
1794
+ * Where the step's line comes from. Exactly one member is set: `text` is authored, `generate` is written by the model at the step.
1795
+ * @public
1796
+ */
1797
+ export type AgentWorkflowMessageContent = AgentWorkflowMessageContent.GenerateMember | AgentWorkflowMessageContent.TextMember | AgentWorkflowMessageContent.$UnknownMember;
1798
+ /**
1799
+ * @public
1800
+ */
1801
+ export declare namespace AgentWorkflowMessageContent {
1802
+ /**
1803
+ * The line, verbatim. No model in the loop, which is what makes it the right content for a disclosure, a policy sentence or a legally worded confirmation.
1804
+ * @public
1805
+ */
1806
+ interface TextMember {
1807
+ text: string;
1808
+ generate?: never;
1809
+ $unknown?: never;
1810
+ }
1811
+ /**
1812
+ * Instructions the model turns into one line at this step. Costs one model call where `text` costs none.
1813
+ * @public
1814
+ */
1815
+ interface GenerateMember {
1816
+ text?: never;
1817
+ generate: AgentWorkflowMessageGeneration;
1818
+ $unknown?: never;
1819
+ }
1820
+ /**
1821
+ * @public
1822
+ */
1823
+ interface $UnknownMember {
1824
+ text?: never;
1825
+ generate?: never;
1826
+ $unknown: [string, any];
1827
+ }
1828
+ /**
1829
+ * @deprecated unused in schema-serde mode.
1830
+ *
1831
+ */
1832
+ interface Visitor<T> {
1833
+ text: (value: string) => T;
1834
+ generate: (value: AgentWorkflowMessageGeneration) => T;
1835
+ _: (name: string, value: any) => T;
1836
+ }
1837
+ }
1838
+ /**
1839
+ * Say one thing — spoken on voice, posted on chat / assistant — then move on. The line is either authored verbatim or generated at the step; either way the agent says it once and the transitions are evaluated, with no turn handed to the user.
1840
+ * @public
1841
+ */
1842
+ export interface AgentWorkflowMessageHandler {
1843
+ /**
1844
+ * Where the step's line comes from. Exactly one member is set: `text` is authored, `generate` is written by the model at the step.
1845
+ * @public
1846
+ */
1847
+ content: AgentWorkflowMessageContent;
1848
+ /**
1849
+ * Per-channel settings for delivering the line: protecting it from interruption when it is spoken, offering reply buttons with it when it is posted. Defaults to the agent's channel settings.
1850
+ * @public
1851
+ */
1852
+ channels?: AgentWorkflowMessageChannelsSettings | undefined;
1853
+ }
1854
+ /**
1855
+ * End this workflow and hand control back to whatever invoked it.
1856
+ *
1857
+ * In a nested workflow the invoking step resumes and branches on which result was reached (see
1858
+ * AgentWorkflowResultCondition). In the main graph of a workflow-channel agent the run finishes and the result
1859
+ * is returned to the caller — the agent, automation or API request that started it. In the main graph of a
1860
+ * voice / chat / assistant agent there is no invoker, so it behaves as `end`.
1861
+ * @public
1862
+ */
1863
+ export interface AgentWorkflowResultHandler {
1864
+ /**
1865
+ * What this result returns to the invoker. Supports handlebars resolved against workflow variables, agent variables and session context (e.g. '\{\{policy.number\}\}'). Absent returns the result's id alone, which is enough when the caller only branches on which result was reached.
1866
+ * @public
1867
+ */
1868
+ value?: string | undefined;
1869
+ }
1870
+ /**
1871
+ * One `name = value` write. Exactly one of `value` or `expression` is set: `value` renders text, `expression` computes.
1872
+ * @public
1873
+ */
1874
+ export interface AgentWorkflowAssignment {
1875
+ name: string;
1876
+ /**
1877
+ * Text written to the variable, with handlebars resolved against workflow variables, agent variables and session context (e.g. '\{\{lookup.status\}\}'). Empty clears the variable.
1878
+ * @public
1879
+ */
1880
+ value?: string | undefined;
1881
+ /**
1882
+ * A JsonLogic expression computing the value instead of rendering it, which is what makes arithmetic possible: `\{ "+": [\{ "var": "attempts" \}, 1] \}` is the retry counter a bounded loop needs, written with no model in the loop.
1883
+ * @public
1884
+ */
1885
+ expression?: __DocumentType | undefined;
1886
+ }
1887
+ /**
1888
+ * Write workflow variables. The step nobody asks for until the first time a graph has to remember something between two branches.
1889
+ * @public
1890
+ */
1891
+ export interface AgentWorkflowVariablesHandler {
1892
+ assignments: AgentWorkflowAssignment[];
1893
+ }
1894
+ /**
1895
+ * Run a nested workflow and continue once it returns.
1896
+ *
1897
+ * The unit of decomposition: a twelve-step identity check is called from the front door, from the booking flow
1898
+ * and from the complaints line, so it is authored once and referenced by a single step at each call site. The
1899
+ * nested workflow shares this session and its variables; it returns through its `result` steps, which is what
1900
+ * the calling step's `result` transitions branch on. A nested workflow that instead reaches an `end` or a
1901
+ * terminal action does what it says — the session is over and nothing comes back.
1902
+ * @public
1903
+ */
1904
+ export interface AgentWorkflowInvokeHandler {
1905
+ /**
1906
+ * The nested workflow to run. Must be declared in `AgentWorkflow.nested`, and must not run itself directly or through a ring of nested workflows.
1907
+ * @public
1908
+ */
1909
+ workflow: string;
1910
+ /**
1911
+ * Workflow variable the nested workflow's result `value` is written to. Absent means the value is discarded — which is the usual case when the branch taken is the whole answer.
1912
+ * @public
1913
+ */
1914
+ output?: string | undefined;
1915
+ }
1916
+ /**
1917
+ * What a step does. Exactly one member is set. `action` carries a capability; the others are workflow-only handlers with no capability equivalent.
1918
+ * @public
1919
+ */
1920
+ export type AgentWorkflowHandler = AgentWorkflowHandler.ActionMember | AgentWorkflowHandler.ConversationMember | AgentWorkflowHandler.EndMember | AgentWorkflowHandler.MessageMember | AgentWorkflowHandler.ResultMember | AgentWorkflowHandler.VariablesMember | AgentWorkflowHandler.WorkflowMember | AgentWorkflowHandler.$UnknownMember;
1921
+ /**
1922
+ * @public
1923
+ */
1924
+ export declare namespace AgentWorkflowHandler {
1925
+ /**
1926
+ * A stretch of conversation with a goal: the model talks, may use the capabilities in scope, and the step's
1927
+ * transitions are evaluated against what happens. This is the only handler that leaves control where it is
1928
+ * until a transition matches — a step whose conditions all stay false simply keeps talking.
1929
+ *
1930
+ * Deliberately not configurable per step: the model, and how readily the step is left. The model is the
1931
+ * agent's (`engine.ai.model`) because a session that swaps models mid-conversation swaps voice, latency and
1932
+ * tool-calling behaviour with it. How readily a step is left is decided by how its transitions are worded —
1933
+ * conditions describing what the *caller* has done keep a model on the step, and no eagerness dial moves that
1934
+ * number.
1935
+ * @public
1936
+ */
1937
+ interface ConversationMember {
1938
+ conversation: AgentWorkflowConversationHandler;
1939
+ message?: never;
1940
+ action?: never;
1941
+ variables?: never;
1942
+ workflow?: never;
1943
+ result?: never;
1944
+ end?: never;
1945
+ $unknown?: never;
1946
+ }
1947
+ /**
1948
+ * Say one thing — spoken on voice, posted on chat / assistant — then move on. The line is either authored verbatim or generated at the step; either way the agent says it once and the transitions are evaluated, with no turn handed to the user.
1949
+ * @public
1950
+ */
1951
+ interface MessageMember {
1952
+ conversation?: never;
1953
+ message: AgentWorkflowMessageHandler;
1954
+ action?: never;
1955
+ variables?: never;
1956
+ workflow?: never;
1957
+ result?: never;
1958
+ end?: never;
1959
+ $unknown?: never;
1960
+ }
1961
+ /**
1962
+ * A step that performs one capability. The runtime performs it on arrival — no model decision about *whether*
1963
+ * to act, and no tool offered to the model for it. Which is the point: an action the graph reached is an action
1964
+ * that happens, at the cost of nothing.
1965
+ * @public
1966
+ */
1967
+ interface ActionMember {
1968
+ conversation?: never;
1969
+ message?: never;
1970
+ action: AgentWorkflowActionHandler;
1971
+ variables?: never;
1972
+ workflow?: never;
1973
+ result?: never;
1974
+ end?: never;
1975
+ $unknown?: never;
1976
+ }
1977
+ /**
1978
+ * Write workflow variables. The step nobody asks for until the first time a graph has to remember something between two branches.
1979
+ * @public
1980
+ */
1981
+ interface VariablesMember {
1982
+ conversation?: never;
1983
+ message?: never;
1984
+ action?: never;
1985
+ variables: AgentWorkflowVariablesHandler;
1986
+ workflow?: never;
1987
+ result?: never;
1988
+ end?: never;
1989
+ $unknown?: never;
1990
+ }
1991
+ /**
1992
+ * Run a nested workflow and continue once it returns.
1993
+ *
1994
+ * The unit of decomposition: a twelve-step identity check is called from the front door, from the booking flow
1995
+ * and from the complaints line, so it is authored once and referenced by a single step at each call site. The
1996
+ * nested workflow shares this session and its variables; it returns through its `result` steps, which is what
1997
+ * the calling step's `result` transitions branch on. A nested workflow that instead reaches an `end` or a
1998
+ * terminal action does what it says — the session is over and nothing comes back.
1999
+ * @public
2000
+ */
2001
+ interface WorkflowMember {
2002
+ conversation?: never;
2003
+ message?: never;
2004
+ action?: never;
2005
+ variables?: never;
2006
+ workflow: AgentWorkflowInvokeHandler;
2007
+ result?: never;
2008
+ end?: never;
2009
+ $unknown?: never;
2010
+ }
2011
+ /**
2012
+ * End this workflow and hand control back to whatever invoked it.
2013
+ *
2014
+ * In a nested workflow the invoking step resumes and branches on which result was reached (see
2015
+ * AgentWorkflowResultCondition). In the main graph of a workflow-channel agent the run finishes and the result
2016
+ * is returned to the caller — the agent, automation or API request that started it. In the main graph of a
2017
+ * voice / chat / assistant agent there is no invoker, so it behaves as `end`.
2018
+ * @public
2019
+ */
2020
+ interface ResultMember {
2021
+ conversation?: never;
2022
+ message?: never;
2023
+ action?: never;
2024
+ variables?: never;
2025
+ workflow?: never;
2026
+ result: AgentWorkflowResultHandler;
2027
+ end?: never;
2028
+ $unknown?: never;
2029
+ }
2030
+ /**
2031
+ * The session is over. Terminal and configuration-free by design: a closing line is a `message` step in front of it, and releasing a call is the `hangup` action — both already exist, and neither needs restating here.
2032
+ * @public
2033
+ */
2034
+ interface EndMember {
2035
+ conversation?: never;
2036
+ message?: never;
2037
+ action?: never;
2038
+ variables?: never;
2039
+ workflow?: never;
2040
+ result?: never;
2041
+ end: AgentWorkflowEndHandler;
2042
+ $unknown?: never;
2043
+ }
2044
+ /**
2045
+ * @public
2046
+ */
2047
+ interface $UnknownMember {
2048
+ conversation?: never;
2049
+ message?: never;
2050
+ action?: never;
2051
+ variables?: never;
2052
+ workflow?: never;
2053
+ result?: never;
2054
+ end?: never;
2055
+ $unknown: [string, any];
2056
+ }
2057
+ /**
2058
+ * @deprecated unused in schema-serde mode.
2059
+ *
2060
+ */
2061
+ interface Visitor<T> {
2062
+ conversation: (value: AgentWorkflowConversationHandler) => T;
2063
+ message: (value: AgentWorkflowMessageHandler) => T;
2064
+ action: (value: AgentWorkflowActionHandler) => T;
2065
+ variables: (value: AgentWorkflowVariablesHandler) => T;
2066
+ workflow: (value: AgentWorkflowInvokeHandler) => T;
2067
+ result: (value: AgentWorkflowResultHandler) => T;
2068
+ end: (value: AgentWorkflowEndHandler) => T;
2069
+ _: (name: string, value: any) => T;
2070
+ }
2071
+ }
2072
+ /**
2073
+ * Canvas coordinates of a step in the builder. Authoring metadata: the runtime ignores it, and a workflow that arrives without positions is laid out automatically.
2074
+ * @public
2075
+ */
2076
+ export interface AgentWorkflowStepPosition {
2077
+ x: number;
2078
+ y: number;
2079
+ }
2080
+ /**
2081
+ * Unconditional. Only legal as a step's single transition: two unconditional exits are a coin toss, not a routing decision.
2082
+ * @public
2083
+ */
2084
+ export interface AgentWorkflowAlwaysCondition {
2085
+ }
2086
+ /**
2087
+ * A branch taken when workflow state satisfies the condition — no model judgement involved, which is what makes it the right condition after an `action` or `variables` step.
2088
+ * @public
2089
+ */
2090
+ export interface AgentWorkflowExpressionCondition {
2091
+ /**
2092
+ * A JsonLogic condition tree evaluated against workflow state, e.g.
2093
+ * `\{ "==": [ \{ "var": "lookup.status" \}, "found" ] \}`. The `var` namespace is the workflow variables
2094
+ * written by `variables` steps and action `output` captures, the agent's input variables
2095
+ * (`engine.ai.variables`), and the session context. An empty tree always matches. Same convention as
2096
+ * AutomationConditions (wilma-workflows) and CopilotConditions (wilma-copilot).
2097
+ * @public
2098
+ */
2099
+ conditions: __DocumentType;
2100
+ }
2101
+ /**
2102
+ * A branch taken when the step's action fails. Only meaningful on an `action` step, and the only condition a
2103
+ * terminal action may carry: a transfer that finds the extension busy has not left the session, so a graph that
2104
+ * cannot say what happens next simply drops the caller.
2105
+ *
2106
+ * Failure short-circuits — when an action fails, only `failure` transitions are considered, never the
2107
+ * `expression` or `prompt` branches that were written for its result. If none matches, the session fails with
2108
+ * the action's error, so a step whose capability can fail wants a catch-all last in the list.
2109
+ * @public
2110
+ */
2111
+ export interface AgentWorkflowFailureCondition {
2112
+ /**
2113
+ * Kinds this branch handles, evaluated as a set. Absent or empty catches **any** failure — the catch-all, which the list order must therefore place after the specific branches.
2114
+ * @public
2115
+ */
2116
+ kinds?: AgentWorkflowFailureKind[] | undefined;
2117
+ }
2118
+ /**
2119
+ * The else-branch, taken when no sibling matched. At most one per step, and reached last regardless of where it sits in the list.
2120
+ * @public
2121
+ */
2122
+ export interface AgentWorkflowFallbackCondition {
2123
+ }
2124
+ /**
2125
+ * A condition the model judges against the conversation, e.g. 'the caller has said they will try the fix'.
2126
+ *
2127
+ * Phrase it as something the **caller** has done. A condition describing what the *agent* has done — 'the
2128
+ * caller has a next step to try' — is true the instant the agent names one, so the model leaves before the
2129
+ * caller has answered, and one early exit cascades through the rest of the graph. Rewording the same exits from
2130
+ * agent actions to caller actions, changing nothing else, moved three models from 58–64 % of turns on the right
2131
+ * step to 96–100 %, and removed every stray move. It is the single largest effect measured on this contract, so
2132
+ * an authoring surface that accepts an agent-action condition is the defect, not the wording.
2133
+ * @public
2134
+ */
2135
+ export interface AgentWorkflowPromptCondition {
2136
+ instructions: string;
2137
+ }
2138
+ /**
2139
+ * A branch on which result a nested workflow returned. Only meaningful on a `workflow` step; the referenced step must be a `result` step of the nested workflow that step runs.
2140
+ * @public
2141
+ */
2142
+ export interface AgentWorkflowResultCondition {
2143
+ /**
2144
+ * Id of the `result` step reached inside the nested workflow. An id rather than a name, so renaming a result from 'failed' to 'gave up' does not unwire every step that handles it.
2145
+ * @public
2146
+ */
2147
+ result: string;
2148
+ }
2149
+ /**
2150
+ * How the runtime decides to take a transition. Exactly one member is set.
2151
+ * @public
2152
+ */
2153
+ export type AgentWorkflowCondition = AgentWorkflowCondition.AlwaysMember | AgentWorkflowCondition.ExpressionMember | AgentWorkflowCondition.FailureMember | AgentWorkflowCondition.FallbackMember | AgentWorkflowCondition.PromptMember | AgentWorkflowCondition.ResultMember | AgentWorkflowCondition.$UnknownMember;
2154
+ /**
2155
+ * @public
2156
+ */
2157
+ export declare namespace AgentWorkflowCondition {
2158
+ /**
2159
+ * Unconditional. Only legal as a step's single transition: two unconditional exits are a coin toss, not a routing decision.
2160
+ * @public
2161
+ */
2162
+ interface AlwaysMember {
2163
+ always: AgentWorkflowAlwaysCondition;
2164
+ prompt?: never;
2165
+ expression?: never;
2166
+ result?: never;
2167
+ failure?: never;
2168
+ fallback?: never;
2169
+ $unknown?: never;
2170
+ }
2171
+ /**
2172
+ * A condition the model judges against the conversation, e.g. 'the caller has said they will try the fix'.
2173
+ *
2174
+ * Phrase it as something the **caller** has done. A condition describing what the *agent* has done — 'the
2175
+ * caller has a next step to try' — is true the instant the agent names one, so the model leaves before the
2176
+ * caller has answered, and one early exit cascades through the rest of the graph. Rewording the same exits from
2177
+ * agent actions to caller actions, changing nothing else, moved three models from 58–64 % of turns on the right
2178
+ * step to 96–100 %, and removed every stray move. It is the single largest effect measured on this contract, so
2179
+ * an authoring surface that accepts an agent-action condition is the defect, not the wording.
2180
+ * @public
2181
+ */
2182
+ interface PromptMember {
2183
+ always?: never;
2184
+ prompt: AgentWorkflowPromptCondition;
2185
+ expression?: never;
2186
+ result?: never;
2187
+ failure?: never;
2188
+ fallback?: never;
2189
+ $unknown?: never;
2190
+ }
2191
+ /**
2192
+ * A branch taken when workflow state satisfies the condition — no model judgement involved, which is what makes it the right condition after an `action` or `variables` step.
2193
+ * @public
2194
+ */
2195
+ interface ExpressionMember {
2196
+ always?: never;
2197
+ prompt?: never;
2198
+ expression: AgentWorkflowExpressionCondition;
2199
+ result?: never;
2200
+ failure?: never;
2201
+ fallback?: never;
2202
+ $unknown?: never;
2203
+ }
2204
+ /**
2205
+ * A branch on which result a nested workflow returned. Only meaningful on a `workflow` step; the referenced step must be a `result` step of the nested workflow that step runs.
2206
+ * @public
2207
+ */
2208
+ interface ResultMember {
2209
+ always?: never;
2210
+ prompt?: never;
2211
+ expression?: never;
2212
+ result: AgentWorkflowResultCondition;
2213
+ failure?: never;
2214
+ fallback?: never;
2215
+ $unknown?: never;
2216
+ }
2217
+ /**
2218
+ * A branch taken when the step's action fails. Only meaningful on an `action` step, and the only condition a
2219
+ * terminal action may carry: a transfer that finds the extension busy has not left the session, so a graph that
2220
+ * cannot say what happens next simply drops the caller.
2221
+ *
2222
+ * Failure short-circuits — when an action fails, only `failure` transitions are considered, never the
2223
+ * `expression` or `prompt` branches that were written for its result. If none matches, the session fails with
2224
+ * the action's error, so a step whose capability can fail wants a catch-all last in the list.
2225
+ * @public
2226
+ */
2227
+ interface FailureMember {
2228
+ always?: never;
2229
+ prompt?: never;
2230
+ expression?: never;
2231
+ result?: never;
2232
+ failure: AgentWorkflowFailureCondition;
2233
+ fallback?: never;
2234
+ $unknown?: never;
2235
+ }
2236
+ /**
2237
+ * The else-branch, taken when no sibling matched. At most one per step, and reached last regardless of where it sits in the list.
2238
+ * @public
2239
+ */
2240
+ interface FallbackMember {
2241
+ always?: never;
2242
+ prompt?: never;
2243
+ expression?: never;
2244
+ result?: never;
2245
+ failure?: never;
2246
+ fallback: AgentWorkflowFallbackCondition;
2247
+ $unknown?: never;
2248
+ }
2249
+ /**
2250
+ * @public
2251
+ */
2252
+ interface $UnknownMember {
2253
+ always?: never;
2254
+ prompt?: never;
2255
+ expression?: never;
2256
+ result?: never;
2257
+ failure?: never;
2258
+ fallback?: never;
2259
+ $unknown: [string, any];
2260
+ }
2261
+ /**
2262
+ * @deprecated unused in schema-serde mode.
2263
+ *
2264
+ */
2265
+ interface Visitor<T> {
2266
+ always: (value: AgentWorkflowAlwaysCondition) => T;
2267
+ prompt: (value: AgentWorkflowPromptCondition) => T;
2268
+ expression: (value: AgentWorkflowExpressionCondition) => T;
2269
+ result: (value: AgentWorkflowResultCondition) => T;
2270
+ failure: (value: AgentWorkflowFailureCondition) => T;
2271
+ fallback: (value: AgentWorkflowFallbackCondition) => T;
2272
+ _: (name: string, value: any) => T;
2273
+ }
2274
+ }
2275
+ /**
2276
+ * One way out of a step.
2277
+ * @public
2278
+ */
2279
+ export interface AgentWorkflowTransition {
2280
+ /**
2281
+ * Step to move to. Must be a step of the same workflow — a nested workflow is entered through a `workflow` step, not by pointing a transition into it.
2282
+ * @public
2283
+ */
2284
+ target: string;
2285
+ /**
2286
+ * How the runtime decides to take a transition. Exactly one member is set.
2287
+ * @public
2288
+ */
2289
+ condition: AgentWorkflowCondition;
2290
+ }
2291
+ /**
2292
+ * @public
2293
+ */
2294
+ export interface AgentWorkflowStep {
2295
+ /**
2296
+ * Identifier of a step within its workflow, unique per workflow (the main graph and each nested workflow are separate scopes). Stable and machine-facing: transitions reference it, and a result step's id is the name a caller branches on, so renaming a step's `label` never unwires the graph.
2297
+ * @public
2298
+ */
2299
+ id: string;
2300
+ /**
2301
+ * Human readable name of a step, shown in the builder and in traces. Never a routing key — see AgentWorkflowStepId — but it is read by the model as the fallback preview of an exit that leads here when the step carries no `summary`.
2302
+ * @public
2303
+ */
2304
+ label: string;
2305
+ /**
2306
+ * One line saying what happens here, shown to the model as the preview of any exit that leads to this step.
2307
+ * @public
2308
+ */
2309
+ summary?: string | undefined;
2310
+ /**
2311
+ * The phase this step belongs to. Inherited by steps downstream, so a handful of tags organise a long graph.
2312
+ * @public
2313
+ */
2314
+ stage?: string | undefined;
2315
+ /**
2316
+ * What a step does. Exactly one member is set. `action` carries a capability; the others are workflow-only handlers with no capability equivalent.
2317
+ * @public
2318
+ */
2319
+ handler: AgentWorkflowHandler;
2320
+ /**
2321
+ * The ways out of this step. Must be non-empty on every step that stays in the session, since a step the
2322
+ * runtime cannot leave is a dead end.
2323
+ *
2324
+ * On `result` and `end` it must be empty. On the `action` members that leave the session (`handover`,
2325
+ * `delegation`, `transfer`, `hangup`) it may carry `failure` transitions and nothing else: an action that
2326
+ * was supposed to leave and failed — a busy extension, a service desk with nobody on it — has not left, and
2327
+ * a graph with no answer for that drops the caller.
2328
+ * @public
2329
+ */
2330
+ transitions?: AgentWorkflowTransition[] | undefined;
2331
+ /**
2332
+ * Canvas coordinates of a step in the builder. Authoring metadata: the runtime ignores it, and a workflow that arrives without positions is laid out automatically.
2333
+ * @public
2334
+ */
2335
+ position?: AgentWorkflowStepPosition | undefined;
2336
+ }
2337
+ /**
2338
+ * A named graph the main workflow — or another nested workflow — can run, referenced by AgentWorkflowInvokeHandler.
2339
+ * @public
2340
+ */
2341
+ export interface AgentWorkflowNested {
2342
+ /**
2343
+ * Step the graph starts at. Must be one of `steps`.
2344
+ * @public
2345
+ */
2346
+ entry: string;
2347
+ /**
2348
+ * Steps of one graph. Ids are unique within it.
2349
+ * @public
2350
+ */
2351
+ steps: AgentWorkflowStep[];
2352
+ /**
2353
+ * Identifier of a nested workflow within the agent's workflow.
2354
+ * @public
2355
+ */
2356
+ id: string;
2357
+ name: string;
2358
+ /**
2359
+ * One line saying what the nested workflow is for, shown on the step that runs it.
2360
+ * @public
2361
+ */
2362
+ description?: string | undefined;
2363
+ }
2364
+ /**
2365
+ * @public
2366
+ */
2367
+ export interface AgentWorkflowSettings {
2368
+ /**
2369
+ * Give up after this many step transitions, so a cycle whose conditions all keep matching cannot run
2370
+ * forever. Absent means no limit, which is the default: a deliberate loop — 'keep asking until you have the
2371
+ * postcode' — is a normal shape, and silently capping it would be worse than making the author say so.
2372
+ * @public
2373
+ */
2374
+ maxTransitions?: number | undefined;
2375
+ /**
2376
+ * Workflow variables seeded before the first step runs. Agent input variables (`engine.ai.variables`) are already in scope and need no entry here.
2377
+ * @public
2378
+ */
2379
+ variables?: AgentWorkflowAssignment[] | undefined;
2380
+ /**
2381
+ * How the builder arranges the graph. Authoring metadata: the runtime ignores it. `stages` bands the graph by `stage`, which is what a forty-step workflow needs.
2382
+ * @public
2383
+ */
2384
+ layout?: AgentWorkflowLayout | undefined;
2385
+ }
2386
+ /**
2387
+ * The agent's conversation as a graph: which step runs first, what each step does, and on what condition
2388
+ * control moves on. Optional on AgentAiEngine — without one the agent is prompt-driven, steered by
2389
+ * `instructions` and free to use its capabilities in any order.
2390
+ *
2391
+ * Versioned with the rest of the agent definition: publishing a version snapshots the graph, and a draft edit
2392
+ * reaches no session until it is published and routed.
2393
+ * @public
2394
+ */
2395
+ export interface AgentWorkflow {
2396
+ /**
2397
+ * Step the graph starts at. Must be one of `steps`.
2398
+ * @public
2399
+ */
2400
+ entry: string;
2401
+ /**
2402
+ * Steps of one graph. Ids are unique within it.
2403
+ * @public
2404
+ */
2405
+ steps: AgentWorkflowStep[];
2406
+ /**
2407
+ * Graphs the main workflow can run, referenced by `workflow` steps.
2408
+ * @public
2409
+ */
2410
+ nested?: AgentWorkflowNested[] | undefined;
2411
+ settings?: AgentWorkflowSettings | undefined;
2412
+ }
2413
+ /**
2414
+ * Managed AI engine: the platform runs the model, tools and knowledge lookups.
2415
+ * @public
2416
+ */
2417
+ export interface AgentAiEngine {
2418
+ instructions: string;
2419
+ /**
2420
+ * The session as a graph of steps, when the agent is meant to follow one. Sits next to `instructions`
2421
+ * because the two are the same decision from opposite ends: what the agent is told, and how the session is
2422
+ * steered. Optional — without it the agent is prompt-driven and free to use its capabilities in any order,
2423
+ * which stays the right shape for open-ended assistants. What a step *does* is one of the capabilities
2424
+ * below, configured identically; see AgentWorkflow.
2425
+ * @public
2426
+ */
2427
+ workflow?: AgentWorkflow | undefined;
2428
+ /**
2429
+ * Defaults to the platform default model when omitted.
2430
+ * @public
2431
+ */
2432
+ model?: string | undefined;
2433
+ /**
2434
+ * IANA timezone the agent reasons about time in: it anchors the current date and time given to the model and how times are read from and written to tool arguments and replies. Shared by every channel the agent serves. Defaults to 'UTC'.
2435
+ * @public
2436
+ */
2437
+ timeZone?: string | undefined;
2438
+ /**
2439
+ * Whether the agent can produce artifacts (wilma-artifacts): documents, code files, HTML pages or diagrams it writes and shares back during a session, on any channel it serves. When an artifact is created the channel runtime shares it company-wide by link, so every signed-in colleague can open it. Artifacts are company-internal: recipients on external transports (sms / whatsapp) or outside the company cannot open the links, so keep this disabled for customer-facing agents. Defaults to false.
2440
+ * @public
2441
+ */
2442
+ artifacts?: boolean | undefined;
2443
+ /**
2444
+ * Skills attached to this agent (progressive disclosure). A skill may carry its own tools, which join this agent's toolset while that skill is active.
2445
+ * @public
2446
+ */
2447
+ skills?: AgentSkillReference[] | undefined;
2448
+ /**
2449
+ * Everything the agent can do. When a `workflow` is set these are the capabilities in scope at every step, and a step may add to them or narrow them with its own list of the same shape.
2450
+ * @public
2451
+ */
2452
+ capabilities?: AgentCapability[] | undefined;
2453
+ variables?: AgentVariable[] | undefined;
2454
+ }
2455
+ /**
2456
+ * A reference to a stored secret, held by other services in place of the value.
2457
+ * Resolved server-to-server via GetSecretValue at execution time — always to the current value.
2458
+ * @public
2459
+ */
2460
+ export interface SecretRef {
2461
+ /**
2462
+ * Unique identifier of a secret.
2463
+ * @public
2464
+ */
2465
+ id: string;
2466
+ }
2467
+ /**
2468
+ * Bring-your-own backend over SQS: turns are forwarded to the queue, replies are posted back via the API.
2469
+ * @public
2470
+ */
2471
+ export interface AgentSqsEngine {
2472
+ url: string;
2473
+ key: string;
2474
+ /**
2475
+ * Reference to the SQS secret access key in wilma-secrets.
2476
+ * @public
2477
+ */
2478
+ secret: SecretRef;
2479
+ }
2480
+ /**
2481
+ * Bring-your-own backend over HTTPS: each turn is POSTed to the URL, the response is the reply.
2482
+ * @public
2483
+ */
2484
+ export interface AgentWebhookEngine {
2485
+ url: string;
2486
+ /**
2487
+ * Shared secret used to sign requests (HMAC).
2488
+ * @public
2489
+ */
2490
+ secret: string;
2491
+ timeout?: number | undefined;
2492
+ }
2493
+ /**
2494
+ * How the agent produces replies. `ai` is the managed engine; `webhook` and `sqs` delegate to an external backend.
2495
+ * @public
2496
+ */
2497
+ export type AgentEngine = AgentEngine.AiMember | AgentEngine.SqsMember | AgentEngine.WebhookMember | AgentEngine.$UnknownMember;
2498
+ /**
2499
+ * @public
2500
+ */
2501
+ export declare namespace AgentEngine {
2502
+ /**
2503
+ * Managed AI engine: the platform runs the model, tools and knowledge lookups.
2504
+ * @public
2505
+ */
2506
+ interface AiMember {
2507
+ ai: AgentAiEngine;
2508
+ webhook?: never;
2509
+ sqs?: never;
2510
+ $unknown?: never;
2511
+ }
2512
+ /**
2513
+ * Bring-your-own backend over HTTPS: each turn is POSTed to the URL, the response is the reply.
2514
+ * @public
2515
+ */
2516
+ interface WebhookMember {
2517
+ ai?: never;
2518
+ webhook: AgentWebhookEngine;
2519
+ sqs?: never;
2520
+ $unknown?: never;
2521
+ }
2522
+ /**
2523
+ * Bring-your-own backend over SQS: turns are forwarded to the queue, replies are posted back via the API.
2524
+ * @public
2525
+ */
2526
+ interface SqsMember {
2527
+ ai?: never;
2528
+ webhook?: never;
2529
+ sqs: AgentSqsEngine;
2530
+ $unknown?: never;
2531
+ }
2532
+ /**
2533
+ * @public
2534
+ */
2535
+ interface $UnknownMember {
2536
+ ai?: never;
2537
+ webhook?: never;
2538
+ sqs?: never;
2539
+ $unknown: [string, any];
1735
2540
  }
1736
2541
  /**
1737
2542
  * @deprecated unused in schema-serde mode.
@@ -1924,11 +2729,6 @@ export interface AgentInfo {
1924
2729
  * @public
1925
2730
  */
1926
2731
  channels: ChannelType[];
1927
- /**
1928
- * Whether the agent's 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. Absent is read as false.
1929
- * @public
1930
- */
1931
- speechConfigured?: boolean | undefined;
1932
2732
  /**
1933
2733
  * Published agent version number. Monotonic within an agent's version history, starting at 1.
1934
2734
  * @public
@@ -2163,25 +2963,6 @@ export interface DeleteAgentApiKeyInput {
2163
2963
  */
2164
2964
  export interface DeleteAgentApiKeyOutput {
2165
2965
  }
2166
- /**
2167
- * @public
2168
- */
2169
- export interface DeletePronunciationDictionaryInput {
2170
- company?: string | undefined;
2171
- /**
2172
- * BCP-47 language tag, optionally with a region subtag: 'en', 'en-US', 'pt-BR'. Deliberately a
2173
- * constrained string rather than an enum: the offerable set is a property of the selected
2174
- * transcription vendor and changes with it, so an enumeration here would cap the set at whatever
2175
- * was known when the model was released.
2176
- * @public
2177
- */
2178
- code: string;
2179
- }
2180
- /**
2181
- * @public
2182
- */
2183
- export interface DeletePronunciationDictionaryOutput {
2184
- }
2185
2966
  /**
2186
2967
  * @public
2187
2968
  */
@@ -2322,57 +3103,6 @@ export interface ListAgentVersionsOutput {
2322
3103
  */
2323
3104
  nextCursor?: string | undefined;
2324
3105
  }
2325
- /**
2326
- * @public
2327
- */
2328
- export interface ListPronunciationDictionariesInput {
2329
- company?: string | undefined;
2330
- }
2331
- /**
2332
- * Every pronunciation rule a company has written for one language.
2333
- * @public
2334
- */
2335
- export interface PronunciationDictionary {
2336
- id: string;
2337
- /**
2338
- * BCP-47 code with locale, e.g. 'en-US'. Unique per company — this is the link.
2339
- * @public
2340
- */
2341
- code: string;
2342
- /**
2343
- * Pronunciation rules for one language.
2344
- *
2345
- * BOUNDED, and the bound is not decoration. Both runtimes compile every rule of a language into
2346
- * a SINGLE alternating regular expression, so the cost is the pattern's total size: measured
2347
- * against the real escaping and matching logic, 1,000 rules cost ~0.9 s of CPU per synthesized
2348
- * sentence, 5,000 cost ~4.9 s, and around 10,000 `new RegExp` throws V8's pattern-size error.
2349
- *
2350
- * 200 is far above any real use — a product glossary is a handful of names — and far below where
2351
- * either cost begins. Found by a security review.
2352
- * NO LOWER BOUND on `phrase` or `as`, deliberately. Both consoles add an EMPTY rule row the
2353
- * moment someone clicks 'Add pronunciation', so a `min: 1` would make saving an agent with a
2354
- * half-typed row fail entirely — and the runtime already ignores a rule with no phrase. Dropping
2355
- * blank rows belongs in the consoles' save filters, not in a refusal here.
2356
- * @public
2357
- */
2358
- rules: VoicePronunciation[];
2359
- /**
2360
- * ISO-8601 timestamp with millisecond precision, e.g. '2026-07-10T14:12:30.123Z'.
2361
- * @public
2362
- */
2363
- updatedAt: string;
2364
- /**
2365
- * Who performed an action: an interactive user, an API key or an internal service.
2366
- * @public
2367
- */
2368
- updatedBy: Actor;
2369
- }
2370
- /**
2371
- * @public
2372
- */
2373
- export interface ListPronunciationDictionariesOutput {
2374
- dictionaries: PronunciationDictionary[];
2375
- }
2376
3106
  /**
2377
3107
  * @public
2378
3108
  */
@@ -2423,47 +3153,6 @@ export interface PutAgentDeploymentOutput {
2423
3153
  */
2424
3154
  deployment: AgentDeploymentRoute[];
2425
3155
  }
2426
- /**
2427
- * @public
2428
- */
2429
- export interface PutPronunciationDictionaryInput {
2430
- company?: string | undefined;
2431
- /**
2432
- * BCP-47 language tag, optionally with a region subtag: 'en', 'en-US', 'pt-BR'. Deliberately a
2433
- * constrained string rather than an enum: the offerable set is a property of the selected
2434
- * transcription vendor and changes with it, so an enumeration here would cap the set at whatever
2435
- * was known when the model was released.
2436
- * @public
2437
- */
2438
- code: string;
2439
- /**
2440
- * Pronunciation rules for one language.
2441
- *
2442
- * BOUNDED, and the bound is not decoration. Both runtimes compile every rule of a language into
2443
- * a SINGLE alternating regular expression, so the cost is the pattern's total size: measured
2444
- * against the real escaping and matching logic, 1,000 rules cost ~0.9 s of CPU per synthesized
2445
- * sentence, 5,000 cost ~4.9 s, and around 10,000 `new RegExp` throws V8's pattern-size error.
2446
- *
2447
- * 200 is far above any real use — a product glossary is a handful of names — and far below where
2448
- * either cost begins. Found by a security review.
2449
- * NO LOWER BOUND on `phrase` or `as`, deliberately. Both consoles add an EMPTY rule row the
2450
- * moment someone clicks 'Add pronunciation', so a `min: 1` would make saving an agent with a
2451
- * half-typed row fail entirely — and the runtime already ignores a rule with no phrase. Dropping
2452
- * blank rows belongs in the consoles' save filters, not in a refusal here.
2453
- * @public
2454
- */
2455
- rules: VoicePronunciation[];
2456
- }
2457
- /**
2458
- * @public
2459
- */
2460
- export interface PutPronunciationDictionaryOutput {
2461
- /**
2462
- * Every pronunciation rule a company has written for one language.
2463
- * @public
2464
- */
2465
- dictionary: PronunciationDictionary;
2466
- }
2467
3156
  /**
2468
3157
  * @public
2469
3158
  */