mojentic 1.2.4 → 1.5.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.
Files changed (81) hide show
  1. package/dist/agents/async-dispatcher.d.ts +1 -0
  2. package/dist/agents/async-dispatcher.d.ts.map +1 -1
  3. package/dist/agents/async-dispatcher.js +6 -1
  4. package/dist/agents/async-dispatcher.js.map +1 -1
  5. package/dist/agents/simple-recursive-agent.d.ts +8 -0
  6. package/dist/agents/simple-recursive-agent.d.ts.map +1 -1
  7. package/dist/agents/simple-recursive-agent.js +35 -5
  8. package/dist/agents/simple-recursive-agent.js.map +1 -1
  9. package/dist/context/shared-working-memory.js +1 -1
  10. package/dist/context/shared-working-memory.js.map +1 -1
  11. package/dist/index.d.ts +1 -0
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +1 -0
  14. package/dist/index.js.map +1 -1
  15. package/dist/llm/broker.d.ts +10 -4
  16. package/dist/llm/broker.d.ts.map +1 -1
  17. package/dist/llm/broker.js +78 -68
  18. package/dist/llm/broker.js.map +1 -1
  19. package/dist/llm/gateways/openai-messages-adapter.js +3 -3
  20. package/dist/llm/gateways/openai-messages-adapter.js.map +1 -1
  21. package/dist/llm/gateways/openai-model-registry.d.ts.map +1 -1
  22. package/dist/llm/gateways/openai-model-registry.js +34 -1
  23. package/dist/llm/gateways/openai-model-registry.js.map +1 -1
  24. package/dist/llm/models.d.ts +2 -0
  25. package/dist/llm/models.d.ts.map +1 -1
  26. package/dist/llm/tools/index.d.ts +1 -0
  27. package/dist/llm/tools/index.d.ts.map +1 -1
  28. package/dist/llm/tools/index.js +1 -0
  29. package/dist/llm/tools/index.js.map +1 -1
  30. package/dist/llm/tools/runner.d.ts +89 -0
  31. package/dist/llm/tools/runner.d.ts.map +1 -0
  32. package/dist/llm/tools/runner.js +130 -0
  33. package/dist/llm/tools/runner.js.map +1 -0
  34. package/dist/llm/tools/tool.d.ts +18 -3
  35. package/dist/llm/tools/tool.d.ts.map +1 -1
  36. package/dist/llm/tools/tool.js.map +1 -1
  37. package/dist/realtime/broker.d.ts +40 -0
  38. package/dist/realtime/broker.d.ts.map +1 -0
  39. package/dist/realtime/broker.js +74 -0
  40. package/dist/realtime/broker.js.map +1 -0
  41. package/dist/realtime/config.d.ts +134 -0
  42. package/dist/realtime/config.d.ts.map +1 -0
  43. package/dist/realtime/config.js +23 -0
  44. package/dist/realtime/config.js.map +1 -0
  45. package/dist/realtime/events.d.ts +146 -0
  46. package/dist/realtime/events.d.ts.map +1 -0
  47. package/dist/realtime/events.js +10 -0
  48. package/dist/realtime/events.js.map +1 -0
  49. package/dist/realtime/gateway.d.ts +48 -0
  50. package/dist/realtime/gateway.d.ts.map +1 -0
  51. package/dist/realtime/gateway.js +9 -0
  52. package/dist/realtime/gateway.js.map +1 -0
  53. package/dist/realtime/index.d.ts +14 -0
  54. package/dist/realtime/index.d.ts.map +1 -0
  55. package/dist/realtime/index.js +30 -0
  56. package/dist/realtime/index.js.map +1 -0
  57. package/dist/realtime/openai-gateway.d.ts +39 -0
  58. package/dist/realtime/openai-gateway.d.ts.map +1 -0
  59. package/dist/realtime/openai-gateway.js +154 -0
  60. package/dist/realtime/openai-gateway.js.map +1 -0
  61. package/dist/realtime/schemas.d.ts +333 -0
  62. package/dist/realtime/schemas.d.ts.map +1 -0
  63. package/dist/realtime/schemas.js +243 -0
  64. package/dist/realtime/schemas.js.map +1 -0
  65. package/dist/realtime/session.d.ts +115 -0
  66. package/dist/realtime/session.d.ts.map +1 -0
  67. package/dist/realtime/session.js +715 -0
  68. package/dist/realtime/session.js.map +1 -0
  69. package/dist/realtime/transport.d.ts +87 -0
  70. package/dist/realtime/transport.d.ts.map +1 -0
  71. package/dist/realtime/transport.js +115 -0
  72. package/dist/realtime/transport.js.map +1 -0
  73. package/dist/tracer/tracerEvents.d.ts +23 -0
  74. package/dist/tracer/tracerEvents.d.ts.map +1 -1
  75. package/dist/tracer/tracerEvents.js +40 -1
  76. package/dist/tracer/tracerEvents.js.map +1 -1
  77. package/dist/tracer/tracerSystem.d.ts +16 -0
  78. package/dist/tracer/tracerSystem.d.ts.map +1 -1
  79. package/dist/tracer/tracerSystem.js +22 -0
  80. package/dist/tracer/tracerSystem.js.map +1 -1
  81. package/package.json +27 -14
