@voctiv/agent-sdk 0.2.15 → 0.2.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -116,6 +116,14 @@ const maxAttempts = parseRecallCount(context.dialogParams?.recall_count);
116
116
 
117
117
  `defineScript(fn)` marks the default export as the script entry point. It returns the same function and exists to give TypeScript the correct `ScriptContext` shape.
118
118
 
119
+ **Three different “context” names:**
120
+
121
+ | Name | Meaning |
122
+ | --- | --- |
123
+ | `ScriptContext` | Top-level injection: `{ channel, logger, context, platform }` |
124
+ | `context` (`ScriptDialogContext`) | Dialog identity, params, routing snapshot, `env$`, headless — see [Dialog Context](#dialog-context-and-persisted-env) |
125
+ | `options.context` on `platform.nlu.extract` | Opaque NLU disambiguation string/JSON — **not** dialog context |
126
+
119
127
  `ScriptContext` is the top-level object passed to a script:
120
128
 
121
129
  - `channel` is the media channel for SIP, WS, ASR, TTS, audio playback, LLM, and structured data messages.
@@ -220,19 +228,43 @@ If the call terminates before media becomes available, deferred audio resolves a
220
228
  On **SIP channels**, `channel.sip` exposes raw signalling beyond call state — useful for
221
229
  carrier routing, diversion chains, and vendor SDP attributes.
222
230
 
231
+ #### When to use what
232
+
233
+ | Need | API | When |
234
+ | --- | --- | --- |
235
+ | Routing / identity / locale from the **inbound INVITE** (`Diversion`, `X-Trunk-Id`, `X-Neuro-UUID`, `X-language`, …) | `channel.sip.inviteSipHeaders` | Call **start** only (snapshot) |
236
+ | Peer signal **during** the call (e.g. mid-call language in INFO body) | `channel.sip.sipInfo$` | After subscribe; each INFO |
237
+ | DTMF digits | `channel.sip.dtmf$` | Prefer over parsing INFO |
238
+ | SDP / codec / connection | `remoteSdp` / `getRemoteSdpDetails()` | May change (183 / 200 / re-INVITE) |
239
+ | SIP response code / phrase (180, 486, …) | `sipSignal$` | Low-level; **no** response headers |
240
+ | Live SIP headers on 200 / re-INVITE / BYE | — | **Not exposed** |
241
+
242
+ Decision guide:
243
+
244
+ - Value from the inbound INVITE at call start → `inviteSipHeaders`
245
+ - Mid-call signal from peer INFO → `sipInfo$` (`contentType` + `body` only)
246
+ - DTMF → `dtmf$`
247
+ - Media description → `remoteSdp` / `getRemoteSdpDetails()`
248
+ - Live SIP response headers → not available (`sipSignal$` has status/SDP only)
249
+
250
+ **Locale pattern:** read start language from `inviteSipHeaders` (e.g. `X-language`). Mid-call changes only work if the peer puts the language in the INFO **body** — INFO SIP headers are not forwarded. Monolingual agents can ignore both and use `context.language` / config.
251
+
252
+ Outbound INVITE headers you **send** go through `platform.call({ protoAdditional })` or `makeCall` options — not `inviteSipHeaders` (read-only inbound snapshot). SIP metadata does not auto-update `context` or `platform.dialog`.
253
+
223
254
  #### INVITE headers (`inviteSipHeaders`)
224
255
 
225
256
  Snapshot of SIP headers from an **inbound INVITE** at call setup. Includes standard and
226
- extension headers (`Diversion`, `P-Asserted-Identity`, `X-Trunk-Id`, `X-Neuro-UUID`, …).
257
+ extension headers (`Diversion`, `P-Asserted-Identity`, `X-Trunk-Id`, `X-Neuro-UUID`, `X-language`, …).
227
258
 
228
259
  | Property | Updates during call? |
229
260
  | --- | --- |
230
- | `inviteSipHeaders` | **No** — INVITE snapshot only; outbound B-legs usually `undefined` |
261
+ | `inviteSipHeaders` | **No** — INVITE snapshot only; outbound B-legs / WS / headless usually `undefined` |
231
262
 
232
263
  ```ts
233
264
  const h = channel.sip.inviteSipHeaders;
234
265
  const diversion = h?.Diversion; // string | string[] when multiple hops
235
266
  const trunkId = h?.['X-Trunk-Id'];
267
+ const lang = h?.['X-language'];
236
268
  ```
237
269
 
238
270
  Header names match what the host stack exposes (case-sensitive). Duplicate headers become
@@ -259,7 +291,9 @@ attributes. It is not a full SDP validator — use `remoteSdp` when you need the
259
291
 
260
292
  #### SIP INFO (`sipInfo$`)
261
293
 
262
- Live stream of incoming SIP INFO messages (`contentType` + `body`). Prefer `dtmf$` for DTMF.
294
+ Live stream of incoming SIP INFO messages. Each event is `{ contentType, body }` only
295
+ **INFO request headers are not exposed**. Prefer `dtmf$` for DTMF. Does not update
296
+ `inviteSipHeaders`.
263
297
 
264
298
  ```ts
265
299
  channel.sip.sipInfo$.subscribe(({ contentType, body }) => {
@@ -293,11 +327,14 @@ the per-event `sdp` on `sipSignal$`.
293
327
  - `bridge(other)` to cross-connect two SIP channels.
294
328
 
295
329
  `makeCall()` and `bridge()` are supported on SIP channels. The returned B-leg is a full
296
- `MediaChannel` with the same API as the main channel. WS and headless channels do not create real SIP legs.
330
+ `MediaChannel` with the same API as the main channel. WS and headless channels cannot create real SIP
331
+ legs, so both methods **throw** there rather than returning an inert leg you could talk into
332
+ unnoticed. Guard them with `context.headless` or `channel.type` when a script runs in both modes.
297
333
 
298
334
  ### `channel.sip` Reference
299
335
 
300
- SIP-only unless noted. WS/headless: most methods are no-ops; `state` behaves as synthetic `active`.
336
+ SIP-only unless noted. WS/headless: most methods are no-ops and `state` behaves as synthetic
337
+ `active`, except `makeCall()` and `bridge()`, which throw.
301
338
 
302
339
  | Member | Description |
303
340
  | --- | --- |
@@ -308,10 +345,10 @@ SIP-only unless noted. WS/headless: most methods are no-ops; `state` behaves as
308
345
  | `early$` | Emits once when RTP is up before final answer |
309
346
  | `answered$` | Emits once on 200 OK |
310
347
  | `dtmf$` | Remote DTMF digits (`DtmfEvent`: `digit`, `duration`) |
311
- | `sipInfo$` | Live incoming SIP INFO (`SipInfo`: `contentType`, `body`) |
312
- | `sipSignal$` | Low-level SIP stack events (`SipSignal`; `sdp` only on that callback) |
348
+ | `sipInfo$` | Mid-call SIP INFO (`contentType` + `body` only; INFO headers not exposed) |
349
+ | `sipSignal$` | Low-level stack events (`statusCode` / `statusPhrase` / optional `sdp`; no headers) |
313
350
  | `remoteSdp` | Latest negotiated remote SDP body; updates when new SDP arrives |
314
- | `inviteSipHeaders` | Inbound INVITE header snapshot (`SipInviteHeaders`); does not update |
351
+ | `inviteSipHeaders` | Start-of-call inbound INVITE header snapshot; does not update |
315
352
  | `getRemoteSdpDetails()` | Parse `remoteSdp` → `ParsedSdpDetails` (session + `a=` attributes) |
316
353
  | `sendProgress()` | Inbound: send 183 Session Progress → `early` |
317
354
  | `waitForEarly()` | Await `early` or `active` (Promise) |
@@ -327,8 +364,8 @@ SIP-only unless noted. WS/headless: most methods are no-ops; `state` behaves as
327
364
 
328
365
  Prefer `dtmf$` over `sipInfo$` for DTMF. Prefer `state$` / `early$` / `answered$` over raw
329
366
  `sipSignal$` for call lifecycle. Use `remoteSdp` / `getRemoteSdpDetails()` for negotiated
330
- media description; use `inviteSipHeaders` for routing headers from the inbound INVITE.
331
- See **SIP Signalling Metadata** above.
367
+ media description; use `inviteSipHeaders` for start-of-call INVITE headers and `sipInfo$`
368
+ for mid-call INFO body. See **When to use what** under SIP Signalling Metadata above.
332
369
 
333
370
  ### SIP Bridge
334
371
 
@@ -592,7 +629,7 @@ When phrase persistence is enabled, `preload()` can store decoded audio for late
592
629
 
593
630
  `ttsStrategy` controls how text is chunked:
594
631
 
595
- - `sentence`: split on sentence boundaries and synthesize each sentence. This is the default.
632
+ - `sentence`: split on sentence boundaries and synthesize each sentence. This is the default. Only one sentence is synthesized at a time; when synthesis of N finishes, N+1 starts immediately while N continues playing from the mixer queue. Sentence N is fired as soon as its text is complete — it never waits for sentence N+1. For ElevenLabs HTTP TTS, each request gets `previous_text` / `next_text` when those neighbor texts are already available (e.g. full string already split); on an LLM stream typically only `previous_text` is known at fire time. Scripts do not need to set these fields. `eleven_v3` does not support those fields (API 400), so they are omitted for that model. The TTS cache key is still the sentence text only (neighbors are not part of the key), so cache hits may replay audio synthesized under a different neighbor context.
596
633
  - `streaming`: send chunks incrementally for streaming-capable vendors.
597
634
  - `full`: accumulate the whole input and synthesize it as one segment after the input completes.
598
635
 
@@ -931,7 +968,7 @@ return {
931
968
  };
932
969
  ```
933
970
 
934
- - **`output`** — stored in dialog stats / host persistence.
971
+ - **`output`** — stored in dialog stats / host persistence. This is **not** the LE `dialog.result` lifecycle column — that is `platform.dialog.result` (see [Dialog State](#dialog-state)).
935
972
  - **`error`** — optional; usually auto-populated on crash, but scripts may set it explicitly.
936
973
 
937
974
  **Do not** return `env` from the script. Persist state via `context.env$`; the runtime snapshots it
@@ -947,6 +984,8 @@ messaging, etc.
947
984
  **`context.headless === true` only means “no live SIP/media”.** It does **not** tell you whether
948
985
  the run is before or after a call. For that, use `getScriptPhase`.
949
986
 
987
+ The return value is the `ScriptPhase` union — one of the phases in the table below.
988
+
950
989
  | Phase | `context.headless` | When | Typical `context.entryPoint` |
951
990
  |-------|-------------------|------|--------------------------------|
952
991
  | `before_call` | `true` | Dialog queue / bulk outbound **before** the first platform call (often schedules `platform.call`) | empty, `main`, `default` |
@@ -1013,7 +1052,7 @@ export default defineScript(async ({ channel, context, logger, platform }) => {
1013
1052
 
1014
1053
  `platform` exposes platform operations.
1015
1054
 
1016
- `platform.nlu.extract(utterance, options?)` runs intent/entity extraction. If `options.context` is omitted, current dialog params are serialized and used as NLU context.
1055
+ `platform.nlu.extract(utterance, options?)` runs intent/entity extraction. If `options.context` is omitted or `null`, the runtime sends **no** NLU context — there is no auto-fill from dialog params or `flag`. Pass it explicitly when needed (logic-executor scripts usually pass `context.flag`). Default NLU language comes from the LE agent (`_nlu.language`), not `context.lang`.
1017
1056
 
1018
1057
  `platform.nlu.extract$()` is an Observable wrapper — one `extract()` call per subscription, not a streaming NLU session.
1019
1058
 
@@ -1021,20 +1060,64 @@ export default defineScript(async ({ channel, context, logger, platform }) => {
1021
1060
  const result = await platform.nlu.extract('I want to reschedule', {
1022
1061
  intents: ['reschedule', 'cancel'],
1023
1062
  entities: ['date', 'time'],
1063
+ context: context.flag,
1024
1064
  use_synonyms: true,
1025
1065
  });
1026
1066
  ```
1027
1067
 
1028
- Platform APIs (`platform.nlu`, `platform.call`, dialog writes, messaging, phrase records) are available when the host enables platform integration.
1068
+ Platform APIs (`platform.nlu`, `platform.call`, dialog writes, messaging, phrase records) are available when the host enables platform integration (`context.legacyV3Compat`).
1029
1069
 
1030
1070
  ### Dialog State
1031
1071
 
1072
+ `platform.dialog` reads and writes the LE **dialog row** — not SIP media and not the script return value.
1073
+
1074
+ #### What `platform.dialog.result` is
1075
+
1076
+ `platform.dialog.result` maps to the PostgreSQL column **`dialog.result`**: the **lifecycle status** of the dialog entity in the CMS / offline queue (in queue, in progress, closed). It is **not** the outcome of a SIP leg.
1077
+
1078
+ | Value | Meaning |
1079
+ | --- | --- |
1080
+ | `null` | Often after-call continuation: dialog re-enters queue-api, then becomes `queued` |
1081
+ | `queued` | In the offline queue, not yet claimed |
1082
+ | `pending` | In progress (live SIP/WS or claimed queue row) |
1083
+ | `done` | Dialog closed successfully (terminal for the pipeline) |
1084
+ | `error` | Dialog closed with a logic/runtime error |
1085
+
1086
+ The **host** also moves these statuses (live session → `pending`; shutdown without continuation → often `done` / `error`; automatic recall → `pending`; after-call chain → `null` + `entry_point` in params). Scripts set `platform.dialog.result` when they want to **explicitly** fix the LE dialog status (commonly `'done'` in a headless after-call handler). That does **not** replace `channel.sip.hangup()`.
1087
+
1088
+ #### Do not confuse
1089
+
1090
+ | API | Layer | Does | Does not |
1091
+ | --- | --- | --- | --- |
1092
+ | `platform.dialog.result` | LE `dialog` row | Lifecycle status (`done`, `pending`, …) | Hang up SIP; equal `call.result`; equal `ScriptResult.output` |
1093
+ | `platform.dialog.entryPoint` | LE `dialog.params` | Persist routing hint for later headless/queue runs | Change SIP state; select another script export |
1094
+ | `context.entryPoint` | `ScriptDialogContext` | **Snapshot** of `entry_point` at script start (`getScriptPhase`) | Persist if you assign it — write via `platform.dialog.entryPoint` |
1095
+ | `return { output }` / `ScriptResult` | Script return | dialog_stats / host dump | LE `dialog.result` column |
1096
+ | `channel.sip.hangup()` / `terminated$` | Media leg | End or observe SIP/WS media | Set `platform.dialog.result` by itself |
1097
+ | `call.result` (LE call row) | Per-call | SIP terminal code/phrase for CMS logs | Same as `dialog.result` |
1098
+
1099
+ There is no `context.result` field — read/write dialog lifecycle only through `platform.dialog.result`.
1100
+
1101
+ #### `entryPoint` write vs read
1102
+
1103
+ ```ts
1104
+ // Persist routing for the next offline run (dialog.params.entry_point)
1105
+ platform.dialog.entryPoint = 'on_recall';
1106
+
1107
+ // Snapshot for this run — use with getScriptPhase(context)
1108
+ logger.log('branch', { entryPoint: context.entryPoint });
1109
+ ```
1110
+
1111
+ `ScheduleCallOptions.entryPoint` on `platform.call()` is stored on the **call** row at schedule time — different from assigning `platform.dialog.entryPoint` mid-script.
1112
+
1113
+ #### Example
1114
+
1032
1115
  ```ts
1033
1116
  platform.dialog.entryPoint = 'on_recall';
1034
1117
  platform.dialog.result = 'done';
1035
1118
  ```
1036
1119
 
1037
- Setters update the local value immediately and persist to the platform asynchronously. They are not awaitable and should not be used as transactional writes.
1120
+ Setters update the local value immediately and persist asynchronously. They are not awaitable and should not be used as transactional writes. See [examples/after-call-continuation.ts](./examples/after-call-continuation.ts).
1038
1121
 
1039
1122
  ### Platform-Scheduled Calls
1040
1123
 
@@ -1350,7 +1433,7 @@ Agents with both CMS contact-rules and diagram `on_failed_call` handlers use the
1350
1433
  recall fields on `context` are informational unless your script passes them explicitly.
1351
1434
 
1352
1435
  `context.attempt` is the current recall attempt counter from `dialog.params.attempt` (starts at 0).
1353
- `context.entryPoint` is the routing branch for this run (e.g. after a failed call).
1436
+ `context.entryPoint` is the routing branch **snapshot** for this run (from `dialog.params.entry_point` at start). To persist a new value, assign `platform.dialog.entryPoint` — see [Dialog State](#dialog-state).
1354
1437
 
1355
1438
  ```ts
1356
1439
  // Use effective values when scheduling the next outbound leg
@@ -1397,7 +1480,7 @@ Important fields:
1397
1480
  - `context.flag`: business flag.
1398
1481
  - `context.initialData`: shallow snapshot of params at script start.
1399
1482
  - `context.dialogParams`: live param map for the run.
1400
- - `context.entryPoint`: current routing entry point (see [Script Lifecycle](#script-lifecycle-getscriptphase)).
1483
+ - `context.entryPoint`: routing entry point **snapshot** at script start (see [Script Lifecycle](#script-lifecycle-getscriptphase)); persist changes via `platform.dialog.entryPoint`.
1401
1484
  - `context.attempt`: current recall attempt number (`dialog.params.attempt`; use with `phase === 'online'`).
1402
1485
  - `context.recallCount` / `context.recallDelay`: effective recall settings for this dialog/call.
1403
1486
  - `context.agent?.recallCount` / `context.agent?.recallDelay`: CMS agent defaults (immutable snapshot).
@@ -1405,6 +1488,8 @@ Important fields:
1405
1488
  - `context.runTime`: async execution budget helper.
1406
1489
  - `context.env$`: persisted dialog environment as an RxJS `BehaviorSubject`.
1407
1490
 
1491
+ Dialog lifecycle status (`dialog.result`) is **not** on `context` — use `platform.dialog.result` ([Dialog State](#dialog-state)).
1492
+
1408
1493
  Use `env$` for persisted script state:
1409
1494
 
1410
1495
  ```ts
@@ -1440,8 +1525,9 @@ WS channels behave like active media channels:
1440
1525
  Headless channels are for offline, queue, or messaging sessions:
1441
1526
 
1442
1527
  - Audio methods are no-ops that log warnings.
1443
- - SIP methods are mostly no-ops.
1444
- - `createAsr()` returns an inert handle.
1528
+ - SIP methods are no-ops, except `makeCall()` and `bridge()`, which throw: there is no real leg to
1529
+ create, and a silent no-op would hide the mistake.
1530
+ - `createAsr()` returns an inert handle whose observables complete immediately.
1445
1531
  - LLM, NLU, messaging, platform calls, dialog state, and `env$` still work.
1446
1532
 
1447
1533
  Use `context.headless` plus `getScriptPhase(context)` when a script must behave differently without a
@@ -5,11 +5,18 @@ export interface DtmfEvent {
5
5
  /** Duration of the tone in milliseconds, normalized by the channel when available. */
6
6
  duration: number;
7
7
  }
8
- /** Incoming SIP INFO message on a live SIP call leg. */
8
+ /**
9
+ * Incoming SIP INFO on a live call leg — mid-call signalling only.
10
+ *
11
+ * The host exposes **`contentType` + `body` only**. SIP headers on the INFO
12
+ * request (e.g. `X-language`) are **not** forwarded. Prefer
13
+ * {@link import('./sip').ChannelSip.dtmf$} for DTMF. Start-of-call INVITE
14
+ * headers are {@link import('./sip').ChannelSip.inviteSipHeaders}, not this type.
15
+ */
9
16
  export interface SipInfo {
10
17
  /** MIME content type (e.g. `"application/dtmf-relay"`, `"application/xml"`). */
11
18
  contentType: string;
12
- /** Raw message body as received from the stack. */
19
+ /** Raw message body as received from the stack (not INFO SIP headers). */
13
20
  body: string;
14
21
  }
15
22
  /** Low-level Sofia SIP stack state-change event (see also {@link import('./sip').SipState}). */
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/types/events.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,MAAM,WAAW,SAAS;IACxB,qFAAqF;IACrF,KAAK,EAAE,MAAM,CAAC;IACd,sFAAsF;IACtF,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wDAAwD;AACxD,MAAM,WAAW,OAAO;IACtB,gFAAgF;IAChF,WAAW,EAAE,MAAM,CAAC;IACpB,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;CACd;AAED,gGAAgG;AAChG,MAAM,WAAW,SAAS;IACxB,sGAAsG;IACtG,KAAK,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,+FAA+F;AAC/F,MAAM,WAAW,WAAW;IAC1B,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,mFAAmF;IACnF,OAAO,EAAE,OAAO,CAAC;CAClB"}
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/types/events.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,MAAM,WAAW,SAAS;IACxB,qFAAqF;IACrF,KAAK,EAAE,MAAM,CAAC;IACd,sFAAsF;IACtF,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,OAAO;IACtB,gFAAgF;IAChF,WAAW,EAAE,MAAM,CAAC;IACpB,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAC;CACd;AAED,gGAAgG;AAChG,MAAM,WAAW,SAAS;IACxB,sGAAsG;IACtG,KAAK,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,+FAA+F;AAC/F,MAAM,WAAW,WAAW;IAC1B,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,mFAAmF;IACnF,OAAO,EAAE,OAAO,CAAC;CAClB"}
@@ -21,10 +21,12 @@ export interface NluExtractOptions {
21
21
  /** Legacy compatibility field; mapped to exclude policy on nlu-engine. */
22
22
  intents_exclude?: string | string[] | null;
23
23
  /**
24
- * Additional context for disambiguation.
24
+ * Opaque NLU disambiguation context (not {@link import('./script-context').ScriptDialogContext}).
25
25
  *
26
- * Objects and arrays are JSON-stringified before sending. When omitted, the runtime
27
- * uses dialog `flag` (logic-executor scripts usually pass the same value explicitly).
26
+ * Objects and arrays are JSON-stringified before sending. When omitted or `null`,
27
+ * the runtime sends **no** NLU context (`null`) there is no auto-fill from dialog
28
+ * params or `flag`. Pass explicitly when needed (logic-executor scripts usually pass
29
+ * `context.flag`).
28
30
  */
29
31
  context?: string | unknown[] | Record<string, unknown> | null;
30
32
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"nlu.d.ts","sourceRoot":"","sources":["../../src/types/nlu.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAAC;IACpC,0EAA0E;IAC1E,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAAC;IAC5C;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAAC;IACnC,0EAA0E;IAC1E,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U,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;IACxC,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;IACxC,YAAY,IAAI,OAAO,CAAC;IACxB,WAAW,IAAI,OAAO,CAAC;IACvB,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,mBAAmB,GAAG,IAAI,CAAC;IACxE,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,mBAAmB,GAAG,IAAI,CAAC;IACxE,yBAAyB,IAAI,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IACjE,wBAAwB,IAAI,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAChE,IAAI,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,SAAS,IAAI,MAAM,CAAC;CACrB"}
@@ -42,12 +42,15 @@ export interface ScheduleCallOptions {
42
42
  /** Deadline — don't call after this time. */
43
43
  dateEnd?: string | Date;
44
44
  /**
45
- * Optional label stored in call params as `entry_point` (LE DB compatibility).
45
+ * Optional label stored on the **call** row as `call.params.entry_point` (LE DB compatibility)
46
+ * at schedule time. This is not the same as assigning {@link DialogApi.entryPoint} mid-script
47
+ * (that writes `dialog.params.entry_point`).
46
48
  *
47
49
  * The host always runs your single `defineScript` export — it does **not** invoke a
48
50
  * separate function by this name (unlike logic-executor Python `run_unit(entry_point=...)`).
49
51
  * Use {@link import('./script-context').ScriptDialogContext.entryPoint} inside the handler
50
- * if you branch manually (e.g. headless after-call via {@link getScriptPhase}).
52
+ * if you branch manually (e.g. headless after-call via
53
+ * {@link import('./script-context').getScriptPhase}).
51
54
  */
52
55
  entryPoint?: string;
53
56
  /**
@@ -85,16 +88,21 @@ export interface ScheduleCallOptions {
85
88
  * Mutually exclusive with {@link onFailedCall}.
86
89
  */
87
90
  recallDelay?: number;
88
- /** Entry point to use after a successful call. Stored as `on_success_call`. */
91
+ /**
92
+ * Headless handler name after a successful call. Stored as `on_success_call`.
93
+ * On shutdown the host may set `dialog.result = null` and `dialog.params.entry_point` to this
94
+ * value so the dialog re-enters the offline queue for continuation.
95
+ */
89
96
  onSuccessCall?: string;
90
97
  /**
91
98
  * Headless handler after a failed outbound. Stored as `on_failed_call`.
92
99
  *
93
- * Activates **after-call continuation**: the host sets `dialog.params.entry_point` and re-runs this
94
- * script with `getScriptPhase` `after_call_failed`. Mutually exclusive with automatic recall
95
- * ({@link recallCount} + {@link recallDelay}) on the same `platform.call()`. If both are present,
96
- * the host keeps this option and drops recall. When set (including via Omni `scheduleOutbound`
97
- * defaults), CMS recall is not auto-copied onto the `call` row.
100
+ * Activates **after-call continuation**: the host sets `dialog.params.entry_point` (and typically
101
+ * `dialog.result = null`) and re-runs this script with
102
+ * {@link import('./script-context').getScriptPhase} `after_call_failed`. Mutually exclusive
103
+ * with automatic recall ({@link recallCount} + {@link recallDelay}) on the same `platform.call()`.
104
+ * If both are present, the host keeps this option and drops recall. When set (including via Omni
105
+ * `scheduleOutbound` defaults), CMS recall is not auto-copied onto the `call` row.
98
106
  */
99
107
  onFailedCall?: string;
100
108
  /** Call priority (higher = processed sooner by dialer). */
@@ -115,21 +123,44 @@ export interface ScheduleCallOptions {
115
123
  bulkUuid?: string;
116
124
  }
117
125
  /**
118
- * Dialog state APIread and update dialog routing metadata.
126
+ * LE **dialog row** helpers lifecycle status (`result`) and routing (`entryPoint`).
119
127
  *
128
+ * These fields map to the Voctiv platform `dialog` table, not to SIP media.
120
129
  * Setting `entryPoint` or `result` updates the local value immediately and asks
121
- * the Voctiv platform database to persist the change asynchronously. In worker
122
- * sessions the setter sends an RPC to the main thread; in direct sessions errors
123
- * are logged. There is no awaitable setter, so do not use it for transactional flow.
130
+ * the database to persist asynchronously (worker RPC or direct session). Setters
131
+ * are not awaitable do not use them for transactional flow.
132
+ *
133
+ * Do **not** confuse with {@link import('./sip').ChannelSip.hangup}, SIP
134
+ * `call.result`, or {@link import('./script-context').ScriptResult}.
124
135
  */
125
136
  export interface DialogApi {
126
- /** Value from `dialog.params.entry_point` — for branching inside `defineScript`, not a separate runtime entry. */
137
+ /**
138
+ * Writable routing hint persisted as `dialog.params.entry_point`.
139
+ *
140
+ * Distinct from the read-only snapshot
141
+ * {@link import('./script-context').ScriptDialogContext.entryPoint} taken at
142
+ * script start. Assigning here does **not** select a different script export —
143
+ * the host always runs the same `defineScript` handler; branch with
144
+ * {@link import('./script-context').getScriptPhase} / `context.entryPoint`.
145
+ */
127
146
  entryPoint: string | undefined;
128
- /** Dialog outcome (e.g. `"done"`, `"busy"`, `"no_answer"`). Set to finalize dialog. */
147
+ /**
148
+ * Lifecycle status of the LE **`dialog.result`** column (queue / CMS), not the
149
+ * SIP call outcome.
150
+ *
151
+ * Typical values: `"pending"` (in progress), `"queued"` (offline queue),
152
+ * `"done"` / `"error"` (terminal), or `null` (e.g. after-call continuation so
153
+ * the dialog re-enters the queue). The host also sets these on live session
154
+ * start and shutdown.
155
+ *
156
+ * Does **not** hang up SIP or change `channel.sip.state`. Not
157
+ * {@link import('./script-context').ScriptResult}, not `call.result` (per-leg
158
+ * SIP code/phrase for CMS logs).
159
+ */
129
160
  result: string | undefined;
130
- /** Dialog UUID (read-only). */
161
+ /** Same dialog UUID as {@link import('./script-context').ScriptDialogContext.dialogUuid}. */
131
162
  readonly uuid: string;
132
- /** Caller msisdn (read-only). */
163
+ /** Same caller identity as {@link import('./script-context').ScriptDialogContext.msisdn}. */
133
164
  readonly msisdn: string;
134
165
  }
135
166
  /** Options for sending an outbound message via {@link MessagingApi.send}. */
@@ -191,7 +222,10 @@ export interface MessagingApi {
191
222
  export interface PlatformApi {
192
223
  /** NLU intent/entity extraction API; throws outside legacy V3 compatibility mode. */
193
224
  readonly nlu: NluScriptApi;
194
- /** Dialog state — read/write entry point and result. */
225
+ /**
226
+ * LE dialog lifecycle and routing ({@link DialogApi.result}, {@link DialogApi.entryPoint}).
227
+ * Not SIP hangup / media — see {@link import('./sip').ChannelSip}.
228
+ */
195
229
  readonly dialog: DialogApi;
196
230
  /** Messaging API — send and receive external messages. */
197
231
  readonly messaging: MessagingApi;
@@ -1 +1 @@
1
- {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/types/platform.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,KAAK,EACV,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;;;;;;OAWG;IACH,OAAO,CACL,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,cAAc,CAAC,CAAC;IAC3B;;;;;OAKG;IACH,QAAQ,CACN,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,UAAU,CAAC,cAAc,CAAC,CAAC;CAC/B;AAED,4EAA4E;AAC5E,MAAM,WAAW,mBAAmB;IAClC,+CAA+C;IAC/C,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+EAA+E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E"}
@@ -145,7 +145,13 @@ export interface ScriptDialogContext {
145
145
  * {@link import('./mixer').PlayOptions} to select **`key_storage.name`** when LE credential maps exist.
146
146
  */
147
147
  availableMediaKeys?: string[];
148
- /** Script routing hint from `dialog.params.entry_point` — branch inside `defineScript`; not a separate host entry. */
148
+ /**
149
+ * Routing hint from `dialog.params.entry_point` **at script start** (snapshot).
150
+ *
151
+ * Use with {@link getScriptPhase} to branch inside the same `defineScript` export.
152
+ * Assigning this property does **not** persist — write via
153
+ * {@link import('./platform').DialogApi.entryPoint} (`platform.dialog.entryPoint`).
154
+ */
149
155
  entryPoint?: string;
150
156
  /** Current recall attempt number for this dialog (from `dialog.params.attempt`, starts at 0). */
151
157
  attempt?: number;
@@ -237,9 +243,15 @@ export interface ScriptError {
237
243
  /**
238
244
  * Value returned by a script function. Only `output` and `error` are valid fields.
239
245
  * Session state is updated via `context.env$`; the runtime snapshots it separately.
246
+ *
247
+ * This is **not** the LE `dialog.result` lifecycle column — that is
248
+ * {@link import('./platform').DialogApi.result} (`platform.dialog.result`).
240
249
  */
241
250
  export interface ScriptResult {
242
- /** Output data to store in dialog_stats. */
251
+ /**
252
+ * Output data for dialog_stats / host persistence.
253
+ * Not {@link import('./platform').DialogApi.result}.
254
+ */
243
255
  output?: Record<string, unknown>;
244
256
  /** Error details (auto-populated on script crash, or set manually). */
245
257
  error?: ScriptError;
@@ -1 +1 @@
1
- {"version":3,"file":"script-context.d.ts","sourceRoot":"","sources":["../../src/types/script-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,oEAAoE;AACpE,MAAM,WAAW,kBAAkB;IACjC,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,uFAAuF;AACvF,MAAM,WAAW,YAAY;IAC3B,4DAA4D;IAC5D,EAAE,CAAC,EAAE,MAAM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@@ -1 +1 @@
1
- {"version":3,"file":"script-context.js","sourceRoot":"","sources":["../../src/types/script-context.ts"],"names":[],"mappings":";;AAuQA,wCAcC;AApCD,MAAM,+BAA+B,GAAG,IAAI,GAAG,CAAC;IAC9C,iBAAiB;IACjB,oBAAoB;IACpB,cAAc;CACf,CAAC,CAAC;AACH,MAAM,8BAA8B,GAAG,IAAI,GAAG,CAAC;IAC7C,gBAAgB;IAChB,mBAAmB;CACpB,CAAC,CAAC;AACH,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,SAAgB,cAAc,CAAC,OAA4B;IACzD,IAAI,CAAC,OAAO,CAAC,QAAQ;QAAE,OAAO,QAAQ,CAAC;IAEvC,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC;IAE1D,IAAI,+BAA+B,CAAC,GAAG,CAAC,EAAE,CAAC;QAAE,OAAO,oBAAoB,CAAC;IACzE,IAAI,8BAA8B,CAAC,GAAG,CAAC,EAAE,CAAC;QAAE,OAAO,mBAAmB,CAAC;IACvE,IAAI,mBAAmB,CAAC,GAAG,CAAC,EAAE,CAAC;QAAE,OAAO,QAAQ,CAAC;IACjD,IAAI,EAAE,KAAK,yBAAyB,IAAI,OAAO,CAAC,cAAc;QAC5D,OAAO,WAAW,CAAC;IAErB,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,MAAM,IAAI,EAAE,KAAK,SAAS;QAAE,OAAO,aAAa,CAAC;IAEnE,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
1
+ {"version":3,"file":"script-context.js","sourceRoot":"","sources":["../../src/types/script-context.ts"],"names":[],"mappings":";;AA6QA,wCAcC;AApCD,MAAM,+BAA+B,GAAG,IAAI,GAAG,CAAC;IAC9C,iBAAiB;IACjB,oBAAoB;IACpB,cAAc;CACf,CAAC,CAAC;AACH,MAAM,8BAA8B,GAAG,IAAI,GAAG,CAAC;IAC7C,gBAAgB;IAChB,mBAAmB;CACpB,CAAC,CAAC;AACH,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,SAAgB,cAAc,CAAC,OAA4B;IACzD,IAAI,CAAC,OAAO,CAAC,QAAQ;QAAE,OAAO,QAAQ,CAAC;IAEvC,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC;IAE1D,IAAI,+BAA+B,CAAC,GAAG,CAAC,EAAE,CAAC;QAAE,OAAO,oBAAoB,CAAC;IACzE,IAAI,8BAA8B,CAAC,GAAG,CAAC,EAAE,CAAC;QAAE,OAAO,mBAAmB,CAAC;IACvE,IAAI,mBAAmB,CAAC,GAAG,CAAC,EAAE,CAAC;QAAE,OAAO,QAAQ,CAAC;IACjD,IAAI,EAAE,KAAK,yBAAyB,IAAI,OAAO,CAAC,cAAc;QAC5D,OAAO,WAAW,CAAC;IAErB,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,MAAM,IAAI,EAAE,KAAK,SAAS;QAAE,OAAO,aAAa,CAAC;IAEnE,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
@@ -133,15 +133,15 @@ export interface SipProgressEvent {
133
133
  * call state (e.g. create ASR only after media is available).
134
134
  */
135
135
  /**
136
- * SIP headers captured from an **inbound INVITE** at call setup.
136
+ * SIP headers captured from an **inbound INVITE** at call setup (start-of-call only).
137
137
  *
138
- * Keys use the on-wire header name (`Diversion`, `P-Asserted-Identity`, `X-Trunk-Id`, …).
139
- * Values are a single string or a string array when the same header appears multiple times
140
- * (e.g. several `Diversion` hops).
138
+ * Keys use the on-wire header name (`Diversion`, `P-Asserted-Identity`, `X-Trunk-Id`,
139
+ * `X-language`, …). Values are a single string or a string array when the same header
140
+ * appears multiple times (e.g. several `Diversion` hops).
141
141
  *
142
- * **Snapshot only** — does not update on 180/200, re-INVITE, or BYE. Outbound B-legs
143
- * typically have no INVITE snapshot (`undefined`). For carrier-specific extension headers,
144
- * prefer exact key names from your SBC; casing matches what Sofia exposes.
142
+ * **Snapshot only** — does not update on 180/200, re-INVITE, or BYE. Outbound B-legs /
143
+ * WS / headless typically have no snapshot (`undefined`). For mid-call peer signals use
144
+ * {@link ChannelSip.sipInfo$} (body/contentType only). Casing matches what Sofia exposes.
145
145
  */
146
146
  export type SipInviteHeaders = Record<string, string | string[]>;
147
147
  /**
@@ -187,10 +187,13 @@ export interface ChannelSip {
187
187
  */
188
188
  readonly dtmf$: Observable<DtmfEvent>;
189
189
  /**
190
- * Emits each incoming SIP INFO on this call leg (`contentType` + `body`).
190
+ * Mid-call SIP INFO stream use when the peer signals **during** the call
191
+ * (language change, vendor payload, etc.).
191
192
  *
192
- * Useful for carrier-specific signalling (e.g. `application/dtmf-relay`, XML payloads).
193
- * **Hot stream** events before subscribe are not replayed. Prefer {@link dtmf$} for DTMF.
193
+ * Each event is {@link SipInfo}: **`contentType` + `body` only**. Headers on
194
+ * the INFO request are not exposed. This does **not** update
195
+ * {@link inviteSipHeaders}. Prefer {@link dtmf$} for DTMF.
196
+ * **Hot stream** — events before subscribe are not replayed.
194
197
  *
195
198
  * ```ts
196
199
  * sip.sipInfo$.subscribe(({ contentType, body }) => {
@@ -216,7 +219,13 @@ export interface ChannelSip {
216
219
  */
217
220
  readonly remoteSdp?: string;
218
221
  /**
219
- * Snapshot of SIP headers from the **inbound INVITE** — see {@link SipInviteHeaders}.
222
+ * **Start-of-call** snapshot of SIP headers from the **inbound INVITE**
223
+ * (routing, `X-Trunk-Id`, `X-Neuro-UUID`, `X-language`, …). See {@link SipInviteHeaders}.
224
+ *
225
+ * Does **not** update on 180/200/re-INVITE/BYE. Outbound B-legs, WS, and headless
226
+ * usually have `undefined`. For mid-call peer signals use {@link sipInfo$}
227
+ * (body/contentType only — INFO headers are not available). Live response
228
+ * headers are not exposed; {@link sipSignal$} has status code/phrase/SDP only.
220
229
  *
221
230
  * ```ts
222
231
  * const h = channel.sip.inviteSipHeaders;
@@ -1 +1 @@
1
- {"version":3,"file":"sip.d.ts","sourceRoot":"","sources":["../../src/types/sip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,QAAQ,GAChB,MAAM,GACN,SAAS,GACT,OAAO,GACP,QAAQ,GACR,SAAS,GACT,YAAY,CAAC;AAEjB;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,gBAAgB;IAC/B,iCAAiC;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,4EAA4E;IAC5E,YAAY,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8EG;AACH;;;;;;;;;;GAUG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;AAEjE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,gBAAgB;IAC/B,6EAA6E;IAC7E,OAAO,EAAE;QACP,yCAAyC;QACzC,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,yBAAyB;QACzB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,+DAA+D;QAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,6CAA6C;QAC7C,UAAU,CAAC,E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,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjD;;;;;;;OAOG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAElD;;;;;OAKG;IACH,IAAI,IAAI,IAAI,CAAC;IAEb;;OAEG;IACH,MAAM,IAAI,IAAI,CAAC;IAEf;;;;;;OAMG;IACH,IAAI,IAAI,IAAI,CAAC;IAEb,8EAA8E;IAC9E,MAAM,IAAI,IAAI,CAAC;IAEf;;;;;OAKG;IACH,MAAM,IAAI,IAAI,CAAC;IAEf;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,MAAM,IAAI,IAAI,CAAC;IAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwCG;IACH,YAAY,IAAI,IAAI,CAAC;IAErB;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,QAAQ,CAAC,IAAI,EAAE;QACb,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACzC,mBAAmB,CAAC,EAAE;YACpB,SAAS,EAAE,MAAM,CAAC;YAClB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;SAC1C,CAAC;KACH,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAE1B;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,IAAI,CAAC;CACzC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voctiv/agent-sdk",
3
- "version": "0.2.15",
3
+ "version": "0.2.16",
4
4
  "description": "Voctiv TypeScript agent SDK: defineScript and platform types for the voice/dialog scripting runtime.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "",