@xema/omni-protocol 0.1.86 → 0.1.87
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 +6 -6
- package/dist/index.js +1 -1
- package/dist/validation.js +3 -3
- package/guide.md +19 -11
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -245,7 +245,7 @@ export interface TeamCapabilities {
|
|
|
245
245
|
leadAssistControl?: true;
|
|
246
246
|
/**
|
|
247
247
|
* This lead may listen to a member's call unasked, in these modes and no others. Whisper 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
|
*/
|
|
251
251
|
monitorControl?: MonitorMode[];
|
|
@@ -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, `
|
|
257
|
+
* `whisper` is heard by the agent alone, `join-call` by everyone on the call.
|
|
258
258
|
*/
|
|
259
|
-
export type MonitorMode = "monitor" | "whisper" | "
|
|
260
|
-
export declare const MONITOR_MODES: readonly ["monitor", "whisper", "
|
|
259
|
+
export type MonitorMode = "monitor" | "whisper" | "join-call";
|
|
260
|
+
export declare const MONITOR_MODES: readonly ["monitor", "whisper", "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,7 +1373,7 @@ 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 `
|
|
1376
|
+
* `whisper` 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 = {
|
|
@@ -1382,7 +1382,7 @@ export type TeamMonitorCommand = {
|
|
|
1382
1382
|
} | {
|
|
1383
1383
|
type: "whisper";
|
|
1384
1384
|
} | {
|
|
1385
|
-
type: "
|
|
1385
|
+
type: "join-call";
|
|
1386
1386
|
} | {
|
|
1387
1387
|
type: "leave";
|
|
1388
1388
|
};
|
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", "
|
|
29
|
+
export const MONITOR_MODES = ["monitor", "whisper", "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"];
|
package/dist/validation.js
CHANGED
|
@@ -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,
|
|
91
|
+
const MONITOR_MODES = membersOf({ monitor: true, whisper: 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
|
|
2719
|
+
* The modes a lead may listen in, as a list: whisper 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
|
|
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");
|
|
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, `
|
|
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**. |
|
|
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" | "
|
|
249
|
+
type MonitorMode = "monitor" | "whisper" | "join-call";
|
|
250
250
|
|
|
251
251
|
type TeamCapabilities = {
|
|
252
252
|
breakControl?: true;
|
|
@@ -1050,7 +1050,7 @@ type TeamLeadAssistCommandRequest = {
|
|
|
1050
1050
|
type TeamMonitorCommand =
|
|
1051
1051
|
| { type: "monitor"; memberId: UserId }
|
|
1052
1052
|
| { type: "whisper" }
|
|
1053
|
-
| { type: "
|
|
1053
|
+
| { type: "join-call" }
|
|
1054
1054
|
| { type: "leave" };
|
|
1055
1055
|
|
|
1056
1056
|
type TeamMonitorCommandRequest = {
|
|
@@ -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`, `
|
|
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**. |
|
|
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,21 +4185,28 @@ 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
|
+
The user-facing action is **Join call**. The command and monitoring mode are `join-call`.
|
|
4189
|
+
Migration: replace the former barge literal in `TeamMonitorCommand`, `MonitorMode`,
|
|
4190
|
+
`team.monitorControl`, and the task’s `monitoring.mode`. `MONITOR_MODES` exports the new literal;
|
|
4191
|
+
no legacy alias is accepted. Update commands, capability declarations and retained snapshots
|
|
4192
|
+
together. The lead must already be monitoring and permitted to use this mode. Everyone on the
|
|
4193
|
+
call hears the lead; this does not transfer ownership or invoke lead-assist takeover.
|
|
4194
|
+
|
|
4188
4195
|
A lead may listen to a member's call without being asked -- to coach, to check quality, to step in
|
|
4189
4196
|
when it goes wrong. This is not lead assist: nobody requested it, the member's task says nothing
|
|
4190
4197
|
about it, and there is no take-over in it. A lead who wants the call itself uses lead assist. The
|
|
4191
|
-
three modes
|
|
4198
|
+
three modes determine who hears the lead:
|
|
4192
4199
|
|
|
4193
4200
|
| Mode | Who hears the lead |
|
|
4194
4201
|
| --- | --- |
|
|
4195
4202
|
| `monitor` | Nobody. The lead hears both sides in silence. |
|
|
4196
4203
|
| `whisper` | The agent alone. The customer hears nothing. |
|
|
4197
|
-
| `
|
|
4204
|
+
| `join-call` | Everyone on the call. |
|
|
4198
4205
|
|
|
4199
4206
|
The login says which modes this lead has, as a list on `team.monitorControl`, and it always
|
|
4200
|
-
includes `monitor`, because whisper and
|
|
4207
|
+
includes `monitor`, because whisper and join-call begin from one
|
|
4201
4208
|
(`authentication.capability.team.monitorControl.monitor`). A centre that lets every lead listen but
|
|
4202
|
-
reserves
|
|
4209
|
+
reserves joining the call declares `["monitor", "whisper"]`, and Omni offers no Join call to that lead. The
|
|
4203
4210
|
declaration requires `executeTeamMonitor`, gated exactly as `executeTeamLeadAssist` is by
|
|
4204
4211
|
`team.leadAssistControl`.
|
|
4205
4212
|
|
|
@@ -4213,7 +4220,7 @@ executeTeamMonitor({ command: { type: "monitor", memberId: "A-1" } })
|
|
|
4213
4220
|
|
|
4214
4221
|
// 3. The lead changes how they are heard; the provider restates the task with the new mode.
|
|
4215
4222
|
executeTeamMonitor({ command: { type: "whisper" } })
|
|
4216
|
-
executeTeamMonitor({ command: { type: "
|
|
4223
|
+
executeTeamMonitor({ command: { type: "join-call" } })
|
|
4217
4224
|
|
|
4218
4225
|
// 4. The lead leaves; their task ends with `{ type: "left" }`. The member's call goes on.
|
|
4219
4226
|
executeTeamMonitor({ command: { type: "leave" } })
|
|
@@ -4221,9 +4228,10 @@ executeTeamMonitor({ command: { type: "leave" } })
|
|
|
4221
4228
|
|
|
4222
4229
|
**The lead's task is what gives them audio**: Omni opens media on it as on any voice task, and the
|
|
4223
4230
|
provider bridges the lead's leg into the member's call in the mode stated. `monitoring.mode` is
|
|
4224
|
-
the state, restated on every change, and a `whisper` or `
|
|
4231
|
+
the state, restated on every change, and a `whisper` or `join-call` the login's list does not include
|
|
4225
4232
|
is answered `failed`. **A lead listens to one call at a time** (`snapshot.monitoring.single`), and
|
|
4226
|
-
a task
|
|
4233
|
+
a task carries lead assistance or monitoring, never both (`task.monitoring.assisting`).
|
|
4234
|
+
The `join-call` mode still belongs to monitoring; it does not create `assisting`. The member's
|
|
4227
4235
|
call ending ends the lead's task as it ends the member's, with `left`, since the lead was never
|
|
4228
4236
|
working on it.
|
|
4229
4237
|
|