@amplitude/ai 0.1.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 (510) hide show
  1. package/.cursor/skills/instrument-with-amplitude-ai/SKILL.md +50 -0
  2. package/AGENTS.md +79 -0
  3. package/LICENSE +21 -0
  4. package/README.md +2111 -0
  5. package/bin/amplitude-ai-completions.mjs +19 -0
  6. package/bin/amplitude-ai-doctor.mjs +26 -0
  7. package/bin/amplitude-ai-init.mjs +27 -0
  8. package/bin/amplitude-ai-instrument.mjs +52 -0
  9. package/bin/amplitude-ai-mcp.mjs +8 -0
  10. package/bin/amplitude-ai-register-catalog.mjs +156 -0
  11. package/bin/amplitude-ai-status.mjs +28 -0
  12. package/bin/amplitude-ai.mjs +43 -0
  13. package/bin/validate-catalog-constants.mjs +134 -0
  14. package/data/agent_event_catalog.json +1277 -0
  15. package/dist/_virtual/rolldown_runtime.js +31 -0
  16. package/dist/bound-agent.d.ts +56 -0
  17. package/dist/bound-agent.d.ts.map +1 -0
  18. package/dist/bound-agent.js +155 -0
  19. package/dist/bound-agent.js.map +1 -0
  20. package/dist/cli/doctor.d.ts +17 -0
  21. package/dist/cli/doctor.d.ts.map +1 -0
  22. package/dist/cli/doctor.js +89 -0
  23. package/dist/cli/doctor.js.map +1 -0
  24. package/dist/cli/init.d.ts +14 -0
  25. package/dist/cli/init.d.ts.map +1 -0
  26. package/dist/cli/init.js +40 -0
  27. package/dist/cli/init.js.map +1 -0
  28. package/dist/cli/providers.d.ts +32 -0
  29. package/dist/cli/providers.d.ts.map +1 -0
  30. package/dist/cli/providers.js +46 -0
  31. package/dist/cli/providers.js.map +1 -0
  32. package/dist/cli/status.d.ts +14 -0
  33. package/dist/cli/status.d.ts.map +1 -0
  34. package/dist/cli/status.js +38 -0
  35. package/dist/cli/status.js.map +1 -0
  36. package/dist/client.d.ts +246 -0
  37. package/dist/client.d.ts.map +1 -0
  38. package/dist/client.js +369 -0
  39. package/dist/client.js.map +1 -0
  40. package/dist/config.d.ts +60 -0
  41. package/dist/config.d.ts.map +1 -0
  42. package/dist/config.js +57 -0
  43. package/dist/config.js.map +1 -0
  44. package/dist/context.d.ts +44 -0
  45. package/dist/context.d.ts.map +1 -0
  46. package/dist/context.js +53 -0
  47. package/dist/context.js.map +1 -0
  48. package/dist/core/constants.d.ts +96 -0
  49. package/dist/core/constants.d.ts.map +1 -0
  50. package/dist/core/constants.js +105 -0
  51. package/dist/core/constants.js.map +1 -0
  52. package/dist/core/enrichments.d.ts +139 -0
  53. package/dist/core/enrichments.d.ts.map +1 -0
  54. package/dist/core/enrichments.js +177 -0
  55. package/dist/core/enrichments.js.map +1 -0
  56. package/dist/core/privacy.d.ts +53 -0
  57. package/dist/core/privacy.d.ts.map +1 -0
  58. package/dist/core/privacy.js +235 -0
  59. package/dist/core/privacy.js.map +1 -0
  60. package/dist/core/tracking.d.ts +242 -0
  61. package/dist/core/tracking.d.ts.map +1 -0
  62. package/dist/core/tracking.js +469 -0
  63. package/dist/core/tracking.js.map +1 -0
  64. package/dist/decorators.d.ts +109 -0
  65. package/dist/decorators.d.ts.map +1 -0
  66. package/dist/decorators.js +281 -0
  67. package/dist/decorators.js.map +1 -0
  68. package/dist/exceptions.d.ts +19 -0
  69. package/dist/exceptions.d.ts.map +1 -0
  70. package/dist/exceptions.js +35 -0
  71. package/dist/exceptions.js.map +1 -0
  72. package/dist/index.d.ts +37 -0
  73. package/dist/index.js +38 -0
  74. package/dist/integrations/anthropic-tools.d.ts +38 -0
  75. package/dist/integrations/anthropic-tools.d.ts.map +1 -0
  76. package/dist/integrations/anthropic-tools.js +175 -0
  77. package/dist/integrations/anthropic-tools.js.map +1 -0
  78. package/dist/integrations/crewai.d.ts +14 -0
  79. package/dist/integrations/crewai.d.ts.map +1 -0
  80. package/dist/integrations/crewai.js +19 -0
  81. package/dist/integrations/crewai.js.map +1 -0
  82. package/dist/integrations/langchain.d.ts +37 -0
  83. package/dist/integrations/langchain.d.ts.map +1 -0
  84. package/dist/integrations/langchain.js +189 -0
  85. package/dist/integrations/langchain.js.map +1 -0
  86. package/dist/integrations/llamaindex.d.ts +44 -0
  87. package/dist/integrations/llamaindex.d.ts.map +1 -0
  88. package/dist/integrations/llamaindex.js +144 -0
  89. package/dist/integrations/llamaindex.js.map +1 -0
  90. package/dist/integrations/openai-agents.d.ts +35 -0
  91. package/dist/integrations/openai-agents.d.ts.map +1 -0
  92. package/dist/integrations/openai-agents.js +248 -0
  93. package/dist/integrations/openai-agents.js.map +1 -0
  94. package/dist/integrations/opentelemetry.d.ts +40 -0
  95. package/dist/integrations/opentelemetry.d.ts.map +1 -0
  96. package/dist/integrations/opentelemetry.js +146 -0
  97. package/dist/integrations/opentelemetry.js.map +1 -0
  98. package/dist/internals.d.ts +5 -0
  99. package/dist/internals.js +5 -0
  100. package/dist/mcp/contract.d.ts +27 -0
  101. package/dist/mcp/contract.d.ts.map +1 -0
  102. package/dist/mcp/contract.js +25 -0
  103. package/dist/mcp/contract.js.map +1 -0
  104. package/dist/mcp/index.d.ts +4 -0
  105. package/dist/mcp/index.js +5 -0
  106. package/dist/mcp/patterns.d.ts +11 -0
  107. package/dist/mcp/patterns.d.ts.map +1 -0
  108. package/dist/mcp/patterns.js +38 -0
  109. package/dist/mcp/patterns.js.map +1 -0
  110. package/dist/mcp/server.d.ts +10 -0
  111. package/dist/mcp/server.d.ts.map +1 -0
  112. package/dist/mcp/server.js +241 -0
  113. package/dist/mcp/server.js.map +1 -0
  114. package/dist/mcp/validate-file.d.ts +20 -0
  115. package/dist/mcp/validate-file.d.ts.map +1 -0
  116. package/dist/mcp/validate-file.js +122 -0
  117. package/dist/mcp/validate-file.js.map +1 -0
  118. package/dist/middleware.d.ts +32 -0
  119. package/dist/middleware.d.ts.map +1 -0
  120. package/dist/middleware.js +67 -0
  121. package/dist/middleware.js.map +1 -0
  122. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js +54 -0
  123. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js.map +1 -0
  124. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js +20 -0
  125. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js.map +1 -0
  126. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js +34 -0
  127. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js.map +1 -0
  128. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js +225 -0
  129. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js.map +1 -0
  130. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js +22 -0
  131. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js.map +1 -0
  132. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js +351 -0
  133. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js.map +1 -0
  134. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js +634 -0
  135. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js.map +1 -0
  136. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js +60 -0
  137. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js.map +1 -0
  138. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js +122 -0
  139. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js.map +1 -0
  140. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js +37 -0
  141. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js.map +1 -0
  142. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +858 -0
  143. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js.map +1 -0
  144. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js +32 -0
  145. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js.map +1 -0
  146. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js +74 -0
  147. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js.map +1 -0
  148. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js +1262 -0
  149. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js.map +1 -0
  150. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js +83 -0
  151. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js.map +1 -0
  152. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/formats.js +195 -0
  153. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/formats.js.map +1 -0
  154. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/index.js +44 -0
  155. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/index.js.map +1 -0
  156. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/limit.js +88 -0
  157. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/limit.js.map +1 -0
  158. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/ajv.js +107 -0
  159. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/ajv.js.map +1 -0
  160. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.js +142 -0
  161. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.js.map +1 -0
  162. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/index.js +678 -0
  163. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/index.js.map +1 -0
  164. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/scope.js +145 -0
  165. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -0
  166. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/errors.js +106 -0
  167. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/errors.js.map +1 -0
  168. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.js +227 -0
  169. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.js.map +1 -0
  170. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/names.js +33 -0
  171. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/names.js.map +1 -0
  172. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/ref_error.js +22 -0
  173. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/ref_error.js.map +1 -0
  174. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/resolve.js +137 -0
  175. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/resolve.js.map +1 -0
  176. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/rules.js +65 -0
  177. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/rules.js.map +1 -0
  178. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/util.js +150 -0
  179. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/util.js.map +1 -0
  180. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/applicability.js +27 -0
  181. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -0
  182. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/boolSchema.js +52 -0
  183. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -0
  184. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js +176 -0
  185. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -0
  186. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/defaults.js +35 -0
  187. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -0
  188. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/index.js +437 -0
  189. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/index.js.map +1 -0
  190. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/keyword.js +117 -0
  191. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -0
  192. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/subschema.js +76 -0
  193. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -0
  194. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.js +587 -0
  195. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.js.map +1 -0
  196. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/data.js +22 -0
  197. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/data.js.map +1 -0
  198. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-draft-07.js +145 -0
  199. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-draft-07.js.map +1 -0
  200. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/equal.js +16 -0
  201. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/equal.js.map +1 -0
  202. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/ucs2length.js +29 -0
  203. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -0
  204. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/uri.js +16 -0
  205. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/uri.js.map +1 -0
  206. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/validation_error.js +20 -0
  207. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/validation_error.js.map +1 -0
  208. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +61 -0
  209. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -0
  210. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +101 -0
  211. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -0
  212. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js +34 -0
  213. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -0
  214. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +21 -0
  215. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -0
  216. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/contains.js +94 -0
  217. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -0
  218. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +91 -0
  219. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -0
  220. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/if.js +66 -0
  221. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -0
  222. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/index.js +64 -0
  223. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -0
  224. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items.js +63 -0
  225. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -0
  226. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js +39 -0
  227. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -0
  228. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/not.js +36 -0
  229. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -0
  230. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +56 -0
  231. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -0
  232. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +66 -0
  233. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -0
  234. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +22 -0
  235. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -0
  236. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/properties.js +57 -0
  237. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -0
  238. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +46 -0
  239. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -0
  240. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +22 -0
  241. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -0
  242. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/code.js +134 -0
  243. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/code.js.map +1 -0
  244. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/id.js +19 -0
  245. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -0
  246. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/index.js +27 -0
  247. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -0
  248. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/ref.js +116 -0
  249. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -0
  250. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/index.js +106 -0
  251. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -0
  252. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/types.js +18 -0
  253. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -0
  254. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft7.js +31 -0
  255. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -0
  256. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/format.js +97 -0
  257. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -0
  258. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/index.js +15 -0
  259. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -0
  260. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/metadata.js +27 -0
  261. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -0
  262. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/const.js +32 -0
  263. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -0
  264. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/enum.js +54 -0
  265. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -0
  266. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/index.js +53 -0
  267. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -0
  268. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js +33 -0
  269. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -0
  270. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js +38 -0
  271. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -0
  272. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +52 -0
  273. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -0
  274. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +33 -0
  275. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -0
  276. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +32 -0
  277. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -0
  278. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/pattern.js +43 -0
  279. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -0
  280. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/required.js +77 -0
  281. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -0
  282. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +75 -0
  283. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -0
  284. package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js +37 -0
  285. package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js.map +1 -0
  286. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js +240 -0
  287. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js.map +1 -0
  288. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js +194 -0
  289. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js.map +1 -0
  290. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js +286 -0
  291. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js.map +1 -0
  292. package/dist/node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js +82 -0
  293. package/dist/node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js.map +1 -0
  294. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js +37 -0
  295. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js.map +1 -0
  296. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Refs.js +30 -0
  297. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Refs.js.map +1 -0
  298. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +16 -0
  299. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js.map +1 -0
  300. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js +10 -0
  301. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js.map +1 -0
  302. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseDef.js +57 -0
  303. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseDef.js.map +1 -0
  304. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +17 -0
  305. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/any.js.map +1 -0
  306. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +23 -0
  307. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js.map +1 -0
  308. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +36 -0
  309. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js.map +1 -0
  310. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +8 -0
  311. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js.map +1 -0
  312. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +10 -0
  313. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js.map +1 -0
  314. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +10 -0
  315. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js.map +1 -0
  316. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +39 -0
  317. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js.map +1 -0
  318. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +13 -0
  319. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js.map +1 -0
  320. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +11 -0
  321. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js.map +1 -0
  322. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +11 -0
  323. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js.map +1 -0
  324. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +47 -0
  325. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js.map +1 -0
  326. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +17 -0
  327. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js.map +1 -0
  328. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +38 -0
  329. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js.map +1 -0
  330. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +16 -0
  331. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js.map +1 -0
  332. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +13 -0
  333. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js.map +1 -0
  334. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +11 -0
  335. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js.map +1 -0
  336. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +46 -0
  337. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js.map +1 -0
  338. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +37 -0
  339. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js.map +1 -0
  340. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +64 -0
  341. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js.map +1 -0
  342. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +20 -0
  343. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js.map +1 -0
  344. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +27 -0
  345. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js.map +1 -0
  346. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +10 -0
  347. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js.map +1 -0
  348. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +10 -0
  349. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js.map +1 -0
  350. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +56 -0
  351. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js.map +1 -0
  352. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +21 -0
  353. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js.map +1 -0
  354. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +250 -0
  355. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js.map +1 -0
  356. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +38 -0
  357. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js.map +1 -0
  358. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +10 -0
  359. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js.map +1 -0
  360. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +64 -0
  361. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js.map +1 -0
  362. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +10 -0
  363. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js.map +1 -0
  364. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/selectParser.js +78 -0
  365. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/selectParser.js.map +1 -0
  366. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +70 -0
  367. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js.map +1 -0
  368. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js +104 -0
  369. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js.map +1 -0
  370. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js +11 -0
  371. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js.map +1 -0
  372. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js +10 -0
  373. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js.map +1 -0
  374. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js +110 -0
  375. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js.map +1 -0
  376. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js +99 -0
  377. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js.map +1 -0
  378. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js +84 -0
  379. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js.map +1 -0
  380. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js +3160 -0
  381. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js.map +1 -0
  382. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/errors.js +23 -0
  383. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/errors.js.map +1 -0
  384. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/iso.js +38 -0
  385. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/iso.js.map +1 -0
  386. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/parse.js +12 -0
  387. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/parse.js.map +1 -0
  388. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/schemas.js +611 -0
  389. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/schemas.js.map +1 -0
  390. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/api.js +437 -0
  391. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/api.js.map +1 -0
  392. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/checks.js +360 -0
  393. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/checks.js.map +1 -0
  394. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/core.js +50 -0
  395. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/core.js.map +1 -0
  396. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/doc.js +34 -0
  397. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/doc.js.map +1 -0
  398. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/errors.js +71 -0
  399. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/errors.js.map +1 -0
  400. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/parse.js +74 -0
  401. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/parse.js.map +1 -0
  402. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/regexes.js +63 -0
  403. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/regexes.js.map +1 -0
  404. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/registries.js +50 -0
  405. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/registries.js.map +1 -0
  406. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/schemas.js +1098 -0
  407. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/schemas.js.map +1 -0
  408. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/to-json-schema.js +599 -0
  409. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/to-json-schema.js.map +1 -0
  410. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/util.js +267 -0
  411. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/util.js.map +1 -0
  412. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/versions.js +10 -0
  413. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/versions.js.map +1 -0
  414. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/mini/schemas.js +50 -0
  415. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/mini/schemas.js.map +1 -0
  416. package/dist/patching.d.ts +59 -0
  417. package/dist/patching.d.ts.map +1 -0
  418. package/dist/patching.js +891 -0
  419. package/dist/patching.js.map +1 -0
  420. package/dist/propagation.d.ts +8 -0
  421. package/dist/propagation.d.ts.map +1 -0
  422. package/dist/propagation.js +46 -0
  423. package/dist/propagation.js.map +1 -0
  424. package/dist/providers/anthropic.d.ts +44 -0
  425. package/dist/providers/anthropic.d.ts.map +1 -0
  426. package/dist/providers/anthropic.js +287 -0
  427. package/dist/providers/anthropic.js.map +1 -0
  428. package/dist/providers/azure-openai.d.ts +32 -0
  429. package/dist/providers/azure-openai.d.ts.map +1 -0
  430. package/dist/providers/azure-openai.js +39 -0
  431. package/dist/providers/azure-openai.js.map +1 -0
  432. package/dist/providers/base.d.ts +70 -0
  433. package/dist/providers/base.d.ts.map +1 -0
  434. package/dist/providers/base.js +141 -0
  435. package/dist/providers/base.js.map +1 -0
  436. package/dist/providers/bedrock.d.ts +41 -0
  437. package/dist/providers/bedrock.d.ts.map +1 -0
  438. package/dist/providers/bedrock.js +229 -0
  439. package/dist/providers/bedrock.js.map +1 -0
  440. package/dist/providers/gemini.d.ts +34 -0
  441. package/dist/providers/gemini.d.ts.map +1 -0
  442. package/dist/providers/gemini.js +225 -0
  443. package/dist/providers/gemini.js.map +1 -0
  444. package/dist/providers/mistral.d.ts +32 -0
  445. package/dist/providers/mistral.d.ts.map +1 -0
  446. package/dist/providers/mistral.js +218 -0
  447. package/dist/providers/mistral.js.map +1 -0
  448. package/dist/providers/openai.d.ts +61 -0
  449. package/dist/providers/openai.d.ts.map +1 -0
  450. package/dist/providers/openai.js +530 -0
  451. package/dist/providers/openai.js.map +1 -0
  452. package/dist/register.d.ts +1 -0
  453. package/dist/register.js +46 -0
  454. package/dist/register.js.map +1 -0
  455. package/dist/session.d.ts +46 -0
  456. package/dist/session.d.ts.map +1 -0
  457. package/dist/session.js +144 -0
  458. package/dist/session.js.map +1 -0
  459. package/dist/tenant.d.ts +30 -0
  460. package/dist/tenant.d.ts.map +1 -0
  461. package/dist/tenant.js +23 -0
  462. package/dist/tenant.js.map +1 -0
  463. package/dist/testing.d.ts +46 -0
  464. package/dist/testing.d.ts.map +1 -0
  465. package/dist/testing.js +120 -0
  466. package/dist/testing.js.map +1 -0
  467. package/dist/types.d.ts +384 -0
  468. package/dist/types.d.ts.map +1 -0
  469. package/dist/types.js +13 -0
  470. package/dist/types.js.map +1 -0
  471. package/dist/utils/costs.d.ts +27 -0
  472. package/dist/utils/costs.d.ts.map +1 -0
  473. package/dist/utils/costs.js +63 -0
  474. package/dist/utils/costs.js.map +1 -0
  475. package/dist/utils/debug.d.ts +6 -0
  476. package/dist/utils/debug.d.ts.map +1 -0
  477. package/dist/utils/debug.js +73 -0
  478. package/dist/utils/debug.js.map +1 -0
  479. package/dist/utils/logger.d.ts +11 -0
  480. package/dist/utils/logger.d.ts.map +1 -0
  481. package/dist/utils/logger.js +18 -0
  482. package/dist/utils/logger.js.map +1 -0
  483. package/dist/utils/model-tiers.d.ts +8 -0
  484. package/dist/utils/model-tiers.d.ts.map +1 -0
  485. package/dist/utils/model-tiers.js +76 -0
  486. package/dist/utils/model-tiers.js.map +1 -0
  487. package/dist/utils/providers.d.ts +5 -0
  488. package/dist/utils/providers.d.ts.map +1 -0
  489. package/dist/utils/providers.js +20 -0
  490. package/dist/utils/providers.js.map +1 -0
  491. package/dist/utils/resolve-module.d.ts +5 -0
  492. package/dist/utils/resolve-module.d.ts.map +1 -0
  493. package/dist/utils/resolve-module.js +29 -0
  494. package/dist/utils/resolve-module.js.map +1 -0
  495. package/dist/utils/streaming.d.ts +55 -0
  496. package/dist/utils/streaming.d.ts.map +1 -0
  497. package/dist/utils/streaming.js +72 -0
  498. package/dist/utils/streaming.js.map +1 -0
  499. package/dist/utils/tokens.d.ts +16 -0
  500. package/dist/utils/tokens.d.ts.map +1 -0
  501. package/dist/utils/tokens.js +80 -0
  502. package/dist/utils/tokens.js.map +1 -0
  503. package/dist/wrappers.d.ts +37 -0
  504. package/dist/wrappers.d.ts.map +1 -0
  505. package/dist/wrappers.js +61 -0
  506. package/dist/wrappers.js.map +1 -0
  507. package/llms-full.txt +127 -0
  508. package/llms.txt +28 -0
  509. package/mcp.schema.json +18 -0
  510. package/package.json +189 -0
