@copilotkit/aimock 1.14.5 → 1.14.7

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 (135) hide show
  1. package/CHANGELOG.md +384 -0
  2. package/README.md +35 -14
  3. package/dist/_virtual/_rolldown/runtime.cjs +0 -2
  4. package/dist/cli.cjs +68 -24
  5. package/dist/cli.cjs.map +1 -1
  6. package/dist/cli.js +68 -24
  7. package/dist/cli.js.map +1 -1
  8. package/dist/config-loader.d.ts.map +1 -1
  9. package/dist/fixtures-remote.cjs +225 -0
  10. package/dist/fixtures-remote.cjs.map +1 -0
  11. package/dist/fixtures-remote.js +224 -0
  12. package/dist/fixtures-remote.js.map +1 -0
  13. package/dist/vitest.cjs +4 -4
  14. package/dist/vitest.cjs.map +1 -1
  15. package/dist/vitest.js +1 -1
  16. package/package.json +31 -12
  17. package/dist/_virtual/_rolldown/runtime.js +0 -29
  18. package/dist/node_modules/.pnpm/@vitest_pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.cjs +0 -934
  19. package/dist/node_modules/.pnpm/@vitest_pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.cjs.map +0 -1
  20. package/dist/node_modules/.pnpm/@vitest_pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.js +0 -934
  21. package/dist/node_modules/.pnpm/@vitest_pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.js.map +0 -1
  22. package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/chunk-hooks.cjs +0 -1051
  23. package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/chunk-hooks.cjs.map +0 -1
  24. package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/chunk-hooks.js +0 -1042
  25. package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/chunk-hooks.js.map +0 -1
  26. package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/index.cjs +0 -1
  27. package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/index.js +0 -3
  28. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.cjs +0 -96
  29. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.cjs.map +0 -1
  30. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +0 -93
  31. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js.map +0 -1
  32. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/helpers.cjs +0 -49
  33. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/helpers.cjs.map +0 -1
  34. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/helpers.js +0 -43
  35. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/helpers.js.map +0 -1
  36. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/index.cjs +0 -456
  37. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/index.cjs.map +0 -1
  38. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/index.js +0 -456
  39. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/index.js.map +0 -1
  40. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/source-map.cjs +0 -170
  41. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/source-map.cjs.map +0 -1
  42. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/source-map.js +0 -169
  43. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/source-map.js.map +0 -1
  44. package/dist/node_modules/.pnpm/js-tokens@9.0.1/node_modules/js-tokens/index.cjs +0 -388
  45. package/dist/node_modules/.pnpm/js-tokens@9.0.1/node_modules/js-tokens/index.cjs.map +0 -1
  46. package/dist/node_modules/.pnpm/js-tokens@9.0.1/node_modules/js-tokens/index.js +0 -385
  47. package/dist/node_modules/.pnpm/js-tokens@9.0.1/node_modules/js-tokens/index.js.map +0 -1
  48. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/arguments.cjs +0 -12
  49. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/arguments.cjs.map +0 -1
  50. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/arguments.js +0 -12
  51. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/arguments.js.map +0 -1
  52. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/array.cjs +0 -17
  53. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/array.cjs.map +0 -1
  54. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/array.js +0 -17
  55. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/array.js.map +0 -1
  56. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/bigint.cjs +0 -12
  57. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/bigint.cjs.map +0 -1
  58. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/bigint.js +0 -12
  59. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/bigint.js.map +0 -1
  60. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.cjs +0 -16
  61. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.cjs.map +0 -1
  62. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.js +0 -16
  63. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.js.map +0 -1
  64. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.cjs +0 -14
  65. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.cjs.map +0 -1
  66. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.js +0 -14
  67. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.js.map +0 -1
  68. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/error.cjs +0 -35
  69. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/error.cjs.map +0 -1
  70. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/error.js +0 -35
  71. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/error.js.map +0 -1
  72. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/function.cjs +0 -13
  73. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/function.cjs.map +0 -1
  74. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/function.js +0 -13
  75. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/function.js.map +0 -1
  76. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/helpers.cjs +0 -128
  77. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/helpers.cjs.map +0 -1
  78. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/helpers.js +0 -123
  79. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/helpers.js.map +0 -1
  80. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.cjs +0 -41
  81. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.cjs.map +0 -1
  82. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.js +0 -40
  83. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.js.map +0 -1
  84. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.cjs +0 -100
  85. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.cjs.map +0 -1
  86. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.js +0 -100
  87. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.js.map +0 -1
  88. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.cjs +0 -26
  89. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.cjs.map +0 -1
  90. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.js +0 -26
  91. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.js.map +0 -1
  92. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.cjs +0 -15
  93. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.cjs.map +0 -1
  94. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.js +0 -15
  95. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.js.map +0 -1
  96. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.cjs +0 -22
  97. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.cjs.map +0 -1
  98. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.js +0 -22
  99. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.js.map +0 -1
  100. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.cjs +0 -7
  101. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.cjs.map +0 -1
  102. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.js +0 -6
  103. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.js.map +0 -1
  104. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.cjs +0 -13
  105. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.cjs.map +0 -1
  106. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.js +0 -13
  107. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.js.map +0 -1
  108. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.cjs +0 -19
  109. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.cjs.map +0 -1
  110. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.js +0 -19
  111. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.js.map +0 -1
  112. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.cjs +0 -26
  113. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.cjs.map +0 -1
  114. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.js +0 -26
  115. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.js.map +0 -1
  116. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.cjs +0 -10
  117. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.cjs.map +0 -1
  118. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.js +0 -9
  119. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.js.map +0 -1
  120. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.cjs +0 -31
  121. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.cjs.map +0 -1
  122. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.js +0 -31
  123. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.js.map +0 -1
  124. package/dist/node_modules/.pnpm/strip-literal@3.1.0/node_modules/strip-literal/dist/index.cjs +0 -52
  125. package/dist/node_modules/.pnpm/strip-literal@3.1.0/node_modules/strip-literal/dist/index.cjs.map +0 -1
  126. package/dist/node_modules/.pnpm/strip-literal@3.1.0/node_modules/strip-literal/dist/index.js +0 -52
  127. package/dist/node_modules/.pnpm/strip-literal@3.1.0/node_modules/strip-literal/dist/index.js.map +0 -1
  128. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.cjs +0 -83
  129. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.cjs.map +0 -1
  130. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js +0 -82
  131. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js.map +0 -1
  132. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/node.cjs +0 -10
  133. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/node.cjs.map +0 -1
  134. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/node.js +0 -10
  135. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/node.js.map +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,384 @@
