@dimivelev/chimera 0.78.1 → 0.78.3

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 +12 -12
  2. package/package.json +4 -9
  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 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/harness/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC9G,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,uGAAuG;AACvG,MAAM,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhG,0CAA0C;AAC1C,wBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAExE;AAED,sCAAsC;AACtC,wBAAgB,GAAG,CAAC,MAAM,EAA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GAAG,CAAC,CAAC;QAClB,aAAa,EAAE,aAAa,CAAC;QAC7B,WAAW,EAAE,KAAK,EAAE,CAAC;QACrB,SAAS,EAAE,qBAAqB,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;KACzD,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IACnC,mBAAmB,CAAC,EAAE,CACrB,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,KACb,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,SAAS,CAAC,CAAC;IAC/E,0EAA0E;IAC1E,aAAa,CAAC,EAAE,yBAAyB,CAAC;IAC1C,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,YAAY,CAAC,EAAE,SAAS,CAAC;CACzB;AAED,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["import type { ImageContent, Model, SimpleStreamOptions, TextContent, Transport } from \"@dimivelev/chimera-ai\";\nimport type { AgentEvent, AgentMessage, AgentTool, QueueMode, ThinkingLevel } from \"../index.ts\";\nimport type { Session } from \"./session/session.ts\";\n\n/** Result of a fallible operation. Expected failures are returned as `ok: false` instead of thrown. */\nexport type Result<TValue, TError> = { ok: true; value: TValue } | { ok: false; error: TError };\n\n/** Create a successful {@link Result}. */\nexport function ok<TValue, TError>(value: TValue): Result<TValue, TError> {\n\treturn { ok: true, value };\n}\n\n/** Create a failed {@link Result}. */\nexport function err<TValue, TError>(error: TError): Result<TValue, TError> {\n\treturn { ok: false, error };\n}\n\n/** Return the success value or throw the failure error. Intended for tests and explicit adapter boundaries. */\nexport function getOrThrow<TValue, TError>(result: Result<TValue, TError>): TValue {\n\tif (!result.ok) throw result.error;\n\treturn result.value;\n}\n\n/** Return the success value or `undefined`. Only object values are allowed to avoid truthiness bugs with primitives. */\nexport function getOrUndefined<TValue extends object, TError>(result: Result<TValue, TError>): TValue | undefined {\n\treturn result.ok ? result.value : undefined;\n}\n\n/** Normalize unknown thrown values into Error instances before using them as typed error causes. */\nexport function toError(error: unknown): Error {\n\tif (error instanceof Error) return error;\n\tif (typeof error === \"string\") return new Error(error);\n\ttry {\n\t\treturn new Error(JSON.stringify(error));\n\t} catch {\n\t\treturn new Error(String(error));\n\t}\n}\n\n/**\n * Skill loaded from a `SKILL.md` file or provided by an application.\n *\n * `name`, `description`, and `filePath` are inserted into the system prompt in an XML-formatted block as suggested by agentskills.io.\n * Use {@link formatSkillsForSystemPrompt} to generate the spec-compatible system prompt block.\n */\nexport interface Skill {\n\t/** Stable skill name used for lookup and model-visible listings. */\n\tname: string;\n\t/** Short model-visible description of when to use the skill. */\n\tdescription: string;\n\t/** Full skill instructions. */\n\tcontent: string;\n\t/** Absolute path to the skill file. Used for model-visible location and resolving relative references. */\n\tfilePath: string;\n\t/** Exclude this skill from model-visible skill lists while still allowing explicit application invocation. */\n\tdisableModelInvocation?: boolean;\n}\n\n/** Prompt template that can be formatted into a prompt for explicit invocation. */\nexport interface PromptTemplate {\n\t/** Stable template name used for lookup or application command routing. */\n\tname: string;\n\t/** Optional description for command lists or autocomplete. */\n\tdescription?: string;\n\t/** Template content. Argument placeholders are formatted by `formatPromptTemplateInvocation`. */\n\tcontent: string;\n}\n\n/** Resources made available to explicit invocation methods and system-prompt callbacks. */\nexport interface AgentHarnessResources<\n\tTSkill extends Skill = Skill,\n\tTPromptTemplate extends PromptTemplate = PromptTemplate,\n> {\n\t/** Prompt templates available for explicit invocation. */\n\tpromptTemplates?: TPromptTemplate[];\n\t/** Skills available to the model and explicit skill invocation. */\n\tskills?: TSkill[];\n}\n\n/** Curated provider request options owned by the harness and snapshotted per turn. */\nexport interface AgentHarnessStreamOptions {\n\t/** Preferred transport forwarded to the stream function. */\n\ttransport?: Transport;\n\t/** Provider request timeout in milliseconds. */\n\ttimeoutMs?: number;\n\t/** Maximum provider retry attempts. */\n\tmaxRetries?: number;\n\t/** Optional cap for provider-requested retry delays. */\n\tmaxRetryDelayMs?: number;\n\t/** Additional request headers merged with auth and lifecycle headers. */\n\theaders?: Record<string, string>;\n\t/** Provider metadata forwarded with requests. */\n\tmetadata?: SimpleStreamOptions[\"metadata\"];\n\t/** Provider cache retention hint. */\n\tcacheRetention?: SimpleStreamOptions[\"cacheRetention\"];\n}\n\n/** Per-request stream option patch returned by provider hooks. */\nexport interface AgentHarnessStreamOptionsPatch\n\textends Omit<Partial<AgentHarnessStreamOptions>, \"headers\" | \"metadata\"> {\n\t/** Header patch. `undefined` values delete keys; explicit `headers: undefined` clears all headers. */\n\theaders?: Record<string, string | undefined>;\n\t/** Metadata patch. `undefined` values delete keys; explicit `metadata: undefined` clears all metadata. */\n\tmetadata?: Record<string, unknown | undefined>;\n}\n\n/** Kind of filesystem object as addressed by a {@link FileSystem}. Symlinks are not followed automatically. */\nexport type FileKind = \"file\" | \"directory\" | \"symlink\";\n\n/** Stable, backend-independent file error codes returned by {@link FileSystem} file operations. */\nexport type FileErrorCode =\n\t| \"aborted\"\n\t| \"not_found\"\n\t| \"permission_denied\"\n\t| \"not_directory\"\n\t| \"is_directory\"\n\t| \"invalid\"\n\t| \"not_supported\"\n\t| \"unknown\";\n\n/** Error returned by {@link FileSystem} file operations. */\nexport class FileError extends Error {\n\t/** Backend-independent error code. */\n\tpublic code: FileErrorCode;\n\t/** Absolute addressed path associated with the failure, when available. */\n\tpublic path?: string;\n\n\tconstructor(code: FileErrorCode, message: string, path?: string, cause?: Error) {\n\t\tsuper(message, cause === undefined ? undefined : { cause });\n\t\tthis.name = \"FileError\";\n\t\tthis.code = code;\n\t\tthis.path = path;\n\t}\n}\n\n/** Stable, backend-independent execution error codes returned by {@link ExecutionEnv.exec}. */\nexport type ExecutionErrorCode =\n\t| \"aborted\"\n\t| \"timeout\"\n\t| \"shell_unavailable\"\n\t| \"spawn_error\"\n\t| \"callback_error\"\n\t| \"unknown\";\n\n/** Error returned by {@link ExecutionEnv.exec}. */\nexport class ExecutionError extends Error {\n\t/** Backend-independent error code. */\n\tpublic code: ExecutionErrorCode;\n\n\tconstructor(code: ExecutionErrorCode, message: string, cause?: Error) {\n\t\tsuper(message, cause === undefined ? undefined : { cause });\n\t\tthis.name = \"ExecutionError\";\n\t\tthis.code = code;\n\t}\n}\n\n/** Stable compaction error codes returned by compaction helpers. */\nexport type CompactionErrorCode = \"aborted\" | \"summarization_failed\" | \"invalid_session\" | \"unknown\";\n\n/** Error returned by compaction helpers. */\nexport class CompactionError extends Error {\n\t/** Backend-independent error code. */\n\tpublic code: CompactionErrorCode;\n\n\tconstructor(code: CompactionErrorCode, message: string, cause?: Error) {\n\t\tsuper(message, cause === undefined ? undefined : { cause });\n\t\tthis.name = \"CompactionError\";\n\t\tthis.code = code;\n\t}\n}\n\n/** Stable branch-summary error codes returned by branch summarization helpers. */\nexport type BranchSummaryErrorCode = \"aborted\" | \"summarization_failed\" | \"invalid_session\";\n\n/** Error returned by branch summarization helpers. */\nexport class BranchSummaryError extends Error {\n\t/** Backend-independent error code. */\n\tpublic code: BranchSummaryErrorCode;\n\n\tconstructor(code: BranchSummaryErrorCode, message: string, cause?: Error) {\n\t\tsuper(message, cause === undefined ? undefined : { cause });\n\t\tthis.name = \"BranchSummaryError\";\n\t\tthis.code = code;\n\t}\n}\n\nexport type SessionErrorCode =\n\t| \"not_found\"\n\t| \"invalid_session\"\n\t| \"invalid_entry\"\n\t| \"invalid_fork_target\"\n\t| \"storage\"\n\t| \"unknown\";\n\n/** Error thrown by session storage, repositories, and session tree operations. */\nexport class SessionError extends Error {\n\t/** Session subsystem error code. */\n\tpublic code: SessionErrorCode;\n\n\tconstructor(code: SessionErrorCode, message: string, cause?: Error) {\n\t\tsuper(message, cause === undefined ? undefined : { cause });\n\t\tthis.name = \"SessionError\";\n\t\tthis.code = code;\n\t}\n}\n\nexport type AgentHarnessErrorCode =\n\t| \"busy\"\n\t| \"invalid_state\"\n\t| \"invalid_argument\"\n\t| \"session\"\n\t| \"hook\"\n\t| \"auth\"\n\t| \"compaction\"\n\t| \"branch_summary\"\n\t| \"unknown\";\n\n/** Public AgentHarness failure with a stable top-level classification. */\nexport class AgentHarnessError extends Error {\n\tpublic code: AgentHarnessErrorCode;\n\n\tconstructor(code: AgentHarnessErrorCode, message: string, cause?: Error) {\n\t\tsuper(message, cause === undefined ? undefined : { cause });\n\t\tthis.name = \"AgentHarnessError\";\n\t\tthis.code = code;\n\t}\n}\n\n/** Metadata for one filesystem object in a {@link FileSystem}. */\nexport interface FileInfo {\n\t/** Basename of {@link path}. */\n\tname: string;\n\t/** Absolute, syntactically normalized addressed path in the execution environment. Symlinks are not followed. */\n\tpath: string;\n\t/** Object kind. Symlink targets are not followed; use {@link FileSystem.canonicalPath} explicitly. */\n\tkind: FileKind;\n\t/** Size in bytes for the addressed filesystem object. */\n\tsize: number;\n\t/** Modification time as milliseconds since Unix epoch. */\n\tmtimeMs: number;\n}\n\n/** Options for {@link Shell.exec}. */\nexport interface ExecutionEnvExecOptions {\n\t/** Working directory for the command. Relative paths are resolved against {@link ExecutionEnv.cwd}. Defaults to {@link ExecutionEnv.cwd}. */\n\tcwd?: string;\n\t/** Additional environment variables for the command. Values override the environment defaults. Defaults to no overrides. */\n\tenv?: Record<string, string>;\n\t/** Timeout in seconds. Implementations should return a timeout error when the command exceeds this duration. Defaults to no timeout. */\n\ttimeout?: number;\n\t/** Abort signal used to terminate the command. Defaults to no abort signal. */\n\tabortSignal?: AbortSignal;\n\t/** Called with stdout chunks as they are produced. */\n\tonStdout?: (chunk: string) => void;\n\t/** Called with stderr chunks as they are produced. */\n\tonStderr?: (chunk: string) => void;\n}\n\n/**\n * Filesystem capability used by the harness.\n *\n * Paths passed to methods may be absolute or relative to {@link cwd}. Paths returned by file operations are addressed paths\n * in the filesystem namespace, but are not canonicalized through symlinks unless returned by {@link canonicalPath}.\n *\n * Operation methods must never throw or reject. All filesystem failures, including unexpected backend failures, must be\n * encoded in the returned {@link Result}. Implementations must preserve this invariant.\n */\nexport interface FileSystem {\n\t/** Current working directory for relative paths. */\n\tcwd: string;\n\n\t/** Return an absolute addressed path without requiring it to exist and without resolving symlinks. */\n\tabsolutePath(path: string, abortSignal?: AbortSignal): Promise<Result<string, FileError>>;\n\t/** Join path segments in the filesystem namespace without requiring the result to exist. */\n\tjoinPath(parts: string[], abortSignal?: AbortSignal): Promise<Result<string, FileError>>;\n\t/** Read a UTF-8 text file. */\n\treadTextFile(path: string, abortSignal?: AbortSignal): Promise<Result<string, FileError>>;\n\t/** Read UTF-8 text lines. Implementations should stop once `maxLines` lines have been read. */\n\treadTextLines(\n\t\tpath: string,\n\t\toptions?: { maxLines?: number; abortSignal?: AbortSignal },\n\t): Promise<Result<string[], FileError>>;\n\t/** Read a binary file. */\n\treadBinaryFile(path: string, abortSignal?: AbortSignal): Promise<Result<Uint8Array, FileError>>;\n\t/** Create or overwrite a file, creating parent directories when supported. */\n\twriteFile(path: string, content: string | Uint8Array, abortSignal?: AbortSignal): Promise<Result<void, FileError>>;\n\t/** Create or append to a file, creating parent directories when supported. */\n\tappendFile(path: string, content: string | Uint8Array, abortSignal?: AbortSignal): Promise<Result<void, FileError>>;\n\t/** Return metadata for the addressed path without following symlinks. */\n\tfileInfo(path: string, abortSignal?: AbortSignal): Promise<Result<FileInfo, FileError>>;\n\t/** List direct children of a directory without following symlinks. */\n\tlistDir(path: string, abortSignal?: AbortSignal): Promise<Result<FileInfo[], FileError>>;\n\t/** Return the canonical path for an existing path, resolving symlinks where supported. */\n\tcanonicalPath(path: string, abortSignal?: AbortSignal): Promise<Result<string, FileError>>;\n\t/** Return false for missing paths. Other errors, such as permission failures, return a {@link FileError}. */\n\texists(path: string, abortSignal?: AbortSignal): Promise<Result<boolean, FileError>>;\n\t/** Create a directory. Defaults: `recursive: true`, no abort signal. */\n\tcreateDir(\n\t\tpath: string,\n\t\toptions?: { recursive?: boolean; abortSignal?: AbortSignal },\n\t): Promise<Result<void, FileError>>;\n\t/** Remove a file or directory. Defaults: `recursive: false`, `force: false`, no abort signal. */\n\tremove(\n\t\tpath: string,\n\t\toptions?: { recursive?: boolean; force?: boolean; abortSignal?: AbortSignal },\n\t): Promise<Result<void, FileError>>;\n\t/** Create a temporary directory and return its absolute path. Defaults: `prefix: \"tmp-\"`, no abort signal. */\n\tcreateTempDir(prefix?: string, abortSignal?: AbortSignal): Promise<Result<string, FileError>>;\n\t/** Create a temporary file and return its absolute path. Defaults: `prefix: \"\"`, `suffix: \"\"`, no abort signal. */\n\tcreateTempFile(options?: {\n\t\tprefix?: string;\n\t\tsuffix?: string;\n\t\tabortSignal?: AbortSignal;\n\t}): Promise<Result<string, FileError>>;\n\n\t/** Release filesystem resources. Must be best-effort and must not throw or reject. */\n\tcleanup(): Promise<void>;\n}\n\n/** Shell execution capability used by the harness. */\nexport interface Shell {\n\t/** Execute a shell command in {@link FileSystem.cwd} unless `options.cwd` is provided. */\n\texec(\n\t\tcommand: string,\n\t\toptions?: ExecutionEnvExecOptions,\n\t): Promise<Result<{ stdout: string; stderr: string; exitCode: number }, ExecutionError>>;\n\t/** Release shell resources. Must be best-effort and must not throw or reject. */\n\tcleanup(): Promise<void>;\n}\n\n/** Filesystem and process execution environment used by the harness. */\nexport interface ExecutionEnv extends FileSystem, Shell {}\n\nexport interface SessionTreeEntryBase {\n\ttype: string;\n\tid: string;\n\tparentId: string | null;\n\ttimestamp: string;\n}\n\nexport interface MessageEntry extends SessionTreeEntryBase {\n\ttype: \"message\";\n\tmessage: AgentMessage;\n}\n\nexport interface ThinkingLevelChangeEntry extends SessionTreeEntryBase {\n\ttype: \"thinking_level_change\";\n\tthinkingLevel: string;\n}\n\nexport interface ModelChangeEntry extends SessionTreeEntryBase {\n\ttype: \"model_change\";\n\tprovider: string;\n\tmodelId: string;\n}\n\nexport interface ActiveToolsChangeEntry extends SessionTreeEntryBase {\n\ttype: \"active_tools_change\";\n\tactiveToolNames: string[];\n}\n\nexport interface CompactionEntry<T = unknown> extends SessionTreeEntryBase {\n\ttype: \"compaction\";\n\tsummary: string;\n\tfirstKeptEntryId: string;\n\ttokensBefore: number;\n\tdetails?: T;\n\tfromHook?: boolean;\n}\n\nexport interface BranchSummaryEntry<T = unknown> extends SessionTreeEntryBase {\n\ttype: \"branch_summary\";\n\tfromId: string;\n\tsummary: string;\n\tdetails?: T;\n\tfromHook?: boolean;\n}\n\nexport interface CustomEntry<T = unknown> extends SessionTreeEntryBase {\n\ttype: \"custom\";\n\tcustomType: string;\n\tdata?: T;\n}\n\nexport interface CustomMessageEntry<T = unknown> extends SessionTreeEntryBase {\n\ttype: \"custom_message\";\n\tcustomType: string;\n\tcontent: string | (TextContent | ImageContent)[];\n\tdetails?: T;\n\tdisplay: boolean;\n}\n\nexport interface LabelEntry extends SessionTreeEntryBase {\n\ttype: \"label\";\n\ttargetId: string;\n\tlabel: string | undefined;\n}\n\nexport interface SessionInfoEntry extends SessionTreeEntryBase {\n\ttype: \"session_info\"; // legacy name, kept for backwards compatibility\n\tname?: string;\n}\n\nexport interface LeafEntry extends SessionTreeEntryBase {\n\ttype: \"leaf\";\n\ttargetId: string | null;\n}\n\nexport type SessionTreeEntry =\n\t| MessageEntry\n\t| ThinkingLevelChangeEntry\n\t| ModelChangeEntry\n\t| ActiveToolsChangeEntry\n\t| CompactionEntry\n\t| BranchSummaryEntry\n\t| CustomEntry\n\t| CustomMessageEntry\n\t| LabelEntry\n\t| SessionInfoEntry\n\t| LeafEntry;\n\nexport interface SessionContext {\n\tmessages: AgentMessage[];\n\tthinkingLevel: string;\n\tmodel: { provider: string; modelId: string } | null;\n\tactiveToolNames: string[] | null;\n}\n\nexport interface SessionMetadata {\n\tid: string;\n\tcreatedAt: string;\n}\n\nexport interface JsonlSessionMetadata extends SessionMetadata {\n\tcwd: string;\n\tpath: string;\n\tparentSessionPath?: string;\n}\n\nexport interface SessionStorage<TMetadata extends SessionMetadata = SessionMetadata> {\n\tgetMetadata(): Promise<TMetadata>;\n\tgetLeafId(): Promise<string | null>;\n\t/** Persist a leaf entry that records the active session-tree leaf. */\n\tsetLeafId(leafId: string | null): Promise<void>;\n\tcreateEntryId(): Promise<string>;\n\tappendEntry(entry: SessionTreeEntry): Promise<void>;\n\tgetEntry(id: string): Promise<SessionTreeEntry | undefined>;\n\tfindEntries<TType extends SessionTreeEntry[\"type\"]>(\n\t\ttype: TType,\n\t): Promise<Array<Extract<SessionTreeEntry, { type: TType }>>>;\n\tgetLabel(id: string): Promise<string | undefined>;\n\tgetPathToRoot(leafId: string | null): Promise<SessionTreeEntry[]>;\n\tgetEntries(): Promise<SessionTreeEntry[]>;\n}\n\nexport type { Session } from \"./session/session.ts\";\n\nexport interface SessionCreateOptions {\n\tid?: string;\n}\n\nexport interface SessionForkOptions {\n\tentryId?: string;\n\tposition?: \"before\" | \"at\";\n\tid?: string;\n}\n\nexport interface SessionRepo<\n\tTMetadata extends SessionMetadata = SessionMetadata,\n\tTCreateOptions extends SessionCreateOptions = SessionCreateOptions,\n\tTListOptions = void,\n> {\n\tcreate(options: TCreateOptions): Promise<Session<TMetadata>>;\n\topen(metadata: TMetadata): Promise<Session<TMetadata>>;\n\tlist(options?: TListOptions): Promise<TMetadata[]>;\n\tdelete(metadata: TMetadata): Promise<void>;\n\tfork(source: TMetadata, options: SessionForkOptions & TCreateOptions): Promise<Session<TMetadata>>;\n}\n\nexport interface JsonlSessionCreateOptions extends SessionCreateOptions {\n\tcwd: string;\n\tparentSessionPath?: string;\n}\n\nexport interface JsonlSessionListOptions {\n\tcwd?: string;\n}\n\nexport interface JsonlSessionRepoApi\n\textends SessionRepo<JsonlSessionMetadata, JsonlSessionCreateOptions, JsonlSessionListOptions> {}\n\nexport type AgentHarnessPhase = \"idle\" | \"turn\" | \"compaction\" | \"branch_summary\" | \"retry\";\n\nexport type PendingSessionWrite = SessionTreeEntry extends infer TEntry\n\t? TEntry extends SessionTreeEntry\n\t\t? Omit<TEntry, \"id\" | \"parentId\" | \"timestamp\">\n\t\t: never\n\t: never;\n\nexport interface QueueUpdateEvent {\n\ttype: \"queue_update\";\n\tsteer: AgentMessage[];\n\tfollowUp: AgentMessage[];\n\tnextTurn: AgentMessage[];\n}\n\nexport interface SavePointEvent {\n\ttype: \"save_point\";\n\thadPendingMutations: boolean;\n}\n\nexport interface AbortEvent {\n\ttype: \"abort\";\n\tclearedSteer: AgentMessage[];\n\tclearedFollowUp: AgentMessage[];\n}\n\nexport interface SettledEvent {\n\ttype: \"settled\";\n\tnextTurnCount: number;\n}\n\nexport interface BeforeAgentStartEvent<\n\tTSkill extends Skill = Skill,\n\tTPromptTemplate extends PromptTemplate = PromptTemplate,\n> {\n\ttype: \"before_agent_start\";\n\tprompt: string;\n\timages?: ImageContent[];\n\tsystemPrompt: string;\n\tresources: AgentHarnessResources<TSkill, TPromptTemplate>;\n}\n\nexport interface ContextEvent {\n\ttype: \"context\";\n\tmessages: AgentMessage[];\n}\n\nexport interface BeforeProviderRequestEvent {\n\ttype: \"before_provider_request\";\n\tmodel: Model<any>;\n\tsessionId: string;\n\tstreamOptions: AgentHarnessStreamOptions;\n}\n\nexport interface BeforeProviderPayloadEvent {\n\ttype: \"before_provider_payload\";\n\tmodel: Model<any>;\n\tpayload: unknown;\n}\n\nexport interface AfterProviderResponseEvent {\n\ttype: \"after_provider_response\";\n\tstatus: number;\n\theaders: Record<string, string>;\n}\n\nexport interface ToolCallEvent {\n\ttype: \"tool_call\";\n\ttoolCallId: string;\n\ttoolName: string;\n\tinput: Record<string, unknown>;\n}\n\nexport interface ToolResultEvent {\n\ttype: \"tool_result\";\n\ttoolCallId: string;\n\ttoolName: string;\n\tinput: Record<string, unknown>;\n\tcontent: Array<TextContent | ImageContent>;\n\tdetails: unknown;\n\tisError: boolean;\n}\n\nexport interface SessionBeforeCompactEvent {\n\ttype: \"session_before_compact\";\n\tpreparation: CompactionPreparation;\n\tbranchEntries: SessionTreeEntry[];\n\tcustomInstructions?: string;\n\tsignal: AbortSignal;\n}\n\nexport interface SessionCompactEvent {\n\ttype: \"session_compact\";\n\tcompactionEntry: CompactionEntry;\n\tfromHook: boolean;\n}\n\nexport interface SessionBeforeTreeEvent {\n\ttype: \"session_before_tree\";\n\tpreparation: TreePreparation;\n\tsignal: AbortSignal;\n}\n\nexport interface SessionTreeEvent {\n\ttype: \"session_tree\";\n\tnewLeafId: string | null;\n\toldLeafId: string | null;\n\tsummaryEntry?: BranchSummaryEntry;\n\tfromHook?: boolean;\n}\n\nexport interface ModelUpdateEvent {\n\ttype: \"model_update\";\n\tmodel: Model<any>;\n\tpreviousModel: Model<any> | undefined;\n\tsource: \"set\" | \"restore\";\n}\n\nexport interface ThinkingLevelUpdateEvent {\n\ttype: \"thinking_level_update\";\n\tlevel: ThinkingLevel;\n\tpreviousLevel: ThinkingLevel;\n}\n\nexport interface ToolsUpdateEvent {\n\ttype: \"tools_update\";\n\ttoolNames: string[];\n\tpreviousToolNames: string[];\n\tactiveToolNames: string[];\n\tpreviousActiveToolNames: string[];\n\tsource: \"set\" | \"restore\";\n}\n\nexport interface ResourcesUpdateEvent<\n\tTSkill extends Skill = Skill,\n\tTPromptTemplate extends PromptTemplate = PromptTemplate,\n> {\n\ttype: \"resources_update\";\n\tresources: AgentHarnessResources<TSkill, TPromptTemplate>;\n\tpreviousResources: AgentHarnessResources<TSkill, TPromptTemplate>;\n}\n\nexport type AgentHarnessOwnEvent<\n\tTSkill extends Skill = Skill,\n\tTPromptTemplate extends PromptTemplate = PromptTemplate,\n> =\n\t| QueueUpdateEvent\n\t| SavePointEvent\n\t| AbortEvent\n\t| SettledEvent\n\t| BeforeAgentStartEvent<TSkill, TPromptTemplate>\n\t| ContextEvent\n\t| BeforeProviderRequestEvent\n\t| BeforeProviderPayloadEvent\n\t| AfterProviderResponseEvent\n\t| ToolCallEvent\n\t| ToolResultEvent\n\t| SessionBeforeCompactEvent\n\t| SessionCompactEvent\n\t| SessionBeforeTreeEvent\n\t| SessionTreeEvent\n\t| ModelUpdateEvent\n\t| ThinkingLevelUpdateEvent\n\t| ResourcesUpdateEvent<TSkill, TPromptTemplate>\n\t| ToolsUpdateEvent;\n\nexport type AgentHarnessEvent<TSkill extends Skill = Skill, TPromptTemplate extends PromptTemplate = PromptTemplate> =\n\t| AgentEvent\n\t| AgentHarnessOwnEvent<TSkill, TPromptTemplate>;\n\nexport interface BeforeAgentStartResult {\n\tmessages?: AgentMessage[];\n\tsystemPrompt?: string;\n}\n\nexport interface ContextResult {\n\tmessages: AgentMessage[];\n}\n\nexport interface BeforeProviderRequestResult {\n\tstreamOptions?: AgentHarnessStreamOptionsPatch;\n}\n\nexport interface BeforeProviderPayloadResult {\n\tpayload: unknown;\n}\n\nexport interface ToolCallResult {\n\tblock?: boolean;\n\treason?: string;\n}\n\nexport interface ToolResultPatch {\n\tcontent?: Array<TextContent | ImageContent>;\n\tdetails?: unknown;\n\tisError?: boolean;\n\tterminate?: boolean;\n}\n\nexport interface SessionBeforeCompactResult {\n\tcancel?: boolean;\n\tcompaction?: CompactResult;\n}\n\nexport interface SessionBeforeTreeResult {\n\tcancel?: boolean;\n\tsummary?: { summary: string; details?: unknown };\n\tcustomInstructions?: string;\n\treplaceInstructions?: boolean;\n\tlabel?: string;\n}\n\nexport type AgentHarnessEventResultMap = {\n\tbefore_agent_start: BeforeAgentStartResult | undefined;\n\tcontext: ContextResult | undefined;\n\tbefore_provider_request: BeforeProviderRequestResult | undefined;\n\tbefore_provider_payload: BeforeProviderPayloadResult | undefined;\n\tafter_provider_response: undefined;\n\ttool_call: ToolCallResult | undefined;\n\ttool_result: ToolResultPatch | undefined;\n\tsession_before_compact: SessionBeforeCompactResult | undefined;\n\tsession_compact: undefined;\n\tsession_before_tree: SessionBeforeTreeResult | undefined;\n\tsession_tree: undefined;\n\tmodel_update: undefined;\n\tthinking_level_update: undefined;\n\tresources_update: undefined;\n\ttools_update: undefined;\n\tqueue_update: undefined;\n\tsave_point: undefined;\n\tabort: undefined;\n\tsettled: undefined;\n};\n\nexport interface AgentHarnessPromptOptions {\n\timages?: ImageContent[];\n}\n\nexport interface AbortResult {\n\tclearedSteer: AgentMessage[];\n\tclearedFollowUp: AgentMessage[];\n}\n\nexport interface CompactResult {\n\tsummary: string;\n\tfirstKeptEntryId: string;\n\ttokensBefore: number;\n\tdetails?: unknown;\n}\n\nexport interface NavigateTreeResult {\n\tcancelled: boolean;\n\teditorText?: string;\n\tsummaryEntry?: BranchSummaryEntry;\n}\n\nexport interface CompactionSettings {\n\tenabled: boolean;\n\treserveTokens: number;\n\tkeepRecentTokens: number;\n}\n\nexport interface CompactionPreparation {\n\tfirstKeptEntryId: string;\n\tmessagesToSummarize: AgentMessage[];\n\tturnPrefixMessages: AgentMessage[];\n\tisSplitTurn: boolean;\n\ttokensBefore: number;\n\tpreviousSummary?: string;\n\tfileOps: FileOperations;\n\tsettings: CompactionSettings;\n}\n\nexport interface FileOperations {\n\tread: Set<string>;\n\twritten: Set<string>;\n\tedited: Set<string>;\n}\n\nexport interface TreePreparation {\n\ttargetId: string;\n\toldLeafId: string | null;\n\tcommonAncestorId: string | null;\n\tentriesToSummarize: SessionTreeEntry[];\n\tuserWantsSummary: boolean;\n\tcustomInstructions?: string;\n\treplaceInstructions?: boolean;\n\tlabel?: string;\n}\n\nexport interface GenerateBranchSummaryOptions {\n\tmodel: Model<any>;\n\tapiKey: string;\n\theaders?: Record<string, string>;\n\tsignal: AbortSignal;\n\tcustomInstructions?: string;\n\treplaceInstructions?: boolean;\n\treserveTokens?: number;\n}\n\nexport interface BranchSummaryResult {\n\tsummary: string;\n\treadFiles: string[];\n\tmodifiedFiles: string[];\n}\n\nexport interface AgentHarnessOptions<\n\tTSkill extends Skill = Skill,\n\tTPromptTemplate extends PromptTemplate = PromptTemplate,\n\tTTool extends AgentTool = AgentTool,\n> {\n\tenv: ExecutionEnv;\n\tsession: Session;\n\ttools?: TTool[];\n\t/**\n\t * Concrete resources available to explicit invocation methods and system-prompt callbacks.\n\t * Applications own loading/reloading resources and should call `setResources()` with new values.\n\t */\n\tresources?: AgentHarnessResources<TSkill, TPromptTemplate>;\n\tsystemPrompt?:\n\t\t| string\n\t\t| ((context: {\n\t\t\t\tenv: ExecutionEnv;\n\t\t\t\tsession: Session;\n\t\t\t\tmodel: Model<any>;\n\t\t\t\tthinkingLevel: ThinkingLevel;\n\t\t\t\tactiveTools: TTool[];\n\t\t\t\tresources: AgentHarnessResources<TSkill, TPromptTemplate>;\n\t\t }) => string | Promise<string>);\n\tgetApiKeyAndHeaders?: (\n\t\tmodel: Model<any>,\n\t) => Promise<{ apiKey: string; headers?: Record<string, string> } | undefined>;\n\t/** Curated stream/provider request options. Snapshotted at turn start. */\n\tstreamOptions?: AgentHarnessStreamOptions;\n\tmodel: Model<any>;\n\tthinkingLevel?: ThinkingLevel;\n\tactiveToolNames?: string[];\n\tsteeringMode?: QueueMode;\n\tfollowUpMode?: QueueMode;\n}\n\nexport type { AgentHarness } from \"./agent-harness.ts\";\n"]}
