genaicode 1.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1021) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +371 -88
  3. package/dist/cli.d.ts +2 -0
  4. package/dist/cli.js +4 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/core/client.d.ts +42 -0
  7. package/dist/core/client.js +190 -0
  8. package/dist/core/client.js.map +1 -0
  9. package/dist/core/errors.d.ts +38 -0
  10. package/dist/core/errors.js +118 -0
  11. package/dist/core/errors.js.map +1 -0
  12. package/dist/core/middleware.d.ts +43 -0
  13. package/dist/core/middleware.js +173 -0
  14. package/dist/core/middleware.js.map +1 -0
  15. package/dist/core/plugins.d.ts +21 -0
  16. package/dist/core/plugins.js +55 -0
  17. package/dist/core/plugins.js.map +1 -0
  18. package/dist/core/prompt.d.ts +14 -0
  19. package/dist/core/prompt.js +47 -0
  20. package/dist/core/prompt.js.map +1 -0
  21. package/dist/core/result.d.ts +5 -0
  22. package/dist/core/result.js +27 -0
  23. package/dist/core/result.js.map +1 -0
  24. package/dist/core/stream.d.ts +11 -0
  25. package/dist/core/stream.js +93 -0
  26. package/dist/core/stream.js.map +1 -0
  27. package/dist/core/types.d.ts +153 -0
  28. package/dist/core/types.js +2 -0
  29. package/dist/core/types.js.map +1 -0
  30. package/dist/index.d.ts +12 -8
  31. package/dist/index.js +8 -11
  32. package/dist/index.js.map +1 -1
  33. package/dist/pivot-notice.d.ts +1 -0
  34. package/dist/pivot-notice.js +13 -0
  35. package/dist/pivot-notice.js.map +1 -0
  36. package/dist/providers/anthropic-converter.d.ts +12 -0
  37. package/dist/providers/anthropic-converter.js +111 -0
  38. package/dist/providers/anthropic-converter.js.map +1 -0
  39. package/dist/providers/anthropic.d.ts +11 -0
  40. package/dist/providers/anthropic.js +90 -0
  41. package/dist/providers/anthropic.js.map +1 -0
  42. package/dist/providers/fixtures/multimodal-tool-roundtrip.d.ts +4 -0
  43. package/dist/providers/fixtures/multimodal-tool-roundtrip.js +32 -0
  44. package/dist/providers/fixtures/multimodal-tool-roundtrip.js.map +1 -0
  45. package/dist/providers/google-converter.d.ts +10 -0
  46. package/dist/providers/google-converter.js +142 -0
  47. package/dist/providers/google-converter.js.map +1 -0
  48. package/dist/providers/google.d.ts +22 -0
  49. package/dist/providers/google.js +97 -0
  50. package/dist/providers/google.js.map +1 -0
  51. package/dist/providers/openai-converter.d.ts +33 -0
  52. package/dist/providers/openai-converter.js +192 -0
  53. package/dist/providers/openai-converter.js.map +1 -0
  54. package/dist/providers/openai.d.ts +13 -0
  55. package/dist/providers/openai.js +45 -0
  56. package/dist/providers/openai.js.map +1 -0
  57. package/dist/providers.d.ts +11 -0
  58. package/dist/providers.js +7 -0
  59. package/dist/providers.js.map +1 -0
  60. package/docs/pivot.md +111 -0
  61. package/docs/provider-packages.md +60 -0
  62. package/docs/retry.md +62 -0
  63. package/docs/semver.md +55 -0
  64. package/package.json +34 -91
  65. package/bin/genaicode-dev.js +0 -12
  66. package/bin/genaicode.cjs +0 -23
  67. package/dist/ai-service/ai-studio.d.ts +0 -6
  68. package/dist/ai-service/ai-studio.js +0 -460
  69. package/dist/ai-service/ai-studio.js.map +0 -1
  70. package/dist/ai-service/anthropic.d.ts +0 -5
  71. package/dist/ai-service/anthropic.js +0 -353
  72. package/dist/ai-service/anthropic.js.map +0 -1
  73. package/dist/ai-service/common-types.d.ts +0 -131
  74. package/dist/ai-service/common-types.js +0 -10
  75. package/dist/ai-service/common-types.js.map +0 -1
  76. package/dist/ai-service/common.d.ts +0 -23
  77. package/dist/ai-service/common.js +0 -59
  78. package/dist/ai-service/common.js.map +0 -1
  79. package/dist/ai-service/dall-e.d.ts +0 -7
  80. package/dist/ai-service/dall-e.js +0 -44
  81. package/dist/ai-service/dall-e.js.map +0 -1
  82. package/dist/ai-service/files-api.d.ts +0 -33
  83. package/dist/ai-service/files-api.js +0 -239
  84. package/dist/ai-service/files-api.js.map +0 -1
  85. package/dist/ai-service/github-models.d.ts +0 -13
  86. package/dist/ai-service/github-models.js +0 -49
  87. package/dist/ai-service/github-models.js.map +0 -1
  88. package/dist/ai-service/local-llm.d.ts +0 -6
  89. package/dist/ai-service/local-llm.js +0 -74
  90. package/dist/ai-service/local-llm.js.map +0 -1
  91. package/dist/ai-service/openai-responses.d.ts +0 -9
  92. package/dist/ai-service/openai-responses.js +0 -332
  93. package/dist/ai-service/openai-responses.js.map +0 -1
  94. package/dist/ai-service/openai.d.ts +0 -9
  95. package/dist/ai-service/openai.js +0 -395
  96. package/dist/ai-service/openai.js.map +0 -1
  97. package/dist/ai-service/service-configurations-types.d.ts +0 -79
  98. package/dist/ai-service/service-configurations-types.js +0 -6
  99. package/dist/ai-service/service-configurations-types.js.map +0 -1
  100. package/dist/ai-service/service-configurations.d.ts +0 -42
  101. package/dist/ai-service/service-configurations.js +0 -241
  102. package/dist/ai-service/service-configurations.js.map +0 -1
  103. package/dist/ai-service/unescape-function-call.d.ts +0 -7
  104. package/dist/ai-service/unescape-function-call.js +0 -59
  105. package/dist/ai-service/unescape-function-call.js.map +0 -1
  106. package/dist/ai-service/vertex-ai-claude.d.ts +0 -5
  107. package/dist/ai-service/vertex-ai-claude.js +0 -160
  108. package/dist/ai-service/vertex-ai-claude.js.map +0 -1
  109. package/dist/ai-service/vertex-ai-imagen.d.ts +0 -7
  110. package/dist/ai-service/vertex-ai-imagen.js +0 -70
  111. package/dist/ai-service/vertex-ai-imagen.js.map +0 -1
  112. package/dist/ai-service/vertex-ai.d.ts +0 -6
  113. package/dist/ai-service/vertex-ai.js +0 -18
  114. package/dist/ai-service/vertex-ai.js.map +0 -1
  115. package/dist/cli/cli-options.d.ts +0 -10
  116. package/dist/cli/cli-options.js +0 -116
  117. package/dist/cli/cli-options.js.map +0 -1
  118. package/dist/cli/cli-params.d.ts +0 -29
  119. package/dist/cli/cli-params.js +0 -118
  120. package/dist/cli/cli-params.js.map +0 -1
  121. package/dist/cli/service-autodetect.d.ts +0 -2
  122. package/dist/cli/service-autodetect.js +0 -17
  123. package/dist/cli/service-autodetect.js.map +0 -1
  124. package/dist/cli/validate-cli-params.d.ts +0 -18
  125. package/dist/cli/validate-cli-params.js +0 -146
  126. package/dist/cli/validate-cli-params.js.map +0 -1
  127. package/dist/files/cache-file.d.ts +0 -10
  128. package/dist/files/cache-file.js +0 -57
  129. package/dist/files/cache-file.js.map +0 -1
  130. package/dist/files/file-id-utils.d.ts +0 -7
  131. package/dist/files/file-id-utils.js +0 -25
  132. package/dist/files/file-id-utils.js.map +0 -1
  133. package/dist/files/file-utils.d.ts +0 -2
  134. package/dist/files/file-utils.js +0 -7
  135. package/dist/files/file-utils.js.map +0 -1
  136. package/dist/files/find-files.d.ts +0 -10
  137. package/dist/files/find-files.js +0 -87
  138. package/dist/files/find-files.js.map +0 -1
  139. package/dist/files/path-utils.d.ts +0 -1
  140. package/dist/files/path-utils.js +0 -12
  141. package/dist/files/path-utils.js.map +0 -1
  142. package/dist/files/read-files.d.ts +0 -18
  143. package/dist/files/read-files.js +0 -107
  144. package/dist/files/read-files.js.map +0 -1
  145. package/dist/files/search-files.d.ts +0 -53
  146. package/dist/files/search-files.js +0 -97
  147. package/dist/files/search-files.js.map +0 -1
  148. package/dist/files/source-code-tree.d.ts +0 -16
  149. package/dist/files/source-code-tree.js +0 -41
  150. package/dist/files/source-code-tree.js.map +0 -1
  151. package/dist/files/source-code-types.d.ts +0 -53
  152. package/dist/files/source-code-types.js +0 -2
  153. package/dist/files/source-code-types.js.map +0 -1
  154. package/dist/files/source-code-utils.d.ts +0 -31
  155. package/dist/files/source-code-utils.js +0 -126
  156. package/dist/files/source-code-utils.js.map +0 -1
  157. package/dist/files/summary-cache.d.ts +0 -25
  158. package/dist/files/summary-cache.js +0 -23
  159. package/dist/files/summary-cache.js.map +0 -1
  160. package/dist/files/temp-buffer.d.ts +0 -2
  161. package/dist/files/temp-buffer.js +0 -12
  162. package/dist/files/temp-buffer.js.map +0 -1
  163. package/dist/files/update-files.d.ts +0 -7
  164. package/dist/files/update-files.js +0 -30
  165. package/dist/files/update-files.js.map +0 -1
  166. package/dist/help-docs/genaicode-help-document.d.ts +0 -1
  167. package/dist/help-docs/genaicode-help-document.js +0 -287
  168. package/dist/help-docs/genaicode-help-document.js.map +0 -1
  169. package/dist/images/ensure-alpha.d.ts +0 -1
  170. package/dist/images/ensure-alpha.js +0 -5
  171. package/dist/images/ensure-alpha.js.map +0 -1
  172. package/dist/images/imgly-remove-background.d.ts +0 -2
  173. package/dist/images/imgly-remove-background.js +0 -21
  174. package/dist/images/imgly-remove-background.js.map +0 -1
  175. package/dist/images/resize-image.d.ts +0 -19
  176. package/dist/images/resize-image.js +0 -22
  177. package/dist/images/resize-image.js.map +0 -1
  178. package/dist/images/split-image.d.ts +0 -18
  179. package/dist/images/split-image.js +0 -25
  180. package/dist/images/split-image.js.map +0 -1
  181. package/dist/main/codegen-non-interactive.d.ts +0 -2
  182. package/dist/main/codegen-non-interactive.js +0 -20
  183. package/dist/main/codegen-non-interactive.js.map +0 -1
  184. package/dist/main/codegen-types.d.ts +0 -145
  185. package/dist/main/codegen-types.js +0 -2
  186. package/dist/main/codegen-types.js.map +0 -1
  187. package/dist/main/codegen-utils.d.ts +0 -8
  188. package/dist/main/codegen-utils.js +0 -43
  189. package/dist/main/codegen-utils.js.map +0 -1
  190. package/dist/main/codegen.d.ts +0 -5
  191. package/dist/main/codegen.js +0 -105
  192. package/dist/main/codegen.js.map +0 -1
  193. package/dist/main/codegen.test-utils.d.ts +0 -81
  194. package/dist/main/codegen.test-utils.js +0 -87
  195. package/dist/main/codegen.test-utils.js.map +0 -1
  196. package/dist/main/common/abort-controller.d.ts +0 -2
  197. package/dist/main/common/abort-controller.js +0 -5
  198. package/dist/main/common/abort-controller.js.map +0 -1
  199. package/dist/main/common/app-context-bus.d.ts +0 -11
  200. package/dist/main/common/app-context-bus.js +0 -29
  201. package/dist/main/common/app-context-bus.js.map +0 -1
  202. package/dist/main/common/console-types.d.ts +0 -23
  203. package/dist/main/common/console-types.js +0 -8
  204. package/dist/main/common/console-types.js.map +0 -1
  205. package/dist/main/common/content-bus-types.d.ts +0 -60
  206. package/dist/main/common/content-bus-types.js +0 -12
  207. package/dist/main/common/content-bus-types.js.map +0 -1
  208. package/dist/main/common/content-bus.d.ts +0 -16
  209. package/dist/main/common/content-bus.js +0 -102
  210. package/dist/main/common/content-bus.js.map +0 -1
  211. package/dist/main/common/cost-collector.d.ts +0 -12
  212. package/dist/main/common/cost-collector.js +0 -90
  213. package/dist/main/common/cost-collector.js.map +0 -1
  214. package/dist/main/common/user-actions.d.ts +0 -36
  215. package/dist/main/common/user-actions.js +0 -59
  216. package/dist/main/common/user-actions.js.map +0 -1
  217. package/dist/main/config-lib.d.ts +0 -13
  218. package/dist/main/config-lib.js +0 -90
  219. package/dist/main/config-lib.js.map +0 -1
  220. package/dist/main/config-schema.d.ts +0 -15
  221. package/dist/main/config-schema.js +0 -320
  222. package/dist/main/config-schema.js.map +0 -1
  223. package/dist/main/config-types.d.ts +0 -96
  224. package/dist/main/config-types.js +0 -4
  225. package/dist/main/config-types.js.map +0 -1
  226. package/dist/main/config.d.ts +0 -14
  227. package/dist/main/config.js +0 -110
  228. package/dist/main/config.js.map +0 -1
  229. package/dist/main/generate-content-functions.d.ts +0 -3
  230. package/dist/main/generate-content-functions.js +0 -19
  231. package/dist/main/generate-content-functions.js.map +0 -1
  232. package/dist/main/interactive/codegen-interactive.d.ts +0 -2
  233. package/dist/main/interactive/codegen-interactive.js +0 -57
  234. package/dist/main/interactive/codegen-interactive.js.map +0 -1
  235. package/dist/main/interactive/codegen-worker.d.ts +0 -2
  236. package/dist/main/interactive/codegen-worker.js +0 -55
  237. package/dist/main/interactive/codegen-worker.js.map +0 -1
  238. package/dist/main/interactive/common.d.ts +0 -5
  239. package/dist/main/interactive/common.js +0 -49
  240. package/dist/main/interactive/common.js.map +0 -1
  241. package/dist/main/interactive/configure.d.ts +0 -2
  242. package/dist/main/interactive/configure.js +0 -95
  243. package/dist/main/interactive/configure.js.map +0 -1
  244. package/dist/main/interactive/error-handling.d.ts +0 -1
  245. package/dist/main/interactive/error-handling.js +0 -43
  246. package/dist/main/interactive/error-handling.js.map +0 -1
  247. package/dist/main/interactive/help.d.ts +0 -1
  248. package/dist/main/interactive/help.js +0 -20
  249. package/dist/main/interactive/help.js.map +0 -1
  250. package/dist/main/interactive/select-ai-service.d.ts +0 -2
  251. package/dist/main/interactive/select-ai-service.js +0 -27
  252. package/dist/main/interactive/select-ai-service.js.map +0 -1
  253. package/dist/main/interactive/task-file.d.ts +0 -2
  254. package/dist/main/interactive/task-file.js +0 -35
  255. package/dist/main/interactive/task-file.js.map +0 -1
  256. package/dist/main/interactive/text-prompt.d.ts +0 -2
  257. package/dist/main/interactive/text-prompt.js +0 -18
  258. package/dist/main/interactive/text-prompt.js.map +0 -1
  259. package/dist/main/interactive/user-action-handlers.d.ts +0 -1
  260. package/dist/main/interactive/user-action-handlers.js +0 -20
  261. package/dist/main/interactive/user-action-handlers.js.map +0 -1
  262. package/dist/main/interactive/user-interrupt.d.ts +0 -1
  263. package/dist/main/interactive/user-interrupt.js +0 -36
  264. package/dist/main/interactive/user-interrupt.js.map +0 -1
  265. package/dist/main/knowledge/knowledge-store.d.ts +0 -6
  266. package/dist/main/knowledge/knowledge-store.js +0 -128
  267. package/dist/main/knowledge/knowledge-store.js.map +0 -1
  268. package/dist/main/knowledge/types.d.ts +0 -20
  269. package/dist/main/knowledge/types.js +0 -2
  270. package/dist/main/knowledge/types.js.map +0 -1
  271. package/dist/main/plugin-loader.d.ts +0 -36
  272. package/dist/main/plugin-loader.js +0 -245
  273. package/dist/main/plugin-loader.js.map +0 -1
  274. package/dist/main/ui/backend/api-handlers.d.ts +0 -6
  275. package/dist/main/ui/backend/api-handlers.js +0 -5
  276. package/dist/main/ui/backend/api-handlers.js.map +0 -1
  277. package/dist/main/ui/backend/api-utils.d.ts +0 -2
  278. package/dist/main/ui/backend/api-utils.js +0 -18
  279. package/dist/main/ui/backend/api-utils.js.map +0 -1
  280. package/dist/main/ui/backend/api.d.ts +0 -3
  281. package/dist/main/ui/backend/api.js +0 -25
  282. package/dist/main/ui/backend/api.js.map +0 -1
  283. package/dist/main/ui/backend/endpoints/compress-context-endpoint.d.ts +0 -1
  284. package/dist/main/ui/backend/endpoints/compress-context-endpoint.js +0 -18
  285. package/dist/main/ui/backend/endpoints/compress-context-endpoint.js.map +0 -1
  286. package/dist/main/ui/backend/endpoints/config-endpoint.d.ts +0 -1
  287. package/dist/main/ui/backend/endpoints/config-endpoint.js +0 -51
  288. package/dist/main/ui/backend/endpoints/config-endpoint.js.map +0 -1
  289. package/dist/main/ui/backend/endpoints/console-logs-endpoint.d.ts +0 -1
  290. package/dist/main/ui/backend/endpoints/console-logs-endpoint.js +0 -19
  291. package/dist/main/ui/backend/endpoints/console-logs-endpoint.js.map +0 -1
  292. package/dist/main/ui/backend/endpoints/content-endpoint.d.ts +0 -1
  293. package/dist/main/ui/backend/endpoints/content-endpoint.js +0 -14
  294. package/dist/main/ui/backend/endpoints/content-endpoint.js.map +0 -1
  295. package/dist/main/ui/backend/endpoints/context-endpoint.d.ts +0 -1
  296. package/dist/main/ui/backend/endpoints/context-endpoint.js +0 -169
  297. package/dist/main/ui/backend/endpoints/context-endpoint.js.map +0 -1
  298. package/dist/main/ui/backend/endpoints/edit-message-endpoint.d.ts +0 -1
  299. package/dist/main/ui/backend/endpoints/edit-message-endpoint.js +0 -37
  300. package/dist/main/ui/backend/endpoints/edit-message-endpoint.js.map +0 -1
  301. package/dist/main/ui/backend/endpoints/execute-codegen-endpoint.d.ts +0 -1
  302. package/dist/main/ui/backend/endpoints/execute-codegen-endpoint.js +0 -44
  303. package/dist/main/ui/backend/endpoints/execute-codegen-endpoint.js.map +0 -1
  304. package/dist/main/ui/backend/endpoints/execution-status-endpoint.d.ts +0 -1
  305. package/dist/main/ui/backend/endpoints/execution-status-endpoint.js +0 -37
  306. package/dist/main/ui/backend/endpoints/execution-status-endpoint.js.map +0 -1
  307. package/dist/main/ui/backend/endpoints/generate-content-endpoint.d.ts +0 -1
  308. package/dist/main/ui/backend/endpoints/generate-content-endpoint.js +0 -29
  309. package/dist/main/ui/backend/endpoints/generate-content-endpoint.js.map +0 -1
  310. package/dist/main/ui/backend/endpoints/index.d.ts +0 -13
  311. package/dist/main/ui/backend/endpoints/index.js +0 -14
  312. package/dist/main/ui/backend/endpoints/index.js.map +0 -1
  313. package/dist/main/ui/backend/endpoints/interrupt-execution-endpoint.d.ts +0 -1
  314. package/dist/main/ui/backend/endpoints/interrupt-execution-endpoint.js +0 -28
  315. package/dist/main/ui/backend/endpoints/interrupt-execution-endpoint.js.map +0 -1
  316. package/dist/main/ui/backend/endpoints/iteration-endpoint.d.ts +0 -1
  317. package/dist/main/ui/backend/endpoints/iteration-endpoint.js +0 -16
  318. package/dist/main/ui/backend/endpoints/iteration-endpoint.js.map +0 -1
  319. package/dist/main/ui/backend/endpoints/question-endpoint.d.ts +0 -1
  320. package/dist/main/ui/backend/endpoints/question-endpoint.js +0 -72
  321. package/dist/main/ui/backend/endpoints/question-endpoint.js.map +0 -1
  322. package/dist/main/ui/backend/endpoints/service-configuration-endpoint.d.ts +0 -1
  323. package/dist/main/ui/backend/endpoints/service-configuration-endpoint.js +0 -54
  324. package/dist/main/ui/backend/endpoints/service-configuration-endpoint.js.map +0 -1
  325. package/dist/main/ui/backend/endpoints/usage-endpoint.d.ts +0 -1
  326. package/dist/main/ui/backend/endpoints/usage-endpoint.js +0 -15
  327. package/dist/main/ui/backend/endpoints/usage-endpoint.js.map +0 -1
  328. package/dist/main/ui/backend/server.d.ts +0 -8
  329. package/dist/main/ui/backend/server.js +0 -84
  330. package/dist/main/ui/backend/server.js.map +0 -1
  331. package/dist/main/ui/backend/service.d.ts +0 -159
  332. package/dist/main/ui/backend/service.js +0 -626
  333. package/dist/main/ui/backend/service.js.map +0 -1
  334. package/dist/main/ui/codegen-ui.d.ts +0 -6
  335. package/dist/main/ui/codegen-ui.js +0 -22
  336. package/dist/main/ui/codegen-ui.js.map +0 -1
  337. package/dist/main/ui/common/api-types.d.ts +0 -170
  338. package/dist/main/ui/common/api-types.js +0 -13
  339. package/dist/main/ui/common/api-types.js.map +0 -1
  340. package/dist/main/ui/frontend/assets/favicon-DvroFOpS.png +0 -0
  341. package/dist/main/ui/frontend/assets/index-5QDg_0vR.css +0 -1
  342. package/dist/main/ui/frontend/assets/index-C_k1AhO2.js +0 -3445
  343. package/dist/main/ui/frontend/assets/logo-BGHkG1-J.png +0 -0
  344. package/dist/main/ui/frontend/assets/logo-dark-KAsU1C78.png +0 -0
  345. package/dist/main/ui/frontend/assets/press-start-2p-cyrillic-400-normal-oElOGqNf.woff2 +0 -0
  346. package/dist/main/ui/frontend/assets/press-start-2p-cyrillic-ext-400-normal-COIQET2s.woff2 +0 -0
  347. package/dist/main/ui/frontend/assets/press-start-2p-greek-400-normal-DUIT0YPZ.woff2 +0 -0
  348. package/dist/main/ui/frontend/assets/press-start-2p-latin-400-normal-BKfmdmKK.woff +0 -0
  349. package/dist/main/ui/frontend/assets/press-start-2p-latin-400-normal-xj9lRvVs.woff2 +0 -0
  350. package/dist/main/ui/frontend/assets/press-start-2p-latin-ext-400-normal-B18ub5-k.woff +0 -0
  351. package/dist/main/ui/frontend/assets/press-start-2p-latin-ext-400-normal-DDIa4im3.woff2 +0 -0
  352. package/dist/main/ui/frontend/assets/wolf-bark-Bl17CX4O.mp3 +0 -0
  353. package/dist/main/ui/frontend/index.html +0 -16
  354. package/dist/main/ui/user-action-handlers.d.ts +0 -2
  355. package/dist/main/ui/user-action-handlers.js +0 -34
  356. package/dist/main/ui/user-action-handlers.js.map +0 -1
  357. package/dist/operations/create-directory/create-directory-def.d.ts +0 -9
  358. package/dist/operations/create-directory/create-directory-def.js +0 -22
  359. package/dist/operations/create-directory/create-directory-def.js.map +0 -1
  360. package/dist/operations/create-directory/create-directory-executor.d.ts +0 -6
  361. package/dist/operations/create-directory/create-directory-executor.js +0 -22
  362. package/dist/operations/create-directory/create-directory-executor.js.map +0 -1
  363. package/dist/operations/create-file/create-file-def.d.ts +0 -10
  364. package/dist/operations/create-file/create-file-def.js +0 -29
  365. package/dist/operations/create-file/create-file-def.js.map +0 -1
  366. package/dist/operations/create-file/create-file-executor.d.ts +0 -6
  367. package/dist/operations/create-file/create-file-executor.js +0 -27
  368. package/dist/operations/create-file/create-file-executor.js.map +0 -1
  369. package/dist/operations/delete-file/delete-file-def.d.ts +0 -9
  370. package/dist/operations/delete-file/delete-file-def.js +0 -22
  371. package/dist/operations/delete-file/delete-file-def.js.map +0 -1
  372. package/dist/operations/delete-file/delete-file-executor.d.ts +0 -6
  373. package/dist/operations/delete-file/delete-file-executor.js +0 -23
  374. package/dist/operations/delete-file/delete-file-executor.js.map +0 -1
  375. package/dist/operations/download-file/download-file-def.d.ts +0 -10
  376. package/dist/operations/download-file/download-file-def.js +0 -26
  377. package/dist/operations/download-file/download-file-def.js.map +0 -1
  378. package/dist/operations/download-file/download-file-executor.d.ts +0 -6
  379. package/dist/operations/download-file/download-file-executor.js +0 -44
  380. package/dist/operations/download-file/download-file-executor.js.map +0 -1
  381. package/dist/operations/imgly-remove-background/imgly-remove-background-def.d.ts +0 -10
  382. package/dist/operations/imgly-remove-background/imgly-remove-background-def.js +0 -26
  383. package/dist/operations/imgly-remove-background/imgly-remove-background-def.js.map +0 -1
  384. package/dist/operations/imgly-remove-background/imgly-remove-background-executor.d.ts +0 -6
  385. package/dist/operations/imgly-remove-background/imgly-remove-background-executor.js +0 -40
  386. package/dist/operations/imgly-remove-background/imgly-remove-background-executor.js.map +0 -1
  387. package/dist/operations/move-file/move-file-def.d.ts +0 -10
  388. package/dist/operations/move-file/move-file-def.js +0 -26
  389. package/dist/operations/move-file/move-file-def.js.map +0 -1
  390. package/dist/operations/move-file/move-file-executor.d.ts +0 -6
  391. package/dist/operations/move-file/move-file-executor.js +0 -29
  392. package/dist/operations/move-file/move-file-executor.js.map +0 -1
  393. package/dist/operations/operations-index.d.ts +0 -3
  394. package/dist/operations/operations-index.js +0 -33
  395. package/dist/operations/operations-index.js.map +0 -1
  396. package/dist/operations/patch-file/patch-file-def.d.ts +0 -10
  397. package/dist/operations/patch-file/patch-file-def.js +0 -40
  398. package/dist/operations/patch-file/patch-file-def.js.map +0 -1
  399. package/dist/operations/patch-file/patch-file-executor.d.ts +0 -5
  400. package/dist/operations/patch-file/patch-file-executor.js +0 -26
  401. package/dist/operations/patch-file/patch-file-executor.js.map +0 -1
  402. package/dist/operations/resize-image/resize-image-def.d.ts +0 -13
  403. package/dist/operations/resize-image/resize-image-def.js +0 -37
  404. package/dist/operations/resize-image/resize-image-def.js.map +0 -1
  405. package/dist/operations/resize-image/resize-image-executor.d.ts +0 -5
  406. package/dist/operations/resize-image/resize-image-executor.js +0 -30
  407. package/dist/operations/resize-image/resize-image-executor.js.map +0 -1
  408. package/dist/operations/split-image/split-image-def.d.ts +0 -18
  409. package/dist/operations/split-image/split-image-def.js +0 -46
  410. package/dist/operations/split-image/split-image-def.js.map +0 -1
  411. package/dist/operations/split-image/split-image-executor.d.ts +0 -6
  412. package/dist/operations/split-image/split-image-executor.js +0 -51
  413. package/dist/operations/split-image/split-image-executor.js.map +0 -1
  414. package/dist/operations/update-file/update-file-def.d.ts +0 -10
  415. package/dist/operations/update-file/update-file-def.js +0 -27
  416. package/dist/operations/update-file/update-file-def.js.map +0 -1
  417. package/dist/operations/update-file/update-file-executor.d.ts +0 -5
  418. package/dist/operations/update-file/update-file-executor.js +0 -22
  419. package/dist/operations/update-file/update-file-executor.js.map +0 -1
  420. package/dist/project-profiles/detection.d.ts +0 -40
  421. package/dist/project-profiles/detection.js +0 -131
  422. package/dist/project-profiles/detection.js.map +0 -1
  423. package/dist/project-profiles/index.d.ts +0 -35
  424. package/dist/project-profiles/index.js +0 -72
  425. package/dist/project-profiles/index.js.map +0 -1
  426. package/dist/project-profiles/profiles/golang.d.ts +0 -65
  427. package/dist/project-profiles/profiles/golang.js +0 -208
  428. package/dist/project-profiles/profiles/golang.js.map +0 -1
  429. package/dist/project-profiles/profiles/java-maven.d.ts +0 -80
  430. package/dist/project-profiles/profiles/java-maven.js +0 -165
  431. package/dist/project-profiles/profiles/java-maven.js.map +0 -1
  432. package/dist/project-profiles/profiles/javascript-npm.d.ts +0 -40
  433. package/dist/project-profiles/profiles/javascript-npm.js +0 -118
  434. package/dist/project-profiles/profiles/javascript-npm.js.map +0 -1
  435. package/dist/project-profiles/profiles/javascript-react.d.ts +0 -46
  436. package/dist/project-profiles/profiles/javascript-react.js +0 -147
  437. package/dist/project-profiles/profiles/javascript-react.js.map +0 -1
  438. package/dist/project-profiles/profiles/python-django.d.ts +0 -58
  439. package/dist/project-profiles/profiles/python-django.js +0 -200
  440. package/dist/project-profiles/profiles/python-django.js.map +0 -1
  441. package/dist/project-profiles/types.d.ts +0 -122
  442. package/dist/project-profiles/types.js +0 -77
  443. package/dist/project-profiles/types.js.map +0 -1
  444. package/dist/prompt/ai-service-fallback.d.ts +0 -4
  445. package/dist/prompt/ai-service-fallback.js +0 -47
  446. package/dist/prompt/ai-service-fallback.js.map +0 -1
  447. package/dist/prompt/context-utils.d.ts +0 -7
  448. package/dist/prompt/context-utils.js +0 -33
  449. package/dist/prompt/context-utils.js.map +0 -1
  450. package/dist/prompt/dynamic-function-generator.d.ts +0 -2
  451. package/dist/prompt/dynamic-function-generator.js +0 -58
  452. package/dist/prompt/dynamic-function-generator.js.map +0 -1
  453. package/dist/prompt/function-calling-validate.d.ts +0 -4
  454. package/dist/prompt/function-calling-validate.js +0 -109
  455. package/dist/prompt/function-calling-validate.js.map +0 -1
  456. package/dist/prompt/function-calling.d.ts +0 -5
  457. package/dist/prompt/function-calling.js +0 -88
  458. package/dist/prompt/function-calling.js.map +0 -1
  459. package/dist/prompt/function-defs/analysis-result.d.ts +0 -7
  460. package/dist/prompt/function-defs/analysis-result.js +0 -24
  461. package/dist/prompt/function-defs/analysis-result.js.map +0 -1
  462. package/dist/prompt/function-defs/ask-question.d.ts +0 -20
  463. package/dist/prompt/function-defs/ask-question.js +0 -373
  464. package/dist/prompt/function-defs/ask-question.js.map +0 -1
  465. package/dist/prompt/function-defs/code-execution.d.ts +0 -7
  466. package/dist/prompt/function-defs/code-execution.js +0 -27
  467. package/dist/prompt/function-defs/code-execution.js.map +0 -1
  468. package/dist/prompt/function-defs/codegen-planning.d.ts +0 -8
  469. package/dist/prompt/function-defs/codegen-planning.js +0 -60
  470. package/dist/prompt/function-defs/codegen-planning.js.map +0 -1
  471. package/dist/prompt/function-defs/codegen-summary.d.ts +0 -5
  472. package/dist/prompt/function-defs/codegen-summary.js +0 -103
  473. package/dist/prompt/function-defs/codegen-summary.js.map +0 -1
  474. package/dist/prompt/function-defs/compound-action-list.d.ts +0 -7
  475. package/dist/prompt/function-defs/compound-action-list.js +0 -38
  476. package/dist/prompt/function-defs/compound-action-list.js.map +0 -1
  477. package/dist/prompt/function-defs/compound-action.d.ts +0 -2
  478. package/dist/prompt/function-defs/compound-action.js +0 -47
  479. package/dist/prompt/function-defs/compound-action.js.map +0 -1
  480. package/dist/prompt/function-defs/container-task-commands.d.ts +0 -10
  481. package/dist/prompt/function-defs/container-task-commands.js +0 -185
  482. package/dist/prompt/function-defs/container-task-commands.js.map +0 -1
  483. package/dist/prompt/function-defs/context-compression.d.ts +0 -47
  484. package/dist/prompt/function-defs/context-compression.js +0 -49
  485. package/dist/prompt/function-defs/context-compression.js.map +0 -1
  486. package/dist/prompt/function-defs/conversation-graph.d.ts +0 -33
  487. package/dist/prompt/function-defs/conversation-graph.js +0 -110
  488. package/dist/prompt/function-defs/conversation-graph.js.map +0 -1
  489. package/dist/prompt/function-defs/conversation-summary.d.ts +0 -2
  490. package/dist/prompt/function-defs/conversation-summary.js +0 -15
  491. package/dist/prompt/function-defs/conversation-summary.js.map +0 -1
  492. package/dist/prompt/function-defs/explanation.d.ts +0 -5
  493. package/dist/prompt/function-defs/explanation.js +0 -18
  494. package/dist/prompt/function-defs/explanation.js.map +0 -1
  495. package/dist/prompt/function-defs/explore-external-directories.d.ts +0 -16
  496. package/dist/prompt/function-defs/explore-external-directories.js +0 -48
  497. package/dist/prompt/function-defs/explore-external-directories.js.map +0 -1
  498. package/dist/prompt/function-defs/extract-file-fragments.d.ts +0 -27
  499. package/dist/prompt/function-defs/extract-file-fragments.js +0 -36
  500. package/dist/prompt/function-defs/extract-file-fragments.js.map +0 -1
  501. package/dist/prompt/function-defs/genaicode-help.d.ts +0 -6
  502. package/dist/prompt/function-defs/genaicode-help.js +0 -23
  503. package/dist/prompt/function-defs/genaicode-help.js.map +0 -1
  504. package/dist/prompt/function-defs/generate-image.d.ts +0 -5
  505. package/dist/prompt/function-defs/generate-image.js +0 -42
  506. package/dist/prompt/function-defs/generate-image.js.map +0 -1
  507. package/dist/prompt/function-defs/get-image-assets.d.ts +0 -5
  508. package/dist/prompt/function-defs/get-image-assets.js +0 -21
  509. package/dist/prompt/function-defs/get-image-assets.js.map +0 -1
  510. package/dist/prompt/function-defs/get-source-code.d.ts +0 -5
  511. package/dist/prompt/function-defs/get-source-code.js +0 -49
  512. package/dist/prompt/function-defs/get-source-code.js.map +0 -1
  513. package/dist/prompt/function-defs/iterate.d.ts +0 -20
  514. package/dist/prompt/function-defs/iterate.js +0 -373
  515. package/dist/prompt/function-defs/iterate.js.map +0 -1
  516. package/dist/prompt/function-defs/optimize-context.d.ts +0 -5
  517. package/dist/prompt/function-defs/optimize-context.js +0 -74
  518. package/dist/prompt/function-defs/optimize-context.js.map +0 -1
  519. package/dist/prompt/function-defs/perform-analysis.d.ts +0 -8
  520. package/dist/prompt/function-defs/perform-analysis.js +0 -28
  521. package/dist/prompt/function-defs/perform-analysis.js.map +0 -1
  522. package/dist/prompt/function-defs/pull-console-logs.d.ts +0 -2
  523. package/dist/prompt/function-defs/pull-console-logs.js +0 -29
  524. package/dist/prompt/function-defs/pull-console-logs.js.map +0 -1
  525. package/dist/prompt/function-defs/read-external-files.d.ts +0 -9
  526. package/dist/prompt/function-defs/read-external-files.js +0 -30
  527. package/dist/prompt/function-defs/read-external-files.js.map +0 -1
  528. package/dist/prompt/function-defs/read-history.d.ts +0 -2
  529. package/dist/prompt/function-defs/read-history.js +0 -14
  530. package/dist/prompt/function-defs/read-history.js.map +0 -1
  531. package/dist/prompt/function-defs/reasoning-inference.d.ts +0 -3
  532. package/dist/prompt/function-defs/reasoning-inference.js +0 -39
  533. package/dist/prompt/function-defs/reasoning-inference.js.map +0 -1
  534. package/dist/prompt/function-defs/run-bash-command.d.ts +0 -2
  535. package/dist/prompt/function-defs/run-bash-command.js +0 -29
  536. package/dist/prompt/function-defs/run-bash-command.js.map +0 -1
  537. package/dist/prompt/function-defs/run-container-task.d.ts +0 -11
  538. package/dist/prompt/function-defs/run-container-task.js +0 -41
  539. package/dist/prompt/function-defs/run-container-task.js.map +0 -1
  540. package/dist/prompt/function-defs/run-project-command.d.ts +0 -2
  541. package/dist/prompt/function-defs/run-project-command.js +0 -40
  542. package/dist/prompt/function-defs/run-project-command.js.map +0 -1
  543. package/dist/prompt/function-defs/set-summaries.d.ts +0 -5
  544. package/dist/prompt/function-defs/set-summaries.js +0 -59
  545. package/dist/prompt/function-defs/set-summaries.js.map +0 -1
  546. package/dist/prompt/function-defs/structured-question.d.ts +0 -2
  547. package/dist/prompt/function-defs/structured-question.js +0 -64
  548. package/dist/prompt/function-defs/structured-question.js.map +0 -1
  549. package/dist/prompt/function-defs/update-history.d.ts +0 -5
  550. package/dist/prompt/function-defs/update-history.js +0 -22
  551. package/dist/prompt/function-defs/update-history.js.map +0 -1
  552. package/dist/prompt/function-defs/web-search.d.ts +0 -9
  553. package/dist/prompt/function-defs/web-search.js +0 -16
  554. package/dist/prompt/function-defs/web-search.js.map +0 -1
  555. package/dist/prompt/limits.d.ts +0 -3
  556. package/dist/prompt/limits.js +0 -21
  557. package/dist/prompt/limits.js.map +0 -1
  558. package/dist/prompt/prompt-codegen.d.ts +0 -9
  559. package/dist/prompt/prompt-codegen.js +0 -45
  560. package/dist/prompt/prompt-codegen.js.map +0 -1
  561. package/dist/prompt/prompt-service.d.ts +0 -8
  562. package/dist/prompt/prompt-service.js +0 -147
  563. package/dist/prompt/prompt-service.js.map +0 -1
  564. package/dist/prompt/prompt-service.test-utils.d.ts +0 -66
  565. package/dist/prompt/prompt-service.test-utils.js +0 -171
  566. package/dist/prompt/prompt-service.test-utils.js.map +0 -1
  567. package/dist/prompt/source-code-optimize.d.ts +0 -2
  568. package/dist/prompt/source-code-optimize.js +0 -27
  569. package/dist/prompt/source-code-optimize.js.map +0 -1
  570. package/dist/prompt/static-prompts.d.ts +0 -17
  571. package/dist/prompt/static-prompts.js +0 -23
  572. package/dist/prompt/static-prompts.js.map +0 -1
  573. package/dist/prompt/steps/step-ask-question/ask-question-handler.d.ts +0 -3
  574. package/dist/prompt/steps/step-ask-question/ask-question-handler.js +0 -13
  575. package/dist/prompt/steps/step-ask-question/ask-question-handler.js.map +0 -1
  576. package/dist/prompt/steps/step-ask-question/handlers/container-task/command-execution-loop.d.ts +0 -7
  577. package/dist/prompt/steps/step-ask-question/handlers/container-task/command-execution-loop.js +0 -301
  578. package/dist/prompt/steps/step-ask-question/handlers/container-task/command-execution-loop.js.map +0 -1
  579. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/check-context.d.ts +0 -12
  580. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/check-context.js +0 -41
  581. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/check-context.js.map +0 -1
  582. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/complete-task.d.ts +0 -4
  583. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/complete-task.js +0 -49
  584. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/complete-task.js.map +0 -1
  585. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/copy-from-container.d.ts +0 -4
  586. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/copy-from-container.js +0 -190
  587. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/copy-from-container.js.map +0 -1
  588. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/copy-to-container.d.ts +0 -4
  589. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/copy-to-container.js +0 -139
  590. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/copy-to-container.js.map +0 -1
  591. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/edit-file.d.ts +0 -10
  592. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/edit-file.js +0 -93
  593. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/edit-file.js.map +0 -1
  594. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/fail-task.d.ts +0 -4
  595. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/fail-task.js +0 -72
  596. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/fail-task.js.map +0 -1
  597. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/gain-knowledge.d.ts +0 -10
  598. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/gain-knowledge.js +0 -125
  599. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/gain-knowledge.js.map +0 -1
  600. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/interrupt-controller.d.ts +0 -19
  601. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/interrupt-controller.js +0 -33
  602. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/interrupt-controller.js.map +0 -1
  603. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/query-knowledge.d.ts +0 -8
  604. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/query-knowledge.js +0 -85
  605. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/query-knowledge.js.map +0 -1
  606. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/request-secret.d.ts +0 -6
  607. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/request-secret.js +0 -122
  608. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/request-secret.js.map +0 -1
  609. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/run-command.d.ts +0 -7
  610. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/run-command.js +0 -146
  611. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/run-command.js.map +0 -1
  612. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/send-message.d.ts +0 -4
  613. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/send-message.js +0 -56
  614. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/send-message.js.map +0 -1
  615. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/set-execution-plan.d.ts +0 -4
  616. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/set-execution-plan.js +0 -56
  617. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/set-execution-plan.js.map +0 -1
  618. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/update-execution-plan.d.ts +0 -4
  619. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/update-execution-plan.js +0 -39
  620. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/update-execution-plan.js.map +0 -1
  621. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/view-file.d.ts +0 -10
  622. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/view-file.js +0 -95
  623. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/view-file.js.map +0 -1
  624. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/web-search.d.ts +0 -2
  625. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/web-search.js +0 -96
  626. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/web-search.js.map +0 -1
  627. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/wrap-context.d.ts +0 -4
  628. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/wrap-context.js +0 -123
  629. package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/wrap-context.js.map +0 -1
  630. package/dist/prompt/steps/step-ask-question/handlers/container-task/container-command-handlers.d.ts +0 -34
  631. package/dist/prompt/steps/step-ask-question/handlers/container-task/container-command-handlers.js +0 -332
  632. package/dist/prompt/steps/step-ask-question/handlers/container-task/container-command-handlers.js.map +0 -1
  633. package/dist/prompt/steps/step-ask-question/handlers/container-task/container-commands-registry.d.ts +0 -11
  634. package/dist/prompt/steps/step-ask-question/handlers/container-task/container-commands-registry.js +0 -50
  635. package/dist/prompt/steps/step-ask-question/handlers/container-task/container-commands-registry.js.map +0 -1
  636. package/dist/prompt/steps/step-ask-question/handlers/container-task/container-commands-types.d.ts +0 -28
  637. package/dist/prompt/steps/step-ask-question/handlers/container-task/container-commands-types.js +0 -2
  638. package/dist/prompt/steps/step-ask-question/handlers/container-task/container-commands-types.js.map +0 -1
  639. package/dist/prompt/steps/step-ask-question/handlers/container-task/container-task-orchestrator.d.ts +0 -2
  640. package/dist/prompt/steps/step-ask-question/handlers/container-task/container-task-orchestrator.js +0 -202
  641. package/dist/prompt/steps/step-ask-question/handlers/container-task/container-task-orchestrator.js.map +0 -1
  642. package/dist/prompt/steps/step-ask-question/handlers/container-task/container-task-types.d.ts +0 -52
  643. package/dist/prompt/steps/step-ask-question/handlers/container-task/container-task-types.js +0 -2
  644. package/dist/prompt/steps/step-ask-question/handlers/container-task/container-task-types.js.map +0 -1
  645. package/dist/prompt/steps/step-ask-question/handlers/container-task/utils/docker-check.d.ts +0 -4
  646. package/dist/prompt/steps/step-ask-question/handlers/container-task/utils/docker-check.js +0 -15
  647. package/dist/prompt/steps/step-ask-question/handlers/container-task/utils/docker-check.js.map +0 -1
  648. package/dist/prompt/steps/step-ask-question/handlers/container-task/utils/docker-utils.d.ts +0 -50
  649. package/dist/prompt/steps/step-ask-question/handlers/container-task/utils/docker-utils.js +0 -358
  650. package/dist/prompt/steps/step-ask-question/handlers/container-task/utils/docker-utils.js.map +0 -1
  651. package/dist/prompt/steps/step-ask-question/handlers/file-request-utils.d.ts +0 -47
  652. package/dist/prompt/steps/step-ask-question/handlers/file-request-utils.js +0 -114
  653. package/dist/prompt/steps/step-ask-question/handlers/file-request-utils.js.map +0 -1
  654. package/dist/prompt/steps/step-ask-question/handlers/handle-code-generation.d.ts +0 -4
  655. package/dist/prompt/steps/step-ask-question/handlers/handle-code-generation.js +0 -177
  656. package/dist/prompt/steps/step-ask-question/handlers/handle-code-generation.js.map +0 -1
  657. package/dist/prompt/steps/step-ask-question/handlers/handle-compound-action.d.ts +0 -20
  658. package/dist/prompt/steps/step-ask-question/handlers/handle-compound-action.js +0 -305
  659. package/dist/prompt/steps/step-ask-question/handlers/handle-compound-action.js.map +0 -1
  660. package/dist/prompt/steps/step-ask-question/handlers/handle-confirm-code-generation.d.ts +0 -2
  661. package/dist/prompt/steps/step-ask-question/handlers/handle-confirm-code-generation.js +0 -40
  662. package/dist/prompt/steps/step-ask-question/handlers/handle-confirm-code-generation.js.map +0 -1
  663. package/dist/prompt/steps/step-ask-question/handlers/handle-context-compression.d.ts +0 -2
  664. package/dist/prompt/steps/step-ask-question/handlers/handle-context-compression.js +0 -35
  665. package/dist/prompt/steps/step-ask-question/handlers/handle-context-compression.js.map +0 -1
  666. package/dist/prompt/steps/step-ask-question/handlers/handle-context-optimization.d.ts +0 -2
  667. package/dist/prompt/steps/step-ask-question/handlers/handle-context-optimization.js +0 -34
  668. package/dist/prompt/steps/step-ask-question/handlers/handle-context-optimization.js.map +0 -1
  669. package/dist/prompt/steps/step-ask-question/handlers/handle-conversation-graph.d.ts +0 -11
  670. package/dist/prompt/steps/step-ask-question/handlers/handle-conversation-graph.js +0 -503
  671. package/dist/prompt/steps/step-ask-question/handlers/handle-conversation-graph.js.map +0 -1
  672. package/dist/prompt/steps/step-ask-question/handlers/handle-create-file.d.ts +0 -2
  673. package/dist/prompt/steps/step-ask-question/handlers/handle-create-file.js +0 -159
  674. package/dist/prompt/steps/step-ask-question/handlers/handle-create-file.js.map +0 -1
  675. package/dist/prompt/steps/step-ask-question/handlers/handle-end-conversation.d.ts +0 -2
  676. package/dist/prompt/steps/step-ask-question/handlers/handle-end-conversation.js +0 -30
  677. package/dist/prompt/steps/step-ask-question/handlers/handle-end-conversation.js.map +0 -1
  678. package/dist/prompt/steps/step-ask-question/handlers/handle-explore-external-directories.d.ts +0 -2
  679. package/dist/prompt/steps/step-ask-question/handlers/handle-explore-external-directories.js +0 -280
  680. package/dist/prompt/steps/step-ask-question/handlers/handle-explore-external-directories.js.map +0 -1
  681. package/dist/prompt/steps/step-ask-question/handlers/handle-genaicode-help.d.ts +0 -8
  682. package/dist/prompt/steps/step-ask-question/handlers/handle-genaicode-help.js +0 -105
  683. package/dist/prompt/steps/step-ask-question/handlers/handle-genaicode-help.js.map +0 -1
  684. package/dist/prompt/steps/step-ask-question/handlers/handle-generate-image.d.ts +0 -2
  685. package/dist/prompt/steps/step-ask-question/handlers/handle-generate-image.js +0 -110
  686. package/dist/prompt/steps/step-ask-question/handlers/handle-generate-image.js.map +0 -1
  687. package/dist/prompt/steps/step-ask-question/handlers/handle-lint.d.ts +0 -6
  688. package/dist/prompt/steps/step-ask-question/handlers/handle-lint.js +0 -60
  689. package/dist/prompt/steps/step-ask-question/handlers/handle-lint.js.map +0 -1
  690. package/dist/prompt/steps/step-ask-question/handlers/handle-perform-analysis.d.ts +0 -6
  691. package/dist/prompt/steps/step-ask-question/handlers/handle-perform-analysis.js +0 -110
  692. package/dist/prompt/steps/step-ask-question/handlers/handle-perform-analysis.js.map +0 -1
  693. package/dist/prompt/steps/step-ask-question/handlers/handle-project-command.d.ts +0 -2
  694. package/dist/prompt/steps/step-ask-question/handlers/handle-project-command.js +0 -282
  695. package/dist/prompt/steps/step-ask-question/handlers/handle-project-command.js.map +0 -1
  696. package/dist/prompt/steps/step-ask-question/handlers/handle-pull-app-context.d.ts +0 -9
  697. package/dist/prompt/steps/step-ask-question/handlers/handle-pull-app-context.js +0 -94
  698. package/dist/prompt/steps/step-ask-question/handlers/handle-pull-app-context.js.map +0 -1
  699. package/dist/prompt/steps/step-ask-question/handlers/handle-pull-console-logs.d.ts +0 -2
  700. package/dist/prompt/steps/step-ask-question/handlers/handle-pull-console-logs.js +0 -174
  701. package/dist/prompt/steps/step-ask-question/handlers/handle-pull-console-logs.js.map +0 -1
  702. package/dist/prompt/steps/step-ask-question/handlers/handle-push-app-context.d.ts +0 -9
  703. package/dist/prompt/steps/step-ask-question/handlers/handle-push-app-context.js +0 -104
  704. package/dist/prompt/steps/step-ask-question/handlers/handle-push-app-context.js.map +0 -1
  705. package/dist/prompt/steps/step-ask-question/handlers/handle-read-external-files.d.ts +0 -2
  706. package/dist/prompt/steps/step-ask-question/handlers/handle-read-external-files.js +0 -149
  707. package/dist/prompt/steps/step-ask-question/handlers/handle-read-external-files.js.map +0 -1
  708. package/dist/prompt/steps/step-ask-question/handlers/handle-reasoning-inference.d.ts +0 -7
  709. package/dist/prompt/steps/step-ask-question/handlers/handle-reasoning-inference.js +0 -119
  710. package/dist/prompt/steps/step-ask-question/handlers/handle-reasoning-inference.js.map +0 -1
  711. package/dist/prompt/steps/step-ask-question/handlers/handle-remove-files-from-context.d.ts +0 -2
  712. package/dist/prompt/steps/step-ask-question/handlers/handle-remove-files-from-context.js +0 -100
  713. package/dist/prompt/steps/step-ask-question/handlers/handle-remove-files-from-context.js.map +0 -1
  714. package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-content.d.ts +0 -8
  715. package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-content.js +0 -145
  716. package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-content.js.map +0 -1
  717. package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-fragments.d.ts +0 -8
  718. package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-fragments.js +0 -197
  719. package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-fragments.js.map +0 -1
  720. package/dist/prompt/steps/step-ask-question/handlers/handle-request-git-context.d.ts +0 -3
  721. package/dist/prompt/steps/step-ask-question/handlers/handle-request-git-context.js +0 -251
  722. package/dist/prompt/steps/step-ask-question/handlers/handle-request-git-context.js.map +0 -1
  723. package/dist/prompt/steps/step-ask-question/handlers/handle-request-permissions.d.ts +0 -2
  724. package/dist/prompt/steps/step-ask-question/handlers/handle-request-permissions.js +0 -83
  725. package/dist/prompt/steps/step-ask-question/handlers/handle-request-permissions.js.map +0 -1
  726. package/dist/prompt/steps/step-ask-question/handlers/handle-run-bash-command.d.ts +0 -2
  727. package/dist/prompt/steps/step-ask-question/handlers/handle-run-bash-command.js +0 -185
  728. package/dist/prompt/steps/step-ask-question/handlers/handle-run-bash-command.js.map +0 -1
  729. package/dist/prompt/steps/step-ask-question/handlers/handle-run-container-task.d.ts +0 -2
  730. package/dist/prompt/steps/step-ask-question/handlers/handle-run-container-task.js +0 -7
  731. package/dist/prompt/steps/step-ask-question/handlers/handle-run-container-task.js.map +0 -1
  732. package/dist/prompt/steps/step-ask-question/handlers/handle-search-code.d.ts +0 -2
  733. package/dist/prompt/steps/step-ask-question/handlers/handle-search-code.js +0 -96
  734. package/dist/prompt/steps/step-ask-question/handlers/handle-search-code.js.map +0 -1
  735. package/dist/prompt/steps/step-ask-question/handlers/handle-send-message.d.ts +0 -2
  736. package/dist/prompt/steps/step-ask-question/handlers/handle-send-message.js +0 -21
  737. package/dist/prompt/steps/step-ask-question/handlers/handle-send-message.js.map +0 -1
  738. package/dist/prompt/steps/step-ask-question/handlers/handle-structured-question.d.ts +0 -1
  739. package/dist/prompt/steps/step-ask-question/handlers/handle-structured-question.js +0 -72
  740. package/dist/prompt/steps/step-ask-question/handlers/handle-structured-question.js.map +0 -1
  741. package/dist/prompt/steps/step-ask-question/handlers/handle-update-file.d.ts +0 -2
  742. package/dist/prompt/steps/step-ask-question/handlers/handle-update-file.js +0 -161
  743. package/dist/prompt/steps/step-ask-question/handlers/handle-update-file.js.map +0 -1
  744. package/dist/prompt/steps/step-ask-question/handlers/handle-web-search.d.ts +0 -1
  745. package/dist/prompt/steps/step-ask-question/handlers/handle-web-search.js +0 -85
  746. package/dist/prompt/steps/step-ask-question/handlers/handle-web-search.js.map +0 -1
  747. package/dist/prompt/steps/step-ask-question/step-ask-question-handlers.d.ts +0 -3
  748. package/dist/prompt/steps/step-ask-question/step-ask-question-handlers.js +0 -5
  749. package/dist/prompt/steps/step-ask-question/step-ask-question-handlers.js.map +0 -1
  750. package/dist/prompt/steps/step-ask-question/step-ask-question-types.d.ts +0 -257
  751. package/dist/prompt/steps/step-ask-question/step-ask-question-types.js +0 -2
  752. package/dist/prompt/steps/step-ask-question/step-ask-question-types.js.map +0 -1
  753. package/dist/prompt/steps/step-ask-question/step-ask-question.d.ts +0 -37
  754. package/dist/prompt/steps/step-ask-question/step-ask-question.js +0 -132
  755. package/dist/prompt/steps/step-ask-question/step-ask-question.js.map +0 -1
  756. package/dist/prompt/steps/step-auto-context-refresh.d.ts +0 -6
  757. package/dist/prompt/steps/step-auto-context-refresh.js +0 -98
  758. package/dist/prompt/steps/step-auto-context-refresh.js.map +0 -1
  759. package/dist/prompt/steps/step-codegen-planning.d.ts +0 -11
  760. package/dist/prompt/steps/step-codegen-planning.js +0 -147
  761. package/dist/prompt/steps/step-codegen-planning.js.map +0 -1
  762. package/dist/prompt/steps/step-context-compression.d.ts +0 -8
  763. package/dist/prompt/steps/step-context-compression.js +0 -231
  764. package/dist/prompt/steps/step-context-compression.js.map +0 -1
  765. package/dist/prompt/steps/step-context-optimization.d.ts +0 -8
  766. package/dist/prompt/steps/step-context-optimization.js +0 -308
  767. package/dist/prompt/steps/step-context-optimization.js.map +0 -1
  768. package/dist/prompt/steps/step-ensure-context.d.ts +0 -8
  769. package/dist/prompt/steps/step-ensure-context.js +0 -114
  770. package/dist/prompt/steps/step-ensure-context.js.map +0 -1
  771. package/dist/prompt/steps/step-generate-codegen-summary-prompt.d.ts +0 -2
  772. package/dist/prompt/steps/step-generate-codegen-summary-prompt.js +0 -133
  773. package/dist/prompt/steps/step-generate-codegen-summary-prompt.js.map +0 -1
  774. package/dist/prompt/steps/step-generate-codegen-summary.d.ts +0 -14
  775. package/dist/prompt/steps/step-generate-codegen-summary.js +0 -68
  776. package/dist/prompt/steps/step-generate-codegen-summary.js.map +0 -1
  777. package/dist/prompt/steps/step-generate-image.d.ts +0 -10
  778. package/dist/prompt/steps/step-generate-image.js +0 -32
  779. package/dist/prompt/steps/step-generate-image.js.map +0 -1
  780. package/dist/prompt/steps/step-generate-summary.d.ts +0 -10
  781. package/dist/prompt/steps/step-generate-summary.js +0 -63
  782. package/dist/prompt/steps/step-generate-summary.js.map +0 -1
  783. package/dist/prompt/steps/step-history-update.d.ts +0 -6
  784. package/dist/prompt/steps/step-history-update.js +0 -69
  785. package/dist/prompt/steps/step-history-update.js.map +0 -1
  786. package/dist/prompt/steps/step-iterate/handlers/container-task/command-execution-loop.d.ts +0 -7
  787. package/dist/prompt/steps/step-iterate/handlers/container-task/command-execution-loop.js +0 -301
  788. package/dist/prompt/steps/step-iterate/handlers/container-task/command-execution-loop.js.map +0 -1
  789. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/complete-task.d.ts +0 -4
  790. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/complete-task.js +0 -49
  791. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/complete-task.js.map +0 -1
  792. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/copy-from-container.d.ts +0 -4
  793. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/copy-from-container.js +0 -190
  794. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/copy-from-container.js.map +0 -1
  795. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/copy-to-container.d.ts +0 -4
  796. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/copy-to-container.js +0 -139
  797. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/copy-to-container.js.map +0 -1
  798. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/edit-file.d.ts +0 -10
  799. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/edit-file.js +0 -93
  800. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/edit-file.js.map +0 -1
  801. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/fail-task.d.ts +0 -4
  802. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/fail-task.js +0 -72
  803. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/fail-task.js.map +0 -1
  804. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/gain-knowledge.d.ts +0 -10
  805. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/gain-knowledge.js +0 -125
  806. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/gain-knowledge.js.map +0 -1
  807. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/interrupt-controller.d.ts +0 -19
  808. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/interrupt-controller.js +0 -33
  809. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/interrupt-controller.js.map +0 -1
  810. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/query-knowledge.d.ts +0 -8
  811. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/query-knowledge.js +0 -85
  812. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/query-knowledge.js.map +0 -1
  813. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/request-secret.d.ts +0 -6
  814. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/request-secret.js +0 -122
  815. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/request-secret.js.map +0 -1
  816. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/run-command.d.ts +0 -7
  817. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/run-command.js +0 -146
  818. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/run-command.js.map +0 -1
  819. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/send-message.d.ts +0 -4
  820. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/send-message.js +0 -56
  821. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/send-message.js.map +0 -1
  822. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/set-execution-plan.d.ts +0 -4
  823. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/set-execution-plan.js +0 -56
  824. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/set-execution-plan.js.map +0 -1
  825. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/update-execution-plan.d.ts +0 -4
  826. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/update-execution-plan.js +0 -39
  827. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/update-execution-plan.js.map +0 -1
  828. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/view-file.d.ts +0 -10
  829. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/view-file.js +0 -95
  830. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/view-file.js.map +0 -1
  831. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/web-search.d.ts +0 -2
  832. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/web-search.js +0 -96
  833. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/web-search.js.map +0 -1
  834. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/wrap-context.d.ts +0 -4
  835. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/wrap-context.js +0 -123
  836. package/dist/prompt/steps/step-iterate/handlers/container-task/commands/wrap-context.js.map +0 -1
  837. package/dist/prompt/steps/step-iterate/handlers/container-task/container-commands-registry.d.ts +0 -11
  838. package/dist/prompt/steps/step-iterate/handlers/container-task/container-commands-registry.js +0 -50
  839. package/dist/prompt/steps/step-iterate/handlers/container-task/container-commands-registry.js.map +0 -1
  840. package/dist/prompt/steps/step-iterate/handlers/container-task/container-commands-types.d.ts +0 -28
  841. package/dist/prompt/steps/step-iterate/handlers/container-task/container-commands-types.js +0 -2
  842. package/dist/prompt/steps/step-iterate/handlers/container-task/container-commands-types.js.map +0 -1
  843. package/dist/prompt/steps/step-iterate/handlers/container-task/container-task-orchestrator.d.ts +0 -2
  844. package/dist/prompt/steps/step-iterate/handlers/container-task/container-task-orchestrator.js +0 -202
  845. package/dist/prompt/steps/step-iterate/handlers/container-task/container-task-orchestrator.js.map +0 -1
  846. package/dist/prompt/steps/step-iterate/handlers/container-task/utils/docker-check.d.ts +0 -4
  847. package/dist/prompt/steps/step-iterate/handlers/container-task/utils/docker-check.js +0 -15
  848. package/dist/prompt/steps/step-iterate/handlers/container-task/utils/docker-check.js.map +0 -1
  849. package/dist/prompt/steps/step-iterate/handlers/container-task/utils/docker-utils.d.ts +0 -50
  850. package/dist/prompt/steps/step-iterate/handlers/container-task/utils/docker-utils.js +0 -358
  851. package/dist/prompt/steps/step-iterate/handlers/container-task/utils/docker-utils.js.map +0 -1
  852. package/dist/prompt/steps/step-iterate/handlers/file-request-utils.d.ts +0 -47
  853. package/dist/prompt/steps/step-iterate/handlers/file-request-utils.js +0 -114
  854. package/dist/prompt/steps/step-iterate/handlers/file-request-utils.js.map +0 -1
  855. package/dist/prompt/steps/step-iterate/handlers/handle-code-execution.d.ts +0 -1
  856. package/dist/prompt/steps/step-iterate/handlers/handle-code-execution.js +0 -133
  857. package/dist/prompt/steps/step-iterate/handlers/handle-code-execution.js.map +0 -1
  858. package/dist/prompt/steps/step-iterate/handlers/handle-code-generation.d.ts +0 -4
  859. package/dist/prompt/steps/step-iterate/handlers/handle-code-generation.js +0 -177
  860. package/dist/prompt/steps/step-iterate/handlers/handle-code-generation.js.map +0 -1
  861. package/dist/prompt/steps/step-iterate/handlers/handle-compound-action.d.ts +0 -20
  862. package/dist/prompt/steps/step-iterate/handlers/handle-compound-action.js +0 -305
  863. package/dist/prompt/steps/step-iterate/handlers/handle-compound-action.js.map +0 -1
  864. package/dist/prompt/steps/step-iterate/handlers/handle-confirm-code-generation.d.ts +0 -2
  865. package/dist/prompt/steps/step-iterate/handlers/handle-confirm-code-generation.js +0 -40
  866. package/dist/prompt/steps/step-iterate/handlers/handle-confirm-code-generation.js.map +0 -1
  867. package/dist/prompt/steps/step-iterate/handlers/handle-context-compression.d.ts +0 -2
  868. package/dist/prompt/steps/step-iterate/handlers/handle-context-compression.js +0 -35
  869. package/dist/prompt/steps/step-iterate/handlers/handle-context-compression.js.map +0 -1
  870. package/dist/prompt/steps/step-iterate/handlers/handle-context-optimization.d.ts +0 -2
  871. package/dist/prompt/steps/step-iterate/handlers/handle-context-optimization.js +0 -34
  872. package/dist/prompt/steps/step-iterate/handlers/handle-context-optimization.js.map +0 -1
  873. package/dist/prompt/steps/step-iterate/handlers/handle-conversation-graph.d.ts +0 -11
  874. package/dist/prompt/steps/step-iterate/handlers/handle-conversation-graph.js +0 -503
  875. package/dist/prompt/steps/step-iterate/handlers/handle-conversation-graph.js.map +0 -1
  876. package/dist/prompt/steps/step-iterate/handlers/handle-create-file.d.ts +0 -2
  877. package/dist/prompt/steps/step-iterate/handlers/handle-create-file.js +0 -159
  878. package/dist/prompt/steps/step-iterate/handlers/handle-create-file.js.map +0 -1
  879. package/dist/prompt/steps/step-iterate/handlers/handle-end-conversation.d.ts +0 -2
  880. package/dist/prompt/steps/step-iterate/handlers/handle-end-conversation.js +0 -30
  881. package/dist/prompt/steps/step-iterate/handlers/handle-end-conversation.js.map +0 -1
  882. package/dist/prompt/steps/step-iterate/handlers/handle-explore-external-directories.d.ts +0 -2
  883. package/dist/prompt/steps/step-iterate/handlers/handle-explore-external-directories.js +0 -280
  884. package/dist/prompt/steps/step-iterate/handlers/handle-explore-external-directories.js.map +0 -1
  885. package/dist/prompt/steps/step-iterate/handlers/handle-genaicode-help.d.ts +0 -8
  886. package/dist/prompt/steps/step-iterate/handlers/handle-genaicode-help.js +0 -105
  887. package/dist/prompt/steps/step-iterate/handlers/handle-genaicode-help.js.map +0 -1
  888. package/dist/prompt/steps/step-iterate/handlers/handle-generate-image.d.ts +0 -2
  889. package/dist/prompt/steps/step-iterate/handlers/handle-generate-image.js +0 -110
  890. package/dist/prompt/steps/step-iterate/handlers/handle-generate-image.js.map +0 -1
  891. package/dist/prompt/steps/step-iterate/handlers/handle-perform-analysis.d.ts +0 -6
  892. package/dist/prompt/steps/step-iterate/handlers/handle-perform-analysis.js +0 -110
  893. package/dist/prompt/steps/step-iterate/handlers/handle-perform-analysis.js.map +0 -1
  894. package/dist/prompt/steps/step-iterate/handlers/handle-project-command.d.ts +0 -2
  895. package/dist/prompt/steps/step-iterate/handlers/handle-project-command.js +0 -280
  896. package/dist/prompt/steps/step-iterate/handlers/handle-project-command.js.map +0 -1
  897. package/dist/prompt/steps/step-iterate/handlers/handle-pull-app-context.d.ts +0 -9
  898. package/dist/prompt/steps/step-iterate/handlers/handle-pull-app-context.js +0 -94
  899. package/dist/prompt/steps/step-iterate/handlers/handle-pull-app-context.js.map +0 -1
  900. package/dist/prompt/steps/step-iterate/handlers/handle-pull-console-logs.d.ts +0 -2
  901. package/dist/prompt/steps/step-iterate/handlers/handle-pull-console-logs.js +0 -174
  902. package/dist/prompt/steps/step-iterate/handlers/handle-pull-console-logs.js.map +0 -1
  903. package/dist/prompt/steps/step-iterate/handlers/handle-push-app-context.d.ts +0 -9
  904. package/dist/prompt/steps/step-iterate/handlers/handle-push-app-context.js +0 -104
  905. package/dist/prompt/steps/step-iterate/handlers/handle-push-app-context.js.map +0 -1
  906. package/dist/prompt/steps/step-iterate/handlers/handle-read-external-files.d.ts +0 -2
  907. package/dist/prompt/steps/step-iterate/handlers/handle-read-external-files.js +0 -149
  908. package/dist/prompt/steps/step-iterate/handlers/handle-read-external-files.js.map +0 -1
  909. package/dist/prompt/steps/step-iterate/handlers/handle-reasoning-inference.d.ts +0 -7
  910. package/dist/prompt/steps/step-iterate/handlers/handle-reasoning-inference.js +0 -119
  911. package/dist/prompt/steps/step-iterate/handlers/handle-reasoning-inference.js.map +0 -1
  912. package/dist/prompt/steps/step-iterate/handlers/handle-remove-files-from-context.d.ts +0 -2
  913. package/dist/prompt/steps/step-iterate/handlers/handle-remove-files-from-context.js +0 -100
  914. package/dist/prompt/steps/step-iterate/handlers/handle-remove-files-from-context.js.map +0 -1
  915. package/dist/prompt/steps/step-iterate/handlers/handle-request-files-content.d.ts +0 -8
  916. package/dist/prompt/steps/step-iterate/handlers/handle-request-files-content.js +0 -146
  917. package/dist/prompt/steps/step-iterate/handlers/handle-request-files-content.js.map +0 -1
  918. package/dist/prompt/steps/step-iterate/handlers/handle-request-files-fragments.d.ts +0 -8
  919. package/dist/prompt/steps/step-iterate/handlers/handle-request-files-fragments.js +0 -197
  920. package/dist/prompt/steps/step-iterate/handlers/handle-request-files-fragments.js.map +0 -1
  921. package/dist/prompt/steps/step-iterate/handlers/handle-request-git-context.d.ts +0 -3
  922. package/dist/prompt/steps/step-iterate/handlers/handle-request-git-context.js +0 -251
  923. package/dist/prompt/steps/step-iterate/handlers/handle-request-git-context.js.map +0 -1
  924. package/dist/prompt/steps/step-iterate/handlers/handle-request-permissions.d.ts +0 -2
  925. package/dist/prompt/steps/step-iterate/handlers/handle-request-permissions.js +0 -83
  926. package/dist/prompt/steps/step-iterate/handlers/handle-request-permissions.js.map +0 -1
  927. package/dist/prompt/steps/step-iterate/handlers/handle-run-bash-command.d.ts +0 -2
  928. package/dist/prompt/steps/step-iterate/handlers/handle-run-bash-command.js +0 -185
  929. package/dist/prompt/steps/step-iterate/handlers/handle-run-bash-command.js.map +0 -1
  930. package/dist/prompt/steps/step-iterate/handlers/handle-run-container-task.d.ts +0 -2
  931. package/dist/prompt/steps/step-iterate/handlers/handle-run-container-task.js +0 -7
  932. package/dist/prompt/steps/step-iterate/handlers/handle-run-container-task.js.map +0 -1
  933. package/dist/prompt/steps/step-iterate/handlers/handle-search-code.d.ts +0 -2
  934. package/dist/prompt/steps/step-iterate/handlers/handle-search-code.js +0 -96
  935. package/dist/prompt/steps/step-iterate/handlers/handle-search-code.js.map +0 -1
  936. package/dist/prompt/steps/step-iterate/handlers/handle-send-message.d.ts +0 -2
  937. package/dist/prompt/steps/step-iterate/handlers/handle-send-message.js +0 -21
  938. package/dist/prompt/steps/step-iterate/handlers/handle-send-message.js.map +0 -1
  939. package/dist/prompt/steps/step-iterate/handlers/handle-structured-question.d.ts +0 -1
  940. package/dist/prompt/steps/step-iterate/handlers/handle-structured-question.js +0 -72
  941. package/dist/prompt/steps/step-iterate/handlers/handle-structured-question.js.map +0 -1
  942. package/dist/prompt/steps/step-iterate/handlers/handle-update-file.d.ts +0 -2
  943. package/dist/prompt/steps/step-iterate/handlers/handle-update-file.js +0 -161
  944. package/dist/prompt/steps/step-iterate/handlers/handle-update-file.js.map +0 -1
  945. package/dist/prompt/steps/step-iterate/handlers/handle-web-search.d.ts +0 -1
  946. package/dist/prompt/steps/step-iterate/handlers/handle-web-search.js +0 -85
  947. package/dist/prompt/steps/step-iterate/handlers/handle-web-search.js.map +0 -1
  948. package/dist/prompt/steps/step-iterate/iterate-handler.d.ts +0 -4
  949. package/dist/prompt/steps/step-iterate/iterate-handler.js +0 -14
  950. package/dist/prompt/steps/step-iterate/iterate-handler.js.map +0 -1
  951. package/dist/prompt/steps/step-iterate/step-iterate-handlers.d.ts +0 -3
  952. package/dist/prompt/steps/step-iterate/step-iterate-handlers.js +0 -5
  953. package/dist/prompt/steps/step-iterate/step-iterate-handlers.js.map +0 -1
  954. package/dist/prompt/steps/step-iterate/step-iterate-types.d.ts +0 -255
  955. package/dist/prompt/steps/step-iterate/step-iterate-types.js +0 -2
  956. package/dist/prompt/steps/step-iterate/step-iterate-types.js.map +0 -1
  957. package/dist/prompt/steps/step-iterate/step-iterate.d.ts +0 -37
  958. package/dist/prompt/steps/step-iterate/step-iterate.js +0 -132
  959. package/dist/prompt/steps/step-iterate/step-iterate.js.map +0 -1
  960. package/dist/prompt/steps/step-process-file-updates.d.ts +0 -12
  961. package/dist/prompt/steps/step-process-file-updates.js +0 -148
  962. package/dist/prompt/steps/step-process-file-updates.js.map +0 -1
  963. package/dist/prompt/steps/step-summarization.d.ts +0 -10
  964. package/dist/prompt/steps/step-summarization.js +0 -167
  965. package/dist/prompt/steps/step-summarization.js.map +0 -1
  966. package/dist/prompt/steps/step-validate-recover.d.ts +0 -2
  967. package/dist/prompt/steps/step-validate-recover.js +0 -71
  968. package/dist/prompt/steps/step-validate-recover.js.map +0 -1
  969. package/dist/prompt/steps/step-verify-patch.d.ts +0 -10
  970. package/dist/prompt/steps/step-verify-patch.js +0 -52
  971. package/dist/prompt/steps/step-verify-patch.js.map +0 -1
  972. package/dist/prompt/steps/steps-types.d.ts +0 -4
  973. package/dist/prompt/steps/steps-types.js +0 -6
  974. package/dist/prompt/steps/steps-types.js.map +0 -1
  975. package/dist/prompt/steps/steps-utils.d.ts +0 -7
  976. package/dist/prompt/steps/steps-utils.js +0 -11
  977. package/dist/prompt/steps/steps-utils.js.map +0 -1
  978. package/dist/prompt/systemprompt.d.ts +0 -4
  979. package/dist/prompt/systemprompt.js +0 -113
  980. package/dist/prompt/systemprompt.js.map +0 -1
  981. package/dist/prompt/token-estimator.d.ts +0 -8
  982. package/dist/prompt/token-estimator.js +0 -31
  983. package/dist/prompt/token-estimator.js.map +0 -1
  984. package/dist/prompt-debug/current-prompt-plugin.d.ts +0 -3
  985. package/dist/prompt-debug/current-prompt-plugin.js +0 -10
  986. package/dist/prompt-debug/current-prompt-plugin.js.map +0 -1
  987. package/dist/utils/docker-utils.d.ts +0 -37
  988. package/dist/utils/docker-utils.js +0 -258
  989. package/dist/utils/docker-utils.js.map +0 -1
  990. package/dist/vite-genaicode/code-transformer.d.ts +0 -5
  991. package/dist/vite-genaicode/code-transformer.js +0 -83
  992. package/dist/vite-genaicode/code-transformer.js.map +0 -1
  993. package/dist/vite-genaicode/console-interceptor.d.ts +0 -53
  994. package/dist/vite-genaicode/console-interceptor.js +0 -117
  995. package/dist/vite-genaicode/console-interceptor.js.map +0 -1
  996. package/dist/vite-genaicode/constants.d.ts +0 -3
  997. package/dist/vite-genaicode/constants.js +0 -4
  998. package/dist/vite-genaicode/constants.js.map +0 -1
  999. package/dist/vite-genaicode/dynamic-function-generator.d.ts +0 -2
  1000. package/dist/vite-genaicode/dynamic-function-generator.js +0 -47
  1001. package/dist/vite-genaicode/dynamic-function-generator.js.map +0 -1
  1002. package/dist/vite-genaicode/html-injector.d.ts +0 -6
  1003. package/dist/vite-genaicode/html-injector.js +0 -14
  1004. package/dist/vite-genaicode/html-injector.js.map +0 -1
  1005. package/dist/vite-genaicode/server-manager.d.ts +0 -26
  1006. package/dist/vite-genaicode/server-manager.js +0 -91
  1007. package/dist/vite-genaicode/server-manager.js.map +0 -1
  1008. package/dist/vite-genaicode/vite-genaicode-context.d.ts +0 -31
  1009. package/dist/vite-genaicode/vite-genaicode-context.js +0 -120
  1010. package/dist/vite-genaicode/vite-genaicode-context.js.map +0 -1
  1011. package/dist/vite-genaicode/vite-genaicode-frontend.d.ts +0 -1
  1012. package/dist/vite-genaicode/vite-genaicode-frontend.js +0 -329
  1013. package/dist/vite-genaicode/vite-genaicode-frontend.js.map +0 -1
  1014. package/dist/vite-genaicode/vite-genaicode-plugin.d.ts +0 -21
  1015. package/dist/vite-genaicode/vite-genaicode-plugin.js +0 -87
  1016. package/dist/vite-genaicode/vite-genaicode-plugin.js.map +0 -1
  1017. package/dist/vite-genaicode/vite-genaicode-types.d.ts +0 -28
  1018. package/dist/vite-genaicode/vite-genaicode-types.js +0 -11
  1019. package/dist/vite-genaicode/vite-genaicode-types.js.map +0 -1
  1020. package/media/logo-dark.png +0 -0
  1021. package/media/logo.png +0 -0
