@dimivelev/chimera 0.78.1 → 0.78.2

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 (985) hide show
  1. package/npm-shrinkwrap.json +2 -2
  2. package/package.json +1 -6
  3. package/node_modules/@anthropic-ai/sdk/CHANGELOG.md +0 -1677
  4. package/node_modules/@anthropic-ai/sdk/LICENSE +0 -8
  5. package/node_modules/@anthropic-ai/sdk/README.md +0 -674
  6. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.mts +0 -3
  7. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.mts.map +0 -1
  8. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.ts +0 -3
  9. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.ts.map +0 -1
  10. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js +0 -226
  11. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js.map +0 -1
  12. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs +0 -223
  13. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs.map +0 -1
  14. package/node_modules/@anthropic-ai/sdk/api-promise.d.mts +0 -2
  15. package/node_modules/@anthropic-ai/sdk/api-promise.d.mts.map +0 -1
  16. package/node_modules/@anthropic-ai/sdk/api-promise.d.ts +0 -2
  17. package/node_modules/@anthropic-ai/sdk/api-promise.d.ts.map +0 -1
  18. package/node_modules/@anthropic-ai/sdk/api-promise.js +0 -6
  19. package/node_modules/@anthropic-ai/sdk/api-promise.js.map +0 -1
  20. package/node_modules/@anthropic-ai/sdk/api-promise.mjs +0 -2
  21. package/node_modules/@anthropic-ai/sdk/api-promise.mjs.map +0 -1
  22. package/node_modules/@anthropic-ai/sdk/bin/cli +0 -53
  23. package/node_modules/@anthropic-ai/sdk/bin/migration-config.json +0 -7
  24. package/node_modules/@anthropic-ai/sdk/client.d.mts +0 -225
  25. package/node_modules/@anthropic-ai/sdk/client.d.mts.map +0 -1
  26. package/node_modules/@anthropic-ai/sdk/client.d.ts +0 -225
  27. package/node_modules/@anthropic-ai/sdk/client.d.ts.map +0 -1
  28. package/node_modules/@anthropic-ai/sdk/client.js +0 -536
  29. package/node_modules/@anthropic-ai/sdk/client.js.map +0 -1
  30. package/node_modules/@anthropic-ai/sdk/client.mjs +0 -531
  31. package/node_modules/@anthropic-ai/sdk/client.mjs.map +0 -1
  32. package/node_modules/@anthropic-ai/sdk/core/api-promise.d.mts +0 -49
  33. package/node_modules/@anthropic-ai/sdk/core/api-promise.d.mts.map +0 -1
  34. package/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts +0 -49
  35. package/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts.map +0 -1
  36. package/node_modules/@anthropic-ai/sdk/core/api-promise.js +0 -76
  37. package/node_modules/@anthropic-ai/sdk/core/api-promise.js.map +0 -1
  38. package/node_modules/@anthropic-ai/sdk/core/api-promise.mjs +0 -72
  39. package/node_modules/@anthropic-ai/sdk/core/api-promise.mjs.map +0 -1
  40. package/node_modules/@anthropic-ai/sdk/core/error.d.mts +0 -47
  41. package/node_modules/@anthropic-ai/sdk/core/error.d.mts.map +0 -1
  42. package/node_modules/@anthropic-ai/sdk/core/error.d.ts +0 -47
  43. package/node_modules/@anthropic-ai/sdk/core/error.d.ts.map +0 -1
  44. package/node_modules/@anthropic-ai/sdk/core/error.js +0 -114
  45. package/node_modules/@anthropic-ai/sdk/core/error.js.map +0 -1
  46. package/node_modules/@anthropic-ai/sdk/core/error.mjs +0 -98
  47. package/node_modules/@anthropic-ai/sdk/core/error.mjs.map +0 -1
  48. package/node_modules/@anthropic-ai/sdk/core/pagination.d.mts +0 -63
  49. package/node_modules/@anthropic-ai/sdk/core/pagination.d.mts.map +0 -1
  50. package/node_modules/@anthropic-ai/sdk/core/pagination.d.ts +0 -63
  51. package/node_modules/@anthropic-ai/sdk/core/pagination.d.ts.map +0 -1
  52. package/node_modules/@anthropic-ai/sdk/core/pagination.js +0 -123
  53. package/node_modules/@anthropic-ai/sdk/core/pagination.js.map +0 -1
  54. package/node_modules/@anthropic-ai/sdk/core/pagination.mjs +0 -117
  55. package/node_modules/@anthropic-ai/sdk/core/pagination.mjs.map +0 -1
  56. package/node_modules/@anthropic-ai/sdk/core/resource.d.mts +0 -6
  57. package/node_modules/@anthropic-ai/sdk/core/resource.d.mts.map +0 -1
  58. package/node_modules/@anthropic-ai/sdk/core/resource.d.ts +0 -6
  59. package/node_modules/@anthropic-ai/sdk/core/resource.d.ts.map +0 -1
  60. package/node_modules/@anthropic-ai/sdk/core/resource.js +0 -11
  61. package/node_modules/@anthropic-ai/sdk/core/resource.js.map +0 -1
  62. package/node_modules/@anthropic-ai/sdk/core/resource.mjs +0 -7
  63. package/node_modules/@anthropic-ai/sdk/core/resource.mjs.map +0 -1
  64. package/node_modules/@anthropic-ai/sdk/core/streaming.d.mts +0 -31
  65. package/node_modules/@anthropic-ai/sdk/core/streaming.d.mts.map +0 -1
  66. package/node_modules/@anthropic-ai/sdk/core/streaming.d.ts +0 -31
  67. package/node_modules/@anthropic-ai/sdk/core/streaming.d.ts.map +0 -1
  68. package/node_modules/@anthropic-ai/sdk/core/streaming.js +0 -282
  69. package/node_modules/@anthropic-ai/sdk/core/streaming.js.map +0 -1
  70. package/node_modules/@anthropic-ai/sdk/core/streaming.mjs +0 -277
  71. package/node_modules/@anthropic-ai/sdk/core/streaming.mjs.map +0 -1
  72. package/node_modules/@anthropic-ai/sdk/core/uploads.d.mts +0 -3
  73. package/node_modules/@anthropic-ai/sdk/core/uploads.d.mts.map +0 -1
  74. package/node_modules/@anthropic-ai/sdk/core/uploads.d.ts +0 -3
  75. package/node_modules/@anthropic-ai/sdk/core/uploads.d.ts.map +0 -1
  76. package/node_modules/@anthropic-ai/sdk/core/uploads.js +0 -6
  77. package/node_modules/@anthropic-ai/sdk/core/uploads.js.map +0 -1
  78. package/node_modules/@anthropic-ai/sdk/core/uploads.mjs +0 -2
  79. package/node_modules/@anthropic-ai/sdk/core/uploads.mjs.map +0 -1
  80. package/node_modules/@anthropic-ai/sdk/error.d.mts +0 -2
  81. package/node_modules/@anthropic-ai/sdk/error.d.mts.map +0 -1
  82. package/node_modules/@anthropic-ai/sdk/error.d.ts +0 -2
  83. package/node_modules/@anthropic-ai/sdk/error.d.ts.map +0 -1
  84. package/node_modules/@anthropic-ai/sdk/error.js +0 -6
  85. package/node_modules/@anthropic-ai/sdk/error.js.map +0 -1
  86. package/node_modules/@anthropic-ai/sdk/error.mjs +0 -2
  87. package/node_modules/@anthropic-ai/sdk/error.mjs.map +0 -1
  88. package/node_modules/@anthropic-ai/sdk/index.d.mts +0 -7
  89. package/node_modules/@anthropic-ai/sdk/index.d.mts.map +0 -1
  90. package/node_modules/@anthropic-ai/sdk/index.d.ts +0 -7
  91. package/node_modules/@anthropic-ai/sdk/index.d.ts.map +0 -1
  92. package/node_modules/@anthropic-ai/sdk/index.js +0 -35
  93. package/node_modules/@anthropic-ai/sdk/index.js.map +0 -1
  94. package/node_modules/@anthropic-ai/sdk/index.mjs +0 -8
  95. package/node_modules/@anthropic-ai/sdk/index.mjs.map +0 -1
  96. package/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.mts +0 -73
  97. package/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.mts.map +0 -1
  98. package/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.ts +0 -73
  99. package/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.ts.map +0 -1
  100. package/node_modules/@anthropic-ai/sdk/internal/builtin-types.js +0 -4
  101. package/node_modules/@anthropic-ai/sdk/internal/builtin-types.js.map +0 -1
  102. package/node_modules/@anthropic-ai/sdk/internal/builtin-types.mjs +0 -3
  103. package/node_modules/@anthropic-ai/sdk/internal/builtin-types.mjs.map +0 -1
  104. package/node_modules/@anthropic-ai/sdk/internal/constants.d.mts +0 -5
  105. package/node_modules/@anthropic-ai/sdk/internal/constants.d.mts.map +0 -1
  106. package/node_modules/@anthropic-ai/sdk/internal/constants.d.ts +0 -5
  107. package/node_modules/@anthropic-ai/sdk/internal/constants.d.ts.map +0 -1
  108. package/node_modules/@anthropic-ai/sdk/internal/constants.js +0 -15
  109. package/node_modules/@anthropic-ai/sdk/internal/constants.js.map +0 -1
  110. package/node_modules/@anthropic-ai/sdk/internal/constants.mjs +0 -12
  111. package/node_modules/@anthropic-ai/sdk/internal/constants.mjs.map +0 -1
  112. package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts +0 -10
  113. package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts.map +0 -1
  114. package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts +0 -10
  115. package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts.map +0 -1
  116. package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.js +0 -39
  117. package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.js.map +0 -1
  118. package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs +0 -35
  119. package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs.map +0 -1
  120. package/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.mts +0 -17
  121. package/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.mts.map +0 -1
  122. package/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.ts +0 -17
  123. package/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.ts.map +0 -1
  124. package/node_modules/@anthropic-ai/sdk/internal/decoders/line.js +0 -113
  125. package/node_modules/@anthropic-ai/sdk/internal/decoders/line.js.map +0 -1
  126. package/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs +0 -108
  127. package/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs.map +0 -1
  128. package/node_modules/@anthropic-ai/sdk/internal/detect-platform.d.mts +0 -15
  129. package/node_modules/@anthropic-ai/sdk/internal/detect-platform.d.mts.map +0 -1
  130. package/node_modules/@anthropic-ai/sdk/internal/detect-platform.d.ts +0 -15
  131. package/node_modules/@anthropic-ai/sdk/internal/detect-platform.d.ts.map +0 -1
  132. package/node_modules/@anthropic-ai/sdk/internal/detect-platform.js +0 -162
  133. package/node_modules/@anthropic-ai/sdk/internal/detect-platform.js.map +0 -1
  134. package/node_modules/@anthropic-ai/sdk/internal/detect-platform.mjs +0 -157
  135. package/node_modules/@anthropic-ai/sdk/internal/detect-platform.mjs.map +0 -1
  136. package/node_modules/@anthropic-ai/sdk/internal/errors.d.mts +0 -3
  137. package/node_modules/@anthropic-ai/sdk/internal/errors.d.mts.map +0 -1
  138. package/node_modules/@anthropic-ai/sdk/internal/errors.d.ts +0 -3
  139. package/node_modules/@anthropic-ai/sdk/internal/errors.d.ts.map +0 -1
  140. package/node_modules/@anthropic-ai/sdk/internal/errors.js +0 -41
  141. package/node_modules/@anthropic-ai/sdk/internal/errors.js.map +0 -1
  142. package/node_modules/@anthropic-ai/sdk/internal/errors.mjs +0 -36
  143. package/node_modules/@anthropic-ai/sdk/internal/errors.mjs.map +0 -1
  144. package/node_modules/@anthropic-ai/sdk/internal/headers.d.mts +0 -22
  145. package/node_modules/@anthropic-ai/sdk/internal/headers.d.mts.map +0 -1
  146. package/node_modules/@anthropic-ai/sdk/internal/headers.d.ts +0 -22
  147. package/node_modules/@anthropic-ai/sdk/internal/headers.d.ts.map +0 -1
  148. package/node_modules/@anthropic-ai/sdk/internal/headers.js +0 -79
  149. package/node_modules/@anthropic-ai/sdk/internal/headers.js.map +0 -1
  150. package/node_modules/@anthropic-ai/sdk/internal/headers.mjs +0 -74
  151. package/node_modules/@anthropic-ai/sdk/internal/headers.mjs.map +0 -1
  152. package/node_modules/@anthropic-ai/sdk/internal/parse.d.mts +0 -17
  153. package/node_modules/@anthropic-ai/sdk/internal/parse.d.mts.map +0 -1
  154. package/node_modules/@anthropic-ai/sdk/internal/parse.d.ts +0 -17
  155. package/node_modules/@anthropic-ai/sdk/internal/parse.d.ts.map +0 -1
  156. package/node_modules/@anthropic-ai/sdk/internal/parse.js +0 -55
  157. package/node_modules/@anthropic-ai/sdk/internal/parse.js.map +0 -1
  158. package/node_modules/@anthropic-ai/sdk/internal/parse.mjs +0 -51
  159. package/node_modules/@anthropic-ai/sdk/internal/parse.mjs.map +0 -1
  160. package/node_modules/@anthropic-ai/sdk/internal/request-options.d.mts +0 -34
  161. package/node_modules/@anthropic-ai/sdk/internal/request-options.d.mts.map +0 -1
  162. package/node_modules/@anthropic-ai/sdk/internal/request-options.d.ts +0 -34
  163. package/node_modules/@anthropic-ai/sdk/internal/request-options.d.ts.map +0 -1
  164. package/node_modules/@anthropic-ai/sdk/internal/request-options.js +0 -14
  165. package/node_modules/@anthropic-ai/sdk/internal/request-options.js.map +0 -1
  166. package/node_modules/@anthropic-ai/sdk/internal/request-options.mjs +0 -10
  167. package/node_modules/@anthropic-ai/sdk/internal/request-options.mjs.map +0 -1
  168. package/node_modules/@anthropic-ai/sdk/internal/shim-types.d.mts +0 -28
  169. package/node_modules/@anthropic-ai/sdk/internal/shim-types.d.ts +0 -28
  170. package/node_modules/@anthropic-ai/sdk/internal/shims.d.mts +0 -20
  171. package/node_modules/@anthropic-ai/sdk/internal/shims.d.mts.map +0 -1
  172. package/node_modules/@anthropic-ai/sdk/internal/shims.d.ts +0 -20
  173. package/node_modules/@anthropic-ai/sdk/internal/shims.d.ts.map +0 -1
  174. package/node_modules/@anthropic-ai/sdk/internal/shims.js +0 -92
  175. package/node_modules/@anthropic-ai/sdk/internal/shims.js.map +0 -1
  176. package/node_modules/@anthropic-ai/sdk/internal/shims.mjs +0 -85
  177. package/node_modules/@anthropic-ai/sdk/internal/shims.mjs.map +0 -1
  178. package/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.mts +0 -8
  179. package/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.mts.map +0 -1
  180. package/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.ts +0 -8
  181. package/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.ts.map +0 -1
  182. package/node_modules/@anthropic-ai/sdk/internal/stream-utils.js +0 -38
  183. package/node_modules/@anthropic-ai/sdk/internal/stream-utils.js.map +0 -1
  184. package/node_modules/@anthropic-ai/sdk/internal/stream-utils.mjs +0 -35
  185. package/node_modules/@anthropic-ai/sdk/internal/stream-utils.mjs.map +0 -1
  186. package/node_modules/@anthropic-ai/sdk/internal/to-file.d.mts +0 -45
  187. package/node_modules/@anthropic-ai/sdk/internal/to-file.d.mts.map +0 -1
  188. package/node_modules/@anthropic-ai/sdk/internal/to-file.d.ts +0 -45
  189. package/node_modules/@anthropic-ai/sdk/internal/to-file.d.ts.map +0 -1
  190. package/node_modules/@anthropic-ai/sdk/internal/to-file.js +0 -96
  191. package/node_modules/@anthropic-ai/sdk/internal/to-file.js.map +0 -1
  192. package/node_modules/@anthropic-ai/sdk/internal/to-file.mjs +0 -93
  193. package/node_modules/@anthropic-ai/sdk/internal/to-file.mjs.map +0 -1
  194. package/node_modules/@anthropic-ai/sdk/internal/tslib.js +0 -81
  195. package/node_modules/@anthropic-ai/sdk/internal/tslib.mjs +0 -17
  196. package/node_modules/@anthropic-ai/sdk/internal/types.d.mts +0 -67
  197. package/node_modules/@anthropic-ai/sdk/internal/types.d.mts.map +0 -1
  198. package/node_modules/@anthropic-ai/sdk/internal/types.d.ts +0 -67
  199. package/node_modules/@anthropic-ai/sdk/internal/types.d.ts.map +0 -1
  200. package/node_modules/@anthropic-ai/sdk/internal/types.js +0 -4
  201. package/node_modules/@anthropic-ai/sdk/internal/types.js.map +0 -1
  202. package/node_modules/@anthropic-ai/sdk/internal/types.mjs +0 -3
  203. package/node_modules/@anthropic-ai/sdk/internal/types.mjs.map +0 -1
  204. package/node_modules/@anthropic-ai/sdk/internal/uploads.d.mts +0 -42
  205. package/node_modules/@anthropic-ai/sdk/internal/uploads.d.mts.map +0 -1
  206. package/node_modules/@anthropic-ai/sdk/internal/uploads.d.ts +0 -42
  207. package/node_modules/@anthropic-ai/sdk/internal/uploads.d.ts.map +0 -1
  208. package/node_modules/@anthropic-ai/sdk/internal/uploads.js +0 -146
  209. package/node_modules/@anthropic-ai/sdk/internal/uploads.js.map +0 -1
  210. package/node_modules/@anthropic-ai/sdk/internal/uploads.mjs +0 -136
  211. package/node_modules/@anthropic-ai/sdk/internal/uploads.mjs.map +0 -1
  212. package/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.mts +0 -3
  213. package/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.mts.map +0 -1
  214. package/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.ts +0 -3
  215. package/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.ts.map +0 -1
  216. package/node_modules/@anthropic-ai/sdk/internal/utils/base64.js +0 -38
  217. package/node_modules/@anthropic-ai/sdk/internal/utils/base64.js.map +0 -1
  218. package/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs +0 -33
  219. package/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs.map +0 -1
  220. package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.mts +0 -4
  221. package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.mts.map +0 -1
  222. package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.ts +0 -4
  223. package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.ts.map +0 -1
  224. package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.js +0 -31
  225. package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.js.map +0 -1
  226. package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.mjs +0 -26
  227. package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.mjs.map +0 -1
  228. package/node_modules/@anthropic-ai/sdk/internal/utils/env.d.mts +0 -9
  229. package/node_modules/@anthropic-ai/sdk/internal/utils/env.d.mts.map +0 -1
  230. package/node_modules/@anthropic-ai/sdk/internal/utils/env.d.ts +0 -9
  231. package/node_modules/@anthropic-ai/sdk/internal/utils/env.d.ts.map +0 -1
  232. package/node_modules/@anthropic-ai/sdk/internal/utils/env.js +0 -22
  233. package/node_modules/@anthropic-ai/sdk/internal/utils/env.js.map +0 -1
  234. package/node_modules/@anthropic-ai/sdk/internal/utils/env.mjs +0 -18
  235. package/node_modules/@anthropic-ai/sdk/internal/utils/env.mjs.map +0 -1
  236. package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts +0 -37
  237. package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts.map +0 -1
  238. package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts +0 -37
  239. package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts.map +0 -1
  240. package/node_modules/@anthropic-ai/sdk/internal/utils/log.js +0 -86
  241. package/node_modules/@anthropic-ai/sdk/internal/utils/log.js.map +0 -1
  242. package/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs +0 -80
  243. package/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs.map +0 -1
  244. package/node_modules/@anthropic-ai/sdk/internal/utils/path.d.mts +0 -15
  245. package/node_modules/@anthropic-ai/sdk/internal/utils/path.d.mts.map +0 -1
  246. package/node_modules/@anthropic-ai/sdk/internal/utils/path.d.ts +0 -15
  247. package/node_modules/@anthropic-ai/sdk/internal/utils/path.d.ts.map +0 -1
  248. package/node_modules/@anthropic-ai/sdk/internal/utils/path.js +0 -58
  249. package/node_modules/@anthropic-ai/sdk/internal/utils/path.js.map +0 -1
  250. package/node_modules/@anthropic-ai/sdk/internal/utils/path.mjs +0 -53
  251. package/node_modules/@anthropic-ai/sdk/internal/utils/path.mjs.map +0 -1
  252. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts +0 -2
  253. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts.map +0 -1
  254. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.ts +0 -2
  255. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.ts.map +0 -1
  256. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js +0 -7
  257. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js.map +0 -1
  258. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.mjs +0 -3
  259. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.mjs.map +0 -1
  260. package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.mts +0 -5
  261. package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.mts.map +0 -1
  262. package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.ts +0 -5
  263. package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.ts.map +0 -1
  264. package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.js +0 -19
  265. package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.js.map +0 -1
  266. package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.mjs +0 -15
  267. package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.mjs.map +0 -1
  268. package/node_modules/@anthropic-ai/sdk/internal/utils/values.d.mts +0 -16
  269. package/node_modules/@anthropic-ai/sdk/internal/utils/values.d.mts.map +0 -1
  270. package/node_modules/@anthropic-ai/sdk/internal/utils/values.d.ts +0 -16
  271. package/node_modules/@anthropic-ai/sdk/internal/utils/values.d.ts.map +0 -1
  272. package/node_modules/@anthropic-ai/sdk/internal/utils/values.js +0 -109
  273. package/node_modules/@anthropic-ai/sdk/internal/utils/values.js.map +0 -1
  274. package/node_modules/@anthropic-ai/sdk/internal/utils/values.mjs +0 -92
  275. package/node_modules/@anthropic-ai/sdk/internal/utils/values.mjs.map +0 -1
  276. package/node_modules/@anthropic-ai/sdk/internal/utils.d.mts +0 -7
  277. package/node_modules/@anthropic-ai/sdk/internal/utils.d.mts.map +0 -1
  278. package/node_modules/@anthropic-ai/sdk/internal/utils.d.ts +0 -7
  279. package/node_modules/@anthropic-ai/sdk/internal/utils.d.ts.map +0 -1
  280. package/node_modules/@anthropic-ai/sdk/internal/utils.js +0 -11
  281. package/node_modules/@anthropic-ai/sdk/internal/utils.js.map +0 -1
  282. package/node_modules/@anthropic-ai/sdk/internal/utils.mjs +0 -8
  283. package/node_modules/@anthropic-ai/sdk/internal/utils.mjs.map +0 -1
  284. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts +0 -114
  285. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts.map +0 -1
  286. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts +0 -114
  287. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts.map +0 -1
  288. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js +0 -553
  289. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js.map +0 -1
  290. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs +0 -549
  291. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs.map +0 -1
  292. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts +0 -114
  293. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts.map +0 -1
  294. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts +0 -114
  295. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts.map +0 -1
  296. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.js +0 -553
  297. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.js.map +0 -1
  298. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs +0 -549
  299. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs.map +0 -1
  300. package/node_modules/@anthropic-ai/sdk/package.json +0 -185
  301. package/node_modules/@anthropic-ai/sdk/pagination.d.mts +0 -2
  302. package/node_modules/@anthropic-ai/sdk/pagination.d.mts.map +0 -1
  303. package/node_modules/@anthropic-ai/sdk/pagination.d.ts +0 -2
  304. package/node_modules/@anthropic-ai/sdk/pagination.d.ts.map +0 -1
  305. package/node_modules/@anthropic-ai/sdk/pagination.js +0 -6
  306. package/node_modules/@anthropic-ai/sdk/pagination.js.map +0 -1
  307. package/node_modules/@anthropic-ai/sdk/pagination.mjs +0 -2
  308. package/node_modules/@anthropic-ai/sdk/pagination.mjs.map +0 -1
  309. package/node_modules/@anthropic-ai/sdk/resource.d.mts +0 -2
  310. package/node_modules/@anthropic-ai/sdk/resource.d.mts.map +0 -1
  311. package/node_modules/@anthropic-ai/sdk/resource.d.ts +0 -2
  312. package/node_modules/@anthropic-ai/sdk/resource.d.ts.map +0 -1
  313. package/node_modules/@anthropic-ai/sdk/resource.js +0 -6
  314. package/node_modules/@anthropic-ai/sdk/resource.js.map +0 -1
  315. package/node_modules/@anthropic-ai/sdk/resource.mjs +0 -2
  316. package/node_modules/@anthropic-ai/sdk/resource.mjs.map +0 -1
  317. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.mts +0 -61
  318. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.mts.map +0 -1
  319. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts +0 -61
  320. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts.map +0 -1
  321. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.js +0 -25
  322. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.js.map +0 -1
  323. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs +0 -20
  324. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs.map +0 -1
  325. package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.mts +0 -151
  326. package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.mts.map +0 -1
  327. package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.ts +0 -151
  328. package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.ts.map +0 -1
  329. package/node_modules/@anthropic-ai/sdk/resources/beta/files.js +0 -122
  330. package/node_modules/@anthropic-ai/sdk/resources/beta/files.js.map +0 -1
  331. package/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs +0 -118
  332. package/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs.map +0 -1
  333. package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.mts +0 -5
  334. package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.mts.map +0 -1
  335. package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts +0 -5
  336. package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts.map +0 -1
  337. package/node_modules/@anthropic-ai/sdk/resources/beta/index.js +0 -13
  338. package/node_modules/@anthropic-ai/sdk/resources/beta/index.js.map +0 -1
  339. package/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs +0 -6
  340. package/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs.map +0 -1
  341. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts +0 -343
  342. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts.map +0 -1
  343. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts +0 -343
  344. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts.map +0 -1
  345. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.js +0 -204
  346. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.js.map +0 -1
  347. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs +0 -200
  348. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs.map +0 -1
  349. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts +0 -3
  350. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts.map +0 -1
  351. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts +0 -3
  352. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts.map +0 -1
  353. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.js +0 -9
  354. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.js.map +0 -1
  355. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs +0 -4
  356. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs.map +0 -1
  357. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts +0 -1561
  358. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts.map +0 -1
  359. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts +0 -1561
  360. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts.map +0 -1
  361. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js +0 -86
  362. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js.map +0 -1
  363. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs +0 -81
  364. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs.map +0 -1
  365. package/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts +0 -2
  366. package/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts.map +0 -1
  367. package/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.ts +0 -2
  368. package/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.ts.map +0 -1
  369. package/node_modules/@anthropic-ai/sdk/resources/beta/messages.js +0 -6
  370. package/node_modules/@anthropic-ai/sdk/resources/beta/messages.js.map +0 -1
  371. package/node_modules/@anthropic-ai/sdk/resources/beta/messages.mjs +0 -3
  372. package/node_modules/@anthropic-ai/sdk/resources/beta/messages.mjs.map +0 -1
  373. package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.mts +0 -74
  374. package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.mts.map +0 -1
  375. package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.ts +0 -74
  376. package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.ts.map +0 -1
  377. package/node_modules/@anthropic-ai/sdk/resources/beta/models.js +0 -60
  378. package/node_modules/@anthropic-ai/sdk/resources/beta/models.js.map +0 -1
  379. package/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs +0 -56
  380. package/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs.map +0 -1
  381. package/node_modules/@anthropic-ai/sdk/resources/beta.d.mts +0 -2
  382. package/node_modules/@anthropic-ai/sdk/resources/beta.d.mts.map +0 -1
  383. package/node_modules/@anthropic-ai/sdk/resources/beta.d.ts +0 -2
  384. package/node_modules/@anthropic-ai/sdk/resources/beta.d.ts.map +0 -1
  385. package/node_modules/@anthropic-ai/sdk/resources/beta.js +0 -6
  386. package/node_modules/@anthropic-ai/sdk/resources/beta.js.map +0 -1
  387. package/node_modules/@anthropic-ai/sdk/resources/beta.mjs +0 -3
  388. package/node_modules/@anthropic-ai/sdk/resources/beta.mjs.map +0 -1
  389. package/node_modules/@anthropic-ai/sdk/resources/completions.d.mts +0 -183
  390. package/node_modules/@anthropic-ai/sdk/resources/completions.d.mts.map +0 -1
  391. package/node_modules/@anthropic-ai/sdk/resources/completions.d.ts +0 -183
  392. package/node_modules/@anthropic-ai/sdk/resources/completions.d.ts.map +0 -1
  393. package/node_modules/@anthropic-ai/sdk/resources/completions.js +0 -23
  394. package/node_modules/@anthropic-ai/sdk/resources/completions.js.map +0 -1
  395. package/node_modules/@anthropic-ai/sdk/resources/completions.mjs +0 -19
  396. package/node_modules/@anthropic-ai/sdk/resources/completions.mjs.map +0 -1
  397. package/node_modules/@anthropic-ai/sdk/resources/index.d.mts +0 -6
  398. package/node_modules/@anthropic-ai/sdk/resources/index.d.mts.map +0 -1
  399. package/node_modules/@anthropic-ai/sdk/resources/index.d.ts +0 -6
  400. package/node_modules/@anthropic-ai/sdk/resources/index.d.ts.map +0 -1
  401. package/node_modules/@anthropic-ai/sdk/resources/index.js +0 -15
  402. package/node_modules/@anthropic-ai/sdk/resources/index.js.map +0 -1
  403. package/node_modules/@anthropic-ai/sdk/resources/index.mjs +0 -7
  404. package/node_modules/@anthropic-ai/sdk/resources/index.mjs.map +0 -1
  405. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts +0 -304
  406. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts.map +0 -1
  407. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.ts +0 -304
  408. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.ts.map +0 -1
  409. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.js +0 -153
  410. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.js.map +0 -1
  411. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs +0 -149
  412. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs.map +0 -1
  413. package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts +0 -3
  414. package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts.map +0 -1
  415. package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.ts +0 -3
  416. package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.ts.map +0 -1
  417. package/node_modules/@anthropic-ai/sdk/resources/messages/index.js +0 -9
  418. package/node_modules/@anthropic-ai/sdk/resources/messages/index.js.map +0 -1
  419. package/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs +0 -4
  420. package/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs.map +0 -1
  421. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts +0 -1264
  422. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts.map +0 -1
  423. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts +0 -1264
  424. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts.map +0 -1
  425. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.js +0 -72
  426. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.js.map +0 -1
  427. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs +0 -67
  428. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs.map +0 -1
  429. package/node_modules/@anthropic-ai/sdk/resources/messages.d.mts +0 -2
  430. package/node_modules/@anthropic-ai/sdk/resources/messages.d.mts.map +0 -1
  431. package/node_modules/@anthropic-ai/sdk/resources/messages.d.ts +0 -2
  432. package/node_modules/@anthropic-ai/sdk/resources/messages.d.ts.map +0 -1
  433. package/node_modules/@anthropic-ai/sdk/resources/messages.js +0 -6
  434. package/node_modules/@anthropic-ai/sdk/resources/messages.js.map +0 -1
  435. package/node_modules/@anthropic-ai/sdk/resources/messages.mjs +0 -3
  436. package/node_modules/@anthropic-ai/sdk/resources/messages.mjs.map +0 -1
  437. package/node_modules/@anthropic-ai/sdk/resources/models.d.mts +0 -59
  438. package/node_modules/@anthropic-ai/sdk/resources/models.d.mts.map +0 -1
  439. package/node_modules/@anthropic-ai/sdk/resources/models.d.ts +0 -59
  440. package/node_modules/@anthropic-ai/sdk/resources/models.d.ts.map +0 -1
  441. package/node_modules/@anthropic-ai/sdk/resources/models.js +0 -45
  442. package/node_modules/@anthropic-ai/sdk/resources/models.js.map +0 -1
  443. package/node_modules/@anthropic-ai/sdk/resources/models.mjs +0 -41
  444. package/node_modules/@anthropic-ai/sdk/resources/models.mjs.map +0 -1
  445. package/node_modules/@anthropic-ai/sdk/resources/shared.d.mts +0 -42
  446. package/node_modules/@anthropic-ai/sdk/resources/shared.d.mts.map +0 -1
  447. package/node_modules/@anthropic-ai/sdk/resources/shared.d.ts +0 -42
  448. package/node_modules/@anthropic-ai/sdk/resources/shared.d.ts.map +0 -1
  449. package/node_modules/@anthropic-ai/sdk/resources/shared.js +0 -4
  450. package/node_modules/@anthropic-ai/sdk/resources/shared.js.map +0 -1
  451. package/node_modules/@anthropic-ai/sdk/resources/shared.mjs +0 -3
  452. package/node_modules/@anthropic-ai/sdk/resources/shared.mjs.map +0 -1
  453. package/node_modules/@anthropic-ai/sdk/resources/top-level.d.mts +0 -2
  454. package/node_modules/@anthropic-ai/sdk/resources/top-level.d.mts.map +0 -1
  455. package/node_modules/@anthropic-ai/sdk/resources/top-level.d.ts +0 -2
  456. package/node_modules/@anthropic-ai/sdk/resources/top-level.d.ts.map +0 -1
  457. package/node_modules/@anthropic-ai/sdk/resources/top-level.js +0 -4
  458. package/node_modules/@anthropic-ai/sdk/resources/top-level.js.map +0 -1
  459. package/node_modules/@anthropic-ai/sdk/resources/top-level.mjs +0 -3
  460. package/node_modules/@anthropic-ai/sdk/resources/top-level.mjs.map +0 -1
  461. package/node_modules/@anthropic-ai/sdk/resources.d.mts +0 -2
  462. package/node_modules/@anthropic-ai/sdk/resources.d.mts.map +0 -1
  463. package/node_modules/@anthropic-ai/sdk/resources.d.ts +0 -2
  464. package/node_modules/@anthropic-ai/sdk/resources.d.ts.map +0 -1
  465. package/node_modules/@anthropic-ai/sdk/resources.js +0 -5
  466. package/node_modules/@anthropic-ai/sdk/resources.js.map +0 -1
  467. package/node_modules/@anthropic-ai/sdk/resources.mjs +0 -2
  468. package/node_modules/@anthropic-ai/sdk/resources.mjs.map +0 -1
  469. package/node_modules/@anthropic-ai/sdk/src/_vendor/partial-json-parser/README.md +0 -3
  470. package/node_modules/@anthropic-ai/sdk/src/_vendor/partial-json-parser/parser.ts +0 -264
  471. package/node_modules/@anthropic-ai/sdk/src/api-promise.ts +0 -2
  472. package/node_modules/@anthropic-ai/sdk/src/client.ts +0 -1070
  473. package/node_modules/@anthropic-ai/sdk/src/core/README.md +0 -3
  474. package/node_modules/@anthropic-ai/sdk/src/core/api-promise.ts +0 -101
  475. package/node_modules/@anthropic-ai/sdk/src/core/error.ts +0 -133
  476. package/node_modules/@anthropic-ai/sdk/src/core/pagination.ts +0 -201
  477. package/node_modules/@anthropic-ai/sdk/src/core/resource.ts +0 -11
  478. package/node_modules/@anthropic-ai/sdk/src/core/streaming.ts +0 -331
  479. package/node_modules/@anthropic-ai/sdk/src/core/uploads.ts +0 -2
  480. package/node_modules/@anthropic-ai/sdk/src/error.ts +0 -2
  481. package/node_modules/@anthropic-ai/sdk/src/index.ts +0 -23
  482. package/node_modules/@anthropic-ai/sdk/src/internal/README.md +0 -3
  483. package/node_modules/@anthropic-ai/sdk/src/internal/builtin-types.ts +0 -93
  484. package/node_modules/@anthropic-ai/sdk/src/internal/constants.ts +0 -12
  485. package/node_modules/@anthropic-ai/sdk/src/internal/decoders/jsonl.ts +0 -48
  486. package/node_modules/@anthropic-ai/sdk/src/internal/decoders/line.ts +0 -135
  487. package/node_modules/@anthropic-ai/sdk/src/internal/detect-platform.ts +0 -196
  488. package/node_modules/@anthropic-ai/sdk/src/internal/errors.ts +0 -33
  489. package/node_modules/@anthropic-ai/sdk/src/internal/headers.ts +0 -99
  490. package/node_modules/@anthropic-ai/sdk/src/internal/parse.ts +0 -84
  491. package/node_modules/@anthropic-ai/sdk/src/internal/request-options.ts +0 -39
  492. package/node_modules/@anthropic-ai/sdk/src/internal/shim-types.d.ts +0 -28
  493. package/node_modules/@anthropic-ai/sdk/src/internal/shims.ts +0 -107
  494. package/node_modules/@anthropic-ai/sdk/src/internal/stream-utils.ts +0 -32
  495. package/node_modules/@anthropic-ai/sdk/src/internal/to-file.ts +0 -159
  496. package/node_modules/@anthropic-ai/sdk/src/internal/types.ts +0 -92
  497. package/node_modules/@anthropic-ai/sdk/src/internal/uploads.ts +0 -193
  498. package/node_modules/@anthropic-ai/sdk/src/internal/utils/base64.ts +0 -40
  499. package/node_modules/@anthropic-ai/sdk/src/internal/utils/bytes.ts +0 -32
  500. package/node_modules/@anthropic-ai/sdk/src/internal/utils/env.ts +0 -18
  501. package/node_modules/@anthropic-ai/sdk/src/internal/utils/log.ts +0 -127
  502. package/node_modules/@anthropic-ai/sdk/src/internal/utils/path.ts +0 -65
  503. package/node_modules/@anthropic-ai/sdk/src/internal/utils/sleep.ts +0 -3
  504. package/node_modules/@anthropic-ai/sdk/src/internal/utils/uuid.ts +0 -17
  505. package/node_modules/@anthropic-ai/sdk/src/internal/utils/values.ts +0 -102
  506. package/node_modules/@anthropic-ai/sdk/src/internal/utils.ts +0 -8
  507. package/node_modules/@anthropic-ai/sdk/src/lib/.keep +0 -4
  508. package/node_modules/@anthropic-ai/sdk/src/lib/BetaMessageStream.ts +0 -683
  509. package/node_modules/@anthropic-ai/sdk/src/lib/MessageStream.ts +0 -684
  510. package/node_modules/@anthropic-ai/sdk/src/pagination.ts +0 -2
  511. package/node_modules/@anthropic-ai/sdk/src/resource.ts +0 -2
  512. package/node_modules/@anthropic-ai/sdk/src/resources/beta/beta.ts +0 -380
  513. package/node_modules/@anthropic-ai/sdk/src/resources/beta/files.ts +0 -258
  514. package/node_modules/@anthropic-ai/sdk/src/resources/beta/index.ts +0 -148
  515. package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/batches.ts +0 -502
  516. package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/index.ts +0 -135
  517. package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/messages.ts +0 -2249
  518. package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages.ts +0 -3
  519. package/node_modules/@anthropic-ai/sdk/src/resources/beta/models.ts +0 -118
  520. package/node_modules/@anthropic-ai/sdk/src/resources/beta.ts +0 -3
  521. package/node_modules/@anthropic-ai/sdk/src/resources/completions.ts +0 -231
  522. package/node_modules/@anthropic-ai/sdk/src/resources/index.ts +0 -121
  523. package/node_modules/@anthropic-ai/sdk/src/resources/messages/batches.ts +0 -396
  524. package/node_modules/@anthropic-ai/sdk/src/resources/messages/index.ts +0 -110
  525. package/node_modules/@anthropic-ai/sdk/src/resources/messages/messages.ts +0 -1783
  526. package/node_modules/@anthropic-ai/sdk/src/resources/messages.ts +0 -3
  527. package/node_modules/@anthropic-ai/sdk/src/resources/models.ts +0 -103
  528. package/node_modules/@anthropic-ai/sdk/src/resources/shared.ts +0 -72
  529. package/node_modules/@anthropic-ai/sdk/src/resources/top-level.ts +0 -3
  530. package/node_modules/@anthropic-ai/sdk/src/resources.ts +0 -1
  531. package/node_modules/@anthropic-ai/sdk/src/streaming.ts +0 -2
  532. package/node_modules/@anthropic-ai/sdk/src/tsconfig.json +0 -11
  533. package/node_modules/@anthropic-ai/sdk/src/uploads.ts +0 -2
  534. package/node_modules/@anthropic-ai/sdk/src/version.ts +0 -1
  535. package/node_modules/@anthropic-ai/sdk/streaming.d.mts +0 -2
  536. package/node_modules/@anthropic-ai/sdk/streaming.d.mts.map +0 -1
  537. package/node_modules/@anthropic-ai/sdk/streaming.d.ts +0 -2
  538. package/node_modules/@anthropic-ai/sdk/streaming.d.ts.map +0 -1
  539. package/node_modules/@anthropic-ai/sdk/streaming.js +0 -6
  540. package/node_modules/@anthropic-ai/sdk/streaming.js.map +0 -1
  541. package/node_modules/@anthropic-ai/sdk/streaming.mjs +0 -2
  542. package/node_modules/@anthropic-ai/sdk/streaming.mjs.map +0 -1
  543. package/node_modules/@anthropic-ai/sdk/uploads.d.mts +0 -2
  544. package/node_modules/@anthropic-ai/sdk/uploads.d.mts.map +0 -1
  545. package/node_modules/@anthropic-ai/sdk/uploads.d.ts +0 -2
  546. package/node_modules/@anthropic-ai/sdk/uploads.d.ts.map +0 -1
  547. package/node_modules/@anthropic-ai/sdk/uploads.js +0 -6
  548. package/node_modules/@anthropic-ai/sdk/uploads.js.map +0 -1
  549. package/node_modules/@anthropic-ai/sdk/uploads.mjs +0 -2
  550. package/node_modules/@anthropic-ai/sdk/uploads.mjs.map +0 -1
  551. package/node_modules/@anthropic-ai/sdk/version.d.mts +0 -2
  552. package/node_modules/@anthropic-ai/sdk/version.d.mts.map +0 -1
  553. package/node_modules/@anthropic-ai/sdk/version.d.ts +0 -2
  554. package/node_modules/@anthropic-ai/sdk/version.d.ts.map +0 -1
  555. package/node_modules/@anthropic-ai/sdk/version.js +0 -5
  556. package/node_modules/@anthropic-ai/sdk/version.js.map +0 -1
  557. package/node_modules/@anthropic-ai/sdk/version.mjs +0 -2
  558. package/node_modules/@anthropic-ai/sdk/version.mjs.map +0 -1
  559. package/node_modules/@dimivelev/chimera-agent-core/dist/agent-loop.d.ts +0 -24
  560. package/node_modules/@dimivelev/chimera-agent-core/dist/agent-loop.d.ts.map +0 -1
  561. package/node_modules/@dimivelev/chimera-agent-core/dist/agent-loop.js +0 -502
  562. package/node_modules/@dimivelev/chimera-agent-core/dist/agent-loop.js.map +0 -1
  563. package/node_modules/@dimivelev/chimera-agent-core/dist/agent.d.ts +0 -118
  564. package/node_modules/@dimivelev/chimera-agent-core/dist/agent.d.ts.map +0 -1
  565. package/node_modules/@dimivelev/chimera-agent-core/dist/agent.js +0 -402
  566. package/node_modules/@dimivelev/chimera-agent-core/dist/agent.js.map +0 -1
  567. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/agent-harness.d.ts +0 -95
  568. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/agent-harness.d.ts.map +0 -1
  569. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/agent-harness.js +0 -963
  570. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/agent-harness.js.map +0 -1
  571. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/branch-summarization.d.ts +0 -53
  572. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/branch-summarization.d.ts.map +0 -1
  573. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/branch-summarization.js +0 -175
  574. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/branch-summarization.js.map +0 -1
  575. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/compaction.d.ts +0 -95
  576. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/compaction.d.ts.map +0 -1
  577. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/compaction.js +0 -528
  578. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/compaction.js.map +0 -1
  579. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/utils.d.ts +0 -25
  580. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/utils.d.ts.map +0 -1
  581. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/utils.js +0 -131
  582. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/utils.js.map +0 -1
  583. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/env/nodejs.d.ts +0 -51
  584. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/env/nodejs.d.ts.map +0 -1
  585. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/env/nodejs.js +0 -486
  586. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/env/nodejs.js.map +0 -1
  587. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/messages.d.ts +0 -51
  588. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/messages.d.ts.map +0 -1
  589. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/messages.js +0 -102
  590. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/messages.js.map +0 -1
  591. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/prompt-templates.d.ts +0 -48
  592. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/prompt-templates.d.ts.map +0 -1
  593. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/prompt-templates.js +0 -230
  594. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/prompt-templates.js.map +0 -1
  595. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-repo.d.ts +0 -26
  596. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-repo.d.ts.map +0 -1
  597. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-repo.js +0 -101
  598. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-repo.js.map +0 -1
  599. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-storage.d.ts +0 -33
  600. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-storage.d.ts.map +0 -1
  601. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-storage.js +0 -231
  602. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-storage.js.map +0 -1
  603. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-repo.d.ts +0 -18
  604. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-repo.d.ts.map +0 -1
  605. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-repo.js +0 -42
  606. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-repo.js.map +0 -1
  607. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-storage.d.ts +0 -25
  608. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-storage.d.ts.map +0 -1
  609. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-storage.js +0 -114
  610. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-storage.js.map +0 -1
  611. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/repo-utils.d.ts +0 -11
  612. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/repo-utils.d.ts.map +0 -1
  613. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/repo-utils.js +0 -39
  614. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/repo-utils.js.map +0 -1
  615. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/session.d.ts +0 -33
  616. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/session.d.ts.map +0 -1
  617. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/session.js +0 -210
  618. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/session.js.map +0 -1
  619. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/uuid.d.ts +0 -2
  620. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/uuid.d.ts.map +0 -1
  621. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/uuid.js +0 -50
  622. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/uuid.js.map +0 -1
  623. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/skills.d.ts +0 -44
  624. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/skills.d.ts.map +0 -1
  625. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/skills.js +0 -311
  626. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/skills.js.map +0 -1
  627. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/system-prompt.d.ts +0 -3
  628. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/system-prompt.d.ts.map +0 -1
  629. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/system-prompt.js +0 -30
  630. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/system-prompt.js.map +0 -1
  631. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/types.d.ts +0 -615
  632. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/types.d.ts.map +0 -1
  633. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/types.js +0 -94
  634. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/types.js.map +0 -1
  635. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/shell-output.d.ts +0 -14
  636. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/shell-output.d.ts.map +0 -1
  637. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/shell-output.js +0 -126
  638. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/shell-output.js.map +0 -1
  639. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/truncate.d.ts +0 -70
  640. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/truncate.d.ts.map +0 -1
  641. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/truncate.js +0 -290
  642. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/truncate.js.map +0 -1
  643. package/node_modules/@dimivelev/chimera-agent-core/dist/index.d.ts +0 -20
  644. package/node_modules/@dimivelev/chimera-agent-core/dist/index.d.ts.map +0 -1
  645. package/node_modules/@dimivelev/chimera-agent-core/dist/index.js +0 -25
  646. package/node_modules/@dimivelev/chimera-agent-core/dist/index.js.map +0 -1
  647. package/node_modules/@dimivelev/chimera-agent-core/dist/node.d.ts +0 -3
  648. package/node_modules/@dimivelev/chimera-agent-core/dist/node.d.ts.map +0 -1
  649. package/node_modules/@dimivelev/chimera-agent-core/dist/node.js +0 -3
  650. package/node_modules/@dimivelev/chimera-agent-core/dist/node.js.map +0 -1
  651. package/node_modules/@dimivelev/chimera-agent-core/dist/proxy.d.ts +0 -69
  652. package/node_modules/@dimivelev/chimera-agent-core/dist/proxy.d.ts.map +0 -1
  653. package/node_modules/@dimivelev/chimera-agent-core/dist/proxy.js +0 -278
  654. package/node_modules/@dimivelev/chimera-agent-core/dist/proxy.js.map +0 -1
  655. package/node_modules/@dimivelev/chimera-agent-core/dist/types.d.ts +0 -393
  656. package/node_modules/@dimivelev/chimera-agent-core/dist/types.d.ts.map +0 -1
  657. package/node_modules/@dimivelev/chimera-agent-core/dist/types.js +0 -2
  658. package/node_modules/@dimivelev/chimera-agent-core/dist/types.js.map +0 -1
  659. package/node_modules/@dimivelev/chimera-agent-core/package.json +0 -60
  660. package/node_modules/@dimivelev/chimera-ai/dist/api-registry.d.ts +0 -20
  661. package/node_modules/@dimivelev/chimera-ai/dist/api-registry.d.ts.map +0 -1
  662. package/node_modules/@dimivelev/chimera-ai/dist/api-registry.js +0 -44
  663. package/node_modules/@dimivelev/chimera-ai/dist/api-registry.js.map +0 -1
  664. package/node_modules/@dimivelev/chimera-ai/dist/bedrock-provider.d.ts +0 -5
  665. package/node_modules/@dimivelev/chimera-ai/dist/bedrock-provider.d.ts.map +0 -1
  666. package/node_modules/@dimivelev/chimera-ai/dist/bedrock-provider.js +0 -6
  667. package/node_modules/@dimivelev/chimera-ai/dist/bedrock-provider.js.map +0 -1
  668. package/node_modules/@dimivelev/chimera-ai/dist/cli.d.ts +0 -3
  669. package/node_modules/@dimivelev/chimera-ai/dist/cli.d.ts.map +0 -1
  670. package/node_modules/@dimivelev/chimera-ai/dist/cli.js +0 -130
  671. package/node_modules/@dimivelev/chimera-ai/dist/cli.js.map +0 -1
  672. package/node_modules/@dimivelev/chimera-ai/dist/env-api-keys.d.ts +0 -18
  673. package/node_modules/@dimivelev/chimera-ai/dist/env-api-keys.d.ts.map +0 -1
  674. package/node_modules/@dimivelev/chimera-ai/dist/env-api-keys.js +0 -178
  675. package/node_modules/@dimivelev/chimera-ai/dist/env-api-keys.js.map +0 -1
  676. package/node_modules/@dimivelev/chimera-ai/dist/image-models.d.ts +0 -10
  677. package/node_modules/@dimivelev/chimera-ai/dist/image-models.d.ts.map +0 -1
  678. package/node_modules/@dimivelev/chimera-ai/dist/image-models.generated.d.ts +0 -4
  679. package/node_modules/@dimivelev/chimera-ai/dist/image-models.generated.d.ts.map +0 -1
  680. package/node_modules/@dimivelev/chimera-ai/dist/image-models.generated.js +0 -6
  681. package/node_modules/@dimivelev/chimera-ai/dist/image-models.generated.js.map +0 -1
  682. package/node_modules/@dimivelev/chimera-ai/dist/image-models.js +0 -23
  683. package/node_modules/@dimivelev/chimera-ai/dist/image-models.js.map +0 -1
  684. package/node_modules/@dimivelev/chimera-ai/dist/images-api-registry.d.ts +0 -14
  685. package/node_modules/@dimivelev/chimera-ai/dist/images-api-registry.d.ts.map +0 -1
  686. package/node_modules/@dimivelev/chimera-ai/dist/images-api-registry.js +0 -22
  687. package/node_modules/@dimivelev/chimera-ai/dist/images-api-registry.js.map +0 -1
  688. package/node_modules/@dimivelev/chimera-ai/dist/images.d.ts +0 -4
  689. package/node_modules/@dimivelev/chimera-ai/dist/images.d.ts.map +0 -1
  690. package/node_modules/@dimivelev/chimera-ai/dist/images.js +0 -14
  691. package/node_modules/@dimivelev/chimera-ai/dist/images.js.map +0 -1
  692. package/node_modules/@dimivelev/chimera-ai/dist/index.d.ts +0 -32
  693. package/node_modules/@dimivelev/chimera-ai/dist/index.d.ts.map +0 -1
  694. package/node_modules/@dimivelev/chimera-ai/dist/index.js +0 -20
  695. package/node_modules/@dimivelev/chimera-ai/dist/index.js.map +0 -1
  696. package/node_modules/@dimivelev/chimera-ai/dist/models.d.ts +0 -18
  697. package/node_modules/@dimivelev/chimera-ai/dist/models.d.ts.map +0 -1
  698. package/node_modules/@dimivelev/chimera-ai/dist/models.generated.d.ts +0 -14714
  699. package/node_modules/@dimivelev/chimera-ai/dist/models.generated.d.ts.map +0 -1
  700. package/node_modules/@dimivelev/chimera-ai/dist/models.generated.js +0 -13379
  701. package/node_modules/@dimivelev/chimera-ai/dist/models.generated.js.map +0 -1
  702. package/node_modules/@dimivelev/chimera-ai/dist/models.js +0 -71
  703. package/node_modules/@dimivelev/chimera-ai/dist/models.js.map +0 -1
  704. package/node_modules/@dimivelev/chimera-ai/dist/oauth.d.ts +0 -2
  705. package/node_modules/@dimivelev/chimera-ai/dist/oauth.d.ts.map +0 -1
  706. package/node_modules/@dimivelev/chimera-ai/dist/oauth.js +0 -2
  707. package/node_modules/@dimivelev/chimera-ai/dist/oauth.js.map +0 -1
  708. package/node_modules/@dimivelev/chimera-ai/dist/providers/amazon-bedrock.d.ts +0 -38
  709. package/node_modules/@dimivelev/chimera-ai/dist/providers/amazon-bedrock.d.ts.map +0 -1
  710. package/node_modules/@dimivelev/chimera-ai/dist/providers/amazon-bedrock.js +0 -826
  711. package/node_modules/@dimivelev/chimera-ai/dist/providers/amazon-bedrock.js.map +0 -1
  712. package/node_modules/@dimivelev/chimera-ai/dist/providers/anthropic.d.ts +0 -71
  713. package/node_modules/@dimivelev/chimera-ai/dist/providers/anthropic.d.ts.map +0 -1
  714. package/node_modules/@dimivelev/chimera-ai/dist/providers/anthropic.js +0 -959
  715. package/node_modules/@dimivelev/chimera-ai/dist/providers/anthropic.js.map +0 -1
  716. package/node_modules/@dimivelev/chimera-ai/dist/providers/azure-openai-responses.d.ts +0 -15
  717. package/node_modules/@dimivelev/chimera-ai/dist/providers/azure-openai-responses.d.ts.map +0 -1
  718. package/node_modules/@dimivelev/chimera-ai/dist/providers/azure-openai-responses.js +0 -221
  719. package/node_modules/@dimivelev/chimera-ai/dist/providers/azure-openai-responses.js.map +0 -1
  720. package/node_modules/@dimivelev/chimera-ai/dist/providers/cloudflare.d.ts +0 -13
  721. package/node_modules/@dimivelev/chimera-ai/dist/providers/cloudflare.d.ts.map +0 -1
  722. package/node_modules/@dimivelev/chimera-ai/dist/providers/cloudflare.js +0 -26
  723. package/node_modules/@dimivelev/chimera-ai/dist/providers/cloudflare.js.map +0 -1
  724. package/node_modules/@dimivelev/chimera-ai/dist/providers/faux.d.ts +0 -56
  725. package/node_modules/@dimivelev/chimera-ai/dist/providers/faux.d.ts.map +0 -1
  726. package/node_modules/@dimivelev/chimera-ai/dist/providers/faux.js +0 -368
  727. package/node_modules/@dimivelev/chimera-ai/dist/providers/faux.js.map +0 -1
  728. package/node_modules/@dimivelev/chimera-ai/dist/providers/github-copilot-headers.d.ts +0 -8
  729. package/node_modules/@dimivelev/chimera-ai/dist/providers/github-copilot-headers.d.ts.map +0 -1
  730. package/node_modules/@dimivelev/chimera-ai/dist/providers/github-copilot-headers.js +0 -29
  731. package/node_modules/@dimivelev/chimera-ai/dist/providers/github-copilot-headers.js.map +0 -1
  732. package/node_modules/@dimivelev/chimera-ai/dist/providers/google-shared.d.ts +0 -70
  733. package/node_modules/@dimivelev/chimera-ai/dist/providers/google-shared.d.ts.map +0 -1
  734. package/node_modules/@dimivelev/chimera-ai/dist/providers/google-shared.js +0 -329
  735. package/node_modules/@dimivelev/chimera-ai/dist/providers/google-shared.js.map +0 -1
  736. package/node_modules/@dimivelev/chimera-ai/dist/providers/google-vertex.d.ts +0 -15
  737. package/node_modules/@dimivelev/chimera-ai/dist/providers/google-vertex.d.ts.map +0 -1
  738. package/node_modules/@dimivelev/chimera-ai/dist/providers/google-vertex.js +0 -442
  739. package/node_modules/@dimivelev/chimera-ai/dist/providers/google-vertex.js.map +0 -1
  740. package/node_modules/@dimivelev/chimera-ai/dist/providers/google.d.ts +0 -13
  741. package/node_modules/@dimivelev/chimera-ai/dist/providers/google.d.ts.map +0 -1
  742. package/node_modules/@dimivelev/chimera-ai/dist/providers/google.js +0 -402
  743. package/node_modules/@dimivelev/chimera-ai/dist/providers/google.js.map +0 -1
  744. package/node_modules/@dimivelev/chimera-ai/dist/providers/images/openrouter.d.ts +0 -3
  745. package/node_modules/@dimivelev/chimera-ai/dist/providers/images/openrouter.d.ts.map +0 -1
  746. package/node_modules/@dimivelev/chimera-ai/dist/providers/images/openrouter.js +0 -128
  747. package/node_modules/@dimivelev/chimera-ai/dist/providers/images/openrouter.js.map +0 -1
  748. package/node_modules/@dimivelev/chimera-ai/dist/providers/images/register-builtins.d.ts +0 -4
  749. package/node_modules/@dimivelev/chimera-ai/dist/providers/images/register-builtins.d.ts.map +0 -1
  750. package/node_modules/@dimivelev/chimera-ai/dist/providers/images/register-builtins.js +0 -34
  751. package/node_modules/@dimivelev/chimera-ai/dist/providers/images/register-builtins.js.map +0 -1
  752. package/node_modules/@dimivelev/chimera-ai/dist/providers/mistral.d.ts +0 -25
  753. package/node_modules/@dimivelev/chimera-ai/dist/providers/mistral.d.ts.map +0 -1
  754. package/node_modules/@dimivelev/chimera-ai/dist/providers/mistral.js +0 -534
  755. package/node_modules/@dimivelev/chimera-ai/dist/providers/mistral.js.map +0 -1
  756. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-codex-responses.d.ts +0 -30
  757. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-codex-responses.d.ts.map +0 -1
  758. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-codex-responses.js +0 -1171
  759. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-codex-responses.js.map +0 -1
  760. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-completions.d.ts +0 -19
  761. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-completions.d.ts.map +0 -1
  762. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-completions.js +0 -956
  763. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-completions.js.map +0 -1
  764. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-prompt-cache.d.ts +0 -3
  765. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-prompt-cache.d.ts.map +0 -1
  766. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-prompt-cache.js +0 -10
  767. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-prompt-cache.js.map +0 -1
  768. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses-shared.d.ts +0 -18
  769. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses-shared.d.ts.map +0 -1
  770. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses-shared.js +0 -495
  771. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses-shared.js.map +0 -1
  772. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses.d.ts +0 -13
  773. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses.d.ts.map +0 -1
  774. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses.js +0 -233
  775. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses.js.map +0 -1
  776. package/node_modules/@dimivelev/chimera-ai/dist/providers/register-builtins.d.ts +0 -35
  777. package/node_modules/@dimivelev/chimera-ai/dist/providers/register-builtins.d.ts.map +0 -1
  778. package/node_modules/@dimivelev/chimera-ai/dist/providers/register-builtins.js +0 -254
  779. package/node_modules/@dimivelev/chimera-ai/dist/providers/register-builtins.js.map +0 -1
  780. package/node_modules/@dimivelev/chimera-ai/dist/providers/simple-options.d.ts +0 -8
  781. package/node_modules/@dimivelev/chimera-ai/dist/providers/simple-options.d.ts.map +0 -1
  782. package/node_modules/@dimivelev/chimera-ai/dist/providers/simple-options.js +0 -42
  783. package/node_modules/@dimivelev/chimera-ai/dist/providers/simple-options.js.map +0 -1
  784. package/node_modules/@dimivelev/chimera-ai/dist/providers/transform-messages.d.ts +0 -8
  785. package/node_modules/@dimivelev/chimera-ai/dist/providers/transform-messages.d.ts.map +0 -1
  786. package/node_modules/@dimivelev/chimera-ai/dist/providers/transform-messages.js +0 -184
  787. package/node_modules/@dimivelev/chimera-ai/dist/providers/transform-messages.js.map +0 -1
  788. package/node_modules/@dimivelev/chimera-ai/dist/session-resources.d.ts +0 -4
  789. package/node_modules/@dimivelev/chimera-ai/dist/session-resources.d.ts.map +0 -1
  790. package/node_modules/@dimivelev/chimera-ai/dist/session-resources.js +0 -22
  791. package/node_modules/@dimivelev/chimera-ai/dist/session-resources.js.map +0 -1
  792. package/node_modules/@dimivelev/chimera-ai/dist/stream.d.ts +0 -8
  793. package/node_modules/@dimivelev/chimera-ai/dist/stream.d.ts.map +0 -1
  794. package/node_modules/@dimivelev/chimera-ai/dist/stream.js +0 -39
  795. package/node_modules/@dimivelev/chimera-ai/dist/stream.js.map +0 -1
  796. package/node_modules/@dimivelev/chimera-ai/dist/types.d.ts +0 -514
  797. package/node_modules/@dimivelev/chimera-ai/dist/types.d.ts.map +0 -1
  798. package/node_modules/@dimivelev/chimera-ai/dist/types.js +0 -2
  799. package/node_modules/@dimivelev/chimera-ai/dist/types.js.map +0 -1
  800. package/node_modules/@dimivelev/chimera-ai/dist/utils/abort-signals.d.ts +0 -6
  801. package/node_modules/@dimivelev/chimera-ai/dist/utils/abort-signals.d.ts.map +0 -1
  802. package/node_modules/@dimivelev/chimera-ai/dist/utils/abort-signals.js +0 -34
  803. package/node_modules/@dimivelev/chimera-ai/dist/utils/abort-signals.js.map +0 -1
  804. package/node_modules/@dimivelev/chimera-ai/dist/utils/diagnostics.d.ts +0 -19
  805. package/node_modules/@dimivelev/chimera-ai/dist/utils/diagnostics.d.ts.map +0 -1
  806. package/node_modules/@dimivelev/chimera-ai/dist/utils/diagnostics.js +0 -25
  807. package/node_modules/@dimivelev/chimera-ai/dist/utils/diagnostics.js.map +0 -1
  808. package/node_modules/@dimivelev/chimera-ai/dist/utils/event-stream.d.ts +0 -21
  809. package/node_modules/@dimivelev/chimera-ai/dist/utils/event-stream.d.ts.map +0 -1
  810. package/node_modules/@dimivelev/chimera-ai/dist/utils/event-stream.js +0 -81
  811. package/node_modules/@dimivelev/chimera-ai/dist/utils/event-stream.js.map +0 -1
  812. package/node_modules/@dimivelev/chimera-ai/dist/utils/hash.d.ts +0 -3
  813. package/node_modules/@dimivelev/chimera-ai/dist/utils/hash.d.ts.map +0 -1
  814. package/node_modules/@dimivelev/chimera-ai/dist/utils/hash.js +0 -14
  815. package/node_modules/@dimivelev/chimera-ai/dist/utils/hash.js.map +0 -1
  816. package/node_modules/@dimivelev/chimera-ai/dist/utils/headers.d.ts +0 -2
  817. package/node_modules/@dimivelev/chimera-ai/dist/utils/headers.d.ts.map +0 -1
  818. package/node_modules/@dimivelev/chimera-ai/dist/utils/headers.js +0 -8
  819. package/node_modules/@dimivelev/chimera-ai/dist/utils/headers.js.map +0 -1
  820. package/node_modules/@dimivelev/chimera-ai/dist/utils/json-parse.d.ts +0 -16
  821. package/node_modules/@dimivelev/chimera-ai/dist/utils/json-parse.d.ts.map +0 -1
  822. package/node_modules/@dimivelev/chimera-ai/dist/utils/json-parse.js +0 -113
  823. package/node_modules/@dimivelev/chimera-ai/dist/utils/json-parse.js.map +0 -1
  824. package/node_modules/@dimivelev/chimera-ai/dist/utils/node-http-proxy.d.ts +0 -10
  825. package/node_modules/@dimivelev/chimera-ai/dist/utils/node-http-proxy.d.ts.map +0 -1
  826. package/node_modules/@dimivelev/chimera-ai/dist/utils/node-http-proxy.js +0 -97
  827. package/node_modules/@dimivelev/chimera-ai/dist/utils/node-http-proxy.js.map +0 -1
  828. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/anthropic.d.ts +0 -25
  829. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/anthropic.d.ts.map +0 -1
  830. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/anthropic.js +0 -335
  831. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/anthropic.js.map +0 -1
  832. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/device-code.d.ts +0 -21
  833. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/device-code.d.ts.map +0 -1
  834. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/device-code.js +0 -56
  835. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/device-code.js.map +0 -1
  836. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/github-copilot.d.ts +0 -30
  837. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/github-copilot.d.ts.map +0 -1
  838. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/github-copilot.js +0 -268
  839. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/github-copilot.js.map +0 -1
  840. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/index.d.ts +0 -58
  841. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/index.d.ts.map +0 -1
  842. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/index.js +0 -122
  843. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/index.js.map +0 -1
  844. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/oauth-page.d.ts +0 -3
  845. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/oauth-page.d.ts.map +0 -1
  846. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/oauth-page.js +0 -105
  847. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/oauth-page.js.map +0 -1
  848. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/openai-codex.d.ts +0 -43
  849. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/openai-codex.d.ts.map +0 -1
  850. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/openai-codex.js +0 -485
  851. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/openai-codex.js.map +0 -1
  852. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/pkce.d.ts +0 -13
  853. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/pkce.d.ts.map +0 -1
  854. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/pkce.js +0 -31
  855. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/pkce.js.map +0 -1
  856. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/types.d.ts +0 -64
  857. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/types.d.ts.map +0 -1
  858. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/types.js +0 -2
  859. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/types.js.map +0 -1
  860. package/node_modules/@dimivelev/chimera-ai/dist/utils/overflow.d.ts +0 -57
  861. package/node_modules/@dimivelev/chimera-ai/dist/utils/overflow.d.ts.map +0 -1
  862. package/node_modules/@dimivelev/chimera-ai/dist/utils/overflow.js +0 -154
  863. package/node_modules/@dimivelev/chimera-ai/dist/utils/overflow.js.map +0 -1
  864. package/node_modules/@dimivelev/chimera-ai/dist/utils/sanitize-unicode.d.ts +0 -22
  865. package/node_modules/@dimivelev/chimera-ai/dist/utils/sanitize-unicode.d.ts.map +0 -1
  866. package/node_modules/@dimivelev/chimera-ai/dist/utils/sanitize-unicode.js +0 -26
  867. package/node_modules/@dimivelev/chimera-ai/dist/utils/sanitize-unicode.js.map +0 -1
  868. package/node_modules/@dimivelev/chimera-ai/dist/utils/typebox-helpers.d.ts +0 -17
  869. package/node_modules/@dimivelev/chimera-ai/dist/utils/typebox-helpers.d.ts.map +0 -1
  870. package/node_modules/@dimivelev/chimera-ai/dist/utils/typebox-helpers.js +0 -21
  871. package/node_modules/@dimivelev/chimera-ai/dist/utils/typebox-helpers.js.map +0 -1
  872. package/node_modules/@dimivelev/chimera-ai/dist/utils/validation.d.ts +0 -18
  873. package/node_modules/@dimivelev/chimera-ai/dist/utils/validation.d.ts.map +0 -1
  874. package/node_modules/@dimivelev/chimera-ai/dist/utils/validation.js +0 -281
  875. package/node_modules/@dimivelev/chimera-ai/dist/utils/validation.js.map +0 -1
  876. package/node_modules/@dimivelev/chimera-ai/package.json +0 -106
  877. package/node_modules/@dimivelev/chimera-tui/dist/autocomplete.d.ts +0 -54
  878. package/node_modules/@dimivelev/chimera-tui/dist/autocomplete.d.ts.map +0 -1
  879. package/node_modules/@dimivelev/chimera-tui/dist/autocomplete.js +0 -632
  880. package/node_modules/@dimivelev/chimera-tui/dist/autocomplete.js.map +0 -1
  881. package/node_modules/@dimivelev/chimera-tui/dist/components/box.d.ts +0 -22
  882. package/node_modules/@dimivelev/chimera-tui/dist/components/box.d.ts.map +0 -1
  883. package/node_modules/@dimivelev/chimera-tui/dist/components/box.js +0 -104
  884. package/node_modules/@dimivelev/chimera-tui/dist/components/box.js.map +0 -1
  885. package/node_modules/@dimivelev/chimera-tui/dist/components/cancellable-loader.d.ts +0 -22
  886. package/node_modules/@dimivelev/chimera-tui/dist/components/cancellable-loader.d.ts.map +0 -1
  887. package/node_modules/@dimivelev/chimera-tui/dist/components/cancellable-loader.js +0 -35
  888. package/node_modules/@dimivelev/chimera-tui/dist/components/cancellable-loader.js.map +0 -1
  889. package/node_modules/@dimivelev/chimera-tui/dist/components/editor.d.ts +0 -249
  890. package/node_modules/@dimivelev/chimera-tui/dist/components/editor.d.ts.map +0 -1
  891. package/node_modules/@dimivelev/chimera-tui/dist/components/editor.js +0 -1857
  892. package/node_modules/@dimivelev/chimera-tui/dist/components/editor.js.map +0 -1
  893. package/node_modules/@dimivelev/chimera-tui/dist/components/image.d.ts +0 -28
  894. package/node_modules/@dimivelev/chimera-tui/dist/components/image.d.ts.map +0 -1
  895. package/node_modules/@dimivelev/chimera-tui/dist/components/image.js +0 -89
  896. package/node_modules/@dimivelev/chimera-tui/dist/components/image.js.map +0 -1
  897. package/node_modules/@dimivelev/chimera-tui/dist/components/input.d.ts +0 -37
  898. package/node_modules/@dimivelev/chimera-tui/dist/components/input.d.ts.map +0 -1
  899. package/node_modules/@dimivelev/chimera-tui/dist/components/input.js +0 -378
  900. package/node_modules/@dimivelev/chimera-tui/dist/components/input.js.map +0 -1
  901. package/node_modules/@dimivelev/chimera-tui/dist/components/loader.d.ts +0 -31
  902. package/node_modules/@dimivelev/chimera-tui/dist/components/loader.d.ts.map +0 -1
  903. package/node_modules/@dimivelev/chimera-tui/dist/components/loader.js +0 -69
  904. package/node_modules/@dimivelev/chimera-tui/dist/components/loader.js.map +0 -1
  905. package/node_modules/@dimivelev/chimera-tui/dist/components/markdown.d.ts +0 -96
  906. package/node_modules/@dimivelev/chimera-tui/dist/components/markdown.d.ts.map +0 -1
  907. package/node_modules/@dimivelev/chimera-tui/dist/components/markdown.js +0 -644
  908. package/node_modules/@dimivelev/chimera-tui/dist/components/markdown.js.map +0 -1
  909. package/node_modules/@dimivelev/chimera-tui/dist/components/select-list.d.ts +0 -50
  910. package/node_modules/@dimivelev/chimera-tui/dist/components/select-list.d.ts.map +0 -1
  911. package/node_modules/@dimivelev/chimera-tui/dist/components/select-list.js +0 -159
  912. package/node_modules/@dimivelev/chimera-tui/dist/components/select-list.js.map +0 -1
  913. package/node_modules/@dimivelev/chimera-tui/dist/components/settings-list.d.ts +0 -50
  914. package/node_modules/@dimivelev/chimera-tui/dist/components/settings-list.d.ts.map +0 -1
  915. package/node_modules/@dimivelev/chimera-tui/dist/components/settings-list.js +0 -185
  916. package/node_modules/@dimivelev/chimera-tui/dist/components/settings-list.js.map +0 -1
  917. package/node_modules/@dimivelev/chimera-tui/dist/components/spacer.d.ts +0 -12
  918. package/node_modules/@dimivelev/chimera-tui/dist/components/spacer.d.ts.map +0 -1
  919. package/node_modules/@dimivelev/chimera-tui/dist/components/spacer.js +0 -23
  920. package/node_modules/@dimivelev/chimera-tui/dist/components/spacer.js.map +0 -1
  921. package/node_modules/@dimivelev/chimera-tui/dist/components/text.d.ts +0 -19
  922. package/node_modules/@dimivelev/chimera-tui/dist/components/text.d.ts.map +0 -1
  923. package/node_modules/@dimivelev/chimera-tui/dist/components/text.js +0 -89
  924. package/node_modules/@dimivelev/chimera-tui/dist/components/text.js.map +0 -1
  925. package/node_modules/@dimivelev/chimera-tui/dist/components/truncated-text.d.ts +0 -13
  926. package/node_modules/@dimivelev/chimera-tui/dist/components/truncated-text.d.ts.map +0 -1
  927. package/node_modules/@dimivelev/chimera-tui/dist/components/truncated-text.js +0 -51
  928. package/node_modules/@dimivelev/chimera-tui/dist/components/truncated-text.js.map +0 -1
  929. package/node_modules/@dimivelev/chimera-tui/dist/editor-component.d.ts +0 -39
  930. package/node_modules/@dimivelev/chimera-tui/dist/editor-component.d.ts.map +0 -1
  931. package/node_modules/@dimivelev/chimera-tui/dist/editor-component.js +0 -2
  932. package/node_modules/@dimivelev/chimera-tui/dist/editor-component.js.map +0 -1
  933. package/node_modules/@dimivelev/chimera-tui/dist/fuzzy.d.ts +0 -16
  934. package/node_modules/@dimivelev/chimera-tui/dist/fuzzy.d.ts.map +0 -1
  935. package/node_modules/@dimivelev/chimera-tui/dist/fuzzy.js +0 -110
  936. package/node_modules/@dimivelev/chimera-tui/dist/fuzzy.js.map +0 -1
  937. package/node_modules/@dimivelev/chimera-tui/dist/index.d.ts +0 -23
  938. package/node_modules/@dimivelev/chimera-tui/dist/index.d.ts.map +0 -1
  939. package/node_modules/@dimivelev/chimera-tui/dist/index.js +0 -32
  940. package/node_modules/@dimivelev/chimera-tui/dist/index.js.map +0 -1
  941. package/node_modules/@dimivelev/chimera-tui/dist/keybindings.d.ts +0 -193
  942. package/node_modules/@dimivelev/chimera-tui/dist/keybindings.d.ts.map +0 -1
  943. package/node_modules/@dimivelev/chimera-tui/dist/keybindings.js +0 -174
  944. package/node_modules/@dimivelev/chimera-tui/dist/keybindings.js.map +0 -1
  945. package/node_modules/@dimivelev/chimera-tui/dist/keys.d.ts +0 -184
  946. package/node_modules/@dimivelev/chimera-tui/dist/keys.d.ts.map +0 -1
  947. package/node_modules/@dimivelev/chimera-tui/dist/keys.js +0 -1173
  948. package/node_modules/@dimivelev/chimera-tui/dist/keys.js.map +0 -1
  949. package/node_modules/@dimivelev/chimera-tui/dist/kill-ring.d.ts +0 -28
  950. package/node_modules/@dimivelev/chimera-tui/dist/kill-ring.d.ts.map +0 -1
  951. package/node_modules/@dimivelev/chimera-tui/dist/kill-ring.js +0 -44
  952. package/node_modules/@dimivelev/chimera-tui/dist/kill-ring.js.map +0 -1
  953. package/node_modules/@dimivelev/chimera-tui/dist/native-modifiers.d.ts +0 -3
  954. package/node_modules/@dimivelev/chimera-tui/dist/native-modifiers.d.ts.map +0 -1
  955. package/node_modules/@dimivelev/chimera-tui/dist/native-modifiers.js +0 -53
  956. package/node_modules/@dimivelev/chimera-tui/dist/native-modifiers.js.map +0 -1
  957. package/node_modules/@dimivelev/chimera-tui/dist/stdin-buffer.d.ts +0 -50
  958. package/node_modules/@dimivelev/chimera-tui/dist/stdin-buffer.d.ts.map +0 -1
  959. package/node_modules/@dimivelev/chimera-tui/dist/stdin-buffer.js +0 -361
  960. package/node_modules/@dimivelev/chimera-tui/dist/stdin-buffer.js.map +0 -1
  961. package/node_modules/@dimivelev/chimera-tui/dist/terminal-image.d.ts +0 -90
  962. package/node_modules/@dimivelev/chimera-tui/dist/terminal-image.d.ts.map +0 -1
  963. package/node_modules/@dimivelev/chimera-tui/dist/terminal-image.js +0 -366
  964. package/node_modules/@dimivelev/chimera-tui/dist/terminal-image.js.map +0 -1
  965. package/node_modules/@dimivelev/chimera-tui/dist/terminal.d.ts +0 -113
  966. package/node_modules/@dimivelev/chimera-tui/dist/terminal.d.ts.map +0 -1
  967. package/node_modules/@dimivelev/chimera-tui/dist/terminal.js +0 -472
  968. package/node_modules/@dimivelev/chimera-tui/dist/terminal.js.map +0 -1
  969. package/node_modules/@dimivelev/chimera-tui/dist/tui.d.ts +0 -242
  970. package/node_modules/@dimivelev/chimera-tui/dist/tui.d.ts.map +0 -1
  971. package/node_modules/@dimivelev/chimera-tui/dist/tui.js +0 -1221
  972. package/node_modules/@dimivelev/chimera-tui/dist/tui.js.map +0 -1
  973. package/node_modules/@dimivelev/chimera-tui/dist/undo-stack.d.ts +0 -17
  974. package/node_modules/@dimivelev/chimera-tui/dist/undo-stack.d.ts.map +0 -1
  975. package/node_modules/@dimivelev/chimera-tui/dist/undo-stack.js +0 -25
  976. package/node_modules/@dimivelev/chimera-tui/dist/undo-stack.js.map +0 -1
  977. package/node_modules/@dimivelev/chimera-tui/dist/utils.d.ts +0 -84
  978. package/node_modules/@dimivelev/chimera-tui/dist/utils.d.ts.map +0 -1
  979. package/node_modules/@dimivelev/chimera-tui/dist/utils.js +0 -1029
  980. package/node_modules/@dimivelev/chimera-tui/dist/utils.js.map +0 -1
  981. package/node_modules/@dimivelev/chimera-tui/dist/word-navigation.d.ts +0 -25
  982. package/node_modules/@dimivelev/chimera-tui/dist/word-navigation.d.ts.map +0 -1
  983. package/node_modules/@dimivelev/chimera-tui/dist/word-navigation.js +0 -96
  984. package/node_modules/@dimivelev/chimera-tui/dist/word-navigation.js.map +0 -1
  985. package/node_modules/@dimivelev/chimera-tui/package.json +0 -47
