@copilotkit/aimock 1.44.0 → 1.45.1

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 (278) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +42 -0
  4. package/README.md +6 -0
  5. package/dist/agui-types.d.cts.map +1 -1
  6. package/dist/aimock-cli.cjs +31 -5
  7. package/dist/aimock-cli.cjs.map +1 -1
  8. package/dist/aimock-cli.d.cts.map +1 -1
  9. package/dist/aimock-cli.d.ts.map +1 -1
  10. package/dist/aimock-cli.js +31 -5
  11. package/dist/aimock-cli.js.map +1 -1
  12. package/dist/bedrock-converse.cjs +312 -39
  13. package/dist/bedrock-converse.cjs.map +1 -1
  14. package/dist/bedrock-converse.d.cts.map +1 -1
  15. package/dist/bedrock-converse.d.ts.map +1 -1
  16. package/dist/bedrock-converse.js +313 -40
  17. package/dist/bedrock-converse.js.map +1 -1
  18. package/dist/bedrock.cjs +195 -42
  19. package/dist/bedrock.cjs.map +1 -1
  20. package/dist/bedrock.d.cts.map +1 -1
  21. package/dist/bedrock.d.ts.map +1 -1
  22. package/dist/bedrock.js +196 -43
  23. package/dist/bedrock.js.map +1 -1
  24. package/dist/chaos.cjs +1 -0
  25. package/dist/chaos.js +1 -1
  26. package/dist/cli.cjs +152 -5
  27. package/dist/cli.cjs.map +1 -1
  28. package/dist/cli.js +155 -8
  29. package/dist/cli.js.map +1 -1
  30. package/dist/cohere.cjs +132 -71
  31. package/dist/cohere.cjs.map +1 -1
  32. package/dist/cohere.d.cts.map +1 -1
  33. package/dist/cohere.d.ts.map +1 -1
  34. package/dist/cohere.js +133 -72
  35. package/dist/cohere.js.map +1 -1
  36. package/dist/config-loader.cjs +62 -4
  37. package/dist/config-loader.cjs.map +1 -1
  38. package/dist/config-loader.d.cts +37 -4
  39. package/dist/config-loader.d.cts.map +1 -1
  40. package/dist/config-loader.d.ts +37 -4
  41. package/dist/config-loader.d.ts.map +1 -1
  42. package/dist/config-loader.js +62 -4
  43. package/dist/config-loader.js.map +1 -1
  44. package/dist/fakes-plugin.cjs +131 -0
  45. package/dist/fakes-plugin.cjs.map +1 -0
  46. package/dist/fakes-plugin.d.cts +23 -0
  47. package/dist/fakes-plugin.d.cts.map +1 -0
  48. package/dist/fakes-plugin.d.ts +23 -0
  49. package/dist/fakes-plugin.d.ts.map +1 -0
  50. package/dist/fakes-plugin.js +127 -0
  51. package/dist/fakes-plugin.js.map +1 -0
  52. package/dist/fixture-loader-services.cjs +1 -1
  53. package/dist/fixture-loader-services.cjs.map +1 -1
  54. package/dist/fixture-loader-services.js +1 -1
  55. package/dist/fixture-loader-services.js.map +1 -1
  56. package/dist/fixture-loader.cjs +389 -27
  57. package/dist/fixture-loader.cjs.map +1 -1
  58. package/dist/fixture-loader.d.cts +47 -3
  59. package/dist/fixture-loader.d.cts.map +1 -1
  60. package/dist/fixture-loader.d.ts +47 -3
  61. package/dist/fixture-loader.d.ts.map +1 -1
  62. package/dist/fixture-loader.js +384 -29
  63. package/dist/fixture-loader.js.map +1 -1
  64. package/dist/gemini-interactions.cjs +250 -52
  65. package/dist/gemini-interactions.cjs.map +1 -1
  66. package/dist/gemini-interactions.d.cts.map +1 -1
  67. package/dist/gemini-interactions.d.ts.map +1 -1
  68. package/dist/gemini-interactions.js +251 -53
  69. package/dist/gemini-interactions.js.map +1 -1
  70. package/dist/gemini.cjs +226 -37
  71. package/dist/gemini.cjs.map +1 -1
  72. package/dist/gemini.d.cts.map +1 -1
  73. package/dist/gemini.d.ts.map +1 -1
  74. package/dist/gemini.js +227 -38
  75. package/dist/gemini.js.map +1 -1
  76. package/dist/helpers.cjs +881 -7
  77. package/dist/helpers.cjs.map +1 -1
  78. package/dist/helpers.d.cts +85 -4
  79. package/dist/helpers.d.cts.map +1 -1
  80. package/dist/helpers.d.ts +85 -4
  81. package/dist/helpers.d.ts.map +1 -1
  82. package/dist/helpers.js +839 -8
  83. package/dist/helpers.js.map +1 -1
  84. package/dist/index.cjs +9 -0
  85. package/dist/index.d.cts +7 -5
  86. package/dist/index.d.ts +7 -5
  87. package/dist/index.js +4 -3
  88. package/dist/jest.cjs +31 -7
  89. package/dist/jest.cjs.map +1 -1
  90. package/dist/jest.d.cts +43 -3
  91. package/dist/jest.d.cts.map +1 -1
  92. package/dist/jest.d.ts +43 -3
  93. package/dist/jest.d.ts.map +1 -1
  94. package/dist/jest.js +33 -9
  95. package/dist/jest.js.map +1 -1
  96. package/dist/journal.cjs +135 -13
  97. package/dist/journal.cjs.map +1 -1
  98. package/dist/journal.d.cts +38 -4
  99. package/dist/journal.d.cts.map +1 -1
  100. package/dist/journal.d.ts +38 -4
  101. package/dist/journal.d.ts.map +1 -1
  102. package/dist/journal.js +135 -13
  103. package/dist/journal.js.map +1 -1
  104. package/dist/live-sanitize.cjs +4 -32
  105. package/dist/live-sanitize.cjs.map +1 -1
  106. package/dist/live-sanitize.js +4 -32
  107. package/dist/live-sanitize.js.map +1 -1
  108. package/dist/llmock.cjs +123 -30
  109. package/dist/llmock.cjs.map +1 -1
  110. package/dist/llmock.d.cts +16 -1
  111. package/dist/llmock.d.cts.map +1 -1
  112. package/dist/llmock.d.ts +16 -1
  113. package/dist/llmock.d.ts.map +1 -1
  114. package/dist/llmock.js +125 -32
  115. package/dist/llmock.js.map +1 -1
  116. package/dist/mcp-fakes-mount.cjs +1 -0
  117. package/dist/mcp-fakes-mount.cjs.map +1 -1
  118. package/dist/mcp-fakes-mount.js +1 -0
  119. package/dist/mcp-fakes-mount.js.map +1 -1
  120. package/dist/mcp-fakes-report.cjs +111 -0
  121. package/dist/mcp-fakes-report.cjs.map +1 -0
  122. package/dist/mcp-fakes-report.d.cts +40 -0
  123. package/dist/mcp-fakes-report.d.cts.map +1 -0
  124. package/dist/mcp-fakes-report.d.ts +40 -0
  125. package/dist/mcp-fakes-report.d.ts.map +1 -0
  126. package/dist/mcp-fakes-report.js +107 -0
  127. package/dist/mcp-fakes-report.js.map +1 -0
  128. package/dist/mcp-fakes.cjs +331 -8
  129. package/dist/mcp-fakes.cjs.map +1 -1
  130. package/dist/mcp-fakes.d.cts +406 -3
  131. package/dist/mcp-fakes.d.cts.map +1 -1
  132. package/dist/mcp-fakes.d.ts +406 -3
  133. package/dist/mcp-fakes.d.ts.map +1 -1
  134. package/dist/mcp-fakes.js +331 -8
  135. package/dist/mcp-fakes.js.map +1 -1
  136. package/dist/mcp-handler.cjs +216 -17
  137. package/dist/mcp-handler.cjs.map +1 -1
  138. package/dist/mcp-handler.d.cts +49 -0
  139. package/dist/mcp-handler.d.cts.map +1 -0
  140. package/dist/mcp-handler.d.ts +49 -0
  141. package/dist/mcp-handler.d.ts.map +1 -0
  142. package/dist/mcp-handler.js +214 -18
  143. package/dist/mcp-handler.js.map +1 -1
  144. package/dist/mcp-mock.cjs +112 -1
  145. package/dist/mcp-mock.cjs.map +1 -1
  146. package/dist/mcp-mock.d.cts +33 -2
  147. package/dist/mcp-mock.d.cts.map +1 -1
  148. package/dist/mcp-mock.d.ts +33 -2
  149. package/dist/mcp-mock.d.ts.map +1 -1
  150. package/dist/mcp-mock.js +112 -1
  151. package/dist/mcp-mock.js.map +1 -1
  152. package/dist/mcp-recorder.cjs +1224 -0
  153. package/dist/mcp-recorder.cjs.map +1 -0
  154. package/dist/mcp-recorder.d.cts +108 -0
  155. package/dist/mcp-recorder.d.cts.map +1 -0
  156. package/dist/mcp-recorder.d.ts +108 -0
  157. package/dist/mcp-recorder.d.ts.map +1 -0
  158. package/dist/mcp-recorder.js +1215 -0
  159. package/dist/mcp-recorder.js.map +1 -0
  160. package/dist/messages.cjs +362 -56
  161. package/dist/messages.cjs.map +1 -1
  162. package/dist/messages.d.cts.map +1 -1
  163. package/dist/messages.d.ts.map +1 -1
  164. package/dist/messages.js +363 -58
  165. package/dist/messages.js.map +1 -1
  166. package/dist/misbehavior.cjs +1523 -0
  167. package/dist/misbehavior.cjs.map +1 -0
  168. package/dist/misbehavior.d.cts +43 -0
  169. package/dist/misbehavior.d.cts.map +1 -0
  170. package/dist/misbehavior.d.ts +43 -0
  171. package/dist/misbehavior.d.ts.map +1 -0
  172. package/dist/misbehavior.js +1511 -0
  173. package/dist/misbehavior.js.map +1 -0
  174. package/dist/ollama.cjs +310 -112
  175. package/dist/ollama.cjs.map +1 -1
  176. package/dist/ollama.d.cts.map +1 -1
  177. package/dist/ollama.d.ts.map +1 -1
  178. package/dist/ollama.js +311 -113
  179. package/dist/ollama.js.map +1 -1
  180. package/dist/openrouter-video.cjs +30 -2
  181. package/dist/openrouter-video.cjs.map +1 -1
  182. package/dist/openrouter-video.d.cts.map +1 -1
  183. package/dist/openrouter-video.d.ts.map +1 -1
  184. package/dist/openrouter-video.js +30 -2
  185. package/dist/openrouter-video.js.map +1 -1
  186. package/dist/record-sanitize.cjs +231 -0
  187. package/dist/record-sanitize.cjs.map +1 -0
  188. package/dist/record-sanitize.js +224 -0
  189. package/dist/record-sanitize.js.map +1 -0
  190. package/dist/recorder.cjs +106 -5
  191. package/dist/recorder.cjs.map +1 -1
  192. package/dist/recorder.d.cts +2 -1
  193. package/dist/recorder.d.cts.map +1 -1
  194. package/dist/recorder.d.ts +2 -1
  195. package/dist/recorder.d.ts.map +1 -1
  196. package/dist/recorder.js +107 -7
  197. package/dist/recorder.js.map +1 -1
  198. package/dist/responses.cjs +667 -171
  199. package/dist/responses.cjs.map +1 -1
  200. package/dist/responses.d.cts +5 -13
  201. package/dist/responses.d.cts.map +1 -1
  202. package/dist/responses.d.ts +5 -13
  203. package/dist/responses.d.ts.map +1 -1
  204. package/dist/responses.js +665 -174
  205. package/dist/responses.js.map +1 -1
  206. package/dist/router.cjs +24 -2
  207. package/dist/router.cjs.map +1 -1
  208. package/dist/router.d.cts.map +1 -1
  209. package/dist/router.d.ts.map +1 -1
  210. package/dist/router.js +25 -4
  211. package/dist/router.js.map +1 -1
  212. package/dist/server.cjs +572 -76
  213. package/dist/server.cjs.map +1 -1
  214. package/dist/server.d.cts.map +1 -1
  215. package/dist/server.d.ts.map +1 -1
  216. package/dist/server.js +574 -78
  217. package/dist/server.js.map +1 -1
  218. package/dist/stream-collapse.cjs +236 -34
  219. package/dist/stream-collapse.cjs.map +1 -1
  220. package/dist/stream-collapse.d.cts +39 -4
  221. package/dist/stream-collapse.d.cts.map +1 -1
  222. package/dist/stream-collapse.d.ts +39 -4
  223. package/dist/stream-collapse.d.ts.map +1 -1
  224. package/dist/stream-collapse.js +235 -35
  225. package/dist/stream-collapse.js.map +1 -1
  226. package/dist/types.cjs.map +1 -1
  227. package/dist/types.d.cts +315 -4
  228. package/dist/types.d.cts.map +1 -1
  229. package/dist/types.d.ts +315 -4
  230. package/dist/types.d.ts.map +1 -1
  231. package/dist/types.js.map +1 -1
  232. package/dist/validate-cli.cjs +36 -4
  233. package/dist/validate-cli.cjs.map +1 -1
  234. package/dist/validate-cli.js +37 -5
  235. package/dist/validate-cli.js.map +1 -1
  236. package/dist/vector-types.d.ts.map +1 -1
  237. package/dist/version.cjs +45 -0
  238. package/dist/version.cjs.map +1 -0
  239. package/dist/version.js +44 -0
  240. package/dist/version.js.map +1 -0
  241. package/dist/vitest.cjs +66 -10
  242. package/dist/vitest.cjs.map +1 -1
  243. package/dist/vitest.d.cts +35 -4
  244. package/dist/vitest.d.cts.map +1 -1
  245. package/dist/vitest.d.ts +35 -4
  246. package/dist/vitest.d.ts.map +1 -1
  247. package/dist/vitest.js +67 -11
  248. package/dist/vitest.js.map +1 -1
  249. package/dist/watcher.cjs +6 -2
  250. package/dist/watcher.cjs.map +1 -1
  251. package/dist/watcher.js +6 -2
  252. package/dist/watcher.js.map +1 -1
  253. package/dist/ws-gemini-live.cjs +210 -101
  254. package/dist/ws-gemini-live.cjs.map +1 -1
  255. package/dist/ws-gemini-live.d.cts +9 -3
  256. package/dist/ws-gemini-live.d.cts.map +1 -1
  257. package/dist/ws-gemini-live.d.ts +9 -3
  258. package/dist/ws-gemini-live.d.ts.map +1 -1
  259. package/dist/ws-gemini-live.js +211 -102
  260. package/dist/ws-gemini-live.js.map +1 -1
  261. package/dist/ws-realtime.cjs +175 -62
  262. package/dist/ws-realtime.cjs.map +1 -1
  263. package/dist/ws-realtime.d.cts +8 -3
  264. package/dist/ws-realtime.d.cts.map +1 -1
  265. package/dist/ws-realtime.d.ts +8 -3
  266. package/dist/ws-realtime.d.ts.map +1 -1
  267. package/dist/ws-realtime.js +176 -63
  268. package/dist/ws-realtime.js.map +1 -1
  269. package/dist/ws-responses.cjs +109 -16
  270. package/dist/ws-responses.cjs.map +1 -1
  271. package/dist/ws-responses.d.cts +8 -12
  272. package/dist/ws-responses.d.cts.map +1 -1
  273. package/dist/ws-responses.d.ts +8 -12
  274. package/dist/ws-responses.d.ts.map +1 -1
  275. package/dist/ws-responses.js +111 -18
  276. package/dist/ws-responses.js.map +1 -1
  277. package/package.json +10 -2
  278. package/skills/write-fixtures/SKILL.md +179 -21
package/dist/index.cjs CHANGED
@@ -56,6 +56,7 @@ const require_metrics = require('./metrics.cjs');
56
56
  const require_types = require('./types.cjs');
57
57
  const require_mcp_fakes = require('./mcp-fakes.cjs');
58
58
  const require_mcp_mock = require('./mcp-mock.cjs');
59
+ const require_mcp_fakes_report = require('./mcp-fakes-report.cjs');
59
60
  const require_server = require('./server.cjs');
60
61
  const require_fixture_loader_services = require('./fixture-loader-services.cjs');
61
62
  const require_llmock = require('./llmock.cjs');
@@ -66,6 +67,8 @@ const require_suite = require('./suite.cjs');
66
67
  exports.A2AMock = require_a2a_mock.A2AMock;
67
68
  exports.AGUIMock = require_agui_mock.AGUIMock;
68
69
  exports.AGUI_RECORD_BUFFER_HARD_CEILING = require_agui_recorder.AGUI_RECORD_BUFFER_HARD_CEILING;
70
+ exports.AimockFakesReportError = require_mcp_fakes_report.AimockFakesReportError;
71
+ exports.AimockTestIdCollisionError = require_mcp_fakes_report.AimockTestIdCollisionError;
69
72
  exports.BYTEPLUS_VIDEO_MAX_ENTRIES = require_byteplus_video.BYTEPLUS_VIDEO_MAX_ENTRIES;
70
73
  exports.BYTEPLUS_VIDEO_TASKS_PATH = require_byteplus_video.BYTEPLUS_VIDEO_TASKS_PATH;
71
74
  exports.BytePlusVideoJobMap = require_byteplus_video.BytePlusVideoJobMap;
@@ -77,6 +80,7 @@ exports.FalQueueStateMap = require_fal.FalQueueStateMap;
77
80
  exports.FixtureLoadError = require_fixture_loader.FixtureLoadError;
78
81
  exports.GROK_VIDEO_MAX_ENTRIES = require_grok_video.GROK_VIDEO_MAX_ENTRIES;
79
82
  exports.GrokVideoJobMap = require_grok_video.GrokVideoJobMap;
83
+ exports.InvalidFixtureToolCallError = require_helpers.InvalidFixtureToolCallError;
80
84
  exports.Journal = require_journal.Journal;
81
85
  exports.LLMock = require_llmock.LLMock;
82
86
  exports.Logger = require_logger.Logger;
@@ -84,10 +88,12 @@ exports.MAX_COLLAPSE_STRING_LENGTH = require_stream_collapse.MAX_COLLAPSE_STRING
84
88
  exports.MCPMock = require_mcp_mock.MCPMock;
85
89
  exports.MCP_FAKE_ERROR_CODES = require_types.MCP_FAKE_ERROR_CODES;
86
90
  exports.McpFakesAddError = require_mcp_fakes.McpFakesAddError;
91
+ exports.MisbehaviorConfigError = require_fixture_loader.MisbehaviorConfigError;
87
92
  exports.OPENROUTER_VIDEO_DEFAULT_MAX_CONTENT_BYTES = require_openrouter_video.OPENROUTER_VIDEO_DEFAULT_MAX_CONTENT_BYTES;
