@copilotkit/aimock 1.42.0 → 1.43.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 (341) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +56 -0
  4. package/README.md +102 -16
  5. package/dist/agui-mock.cjs +1 -1
  6. package/dist/agui-mock.cjs.map +1 -1
  7. package/dist/agui-mock.d.cts.map +1 -1
  8. package/dist/agui-mock.d.ts.map +1 -1
  9. package/dist/agui-mock.js +1 -1
  10. package/dist/agui-mock.js.map +1 -1
  11. package/dist/agui-recorder.cjs +33 -11
  12. package/dist/agui-recorder.cjs.map +1 -1
  13. package/dist/agui-recorder.d.cts +10 -1
  14. package/dist/agui-recorder.d.cts.map +1 -1
  15. package/dist/agui-recorder.d.ts +10 -1
  16. package/dist/agui-recorder.d.ts.map +1 -1
  17. package/dist/agui-recorder.js +33 -11
  18. package/dist/agui-recorder.js.map +1 -1
  19. package/dist/agui-types.d.cts +1 -0
  20. package/dist/agui-types.d.cts.map +1 -1
  21. package/dist/agui-types.d.ts +1 -0
  22. package/dist/agui-types.d.ts.map +1 -1
  23. package/dist/aimock-cli.cjs +38 -10
  24. package/dist/aimock-cli.cjs.map +1 -1
  25. package/dist/aimock-cli.d.cts +5 -0
  26. package/dist/aimock-cli.d.cts.map +1 -1
  27. package/dist/aimock-cli.d.ts +5 -0
  28. package/dist/aimock-cli.d.ts.map +1 -1
  29. package/dist/aimock-cli.js +38 -10
  30. package/dist/aimock-cli.js.map +1 -1
  31. package/dist/batches.cjs +458 -0
  32. package/dist/batches.cjs.map +1 -0
  33. package/dist/batches.d.cts +57 -0
  34. package/dist/batches.d.cts.map +1 -0
  35. package/dist/batches.d.ts +57 -0
  36. package/dist/batches.d.ts.map +1 -0
  37. package/dist/batches.js +453 -0
  38. package/dist/batches.js.map +1 -0
  39. package/dist/bedrock-converse.cjs +12 -8
  40. package/dist/bedrock-converse.cjs.map +1 -1
  41. package/dist/bedrock-converse.d.cts.map +1 -1
  42. package/dist/bedrock-converse.d.ts.map +1 -1
  43. package/dist/bedrock-converse.js +14 -10
  44. package/dist/bedrock-converse.js.map +1 -1
  45. package/dist/bedrock.cjs +10 -8
  46. package/dist/bedrock.cjs.map +1 -1
  47. package/dist/bedrock.d.cts.map +1 -1
  48. package/dist/bedrock.d.ts.map +1 -1
  49. package/dist/bedrock.js +12 -10
  50. package/dist/bedrock.js.map +1 -1
  51. package/dist/byteplus-video.cjs +3 -3
  52. package/dist/byteplus-video.cjs.map +1 -1
  53. package/dist/byteplus-video.js +4 -4
  54. package/dist/byteplus-video.js.map +1 -1
  55. package/dist/chaos.cjs +622 -72
  56. package/dist/chaos.cjs.map +1 -1
  57. package/dist/chaos.d.cts +164 -7
  58. package/dist/chaos.d.cts.map +1 -1
  59. package/dist/chaos.d.ts +164 -7
  60. package/dist/chaos.d.ts.map +1 -1
  61. package/dist/chaos.js +613 -74
  62. package/dist/chaos.js.map +1 -1
  63. package/dist/cli.cjs +42 -23
  64. package/dist/cli.cjs.map +1 -1
  65. package/dist/cli.js +42 -23
  66. package/dist/cli.js.map +1 -1
  67. package/dist/cohere.cjs +10 -8
  68. package/dist/cohere.cjs.map +1 -1
  69. package/dist/cohere.d.cts.map +1 -1
  70. package/dist/cohere.d.ts.map +1 -1
  71. package/dist/cohere.js +12 -10
  72. package/dist/cohere.js.map +1 -1
  73. package/dist/config-loader.d.cts.map +1 -1
  74. package/dist/config-loader.d.ts.map +1 -1
  75. package/dist/convert.cjs +1 -1
  76. package/dist/convert.cjs.map +1 -1
  77. package/dist/convert.js +1 -1
  78. package/dist/convert.js.map +1 -1
  79. package/dist/elevenlabs-audio.cjs +3 -3
  80. package/dist/elevenlabs-audio.cjs.map +1 -1
  81. package/dist/elevenlabs-audio.js +4 -4
  82. package/dist/elevenlabs-audio.js.map +1 -1
  83. package/dist/elevenlabs-voice.cjs +1053 -0
  84. package/dist/elevenlabs-voice.cjs.map +1 -0
  85. package/dist/elevenlabs-voice.d.cts +72 -0
  86. package/dist/elevenlabs-voice.d.cts.map +1 -0
  87. package/dist/elevenlabs-voice.d.ts +72 -0
  88. package/dist/elevenlabs-voice.d.ts.map +1 -0
  89. package/dist/elevenlabs-voice.js +1048 -0
  90. package/dist/elevenlabs-voice.js.map +1 -0
  91. package/dist/embeddings.cjs +8 -4
  92. package/dist/embeddings.cjs.map +1 -1
  93. package/dist/embeddings.d.cts.map +1 -1
  94. package/dist/embeddings.d.ts.map +1 -1
  95. package/dist/embeddings.js +9 -5
  96. package/dist/embeddings.js.map +1 -1
  97. package/dist/fal-audio.cjs +3 -3
  98. package/dist/fal-audio.cjs.map +1 -1
  99. package/dist/fal-audio.js +4 -4
  100. package/dist/fal-audio.js.map +1 -1
  101. package/dist/fal.cjs +28 -4
  102. package/dist/fal.cjs.map +1 -1
  103. package/dist/fal.d.cts +16 -1
  104. package/dist/fal.d.cts.map +1 -1
  105. package/dist/fal.d.ts +16 -1
  106. package/dist/fal.d.ts.map +1 -1
  107. package/dist/fal.js +28 -5
  108. package/dist/fal.js.map +1 -1
  109. package/dist/files.cjs +1071 -0
  110. package/dist/files.cjs.map +1 -0
  111. package/dist/files.d.cts +68 -0
  112. package/dist/files.d.cts.map +1 -0
  113. package/dist/files.d.ts +68 -0
  114. package/dist/files.d.ts.map +1 -0
  115. package/dist/files.js +1059 -0
  116. package/dist/files.js.map +1 -0
  117. package/dist/fine-tuning.cjs +1051 -0
  118. package/dist/fine-tuning.cjs.map +1 -0
  119. package/dist/fine-tuning.d.cts +96 -0
  120. package/dist/fine-tuning.d.cts.map +1 -0
  121. package/dist/fine-tuning.d.ts +96 -0
  122. package/dist/fine-tuning.d.ts.map +1 -0
  123. package/dist/fine-tuning.js +1044 -0
  124. package/dist/fine-tuning.js.map +1 -0
  125. package/dist/fixture-loader.cjs +0 -0
  126. package/dist/fixture-loader.cjs.map +1 -1
  127. package/dist/fixture-loader.d.cts +37 -5
  128. package/dist/fixture-loader.d.cts.map +1 -1
  129. package/dist/fixture-loader.d.ts +37 -5
  130. package/dist/fixture-loader.d.ts.map +1 -1
  131. package/dist/fixture-loader.js +0 -0
  132. package/dist/fixture-loader.js.map +1 -1
  133. package/dist/gemini-embeddings.cjs +2 -2
  134. package/dist/gemini-embeddings.cjs.map +1 -1
  135. package/dist/gemini-embeddings.js +3 -3
  136. package/dist/gemini-embeddings.js.map +1 -1
  137. package/dist/gemini-interactions.cjs +13 -7
  138. package/dist/gemini-interactions.cjs.map +1 -1
  139. package/dist/gemini-interactions.d.cts.map +1 -1
  140. package/dist/gemini-interactions.d.ts.map +1 -1
  141. package/dist/gemini-interactions.js +15 -9
  142. package/dist/gemini-interactions.js.map +1 -1
  143. package/dist/gemini.cjs +11 -7
  144. package/dist/gemini.cjs.map +1 -1
  145. package/dist/gemini.d.cts.map +1 -1
  146. package/dist/gemini.d.ts.map +1 -1
  147. package/dist/gemini.js +13 -9
  148. package/dist/gemini.js.map +1 -1
  149. package/dist/grok-video.cjs +14 -14
  150. package/dist/grok-video.cjs.map +1 -1
  151. package/dist/grok-video.js +15 -15
  152. package/dist/grok-video.js.map +1 -1
  153. package/dist/helpers.cjs +229 -7
  154. package/dist/helpers.cjs.map +1 -1
  155. package/dist/helpers.d.cts +38 -2
  156. package/dist/helpers.d.cts.map +1 -1
  157. package/dist/helpers.d.ts +38 -2
  158. package/dist/helpers.d.ts.map +1 -1
  159. package/dist/helpers.js +221 -8
  160. package/dist/helpers.js.map +1 -1
  161. package/dist/images.cjs +54 -123
  162. package/dist/images.cjs.map +1 -1
  163. package/dist/images.d.cts.map +1 -1
  164. package/dist/images.d.ts.map +1 -1
  165. package/dist/images.js +55 -124
  166. package/dist/images.js.map +1 -1
  167. package/dist/index.cjs +41 -8
  168. package/dist/index.d.cts +12 -7
  169. package/dist/index.d.ts +12 -7
  170. package/dist/index.js +14 -10
  171. package/dist/jest.cjs +14 -7
  172. package/dist/jest.cjs.map +1 -1
  173. package/dist/jest.d.cts +3 -2
  174. package/dist/jest.d.cts.map +1 -1
  175. package/dist/jest.d.ts +3 -2
  176. package/dist/jest.d.ts.map +1 -1
  177. package/dist/jest.js +14 -7
  178. package/dist/jest.js.map +1 -1
  179. package/dist/journal.cjs +41 -4
  180. package/dist/journal.cjs.map +1 -1
  181. package/dist/journal.d.cts +44 -3
  182. package/dist/journal.d.cts.map +1 -1
  183. package/dist/journal.d.ts +44 -3
  184. package/dist/journal.d.ts.map +1 -1
  185. package/dist/journal.js +41 -5
  186. package/dist/journal.js.map +1 -1
  187. package/dist/live-fixture.cjs +1192 -0
  188. package/dist/live-fixture.cjs.map +1 -0
  189. package/dist/live-fixture.js +1187 -0
  190. package/dist/live-fixture.js.map +1 -0
  191. package/dist/live-recorder.cjs +256 -0
  192. package/dist/live-recorder.cjs.map +1 -0
  193. package/dist/live-recorder.js +254 -0
  194. package/dist/live-recorder.js.map +1 -0
  195. package/dist/live-replay.cjs +286 -0
  196. package/dist/live-replay.cjs.map +1 -0
  197. package/dist/live-replay.js +285 -0
  198. package/dist/live-replay.js.map +1 -0
  199. package/dist/live-sanitize.cjs +196 -0
  200. package/dist/live-sanitize.cjs.map +1 -0
  201. package/dist/live-sanitize.js +196 -0
  202. package/dist/live-sanitize.js.map +1 -0
  203. package/dist/live-types.d.cts +71 -0
  204. package/dist/live-types.d.cts.map +1 -0
  205. package/dist/live-types.d.ts +71 -0
  206. package/dist/live-types.d.ts.map +1 -0
  207. package/dist/llmock.cjs +52 -41
  208. package/dist/llmock.cjs.map +1 -1
  209. package/dist/llmock.d.cts +16 -5
  210. package/dist/llmock.d.cts.map +1 -1
  211. package/dist/llmock.d.ts +16 -5
  212. package/dist/llmock.d.ts.map +1 -1
  213. package/dist/llmock.js +53 -42
  214. package/dist/llmock.js.map +1 -1
  215. package/dist/messages.cjs +11 -7
  216. package/dist/messages.cjs.map +1 -1
  217. package/dist/messages.d.cts.map +1 -1
  218. package/dist/messages.d.ts.map +1 -1
  219. package/dist/messages.js +13 -9
  220. package/dist/messages.js.map +1 -1
  221. package/dist/metrics.cjs +258 -5
  222. package/dist/metrics.cjs.map +1 -1
  223. package/dist/metrics.d.cts +3 -1
  224. package/dist/metrics.d.cts.map +1 -1
  225. package/dist/metrics.d.ts +3 -1
  226. package/dist/metrics.d.ts.map +1 -1
  227. package/dist/metrics.js +255 -6
  228. package/dist/metrics.js.map +1 -1
  229. package/dist/moderation.cjs +10 -1
  230. package/dist/moderation.cjs.map +1 -1
  231. package/dist/moderation.d.cts.map +1 -1
  232. package/dist/moderation.d.ts.map +1 -1
  233. package/dist/moderation.js +10 -1
  234. package/dist/moderation.js.map +1 -1
  235. package/dist/ollama.cjs +5 -5
  236. package/dist/ollama.cjs.map +1 -1
  237. package/dist/ollama.js +6 -6
  238. package/dist/ollama.js.map +1 -1
  239. package/dist/openrouter-video.cjs +5 -5
  240. package/dist/openrouter-video.cjs.map +1 -1
  241. package/dist/openrouter-video.js +6 -6
  242. package/dist/openrouter-video.js.map +1 -1
  243. package/dist/recorder.cjs +45 -9
  244. package/dist/recorder.cjs.map +1 -1
  245. package/dist/recorder.d.cts.map +1 -1
  246. package/dist/recorder.d.ts.map +1 -1
  247. package/dist/recorder.js +43 -11
  248. package/dist/recorder.js.map +1 -1
  249. package/dist/responses.cjs +4 -3
  250. package/dist/responses.cjs.map +1 -1
  251. package/dist/responses.js +5 -5
  252. package/dist/responses.js.map +1 -1
  253. package/dist/router.cjs +20 -33
  254. package/dist/router.cjs.map +1 -1
  255. package/dist/router.d.cts +4 -1
  256. package/dist/router.d.cts.map +1 -1
  257. package/dist/router.d.ts +4 -1
  258. package/dist/router.d.ts.map +1 -1
  259. package/dist/router.js +20 -34
  260. package/dist/router.js.map +1 -1
  261. package/dist/server.cjs +701 -625
  262. package/dist/server.cjs.map +1 -1
  263. package/dist/server.d.cts +1 -0
  264. package/dist/server.d.cts.map +1 -1
  265. package/dist/server.d.ts +1 -0
  266. package/dist/server.d.ts.map +1 -1
  267. package/dist/server.js +704 -628
  268. package/dist/server.js.map +1 -1
  269. package/dist/speech.cjs +2 -2
  270. package/dist/speech.cjs.map +1 -1
  271. package/dist/speech.js +3 -3
  272. package/dist/speech.js.map +1 -1
  273. package/dist/transcription.cjs +4 -4
  274. package/dist/transcription.cjs.map +1 -1
  275. package/dist/transcription.js +5 -5
  276. package/dist/transcription.js.map +1 -1
  277. package/dist/types.d.cts +119 -16
  278. package/dist/types.d.cts.map +1 -1
  279. package/dist/types.d.ts +119 -16
  280. package/dist/types.d.ts.map +1 -1
  281. package/dist/validate-cli.cjs +925 -0
  282. package/dist/validate-cli.cjs.map +1 -0
  283. package/dist/validate-cli.js +924 -0
  284. package/dist/validate-cli.js.map +1 -0
  285. package/dist/vector-types.d.cts.map +1 -1
  286. package/dist/vector-types.d.ts.map +1 -1
  287. package/dist/veo-video.cjs +13 -13
  288. package/dist/veo-video.cjs.map +1 -1
  289. package/dist/veo-video.js +14 -14
  290. package/dist/veo-video.js.map +1 -1
  291. package/dist/video.cjs +4 -4
  292. package/dist/video.cjs.map +1 -1
  293. package/dist/video.d.cts +1 -1
  294. package/dist/video.d.cts.map +1 -1
  295. package/dist/video.d.ts +1 -1
  296. package/dist/video.d.ts.map +1 -1
  297. package/dist/video.js +5 -5
  298. package/dist/video.js.map +1 -1
  299. package/dist/vitest.cjs +13 -6
  300. package/dist/vitest.cjs.map +1 -1
  301. package/dist/vitest.d.cts +2 -1
  302. package/dist/vitest.d.cts.map +1 -1
  303. package/dist/vitest.d.ts +2 -1
  304. package/dist/vitest.d.ts.map +1 -1
  305. package/dist/vitest.js +14 -7
  306. package/dist/vitest.js.map +1 -1
  307. package/dist/watcher.cjs +2 -1
  308. package/dist/watcher.cjs.map +1 -1
  309. package/dist/watcher.js +2 -1
  310. package/dist/watcher.js.map +1 -1
  311. package/dist/ws-framing.cjs +150 -35
  312. package/dist/ws-framing.cjs.map +1 -1
  313. package/dist/ws-framing.d.cts +18 -3
  314. package/dist/ws-framing.d.cts.map +1 -1
  315. package/dist/ws-framing.d.ts +18 -3
  316. package/dist/ws-framing.d.ts.map +1 -1
  317. package/dist/ws-framing.js +151 -36
  318. package/dist/ws-framing.js.map +1 -1
  319. package/dist/ws-gemini-live.cjs +2 -2
  320. package/dist/ws-gemini-live.d.ts +2 -2
  321. package/dist/ws-gemini-live.js +2 -2
  322. package/dist/ws-live.cjs +401 -0
  323. package/dist/ws-live.cjs.map +1 -0
  324. package/dist/ws-live.js +400 -0
  325. package/dist/ws-live.js.map +1 -0
  326. package/dist/ws-realtime.cjs +46 -2
  327. package/dist/ws-realtime.cjs.map +1 -1
  328. package/dist/ws-realtime.d.cts.map +1 -1
  329. package/dist/ws-realtime.d.ts +2 -2
  330. package/dist/ws-realtime.d.ts.map +1 -1
  331. package/dist/ws-realtime.js +46 -2
  332. package/dist/ws-realtime.js.map +1 -1
  333. package/dist/ws-responses.cjs +2 -2
  334. package/dist/ws-responses.js +2 -2
  335. package/dist/ws-upstream.cjs +118 -0
  336. package/dist/ws-upstream.cjs.map +1 -0
  337. package/dist/ws-upstream.js +115 -0
  338. package/dist/ws-upstream.js.map +1 -0
  339. package/fixtures/openai-live-client.json +390 -0
  340. package/fixtures/openai-live-managed.json +709 -0
  341. package/package.json +1 -1
