@crvouga/mockingbird-service-livekit 2.1.0 → 2.3.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/dist/server.js CHANGED
@@ -2,8 +2,8 @@ import {
2
2
  DEFAULT_PORT,
3
3
  createServer,
4
4
  serveTarget
5
- } from "./chunk-2GG6WCKV.js";
6
- import "./chunk-RIGGRABC.js";
5
+ } from "./chunk-YCECOXSF.js";
6
+ import "./chunk-CSYY4RPI.js";
7
7
  export {
8
8
  DEFAULT_PORT,
9
9
  createServer,
package/openapi.yaml CHANGED
@@ -2,10 +2,85 @@ openapi: 3.1.0
2
2
  info:
3
3
  title: LiveKit Server API (Mockingbird subset)
4
4
  version: "2.19.1"
5
- description: Twirp JSON room, participant, egress, and SIP contract.
5
+ description: Twirp JSON room, participant, agent dispatch, egress, and SIP contract.
6
6
  servers:
7
7
  - url: https://example.livekit.cloud
8
8
  paths:
9
+ /twirp/livekit.AgentDispatchService/CreateDispatch:
10
+ post:
11
+ operationId: CreateDispatch
12
+ description: Agent dispatch with a signed roomAdmin JWT; protobuf JSON names accept snake_case or camelCase.
13
+ security:
14
+ - bearerAuth: []
15
+ x-mockingbird:
16
+ supported: true
17
+ parity: { enabled: true, safe: false }
18
+ requestBody:
19
+ required: true
20
+ content:
21
+ application/json:
22
+ schema: { $ref: "#/components/schemas/CreateDispatchRequest" }
23
+ responses:
24
+ "200":
25
+ description: Protobuf JSON result
26
+ content:
27
+ application/json:
28
+ schema: { $ref: "#/components/schemas/AgentDispatch" }
29
+ "400": { $ref: "#/components/responses/TwirpError" }
30
+ "401": { $ref: "#/components/responses/TwirpError" }
31
+ "404": { $ref: "#/components/responses/TwirpError" }
32
+ "429": { $ref: "#/components/responses/TwirpError" }
33
+ "500": { $ref: "#/components/responses/TwirpError" }
34
+ /twirp/livekit.AgentDispatchService/ListDispatch:
35
+ post:
36
+ operationId: ListDispatch
37
+ description: Agent dispatch with a signed roomAdmin JWT; protobuf JSON names accept snake_case or camelCase.
38
+ security:
39
+ - bearerAuth: []
40
+ x-mockingbird:
41
+ supported: true
42
+ parity: { enabled: true, safe: true }
43
+ requestBody:
44
+ required: true
45
+ content:
46
+ application/json:
47
+ schema: { $ref: "#/components/schemas/ListDispatchRequest" }
48
+ responses:
49
+ "200":
50
+ description: Protobuf JSON result
51
+ content:
52
+ application/json:
53
+ schema: { $ref: "#/components/schemas/DispatchPage" }
54
+ "400": { $ref: "#/components/responses/TwirpError" }
55
+ "401": { $ref: "#/components/responses/TwirpError" }
56
+ "404": { $ref: "#/components/responses/TwirpError" }
57
+ "429": { $ref: "#/components/responses/TwirpError" }
58
+ "500": { $ref: "#/components/responses/TwirpError" }
59
+ /twirp/livekit.AgentDispatchService/DeleteDispatch:
60
+ post:
61
+ operationId: DeleteDispatch
62
+ description: Agent dispatch with a signed roomAdmin JWT; protobuf JSON names accept snake_case or camelCase.
63
+ security:
64
+ - bearerAuth: []
65
+ x-mockingbird:
66
+ supported: true
67
+ parity: { enabled: true, safe: false }
68
+ requestBody:
69
+ required: true
70
+ content:
71
+ application/json:
72
+ schema: { $ref: "#/components/schemas/DeleteDispatchRequest" }
73
+ responses:
74
+ "200":
75
+ description: Protobuf JSON result
76
+ content:
77
+ application/json:
78
+ schema: { $ref: "#/components/schemas/AgentDispatch" }
79
+ "400": { $ref: "#/components/responses/TwirpError" }
80
+ "401": { $ref: "#/components/responses/TwirpError" }
81
+ "404": { $ref: "#/components/responses/TwirpError" }
82
+ "429": { $ref: "#/components/responses/TwirpError" }
83
+ "500": { $ref: "#/components/responses/TwirpError" }
9
84
  /twirp/livekit.RoomService/{method}:
10
85
  post:
11
86
  operationId: RoomService
@@ -35,3 +110,110 @@ paths:
35
110
  requestBody: { required: true, content: { application/json: { schema: { type: object, additionalProperties: true } } } }
36
111
  responses:
37
112
  "200": { description: Protobuf JSON response, content: { application/json: { schema: { type: object, additionalProperties: true } } } }
113
+ components:
114
+ securitySchemes:
115
+ bearerAuth: { type: http, scheme: bearer, bearerFormat: JWT }
116
+ responses:
117
+ TwirpError:
118
+ description: Twirp error
119
+ content:
120
+ application/json:
121
+ schema: { $ref: "#/components/schemas/TwirpError" }
122
+ schemas:
123
+ TwirpError:
124
+ type: object
125
+ required: [code, msg, meta]
126
+ properties:
127
+ code: { type: string }
128
+ msg: { type: string }
129
+ meta: { type: object, additionalProperties: { type: string } }
130
+ RoomName: { type: string, minLength: 1, maxLength: 128 }
131
+ CreateDispatchRequest:
132
+ type: object
133
+ required: [room]
134
+ anyOf:
135
+ - required: [agentName]
136
+ - required: [agent_name]
137
+ properties:
138
+ room: { $ref: "#/components/schemas/RoomName" }
139
+ agentName: { type: string, minLength: 1, maxLength: 128 }
140
+ agent_name: { type: string, minLength: 1, maxLength: 128 }
141
+ metadata: { type: string, maxLength: 1024 }
142
+ ListDispatchRequest:
143
+ type: object
144
+ required: [room]
145
+ properties:
146
+ room: { $ref: "#/components/schemas/RoomName" }
147
+ dispatchId:
148
+ type: string
149
+ x-mockingbird-resource-ref: { type: agent_dispatch, missing: AD_missing }
150
+ dispatch_id:
151
+ type: string
152
+ x-mockingbird-resource-ref: { type: agent_dispatch, missing: AD_missing }
153
+ DeleteDispatchRequest:
154
+ allOf:
155
+ - $ref: "#/components/schemas/ListDispatchRequest"
156
+ - type: object
157
+ anyOf:
158
+ - required: [dispatchId]
159
+ - required: [dispatch_id]
160
+ AgentDispatch:
161
+ type: object
162
+ required: [id, agentName, room, metadata, state]
163
+ properties:
164
+ id:
165
+ type: string
166
+ x-mockingbird-resource: { type: agent_dispatch, identity: true }
167
+ agentName: { type: string }
168
+ room: { type: string }
169
+ metadata: { type: string }
170
+ state:
171
+ type: object
172
+ required: [jobs, createdAt, deletedAt]
173
+ properties:
174
+ createdAt:
175
+ type: string
176
+ pattern: "^[0-9]+$"
177
+ x-mockingbird-volatile: { kind: timestamp }
178
+ deletedAt:
179
+ type: string
180
+ pattern: "^[0-9]+$"
181
+ x-mockingbird-volatile: { kind: timestamp }
182
+ jobs:
183
+ type: array
184
+ items: { $ref: "#/components/schemas/AgentJob" }
185
+ AgentJob:
186
+ type: object
187
+ required: [id, dispatchId, type, room, metadata, agentName, state]
188
+ properties:
189
+ id: { type: string }
190
+ dispatchId: { type: string }
191
+ type: { type: string, enum: [JT_ROOM] }
192
+ room:
193
+ type: object
194
+ required: [sid, name, creationTime]
195
+ properties:
196
+ sid: { type: string }
197
+ name: { type: string }
198
+ creationTime: { type: string }
199
+ metadata: { type: string }
200
+ agentName: { type: string }
201
+ state:
202
+ type: object
203
+ required: [status, error, startedAt, endedAt, updatedAt, participantIdentity, workerId, agentId]
204
+ properties:
205
+ status: { type: string, enum: [JS_PENDING, JS_RUNNING, JS_SUCCESS, JS_FAILED] }
206
+ error: { type: string }
207
+ startedAt: { type: string }
208
+ endedAt: { type: string }
209
+ updatedAt: { type: string }
210
+ participantIdentity: { type: string }
211
+ workerId: { type: string }
212
+ agentId: { type: string }
213
+ DispatchPage:
214
+ type: object
215
+ required: [agentDispatches]
216
+ properties:
217
+ agentDispatches:
218
+ type: array
219
+ items: { $ref: "#/components/schemas/AgentDispatch" }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crvouga/mockingbird-service-livekit",
3
- "version": "2.1.0",
3
+ "version": "2.3.0",
4
4
  "description": "Stateful LiveKit mock with Twirp room APIs, JWT grants, participants, data, SIP/egress controls, and signed webhooks.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -98,7 +98,7 @@
98
98
  "pack:check": "bun ../../../scripts/pack-check.ts"
99
99
  },
100
100
  "dependencies": {
101
- "@crvouga/mockingbird-service-sqlite": "2.1.0"
101
+ "@crvouga/mockingbird-service-sqlite": "2.1.1"
102
102
  },
103
103
  "devDependencies": {
104
104
  "@crvouga/mockingbird-adapter-node": "0.0.0-development",
@@ -111,6 +111,7 @@
111
111
  "@crvouga/mockingbird-sqlite": "0.0.0-development",
112
112
  "@crvouga/mockingbird-testing": "0.1.0",
113
113
  "fast-check": "4.9.0",
114
- "livekit-server-sdk": "2.19.1"
114
+ "livekit-server-sdk": "2.19.1",
115
+ "livekit-reconciliation": "npm:livekit-server-sdk@2.19.0"
115
116
  }
116
117
  }