88
93
  exports.OPENROUTER_VIDEO_MAX_ENTRIES = require_openrouter_video.OPENROUTER_VIDEO_MAX_ENTRIES;
89
94
  exports.OpenRouterVideoJobMap = require_openrouter_video.OpenRouterVideoJobMap;
90
95
  exports.ROUTE_DEFINITIONS = require_route_registry.ROUTE_DEFINITIONS;
96
+ exports.UnsupportedToolCallError = require_helpers.UnsupportedToolCallError;
91
97
  exports.VEO_VIDEO_MAX_ENTRIES = require_veo_video.VEO_VIDEO_MAX_ENTRIES;
92
98
  exports.VectorMock = require_vector_mock.VectorMock;
93
99
  exports.VeoVideoJobMap = require_veo_video.VeoVideoJobMap;
@@ -95,6 +101,7 @@ exports.VideoStateMap = require_video.VideoStateMap;
95
101
  exports.WebSocketConnection = require_ws_framing.WebSocketConnection;
96
102
  exports.applyChaos = require_chaos.applyChaosDeprecated;
97
103
  exports.applyChaosAsync = require_chaos.applyChaosAsync;
104
+ exports.assertFakesReport = require_mcp_fakes_report.assertFakesReport;
98
105
  exports.bedrockToCompletionRequest = require_bedrock.bedrockToCompletionRequest;
99
106
  exports.buildAGUIActivityDelta = require_agui_handler.buildActivityDelta;
100
107
  exports.buildAGUIActivityResponse = require_agui_handler.buildActivityResponse;
@@ -257,9 +264,11 @@ exports.ollamaToCompletionRequest = require_ollama.ollamaToCompletionRequest;
257
264
  exports.proxyAndRecord = require_recorder.proxyAndRecord;
258
265
  exports.proxyAndRecordAGUI = require_agui_recorder.proxyAndRecordAGUI;
259
266
  exports.renderValidationRef = require_fixture_loader.renderValidationRef;
267
+ exports.requireFunctionToolCalls = require_helpers.requireFunctionToolCalls;
260
268
  exports.resolveChaosLatencyMs = require_chaos.resolveChaosLatencyMs;
261
269
  exports.resolveFixtureBlocks = require_helpers.resolveFixtureBlocks;
262
270
  exports.resolveRequestId = require_helpers.resolveRequestId;
271
+ exports.resolveResponsesBlocks = require_helpers.resolveResponsesBlocks;
263
272
  exports.resolveUpstreamUrl = require_url.resolveUpstreamUrl;
264
273
  exports.setAGUIRecordBufferCeilingForTests = require_agui_recorder.setAGUIRecordBufferCeilingForTests;
265
274
  exports.setCollapseStringLimitForTests = require_stream_collapse.setCollapseStringLimitForTests;
package/dist/index.d.cts CHANGED
@@ -1,12 +1,13 @@
1
+ import { MisbehaviorRule } from "./misbehavior.cjs";
1
2
  import { DEFAULT_TEST_ID } from "./constants.cjs";
2
3
  import { Journal, isChatCompletionBody } from "./journal.cjs";
3
4
  import { LiveBinding, LiveEntry, LiveFailureCategory, LiveFixtureResponse, LiveJson, LiveMode, LiveObject, LiveOptions, LivePosition, LiveTranscript } from "./live-types.cjs";
4
5
  import { LogLevel, Logger } from "./logger.cjs";
5
6
  import { ROUTE_DEFINITIONS, RouteDefinition } from "./route-registry.cjs";
6
7
  import { MetricsRegistry, createMetricsRegistry, normalizePathLabel } from "./metrics.cjs";
7
- import { FixtureLoadError, FixtureLoadErrorJSON, ValidationRef, ValidationResult, loadFixtureFile, loadFixturesFromDir, normalizeResponse, renderValidationRef, validateFixtures } from "./fixture-loader.cjs";
8
- import { McpFakeAddOrigin, McpFakeAddResult, McpFakeBlockSnapshot, McpFakeDeclaredEntry, McpFakeIssue, McpFakesAddError, McpFakesAddErrorJSON } from "./mcp-fakes.cjs";
9
- import { ApiKeyAuthConfig, AudioResponse, ChaosAction, ChaosConfig, ChatCompletion, ChatCompletionChoice, ChatCompletionMessage, ChatCompletionRequest, ChatMessage, ContentPart, ContentWithToolCallsResponse, EmbeddingFixtureOpts, EmbeddingResponse, ErrorResponse, Fixture, FixtureBlock, FixtureFile, FixtureFileContentWithToolCallsResponse, FixtureFileEntry, FixtureFileResponse, FixtureFileTextResponse, FixtureFileToolCall, FixtureFileToolCallResponse, FixtureMatch, FixtureOpts, FixtureResponse, ImageItem, ImageResponse, JournalBody, JournalEntry, MCP_FAKE_ERROR_CODES, McpFakeAnnotations, McpFakeBlock, McpFakeCall, McpFakeCallAnswer, McpFakeCallMatch, McpFakeContentBlock, McpFakeDeepReadonly, McpFakeErrorCode, McpFakeFullResult, McpFakeIcon, McpFakeIdentity, McpFakeOutcome, McpFakeResourceContents, McpFakeResult, McpFakeScope, McpFakeSource, McpFakeStructuredResult, McpFakeTool, McpFakeUndeclaredPolicy, MockServerOptions, Mountable, RawJSONResponse, RecordConfig, RecordProviderKey, ResponseOverrides, SSEChoice, SSEChunk, SSEDelta, SSEToolCallDelta, StreamingProfile, TextResponse, ToolCall, ToolCallMessage, ToolCallResponse, ToolDefinition, TranscriptionResponse, VideoResponse, VoiceDesignPreview, VoiceDesignResponse } from "./types.cjs";
8
+ import { FixtureLoadError, FixtureLoadErrorJSON, MisbehaviorConfigError, MisbehaviorConfigErrorJSON, ValidationRef, ValidationResult, loadFixtureFile, loadFixturesFromDir, normalizeResponse, renderValidationRef, validateFixtures } from "./fixture-loader.cjs";
9
+ import { McpFakeAddOrigin, McpFakeAddResult, McpFakeBlockSnapshot, McpFakeDeclaredEntry, McpFakeIssue, McpFakeReportEvent, McpFakeReportPart, McpFakesAddError, McpFakesAddErrorJSON, RecordReplayLoadRule } from "./mcp-fakes.cjs";
10
+ import { ApiKeyAuthConfig, AudioResponse, ChaosAction, ChaosConfig, ChatCompletion, ChatCompletionChoice, ChatCompletionMessage, ChatCompletionRequest, ChatMessage, ContentPart, ContentWithToolCallsResponse, CustomToolCall, CustomToolCallMessage, CustomToolDefinition, EmbeddingFixtureOpts, EmbeddingResponse, ErrorResponse, Fixture, FixtureBlock, FixtureFile, FixtureFileContentWithToolCallsResponse, FixtureFileCustomToolCall, FixtureFileEntry, FixtureFileResponse, FixtureFileResponsesBlock, FixtureFileTextResponse, FixtureFileToolCall, FixtureFileToolCallResponse, FixtureMatch, FixtureOpts, FixtureResponse, FixtureToolCall, ImageItem, ImageResponse, JournalBody, JournalEntry, MCP_FAKE_ERROR_CODES, McpFakeAnnotations, McpFakeBlock, McpFakeCall, McpFakeCallAnswer, McpFakeCallMatch, McpFakeContentBlock, McpFakeDeepReadonly, McpFakeErrorCode, McpFakeFullResult, McpFakeIcon, McpFakeIdentity, McpFakeNotification, McpFakeOutcome, McpFakeRecorded, McpFakeResourceContents, McpFakeResult, McpFakeScope, McpFakeSource, McpFakeStructuredResult, McpFakeTool, McpFakeUndeclaredPolicy, McpRecordConfig, MisbehaviorConfig, MisbehaviorFault, MisbehaviorFaultId, MockServerOptions, Mountable, RawJSONResponse, RecordConfig, RecordProviderKey, ResponseOverrides, ResponsesFixtureBlock, ResponsesToolsMode, SSEChoice, SSEChunk, SSEDelta, SSEToolCallDelta, StreamingProfile, TextResponse, ToolCall, ToolCallMessage, ToolCallResponse, ToolDefinition, TranscriptionResponse, VideoResponse, VoiceDesignPreview, VoiceDesignResponse } from "./types.cjs";
10
11
  import { A2AAgentDefinition, A2AArtifact, A2AMessage, A2AMockOptions, A2APart, A2ARole, A2AStreamEvent, A2ATask, A2ATaskResponse, A2ATaskState } from "./a2a-types.cjs";
11
12
  import { A2AMock } from "./a2a-mock.cjs";
12
13
  import { AGUIActivityDeltaEvent, AGUIActivitySnapshotEvent, AGUIBaseEvent, AGUICustomEvent, AGUIEvent, AGUIEventType, AGUIFixture, AGUIFixtureMatch, AGUIInterrupt, AGUIMessage, AGUIMessageContentPart, AGUIMessageRole, AGUIMessagesSnapshotEvent, AGUIMockOptions, AGUIRawEvent, AGUIReasoningEncryptedValueEvent, AGUIReasoningEncryptedValueSubtype, AGUIReasoningEndEvent, AGUIReasoningMessageChunkEvent, AGUIReasoningMessageContentEvent, AGUIReasoningMessageEndEvent, AGUIReasoningMessageStartEvent, AGUIReasoningStartEvent, AGUIRecordConfig, AGUIResumeEntry, AGUIRunAgentInput, AGUIRunErrorEvent, AGUIRunFinishedEvent, AGUIRunFinishedOutcome, AGUIRunStartedEvent, AGUIStateDeltaEvent, AGUIStateSnapshotEvent, AGUIStepFinishedEvent, AGUIStepStartedEvent, AGUISubagentErrorEvent, AGUISubagentFinishedEvent, AGUISubagentFinishedOutcome, AGUISubagentStartedEvent, AGUITextMessageChunkEvent, AGUITextMessageContentEvent, AGUITextMessageEndEvent, AGUITextMessageRole, AGUITextMessageStartEvent, AGUIThinkingEndEvent, AGUIThinkingStartEvent, AGUIThinkingTextMessageContentEvent, AGUIThinkingTextMessageEndEvent, AGUIThinkingTextMessageStartEvent, AGUITokenUsage, AGUIToolCall, AGUIToolCallArgsEvent, AGUIToolCallChunkEvent, AGUIToolCallEndEvent, AGUIToolCallResultEvent, AGUIToolCallStartEvent, AGUIToolDefinition } from "./agui-types.cjs";
@@ -55,7 +56,7 @@ import { handleElevenLabsAudio } from "./elevenlabs-audio.cjs";
55
56
  import { clearElevenLabsVoices, handleElevenLabsVoiceCreate, handleElevenLabsVoiceDelete, handleElevenLabsVoiceDesign, handleElevenLabsVoiceGet, voiceDesignToJson } from "./elevenlabs-voice.cjs";
56
57
  import { handleFalQueue } from "./fal-audio.cjs";
57
58
  import { FalQueueStateMap, handleFal } from "./fal.cjs";
58
- import { EmbeddingAPIResponse, FORMAT_TO_CONTENT_TYPE, buildContentWithToolCallsChunks, buildContentWithToolCallsCompletion, buildEmbeddingResponse, buildTextChunks, buildTextCompletion, buildToolCallChunks, buildToolCallCompletion, extractOverrides, flattenHeaders, formatToMime, generateDeterministicEmbedding, generateId, generateMessageId, generateToolCallId, generateToolUseId, isAudioResponse, isContentWithToolCallsResponse, isEmbeddingResponse, isErrorResponse, isImageResponse, isLiveResponse, isTextResponse, isToolCallResponse, isTranscriptionResponse, isVideoResponse, resolveFixtureBlocks, resolveRequestId, strictNoMatchLogLine, strictNoMatchMessage } from "./helpers.cjs";
59
+ import { EmbeddingAPIResponse, FORMAT_TO_CONTENT_TYPE, FunctionFixtureBlock, InvalidFixtureToolCallError, UnsupportedToolCallError, buildContentWithToolCallsChunks, buildContentWithToolCallsCompletion, buildEmbeddingResponse, buildTextChunks, buildTextCompletion, buildToolCallChunks, buildToolCallCompletion, extractOverrides, flattenHeaders, formatToMime, generateDeterministicEmbedding, generateId, generateMessageId, generateToolCallId, generateToolUseId, isAudioResponse, isContentWithToolCallsResponse, isEmbeddingResponse, isErrorResponse, isImageResponse, isLiveResponse, isTextResponse, isToolCallResponse, isTranscriptionResponse, isVideoResponse, requireFunctionToolCalls, resolveFixtureBlocks, resolveRequestId, resolveResponsesBlocks, strictNoMatchLogLine, strictNoMatchMessage } from "./helpers.cjs";
59
60
  import { InterruptionControl, createInterruptionSignal } from "./interruption.cjs";
60
61
  import { ErrorResponseOptions, StreamOptions, calculateDelay, delay, writeErrorResponse, writeSSEStream } from "./sse-writer.cjs";
61
62
  import { ChaosAsyncOutcome, applyChaosAsync, applyChaosDeprecated, evaluateChaos, resolveChaosLatencyMs } from "./chaos.cjs";
@@ -63,7 +64,8 @@ import { proxyAndRecord } from "./recorder.cjs";
63
64
  import { resolveUpstreamUrl } from "./url.cjs";
64
65
  import { CollapseResult, MAX_COLLAPSE_STRING_LENGTH, collapseAnthropicSSE, collapseBedrockEventStream, collapseCohereSSE, collapseGeminiInteractionsSSE, collapseGeminiSSE, collapseOllamaNDJSON, collapseOpenAISSE, collapseStreamingResponse, setCollapseStringLimitForTests } from "./stream-collapse.cjs";
65
66
  import { MCPMock } from "./mcp-mock.cjs";
67
+ import { AimockFakesReportError, AimockTestIdCollisionError, McpFakesReport, assertFakesReport } from "./mcp-fakes-report.cjs";
66
68
  import { VectorMock } from "./vector-mock.cjs";
67
69
  import { JsonRpcDispatcherOptions, JsonRpcResponse, MethodHandler, createJsonRpcDispatcher } from "./jsonrpc.cjs";
68
70
  import { MockSuite, MockSuiteOptions, createMockSuite } from "./suite.cjs";