@@ -1,94 +0,0 @@
1
- /** Create a successful {@link Result}. */
2
- export function ok(value) {
3
- return { ok: true, value };
4
- }
5
- /** Create a failed {@link Result}. */
6
- export function err(error) {
7
- return { ok: false, error };
8
- }
9
- /** Return the success value or throw the failure error. Intended for tests and explicit adapter boundaries. */
10
- export function getOrThrow(result) {
11
- if (!result.ok)
12
- throw result.error;
13
- return result.value;
14
- }
15
- /** Return the success value or `undefined`. Only object values are allowed to avoid truthiness bugs with primitives. */
16
- export function getOrUndefined(result) {
17
- return result.ok ? result.value : undefined;
18
- }
19
- /** Normalize unknown thrown values into Error instances before using them as typed error causes. */
20
- export function toError(error) {
21
- if (error instanceof Error)
22
- return error;
23
- if (typeof error === "string")
24
- return new Error(error);
25
- try {
26
- return new Error(JSON.stringify(error));
27
- }
28
- catch {
29
- return new Error(String(error));
30
- }
31
- }
32
- /** Error returned by {@link FileSystem} file operations. */
33
- export class FileError extends Error {
34
- /** Backend-independent error code. */
35
- code;
36
- /** Absolute addressed path associated with the failure, when available. */
37
- path;
38
- constructor(code, message, path, cause) {
39
- super(message, cause === undefined ? undefined : { cause });
40
- this.name = "FileError";
41
- this.code = code;
42
- this.path = path;
43
- }
44
- }
45
- /** Error returned by {@link ExecutionEnv.exec}. */
46
- export class ExecutionError extends Error {
47
- /** Backend-independent error code. */
48
- code;
49
- constructor(code, message, cause) {
50
- super(message, cause === undefined ? undefined : { cause });
51
- this.name = "ExecutionError";
52
- this.code = code;
53
- }
54
- }
55
- /** Error returned by compaction helpers. */
56
- export class CompactionError extends Error {
57
- /** Backend-independent error code. */
58
- code;
59
- constructor(code, message, cause) {
60
- super(message, cause === undefined ? undefined : { cause });
61
- this.name = "CompactionError";
62
- this.code = code;
63
- }
64
- }
65
- /** Error returned by branch summarization helpers. */
66
- export class BranchSummaryError extends Error {
67
- /** Backend-independent error code. */
68
- code;
69
- constructor(code, message, cause) {
70
- super(message, cause === undefined ? undefined : { cause });
71
- this.name = "BranchSummaryError";
72
- this.code = code;
73
- }
74
- }
75
- /** Error thrown by session storage, repositories, and session tree operations. */
76
- export class SessionError extends Error {
77
- /** Session subsystem error code. */
78
- code;
79
- constructor(code, message, cause) {
80
- super(message, cause === undefined ? undefined : { cause });
81
- this.name = "SessionError";
82
- this.code = code;
83
- }
84
- }
85
- /** Public AgentHarness failure with a stable top-level classification. */
86
- export class AgentHarnessError extends Error {
87
- code;
88
- constructor(code, message, cause) {
89
- super(message, cause === undefined ? undefined : { cause });
90
- this.name = "AgentHarnessError";
91
- this.code = code;
92
- }
93
- }
94
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/harness/types.ts"],"names":[],"mappings":"AAOA,0CAA0C;AAC1C,MAAM,UAAU,EAAE,CAAiB,KAAa,EAA0B;IACzE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AAAA,CAC3B;AAED,sCAAsC;A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,KAAK;IACtC,oCAAoC;IAC7B,IAAI,CAAmB;IAE9B,YAAY,IAAsB,EAAE,OAAe,EAAE,KAAa,EAAE;QACnE,KAAK,CAAC,OAAO,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QAC5D,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IAAA,CACjB;CACD;AAaD,0EAA0E;AAC1E,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IACpC,IAAI,CAAwB;IAEnC,YAAY,IAA2B,EAAE,OAAe,EAAE,KAAa,EAAE;QACxE,KAAK,CAAC,OAAO,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QAC5D,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IAAA,CACjB;CACD","sourcesContent":["import type { ImageContent, Model, SimpleStreamOptions, TextContent, Transport } from \"@dimivelev/chimera-ai\";\nimport type { AgentEvent, AgentMessage, AgentTool, QueueMode, ThinkingLevel } from \"../index.ts\";\nimport type { Session } from \"./session/session.ts\";\n\n/** Result of a fallible operation. Expected failures are returned as `ok: false` instead of thrown. */\nexport type Result<TValue, TError> = { ok: true; value: TValue } | { ok: false; error: TError };\n\n/** Create a successful {@link Result}. */\nexport function ok<TValue, TError>(value: TValue): Result<TValue, TError> {\n\treturn { ok: true, value };\n}\n\n/** Create a failed {@link Result}. */\nexport function err<TValue, TError>(error: TError): Result<TValue, TError> {\n\treturn { ok: false, error };\n}\n\n/** Return the success value or throw the failure error. Intended for tests and explicit adapter boundaries. */\nexport function getOrThrow<TValue, TError>(result: Result<TValue, TError>): TValue {\n\tif (!result.ok) throw result.error;\n\treturn result.value;\n}\n\n/** Return the success value or `undefined`. Only object values are allowed to avoid truthiness bugs with primitives. */\nexport function getOrUndefined<TValue extends object, TError>(result: Result<TValue, TError>): TValue | undefined {\n\treturn result.ok ? result.value : undefined;\n}\n\n/** Normalize unknown thrown values into Error instances before using them as typed error causes. */\nexport function toError(error: unknown): Error {\n\tif (error instanceof Error) return error;\n\tif (typeof error === \"string\") return new Error(error);\n\ttry {\n\t\treturn new Error(JSON.stringify(error));\n\t} catch {\n\t\treturn new Error(String(error));\n\t}\n}\n\n/**\n * Skill loaded from a `SKILL.md` file or provided by an application.\n *\n * `name`, `description`, and `filePath` are inserted into the system prompt in an XML-formatted block as suggested by agentskills.io.\n * Use {@link formatSkillsForSystemPrompt} to generate the spec-compatible system prompt block.\n */\nexport interface Skill {\n\t/** Stable skill name used for lookup and model-visible listings. */\n\tname: string;\n\t/** Short model-visible description of when to use the skill. */\n\tdescription: string;\n\t/** Full skill instructions. */\n\tcontent: string;\n\t/** Absolute path to the skill file. Used for model-visible location and resolving relative references. */\n\tfilePath: string;\n\t/** Exclude this skill from model-visible skill lists while still allowing explicit application invocation. */\n\tdisableModelInvocation?: boolean;\n}\n\n/** Prompt template that can be formatted into a prompt for explicit invocation. */\nexport interface PromptTemplate {\n\t/** Stable template name used for lookup or application command routing. */\n\tname: string;\n\t/** Optional description for command lists or autocomplete. */\n\tdescription?: string;\n\t/** Template content. Argument placeholders are formatted by `formatPromptTemplateInvocation`. */\n\tcontent: string;\n}\n\n/** Resources made available to explicit invocation methods and system-prompt callbacks. */\nexport interface AgentHarnessResources<\n\tTSkill extends Skill = Skill,\n\tTPromptTemplate extends PromptTemplate = PromptTemplate,\n> {\n\t/** Prompt templates available for explicit invocation. */\n\tpromptTemplates?: TPromptTemplate[];\n\t/** Skills available to the model and explicit skill invocation. */\n\tskills?: TSkill[];\n}\n\n/** Curated provider request options owned by the harness and snapshotted per turn. */\nexport interface AgentHarnessStreamOptions {\n\t/** Preferred transport forwarded to the stream function. */\n\ttransport?: Transport;\n\t/** Provider request timeout in milliseconds. */\n\ttimeoutMs?: number;\n\t/** Maximum provider retry attempts. */\n\tmaxRetries?: number;\n\t/** Optional cap for provider-requested retry delays. */\n\tmaxRetryDelayMs?: number;\n\t/** Additional request headers merged with auth and lifecycle headers. */\n\theaders?: Record<string, string>;\n\t/** Provider metadata forwarded with requests. */\n\tmetadata?: SimpleStreamOptions[\"metadata\"];\n\t/** Provider cache retention hint. */\n\tcacheRetention?: SimpleStreamOptions[\"cacheRetention\"];\n}\n\n/** Per-request stream option patch returned by provider hooks. */\nexport interface AgentHarnessStreamOptionsPatch\n\textends Omit<Partial<AgentHarnessStreamOptions>, \"headers\" | \"metadata\"> {\n\t/** Header patch. `undefined` values delete keys; explicit `headers: undefined` clears all headers. */\n\theaders?: Record<string, string | undefined>;\n\t/** Metadata patch. `undefined` values delete keys; explicit `metadata: undefined` clears all metadata. */\n\tmetadata?: Record<string, unknown | undefined>;\n}\n\n/** Kind of filesystem object as addressed by a {@link FileSystem}. Symlinks are not followed automatically. */\nexport type FileKind = \"file\" | \"directory\" | \"symlink\";\n\n/** Stable, backend-independent file error codes returned by {@link FileSystem} file operations. */\nexport type FileErrorCode =\n\t| \"aborted\"\n\t| \"not_found\"\n\t| \"permission_denied\"\n\t| \"not_directory\"\n\t| \"is_directory\"\n\t| \"invalid\"\n\t| \"not_supported\"\n\t| \"unknown\";\n\n/** Error returned by {@link FileSystem} file operations. */\nexport class FileError extends Error {\n\t/** Backend-independent error code. */\n\tpublic code: FileErrorCode;\n\t/** Absolute addressed path associated with the failure, when available. */\n\tpublic path?: string;\n\n\tconstructor(code: FileErrorCode, message: string, path?: string, cause?: Error) {\n\t\tsuper(message, cause === undefined ? undefined : { cause });\n\t\tthis.name = \"FileError\";\n\t\tthis.code = code;\n\t\tthis.path = path;\n\t}\n}\n\n/** Stable, backend-independent execution error codes returned by {@link ExecutionEnv.exec}. */\nexport type ExecutionErrorCode =\n\t| \"aborted\"\n\t| \"timeout\"\n\t| \"shell_unavailable\"\n\t| \"spawn_error\"\n\t| \"callback_error\"\n\t| \"unknown\";\n\n/** Error returned by {@link ExecutionEnv.exec}. */\nexport class ExecutionError extends Error {\n\t/** Backend-independent error code. */\n\tpublic code: ExecutionErrorCode;\n\n\tconstructor(code: ExecutionErrorCode, message: string, cause?: Error) {\n\t\tsuper(message, cause === undefined ? undefined : { cause });\n\t\tthis.name = \"ExecutionError\";\n\t\tthis.code = code;\n\t}\n}\n\n/** Stable compaction error codes returned by compaction helpers. */\nexport type CompactionErrorCode = \"aborted\" | \"summarization_failed\" | \"invalid_session\" | \"unknown\";\n\n/** Error returned by compaction helpers. */\nexport class CompactionError extends Error {\n\t/** Backend-independent error code. */\n\tpublic code: CompactionErrorCode;\n\n\tconstructor(code: CompactionErrorCode, message: string, cause?: Error) {\n\t\tsuper(message, cause === undefined ? undefined : { cause });\n\t\tthis.name = \"CompactionError\";\n\t\tthis.code = code;\n\t}\n}\n\n/** Stable branch-summary error codes returned by branch summarization helpers. */\nexport type BranchSummaryErrorCode = \"aborted\" | \"summarization_failed\" | \"invalid_session\";\n\n/** Error returned by branch summarization helpers. */\nexport class BranchSummaryError extends Error {\n\t/** Backend-independent error code. */\n\tpublic code: BranchSummaryErrorCode;\n\n\tconstructor(code: BranchSummaryErrorCode, message: string, cause?: Error) {\n\t\tsuper(message, cause === undefined ? undefined : { cause });\n\t\tthis.name = \"BranchSummaryError\";\n\t\tthis.code = code;\n\t}\n}\n\nexport type SessionErrorCode =\n\t| \"not_found\"\n\t| \"invalid_session\"\n\t| \"invalid_entry\"\n\t| \"invalid_fork_target\"\n\t| \"storage\"\n\t| \"unknown\";\n\n/** Error thrown by session storage, repositories, and session tree operations. */\nexport class SessionError extends Error {\n\t/** Session subsystem error code. */\n\tpublic code: SessionErrorCode;\n\n\tconstructor(code: SessionErrorCode, message: string, cause?: Error) {\n\t\tsuper(message, cause === undefined ? undefined : { cause });\n\t\tthis.name = \"SessionError\";\n\t\tthis.code = code;\n\t}\n}\n\nexport type AgentHarnessErrorCode =\n\t| \"busy\"\n\t| \"invalid_state\"\n\t| \"invalid_argument\"\n\t| \"session\"\n\t| \"hook\"\n\t| \"auth\"\n\t| \"compaction\"\n\t| \"branch_summary\"\n\t| \"unknown\";\n\n/** Public AgentHarness failure with a stable top-level classification. */\nexport class AgentHarnessError extends Error {\n\tpublic code: AgentHarnessErrorCode;\n\n\tconstructor(code: AgentHarnessErrorCode, message: string, cause?: Error) {\n\t\tsuper(message, cause === undefined ? undefined : { cause });\n\t\tthis.name = \"AgentHarnessError\";\n\t\tthis.code = code;\n\t}\n}\n\n/** Metadata for one filesystem object in a {@link FileSystem}. */\nexport interface FileInfo {\n\t/** Basename of {@link path}. */\n\tname: string;\n\t/** Absolute, syntactically normalized addressed path in the execution environment. Symlinks are not followed. */\n\tpath: string;\n\t/** Object kind. Symlink targets are not followed; use {@link FileSystem.canonicalPath} explicitly. */\n\tkind: FileKind;\n\t/** Size in bytes for the addressed filesystem object. */\n\tsize: number;\n\t/** Modification time as milliseconds since Unix epoch. */\n\tmtimeMs: number;\n}\n\n/** Options for {@link Shell.exec}. */\nexport interface ExecutionEnvExecOptions {\n\t/** Working directory for the command. Relative paths are resolved against {@link ExecutionEnv.cwd}. Defaults to {@link ExecutionEnv.cwd}. */\n\tcwd?: string;\n\t/** Additional environment variables for the command. Values override the environment defaults. Defaults to no overrides. */\n\tenv?: Record<string, string>;\n\t/** Timeout in seconds. Implementations should return a timeout error when the command exceeds this duration. Defaults to no timeout. */\n\ttimeout?: number;\n\t/** Abort signal used to terminate the command. Defaults to no abort signal. */\n\tabortSignal?: AbortSignal;\n\t/** Called with stdout chunks as they are produced. */\n\tonStdout?: (chunk: string) => void;\n\t/** Called with stderr chunks as they are produced. */\n\tonStderr?: (chunk: string) => void;\n}\n\n/**\n * Filesystem capability used by the harness.\n *\n * Paths passed to methods may be absolute or relative to {@link cwd}. Paths returned by file operations are addressed paths\n * in the filesystem namespace, but are not canonicalized through symlinks unless returned by {@link canonicalPath}.\n *\n * Operation methods must never throw or reject. All filesystem failures, including unexpected backend failures, must be\n * encoded in the returned {@link Result}. Implementations must preserve this invariant.\n */\nexport interface FileSystem {\n\t/** Current working directory for relative paths. */\n\tcwd: string;\n\n\t/** Return an absolute addressed path without requiring it to exist and without resolving symlinks. */\n\tabsolutePath(path: string, abortSignal?: AbortSignal): Promise<Result<string, FileError>>;\n\t/** Join path segments in the filesystem namespace without requiring the result to exist. */\n\tjoinPath(parts: string[], abortSignal?: AbortSignal): Promise<Result<string, FileError>>;\n\t/** Read a UTF-8 text file. */\n\treadTextFile(path: string, abortSignal?: AbortSignal): Promise<Result<string, FileError>>;\n\t/** Read UTF-8 text lines. Implementations should stop once `maxLines` lines have been read. */\n\treadTextLines(\n\t\tpath: string,\n\t\toptions?: { maxLines?: number; abortSignal?: AbortSignal },\n\t): Promise<Result<string[], FileError>>;\n\t/** Read a binary file. */\n\treadBinaryFile(path: string, abortSignal?: AbortSignal): Promise<Result<Uint8Array, FileError>>;\n\t/** Create or overwrite a file, creating parent directories when supported. */\n\twriteFile(path: string, content: string | Uint8Array, abortSignal?: AbortSignal): Promise<Result<void, FileError>>;\n\t/** Create or append to a file, creating parent directories when supported. */\n\tappendFile(path: string, content: string | Uint8Array, abortSignal?: AbortSignal): Promise<Result<void, FileError>>;\n\t/** Return metadata for the addressed path without following symlinks. */\n\tfileInfo(path: string, abortSignal?: AbortSignal): Promise<Result<FileInfo, FileError>>;\n\t/** List direct children of a directory without following symlinks. */\n\tlistDir(path: string, abortSignal?: AbortSignal): Promise<Result<FileInfo[], FileError>>;\n\t/** Return the canonical path for an existing path, resolving symlinks where supported. */\n\tcanonicalPath(path: string, abortSignal?: AbortSignal): Promise<Result<string, FileError>>;\n\t/** Return false for missing paths. Other errors, such as permission failures, return a {@link FileError}. */\n\texists(path: string, abortSignal?: AbortSignal): Promise<Result<boolean, FileError>>;\n\t/** Create a directory. Defaults: `recursive: true`, no abort signal. */\n\tcreateDir(\n\t\tpath: string,\n\t\toptions?: { recursive?: boolean; abortSignal?: AbortSignal },\n\t): Promise<Result<void, FileError>>;\n\t/** Remove a file or directory. Defaults: `recursive: false`, `force: false`, no abort signal. */\n\tremove(\n\t\tpath: string,\n\t\toptions?: { recursive?: boolean; force?: boolean; abortSignal?: AbortSignal },\n\t): Promise<Result<void, FileError>>;\n\t/** Create a temporary directory and return its absolute path. Defaults: `prefix: \"tmp-\"`, no abort signal. */\n\tcreateTempDir(prefix?: string, abortSignal?: AbortSignal): Promise<Result<string, FileError>>;\n\t/** Create a temporary file and return its absolute path. Defaults: `prefix: \"\"`, `suffix: \"\"`, no abort signal. */\n\tcreateTempFile(options?: {\n\t\tprefix?: string;\n\t\tsuffix?: string;\n\t\tabortSignal?: AbortSignal;\n\t}): Promise<Result<string, FileError>>;\n\n\t/** Release filesystem resources. Must be best-effort and must not throw or reject. */\n\tcleanup(): Promise<void>;\n}\n\n/** Shell execution capability used by the harness. */\nexport interface Shell {\n\t/** Execute a shell command in {@link FileSystem.cwd} unless `options.cwd` is provided. */\n\texec(\n\t\tcommand: string,\n\t\toptions?: ExecutionEnvExecOptions,\n\t): Promise<Result<{ stdout: string; stderr: string; exitCode: number }, ExecutionError>>;\n\t/** Release shell resources. Must be best-effort and must not throw or reject. */\n\tcleanup(): Promise<void>;\n}\n\n/** Filesystem and process execution environment used by the harness. */\nexport interface ExecutionEnv extends FileSystem, Shell {}\n\nexport interface SessionTreeEntryBase {\n\ttype: string;\n\tid: string;\n\tparentId: string | null;\n\ttimestamp: string;\n}\n\nexport interface MessageEntry extends SessionTreeEntryBase {\n\ttype: \"message\";\n\tmessage: AgentMessage;\n}\n\nexport interface ThinkingLevelChangeEntry extends SessionTreeEntryBase {\n\ttype: \"thinking_level_change\";\n\tthinkingLevel: string;\n}\n\nexport interface ModelChangeEntry extends SessionTreeEntryBase {\n\ttype: \"model_change\";\n\tprovider: string;\n\tmodelId: string;\n}\n\nexport interface ActiveToolsChangeEntry extends SessionTreeEntryBase {\n\ttype: \"active_tools_change\";\n\tactiveToolNames: string[];\n}\n\nexport interface CompactionEntry<T = unknown> extends SessionTreeEntryBase {\n\ttype: \"compaction\";\n\tsummary: string;\n\tfirstKeptEntryId: string;\n\ttokensBefore: number;\n\tdetails?: T;\n\tfromHook?: boolean;\n}\n\nexport interface BranchSummaryEntry<T = unknown> extends SessionTreeEntryBase {\n\ttype: \"branch_summary\";\n\tfromId: string;\n\tsummary: string;\n\tdetails?: T;\n\tfromHook?: boolean;\n}\n\nexport interface CustomEntry<T = unknown> extends SessionTreeEntryBase {\n\ttype: \"custom\";\n\tcustomType: string;\n\tdata?: T;\n}\n\nexport interface CustomMessageEntry<T = unknown> extends SessionTreeEntryBase {\n\ttype: \"custom_message\";\n\tcustomType: string;\n\tcontent: string | (TextContent | ImageContent)[];\n\tdetails?: T;\n\tdisplay: boolean;\n}\n\nexport interface LabelEntry extends SessionTreeEntryBase {\n\ttype: \"label\";\n\ttargetId: string;\n\tlabel: string | undefined;\n}\n\nexport interface SessionInfoEntry extends SessionTreeEntryBase {\n\ttype: \"session_info\"; // legacy name, kept for backwards compatibility\n\tname?: string;\n}\n\nexport interface LeafEntry extends SessionTreeEntryBase {\n\ttype: \"leaf\";\n\ttargetId: string | null;\n}\n\nexport type SessionTreeEntry =\n\t| MessageEntry\n\t| ThinkingLevelChangeEntry\n\t| ModelChangeEntry\n\t| ActiveToolsChangeEntry\n\t| CompactionEntry\n\t| BranchSummaryEntry\n\t| CustomEntry\n\t| CustomMessageEntry\n\t| LabelEntry\n\t| SessionInfoEntry\n\t| LeafEntry;\n\nexport interface SessionContext {\n\tmessages: AgentMessage[];\n\tthinkingLevel: string;\n\tmodel: { provider: string; modelId: string } | null;\n\tactiveToolNames: string[] | null;\n}\n\nexport interface SessionMetadata {\n\tid: string;\n\tcreatedAt: string;\n}\n\nexport interface JsonlSessionMetadata extends SessionMetadata {\n\tcwd: string;\n\tpath: string;\n\tparentSessionPath?: string;\n}\n\nexport interface SessionStorage<TMetadata extends SessionMetadata = SessionMetadata> {\n\tgetMetadata(): Promise<TMetadata>;\n\tgetLeafId(): Promise<string | null>;\n\t/** Persist a leaf entry that records the active session-tree leaf. */\n\tsetLeafId(leafId: string | null): Promise<void>;\n\tcreateEntryId(): Promise<string>;\n\tappendEntry(entry: SessionTreeEntry): Promise<void>;\n\tgetEntry(id: string): Promise<SessionTreeEntry | undefined>;\n\tfindEntries<TType extends SessionTreeEntry[\"type\"]>(\n\t\ttype: TType,\n\t): Promise<Array<Extract<SessionTreeEntry, { type: TType }>>>;\n\tgetLabel(id: string): Promise<string | undefined>;\n\tgetPathToRoot(leafId: string | null): Promise<SessionTreeEntry[]>;\n\tgetEntries(): Promise<SessionTreeEntry[]>;\n}\n\nexport type { Session } from \"./session/session.ts\";\n\nexport interface SessionCreateOptions {\n\tid?: string;\n}\n\nexport interface SessionForkOptions {\n\tentryId?: string;\n\tposition?: \"before\" | \"at\";\n\tid?: string;\n}\n\nexport interface SessionRepo<\n\tTMetadata extends SessionMetadata = SessionMetadata,\n\tTCreateOptions extends SessionCreateOptions = SessionCreateOptions,\n\tTListOptions = void,\n> {\n\tcreate(options: TCreateOptions): Promise<Session<TMetadata>>;\n\topen(metadata: TMetadata): Promise<Session<TMetadata>>;\n\tlist(options?: TListOptions): Promise<TMetadata[]>;\n\tdelete(metadata: TMetadata): Promise<void>;\n\tfork(source: TMetadata, options: SessionForkOptions & TCreateOptions): Promise<Session<TMetadata>>;\n}\n\nexport interface JsonlSessionCreateOptions extends SessionCreateOptions {\n\tcwd: string;\n\tparentSessionPath?: string;\n}\n\nexport interface JsonlSessionListOptions {\n\tcwd?: string;\n}\n\nexport interface JsonlSessionRepoApi\n\textends SessionRepo<JsonlSessionMetadata, JsonlSessionCreateOptions, JsonlSessionListOptions> {}\n\nexport type AgentHarnessPhase = \"idle\" | \"turn\" | \"compaction\" | \"branch_summary\" | \"retry\";\n\nexport type PendingSessionWrite = SessionTreeEntry extends infer TEntry\n\t? TEntry extends SessionTreeEntry\n\t\t? Omit<TEntry, \"id\" | \"parentId\" | \"timestamp\">\n\t\t: never\n\t: never;\n\nexport interface QueueUpdateEvent {\n\ttype: \"queue_update\";\n\tsteer: AgentMessage[];\n\tfollowUp: AgentMessage[];\n\tnextTurn: AgentMessage[];\n}\n\nexport interface SavePointEvent {\n\ttype: \"save_point\";\n\thadPendingMutations: boolean;\n}\n\nexport interface AbortEvent {\n\ttype: \"abort\";\n\tclearedSteer: AgentMessage[];\n\tclearedFollowUp: AgentMessage[];\n}\n\nexport interface SettledEvent {\n\ttype: \"settled\";\n\tnextTurnCount: number;\n}\n\nexport interface BeforeAgentStartEvent<\n\tTSkill extends Skill = Skill,\n\tTPromptTemplate extends PromptTemplate = PromptTemplate,\n> {\n\ttype: \"before_agent_start\";\n\tprompt: string;\n\timages?: ImageContent[];\n\tsystemPrompt: string;\n\tresources: AgentHarnessResources<TSkill, TPromptTemplate>;\n}\n\nexport interface ContextEvent {\n\ttype: \"context\";\n\tmessages: AgentMessage[];\n}\n\nexport interface BeforeProviderRequestEvent {\n\ttype: \"before_provider_request\";\n\tmodel: Model<any>;\n\tsessionId: string;\n\tstreamOptions: AgentHarnessStreamOptions;\n}\n\nexport interface BeforeProviderPayloadEvent {\n\ttype: \"before_provider_payload\";\n\tmodel: Model<any>;\n\tpayload: unknown;\n}\n\nexport interface AfterProviderResponseEvent {\n\ttype: \"after_provider_response\";\n\tstatus: number;\n\theaders: Record<string, string>;\n}\n\nexport interface ToolCallEvent {\n\ttype: \"tool_call\";\n\ttoolCallId: string;\n\ttoolName: string;\n\tinput: Record<string, unknown>;\n}\n\nexport interface ToolResultEvent {\n\ttype: \"tool_result\";\n\ttoolCallId: string;\n\ttoolName: string;\n\tinput: Record<string, unknown>;\n\tcontent: Array<TextContent | ImageContent>;\n\tdetails: unknown;\n\tisError: boolean;\n}\n\nexport interface SessionBeforeCompactEvent {\n\ttype: \"session_before_compact\";\n\tpreparation: CompactionPreparation;\n\tbranchEntries: SessionTreeEntry[];\n\tcustomInstructions?: string;\n\tsignal: AbortSignal;\n}\n\nexport interface SessionCompactEvent {\n\ttype: \"session_compact\";\n\tcompactionEntry: CompactionEntry;\n\tfromHook: boolean;\n}\n\nexport interface SessionBeforeTreeEvent {\n\ttype: \"session_before_tree\";\n\tpreparation: TreePreparation;\n\tsignal: AbortSignal;\n}\n\nexport interface SessionTreeEvent {\n\ttype: \"session_tree\";\n\tnewLeafId: string | null;\n\toldLeafId: string | null;\n\tsummaryEntry?: BranchSummaryEntry;\n\tfromHook?: boolean;\n}\n\nexport interface ModelUpdateEvent {\n\ttype: \"model_update\";\n\tmodel: Model<any>;\n\tpreviousModel: Model<any> | undefined;\n\tsource: \"set\" | \"restore\";\n}\n\nexport interface ThinkingLevelUpdateEvent {\n\ttype: \"thinking_level_update\";\n\tlevel: ThinkingLevel;\n\tpreviousLevel: ThinkingLevel;\n}\n\nexport interface ToolsUpdateEvent {\n\ttype: \"tools_update\";\n\ttoolNames: string[];\n\tpreviousToolNames: string[];\n\tactiveToolNames: string[];\n\tpreviousActiveToolNames: string[];\n\tsource: \"set\" | \"restore\";\n}\n\nexport interface ResourcesUpdateEvent<\n\tTSkill extends Skill = Skill,\n\tTPromptTemplate extends PromptTemplate = PromptTemplate,\n> {\n\ttype: \"resources_update\";\n\tresources: AgentHarnessResources<TSkill, TPromptTemplate>;\n\tpreviousResources: AgentHarnessResources<TSkill, TPromptTemplate>;\n}\n\nexport type AgentHarnessOwnEvent<\n\tTSkill extends Skill = Skill,\n\tTPromptTemplate extends PromptTemplate = PromptTemplate,\n> =\n\t| QueueUpdateEvent\n\t| SavePointEvent\n\t| AbortEvent\n\t| SettledEvent\n\t| BeforeAgentStartEvent<TSkill, TPromptTemplate>\n\t| ContextEvent\n\t| BeforeProviderRequestEvent\n\t| BeforeProviderPayloadEvent\n\t| AfterProviderResponseEvent\n\t| ToolCallEvent\n\t| ToolResultEvent\n\t| SessionBeforeCompactEvent\n\t| SessionCompactEvent\n\t| SessionBeforeTreeEvent\n\t| SessionTreeEvent\n\t| ModelUpdateEvent\n\t| ThinkingLevelUpdateEvent\n\t| ResourcesUpdateEvent<TSkill, TPromptTemplate>\n\t| ToolsUpdateEvent;\n\nexport type AgentHarnessEvent<TSkill extends Skill = Skill, TPromptTemplate extends PromptTemplate = PromptTemplate> =\n\t| AgentEvent\n\t| AgentHarnessOwnEvent<TSkill, TPromptTemplate>;\n\nexport interface BeforeAgentStartResult {\n\tmessages?: AgentMessage[];\n\tsystemPrompt?: string;\n}\n\nexport interface ContextResult {\n\tmessages: AgentMessage[];\n}\n\nexport interface BeforeProviderRequestResult {\n\tstreamOptions?: AgentHarnessStreamOptionsPatch;\n}\n\nexport interface BeforeProviderPayloadResult {\n\tpayload: unknown;\n}\n\nexport interface ToolCallResult {\n\tblock?: boolean;\n\treason?: string;\n}\n\nexport interface ToolResultPatch {\n\tcontent?: Array<TextContent | ImageContent>;\n\tdetails?: unknown;\n\tisError?: boolean;\n\tterminate?: boolean;\n}\n\nexport interface SessionBeforeCompactResult {\n\tcancel?: boolean;\n\tcompaction?: CompactResult;\n}\n\nexport interface SessionBeforeTreeResult {\n\tcancel?: boolean;\n\tsummary?: { summary: string; details?: unknown };\n\tcustomInstructions?: string;\n\treplaceInstructions?: boolean;\n\tlabel?: string;\n}\n\nexport type AgentHarnessEventResultMap = {\n\tbefore_agent_start: BeforeAgentStartResult | undefined;\n\tcontext: ContextResult | undefined;\n\tbefore_provider_request: BeforeProviderRequestResult | undefined;\n\tbefore_provider_payload: BeforeProviderPayloadResult | undefined;\n\tafter_provider_response: undefined;\n\ttool_call: ToolCallResult | undefined;\n\ttool_result: ToolResultPatch | undefined;\n\tsession_before_compact: SessionBeforeCompactResult | undefined;\n\tsession_compact: undefined;\n\tsession_before_tree: SessionBeforeTreeResult | undefined;\n\tsession_tree: undefined;\n\tmodel_update: undefined;\n\tthinking_level_update: undefined;\n\tresources_update: undefined;\n\ttools_update: undefined;\n\tqueue_update: undefined;\n\tsave_point: undefined;\n\tabort: undefined;\n\tsettled: undefined;\n};\n\nexport interface AgentHarnessPromptOptions {\n\timages?: ImageContent[];\n}\n\nexport interface AbortResult {\n\tclearedSteer: AgentMessage[];\n\tclearedFollowUp: AgentMessage[];\n}\n\nexport interface CompactResult {\n\tsummary: string;\n\tfirstKeptEntryId: string;\n\ttokensBefore: number;\n\tdetails?: unknown;\n}\n\nexport interface NavigateTreeResult {\n\tcancelled: boolean;\n\teditorText?: string;\n\tsummaryEntry?: BranchSummaryEntry;\n}\n\nexport interface CompactionSettings {\n\tenabled: boolean;\n\treserveTokens: number;\n\tkeepRecentTokens: number;\n}\n\nexport interface CompactionPreparation {\n\tfirstKeptEntryId: string;\n\tmessagesToSummarize: AgentMessage[];\n\tturnPrefixMessages: AgentMessage[];\n\tisSplitTurn: boolean;\n\ttokensBefore: number;\n\tpreviousSummary?: string;\n\tfileOps: FileOperations;\n\tsettings: CompactionSettings;\n}\n\nexport interface FileOperations {\n\tread: Set<string>;\n\twritten: Set<string>;\n\tedited: Set<string>;\n}\n\nexport interface TreePreparation {\n\ttargetId: string;\n\toldLeafId: string | null;\n\tcommonAncestorId: string | null;\n\tentriesToSummarize: SessionTreeEntry[];\n\tuserWantsSummary: boolean;\n\tcustomInstructions?: string;\n\treplaceInstructions?: boolean;\n\tlabel?: string;\n}\n\nexport interface GenerateBranchSummaryOptions {\n\tmodel: Model<any>;\n\tapiKey: string;\n\theaders?: Record<string, string>;\n\tsignal: AbortSignal;\n\tcustomInstructions?: string;\n\treplaceInstructions?: boolean;\n\treserveTokens?: number;\n}\n\nexport interface BranchSummaryResult {\n\tsummary: string;\n\treadFiles: string[];\n\tmodifiedFiles: string[];\n}\n\nexport interface AgentHarnessOptions<\n\tTSkill extends Skill = Skill,\n\tTPromptTemplate extends PromptTemplate = PromptTemplate,\n\tTTool extends AgentTool = AgentTool,\n> {\n\tenv: ExecutionEnv;\n\tsession: Session;\n\ttools?: TTool[];\n\t/**\n\t * Concrete resources available to explicit invocation methods and system-prompt callbacks.\n\t * Applications own loading/reloading resources and should call `setResources()` with new values.\n\t */\n\tresources?: AgentHarnessResources<TSkill, TPromptTemplate>;\n\tsystemPrompt?:\n\t\t| string\n\t\t| ((context: {\n\t\t\t\tenv: ExecutionEnv;\n\t\t\t\tsession: Session;\n\t\t\t\tmodel: Model<any>;\n\t\t\t\tthinkingLevel: ThinkingLevel;\n\t\t\t\tactiveTools: TTool[];\n\t\t\t\tresources: AgentHarnessResources<TSkill, TPromptTemplate>;\n\t\t }) => string | Promise<string>);\n\tgetApiKeyAndHeaders?: (\n\t\tmodel: Model<any>,\n\t) => Promise<{ apiKey: string; headers?: Record<string, string> } | undefined>;\n\t/** Curated stream/provider request options. Snapshotted at turn start. */\n\tstreamOptions?: AgentHarnessStreamOptions;\n\tmodel: Model<any>;\n\tthinkingLevel?: ThinkingLevel;\n\tactiveToolNames?: string[];\n\tsteeringMode?: QueueMode;\n\tfollowUpMode?: QueueMode;\n}\n\nexport type { AgentHarness } from \"./agent-harness.ts\";\n"]}
@@ -1,14 +0,0 @@
1
- import { type ExecutionEnv, type ExecutionEnvExecOptions, ExecutionError, type Result } from "../types.ts";
2
- export interface ShellCaptureOptions extends Omit<ExecutionEnvExecOptions, "onStdout" | "onStderr"> {
3
- onChunk?: (chunk: string) => void;
4
- }
5
- export interface ShellCaptureResult {
6
- output: string;
7
- exitCode: number | undefined;
8
- cancelled: boolean;
9
- truncated: boolean;
10
- fullOutputPath?: string;
11
- }
12
- export declare function sanitizeBinaryOutput(str: string): string;
13
- export declare function executeShellWithCapture(env: ExecutionEnv, command: string, options?: ShellCaptureOptions): Promise<Result<ShellCaptureResult, ExecutionError>>;
14
- //# sourceMappingURL=shell-output.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shell-output.d.ts","sourceRoot":"","sources":["../../../src/harness/utils/shell-output.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,cAAc,EAGd,KAAK,MAAM,EAEX,MAAM,aAAa,CAAC;AAGrB,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,uBAAuB,EAAE,UAAU,GAAG,UAAU,CAAC;IAClG,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,kBAAkB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AAQD,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAWxD;AAED,wBAAsB,uBAAuB,CAC5C,GAAG,EAAE,YAAY,EACjB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,mBAAmB,GAC3B,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,cAAc,CAAC,CAAC,CAgGrD","sourcesContent":["import {\n\ttype ExecutionEnv,\n\ttype ExecutionEnvExecOptions,\n\tExecutionError,\n\terr,\n\tok,\n\ttype Result,\n\ttoError,\n} from \"../types.ts\";\nimport { DEFAULT_MAX_BYTES, truncateTail } from \"./truncate.ts\";\n\nexport interface ShellCaptureOptions extends Omit<ExecutionEnvExecOptions, \"onStdout\" | \"onStderr\"> {\n\tonChunk?: (chunk: string) => void;\n}\n\nexport interface ShellCaptureResult {\n\toutput: string;\n\texitCode: number | undefined;\n\tcancelled: boolean;\n\ttruncated: boolean;\n\tfullOutputPath?: string;\n}\n\nfunction toExecutionError(error: unknown): ExecutionError {\n\tif (error instanceof ExecutionError) return error;\n\tconst cause = toError(error);\n\treturn new ExecutionError(\"unknown\", cause.message, cause);\n}\n\nexport function sanitizeBinaryOutput(str: string): string {\n\treturn Array.from(str)\n\t\t.filter((char) => {\n\t\t\tconst code = char.codePointAt(0);\n\t\t\tif (code === undefined) return false;\n\t\t\tif (code === 0x09 || code === 0x0a || code === 0x0d) return true;\n\t\t\tif (code <= 0x1f) return false;\n\t\t\tif (code >= 0xfff9 && code <= 0xfffb) return false;\n\t\t\treturn true;\n\t\t})\n\t\t.join(\"\");\n}\n\nexport async function executeShellWithCapture(\n\tenv: ExecutionEnv,\n\tcommand: string,\n\toptions?: ShellCaptureOptions,\n): Promise<Result<ShellCaptureResult, ExecutionError>> {\n\tconst outputChunks: string[] = [];\n\tlet outputBytes = 0;\n\tconst maxOutputBytes = DEFAULT_MAX_BYTES * 2;\n\tconst encoder = new TextEncoder();\n\n\tlet totalBytes = 0;\n\tlet fullOutputPath: string | undefined;\n\tlet writeChain: Promise<Result<void, ExecutionError>> = Promise.resolve(ok(undefined));\n\tlet captureError: ExecutionError | undefined;\n\n\tconst appendFullOutput = (text: string): void => {\n\t\tif (!fullOutputPath || captureError) return;\n\t\tconst path = fullOutputPath;\n\t\twriteChain = writeChain.then(async (previous) => {\n\t\t\tif (!previous.ok) return previous;\n\t\t\tconst appendResult = await env.appendFile(path, text, options?.abortSignal);\n\t\t\treturn appendResult.ok ? ok(undefined) : err(toExecutionError(appendResult.error));\n\t\t});\n\t};\n\n\tconst ensureFullOutputFile = (initialContent: string): void => {\n\t\tif (fullOutputPath || captureError) return;\n\t\twriteChain = writeChain.then(async (previous) => {\n\t\t\tif (!previous.ok) return previous;\n\t\t\tconst tempFile = await env.createTempFile({\n\t\t\t\tprefix: \"bash-\",\n\t\t\t\tsuffix: \".log\",\n\t\t\t\tabortSignal: options?.abortSignal,\n\t\t\t});\n\t\t\tif (!tempFile.ok) return err(toExecutionError(tempFile.error));\n\t\t\tfullOutputPath = tempFile.value;\n\t\t\tconst appendResult = await env.appendFile(tempFile.value, initialContent, options?.abortSignal);\n\t\t\treturn appendResult.ok ? ok(undefined) : err(toExecutionError(appendResult.error));\n\t\t});\n\t};\n\n\tconst onChunk = (chunk: string) => {\n\t\ttry {\n\t\t\ttotalBytes += encoder.encode(chunk).byteLength;\n\t\t\tconst text = sanitizeBinaryOutput(chunk).replace(/\\r/g, \"\");\n\t\t\tif (totalBytes > DEFAULT_MAX_BYTES && !fullOutputPath) {\n\t\t\t\tensureFullOutputFile(outputChunks.join(\"\") + text);\n\t\t\t} else {\n\t\t\t\tappendFullOutput(text);\n\t\t\t}\n\t\t\toutputChunks.push(text);\n\t\t\toutputBytes += text.length;\n\t\t\twhile (outputBytes > maxOutputBytes && outputChunks.length > 1) {\n\t\t\t\tconst removed = outputChunks.shift()!;\n\t\t\t\toutputBytes -= removed.length;\n\t\t\t}\n\t\t\toptions?.onChunk?.(text);\n\t\t} catch (error) {\n\t\t\tcaptureError = toExecutionError(error);\n\t\t}\n\t};\n\n\ttry {\n\t\tconst result = await env.exec(command, {\n\t\t\t...(options ?? {}),\n\t\t\tonStdout: onChunk,\n\t\t\tonStderr: onChunk,\n\t\t});\n\t\tconst tailOutput = outputChunks.join(\"\");\n\t\tconst truncationResult = truncateTail(tailOutput);\n\t\tif (truncationResult.truncated && !fullOutputPath) {\n\t\t\tensureFullOutputFile(tailOutput);\n\t\t}\n\t\tconst writeResult = await writeChain;\n\t\tif (!writeResult.ok) return err(writeResult.error);\n\t\tif (captureError) return err(captureError);\n\n\t\tif (!result.ok) {\n\t\t\tif (result.error.code === \"aborted\" || options?.abortSignal?.aborted) {\n\t\t\t\treturn ok({\n\t\t\t\t\toutput: truncationResult.truncated ? truncationResult.content : tailOutput,\n\t\t\t\t\texitCode: undefined,\n\t\t\t\t\tcancelled: true,\n\t\t\t\t\ttruncated: truncationResult.truncated,\n\t\t\t\t\tfullOutputPath,\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn err(result.error);\n\t\t}\n\t\tconst cancelled = options?.abortSignal?.aborted ?? false;\n\t\treturn ok({\n\t\t\toutput: truncationResult.truncated ? truncationResult.content : tailOutput,\n\t\t\texitCode: cancelled ? undefined : result.value.exitCode,\n\t\t\tcancelled,\n\t\t\ttruncated: truncationResult.truncated,\n\t\t\tfullOutputPath,\n\t\t});\n\t} catch (error) {\n\t\treturn err(toExecutionError(error));\n\t}\n}\n"]}
@@ -1,126 +0,0 @@
1
- import { ExecutionError, err, ok, toError, } from "../types.js";
2
- import { DEFAULT_MAX_BYTES, truncateTail } from "./truncate.js";
3
- function toExecutionError(error) {
4
- if (error instanceof ExecutionError)
5
- return error;
6
- const cause = toError(error);
7
- return new ExecutionError("unknown", cause.message, cause);
8
- }
9
- export function sanitizeBinaryOutput(str) {
10
- return Array.from(str)
11
- .filter((char) => {
12
- const code = char.codePointAt(0);
13
- if (code === undefined)
14
- return false;
15
- if (code === 0x09 || code === 0x0a || code === 0x0d)
16
- return true;
17
- if (code <= 0x1f)
18
- return false;
19
- if (code >= 0xfff9 && code <= 0xfffb)
20
- return false;
21
- return true;
22
- })
23
- .join("");
24
- }
25
- export async function executeShellWithCapture(env, command, options) {
26
- const outputChunks = [];
27
- let outputBytes = 0;
28
- const maxOutputBytes = DEFAULT_MAX_BYTES * 2;
29
- const encoder = new TextEncoder();
30
- let totalBytes = 0;
31
- let fullOutputPath;
32
- let writeChain = Promise.resolve(ok(undefined));
33
- let captureError;
34
- const appendFullOutput = (text) => {
35
- if (!fullOutputPath || captureError)
36
- return;
37
- const path = fullOutputPath;
38
- writeChain = writeChain.then(async (previous) => {
39
- if (!previous.ok)
40
- return previous;
41
- const appendResult = await env.appendFile(path, text, options?.abortSignal);
42
- return appendResult.ok ? ok(undefined) : err(toExecutionError(appendResult.error));
43
- });
44
- };
45
- const ensureFullOutputFile = (initialContent) => {
46
- if (fullOutputPath || captureError)
47
- return;
48
- writeChain = writeChain.then(async (previous) => {
49
- if (!previous.ok)
50
- return previous;
51
- const tempFile = await env.createTempFile({
52
- prefix: "bash-",
53
- suffix: ".log",
54
- abortSignal: options?.abortSignal,
55
- });
56
- if (!tempFile.ok)
57
- return err(toExecutionError(tempFile.error));
58
- fullOutputPath = tempFile.value;
59
- const appendResult = await env.appendFile(tempFile.value, initialContent, options?.abortSignal);
60
- return appendResult.ok ? ok(undefined) : err(toExecutionError(appendResult.error));
61
- });
62
- };
63
- const onChunk = (chunk) => {
64
- try {
65
- totalBytes += encoder.encode(chunk).byteLength;
66
- const text = sanitizeBinaryOutput(chunk).replace(/\r/g, "");
67
- if (totalBytes > DEFAULT_MAX_BYTES && !fullOutputPath) {
68
- ensureFullOutputFile(outputChunks.join("") + text);
69
- }
70
- else {
71
- appendFullOutput(text);
72
- }
73
- outputChunks.push(text);
74
- outputBytes += text.length;
75
- while (outputBytes > maxOutputBytes && outputChunks.length > 1) {
76
- const removed = outputChunks.shift();
77
- outputBytes -= removed.length;
78
- }
79
- options?.onChunk?.(text);
80
- }
81
- catch (error) {
82
- captureError = toExecutionError(error);
83
- }
84
- };
85
- try {
86
- const result = await env.exec(command, {
87
- ...(options ?? {}),
88
- onStdout: onChunk,
89
- onStderr: onChunk,
90
- });
91
- const tailOutput = outputChunks.join("");
92
- const truncationResult = truncateTail(tailOutput);
93
- if (truncationResult.truncated && !fullOutputPath) {
94
- ensureFullOutputFile(tailOutput);
95
- }
96
- const writeResult = await writeChain;
97
- if (!writeResult.ok)
98
- return err(writeResult.error);
99
- if (captureError)
100
- return err(captureError);
101
- if (!result.ok) {
102
- if (result.error.code === "aborted" || options?.abortSignal?.aborted) {
103
- return ok({
104
- output: truncationResult.truncated ? truncationResult.content : tailOutput,
105
- exitCode: undefined,
106
- cancelled: true,
107
- truncated: truncationResult.truncated,
108
- fullOutputPath,
109
- });
110
- }
111
- return err(result.error);
112
- }
113
- const cancelled = options?.abortSignal?.aborted ?? false;
114
- return ok({
115
- output: truncationResult.truncated ? truncationResult.content : tailOutput,
116
- exitCode: cancelled ? undefined : result.value.exitCode,
117
- cancelled,
118
- truncated: truncationResult.truncated,
119
- fullOutputPath,
120
- });
121
- }
122
- catch (error) {
123
- return err(toExecutionError(error));
124
- }
125
- }
126
- //# sourceMappingURL=shell-output.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shell-output.js","sourceRoot":"","sources":["../../../src/harness/utils/shell-output.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,cAAc,EACd,GAA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;QACzD,OAAO,EAAE,CAAC;YACT,MAAM,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU;YAC1E,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;YACvD,SAAS;YACT,SAAS,EAAE,gBAAgB,CAAC,SAAS;YACrC,cAAc;SACd,CAAC,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,OAAO,GAAG,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;IACrC,CAAC;AAAA,CACD","sourcesContent":["import {\n\ttype ExecutionEnv,\n\ttype ExecutionEnvExecOptions,\n\tExecutionError,\n\terr,\n\tok,\n\ttype Result,\n\ttoError,\n} from \"../types.ts\";\nimport { DEFAULT_MAX_BYTES, truncateTail } from \"./truncate.ts\";\n\nexport interface ShellCaptureOptions extends Omit<ExecutionEnvExecOptions, \"onStdout\" | \"onStderr\"> {\n\tonChunk?: (chunk: string) => void;\n}\n\nexport interface ShellCaptureResult {\n\toutput: string;\n\texitCode: number | undefined;\n\tcancelled: boolean;\n\ttruncated: boolean;\n\tfullOutputPath?: string;\n}\n\nfunction toExecutionError(error: unknown): ExecutionError {\n\tif (error instanceof ExecutionError) return error;\n\tconst cause = toError(error);\n\treturn new ExecutionError(\"unknown\", cause.message, cause);\n}\n\nexport function sanitizeBinaryOutput(str: string): string {\n\treturn Array.from(str)\n\t\t.filter((char) => {\n\t\t\tconst code = char.codePointAt(0);\n\t\t\tif (code === undefined) return false;\n\t\t\tif (code === 0x09 || code === 0x0a || code === 0x0d) return true;\n\t\t\tif (code <= 0x1f) return false;\n\t\t\tif (code >= 0xfff9 && code <= 0xfffb) return false;\n\t\t\treturn true;\n\t\t})\n\t\t.join(\"\");\n}\n\nexport async function executeShellWithCapture(\n\tenv: ExecutionEnv,\n\tcommand: string,\n\toptions?: ShellCaptureOptions,\n): Promise<Result<ShellCaptureResult, ExecutionError>> {\n\tconst outputChunks: string[] = [];\n\tlet outputBytes = 0;\n\tconst maxOutputBytes = DEFAULT_MAX_BYTES * 2;\n\tconst encoder = new TextEncoder();\n\n\tlet totalBytes = 0;\n\tlet fullOutputPath: string | undefined;\n\tlet writeChain: Promise<Result<void, ExecutionError>> = Promise.resolve(ok(undefined));\n\tlet captureError: ExecutionError | undefined;\n\n\tconst appendFullOutput = (text: string): void => {\n\t\tif (!fullOutputPath || captureError) return;\n\t\tconst path = fullOutputPath;\n\t\twriteChain = writeChain.then(async (previous) => {\n\t\t\tif (!previous.ok) return previous;\n\t\t\tconst appendResult = await env.appendFile(path, text, options?.abortSignal);\n\t\t\treturn appendResult.ok ? ok(undefined) : err(toExecutionError(appendResult.error));\n\t\t});\n\t};\n\n\tconst ensureFullOutputFile = (initialContent: string): void => {\n\t\tif (fullOutputPath || captureError) return;\n\t\twriteChain = writeChain.then(async (previous) => {\n\t\t\tif (!previous.ok) return previous;\n\t\t\tconst tempFile = await env.createTempFile({\n\t\t\t\tprefix: \"bash-\",\n\t\t\t\tsuffix: \".log\",\n\t\t\t\tabortSignal: options?.abortSignal,\n\t\t\t});\n\t\t\tif (!tempFile.ok) return err(toExecutionError(tempFile.error));\n\t\t\tfullOutputPath = tempFile.value;\n\t\t\tconst appendResult = await env.appendFile(tempFile.value, initialContent, options?.abortSignal);\n\t\t\treturn appendResult.ok ? ok(undefined) : err(toExecutionError(appendResult.error));\n\t\t});\n\t};\n\n\tconst onChunk = (chunk: string) => {\n\t\ttry {\n\t\t\ttotalBytes += encoder.encode(chunk).byteLength;\n\t\t\tconst text = sanitizeBinaryOutput(chunk).replace(/\\r/g, \"\");\n\t\t\tif (totalBytes > DEFAULT_MAX_BYTES && !fullOutputPath) {\n\t\t\t\tensureFullOutputFile(outputChunks.join(\"\") + text);\n\t\t\t} else {\n\t\t\t\tappendFullOutput(text);\n\t\t\t}\n\t\t\toutputChunks.push(text);\n\t\t\toutputBytes += text.length;\n\t\t\twhile (outputBytes > maxOutputBytes && outputChunks.length > 1) {\n\t\t\t\tconst removed = outputChunks.shift()!;\n\t\t\t\toutputBytes -= removed.length;\n\t\t\t}\n\t\t\toptions?.onChunk?.(text);\n\t\t} catch (error) {\n\t\t\tcaptureError = toExecutionError(error);\n\t\t}\n\t};\n\n\ttry {\n\t\tconst result = await env.exec(command, {\n\t\t\t...(options ?? {}),\n\t\t\tonStdout: onChunk,\n\t\t\tonStderr: onChunk,\n\t\t});\n\t\tconst tailOutput = outputChunks.join(\"\");\n\t\tconst truncationResult = truncateTail(tailOutput);\n\t\tif (truncationResult.truncated && !fullOutputPath) {\n\t\t\tensureFullOutputFile(tailOutput);\n\t\t}\n\t\tconst writeResult = await writeChain;\n\t\tif (!writeResult.ok) return err(writeResult.error);\n\t\tif (captureError) return err(captureError);\n\n\t\tif (!result.ok) {\n\t\t\tif (result.error.code === \"aborted\" || options?.abortSignal?.aborted) {\n\t\t\t\treturn ok({\n\t\t\t\t\toutput: truncationResult.truncated ? truncationResult.content : tailOutput,\n\t\t\t\t\texitCode: undefined,\n\t\t\t\t\tcancelled: true,\n\t\t\t\t\ttruncated: truncationResult.truncated,\n\t\t\t\t\tfullOutputPath,\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn err(result.error);\n\t\t}\n\t\tconst cancelled = options?.abortSignal?.aborted ?? false;\n\t\treturn ok({\n\t\t\toutput: truncationResult.truncated ? truncationResult.content : tailOutput,\n\t\t\texitCode: cancelled ? undefined : result.value.exitCode,\n\t\t\tcancelled,\n\t\t\ttruncated: truncationResult.truncated,\n\t\t\tfullOutputPath,\n\t\t});\n\t} catch (error) {\n\t\treturn err(toExecutionError(error));\n\t}\n}\n"]}
@@ -1,70 +0,0 @@
1
- /**
2
- * Shared truncation utilities for tool outputs.
3
- *
4
- * Truncation is based on two independent limits - whichever is hit first wins:
5
- * - Line limit (default: 2000 lines)
6
- * - Byte limit (default: 50KB)
7
- *
8
- * Never returns partial lines (except bash tail truncation edge case).
9
- */
10
- export declare const DEFAULT_MAX_LINES = 2000;
11
- export declare const DEFAULT_MAX_BYTES: number;
12
- export declare const GREP_MAX_LINE_LENGTH = 500;
13
- export interface TruncationResult {
14
- /** The truncated content */
15
- content: string;
16
- /** Whether truncation occurred */
17
- truncated: boolean;
18
- /** Which limit was hit: "lines", "bytes", or null if not truncated */
19
- truncatedBy: "lines" | "bytes" | null;
20
- /** Total number of lines in the original content */
21
- totalLines: number;
22
- /** Total number of bytes in the original content */
23
- totalBytes: number;
24
- /** Number of complete lines in the truncated output */
25
- outputLines: number;
26
- /** Number of bytes in the truncated output */
27
- outputBytes: number;
28
- /** Whether the last line was partially truncated (only for tail truncation edge case) */
29
- lastLinePartial: boolean;
30
- /** Whether the first line exceeded the byte limit (for head truncation) */
31
- firstLineExceedsLimit: boolean;
32
- /** The max lines limit that was applied */
33
- maxLines: number;
34
- /** The max bytes limit that was applied */
35
- maxBytes: number;
36
- }
37
- export interface TruncationOptions {
38
- /** Maximum number of lines (default: 2000) */
39
- maxLines?: number;
40
- /** Maximum number of bytes (default: 50KB) */
41
- maxBytes?: number;
42
- }
43
- /**
44
- * Format bytes as human-readable size.
45
- */
46
- export declare function formatSize(bytes: number): string;
47
- /**
48
- * Truncate content from the head (keep first N lines/bytes).
49
- * Suitable for file reads where you want to see the beginning.
50
- *
51
- * Never returns partial lines. If first line exceeds byte limit,
52
- * returns empty content with firstLineExceedsLimit=true.
53
- */
54
- export declare function truncateHead(content: string, options?: TruncationOptions): TruncationResult;
55
- /**
56
- * Truncate content from the tail (keep last N lines/bytes).
57
- * Suitable for bash output where you want to see the end (errors, final results).
58
- *
59
- * May return partial first line if the last line of original content exceeds byte limit.
60
- */
61
- export declare function truncateTail(content: string, options?: TruncationOptions): TruncationResult;
62
- /**
63
- * Truncate a single line to max characters, adding [truncated] suffix.
64
- * Used for grep match lines.
65
- */
66
- export declare function truncateLine(line: string, maxChars?: number): {
67
- text: string;
68
- wasTruncated: boolean;
69
- };
70
- //# sourceMappingURL=truncate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"truncate.d.ts","sourceRoot":"","sources":["../../../src/harness/utils/truncate.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,eAAO,MAAM,iBAAiB,OAAO,CAAC;AACtC,eAAO,MAAM,iBAAiB,QAAY,CAAC;AAC3C,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC,MAAM,WAAW,gBAAgB;IAChC,4BAA4B;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,sEAAsE;IACtE,WAAW,EAAE,OAAO,GAAG,OAAO,GAAG,IAAI,CAAC;IACtC,oDAAoD;IACpD,UAAU,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,UAAU,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,WAAW,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,yFAAyF;IACzF,eAAe,EAAE,OAAO,CAAC;IACzB,2EAA2E;IAC3E,qBAAqB,EAAE,OAAO,CAAC;IAC/B,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IACjC,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AA4DD;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQhD;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,GAAG,gBAAgB,CAkF/F;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,GAAG,gBAAgB,CA0E/F;AA2CD;;;GAGG;AACH,wBAAgB,YAAY,CAC3B,IAAI,EAAE,MAAM,EACZ,QAAQ,GAAE,MAA6B,GACrC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,OAAO,CAAA;CAAE,CAKzC","sourcesContent":["/**\n * Shared truncation utilities for tool outputs.\n *\n * Truncation is based on two independent limits - whichever is hit first wins:\n * - Line limit (default: 2000 lines)\n * - Byte limit (default: 50KB)\n *\n * Never returns partial lines (except bash tail truncation edge case).\n */\n\nexport const DEFAULT_MAX_LINES = 2000;\nexport const DEFAULT_MAX_BYTES = 50 * 1024; // 50KB\nexport const GREP_MAX_LINE_LENGTH = 500; // Max chars per grep match line\n\nexport interface TruncationResult {\n\t/** The truncated content */\n\tcontent: string;\n\t/** Whether truncation occurred */\n\ttruncated: boolean;\n\t/** Which limit was hit: \"lines\", \"bytes\", or null if not truncated */\n\ttruncatedBy: \"lines\" | \"bytes\" | null;\n\t/** Total number of lines in the original content */\n\ttotalLines: number;\n\t/** Total number of bytes in the original content */\n\ttotalBytes: number;\n\t/** Number of complete lines in the truncated output */\n\toutputLines: number;\n\t/** Number of bytes in the truncated output */\n\toutputBytes: number;\n\t/** Whether the last line was partially truncated (only for tail truncation edge case) */\n\tlastLinePartial: boolean;\n\t/** Whether the first line exceeded the byte limit (for head truncation) */\n\tfirstLineExceedsLimit: boolean;\n\t/** The max lines limit that was applied */\n\tmaxLines: number;\n\t/** The max bytes limit that was applied */\n\tmaxBytes: number;\n}\n\nexport interface TruncationOptions {\n\t/** Maximum number of lines (default: 2000) */\n\tmaxLines?: number;\n\t/** Maximum number of bytes (default: 50KB) */\n\tmaxBytes?: number;\n}\n\ninterface RuntimeBuffer {\n\tbyteLength(content: string, encoding: \"utf8\"): number;\n}\n\nconst runtimeBuffer = (globalThis as { Buffer?: RuntimeBuffer }).Buffer;\nconst nonAsciiPattern = /[^\\x00-\\x7f]/;\n\nfunction utf8ByteLength(content: string): number {\n\tif (runtimeBuffer) return runtimeBuffer.byteLength(content, \"utf8\");\n\n\tconst firstNonAscii = content.search(nonAsciiPattern);\n\tif (firstNonAscii === -1) return content.length;\n\n\tlet bytes = firstNonAscii;\n\tfor (let i = firstNonAscii; i < content.length; i++) {\n\t\tconst code = content.charCodeAt(i);\n\t\tif (code <= 0x7f) {\n\t\t\tbytes += 1;\n\t\t} else if (code <= 0x7ff) {\n\t\t\tbytes += 2;\n\t\t} else if (code >= 0xd800 && code <= 0xdbff && i + 1 < content.length) {\n\t\t\tconst next = content.charCodeAt(i + 1);\n\t\t\tif (next >= 0xdc00 && next <= 0xdfff) {\n\t\t\t\tbytes += 4;\n\t\t\t\ti++;\n\t\t\t} else {\n\t\t\t\tbytes += 3;\n\t\t\t}\n\t\t} else {\n\t\t\tbytes += 3;\n\t\t}\n\t}\n\treturn bytes;\n}\n\nfunction replaceUnpairedSurrogates(content: string): string {\n\tlet output = \"\";\n\tfor (let i = 0; i < content.length; i++) {\n\t\tconst code = content.charCodeAt(i);\n\t\tif (code >= 0xd800 && code <= 0xdbff) {\n\t\t\tif (i + 1 < content.length) {\n\t\t\t\tconst next = content.charCodeAt(i + 1);\n\t\t\t\tif (next >= 0xdc00 && next <= 0xdfff) {\n\t\t\t\t\toutput += content[i] + content[i + 1];\n\t\t\t\t\ti++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\toutput += \"�\";\n\t\t} else if (code >= 0xdc00 && code <= 0xdfff) {\n\t\t\toutput += \"�\";\n\t\t} else {\n\t\t\toutput += content[i];\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Format bytes as human-readable size.\n */\nexport function formatSize(bytes: number): string {\n\tif (bytes < 1024) {\n\t\treturn `${bytes}B`;\n\t} else if (bytes < 1024 * 1024) {\n\t\treturn `${(bytes / 1024).toFixed(1)}KB`;\n\t} else {\n\t\treturn `${(bytes / (1024 * 1024)).toFixed(1)}MB`;\n\t}\n}\n\n/**\n * Truncate content from the head (keep first N lines/bytes).\n * Suitable for file reads where you want to see the beginning.\n *\n * Never returns partial lines. If first line exceeds byte limit,\n * returns empty content with firstLineExceedsLimit=true.\n */\nexport function truncateHead(content: string, options: TruncationOptions = {}): TruncationResult {\n\tconst maxLines = options.maxLines ?? DEFAULT_MAX_LINES;\n\tconst maxBytes = options.maxBytes ?? DEFAULT_MAX_BYTES;\n\n\tconst totalBytes = utf8ByteLength(content);\n\tconst lines = content.split(\"\\n\");\n\tconst totalLines = lines.length;\n\n\t// Check if no truncation needed\n\tif (totalLines <= maxLines && totalBytes <= maxBytes) {\n\t\treturn {\n\t\t\tcontent,\n\t\t\ttruncated: false,\n\t\t\ttruncatedBy: null,\n\t\t\ttotalLines,\n\t\t\ttotalBytes,\n\t\t\toutputLines: totalLines,\n\t\t\toutputBytes: totalBytes,\n\t\t\tlastLinePartial: false,\n\t\t\tfirstLineExceedsLimit: false,\n\t\t\tmaxLines,\n\t\t\tmaxBytes,\n\t\t};\n\t}\n\n\t// Check if first line alone exceeds byte limit\n\tconst firstLineBytes = utf8ByteLength(lines[0]);\n\tif (firstLineBytes > maxBytes) {\n\t\treturn {\n\t\t\tcontent: \"\",\n\t\t\ttruncated: true,\n\t\t\ttruncatedBy: \"bytes\",\n\t\t\ttotalLines,\n\t\t\ttotalBytes,\n\t\t\toutputLines: 0,\n\t\t\toutputBytes: 0,\n\t\t\tlastLinePartial: false,\n\t\t\tfirstLineExceedsLimit: true,\n\t\t\tmaxLines,\n\t\t\tmaxBytes,\n\t\t};\n\t}\n\n\t// Collect complete lines that fit\n\tconst outputLinesArr: string[] = [];\n\tlet outputBytesCount = 0;\n\tlet truncatedBy: \"lines\" | \"bytes\" = \"lines\";\n\n\tfor (let i = 0; i < lines.length && i < maxLines; i++) {\n\t\tconst line = lines[i];\n\t\tconst lineBytes = utf8ByteLength(line) + (i > 0 ? 1 : 0); // +1 for newline\n\n\t\tif (outputBytesCount + lineBytes > maxBytes) {\n\t\t\ttruncatedBy = \"bytes\";\n\t\t\tbreak;\n\t\t}\n\n\t\toutputLinesArr.push(line);\n\t\toutputBytesCount += lineBytes;\n\t}\n\n\t// If we exited due to line limit\n\tif (outputLinesArr.length >= maxLines && outputBytesCount <= maxBytes) {\n\t\ttruncatedBy = \"lines\";\n\t}\n\n\tconst outputContent = outputLinesArr.join(\"\\n\");\n\tconst finalOutputBytes = utf8ByteLength(outputContent);\n\n\treturn {\n\t\tcontent: outputContent,\n\t\ttruncated: true,\n\t\ttruncatedBy,\n\t\ttotalLines,\n\t\ttotalBytes,\n\t\toutputLines: outputLinesArr.length,\n\t\toutputBytes: finalOutputBytes,\n\t\tlastLinePartial: false,\n\t\tfirstLineExceedsLimit: false,\n\t\tmaxLines,\n\t\tmaxBytes,\n\t};\n}\n\n/**\n * Truncate content from the tail (keep last N lines/bytes).\n * Suitable for bash output where you want to see the end (errors, final results).\n *\n * May return partial first line if the last line of original content exceeds byte limit.\n */\nexport function truncateTail(content: string, options: TruncationOptions = {}): TruncationResult {\n\tconst maxLines = options.maxLines ?? DEFAULT_MAX_LINES;\n\tconst maxBytes = options.maxBytes ?? DEFAULT_MAX_BYTES;\n\n\tconst totalBytes = utf8ByteLength(content);\n\tconst lines = content.split(\"\\n\");\n\tif (lines.length > 1 && lines[lines.length - 1] === \"\") lines.pop();\n\tconst totalLines = lines.length;\n\n\t// Check if no truncation needed\n\tif (totalLines <= maxLines && totalBytes <= maxBytes) {\n\t\treturn {\n\t\t\tcontent,\n\t\t\ttruncated: false,\n\t\t\ttruncatedBy: null,\n\t\t\ttotalLines,\n\t\t\ttotalBytes,\n\t\t\toutputLines: totalLines,\n\t\t\toutputBytes: totalBytes,\n\t\t\tlastLinePartial: false,\n\t\t\tfirstLineExceedsLimit: false,\n\t\t\tmaxLines,\n\t\t\tmaxBytes,\n\t\t};\n\t}\n\n\t// Work backwards from the end\n\tconst outputLinesArr: string[] = [];\n\tlet outputBytesCount = 0;\n\tlet truncatedBy: \"lines\" | \"bytes\" = \"lines\";\n\tlet lastLinePartial = false;\n\n\tfor (let i = lines.length - 1; i >= 0 && outputLinesArr.length < maxLines; i--) {\n\t\tconst line = lines[i];\n\t\tconst lineBytes = utf8ByteLength(line) + (outputLinesArr.length > 0 ? 1 : 0); // +1 for newline\n\n\t\tif (outputBytesCount + lineBytes > maxBytes) {\n\t\t\ttruncatedBy = \"bytes\";\n\t\t\t// Edge case: if we haven't added ANY lines yet and this line exceeds maxBytes,\n\t\t\t// take the end of the line (partial)\n\t\t\tif (outputLinesArr.length === 0) {\n\t\t\t\tconst truncatedLine = truncateStringToBytesFromEnd(line, maxBytes);\n\t\t\t\toutputLinesArr.unshift(truncatedLine);\n\t\t\t\toutputBytesCount = utf8ByteLength(truncatedLine);\n\t\t\t\tlastLinePartial = true;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\toutputLinesArr.unshift(line);\n\t\toutputBytesCount += lineBytes;\n\t}\n\n\t// If we exited due to line limit\n\tif (outputLinesArr.length >= maxLines && outputBytesCount <= maxBytes) {\n\t\ttruncatedBy = \"lines\";\n\t}\n\n\tconst outputContent = outputLinesArr.join(\"\\n\");\n\tconst finalOutputBytes = utf8ByteLength(outputContent);\n\n\treturn {\n\t\tcontent: outputContent,\n\t\ttruncated: true,\n\t\ttruncatedBy,\n\t\ttotalLines,\n\t\ttotalBytes,\n\t\toutputLines: outputLinesArr.length,\n\t\toutputBytes: finalOutputBytes,\n\t\tlastLinePartial,\n\t\tfirstLineExceedsLimit: false,\n\t\tmaxLines,\n\t\tmaxBytes,\n\t};\n}\n\n/**\n * Truncate a string to fit within a byte limit (from the end).\n * Handles multi-byte UTF-8 characters correctly.\n */\nfunction truncateStringToBytesFromEnd(str: string, maxBytes: number): string {\n\tif (maxBytes <= 0) return \"\";\n\n\tlet outputBytes = 0;\n\tlet start = str.length;\n\tlet needsReplacement = false;\n\tfor (let i = str.length; i > 0; ) {\n\t\tlet characterStart = i - 1;\n\t\tconst code = str.charCodeAt(characterStart);\n\t\tlet characterBytes: number;\n\t\tlet unpairedSurrogate = false;\n\t\tif (code >= 0xdc00 && code <= 0xdfff && characterStart > 0) {\n\t\t\tconst previous = str.charCodeAt(characterStart - 1);\n\t\t\tif (previous >= 0xd800 && previous <= 0xdbff) {\n\t\t\t\tcharacterStart--;\n\t\t\t\tcharacterBytes = 4;\n\t\t\t} else {\n\t\t\t\tcharacterBytes = 3;\n\t\t\t\tunpairedSurrogate = true;\n\t\t\t}\n\t\t} else if (code >= 0xd800 && code <= 0xdfff) {\n\t\t\tcharacterBytes = 3;\n\t\t\tunpairedSurrogate = true;\n\t\t} else {\n\t\t\tcharacterBytes = code <= 0x7f ? 1 : code <= 0x7ff ? 2 : 3;\n\t\t}\n\t\tif (outputBytes + characterBytes > maxBytes) break;\n\t\toutputBytes += characterBytes;\n\t\tstart = characterStart;\n\t\tneedsReplacement ||= unpairedSurrogate;\n\t\ti = characterStart;\n\t}\n\n\tconst output = str.slice(start);\n\treturn needsReplacement ? replaceUnpairedSurrogates(output) : output;\n}\n\n/**\n * Truncate a single line to max characters, adding [truncated] suffix.\n * Used for grep match lines.\n */\nexport function truncateLine(\n\tline: string,\n\tmaxChars: number = GREP_MAX_LINE_LENGTH,\n): { text: string; wasTruncated: boolean } {\n\tif (line.length <= maxChars) {\n\t\treturn { text: line, wasTruncated: false };\n\t}\n\treturn { text: `${line.slice(0, maxChars)}... [truncated]`, wasTruncated: true };\n}\n"]}