@@ -0,0 +1,333 @@
1
+ /**
2
+ * Zod schemas for OpenAI Realtime API events.
3
+ *
4
+ * These validate the shape at the gateway boundary. We accept unknown extra
5
+ * fields (Zod's default) so provider drift doesn't crash parsing — only the
6
+ * fields the broker actually consumes are validated. Use `rawEvents()` on
7
+ * the session if you need access to fields outside this schema.
8
+ *
9
+ * Schema snapshot: OpenAI Realtime API beta circa 2026-05.
10
+ */
11
+ import { z } from 'zod';
12
+ export declare const sessionCreatedSchema: z.ZodObject<{
13
+ type: z.ZodLiteral<"session.created">;
14
+ session: z.ZodObject<{
15
+ id: z.ZodString;
16
+ }, z.core.$loose>;
17
+ }, z.core.$strip>;
18
+ export declare const sessionUpdatedSchema: z.ZodObject<{
19
+ type: z.ZodLiteral<"session.updated">;
20
+ session: z.ZodRecord<z.ZodString, z.ZodUnknown>;
21
+ }, z.core.$strip>;
22
+ export declare const speechStartedSchema: z.ZodObject<{
23
+ type: z.ZodLiteral<"input_audio_buffer.speech_started">;
24
+ audio_start_ms: z.ZodOptional<z.ZodNumber>;
25
+ item_id: z.ZodOptional<z.ZodString>;
26
+ }, z.core.$strip>;
27
+ export declare const speechStoppedSchema: z.ZodObject<{
28
+ type: z.ZodLiteral<"input_audio_buffer.speech_stopped">;
29
+ audio_end_ms: z.ZodOptional<z.ZodNumber>;
30
+ item_id: z.ZodOptional<z.ZodString>;
31
+ }, z.core.$strip>;
32
+ export declare const inputTranscriptionCompletedSchema: z.ZodObject<{
33
+ type: z.ZodLiteral<"conversation.item.input_audio_transcription.completed">;
34
+ item_id: z.ZodString;
35
+ transcript: z.ZodString;
36
+ }, z.core.$strip>;
37
+ export declare const inputTranscriptionDeltaSchema: z.ZodObject<{
38
+ type: z.ZodLiteral<"conversation.item.input_audio_transcription.delta">;
39
+ item_id: z.ZodString;
40
+ delta: z.ZodString;
41
+ }, z.core.$strip>;
42
+ export declare const responseCreatedSchema: z.ZodObject<{
43
+ type: z.ZodLiteral<"response.created">;
44
+ response: z.ZodObject<{
45
+ id: z.ZodString;
46
+ }, z.core.$loose>;
47
+ }, z.core.$strip>;
48
+ export declare const responseDoneSchema: z.ZodObject<{
49
+ type: z.ZodLiteral<"response.done">;
50
+ response: z.ZodObject<{
51
+ id: z.ZodString;
52
+ status: z.ZodOptional<z.ZodString>;
53
+ status_details: z.ZodOptional<z.ZodObject<{
54
+ type: z.ZodOptional<z.ZodOptional<z.ZodString>>;
55
+ reason: z.ZodOptional<z.ZodOptional<z.ZodString>>;
56
+ }, z.core.$strip>>;
57
+ usage: z.ZodOptional<z.ZodObject<{
58
+ total_tokens: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
59
+ input_tokens: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
60
+ output_tokens: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
61
+ input_token_details: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
62
+ output_token_details: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
63
+ }, z.core.$strip>>;
64
+ }, z.core.$loose>;
65
+ }, z.core.$strip>;
66
+ export declare const outputItemAddedSchema: z.ZodObject<{
67
+ type: z.ZodLiteral<"response.output_item.added">;
68
+ response_id: z.ZodString;
69
+ output_index: z.ZodOptional<z.ZodNumber>;
70
+ item: z.ZodObject<{
71
+ id: z.ZodOptional<z.ZodString>;
72
+ type: z.ZodString;
73
+ call_id: z.ZodOptional<z.ZodString>;
74
+ name: z.ZodOptional<z.ZodString>;
75
+ }, z.core.$loose>;
76
+ }, z.core.$strip>;
77
+ export declare const outputItemDoneSchema: z.ZodObject<{
78
+ type: z.ZodLiteral<"response.output_item.done">;
79
+ response_id: z.ZodString;
80
+ item: z.ZodObject<{
81
+ id: z.ZodOptional<z.ZodString>;
82
+ type: z.ZodString;
83
+ call_id: z.ZodOptional<z.ZodString>;
84
+ name: z.ZodOptional<z.ZodString>;
85
+ arguments: z.ZodOptional<z.ZodString>;
86
+ }, z.core.$loose>;
87
+ }, z.core.$strip>;
88
+ export declare const audioDeltaSchema: z.ZodObject<{
89
+ type: z.ZodLiteral<"response.audio.delta">;
90
+ response_id: z.ZodString;
91
+ item_id: z.ZodOptional<z.ZodString>;
92
+ delta: z.ZodString;
93
+ }, z.core.$strip>;
94
+ export declare const outputAudioDeltaSchema: z.ZodObject<{
95
+ type: z.ZodLiteral<"response.output_audio.delta">;
96
+ response_id: z.ZodString;
97
+ item_id: z.ZodOptional<z.ZodString>;
98
+ delta: z.ZodString;
99
+ }, z.core.$strip>;
100
+ export declare const audioTranscriptDeltaSchema: z.ZodObject<{
101
+ type: z.ZodLiteral<"response.audio_transcript.delta">;
102
+ response_id: z.ZodString;
103
+ item_id: z.ZodOptional<z.ZodString>;
104
+ delta: z.ZodString;
105
+ }, z.core.$strip>;
106
+ export declare const outputAudioTranscriptDeltaSchema: z.ZodObject<{
107
+ type: z.ZodLiteral<"response.output_audio_transcript.delta">;
108
+ response_id: z.ZodString;
109
+ item_id: z.ZodOptional<z.ZodString>;
110
+ delta: z.ZodString;
111
+ }, z.core.$strip>;
112
+ export declare const audioTranscriptDoneSchema: z.ZodObject<{
113
+ type: z.ZodLiteral<"response.audio_transcript.done">;
114
+ response_id: z.ZodString;
115
+ item_id: z.ZodOptional<z.ZodString>;
116
+ transcript: z.ZodString;
117
+ }, z.core.$strip>;
118
+ export declare const outputAudioTranscriptDoneSchema: z.ZodObject<{
119
+ type: z.ZodLiteral<"response.output_audio_transcript.done">;
120
+ response_id: z.ZodString;
121
+ item_id: z.ZodOptional<z.ZodString>;
122
+ transcript: z.ZodString;
123
+ }, z.core.$strip>;
124
+ export declare const textDeltaSchema: z.ZodObject<{
125
+ type: z.ZodLiteral<"response.text.delta">;
126
+ response_id: z.ZodString;
127
+ item_id: z.ZodOptional<z.ZodString>;
128
+ delta: z.ZodString;
129
+ }, z.core.$strip>;
130
+ export declare const outputTextDeltaSchema: z.ZodObject<{
131
+ type: z.ZodLiteral<"response.output_text.delta">;
132
+ response_id: z.ZodString;
133
+ item_id: z.ZodOptional<z.ZodString>;
134
+ delta: z.ZodString;
135
+ }, z.core.$strip>;
136
+ export declare const textDoneSchema: z.ZodObject<{
137
+ type: z.ZodLiteral<"response.text.done">;
138
+ response_id: z.ZodString;
139
+ item_id: z.ZodOptional<z.ZodString>;
140
+ text: z.ZodString;
141
+ }, z.core.$strip>;
142
+ export declare const outputTextDoneSchema: z.ZodObject<{
143
+ type: z.ZodLiteral<"response.output_text.done">;
144
+ response_id: z.ZodString;
145
+ item_id: z.ZodOptional<z.ZodString>;
146
+ text: z.ZodString;
147
+ }, z.core.$strip>;
148
+ export declare const functionCallArgsDeltaSchema: z.ZodObject<{
149
+ type: z.ZodLiteral<"response.function_call_arguments.delta">;
150
+ response_id: z.ZodString;
151
+ item_id: z.ZodOptional<z.ZodString>;
152
+ call_id: z.ZodString;
153
+ delta: z.ZodString;
154
+ }, z.core.$strip>;
155
+ export declare const functionCallArgsDoneSchema: z.ZodObject<{
156
+ type: z.ZodLiteral<"response.function_call_arguments.done">;
157
+ response_id: z.ZodString;
158
+ item_id: z.ZodOptional<z.ZodString>;
159
+ call_id: z.ZodString;
160
+ name: z.ZodString;
161
+ arguments: z.ZodString;
162
+ }, z.core.$strip>;
163
+ export declare const rateLimitsUpdatedSchema: z.ZodObject<{
164
+ type: z.ZodLiteral<"rate_limits.updated">;
165
+ rate_limits: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
166
+ }, z.core.$strip>;
167
+ export declare const errorSchema: z.ZodObject<{
168
+ type: z.ZodLiteral<"error">;
169
+ error: z.ZodObject<{
170
+ type: z.ZodOptional<z.ZodString>;
171
+ code: z.ZodOptional<z.ZodString>;
172
+ message: z.ZodString;
173
+ }, z.core.$loose>;
174
+ }, z.core.$strip>;
175
+ /**
176
+ * Discriminated union of every server event the broker consumes.
177
+ *
178
+ * Other server events (the OpenAI API emits ~30 in total) are accepted as
179
+ * raw `{ type: string }` and surfaced via `rawEvents()` only.
180
+ */
181
+ export declare const serverEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
182
+ type: z.ZodLiteral<"session.created">;
183
+ session: z.ZodObject<{
184
+ id: z.ZodString;
185
+ }, z.core.$loose>;
186
+ }, z.core.$strip>, z.ZodObject<{
187
+ type: z.ZodLiteral<"session.updated">;
188
+ session: z.ZodRecord<z.ZodString, z.ZodUnknown>;
189
+ }, z.core.$strip>, z.ZodObject<{
190
+ type: z.ZodLiteral<"input_audio_buffer.speech_started">;
191
+ audio_start_ms: z.ZodOptional<z.ZodNumber>;
192
+ item_id: z.ZodOptional<z.ZodString>;
193
+ }, z.core.$strip>, z.ZodObject<{
194
+ type: z.ZodLiteral<"input_audio_buffer.speech_stopped">;
195
+ audio_end_ms: z.ZodOptional<z.ZodNumber>;
196
+ item_id: z.ZodOptional<z.ZodString>;
197
+ }, z.core.$strip>, z.ZodObject<{
198
+ type: z.ZodLiteral<"conversation.item.input_audio_transcription.completed">;
199
+ item_id: z.ZodString;
200
+ transcript: z.ZodString;
201
+ }, z.core.$strip>, z.ZodObject<{
202
+ type: z.ZodLiteral<"conversation.item.input_audio_transcription.delta">;
203
+ item_id: z.ZodString;
204
+ delta: z.ZodString;
205
+ }, z.core.$strip>, z.ZodObject<{
206
+ type: z.ZodLiteral<"response.created">;
207
+ response: z.ZodObject<{
208
+ id: z.ZodString;
209
+ }, z.core.$loose>;
210
+ }, z.core.$strip>, z.ZodObject<{
211
+ type: z.ZodLiteral<"response.done">;
212
+ response: z.ZodObject<{
213
+ id: z.ZodString;
214
+ status: z.ZodOptional<z.ZodString>;
215
+ status_details: z.ZodOptional<z.ZodObject<{
216
+ type: z.ZodOptional<z.ZodOptional<z.ZodString>>;
217
+ reason: z.ZodOptional<z.ZodOptional<z.ZodString>>;
218
+ }, z.core.$strip>>;
219
+ usage: z.ZodOptional<z.ZodObject<{
220
+ total_tokens: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
221
+ input_tokens: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
222
+ output_tokens: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
223
+ input_token_details: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
224
+ output_token_details: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
225
+ }, z.core.$strip>>;
226
+ }, z.core.$loose>;
227
+ }, z.core.$strip>, z.ZodObject<{
228
+ type: z.ZodLiteral<"response.output_item.added">;
229
+ response_id: z.ZodString;
230
+ output_index: z.ZodOptional<z.ZodNumber>;
231
+ item: z.ZodObject<{
232
+ id: z.ZodOptional<z.ZodString>;
233
+ type: z.ZodString;
234
+ call_id: z.ZodOptional<z.ZodString>;
235
+ name: z.ZodOptional<z.ZodString>;
236
+ }, z.core.$loose>;
237
+ }, z.core.$strip>, z.ZodObject<{
238
+ type: z.ZodLiteral<"response.output_item.done">;
239
+ response_id: z.ZodString;
240
+ item: z.ZodObject<{
241
+ id: z.ZodOptional<z.ZodString>;
242
+ type: z.ZodString;
243
+ call_id: z.ZodOptional<z.ZodString>;
244
+ name: z.ZodOptional<z.ZodString>;
245
+ arguments: z.ZodOptional<z.ZodString>;
246
+ }, z.core.$loose>;
247
+ }, z.core.$strip>, z.ZodObject<{
248
+ type: z.ZodLiteral<"response.audio.delta">;
249
+ response_id: z.ZodString;
250
+ item_id: z.ZodOptional<z.ZodString>;
251
+ delta: z.ZodString;
252
+ }, z.core.$strip>, z.ZodObject<{
253
+ type: z.ZodLiteral<"response.output_audio.delta">;
254
+ response_id: z.ZodString;
255
+ item_id: z.ZodOptional<z.ZodString>;
256
+ delta: z.ZodString;
257
+ }, z.core.$strip>, z.ZodObject<{
258
+ type: z.ZodLiteral<"response.audio_transcript.delta">;
259
+ response_id: z.ZodString;
260
+ item_id: z.ZodOptional<z.ZodString>;
261
+ delta: z.ZodString;
262
+ }, z.core.$strip>, z.ZodObject<{
263
+ type: z.ZodLiteral<"response.output_audio_transcript.delta">;
264
+ response_id: z.ZodString;
265
+ item_id: z.ZodOptional<z.ZodString>;
266
+ delta: z.ZodString;
267
+ }, z.core.$strip>, z.ZodObject<{
268
+ type: z.ZodLiteral<"response.audio_transcript.done">;
269
+ response_id: z.ZodString;
270
+ item_id: z.ZodOptional<z.ZodString>;
271
+ transcript: z.ZodString;
272
+ }, z.core.$strip>, z.ZodObject<{
273
+ type: z.ZodLiteral<"response.output_audio_transcript.done">;
274
+ response_id: z.ZodString;
275
+ item_id: z.ZodOptional<z.ZodString>;
276
+ transcript: z.ZodString;
277
+ }, z.core.$strip>, z.ZodObject<{
278
+ type: z.ZodLiteral<"response.text.delta">;
279
+ response_id: z.ZodString;
280
+ item_id: z.ZodOptional<z.ZodString>;
281
+ delta: z.ZodString;
282
+ }, z.core.$strip>, z.ZodObject<{
283
+ type: z.ZodLiteral<"response.output_text.delta">;
284
+ response_id: z.ZodString;
285
+ item_id: z.ZodOptional<z.ZodString>;
286
+ delta: z.ZodString;
287
+ }, z.core.$strip>, z.ZodObject<{
288
+ type: z.ZodLiteral<"response.text.done">;
289
+ response_id: z.ZodString;
290
+ item_id: z.ZodOptional<z.ZodString>;
291
+ text: z.ZodString;
292
+ }, z.core.$strip>, z.ZodObject<{
293
+ type: z.ZodLiteral<"response.output_text.done">;
294
+ response_id: z.ZodString;
295
+ item_id: z.ZodOptional<z.ZodString>;
296
+ text: z.ZodString;
297
+ }, z.core.$strip>, z.ZodObject<{
298
+ type: z.ZodLiteral<"response.function_call_arguments.delta">;
299
+ response_id: z.ZodString;
300
+ item_id: z.ZodOptional<z.ZodString>;
301
+ call_id: z.ZodString;
302
+ delta: z.ZodString;
303
+ }, z.core.$strip>, z.ZodObject<{
304
+ type: z.ZodLiteral<"response.function_call_arguments.done">;
305
+ response_id: z.ZodString;
306
+ item_id: z.ZodOptional<z.ZodString>;
307
+ call_id: z.ZodString;
308
+ name: z.ZodString;
309
+ arguments: z.ZodString;
310
+ }, z.core.$strip>, z.ZodObject<{
311
+ type: z.ZodLiteral<"rate_limits.updated">;
312
+ rate_limits: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
313
+ }, z.core.$strip>, z.ZodObject<{
314
+ type: z.ZodLiteral<"error">;
315
+ error: z.ZodObject<{
316
+ type: z.ZodOptional<z.ZodString>;
317
+ code: z.ZodOptional<z.ZodString>;
318
+ message: z.ZodString;
319
+ }, z.core.$loose>;
320
+ }, z.core.$strip>], "type">;
321
+ export type ServerEvent = z.infer<typeof serverEventSchema>;
322
+ /** Server event we recognise plus a fallback for unknown event types. */
323
+ export type RawServerEvent = ServerEvent | {
324
+ type: string;
325
+ [k: string]: unknown;
326
+ };
327
+ /**
328
+ * Best-effort parse: returns the validated event when recognised, otherwise
329
+ * returns the raw payload so callers can still surface it through
330
+ * `rawEvents()`.
331
+ */
332
+ export declare function parseServerEvent(raw: unknown): RawServerEvent;
333
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/realtime/schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA4BxB,eAAO,MAAM,oBAAoB;;;;;iBAG/B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;iBAG/B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;iBAI9B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;iBAI9B,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;iBAI5C,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;iBAIxC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;iBAGhC,CAAC;AAEH,eAAO,MAAM,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;AAElF;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,cAAc,CAS7D"}
@@ -0,0 +1,243 @@
1
+ "use strict";
2
+ /**
3
+ * Zod schemas for OpenAI Realtime API events.
4
+ *
5
+ * These validate the shape at the gateway boundary. We accept unknown extra
6
+ * fields (Zod's default) so provider drift doesn't crash parsing — only the
7
+ * fields the broker actually consumes are validated. Use `rawEvents()` on
8
+ * the session if you need access to fields outside this schema.
9
+ *
10
+ * Schema snapshot: OpenAI Realtime API beta circa 2026-05.
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.serverEventSchema = exports.errorSchema = exports.rateLimitsUpdatedSchema = exports.functionCallArgsDoneSchema = exports.functionCallArgsDeltaSchema = exports.outputTextDoneSchema = exports.textDoneSchema = exports.outputTextDeltaSchema = exports.textDeltaSchema = exports.outputAudioTranscriptDoneSchema = exports.audioTranscriptDoneSchema = exports.outputAudioTranscriptDeltaSchema = exports.audioTranscriptDeltaSchema = exports.outputAudioDeltaSchema = exports.audioDeltaSchema = exports.outputItemDoneSchema = exports.outputItemAddedSchema = exports.responseDoneSchema = exports.responseCreatedSchema = exports.inputTranscriptionDeltaSchema = exports.inputTranscriptionCompletedSchema = exports.speechStoppedSchema = exports.speechStartedSchema = exports.sessionUpdatedSchema = exports.sessionCreatedSchema = void 0;
14
+ exports.parseServerEvent = parseServerEvent;
15
+ const zod_1 = require("zod");
16
+ // -----------------------------------------------------------------------------
17
+ // Shared sub-shapes
18
+ // -----------------------------------------------------------------------------
19
+ const usageSchema = zod_1.z
20
+ .object({
21
+ total_tokens: zod_1.z.number().optional(),
22
+ input_tokens: zod_1.z.number().optional(),
23
+ output_tokens: zod_1.z.number().optional(),
24
+ input_token_details: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
25
+ output_token_details: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
26
+ })
27
+ .partial();
28
+ const responseStatusDetails = zod_1.z
29
+ .object({
30
+ type: zod_1.z.string().optional(),
31
+ reason: zod_1.z.string().optional(),
32
+ })
33
+ .partial()
34
+ .optional();
35
+ // -----------------------------------------------------------------------------
36
+ // Server → Client events
37
+ // -----------------------------------------------------------------------------
38
+ exports.sessionCreatedSchema = zod_1.z.object({
39
+ type: zod_1.z.literal('session.created'),
40
+ session: zod_1.z.object({ id: zod_1.z.string() }).passthrough(),
41
+ });
42
+ exports.sessionUpdatedSchema = zod_1.z.object({
43
+ type: zod_1.z.literal('session.updated'),
44
+ session: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()),
45
+ });
46
+ exports.speechStartedSchema = zod_1.z.object({
47
+ type: zod_1.z.literal('input_audio_buffer.speech_started'),
48
+ audio_start_ms: zod_1.z.number().optional(),
49
+ item_id: zod_1.z.string().optional(),
50
+ });
51
+ exports.speechStoppedSchema = zod_1.z.object({
52
+ type: zod_1.z.literal('input_audio_buffer.speech_stopped'),
53
+ audio_end_ms: zod_1.z.number().optional(),
54
+ item_id: zod_1.z.string().optional(),
55
+ });
56
+ exports.inputTranscriptionCompletedSchema = zod_1.z.object({
57
+ type: zod_1.z.literal('conversation.item.input_audio_transcription.completed'),
58
+ item_id: zod_1.z.string(),
59
+ transcript: zod_1.z.string(),
60
+ });
61
+ exports.inputTranscriptionDeltaSchema = zod_1.z.object({
62
+ type: zod_1.z.literal('conversation.item.input_audio_transcription.delta'),
63
+ item_id: zod_1.z.string(),
64
+ delta: zod_1.z.string(),
65
+ });
66
+ exports.responseCreatedSchema = zod_1.z.object({
67
+ type: zod_1.z.literal('response.created'),
68
+ response: zod_1.z.object({ id: zod_1.z.string() }).passthrough(),
69
+ });
70
+ exports.responseDoneSchema = zod_1.z.object({
71
+ type: zod_1.z.literal('response.done'),
72
+ response: zod_1.z
73
+ .object({
74
+ id: zod_1.z.string(),
75
+ status: zod_1.z.string().optional(),
76
+ status_details: responseStatusDetails,
77
+ usage: usageSchema.optional(),
78
+ })
79
+ .passthrough(),
80
+ });
81
+ exports.outputItemAddedSchema = zod_1.z.object({
82
+ type: zod_1.z.literal('response.output_item.added'),
83
+ response_id: zod_1.z.string(),
84
+ output_index: zod_1.z.number().optional(),
85
+ item: zod_1.z
86
+ .object({
87
+ id: zod_1.z.string().optional(),
88
+ type: zod_1.z.string(),
89
+ call_id: zod_1.z.string().optional(),
90
+ name: zod_1.z.string().optional(),
91
+ })
92
+ .passthrough(),
93
+ });
94
+ exports.outputItemDoneSchema = zod_1.z.object({
95
+ type: zod_1.z.literal('response.output_item.done'),
96
+ response_id: zod_1.z.string(),
97
+ item: zod_1.z
98
+ .object({
99
+ id: zod_1.z.string().optional(),
100
+ type: zod_1.z.string(),
101
+ call_id: zod_1.z.string().optional(),
102
+ name: zod_1.z.string().optional(),
103
+ arguments: zod_1.z.string().optional(),
104
+ })
105
+ .passthrough(),
106
+ });
107
+ exports.audioDeltaSchema = zod_1.z.object({
108
+ type: zod_1.z.literal('response.audio.delta'),
109
+ response_id: zod_1.z.string(),
110
+ item_id: zod_1.z.string().optional(),
111
+ delta: zod_1.z.string(), // base64 PCM
112
+ });
113
+ exports.outputAudioDeltaSchema = zod_1.z.object({
114
+ type: zod_1.z.literal('response.output_audio.delta'),
115
+ response_id: zod_1.z.string(),
116
+ item_id: zod_1.z.string().optional(),
117
+ delta: zod_1.z.string(),
118
+ });
119
+ exports.audioTranscriptDeltaSchema = zod_1.z.object({
120
+ type: zod_1.z.literal('response.audio_transcript.delta'),
121
+ response_id: zod_1.z.string(),
122
+ item_id: zod_1.z.string().optional(),
123
+ delta: zod_1.z.string(),
124
+ });
125
+ exports.outputAudioTranscriptDeltaSchema = zod_1.z.object({
126
+ type: zod_1.z.literal('response.output_audio_transcript.delta'),
127
+ response_id: zod_1.z.string(),
128
+ item_id: zod_1.z.string().optional(),
129
+ delta: zod_1.z.string(),
130
+ });
131
+ exports.audioTranscriptDoneSchema = zod_1.z.object({
132
+ type: zod_1.z.literal('response.audio_transcript.done'),
133
+ response_id: zod_1.z.string(),
134
+ item_id: zod_1.z.string().optional(),
135
+ transcript: zod_1.z.string(),
136
+ });
137
+ exports.outputAudioTranscriptDoneSchema = zod_1.z.object({
138
+ type: zod_1.z.literal('response.output_audio_transcript.done'),
139
+ response_id: zod_1.z.string(),
140
+ item_id: zod_1.z.string().optional(),
141
+ transcript: zod_1.z.string(),
142
+ });
143
+ exports.textDeltaSchema = zod_1.z.object({
144
+ type: zod_1.z.literal('response.text.delta'),
145
+ response_id: zod_1.z.string(),
146
+ item_id: zod_1.z.string().optional(),
147
+ delta: zod_1.z.string(),
148
+ });
149
+ exports.outputTextDeltaSchema = zod_1.z.object({
150
+ type: zod_1.z.literal('response.output_text.delta'),
151
+ response_id: zod_1.z.string(),
152
+ item_id: zod_1.z.string().optional(),
153
+ delta: zod_1.z.string(),
154
+ });
155
+ exports.textDoneSchema = zod_1.z.object({
156
+ type: zod_1.z.literal('response.text.done'),
157
+ response_id: zod_1.z.string(),
158
+ item_id: zod_1.z.string().optional(),
159
+ text: zod_1.z.string(),
160
+ });
161
+ exports.outputTextDoneSchema = zod_1.z.object({
162
+ type: zod_1.z.literal('response.output_text.done'),
163
+ response_id: zod_1.z.string(),
164
+ item_id: zod_1.z.string().optional(),
165
+ text: zod_1.z.string(),
166
+ });
167
+ exports.functionCallArgsDeltaSchema = zod_1.z.object({
168
+ type: zod_1.z.literal('response.function_call_arguments.delta'),
169
+ response_id: zod_1.z.string(),
170
+ item_id: zod_1.z.string().optional(),
171
+ call_id: zod_1.z.string(),
172
+ delta: zod_1.z.string(),
173
+ });
174
+ exports.functionCallArgsDoneSchema = zod_1.z.object({
175
+ type: zod_1.z.literal('response.function_call_arguments.done'),
176
+ response_id: zod_1.z.string(),
177
+ item_id: zod_1.z.string().optional(),
178
+ call_id: zod_1.z.string(),
179
+ name: zod_1.z.string(),
180
+ arguments: zod_1.z.string(),
181
+ });
182
+ exports.rateLimitsUpdatedSchema = zod_1.z.object({
183
+ type: zod_1.z.literal('rate_limits.updated'),
184
+ rate_limits: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.unknown())),
185
+ });
186
+ exports.errorSchema = zod_1.z.object({
187
+ type: zod_1.z.literal('error'),
188
+ error: zod_1.z
189
+ .object({
190
+ type: zod_1.z.string().optional(),
191
+ code: zod_1.z.string().optional(),
192
+ message: zod_1.z.string(),
193
+ })
194
+ .passthrough(),
195
+ });
196
+ /**
197
+ * Discriminated union of every server event the broker consumes.
198
+ *
199
+ * Other server events (the OpenAI API emits ~30 in total) are accepted as
200
+ * raw `{ type: string }` and surfaced via `rawEvents()` only.
201
+ */
202
+ exports.serverEventSchema = zod_1.z.discriminatedUnion('type', [
203
+ exports.sessionCreatedSchema,
204
+ exports.sessionUpdatedSchema,
205
+ exports.speechStartedSchema,
206
+ exports.speechStoppedSchema,
207
+ exports.inputTranscriptionCompletedSchema,
208
+ exports.inputTranscriptionDeltaSchema,
209
+ exports.responseCreatedSchema,
210
+ exports.responseDoneSchema,
211
+ exports.outputItemAddedSchema,
212
+ exports.outputItemDoneSchema,
213
+ exports.audioDeltaSchema,
214
+ exports.outputAudioDeltaSchema,
215
+ exports.audioTranscriptDeltaSchema,
216
+ exports.outputAudioTranscriptDeltaSchema,
217
+ exports.audioTranscriptDoneSchema,
218
+ exports.outputAudioTranscriptDoneSchema,
219
+ exports.textDeltaSchema,
220
+ exports.outputTextDeltaSchema,
221
+ exports.textDoneSchema,
222
+ exports.outputTextDoneSchema,
223
+ exports.functionCallArgsDeltaSchema,
224
+ exports.functionCallArgsDoneSchema,
225
+ exports.rateLimitsUpdatedSchema,
226
+ exports.errorSchema,
227
+ ]);
228
+ /**
229
+ * Best-effort parse: returns the validated event when recognised, otherwise
230
+ * returns the raw payload so callers can still surface it through
231
+ * `rawEvents()`.
232
+ */
233
+ function parseServerEvent(raw) {
234
+ const result = exports.serverEventSchema.safeParse(raw);
235
+ if (result.success) {
236
+ return result.data;
237
+ }
238
+ if (typeof raw === 'object' && raw !== null && 'type' in raw) {
239
+ return raw;
240
+ }
241
+ return { type: 'unknown' };
242
+ }
243
+ //# sourceMappingURL=schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/realtime/schemas.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AA+PH,4CASC;AAtQD,6BAAwB;AAExB,gFAAgF;AAChF,oBAAoB;AACpB,gFAAgF;AAEhF,MAAM,WAAW,GAAG,OAAC;KAClB,MAAM,CAAC;IACN,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,mBAAmB,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;IACjE,oBAAoB,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CACnE,CAAC;KACD,OAAO,EAAE,CAAC;AAEb,MAAM,qBAAqB,GAAG,OAAC;KAC5B,MAAM,CAAC;IACN,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC;KACD,OAAO,EAAE;KACT,QAAQ,EAAE,CAAC;AAEd,gFAAgF;AAChF,yBAAyB;AACzB,gFAAgF;AAEnE,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC;IAClC,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,CAA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