@@ -1,281 +0,0 @@
1
- import { Compile } from "typebox/compile";
2
- import { Value } from "typebox/value";
3
- const validatorCache = new WeakMap();
4
- const TYPEBOX_KIND = Symbol.for("TypeBox.Kind");
5
- function isRecord(value) {
6
- return typeof value === "object" && value !== null;
7
- }
8
- function isJsonSchemaObject(value) {
9
- return isRecord(value);
10
- }
11
- function hasTypeBoxMetadata(schema) {
12
- return isRecord(schema) && Object.getOwnPropertySymbols(schema).includes(TYPEBOX_KIND);
13
- }
14
- function getSchemaTypes(schema) {
15
- if (typeof schema.type === "string") {
16
- return [schema.type];
17
- }
18
- if (Array.isArray(schema.type)) {
19
- return schema.type.filter((type) => typeof type === "string");
20
- }
21
- return [];
22
- }
23
- function matchesJsonType(value, type) {
24
- switch (type) {
25
- case "number":
26
- return typeof value === "number";
27
- case "integer":
28
- return typeof value === "number" && Number.isInteger(value);
29
- case "boolean":
30
- return typeof value === "boolean";
31
- case "string":
32
- return typeof value === "string";
33
- case "null":
34
- return value === null;
35
- case "array":
36
- return Array.isArray(value);
37
- case "object":
38
- return isRecord(value) && !Array.isArray(value);
39
- default:
40
- return false;
41
- }
42
- }
43
- function isValidatorSchema(value) {
44
- return isRecord(value);
45
- }
46
- function getSubSchemaValidator(schema) {
47
- if (!isValidatorSchema(schema)) {
48
- return undefined;
49
- }
50
- try {
51
- return getValidator(schema);
52
- }
53
- catch {
54
- return undefined;
55
- }
56
- }
57
- function coercePrimitiveByType(value, type) {
58
- switch (type) {
59
- case "number": {
60
- if (value === null) {
61
- return 0;
62
- }
63
- if (typeof value === "string" && value.trim() !== "") {
64
- const parsed = Number(value);
65
- if (Number.isFinite(parsed)) {
66
- return parsed;
67
- }
68
- }
69
- if (typeof value === "boolean") {
70
- return value ? 1 : 0;
71
- }
72
- return value;
73
- }
74
- case "integer": {
75
- if (value === null) {
76
- return 0;
77
- }
78
- if (typeof value === "string" && value.trim() !== "") {
79
- const parsed = Number(value);
80
- if (Number.isInteger(parsed)) {
81
- return parsed;
82
- }
83
- }
84
- if (typeof value === "boolean") {
85
- return value ? 1 : 0;
86
- }
87
- return value;
88
- }
89
- case "boolean": {
90
- if (value === null) {
91
- return false;
92
- }
93
- if (typeof value === "string") {
94
- if (value === "true") {
95
- return true;
96
- }
97
- if (value === "false") {
98
- return false;
99
- }
100
- }
101
- if (typeof value === "number") {
102
- if (value === 1) {
103
- return true;
104
- }
105
- if (value === 0) {
106
- return false;
107
- }
108
- }
109
- return value;
110
- }
111
- case "string": {
112
- if (value === null) {
113
- return "";
114
- }
115
- if (typeof value === "number" || typeof value === "boolean") {
116
- return String(value);
117
- }
118
- return value;
119
- }
120
- case "null": {
121
- if (value === "" || value === 0 || value === false) {
122
- return null;
123
- }
124
- return value;
125
- }
126
- default:
127
- return value;
128
- }
129
- }
130
- function applySchemaObjectCoercion(value, schema) {
131
- const properties = schema.properties;
132
- const definedKeys = new Set(properties ? Object.keys(properties) : []);
133
- if (properties) {
134
- for (const [key, propertySchema] of Object.entries(properties)) {
135
- if (!(key in value)) {
136
- continue;
137
- }
138
- value[key] = coerceWithJsonSchema(value[key], propertySchema);
139
- }
140
- }
141
- if (schema.additionalProperties && isJsonSchemaObject(schema.additionalProperties)) {
142
- for (const [key, propertyValue] of Object.entries(value)) {
143
- if (definedKeys.has(key)) {
144
- continue;
145
- }
146
- value[key] = coerceWithJsonSchema(propertyValue, schema.additionalProperties);
147
- }
148
- }
149
- }
150
- function applySchemaArrayCoercion(value, schema) {
151
- if (Array.isArray(schema.items)) {
152
- for (let index = 0; index < value.length; index++) {
153
- const itemSchema = schema.items[index];
154
- if (!itemSchema) {
155
- continue;
156
- }
157
- value[index] = coerceWithJsonSchema(value[index], itemSchema);
158
- }
159
- return;
160
- }
161
- if (isJsonSchemaObject(schema.items)) {
162
- for (let index = 0; index < value.length; index++) {
163
- value[index] = coerceWithJsonSchema(value[index], schema.items);
164
- }
165
- }
166
- }
167
- function coerceWithUnionSchema(value, schemas) {
168
- for (const schema of schemas) {
169
- const candidate = structuredClone(value);
170
- const coerced = coerceWithJsonSchema(candidate, schema);
171
- const validator = getSubSchemaValidator(schema);
172
- if (validator?.Check(coerced)) {
173
- return coerced;
174
- }
175
- }
176
- return value;
177
- }
178
- function coerceWithJsonSchema(value, schema) {
179
- let nextValue = value;
180
- if (Array.isArray(schema.allOf)) {
181
- for (const nested of schema.allOf) {
182
- nextValue = coerceWithJsonSchema(nextValue, nested);
183
- }
184
- }
185
- if (Array.isArray(schema.anyOf)) {
186
- nextValue = coerceWithUnionSchema(nextValue, schema.anyOf);
187
- }
188
- if (Array.isArray(schema.oneOf)) {
189
- nextValue = coerceWithUnionSchema(nextValue, schema.oneOf);
190
- }
191
- const schemaTypes = getSchemaTypes(schema);
192
- const matchesUnionMember = schemaTypes.length > 1 && schemaTypes.some((schemaType) => matchesJsonType(nextValue, schemaType));
193
- if (schemaTypes.length > 0 && !matchesUnionMember) {
194
- for (const schemaType of schemaTypes) {
195
- const candidate = coercePrimitiveByType(nextValue, schemaType);
196
- if (candidate !== nextValue) {
197
- nextValue = candidate;
198
- break;
199
- }
200
- }
201
- }
202
- if (schemaTypes.includes("object") && isRecord(nextValue) && !Array.isArray(nextValue)) {
203
- applySchemaObjectCoercion(nextValue, schema);
204
- }
205
- if (schemaTypes.includes("array") && Array.isArray(nextValue)) {
206
- applySchemaArrayCoercion(nextValue, schema);
207
- }
208
- return nextValue;
209
- }
210
- function getValidator(schema) {
211
- const key = schema;
212
- const cached = validatorCache.get(key);
213
- if (cached) {
214
- return cached;
215
- }
216
- const validator = Compile(schema);
217
- validatorCache.set(key, validator);
218
- return validator;
219
- }
220
- function formatValidationPath(error) {
221
- if (error.keyword === "required") {
222
- const requiredProperties = error.params.requiredProperties;
223
- const requiredProperty = requiredProperties?.[0];
224
- if (requiredProperty) {
225
- const basePath = error.instancePath.replace(/^\//, "").replace(/\//g, ".");
226
- return basePath ? `${basePath}.${requiredProperty}` : requiredProperty;
227
- }
228
- }
229
- const path = error.instancePath.replace(/^\//, "").replace(/\//g, ".");
230
- return path || "root";
231
- }
232
- /**
233
- * Finds a tool by name and validates the tool call arguments against its TypeBox schema
234
- * @param tools Array of tool definitions
235
- * @param toolCall The tool call from the LLM
236
- * @returns The validated arguments
237
- * @throws Error if tool is not found or validation fails
238
- */
239
- export function validateToolCall(tools, toolCall) {
240
- const tool = tools.find((t) => t.name === toolCall.name);
241
- if (!tool) {
242
- throw new Error(`Tool "${toolCall.name}" not found`);
243
- }
244
- return validateToolArguments(tool, toolCall);
245
- }
246
- /**
247
- * Validates tool call arguments against the tool's TypeBox schema
248
- * @param tool The tool definition with TypeBox schema
249
- * @param toolCall The tool call from the LLM
250
- * @returns The validated (and potentially coerced) arguments
251
- * @throws Error with formatted message if validation fails
252
- */
253
- export function validateToolArguments(tool, toolCall) {
254
- const args = structuredClone(toolCall.arguments);
255
- Value.Convert(tool.parameters, args);
256
- const validator = getValidator(tool.parameters);
257
- if (!hasTypeBoxMetadata(tool.parameters) && isJsonSchemaObject(tool.parameters)) {
258
- const coerced = coerceWithJsonSchema(args, tool.parameters);
259
- if (coerced !== args) {
260
- if (isRecord(args) && isRecord(coerced)) {
261
- for (const key of Object.keys(args)) {
262
- delete args[key];
263
- }
264
- Object.assign(args, coerced);
265
- }
266
- else {
267
- return validator.Check(coerced) ? coerced : args;
268
- }
269
- }
270
- }
271
- if (validator.Check(args)) {
272
- return args;
273
- }
274
- const errors = validator
275
- .Errors(args)
276
- .map((error) => ` - ${formatValidationPath(error)}: ${error.message}`)
277
- .join("\n") || "Unknown validation error";
278
- const errorMessage = `Validation failed for tool "${toolCall.name}":\n${errors}\n\nReceived arguments:\n${JSON.stringify(toolCall.arguments, null, 2)}`;
279
- throw new Error(errorMessage);
280
- }
281
- //# sourceMappingURL=validation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/utils/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGtC,MAAM,cAAc,GAAG,IAAI,OAAO,EAAsC,CAAC;AACzE,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AAYhD,SAAS,QAAQ,CAAC,KAAc,EAAoC;IACnE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC;AAAA,CACnD;AAED,SAAS,kBAAkB,CAAC,KAAc,EAA6B;IACtE,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;AAAA,CACvB;AAED,SAAS,kBAAkB,CAAC,MAAe,EAAW;IACrD,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;AAAA,CACvF;AAED,SAAS,cAAc,CAAC,MAAwB,EAAY;IAC3D,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QACrC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAA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SACtE,IAAI,CAAC,IAAI,CAAC,IAAI,0BAA0B,CAAC;IAE5C,MAAM,YAAY,GAAG,+BAA+B,QAAQ,CAAC,IAAI,OAAO,MAAM,4BAA4B,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;IAExJ,MAAM,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;AAAA,CAC9B","sourcesContent":["import { Compile } from \"typebox/compile\";\nimport type { TLocalizedValidationError } from \"typebox/error\";\nimport { Value } from \"typebox/value\";\nimport type { Tool, ToolCall } from \"../types.ts\";\n\nconst validatorCache = new WeakMap<object, ReturnType<typeof Compile>>();\nconst TYPEBOX_KIND = Symbol.for(\"TypeBox.Kind\");\n\ninterface JsonSchemaObject {\n\ttype?: string | string[];\n\tproperties?: Record<string, JsonSchemaObject>;\n\titems?: JsonSchemaObject | JsonSchemaObject[];\n\tadditionalProperties?: boolean | JsonSchemaObject;\n\tallOf?: JsonSchemaObject[];\n\tanyOf?: JsonSchemaObject[];\n\toneOf?: JsonSchemaObject[];\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n\treturn typeof value === \"object\" && value !== null;\n}\n\nfunction isJsonSchemaObject(value: unknown): value is JsonSchemaObject {\n\treturn isRecord(value);\n}\n\nfunction hasTypeBoxMetadata(schema: unknown): boolean {\n\treturn isRecord(schema) && Object.getOwnPropertySymbols(schema).includes(TYPEBOX_KIND);\n}\n\nfunction getSchemaTypes(schema: JsonSchemaObject): string[] {\n\tif (typeof schema.type === \"string\") {\n\t\treturn [schema.type];\n\t}\n\tif (Array.isArray(schema.type)) {\n\t\treturn schema.type.filter((type): type is string => typeof type === \"string\");\n\t}\n\treturn [];\n}\n\nfunction matchesJsonType(value: unknown, type: string): boolean {\n\tswitch (type) {\n\t\tcase \"number\":\n\t\t\treturn typeof value === \"number\";\n\t\tcase \"integer\":\n\t\t\treturn typeof value === \"number\" && Number.isInteger(value);\n\t\tcase \"boolean\":\n\t\t\treturn typeof value === \"boolean\";\n\t\tcase \"string\":\n\t\t\treturn typeof value === \"string\";\n\t\tcase \"null\":\n\t\t\treturn value === null;\n\t\tcase \"array\":\n\t\t\treturn Array.isArray(value);\n\t\tcase \"object\":\n\t\t\treturn isRecord(value) && !Array.isArray(value);\n\t\tdefault:\n\t\t\treturn false;\n\t}\n}\n\nfunction isValidatorSchema(value: unknown): value is Tool[\"parameters\"] {\n\treturn isRecord(value);\n}\n\nfunction getSubSchemaValidator(schema: JsonSchemaObject): ReturnType<typeof Compile> | undefined {\n\tif (!isValidatorSchema(schema)) {\n\t\treturn undefined;\n\t}\n\ttry {\n\t\treturn getValidator(schema);\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n\nfunction coercePrimitiveByType(value: unknown, type: string): unknown {\n\tswitch (type) {\n\t\tcase \"number\": {\n\t\t\tif (value === null) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tif (typeof value === \"string\" && value.trim() !== \"\") {\n\t\t\t\tconst parsed = Number(value);\n\t\t\t\tif (Number.isFinite(parsed)) {\n\t\t\t\t\treturn parsed;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (typeof value === \"boolean\") {\n\t\t\t\treturn value ? 1 : 0;\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t\tcase \"integer\": {\n\t\t\tif (value === null) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tif (typeof value === \"string\" && value.trim() !== \"\") {\n\t\t\t\tconst parsed = Number(value);\n\t\t\t\tif (Number.isInteger(parsed)) {\n\t\t\t\t\treturn parsed;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (typeof value === \"boolean\") {\n\t\t\t\treturn value ? 1 : 0;\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t\tcase \"boolean\": {\n\t\t\tif (value === null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (typeof value === \"string\") {\n\t\t\t\tif (value === \"true\") {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (value === \"false\") {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (typeof value === \"number\") {\n\t\t\t\tif (value === 1) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t\tcase \"string\": {\n\t\t\tif (value === null) {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\tif (typeof value === \"number\" || typeof value === \"boolean\") {\n\t\t\t\treturn String(value);\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t\tcase \"null\": {\n\t\t\tif (value === \"\" || value === 0 || value === false) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t\tdefault:\n\t\t\treturn value;\n\t}\n}\n\nfunction applySchemaObjectCoercion(value: Record<string, unknown>, schema: JsonSchemaObject): void {\n\tconst properties = schema.properties;\n\tconst definedKeys = new Set<string>(properties ? Object.keys(properties) : []);\n\n\tif (properties) {\n\t\tfor (const [key, propertySchema] of Object.entries(properties)) {\n\t\t\tif (!(key in value)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvalue[key] = coerceWithJsonSchema(value[key], propertySchema);\n\t\t}\n\t}\n\n\tif (schema.additionalProperties && isJsonSchemaObject(schema.additionalProperties)) {\n\t\tfor (const [key, propertyValue] of Object.entries(value)) {\n\t\t\tif (definedKeys.has(key)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvalue[key] = coerceWithJsonSchema(propertyValue, schema.additionalProperties);\n\t\t}\n\t}\n}\n\nfunction applySchemaArrayCoercion(value: unknown[], schema: JsonSchemaObject): void {\n\tif (Array.isArray(schema.items)) {\n\t\tfor (let index = 0; index < value.length; index++) {\n\t\t\tconst itemSchema = schema.items[index];\n\t\t\tif (!itemSchema) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvalue[index] = coerceWithJsonSchema(value[index], itemSchema);\n\t\t}\n\t\treturn;\n\t}\n\n\tif (isJsonSchemaObject(schema.items)) {\n\t\tfor (let index = 0; index < value.length; index++) {\n\t\t\tvalue[index] = coerceWithJsonSchema(value[index], schema.items);\n\t\t}\n\t}\n}\n\nfunction coerceWithUnionSchema(value: unknown, schemas: JsonSchemaObject[]): unknown {\n\tfor (const schema of schemas) {\n\t\tconst candidate = structuredClone(value);\n\t\tconst coerced = coerceWithJsonSchema(candidate, schema);\n\t\tconst validator = getSubSchemaValidator(schema);\n\t\tif (validator?.Check(coerced)) {\n\t\t\treturn coerced;\n\t\t}\n\t}\n\treturn value;\n}\n\nfunction coerceWithJsonSchema(value: unknown, schema: JsonSchemaObject): unknown {\n\tlet nextValue = value;\n\n\tif (Array.isArray(schema.allOf)) {\n\t\tfor (const nested of schema.allOf) {\n\t\t\tnextValue = coerceWithJsonSchema(nextValue, nested);\n\t\t}\n\t}\n\n\tif (Array.isArray(schema.anyOf)) {\n\t\tnextValue = coerceWithUnionSchema(nextValue, schema.anyOf);\n\t}\n\n\tif (Array.isArray(schema.oneOf)) {\n\t\tnextValue = coerceWithUnionSchema(nextValue, schema.oneOf);\n\t}\n\n\tconst schemaTypes = getSchemaTypes(schema);\n\tconst matchesUnionMember =\n\t\tschemaTypes.length > 1 && schemaTypes.some((schemaType) => matchesJsonType(nextValue, schemaType));\n\tif (schemaTypes.length > 0 && !matchesUnionMember) {\n\t\tfor (const schemaType of schemaTypes) {\n\t\t\tconst candidate = coercePrimitiveByType(nextValue, schemaType);\n\t\t\tif (candidate !== nextValue) {\n\t\t\t\tnextValue = candidate;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (schemaTypes.includes(\"object\") && isRecord(nextValue) && !Array.isArray(nextValue)) {\n\t\tapplySchemaObjectCoercion(nextValue, schema);\n\t}\n\n\tif (schemaTypes.includes(\"array\") && Array.isArray(nextValue)) {\n\t\tapplySchemaArrayCoercion(nextValue, schema);\n\t}\n\n\treturn nextValue;\n}\n\nfunction getValidator(schema: Tool[\"parameters\"]): ReturnType<typeof Compile> {\n\tconst key = schema as object;\n\tconst cached = validatorCache.get(key);\n\tif (cached) {\n\t\treturn cached;\n\t}\n\tconst validator = Compile(schema);\n\tvalidatorCache.set(key, validator);\n\treturn validator;\n}\n\nfunction formatValidationPath(error: TLocalizedValidationError): string {\n\tif (error.keyword === \"required\") {\n\t\tconst requiredProperties = (error.params as { requiredProperties?: string[] }).requiredProperties;\n\t\tconst requiredProperty = requiredProperties?.[0];\n\t\tif (requiredProperty) {\n\t\t\tconst basePath = error.instancePath.replace(/^\\//, \"\").replace(/\\//g, \".\");\n\t\t\treturn basePath ? `${basePath}.${requiredProperty}` : requiredProperty;\n\t\t}\n\t}\n\tconst path = error.instancePath.replace(/^\\//, \"\").replace(/\\//g, \".\");\n\treturn path || \"root\";\n}\n\n/**\n * Finds a tool by name and validates the tool call arguments against its TypeBox schema\n * @param tools Array of tool definitions\n * @param toolCall The tool call from the LLM\n * @returns The validated arguments\n * @throws Error if tool is not found or validation fails\n */\nexport function validateToolCall(tools: Tool[], toolCall: ToolCall): any {\n\tconst tool = tools.find((t) => t.name === toolCall.name);\n\tif (!tool) {\n\t\tthrow new Error(`Tool \"${toolCall.name}\" not found`);\n\t}\n\treturn validateToolArguments(tool, toolCall);\n}\n\n/**\n * Validates tool call arguments against the tool's TypeBox schema\n * @param tool The tool definition with TypeBox schema\n * @param toolCall The tool call from the LLM\n * @returns The validated (and potentially coerced) arguments\n * @throws Error with formatted message if validation fails\n */\nexport function validateToolArguments(tool: Tool, toolCall: ToolCall): any {\n\tconst args = structuredClone(toolCall.arguments);\n\tValue.Convert(tool.parameters, args);\n\n\tconst validator = getValidator(tool.parameters);\n\tif (!hasTypeBoxMetadata(tool.parameters) && isJsonSchemaObject(tool.parameters)) {\n\t\tconst coerced = coerceWithJsonSchema(args, tool.parameters);\n\t\tif (coerced !== args) {\n\t\t\tif (isRecord(args) && isRecord(coerced)) {\n\t\t\t\tfor (const key of Object.keys(args)) {\n\t\t\t\t\tdelete args[key];\n\t\t\t\t}\n\t\t\t\tObject.assign(args, coerced);\n\t\t\t} else {\n\t\t\t\treturn validator.Check(coerced) ? coerced : args;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (validator.Check(args)) {\n\t\treturn args;\n\t}\n\n\tconst errors =\n\t\tvalidator\n\t\t\t.Errors(args)\n\t\t\t.map((error) => ` - ${formatValidationPath(error)}: ${error.message}`)\n\t\t\t.join(\"\\n\") || \"Unknown validation error\";\n\n\tconst errorMessage = `Validation failed for tool \"${toolCall.name}\":\\n${errors}\\n\\nReceived arguments:\\n${JSON.stringify(toolCall.arguments, null, 2)}`;\n\n\tthrow new Error(errorMessage);\n}\n"]}
@@ -1,106 +0,0 @@
1
- {
2
- "name": "@dimivelev/chimera-ai",
3
- "version": "0.78.1",
4
- "description": "Unified LLM API with automatic model discovery and provider configuration",
5
- "type": "module",
6
- "main": "./dist/index.js",
7
- "types": "./dist/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/index.d.ts",
11
- "import": "./dist/index.js"
12
- },
13
- "./anthropic": {
14
- "types": "./dist/providers/anthropic.d.ts",
15
- "import": "./dist/providers/anthropic.js"
16
- },
17
- "./azure-openai-responses": {
18
- "types": "./dist/providers/azure-openai-responses.d.ts",
19
- "import": "./dist/providers/azure-openai-responses.js"
20
- },
21
- "./google": {
22
- "types": "./dist/providers/google.d.ts",
23
- "import": "./dist/providers/google.js"
24
- },
25
- "./google-vertex": {
26
- "types": "./dist/providers/google-vertex.d.ts",
27
- "import": "./dist/providers/google-vertex.js"
28
- },
29
- "./mistral": {
30
- "types": "./dist/providers/mistral.d.ts",
31
- "import": "./dist/providers/mistral.js"
32
- },
33
- "./openai-codex-responses": {
34
- "types": "./dist/providers/openai-codex-responses.d.ts",
35
- "import": "./dist/providers/openai-codex-responses.js"
36
- },
37
- "./openai-completions": {
38
- "types": "./dist/providers/openai-completions.d.ts",
39
- "import": "./dist/providers/openai-completions.js"
40
- },
41
- "./openai-responses": {
42
- "types": "./dist/providers/openai-responses.d.ts",
43
- "import": "./dist/providers/openai-responses.js"
44
- },
45
- "./oauth": {
46
- "types": "./dist/oauth.d.ts",
47
- "import": "./dist/oauth.js"
48
- },
49
- "./bedrock-provider": {
50
- "types": "./dist/bedrock-provider.d.ts",
51
- "import": "./dist/bedrock-provider.js"
52
- }
53
- },
54
- "bin": {
55
- "pi-ai": "./dist/cli.js"
56
- },
57
- "files": [
58
- "dist",
59
- "README.md"
60
- ],
61
- "scripts": {
62
- "clean": "shx rm -rf dist",
63
- "generate-models": "node scripts/generate-models.ts",
64
- "generate-image-models": "node scripts/generate-image-models.ts",
65
- "build": "npm run generate-models && npm run generate-image-models && tsgo -p tsconfig.build.json",
66
- "test": "vitest --run",
67
- "prepublishOnly": "npm run clean && npm run build"
68
- },
69
- "dependencies": {
70
- "@anthropic-ai/sdk": "0.91.1",
71
- "@aws-sdk/client-bedrock-runtime": "3.1048.0",
72
- "@smithy/node-http-handler": "4.7.3",
73
- "@google/genai": "1.52.0",
74
- "@mistralai/mistralai": "2.2.1",
75
- "http-proxy-agent": "7.0.2",
76
- "https-proxy-agent": "7.0.6",
77
- "openai": "6.26.0",
78
- "partial-json": "0.1.7",
79
- "typebox": "1.1.38"
80
- },
81
- "keywords": [
82
- "ai",
83
- "llm",
84
- "openai",
85
- "anthropic",
86
- "gemini",
87
- "bedrock",
88
- "unified",
89
- "api"
90
- ],
91
- "author": "Mario Zechner",
92
- "license": "MIT",
93
- "repository": {
94
- "type": "git",
95
- "url": "git+https://github.com/earendil-works/pi.git",
96
- "directory": "packages/ai"
97
- },
98
- "engines": {
99
- "node": ">=22.19.0"
100
- },
101
- "devDependencies": {
102
- "@types/node": "24.12.4",
103
- "canvas": "3.2.3",
104
- "vitest": "3.2.4"
105
- }
106
- }
@@ -1,54 +0,0 @@
1
- export interface AutocompleteItem {
2
- value: string;
3
- label: string;
4
- description?: string;
5
- }
6
- type Awaitable<T> = T | Promise<T>;
7
- export interface SlashCommand {
8
- name: string;
9
- description?: string;
10
- argumentHint?: string;
11
- getArgumentCompletions?(argumentPrefix: string): Awaitable<AutocompleteItem[] | null>;
12
- }
13
- export interface AutocompleteSuggestions {
14
- items: AutocompleteItem[];
15
- prefix: string;
16
- }
17
- export interface AutocompleteProvider {
18
- getSuggestions(lines: string[], cursorLine: number, cursorCol: number, options: {
19
- signal: AbortSignal;
20
- force?: boolean;
21
- }): Promise<AutocompleteSuggestions | null>;
22
- applyCompletion(lines: string[], cursorLine: number, cursorCol: number, item: AutocompleteItem, prefix: string): {
23
- lines: string[];
24
- cursorLine: number;
25
- cursorCol: number;
26
- };
27
- shouldTriggerFileCompletion?(lines: string[], cursorLine: number, cursorCol: number): boolean;
28
- }
29
- export declare class CombinedAutocompleteProvider implements AutocompleteProvider {
30
- private commands;
31
- private basePath;
32
- private fdPath;
33
- constructor(commands: (AutocompleteItem | SlashCommand)[] | undefined, basePath: string, fdPath?: string | null);
34
- getSuggestions(lines: string[], cursorLine: number, cursorCol: number, options: {
35
- signal: AbortSignal;
36
- force?: boolean;
37
- }): Promise<AutocompleteSuggestions | null>;
38
- applyCompletion(lines: string[], cursorLine: number, cursorCol: number, item: AutocompleteItem, prefix: string): {
39
- lines: string[];
40
- cursorLine: number;
41
- cursorCol: number;
42
- };
43
- private extractAtPrefix;
44
- private extractPathPrefix;
45
- private expandHomePath;
46
- private resolveScopedFuzzyQuery;
47
- private scopedPathForDisplay;
48
- private getFileSuggestions;
49
- private scoreEntry;
50
- private getFuzzyFileSuggestions;
51
- shouldTriggerFileCompletion(lines: string[], cursorLine: number, cursorCol: number): boolean;
52
- }
53
- export {};
54
- //# sourceMappingURL=autocomplete.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../src/autocomplete.ts"],"names":[],"mappings":"AA0NA,MAAM,WAAW,gBAAgB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd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AM,CAAgB;IAE9B,YAAY,QAAQ,iDAA0C,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAE,MAAM,GAAG,IAAW,EAI7G;IAEK,cAAc,CACnB,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE;QAAE,MAAM,EAAE,WAAW,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,GAC/C,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAoFzC;IAED,eAAe,CACd,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,gBAAgB,EACtB,MAAM,EAAE,MAAM,GACZ;QAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CA+E5D;IAGD,OAAO,CAAC,eAAe;IAiBvB,OAAO,CAAC,iBAAiB;IA8BzB,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,uBAAuB;IA8B/B,OAAO,CAAC,oBAAoB;IAS5B,OAAO,CAAC,kBAAkB;IAyI1B,OAAO,CAAC,UAAU;YAuBJ,uBAAuB;IAuDrC,2BAA2B,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAU3F;CACD","sourcesContent":["import { spawn } from \"child_process\";\nimport { readdirSync, statSync } from \"fs\";\nimport { homedir } from \"os\";\nimport { basename, dirname, join } from \"path\";\nimport { fuzzyFilter } from \"./fuzzy.ts\";\n\nconst PATH_DELIMITERS = new Set([\" \", \"\\t\", '\"', \"'\", \"=\"]);\n\nfunction toDisplayPath(value: string): string {\n\treturn value.replace(/\\\\/g, \"/\");\n}\n\nfunction escapeRegex(value: string): string {\n\treturn value.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n\nfunction buildFdPathQuery(query: string): string {\n\tconst normalized = toDisplayPath(query);\n\tif (!normalized.includes(\"/\")) {\n\t\treturn normalized;\n\t}\n\n\tconst hasTrailingSeparator = normalized.endsWith(\"/\");\n\tconst trimmed = normalized.replace(/^\\/+|\\/+$/g, \"\");\n\tif (!trimmed) {\n\t\treturn normalized;\n\t}\n\n\tconst separatorPattern = \"[\\\\\\\\/]\";\n\tconst segments = trimmed\n\t\t.split(\"/\")\n\t\t.filter(Boolean)\n\t\t.map((segment) => escapeRegex(segment));\n\tif (segments.length === 0) {\n\t\treturn normalized;\n\t}\n\n\tlet pattern = segments.join(separatorPattern);\n\tif (hasTrailingSeparator) {\n\t\tpattern += separatorPattern;\n\t}\n\treturn pattern;\n}\n\nfunction findLastDelimiter(text: string): number {\n\tfor (let i = text.length - 1; i >= 0; i -= 1) {\n\t\tif (PATH_DELIMITERS.has(text[i] ?? \"\")) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n}\n\nfunction findUnclosedQuoteStart(text: string): number | null {\n\tlet inQuotes = false;\n\tlet quoteStart = -1;\n\n\tfor (let i = 0; i < text.length; i += 1) {\n\t\tif (text[i] === '\"') {\n\t\t\tinQuotes = !inQuotes;\n\t\t\tif (inQuotes) {\n\t\t\t\tquoteStart = i;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn inQuotes ? quoteStart : null;\n}\n\nfunction isTokenStart(text: string, index: number): boolean {\n\treturn index === 0 || PATH_DELIMITERS.has(text[index - 1] ?? \"\");\n}\n\nfunction extractQuotedPrefix(text: string): string | null {\n\tconst quoteStart = findUnclosedQuoteStart(text);\n\tif (quoteStart === null) {\n\t\treturn null;\n\t}\n\n\tif (quoteStart > 0 && text[quoteStart - 1] === \"@\") {\n\t\tif (!isTokenStart(text, quoteStart - 1)) {\n\t\t\treturn null;\n\t\t}\n\t\treturn text.slice(quoteStart - 1);\n\t}\n\n\tif (!isTokenStart(text, quoteStart)) {\n\t\treturn null;\n\t}\n\n\treturn text.slice(quoteStart);\n}\n\nfunction parsePathPrefix(prefix: string): { rawPrefix: string; isAtPrefix: boolean; isQuotedPrefix: boolean } {\n\tif (prefix.startsWith('@\"')) {\n\t\treturn { rawPrefix: prefix.slice(2), isAtPrefix: true, isQuotedPrefix: true };\n\t}\n\tif (prefix.startsWith('\"')) {\n\t\treturn { rawPrefix: prefix.slice(1), isAtPrefix: false, isQuotedPrefix: true };\n\t}\n\tif (prefix.startsWith(\"@\")) {\n\t\treturn { rawPrefix: prefix.slice(1), isAtPrefix: true, isQuotedPrefix: false };\n\t}\n\treturn { rawPrefix: prefix, isAtPrefix: false, isQuotedPrefix: false };\n}\n\nfunction buildCompletionValue(\n\tpath: string,\n\toptions: { isDirectory: boolean; isAtPrefix: boolean; isQuotedPrefix: boolean },\n): string {\n\tconst needsQuotes = options.isQuotedPrefix || path.includes(\" \");\n\tconst prefix = options.isAtPrefix ? \"@\" : \"\";\n\n\tif (!needsQuotes) {\n\t\treturn `${prefix}${path}`;\n\t}\n\n\tconst openQuote = `${prefix}\"`;\n\tconst closeQuote = '\"';\n\treturn `${openQuote}${path}${closeQuote}`;\n}\n\n// Use fd to walk directory tree (fast, respects .gitignore)\nasync function walkDirectoryWithFd(\n\tbaseDir: string,\n\tfdPath: string,\n\tquery: string,\n\tmaxResults: number,\n\tsignal: AbortSignal,\n): Promise<Array<{ path: string; isDirectory: boolean }>> {\n\tconst args = [\n\t\t\"--base-directory\",\n\t\tbaseDir,\n\t\t\"--max-results\",\n\t\tString(maxResults),\n\t\t\"--type\",\n\t\t\"f\",\n\t\t\"--type\",\n\t\t\"d\",\n\t\t\"--follow\",\n\t\t\"--hidden\",\n\t\t\"--exclude\",\n\t\t\".git\",\n\t\t\"--exclude\",\n\t\t\".git/*\",\n\t\t\"--exclude\",\n\t\t\".git/**\",\n\t];\n\n\tif (toDisplayPath(query).includes(\"/\")) {\n\t\targs.push(\"--full-path\");\n\t}\n\n\tif (query) {\n\t\targs.push(buildFdPathQuery(query));\n\t}\n\n\treturn await new Promise((resolve) => {\n\t\tif (signal.aborted) {\n\t\t\tresolve([]);\n\t\t\treturn;\n\t\t}\n\n\t\tconst child = spawn(fdPath, args, {\n\t\t\tstdio: [\"ignore\", \"pipe\", \"pipe\"],\n\t\t});\n\t\tlet stdout = \"\";\n\t\tlet resolved = false;\n\n\t\tconst finish = (results: Array<{ path: string; isDirectory: boolean }>) => {\n\t\t\tif (resolved) return;\n\t\t\tresolved = true;\n\t\t\tsignal.removeEventListener(\"abort\", onAbort);\n\t\t\tresolve(results);\n\t\t};\n\n\t\tconst onAbort = () => {\n\t\t\tif (child.exitCode === null) {\n\t\t\t\tchild.kill(\"SIGKILL\");\n\t\t\t}\n\t\t};\n\n\t\tsignal.addEventListener(\"abort\", onAbort, { once: true });\n\t\tchild.stdout.setEncoding(\"utf-8\");\n\t\tchild.stdout.on(\"data\", (chunk: string) => {\n\t\t\tstdout += chunk;\n\t\t});\n\t\tchild.on(\"error\", () => {\n\t\t\tfinish([]);\n\t\t});\n\t\tchild.on(\"close\", (code) => {\n\t\t\tif (signal.aborted || code !== 0 || !stdout) {\n\t\t\t\tfinish([]);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst lines = stdout.trim().split(\"\\n\").filter(Boolean);\n\t\t\tconst results: Array<{ path: string; isDirectory: boolean }> = [];\n\n\t\t\tfor (const line of lines) {\n\t\t\t\tconst displayLine = toDisplayPath(line);\n\t\t\t\tconst hasTrailingSeparator = displayLine.endsWith(\"/\");\n\t\t\t\tconst normalizedPath = hasTrailingSeparator ? displayLine.slice(0, -1) : displayLine;\n\t\t\t\tif (normalizedPath === \".git\" || normalizedPath.startsWith(\".git/\") || normalizedPath.includes(\"/.git/\")) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tresults.push({\n\t\t\t\t\tpath: displayLine,\n\t\t\t\t\tisDirectory: hasTrailingSeparator,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tfinish(results);\n\t\t});\n\t});\n}\n\nexport interface AutocompleteItem {\n\tvalue: string;\n\tlabel: string;\n\tdescription?: string;\n}\n\ntype Awaitable<T> = T | Promise<T>;\n\nexport interface SlashCommand {\n\tname: string;\n\tdescription?: string;\n\targumentHint?: string;\n\t// Function to get argument completions for this command\n\t// Returns null if no argument completion is available\n\tgetArgumentCompletions?(argumentPrefix: string): Awaitable<AutocompleteItem[] | null>;\n}\n\nexport interface AutocompleteSuggestions {\n\titems: AutocompleteItem[];\n\tprefix: string; // What we're matching against (e.g., \"/\" or \"src/\")\n}\n\nexport interface AutocompleteProvider {\n\t// Get autocomplete suggestions for current text/cursor position\n\t// Returns null if no suggestions available\n\tgetSuggestions(\n\t\tlines: string[],\n\t\tcursorLine: number,\n\t\tcursorCol: number,\n\t\toptions: { signal: AbortSignal; force?: boolean },\n\t): Promise<AutocompleteSuggestions | null>;\n\n\t// Apply the selected item\n\t// Returns the new text and cursor position\n\tapplyCompletion(\n\t\tlines: string[],\n\t\tcursorLine: number,\n\t\tcursorCol: number,\n\t\titem: AutocompleteItem,\n\t\tprefix: string,\n\t): {\n\t\tlines: string[];\n\t\tcursorLine: number;\n\t\tcursorCol: number;\n\t};\n\n\t// Check if file completion should trigger for explicit Tab completion\n\tshouldTriggerFileCompletion?(lines: string[], cursorLine: number, cursorCol: number): boolean;\n}\n\n// Combined provider that handles both slash commands and file paths\nexport class CombinedAutocompleteProvider implements AutocompleteProvider {\n\tprivate commands: (SlashCommand | AutocompleteItem)[];\n\tprivate basePath: string;\n\tprivate fdPath: string | null;\n\n\tconstructor(commands: (SlashCommand | AutocompleteItem)[] = [], basePath: string, fdPath: string | null = null) {\n\t\tthis.commands = commands;\n\t\tthis.basePath = basePath;\n\t\tthis.fdPath = fdPath;\n\t}\n\n\tasync getSuggestions(\n\t\tlines: string[],\n\t\tcursorLine: number,\n\t\tcursorCol: number,\n\t\toptions: { signal: AbortSignal; force?: boolean },\n\t): Promise<AutocompleteSuggestions | null> {\n\t\tconst currentLine = lines[cursorLine] || \"\";\n\t\tconst textBeforeCursor = currentLine.slice(0, cursorCol);\n\n\t\tconst atPrefix = this.extractAtPrefix(textBeforeCursor);\n\t\tif (atPrefix) {\n\t\t\tconst { rawPrefix, isQuotedPrefix } = parsePathPrefix(atPrefix);\n\t\t\tconst suggestions = await this.getFuzzyFileSuggestions(rawPrefix, {\n\t\t\t\tisQuotedPrefix,\n\t\t\t\tsignal: options.signal,\n\t\t\t});\n\t\t\tif (suggestions.length === 0) return null;\n\n\t\t\treturn {\n\t\t\t\titems: suggestions,\n\t\t\t\tprefix: atPrefix,\n\t\t\t};\n\t\t}\n\n\t\tif (!options.force && textBeforeCursor.startsWith(\"/\")) {\n\t\t\tconst spaceIndex = textBeforeCursor.indexOf(\" \");\n\n\t\t\tif (spaceIndex === -1) {\n\t\t\t\tconst prefix = textBeforeCursor.slice(1);\n\t\t\t\tconst commandItems = this.commands.map((cmd) => {\n\t\t\t\t\tconst name = \"name\" in cmd ? cmd.name : cmd.value;\n\t\t\t\t\tconst hint = \"argumentHint\" in cmd && cmd.argumentHint ? cmd.argumentHint : undefined;\n\t\t\t\t\tconst desc = cmd.description ?? \"\";\n\t\t\t\t\tconst fullDesc = hint ? (desc ? `${hint} — ${desc}` : hint) : desc;\n\t\t\t\t\treturn {\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tlabel: name,\n\t\t\t\t\t\tdescription: fullDesc || undefined,\n\t\t\t\t\t};\n\t\t\t\t});\n\n\t\t\t\tconst filtered = fuzzyFilter(commandItems, prefix, (item) => item.name).map((item) => ({\n\t\t\t\t\tvalue: item.name,\n\t\t\t\t\tlabel: item.label,\n\t\t\t\t\t...(item.description && { description: item.description }),\n\t\t\t\t}));\n\n\t\t\t\tif (filtered.length === 0) return null;\n\n\t\t\t\treturn {\n\t\t\t\t\titems: filtered,\n\t\t\t\t\tprefix: textBeforeCursor,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst commandName = textBeforeCursor.slice(1, spaceIndex);\n\t\t\tconst argumentText = textBeforeCursor.slice(spaceIndex + 1);\n\n\t\t\tconst command = this.commands.find((cmd) => {\n\t\t\t\tconst name = \"name\" in cmd ? cmd.name : cmd.value;\n\t\t\t\treturn name === commandName;\n\t\t\t});\n\t\t\tif (!command || !(\"getArgumentCompletions\" in command) || !command.getArgumentCompletions) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst argumentSuggestions = await command.getArgumentCompletions(argumentText);\n\t\t\tif (!Array.isArray(argumentSuggestions) || argumentSuggestions.length === 0) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\titems: argumentSuggestions,\n\t\t\t\tprefix: argumentText,\n\t\t\t};\n\t\t}\n\n\t\tconst pathMatch = this.extractPathPrefix(textBeforeCursor, options.force ?? false);\n\t\tif (pathMatch === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst suggestions = this.getFileSuggestions(pathMatch);\n\t\tif (suggestions.length === 0) return null;\n\n\t\treturn {\n\t\t\titems: suggestions,\n\t\t\tprefix: pathMatch,\n\t\t};\n\t}\n\n\tapplyCompletion(\n\t\tlines: string[],\n\t\tcursorLine: number,\n\t\tcursorCol: number,\n\t\titem: AutocompleteItem,\n\t\tprefix: string,\n\t): { lines: string[]; cursorLine: number; cursorCol: number } {\n\t\tconst currentLine = lines[cursorLine] || \"\";\n\t\tconst beforePrefix = currentLine.slice(0, cursorCol - prefix.length);\n\t\tconst afterCursor = currentLine.slice(cursorCol);\n\t\tconst isQuotedPrefix = prefix.startsWith('\"') || prefix.startsWith('@\"');\n\t\tconst hasLeadingQuoteAfterCursor = afterCursor.startsWith('\"');\n\t\tconst hasTrailingQuoteInItem = item.value.endsWith('\"');\n\t\tconst adjustedAfterCursor =\n\t\t\tisQuotedPrefix && hasTrailingQuoteInItem && hasLeadingQuoteAfterCursor ? afterCursor.slice(1) : afterCursor;\n\n\t\t// Check if we're completing a slash command (prefix starts with \"/\" but NOT a file path)\n\t\t// Slash commands are at the start of the line and don't contain path separators after the first /\n\t\tconst isSlashCommand = prefix.startsWith(\"/\") && beforePrefix.trim() === \"\" && !prefix.slice(1).includes(\"/\");\n\t\tif (isSlashCommand) {\n\t\t\t// This is a command name completion\n\t\t\tconst newLine = `${beforePrefix}/${item.value} ${adjustedAfterCursor}`;\n\t\t\tconst newLines = [...lines];\n\t\t\tnewLines[cursorLine] = newLine;\n\n\t\t\treturn {\n\t\t\t\tlines: newLines,\n\t\t\t\tcursorLine,\n\t\t\t\tcursorCol: beforePrefix.length + item.value.length + 2, // +2 for \"/\" and space\n\t\t\t};\n\t\t}\n\n\t\t// Check if we're completing a file attachment (prefix starts with \"@\")\n\t\tif (prefix.startsWith(\"@\")) {\n\t\t\t// This is a file attachment completion\n\t\t\t// Don't add space after directories so user can continue autocompleting\n\t\t\tconst isDirectory = item.label.endsWith(\"/\");\n\t\t\tconst suffix = isDirectory ? \"\" : \" \";\n\t\t\tconst newLine = `${beforePrefix + item.value}${suffix}${adjustedAfterCursor}`;\n\t\t\tconst newLines = [...lines];\n\t\t\tnewLines[cursorLine] = newLine;\n\n\t\t\tconst hasTrailingQuote = item.value.endsWith('\"');\n\t\t\tconst cursorOffset = isDirectory && hasTrailingQuote ? item.value.length - 1 : item.value.length;\n\n\t\t\treturn {\n\t\t\t\tlines: newLines,\n\t\t\t\tcursorLine,\n\t\t\t\tcursorCol: beforePrefix.length + cursorOffset + suffix.length,\n\t\t\t};\n\t\t}\n\n\t\t// Check if we're in a slash command context (beforePrefix contains \"/command \")\n\t\tconst textBeforeCursor = currentLine.slice(0, cursorCol);\n\t\tif (textBeforeCursor.includes(\"/\") && textBeforeCursor.includes(\" \")) {\n\t\t\t// This is likely a command argument completion\n\t\t\tconst newLine = beforePrefix + item.value + adjustedAfterCursor;\n\t\t\tconst newLines = [...lines];\n\t\t\tnewLines[cursorLine] = newLine;\n\n\t\t\tconst isDirectory = item.label.endsWith(\"/\");\n\t\t\tconst hasTrailingQuote = item.value.endsWith('\"');\n\t\t\tconst cursorOffset = isDirectory && hasTrailingQuote ? item.value.length - 1 : item.value.length;\n\n\t\t\treturn {\n\t\t\t\tlines: newLines,\n\t\t\t\tcursorLine,\n\t\t\t\tcursorCol: beforePrefix.length + cursorOffset,\n\t\t\t};\n\t\t}\n\n\t\t// For file paths, complete the path\n\t\tconst newLine = beforePrefix + item.value + adjustedAfterCursor;\n\t\tconst newLines = [...lines];\n\t\tnewLines[cursorLine] = newLine;\n\n\t\tconst isDirectory = item.label.endsWith(\"/\");\n\t\tconst hasTrailingQuote = item.value.endsWith('\"');\n\t\tconst cursorOffset = isDirectory && hasTrailingQuote ? item.value.length - 1 : item.value.length;\n\n\t\treturn {\n\t\t\tlines: newLines,\n\t\t\tcursorLine,\n\t\t\tcursorCol: beforePrefix.length + cursorOffset,\n\t\t};\n\t}\n\n\t// Extract @ prefix for fuzzy file suggestions\n\tprivate extractAtPrefix(text: string): string | null {\n\t\tconst quotedPrefix = extractQuotedPrefix(text);\n\t\tif (quotedPrefix?.startsWith('@\"')) {\n\t\t\treturn quotedPrefix;\n\t\t}\n\n\t\tconst lastDelimiterIndex = findLastDelimiter(text);\n\t\tconst tokenStart = lastDelimiterIndex === -1 ? 0 : lastDelimiterIndex + 1;\n\n\t\tif (text[tokenStart] === \"@\") {\n\t\t\treturn text.slice(tokenStart);\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t// Extract a path-like prefix from the text before cursor\n\tprivate extractPathPrefix(text: string, forceExtract: boolean = false): string | null {\n\t\tconst quotedPrefix = extractQuotedPrefix(text);\n\t\tif (quotedPrefix) {\n\t\t\treturn quotedPrefix;\n\t\t}\n\n\t\tconst lastDelimiterIndex = findLastDelimiter(text);\n\t\tconst pathPrefix = lastDelimiterIndex === -1 ? text : text.slice(lastDelimiterIndex + 1);\n\n\t\t// For forced extraction (Tab key), always return something\n\t\tif (forceExtract) {\n\t\t\treturn pathPrefix;\n\t\t}\n\n\t\t// For natural triggers, return if it looks like a path, ends with /, starts with ~/, .\n\t\t// Only return empty string if the text looks like it's starting a path context\n\t\tif (pathPrefix.includes(\"/\") || pathPrefix.startsWith(\".\") || pathPrefix.startsWith(\"~/\")) {\n\t\t\treturn pathPrefix;\n\t\t}\n\n\t\t// Return empty string only after a space (not for completely empty text)\n\t\t// Empty text should not trigger file suggestions - that's for forced Tab completion\n\t\tif (pathPrefix === \"\" && text.endsWith(\" \")) {\n\t\t\treturn pathPrefix;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t// Expand home directory (~/) to actual home path\n\tprivate expandHomePath(path: string): string {\n\t\tif (path.startsWith(\"~/\")) {\n\t\t\tconst expandedPath = join(homedir(), path.slice(2));\n\t\t\t// Preserve trailing slash if original path had one\n\t\t\treturn path.endsWith(\"/\") && !expandedPath.endsWith(\"/\") ? `${expandedPath}/` : expandedPath;\n\t\t} else if (path === \"~\") {\n\t\t\treturn homedir();\n\t\t}\n\t\treturn path;\n\t}\n\n\tprivate resolveScopedFuzzyQuery(rawQuery: string): { baseDir: string; query: string; displayBase: string } | null {\n\t\tconst normalizedQuery = toDisplayPath(rawQuery);\n\t\tconst slashIndex = normalizedQuery.lastIndexOf(\"/\");\n\t\tif (slashIndex === -1) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst displayBase = normalizedQuery.slice(0, slashIndex + 1);\n\t\tconst query = normalizedQuery.slice(slashIndex + 1);\n\n\t\tlet baseDir: string;\n\t\tif (displayBase.startsWith(\"~/\")) {\n\t\t\tbaseDir = this.expandHomePath(displayBase);\n\t\t} else if (displayBase.startsWith(\"/\")) {\n\t\t\tbaseDir = displayBase;\n\t\t} else {\n\t\t\tbaseDir = join(this.basePath, displayBase);\n\t\t}\n\n\t\ttry {\n\t\t\tif (!statSync(baseDir).isDirectory()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} catch {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn { baseDir, query, displayBase };\n\t}\n\n\tprivate scopedPathForDisplay(displayBase: string, relativePath: string): string {\n\t\tconst normalizedRelativePath = toDisplayPath(relativePath);\n\t\tif (displayBase === \"/\") {\n\t\t\treturn `/${normalizedRelativePath}`;\n\t\t}\n\t\treturn `${toDisplayPath(displayBase)}${normalizedRelativePath}`;\n\t}\n\n\t// Get file/directory suggestions for a given path prefix\n\tprivate getFileSuggestions(prefix: string): AutocompleteItem[] {\n\t\ttry {\n\t\t\tlet searchDir: string;\n\t\t\tlet searchPrefix: string;\n\t\t\tconst { rawPrefix, isAtPrefix, isQuotedPrefix } = parsePathPrefix(prefix);\n\t\t\tlet expandedPrefix = rawPrefix;\n\n\t\t\t// Handle home directory expansion\n\t\t\tif (expandedPrefix.startsWith(\"~\")) {\n\t\t\t\texpandedPrefix = this.expandHomePath(expandedPrefix);\n\t\t\t}\n\n\t\t\tconst isRootPrefix =\n\t\t\t\trawPrefix === \"\" ||\n\t\t\t\trawPrefix === \"./\" ||\n\t\t\t\trawPrefix === \"../\" ||\n\t\t\t\trawPrefix === \"~\" ||\n\t\t\t\trawPrefix === \"~/\" ||\n\t\t\t\trawPrefix === \"/\" ||\n\t\t\t\t(isAtPrefix && rawPrefix === \"\");\n\n\t\t\tif (isRootPrefix) {\n\t\t\t\t// Complete from specified position\n\t\t\t\tif (rawPrefix.startsWith(\"~\") || expandedPrefix.startsWith(\"/\")) {\n\t\t\t\t\tsearchDir = expandedPrefix;\n\t\t\t\t} else {\n\t\t\t\t\tsearchDir = join(this.basePath, expandedPrefix);\n\t\t\t\t}\n\t\t\t\tsearchPrefix = \"\";\n\t\t\t} else if (rawPrefix.endsWith(\"/\")) {\n\t\t\t\t// If prefix ends with /, show contents of that directory\n\t\t\t\tif (rawPrefix.startsWith(\"~\") || expandedPrefix.startsWith(\"/\")) {\n\t\t\t\t\tsearchDir = expandedPrefix;\n\t\t\t\t} else {\n\t\t\t\t\tsearchDir = join(this.basePath, expandedPrefix);\n\t\t\t\t}\n\t\t\t\tsearchPrefix = \"\";\n\t\t\t} else {\n\t\t\t\t// Split into directory and file prefix\n\t\t\t\tconst dir = dirname(expandedPrefix);\n\t\t\t\tconst file = basename(expandedPrefix);\n\t\t\t\tif (rawPrefix.startsWith(\"~\") || expandedPrefix.startsWith(\"/\")) {\n\t\t\t\t\tsearchDir = dir;\n\t\t\t\t} else {\n\t\t\t\t\tsearchDir = join(this.basePath, dir);\n\t\t\t\t}\n\t\t\t\tsearchPrefix = file;\n\t\t\t}\n\n\t\t\tconst entries = readdirSync(searchDir, { withFileTypes: true });\n\t\t\tconst suggestions: AutocompleteItem[] = [];\n\n\t\t\tfor (const entry of entries) {\n\t\t\t\tif (!entry.name.toLowerCase().startsWith(searchPrefix.toLowerCase())) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Check if entry is a directory (or a symlink pointing to a directory)\n\t\t\t\tlet isDirectory = entry.isDirectory();\n\t\t\t\tif (!isDirectory && entry.isSymbolicLink()) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst fullPath = join(searchDir, entry.name);\n\t\t\t\t\t\tisDirectory = statSync(fullPath).isDirectory();\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// Broken symlink or permission error - treat as file\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlet relativePath: string;\n\t\t\t\tconst name = entry.name;\n\t\t\t\tconst displayPrefix = rawPrefix;\n\n\t\t\t\tif (displayPrefix.endsWith(\"/\")) {\n\t\t\t\t\t// If prefix ends with /, append entry to the prefix\n\t\t\t\t\trelativePath = displayPrefix + name;\n\t\t\t\t} else if (displayPrefix.includes(\"/\") || displayPrefix.includes(\"\\\\\")) {\n\t\t\t\t\t// Preserve ~/ format for home directory paths\n\t\t\t\t\tif (displayPrefix.startsWith(\"~/\")) {\n\t\t\t\t\t\tconst homeRelativeDir = displayPrefix.slice(2); // Remove ~/\n\t\t\t\t\t\tconst dir = dirname(homeRelativeDir);\n\t\t\t\t\t\trelativePath = `~/${dir === \".\" ? name : join(dir, name)}`;\n\t\t\t\t\t} else if (displayPrefix.startsWith(\"/\")) {\n\t\t\t\t\t\t// Absolute path - construct properly\n\t\t\t\t\t\tconst dir = dirname(displayPrefix);\n\t\t\t\t\t\tif (dir === \"/\") {\n\t\t\t\t\t\t\trelativePath = `/${name}`;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trelativePath = `${dir}/${name}`;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\trelativePath = join(dirname(displayPrefix), name);\n\t\t\t\t\t\t// path.join normalizes away ./ prefix, preserve it\n\t\t\t\t\t\tif (displayPrefix.startsWith(\"./\") && !relativePath.startsWith(\"./\")) {\n\t\t\t\t\t\t\trelativePath = `./${relativePath}`;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// For standalone entries, preserve ~/ if original prefix was ~/\n\t\t\t\t\tif (displayPrefix.startsWith(\"~\")) {\n\t\t\t\t\t\trelativePath = `~/${name}`;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trelativePath = name;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trelativePath = toDisplayPath(relativePath);\n\t\t\t\tconst pathValue = isDirectory ? `${relativePath}/` : relativePath;\n\t\t\t\tconst value = buildCompletionValue(pathValue, {\n\t\t\t\t\tisDirectory,\n\t\t\t\t\tisAtPrefix,\n\t\t\t\t\tisQuotedPrefix,\n\t\t\t\t});\n\n\t\t\t\tsuggestions.push({\n\t\t\t\t\tvalue,\n\t\t\t\t\tlabel: name + (isDirectory ? \"/\" : \"\"),\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Sort directories first, then alphabetically\n\t\t\tsuggestions.sort((a, b) => {\n\t\t\t\tconst aIsDir = a.value.endsWith(\"/\");\n\t\t\t\tconst bIsDir = b.value.endsWith(\"/\");\n\t\t\t\tif (aIsDir && !bIsDir) return -1;\n\t\t\t\tif (!aIsDir && bIsDir) return 1;\n\t\t\t\treturn a.label.localeCompare(b.label);\n\t\t\t});\n\n\t\t\treturn suggestions;\n\t\t} catch (_e) {\n\t\t\t// Directory doesn't exist or not accessible\n\t\t\treturn [];\n\t\t}\n\t}\n\n\t// Score an entry against the query (higher = better match)\n\t// isDirectory adds bonus to prioritize folders\n\tprivate scoreEntry(filePath: string, query: string, isDirectory: boolean): number {\n\t\tconst fileName = basename(filePath);\n\t\tconst lowerFileName = fileName.toLowerCase();\n\t\tconst lowerQuery = query.toLowerCase();\n\n\t\tlet score = 0;\n\n\t\t// Exact filename match (highest)\n\t\tif (lowerFileName === lowerQuery) score = 100;\n\t\t// Filename starts with query\n\t\telse if (lowerFileName.startsWith(lowerQuery)) score = 80;\n\t\t// Substring match in filename\n\t\telse if (lowerFileName.includes(lowerQuery)) score = 50;\n\t\t// Substring match in full path\n\t\telse if (filePath.toLowerCase().includes(lowerQuery)) score = 30;\n\n\t\t// Directories get a bonus to appear first\n\t\tif (isDirectory && score > 0) score += 10;\n\n\t\treturn score;\n\t}\n\n\t// Fuzzy file search using fd (fast, respects .gitignore)\n\tprivate async getFuzzyFileSuggestions(\n\t\tquery: string,\n\t\toptions: { isQuotedPrefix: boolean; signal: AbortSignal },\n\t): Promise<AutocompleteItem[]> {\n\t\tif (!this.fdPath || options.signal.aborted) {\n\t\t\treturn [];\n\t\t}\n\n\t\ttry {\n\t\t\tconst scopedQuery = this.resolveScopedFuzzyQuery(query);\n\t\t\tconst fdBaseDir = scopedQuery?.baseDir ?? this.basePath;\n\t\t\tconst fdQuery = scopedQuery?.query ?? query;\n\t\t\tconst entries = await walkDirectoryWithFd(fdBaseDir, this.fdPath, fdQuery, 100, options.signal);\n\t\t\tif (options.signal.aborted) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\tconst scoredEntries = entries\n\t\t\t\t.map((entry) => ({\n\t\t\t\t\t...entry,\n\t\t\t\t\tscore: fdQuery ? this.scoreEntry(entry.path, fdQuery, entry.isDirectory) : 1,\n\t\t\t\t}))\n\t\t\t\t.filter((entry) => entry.score > 0);\n\n\t\t\tscoredEntries.sort((a, b) => b.score - a.score);\n\t\t\tconst topEntries = scoredEntries.slice(0, 20);\n\n\t\t\tconst suggestions: AutocompleteItem[] = [];\n\t\t\tfor (const { path: entryPath, isDirectory } of topEntries) {\n\t\t\t\tconst pathWithoutSlash = isDirectory ? entryPath.slice(0, -1) : entryPath;\n\t\t\t\tconst displayPath = scopedQuery\n\t\t\t\t\t? this.scopedPathForDisplay(scopedQuery.displayBase, pathWithoutSlash)\n\t\t\t\t\t: pathWithoutSlash;\n\t\t\t\tconst entryName = basename(pathWithoutSlash);\n\t\t\t\tconst completionPath = isDirectory ? `${displayPath}/` : displayPath;\n\t\t\t\tconst value = buildCompletionValue(completionPath, {\n\t\t\t\t\tisDirectory,\n\t\t\t\t\tisAtPrefix: true,\n\t\t\t\t\tisQuotedPrefix: options.isQuotedPrefix,\n\t\t\t\t});\n\n\t\t\t\tsuggestions.push({\n\t\t\t\t\tvalue,\n\t\t\t\t\tlabel: entryName + (isDirectory ? \"/\" : \"\"),\n\t\t\t\t\tdescription: displayPath,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn suggestions;\n\t\t} catch {\n\t\t\treturn [];\n\t\t}\n\t}\n\n\t// Check if we should trigger file completion (called on Tab key)\n\tshouldTriggerFileCompletion(lines: string[], cursorLine: number, cursorCol: number): boolean {\n\t\tconst currentLine = lines[cursorLine] || \"\";\n\t\tconst textBeforeCursor = currentLine.slice(0, cursorCol);\n\n\t\t// Don't trigger if we're typing a slash command at the start of the line\n\t\tif (textBeforeCursor.trim().startsWith(\"/\") && !textBeforeCursor.trim().includes(\" \")) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n}\n"]}