69
- export { type A2AAgentDefinition, type A2AArtifact, type A2AMessage, A2AMock, type A2AMockOptions, type A2APart, type A2ARole, type A2AStreamEvent, type A2ATask, type A2ATaskResponse, type A2ATaskState, type AGUIActivityDeltaEvent, type AGUIActivitySnapshotEvent, type AGUIBaseEvent, type AGUIBuildOpts, type AGUICustomEvent, type AGUIEvent, type AGUIEventType, type AGUIFixture, type AGUIFixtureMatch, type AGUIInterrupt, type AGUIMessage, type AGUIMessageContentPart, type AGUIMessageRole, type AGUIMessagesSnapshotEvent, AGUIMock, type AGUIMockOptions, type AGUIRawEvent, type AGUIReasoningEncryptedValueEvent, type AGUIReasoningEncryptedValueSubtype, type AGUIReasoningEndEvent, type AGUIReasoningMessageChunkEvent, type AGUIReasoningMessageContentEvent, type AGUIReasoningMessageEndEvent, type AGUIReasoningMessageStartEvent, type AGUIReasoningStartEvent, type AGUIRecordConfig, type AGUIResumeEntry, type AGUIRunAgentInput, type AGUIRunErrorEvent, type AGUIRunFinishedEvent, type AGUIRunFinishedOutcome, type AGUIRunStartedEvent, type AGUIStateDeltaEvent, type AGUIStateSnapshotEvent, type AGUIStepFinishedEvent, type AGUIStepStartedEvent, type AGUISubagentErrorEvent, type AGUISubagentFinishedEvent, type AGUISubagentFinishedOutcome, type AGUISubagentStartedEvent, type AGUITextMessageChunkEvent, type AGUITextMessageContentEvent, type AGUITextMessageEndEvent, type AGUITextMessageRole, type AGUITextMessageStartEvent, type AGUIThinkingEndEvent, type AGUIThinkingStartEvent, type AGUIThinkingTextMessageContentEvent, type AGUIThinkingTextMessageEndEvent, type AGUIThinkingTextMessageStartEvent, type AGUITokenUsage, type AGUIToolCall, type AGUIToolCallArgsEvent, type AGUIToolCallChunkEvent, type AGUIToolCallEndEvent, type AGUIToolCallResultEvent, type AGUIToolCallStartEvent, type AGUIToolDefinition, AGUI_RECORD_BUFFER_HARD_CEILING, type AimockConfig, type ApiKeyAuthConfig, type AudioResponse, BYTEPLUS_VIDEO_MAX_ENTRIES, BYTEPLUS_VIDEO_TASKS_PATH, type BatchObject, BytePlusVideoJobMap, CATALOG_ROUTES, type CatalogRoute, type ChaosAction, type ChaosAsyncOutcome, type ChaosConfig, type ChatCompletion, type ChatCompletionChoice, type ChatCompletionMessage, type ChatCompletionRequest, type ChatMessage, type CollapseResult, type ContentPart, type ContentWithToolCallsResponse, DEFAULT_AGUI_RECORD_BUFFER_BYTES, DEFAULT_TEST_ID, type EmbeddingAPIResponse, type EmbeddingFixtureOpts, type EmbeddingResponse, type ErrorResponse, type ErrorResponseOptions, FORMAT_TO_CONTENT_TYPE, FalQueueStateMap, type FileObject, type FineTuningJob, type FineTuningJobError, type FineTuningJobEvent, type FineTuningJobHyperparameters, type FineTuningJobStatus, type Fixture, type FixtureBlock, type FixtureFile, type FixtureFileContentWithToolCallsResponse, type FixtureFileEntry, type FixtureFileResponse, type FixtureFileTextResponse, type FixtureFileToolCall, type FixtureFileToolCallResponse, FixtureLoadError, type FixtureLoadErrorJSON, type FixtureMatch, type FixtureOpts, type FixtureResponse, type FixturesWithServices, GROK_VIDEO_MAX_ENTRIES, GrokVideoJobMap, type ImageItem, type ImageResponse, type InterruptionControl, Journal, type JournalBody, type JournalEntry, type JsonRpcDispatcherOptions, type JsonRpcResponse, LLMock, type LiveBinding, type LiveEntry, type LiveFailureCategory, type LiveFixtureResponse, type LiveJson, type LiveMode, type LiveObject, type LiveOptions, type LivePosition, type LiveTranscript, type LogLevel, Logger, MAX_COLLAPSE_STRING_LENGTH, type MCPContent, MCPMock, type MCPMockOptions, type MCPPromptDefinition, type MCPPromptResult, type MCPResourceContent, type MCPResourceDefinition, type MCPSession, type MCPToolDefinition, MCP_FAKE_ERROR_CODES, type MatchFixtureDiagnostic, type McpFakeAddOrigin, type McpFakeAddResult, type McpFakeAnnotations, type McpFakeBlock, type McpFakeBlockSnapshot, type McpFakeCall, type McpFakeCallAnswer, type McpFakeCallMatch, type McpFakeContentBlock, type McpFakeDeclaredEntry, type McpFakeDeepReadonly, type McpFakeErrorCode, type McpFakeFullResult, type McpFakeIcon, type McpFakeIdentity, type McpFakeIssue, type McpFakeOutcome, type McpFakeResourceContents, type McpFakeResult, type McpFakeScope, type McpFakeSource, type McpFakeStructuredResult, type McpFakeTool, type McpFakeUndeclaredPolicy, McpFakesAddError, type McpFakesAddErrorJSON, type MethodHandler, type MetricsRegistry, type MockServerOptions, type MockSuite, type MockSuiteOptions, type ModerationFixture, type ModerationResult, type Mountable, type NDJSONStreamOptions, OPENROUTER_VIDEO_DEFAULT_MAX_CONTENT_BYTES, OPENROUTER_VIDEO_MAX_ENTRIES, OpenRouterVideoJobMap, type QueryHandler, type QueryResult, ROUTE_DEFINITIONS, type RawJSONResponse, type RecordConfig, type RecordProviderKey, type RerankFixture, type RerankResult, type ResponseOverrides, type ResponsesSSEEvent, type RouteDefinition, type SSEChoice, type SSEChunk, type SSEDelta, type SSEToolCallDelta, type SearchFixture, type SearchResult, type ServerInstance, type ServiceFixtures, type StreamOptions, type StreamingProfile, type TextResponse, type ToolCall, type ToolCallMessage, type ToolCallResponse, type ToolDefinition, type TranscriptionResponse, VEO_VIDEO_MAX_ENTRIES, type ValidationRef, type ValidationResult, type VectorCollection, type VectorEntry, type VectorFileBatchObject, type VectorFileBatchStatus, VectorMock, type VectorMockOptions, type VectorQuery, type VectorSearchResult, type VectorStoreFileObject, type VectorStoreFileStatus, type VectorStoreObject, type VectorStoreStatus, VeoVideoJobMap, type VideoResponse, VideoStateMap, type VoiceDesignPreview, type VoiceDesignResponse, WebSocketConnection, type WebSocketLimits, applyChaosDeprecated as applyChaos, applyChaosAsync, bedrockToCompletionRequest, buildActivityDelta as buildAGUIActivityDelta, buildActivityResponse as buildAGUIActivityResponse, buildCompositeResponse as buildAGUICompositeResponse, buildCustomEvent as buildAGUICustomEvent, buildErrorResponse as buildAGUIErrorResponse, buildMessagesSnapshot as buildAGUIMessagesSnapshot, buildRawEvent as buildAGUIRawEvent, buildReasoningChunk as buildAGUIReasoningChunk, buildReasoningEncryptedValue as buildAGUIReasoningEncryptedValue, buildReasoningResponse as buildAGUIReasoningResponse, buildStateDelta as buildAGUIStateDelta, buildStateUpdate as buildAGUIStateUpdate, buildStepWithText as buildAGUIStepWithText, buildTextChunkResponse as buildAGUITextChunkResponse, buildTextResponse as buildAGUITextResponse, buildToolCallChunk as buildAGUIToolCallChunk, buildToolCallResponse as buildAGUIToolCallResponse, buildBytePlusMatchText, buildContentWithToolCallsChunks, buildContentWithToolCallsCompletion, buildContentWithToolCallsStreamEvents, buildEmbeddingResponse, buildOpenApiDocument, buildTextChunks, buildTextCompletion, buildTextStreamEvents, buildToolCallChunks, buildToolCallCompletion, buildToolCallStreamEvents, calculateDelay, clearBatchStore, clearElevenLabsVoices, clearFileStore, clearFineTuningStore, clearVectorStoreStore, cohereToCompletionRequest, collapseAnthropicSSE, collapseBedrockEventStream, collapseCohereSSE, collapseGeminiInteractionsSSE, collapseGeminiSSE, collapseOllamaNDJSON, collapseOpenAISSE, collapseStreamingResponse, computeAcceptKey, converseToCompletionRequest, createInterruptionSignal, createJsonRpcDispatcher, createMetricsRegistry, createMockSuite, createServer, delay, encodeEventStreamFrame, encodeEventStreamMessage, evaluateChaos, extractLastUserMessage as extractAGUILastUserMessage, extractOverrides, findFixture as findAGUIFixture, flattenHeaders, formatToMime, geminiInteractionsToCompletionRequest, generateDeterministicEmbedding, generateId, generateMessageId, generateToolCallId, generateToolUseId, getLastMessageIfToolResult as getAGUILastMessageIfToolResult, getTextContent, handleBatchesCancel, handleBatchesCreate, handleBatchesList, handleBatchesRetrieve, handleBedrock, handleBedrockStream, handleBytePlusVideoCreate, handleBytePlusVideoStatus, handleCohere, handleConverse, handleConverseStream, handleElevenLabsAudio, handleElevenLabsVoiceCreate, handleElevenLabsVoiceDelete, handleElevenLabsVoiceDesign, handleElevenLabsVoiceGet, handleEmbeddings, handleFal, handleFalQueue, handleFilesContent, handleFilesCreate, handleFilesDelete, handleFilesList, handleFilesRetrieve, handleFineTuningCancel, handleFineTuningCreate, handleFineTuningEvents, handleFineTuningList, handleFineTuningRetrieve, handleGemini, handleGeminiInteractions, handleGrokVideoCreate, handleGrokVideoStatus, handleImages, handleMessages, handleModeration, handleOllama, handleOllamaGenerate, handleOpenRouterVideoContent, handleOpenRouterVideoCreate, handleOpenRouterVideoModels, handleOpenRouterVideoStatus, handleRerank, handleResponses, handleSearch, handleSpeech, handleTranscription, handleVectorFileBatchesCancel, handleVectorFileBatchesCreate, handleVectorFileBatchesFiles, handleVectorFileBatchesRetrieve, handleVectorStoreFilesCreate, handleVectorStoreFilesDelete, handleVectorStoreFilesList, handleVectorStoreFilesRetrieve, handleVectorStoresCreate, handleVectorStoresDelete, handleVectorStoresList, handleVectorStoresModify, handleVectorStoresRetrieve, handleVectorStoresSearch, handleVeoVideoCreate, handleVeoVideoStatus, handleVideoCreate, handleVideoStatus, handleWebSocketGeminiLive, handleWebSocketRealtime, handleWebSocketResponses, isAudioResponse, isChatCompletionBody, isContentWithToolCallsResponse, isEmbeddingResponse, isErrorResponse, isImageResponse, isLiveResponse, isTextResponse, isToolCallResponse, isTranscriptionResponse, isVideoResponse, loadConfig, loadFixtureFile, loadFixtureFileWithServices, loadFixturesFromDir, loadFixturesFromDirWithServices, matchFixture, matchFixtureDiagnostic, matchesFixture as matchesAGUIFixture, normalizePathLabel, normalizeResponse, ollamaToCompletionRequest, proxyAndRecord, proxyAndRecordAGUI, renderValidationRef, resolveChaosLatencyMs, resolveFixtureBlocks, resolveRequestId, resolveUpstreamUrl, setAGUIRecordBufferCeilingForTests, setCollapseStringLimitForTests, startFromConfig, strictNoMatchLogLine, strictNoMatchMessage, upgradeToWebSocket, validateFixtures, voiceDesignToJson, writeAGUIEventStream, writeErrorResponse, writeEventStream, writeNDJSONStream, writeSSEStream };
71
+ export { type A2AAgentDefinition, type A2AArtifact, type A2AMessage, A2AMock, type A2AMockOptions, type A2APart, type A2ARole, type A2AStreamEvent, type A2ATask, type A2ATaskResponse, type A2ATaskState, type AGUIActivityDeltaEvent, type AGUIActivitySnapshotEvent, type AGUIBaseEvent, type AGUIBuildOpts, type AGUICustomEvent, type AGUIEvent, type AGUIEventType, type AGUIFixture, type AGUIFixtureMatch, type AGUIInterrupt, type AGUIMessage, type AGUIMessageContentPart, type AGUIMessageRole, type AGUIMessagesSnapshotEvent, AGUIMock, type AGUIMockOptions, type AGUIRawEvent, type AGUIReasoningEncryptedValueEvent, type AGUIReasoningEncryptedValueSubtype, type AGUIReasoningEndEvent, type AGUIReasoningMessageChunkEvent, type AGUIReasoningMessageContentEvent, type AGUIReasoningMessageEndEvent, type AGUIReasoningMessageStartEvent, type AGUIReasoningStartEvent, type AGUIRecordConfig, type AGUIResumeEntry, type AGUIRunAgentInput, type AGUIRunErrorEvent, type AGUIRunFinishedEvent, type AGUIRunFinishedOutcome, type AGUIRunStartedEvent, type AGUIStateDeltaEvent, type AGUIStateSnapshotEvent, type AGUIStepFinishedEvent, type AGUIStepStartedEvent, type AGUISubagentErrorEvent, type AGUISubagentFinishedEvent, type AGUISubagentFinishedOutcome, type AGUISubagentStartedEvent, type AGUITextMessageChunkEvent, type AGUITextMessageContentEvent, type AGUITextMessageEndEvent, type AGUITextMessageRole, type AGUITextMessageStartEvent, type AGUIThinkingEndEvent, type AGUIThinkingStartEvent, type AGUIThinkingTextMessageContentEvent, type AGUIThinkingTextMessageEndEvent, type AGUIThinkingTextMessageStartEvent, type AGUITokenUsage, type AGUIToolCall, type AGUIToolCallArgsEvent, type AGUIToolCallChunkEvent, type AGUIToolCallEndEvent, type AGUIToolCallResultEvent, type AGUIToolCallStartEvent, type AGUIToolDefinition, AGUI_RECORD_BUFFER_HARD_CEILING, type AimockConfig, AimockFakesReportError, AimockTestIdCollisionError, type ApiKeyAuthConfig, type AudioResponse, BYTEPLUS_VIDEO_MAX_ENTRIES, BYTEPLUS_VIDEO_TASKS_PATH, type BatchObject, BytePlusVideoJobMap, CATALOG_ROUTES, type CatalogRoute, type ChaosAction, type ChaosAsyncOutcome, type ChaosConfig, type ChatCompletion, type ChatCompletionChoice, type ChatCompletionMessage, type ChatCompletionRequest, type ChatMessage, type CollapseResult, type ContentPart, type ContentWithToolCallsResponse, type CustomToolCall, type CustomToolCallMessage, type CustomToolDefinition, DEFAULT_AGUI_RECORD_BUFFER_BYTES, DEFAULT_TEST_ID, type EmbeddingAPIResponse, type EmbeddingFixtureOpts, type EmbeddingResponse, type ErrorResponse, type ErrorResponseOptions, FORMAT_TO_CONTENT_TYPE, FalQueueStateMap, type FileObject, type FineTuningJob, type FineTuningJobError, type FineTuningJobEvent, type FineTuningJobHyperparameters, type FineTuningJobStatus, type Fixture, type FixtureBlock, type FixtureFile, type FixtureFileContentWithToolCallsResponse, type FixtureFileCustomToolCall, type FixtureFileEntry, type FixtureFileResponse, type FixtureFileResponsesBlock, type FixtureFileTextResponse, type FixtureFileToolCall, type FixtureFileToolCallResponse, FixtureLoadError, type FixtureLoadErrorJSON, type FixtureMatch, type FixtureOpts, type FixtureResponse, type FixtureToolCall, type FixturesWithServices, type FunctionFixtureBlock, GROK_VIDEO_MAX_ENTRIES, GrokVideoJobMap, type ImageItem, type ImageResponse, type InterruptionControl, InvalidFixtureToolCallError, Journal, type JournalBody, type JournalEntry, type JsonRpcDispatcherOptions, type JsonRpcResponse, LLMock, type LiveBinding, type LiveEntry, type LiveFailureCategory, type LiveFixtureResponse, type LiveJson, type LiveMode, type LiveObject, type LiveOptions, type LivePosition, type LiveTranscript, type LogLevel, Logger, MAX_COLLAPSE_STRING_LENGTH, type MCPContent, MCPMock, type MCPMockOptions, type MCPPromptDefinition, type MCPPromptResult, type MCPResourceContent, type MCPResourceDefinition, type MCPSession, type MCPToolDefinition, MCP_FAKE_ERROR_CODES, type MatchFixtureDiagnostic, type McpFakeAddOrigin, type McpFakeAddResult, type McpFakeAnnotations, type McpFakeBlock, type McpFakeBlockSnapshot, type McpFakeCall, type McpFakeCallAnswer, type McpFakeCallMatch, type McpFakeContentBlock, type McpFakeDeclaredEntry, type McpFakeDeepReadonly, type McpFakeErrorCode, type McpFakeFullResult, type McpFakeIcon, type McpFakeIdentity, type McpFakeIssue, type McpFakeNotification, type McpFakeOutcome, type McpFakeRecorded, type McpFakeReportEvent, type McpFakeReportPart, type McpFakeResourceContents, type McpFakeResult, type McpFakeScope, type McpFakeSource, type McpFakeStructuredResult, type McpFakeTool, type McpFakeUndeclaredPolicy, McpFakesAddError, type McpFakesAddErrorJSON, type McpFakesReport, type McpRecordConfig, type MethodHandler, type MetricsRegistry, type MisbehaviorConfig, MisbehaviorConfigError, type MisbehaviorConfigErrorJSON, type MisbehaviorFault, type MisbehaviorFaultId, type MisbehaviorRule, type MockServerOptions, type MockSuite, type MockSuiteOptions, type ModerationFixture, type ModerationResult, type Mountable, type NDJSONStreamOptions, OPENROUTER_VIDEO_DEFAULT_MAX_CONTENT_BYTES, OPENROUTER_VIDEO_MAX_ENTRIES, OpenRouterVideoJobMap, type QueryHandler, type QueryResult, ROUTE_DEFINITIONS, type RawJSONResponse, type RecordConfig, type RecordProviderKey, type RecordReplayLoadRule, type RerankFixture, type RerankResult, type ResponseOverrides, type ResponsesFixtureBlock, type ResponsesSSEEvent, type ResponsesToolsMode, type RouteDefinition, type SSEChoice, type SSEChunk, type SSEDelta, type SSEToolCallDelta, type SearchFixture, type SearchResult, type ServerInstance, type ServiceFixtures, type StreamOptions, type StreamingProfile, type TextResponse, type ToolCall, type ToolCallMessage, type ToolCallResponse, type ToolDefinition, type TranscriptionResponse, UnsupportedToolCallError, VEO_VIDEO_MAX_ENTRIES, type ValidationRef, type ValidationResult, type VectorCollection, type VectorEntry, type VectorFileBatchObject, type VectorFileBatchStatus, VectorMock, type VectorMockOptions, type VectorQuery, type VectorSearchResult, type VectorStoreFileObject, type VectorStoreFileStatus, type VectorStoreObject, type VectorStoreStatus, VeoVideoJobMap, type VideoResponse, VideoStateMap, type VoiceDesignPreview, type VoiceDesignResponse, WebSocketConnection, type WebSocketLimits, applyChaosDeprecated as applyChaos, applyChaosAsync, assertFakesReport, bedrockToCompletionRequest, buildActivityDelta as buildAGUIActivityDelta, buildActivityResponse as buildAGUIActivityResponse, buildCompositeResponse as buildAGUICompositeResponse, buildCustomEvent as buildAGUICustomEvent, buildErrorResponse as buildAGUIErrorResponse, buildMessagesSnapshot as buildAGUIMessagesSnapshot, buildRawEvent as buildAGUIRawEvent, buildReasoningChunk as buildAGUIReasoningChunk, buildReasoningEncryptedValue as buildAGUIReasoningEncryptedValue, buildReasoningResponse as buildAGUIReasoningResponse, buildStateDelta as buildAGUIStateDelta, buildStateUpdate as buildAGUIStateUpdate, buildStepWithText as buildAGUIStepWithText, buildTextChunkResponse as buildAGUITextChunkResponse, buildTextResponse as buildAGUITextResponse, buildToolCallChunk as buildAGUIToolCallChunk, buildToolCallResponse as buildAGUIToolCallResponse, buildBytePlusMatchText, buildContentWithToolCallsChunks, buildContentWithToolCallsCompletion, buildContentWithToolCallsStreamEvents, buildEmbeddingResponse, buildOpenApiDocument, buildTextChunks, buildTextCompletion, buildTextStreamEvents, buildToolCallChunks, buildToolCallCompletion, buildToolCallStreamEvents, calculateDelay, clearBatchStore, clearElevenLabsVoices, clearFileStore, clearFineTuningStore, clearVectorStoreStore, cohereToCompletionRequest, collapseAnthropicSSE, collapseBedrockEventStream, collapseCohereSSE, collapseGeminiInteractionsSSE, collapseGeminiSSE, collapseOllamaNDJSON, collapseOpenAISSE, collapseStreamingResponse, computeAcceptKey, converseToCompletionRequest, createInterruptionSignal, createJsonRpcDispatcher, createMetricsRegistry, createMockSuite, createServer, delay, encodeEventStreamFrame, encodeEventStreamMessage, evaluateChaos, extractLastUserMessage as extractAGUILastUserMessage, extractOverrides, findFixture as findAGUIFixture, flattenHeaders, formatToMime, geminiInteractionsToCompletionRequest, generateDeterministicEmbedding, generateId, generateMessageId, generateToolCallId, generateToolUseId, getLastMessageIfToolResult as getAGUILastMessageIfToolResult, getTextContent, handleBatchesCancel, handleBatchesCreate, handleBatchesList, handleBatchesRetrieve, handleBedrock, handleBedrockStream, handleBytePlusVideoCreate, handleBytePlusVideoStatus, handleCohere, handleConverse, handleConverseStream, handleElevenLabsAudio, handleElevenLabsVoiceCreate, handleElevenLabsVoiceDelete, handleElevenLabsVoiceDesign, handleElevenLabsVoiceGet, handleEmbeddings, handleFal, handleFalQueue, handleFilesContent, handleFilesCreate, handleFilesDelete, handleFilesList, handleFilesRetrieve, handleFineTuningCancel, handleFineTuningCreate, handleFineTuningEvents, handleFineTuningList, handleFineTuningRetrieve, handleGemini, handleGeminiInteractions, handleGrokVideoCreate, handleGrokVideoStatus, handleImages, handleMessages, handleModeration, handleOllama, handleOllamaGenerate, handleOpenRouterVideoContent, handleOpenRouterVideoCreate, handleOpenRouterVideoModels, handleOpenRouterVideoStatus, handleRerank, handleResponses, handleSearch, handleSpeech, handleTranscription, handleVectorFileBatchesCancel, handleVectorFileBatchesCreate, handleVectorFileBatchesFiles, handleVectorFileBatchesRetrieve, handleVectorStoreFilesCreate, handleVectorStoreFilesDelete, handleVectorStoreFilesList, handleVectorStoreFilesRetrieve, handleVectorStoresCreate, handleVectorStoresDelete, handleVectorStoresList, handleVectorStoresModify, handleVectorStoresRetrieve, handleVectorStoresSearch, handleVeoVideoCreate, handleVeoVideoStatus, handleVideoCreate, handleVideoStatus, handleWebSocketGeminiLive, handleWebSocketRealtime, handleWebSocketResponses, isAudioResponse, isChatCompletionBody, isContentWithToolCallsResponse, isEmbeddingResponse, isErrorResponse, isImageResponse, isLiveResponse, isTextResponse, isToolCallResponse, isTranscriptionResponse, isVideoResponse, loadConfig, loadFixtureFile, loadFixtureFileWithServices, loadFixturesFromDir, loadFixturesFromDirWithServices, matchFixture, matchFixtureDiagnostic, matchesFixture as matchesAGUIFixture, normalizePathLabel, normalizeResponse, ollamaToCompletionRequest, proxyAndRecord, proxyAndRecordAGUI, renderValidationRef, requireFunctionToolCalls, resolveChaosLatencyMs, resolveFixtureBlocks, resolveRequestId, resolveResponsesBlocks, resolveUpstreamUrl, setAGUIRecordBufferCeilingForTests, setCollapseStringLimitForTests, startFromConfig, strictNoMatchLogLine, strictNoMatchMessage, upgradeToWebSocket, validateFixtures, voiceDesignToJson, writeAGUIEventStream, writeErrorResponse, writeEventStream, writeNDJSONStream, writeSSEStream };
package/dist/index.d.ts CHANGED
@@ -1,12 +1,13 @@
1
+ import { MisbehaviorRule } from "./misbehavior.js";
1
2
  import { DEFAULT_TEST_ID } from "./constants.js";