package/dist/types.d.cts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Journal } from "./journal.cjs";
2
+ import { LiveFixtureResponse, LiveOptions } from "./live-types.cjs";
2
3
  import { Logger } from "./logger.cjs";
3
4
  import { MetricsRegistry } from "./metrics.cjs";
4
5
  import * as http$1 from "node:http";
@@ -152,7 +153,7 @@ interface FixtureMatch {
152
153
  * request has no user message, it falls back to scanning the whole conversation.
153
154
  */
154
155
  hasToolResult?: boolean;
155
- endpoint?: "chat" | "image" | "speech" | "transcription" | "translation" | "video" | "embedding" | "audio-gen" | "elevenlabs-tts" | "fal-audio" | "fal" | "realtime" | "realtime-transcription" | "realtime-translation";
156
+ endpoint?: "chat" | "image" | "speech" | "transcription" | "translation" | "video" | "embedding" | "audio-gen" | "elevenlabs-tts" | "elevenlabs-voice-design" | "elevenlabs-voice" | "elevenlabs-voice-get" | "elevenlabs-voice-delete" | "fal-audio" | "fal" | "realtime" | "realtime-transcription" | "realtime-translation" | "openai-live";
156
157
  context?: string;
157
158
  }
158
159
  /**
@@ -388,6 +389,22 @@ interface ImageResponse {
388
389
  image?: ImageItem;
389
390
  images?: ImageItem[];
390
391
  }
392
+ interface VoiceDesignPreview {
393
+ generated_voice_id: string;
394
+ audio_base_64?: string;
395
+ media_type?: string;
396
+ duration_secs?: number;
397
+ language?: string | null;
398
+ }
399
+ /**
400
+ * Convenience shape for `LLMock.onElevenLabsVoiceDesign`. Stored as a
401
+ * {@link RawJSONResponse} wrapping `{ previews, text }` — the ElevenLabs
402
+ * `/v1/text-to-voice/design` envelope.
403
+ */
404
+ interface VoiceDesignResponse {
405
+ previews: VoiceDesignPreview[];
406
+ text?: string;
407
+ }
391
408
  interface AudioResponse {
392
409
  audio: string | {
393
410
  b64Json: string;
@@ -460,7 +477,7 @@ interface RawJSONResponse extends ResponseOverrides {
460
477
  */
461
478
  billableUnits?: number;
462
479
  }
463
- type FixtureResponse = TextResponse | ToolCallResponse | ContentWithToolCallsResponse | ErrorResponse | EmbeddingResponse | ImageResponse | AudioResponse | TranscriptionResponse | VideoResponse | RawJSONResponse;
480
+ type FixtureResponse = TextResponse | ToolCallResponse | ContentWithToolCallsResponse | ErrorResponse | EmbeddingResponse | ImageResponse | AudioResponse | TranscriptionResponse | VideoResponse | RawJSONResponse | LiveFixtureResponse;
464
481
  interface StreamingProfile {
465
482
  ttft?: number;
466
483
  tps?: number;
@@ -479,16 +496,50 @@ interface RecordedTimings {
479
496
  /**
480
497
  * Probabilistic chaos injection rates.
481
498
  *
482
- * Rates are evaluated sequentially per request — drop → malformed → disconnect
483
- * — and the first hit wins. Consequently malformedRate is conditional on drop
484
- * not firing, and disconnectRate is conditional on neither drop nor malformed
485
- * firing. A config of `{ dropRate: 0.5, malformedRate: 0.5 }` yields a ~25 %
486
- * effective malformed rate, not 50 %.
499
+ * Rates are evaluated sequentially per request — drop → malformed → rateLimit
500
+ * → disconnect — as four separate draws in that order, and the first draw that
501
+ * hits wins and short-circuits the rest. Each rate is therefore the probability
502
+ * that its OWN draw hits GIVEN that no earlier rate fired, not the share of
503
+ * requests that end in that fault; only `dropRate`, first in the chain, is
504
+ * unconditional. A config of `{ dropRate: 0.5, malformedRate: 0.5 }` yields a
505
+ * ~25 % effective malformed rate, not 50 %, and the same compounding applies to
506
+ * `{ dropRate: 0.5, rateLimitRate: 0.5 }` (~25 % rate limits).
507
+ */
508
+ /**
509
+ * Probabilistic (and one deterministic) fault injection knobs.
510
+ *
511
+ * VALIDATION — ONE policy, whatever the source. Each field is a finite number
512
+ * in its range: the rates in [0, 1], `latencyMs` in [0, 30000]. A value outside
513
+ * it, or one that is not a number at all (`"0.5abc"`, `"Infinity"`, `NaN`), is
514
+ * REJECTED, never clamped — silent clamping substitutes a fault rate nobody
515
+ * asked for and hides the misconfiguration that produced it.
516
+ *
517
+ * Rejection is reported in the loudest way each source allows, and the three
518
+ * agree: `POST /__aimock/chaos` answers 400, the `--chaos-*` CLI flags refuse
519
+ * to start, and a per-request header or a fixture/server value is refused with
520
+ * a `[chaos]` warning and left unset so the next level of precedence (header >
521
+ * fixture > server) applies.
487
522
  */
488
523
  interface ChaosConfig {
489
524
  dropRate?: number;
490
525
  malformedRate?: number;
491
526
  disconnectRate?: number;
527
+ /**
528
+ * Deterministic delay (ms) injected before the request is handled.
529
+ * Applied when > 0 — header > fixture > server precedence, same as rates.
530
+ * Unlike rates it is not probabilistic: a set latency always fires so
531
+ * timeout/retry suites get a stable signal. Must be in [0, 30000]; a value
532
+ * outside that range is rejected, not clamped (see above).
533
+ */
534
+ latencyMs?: number;
535
+ /**
536
+ * Chance of a 429 rate-limit rejection with `Retry-After`, CONDITIONAL on
537
+ * neither `dropRate` nor `malformedRate` having fired first: it is the third
538
+ * draw in the drop → malformed → rateLimit → disconnect order, and the first
539
+ * hit wins. Paired with a 0.5 `dropRate` a 0.5 `rateLimitRate` produces ~25 %
540
+ * rate limits, not 50 % (see the interface docstring above).
541
+ */
542
+ rateLimitRate?: number;
492
543
  }
493
544
  /**
494
545
  * Server-level chaos as the handlers see it: a baseline plus per-`X-Test-Id`
@@ -509,7 +560,28 @@ interface ChaosConfig {
509
560
  interface ChaosScope {
510
561
  /** Server-wide baseline: the construction config, or the untagged override. */
511
562
  base?: ChaosConfig;
512
- /** Per-testId overrides, consulted before `base`. */
563
+ /**
564
+ * Per-testId overrides, consulted INSTEAD OF `base` — never merged over it.
565
+ *
566
+ * An installed override REPLACES the baseline wholesale for that testId: a
567
+ * server started with `--chaos-latency 500` whose test `t1` installs
568
+ * `{ dropRate: 1 }` gives `t1` traffic a drop and NO latency, because
569
+ * `latencyMs` is not restated. To keep a baseline field, restate it in the
570
+ * override body.
571
+ *
572
+ * Replacement — not a field-wise merge — is deliberate, and it is what makes
573
+ * `POST /__aimock/chaos {}` ("explicitly no chaos for my test") different
574
+ * from `DELETE /__aimock/chaos` ("forget I said anything, fall back to the
575
+ * baseline"). Under a merge, `POST {}` would be a no-op and that distinction
576
+ * would collapse. It also matches the untagged case, where an override
577
+ * likewise replaces the construction-time config rather than layering on it.
578
+ *
579
+ * The two chain links ABOVE this one — fixture chaos over server chaos, and
580
+ * request headers over both — DO merge field-wise (see `resolveChaosConfig`).
581
+ * Only the scope lookup replaces, because it selects a config rather than
582
+ * refining one. `GET /__aimock/chaos` with the same testId always reports the
583
+ * config actually in effect for that scope, so the replacement is auditable.
584
+ */
513
585
  byTestId?: ReadonlyMap<string, ChaosConfig>;
514
586
  }
515
587
  /**
@@ -518,7 +590,7 @@ interface ChaosScope {
518
590
  * itself passes a `ChaosScope`.
519
591
  */
520
592
  type ChaosDefaults = ChaosConfig | ChaosScope;
521
- type ChaosAction = "drop" | "malformed" | "disconnect";
593
+ type ChaosAction = "drop" | "malformed" | "rateLimit" | "disconnect";
522
594
  type ResponseFactory = (req: ChatCompletionRequest) => FixtureResponse | Promise<FixtureResponse>;
523
595
  interface Fixture {
524
596
  match: FixtureMatch;
@@ -621,7 +693,7 @@ interface FixtureFileContentWithToolCallsResponse extends ResponseOverrides {
621
693
  redactedThinking?: string[];
622
694
  webSearches?: string[];
623
695
  }
624
- type FixtureFileResponse = FixtureFileTextResponse | FixtureFileToolCallResponse | FixtureFileContentWithToolCallsResponse | ErrorResponse | EmbeddingResponse | ImageResponse | AudioResponse | TranscriptionResponse | VideoResponse | RawJSONResponse;
696
+ type FixtureFileResponse = FixtureFileTextResponse | FixtureFileToolCallResponse | FixtureFileContentWithToolCallsResponse | ErrorResponse | EmbeddingResponse | ImageResponse | AudioResponse | TranscriptionResponse | VideoResponse | RawJSONResponse | LiveFixtureResponse;
625
697
  interface FixtureFile {
626
698
  fixtures: FixtureFileEntry[];
627
699
  }
@@ -654,7 +726,7 @@ interface FixtureFileEntry {
654
726
  * `FixtureMatch.hasToolResult`.
655
727
  */
656
728
  hasToolResult?: boolean;
657
- endpoint?: "chat" | "image" | "speech" | "transcription" | "translation" | "video" | "embedding" | "audio-gen" | "elevenlabs-tts" | "fal-audio" | "fal" | "realtime" | "realtime-transcription" | "realtime-translation";
729
+ endpoint?: "chat" | "image" | "speech" | "transcription" | "translation" | "video" | "embedding" | "audio-gen" | "elevenlabs-tts" | "elevenlabs-voice-design" | "elevenlabs-voice" | "elevenlabs-voice-get" | "elevenlabs-voice-delete" | "fal-audio" | "fal" | "realtime" | "realtime-transcription" | "realtime-translation" | "openai-live";
658
730
  context?: string;
659
731
  };
660
732
  response: FixtureFileResponse;
@@ -673,13 +745,34 @@ interface FixtureFileEntry {
673
745
  toolsHash?: string;
674
746
  };
675
747
  }
748
+ /**
749
+ * A recorded request body.
750
+ *
751
+ * Most journal entries carry a chat-completion request, but every service
752
+ * journals through one entry type and several of them record a body that is
753
+ * not one: the fine-tuning create payload is recorded verbatim so the journal
754
+ * reports what the caller actually sent, and the journal's own size cap
755
+ * substitutes a truncation marker for an oversized body. Neither shape has a
756
+ * `model`/`messages` pair, so typing the field as `ChatCompletionRequest`
757
+ * alone forces those writers through a cast that claims fields that are not
758
+ * there — the second member exists so they do not have to lie.
759
+ *
760
+ * TypeScript collapses the two for ASSIGNMENT (`ChatCompletionRequest` has an
761
+ * index signature, so it is itself a `Record<string, unknown>`); the union is
762
+ * kept two-membered because it is what the field means, not because it narrows
763
+ * anything. For READING, treat the body as opaque JSON — that is already how
764
+ * every consumer uses it (the journal cap re-serializes it, `GET
765
+ * /__aimock/journal` hands it back) — and property-check before reaching for a
766
+ * chat-request field.
767
+ */
768
+ type JournalBody = ChatCompletionRequest | Record<string, unknown>;
676
769
  interface JournalEntry {
677
770
  id: string;
678
771
  timestamp: number;
679
772
  method: string;
680
773
  path: string;
681
774
  headers: Record<string, string>;
682
- body: ChatCompletionRequest | null;
775
+ body: JournalBody | null;
683
776
  service?: string;
684
777
  response: {
685
778
  status: number;
@@ -692,13 +785,22 @@ interface JournalEntry {
692
785
  * configured proxy: chaos-path entries (e.g. chaos on the OpenRouter
693
786
  * video lifecycle endpoints; in REPLAY mode their normal 200/400/401/404
694
787
  * entries omit source, while record-mode 200s on those endpoints carry
695
- * source:"proxy") AND the OpenRouter video models listing synthesized as
696
- * the fallback after a FAILED proxy attempt. Absent when the distinction
697
- * doesn't apply (e.g. 404/503 fallback where nothing was going to serve).
788
+ * source:"proxy"), the OpenRouter video models listing synthesized as the
789
+ * fallback after a FAILED proxy attempt, and the services whose responses
790
+ * are synthesized outright — every fine-tuning entry carries it, success
791
+ * and error alike, since that store is aimock's own and no fixture or
792
+ * proxy ever serves it. Absent when the distinction doesn't apply
793
+ * (e.g. 404/503 fallback where nothing was going to serve).
698
794
  */
699
795
  source?: "fixture" | "proxy" | "internal";
700
796
  interrupted?: boolean;
701
797
  interruptReason?: string;
798
+ /**
799
+ * The handler crashed AFTER the response completed. The client received
800
+ * `status` in full, so this is not an interruption; the message is what
801
+ * the crash said.
802
+ */
803
+ error?: string;
702
804
  chaosAction?: ChaosAction;
703
805
  /** When the X-AIMock-Strict header overrode the server default. */
704
806
  strictOverride?: boolean;
@@ -938,6 +1040,7 @@ interface FalRecordConfig {
938
1040
  timeoutMs?: number;
939
1041
  }
940
1042
  interface MockServerOptions {
1043
+ live?: LiveOptions;
941
1044
  /** Optional inbound test-client access keys. Omit to preserve permissive behavior. */
942
1045
  auth?: ApiKeyAuthConfig;
943
1046
  port?: number;
@@ -1099,5 +1202,5 @@ interface HandlerDefaults {
1099
1202
  }
1100
1203
  //# sourceMappingURL=types.d.ts.map
1101
1204
  //#endregion
1102
- export { ApiKeyAuthConfig, AudioResponse, ChaosAction, ChaosConfig, ChaosDefaults, ChatCompletion, ChatCompletionChoice, ChatCompletionMessage, ChatCompletionRequest, ChatMessage, ContentPart, ContentWithToolCallsResponse, EmbeddingFixtureOpts, EmbeddingResponse, ErrorResponse, FalQueueOpts, Fixture, FixtureBlock, FixtureFile, FixtureFileBlock, FixtureFileContentWithToolCallsResponse, FixtureFileEntry, FixtureFileResponse, FixtureFileTextResponse, FixtureFileToolCall, FixtureFileToolCallResponse, FixtureMatch, FixtureOpts, FixtureResponse, HandlerDefaults, ImageItem, ImageResponse, JournalEntry, MockServerOptions, Mountable, RawJSONResponse, RecordConfig, RecordProviderKey, RecordedTimings, ResponseFactory, ResponseOverrides, SSEChoice, SSEChunk, SSEDelta, SSEToolCallDelta, StreamingProfile, TextResponse, ToolCall, ToolCallMessage, ToolCallResponse, ToolDefinition, TranscriptionResponse, VideoResponse };
1205
+ export { ApiKeyAuthConfig, AudioResponse, ChaosAction, ChaosConfig, ChaosDefaults, ChatCompletion, ChatCompletionChoice, ChatCompletionMessage, ChatCompletionRequest, ChatMessage, ContentPart, ContentWithToolCallsResponse, EmbeddingFixtureOpts, EmbeddingResponse, ErrorResponse, FalQueueOpts, Fixture, FixtureBlock, FixtureFile, FixtureFileBlock, FixtureFileContentWithToolCallsResponse, FixtureFileEntry, FixtureFileResponse, FixtureFileTextResponse, FixtureFileToolCall, FixtureFileToolCallResponse, FixtureMatch, FixtureOpts, FixtureResponse, HandlerDefaults, ImageItem, ImageResponse, JournalBody, JournalEntry, MockServerOptions, Mountable, RawJSONResponse, RecordConfig, RecordProviderKey, RecordedTimings, ResponseFactory, ResponseOverrides, SSEChoice, SSEChunk, SSEDelta, SSEToolCallDelta, StreamingProfile, TextResponse, ToolCall, ToolCallMessage, ToolCallResponse, ToolDefinition, TranscriptionResponse, VideoResponse, VoiceDesignPreview, VoiceDesignResponse };
1103
1206
  //# sourceMappingURL=types.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","names":[],"sources":["../src/types.ts"],"sourcesContent":[],"mappings":";;;;;;;UAQiB,SAAA;qBAER,MAAA,CAAK,sBACL,MAAA,CAAK,mCAET;EALY,aAAS,EAAA,MAAA,EAMD,GAAA,CAAI,MANH,EAAA,IAAA,EAMiB,MANjB,EAAA,QAAA,EAAA,MAAA,CAAA,EAM4C,OAN5C,CAAA,OAAA,CAAA;EAAA,MAAA,GAAA,EAAA;IAEjB,MAAK,EAAA,MAAA;IACL,CAAA,GAAA,EAAK,MAAA,CAAA,EAAA,OAAA;;YAGe,EAAA,OAAA,EAEN,OAFM,CAAA,EAAA,IAAA;YAAc,EAAA,GAAA,EAAA,MAAA,CAAA,EAAA,IAAA;aAA2B,EAAA,QAAA,EAI7C,eAJ6C,CAAA,EAAA,IAAA;;AAI7C,UAGR,WAAA,CAHQ;EAAe,IAAA,EAAA,MAAA;EAGvB,IAAA,CAAA,EAAA,MAAA;EAMA,CAAA,GAAA,EAAA,MAAA,CAAA,EAAW,OAAA;;AAER,UAFH,WAAA,CAEG;MAEL,EAAA,QAAA,GAAA,MAAA,GAAA,WAAA,GAAA,MAAA;EAAe,OAAA,EAAA,MAAA,GAFV,WAEU,EAAA,GAAA,IAAA;EAIb,IAAA,CAAA,EAAA,MAAA;EAMA,UAAA,CAAA,EAVF,eAUuB,EAAA;EAAA,YAAA,CAAA,EAAA,MAAA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,QAAA;;;;;WAKN;;;;;;;MAOL;;;;;;UAOW,SAAA;;SAER;;;;;;UAOQ,QAAA;;;;eAIF;;UAGE,gBAAA;;;;;;;;;UASA,cAAA;;;;;WAKN;;;;;MAKL;;;;;;;;;;;;UAaW,oBAAA;;WAEN;;;;;;UAOM,qBAAA;;;;;;;;;;;eAWF;;KAKH,iBAAA;UAiBK,YAAA;aACJ,QAAQ,OAAO;;;;;;;;;;;;;iBAaX,QAAQ,OAAO;;;;;;;;;;;;;;;;QAgBxB;;;;;;oBAMY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAuDH,2BAAA;;;;;;;;;;;;;;;;UAiBA,eAAA;;;;;;UAOA,iBAAA;SACR;;SAEA;;;;;;;;UAQC;;;;;;WAMC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAkCgB,0BAA0B;;;;;;;;;;;aAWxC;;;;;;;;oBAQO;;;;;;;;aAQP;;;;;;;cAOC;;;;;;;;kBAQI;;UAGD,gBAAA;;;;;;;;UASA,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;UA6BA,eAAA;;;;UAIP;;;;;UAKA;;;;;kBAKQ,YAAY;aACjB;WACF;;2BAEgB,0BAA0B;aACxC;oBACO;aACP;cACC;;;;;;;;kBAQI"}
package/dist/types.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Journal } from "./journal.js";
2
+ import { LiveFixtureResponse, LiveOptions } from "./live-types.js";
2
3
  import { Logger } from "./logger.js";
3
4
  import { MetricsRegistry } from "./metrics.js";
4
5
  import * as http$1 from "node:http";
@@ -152,7 +153,7 @@ interface FixtureMatch {
152
153
  * request has no user message, it falls back to scanning the whole conversation.
153
154
  */
154
155
  hasToolResult?: boolean;
155
- endpoint?: "chat" | "image" | "speech" | "transcription" | "translation" | "video" | "embedding" | "audio-gen" | "elevenlabs-tts" | "fal-audio" | "fal" | "realtime" | "realtime-transcription" | "realtime-translation";
156
+ endpoint?: "chat" | "image" | "speech" | "transcription" | "translation" | "video" | "embedding" | "audio-gen" | "elevenlabs-tts" | "elevenlabs-voice-design" | "elevenlabs-voice" | "elevenlabs-voice-get" | "elevenlabs-voice-delete" | "fal-audio" | "fal" | "realtime" | "realtime-transcription" | "realtime-translation" | "openai-live";
156
157
  context?: string;
157
158
  }
158
159
  /**
@@ -388,6 +389,22 @@ interface ImageResponse {
388
389
  image?: ImageItem;
389
390
  images?: ImageItem[];
390
391
  }
392
+ interface VoiceDesignPreview {
393
+ generated_voice_id: string;
394
+ audio_base_64?: string;
395
+ media_type?: string;
396
+ duration_secs?: number;
397
+ language?: string | null;
398
+ }
399
+ /**
400
+ * Convenience shape for `LLMock.onElevenLabsVoiceDesign`. Stored as a
401
+ * {@link RawJSONResponse} wrapping `{ previews, text }` — the ElevenLabs
402
+ * `/v1/text-to-voice/design` envelope.
403
+ */
404
+ interface VoiceDesignResponse {
405
+ previews: VoiceDesignPreview[];
406
+ text?: string;
407
+ }
391
408
  interface AudioResponse {
392
409
  audio: string | {
393
410
  b64Json: string;
@@ -460,7 +477,7 @@ interface RawJSONResponse extends ResponseOverrides {
460
477
  */
461
478
  billableUnits?: number;
462
479
  }
463
- type FixtureResponse = TextResponse | ToolCallResponse | ContentWithToolCallsResponse | ErrorResponse | EmbeddingResponse | ImageResponse | AudioResponse | TranscriptionResponse | VideoResponse | RawJSONResponse;
480
+ type FixtureResponse = TextResponse | ToolCallResponse | ContentWithToolCallsResponse | ErrorResponse | EmbeddingResponse | ImageResponse | AudioResponse | TranscriptionResponse | VideoResponse | RawJSONResponse | LiveFixtureResponse;
464
481
  interface StreamingProfile {
465
482
  ttft?: number;
466
483
  tps?: number;
@@ -479,16 +496,50 @@ interface RecordedTimings {
479
496
  /**
480
497
  * Probabilistic chaos injection rates.
481
498
  *
482
- * Rates are evaluated sequentially per request — drop → malformed → disconnect
483
- * — and the first hit wins. Consequently malformedRate is conditional on drop
484
- * not firing, and disconnectRate is conditional on neither drop nor malformed
485
- * firing. A config of `{ dropRate: 0.5, malformedRate: 0.5 }` yields a ~25 %
486
- * effective malformed rate, not 50 %.
499
+ * Rates are evaluated sequentially per request — drop → malformed → rateLimit
500
+ * → disconnect — as four separate draws in that order, and the first draw that
501
+ * hits wins and short-circuits the rest. Each rate is therefore the probability
502
+ * that its OWN draw hits GIVEN that no earlier rate fired, not the share of
503
+ * requests that end in that fault; only `dropRate`, first in the chain, is
504
+ * unconditional. A config of `{ dropRate: 0.5, malformedRate: 0.5 }` yields a
505
+ * ~25 % effective malformed rate, not 50 %, and the same compounding applies to
506
+ * `{ dropRate: 0.5, rateLimitRate: 0.5 }` (~25 % rate limits).
507
+ */
508
+ /**
509
+ * Probabilistic (and one deterministic) fault injection knobs.
510
+ *
511
+ * VALIDATION — ONE policy, whatever the source. Each field is a finite number
512
+ * in its range: the rates in [0, 1], `latencyMs` in [0, 30000]. A value outside
513
+ * it, or one that is not a number at all (`"0.5abc"`, `"Infinity"`, `NaN`), is
514
+ * REJECTED, never clamped — silent clamping substitutes a fault rate nobody
515
+ * asked for and hides the misconfiguration that produced it.
516
+ *
517
+ * Rejection is reported in the loudest way each source allows, and the three
518
+ * agree: `POST /__aimock/chaos` answers 400, the `--chaos-*` CLI flags refuse
519
+ * to start, and a per-request header or a fixture/server value is refused with
520
+ * a `[chaos]` warning and left unset so the next level of precedence (header >
521
+ * fixture > server) applies.
487
522
  */
488
523
  interface ChaosConfig {
489
524
  dropRate?: number;
490
525
  malformedRate?: number;
491
526
  disconnectRate?: number;
527
+ /**
528
+ * Deterministic delay (ms) injected before the request is handled.
529
+ * Applied when > 0 — header > fixture > server precedence, same as rates.
530
+ * Unlike rates it is not probabilistic: a set latency always fires so
531
+ * timeout/retry suites get a stable signal. Must be in [0, 30000]; a value
532
+ * outside that range is rejected, not clamped (see above).
533
+ */
534
+ latencyMs?: number;
535
+ /**
536
+ * Chance of a 429 rate-limit rejection with `Retry-After`, CONDITIONAL on
537
+ * neither `dropRate` nor `malformedRate` having fired first: it is the third
538
+ * draw in the drop → malformed → rateLimit → disconnect order, and the first
539
+ * hit wins. Paired with a 0.5 `dropRate` a 0.5 `rateLimitRate` produces ~25 %
540
+ * rate limits, not 50 % (see the interface docstring above).
541
+ */
542
+ rateLimitRate?: number;
492
543
  }
493
544
  /**
494
545
  * Server-level chaos as the handlers see it: a baseline plus per-`X-Test-Id`
@@ -509,7 +560,28 @@ interface ChaosConfig {
509
560
  interface ChaosScope {
510
561
  /** Server-wide baseline: the construction config, or the untagged override. */
511
562
  base?: ChaosConfig;
512
- /** Per-testId overrides, consulted before `base`. */
563
+ /**
564
+ * Per-testId overrides, consulted INSTEAD OF `base` — never merged over it.
565
+ *
566
+ * An installed override REPLACES the baseline wholesale for that testId: a
567
+ * server started with `--chaos-latency 500` whose test `t1` installs
568
+ * `{ dropRate: 1 }` gives `t1` traffic a drop and NO latency, because
569
+ * `latencyMs` is not restated. To keep a baseline field, restate it in the
570
+ * override body.
571
+ *
572
+ * Replacement — not a field-wise merge — is deliberate, and it is what makes
573
+ * `POST /__aimock/chaos {}` ("explicitly no chaos for my test") different
574
+ * from `DELETE /__aimock/chaos` ("forget I said anything, fall back to the
575
+ * baseline"). Under a merge, `POST {}` would be a no-op and that distinction
576
+ * would collapse. It also matches the untagged case, where an override
577
+ * likewise replaces the construction-time config rather than layering on it.
578
+ *
579
+ * The two chain links ABOVE this one — fixture chaos over server chaos, and
580
+ * request headers over both — DO merge field-wise (see `resolveChaosConfig`).
581
+ * Only the scope lookup replaces, because it selects a config rather than
582
+ * refining one. `GET /__aimock/chaos` with the same testId always reports the
583
+ * config actually in effect for that scope, so the replacement is auditable.
584
+ */
513
585
  byTestId?: ReadonlyMap<string, ChaosConfig>;
514
586
  }
515
587
  /**
@@ -518,7 +590,7 @@ interface ChaosScope {
518
590
  * itself passes a `ChaosScope`.
519
591
  */
520
592
  type ChaosDefaults = ChaosConfig | ChaosScope;
521
- type ChaosAction = "drop" | "malformed" | "disconnect";
593
+ type ChaosAction = "drop" | "malformed" | "rateLimit" | "disconnect";
522
594
  type ResponseFactory = (req: ChatCompletionRequest) => FixtureResponse | Promise<FixtureResponse>;
523
595
  interface Fixture {
524
596
  match: FixtureMatch;
@@ -621,7 +693,7 @@ interface FixtureFileContentWithToolCallsResponse extends ResponseOverrides {
621
693
  redactedThinking?: string[];
622
694
  webSearches?: string[];
623
695
  }
624
- type FixtureFileResponse = FixtureFileTextResponse | FixtureFileToolCallResponse | FixtureFileContentWithToolCallsResponse | ErrorResponse | EmbeddingResponse | ImageResponse | AudioResponse | TranscriptionResponse | VideoResponse | RawJSONResponse;
696
+ type FixtureFileResponse = FixtureFileTextResponse | FixtureFileToolCallResponse | FixtureFileContentWithToolCallsResponse | ErrorResponse | EmbeddingResponse | ImageResponse | AudioResponse | TranscriptionResponse | VideoResponse | RawJSONResponse | LiveFixtureResponse;
625
697
  interface FixtureFile {
626
698
  fixtures: FixtureFileEntry[];
627
699
  }
@@ -654,7 +726,7 @@ interface FixtureFileEntry {
654
726
  * `FixtureMatch.hasToolResult`.
655
727
  */
656
728
  hasToolResult?: boolean;
657
- endpoint?: "chat" | "image" | "speech" | "transcription" | "translation" | "video" | "embedding" | "audio-gen" | "elevenlabs-tts" | "fal-audio" | "fal" | "realtime" | "realtime-transcription" | "realtime-translation";
729
+ endpoint?: "chat" | "image" | "speech" | "transcription" | "translation" | "video" | "embedding" | "audio-gen" | "elevenlabs-tts" | "elevenlabs-voice-design" | "elevenlabs-voice" | "elevenlabs-voice-get" | "elevenlabs-voice-delete" | "fal-audio" | "fal" | "realtime" | "realtime-transcription" | "realtime-translation" | "openai-live";
658
730
  context?: string;
659
731
  };
660
732
  response: FixtureFileResponse;
@@ -673,13 +745,34 @@ interface FixtureFileEntry {
673
745
  toolsHash?: string;
674
746
  };
675
747
  }
748
+ /**
749
+ * A recorded request body.
750
+ *
751
+ * Most journal entries carry a chat-completion request, but every service
752
+ * journals through one entry type and several of them record a body that is
753
+ * not one: the fine-tuning create payload is recorded verbatim so the journal
754
+ * reports what the caller actually sent, and the journal's own size cap
755
+ * substitutes a truncation marker for an oversized body. Neither shape has a
756
+ * `model`/`messages` pair, so typing the field as `ChatCompletionRequest`
757
+ * alone forces those writers through a cast that claims fields that are not
758
+ * there — the second member exists so they do not have to lie.
759
+ *
760
+ * TypeScript collapses the two for ASSIGNMENT (`ChatCompletionRequest` has an
761
+ * index signature, so it is itself a `Record<string, unknown>`); the union is
762
+ * kept two-membered because it is what the field means, not because it narrows
763
+ * anything. For READING, treat the body as opaque JSON — that is already how
764
+ * every consumer uses it (the journal cap re-serializes it, `GET
765
+ * /__aimock/journal` hands it back) — and property-check before reaching for a
766
+ * chat-request field.
767
+ */
768
+ type JournalBody = ChatCompletionRequest | Record<string, unknown>;
676
769
  interface JournalEntry {
677
770
  id: string;
678
771
  timestamp: number;
679
772
  method: string;
680
773
  path: string;
681
774
  headers: Record<string, string>;
682
- body: ChatCompletionRequest | null;
775
+ body: JournalBody | null;
683
776
  service?: string;
684
777
  response: {
685
778
  status: number;
@@ -692,13 +785,22 @@ interface JournalEntry {
692
785
  * configured proxy: chaos-path entries (e.g. chaos on the OpenRouter
693
786
  * video lifecycle endpoints; in REPLAY mode their normal 200/400/401/404
694
787
  * entries omit source, while record-mode 200s on those endpoints carry
695
- * source:"proxy") AND the OpenRouter video models listing synthesized as
696
- * the fallback after a FAILED proxy attempt. Absent when the distinction
697
- * doesn't apply (e.g. 404/503 fallback where nothing was going to serve).
788
+ * source:"proxy"), the OpenRouter video models listing synthesized as the
789
+ * fallback after a FAILED proxy attempt, and the services whose responses
790
+ * are synthesized outright — every fine-tuning entry carries it, success
791
+ * and error alike, since that store is aimock's own and no fixture or
792
+ * proxy ever serves it. Absent when the distinction doesn't apply
793
+ * (e.g. 404/503 fallback where nothing was going to serve).
698
794
  */
699
795
  source?: "fixture" | "proxy" | "internal";
700
796
  interrupted?: boolean;
701
797
  interruptReason?: string;
798
+ /**
799
+ * The handler crashed AFTER the response completed. The client received
800
+ * `status` in full, so this is not an interruption; the message is what
801
+ * the crash said.
802
+ */
803
+ error?: string;
702
804
  chaosAction?: ChaosAction;
703
805
  /** When the X-AIMock-Strict header overrode the server default. */
704
806
  strictOverride?: boolean;
@@ -938,6 +1040,7 @@ interface FalRecordConfig {
938
1040
  timeoutMs?: number;
939
1041
  }
940
1042
  interface MockServerOptions {
1043
+ live?: LiveOptions;
941
1044
  /** Optional inbound test-client access keys. Omit to preserve permissive behavior. */
942
1045
  auth?: ApiKeyAuthConfig;
943
1046
  port?: number;
@@ -1099,5 +1202,5 @@ interface HandlerDefaults {
1099
1202
  }
1100
1203
  //# sourceMappingURL=types.d.ts.map
1101
1204
  //#endregion
1102
- export { ApiKeyAuthConfig, AudioResponse, ChaosAction, ChaosConfig, ChaosDefaults, ChatCompletion, ChatCompletionChoice, ChatCompletionMessage, ChatCompletionRequest, ChatMessage, ContentPart, ContentWithToolCallsResponse, EmbeddingFixtureOpts, EmbeddingResponse, ErrorResponse, FalQueueOpts, Fixture, FixtureBlock, FixtureFile, FixtureFileBlock, FixtureFileContentWithToolCallsResponse, FixtureFileEntry, FixtureFileResponse, FixtureFileTextResponse, FixtureFileToolCall, FixtureFileToolCallResponse, FixtureMatch, FixtureOpts, FixtureResponse, HandlerDefaults, ImageItem, ImageResponse, JournalEntry, MockServerOptions, Mountable, RawJSONResponse, RecordConfig, RecordProviderKey, RecordedTimings, ResponseFactory, ResponseOverrides, SSEChoice, SSEChunk, SSEDelta, SSEToolCallDelta, StreamingProfile, TextResponse, ToolCall, ToolCallMessage, ToolCallResponse, ToolDefinition, TranscriptionResponse, VideoResponse };
1205
+ export { ApiKeyAuthConfig, AudioResponse, ChaosAction, ChaosConfig, ChaosDefaults, ChatCompletion, ChatCompletionChoice, ChatCompletionMessage, ChatCompletionRequest, ChatMessage, ContentPart, ContentWithToolCallsResponse, EmbeddingFixtureOpts, EmbeddingResponse, ErrorResponse, FalQueueOpts, Fixture, FixtureBlock, FixtureFile, FixtureFileBlock, FixtureFileContentWithToolCallsResponse, FixtureFileEntry, FixtureFileResponse, FixtureFileTextResponse, FixtureFileToolCall, FixtureFileToolCallResponse, FixtureMatch, FixtureOpts, FixtureResponse, HandlerDefaults, ImageItem, ImageResponse, JournalBody, JournalEntry, MockServerOptions, Mountable, RawJSONResponse, RecordConfig, RecordProviderKey, RecordedTimings, ResponseFactory, ResponseOverrides, SSEChoice, SSEChunk, SSEDelta, SSEToolCallDelta, StreamingProfile, TextResponse, ToolCall, ToolCallMessage, ToolCallResponse, ToolDefinition, TranscriptionResponse, VideoResponse, VoiceDesignPreview, VoiceDesignResponse };
1103
1206
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../src/types.ts"],"sourcesContent":[],"mappings":";;;;;;;UAQiB,SAAA;qBAER,MAAA,CAAK,sBACL,MAAA,CAAK,mCAET;EALY,aAAS,EAAA,MAAA,EAMD,GAAA,CAAI,MANH,EAAA,IAAA,EAMiB,MANjB,EAAA,QAAA,EAAA,MAAA,CAAA,EAM4C,OAN5C,CAAA,OAAA,CAAA;EAAA,MAAA,GAAA,EAAA;IAEjB,MAAK,EAAA,MAAA;IACL,CAAA,GAAA,EAAK,MAAA,CAAA,EAAA,OAAA;;YAGe,EAAA,OAAA,EAEN,OAFM,CAAA,EAAA,IAAA;YAAc,EAAA,GAAA,EAAA,MAAA,CAAA,EAAA,IAAA;aAA2B,EAAA,QAAA,EAI7C,eAJ6C,CAAA,EAAA,IAAA;;AAI7C,UAGR,WAAA,CAHQ;EAAe,IAAA,EAAA,MAAA;EAGvB,IAAA,CAAA,EAAA,MAAA;EAMA,CAAA,GAAA,EAAA,MAAA,CAAA,EAAW,OAAA;;AAER,UAFH,WAAA,CAEG;MAEL,EAAA,QAAA,GAAA,MAAA,GAAA,WAAA,GAAA,MAAA;EAAe,OAAA,EAAA,MAAA,GAFV,WAEU,EAAA,GAAA,IAAA;EAIb,IAAA,CAAA,EAAA,MAAA;EAMA,UAAA,CAAA,EA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