@xema/omni-protocol 0.1.118 → 0.1.120

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/CALL_FLOW.md ADDED
@@ -0,0 +1,101 @@
1
+ # Call flow
2
+
3
+ How one agent's part of a phone call moves, from the offer to the moment it leaves the agent's
4
+ screen. Terms are in `GLOSSARY.md`; the rules are in `guide.md`, `guide/agent.md`,
5
+ `guide/voice.md` and `guide/phone.md`.
6
+
7
+ ## Where a call task stands
8
+
9
+ ```mermaid
10
+ stateDiagram-v2
11
+ [*] --> pending: task-offered
12
+ [*] --> in_progress: already underway on connect (snapshot)
13
+ pending --> confirmed: answered, waiting to connect
14
+ pending --> in_progress: answered and connected at once
15
+ pending --> [*]: declined, withdrawn, caller hung up (cancelled) or offer ran out (expired)
16
+ confirmed --> preview: outbound record shown first
17
+ confirmed --> in_progress: work begins
18
+ preview --> in_progress: agent presses Call, customer answers
19
+ preview --> completing: the call goes out and nobody answers
20
+ in_progress --> paused: hold
21
+ paused --> in_progress: resume
22
+ in_progress --> completing: end call, or the caller hangs up
23
+ completing --> in_progress: connect back
24
+ completing --> [*]: complete (task-ended)
25
+ in_progress --> [*]: completed straight from the call (task-ended)
26
+
27
+ state "in-progress" as in_progress
28
+ ```
29
+
30
+ | Phase | What the agent sees | Default label |
31
+ | --- | --- | --- |
32
+ | `pending` | The phone rings, with Answer and maybe Decline. | Offered |
33
+ | `confirmed` | Answered, waiting for the call to connect. Many platforms skip it. | Accepted |
34
+ | `preview` | An outbound customer's record, with a Call button and maybe a countdown. | Preview |
35
+ | `in-progress` | On the call. | On Call |
36
+ | `paused` | The caller is on hold. | On Hold |
37
+ | `completing` | The caller is gone; the agent finishes notes and picks an outcome. | After Call Work |
38
+
39
+ ## An inbound call on the wire
40
+
41
+ ```mermaid
42
+ sequenceDiagram
43
+ participant P as Provider (adapter)
44
+ participant A as Agent application
45
+ actor G as Agent
46
+ P->>A: task-offered (pending)
47
+ A->>G: rings, shows Answer
48
+ G->>A: Answer
49
+ A->>P: execute answer
50
+ P->>A: task-updated (in-progress)
51
+ P->>A: task-audio-started
52
+ A->>P: openAudio (softphone only)
53
+ G->>A: Hold
54
+ A->>P: execute hold
55
+ P->>A: task-updated (paused)
56
+ Note over A,G: Mute and End call are unavailable on hold
57
+ G->>A: Resume
58
+ A->>P: execute resume
59
+ P->>A: task-updated (in-progress)
60
+ G->>A: End call
61
+ A->>P: execute end-call
62
+ P->>A: task-audio-ended
63
+ P->>A: task-updated (completing, wrap time left)
64
+ G->>A: Complete with outcome
65
+ A->>P: execute complete
66
+ P->>A: task-ended (completed)
67
+ ```
68
+
69
+ ## An outbound preview call
70
+
71
+ ```mermaid
72
+ sequenceDiagram
73
+ participant P as Provider (adapter)
74
+ participant A as Agent application
75
+ actor G as Agent
76
+ P->>A: task-offered, then task-updated (preview, maybe a countdown)
77
+ G->>A: reads the record, presses Call
78
+ A->>P: execute dial (with a new dialId)
79
+ P-->>A: dialling
80
+ P->>A: task-audio-started (ring-back)
81
+ P->>A: dial-outcome (answered, busy, no-answer, ...)
82
+ alt answered
83
+ P->>A: task-updated (in-progress)
84
+ else nobody answered
85
+ P->>A: task-audio-ended
86
+ P->>A: task-updated (completing)
87
+ end
88
+ ```
89
+
90
+ When the countdown runs out, `atDeadline` says who acts: the provider dials (`provider-dials`),
91
+ the agent application dials (`host-dials`), or nobody does and the record waits (`waits`).
92
+
93
+ ## Rules worth knowing
94
+
95
+ - **Every offer is owed an ending.** Whatever happens to the call, the provider sends `task-ended`.
96
+ - **Every dial has exactly one outcome.** A dial answered `dialling` always gets its `dial-outcome`.
97
+ - **Audio follows the task, never the other way round.** A dropped stream changes nothing until the provider says so.
98
+ - **No End call from hold.** Resume first; `terminate-call` may end everything, held caller included.
99
+ - **No Mute from hold on a softphone.** A mute already on when the hold began stays on.
100
+ - **No transfer.** Help comes from a lead: listen, coach, join the call, or take it over.
101
+ - **A callback carries the call it comes back to.** Its task's history starts with the earlier call's steps.
package/CHAT_FLOW.md ADDED
@@ -0,0 +1,61 @@
1
+ # Chat flow
2
+
3
+ How one agent's part of a chat moves, from the offer to the moment it leaves the agent's screen. A
4
+ chat has no call: no audio, no phone, no preview. Terms are in `GLOSSARY.md`; the rules are in
5
+ `guide.md`, `guide/agent.md` and `guide/chat.md`.
6
+
7
+ ## Where a chat task stands
8
+
9
+ ```mermaid
10
+ stateDiagram-v2
11
+ [*] --> pending: task-offered
12
+ [*] --> in_progress: already underway on connect (snapshot)
13
+ pending --> confirmed: accepted
14
+ pending --> [*]: declined, withdrawn, customer left (cancelled) or offer ran out (expired)
15
+ confirmed --> in_progress: chat begins
16
+ in_progress --> paused: pause
17
+ paused --> in_progress: resume
18
+ in_progress --> completing: the conversation ends and follow-up work remains
19
+ paused --> completing: the conversation ends while paused
20
+ in_progress --> [*]: complete (task-ended)
21
+ completing --> [*]: complete (task-ended)
22
+
23
+ state "in-progress" as in_progress
24
+ ```
25
+
26
+ | Phase | What the agent sees | Default label |
27
+ | --- | --- | --- |
28
+ | `pending` | A new chat flashes, with Accept and maybe Decline. | Incoming Chat |
29
+ | `confirmed` | Accepted, waiting for the chat to open. | Accepted |
30
+ | `in-progress` | Chatting with the customer. | In Chat |
31
+ | `paused` | The chat is paused; the customer waits. | Paused |
32
+ | `completing` | The customer is gone; the agent finishes notes. | Wrap-up |
33
+
34
+ ## A chat on the wire
35
+
36
+ ```mermaid
37
+ sequenceDiagram
38
+ participant P as Provider (adapter)
39
+ participant A as Agent application
40
+ actor G as Agent
41
+ P->>A: task-offered (pending)
42
+ G->>A: Accept
43
+ A->>P: execute accept
44
+ P->>A: task-updated (in-progress)
45
+ G->>A: Pause
46
+ A->>P: execute pause
47
+ P->>A: task-updated (paused)
48
+ G->>A: Resume
49
+ A->>P: execute resume
50
+ P->>A: task-updated (in-progress)
51
+ G->>A: Complete with outcome
52
+ A->>P: execute complete
53
+ P->>A: task-ended (completed)
54
+ ```
55
+
56
+ ## Rules worth knowing
57
+
58
+ - **One agent can hold several chats at once.** How many is the agent's capacity on this provider.
59
+ - **A chat is completed from where it stands.** There is no call to end, so the agent completes from `in-progress`, or from `completing` where the provider moved it there.
60
+ - **Pause is the chat's hold.** The `hold` capability offers it; the command is `pause`, then `resume`.
61
+ - **Every offer is owed an ending.** Whatever happens to the chat, the provider sends `task-ended`.
package/EMAIL_FLOW.md ADDED
@@ -0,0 +1,54 @@
1
+ # Email flow
2
+
3
+ How one agent's part of an email moves, from the assignment to the moment it leaves the agent's
4
+ screen. An email has no call and no pause: it is worked and completed. Terms are in
5
+ `GLOSSARY.md`; the rules are in `guide.md`, `guide/agent.md` and `guide/email.md`.
6
+
7
+ ## Where an email task stands
8
+
9
+ ```mermaid
10
+ stateDiagram-v2
11
+ [*] --> pending: task-offered
12
+ [*] --> in_progress: already underway on connect (snapshot)
13
+ pending --> confirmed: accepted
14
+ pending --> [*]: declined, withdrawn (cancelled) or offer ran out (expired)
15
+ confirmed --> in_progress: work begins
16
+ in_progress --> completing: the reply is sent and follow-up work remains
17
+ in_progress --> [*]: complete (task-ended)
18
+ completing --> [*]: complete (task-ended)
19
+
20
+ state "in-progress" as in_progress
21
+ ```
22
+
23
+ | Phase | What the agent sees | Default label |
24
+ | --- | --- | --- |
25
+ | `pending` | A new email is assigned, with Accept and maybe Decline. | Assigned |
26
+ | `confirmed` | Accepted, waiting to open. | Accepted |
27
+ | `in-progress` | Reading and replying. | Working |
28
+ | `completing` | The reply is done; the agent finishes notes. | Completing |
29
+
30
+ ## An email on the wire
31
+
32
+ ```mermaid
33
+ sequenceDiagram
34
+ participant P as Provider (adapter)
35
+ participant A as Agent application
36
+ actor G as Agent
37
+ P->>A: task-offered (pending)
38
+ G->>A: Accept
39
+ A->>P: execute accept
40
+ P->>A: task-updated (in-progress)
41
+ G->>A: may Schedule a follow-up
42
+ A->>P: execute schedule
43
+ P->>A: calendar-updated
44
+ G->>A: Complete with outcome
45
+ A->>P: execute complete
46
+ P->>A: task-ended (completed)
47
+ ```
48
+
49
+ ## Rules worth knowing
50
+
51
+ - **No hold, no pause.** An email waits on its own; there is no `hold` capability on email.
52
+ - **An email is completed from where it stands.** The agent completes from `in-progress`, or from `completing` where the provider moved it there.
53
+ - **A follow-up goes on the calendar.** `schedule` puts it there, from the email or from its wrap, where the provider declares a calendar.
54
+ - **Every offer is owed an ending.** Whatever happens to the email, the provider sends `task-ended`.
package/GLOSSARY.md ADDED
@@ -0,0 +1,116 @@
1
+ # Glossary
2
+
3
+ The words this protocol uses, in everyday language, with what the larger contact-centre platforms
4
+ call the same thing. The protocol picks one word per idea and keeps it. Where the industry uses
5
+ several names for one idea, this list shows them so a reader from any platform can find their way.
6
+ The exact rules live in `guide.md` and the files under `guide/`.
7
+
8
+ The platform names in the last column are given as each platform commonly presents them. They are
9
+ for orientation only: each platform's own documentation is the authority on its terms.
10
+
11
+ ## The pieces
12
+
13
+ | Term | In plain words | What others call it |
14
+ | --- | --- | --- |
15
+ | **Agent** | The person handling the work: answering calls, chats and emails. | Agent everywhere; *user* in Genesys Cloud's admin screens; *representative* or *advisor* in some service desks. |
16
+ | **Lead** | An agent who also looks after a team: sees their members, listens in, coaches, helps and takes calls over. | *Supervisor* in Amazon Connect, Genesys Cloud, NICE CXone and Twilio Flex; *team lead* on most floors. |
17
+ | **Provider** | One outside system that brings work to the agent: a phone platform, a chat platform, a mail platform. | *Channel provider*, *ACD*, *CCaaS platform*; Salesforce calls a connected phone system a *telephony provider*. |
18
+ | **Adapter** | The software that connects one provider to this protocol. | *Connector*, *integration*, *CTI adapter* (Salesforce Open CTI, Zendesk Talk Partner Edition). |
19
+ | **Agent application** | The software the agent works in, here called Omni. | *Agent desktop* (Amazon Connect CCP, Genesys Cloud agent UI, NICE CXone MAX), *agent workspace* (Salesforce, Zendesk). |
20
+ | **Agent computer** | The agent's screen and machine, where the agent application runs. | *Desktop*, *workstation*, *station*. |
21
+ | **Manifest** | What a provider declares about itself up front: its name, channel, phones and features. | *Integration definition*, *app manifest* (Twilio Flex plugins, Salesforce call center definition file). |
22
+ | **Channel** | The kind of work: voice, chat or email. | *Media type* (Genesys Cloud), *channel* (Amazon Connect, Salesforce Omni-Channel), *media* (NICE). |
23
+ | **Login** | One signed-in session of one agent on one provider. | *Session*, *agent session*. |
24
+
25
+ ## The work
26
+
27
+ | Term | In plain words | What others call it |
28
+ | --- | --- | --- |
29
+ | **Call** | The customer's whole phone call, which may pass through menus, queues and several agents. | *Contact* (Amazon Connect), *conversation* (Genesys Cloud), *interaction* (NICE, Five9). |
30
+ | **Task** | One agent's piece of one contact, on any channel: offered to them, worked, wrapped up. A call that reaches three agents is three tasks. | *Task* (Twilio TaskRouter), *work item* or *AgentWork* (Salesforce Omni-Channel), *contact* as the agent sees it (Amazon Connect), *participant* in a conversation (Genesys Cloud). |
31
+ | **Assignment** | The routing of a call to this agent, from the offer until the task ends. Its id names the task. | *Reservation* (Twilio TaskRouter), *offer* or *routed work* (Salesforce), *alerting* (Genesys Cloud). |
32
+ | **Interaction** | The agent's time actually on the call: from answering until their audio ends, holds included. | *Talk time* plus *hold time*, together *handle time* without the wrap; Genesys Cloud reports it as *interact*. |
33
+ | **Party** | The customer on the other end. | *Customer*, *caller*, *external participant*; the number is the *ANI* or *caller ID*. |
34
+ | **Task type** | The provider's name for a kind of work, such as a queue or a mailbox. | *Queue*, *skill*, *routing profile*, *campaign*. |
35
+ | **Queue** | Where calls wait for an agent. | *Queue* everywhere; *hunt group* or *split* on older systems. |
36
+
37
+ ## Where a task stands
38
+
39
+ | Term | In plain words | What others call it |
40
+ | --- | --- | --- |
41
+ | **Pending** | Offered and not yet accepted: the phone is ringing or the chat is flashing. | *Ringing*, *alerting* (Genesys Cloud), *incoming* (Amazon Connect), *reserved* (Twilio). |
42
+ | **Confirmed** | Accepted, waiting for the work to start. | *Accepted*, *connecting*. |
43
+ | **Preview** | An outbound record shown to the agent before the call goes out. | *Preview dialing* (Five9, Genesys Cloud, Amazon Connect outbound campaigns). |
44
+ | **In progress** | The agent is working it: on the call, in the chat, writing the email. | *Connected*, *on call*, *active*, *talking*. |
45
+ | **Paused** | The work is on hold: the caller hears hold music, or the chat waits. | *Hold* on a call; *paused* or *parked* on a chat. |
46
+ | **Completing** | The customer has gone and the agent is finishing their notes. | *After-call work* or *ACW* (Amazon Connect, Genesys Cloud, NICE), *wrap-up* (Twilio, Five9), *after conversation work* (Salesforce). |
47
+ | **Wrap allowance** | How long the agent has for that finishing work. | *ACW timeout*, *wrap-up time limit*. |
48
+ | **Outcome** | What the agent records about how the task went. | *Wrap-up code* (Genesys Cloud), *disposition* (Five9, NICE, Twilio), *contact disposition*. |
49
+ | **Task ended** | The task is gone from the agent's screen. | *Contact ended*, *disconnected*, *completed*. |
50
+
51
+ ## Controls on a call
52
+
53
+ | Term | In plain words | What others call it |
54
+ | --- | --- | --- |
55
+ | **Answer** / **Accept** | Take an offered task: a call is answered, a chat or an email accepted. | *Accept*, *answer*, *pick up*. |
56
+ | **Decline** | Turn an offered task down. | *Reject*, *decline*. |
57
+ | **Hold** / **Resume** | Put the caller on hold, and take them off it. | The same everywhere. |
58
+ | **Mute** | Silence the agent's microphone. The caller hears nothing from the agent. | The same everywhere. |
59
+ | **End call** | End the agent's part. The caller carries on to wherever the provider sends them, such as a survey. | *Leave*, *drop*, *hang up* (agent leg only). |
60
+ | **Terminate call** | End the whole call for everyone. | *Disconnect all*, *end conversation*. |
61
+ | **Conference** | Bring a colleague into the call. | *Conference*, *add participant*, *three-way call*. |
62
+ | **Connect back** | Call the customer again after the call has ended, during the wrap. | *Callback from wrap*, *re-dial*. |
63
+ | **Schedule** | Put a follow-up with this customer on the calendar. | *Scheduled callback* (Amazon Connect, Genesys Cloud), *personal callback* (Five9). |
64
+ | **Callback requested** | The customer asked to be called back, or an agent arranged it. | *Queued callback* (Amazon Connect), *callback* (Genesys Cloud), *virtual hold*. |
65
+
66
+ There is deliberately no **transfer**. An agent who needs help asks a lead, and a call changes
67
+ hands only through routing or a lead's take-over.
68
+
69
+ ## Leads and teams
70
+
71
+ | Term | In plain words | What others call it |
72
+ | --- | --- | --- |
73
+ | **Lead assist** | The agent asks a lead for help on the call. | *Request supervisor*, *raise hand*, *help request*. |
74
+ | **Listen** | The lead hears the call silently. | *Monitor* or *silent monitor* (Amazon Connect, Genesys Cloud, NICE). |
75
+ | **Coach** | The lead talks to the agent only; the customer cannot hear. | *Whisper* or *coach* (Genesys Cloud, Twilio Flex). |
76
+ | **Join call** | The lead speaks to both the agent and the customer. | *Barge* or *barge-in* (Amazon Connect, Genesys Cloud). |
77
+ | **Take over** | The lead takes the call from the agent. | *Take over*, *intercept*. |
78
+ | **Team** | The agents a lead looks after, each with their status and tasks. | *Team*, *group*, *agent list* in a supervisor view. |
79
+
80
+ ## Availability
81
+
82
+ | Term | In plain words | What others call it |
83
+ | --- | --- | --- |
84
+ | **Capacity** | How many tasks the agent can take at once on this provider. Zero means none. | *Concurrency* (Amazon Connect routing profiles), *capacity* (Twilio, Salesforce), *utilization* (Genesys Cloud). |
85
+ | **Break** | Time away: lunch, training, a personal break. The agent asks, the provider decides. | *Aux* or *auxiliary code* (Avaya and many floors), *presence* such as Break or Meal (Genesys Cloud), *agent status* (Amazon Connect), *unavailable code* (NICE). |
86
+ | **Forced break** | A break a lead or the provider puts the agent on. | *Forced aux*, *supervisor-set status*. |
87
+ | **Next call** | The agent says they are ready for another call before this one ends. | *Request next*, *ready for next*. |
88
+ | **Lined up** | A call waiting in this agent's own queue, held for them. | *Agent queue* or *personal queue* (Amazon Connect), *direct routing*. |
89
+ | **Shift** | The agent's day: when they signed in, their breaks, their totals. | *Schedule adherence* data, *agent state history*. |
90
+
91
+ ## The phone
92
+
93
+ | Term | In plain words | What others call it |
94
+ | --- | --- | --- |
95
+ | **Softphone** | A phone inside the agent application, using the computer's headset. | *Softphone* (Amazon Connect), *WebRTC phone* (Genesys Cloud). |
96
+ | **Hardphone** | A separate physical phone that the provider rings. | *Desk phone* (Amazon Connect), *SIP phone* or *physical phone* (Genesys Cloud). |
97
+ | **Station** | The agent's audio equipment: headset, speaker, microphone. | *Station*, *endpoint*. |
98
+
99
+ ## Records and recording
100
+
101
+ | Term | In plain words | What others call it |
102
+ | --- | --- | --- |
103
+ | **History** | The steps a call went through before and with this agent: queued, answered, held, handed over. | *Contact trace record* (Amazon Connect), *conversation details* or *segments* (Genesys Cloud), *call detail record*. |
104
+ | **Recording** | A recording of one side of the call, the customer's or the agent's. | *Call recording*, *screen and voice recording*. |
105
+ | **Paused for sensitive details** | Recording stops while card or account details are given. | *Secure pause* (Genesys Cloud), *PCI pause*. |
106
+
107
+ ## How the parts talk
108
+
109
+ | Term | In plain words | What others call it |
110
+ | --- | --- | --- |
111
+ | **Snapshot** | Everything the provider knows right now, sent whole when the agent application connects or reconnects. | *State sync*, *initial state*. |
112
+ | **Event** | One change the provider reports as it happens: a call offered, a task ended. | *Event*, *notification*, *webhook*. |
113
+ | **Command** | Something the agent asks the provider to do: hold, end call, complete. | *Action*, *API call*. |
114
+ | **Capability** | A control the provider offers on a task. If it is offered, the agent can use it. | *Permission*, *feature flag*, *agent capability*. |
115
+ | **Lock** | A setting fixed by a level above the agent, such as the team or the site. | *Policy*, *enforced setting*. |
116
+ | **Guarantee** | A promise the agent application makes at sign-in, such as not offering Mute while a call is on hold. | *Client capability*, *declared support*. |
package/README.md CHANGED
@@ -15,8 +15,10 @@ system.
15
15
  | `guide/` | One file per role and channel: `agent.md`, `lead.md`, `queue.md`, `breaks.md`, `phone.md`, `voice.md`, `chat.md`, `email.md`. Each points back into `guide.md` for what it relies on. |
