@xema/omni-protocol 0.1.87 → 0.1.88

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
@@ -244,7 +244,7 @@ export interface TeamCapabilities {
244
244
  /** This lead may join a member's call on request. Requires `executeTeamLeadAssist`. */
245
245
  leadAssistControl?: true;
246
246
  /**
247
- * This lead may listen to a member's call unasked, in these modes and no others. Whisper and
247
+ * This lead may listen to a member's call unasked, in these modes and no others. Coach and
248
248
  * join-call begin from a monitor, so the list always includes `monitor`. Nothing of it reaches the
249
249
  * member's task. Requires `executeTeamMonitor`.
250
250
  */
@@ -254,10 +254,10 @@ export interface TeamCapabilities {
254
254
  }
255
255
  /**
256
256
  * How a lead listening to a member's call is heard: `monitor` hears both sides in silence,
257
- * `whisper` is heard by the agent alone, `join-call` by everyone on the call.
257
+ * `coach` is heard by the agent alone, `join-call` by everyone on the call.
258
258
  */
259
- export type MonitorMode = "monitor" | "whisper" | "join-call";
260
- export declare const MONITOR_MODES: readonly ["monitor", "whisper", "join-call"];
259
+ export type MonitorMode = "monitor" | "coach" | "join-call";
260
+ export declare const MONITOR_MODES: readonly ["monitor", "coach", "join-call"];
261
261
  /**
262
262
  * What this login may do, beyond any one task. It travels with the identity because it is part
263
263
  * of who the agent is on this provider: the provider knows the roles and says so at sign-in.
@@ -1373,14 +1373,14 @@ export interface TeamLeadAssistCommandRequest {
1373
1373
  }
1374
1374
  /**
1375
1375
  * A lead listening to a member's call. `monitor` starts one, silent, on a member from the team member list;
1376
- * `whisper` and `join-call` change how the standing one is heard; `leave` ends it. One member at a
1376
+ * `coach` and `join-call` change how the standing one is heard; `leave` ends it. One member at a
1377
1377
  * time, and only the modes the login's `monitorControl` lists.
1378
1378
  */
1379
1379
  export type TeamMonitorCommand = {
1380
1380
  type: "monitor";
1381
1381
  memberId: UserId;
1382
1382
  } | {
1383
- type: "whisper";
1383
+ type: "coach";
1384
1384
  } | {
1385
1385
  type: "join-call";
1386
1386
  } | {
package/dist/index.js CHANGED
@@ -26,7 +26,7 @@ export const IDLE_CAPABILITY_UI = {
26
26
  calendar: "Calendar",
27
27
  contacts: "Contacts",
28
28
  };
29
- export const MONITOR_MODES = ["monitor", "whisper", "join-call"];
29
+ export const MONITOR_MODES = ["monitor", "coach", "join-call"];
30
30
  export const MUTED_BY = ["host", "station"];
31
31
  export const HOST_MUTES = ["stream", "station"];
32
32
  export const RECORDING_ACTIONS = ["start", "pause", "resume", "stop", "cancel"];
@@ -88,7 +88,7 @@ const OFFERABLE_PHASES = membersOf({
88
88
  const PREVIEW_DEADLINES = membersOf({ calls: true, "host-calls": true, waits: true });
89
89
  const PHONES = membersOf({ softphone: true, deskPhone: true });
90
90
  const TEAM_CAPABILITIES = membersOf({ breakControl: true, leadAssistControl: true, policyControl: true, monitorControl: true });
91
- const MONITOR_MODES = membersOf({ monitor: true, whisper: true, "join-call": true });
91
+ const MONITOR_MODES = membersOf({ monitor: true, coach: true, "join-call": true });
92
92
  const COMPLETED_BY = membersOf({ agent: true, provider: true });
93
93
  const CANCELLED_BY = membersOf({ agent: true, provider: true, party: true });
94
94
  const EXPIRABLE_PHASES = membersOf({
@@ -2716,7 +2716,7 @@ function validateUserCapabilitiesInto(value, path, into, levels) {
2716
2716
  }
2717
2717
  }
2718
2718
  /**
2719
- * The modes a lead may listen in, as a list: whisper and join-call begin from a monitor, so a list
2719
+ * The modes a lead may listen in, as a list: coach and join-call begin from a monitor, so a list
2720
2720
  * without `monitor` names modes the lead could never reach.
2721
2721
  */
2722
2722
  function validateMonitorControl(value, path, into) {
@@ -2729,7 +2729,7 @@ function validateMonitorControl(value, path, into) {
2729
2729
  into.add("authentication.capability.team.monitorControl.unique", `${path}[${index}]`, `duplicate monitor mode: ${describeValue(mode)}`);
2730
2730
  }
2731
2731
  });
2732
- into.require(value.includes("monitor"), "authentication.capability.team.monitorControl.monitor", path, "whisper and join-call begin from a monitor: a lead who may listen in any mode may monitor");
2732
+ into.require(value.includes("monitor"), "authentication.capability.team.monitorControl.monitor", path, "coach and join-call begin from a monitor: a lead who may listen in any mode may monitor");
2733
2733
  }
2734
2734
  /**
2735
2735
  * A failure an authentication reports: on a `rejected` start or completion, or on an `expired`
package/guide.md CHANGED
@@ -40,7 +40,7 @@ are used precisely throughout and mean nothing looser here.
40
40
  | **Break** | A reported, supervised state in which the agent is not working — one with a reason, a decision behind it and a return. It covers what a platform may call *not-ready*, including equipment trouble. An agent who is merely at capacity is not on a break. |
41
41
  | **Workspace** | What Omni shows the agent. The **task workspace** holds the selected task, its controls and its browsers; the **idle workspace** holds what a provider contributes when no task is selected — dialpad, contacts, calendar, team member list. |
42
42
  | **Dial** | One outbound call the host asks a provider to place — from the idle dialpad, a cold or warm transfer, a conference add, or a connect-back. Identified by the host's `dialId`, accepted as `dialling`, and ended by exactly one `dial-outcome`. See **Every dial has an outcome**. |
43
- | **Monitor** | A lead listening to a member's call unasked, from the team member list: `monitor` in silence, `whisper` heard by the agent alone, `join-call` heard by everyone. Nothing of it reaches the member's task, and there is no take-over in it. See **Monitoring a call**. |
43
+ | **Monitor** | A lead listening to a member's call unasked, from the team member list: `monitor` in silence, `coach` heard by the agent alone, `join-call` heard by everyone. Nothing of it reaches the member's task, and there is no take-over in it. See **Monitoring a call**. |
44
44
  | **On the call** | Who a voice task's audio joins, or is bringing in, as the provider states it on `Task.onCall`: the party, the agents, and anyone consulted or conferenced in from the moment their dial is placed. |
45
45
 
46
46
  Six words describe *what state a thing is in*, and they are not interchangeable: each belongs to
@@ -246,7 +246,7 @@ type AuthenticationContext = {
246
246
  log?: (entry: unknown) => void;
247
247
  };
248
248
 
249
- type MonitorMode = "monitor" | "whisper" | "join-call";
249
+ type MonitorMode = "monitor" | "coach" | "join-call";
250
250
 
251
251
  type TeamCapabilities = {
252
252
  breakControl?: true;
@@ -1049,7 +1049,7 @@ type TeamLeadAssistCommandRequest = {
1049
1049
 
1050
1050
  type TeamMonitorCommand =
1051
1051
  | { type: "monitor"; memberId: UserId }
1052
- | { type: "whisper" }
1052
+ | { type: "coach" }
1053
1053
  | { type: "join-call" }
1054
1054
  | { type: "leave" };
1055
1055
 
@@ -1926,7 +1926,7 @@ them from what arrives later.
1926
1926
  | `team` | This login leads a team. The provider publishes a `TeamMembers` object to it on every snapshot — `members: []` when nobody is in it — and to nobody else. |
1927
1927
  | `team.breakControl` | This lead may act on their team's breaks through `executeTeamBreak` — place, release, decide, set policy — as far as the provider supports; a command it lacks answers `omni.capability-not-enabled`. Omni asks for a decision only against a member whose `break` is `awaiting-decision`, so a provider that grants on request is never asked to decide. Requires `executeTeamBreak`. |
1928
1928
  | `team.leadAssistControl` | This lead may join a member's call on request. Requires `executeTeamLeadAssist`. |
1929
- | `team.monitorControl` | This lead may listen to a member's call unasked, in the listed modes and no others: `monitor`, `whisper`, `join-call`. The list always includes `monitor`, since the other two begin from one. Requires `executeTeamMonitor`. See **Monitoring a call**. |
1929
+ | `team.monitorControl` | This lead may listen to a member's call unasked, in the listed modes and no others: `monitor`, `coach`, `join-call`. The list always includes `monitor`, since the other two begin from one. Requires `executeTeamMonitor`. See **Monitoring a call**. |
1930
1930
  | `team.policyControl` | This lead sets the team's policy per capability — on, off, or the person's — within what the queue allows. Requires `executeTeamPolicy`; the team member list carries `policies`. |
1931
1931
  | `preferences` | What the team left to this person, with where each stands and who set it. Omitted when nothing was. Requires `setPreference`. See **Who decides what an agent may do**. |
1932
1932
 
@@ -4185,6 +4185,13 @@ Lead and member alike are `UserId`s of this provider, so an adapter publishing t
4185
4185
 
4186
4186
  ### Monitoring a call
4187
4187
 
4188
+ **Coach** lets the lead speak privately to the agent; the caller cannot hear the lead.
4189
+ The command and monitoring mode are `coach`. Migration: replace the former whisper literal
4190
+ in `TeamMonitorCommand`, `MonitorMode`, `team.monitorControl`, and the task’s `monitoring.mode`.
4191
+ `MONITOR_MODES` exports `coach`; update command producers, permissions and retained snapshots
4192
+ together. No legacy alias is accepted. The lead must already be monitoring and permitted to
4193
+ coach. This mode does not join the audible caller conversation or take over the task.
4194
+
4188
4195
  The user-facing action is **Join call**. The command and monitoring mode are `join-call`.
4189
4196
  Migration: replace the former barge literal in `TeamMonitorCommand`, `MonitorMode`,
4190
4197
  `team.monitorControl`, and the task’s `monitoring.mode`. `MONITOR_MODES` exports the new literal;
@@ -4200,13 +4207,13 @@ three modes determine who hears the lead:
4200
4207
  | Mode | Who hears the lead |
4201
4208
  | --- | --- |
4202
4209
  | `monitor` | Nobody. The lead hears both sides in silence. |
4203
- | `whisper` | The agent alone. The customer hears nothing. |
4210
+ | `coach` | The agent alone. The customer hears nothing. |
4204
4211
  | `join-call` | Everyone on the call. |
4205
4212
 
4206
4213
  The login says which modes this lead has, as a list on `team.monitorControl`, and it always
4207
- includes `monitor`, because whisper and join-call begin from one
4214
+ includes `monitor`, because coach and join-call begin from one
4208
4215
  (`authentication.capability.team.monitorControl.monitor`). A centre that lets every lead listen but
4209
- reserves joining the call declares `["monitor", "whisper"]`, and Omni offers no Join call to that lead. The
4216
+ reserves joining the call declares `["monitor", "coach"]`, and Omni offers no Join call to that lead. The
4210
4217
  declaration requires `executeTeamMonitor`, gated exactly as `executeTeamLeadAssist` is by
4211
4218
  `team.leadAssistControl`.
4212
4219
 
@@ -4219,7 +4226,7 @@ executeTeamMonitor({ command: { type: "monitor", memberId: "A-1" } })
4219
4226
  // monitoring: { memberId: "A-1", taskId: "call-42", allocationId: "alloc-42", mode: "monitor", since }
4220
4227
 
4221
4228
  // 3. The lead changes how they are heard; the provider restates the task with the new mode.
4222
- executeTeamMonitor({ command: { type: "whisper" } })
4229
+ executeTeamMonitor({ command: { type: "coach" } })
4223
4230
  executeTeamMonitor({ command: { type: "join-call" } })
4224
4231
 
4225
4232
  // 4. The lead leaves; their task ends with `{ type: "left" }`. The member's call goes on.
@@ -4228,7 +4235,7 @@ executeTeamMonitor({ command: { type: "leave" } })
4228
4235
 
4229
4236
  **The lead's task is what gives them audio**: Omni opens media on it as on any voice task, and the
4230
4237
  provider bridges the lead's leg into the member's call in the mode stated. `monitoring.mode` is
4231
- the state, restated on every change, and a `whisper` or `join-call` the login's list does not include
4238
+ the state, restated on every change, and a `coach` or `join-call` the login's list does not include
4232
4239
  is answered `failed`. **A lead listens to one call at a time** (`snapshot.monitoring.single`), and
4233
4240
  a task carries lead assistance or monitoring, never both (`task.monitoring.assisting`).
4234
4241
  The `join-call` mode still belongs to monitoring; it does not create `assisting`. The member's
@@ -4246,7 +4253,7 @@ during a break whose active reason is of any other kind, or of no stated kind, i
4246
4253
  listening during a break declares that break `coaching`, `administrative` or `training`.
4247
4254
 
4248
4255
  **Nothing reaches the member.** The member's task carries no trace of a monitoring lead in any
4249
- mode: not on `onCall`, not in the record. Whether a whisper is announced to the agent is the
4256
+ mode: not on `onCall`, not in the record. Whether coaching is announced to the agent is the
4250
4257
  platform's business and travels on the audio, not on this wire.
4251
4258
 
4252
4259
  ```ts
@@ -4254,7 +4261,7 @@ const monitoringLead = {
4254
4261
  channel: "voice",
4255
4262
  capabilities: {},
4256
4263
  phase: "in-progress",
4257
- monitoring: { memberId: "A-1", taskId: "call-42", allocationId: "alloc-42", mode: "whisper", since: "2026-08-21T09:04:00Z" },
4264
+ monitoring: { memberId: "A-1", taskId: "call-42", allocationId: "alloc-42", mode: "coach", since: "2026-08-21T09:04:00Z" },
4258
4265
  } satisfies Pick<Task<"voice">, "channel" | "capabilities" | "phase" | "monitoring">;
4259
4266
  ```
4260
4267
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xema/omni-protocol",
3
- "version": "0.1.87",
3
+ "version": "0.1.88",
4
4
  "description": "The Omni protocol: the contract every provider adapter implements",
5
5
  "type": "module",
6
6
  "license": "MIT",