@copilotkit/aimock 1.12.0 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +5 -5
  3. package/README.md +26 -3
  4. package/dist/_virtual/_rolldown/runtime.cjs +2 -0
  5. package/dist/_virtual/_rolldown/runtime.js +29 -0
  6. package/dist/a2a-types.d.cts.map +1 -1
  7. package/dist/a2a-types.d.ts.map +1 -1
  8. package/dist/aimock-cli.cjs +16 -0
  9. package/dist/aimock-cli.cjs.map +1 -1
  10. package/dist/aimock-cli.d.cts +2 -0
  11. package/dist/aimock-cli.d.cts.map +1 -1
  12. package/dist/aimock-cli.d.ts +2 -0
  13. package/dist/aimock-cli.d.ts.map +1 -1
  14. package/dist/aimock-cli.js +16 -0
  15. package/dist/aimock-cli.js.map +1 -1
  16. package/dist/cli.cjs +1 -1
  17. package/dist/cli.cjs.map +1 -1
  18. package/dist/cli.js +1 -1
  19. package/dist/cli.js.map +1 -1
  20. package/dist/convert-mockllm.cjs +232 -0
  21. package/dist/convert-mockllm.cjs.map +1 -0
  22. package/dist/convert-mockllm.js +230 -0
  23. package/dist/convert-mockllm.js.map +1 -0
  24. package/dist/convert-vidaimock.cjs +110 -0
  25. package/dist/convert-vidaimock.cjs.map +1 -0
  26. package/dist/convert-vidaimock.js +108 -0
  27. package/dist/convert-vidaimock.js.map +1 -0
  28. package/dist/convert.cjs +158 -0
  29. package/dist/convert.cjs.map +1 -0
  30. package/dist/convert.d.cts +16 -0
  31. package/dist/convert.d.cts.map +1 -0
  32. package/dist/convert.d.ts +16 -0
  33. package/dist/convert.d.ts.map +1 -0
  34. package/dist/convert.js +157 -0
  35. package/dist/convert.js.map +1 -0
  36. package/dist/fixture-loader.cjs +131 -29
  37. package/dist/fixture-loader.cjs.map +1 -1
  38. package/dist/fixture-loader.d.cts +9 -2
  39. package/dist/fixture-loader.d.cts.map +1 -1
  40. package/dist/fixture-loader.d.ts +9 -2
  41. package/dist/fixture-loader.d.ts.map +1 -1
  42. package/dist/fixture-loader.js +132 -31
  43. package/dist/fixture-loader.js.map +1 -1
  44. package/dist/gemini.cjs +76 -55
  45. package/dist/gemini.cjs.map +1 -1
  46. package/dist/gemini.d.cts.map +1 -1
  47. package/dist/gemini.d.ts.map +1 -1
  48. package/dist/gemini.js +77 -56
  49. package/dist/gemini.js.map +1 -1
  50. package/dist/helpers.cjs +142 -76
  51. package/dist/helpers.cjs.map +1 -1
  52. package/dist/helpers.d.cts +14 -4
  53. package/dist/helpers.d.cts.map +1 -1
  54. package/dist/helpers.d.ts +14 -4
  55. package/dist/helpers.d.ts.map +1 -1
  56. package/dist/helpers.js +142 -77
  57. package/dist/helpers.js.map +1 -1
  58. package/dist/index.cjs +10 -0
  59. package/dist/index.d.cts +4 -4
  60. package/dist/index.d.ts +4 -4
  61. package/dist/index.js +3 -3
  62. package/dist/jest.cjs +70 -0
  63. package/dist/jest.cjs.map +1 -0
  64. package/dist/jest.d.cts +33 -0
  65. package/dist/jest.d.cts.map +1 -0
  66. package/dist/jest.d.ts +33 -0
  67. package/dist/jest.d.ts.map +1 -0
  68. package/dist/jest.js +67 -0
  69. package/dist/jest.js.map +1 -0
  70. package/dist/llmock.cjs +1 -1
  71. package/dist/llmock.cjs.map +1 -1
  72. package/dist/llmock.d.cts +6 -6
  73. package/dist/llmock.d.cts.map +1 -1
  74. package/dist/llmock.d.ts +6 -6
  75. package/dist/llmock.d.ts.map +1 -1
  76. package/dist/llmock.js +2 -2
  77. package/dist/llmock.js.map +1 -1
  78. package/dist/messages.cjs +69 -63
  79. package/dist/messages.cjs.map +1 -1
  80. package/dist/messages.d.cts.map +1 -1
  81. package/dist/messages.d.ts.map +1 -1
  82. package/dist/messages.js +70 -64
  83. package/dist/messages.js.map +1 -1
  84. package/dist/node_modules/.pnpm/@vitest_pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.cjs +934 -0
  85. package/dist/node_modules/.pnpm/@vitest_pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.cjs.map +1 -0
  86. package/dist/node_modules/.pnpm/@vitest_pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.js +934 -0
  87. package/dist/node_modules/.pnpm/@vitest_pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.js.map +1 -0
  88. package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/chunk-hooks.cjs +1051 -0
  89. package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/chunk-hooks.cjs.map +1 -0
  90. package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/chunk-hooks.js +1042 -0
  91. package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/chunk-hooks.js.map +1 -0
  92. package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/index.cjs +1 -0
  93. package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/index.js +3 -0
  94. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.cjs +96 -0
  95. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.cjs.map +1 -0
  96. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +93 -0
  97. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js.map +1 -0
  98. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/helpers.cjs +49 -0
  99. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/helpers.cjs.map +1 -0
  100. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/helpers.js +43 -0
  101. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/helpers.js.map +1 -0
  102. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/index.cjs +456 -0
  103. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/index.cjs.map +1 -0
  104. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/index.js +456 -0
  105. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/index.js.map +1 -0
  106. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/source-map.cjs +170 -0
  107. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/source-map.cjs.map +1 -0
  108. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/source-map.js +169 -0
  109. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/source-map.js.map +1 -0
  110. package/dist/node_modules/.pnpm/js-tokens@9.0.1/node_modules/js-tokens/index.cjs +388 -0
  111. package/dist/node_modules/.pnpm/js-tokens@9.0.1/node_modules/js-tokens/index.cjs.map +1 -0
  112. package/dist/node_modules/.pnpm/js-tokens@9.0.1/node_modules/js-tokens/index.js +385 -0
  113. package/dist/node_modules/.pnpm/js-tokens@9.0.1/node_modules/js-tokens/index.js.map +1 -0
  114. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/arguments.cjs +12 -0
  115. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/arguments.cjs.map +1 -0
  116. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/arguments.js +12 -0
  117. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/arguments.js.map +1 -0
  118. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/array.cjs +17 -0
  119. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/array.cjs.map +1 -0
  120. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/array.js +17 -0
  121. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/array.js.map +1 -0
  122. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/bigint.cjs +12 -0
  123. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/bigint.cjs.map +1 -0
  124. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/bigint.js +12 -0
  125. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/bigint.js.map +1 -0
  126. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.cjs +16 -0
  127. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.cjs.map +1 -0
  128. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.js +16 -0
  129. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.js.map +1 -0
  130. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.cjs +14 -0
  131. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.cjs.map +1 -0
  132. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.js +14 -0
  133. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.js.map +1 -0
  134. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/error.cjs +35 -0
  135. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/error.cjs.map +1 -0
  136. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/error.js +35 -0
  137. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/error.js.map +1 -0
  138. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/function.cjs +13 -0
  139. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/function.cjs.map +1 -0
  140. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/function.js +13 -0
  141. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/function.js.map +1 -0
  142. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/helpers.cjs +128 -0
  143. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/helpers.cjs.map +1 -0
  144. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/helpers.js +123 -0
  145. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/helpers.js.map +1 -0
  146. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.cjs +41 -0
  147. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.cjs.map +1 -0
  148. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.js +40 -0
  149. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.js.map +1 -0
  150. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.cjs +100 -0
  151. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.cjs.map +1 -0
  152. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.js +100 -0
  153. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.js.map +1 -0
  154. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.cjs +26 -0
  155. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.cjs.map +1 -0
  156. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.js +26 -0
  157. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.js.map +1 -0
  158. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.cjs +15 -0
  159. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.cjs.map +1 -0
  160. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.js +15 -0
  161. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.js.map +1 -0
  162. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.cjs +22 -0
  163. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.cjs.map +1 -0
  164. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.js +22 -0
  165. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.js.map +1 -0
  166. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.cjs +7 -0
  167. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.cjs.map +1 -0
  168. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.js +6 -0
  169. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.js.map +1 -0
  170. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.cjs +13 -0
  171. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.cjs.map +1 -0
  172. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.js +13 -0
  173. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.js.map +1 -0
  174. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.cjs +19 -0
  175. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.cjs.map +1 -0
  176. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.js +19 -0
  177. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.js.map +1 -0
  178. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.cjs +26 -0
  179. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.cjs.map +1 -0
  180. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.js +26 -0
  181. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.js.map +1 -0
  182. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.cjs +10 -0
  183. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.cjs.map +1 -0
  184. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.js +9 -0
  185. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.js.map +1 -0
  186. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.cjs +31 -0
  187. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.cjs.map +1 -0
  188. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.js +31 -0
  189. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.js.map +1 -0
  190. package/dist/node_modules/.pnpm/strip-literal@3.1.0/node_modules/strip-literal/dist/index.cjs +52 -0
  191. package/dist/node_modules/.pnpm/strip-literal@3.1.0/node_modules/strip-literal/dist/index.cjs.map +1 -0
  192. package/dist/node_modules/.pnpm/strip-literal@3.1.0/node_modules/strip-literal/dist/index.js +52 -0
  193. package/dist/node_modules/.pnpm/strip-literal@3.1.0/node_modules/strip-literal/dist/index.js.map +1 -0
  194. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.cjs +83 -0
  195. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.cjs.map +1 -0
  196. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js +82 -0
  197. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js.map +1 -0
  198. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/node.cjs +10 -0
  199. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/node.cjs.map +1 -0
  200. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/node.js +10 -0
  201. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/node.js.map +1 -0
  202. package/dist/recorder.cjs +1 -1
  203. package/dist/recorder.cjs.map +1 -1
  204. package/dist/recorder.js +1 -1
  205. package/dist/recorder.js.map +1 -1
  206. package/dist/responses.cjs +66 -57
  207. package/dist/responses.cjs.map +1 -1
  208. package/dist/responses.d.cts +3 -3
  209. package/dist/responses.d.cts.map +1 -1
  210. package/dist/responses.d.ts +3 -3
  211. package/dist/responses.d.ts.map +1 -1
  212. package/dist/responses.js +67 -58
  213. package/dist/responses.js.map +1 -1
  214. package/dist/server.cjs +57 -30
  215. package/dist/server.cjs.map +1 -1
  216. package/dist/server.d.cts.map +1 -1
  217. package/dist/server.d.ts.map +1 -1
  218. package/dist/server.js +58 -31
  219. package/dist/server.js.map +1 -1
  220. package/dist/stream-collapse.cjs.map +1 -1
  221. package/dist/stream-collapse.d.cts.map +1 -1
  222. package/dist/stream-collapse.d.ts.map +1 -1
  223. package/dist/stream-collapse.js.map +1 -1
  224. package/dist/types.d.cts +64 -11
  225. package/dist/types.d.cts.map +1 -1
  226. package/dist/types.d.ts +64 -11
  227. package/dist/types.d.ts.map +1 -1
  228. package/dist/vitest.cjs +80 -0
  229. package/dist/vitest.cjs.map +1 -0
  230. package/dist/vitest.d.cts +30 -0
  231. package/dist/vitest.d.cts.map +1 -0
  232. package/dist/vitest.d.ts +30 -0
  233. package/dist/vitest.d.ts.map +1 -0
  234. package/dist/vitest.js +77 -0
  235. package/dist/vitest.js.map +1 -0
  236. package/fixtures/example-multi-turn.json +1 -1
  237. package/fixtures/example-tool-call.json +1 -1
  238. package/fixtures/examples/a2a/a2a-config.json +42 -0
  239. package/fixtures/examples/adk/gemini-agent.json +47 -0
  240. package/fixtures/examples/agui/agui-text-response.json +35 -0
  241. package/fixtures/examples/chaos/chaos-config.json +10 -0
  242. package/fixtures/examples/crewai/multi-agent-crew.json +16 -0
  243. package/fixtures/examples/full-suite.json +116 -0
  244. package/fixtures/examples/langchain/agent-loop.json +27 -0
  245. package/fixtures/examples/llamaindex/aimock-config.json +62 -0
  246. package/fixtures/examples/llamaindex/rag-pipeline.json +34 -0
  247. package/fixtures/examples/llm/embeddings.json +10 -0
  248. package/fixtures/examples/llm/error-injection.json +15 -0
  249. package/fixtures/examples/llm/sequential-responses.json +20 -0
  250. package/fixtures/examples/llm/streaming-physics.json +15 -0
  251. package/fixtures/examples/mastra/agent-workflow.json +32 -0
  252. package/fixtures/examples/mcp/mcp-config.json +26 -0
  253. package/fixtures/examples/pydanticai/structured-output.json +15 -0
  254. package/fixtures/examples/record-replay/record-config.json +11 -0
  255. package/fixtures/examples/vector/vector-config.json +34 -0
  256. package/package.json +60 -1
  257. package/skills/write-fixtures/SKILL.md +148 -22
