@xema/omni-protocol 0.1.89 → 0.1.90

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/dist/index.d.ts CHANGED
@@ -180,7 +180,7 @@ export interface Manifest<C extends Channel = Channel> {
180
180
  */
181
181
  runningStepReports?: true;
182
182
  /**
183
- * How long after an applied completion -- `complete`, or a lead's `take-over` -- the provider's
183
+ * How long after an applied completion -- `complete`, or a lead's `take-over-call` -- the provider's
184
184
  * `task-ended` is owed, in milliseconds. A warm transfer's `complete` is not one: the agent's
185
185
  * wrap runs after it as after any call. `applied` says the provider
186
186
  * has completed the task; the ending follows within this, or the host resyncs and shows the
@@ -879,7 +879,7 @@ export type TaskLeadAssist = {
879
879
  });
880
880
  /**
881
881
  * On the lead's own task for a call they joined: which member asked, with their note. Its
882
- * presence is what makes `lead-assist` `take-over` and `leave` issuable.
882
+ * presence is what makes `lead-assist` `take-over-call` and `leave` issuable.
883
883
  */
884
884
  export interface TaskAssisting {
885
885
  memberId: UserId;
@@ -1119,7 +1119,7 @@ export type VoiceTaskCommand = {
1119
1119
  /** The lead keeps the customer; the agent's task ends `transferred`. Needs `Task.assisting`. */
1120
1120
  | {
1121
1121
  type: "lead-assist";
1122
- action: "take-over";
1122
+ action: "take-over-call";
1123
1123
  }
1124
1124
  /** The lead drops; the agent continues. The lead's task ends `left`. Needs `Task.assisting`. */
1125
1125
  | {
@@ -2247,7 +2247,7 @@ export function validateHostReport(report, path = "host") {
2247
2247
  // Commands.
2248
2248
  // ---------------------------------------------------------------------------
2249
2249
  const TRANSFER_ACTIONS = ["cold", "warm", "complete", "cancel"];
2250
- const LEAD_ASSIST_ACTIONS = ["request", "cancel", "take-over", "leave"];
2250
+ const LEAD_ASSIST_ACTIONS = ["request", "cancel", "take-over-call", "leave"];
2251
2251
  const CONFERENCE_ACTIONS = ["add", "remove"];
2252
2252
  /** Validate the exact interaction/allocation target before provider command dispatch. */
2253
2253
  export function validateTaskCommandRequest(request, task, path = "request", taskContext) {
package/guide.md CHANGED
@@ -809,7 +809,7 @@ type VoiceTaskCommand =
809
809
  | { type: "transfer"; action: "cancel" }
810
810
  | { type: "lead-assist"; action: "request"; note?: string }
811
811
  | { type: "lead-assist"; action: "cancel" }
812
- | { type: "lead-assist"; action: "take-over" }
812
+ | { type: "lead-assist"; action: "take-over-call" }
813
813
  | { type: "lead-assist"; action: "leave" }
814
814
  | { type: "conference"; action: "add"; dialId: DialId; destinationId: string }
815
815
  | { type: "conference"; action: "remove"; destinationId: string; party?: never }
@@ -1613,7 +1613,7 @@ compile time.
1613
1613
  | `timeCheck` | Optional `true`: implements `checkTime` for fresh provider-clock samples; host polling is independently opt-in. |
1614
1614
  | `timestampAuthority` | Optional `"provider"`: provider timestamps are final; host instants are advisory. Omission makes no trust promise. |
1615
1615
  | `runningStepReports` | The provider takes running reports of a host-performed step — `recordStep` with `seconds` so far and no `ended`. Omitted, the host sends exactly two reports per leg, when it began and when it ended, and a running one is refused. See **The host records what it performs**. |
1616
- | `completionSettleMs` | Required. How long after an applied completion -- `complete`, or a lead's `take-over` -- the provider's `task-ended` is owed, a positive whole number of milliseconds (`manifest.completionSettleMs`). A warm transfer's `complete` is not final task completion: the agent's wrap runs after it. Stated per provider, since platforms settle at different speeds. See **`task-ended`**. |
1616
+ | `completionSettleMs` | Required. How long after an applied completion -- `complete`, or a lead's `take-over-call` -- the provider's `task-ended` is owed, a positive whole number of milliseconds (`manifest.completionSettleMs`). A warm transfer's `complete` is not final task completion: the agent's wrap runs after it. Stated per provider, since platforms settle at different speeds. See **`task-ended`**. |
1617
1617
 
1618
1618
  ### Authentication methods
1619
1619
 
@@ -2394,7 +2394,7 @@ time. Runtime conformance checks also require the task channel to match its prov
2394
2394
  | `interactionHistory` | The call record: `steps` — the ordered interaction history of this open task, one entry per occurrence, oldest first — and what they add up to before this agent, `interactionSeconds`, `holdSeconds`, `queueSeconds`, `transfers`, each present when the provider knows it. Live task data restated with the task, not a permanent archive. See **Interaction history**. |
2395
2395
  | `onCall` | Voice only. Who is on the call, or being brought onto it, as the provider states it, replaced whole with the task: `party` is the customer -- carrying a `stage` while being dialled again on the same task, a connect-back with the host's `dialId` or a platform's callback without, ringing from the moment the dial is placed and joined on its answered outcome --, `agent` a person by user id, `consulted` and `conferenced` somebody a dial is bringing in, listed from the moment the dial is placed -- with the `destinationId` dialled, the `dialId` where a host placed it, the `stage` reached (`ringing` until answered, `joined` after), and `held: true` on anyone joined and parked. A `consulted` entry is what makes `transfer` `complete` and `cancel` issuable. `label` names a destination -- a person, a queue -- not a phrase; the host supplies the verb. Present when the provider knows the room, absent when it does not. See **Every dial has an outcome**. |
2396
2396
  | `leadAssist` | Voice only. Present from the agent's request for a lead until the lead leaves or the request ends: `requested` while nobody has joined, `joined` with the lead's `leadId` once somebody has. See **Lead assist**. |
2397
- | `assisting` | Voice only, on the lead's own task for a call they joined: which member asked, with their note. Its presence is what makes `lead-assist` `take-over` and `leave` issuable. See **Lead assist**. |
2397
+ | `assisting` | Voice only, on the lead's own task for a call they joined: which member asked, with their note. Its presence is what makes `lead-assist` `take-over-call` and `leave` issuable. See **Lead assist**. |
2398
2398
  | `listening` | Voice only, on the lead's own task while they listen to a member's call: whose call, which call, and the `mode` they are heard in, restated on every change. Never on the member's task, and never together with `assisting`. See **Listening to a call**. |
2399
2399
 
2400
2400
  `TaskAttribute` entries carry typed detail alongside the task:
@@ -4158,12 +4158,19 @@ The request stands for another lead, as it does when this one is already on a ca
4158
4158
  provider clears `leadAssist` from the agent's task** and drops the request from every team member list. Nothing
4159
4159
  else changes; the agent is still on the call.
4160
4160
 
4161
+ **Take over call** uses `{ type: "lead-assist", action: "take-over-call" }`.
4162
+ The lead assumes the agent’s interaction; the caller’s wider journey continues.
4163
+ Migration: replace the former take-over action literal with `take-over-call` in hosts and
4164
+ providers together. The former spelling is rejected, with no compatibility alias.
4165
+ The `taken-over` task outcome and existing completion behavior remain unchanged.
4166
+ This action is distinct from `join-call`, which lets everyone hear a lead listening to a call.
4167
+
4161
4168
  The lead then has two commands on their copy, gated by `assisting` being present, and a third
4162
4169
  choice that is no command at all:
4163
4170
 
4164
4171
  | The lead | The agent's task | The lead's task |
4165
4172
  | --- | --- | --- |
4166
- | `{ type: "lead-assist", action: "take-over" }` | `task-media-ended`, then `task-ended` with `{ type: "taken-over", leadId }`: **no `completing` window**, the agent is idle at once. The audio ends first, as before every voice ending (`stream.taskEnded.mediaOpen`), and the lead is named by user id, since a lead is not a directory item | Continues alone, and ends as any call does |
4173
+ | `{ type: "lead-assist", action: "take-over-call" }` | `task-media-ended`, then `task-ended` with `{ type: "taken-over", leadId }`: **no `completing` window**, the agent is idle at once. The audio ends first, as before every voice ending (`stream.taskEnded.mediaOpen`), and the lead is named by user id, since a lead is not a directory item | Continues alone, and ends as any call does |
4167
4174
  | `{ type: "lead-assist", action: "leave" }` | Continues; `leadAssist` is cleared | `task-media-ended`, then `task-ended` with `{ type: "left" }` -- the call goes on without them |
4168
4175
  | Stays until the customer hangs up | `task-media-ended`, `completing`, its own outcome | The same, independently: **both have the completion window** |
4169
4176
 
@@ -4641,7 +4648,7 @@ declared:
4641
4648
  | `transfer` with `action: "warm"` | The `warmTransfer` capability. `action: "cold"` is gated by `coldTransfer`; the two are declared and offered separately. |
4642
4649
  | `transfer` with `action: "complete"` or `"cancel"` | A consultation in progress -- a `consulted` entry on `Task.onCall`. Without one there is nothing to complete or cancel, and a provider that receives either answers `failed`. |
4643
4650
  | `lead-assist` with `action: "request"` or `"cancel"` | The `leadAssist` capability. `cancel` needs a request standing -- `Task.leadAssist` with status `requested`. |
4644
- | `lead-assist` with `action: "take-over"` or `"leave"` | The lead's own task, on a call they joined -- `Task.assisting` present. An agent's task never has it, and a provider that receives either without it answers `failed`. |
4651
+ | `lead-assist` with `action: "take-over-call"` or `"leave"` | The lead's own task, on a call they joined -- `Task.assisting` present. An agent's task never has it, and a provider that receives either without it answers `failed`. |
4645
4652
  | `transfer` with a destination, `conference` with `action: "add"` | Its capability, and a `destinationId` the directory offered: the id Omni sends is the id the provider published (`command.destination.unknown`). |
4646
4653
  | `custom` | A control the task published under `capabilities.custom`, by its `id` (`command.capability.custom`), carrying a non-empty string for each `required` prompt field and strings for any optional fields supplied (`command.custom.prompt`). A toggle carries its target `on` boolean (`command.custom.on`). |
4647
4654
  | Everything else | Its own named capability. |
@@ -5044,7 +5051,7 @@ A `left` outcome ends the task for this agent alone: the call continues without
5044
5051
  when a lead who joined it leaves -- see **Lead assist**.
5045
5052
 
5046
5053
  A successful `complete` or `transfer` command does not clear the task. Omni waits for `task-ended`,
5047
- and not for ever: `applied` to a completion -- `complete`, or a lead's `take-over` -- says the
5054
+ and not for ever: `applied` to a completion -- `complete`, or a lead's `take-over-call` -- says the
5048
5055
  provider has completed the task, and its `task-ended` follows within the
5049
5056
  manifest's `completionSettleMs`. A provider never answers `applied` for a completion it has not yet
5050
5057
  performed. Past the bound the host calls `snapshot()`: a snapshot still carrying the task is a task
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xema/omni-protocol",
3
- "version": "0.1.89",
3
+ "version": "0.1.90",
4
4
  "description": "The Omni protocol: the contract every provider adapter implements",
5
5
  "type": "module",
6
6
  "license": "MIT",