16
16
  | `src/index.ts` | The TypeScript declarations. |
17
17
  | `src/validation.ts` | Runtime validators Omni applies to adapter output. |
18
- | `src/testing.ts` | Testing an adapter an adapter runs against its own test state. |
18
+ | `src/testing.ts` | The test an adapter runs against its own test state. |
19
19
  | `tests/` | One test file per source module, plus the guards over the guide and the repository's own text. |
20
+ | `GLOSSARY.md` | **The words.** Every term in plain language, with what the larger contact-centre platforms call it. |
21
+ | `CALL_FLOW.md`, `CHAT_FLOW.md`, `EMAIL_FLOW.md` | **The flows.** How a task moves on each channel, from the offer to its end, as diagrams. |
20
22
 
21
23
  ## Entry points
22
24
 
package/dist/testing.d.ts CHANGED
@@ -215,8 +215,6 @@ export declare class TeamStream {
215
215
  private static ids;
216
216
  /** A snapshot carrying a team is the team whole; one carrying none leaves the lead with none. */
217
217
  seed(snapshot: unknown): void;
218
- /** Whether the team currently carries this member, as the events left it. */
219
- has(id: string): boolean;
220
218
  apply(envelope: unknown, path?: string): ProtocolViolation[];
221
219
  }
222
220
  export declare class BreakStream {
package/dist/testing.js CHANGED
@@ -2235,8 +2235,6 @@ export class TeamStream {
2235
2235
  seed(snapshot) {
2236
2236
  this.members = TeamStream.ids(isRecord(snapshot) ? snapshot.team : undefined);
2237
2237
  }
2238
- /** Whether the team currently carries this member, as the events left it. */
2239
- has(id) { return this.members?.has(id) === true; }
2240
2238
  apply(envelope, path = "event") {
2241
2239
  const event = isRecord(envelope) ? envelope.event : undefined;
2242
2240
  if (!isRecord(event))
package/guide.md CHANGED
@@ -2548,7 +2548,9 @@ a backend that does not know the session yet — yields no snapshot, and the ada
2548
2548
 
2549
2549
  A snapshot must account for **everything the adapter has emitted before it resolves**, not merely
2550
2550
  everything emitted when it was requested. Omni drops the state-replacing events held during the
2551
- read on that promise, and applies the rest after it (see **`Connection.snapshot()`**); an adapter
2551
+ read on that promise, and applies the rest after it (see **`Connection.snapshot()`**). Which kinds a
2552
+ snapshot restates, and so supersedes, is exported from the testing module as
2553
+ `SUPERSEDED_BY_A_SNAPSHOT`, so an agent application and the harness drop the same ones; an adapter
2552
2554
  that serves a stale snapshot and then lets an earlier event through will have Omni apply state the
2553
2555
  snapshot already superseded. The harness reads its connect snapshot the same way, and holds the
2554
2556
  snapshot to accounting for every task event it superseded: a task published during the read and
@@ -2935,6 +2937,9 @@ same exported checks are used by Omni and adapter tests so their interpretations
2935
2937
  | `validateProviderTimeEstimate(estimate, scope)` | Optional agent application estimate shape and provider/login scope; no accuracy guarantee. |
2936
2938
  | `validateHistoryReport(report, path?, manifest?, task?)` | What the agent application reports of a leg it performed, for an adapter to check before forwarding: a task, a step, when it began, a positive `seconds` where stated, and an explicit `ended` that carries the final duration. Given the manifest, a running report is refused unless it declares `runningStepReports`. Given the task, the agent application's own mute beginning on a `paused` task is refused (`historyReport.muted.held`): the Mute waits for resume. |
2937
2939
  | `validateHostReport(report)` | The agent application's own report as published to an adapter: `online`, and where there is audio, an input that is `available` with the microphone and `flowing`, or `unavailable` with a reason and the failure that says why, and an output that is `available` or `unavailable` with its failure. The harness validates whatever agent application a test hands the adapter; `stillHost(report)` builds one that never changes. |
2940
+ | `validateNextCall(value)` | The agent's standing ask for the next call, on its own as `next-call` and `Snapshot.nextCall` carry it: since when, and nothing else (`nextCall.since`, `nextCall.field`). |
2941
+ | `validateLinedUp(value, path?, levels?)` | A call lined up in the agent's own queue, on its own as `lined-up` and `Snapshot.linedUp` carry it: the caller under the same contact rules as a task's party, the queue's label, the waits, and `release` by presence (`linedUp.*`). |
2942
+ | `validatePhoneState(value, path?, context?)` | The phone as the platform sees it, on its own as `phone-updated` and `Snapshot.phone` carry it: its status, its one active channel, its mute where a hardphone's is observed (`phone.*`). |
2938
2943
  | `validateHostMute(mute, softphone)` | What the agent application's Mute does, stated on a softphone login and nowhere else: `stream` or `station` (`host.mute`), required where the agent application holds a microphone (`host.mute.required`) and refused where it does not (`host.mute.unexpected`). The harness holds `ConnectContext.host.mute` to it. |
2939
2944
  | `validateLoginStore(store)` | The login's store the agent application hands every connection: an object with `get`, `set` and `delete` (`store.shape`, `store.get`, `.set`, `.delete`). The harness holds `ConnectContext.store` to it. |
2940
2945
  | `validateCapacity(capacity)` | What the agent application states as capacity: a whole number of zero or more (`capacity.count`), zero being agent application-stopped. The harness states one on connect and two, one and zero after the test, each answered `applied`, and holds any offer to the count in force (`stream.taskOffered.overCapacity`). |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xema/omni-protocol",
3
- "version": "0.1.118",
3
+ "version": "0.1.120",
4
4
  "description": "The Omni protocol: the contract every provider adapter implements",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -8,6 +8,10 @@
8
8
  "files": [
9
9
  "dist",
10
10
  "README.md",
11
+ "GLOSSARY.md",
12
+ "CALL_FLOW.md",
13
+ "CHAT_FLOW.md",
14
+ "EMAIL_FLOW.md",
11
15
  "guide.md",
12
16
  "guide",
13
17
  "LICENSE"