1
+ # @copilotkit/aimock
2
+
3
+ ## 1.14.7
4
+
5
+ ### Added
6
+
7
+ - `--fixtures` now accepts `https://` and `http://` URLs to JSON fixture files in addition to filesystem paths. Fetches at boot, parses, and registers the remote fixture as if loaded from disk. On-disk cache at `~/.cache/aimock/fixtures/<sha256-of-url>/` (honoring `$XDG_CACHE_HOME`) provides resilience against transient upstream failures: with `--validate-on-load`, a fetch failure with a valid cached copy logs a warning and continues; without a cache, the process exits non-zero. HTTP fetch has a hard-coded 10s timeout and a 50 MB body size cap (enforced incrementally so a lying `Content-Length` cannot bypass it). Only `https://` and `http://` schemes are accepted — `file://`, `ftp://`, etc. are rejected with a clear error. The flag is now repeatable; multiple sources are loaded and concatenated. Tarball (`.tar.gz`) and zip URL support intentionally deferred to a future release.
8
+ - Private-address denylist for remote `--fixtures` URLs: fetches to loopback (`127.0.0.0/8`, `::1`), link-local (`169.254.0.0/16`, `fe80::/10`), RFC1918 (`10/8`, `172.16/12`, `192.168/16`), CGNAT (`100.64/10`), cloud-metadata (`169.254.169.254`), ULA (`fc00::/7`), multicast, and other reserved ranges are rejected with a clear fail-loud error. Hostnames are resolved and every returned address is checked. Set `AIMOCK_ALLOW_PRIVATE_URLS=1` to opt out (required for local dev / tests that target `127.0.0.1`).
9
+ - HTTP redirects are rejected (fail-loud) for remote `--fixtures` URLs to prevent scheme-bypass (a 3xx `Location:` pointing at `file://` or `javascript:` would otherwise sidestep the scheme gate and SSRF denylist). Configure the upstream to serve the final URL directly — GitHub raw content URLs already do this.
10
+
11
+ ## 1.14.6
12
+
13
+ ### Changed
14
+
15
+ - README DevX: Quick Start sets `OPENAI_BASE_URL` + `OPENAI_API_KEY` before SDK construction with an inline ordering warning; Docker one-liner uses absolute `$(pwd)/fixtures:/fixtures` path; `LLMock` class name asymmetry after the v1.7.0 package rename is explained inline; Multimedia and Protocol-Mock feature bullets now link to each individual feature page.
16
+ - Fixtures page: Vertex AI added to Provider Support Matrix; Ollama Reasoning marked as supported (was incorrectly "—" since v1.8.0); `finishReason` Responses-API mapping fully documented; `toolName` scope clarified; shadowing-warning format matches actual validator output; Azure-inherits-OpenAI override support footnoted.
17
+ - Record & Replay page: Docker examples use absolute `$(pwd)` paths; Rust `async-openai` example corrected to `Client::with_config(OpenAIConfig::new().with_api_base(...))` form; `enableRecording({ proxyOnly: true })` disambiguated; pseudocode annotated as simplified; `enableRecording` example includes `mock.stop()` cleanup; stale 2025 timestamp replaced with generic placeholder.
18
+ - Sidebar: TOC id-assignment now runs unconditionally (previously skipped on pages with fewer than 4 headings, silently breaking cross-page anchor links to short pages).
19
+ - Historical CHANGELOG: v1.14.1 Railway-specific language scrubbed; v1.14.2 `--journal-max=-1` rejection and `createServer()` default flip annotated with BREAKING / BEHAVIOR CHANGE markers; all 15 historical version entries standardized on Keep-a-Changelog categories (Added/Changed/Fixed/Removed) instead of mixed Changesets-style.
20
+ - package.json: `engines.node` raised to `>=24.0.0` to match OIDC publish requirement; `preinstall: only-allow pnpm` guard added; deprecated `@google/generative-ai` swapped for `@google/genai`; `files` includes `CHANGELOG.md`; `repository.url` canonicalized; `typesVersions` gains `.d.cts` entries; optional `peerDependencies` for `vitest`/`jest` added; `prepare: husky || true` tightened to `husky`; `release` script gains `pnpm test && pnpm lint` pre-check.
21
+
22
+ ### Removed
23
+
24
+ - Stray `package-lock.json` — repo is pnpm-only, now enforced via `preinstall`.
25
+
26
+ ## 1.14.5
27
+
28
+ ### Fixed
29
+
30
+ - Recorder no longer buffers SSE (`text/event-stream`) upstream responses before relaying to the client. `proxyAndRecord` accumulated all upstream chunks and replayed them via a single `res.end()`, collapsing multi-frame streams into one client-visible write and breaking progressive rendering for downstream consumers (notably showcase `--proxy-only` deployments). SSE responses now stream chunk-by-chunk to the client while still being tee'd into the recording buffer; non-SSE behavior is unchanged.
31
+
32
+ ## 1.14.4
33
+
34
+ ### Added
35
+
36
+ - Multi-turn conversations documentation page covering the tool-round idiom, matching semantics across turns, and how to author/record multi-turn fixtures.
37
+ - Matching Semantics section on the Fixtures page documenting last-message-only matching, first-wins file order, substring-vs-exact matching, and shadowing warnings.
38
+ - Recording guidance for multi-turn conversations on the Record & Replay page.
39
+ - CLI Flags table on the Record & Replay page expanded to cover `-f/--fixtures`, `--journal-max`, `--fixture-counts-max`, `--agui-*`, `--chaos-*`, `--watch`, `-p`, `-h`, `--log-level`, `--validate-on-load`.
40
+ - README note clarifying that the `llmock` CLI bin is a legacy alias pointing at a narrower flag-driven CLI without `--config` or `convert` support.
41
+
42
+ ### Fixed
43
+
44
+ - Docker examples in the Record & Replay guide no longer prefix `npx @copilotkit/aimock` before the image ENTRYPOINT (the four snippets would have failed with strict parseArgs rejecting positional args).
45
+ - Auth Header Forwarding documentation now reflects the strip-list behavior that has been in place since v1.6.1 (all headers forwarded except hop-by-hop and client-set).
46
+ - `requestTransform` example fixture key no longer carries an undocumented load-bearing trailing space.
47
+ - Completed the Claude model-id migration (v1.14.3) for the remaining test fixtures that still referenced `claude-sonnet-4-20250514`.
48
+ - README LLM Providers count and migration-page comparisons restored to the "11+" form with accurate enumeration (OpenAI Chat / Responses / Realtime, Claude, Gemini REST / Live WS, Azure, Bedrock, Vertex AI, Ollama, Cohere). The earlier "8" collapse was incorrect: competitors count endpoint/protocol variants separately, and "8" undersold aimock's actual coverage. Provider Support Matrix on the Fixtures page gains a dedicated Vertex AI column.
49
+ - Corrected `toolCallId` matching semantics on the Fixtures page to describe the "last `role: "tool"` message" rule from `router.ts` (not "last message being a tool").
50
+ - Added `-h 0.0.0.0` to every Docker example in the README and Record & Replay page so the default `127.0.0.1` host bind doesn't silently break `-p` port mapping when user args override the image CMD.
51
+ - Extended the Docker host-bind fix across all migration guides, tutorials, and the Docker/aimock-cli/metrics/chaos-testing pages — every Docker example that passes user args now includes `-h 0.0.0.0` so `docker -p` port mapping works.
52
+ - Updated `--journal-max` default wording on the Record & Replay page to reflect post-v1.14.2 behavior (finite `1000` cap for both `serve` and `createServer()`; only direct `new Journal()` instantiation remains unbounded).
53
+ - Stripped redundant `npx @copilotkit/aimock` / `aimock` prefixes from Docker examples in migration pages (mokksy, vidaimock, mock-llm, piyook, openai-responses); all were silently broken under strict parseArgs because the prefix became a positional arg to the image's `node dist/cli.js` entrypoint.
54
+ - Replaced `--config` Docker examples across `docs/aimock-cli`, `docs/metrics`, `docs/chaos-testing`, and migration guides with flag-driven Docker equivalents or explicit npx/local-install notes (the published image's ENTRYPOINT runs the `llmock` CLI which does not support `--config`).
55
+ - Synchronized LLM provider counts across all migration pages to the "11+" form with accurate variant-level enumeration, restoring competitor-equivalent counting (e.g. VidaiMock "11+", Mokksy "11 vs 5").
56
+ - Corrected the `sequenceIndex` gotcha on `/multi-turn` — `validateFixtures` does not factor `sequenceIndex`, `toolCallId`, `model`, or `predicate` into the duplicate-`userMessage` warning; the warning is advisory when a runtime differentiator is present.
57
+ - Fixed the Programmatic Recording example on `/record-replay` to stop contradicting itself by pairing `proxyOnly: true` with `fixturePath`; now shows record mode and proxy-only mode as two distinct examples.
58
+ - Reconciled provider-count phrasing across migration pages — mock-llm lead paragraph no longer says "9 more providers", enumerated lists no longer trail the count with "and OpenAI-compatible providers" / "and more". Aligned the `validateFixtures` shadowing wording between the Fixtures and Multi-Turn pages (both now correctly describe the warning as advisory when a runtime differentiator is present).
59
+ - Replaced broken `class="cmt"` CSS class with correct `class="cm"` across `docs/cohere`, `docs/test-plugins`, `docs/vertex-ai`, `docs/ollama`, `docs/record-replay`, and `docs/chaos-testing` code blocks (21 occurrences) — `.cmt` is not defined in `docs/style.css`, so these code-block comments were rendering as default text instead of the dimmed comment color.
60
+
61
+ ## 1.14.3
62
+
63
+ ### Added
64
+
65
+ - Microsoft Agent Framework (MAF) integration guide with Python and .NET examples.
66
+ - Generic `.code-tabs` language switcher with cross-section sync and localStorage persistence.
67
+
68
+ ### Changed
69
+
70
+ - Updated Claude model references from `claude-sonnet-4-20250514` (retiring 2026-06-15) to `claude-sonnet-4-6`.
71
+
72
+ ## 1.14.2
73
+
74
+ > **BREAKING** — CLI flag parsing: `--journal-max=-1` (and `--fixture-counts-max=-1`) no longer silently maps to "unbounded"; it is now rejected with a clear error. Migration: drop the flag entirely, or pass `--journal-max=0` / `--fixture-counts-max=0` if you intended unbounded retention.
75
+ >
76
+ > **⚠ BEHAVIOR CHANGE (should have been MINOR per SemVer)** — `createServer()` programmatic defaults for `journalMaxEntries` and `fixtureCountsMaxTestIds` flipped from unbounded to finite caps (1000 / 500). Auto-update consumers on long-running embedders: review your retention assumptions and opt in to unbounded explicitly by passing `0` if that was the prior relied-upon behavior. Released as a PATCH; in retrospect this warranted a MINOR bump.
77
+
78
+ ### Fixed
79
+
80
+ - `Journal.getFixtureMatchCount()` is now read-only: calling it with an unknown testId no longer inserts an empty map or triggers FIFO eviction of a live testId. Reads never mutate cache state.
81
+ - CLI rejects negative values for `--journal-max` and `--fixture-counts-max` with a clear error (previously silently treated as unbounded). **Breaking for anyone passing `-1` expecting unbounded** — see note above.
82
+
83
+ ### Changed
84
+
85
+ - `createServer()` programmatic default: `journalMaxEntries` and `fixtureCountsMaxTestIds` now default to finite caps (1000 / 500) instead of unbounded. Long-running embedders that relied on unbounded retention must now opt in explicitly by passing `0`. Back-compat with test harnesses using `new Journal()` directly is preserved (they still default to unbounded). **Note:** this is a behavior change that in retrospect warranted a MINOR bump rather than PATCH.
86
+
87
+ ### Added
88
+
89
+ - New `--fixture-counts-max <n>` CLI flag (default 500) to cap the fixture-match-counts map by testId.
90
+
91
+ ## 1.14.1
92
+
93
+ ### Fixed
94
+
95
+ - Cap in-memory journal (and fixture-match-counts map) to prevent heap OOM under sustained load. `Journal.entries` was unbounded, causing heap growth ~3.8MB/sec to 4GB → OOM in ~18 minutes on long-running production deployments. Default cap for CLI (`serve`) is now 1000 entries; programmatic `createServer()` remains unbounded by default (back-compat). See `--journal-max` flag.
96
+
97
+ ## 1.14.0
98
+
99
+ ### Added
100
+
101
+ - Response template merging — override `id`, `created`, `model`, `usage`, `finishReason`, `role`, `systemFingerprint` on fixture responses across all 4 provider formats (OpenAI, Claude, Gemini, Responses API) (#111)
102
+ - JSON auto-stringify — fixture `arguments` and `content` fields accept objects that are auto-stringified by the loader, eliminating escaped JSON pain (#111)
103
+ - Migration guide from openai-responses-python (#111)
104
+ - All fixture examples and docs converted to object syntax (#111)
105
+ - `ResponseOverrides` field validation in `validateFixtures` — catches invalid types for `id`, `created`, `model`, `usage`, `finishReason`, `role`, `systemFingerprint`
106
+
107
+ ### Fixed
108
+
109
+ - `onTranscription` docs now show correct 1-argument signature
110
+ - `validateFixtures` now recognizes ContentWithToolCalls and multimedia response types
111
+
112
+ ## 1.13.0
113
+
114
+ ### Added
115
+
116
+ - GitHub Action for one-line CI setup — `uses: CopilotKit/aimock@v1` with fixtures, config, port, args, and health check (#102)
117
+ - Fixture converters wired into the CLI — `npx @copilotkit/aimock convert vidaimock` and `npx @copilotkit/aimock convert mockllm` as first-class subcommands (#102)
118
+ - 30 npm keywords for search discoverability (#102)
119
+ - Fixture gallery with 11 examples covering all mock types, plus browsable docs page at /examples (#102)
120
+ - Vitest and jest plugins for zero-config testing — `import { useAimock } from "@copilotkit/aimock/vitest"` (#102)
121
+
122
+ ### Changed
123
+
124
+ - Strip video URLs from README for npm publishing (#102)
125
+
126
+ ## 1.12.0
127
+
128
+ ### Added
129
+
130
+ - Multimedia endpoint support: image generation (OpenAI DALL-E + Gemini Imagen), text-to-speech, audio transcription, and video generation with async polling (#101)
131
+ - `match.endpoint` field for fixture isolation — prevents cross-matching between chat, image, speech, transcription, video, and embedding fixtures (#101)
132
+ - Bidirectional endpoint filtering — generic fixtures only match compatible endpoint types (#101)
133
+ - Convenience methods: `onImage`, `onSpeech`, `onTranscription`, `onVideo` (#101)
134
+ - Record & replay for all multimedia endpoints — proxy to real APIs, save fixtures with correct format/type detection (#101)
135
+ - `_endpointType` explicit field on `ChatCompletionRequest` for type safety (#101)
136
+ - Comparison matrix and drift detection rules updated for multimedia (#101)
137
+ - 54 new tests (32 integration, 11 record/replay, 12 type/routing)
138
+
139
+ ## 1.11.0
140
+
141
+ ### Added
142
+
143
+ - `AGUIMock` — mock the AG-UI (Agent-to-UI) protocol for CopilotKit frontend testing. All 33 event types, 11 convenience builders, fluent registration API, SSE streaming with disconnect handling (#100)
144
+ - AG-UI record & replay with tee streaming — proxy to real AG-UI agents, record event streams as fixtures, replay on subsequent requests. Includes `--proxy-only` mode for demos (#100)
145
+ - AG-UI schema drift detection — compares aimock event types against canonical `@ag-ui/core` Zod schemas to catch protocol changes (#100)
146
+ - `--agui-record`, `--agui-upstream`, `--agui-proxy-only` CLI flags (#100)
147
+
148
+ ### Removed
149
+
150
+ - Section bar from docs pages (cleanup)
151
+
152
+ ## 1.10.0
153
+
154
+ ### Added
155
+
156
+ - `--proxy-only` flag — proxy unmatched requests to upstream providers without saving fixtures to disk or caching in memory. Every unmatched request always hits the real provider, preventing stale recorded responses in demo/live environments (#99)
157
+
158
+ ## 1.9.0
159
+
160
+ ### Added
161
+
162
+ - Per-test sequence isolation via `X-Test-Id` header — each test gets its own fixture match counters, wired through all 12 HTTP handlers and 3 WebSocket handlers. No more test pollution from shared sequential state (#93)
163
+ - Combined `content + toolCalls` in fixture responses — new `ContentWithToolCallsResponse` type and type guard, supported across OpenAI Chat, OpenAI Responses, Anthropic Messages, and Gemini, with stream collapse support (#92)
164
+ - OpenRouter `reasoning_content` support in chat completions (#88)
165
+ - Demo video in README (#91)
166
+ - CI: Slack notifications for drift tests, competitive matrix updates, and new PRs (#86)
167
+ - Docs: reasoning and webSearches rows in Response Types table
168
+
169
+ ### Fixed
170
+
171
+ - `web_search_call` items now use `action.query` matching real OpenAI API format (#89)
172
+ - Homepage URL cleaned up (remove `/index.html` suffix) (#90)
173
+ - Record & Replay section title now centered and terminal panel top-aligned (#87)
174
+ - CI: use `pull_request_target` for fork PR Slack alerts
175
+
176
+ ## 1.8.0
177
+
178
+ ### Added
179
+
180
+ - `requestTransform` option for deterministic matching and recording — normalizes requests before matching (strips timestamps, UUIDs, session IDs) and switches to exact equality when set. Applied across all 15 provider handlers and the recorder. (#79, based on design by @iskhakovt in #63)
181
+ - Reasoning/thinking support for OpenAI Chat Completions — `reasoning` field in fixtures generates `reasoning_content` in responses and streaming `reasoning` deltas (#62 by @erezcor)
182
+ - Reasoning support for Gemini (`thoughtParts`), AWS Bedrock InvokeModel + Converse (`thinking` blocks), and Ollama (`think` tags) (#81)
183
+ - Web search result events for OpenAI Responses API (#62)
184
+ - Open Graph image and meta tags for social sharing
185
+ - CI: `npm` environment to release workflow for deployment tracking; `workflow_dispatch` added to Python test workflow
186
+
187
+ ### Changed
188
+
189
+ - Updated all GitHub repo URLs from CopilotKit/llmock to CopilotKit/aimock
190
+ - Reframed drift detection docs for users ("your mocks never go stale") with restored drift report output
191
+
192
+ ### Fixed
193
+
194
+ - Migration page examples: replaced fragile `time.sleep` with health check loops against `/__aimock/health`; fixed Python npx example `stderr=subprocess.PIPE` deadlock (#80)
195
+ - Stream collapse now handles reasoning events correctly
196
+
197
+ ## 1.7.0
198
+
199
+ ### Added
200
+
201
+ - MCPMock — Model Context Protocol mock with tools, resources, prompts, session management
202
+ - A2AMock — Agent-to-Agent protocol mock with SSE streaming
203
+ - VectorMock — Pinecone, Qdrant, ChromaDB compatible vector DB mock
204
+ - Search (Tavily), rerank (Cohere), and moderation (OpenAI) service mocks
205
+ - `/__aimock/*` control API for external fixture management
206
+ - `aimock` CLI with JSON config file support
207
+ - Mount composition for running multiple protocol handlers on one server
208
+ - JSON-RPC 2.0 transport with batch and notifications
209
+ - `aimock-pytest` pip package for native Python testing
210
+ - Converter scripts: `convert-vidaimock` (Tera → JSON) and `convert-mockllm` (YAML → JSON)
211
+ - Drift automation skill updates — `fix-drift.ts` now updates `skills/write-fixtures/SKILL.md` alongside source fixes
212
+ - Docker: dual-push `ghcr.io/copilotkit/aimock` + `ghcr.io/copilotkit/llmock` (compat)
213
+ - 6 migration guides: MSW, VidaiMock, mock-llm, piyook, Python mocks, Mokksy
214
+ - Docs: sidebar.js, cli-tabs.js, section bar, competitive matrix with 25 rows
215
+
216
+ ### Changed
217
+
218
+ - Renamed package from `@copilotkit/llmock` to `@copilotkit/aimock`
219
+ - Renamed Prometheus metrics to `aimock_*` with new MCP/A2A/Vector counters
220
+ - Rebranded logger `[aimock]`, chaos headers `x-aimock-chaos-*`, CLI startup message
221
+ - Helm chart renamed to `charts/aimock/`
222
+ - Homepage redesigned (Treatment 3: Progressive Disclosure)
223
+
224
+ ## 1.6.1
225
+
226
+ ### Fixed
227
+
228
+ - Record proxy now preserves upstream URL path prefixes — base URLs like `https://gateway.company.com/llm` now correctly resolve to `gateway.company.com/llm/v1/chat/completions` instead of losing the `/llm` prefix (PR #57)
229
+ - Record proxy now forwards all request headers to upstream, not just `Content-Type` and auth headers. Hop-by-hop headers (`connection`, `keep-alive`, `transfer-encoding`, etc.) and client-set headers (`host`, `content-length`, `cookie`, `accept-encoding`) are still stripped (PR #58)
230
+ - Recorder now decodes base64-encoded embeddings when `encoding_format: "base64"` is set in the request. Python's openai SDK uses this by default. Previously these were saved as `proxy_error` fixtures (PR #64)
231
+ - Guarded base64 embedding decode against corrupted data (non-float32-aligned buffers fall through gracefully instead of crashing)
232
+
233
+ ### Added
234
+
235
+ - `--summary` flag on the competitive matrix update script for markdown-formatted change summaries
236
+
237
+ ## 1.6.0
238
+
239
+ ### Added
240
+
241
+ - Provider-specific endpoints: dedicated routes for Bedrock (`/model/{modelId}/invoke`), Ollama (`/api/chat`, `/api/generate`), Cohere (`/v2/chat`), and Azure OpenAI deployment-based routing (`/openai/deployments/{id}/chat/completions`)
242
+ - Chaos injection: `ChaosConfig` type with `drop`, `malformed`, and `disconnect` actions; supports per-fixture chaos via `chaos` config on each fixture and server-wide chaos via `--chaos-drop`, `--chaos-malformed`, and `--chaos-disconnect` CLI flags
243
+ - Metrics: `GET /metrics` endpoint exposing Prometheus text format with request counters and latency histograms per provider and route
244
+ - Record-and-replay: `--record` flag and `proxyAndRecord` helper that proxies requests to real LLM APIs, collapses streaming responses, and writes fixture JSON to disk for future playback
245
+
246
+ ## 1.5.1
247
+
248
+ ### Fixed
249
+
250
+ - Documentation URLs now use the correct domain (llmock.copilotkit.dev)
251
+
252
+ ## 1.5.0
253
+
254
+ ### Added
255
+
256
+ - Embeddings API: `POST /v1/embeddings` endpoint, `onEmbedding()` convenience method, `inputText` match field, `EmbeddingResponse` type, deterministic fallback embeddings from input hash, Azure embedding routing
257
+ - Structured output / JSON mode: `responseFormat` match field, `onJsonOutput()` convenience method
258
+ - Sequential responses: `sequenceIndex` match field for stateful multi-turn fixtures, per-fixture-group match counting, `resetMatchCounts()` method
259
+ - Streaming physics: `StreamingProfile` type with `ttft`, `tps`, `jitter` fields for realistic timing simulation
260
+ - AWS Bedrock: `POST /model/{modelId}/invoke` endpoint, Anthropic Messages format translation
261
+ - Azure OpenAI: provider routing for `/openai/deployments/{id}/chat/completions` and `/openai/deployments/{id}/embeddings`
262
+ - Health & models endpoints: `GET /health`, `GET /ready`, `GET /v1/models` (auto-populated from fixtures)
263
+ - Docker & Helm: Dockerfile, Helm chart for Kubernetes deployment
264
+ - Documentation website: full docs site at llmock.copilotkit.dev with feature pages and competitive comparison matrix
265
+ - Automated drift remediation: `scripts/drift-report-collector.ts` and `scripts/fix-drift.ts` for CI-driven drift fixes
266
+ - CI automation: competitive matrix update workflow, drift fix workflow
267
+ - `FixtureOpts` and `EmbeddingFixtureOpts` type aliases exported for external consumers
268
+ - `.worktrees/` to eslint ignores
269
+
270
+ ### Changed
271
+
272
+ - Default to non-streaming for Claude Messages API and Responses API (matching real API defaults)
273
+ - README rewritten as concise overview with links to docs site
274
+ - Write-fixtures skill updated for all v1.5.0 features
275
+ - Docs site: Get Started links to docs, comparison above reliability, npm version badge
276
+
277
+ ### Fixed
278
+
279
+ - Gemini Live handler no longer crashes on malformed `clientContent.turns` and `toolResponse.functionResponses`
280
+ - Added `isClosed` guard before WebSocket finalization events (prevents writes to closed connections)
281
+ - `streamingProfile` now present on convenience method opts types (`on`, `onMessage`, etc.)
282
+ - skills/ symlink direction corrected so `npm pack` includes the write-fixtures skill
283
+ - `.claude` removed from package.json files (was dead weight — symlink doesn't ship)
284
+ - Watcher cleanup on error (clear debounce timer, null guard)
285
+ - Empty-reload guard (keep previous fixtures when reload produces 0)
286
+
287
+ ### Removed
288
+
289
+ - Dead `@keyframes sseLine` CSS from docs site
290
+
291
+ ## 1.4.0
292
+
293
+ ### Added
294
+
295
+ - `--watch` (`-w`): File-watching with 500ms debounced reload. Keeps previous fixtures on validation failure.
296
+ - `--log-level`: Configurable log verbosity (`silent`, `info`, `debug`). Default `info` for CLI, `silent` for programmatic API.
297
+ - `--validate-on-load`: Fixture schema validation at startup — checks response types, tool call JSON, numeric ranges, shadowing, and catch-all positioning.
298
+ - `validateFixtures()` exported for programmatic use
299
+ - `Logger` class exported for programmatic use
300
+
301
+ ## 1.3.3
302
+
303
+ ### Added
304
+
305
+ - WebSocket drift detection tests: TLS client for real provider WS endpoints, 4 verified drift tests (Responses WS + Realtime), Gemini Live canary for text-capable model availability
306
+ - Realtime model canary: detects when `gpt-4o-mini-realtime-preview` is deprecated and suggests GA replacement
307
+ - Gemini Live documented as unverified (no text-capable `bidiGenerateContent` model exists yet)
308
+
309
+ ### Fixed
310
+
311
+ - Responses WS handler now accepts flat `response.create` format matching the real OpenAI API (previously required a non-standard nested `response: { ... }` envelope)
312
+ - README Gemini Live response shape example corrected (`modelTurn.parts`, not `modelTurnComplete`)
313
+
314
+ ## 1.3.2
315
+
316
+ ### Added
317
+
318
+ - Live API drift detection test suite: three-layer triangulation between SDK types, real API responses, and llmock output across OpenAI (Chat + Responses), Anthropic Claude, and Google Gemini
319
+ - Weekly CI workflow for automated drift checks
320
+ - `DRIFT.md` documentation for the drift detection system
321
+
322
+ ### Fixed
323
+
324
+ - Missing `refusal` field on OpenAI Chat Completions responses — both the SDK and real API return `refusal: null` on non-refusal messages, but llmock was omitting it
325
+
326
+ ## 1.3.1
327
+
328
+ ### Added
329
+
330
+ - Claude Code fixture authoring skill (`/write-fixtures`) — comprehensive guide for match fields, response types, agent loop patterns, gotchas, and debugging
331
+ - Claude Code plugin structure for downstream consumers (`--plugin-dir`, `--add-dir`, or manual copy)
332
+
333
+ ### Changed
334
+
335
+ - README and docs site updated with Claude Code integration instructions
336
+
337
+ ## 1.3.0
338
+
339
+ ### Added
340
+
341
+ - Mid-stream interruption: `truncateAfterChunks` and `disconnectAfterMs` fixture fields to simulate abrupt server disconnects
342
+ - AbortSignal-based cancellation primitives (`createInterruptionSignal`, signal-aware `delay()`)
343
+ - Backward-compatible `writeSSEStream` overload with `StreamOptions` returning completion status
344
+ - Interruption support across all HTTP SSE and WebSocket streaming paths
345
+ - `destroy()` method on `WebSocketConnection` for abrupt disconnect simulation
346
+ - Journal records `interrupted` and `interruptReason` on interrupted streams
347
+ - LLMock convenience API extended with interruption options (`truncateAfterChunks`, `disconnectAfterMs`)
348
+
349
+ ## 1.2.0
350
+
351
+ ### Added
352
+
353
+ - Zero-dependency RFC 6455 WebSocket framing layer
354
+ - OpenAI Responses API over WebSocket (`/v1/responses`)
355
+ - OpenAI Realtime API over WebSocket (`/v1/realtime`) — text + tool calls
356
+ - Gemini Live BidiGenerateContent over WebSocket — text + tool calls
357
+ - Future Direction section in README
358
+
359
+ ### Fixed
360
+
361
+ - WebSocket close-frame lifecycle
362
+ - Improved error visibility across WebSocket handlers
363
+
364
+ ## 1.1.1
365
+
366
+ ### Added
367
+
368
+ - Function call IDs on Gemini tool call responses
369
+
370
+ ### Removed
371
+
372
+ - Changesets (simplified release workflow)
373
+
374
+ ## 1.1.0
375
+
376
+ ### Added
377
+
378
+ - 9948a8b: `prependFixture()` and `getFixtures()` public API methods
379
+
380
+ ## 1.0.1
381
+
382
+ ### Added
383
+
384
+ - `getTextContent` for array-format message content handling
package/README.md CHANGED
@@ -10,13 +10,20 @@ npm install @copilotkit/aimock
10
10
  ```
11
11
 
12
12
  ```typescript
13
+ // The class is still named `LLMock` for back-compat after the v1.7.0 package
14
+ // rename from `@copilotkit/llmock` to `@copilotkit/aimock`.
13
15
  import { LLMock } from "@copilotkit/aimock";
14
16
 
15
17
  const mock = new LLMock({ port: 0 });
16
18
  mock.onMessage("hello", { content: "Hi there!" });
17
19
  await mock.start();
18
20
 
21
+ // Set env BEFORE importing/constructing the OpenAI (or other provider) client.
22
+ // Many SDKs cache the base URL at construction time — if the client is built
23
+ // before these are set, it will talk to the real API (surprise bills) instead
24
+ // of aimock.
19
25
  process.env.OPENAI_BASE_URL = `${mock.url}/v1`;
26
+ process.env.OPENAI_API_KEY = "mock"; // SDK requires a value, even when base URL is mocked
20
27
 
21
28
  // ... run your tests ...
22
29
 
@@ -27,23 +34,24 @@ await mock.stop();
27
34
 
28
35
  aimock mocks everything your AI app talks to:
29
36
 
30
- | Tool | What it mocks | Docs |
31
- | -------------- | ----------------------------------------------------------------- | --------------------------------------------------- |
32
- | **LLMock** | OpenAI, Claude, Gemini, Bedrock, Azure, Vertex AI, Ollama, Cohere | [Providers](https://aimock.copilotkit.dev/docs) |
33
- | **MCPMock** | MCP tools, resources, prompts with session management | [MCP](https://aimock.copilotkit.dev/mcp-mock) |
34
- | **A2AMock** | Agent-to-agent protocol with SSE streaming | [A2A](https://aimock.copilotkit.dev/a2a-mock) |
35
- | **AGUIMock** | AG-UI agent-to-UI event streams for frontend testing | [AG-UI](https://aimock.copilotkit.dev/agui-mock) |
36
- | **VectorMock** | Pinecone, Qdrant, ChromaDB compatible endpoints | [Vector](https://aimock.copilotkit.dev/vector-mock) |
37
- | **Services** | Tavily search, Cohere rerank, OpenAI moderation | [Services](https://aimock.copilotkit.dev/services) |
37
+ | Tool | What it mocks | Docs |
38
+ | -------------- | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
39
+ | **LLMock** | OpenAI (Chat/Responses/Realtime), Claude, Gemini (REST/Live), Bedrock, Azure, Vertex AI, Ollama, Cohere | [Providers](https://aimock.copilotkit.dev/docs) |
40
+ | **MCPMock** | MCP tools, resources, prompts with session management | [MCP](https://aimock.copilotkit.dev/mcp-mock) |
41
+ | **A2AMock** | Agent-to-agent protocol with SSE streaming | [A2A](https://aimock.copilotkit.dev/a2a-mock) |
42
+ | **AGUIMock** | AG-UI agent-to-UI event streams for frontend testing | [AG-UI](https://aimock.copilotkit.dev/agui-mock) |
43
+ | **VectorMock** | Pinecone, Qdrant, ChromaDB compatible endpoints | [Vector](https://aimock.copilotkit.dev/vector-mock) |
44
+ | **Services** | Tavily search, Cohere rerank, OpenAI moderation | [Services](https://aimock.copilotkit.dev/services) |
38
45
 
39
46
  Run them all on one port with `npx @copilotkit/aimock --config aimock.json`, or use the programmatic API to compose exactly what you need.
40
47
 
41
48
  ## Features
42
49
 
43
50
  - **[Record & Replay](https://aimock.copilotkit.dev/record-replay)** — Proxy real APIs, save as fixtures, replay deterministically forever
44
- - **[11 LLM Providers](https://aimock.copilotkit.dev/docs)** — OpenAI, Claude, Gemini, Bedrock, Azure, Vertex AI, Ollama, Cohere full streaming support
45
- - **[Multimedia APIs](https://aimock.copilotkit.dev/images)** — Image generation (DALL-E, Imagen), text-to-speech, audio transcription, video generation
46
- - **[MCP / A2A / AG-UI / Vector](https://aimock.copilotkit.dev/mcp-mock)** Mock every protocol your AI agents use
51
+ - **[Multi-turn Conversations](https://aimock.copilotkit.dev/multi-turn)** — Record and replay multi-turn traces with tool rounds; match distinct turns via `toolCallId`, `sequenceIndex`, or custom predicates
52
+ - **[11 LLM Providers](https://aimock.copilotkit.dev/docs)** — OpenAI Chat, OpenAI Responses, OpenAI Realtime, Claude, Gemini, Gemini Live, Azure, Bedrock, Vertex AI, Ollama, Cohere — full streaming support
53
+ - **Multimedia APIs** [image generation](https://aimock.copilotkit.dev/images) (DALL-E, Imagen), [text-to-speech](https://aimock.copilotkit.dev/speech), [audio transcription](https://aimock.copilotkit.dev/transcription), [video generation](https://aimock.copilotkit.dev/video)
54
+ - **[MCP](https://aimock.copilotkit.dev/mcp-mock) / [A2A](https://aimock.copilotkit.dev/a2a-mock) / [AG-UI](https://aimock.copilotkit.dev/agui-mock) / [Vector](https://aimock.copilotkit.dev/vector-mock)** — Mock every protocol your AI agents use
47
55
  - **[Chaos Testing](https://aimock.copilotkit.dev/chaos-testing)** — 500 errors, malformed JSON, mid-stream disconnects at any probability
48
56
  - **[Drift Detection](https://aimock.copilotkit.dev/drift-detection)** — Daily CI validation against real APIs
49
57
  - **[Streaming Physics](https://aimock.copilotkit.dev/streaming-physics)** — Configurable `ttft`, `tps`, and `jitter`
@@ -72,22 +80,35 @@ See the [GitHub Action docs](https://aimock.copilotkit.dev/github-action) for al
72
80
 
73
81
  ```bash
74
82
  # LLM mocking only
75
- npx @copilotkit/aimock -p 4010 -f ./fixtures
83
+ npx -p @copilotkit/aimock llmock -p 4010 -f ./fixtures
84
+
85
+ # Remote fixtures — load JSON from an HTTPS URL (repeatable)
86
+ npx -p @copilotkit/aimock llmock -p 4010 \
87
+ -f https://raw.githubusercontent.com/acme/mocks/main/openai.json \
88
+ -f ./fixtures/local-overrides.json
76
89
 
77
90
  # Full suite from config
78
91
  npx @copilotkit/aimock --config aimock.json
79
92
 
80
93
  # Record mode: proxy to real APIs, save fixtures
81
- npx @copilotkit/aimock --record --provider-openai https://api.openai.com
94
+ npx -p @copilotkit/aimock llmock --record --provider-openai https://api.openai.com
82
95
 
83
96
  # Convert fixtures from other tools
84
97
  npx @copilotkit/aimock convert vidaimock ./templates/ ./fixtures/
85
98
  npx @copilotkit/aimock convert mockllm ./config.yaml ./fixtures/
86
99
 
87
100
  # Docker
88
- docker run -d -p 4010:4010 -v ./fixtures:/fixtures ghcr.io/copilotkit/aimock -f /fixtures
101
+ docker run -d -p 4010:4010 -v "$(pwd)/fixtures:/fixtures" ghcr.io/copilotkit/aimock -f /fixtures -h 0.0.0.0
89
102
  ```
90
103
 
104
+ > **Note on `llmock` vs `aimock` CLIs.** The `llmock` bin is retained as a compat alias for users of the pre-1.7.0 `@copilotkit/llmock` package. It runs a narrower flag-driven CLI without `--config` or the `convert` subcommand. New projects should use `aimock` (or `npx @copilotkit/aimock`) for full feature support.
105
+
106
+ ### Remote fixture URLs
107
+
108
+ `--fixtures` accepts `https://` and `http://` URLs pointing at JSON fixture files in addition to filesystem paths, and the flag is repeatable so you can layer remote and local sources in argv order. Fetched fixtures are cached on disk at `~/.cache/aimock/fixtures/<sha256-of-url>/` (honors `$XDG_CACHE_HOME`); when paired with `--validate-on-load`, a fetch failure with a valid cached copy logs a warning and continues — without a cache, the process exits non-zero. HTTP fetches have a 10s timeout and a 50 MB body cap; redirects are rejected fail-loud, so configure your upstream to serve the final URL directly (GitHub raw content URLs already do).
109
+
110
+ Private and link-local addresses (loopback, RFC1918, CGNAT, cloud metadata, ULA, multicast) are rejected by default to prevent SSRF. For local development or tests that need to hit `127.0.0.1`, opt out with `AIMOCK_ALLOW_PRIVATE_URLS=1`. Tarball and zip URL support is intentionally deferred.
111
+
91
112
  ## Framework Guides
92
113
 
93
114
  Test your AI agents with aimock — no API keys, no network calls: [LangChain](https://aimock.copilotkit.dev/integrate-langchain) · [CrewAI](https://aimock.copilotkit.dev/integrate-crewai) · [PydanticAI](https://aimock.copilotkit.dev/integrate-pydanticai) · [LlamaIndex](https://aimock.copilotkit.dev/integrate-llamaindex) · [Mastra](https://aimock.copilotkit.dev/integrate-mastra) · [Google ADK](https://aimock.copilotkit.dev/integrate-adk) · [Microsoft Agent Framework](https://aimock.copilotkit.dev/integrate-maf)
@@ -5,7 +5,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
9
8
  var __copyProps = (to, from, except, desc) => {
10
9
  if (from && typeof from === "object" || typeof from === "function") {
11
10
  for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
@@ -27,5 +26,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
26
 
28
27
  //#endregion
29
28
 
30
- exports.__commonJSMin = __commonJSMin;
31
29
  exports.__toESM = __toESM;