2
3
  import { Journal, isChatCompletionBody } from "./journal.js";
3
4
  import { LiveBinding, LiveEntry, LiveFailureCategory, LiveFixtureResponse, LiveJson, LiveMode, LiveObject, LiveOptions, LivePosition, LiveTranscript } from "./live-types.js";
4
5
  import { LogLevel, Logger } from "./logger.js";
5
6
  import { ROUTE_DEFINITIONS, RouteDefinition } from "./route-registry.js";
6
7
  import { MetricsRegistry, createMetricsRegistry, normalizePathLabel } from "./metrics.js";
7
- import { FixtureLoadError, FixtureLoadErrorJSON, ValidationRef, ValidationResult, loadFixtureFile, loadFixturesFromDir, normalizeResponse, renderValidationRef, validateFixtures } from "./fixture-loader.js";
8
- import { McpFakeAddOrigin, McpFakeAddResult, McpFakeBlockSnapshot, McpFakeDeclaredEntry, McpFakeIssue, McpFakesAddError, McpFakesAddErrorJSON } from "./mcp-fakes.js";
9
- import { ApiKeyAuthConfig, AudioResponse, ChaosAction, ChaosConfig, ChatCompletion, ChatCompletionChoice, ChatCompletionMessage, ChatCompletionRequest, ChatMessage, ContentPart, ContentWithToolCallsResponse, EmbeddingFixtureOpts, EmbeddingResponse, ErrorResponse, Fixture, FixtureBlock, FixtureFile, FixtureFileContentWithToolCallsResponse, FixtureFileEntry, FixtureFileResponse, FixtureFileTextResponse, FixtureFileToolCall, FixtureFileToolCallResponse, FixtureMatch, FixtureOpts, FixtureResponse, ImageItem, ImageResponse, JournalBody, JournalEntry, MCP_FAKE_ERROR_CODES, McpFakeAnnotations, McpFakeBlock, McpFakeCall, McpFakeCallAnswer, McpFakeCallMatch, McpFakeContentBlock, McpFakeDeepReadonly, McpFakeErrorCode, McpFakeFullResult, McpFakeIcon, McpFakeIdentity, McpFakeOutcome, McpFakeResourceContents, McpFakeResult, McpFakeScope, McpFakeSource, McpFakeStructuredResult, McpFakeTool, McpFakeUndeclaredPolicy, MockServerOptions, Mountable, RawJSONResponse, RecordConfig, RecordProviderKey, ResponseOverrides, SSEChoice, SSEChunk, SSEDelta, SSEToolCallDelta, StreamingProfile, TextResponse, ToolCall, ToolCallMessage, ToolCallResponse, ToolDefinition, TranscriptionResponse, VideoResponse, VoiceDesignPreview, VoiceDesignResponse } from "./types.js";
8
+ import { FixtureLoadError, FixtureLoadErrorJSON, MisbehaviorConfigError, MisbehaviorConfigErrorJSON, ValidationRef, ValidationResult, loadFixtureFile, loadFixturesFromDir, normalizeResponse, renderValidationRef, validateFixtures } from "./fixture-loader.js";
9
+ import { McpFakeAddOrigin, McpFakeAddResult, McpFakeBlockSnapshot, McpFakeDeclaredEntry, McpFakeIssue, McpFakeReportEvent, McpFakeReportPart, McpFakesAddError, McpFakesAddErrorJSON, RecordReplayLoadRule } from "./mcp-fakes.js";
10
+ import { ApiKeyAuthConfig, AudioResponse, ChaosAction, ChaosConfig, ChatCompletion, ChatCompletionChoice, ChatCompletionMessage, ChatCompletionRequest, ChatMessage, ContentPart, ContentWithToolCallsResponse, CustomToolCall, CustomToolCallMessage, CustomToolDefinition, EmbeddingFixtureOpts, EmbeddingResponse, ErrorResponse, Fixture, FixtureBlock, FixtureFile, FixtureFileContentWithToolCallsResponse, FixtureFileCustomToolCall, FixtureFileEntry, FixtureFileResponse, FixtureFileResponsesBlock, FixtureFileTextResponse, FixtureFileToolCall, FixtureFileToolCallResponse, FixtureMatch, FixtureOpts, FixtureResponse, FixtureToolCall, ImageItem, ImageResponse, JournalBody, JournalEntry, MCP_FAKE_ERROR_CODES, McpFakeAnnotations, McpFakeBlock, McpFakeCall, McpFakeCallAnswer, McpFakeCallMatch, McpFakeContentBlock, McpFakeDeepReadonly, McpFakeErrorCode, McpFakeFullResult, McpFakeIcon, McpFakeIdentity, McpFakeNotification, McpFakeOutcome, McpFakeRecorded, McpFakeResourceContents, McpFakeResult, McpFakeScope, McpFakeSource, McpFakeStructuredResult, McpFakeTool, McpFakeUndeclaredPolicy, McpRecordConfig, MisbehaviorConfig, MisbehaviorFault, MisbehaviorFaultId, MockServerOptions, Mountable, RawJSONResponse, RecordConfig, RecordProviderKey, ResponseOverrides, ResponsesFixtureBlock, ResponsesToolsMode, SSEChoice, SSEChunk, SSEDelta, SSEToolCallDelta, StreamingProfile, TextResponse, ToolCall, ToolCallMessage, ToolCallResponse, ToolDefinition, TranscriptionResponse, VideoResponse, VoiceDesignPreview, VoiceDesignResponse } from "./types.js";
10
11
  import { A2AAgentDefinition, A2AArtifact, A2AMessage, A2AMockOptions, A2APart, A2ARole, A2AStreamEvent, A2ATask, A2ATaskResponse, A2ATaskState } from "./a2a-types.js";
11
12
  import { A2AMock } from "./a2a-mock.js";
12
13
  import { AGUIActivityDeltaEvent, AGUIActivitySnapshotEvent, AGUIBaseEvent, AGUICustomEvent, AGUIEvent, AGUIEventType, AGUIFixture, AGUIFixtureMatch, AGUIInterrupt, AGUIMessage, AGUIMessageContentPart, AGUIMessageRole, AGUIMessagesSnapshotEvent, AGUIMockOptions, AGUIRawEvent, AGUIReasoningEncryptedValueEvent, AGUIReasoningEncryptedValueSubtype, AGUIReasoningEndEvent, AGUIReasoningMessageChunkEvent, AGUIReasoningMessageContentEvent, AGUIReasoningMessageEndEvent, AGUIReasoningMessageStartEvent, AGUIReasoningStartEvent, AGUIRecordConfig, AGUIResumeEntry, AGUIRunAgentInput, AGUIRunErrorEvent, AGUIRunFinishedEvent, AGUIRunFinishedOutcome, AGUIRunStartedEvent, AGUIStateDeltaEvent, AGUIStateSnapshotEvent, AGUIStepFinishedEvent, AGUIStepStartedEvent, AGUISubagentErrorEvent, AGUISubagentFinishedEvent, AGUISubagentFinishedOutcome, AGUISubagentStartedEvent, AGUITextMessageChunkEvent, AGUITextMessageContentEvent, AGUITextMessageEndEvent, AGUITextMessageRole, AGUITextMessageStartEvent, AGUIThinkingEndEvent, AGUIThinkingStartEvent, AGUIThinkingTextMessageContentEvent, AGUIThinkingTextMessageEndEvent, AGUIThinkingTextMessageStartEvent, AGUITokenUsage, AGUIToolCall, AGUIToolCallArgsEvent, AGUIToolCallChunkEvent, AGUIToolCallEndEvent, AGUIToolCallResultEvent, AGUIToolCallStartEvent, AGUIToolDefinition } from "./agui-types.js";
@@ -55,7 +56,7 @@ import { handleElevenLabsAudio } from "./elevenlabs-audio.js";
55
56
  import { clearElevenLabsVoices, handleElevenLabsVoiceCreate, handleElevenLabsVoiceDelete, handleElevenLabsVoiceDesign, handleElevenLabsVoiceGet, voiceDesignToJson } from "./elevenlabs-voice.js";
56
57
  import { handleFalQueue } from "./fal-audio.js";
57
58
  import { FalQueueStateMap, handleFal } from "./fal.js";
58
- import { EmbeddingAPIResponse, FORMAT_TO_CONTENT_TYPE, buildContentWithToolCallsChunks, buildContentWithToolCallsCompletion, buildEmbeddingResponse, buildTextChunks, buildTextCompletion, buildToolCallChunks, buildToolCallCompletion, extractOverrides, flattenHeaders, formatToMime, generateDeterministicEmbedding, generateId, generateMessageId, generateToolCallId, generateToolUseId, isAudioResponse, isContentWithToolCallsResponse, isEmbeddingResponse, isErrorResponse, isImageResponse, isLiveResponse, isTextResponse, isToolCallResponse, isTranscriptionResponse, isVideoResponse, resolveFixtureBlocks, resolveRequestId, strictNoMatchLogLine, strictNoMatchMessage } from "./helpers.js";
59
+ import { EmbeddingAPIResponse, FORMAT_TO_CONTENT_TYPE, FunctionFixtureBlock, InvalidFixtureToolCallError, UnsupportedToolCallError, buildContentWithToolCallsChunks, buildContentWithToolCallsCompletion, buildEmbeddingResponse, buildTextChunks, buildTextCompletion, buildToolCallChunks, buildToolCallCompletion, extractOverrides, flattenHeaders, formatToMime, generateDeterministicEmbedding, generateId, generateMessageId, generateToolCallId, generateToolUseId, isAudioResponse, isContentWithToolCallsResponse, isEmbeddingResponse, isErrorResponse, isImageResponse, isLiveResponse, isTextResponse, isToolCallResponse, isTranscriptionResponse, isVideoResponse, requireFunctionToolCalls, resolveFixtureBlocks, resolveRequestId, resolveResponsesBlocks, strictNoMatchLogLine, strictNoMatchMessage } from "./helpers.js";
59
60
  import { InterruptionControl, createInterruptionSignal } from "./interruption.js";
60
61
  import { ErrorResponseOptions, StreamOptions, calculateDelay, delay, writeErrorResponse, writeSSEStream } from "./sse-writer.js";
61
62
  import { ChaosAsyncOutcome, applyChaosAsync, applyChaosDeprecated, evaluateChaos, resolveChaosLatencyMs } from "./chaos.js";
@@ -63,7 +64,8 @@ import { proxyAndRecord } from "./recorder.js";
63
64
  import { resolveUpstreamUrl } from "./url.js";
64
65
  import { CollapseResult, MAX_COLLAPSE_STRING_LENGTH, collapseAnthropicSSE, collapseBedrockEventStream, collapseCohereSSE, collapseGeminiInteractionsSSE, collapseGeminiSSE, collapseOllamaNDJSON, collapseOpenAISSE, collapseStreamingResponse, setCollapseStringLimitForTests } from "./stream-collapse.js";
65
66
  import { MCPMock } from "./mcp-mock.js";
67
+ import { AimockFakesReportError, AimockTestIdCollisionError, McpFakesReport, assertFakesReport } from "./mcp-fakes-report.js";
66
68
  import { VectorMock } from "./vector-mock.js";
67
69
  import { JsonRpcDispatcherOptions, JsonRpcResponse, MethodHandler, createJsonRpcDispatcher } from "./jsonrpc.js";
68
70
  import { MockSuite, MockSuiteOptions, createMockSuite } from "./suite.js";