package/package.json CHANGED
@@ -1,133 +1,76 @@
1
1
  {
2
2
  "name": "genaicode",
3
- "version": "1.0.0",
3
+ "version": "2.1.0",
4
+ "description": "A small, provider-neutral TypeScript toolkit for calling LLMs from backend code.",
4
5
  "author": "Grzegorz Tańczyk",
5
6
  "repository": {
6
7
  "type": "git",
7
8
  "url": "git+https://github.com/gtanczyk/genaicode.git"
8
9
  },
9
10
  "keywords": [
10
- "generate",
11
- "code",
11
+ "llm",
12
12
  "ai",
13
- "vite-plugin"
13
+ "openai",
14
+ "backend",
15
+ "prompt",
16
+ "toolkit"
14
17
  ],
15
18
  "type": "module",
16
- "bin": "./bin/genaicode.cjs",
19
+ "bin": {
20
+ "genaicode": "./dist/cli.js"
21
+ },
17
22
  "engines": {
18
- "node": ">=18"
23
+ "node": ">=20"
19
24
  },
20
25
  "license": "Apache-2.0",
26
+ "sideEffects": false,
21
27
  "files": [
22
- "bin",
23
28
  "dist",
24
- "media",
29
+ "docs",
30
+ "CHANGELOG.md",
25
31
  "README.md",
26
32
  "LICENSE"
27
33
  ],
28
34
  "exports": {
29
35
  ".": {
30
36
  "types": "./dist/index.d.ts",
31
- "default": "./dist/index.js"
32
- },
33
- "./vite-plugin": {
34
- "types": "./dist/vite-genaicode/vite-genaicode-plugin.d.ts",
35
- "default": "./dist/vite-genaicode/vite-genaicode-plugin.js"
36
- },
37
- "./vite-context": {
38
- "types": "./dist/vite-genaicode/vite-genaicode-context.d.ts",
39
- "default": "./dist/vite-genaicode/vite-genaicode-context.js"
37
+ "import": "./dist/index.js"
40
38
  },
41
- "./*": "./dist/*"
39
+ "./providers": {
40
+ "types": "./dist/providers.d.ts",
41
+ "import": "./dist/providers.js"
42
+ }
42
43
  },
43
44
  "scripts": {
44
- "cli": "node ./bin/genaicode.cjs",
45
- "interactive-cli": "node ./bin/genaicode.cjs --interactive",
46
- "ui": "node ./bin/genaicode.cjs --ui",
47
- "lint": "eslint . --ext js,ts,tsx --report-unused-disable-directives --max-warnings 0",
48
- "test:watch": "vitest --config vitest.unit.config.ts",
45
+ "clean": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
46
+ "build": "npm run clean && tsc -p tsconfig.build.json",
47
+ "lint": "eslint . --ext js,ts --report-unused-disable-directives --max-warnings 0",
49
48
  "test": "vitest --config vitest.unit.config.ts --run",
50
- "test:ci": "vitest run --config vitest.unit.config.ts --reporter=json",
51
- "test:e2e": "vitest --config vitest.e2e.config.ts",
52
- "test:eval": "vitest --config vitest.eval.config.ts",
53
- "coverage": "vitest run --coverage",
54
- "prepare": "husky install || true",
49
+ "test:e2e": "vitest --config vitest.e2e.config.ts --run",
50
+ "test:watch": "vitest --config vitest.unit.config.ts",
55
51
  "type-check": "tsc --noEmit",
56
- "build": "tsc -p tsconfig.build.json && npm run build-frontend",
57
- "build-frontend": "vite build src/main/ui/frontend",
58
- "prepublishOnly": "npm run build"
52
+ "check": "npm run type-check && npm run lint && npm test && npm run build",
53
+ "prepublishOnly": "npm run check"
54
+ },
55
+ "dependencies": {
56
+ "@anthropic-ai/sdk": "^0.74.0",
57
+ "@google/genai": "^1.30.0",
58
+ "openai": "^5.16.0"
59
59
  },
60
60
  "devDependencies": {
61
- "@inquirer/type": "^1.5.5",
62
- "@types/cors": "^2.8.13",
63
- "@types/dockerode": "^3.3.42",
64
- "@types/express": "^4.17.21",
65
- "@types/helmet": "^4.0.0",
66
- "@types/mock-fs": "^4.13.4",
67
- "@types/multer": "^1.4.12",
68
- "@types/react": "^18.3.5",
69
- "@types/react-dom": "^18.3.0",
70
- "@types/tar-stream": "^3.1.4",
71
- "@types/xml2js": "^0.4.14",
61
+ "@types/node": "^20.0.0",
72
62
  "@typescript-eslint/eslint-plugin": "^7.17.0",
73
- "@uiw/react-json-view": "^2.0.0-alpha.30",
74
- "@vitejs/plugin-react": "^4.3.4",
75
- "@vitest/coverage-v8": "^3.0.7",
76
- "@vitest/ui": "^3.0.7",
63
+ "@typescript-eslint/parser": "^7.17.0",
77
64
  "eslint": "^8.54.0",
78
65
  "eslint-config-prettier": "^9.0.0",
79
- "eslint-plugin-import": "^2.29.0",
80
66
  "husky": "^9.1.1",
81
67
  "lint-staged": "^15.2.7",
82
- "madge": "^8.0.0",
83
- "mock-fs": "^5.5.0",
84
68
  "prettier": "^3.1.0",
85
- "puppeteer": "^22.15.0",
86
- "react": "^18.3.1",
87
- "react-dom": "^18.3.1",
88
- "react-markdown": "^10.1.0",
89
- "remark-gfm": "^4.0.1",
90
- "styled-components": "^6.1.13",
91
- "ts-node": "^10.9.2",
92
69
  "typescript": "^5.0.0",
93
70
  "vite": "^6.4.1",
94
- "vite-plugin-checker": "^0.8.0",
95
71
  "vitest": "^3.0.7"
96
72
  },
97
- "dependencies": {
98
- "@anthropic-ai/sdk": "^0.74.0",
99
- "@fontsource/press-start-2p": "^5.1.0",
100
- "@google-cloud/aiplatform": "^3.34.0",
101
- "@google/genai": "^1.30.0",
102
- "@imgly/background-removal-node": "^1.4.5",
103
- "@inquirer/prompts": "^7.8.4",
104
- "@types/diff": "^5.2.1",
105
- "@types/mime-types": "^2.1.4",
106
- "@types/node": "^18.0.0",
107
- "@types/styled-components": "^5.1.34",
108
- "axios": "^1.13.5",
109
- "c12": "^3.3.3",
110
- "cors": "^2.8.5",
111
- "diff": "^5.2.2",
112
- "dockerode": "^4.0.7",
113
- "express": "^4.22.1",
114
- "find-cache-dir": "^5.0.0",
115
- "glob-regex": "^0.3.2",
116
- "helmet": "^7.1.0",
117
- "image-size": "^1.2.1",
118
- "inquirer-file-selector": "^0.4.0",
119
- "jsonschema": "^1.4.1",
120
- "mime-types": "^2.1.35",
121
- "multer": "^2.1.1",
122
- "openai": "^5.16.0",
123
- "please-upgrade-node": "^3.2.0",
124
- "sharp": "^0.33.4",
125
- "simple-git": "^3.32.3",
126
- "tar-stream": "^3.1.7",
127
- "xml2js": "^0.6.2",
128
- "zod": "^3.25.0"
129
- },
130
73
  "lint-staged": {
131
- "*.{js,ts,css,md}": "prettier --write"
74
+ "*.{js,ts,md}": "prettier --write"
132
75
  }
133
76
  }
