@crvouga/mockingbird-service-daily 3.0.0 → 3.2.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog — @crvouga/mockingbird-service-daily
2
2
 
3
+ ## 3.2.0 (2026-10-09)
4
+
5
+ ### Features
6
+
7
+ - match Emulate provider coverage ([16b65ce](https://github.com/crvouga/mockingbird/commit/16b65ce791fa216f28ec1521df636f57771d9c5e))
8
+
9
+ ### Dependencies
10
+
11
+ - `@crvouga/mockingbird-service-sqlite`
12
+
13
+ ## 3.1.0 (2026-10-08)
14
+
15
+ ### Features
16
+
17
+ - redesign emulator experience ([d6038c2](https://github.com/crvouga/mockingbird/commit/d6038c27eebbaa1751f02bc9305002a5b1304779))
18
+
3
19
  ## 3.0.0 (2026-10-07)
4
20
 
5
21
  ### ⚠️ Breaking changes
@@ -14,10 +30,6 @@
14
30
  - typecheck the brand gate before builds ([fc36095](https://github.com/crvouga/mockingbird/commit/fc3609514de70ffe3170a5d216fb8a49f9ce7cbb))
15
31
  - format the emulates records query ([8698872](https://github.com/crvouga/mockingbird/commit/8698872509d06002be5a8fcdc85d79f8462320c3))
16
32
 
17
- ### Dependencies
18
-
19
- - `@crvouga/mockingbird-service-sqlite`
20
-
21
33
  ## 2.3.0 (2026-10-04)
22
34
 
23
35
  ### Features
package/DISCOVERY.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # @crvouga/mockingbird-service-daily discovery
2
2
 
3
3
  This is the installed-package index for coding agents and tooling. All relative links resolve
4
- inside `node_modules/@crvouga/mockingbird-service-daily/`; no repository checkout is needed to discover the mock's
4
+ inside `node_modules/@crvouga/mockingbird-service-daily/`; no repository checkout is needed to discover the emulator's
5
5
  supported surface or documented behavior.
6
6
 
7
7
  ## Capability and behavior sources
@@ -48,7 +48,7 @@ designed for assertions and diagnosis by consuming test suites.
48
48
  ## Report a mismatch or missing capability
49
49
 
50
50
  Follow the [agent reporting contract](https://github.com/crvouga/mockingbird/blob/main/docs/REPORTING_ISSUES.md). Include package version,
51
- operation/command, a minimal redacted request, actual mock result, expected oracle result or vendor
51
+ operation/command, a minimal redacted request, actual emulator result, expected oracle result or vendor
52
52
  documentation, and whether the mismatch appears in the matrix. Never include keys, tokens,
53
53
  customer data, prompts, PHI, card data, or unredacted recordings.
54
54
 
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # @crvouga/mockingbird-service-daily
2
2
 
3
- > Familiar calls. Faithful echoes. Part of [Mockingbird](https://github.com/crvouga/mockingbird).
3
+ > Local emulators. Real API contracts. Part of [Mockingbird](https://github.com/crvouga/mockingbird).
4
4
 
5
- Stateful mock of the **Daily.co** REST API for test suites: rooms (create, get, update,
5
+ Stateful emulator of the **Daily.co** REST API for test suites: rooms (create, get, update,
6
6
  delete, presence, eject), meeting tokens (mint and validate), verification of the HS256 meeting
7
7
  tokens our backend signs itself, and the end-of-call webhooks (`transcription.stopped`,
8
8
  `recording.ready-to-download`) with the transcript written to the stack's S3. Every EMR
9
9
  booking creates a room and a token; today a broken Daily integration is silent because booking
10
- swallows the error. Against the mock it is observable and assertable.
10
+ swallows the error. Against the emulator it is observable and assertable.
11
11
 
12
12
  - Operation coverage: [SUPPORT.md](https://github.com/crvouga/mockingbird/blob/main/packages/service/daily/SUPPORT.md)
13
13
  - The contract (`openapi.yaml`) is trimmed from Daily's documented REST API to the calls our
@@ -25,7 +25,7 @@ any Fetch server.
25
25
 
26
26
  ## Usage
27
27
 
28
- Point the apps at the mock (the G-D1 seams):
28
+ Point the apps at the emulator (the G-D1 seams):
29
29
 
30
30
  | App | Env | Value |
31
31
  | --- | --- | --- |
@@ -84,13 +84,13 @@ await admin("/rooms/<room name>/session", {
84
84
  | `GET /v1/rooms/:name/presence` | `{total_count, data: [{room, id, userId, userName, joinTime, duration}]}` — exactly the backend's strict schema. Participants come from `PUT /__admin/rooms/:name/presence`. |
85
85
  | `POST /v1/rooms/:name/eject` | `{user_ids?, ids?}` → `{ejectedIds}` (participant session ids), removing them from presence. |
86
86
  | `POST /v1/meeting-tokens` | `{properties}` → `{token}`: an HS256 JWT signed with the caller's API key, claims under Daily's abbreviations (`r`, `d`, `o`, `u`, `ud`, `nbf`, `exp`, `ejt`, `eje`, `er`, `erui`, `sr`, `ast`, `p`, …) plus `iat`. |
87
- | `GET /v1/meeting-tokens/:token` | Verifies a token (minted by the mock **or self-signed by our backend**) with the caller's API key and its `nbf`/`exp` on the mock clock (`?ignoreNbf=true` skips nbf); answers its properties under full names, else 400. |
87
+ | `GET /v1/meeting-tokens/:token` | Verifies a token (minted by the emulator **or self-signed by our backend**) with the caller's API key and its `nbf`/`exp` on the emulator clock (`?ignoreNbf=true` skips nbf); answers its properties under full names, else 400. |
88
88
 
89
89
  **Auth.** `Authorization: Bearer <DAILY_API_KEY>`; any key unless `apiKeys` is set. Missing →
90
90
  401 `{error: "authentication-error"}`.
91
91
 
92
92
  **Milliseconds.** Some of our callers pass `nbf`/`exp` in milliseconds (e.g. the EMR's
93
- `generatePatientToken` passes `Date.parse(end)`). The mock accepts them, interprets values
93
+ `generatePatientToken` passes `Date.parse(end)`). The emulator accepts them, interprets values
94
94
  ≥ 1e11 as ms in time checks, records each in `GET /__admin/warnings`, and tags the journal entry
95
95
  (`ids.warning: "exp in milliseconds"`).
96
96
 
@@ -107,7 +107,7 @@ payload}` (our receiver reads `event`; Daily documents `type`; both are sent).
107
107
  HMAC-SHA256(`DAILY_WEBHOOK_SECRET`, raw body), which is what our EMR verifies (only when the
108
108
  secret is set). Daily's documented scheme is different — base64 HMAC-SHA256 over
109
109
  `"<X-Webhook-Timestamp>.<body>"` with the base64-decoded secret — so a real Daily webhook would
110
- fail our check; the mock signs the way our code checks. `x-webhook-timestamp` is sent too.
110
+ fail our check; the emulator signs the way our code checks. `x-webhook-timestamp` is sent too.
111
111
  Retries: immediately, 5 s, 5 min, 30 min, 2 h; `GET /__admin/webhooks`, `…/events`,
112
112
  `…/replay`, `…/flush` as usual.
113
113
 
@@ -117,12 +117,12 @@ Retries: immediately, 5 s, 5 min, 30 min, 2 h; `GET /__admin/webhooks`, `…/eve
117
117
  | --- | --- |
118
118
  | `POST /__admin/rooms/:name/session` | `{participants: [{userId, userName?}], durationSec, transcript?: [{s, t, ts, te}], sessionId?, recording?}` writes the transcript JSON to S3 at `{roomName}/{sessionId}.json` (SigV4 `PutObject` to the `--s3-endpoint` / `transcripts` target; a synthetic transcript alternating between participants when none is given), clears presence, then emits `transcription.stopped` (and `recording.ready-to-download` unless `recording: false`). Answers `{sessionId, s3Key, transcript: "s3://…" \| null, events}`; 502 when S3 refuses. The transcript text is never kept. |
119
119
  | `PUT /__admin/rooms/:name/presence` | `{participants: [{userId, userName?, joinedAt?}]}` — who `GET …/presence` reports. |
120
- | `POST /__admin/tokens/decode` | `{token, apiKey?}` → `{decodable, header, claims, properties, signatureValid, room, joinable, problems, warnings}`: signature (against `apiKey` or `apiKeys`), the backend's strict claim set, `ud` ≤ 36, domain id, ms timestamps, and the token and room `nbf`/`exp` windows on the mock clock (owners may enter before the room's `nbf`). |
120
+ | `POST /__admin/tokens/decode` | `{token, apiKey?}` → `{decodable, header, claims, properties, signatureValid, room, joinable, problems, warnings}`: signature (against `apiKey` or `apiKeys`), the backend's strict claim set, `ud` ≤ 36, domain id, ms timestamps, and the token and room `nbf`/`exp` windows on the emulator clock (owners may enter before the room's `nbf`). |
121
121
  | `GET /__admin/rooms`, `GET /__admin/rooms/:name` | Rooms with config, presence and session metadata. |
122
122
  | `GET /__admin/warnings` | Tolerated oddities (millisecond timestamps, tokens for rooms that do not exist). |
123
123
  | `PUT /__admin/settings` | `{apiKeys?, domainId?, roomUrlBase?}` for the calling namespace (`GET` masks keys). |
124
124
 
125
- Time rules run on the mock clock (`POST /__admin/clock`): token/room `nbf` and `exp`, and
125
+ Time rules run on the emulator clock (`POST /__admin/clock`): token/room `nbf` and `exp`, and
126
126
  therefore the backend's 13 h room-creation delay and 30-min guardrail window as seen by Daily.
127
127
 
128
128
  Fault presets (`POST /__admin/faults {"preset": "<name>", "count"?: n}`): `room_not_found`
@@ -147,8 +147,8 @@ Fault presets (`POST /__admin/faults {"preset": "<name>", "count"?: n}`): `room_
147
147
 
148
148
  | Export | Kind | Description |
149
149
  | --- | --- | --- |
150
- | `DailyAPI` | class | The in-process mock: `fetch(request)`, `reset()`, `inspectToken(token, keys?)`, `setPresence(name, participants)`, `endSession(name, input)`, `rooms()`. Options: `sqlite`, `now`, `namespace`, `settings`, `onWebhook`, `transcripts`. |
151
- | `createRuntime` | function | The mock with the full service contract. Options: `webhooks: {url, secret, retryDelaysMs?, fetch?}`, `transcripts: {endpoint, bucket, region?, accessKeyId?, secretAccessKey?, keyPattern?, fetch?}`, `settings`, `clock`, `seed`, `adminKey`, `onLog`. |
150
+ | `DailyAPI` | class | The in-process emulator: `fetch(request)`, `reset()`, `inspectToken(token, keys?)`, `setPresence(name, participants)`, `endSession(name, input)`, `rooms()`. Options: `sqlite`, `now`, `namespace`, `settings`, `onWebhook`, `transcripts`. |
151
+ | `createRuntime` | function | The emulator with the full service contract. Options: `webhooks: {url, secret, retryDelaysMs?, fetch?}`, `transcripts: {endpoint, bucket, region?, accessKeyId?, secretAccessKey?, keyPattern?, fetch?}`, `settings`, `clock`, `seed`, `adminKey`, `onLog`. |
152
152
  | `DAILY_PRESETS` | object | Every named fault preset. |
153
153
  | `DAILY_NAMESPACE` | string | The service name, `"daily"`. |
154
154
  | `WEBHOOK_PATH` | string | `"/v1/webhooks/daily"`, our EMR receiver's route. |
package/SUPPORT.md CHANGED
@@ -3,10 +3,10 @@
3
3
  Generated from `openapi.yaml`; do not edit by hand.
4
4
 
5
5
  - operations in spec: **9**
6
- - supported by the mock: **9**
6
+ - supported by the emulator: **9**
7
7
  - parity enabled: **9**
8
8
 
9
- | operationId | route | mock | parity | notes |
9
+ | operationId | route | emulator | parity | notes |
10
10
  | --- | --- | --- | --- | --- |
11
11
  | `ListRooms` | `GET /v1/rooms` | ✅ supported | ✅ | |
12
12
  | `CreateRoom` | `POST /v1/rooms` | ✅ supported | ⚠️ unsafe (opt-in) | |