69
- export { type A2AAgentDefinition, type A2AArtifact, type A2AMessage, A2AMock, type A2AMockOptions, type A2APart, type A2ARole, type A2AStreamEvent, type A2ATask, type A2ATaskResponse, type A2ATaskState, type AGUIActivityDeltaEvent, type AGUIActivitySnapshotEvent, type AGUIBaseEvent, type AGUIBuildOpts, type AGUICustomEvent, type AGUIEvent, type AGUIEventType, type AGUIFixture, type AGUIFixtureMatch, type AGUIInterrupt, type AGUIMessage, type AGUIMessageContentPart, type AGUIMessageRole, type AGUIMessagesSnapshotEvent, AGUIMock, type AGUIMockOptions, type AGUIRawEvent, type AGUIReasoningEncryptedValueEvent, type AGUIReasoningEncryptedValueSubtype, type AGUIReasoningEndEvent, type AGUIReasoningMessageChunkEvent, type AGUIReasoningMessageContentEvent, type AGUIReasoningMessageEndEvent, type AGUIReasoningMessageStartEvent, type AGUIReasoningStartEvent, type AGUIRecordConfig, type AGUIResumeEntry, type AGUIRunAgentInput, type AGUIRunErrorEvent, type AGUIRunFinishedEvent, type AGUIRunFinishedOutcome, type AGUIRunStartedEvent, type AGUIStateDeltaEvent, type AGUIStateSnapshotEvent, type AGUIStepFinishedEvent, type AGUIStepStartedEvent, type AGUISubagentErrorEvent, type AGUISubagentFinishedEvent, type AGUISubagentFinishedOutcome, type AGUISubagentStartedEvent, type AGUITextMessageChunkEvent, type AGUITextMessageContentEvent, type AGUITextMessageEndEvent, type AGUITextMessageRole, type AGUITextMessageStartEvent, type AGUIThinkingEndEvent, type AGUIThinkingStartEvent, type AGUIThinkingTextMessageContentEvent, type AGUIThinkingTextMessageEndEvent, type AGUIThinkingTextMessageStartEvent, type AGUITokenUsage, type AGUIToolCall, type AGUIToolCallArgsEvent, type AGUIToolCallChunkEvent, type AGUIToolCallEndEvent, type AGUIToolCallResultEvent, type AGUIToolCallStartEvent, type AGUIToolDefinition, AGUI_RECORD_BUFFER_HARD_CEILING, type AimockConfig, type ApiKeyAuthConfig, type AudioResponse, BYTEPLUS_VIDEO_MAX_ENTRIES, BYTEPLUS_VIDEO_TASKS_PATH, type BatchObject, BytePlusVideoJobMap, CATALOG_ROUTES, type CatalogRoute, type ChaosAction, type ChaosAsyncOutcome, type ChaosConfig, type ChatCompletion, type ChatCompletionChoice, type ChatCompletionMessage, type ChatCompletionRequest, type ChatMessage, type CollapseResult, type ContentPart, type ContentWithToolCallsResponse, DEFAULT_AGUI_RECORD_BUFFER_BYTES, DEFAULT_TEST_ID, type EmbeddingAPIResponse, type EmbeddingFixtureOpts, type EmbeddingResponse, type ErrorResponse, type ErrorResponseOptions, FORMAT_TO_CONTENT_TYPE, FalQueueStateMap, type FileObject, type FineTuningJob, type FineTuningJobError, type FineTuningJobEvent, type FineTuningJobHyperparameters, type FineTuningJobStatus, type Fixture, type FixtureBlock, type FixtureFile, type FixtureFileContentWithToolCallsResponse, type FixtureFileEntry, type FixtureFileResponse, type FixtureFileTextResponse, type FixtureFileToolCall, type FixtureFileToolCallResponse, FixtureLoadError, type FixtureLoadErrorJSON, type FixtureMatch, type FixtureOpts, type FixtureResponse, type FixturesWithServices, GROK_VIDEO_MAX_ENTRIES, GrokVideoJobMap, type ImageItem, type ImageResponse, type InterruptionControl, Journal, type JournalBody, type JournalEntry, type JsonRpcDispatcherOptions, type JsonRpcResponse, LLMock, type LiveBinding, type LiveEntry, type LiveFailureCategory, type LiveFixtureResponse, type LiveJson, type LiveMode, type LiveObject, type LiveOptions, type LivePosition, type LiveTranscript, type LogLevel, Logger, MAX_COLLAPSE_STRING_LENGTH, type MCPContent, MCPMock, type MCPMockOptions, type MCPPromptDefinition, type MCPPromptResult, type MCPResourceContent, type MCPResourceDefinition, type MCPSession, type MCPToolDefinition, MCP_FAKE_ERROR_CODES, type MatchFixtureDiagnostic, type McpFakeAddOrigin, type McpFakeAddResult, type McpFakeAnnotations, type McpFakeBlock, type McpFakeBlockSnapshot, type McpFakeCall, type McpFakeCallAnswer, type McpFakeCallMatch, type McpFakeContentBlock, type McpFakeDeclaredEntry, type McpFakeDeepReadonly, type McpFakeErrorCode, type McpFakeFullResult, type McpFakeIcon, type McpFakeIdentity, type McpFakeIssue, type McpFakeOutcome, type McpFakeResourceContents, type McpFakeResult, type McpFakeScope, type McpFakeSource, type McpFakeStructuredResult, type McpFakeTool, type McpFakeUndeclaredPolicy, McpFakesAddError, type McpFakesAddErrorJSON, type MethodHandler, type MetricsRegistry, type MockServerOptions, type MockSuite, type MockSuiteOptions, type ModerationFixture, type ModerationResult, type Mountable, type NDJSONStreamOptions, OPENROUTER_VIDEO_DEFAULT_MAX_CONTENT_BYTES, OPENROUTER_VIDEO_MAX_ENTRIES, OpenRouterVideoJobMap, type QueryHandler, type QueryResult, ROUTE_DEFINITIONS, type RawJSONResponse, type RecordConfig, type RecordProviderKey, type RerankFixture, type RerankResult, type ResponseOverrides, type ResponsesSSEEvent, type RouteDefinition, type SSEChoice, type SSEChunk, type SSEDelta, type SSEToolCallDelta, type SearchFixture, type SearchResult, type ServerInstance, type ServiceFixtures, type StreamOptions, type StreamingProfile, type TextResponse, type ToolCall, type ToolCallMessage, type ToolCallResponse, type ToolDefinition, type TranscriptionResponse, VEO_VIDEO_MAX_ENTRIES, type ValidationRef, type ValidationResult, type VectorCollection, type VectorEntry, type VectorFileBatchObject, type VectorFileBatchStatus, VectorMock, type VectorMockOptions, type VectorQuery, type VectorSearchResult, type VectorStoreFileObject, type VectorStoreFileStatus, type VectorStoreObject, type VectorStoreStatus, VeoVideoJobMap, type VideoResponse, VideoStateMap, type VoiceDesignPreview, type VoiceDesignResponse, WebSocketConnection, type WebSocketLimits, applyChaosDeprecated as applyChaos, applyChaosAsync, bedrockToCompletionRequest, buildActivityDelta as buildAGUIActivityDelta, buildActivityResponse as buildAGUIActivityResponse, buildCompositeResponse as buildAGUICompositeResponse, buildCustomEvent as buildAGUICustomEvent, buildErrorResponse as buildAGUIErrorResponse, buildMessagesSnapshot as buildAGUIMessagesSnapshot, buildRawEvent as buildAGUIRawEvent, buildReasoningChunk as buildAGUIReasoningChunk, buildReasoningEncryptedValue as buildAGUIReasoningEncryptedValue, buildReasoningResponse as buildAGUIReasoningResponse, buildStateDelta as buildAGUIStateDelta, buildStateUpdate as buildAGUIStateUpdate, buildStepWithText as buildAGUIStepWithText, buildTextChunkResponse as buildAGUITextChunkResponse, buildTextResponse as buildAGUITextResponse, buildToolCallChunk as buildAGUIToolCallChunk, buildToolCallResponse as buildAGUIToolCallResponse, buildBytePlusMatchText, buildContentWithToolCallsChunks, buildContentWithToolCallsCompletion, buildContentWithToolCallsStreamEvents, buildEmbeddingResponse, buildOpenApiDocument, buildTextChunks, buildTextCompletion, buildTextStreamEvents, buildToolCallChunks, buildToolCallCompletion, buildToolCallStreamEvents, calculateDelay, clearBatchStore, clearElevenLabsVoices, clearFileStore, clearFineTuningStore, clearVectorStoreStore, cohereToCompletionRequest, collapseAnthropicSSE, collapseBedrockEventStream, collapseCohereSSE, collapseGeminiInteractionsSSE, collapseGeminiSSE, collapseOllamaNDJSON, collapseOpenAISSE, collapseStreamingResponse, computeAcceptKey, converseToCompletionRequest, createInterruptionSignal, createJsonRpcDispatcher, createMetricsRegistry, createMockSuite, createServer, delay, encodeEventStreamFrame, encodeEventStreamMessage, evaluateChaos, extractLastUserMessage as extractAGUILastUserMessage, extractOverrides, findFixture as findAGUIFixture, flattenHeaders, formatToMime, geminiInteractionsToCompletionRequest, generateDeterministicEmbedding, generateId, generateMessageId, generateToolCallId, generateToolUseId, getLastMessageIfToolResult as getAGUILastMessageIfToolResult, getTextContent, handleBatchesCancel, handleBatchesCreate, handleBatchesList, handleBatchesRetrieve, handleBedrock, handleBedrockStream, handleBytePlusVideoCreate, handleBytePlusVideoStatus, handleCohere, handleConverse, handleConverseStream, handleElevenLabsAudio, handleElevenLabsVoiceCreate, handleElevenLabsVoiceDelete, handleElevenLabsVoiceDesign, handleElevenLabsVoiceGet, handleEmbeddings, handleFal, handleFalQueue, handleFilesContent, handleFilesCreate, handleFilesDelete, handleFilesList, handleFilesRetrieve, handleFineTuningCancel, handleFineTuningCreate, handleFineTuningEvents, handleFineTuningList, handleFineTuningRetrieve, handleGemini, handleGeminiInteractions, handleGrokVideoCreate, handleGrokVideoStatus, handleImages, handleMessages, handleModeration, handleOllama, handleOllamaGenerate, handleOpenRouterVideoContent, handleOpenRouterVideoCreate, handleOpenRouterVideoModels, handleOpenRouterVideoStatus, handleRerank, handleResponses, handleSearch, handleSpeech, handleTranscription, handleVectorFileBatchesCancel, handleVectorFileBatchesCreate, handleVectorFileBatchesFiles, handleVectorFileBatchesRetrieve, handleVectorStoreFilesCreate, handleVectorStoreFilesDelete, handleVectorStoreFilesList, handleVectorStoreFilesRetrieve, handleVectorStoresCreate, handleVectorStoresDelete, handleVectorStoresList, handleVectorStoresModify, handleVectorStoresRetrieve, handleVectorStoresSearch, handleVeoVideoCreate, handleVeoVideoStatus, handleVideoCreate, handleVideoStatus, handleWebSocketGeminiLive, handleWebSocketRealtime, handleWebSocketResponses, isAudioResponse, isChatCompletionBody, isContentWithToolCallsResponse, isEmbeddingResponse, isErrorResponse, isImageResponse, isLiveResponse, isTextResponse, isToolCallResponse, isTranscriptionResponse, isVideoResponse, loadConfig, loadFixtureFile, loadFixtureFileWithServices, loadFixturesFromDir, loadFixturesFromDirWithServices, matchFixture, matchFixtureDiagnostic, matchesFixture as matchesAGUIFixture, normalizePathLabel, normalizeResponse, ollamaToCompletionRequest, proxyAndRecord, proxyAndRecordAGUI, renderValidationRef, resolveChaosLatencyMs, resolveFixtureBlocks, resolveRequestId, resolveUpstreamUrl, setAGUIRecordBufferCeilingForTests, setCollapseStringLimitForTests, startFromConfig, strictNoMatchLogLine, strictNoMatchMessage, upgradeToWebSocket, validateFixtures, voiceDesignToJson, writeAGUIEventStream, writeErrorResponse, writeEventStream, writeNDJSONStream, writeSSEStream };
71
+ export { type A2AAgentDefinition, type A2AArtifact, type A2AMessage, A2AMock, type A2AMockOptions, type A2APart, type A2ARole, type A2AStreamEvent, type A2ATask, type A2ATaskResponse, type A2ATaskState, type AGUIActivityDeltaEvent, type AGUIActivitySnapshotEvent, type AGUIBaseEvent, type AGUIBuildOpts, type AGUICustomEvent, type AGUIEvent, type AGUIEventType, type AGUIFixture, type AGUIFixtureMatch, type AGUIInterrupt, type AGUIMessage, type AGUIMessageContentPart, type AGUIMessageRole, type AGUIMessagesSnapshotEvent, AGUIMock, type AGUIMockOptions, type AGUIRawEvent, type AGUIReasoningEncryptedValueEvent, type AGUIReasoningEncryptedValueSubtype, type AGUIReasoningEndEvent, type AGUIReasoningMessageChunkEvent, type AGUIReasoningMessageContentEvent, type AGUIReasoningMessageEndEvent, type AGUIReasoningMessageStartEvent, type AGUIReasoningStartEvent, type AGUIRecordConfig, type AGUIResumeEntry, type AGUIRunAgentInput, type AGUIRunErrorEvent, type AGUIRunFinishedEvent, type AGUIRunFinishedOutcome, type AGUIRunStartedEvent, type AGUIStateDeltaEvent, type AGUIStateSnapshotEvent, type AGUIStepFinishedEvent, type AGUIStepStartedEvent, type AGUISubagentErrorEvent, type AGUISubagentFinishedEvent, type AGUISubagentFinishedOutcome, type AGUISubagentStartedEvent, type AGUITextMessageChunkEvent, type AGUITextMessageContentEvent, type AGUITextMessageEndEvent, type AGUITextMessageRole, type AGUITextMessageStartEvent, type AGUIThinkingEndEvent, type AGUIThinkingStartEvent, type AGUIThinkingTextMessageContentEvent, type AGUIThinkingTextMessageEndEvent, type AGUIThinkingTextMessageStartEvent, type AGUITokenUsage, type AGUIToolCall, type AGUIToolCallArgsEvent, type AGUIToolCallChunkEvent, type AGUIToolCallEndEvent, type AGUIToolCallResultEvent, type AGUIToolCallStartEvent, type AGUIToolDefinition, AGUI_RECORD_BUFFER_HARD_CEILING, type AimockConfig, AimockFakesReportError, AimockTestIdCollisionError, type ApiKeyAuthConfig, type AudioResponse, BYTEPLUS_VIDEO_MAX_ENTRIES, BYTEPLUS_VIDEO_TASKS_PATH, type BatchObject, BytePlusVideoJobMap, CATALOG_ROUTES, type CatalogRoute, type ChaosAction, type ChaosAsyncOutcome, type ChaosConfig, type ChatCompletion, type ChatCompletionChoice, type ChatCompletionMessage, type ChatCompletionRequest, type ChatMessage, type CollapseResult, type ContentPart, type ContentWithToolCallsResponse, type CustomToolCall, type CustomToolCallMessage, type CustomToolDefinition, DEFAULT_AGUI_RECORD_BUFFER_BYTES, DEFAULT_TEST_ID, type EmbeddingAPIResponse, type EmbeddingFixtureOpts, type EmbeddingResponse, type ErrorResponse, type ErrorResponseOptions, FORMAT_TO_CONTENT_TYPE, FalQueueStateMap, type FileObject, type FineTuningJob, type FineTuningJobError, type FineTuningJobEvent, type FineTuningJobHyperparameters, type FineTuningJobStatus, type Fixture, type FixtureBlock, type FixtureFile, type FixtureFileContentWithToolCallsResponse, type FixtureFileCustomToolCall, type FixtureFileEntry, type FixtureFileResponse, type FixtureFileResponsesBlock, type FixtureFileTextResponse, type FixtureFileToolCall, type FixtureFileToolCallResponse, FixtureLoadError, type FixtureLoadErrorJSON, type FixtureMatch, type FixtureOpts, type FixtureResponse, type FixtureToolCall, type FixturesWithServices, type FunctionFixtureBlock, GROK_VIDEO_MAX_ENTRIES, GrokVideoJobMap, type ImageItem, type ImageResponse, type InterruptionControl, InvalidFixtureToolCallError, Journal, type JournalBody, type JournalEntry, type JsonRpcDispatcherOptions, type JsonRpcResponse, LLMock, type LiveBinding, type LiveEntry, type LiveFailureCategory, type LiveFixtureResponse, type LiveJson, type LiveMode, type LiveObject, type LiveOptions, type LivePosition, type LiveTranscript, type LogLevel, Logger, MAX_COLLAPSE_STRING_LENGTH, type MCPContent, MCPMock, type MCPMockOptions, type MCPPromptDefinition, type MCPPromptResult, type MCPResourceContent, type MCPResourceDefinition, type MCPSession, type MCPToolDefinition, MCP_FAKE_ERROR_CODES, type MatchFixtureDiagnostic, type McpFakeAddOrigin, type McpFakeAddResult, type McpFakeAnnotations, type McpFakeBlock, type McpFakeBlockSnapshot, type McpFakeCall, type McpFakeCallAnswer, type McpFakeCallMatch, type McpFakeContentBlock, type McpFakeDeclaredEntry, type McpFakeDeepReadonly, type McpFakeErrorCode, type McpFakeFullResult, type McpFakeIcon, type McpFakeIdentity, type McpFakeIssue, type McpFakeNotification, type McpFakeOutcome, type McpFakeRecorded, type McpFakeReportEvent, type McpFakeReportPart, type McpFakeResourceContents, type McpFakeResult, type McpFakeScope, type McpFakeSource, type McpFakeStructuredResult, type McpFakeTool, type McpFakeUndeclaredPolicy, McpFakesAddError, type McpFakesAddErrorJSON, type McpFakesReport, type McpRecordConfig, type MethodHandler, type MetricsRegistry, type MisbehaviorConfig, MisbehaviorConfigError, type MisbehaviorConfigErrorJSON, type MisbehaviorFault, type MisbehaviorFaultId, type MisbehaviorRule, type MockServerOptions, type MockSuite, type MockSuiteOptions, type ModerationFixture, type ModerationResult, type Mountable, type NDJSONStreamOptions, OPENROUTER_VIDEO_DEFAULT_MAX_CONTENT_BYTES, OPENROUTER_VIDEO_MAX_ENTRIES, OpenRouterVideoJobMap, type QueryHandler, type QueryResult, ROUTE_DEFINITIONS, type RawJSONResponse, type RecordConfig, type RecordProviderKey, type RecordReplayLoadRule, type RerankFixture, type RerankResult, type ResponseOverrides, type ResponsesFixtureBlock, type ResponsesSSEEvent, type ResponsesToolsMode, type RouteDefinition, type SSEChoice, type SSEChunk, type SSEDelta, type SSEToolCallDelta, type SearchFixture, type SearchResult, type ServerInstance, type ServiceFixtures, type StreamOptions, type StreamingProfile, type TextResponse, type ToolCall, type ToolCallMessage, type ToolCallResponse, type ToolDefinition, type TranscriptionResponse, UnsupportedToolCallError, VEO_VIDEO_MAX_ENTRIES, type ValidationRef, type ValidationResult, type VectorCollection, type VectorEntry, type VectorFileBatchObject, type VectorFileBatchStatus, VectorMock, type VectorMockOptions, type VectorQuery, type VectorSearchResult, type VectorStoreFileObject, type VectorStoreFileStatus, type VectorStoreObject, type VectorStoreStatus, VeoVideoJobMap, type VideoResponse, VideoStateMap, type VoiceDesignPreview, type VoiceDesignResponse, WebSocketConnection, type WebSocketLimits, applyChaosDeprecated as applyChaos, applyChaosAsync, assertFakesReport, bedrockToCompletionRequest, buildActivityDelta as buildAGUIActivityDelta, buildActivityResponse as buildAGUIActivityResponse, buildCompositeResponse as buildAGUICompositeResponse, buildCustomEvent as buildAGUICustomEvent, buildErrorResponse as buildAGUIErrorResponse, buildMessagesSnapshot as buildAGUIMessagesSnapshot, buildRawEvent as buildAGUIRawEvent, buildReasoningChunk as buildAGUIReasoningChunk, buildReasoningEncryptedValue as buildAGUIReasoningEncryptedValue, buildReasoningResponse as buildAGUIReasoningResponse, buildStateDelta as buildAGUIStateDelta, buildStateUpdate as buildAGUIStateUpdate, buildStepWithText as buildAGUIStepWithText, buildTextChunkResponse as buildAGUITextChunkResponse, buildTextResponse as buildAGUITextResponse, buildToolCallChunk as buildAGUIToolCallChunk, buildToolCallResponse as buildAGUIToolCallResponse, buildBytePlusMatchText, buildContentWithToolCallsChunks, buildContentWithToolCallsCompletion, buildContentWithToolCallsStreamEvents, buildEmbeddingResponse, buildOpenApiDocument, buildTextChunks, buildTextCompletion, buildTextStreamEvents, buildToolCallChunks, buildToolCallCompletion, buildToolCallStreamEvents, calculateDelay, clearBatchStore, clearElevenLabsVoices, clearFileStore, clearFineTuningStore, clearVectorStoreStore, cohereToCompletionRequest, collapseAnthropicSSE, collapseBedrockEventStream, collapseCohereSSE, collapseGeminiInteractionsSSE, collapseGeminiSSE, collapseOllamaNDJSON, collapseOpenAISSE, collapseStreamingResponse, computeAcceptKey, converseToCompletionRequest, createInterruptionSignal, createJsonRpcDispatcher, createMetricsRegistry, createMockSuite, createServer, delay, encodeEventStreamFrame, encodeEventStreamMessage, evaluateChaos, extractLastUserMessage as extractAGUILastUserMessage, extractOverrides, findFixture as findAGUIFixture, flattenHeaders, formatToMime, geminiInteractionsToCompletionRequest, generateDeterministicEmbedding, generateId, generateMessageId, generateToolCallId, generateToolUseId, getLastMessageIfToolResult as getAGUILastMessageIfToolResult, getTextContent, handleBatchesCancel, handleBatchesCreate, handleBatchesList, handleBatchesRetrieve, handleBedrock, handleBedrockStream, handleBytePlusVideoCreate, handleBytePlusVideoStatus, handleCohere, handleConverse, handleConverseStream, handleElevenLabsAudio, handleElevenLabsVoiceCreate, handleElevenLabsVoiceDelete, handleElevenLabsVoiceDesign, handleElevenLabsVoiceGet, handleEmbeddings, handleFal, handleFalQueue, handleFilesContent, handleFilesCreate, handleFilesDelete, handleFilesList, handleFilesRetrieve, handleFineTuningCancel, handleFineTuningCreate, handleFineTuningEvents, handleFineTuningList, handleFineTuningRetrieve, handleGemini, handleGeminiInteractions, handleGrokVideoCreate, handleGrokVideoStatus, handleImages, handleMessages, handleModeration, handleOllama, handleOllamaGenerate, handleOpenRouterVideoContent, handleOpenRouterVideoCreate, handleOpenRouterVideoModels, handleOpenRouterVideoStatus, handleRerank, handleResponses, handleSearch, handleSpeech, handleTranscription, handleVectorFileBatchesCancel, handleVectorFileBatchesCreate, handleVectorFileBatchesFiles, handleVectorFileBatchesRetrieve, handleVectorStoreFilesCreate, handleVectorStoreFilesDelete, handleVectorStoreFilesList, handleVectorStoreFilesRetrieve, handleVectorStoresCreate, handleVectorStoresDelete, handleVectorStoresList, handleVectorStoresModify, handleVectorStoresRetrieve, handleVectorStoresSearch, handleVeoVideoCreate, handleVeoVideoStatus, handleVideoCreate, handleVideoStatus, handleWebSocketGeminiLive, handleWebSocketRealtime, handleWebSocketResponses, isAudioResponse, isChatCompletionBody, isContentWithToolCallsResponse, isEmbeddingResponse, isErrorResponse, isImageResponse, isLiveResponse, isTextResponse, isToolCallResponse, isTranscriptionResponse, isVideoResponse, loadConfig, loadFixtureFile, loadFixtureFileWithServices, loadFixturesFromDir, loadFixturesFromDirWithServices, matchFixture, matchFixtureDiagnostic, matchesFixture as matchesAGUIFixture, normalizePathLabel, normalizeResponse, ollamaToCompletionRequest, proxyAndRecord, proxyAndRecordAGUI, renderValidationRef, requireFunctionToolCalls, resolveChaosLatencyMs, resolveFixtureBlocks, resolveRequestId, resolveResponsesBlocks, resolveUpstreamUrl, setAGUIRecordBufferCeilingForTests, setCollapseStringLimitForTests, startFromConfig, strictNoMatchLogLine, strictNoMatchMessage, upgradeToWebSocket, validateFixtures, voiceDesignToJson, writeAGUIEventStream, writeErrorResponse, writeEventStream, writeNDJSONStream, writeSSEStream };
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { DEFAULT_TEST_ID } from "./constants.js";
2
- import { FORMAT_TO_CONTENT_TYPE, buildContentWithToolCallsChunks, buildContentWithToolCallsCompletion, buildEmbeddingResponse, buildTextChunks, buildTextCompletion, buildToolCallChunks, buildToolCallCompletion, extractOverrides, flattenHeaders, formatToMime, generateDeterministicEmbedding, generateId, generateMessageId, generateToolCallId, generateToolUseId, isAudioResponse, isContentWithToolCallsResponse, isEmbeddingResponse, isErrorResponse, isImageResponse, isLiveResponse, isTextResponse, isToolCallResponse, isTranscriptionResponse, isVideoResponse, resolveFixtureBlocks, resolveRequestId, strictNoMatchLogLine, strictNoMatchMessage } from "./helpers.js";
2
+ import { FORMAT_TO_CONTENT_TYPE, InvalidFixtureToolCallError, UnsupportedToolCallError, buildContentWithToolCallsChunks, buildContentWithToolCallsCompletion, buildEmbeddingResponse, buildTextChunks, buildTextCompletion, buildToolCallChunks, buildToolCallCompletion, extractOverrides, flattenHeaders, formatToMime, generateDeterministicEmbedding, generateId, generateMessageId, generateToolCallId, generateToolUseId, isAudioResponse, isContentWithToolCallsResponse, isEmbeddingResponse, isErrorResponse, isImageResponse, isLiveResponse, isTextResponse, isToolCallResponse, isTranscriptionResponse, isVideoResponse, requireFunctionToolCalls, resolveFixtureBlocks, resolveRequestId, resolveResponsesBlocks, strictNoMatchLogLine, strictNoMatchMessage } from "./helpers.js";
3
3
  import { createJsonRpcDispatcher } from "./jsonrpc.js";