@@ -0,0 +1,30 @@
1
+ import { Fixture, MockServerOptions } from "./types.js";
2
+ import { LLMock } from "./llmock.js";
3
+
4
+ //#region src/vitest.d.ts
5
+
6
+ interface UseAimockOptions extends MockServerOptions {
7
+ /** Path to fixture file or directory. Loaded automatically on start. */
8
+ fixtures?: string;
9
+ /** If true, sets process.env.OPENAI_BASE_URL to the mock URL + /v1. */
10
+ patchEnv?: boolean;
11
+ }
12
+ interface AimockHandle {
13
+ /** The LLMock instance. */
14
+ readonly llm: LLMock;
15
+ /** The server URL (e.g., http://127.0.0.1:4010). */
16
+ readonly url: string;
17
+ }
18
+ /**
19
+ * Start an aimock server for the duration of the test suite.
20
+ *
21
+ * - `beforeAll`: starts the server and optionally loads fixtures
22
+ * - `beforeEach`: resets fixture match counts (not fixtures themselves)
23
+ * - `afterAll`: stops the server
24
+ *
25
+ * Returns a getter function — call it inside tests to access the handle.
26
+ */
27
+ declare function useAimock(options?: UseAimockOptions): () => AimockHandle;
28
+ //#endregion
29
+ export { AimockHandle, type Fixture, LLMock, type MockServerOptions, UseAimockOptions, useAimock };
30
+ //# sourceMappingURL=vitest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vitest.d.ts","names":[],"sources":["../src/vitest.ts"],"sourcesContent":[],"mappings":";;;;;UAoBiB,gBAAA,SAAyB;;;;;;UAOzB,YAAA;;gBAED;;;;;;;;;;;;;iBAcA,SAAA,WAAmB,yBAA8B"}
package/dist/vitest.js ADDED
@@ -0,0 +1,77 @@
1
+ import { loadFixtureFile, loadFixturesFromDir } from "./fixture-loader.js";
2
+ import { LLMock } from "./llmock.js";
3
+ import { afterAll, beforeAll, beforeEach } from "./node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/chunk-hooks.js";
4
+ import { resolve } from "node:path";
5
+ import { statSync } from "node:fs";
6
+
7
+ //#region src/vitest.ts
8
+ /**
9
+ * Vitest integration for aimock.
10
+ *
11
+ * Usage:
12
+ * import { useAimock } from "@copilotkit/aimock/vitest";
13
+ *
14
+ * const mock = useAimock({ fixtures: "./fixtures" });
15
+ *
16
+ * it("responds", async () => {
17
+ * const res = await fetch(`${mock().url}/v1/chat/completions`, { ... });
18
+ * });
19
+ */
20
+ /**
21
+ * Start an aimock server for the duration of the test suite.
22
+ *
23
+ * - `beforeAll`: starts the server and optionally loads fixtures
24
+ * - `beforeEach`: resets fixture match counts (not fixtures themselves)
25
+ * - `afterAll`: stops the server
26
+ *
27
+ * Returns a getter function — call it inside tests to access the handle.
28
+ */
29
+ function useAimock(options = {}) {
30
+ let handle = null;
31
+ beforeAll(async () => {
32
+ const { fixtures: fixturePath, patchEnv, ...serverOpts } = options;
33
+ const llm = new LLMock(serverOpts);
34
+ if (fixturePath) {
35
+ const loadedFixtures = loadFixtures(resolve(fixturePath));
36
+ for (const f of loadedFixtures) llm.addFixture(f);
37
+ }
38
+ const url = await llm.start();
39
+ if (patchEnv !== false) {
40
+ process.env.OPENAI_BASE_URL = `${url}/v1`;
41
+ process.env.ANTHROPIC_BASE_URL = `${url}/v1`;
42
+ }
43
+ handle = {
44
+ llm,
45
+ url
46
+ };
47
+ });
48
+ beforeEach(() => {
49
+ if (handle) handle.llm.resetMatchCounts();
50
+ });
51
+ afterAll(async () => {
52
+ if (handle) {
53
+ if (options.patchEnv !== false) {
54
+ delete process.env.OPENAI_BASE_URL;
55
+ delete process.env.ANTHROPIC_BASE_URL;
56
+ }
57
+ await handle.llm.stop();
58
+ handle = null;
59
+ }
60
+ });
61
+ return () => {
62
+ if (!handle) throw new Error("useAimock(): server not started — are you calling this inside a test?");
63
+ return handle;
64
+ };
65
+ }
66
+ function loadFixtures(fixturePath) {
67
+ try {
68
+ if (statSync(fixturePath).isDirectory()) return loadFixturesFromDir(fixturePath);
69
+ return loadFixtureFile(fixturePath);
70
+ } catch {
71
+ return [];
72
+ }
73
+ }
74
+
75
+ //#endregion
76
+ export { LLMock, useAimock };
77
+ //# sourceMappingURL=vitest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vitest.js","names":[],"sources":["../src/vitest.ts"],"sourcesContent":["/**\n * Vitest integration for aimock.\n *\n * Usage:\n * import { useAimock } from \"@copilotkit/aimock/vitest\";\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\nimport { beforeAll, afterAll, beforeEach } from \"vitest\";\nimport { LLMock } from \"./llmock.js\";\nimport { loadFixtureFile, loadFixturesFromDir } from \"./fixture-loader.js\";\nimport type { Fixture, 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\n * - `beforeEach`: resets fixture match counts (not fixtures themselves)\n * - `afterAll`: stops the server\n *\n * Returns a getter function — call it inside tests to access the handle.\n */\nexport function useAimock(options: UseAimockOptions = {}): () => AimockHandle {\n let handle: AimockHandle | null = null;\n\n beforeAll(async () => {\n const { fixtures: fixturePath, patchEnv, ...serverOpts } = options;\n const llm = new LLMock(serverOpts);\n\n if (fixturePath) {\n const resolved = resolve(fixturePath);\n const loadedFixtures = loadFixtures(resolved);\n for (const f of loadedFixtures) {\n llm.addFixture(f);\n }\n }\n\n const url = await llm.start();\n\n if (patchEnv !== false) {\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.resetMatchCounts();\n }\n });\n\n afterAll(async () => {\n if (handle) {\n if (options.patchEnv !== false) {\n delete process.env.OPENAI_BASE_URL;\n 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\nfunction loadFixtures(fixturePath: string): Fixture[] {\n try {\n const stat = statSync(fixturePath);\n if (stat.isDirectory()) {\n return loadFixturesFromDir(fixturePath);\n }\n return loadFixtureFile(fixturePath);\n } catch {\n return [];\n }\n}\n\nexport { LLMock } from \"./llmock.js\";\nexport type { MockServerOptions, Fixture } from \"./types.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,SAAgB,UAAU,UAA4B,EAAE,EAAsB;CAC5E,IAAI,SAA8B;AAElC,WAAU,YAAY;EACpB,MAAM,EAAE,UAAU,aAAa,UAAU,GAAG,eAAe;EAC3D,MAAM,MAAM,IAAI,OAAO,WAAW;AAElC,MAAI,aAAa;GAEf,MAAM,iBAAiB,aADN,QAAQ,YAAY,CACQ;AAC7C,QAAK,MAAM,KAAK,eACd,KAAI,WAAW,EAAE;;EAIrB,MAAM,MAAM,MAAM,IAAI,OAAO;AAE7B,MAAI,aAAa,OAAO;AACtB,WAAQ,IAAI,kBAAkB,GAAG,IAAI;AACrC,WAAQ,IAAI,qBAAqB,GAAG,IAAI;;AAG1C,WAAS;GAAE;GAAK;GAAK;GACrB;AAEF,kBAAiB;AACf,MAAI,OACF,QAAO,IAAI,kBAAkB;GAE/B;AAEF,UAAS,YAAY;AACnB,MAAI,QAAQ;AACV,OAAI,QAAQ,aAAa,OAAO;AAC9B,WAAO,QAAQ,IAAI;AACnB,WAAO,QAAQ,IAAI;;AAErB,SAAM,OAAO,IAAI,MAAM;AACvB,YAAS;;GAEX;AAEF,cAAa;AACX,MAAI,CAAC,OACH,OAAM,IAAI,MAAM,wEAAwE;AAE1F,SAAO;;;AAIX,SAAS,aAAa,aAAgC;AACpD,KAAI;AAEF,MADa,SAAS,YAAY,CACzB,aAAa,CACpB,QAAO,oBAAoB,YAAY;AAEzC,SAAO,gBAAgB,YAAY;SAC7B;AACN,SAAO,EAAE"}
@@ -3,7 +3,7 @@
3
3
  {
4
4
  "match": { "userMessage": "change background to blue" },
5
5
  "response": {
6
- "toolCalls": [{ "name": "change_background", "arguments": "{\"background\":\"blue\"}" }]
6
+ "toolCalls": [{ "name": "change_background", "arguments": { "background": "blue" } }]
7
7
  }
8
8
  },
