@xema/omni-protocol 0.1.98 → 0.1.100

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/testing.d.ts CHANGED
@@ -7,7 +7,7 @@ export { ProtocolConformanceError, assertNoViolations, type ProtocolViolation }
7
7
  * rules -- each optional part of a task, each optional part of the break state and team member list, each
8
8
  * declared contribution, and each event type.
9
9
  */
10
- declare const STATE_SUBJECTS: readonly ["tasks", "task.browsers", "task.attributes", "task.history", "task.onCall", "task.leadAssist", "task.assisting", "task.listening", "task.media", "task.acceptance", "task.outcomes", "task.destinations", "task.custom", "task.locked", "break.reasons", "break.forced", "team.members", "team.requests", "contacts", "scheduledActivities", "team.policies"];
10
+ declare const STATE_SUBJECTS: readonly ["tasks", "task.browsers", "task.attributes", "task.history", "task.onCall", "task.leadAssist", "task.takenOver", "task.audio", "task.acceptance", "task.outcomes", "task.destinations", "task.custom", "task.locked", "break.reasons", "break.forced", "team.members", "team.requests", "team.tasks", "team.listening", "contacts", "calendar", "team.policies"];
11
11
  export type ContractSubject = (typeof STATE_SUBJECTS)[number] | `event.${ProviderEvent["type"]}`;
12
12
  export interface AdapterContractResult {
13
13
  events: ProviderEventEnvelope[];
@@ -41,7 +41,7 @@ export interface ExerciseAdapterOptions {
41
41
  collectOnly?: boolean;
42
42
  /**
43
43
  * Drive one ordinary lifecycle on the first task the provider offers -- accept it, open its
44
- * media on a softphone, hold and resume where offered, end the call where offered, complete it
44
+ * audio on a softphone, hold and resume where offered, end the call where offered, complete it
45
45
  * where the agent completes -- so the rules about a live call are reached rather than listed
46
46
  * under `notExercised`. Off by default, since it issues commands against whatever platform the
47
47
  * adapter is connected to: turn it on against a test backend.
@@ -177,9 +177,9 @@ export declare class TaskStream {
177
177
  * Takes a resync snapshot -- a `snapshot` event, or the read a reloaded client makes -- as the
178
178
  * state now, and first holds it to what the stream knew. A snapshot replaces state; it does not
179
179
  * get to forget it. A task it carries that the stream already held may not go backwards, lose an
180
- * entry of its record, return to undetermined terms, or be at work without the audio the stream
181
- * held up: media ends on task-media-ended and the call moves on, so a task still in-progress or
182
- * paused without its media is a snapshot that lost state, not a call that ended.
180
+ * entry of its record, return to not-yet-read terms, or be at work without the audio the stream
181
+ * held up: audio ends on task-audio-ended and the call moves on, so a task still in-progress or
182
+ * paused without its audio is a snapshot that lost state, not a call that ended.
183
183
  */
184
184
  resync(snapshot: unknown, at: string): ProtocolViolation[];
185
185
  /** Replaces what is known with a snapshot's tasks, as a snapshot replaces Omni's state. */
@@ -205,12 +205,12 @@ export declare class BreakStream {
205
205
  */
206
206
  export declare function assertBreakFollowsItsRequests(envelopes: readonly ProviderEventEnvelope[], snapshot?: Snapshot): void;
207
207
  /**
208
- * The media follows the task and never decides it. Given a provider's stream -- optionally seeded
209
- * with the snapshot it began from -- every task is introduced once, `task-media-started` and
210
- * `task-media-ended` alternate on work that has begun, media ends only where it arrived, and what
211
- * follows the media ending is `completing` or `task-ended`.
208
+ * The audio follows the task and never decides it. Given a provider's stream -- optionally seeded
209
+ * with the snapshot it began from -- every task is introduced once, `task-audio-started` and
210
+ * `task-audio-ended` alternate on work that has begun, audio ends only where it arrived, and what
211
+ * follows the audio ending is `completing` or `task-ended`.
212
212
  */
213
- export declare function assertMediaFollowsTheTask(envelopes: readonly ProviderEventEnvelope[], snapshot?: Snapshot): void;
213
+ export declare function assertAudioFollowsTheTask(envelopes: readonly ProviderEventEnvelope[], snapshot?: Snapshot): void;
214
214
  /** A login store that lives in memory for the test: what most adapter tests hand `exerciseAdapter` as `context.store`. */
215
215
  export declare function memoryStore(): LoginStore;
216
216
  /**
@@ -252,14 +252,14 @@ export interface BreakOnTaskStep {
252
252
  */
253
253
  export declare function assertBreakBeginsAfterTask(steps: readonly BreakOnTaskStep[]): void;
254
254
  /**
255
- * Validates the deadline derived from media end and the task's fixed wrap allowance.
255
+ * Validates the deadline derived from audio end and the task's fixed wrap allowance.
256
256
  *
257
257
  * A task with no allowance has no deadline, so `observedDeadline` must then be `undefined`: a
258
258
  * host counting down what the provider left open is the violation, and so is a host counting
259
259
  * nothing down when the provider set a clock. `toleranceMs` absorbs scheduler jitter in a real
260
260
  * implementation; pass 0 to demand an exact match.
261
261
  */
262
- export declare function assertWrapTimeout(task: Pick<TaskCompletion, "completionMode" | "wrapAllowance">, mediaEndedAt: string, observedDeadline: string | undefined, toleranceMs?: number): void;
262
+ export declare function assertWrapTimeout(task: Pick<TaskCompletion, "completionMode" | "wrapAllowance">, audioEndedAt: string, observedDeadline: string | undefined, toleranceMs?: number): void;
263
263
  /** One browser in one task of one provider. `providerId` is `Manifest.id`, never `displayName`. */
264
264
  export type BrowserIsolationScenario = BrowserSessionKeyInput;
265
265
  /** Validates whether two task-browser definitions should share one browser session. */