4
4
  import { A2AMock } from "./a2a-mock.js";
5
5
  import { buildActivityDelta, buildActivityResponse, buildCompositeResponse, buildCustomEvent, buildErrorResponse, buildMessagesSnapshot, buildRawEvent, buildReasoningChunk, buildReasoningEncryptedValue, buildReasoningResponse, buildStateDelta, buildStateUpdate, buildStepWithText, buildTextChunkResponse, buildTextResponse, buildToolCallChunk, buildToolCallResponse, extractLastUserMessage, findFixture, getLastMessageIfToolResult, matchesFixture, writeAGUIEventStream } from "./agui-handler.js";
6
6
  import { calculateDelay, delay, writeErrorResponse, writeSSEStream } from "./sse-writer.js";
7
7
  import { applyChaosAsync, applyChaosDeprecated, evaluateChaos, resolveChaosLatencyMs } from "./chaos.js";
8
- import { FixtureLoadError, loadFixtureFile, loadFixturesFromDir, normalizeResponse, renderValidationRef, validateFixtures } from "./fixture-loader.js";
8
+ import { FixtureLoadError, MisbehaviorConfigError, loadFixtureFile, loadFixturesFromDir, normalizeResponse, renderValidationRef, validateFixtures } from "./fixture-loader.js";
9
9
  import { getTextContent, matchFixture, matchFixtureDiagnostic } from "./router.js";
10
10
  import { MAX_COLLAPSE_STRING_LENGTH, collapseAnthropicSSE, collapseBedrockEventStream, collapseCohereSSE, collapseGeminiInteractionsSSE, collapseGeminiSSE, collapseOllamaNDJSON, collapseOpenAISSE, collapseStreamingResponse, setCollapseStringLimitForTests } from "./stream-collapse.js";
11
11
  import { resolveUpstreamUrl } from "./url.js";
@@ -55,6 +55,7 @@ import { createMetricsRegistry, normalizePathLabel } from "./metrics.js";
55
55
  import { MCP_FAKE_ERROR_CODES } from "./types.js";
56
56
  import { McpFakesAddError } from "./mcp-fakes.js";
57
57
  import { MCPMock } from "./mcp-mock.js";
58
+ import { AimockFakesReportError, AimockTestIdCollisionError, assertFakesReport } from "./mcp-fakes-report.js";
58
59
  import { createServer } from "./server.js";
59
60
  import { loadFixtureFileWithServices, loadFixturesFromDirWithServices } from "./fixture-loader-services.js";
60
61
  import { LLMock } from "./llmock.js";
@@ -62,4 +63,4 @@ import { VectorMock } from "./vector-mock.js";
62
63
  import { loadConfig, startFromConfig } from "./config-loader.js";
63
64
  import { createMockSuite } from "./suite.js";
64
65
 
65
- export { A2AMock, AGUIMock, AGUI_RECORD_BUFFER_HARD_CEILING, BYTEPLUS_VIDEO_MAX_ENTRIES, BYTEPLUS_VIDEO_TASKS_PATH, BytePlusVideoJobMap, CATALOG_ROUTES, DEFAULT_AGUI_RECORD_BUFFER_BYTES, DEFAULT_TEST_ID, FORMAT_TO_CONTENT_TYPE, FalQueueStateMap, FixtureLoadError, GROK_VIDEO_MAX_ENTRIES, GrokVideoJobMap, Journal, LLMock, Logger, MAX_COLLAPSE_STRING_LENGTH, MCPMock, MCP_FAKE_ERROR_CODES, McpFakesAddError, OPENROUTER_VIDEO_DEFAULT_MAX_CONTENT_BYTES, OPENROUTER_VIDEO_MAX_ENTRIES, OpenRouterVideoJobMap, ROUTE_DEFINITIONS, VEO_VIDEO_MAX_ENTRIES, VectorMock, VeoVideoJobMap, VideoStateMap, WebSocketConnection, applyChaosDeprecated as applyChaos, applyChaosAsync, bedrockToCompletionRequest, buildActivityDelta as buildAGUIActivityDelta, buildActivityResponse as buildAGUIActivityResponse, buildCompositeResponse as buildAGUICompositeResponse, buildCustomEvent as buildAGUICustomEvent, buildErrorResponse as buildAGUIErrorResponse, buildMessagesSnapshot as buildAGUIMessagesSnapshot, buildRawEvent as buildAGUIRawEvent, buildReasoningChunk as buildAGUIReasoningChunk, buildReasoningEncryptedValue as buildAGUIReasoningEncryptedValue, buildReasoningResponse as buildAGUIReasoningResponse, buildStateDelta as buildAGUIStateDelta, buildStateUpdate as buildAGUIStateUpdate, buildStepWithText as buildAGUIStepWithText, buildTextChunkResponse as buildAGUITextChunkResponse, buildTextResponse as buildAGUITextResponse, buildToolCallChunk as buildAGUIToolCallChunk, buildToolCallResponse as buildAGUIToolCallResponse, buildBytePlusMatchText, buildContentWithToolCallsChunks, buildContentWithToolCallsCompletion, buildContentWithToolCallsStreamEvents, buildEmbeddingResponse, buildOpenApiDocument, buildTextChunks, buildTextCompletion, buildTextStreamEvents, buildToolCallChunks, buildToolCallCompletion, buildToolCallStreamEvents, calculateDelay, clearBatchStore, clearElevenLabsVoices, clearFileStore, clearFineTuningStore, clearVectorStoreStore, cohereToCompletionRequest, collapseAnthropicSSE, collapseBedrockEventStream, collapseCohereSSE, collapseGeminiInteractionsSSE, collapseGeminiSSE, collapseOllamaNDJSON, collapseOpenAISSE, collapseStreamingResponse, computeAcceptKey, converseToCompletionRequest, createInterruptionSignal, createJsonRpcDispatcher, createMetricsRegistry, createMockSuite, createServer, delay, encodeEventStreamFrame, encodeEventStreamMessage, evaluateChaos, extractLastUserMessage as extractAGUILastUserMessage, extractOverrides, findFixture as findAGUIFixture, flattenHeaders, formatToMime, geminiInteractionsToCompletionRequest, generateDeterministicEmbedding, generateId, generateMessageId, generateToolCallId, generateToolUseId, getLastMessageIfToolResult as getAGUILastMessageIfToolResult, getTextContent, handleBatchesCancel, handleBatchesCreate, handleBatchesList, handleBatchesRetrieve, handleBedrock, handleBedrockStream, handleBytePlusVideoCreate, handleBytePlusVideoStatus, handleCohere, handleConverse, handleConverseStream, handleElevenLabsAudio, handleElevenLabsVoiceCreate, handleElevenLabsVoiceDelete, handleElevenLabsVoiceDesign, handleElevenLabsVoiceGet, handleEmbeddings, handleFal, handleFalQueue, handleFilesContent, handleFilesCreate, handleFilesDelete, handleFilesList, handleFilesRetrieve, handleFineTuningCancel, handleFineTuningCreate, handleFineTuningEvents, handleFineTuningList, handleFineTuningRetrieve, handleGemini, handleGeminiInteractions, handleGrokVideoCreate, handleGrokVideoStatus, handleImages, handleMessages, handleModeration, handleOllama, handleOllamaGenerate, handleOpenRouterVideoContent, handleOpenRouterVideoCreate, handleOpenRouterVideoModels, handleOpenRouterVideoStatus, handleRerank, handleResponses, handleSearch, handleSpeech, handleTranscription, handleVectorFileBatchesCancel, handleVectorFileBatchesCreate, handleVectorFileBatchesFiles, handleVectorFileBatchesRetrieve, handleVectorStoreFilesCreate, handleVectorStoreFilesDelete, handleVectorStoreFilesList, handleVectorStoreFilesRetrieve, handleVectorStoresCreate, handleVectorStoresDelete, handleVectorStoresList, handleVectorStoresModify, handleVectorStoresRetrieve, handleVectorStoresSearch, handleVeoVideoCreate, handleVeoVideoStatus, handleVideoCreate, handleVideoStatus, handleWebSocketGeminiLive, handleWebSocketRealtime, handleWebSocketResponses, isAudioResponse, isChatCompletionBody, isContentWithToolCallsResponse, isEmbeddingResponse, isErrorResponse, isImageResponse, isLiveResponse, isTextResponse, isToolCallResponse, isTranscriptionResponse, isVideoResponse, loadConfig, loadFixtureFile, loadFixtureFileWithServices, loadFixturesFromDir, loadFixturesFromDirWithServices, matchFixture, matchFixtureDiagnostic, matchesFixture as matchesAGUIFixture, normalizePathLabel, normalizeResponse, ollamaToCompletionRequest, proxyAndRecord, proxyAndRecordAGUI, renderValidationRef, resolveChaosLatencyMs, resolveFixtureBlocks, resolveRequestId, resolveUpstreamUrl, setAGUIRecordBufferCeilingForTests, setCollapseStringLimitForTests, startFromConfig, strictNoMatchLogLine, strictNoMatchMessage, upgradeToWebSocket, validateFixtures, voiceDesignToJson, writeAGUIEventStream, writeErrorResponse, writeEventStream, writeNDJSONStream, writeSSEStream };
66
+ export { A2AMock, AGUIMock, AGUI_RECORD_BUFFER_HARD_CEILING, AimockFakesReportError, AimockTestIdCollisionError, BYTEPLUS_VIDEO_MAX_ENTRIES, BYTEPLUS_VIDEO_TASKS_PATH, BytePlusVideoJobMap, CATALOG_ROUTES, DEFAULT_AGUI_RECORD_BUFFER_BYTES, DEFAULT_TEST_ID, FORMAT_TO_CONTENT_TYPE, FalQueueStateMap, FixtureLoadError, GROK_VIDEO_MAX_ENTRIES, GrokVideoJobMap, InvalidFixtureToolCallError, Journal, LLMock, Logger, MAX_COLLAPSE_STRING_LENGTH, MCPMock, MCP_FAKE_ERROR_CODES, McpFakesAddError, MisbehaviorConfigError, OPENROUTER_VIDEO_DEFAULT_MAX_CONTENT_BYTES, OPENROUTER_VIDEO_MAX_ENTRIES, OpenRouterVideoJobMap, ROUTE_DEFINITIONS, UnsupportedToolCallError, VEO_VIDEO_MAX_ENTRIES, VectorMock, VeoVideoJobMap, VideoStateMap, WebSocketConnection, applyChaosDeprecated as applyChaos, applyChaosAsync, assertFakesReport, bedrockToCompletionRequest, buildActivityDelta as buildAGUIActivityDelta, buildActivityResponse as buildAGUIActivityResponse, buildCompositeResponse as buildAGUICompositeResponse, buildCustomEvent as buildAGUICustomEvent, buildErrorResponse as buildAGUIErrorResponse, buildMessagesSnapshot as buildAGUIMessagesSnapshot, buildRawEvent as buildAGUIRawEvent, buildReasoningChunk as buildAGUIReasoningChunk, buildReasoningEncryptedValue as buildAGUIReasoningEncryptedValue, buildReasoningResponse as buildAGUIReasoningResponse, buildStateDelta as buildAGUIStateDelta, buildStateUpdate as buildAGUIStateUpdate, buildStepWithText as buildAGUIStepWithText, buildTextChunkResponse as buildAGUITextChunkResponse, buildTextResponse as buildAGUITextResponse, buildToolCallChunk as buildAGUIToolCallChunk, buildToolCallResponse as buildAGUIToolCallResponse, buildBytePlusMatchText, buildContentWithToolCallsChunks, buildContentWithToolCallsCompletion, buildContentWithToolCallsStreamEvents, buildEmbeddingResponse, buildOpenApiDocument, buildTextChunks, buildTextCompletion, buildTextStreamEvents, buildToolCallChunks, buildToolCallCompletion, buildToolCallStreamEvents, calculateDelay, clearBatchStore, clearElevenLabsVoices, clearFileStore, clearFineTuningStore, clearVectorStoreStore, cohereToCompletionRequest, collapseAnthropicSSE, collapseBedrockEventStream, collapseCohereSSE, collapseGeminiInteractionsSSE, collapseGeminiSSE, collapseOllamaNDJSON, collapseOpenAISSE, collapseStreamingResponse, computeAcceptKey, converseToCompletionRequest, createInterruptionSignal, createJsonRpcDispatcher, createMetricsRegistry, createMockSuite, createServer, delay, encodeEventStreamFrame, encodeEventStreamMessage, evaluateChaos, extractLastUserMessage as extractAGUILastUserMessage, extractOverrides, findFixture as findAGUIFixture, flattenHeaders, formatToMime, geminiInteractionsToCompletionRequest, generateDeterministicEmbedding, generateId, generateMessageId, generateToolCallId, generateToolUseId, getLastMessageIfToolResult as getAGUILastMessageIfToolResult, getTextContent, handleBatchesCancel, handleBatchesCreate, handleBatchesList, handleBatchesRetrieve, handleBedrock, handleBedrockStream, handleBytePlusVideoCreate, handleBytePlusVideoStatus, handleCohere, handleConverse, handleConverseStream, handleElevenLabsAudio, handleElevenLabsVoiceCreate, handleElevenLabsVoiceDelete, handleElevenLabsVoiceDesign, handleElevenLabsVoiceGet, handleEmbeddings, handleFal, handleFalQueue, handleFilesContent, handleFilesCreate, handleFilesDelete, handleFilesList, handleFilesRetrieve, handleFineTuningCancel, handleFineTuningCreate, handleFineTuningEvents, handleFineTuningList, handleFineTuningRetrieve, handleGemini, handleGeminiInteractions, handleGrokVideoCreate, handleGrokVideoStatus, handleImages, handleMessages, handleModeration, handleOllama, handleOllamaGenerate, handleOpenRouterVideoContent, handleOpenRouterVideoCreate, handleOpenRouterVideoModels, handleOpenRouterVideoStatus, handleRerank, handleResponses, handleSearch, handleSpeech, handleTranscription, handleVectorFileBatchesCancel, handleVectorFileBatchesCreate, handleVectorFileBatchesFiles, handleVectorFileBatchesRetrieve, handleVectorStoreFilesCreate, handleVectorStoreFilesDelete, handleVectorStoreFilesList, handleVectorStoreFilesRetrieve, handleVectorStoresCreate, handleVectorStoresDelete, handleVectorStoresList, handleVectorStoresModify, handleVectorStoresRetrieve, handleVectorStoresSearch, handleVeoVideoCreate, handleVeoVideoStatus, handleVideoCreate, handleVideoStatus, handleWebSocketGeminiLive, handleWebSocketRealtime, handleWebSocketResponses, isAudioResponse, isChatCompletionBody, isContentWithToolCallsResponse, isEmbeddingResponse, isErrorResponse, isImageResponse, isLiveResponse, isTextResponse, isToolCallResponse, isTranscriptionResponse, isVideoResponse, loadConfig, loadFixtureFile, loadFixtureFileWithServices, loadFixturesFromDir, loadFixturesFromDirWithServices, matchFixture, matchFixtureDiagnostic, matchesFixture as matchesAGUIFixture, normalizePathLabel, normalizeResponse, ollamaToCompletionRequest, proxyAndRecord, proxyAndRecordAGUI, renderValidationRef, requireFunctionToolCalls, resolveChaosLatencyMs, resolveFixtureBlocks, resolveRequestId, resolveResponsesBlocks, resolveUpstreamUrl, setAGUIRecordBufferCeilingForTests, setCollapseStringLimitForTests, startFromConfig, strictNoMatchLogLine, strictNoMatchMessage, upgradeToWebSocket, validateFixtures, voiceDesignToJson, writeAGUIEventStream, writeErrorResponse, writeEventStream, writeNDJSONStream, writeSSEStream };
package/dist/jest.cjs CHANGED
@@ -1,11 +1,19 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
3
  const require_fixture_loader = require('./fixture-loader.cjs');
4
+ const require_mcp_fakes_report = require('./mcp-fakes-report.cjs');
4
5
  const require_llmock = require('./llmock.cjs');