9
9
  {
@@ -6,7 +6,7 @@
6
6
  "toolCalls": [
7
7
  {
8
8
  "name": "get_weather",
9
- "arguments": "{\"location\":\"San Francisco\",\"unit\":\"fahrenheit\"}"
9
+ "arguments": { "location": "San Francisco", "unit": "fahrenheit" }
10
10
  }
11
11
  ]
12
12
  }
@@ -0,0 +1,42 @@
1
+ {
2
+ "a2a": {
3
+ "agents": [
4
+ {
5
+ "name": "research-agent",
6
+ "description": "An agent that researches topics and returns summaries",
7
+ "version": "1.0.0",
8
+ "skills": [
9
+ {
10
+ "id": "web-research",
11
+ "name": "Web Research",
12
+ "description": "Search the web and summarize findings",
13
+ "tags": ["research", "search"]
14
+ }
15
+ ],
16
+ "capabilities": { "streaming": true },
17
+ "messages": [
18
+ {
19
+ "pattern": "research",
20
+ "parts": [{ "text": "Here is a summary of my research findings on the topic." }]
21
+ }
22
+ ],
23
+ "streamingTasks": [
24
+ {
25
+ "pattern": "deep-research",
26
+ "events": [
27
+ { "type": "status", "state": "TASK_STATE_WORKING" },
28
+ {
29
+ "type": "artifact",
30
+ "name": "research-report",
31
+ "parts": [{ "text": "## Research Report\n\nFindings from deep research..." }],
32
+ "lastChunk": true
33
+ },
34
+ { "type": "status", "state": "TASK_STATE_COMPLETED" }
35
+ ],
36
+ "delayMs": 100
37
+ }
38
+ ]
39
+ }
40
+ ]
41
+ }
42
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "fixtures": [
3
+ {
4
+ "match": { "userMessage": "weather" },
5
+ "response": {
6
+ "toolCalls": [
7
+ {
8
+ "name": "get_weather",
9
+ "arguments": { "city": "San Francisco", "unit": "fahrenheit" }
10
+ }
11
+ ]
12
+ }
13
+ },
14
+ {
15
+ "match": { "userMessage": "hello" },
16
+ "response": {
17
+ "content": "Hello! I'm an ADK agent running on aimock. How can I help you today?"
18
+ }
19
+ },
20
+ {
21
+ "match": { "userMessage": "search" },
22
+ "response": {
23
+ "toolCalls": [
24
+ {
25
+ "name": "google_search",
26
+ "arguments": { "query": "latest AI news" }
27
+ }
28
+ ]
29
+ }
30
+ },
31
+ {
32
+ "match": { "userMessage": "multi-tool" },
33
+ "response": {
34
+ "toolCalls": [
35
+ {
36
+ "name": "get_weather",
37
+ "arguments": { "city": "New York", "unit": "celsius" }
38
+ },
39
+ {
40
+ "name": "get_time",
41
+ "arguments": { "timezone": "America/New_York" }
42
+ }
43
+ ]
44
+ }
45
+ }
46
+ ]
47
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "agui": {
3
+ "fixtures": [
4
+ {
5
+ "match": { "message": "hello" },
6
+ "text": "Hi! How can I help you today?"
7
+ },
8
+ {
9
+ "match": { "message": "search" },
10
+ "events": [
11
+ { "type": "RUN_STARTED", "threadId": "t1", "runId": "r1" },
12
+ { "type": "TOOL_CALL_START", "toolCallId": "tc1", "toolCallName": "web_search" },
13
+ {
14
+ "type": "TOOL_CALL_ARGS",
15
+ "toolCallId": "tc1",
16
+ "delta": "{\"query\": \"latest news\"}"
17
+ },
18
+ { "type": "TOOL_CALL_END", "toolCallId": "tc1" },
19
+ {
20
+ "type": "TEXT_MESSAGE_START",
21
+ "messageId": "m1",
22
+ "role": "assistant"
23
+ },
24
+ {
25
+ "type": "TEXT_MESSAGE_CONTENT",
26
+ "messageId": "m1",
27
+ "delta": "Here are the latest results..."
28
+ },
29
+ { "type": "TEXT_MESSAGE_END", "messageId": "m1" },
30
+ { "type": "RUN_FINISHED", "threadId": "t1", "runId": "r1" }
31
+ ]
32
+ }
33
+ ]
34
+ }
35
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "llm": {
3
+ "fixtures": "fixtures/example-greeting.json",
4
+ "chaos": {
5
+ "dropRate": 0.1,
6
+ "malformedRate": 0.05,
7
+ "disconnectRate": 0.02
8
+ }
9
+ }
10
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "fixtures": [
3
+ {
4
+ "match": { "userMessage": "research" },
5
+ "response": {
6
+ "content": "Based on my research, the key findings are:\n\n1. LLM testing with fixture-based mocks eliminates flaky tests caused by non-deterministic API responses.\n2. Proxy recording captures real interactions for replay in CI without API keys.\n3. Multi-agent frameworks like CrewAI benefit most because each agent multiplies the number of LLM calls per run."
7
+ }
8
+ },
9
+ {
10
+ "match": { "userMessage": "write" },
11
+ "response": {
12
+ "content": "# Testing LLMs in CI\n\nFixture-based mocking brings determinism to AI-powered applications. By replacing real API calls with recorded responses, teams ship faster with confidence.\n\n## Why It Matters\n\nEvery agent in a CrewAI crew makes independent LLM calls. Without mocking, a two-agent crew means two sources of non-determinism per run. With aimock, every call returns the exact same response every time."
13
+ }
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,116 @@
1
+ {
2
+ "port": 4000,
3
+ "host": "127.0.0.1",
4
+ "metrics": true,
5
+ "strict": true,
6
+
7
+ "llm": {
8
+ "fixtures": "fixtures/example-greeting.json",
9
+ "chaos": {
10
+ "dropRate": 0.01,
11
+ "malformedRate": 0.005,
12
+ "disconnectRate": 0.002
13
+ }
14
+ },
15
+
16
+ "mcp": {
17
+ "serverInfo": { "name": "full-suite-mcp", "version": "1.0.0" },
18
+ "tools": [
19
+ {
20
+ "name": "search",
21
+ "description": "Search the knowledge base",
22
+ "inputSchema": {
23
+ "type": "object",
24
+ "properties": {
25
+ "query": { "type": "string" },
26
+ "limit": { "type": "number" }
27
+ },
28
+ "required": ["query"]
29
+ },
30
+ "result": "Found 3 results for your query."
31
+ }
32
+ ],
33
+ "resources": [
34
+ {
35
+ "uri": "file:///config",
36
+ "name": "Configuration",
37
+ "mimeType": "application/json",
38
+ "text": "{\"version\": \"1.0\", \"environment\": \"test\"}"
39
+ }
40
+ ],
41
+ "prompts": [
42
+ {
43
+ "name": "summarize",
44
+ "description": "Summarize a document",
45
+ "arguments": [{ "name": "text", "description": "The text to summarize", "required": true }],
46
+ "result": {
47
+ "messages": [
48
+ {
49
+ "role": "assistant",
50
+ "content": { "type": "text", "text": "Here is a summary of the provided text." }
51
+ }
52
+ ]
53
+ }
54
+ }
55
+ ]
56
+ },
57
+
58
+ "a2a": {
59
+ "agents": [
60
+ {
61
+ "name": "assistant",
62
+ "description": "A general-purpose assistant agent",
63
+ "version": "1.0.0",
64
+ "skills": [{ "id": "qa", "name": "Q&A", "description": "Answer questions" }],
65
+ "capabilities": { "streaming": true },
66
+ "messages": [
67
+ {
68
+ "pattern": ".*",
69
+ "parts": [{ "text": "I can help you with that." }]
70
+ }
71
+ ]
72
+ }
73
+ ]
74
+ },
75
+
76
+ "agui": {
77
+ "fixtures": [
78
+ {
79
+ "match": { "message": "hello" },
80
+ "text": "Hello from the full-suite mock!"
81
+ },
82
+ {
83
+ "match": { "toolName": "get_data" },
84
+ "events": [
85
+ { "type": "RUN_STARTED", "threadId": "t1", "runId": "r1" },
86
+ { "type": "TOOL_CALL_START", "toolCallId": "tc1", "toolCallName": "get_data" },
87
+ { "type": "TOOL_CALL_ARGS", "toolCallId": "tc1", "delta": "{}" },
88
+ { "type": "TOOL_CALL_END", "toolCallId": "tc1" },
89
+ { "type": "RUN_FINISHED", "threadId": "t1", "runId": "r1" }
90
+ ]
91
+ }
92
+ ]
93
+ },
94
+
95
+ "vector": {
96
+ "collections": [
97
+ {
98
+ "name": "knowledge-base",
99
+ "dimension": 384,
100
+ "queryResults": [
101
+ {
102
+ "id": "kb-001",
103
+ "score": 0.97,
104
+ "metadata": { "source": "docs", "title": "Quick Start Guide" }
105
+ }
106
+ ]
107
+ }
108
+ ]
109
+ },
110
+
111
+ "services": {
112
+ "search": true,
113
+ "rerank": true,
114
+ "moderate": true
115
+ }
116
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "fixtures": [
3
+ {
4
+ "match": { "userMessage": "plan a trip", "sequenceIndex": 0 },
5
+ "response": {
6
+ "content": "I'll help plan your trip. Let me look up some options."
7
+ }
8
+ },
9
+ {
10
+ "match": { "userMessage": "plan a trip", "sequenceIndex": 1 },
11
+ "response": {
12
+ "toolCalls": [
13
+ {
14
+ "name": "search_flights",
15
+ "arguments": { "origin": "SFO", "dest": "NRT" }
16
+ }
17
+ ]
18
+ }
19
+ },
20
+ {
21
+ "match": { "userMessage": "plan a trip", "sequenceIndex": 2 },
22
+ "response": {
23
+ "content": "I found 3 flights from SFO to Tokyo Narita. The best option is..."
24
+ }
25
+ }
26
+ ]
27
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "llm": {
3
+ "fixtures": "./rag-pipeline.json"
4
+ },
5
+ "vector": {
6
+ "collections": [
7
+ {
8
+ "name": "knowledge-base",
9
+ "dimension": 3,
10
+ "vectors": [
11
+ {
12
+ "id": "doc-gravity",
13
+ "values": [0.9, 0.1, 0.05],
14
+ "metadata": {
15
+ "source": "physics.pdf",
16
+ "page": 12,
17
+ "text": "Gravity is a fundamental force of nature that attracts objects with mass toward one another."
18
+ }
19
+ },
20
+ {
21
+ "id": "doc-orbits",
22
+ "values": [0.75, 0.3, 0.15],
23
+ "metadata": {
24
+ "source": "physics.pdf",
25
+ "page": 45,
26
+ "text": "Orbital mechanics describes the motion of planets and satellites under gravitational influence."
27
+ }
28
+ },
29
+ {
30
+ "id": "doc-tides",
31
+ "values": [0.6, 0.5, 0.2],
32
+ "metadata": {
33
+ "source": "physics.pdf",
34
+ "page": 78,
35
+ "text": "Tidal forces result from the differential gravitational pull of the Moon and Sun on Earth's oceans."
36
+ }
37
+ }
38
+ ],
39
+ "queryResults": [
40
+ {
41
+ "id": "doc-gravity",
42
+ "score": 0.97,
43
+ "metadata": {
44
+ "source": "physics.pdf",
45
+ "page": 12,
46
+ "text": "Gravity is a fundamental force of nature that attracts objects with mass toward one another."
47
+ }
48
+ },
49
+ {
50
+ "id": "doc-orbits",
51
+ "score": 0.82,
52
+ "metadata": {
53
+ "source": "physics.pdf",
54
+ "page": 45,
55
+ "text": "Orbital mechanics describes the motion of planets and satellites under gravitational influence."
56
+ }
57
+ }
58
+ ]
59
+ }
60
+ ]
61
+ }
62
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "fixtures": [
3
+ {
4
+ "match": { "userMessage": "What is gravity?" },
5
+ "response": {
6
+ "content": "Based on the retrieved documents, gravity is a fundamental force of nature that attracts objects with mass toward one another. It is described by Newton's law of universal gravitation and Einstein's general theory of relativity."
7
+ }
8
+ },
9
+ {
10
+ "match": { "userMessage": "Summarize the document" },
11
+ "response": {
12
+ "content": "The document covers three main topics: gravitational force, orbital mechanics, and tidal effects. It explains how gravity governs planetary motion and influences ocean tides on Earth."
13
+ }
14
+ },
15
+ {
16
+ "match": { "inputText": "What is gravity?", "endpoint": "embedding" },
17
+ "response": {
18
+ "embedding": [0.9, 0.1, 0.05]
19
+ }
20
+ },
21
+ {
22
+ "match": { "inputText": "Gravity is a fundamental force", "endpoint": "embedding" },
23
+ "response": {
24
+ "embedding": [0.88, 0.12, 0.07]
25
+ }
26
+ },
27
+ {
28
+ "match": { "inputText": "orbital mechanics and planetary motion", "endpoint": "embedding" },
29
+ "response": {
30
+ "embedding": [0.75, 0.3, 0.15]
31
+ }
32
+ }
33
+ ]
34
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "fixtures": [
3
+ {
4
+ "match": { "inputText": "hello world" },
5
+ "response": {
6
+ "embedding": [0.0023064255, -0.009327292, 0.015797347]
7
+ }
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "fixtures": [
3
+ {
4
+ "match": { "userMessage": ".*" },
5
+ "response": {
6
+ "error": {
7
+ "message": "Rate limit exceeded. Please retry after 30 seconds.",
8
+ "type": "rate_limit_error",
9
+ "code": "rate_limit_exceeded"
10
+ },
11
+ "status": 429
12
+ }
13
+ }
14
+ ]
15
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "fixtures": [
3
+ {
4
+ "match": { "userMessage": "tell me a joke", "sequenceIndex": 0 },
5
+ "response": {
6
+ "content": "Why did the programmer quit his job? Because he didn't get arrays!"
7
+ }
8
+ },
9
+ {
10
+ "match": { "userMessage": "tell me a joke", "sequenceIndex": 1 },
11
+ "response": { "content": "Why do Java developers wear glasses? Because they can't C#!" }
12
+ },
13
+ {
14
+ "match": { "userMessage": "tell me a joke", "sequenceIndex": 2 },
15
+ "response": {
16
+ "content": "A SQL query walks into a bar, sees two tables, and asks: 'Can I join you?'"
17
+ }
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "fixtures": [
3
+ {
4
+ "match": { "userMessage": "explain gravity" },
5
+ "response": {
6
+ "content": "Gravity is a fundamental force of nature that attracts objects with mass toward one another. It keeps planets in orbit around the sun and holds galaxies together."
7
+ },
8
+ "streamingProfile": {
9
+ "ttft": 200,
10
+ "tps": 40,
11
+ "jitter": 0.1
12
+ }
13
+ }
14
+ ]
15
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "fixtures": [
3
+ {
4
+ "match": { "userMessage": "plan a trip", "sequenceIndex": 0 },
5
+ "response": {
6
+ "toolCalls": [
7
+ {
8
+ "name": "search_flights",
9
+ "arguments": { "origin": "SFO", "destination": "NRT", "date": "2025-03-15" }
10
+ }
11
+ ]
12
+ }
13
+ },
14
+ {
15
+ "match": { "userMessage": "plan a trip", "sequenceIndex": 1 },
16
+ "response": {
17
+ "toolCalls": [
18
+ {
19
+ "name": "search_hotels",
20
+ "arguments": { "city": "Tokyo", "checkIn": "2025-03-15", "checkOut": "2025-03-22" }
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "match": { "userMessage": "plan a trip", "sequenceIndex": 2 },
27
+ "response": {
28
+ "content": "I found a great itinerary for your Tokyo trip!\n\n**Flight:** SFO → NRT on March 15, departing 11:30 AM (United UA837) — $890 round trip\n\n**Hotel:** Hotel Gracery Shinjuku, March 15–22 — $185/night\n\nWould you like me to book these, or would you prefer different options?"
29
+ }
30
+ }
31
+ ]
32
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "mcp": {
3
+ "tools": [
4
+ {
5
+ "name": "search",
6
+ "description": "Search the web",
7
+ "inputSchema": {
8
+ "type": "object",
9
+ "properties": {
10
+ "query": { "type": "string" }
11
+ },
12
+ "required": ["query"]
13
+ },
14
+ "result": "No results found for the given query."
15
+ }
16
+ ],
17
+ "resources": [
18
+ {
19
+ "uri": "file:///readme",
20
+ "name": "README",
21
+ "mimeType": "text/plain",
22
+ "text": "# My Project\n\nThis is the project README."
23
+ }
24
+ ]
25
+ }
26
+ }