@@ -0,0 +1,891 @@
1
+ import { getActiveContext } from "./context.js";
2
+ import { ANTHROPIC_AVAILABLE, _AnthropicModule } from "./providers/anthropic.js";
3
+ import { BEDROCK_AVAILABLE, _BedrockModule } from "./providers/bedrock.js";
4
+ import { GEMINI_AVAILABLE, _GeminiModule } from "./providers/gemini.js";
5
+ import { MISTRAL_AVAILABLE, _MistralModule } from "./providers/mistral.js";
6
+ import { OPENAI_AVAILABLE, _OpenAIModule } from "./providers/openai.js";
7
+
8
+ //#region src/patching.ts
9
+ var PatchOwnershipError = class extends Error {};
10
+ const _activePatches = [];
11
+ const _patchedProviders = /* @__PURE__ */ new Set();
12
+ const _providerOwners = /* @__PURE__ */ new Map();
13
+ function patchedProviders() {
14
+ return [..._patchedProviders];
15
+ }
16
+ function _isMethodPatched(target, methodName) {
17
+ return target[methodName]?.__amplitudePatched === true;
18
+ }
19
+ function _patchMethod(target, methodName, wrapper, providerName) {
20
+ const original = target[methodName];
21
+ if (typeof original !== "function") return;
22
+ if (_isMethodPatched(target, methodName)) return;
23
+ const patched = function(...args) {
24
+ return wrapper(original.bind(this), ...args);
25
+ };
26
+ patched.__amplitudePatched = true;
27
+ target[methodName] = patched;
28
+ _activePatches.push({
29
+ module: target,
30
+ method: methodName,
31
+ original,
32
+ provider: providerName
33
+ });
34
+ _patchedProviders.add(providerName);
35
+ }
36
+ function _assertPatchOwner(providerName, ai) {
37
+ const existingOwner = _providerOwners.get(providerName);
38
+ if (existingOwner == null) {
39
+ _providerOwners.set(providerName, ai);
40
+ return;
41
+ }
42
+ if (existingOwner !== ai) throw new PatchOwnershipError(`Provider "${providerName}" is already patched by another AmplitudeAI instance. Call unpatch() before patching with a different instance.`);
43
+ }
44
+ function patchOpenAI(options) {
45
+ const { amplitudeAI } = options;
46
+ const mod = options.module ?? _OpenAIModule;
47
+ if (mod == null) throw new Error("openai package is not installed. Install it with: npm install openai — or pass the module via the modules option.");
48
+ _assertPatchOwner("openai", amplitudeAI);
49
+ if (_patchOpenAIClass(mod.OpenAI, mod, "OpenAI", amplitudeAI, "openai")) _patchedProviders.add("openai");
50
+ }
51
+ function patchAnthropic(options) {
52
+ const { amplitudeAI } = options;
53
+ const mod = options.module ?? _AnthropicModule;
54
+ if (mod == null) throw new Error("@anthropic-ai/sdk package is not installed. Install it with: npm install @anthropic-ai/sdk — or pass the module via the modules option.");
55
+ _assertPatchOwner("anthropic", amplitudeAI);
56
+ const AnthropicClass = mod.Anthropic;
57
+ if (!AnthropicClass?.prototype) return;
58
+ let didPatch = false;
59
+ const messagesProto = _getNestedPrototype(AnthropicClass, ["messages"]);
60
+ if (messagesProto) {
61
+ const target = messagesProto;
62
+ _patchMethod(target, "create", _makeCompletionWrapper(amplitudeAI, "anthropic"), "anthropic");
63
+ _patchMethod(target, "stream", _makeAnthropicStreamWrapper(amplitudeAI), "anthropic");
64
+ didPatch = _isMethodPatched(target, "create") || _isMethodPatched(target, "stream");
65
+ }
66
+ if (didPatch) _patchedProviders.add("anthropic");
67
+ }
68
+ function patchAzureOpenAI(options) {
69
+ const { amplitudeAI } = options;
70
+ const mod = options.module ?? _OpenAIModule;
71
+ if (mod == null) throw new Error("openai package is not installed. Install it with: npm install openai — or pass the module via the modules option.");
72
+ _assertPatchOwner("azure-openai", amplitudeAI);
73
+ if (_patchOpenAIClass(mod.AzureOpenAI, mod, "AzureOpenAI", amplitudeAI, "azure-openai")) _patchedProviders.add("azure-openai");
74
+ }
75
+ function patchGemini(options) {
76
+ const { amplitudeAI } = options;
77
+ const mod = options.module ?? _GeminiModule;
78
+ if (mod == null) throw new Error("@google/generative-ai is not installed. Install it with: npm install @google/generative-ai — or pass the module via the modules option.");
79
+ _assertPatchOwner("gemini", amplitudeAI);
80
+ const GeminiClass = mod.GoogleGenerativeAI;
81
+ if (!GeminiClass?.prototype) return;
82
+ const proto = GeminiClass.prototype;
83
+ _patchMethod(proto, "getGenerativeModel", (original, ...args) => {
84
+ const modelObj = original(...args);
85
+ if (modelObj == null || typeof modelObj !== "object") return modelObj;
86
+ const model = modelObj;
87
+ if (typeof model.generateContent === "function" && !(model.generateContent.__amplitudePatched === true)) _patchMethod(model, "generateContent", (innerOriginal, ...innerArgs) => {
88
+ const startTime = performance.now();
89
+ const result = innerOriginal(...innerArgs);
90
+ if (result instanceof Promise) return result.then((response) => {
91
+ _trackGeminiResponse(amplitudeAI, response, startTime);
92
+ return response;
93
+ }).catch((err) => {
94
+ _trackCompletionError(amplitudeAI, err, startTime, innerArgs[0], "gemini");
95
+ throw err;
96
+ });
97
+ return result;
98
+ }, "gemini");
99
+ if (typeof model.generateContentStream === "function" && !(model.generateContentStream.__amplitudePatched === true)) _patchMethod(model, "generateContentStream", (innerOriginal, ...innerArgs) => {
100
+ const startTime = performance.now();
101
+ const result = innerOriginal(...innerArgs);
102
+ if (result instanceof Promise) return result.then((response) => {
103
+ const streamResp = response;
104
+ const stream = streamResp.stream;
105
+ if (_isAsyncIterable(stream)) return {
106
+ ...streamResp,
107
+ stream: _wrapPatchedStream(amplitudeAI, stream, startTime, innerArgs[0], "gemini")
108
+ };
109
+ return response;
110
+ }).catch((err) => {
111
+ _trackCompletionError(amplitudeAI, err, startTime, innerArgs[0], "gemini");
112
+ throw err;
113
+ });
114
+ return result;
115
+ }, "gemini");
116
+ return modelObj;
117
+ }, "gemini");
118
+ if (_isMethodPatched(proto, "getGenerativeModel")) _patchedProviders.add("gemini");
119
+ }
120
+ function patchMistral(options) {
121
+ const { amplitudeAI } = options;
122
+ const mod = options.module ?? _MistralModule;
123
+ if (mod == null) throw new Error("@mistralai/mistralai is not installed. Install it with: npm install @mistralai/mistralai — or pass the module via the modules option.");
124
+ _assertPatchOwner("mistral", amplitudeAI);
125
+ const MistralClass = mod.Mistral ?? mod.MistralClient ?? mod.default;
126
+ if (!MistralClass?.prototype) return;
127
+ const chatProto = _getNestedPrototype(MistralClass, ["chat"]);
128
+ let didPatch = false;
129
+ if (chatProto) {
130
+ const target = chatProto;
131
+ _patchMethod(target, "complete", _makeCompletionWrapper(amplitudeAI, "mistral"), "mistral");
132
+ _patchMethod(target, "stream", _makeCompletionWrapper(amplitudeAI, "mistral"), "mistral");
133
+ didPatch = _isMethodPatched(target, "complete") || _isMethodPatched(target, "stream");
134
+ }
135
+ if (didPatch) _patchedProviders.add("mistral");
136
+ }
137
+ function patchBedrock(options) {
138
+ const { amplitudeAI } = options;
139
+ const mod = options.module ?? _BedrockModule;
140
+ if (mod == null) throw new Error("@aws-sdk/client-bedrock-runtime is not installed. Install it with: npm install @aws-sdk/client-bedrock-runtime — or pass the module via the modules option.");
141
+ _assertPatchOwner("bedrock", amplitudeAI);
142
+ const ClientClass = mod.BedrockRuntimeClient;
143
+ if (!ClientClass?.prototype) return;
144
+ _patchMethod(ClientClass.prototype, "send", (original, ...args) => {
145
+ const command = args[0];
146
+ const commandName = String(command?.constructor?.name ?? "");
147
+ const shouldTrack = commandName.includes("ConverseCommand") || commandName.includes("ConverseStreamCommand");
148
+ const startTime = performance.now();
149
+ const result = original(...args);
150
+ if (result instanceof Promise) return result.then((response) => {
151
+ if (!shouldTrack) return response;
152
+ if (commandName.includes("ConverseStreamCommand")) {
153
+ const streamResp = response;
154
+ const stream = streamResp.stream;
155
+ if (_isAsyncIterable(stream)) return {
156
+ ...streamResp,
157
+ stream: _wrapPatchedBedrockStream(amplitudeAI, stream, startTime, args[0])
158
+ };
159
+ } else _trackBedrockResponse(amplitudeAI, response, startTime, args[0]);
160
+ return response;
161
+ }).catch((err) => {
162
+ if (shouldTrack) _trackCompletionError(amplitudeAI, err, startTime, args[0], "bedrock");
163
+ throw err;
164
+ });
165
+ return result;
166
+ }, "bedrock");
167
+ if (_isMethodPatched(ClientClass.prototype, "send")) _patchedProviders.add("bedrock");
168
+ }
169
+ /**
170
+ * Auto-detects installed provider SDKs and patches each supported surface.
171
+ *
172
+ * Returns the list of provider names that were successfully patched.
173
+ * Ownership conflicts (same provider patched by a different `AmplitudeAI` instance)
174
+ * throw immediately to prevent ambiguous instrumentation state.
175
+ *
176
+ * In bundler environments where `tryRequire` cannot resolve modules, pass them
177
+ * explicitly via `modules`:
178
+ * ```ts
179
+ * import OpenAI from 'openai';
180
+ * import Anthropic from '@anthropic-ai/sdk';
181
+ * patch({ amplitudeAI: ai, modules: { openai: OpenAI, anthropic: Anthropic } });
182
+ * ```
183
+ */
184
+ function patch(options) {
185
+ const patched = [];
186
+ const mods = options.modules ?? {};
187
+ const providers = [
188
+ {
189
+ fn: patchOpenAI,
190
+ available: OPENAI_AVAILABLE || mods.openai != null,
191
+ name: "openai",
192
+ moduleKey: "openai"
193
+ },
194
+ {
195
+ fn: patchAzureOpenAI,
196
+ available: OPENAI_AVAILABLE || mods.openai != null,
197
+ name: "azure-openai",
198
+ moduleKey: "openai"
199
+ },
200
+ {
201
+ fn: patchAnthropic,
202
+ available: ANTHROPIC_AVAILABLE || mods.anthropic != null,
203
+ name: "anthropic",
204
+ moduleKey: "anthropic"
205
+ },
206
+ {
207
+ fn: patchGemini,
208
+ available: GEMINI_AVAILABLE || mods.gemini != null,
209
+ name: "gemini",
210
+ moduleKey: "gemini"
211
+ },
212
+ {
213
+ fn: patchMistral,
214
+ available: MISTRAL_AVAILABLE || mods.mistral != null,
215
+ name: "mistral",
216
+ moduleKey: "mistral"
217
+ },
218
+ {
219
+ fn: patchBedrock,
220
+ available: BEDROCK_AVAILABLE || mods.bedrock != null,
221
+ name: "bedrock",
222
+ moduleKey: "bedrock"
223
+ }
224
+ ];
225
+ for (const { fn, available, name, moduleKey } of providers) {
226
+ if (!available) continue;
227
+ try {
228
+ fn({
229
+ amplitudeAI: options.amplitudeAI,
230
+ module: mods[moduleKey]
231
+ });
232
+ if (_patchedProviders.has(name)) patched.push(name);
233
+ } catch (error) {
234
+ if (error instanceof PatchOwnershipError) throw error;
235
+ }
236
+ }
237
+ return patched;
238
+ }
239
+ function unpatch() {
240
+ for (const record of _activePatches.reverse()) {
241
+ const target = record.module;
242
+ target[record.method] = record.original;
243
+ }
244
+ _activePatches.length = 0;
245
+ _patchedProviders.clear();
246
+ _providerOwners.clear();
247
+ }
248
+ function unpatchOpenAI() {
249
+ _unpatchByProvider("openai");
250
+ }
251
+ function unpatchAnthropic() {
252
+ _unpatchByProvider("anthropic");
253
+ }
254
+ function unpatchGemini() {
255
+ _unpatchByProvider("gemini");
256
+ }
257
+ function unpatchMistral() {
258
+ _unpatchByProvider("mistral");
259
+ }
260
+ function unpatchBedrock() {
261
+ _unpatchByProvider("bedrock");
262
+ }
263
+ function unpatchAzureOpenAI() {
264
+ _unpatchByProvider("azure-openai");
265
+ }
266
+ function _unpatchByProvider(providerName) {
267
+ const toRemove = [];
268
+ for (let i = _activePatches.length - 1; i >= 0; i--) {
269
+ const record = _activePatches[i];
270
+ if (record == null) continue;
271
+ if (record.provider === providerName) {
272
+ const target = record.module;
273
+ target[record.method] = record.original;
274
+ toRemove.push(i);
275
+ }
276
+ }
277
+ for (const idx of toRemove) _activePatches.splice(idx, 1);
278
+ _patchedProviders.delete(providerName);
279
+ _providerOwners.delete(providerName);
280
+ }
281
+ function _makeCompletionWrapper(amplitudeAI, providerName) {
282
+ return (original, ...args) => {
283
+ const startTime = performance.now();
284
+ const result = original(...args);
285
+ if (result instanceof Promise) return result.then((response) => {
286
+ if (_isAsyncIterable(response)) {
287
+ if (providerName === "anthropic") return _wrapPatchedAnthropicStream(amplitudeAI, response, startTime, args[0]);
288
+ return _wrapPatchedStream(amplitudeAI, response, startTime, args[0], providerName);
289
+ }
290
+ if (providerName === "anthropic") _trackAnthropicResponse(amplitudeAI, response, startTime, args[0]);
291
+ else _trackCompletionResponse(amplitudeAI, response, startTime, args[0], providerName);
292
+ return response;
293
+ }).catch((err) => {
294
+ _trackCompletionError(amplitudeAI, err, startTime, args[0], providerName);
295
+ throw err;
296
+ });
297
+ return result;
298
+ };
299
+ }
300
+ function _makeAnthropicStreamWrapper(amplitudeAI) {
301
+ return (original, ...args) => {
302
+ const startTime = performance.now();
303
+ const result = original(...args);
304
+ if (!(result instanceof Promise)) return result;
305
+ return result.then((response) => {
306
+ if (_isAsyncIterable(response)) return _wrapPatchedAnthropicStream(amplitudeAI, response, startTime, args[0]);
307
+ const respObj = response;
308
+ const stream = respObj.stream;
309
+ if (_isAsyncIterable(stream)) return {
310
+ ...respObj,
311
+ stream: _wrapPatchedAnthropicStream(amplitudeAI, stream, startTime, args[0])
312
+ };
313
+ return response;
314
+ }).catch((err) => {
315
+ _trackCompletionError(amplitudeAI, err, startTime, args[0], "anthropic");
316
+ throw err;
317
+ });
318
+ };
319
+ }
320
+ function _isAsyncIterable(value) {
321
+ return value != null && typeof value[Symbol.asyncIterator] === "function";
322
+ }
323
+ async function* _wrapPatchedStream(ai, stream, startTime, requestOpts, providerName) {
324
+ if (providerName === "gemini") {
325
+ yield* _wrapPatchedGeminiStream(ai, stream, startTime, requestOpts);
326
+ return;
327
+ }
328
+ const ctx = getActiveContext();
329
+ if (ctx == null) {
330
+ yield* stream;
331
+ return;
332
+ }
333
+ let content = "";
334
+ let model = "unknown";
335
+ let finishReason = "";
336
+ let inputTokens;
337
+ let outputTokens;
338
+ let totalTokens;
339
+ let isError = false;
340
+ let errorMessage;
341
+ try {
342
+ for await (const chunk of stream) {
343
+ const c = chunk;
344
+ const choices = c.choices;
345
+ const delta = choices?.[0]?.delta;
346
+ if (delta?.content != null) content += String(delta.content);
347
+ if (c.model != null) model = String(c.model);
348
+ if (choices?.[0]?.finish_reason != null) finishReason = String(choices[0].finish_reason);
349
+ const usage = c.usage;
350
+ if (usage != null) {
351
+ inputTokens = usage.prompt_tokens;
352
+ outputTokens = usage.completion_tokens;
353
+ totalTokens = usage.total_tokens;
354
+ }
355
+ yield chunk;
356
+ }
357
+ } catch (error) {
358
+ isError = true;
359
+ errorMessage = error instanceof Error ? error.message : String(error);
360
+ throw error;
361
+ } finally {
362
+ const latencyMs = performance.now() - startTime;
363
+ ai.trackAiMessage({
364
+ userId: ctx.userId ?? "unknown",
365
+ content,
366
+ sessionId: ctx.sessionId,
367
+ model,
368
+ provider: providerName,
369
+ latencyMs,
370
+ traceId: ctx.traceId,
371
+ inputTokens,
372
+ outputTokens,
373
+ totalTokens,
374
+ finishReason,
375
+ agentId: ctx.agentId,
376
+ env: ctx.env,
377
+ isStreaming: true,
378
+ isError,
379
+ errorMessage,
380
+ ..._contextExtras(ctx)
381
+ });
382
+ }
383
+ }
384
+ async function* _wrapPatchedAnthropicStream(ai, stream, startTime, requestOpts) {
385
+ const ctx = getActiveContext();
386
+ if (ctx == null) {
387
+ yield* stream;
388
+ return;
389
+ }
390
+ const req = requestOpts;
391
+ let content = "";
392
+ let model = String(req?.model ?? "unknown");
393
+ let finishReason = "";
394
+ let inputTokens;
395
+ let outputTokens;
396
+ let isError = false;
397
+ let errorMessage;
398
+ try {
399
+ for await (const chunk of stream) {
400
+ const c = chunk;
401
+ if (c.type === "message_start") {
402
+ const message = c.message;
403
+ if (typeof message?.model === "string") model = message.model;
404
+ const usage = message?.usage;
405
+ if (typeof usage?.input_tokens === "number") inputTokens = usage.input_tokens;
406
+ }
407
+ if (c.type === "content_block_delta") {
408
+ const delta = c.delta;
409
+ if (typeof delta?.text === "string") content += delta.text;
410
+ }
411
+ if (c.type === "message_delta") {
412
+ const delta = c.delta;
413
+ if (typeof delta?.stop_reason === "string") finishReason = delta.stop_reason;
414
+ else if (typeof c.stop_reason === "string") finishReason = c.stop_reason;
415
+ const usage = c.usage;
416
+ if (typeof usage?.output_tokens === "number") outputTokens = usage.output_tokens;
417
+ }
418
+ if (c.type === "message_stop") {
419
+ const usage = c.usage;
420
+ if (typeof usage?.output_tokens === "number") outputTokens = usage.output_tokens;
421
+ }
422
+ yield chunk;
423
+ }
424
+ } catch (error) {
425
+ isError = true;
426
+ errorMessage = error instanceof Error ? error.message : String(error);
427
+ throw error;
428
+ } finally {
429
+ const latencyMs = performance.now() - startTime;
430
+ ai.trackAiMessage({
431
+ userId: ctx.userId ?? "unknown",
432
+ content,
433
+ sessionId: ctx.sessionId,
434
+ model,
435
+ provider: "anthropic",
436
+ latencyMs,
437
+ traceId: ctx.traceId,
438
+ inputTokens,
439
+ outputTokens,
440
+ finishReason,
441
+ agentId: ctx.agentId,
442
+ env: ctx.env,
443
+ isStreaming: true,
444
+ isError,
445
+ errorMessage,
446
+ ..._contextExtras(ctx)
447
+ });
448
+ }
449
+ }
450
+ async function* _wrapPatchedGeminiStream(ai, stream, startTime, _requestOpts) {
451
+ const ctx = getActiveContext();
452
+ if (ctx == null) {
453
+ yield* stream;
454
+ return;
455
+ }
456
+ let content = "";
457
+ const model = "gemini";
458
+ let finishReason = "";
459
+ let inputTokens;
460
+ let outputTokens;
461
+ let totalTokens;
462
+ let isError = false;
463
+ let errorMessage;
464
+ try {
465
+ for await (const chunk of stream) {
466
+ const c = chunk;
467
+ const respObj = c.response ?? c;
468
+ const textFn = respObj.text;
469
+ if (typeof textFn === "function") content += String(textFn());
470
+ const usage = respObj.usageMetadata;
471
+ if (typeof usage?.promptTokenCount === "number") inputTokens = usage.promptTokenCount;
472
+ if (typeof usage?.candidatesTokenCount === "number") outputTokens = usage.candidatesTokenCount;
473
+ if (typeof usage?.totalTokenCount === "number") totalTokens = usage.totalTokenCount;
474
+ const candidates = respObj.candidates;
475
+ if (typeof candidates?.[0]?.finishReason === "string") finishReason = candidates[0].finishReason;
476
+ yield chunk;
477
+ }
478
+ } catch (error) {
479
+ isError = true;
480
+ errorMessage = error instanceof Error ? error.message : String(error);
481
+ throw error;
482
+ } finally {
483
+ ai.trackAiMessage({
484
+ userId: ctx.userId ?? "unknown",
485
+ content,
486
+ sessionId: ctx.sessionId,
487
+ model,
488
+ provider: "gemini",
489
+ latencyMs: performance.now() - startTime,
490
+ traceId: ctx.traceId,
491
+ inputTokens,
492
+ outputTokens,
493
+ totalTokens,
494
+ finishReason,
495
+ agentId: ctx.agentId,
496
+ env: ctx.env,
497
+ isStreaming: true,
498
+ isError,
499
+ errorMessage,
500
+ ..._contextExtras(ctx)
501
+ });
502
+ }
503
+ }
504
+ async function* _wrapPatchedBedrockStream(ai, stream, startTime, requestOpts) {
505
+ const ctx = getActiveContext();
506
+ if (ctx == null) {
507
+ yield* stream;
508
+ return;
509
+ }
510
+ const opts = requestOpts;
511
+ let model = String(opts?.modelId ?? "unknown");
512
+ let content = "";
513
+ let finishReason = "";
514
+ let inputTokens;
515
+ let outputTokens;
516
+ let totalTokens;
517
+ let isError = false;
518
+ let errorMessage;
519
+ try {
520
+ for await (const rawEvent of stream) {
521
+ const event = rawEvent;
522
+ const delta = event.contentBlockDelta?.delta;
523
+ if (typeof delta?.text === "string") content += delta.text;
524
+ const messageStart = event.messageStart;
525
+ if (typeof messageStart?.model === "string") model = messageStart.model;
526
+ const messageStop = event.messageStop;
527
+ if (typeof messageStop?.stopReason === "string") finishReason = messageStop.stopReason;
528
+ const usage = event.metadata?.usage;
529
+ if (typeof usage?.inputTokens === "number") inputTokens = usage.inputTokens;
530
+ if (typeof usage?.outputTokens === "number") outputTokens = usage.outputTokens;
531
+ if (typeof usage?.totalTokens === "number") totalTokens = usage.totalTokens;
532
+ yield rawEvent;
533
+ }
534
+ } catch (error) {
535
+ isError = true;
536
+ errorMessage = error instanceof Error ? error.message : String(error);
537
+ throw error;
538
+ } finally {
539
+ ai.trackAiMessage({
540
+ userId: ctx.userId ?? "unknown",
541
+ content,
542
+ sessionId: ctx.sessionId,
543
+ model,
544
+ provider: "bedrock",
545
+ latencyMs: performance.now() - startTime,
546
+ traceId: ctx.traceId,
547
+ inputTokens,
548
+ outputTokens,
549
+ totalTokens,
550
+ finishReason,
551
+ agentId: ctx.agentId,
552
+ env: ctx.env,
553
+ isStreaming: true,
554
+ isError,
555
+ errorMessage,
556
+ ..._contextExtras(ctx)
557
+ });
558
+ }
559
+ }
560
+ function _patchConstructor(cls, moduleExports, exportKey, amplitudeAI, providerName) {
561
+ if (moduleExports[exportKey]?.__amplitudeCtorPatched === true) return;
562
+ const originalCtor = cls;
563
+ const proxy = new Proxy(originalCtor, { construct(target, args, newTarget) {
564
+ const instance = Reflect.construct(target, args, newTarget);
565
+ _patchInstanceCompletions(instance, amplitudeAI, providerName);
566
+ return instance;
567
+ } });
568
+ proxy.__amplitudeCtorPatched = true;
569
+ const mod = moduleExports;
570
+ let patchedExportKey = null;
571
+ if (mod[exportKey] === originalCtor) {
572
+ mod[exportKey] = proxy;
573
+ patchedExportKey = exportKey;
574
+ } else for (const key of Object.keys(mod)) if (mod[key] === originalCtor) {
575
+ mod[key] = proxy;
576
+ patchedExportKey = key;
577
+ }
578
+ if (patchedExportKey != null) _activePatches.push({
579
+ module: mod,
580
+ method: patchedExportKey,
581
+ original: originalCtor,
582
+ provider: providerName
583
+ });
584
+ }
585
+ function _patchOpenAIClass(maybeClass, moduleExports, exportKey, amplitudeAI, providerName) {
586
+ const OpenAIClass = maybeClass;
587
+ if (!OpenAIClass?.prototype) return false;
588
+ const completionsProto = _getNestedPrototype(OpenAIClass, ["chat", "completions"]);
589
+ if (completionsProto) {
590
+ const target = completionsProto;
591
+ _patchMethod(target, "create", _makeCompletionWrapper(amplitudeAI, providerName), providerName);
592
+ _patchMethod(target, "parse", _makeCompletionWrapper(amplitudeAI, providerName), providerName);
593
+ } else _patchConstructor(OpenAIClass, moduleExports, exportKey, amplitudeAI, providerName);
594
+ const responsesProto = _getNestedPrototype(OpenAIClass, ["responses"]);
595
+ if (responsesProto) {
596
+ const target = responsesProto;
597
+ _patchMethod(target, "create", _makeResponsesWrapper(amplitudeAI, providerName), providerName);
598
+ _patchMethod(target, "stream", _makeResponsesWrapper(amplitudeAI, providerName), providerName);
599
+ }
600
+ return true;
601
+ }
602
+ function _patchInstanceCompletions(instance, amplitudeAI, providerName) {
603
+ try {
604
+ const completions = instance.chat?.completions;
605
+ if (completions && typeof completions.create === "function") {
606
+ const original = completions.create.bind(completions);
607
+ completions.create = (...args) => _makeCompletionWrapper(amplitudeAI, providerName)(original, ...args);
608
+ }
609
+ if (completions && typeof completions.parse === "function") {
610
+ const originalParse = completions.parse.bind(completions);
611
+ completions.parse = (...args) => _makeCompletionWrapper(amplitudeAI, providerName)(originalParse, ...args);
612
+ }
613
+ const responses = instance.responses;
614
+ if (responses && typeof responses.create === "function") {
615
+ const originalResponses = responses.create.bind(responses);
616
+ responses.create = (...args) => _makeResponsesWrapper(amplitudeAI, providerName)(originalResponses, ...args);
617
+ }
618
+ if (responses && typeof responses.stream === "function") {
619
+ const originalResponsesStream = responses.stream.bind(responses);
620
+ responses.stream = (...args) => _makeResponsesWrapper(amplitudeAI, providerName)(originalResponsesStream, ...args);
621
+ }
622
+ } catch {}
623
+ }
624
+ function _makeResponsesWrapper(amplitudeAI, providerName) {
625
+ return (original, ...args) => {
626
+ const startTime = performance.now();
627
+ const result = original(...args);
628
+ if (result instanceof Promise) return result.then((response) => {
629
+ if (_isAsyncIterable(response)) return _wrapPatchedResponsesStream(amplitudeAI, response, startTime, args[0], providerName);
630
+ _trackResponsesResponse(amplitudeAI, response, startTime, args[0], providerName);
631
+ return response;
632
+ }).catch((err) => {
633
+ _trackCompletionError(amplitudeAI, err, startTime, args[0], providerName);
634
+ throw err;
635
+ });
636
+ return result;
637
+ };
638
+ }
639
+ function _getNestedPrototype(cls, path) {
640
+ let current = cls.prototype;
641
+ for (const key of path) {
642
+ if (current == null || typeof current !== "object") return null;
643
+ const obj = current;
644
+ if (typeof obj[key] === "object" && obj[key] != null) current = obj[key];
645
+ else return null;
646
+ }
647
+ return current;
648
+ }
649
+ function _trackCompletionResponse(ai, response, startTime, _requestOpts, providerName) {
650
+ if (response == null || typeof response !== "object") return;
651
+ const ctx = getActiveContext();
652
+ if (ctx == null) return;
653
+ const resp = response;
654
+ const usage = resp.usage;
655
+ const choice = resp.choices?.[0];
656
+ const message = choice?.message;
657
+ const latencyMs = performance.now() - startTime;
658
+ ai.trackAiMessage({
659
+ userId: ctx.userId ?? "unknown",
660
+ content: String(message?.content ?? ""),
661
+ sessionId: ctx.sessionId,
662
+ model: String(resp.model ?? "unknown"),
663
+ provider: providerName,
664
+ latencyMs,
665
+ traceId: ctx.traceId,
666
+ inputTokens: usage?.prompt_tokens,
667
+ outputTokens: usage?.completion_tokens,
668
+ totalTokens: usage?.total_tokens,
669
+ finishReason: String(choice?.finish_reason ?? ""),
670
+ agentId: ctx.agentId,
671
+ env: ctx.env,
672
+ ..._contextExtras(ctx)
673
+ });
674
+ }
675
+ function _trackAnthropicResponse(ai, response, startTime, _requestOpts) {
676
+ if (response == null || typeof response !== "object") return;
677
+ const ctx = getActiveContext();
678
+ if (ctx == null) return;
679
+ const resp = response;
680
+ const usage = resp.usage;
681
+ const textBlock = resp.content?.find((b) => b.type === "text");
682
+ const latencyMs = performance.now() - startTime;
683
+ ai.trackAiMessage({
684
+ userId: ctx.userId ?? "unknown",
685
+ content: String(textBlock?.text ?? ""),
686
+ sessionId: ctx.sessionId,
687
+ model: String(resp.model ?? "unknown"),
688
+ provider: "anthropic",
689
+ latencyMs,
690
+ traceId: ctx.traceId,
691
+ inputTokens: usage?.input_tokens,
692
+ outputTokens: usage?.output_tokens,
693
+ finishReason: String(resp.stop_reason ?? ""),
694
+ agentId: ctx.agentId,
695
+ env: ctx.env,
696
+ ..._contextExtras(ctx)
697
+ });
698
+ }
699
+ function _trackCompletionError(ai, error, startTime, requestOpts, providerName) {
700
+ const ctx = getActiveContext();
701
+ if (ctx == null) return;
702
+ const opts = requestOpts;
703
+ const latencyMs = performance.now() - startTime;
704
+ ai.trackAiMessage({
705
+ userId: ctx.userId ?? "unknown",
706
+ content: "",
707
+ sessionId: ctx.sessionId,
708
+ model: String(opts?.model ?? opts?.modelId ?? "unknown"),
709
+ provider: providerName,
710
+ latencyMs,
711
+ traceId: ctx.traceId,
712
+ isError: true,
713
+ errorMessage: error instanceof Error ? error.message : String(error),
714
+ agentId: ctx.agentId,
715
+ env: ctx.env,
716
+ ..._contextExtras(ctx)
717
+ });
718
+ }
719
+ function _trackGeminiResponse(ai, response, startTime) {
720
+ if (response == null || typeof response !== "object") return;
721
+ const ctx = getActiveContext();
722
+ if (ctx == null) return;
723
+ const resp = response;
724
+ const respObj = resp.response ?? resp;
725
+ const text = typeof respObj.text === "function" ? String(respObj.text()) : "";
726
+ const usage = respObj.usageMetadata;
727
+ const latencyMs = performance.now() - startTime;
728
+ ai.trackAiMessage({
729
+ userId: ctx.userId ?? "unknown",
730
+ content: text,
731
+ sessionId: ctx.sessionId,
732
+ model: "gemini",
733
+ provider: "gemini",
734
+ latencyMs,
735
+ traceId: ctx.traceId,
736
+ inputTokens: usage?.promptTokenCount,
737
+ outputTokens: usage?.candidatesTokenCount,
738
+ totalTokens: usage?.totalTokenCount,
739
+ agentId: ctx.agentId,
740
+ env: ctx.env,
741
+ ..._contextExtras(ctx)
742
+ });
743
+ }
744
+ function _trackBedrockResponse(ai, response, startTime, requestOpts) {
745
+ if (response == null || typeof response !== "object") return;
746
+ const ctx = getActiveContext();
747
+ if (ctx == null) return;
748
+ const resp = response;
749
+ const textBlock = ((resp.output?.message)?.content)?.find((b) => b.text != null);
750
+ const usage = resp.usage;
751
+ const opts = requestOpts;
752
+ const latencyMs = performance.now() - startTime;
753
+ ai.trackAiMessage({
754
+ userId: ctx.userId ?? "unknown",
755
+ content: String(textBlock?.text ?? ""),
756
+ sessionId: ctx.sessionId,
757
+ model: String(opts?.modelId ?? "unknown"),
758
+ provider: "bedrock",
759
+ latencyMs,
760
+ traceId: ctx.traceId,
761
+ inputTokens: usage?.inputTokens,
762
+ outputTokens: usage?.outputTokens,
763
+ totalTokens: usage?.totalTokens,
764
+ finishReason: String(resp.stopReason ?? ""),
765
+ agentId: ctx.agentId,
766
+ env: ctx.env,
767
+ ..._contextExtras(ctx)
768
+ });
769
+ }
770
+ function _trackResponsesResponse(ai, response, startTime, requestOpts, providerName) {
771
+ if (response == null || typeof response !== "object") return;
772
+ const ctx = getActiveContext();
773
+ if (ctx == null) return;
774
+ const resp = response;
775
+ const usage = resp.usage;
776
+ const outputText = typeof resp.output_text === "string" ? resp.output_text : _extractResponsesText(resp.output);
777
+ const opts = requestOpts;
778
+ ai.trackAiMessage({
779
+ userId: ctx.userId ?? "unknown",
780
+ content: outputText,
781
+ sessionId: ctx.sessionId,
782
+ model: String(resp.model ?? opts?.model ?? "unknown"),
783
+ provider: providerName,
784
+ latencyMs: performance.now() - startTime,
785
+ traceId: ctx.traceId,
786
+ inputTokens: typeof usage?.input_tokens === "number" ? usage.input_tokens : void 0,
787
+ outputTokens: typeof usage?.output_tokens === "number" ? usage.output_tokens : void 0,
788
+ totalTokens: typeof usage?.total_tokens === "number" ? usage.total_tokens : void 0,
789
+ reasoningTokens: typeof (usage?.output_tokens_details)?.reasoning_tokens === "number" ? (usage?.output_tokens_details).reasoning_tokens : void 0,
790
+ finishReason: _extractResponsesFinishReason(resp),
791
+ agentId: ctx.agentId,
792
+ env: ctx.env,
793
+ ..._contextExtras(ctx)
794
+ });
795
+ }
796
+ async function* _wrapPatchedResponsesStream(ai, stream, startTime, requestOpts, providerName) {
797
+ const ctx = getActiveContext();
798
+ if (ctx == null) {
799
+ yield* stream;
800
+ return;
801
+ }
802
+ const opts = requestOpts;
803
+ const model = String(opts?.model ?? "unknown");
804
+ let content = "";
805
+ let finishReason = "";
806
+ let inputTokens;
807
+ let outputTokens;
808
+ let totalTokens;
809
+ let isError = false;
810
+ let errorMessage;
811
+ try {
812
+ for await (const event of stream) {
813
+ const e = event;
814
+ const type = e.type;
815
+ if (type === "response.output_text.delta") {
816
+ const delta = e.delta;
817
+ if (typeof delta === "string") content += delta;
818
+ } else if (type === "response.completed") {
819
+ const response = e.response;
820
+ const usage = response?.usage;
821
+ const outputText = response?.output_text;
822
+ if (typeof outputText === "string" && outputText.length > 0) content = outputText;
823
+ if (typeof usage?.input_tokens === "number") inputTokens = usage.input_tokens;
824
+ if (typeof usage?.output_tokens === "number") outputTokens = usage.output_tokens;
825
+ if (typeof usage?.total_tokens === "number") totalTokens = usage.total_tokens;
826
+ const status = response?.status;
827
+ if (typeof status === "string") finishReason = status;
828
+ }
829
+ yield event;
830
+ }
831
+ } catch (error) {
832
+ isError = true;
833
+ errorMessage = error instanceof Error ? error.message : String(error);
834
+ throw error;
835
+ } finally {
836
+ ai.trackAiMessage({
837
+ userId: ctx.userId ?? "unknown",
838
+ content,
839
+ sessionId: ctx.sessionId,
840
+ model,
841
+ provider: providerName,
842
+ latencyMs: performance.now() - startTime,
843
+ traceId: ctx.traceId,
844
+ inputTokens,
845
+ outputTokens,
846
+ totalTokens,
847
+ finishReason,
848
+ agentId: ctx.agentId,
849
+ env: ctx.env,
850
+ isStreaming: true,
851
+ isError,
852
+ errorMessage,
853
+ ..._contextExtras(ctx)
854
+ });
855
+ }
856
+ }
857
+ function _extractResponsesText(output) {
858
+ if (!Array.isArray(output)) return "";
859
+ let text = "";
860
+ for (const item of output) {
861
+ if (item == null || typeof item !== "object") continue;
862
+ const content = item.content;
863
+ if (!Array.isArray(content)) continue;
864
+ for (const part of content) {
865
+ if (part == null || typeof part !== "object") continue;
866
+ const partText = part.text;
867
+ if (typeof partText === "string") text += partText;
868
+ }
869
+ }
870
+ return text;
871
+ }
872
+ function _extractResponsesFinishReason(response) {
873
+ if (typeof response.status === "string" && response.status.length > 0) return response.status;
874
+ const output = response.output;
875
+ if (!Array.isArray(output) || output.length === 0) return void 0;
876
+ const first = output[0];
877
+ return typeof first?.status === "string" ? first.status : void 0;
878
+ }
879
+ function _contextExtras(ctx) {
880
+ return {
881
+ parentAgentId: ctx.parentAgentId ?? void 0,
882
+ customerOrgId: ctx.customerOrgId ?? void 0,
883
+ agentVersion: ctx.agentVersion ?? void 0,
884
+ context: ctx.context ?? void 0,
885
+ groups: ctx.groups ?? void 0
886
+ };
887
+ }
888
+
889
+ //#endregion
890
+ export { patch, patchAnthropic, patchAzureOpenAI, patchBedrock, patchGemini, patchMistral, patchOpenAI, patchedProviders, unpatch, unpatchAnthropic, unpatchAzureOpenAI, unpatchBedrock, unpatchGemini, unpatchMistral, unpatchOpenAI };
891
+ //# sourceMappingURL=patching.js.map