6
+ const require_fakes_plugin = require('./fakes-plugin.cjs');
5
7
  let node_fs = require("node:fs");
6
8
  let node_path = require("node:path");
7
9
 
8
10
  //#region src/jest.ts
11
+ /** TI2: `<testPath relative to root, with "/"> › <currentTestName>`. */
12
+ function defaultJestId(root) {
13
+ const { testPath, currentTestName } = expect.getState();
14
+ if (!testPath || currentTestName === void 0) throw new require_mcp_fakes_report.AimockTestIdCollisionError("default test ids are not supported here (concurrent test or no running test); pass an explicit testId");
15
+ return (0, node_path.relative)(root, testPath).split(node_path.sep).join("/") + require_fakes_plugin.TEST_ID_SEPARATOR + currentTestName;
16
+ }
9
17
  /**
10
18
  * Start an aimock server for the duration of the test suite.
11
19
  *
@@ -13,7 +21,8 @@ let node_path = require("node:path");
13
21
  * `mcpFakes` blocks; a bad `mcpFakes` block fails `beforeAll`)
14
22
  * - `beforeEach`: closes Live sessions and resets fixture match counts and MCP fake
15
23
  * consumption (not fixtures or fakes)
16
- * - `afterEach`: closes Live sessions owned by this helper's server
24
+ * - `afterEach`: closes Live sessions owned by this helper's server, then checks
25
+ * the MCP fake report under `fakesReport: "warn" | "fail"`
17
26
  * - `afterAll`: stops the server
18
27
  *
19
28
  * Returns a getter function — call it inside tests to access the handle.
@@ -25,8 +34,11 @@ function useAimock(options = {}) {
25
34
  let handle = null;
26
35
  let origOpenaiUrl;
27
36
  let origAnthropicUrl;
37
+ const root = (0, node_path.resolve)(options.testIdRoot ?? process.cwd());
38
+ let state = new require_fakes_plugin.FakesPluginState("off");
28
39
  beforeAll(async () => {
29
- const { fixtures: fixturePath, patchEnv, ...serverOpts } = options;
40
+ const { fixtures: fixturePath, patchEnv, fakesReport, testIdRoot, ...serverOpts } = options;
41
+ state = new require_fakes_plugin.FakesPluginState(require_fakes_plugin.fakesReportMode(fakesReport));
30
42
  const llm = new require_llmock.LLMock(serverOpts);
31
43
  if (fixturePath) loadFixtures(llm, (0, node_path.resolve)(fixturePath));
32
44
  const url = await llm.start();
@@ -38,17 +50,27 @@ function useAimock(options = {}) {
38
50
  }
39
51
  handle = {
40
52
  llm,
41
- url
53
+ url,
54
+ fakesFor(testId, opts = {}) {
55
+ const id = testId ?? defaultJestId(root);
56
+ state.register(id, opts.context ?? null);
57
+ return require_fakes_plugin.fakesTarget(url, id, opts);
58
+ },
59
+ fakesReport(testId, opts = {}) {
60
+ return require_fakes_plugin.fetchFakesReport(url, testId ?? defaultJestId(root), opts.context ?? null);
61
+ }
42
62
  };
43
63
  });
44
64
  beforeEach(() => {
45
65
  if (handle) {
46
66
  handle.llm.closeLiveSessions();
47
67
  handle.llm.resetMatchCounts();
68
+ state.beforeEach(handle.llm);
48
69
  }
49
70
  });
50
- afterEach(() => {
71
+ afterEach(async () => {
51
72
  handle?.llm.closeLiveSessions();
73
+ if (handle) await state.afterEach(handle.llm, handle.url);
52
74
  });
53
75
  afterAll(async () => {
54
76
  if (handle) {
@@ -70,15 +92,17 @@ function useAimock(options = {}) {
70
92
  /**
71
93
  * Load a fixture file or directory into `llm`: its LLM fixtures and its
72
94
  * `mcpFakes` blocks, which the LLMock buffers and auto-mounts at start (F12).
73
- * A `FixtureLoadError` (a bad `mcpFakes` block) propagates and fails
74
- * `beforeAll`; any other load failure is only warned about, as before.
95
+ * A `FixtureLoadError` (a bad `mcpFakes` block) or a `MisbehaviorConfigError`
96
+ * (a bad fixture `misbehavior` key, thrown only with `enableMisbehavior: true`)
97
+ * propagates and fails `beforeAll`; any other load failure is only warned
98
+ * about, as before.
75
99
  */
76
100
  function loadFixtures(llm, fixturePath) {
77
101
  try {
78
102
  if ((0, node_fs.statSync)(fixturePath).isDirectory()) llm.loadFixtureDir(fixturePath);
79
103
  else llm.loadFixtureFile(fixturePath);
80
104
  } catch (err) {
81
- if (err instanceof require_fixture_loader.FixtureLoadError) throw err;
105
+ if (err instanceof require_fixture_loader.FixtureLoadError || err instanceof require_fixture_loader.MisbehaviorConfigError) throw err;
82
106
  console.warn(`[aimock] Failed to load fixtures from ${fixturePath}: ${err instanceof Error ? err.message : String(err)}`);
83
107
  }
84
108
  }
package/dist/jest.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"jest.cjs","names":["LLMock","FixtureLoadError"],"sources":["../src/jest.ts"],"sourcesContent":["/**\n * Jest integration for aimock.\n *\n * Usage:\n * import { useAimock } from \"@copilotkit/aimock/jest\";\n *\n * const mock = useAimock({ fixtures: \"./fixtures\" });\n *\n * it(\"responds\", async () => {\n * const res = await fetch(`${mock().url}/v1/chat/completions`, { ... });\n * });\n */\n\n/* eslint-disable no-var */\n// Jest globals — available at runtime in jest test files\ndeclare var beforeAll: (fn: () => Promise<void> | void, timeout?: number) => void;\ndeclare var afterAll: (fn: () => Promise<void> | void, timeout?: number) => void;\ndeclare var beforeEach: (fn: () => Promise<void> | void, timeout?: number) => void;\ndeclare var afterEach: (fn: () => Promise<void> | void, timeout?: number) => void;\n/* eslint-enable no-var */\n\nimport { LLMock } from \"./llmock.js\";\nimport { FixtureLoadError } from \"./fixture-loader.js\";\nimport type { MockServerOptions } from \"./types.js\";\nimport { statSync } from \"node:fs\";\nimport { resolve } from \"node:path\";\n\nexport interface UseAimockOptions extends MockServerOptions {\n /** Path to fixture file or directory. Loaded automatically on start. */\n fixtures?: string;\n /** If true, sets process.env.OPENAI_BASE_URL to the mock URL + /v1. */\n patchEnv?: boolean;\n}\n\nexport interface AimockHandle {\n /** The LLMock instance. */\n readonly llm: LLMock;\n /** The server URL (e.g., http://127.0.0.1:4010). */\n readonly url: string;\n}\n\n/**\n * Start an aimock server for the duration of the test suite.\n *\n * - `beforeAll`: starts the server and optionally loads fixtures (LLM fixtures and\n * `mcpFakes` blocks; a bad `mcpFakes` block fails `beforeAll`)\n * - `beforeEach`: closes Live sessions and resets fixture match counts and MCP fake\n * consumption (not fixtures or fakes)\n * - `afterEach`: closes Live sessions owned by this helper's server\n * - `afterAll`: stops the server\n *\n * Returns a getter function — call it inside tests to access the handle.\n *\n * NOTE: Jest globals (beforeAll, afterAll, beforeEach, afterEach) must be available\n * in the test environment. This works with the default jest configuration.\n */\nexport function useAimock(options: UseAimockOptions = {}): () => AimockHandle {\n let handle: AimockHandle | null = null;\n let origOpenaiUrl: string | undefined;\n let origAnthropicUrl: string | undefined;\n\n beforeAll(async () => {\n const { fixtures: fixturePath, patchEnv, ...serverOpts } = options;\n const llm = new LLMock(serverOpts);\n\n if (fixturePath) {\n loadFixtures(llm, resolve(fixturePath));\n }\n\n const url = await llm.start();\n\n if (patchEnv !== false) {\n origOpenaiUrl = process.env.OPENAI_BASE_URL;\n origAnthropicUrl = process.env.ANTHROPIC_BASE_URL;\n process.env.OPENAI_BASE_URL = `${url}/v1`;\n process.env.ANTHROPIC_BASE_URL = `${url}/v1`;\n }\n\n handle = { llm, url };\n });\n\n beforeEach(() => {\n if (handle) {\n handle.llm.closeLiveSessions();\n handle.llm.resetMatchCounts();\n }\n });\n\n afterEach(() => {\n handle?.llm.closeLiveSessions();\n });\n\n afterAll(async () => {\n if (handle) {\n if (options.patchEnv !== false) {\n if (origOpenaiUrl !== undefined) process.env.OPENAI_BASE_URL = origOpenaiUrl;\n else delete process.env.OPENAI_BASE_URL;\n if (origAnthropicUrl !== undefined) process.env.ANTHROPIC_BASE_URL = origAnthropicUrl;\n else delete process.env.ANTHROPIC_BASE_URL;\n }\n await handle.llm.stop();\n handle = null;\n }\n });\n\n return () => {\n if (!handle) {\n throw new Error(\"useAimock(): server not started — are you calling this inside a test?\");\n }\n return handle;\n };\n}\n\n/**\n * Load a fixture file or directory into `llm`: its LLM fixtures and its\n * `mcpFakes` blocks, which the LLMock buffers and auto-mounts at start (F12).\n * A `FixtureLoadError` (a bad `mcpFakes` block) propagates and fails\n * `beforeAll`; any other load failure is only warned about, as before.\n */\nfunction loadFixtures(llm: LLMock, fixturePath: string): void {\n try {\n const stat = statSync(fixturePath);\n if (stat.isDirectory()) {\n llm.loadFixtureDir(fixturePath);\n } else {\n llm.loadFixtureFile(fixturePath);\n }\n } catch (err) {\n if (err instanceof FixtureLoadError) throw err;\n console.warn(\n `[aimock] Failed to load fixtures from ${fixturePath}: ${err instanceof Error ? err.message : String(err)}`,\n );\n }\n}\n\nexport { LLMock } from \"./llmock.js\";\nexport type { MockServerOptions, Fixture } from \"./types.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAwDA,SAAgB,UAAU,UAA4B,EAAE,EAAsB;CAC5E,IAAI,SAA8B;CAClC,IAAI;CACJ,IAAI;AAEJ,WAAU,YAAY;EACpB,MAAM,EAAE,UAAU,aAAa,UAAU,GAAG,eAAe;EAC3D,MAAM,MAAM,IAAIA,sBAAO,WAAW;AAElC,MAAI,YACF,cAAa,4BAAa,YAAY,CAAC;EAGzC,MAAM,MAAM,MAAM,IAAI,OAAO;AAE7B,MAAI,aAAa,OAAO;AACtB,mBAAgB,QAAQ,IAAI;AAC5B,sBAAmB,QAAQ,IAAI;AAC/B,WAAQ,IAAI,kBAAkB,GAAG,IAAI;AACrC,WAAQ,IAAI,qBAAqB,GAAG,IAAI;;AAG1C,WAAS;GAAE;GAAK;GAAK;GACrB;AAEF,kBAAiB;AACf,MAAI,QAAQ;AACV,UAAO,IAAI,mBAAmB;AAC9B,UAAO,IAAI,kBAAkB;;GAE/B;AAEF,iBAAgB;AACd,UAAQ,IAAI,mBAAmB;GAC/B;AAEF,UAAS,YAAY;AACnB,MAAI,QAAQ;AACV,OAAI,QAAQ,aAAa,OAAO;AAC9B,QAAI,kBAAkB,OAAW,SAAQ,IAAI,kBAAkB;QAC1D,QAAO,QAAQ,IAAI;AACxB,QAAI,qBAAqB,OAAW,SAAQ,IAAI,qBAAqB;QAChE,QAAO,QAAQ,IAAI;;AAE1B,SAAM,OAAO,IAAI,MAAM;AACvB,YAAS;;GAEX;AAEF,cAAa;AACX,MAAI,CAAC,OACH,OAAM,IAAI,MAAM,wEAAwE;AAE1F,SAAO;;;;;;;;;AAUX,SAAS,aAAa,KAAa,aAA2B;AAC5D,KAAI;AAEF,4BADsB,YAAY,CACzB,aAAa,CACpB,KAAI,eAAe,YAAY;MAE/B,KAAI,gBAAgB,YAAY;UAE3B,KAAK;AACZ,MAAI,eAAeC,wCAAkB,OAAM;AAC3C,UAAQ,KACN,yCAAyC,YAAY,IAAI,eAAe,QAAQ,IAAI,UAAU,OAAO,IAAI,GAC1G"}
1
+ {"version":3,"file":"jest.cjs","names":["AimockTestIdCollisionError","sep","TEST_ID_SEPARATOR","FakesPluginState","fakesReportMode","LLMock","fakesTarget","fetchFakesReport","FixtureLoadError","MisbehaviorConfigError"],"sources":["../src/jest.ts"],"sourcesContent":["/**\n * Jest integration for aimock.\n *\n * Usage:\n * import { useAimock } from \"@copilotkit/aimock/jest\";\n *\n * const mock = useAimock({ fixtures: \"./fixtures\" });\n *\n * it(\"responds\", async () => {\n * const res = await fetch(`${mock().url}/v1/chat/completions`, { ... });\n * });\n */\n\n/* eslint-disable no-var */\n// Jest globals — available at runtime in jest test files\ndeclare var beforeAll: (fn: () => Promise<void> | void, timeout?: number) => void;\ndeclare var afterAll: (fn: () => Promise<void> | void, timeout?: number) => void;\ndeclare var beforeEach: (fn: () => Promise<void> | void, timeout?: number) => void;\ndeclare var afterEach: (fn: () => Promise<void> | void, timeout?: number) => void;\ndeclare var expect: { getState(): { testPath?: string; currentTestName?: string } };\n/* eslint-enable no-var */\n\nimport { LLMock } from \"./llmock.js\";\nimport { FixtureLoadError, MisbehaviorConfigError } from \"./fixture-loader.js\";\nimport type { MockServerOptions } from \"./types.js\";\nimport {\n FakesPluginState,\n TEST_ID_SEPARATOR,\n fakesReportMode,\n fakesTarget,\n fetchFakesReport,\n type FakesForOptions,\n type FakesReportMode,\n type FakesTarget,\n} from \"./fakes-plugin.js\";\nimport { AimockTestIdCollisionError, type McpFakesReport } from \"./mcp-fakes-report.js\";\nimport { statSync } from \"node:fs\";\nimport { relative, resolve, sep } from \"node:path\";\n\nexport interface UseAimockOptions extends MockServerOptions {\n /** Path to fixture file or directory. Loaded automatically on start. */\n fixtures?: string;\n /** If true, sets process.env.OPENAI_BASE_URL to the mock URL + /v1. */\n patchEnv?: boolean;\n /**\n * The per-test MCP fake report, read in `afterEach` (RP7): `\"off\"` (the\n * default), `\"warn\"` (print a failing report) or `\"fail\"` (throw\n * `AimockFakesReportError`). Not supported with `test.concurrent`: the\n * report keeps one state per `useAimock`, so concurrent tests clear and read\n * each other's identities, and Jest cannot tell this plugin that a test is\n * concurrent. Keep `\"off\"` for a suite with concurrent tests.\n */\n fakesReport?: FakesReportMode;\n /**\n * The directory default test ids are relative to (TI2). Defaults to\n * `process.cwd()` when `useAimock` is called; Jest does not expose\n * `rootDir` to test code.\n */\n testIdRoot?: string;\n}\n\nexport interface AimockHandle {\n /** The LLMock instance. */\n readonly llm: LLMock;\n /** The server URL (e.g., http://127.0.0.1:4010). */\n readonly url: string;\n}\n\n/**\n * The handle `useAimock` returns: an `AimockHandle` plus the MCP fakes\n * helpers (RP7). A separate type, so that `AimockHandle` stays as it was and\n * code that builds its own `AimockHandle` keeps compiling.\n */\nexport interface AimockFakesHandle extends AimockHandle {\n /**\n * The MCP URL and headers for the fakes scoped to `testId` (RP7), and\n * registers that identity for this test's report. With no `testId`, the\n * default is `<test file relative to testIdRoot> › <currentTestName>` (TI2);\n * it is used only here and in `fakesReport`, never on LLM traffic (TI4).\n * Two tests with the same full name in one file share a default id (TI5):\n * pass an explicit `testId` for them. In `test.concurrent`, Jest can\n * report another test's name, so pass an explicit `testId` there too (with\n * `fakesReport: \"off\"`; the report is not supported in concurrent tests).\n */\n fakesFor(testId?: string, opts?: FakesForOptions): FakesTarget;\n /** The MCP fake report for `testId` (default as in `fakesFor`). */\n fakesReport(testId?: string, opts?: { context?: string }): Promise<McpFakesReport>;\n}\n\n/** TI2: `<testPath relative to root, with \"/\"> › <currentTestName>`. */\nfunction defaultJestId(root: string): string {\n const { testPath, currentTestName } = expect.getState();\n if (!testPath || currentTestName === undefined) {\n throw new AimockTestIdCollisionError(\n \"default test ids are not supported here (concurrent test or no running test); pass an explicit testId\",\n );\n }\n return relative(root, testPath).split(sep).join(\"/\") + TEST_ID_SEPARATOR + currentTestName;\n}\n\n/**\n * Start an aimock server for the duration of the test suite.\n *\n * - `beforeAll`: starts the server and optionally loads fixtures (LLM fixtures and\n * `mcpFakes` blocks; a bad `mcpFakes` block fails `beforeAll`)\n * - `beforeEach`: closes Live sessions and resets fixture match counts and MCP fake\n * consumption (not fixtures or fakes)\n * - `afterEach`: closes Live sessions owned by this helper's server, then checks\n * the MCP fake report under `fakesReport: \"warn\" | \"fail\"`\n * - `afterAll`: stops the server\n *\n * Returns a getter function — call it inside tests to access the handle.\n *\n * NOTE: Jest globals (beforeAll, afterAll, beforeEach, afterEach) must be available\n * in the test environment. This works with the default jest configuration.\n */\nexport function useAimock(options: UseAimockOptions = {}): () => AimockFakesHandle {\n let handle: AimockFakesHandle | null = null;\n let origOpenaiUrl: string | undefined;\n let origAnthropicUrl: string | undefined;\n const root = resolve(options.testIdRoot ?? process.cwd());\n let state = new FakesPluginState(\"off\");\n\n beforeAll(async () => {\n const { fixtures: fixturePath, patchEnv, fakesReport, testIdRoot, ...serverOpts } = options;\n void testIdRoot; // read above, when useAimock is called\n state = new FakesPluginState(fakesReportMode(fakesReport));\n const llm = new LLMock(serverOpts);\n\n if (fixturePath) {\n loadFixtures(llm, resolve(fixturePath));\n }\n\n const url = await llm.start();\n\n if (patchEnv !== false) {\n origOpenaiUrl = process.env.OPENAI_BASE_URL;\n origAnthropicUrl = process.env.ANTHROPIC_BASE_URL;\n process.env.OPENAI_BASE_URL = `${url}/v1`;\n process.env.ANTHROPIC_BASE_URL = `${url}/v1`;\n }\n\n handle = {\n llm,\n url,\n fakesFor(testId?: string, opts: FakesForOptions = {}): FakesTarget {\n const id = testId ?? defaultJestId(root); // TI4: an explicit id wins\n state.register(id, opts.context ?? null);\n return fakesTarget(url, id, opts);\n },\n fakesReport(testId?: string, opts: { context?: string } = {}): Promise<McpFakesReport> {\n return fetchFakesReport(url, testId ?? defaultJestId(root), opts.context ?? null);\n },\n };\n });\n\n beforeEach(() => {\n if (handle) {\n handle.llm.closeLiveSessions();\n handle.llm.resetMatchCounts();\n state.beforeEach(handle.llm);\n }\n });\n\n afterEach(async () => {\n handle?.llm.closeLiveSessions();\n if (handle) await state.afterEach(handle.llm, handle.url);\n });\n\n afterAll(async () => {\n if (handle) {\n if (options.patchEnv !== false) {\n if (origOpenaiUrl !== undefined) process.env.OPENAI_BASE_URL = origOpenaiUrl;\n else delete process.env.OPENAI_BASE_URL;\n if (origAnthropicUrl !== undefined) process.env.ANTHROPIC_BASE_URL = origAnthropicUrl;\n else delete process.env.ANTHROPIC_BASE_URL;\n }\n await handle.llm.stop();\n handle = null;\n }\n });\n\n return () => {\n if (!handle) {\n throw new Error(\"useAimock(): server not started — are you calling this inside a test?\");\n }\n return handle;\n };\n}\n\n/**\n * Load a fixture file or directory into `llm`: its LLM fixtures and its\n * `mcpFakes` blocks, which the LLMock buffers and auto-mounts at start (F12).\n * A `FixtureLoadError` (a bad `mcpFakes` block) or a `MisbehaviorConfigError`\n * (a bad fixture `misbehavior` key, thrown only with `enableMisbehavior: true`)\n * propagates and fails `beforeAll`; any other load failure is only warned\n * about, as before.\n */\nfunction loadFixtures(llm: LLMock, fixturePath: string): void {\n try {\n const stat = statSync(fixturePath);\n if (stat.isDirectory()) {\n llm.loadFixtureDir(fixturePath);\n } else {\n llm.loadFixtureFile(fixturePath);\n }\n } catch (err) {\n if (err instanceof FixtureLoadError || err instanceof MisbehaviorConfigError) throw err;\n console.warn(\n `[aimock] Failed to load fixtures from ${fixturePath}: ${err instanceof Error ? err.message : String(err)}`,\n );\n }\n}\n\nexport { LLMock } from \"./llmock.js\";\nexport type { MockServerOptions, Fixture } from \"./types.js\";\nexport type { FakesForOptions, FakesReportMode, FakesTarget } from \"./fakes-plugin.js\";\nexport type { McpFakesReport } from \"./mcp-fakes-report.js\";\n"],"mappings":";;;;;;;;;;;AA0FA,SAAS,cAAc,MAAsB;CAC3C,MAAM,EAAE,UAAU,oBAAoB,OAAO,UAAU;AACvD,KAAI,CAAC,YAAY,oBAAoB,OACnC,OAAM,IAAIA,oDACR,wGACD;AAEH,gCAAgB,MAAM,SAAS,CAAC,MAAMC,cAAI,CAAC,KAAK,IAAI,GAAGC,yCAAoB;;;;;;;;;;;;;;;;;;AAmB7E,SAAgB,UAAU,UAA4B,EAAE,EAA2B;CACjF,IAAI,SAAmC;CACvC,IAAI;CACJ,IAAI;CACJ,MAAM,8BAAe,QAAQ,cAAc,QAAQ,KAAK,CAAC;CACzD,IAAI,QAAQ,IAAIC,sCAAiB,MAAM;AAEvC,WAAU,YAAY;EACpB,MAAM,EAAE,UAAU,aAAa,UAAU,aAAa,YAAY,GAAG,eAAe;AAEpF,UAAQ,IAAIA,sCAAiBC,qCAAgB,YAAY,CAAC;EAC1D,MAAM,MAAM,IAAIC,sBAAO,WAAW;AAElC,MAAI,YACF,cAAa,4BAAa,YAAY,CAAC;EAGzC,MAAM,MAAM,MAAM,IAAI,OAAO;AAE7B,MAAI,aAAa,OAAO;AACtB,mBAAgB,QAAQ,IAAI;AAC5B,sBAAmB,QAAQ,IAAI;AAC/B,WAAQ,IAAI,kBAAkB,GAAG,IAAI;AACrC,WAAQ,IAAI,qBAAqB,GAAG,IAAI;;AAG1C,WAAS;GACP;GACA;GACA,SAAS,QAAiB,OAAwB,EAAE,EAAe;IACjE,MAAM,KAAK,UAAU,cAAc,KAAK;AACxC,UAAM,SAAS,IAAI,KAAK,WAAW,KAAK;AACxC,WAAOC,iCAAY,KAAK,IAAI,KAAK;;GAEnC,YAAY,QAAiB,OAA6B,EAAE,EAA2B;AACrF,WAAOC,sCAAiB,KAAK,UAAU,cAAc,KAAK,EAAE,KAAK,WAAW,KAAK;;GAEpF;GACD;AAEF,kBAAiB;AACf,MAAI,QAAQ;AACV,UAAO,IAAI,mBAAmB;AAC9B,UAAO,IAAI,kBAAkB;AAC7B,SAAM,WAAW,OAAO,IAAI;;GAE9B;AAEF,WAAU,YAAY;AACpB,UAAQ,IAAI,mBAAmB;AAC/B,MAAI,OAAQ,OAAM,MAAM,UAAU,OAAO,KAAK,OAAO,IAAI;GACzD;AAEF,UAAS,YAAY;AACnB,MAAI,QAAQ;AACV,OAAI,QAAQ,aAAa,OAAO;AAC9B,QAAI,kBAAkB,OAAW,SAAQ,IAAI,kBAAkB;QAC1D,QAAO,QAAQ,IAAI;AACxB,QAAI,qBAAqB,OAAW,SAAQ,IAAI,qBAAqB;QAChE,QAAO,QAAQ,IAAI;;AAE1B,SAAM,OAAO,IAAI,MAAM;AACvB,YAAS;;GAEX;AAEF,cAAa;AACX,MAAI,CAAC,OACH,OAAM,IAAI,MAAM,wEAAwE;AAE1F,SAAO;;;;;;;;;;;AAYX,SAAS,aAAa,KAAa,aAA2B;AAC5D,KAAI;AAEF,4BADsB,YAAY,CACzB,aAAa,CACpB,KAAI,eAAe,YAAY;MAE/B,KAAI,gBAAgB,YAAY;UAE3B,KAAK;AACZ,MAAI,eAAeC,2CAAoB,eAAeC,8CAAwB,OAAM;AACpF,UAAQ,KACN,yCAAyC,YAAY,IAAI,eAAe,QAAQ,IAAI,UAAU,OAAO,IAAI,GAC1G"}
package/dist/jest.d.cts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { Fixture, MockServerOptions } from "./types.cjs";
2
2
  import { LLMock } from "./llmock.cjs";