@@ -1,12 +0,0 @@
1
- import url from 'node:url';
2
- import { register } from 'node:module';
3
- import path from 'path';
4
-
5
- const __filename = url.fileURLToPath(import.meta.url);
6
- register('ts-node/esm', url.pathToFileURL(__filename));
7
-
8
- const project = path.resolve('./tsconfig.json');
9
- (await import('ts-node')).register({ project });
10
-
11
- const codegen = await import('../src/main/codegen.ts');
12
- await codegen.runCodegen(true);
package/bin/genaicode.cjs DELETED
@@ -1,23 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /* eslint-disable @typescript-eslint/no-var-requires */
4
- const pleaseUpgradeNode = require('please-upgrade-node');
5
-
6
- const pkg = require('../package.json');
7
- pleaseUpgradeNode(pkg);
8
-
9
- const devMode = require('fs').existsSync(`${__dirname}/../src`);
10
- const forceDist = process.argv.indexOf('--force-dist') >= 0;
11
-
12
- if (devMode && !forceDist) {
13
- pleaseUpgradeNode({
14
- name: 'genaicode-dev.js',
15
- engines: {
16
- node: '>=20',
17
- },
18
- });
19
-
20
- import('./genaicode-dev.js').catch((e) => console.error(e));
21
- } else {
22
- import('../dist/main/codegen.js').then(({ runCodegen }) => runCodegen());
23
- }
@@ -1,6 +0,0 @@
1
- import { GenerateContentFunction, GenerateContentResult, PromptItem, GenerateContentArgs } from './common-types.js';
2
- /**
3
- * This function generates content using the Google AI Studio models with the new interface.
4
- */
5
- export declare const generateContent: GenerateContentFunction;
6
- export declare function internalGoogleGenerateContent(serviceType: 'ai-studio' | 'vertex-ai', prompt: PromptItem[], config: GenerateContentArgs[1], options?: GenerateContentArgs[2]): Promise<GenerateContentResult>;
@@ -1,460 +0,0 @@
1
- import { FunctionCallingConfigMode, GoogleGenAI, HarmBlockThreshold, HarmCategory, } from '@google/genai';
2
- import axios from 'axios';
3
- import assert from 'node:assert';
4
- import mime from 'mime-types';
5
- import { optimizeFunctionDefs, printTokenUsageAndCost } from './common.js';
6
- import { ModelType, } from './common-types.js';
7
- import { abortController } from '../main/common/abort-controller.js';
8
- import { unescapeFunctionCall } from './unescape-function-call.js';
9
- import { enableVertexUnescape } from '../cli/cli-params.js';
10
- import { getServiceConfig, getModelSettings } from './service-configurations.js';
11
- /**
12
- * This function generates content using the Google AI Studio models with the new interface.
13
- */
14
- export const generateContent = async function generateContent(...args) {
15
- const [prompt, config, options = {}] = args;
16
- return internalGoogleGenerateContent('ai-studio', prompt, config, options);
17
- };
18
- export async function internalGoogleGenerateContent(serviceType, prompt, config, options = {}) {
19
- const modelType = config.modelType ?? ModelType.DEFAULT;
20
- const temperature = config.temperature ?? 0.7;
21
- const functionDefs = optimizeFunctionDefs(prompt, config.functionDefs, config.requiredFunctionName ?? undefined);
22
- const requiredFunctionName = config.requiredFunctionName ?? null;
23
- const expectedResponseType = config.expectedResponseType ?? {
24
- text: false,
25
- functionCall: true,
26
- media: false,
27
- };
28
- const messages = prompt
29
- .filter((item) => item.type === 'user' || item.type === 'assistant')
30
- .map((item) => {
31
- if (item.type === 'user') {
32
- const content = {
33
- role: 'user',
34
- parts: [
35
- ...(item.functionResponses ?? []).map((response) => ({
36
- functionResponse: {
37
- name: response.name,
38
- response: { name: response.name, content: response.content },
39
- },
40
- })),
41
- ...(item.images ?? []).map((image) => image.uri
42
- ? {
43
- fileData: {
44
- fileUri: image.uri,
45
- mimeType: image.mediaType,
46
- },
47
- }
48
- : {
49
- inlineData: {
50
- mimeType: image.mediaType,
51
- data: image.base64url,
52
- },
53
- }),
54
- ...(item.text ? [{ text: item.text }] : []),
55
- // Add file references for code execution if provided in config and this is the last user message
56
- ...(config.fileIds && config.fileIds.length > 0 && item === prompt[prompt.length - 1]
57
- ? config.fileIds.map((fileId) => {
58
- // Find metadata if available to get mimeType
59
- const fileMeta = config.uploadedFiles?.find((f) => f.fileId === fileId);
60
- // Gemini uses fileUri for uploaded files via File API
61
- // fileId here is expected to be the full resource name (files/xxxx) or uri
62
- return {
63
- fileData: {
64
- fileUri: fileId.startsWith('files/')
65
- ? `https://generativelanguage.googleapis.com/v1beta/${fileId}`
66
- : fileId,
67
- mimeType: fileMeta
68
- ? mime.lookup(fileMeta.filename) || 'application/octet-stream'
69
- : 'application/octet-stream',
70
- },
71
- };
72
- })
73
- : []),
74
- ],
75
- };
76
- return content;
77
- }
78
- else {
79
- assert(item.type === 'assistant');
80
- const content = {
81
- role: 'model',
82
- parts: [
83
- ...(item.text ? [{ text: item.text }] : []),
84
- ...(item.images ?? []).map((image) => image.uri
85
- ? {
86
- fileData: {
87
- mimeType: image.mediaType,
88
- fileUri: image.uri,
89
- },
90
- }
91
- : {
92
- inlineData: {
93
- mimeType: image.mediaType,
94
- data: image.base64url,
95
- },
96
- }),
97
- ...(item.functionCalls ?? []).map((call) => ({
98
- functionCall: {
99
- name: call.name,
100
- args: call.args ?? {},
101
- },
102
- // https://docs.cloud.google.com/vertex-ai/generative-ai/docs/thought-signatures
103
- thoughtSignature: 'skip_thought_signature_validator',
104
- })),
105
- ...(item.executableCode
106
- ? [
107
- {
108
- executableCode: {
109
- language: item.executableCode.language,
110
- code: item.executableCode.code,
111
- },
112
- },
113
- ]
114
- : []),
115
- ...(item.codeExecutionResult
116
- ? [
117
- {
118
- codeExecutionResult: {
119
- outcome: item.codeExecutionResult.outcome,
120
- output: item.codeExecutionResult.output,
121
- },
122
- },
123
- ]
124
- : []),
125
- ],
126
- };
127
- return content;
128
- }
129
- });
130
- const req = {
131
- contents: messages,
132
- model: '',
133
- config: {},
134
- };
135
- if (functionDefs.length > 0) {
136
- req.config.tools = [
137
- {
138
- functionDeclarations: JSON.parse(JSON.stringify(functionDefs)),
139
- },
140
- ];
141
- }
142
- if (expectedResponseType.functionCall !== false) {
143
- req.config.toolConfig = {
144
- functionCallingConfig: {
145
- mode: FunctionCallingConfigMode.ANY,
146
- ...(requiredFunctionName ? { allowedFunctionNames: [requiredFunctionName] } : {}),
147
- },
148
- };
149
- }
150
- else if (expectedResponseType.functionCall === false) {
151
- req.config.toolConfig = {
152
- functionCallingConfig: {
153
- mode: FunctionCallingConfigMode.NONE,
154
- allowedFunctionNames: [],
155
- },
156
- };
157
- }
158
- if (expectedResponseType.webSearch) {
159
- req.config.tools = [
160
- {
161
- googleSearch: {},
162
- },
163
- ];
164
- delete req.config.toolConfig;
165
- }
166
- if (expectedResponseType.codeExecution) {
167
- req.config.tools = [
168
- ...(req.config.tools ?? []),
169
- {
170
- codeExecution: {},
171
- },
172
- ];
173
- // Code execution usually works best without forced function calling mode restrictions,
174
- // or at least it needs to be allowed.
175
- // If functionCall is false, we already set mode to NONE, which might block code execution tool use?
176
- // Actually, codeExecution is a tool. If mode is NONE, tools are disabled.
177
- // So if codeExecution is requested, we should probably ensure tool use is allowed.
178
- if (expectedResponseType.functionCall === false) {
179
- // If the user explicitly disabled function calls but enabled code execution,
180
- // we should probably allow tools but maybe restrict to code execution?
181
- // For now, let's assume if codeExecution is true, we don't force NONE.
182
- // But the logic above sets NONE if functionCall is false.
183
- // Let's override it if codeExecution is true.
184
- if (req.config.toolConfig?.functionCallingConfig?.mode === FunctionCallingConfigMode.NONE) {
185
- delete req.config.toolConfig;
186
- }
187
- }
188
- }
189
- const result = await internalGoogleModelsCall(serviceType, modelType, temperature, prompt.find((item) => item.type === 'systemPrompt')?.systemPrompt, options.geminiBlockNone, req);
190
- // Print token usage
191
- const usageMetadata = result.usageMetadata;
192
- const usage = {
193
- inputTokens: usageMetadata.promptTokenCount,
194
- outputTokens: usageMetadata.candidatesTokenCount,
195
- totalTokens: usageMetadata.totalTokenCount,
196
- thinkingTokens: usageMetadata.thoughtsTokenCount,
197
- cacheReadTokens: usageMetadata.cachedContentTokenCount,
198
- };
199
- printTokenUsageAndCost({
200
- aiService: serviceType,
201
- usage,
202
- inputCostPerToken: 0.000125 / 1000,
203
- outputCostPerToken: 0.000375 / 1000,
204
- modelType,
205
- });
206
- if (result.promptFeedback) {
207
- console.log('Prompt feedback:');
208
- console.log(JSON.stringify(result.promptFeedback, null, 2));
209
- }
210
- if (!result.candidates?.length) {
211
- console.log('Response:', result);
212
- throw new Error('No candidates found');
213
- }
214
- const functionCalls = result.candidates
215
- .map((candidate) => candidate.content?.parts?.map((part) => part.functionCall))
216
- .flat()
217
- .filter((functionCall) => !!functionCall)
218
- .map((call) => ({
219
- name: call.name,
220
- args: call.args,
221
- }))
222
- .map(!enableVertexUnescape ? (call) => call : unescapeFunctionCall);
223
- // Prepare the result parts array
224
- const resultParts = [];
225
- // Add function calls to result parts if they exist
226
- if (functionCalls.length > 0) {
227
- functionCalls.forEach((call) => {
228
- resultParts.push({
229
- type: 'functionCall',
230
- functionCall: call,
231
- });
232
- });
233
- }
234
- // Handle text response if no function calls were returned
235
- if (functionCalls.length === 0 && expectedResponseType.text !== true && expectedResponseType.functionCall === true) {
236
- const textResponse = result.candidates
237
- .map((candidate) => candidate.content?.parts?.map((part) => part.text))
238
- .flat()
239
- .filter((text) => !!text)[0] ??
240
- result.candidates.map((candidate) => candidate.finishReason === 'MALFORMED_FUNCTION_CALL' ? candidate.finishMessage : '')[0];
241
- if (textResponse) {
242
- resultParts.push({
243
- type: 'text',
244
- text: textResponse,
245
- });
246
- // Try to recover function call from text if required function name is provided
247
- const functionDef = functionDefs.find((def) => def.name === requiredFunctionName);
248
- if (functionDef) {
249
- try {
250
- const recoveredCall = await recoverFunctionCall(serviceType, textResponse, [], functionDef);
251
- if (recoveredCall) {
252
- console.log('Recovered function call.');
253
- // The recovered call will be added to the functionCalls array by the recoverFunctionCall function
254
- // We need to add it to resultParts as well
255
- resultParts.push({
256
- type: 'functionCall',
257
- functionCall: {
258
- name: functionDef.name,
259
- args: recoveredCall,
260
- },
261
- });
262
- }
263
- }
264
- catch (error) {
265
- console.log('Failed to recover function call:', error);
266
- }
267
- }
268
- }
269
- }
270
- if (expectedResponseType.text) {
271
- for (const candidate of result.candidates) {
272
- for (const part of candidate.content?.parts ?? []) {
273
- if (part.text && !part.thought) {
274
- resultParts.push({
275
- type: 'text',
276
- text: part.text,
277
- });
278
- }
279
- }
280
- }
281
- }
282
- if (expectedResponseType.webSearch) {
283
- for (const candidate of result.candidates) {
284
- const urls = {};
285
- for (const chunk of candidate.groundingMetadata?.groundingChunks ?? []) {
286
- if (chunk.web?.uri) {
287
- let url = chunk.web?.uri;
288
- try {
289
- const res = await axios.get(url);
290
- if (res.request.res.responseUrl) {
291
- url = res.request.res.responseUrl;
292
- }
293
- else if (res.status !== 200) {
294
- continue;
295
- }
296
- }
297
- catch (e) {
298
- if (axios.isAxiosError(e) && e.response?.request.res.responseUrl) {
299
- url = e.response.request.res.responseUrl;
300
- }
301
- else {
302
- continue;
303
- }
304
- }
305
- urls[url] = true;
306
- }
307
- }
308
- const text = candidate.content?.parts
309
- ?.filter((part) => part.text && !part.thought)
310
- .map((part) => part.text)
311
- .join('');
312
- if (text) {
313
- resultParts.push({
314
- type: 'webSearch',
315
- text: text,
316
- urls: Object.keys(urls),
317
- });
318
- }
319
- }
320
- }
321
- // Handle code execution parts
322
- for (const candidate of result.candidates) {
323
- for (const part of candidate.content?.parts ?? []) {
324
- if (part.executableCode) {
325
- resultParts.push({
326
- type: 'executableCode',
327
- code: part.executableCode.code,
328
- language: part.executableCode.language,
329
- });
330
- }
331
- if (part.codeExecutionResult) {
332
- resultParts.push({
333
- type: 'codeExecutionResult',
334
- outcome: part.codeExecutionResult.outcome,
335
- output: part.codeExecutionResult.output,
336
- // Note: Gemini API currently returns inline images or files as separate parts or within the output text/artifacts.
337
- // If the API evolves to return structured output files in codeExecutionResult, we should map them here.
338
- // For now, inline images might appear as separate parts with mimeType image/*.
339
- });
340
- }
341
- }
342
- }
343
- return resultParts;
344
- }
345
- function internalGoogleModelsCall(serviceType, modelType, temperature, systemPrompt, geminiBlockNone, { contents, config }) {
346
- const serviceConfig = getServiceConfig(serviceType);
347
- assert(serviceType === 'vertex-ai' ? serviceConfig.googleCloudProjectId : serviceConfig.apiKey, serviceType === 'vertex-ai'
348
- ? 'Google Cloud Project ID not configured.'
349
- : 'API key not configured, use API_KEY environment variable');
350
- const genAI = serviceType === 'vertex-ai'
351
- ? new GoogleGenAI({
352
- vertexai: true,
353
- project: serviceConfig.googleCloudProjectId,
354
- location: serviceConfig.googleCloudRegion ?? 'global',
355
- })
356
- : new GoogleGenAI({ apiKey: serviceConfig.apiKey });
357
- // Determine the model name based on model type
358
- const model = (() => {
359
- switch (modelType) {
360
- case ModelType.CHEAP:
361
- return serviceConfig.modelOverrides?.cheap ?? 'gemini-2.5-flash';
362
- case ModelType.LITE:
363
- return serviceConfig.modelOverrides?.lite ?? 'gemini-2.5-flash-lite';
364
- default:
365
- return serviceConfig.modelOverrides?.default ?? 'gemini-2.5-pro';
366
- }
367
- })();
368
- console.log(`Using ${serviceType === 'vertex-ai' ? 'Vertex AI' : 'AI Studio'} model: ${model}`);
369
- // Get model-specific settings
370
- const { systemInstruction: modelSystemInstruction, outputTokenLimit, thinkingEnabled, thinkingBudget, } = getModelSettings(serviceType, model);
371
- // Combine base system prompt with model-specific instructions if available
372
- let effectiveSystemPrompt = systemPrompt || '';
373
- if (modelSystemInstruction?.length) {
374
- effectiveSystemPrompt += `\n${modelSystemInstruction.join('\n')}`;
375
- }
376
- const effectiveConfig = Object.assign({
377
- maxOutputTokens: outputTokenLimit,
378
- temperature,
379
- topP: 0.95,
380
- }, config);
381
- if (typeof thinkingEnabled === 'boolean') {
382
- effectiveConfig.thinkingConfig = {
383
- thinkingBudget: thinkingEnabled ? -1 : 0,
384
- };
385
- if (thinkingBudget) {
386
- effectiveConfig.thinkingConfig.thinkingBudget = thinkingBudget;
387
- }
388
- }
389
- return genAI.models.generateContent({
390
- model,
391
- config: {
392
- abortSignal: abortController?.signal,
393
- safetySettings: [
394
- {
395
- category: HarmCategory.HARM_CATEGORY_HATE_SPEECH,
396
- threshold: geminiBlockNone ? HarmBlockThreshold.BLOCK_NONE : HarmBlockThreshold.BLOCK_ONLY_HIGH,
397
- },
398
- {
399
- category: HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT,
400
- threshold: geminiBlockNone ? HarmBlockThreshold.BLOCK_NONE : HarmBlockThreshold.BLOCK_ONLY_HIGH,
401
- },
402
- {
403
- category: HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT,
404
- threshold: geminiBlockNone ? HarmBlockThreshold.BLOCK_NONE : HarmBlockThreshold.BLOCK_ONLY_HIGH,
405
- },
406
- {
407
- category: HarmCategory.HARM_CATEGORY_HARASSMENT,
408
- threshold: geminiBlockNone ? HarmBlockThreshold.BLOCK_NONE : HarmBlockThreshold.BLOCK_ONLY_HIGH,
409
- },
410
- ],
411
- ...effectiveConfig,
412
- ...(effectiveSystemPrompt
413
- ? {
414
- systemInstruction: {
415
- role: 'system',
416
- parts: [
417
- {
418
- text: effectiveSystemPrompt,
419
- },
420
- ],
421
- },
422
- }
423
- : {}),
424
- },
425
- contents,
426
- });
427
- }
428
- async function recoverFunctionCall(serviceType, textResponse, functionCalls, functionDef) {
429
- console.log('Recovering function call');
430
- const schema = functionDef.parameters;
431
- const result = await internalGoogleModelsCall(serviceType, ModelType.DEFAULT, // Always use default model for recovery attempts
432
- 0.2, 'Your role is read the text below and if possible, return it in the desired format.', undefined, {
433
- contents: [
434
- {
435
- role: 'user',
436
- parts: [
437
- {
438
- text: textResponse,
439
- },
440
- ],
441
- },
442
- ],
443
- config: {
444
- responseMimeType: 'application/json',
445
- responseSchema: schema,
446
- },
447
- });
448
- try {
449
- const parsed = JSON.parse(result.text);
450
- const functionCall = enableVertexUnescape
451
- ? unescapeFunctionCall({ name: functionDef.name, args: parsed })
452
- : { name: functionDef.name, args: parsed };
453
- functionCalls.push(functionCall);
454
- return parsed;
455
- }
456
- catch {
457
- return false;
458
- }
459
- }
460
- //# sourceMappingURL=ai-studio.js.map