3
+ import { McpFakesReport } from "./mcp-fakes-report.cjs";
4
+ import { FakesForOptions, FakesReportMode, FakesTarget } from "./fakes-plugin.cjs";
3
5
 
4
6
  //#region src/jest.d.ts
5
7
 
@@ -8,6 +10,21 @@ interface UseAimockOptions extends MockServerOptions {
8
10
  fixtures?: string;
9
11
  /** If true, sets process.env.OPENAI_BASE_URL to the mock URL + /v1. */
10
12
  patchEnv?: boolean;
13
+ /**
14
+ * The per-test MCP fake report, read in `afterEach` (RP7): `"off"` (the
15
+ * default), `"warn"` (print a failing report) or `"fail"` (throw
16
+ * `AimockFakesReportError`). Not supported with `test.concurrent`: the
17
+ * report keeps one state per `useAimock`, so concurrent tests clear and read
18
+ * each other's identities, and Jest cannot tell this plugin that a test is
19
+ * concurrent. Keep `"off"` for a suite with concurrent tests.
20
+ */
21
+ fakesReport?: FakesReportMode;
22
+ /**
23
+ * The directory default test ids are relative to (TI2). Defaults to
24
+ * `process.cwd()` when `useAimock` is called; Jest does not expose
25
+ * `rootDir` to test code.
26
+ */
27
+ testIdRoot?: string;
11
28
  }
12
29
  interface AimockHandle {
13
30
  /** The LLMock instance. */
@@ -15,6 +32,28 @@ interface AimockHandle {
15
32
  /** The server URL (e.g., http://127.0.0.1:4010). */
16
33
  readonly url: string;
17
34
  }
35
+ /**
36
+ * The handle `useAimock` returns: an `AimockHandle` plus the MCP fakes
37
+ * helpers (RP7). A separate type, so that `AimockHandle` stays as it was and
38
+ * code that builds its own `AimockHandle` keeps compiling.
39
+ */
40
+ interface AimockFakesHandle extends AimockHandle {
41
+ /**
42
+ * The MCP URL and headers for the fakes scoped to `testId` (RP7), and
43
+ * registers that identity for this test's report. With no `testId`, the
44
+ * default is `<test file relative to testIdRoot> › <currentTestName>` (TI2);
45
+ * it is used only here and in `fakesReport`, never on LLM traffic (TI4).
46
+ * Two tests with the same full name in one file share a default id (TI5):
47
+ * pass an explicit `testId` for them. In `test.concurrent`, Jest can
48
+ * report another test's name, so pass an explicit `testId` there too (with
49
+ * `fakesReport: "off"`; the report is not supported in concurrent tests).
50
+ */
51
+ fakesFor(testId?: string, opts?: FakesForOptions): FakesTarget;
52
+ /** The MCP fake report for `testId` (default as in `fakesFor`). */
53
+ fakesReport(testId?: string, opts?: {
54
+ context?: string;
55
+ }): Promise<McpFakesReport>;
56
+ }
18
57
  /**
19
58
  * Start an aimock server for the duration of the test suite.
20
59
  *
@@ -22,7 +61,8 @@ interface AimockHandle {
22
61
  * `mcpFakes` blocks; a bad `mcpFakes` block fails `beforeAll`)
23
62
  * - `beforeEach`: closes Live sessions and resets fixture match counts and MCP fake
24
63
  * consumption (not fixtures or fakes)
25
- * - `afterEach`: closes Live sessions owned by this helper's server
64
+ * - `afterEach`: closes Live sessions owned by this helper's server, then checks
65
+ * the MCP fake report under `fakesReport: "warn" | "fail"`
26
66
  * - `afterAll`: stops the server
27
67
  *
28
68
  * Returns a getter function — call it inside tests to access the handle.
@@ -30,7 +70,7 @@ interface AimockHandle {
30
70
  * NOTE: Jest globals (beforeAll, afterAll, beforeEach, afterEach) must be available
31
71
  * in the test environment. This works with the default jest configuration.
32
72
  */
33
- declare function useAimock(options?: UseAimockOptions): () => AimockHandle;
73
+ declare function useAimock(options?: UseAimockOptions): () => AimockFakesHandle;
34
74
  //#endregion
35
- export { AimockHandle, type Fixture, LLMock, type MockServerOptions, UseAimockOptions, useAimock };
75
+ export { AimockFakesHandle, AimockHandle, type FakesForOptions, type FakesReportMode, type FakesTarget, type Fixture, LLMock, type McpFakesReport, type MockServerOptions, UseAimockOptions, useAimock };
36
76
  //# sourceMappingURL=jest.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jest.d.cts","names":[],"sources":["../src/jest.ts"],"sourcesContent":[],"mappings":";;;;;UA2BiB,gBAAA,SAAyB;;;;;;UAOzB,YAAA;;gBAED;;;;;;;;;;;;;;;;;;;iBAoBA,SAAA,WAAmB,yBAA8B"}
1
+ {"version":3,"file":"jest.d.cts","names":[],"sources":["../src/jest.ts"],"sourcesContent":[],"mappings":";;;;;;;AAsFqE,UA/CpD,gBAAA,SAAyB,iBA+C2B,CAAA;;UAb1B,CAAA,EAAA,MAAA;EAAY;EA2CvC,QAAA,CAAA,EAAA,OAAS;EAAA;;;;;;;;gBAhET;;;;;;;;UASC,YAAA;;gBAED;;;;;;;;;UAUC,iBAAA,SAA0B;;;;;;;;;;;mCAWR,kBAAkB;;;;MAEQ,QAAQ;;;;;;;;;;;;;;;;;;iBA8BrD,SAAA,WAAmB,yBAA8B"}
package/dist/jest.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { Fixture, MockServerOptions } from "./types.js";
2
2
  import { LLMock } from "./llmock.js";
3
+ import { McpFakesReport } from "./mcp-fakes-report.js";
4
+ import { FakesForOptions, FakesReportMode, FakesTarget } from "./fakes-plugin.js";
3
5
 
4
6
  //#region src/jest.d.ts
5
7
 
@@ -8,6 +10,21 @@ interface UseAimockOptions extends MockServerOptions {
8
10
  fixtures?: string;
9
11
  /** If true, sets process.env.OPENAI_BASE_URL to the mock URL + /v1. */
10
12
  patchEnv?: boolean;
13
+ /**
14
+ * The per-test MCP fake report, read in `afterEach` (RP7): `"off"` (the
15
+ * default), `"warn"` (print a failing report) or `"fail"` (throw
16
+ * `AimockFakesReportError`). Not supported with `test.concurrent`: the
17
+ * report keeps one state per `useAimock`, so concurrent tests clear and read
18
+ * each other's identities, and Jest cannot tell this plugin that a test is
19
+ * concurrent. Keep `"off"` for a suite with concurrent tests.
20
+ */
21
+ fakesReport?: FakesReportMode;
22
+ /**
23
+ * The directory default test ids are relative to (TI2). Defaults to
24
+ * `process.cwd()` when `useAimock` is called; Jest does not expose
25
+ * `rootDir` to test code.
26
+ */
27
+ testIdRoot?: string;
11
28
  }
12
29
  interface AimockHandle {
13
30
  /** The LLMock instance. */
@@ -15,6 +32,28 @@ interface AimockHandle {
15
32
  /** The server URL (e.g., http://127.0.0.1:4010). */
16
33
  readonly url: string;
17
34
  }
35
+ /**
36
+ * The handle `useAimock` returns: an `AimockHandle` plus the MCP fakes
37
+ * helpers (RP7). A separate type, so that `AimockHandle` stays as it was and
38
+ * code that builds its own `AimockHandle` keeps compiling.
39
+ */
40
+ interface AimockFakesHandle extends AimockHandle {
41
+ /**
42
+ * The MCP URL and headers for the fakes scoped to `testId` (RP7), and
43
+ * registers that identity for this test's report. With no `testId`, the
44
+ * default is `<test file relative to testIdRoot> › <currentTestName>` (TI2);
45
+ * it is used only here and in `fakesReport`, never on LLM traffic (TI4).
46
+ * Two tests with the same full name in one file share a default id (TI5):
47
+ * pass an explicit `testId` for them. In `test.concurrent`, Jest can
48
+ * report another test's name, so pass an explicit `testId` there too (with
49
+ * `fakesReport: "off"`; the report is not supported in concurrent tests).
50
+ */
51
+ fakesFor(testId?: string, opts?: FakesForOptions): FakesTarget;
52
+ /** The MCP fake report for `testId` (default as in `fakesFor`). */
53
+ fakesReport(testId?: string, opts?: {
54
+ context?: string;
55
+ }): Promise<McpFakesReport>;
56
+ }
18
57
  /**
19
58
  * Start an aimock server for the duration of the test suite.
20
59
  *
@@ -22,7 +61,8 @@ interface AimockHandle {
22
61
  * `mcpFakes` blocks; a bad `mcpFakes` block fails `beforeAll`)
23
62
  * - `beforeEach`: closes Live sessions and resets fixture match counts and MCP fake
24
63
  * consumption (not fixtures or fakes)
25
- * - `afterEach`: closes Live sessions owned by this helper's server
64
+ * - `afterEach`: closes Live sessions owned by this helper's server, then checks
65
+ * the MCP fake report under `fakesReport: "warn" | "fail"`
26
66
  * - `afterAll`: stops the server
27
67
  *
28
68
  * Returns a getter function — call it inside tests to access the handle.
@@ -30,7 +70,7 @@ interface AimockHandle {
30
70
  * NOTE: Jest globals (beforeAll, afterAll, beforeEach, afterEach) must be available
31
71
  * in the test environment. This works with the default jest configuration.
32
72
  */
33
- declare function useAimock(options?: UseAimockOptions): () => AimockHandle;
73
+ declare function useAimock(options?: UseAimockOptions): () => AimockFakesHandle;
34
74
  //#endregion
35
- export { AimockHandle, type Fixture, LLMock, type MockServerOptions, UseAimockOptions, useAimock };
75
+ export { AimockFakesHandle, AimockHandle, type FakesForOptions, type FakesReportMode, type FakesTarget, type Fixture, LLMock, type McpFakesReport, type MockServerOptions, UseAimockOptions, useAimock };
36
76
  //# sourceMappingURL=jest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jest.d.ts","names":[],"sources":["../src/jest.ts"],"sourcesContent":[],"mappings":";;;;;UA2BiB,gBAAA,SAAyB;;;;;;UAOzB,YAAA;;gBAED;;;;;;;;;;;;;;;;;;;iBAoBA,SAAA,WAAmB,yBAA8B"}
1
+ {"version":3,"file":"jest.d.ts","names":[],"sources":["../src/jest.ts"],"sourcesContent":[],"mappings":";;;;;;;AAsFqE,UA/CpD,gBAAA,SAAyB,iBA+C2B,CAAA;;UAb1B,CAAA,EAAA,MAAA;EAAY;EA2CvC,QAAA,CAAA,EAAA,OAAS;EAAA;;;;;;;;gBAhET;;;;;;;;UASC,YAAA;;gBAED;;;;;;;;;UAUC,iBAAA,SAA0B;;;;;;;;;;;mCAWR,kBAAkB;;;;MAEQ,QAAQ;;;;;;;;;;;;;;;;;;iBA8BrD,SAAA,WAAmB,yBAA8B"}