codebuff 1.0.334 → 1.0.335

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 (379) hide show
  1. package/index.js +334 -0
  2. package/package.json +23 -72
  3. package/dist/__tests__/display.test.d.ts +0 -1
  4. package/dist/__tests__/display.test.js +0 -174
  5. package/dist/__tests__/display.test.js.map +0 -1
  6. package/dist/__tests__/rage-detectors.test.d.ts +0 -1
  7. package/dist/__tests__/rage-detectors.test.js +0 -127
  8. package/dist/__tests__/rage-detectors.test.js.map +0 -1
  9. package/dist/background-process-manager.d.ts +0 -50
  10. package/dist/background-process-manager.js +0 -364
  11. package/dist/background-process-manager.js.map +0 -1
  12. package/dist/browser-runner.d.ts +0 -35
  13. package/dist/browser-runner.js +0 -689
  14. package/dist/browser-runner.js.map +0 -1
  15. package/dist/chat-storage.d.ts +0 -2
  16. package/dist/chat-storage.js +0 -98
  17. package/dist/chat-storage.js.map +0 -1
  18. package/dist/checkpoints/checkpoint-manager.d.ts +0 -94
  19. package/dist/checkpoints/checkpoint-manager.js +0 -291
  20. package/dist/checkpoints/checkpoint-manager.js.map +0 -1
  21. package/dist/checkpoints/file-manager.d.ts +0 -72
  22. package/dist/checkpoints/file-manager.js +0 -498
  23. package/dist/checkpoints/file-manager.js.map +0 -1
  24. package/dist/cli-definitions.d.ts +0 -9
  25. package/dist/cli-definitions.js +0 -60
  26. package/dist/cli-definitions.js.map +0 -1
  27. package/dist/cli-handlers/api-key.d.ts +0 -25
  28. package/dist/cli-handlers/api-key.js +0 -66
  29. package/dist/cli-handlers/api-key.js.map +0 -1
  30. package/dist/cli-handlers/checkpoint.d.ts +0 -19
  31. package/dist/cli-handlers/checkpoint.js +0 -221
  32. package/dist/cli-handlers/checkpoint.js.map +0 -1
  33. package/dist/cli-handlers/diff.d.ts +0 -2
  34. package/dist/cli-handlers/diff.js +0 -31
  35. package/dist/cli-handlers/diff.js.map +0 -1
  36. package/dist/cli-handlers/easter-egg.d.ts +0 -1
  37. package/dist/cli-handlers/easter-egg.js +0 -126
  38. package/dist/cli-handlers/easter-egg.js.map +0 -1
  39. package/dist/cli-handlers/inititalization-flow.d.ts +0 -1
  40. package/dist/cli-handlers/inititalization-flow.js +0 -25
  41. package/dist/cli-handlers/inititalization-flow.js.map +0 -1
  42. package/dist/cli.d.ts +0 -67
  43. package/dist/cli.js +0 -812
  44. package/dist/cli.js.map +0 -1
  45. package/dist/client.d.ts +0 -91
  46. package/dist/client.js +0 -1112
  47. package/dist/client.js.map +0 -1
  48. package/dist/code-map/languages.d.ts +0 -12
  49. package/dist/code-map/languages.d.ts.map +0 -1
  50. package/dist/code-map/languages.js +0 -130
  51. package/dist/code-map/languages.js.map +0 -1
  52. package/dist/code-map/parse.d.ts +0 -22
  53. package/dist/code-map/parse.d.ts.map +0 -1
  54. package/dist/code-map/parse.js +0 -180
  55. package/dist/code-map/parse.js.map +0 -1
  56. package/dist/code-map/tree-sitter-queries/readme.md +0 -23
  57. package/dist/code-map/tree-sitter-queries/tree-sitter-c-tags.scm +0 -16
  58. package/dist/code-map/tree-sitter-queries/tree-sitter-c_sharp-tags.scm +0 -23
  59. package/dist/code-map/tree-sitter-queries/tree-sitter-cpp-tags.scm +0 -29
  60. package/dist/code-map/tree-sitter-queries/tree-sitter-go-tags.scm +0 -26
  61. package/dist/code-map/tree-sitter-queries/tree-sitter-java-tags.scm +0 -19
  62. package/dist/code-map/tree-sitter-queries/tree-sitter-javascript-tags.scm +0 -16
  63. package/dist/code-map/tree-sitter-queries/tree-sitter-php-tags.scm +0 -23
  64. package/dist/code-map/tree-sitter-queries/tree-sitter-python-tags.scm +0 -12
  65. package/dist/code-map/tree-sitter-queries/tree-sitter-ruby-tags.scm +0 -58
  66. package/dist/code-map/tree-sitter-queries/tree-sitter-rust-tags.scm +0 -26
  67. package/dist/code-map/tree-sitter-queries/tree-sitter-typescript-tags.scm +0 -22
  68. package/dist/code-map/tsconfig.tsbuildinfo +0 -1
  69. package/dist/common/actions.d.ts +0 -1809
  70. package/dist/common/actions.d.ts.map +0 -1
  71. package/dist/common/actions.js +0 -140
  72. package/dist/common/actions.js.map +0 -1
  73. package/dist/common/analytics.d.ts +0 -6
  74. package/dist/common/analytics.d.ts.map +0 -1
  75. package/dist/common/analytics.js +0 -60
  76. package/dist/common/analytics.js.map +0 -1
  77. package/dist/common/api-keys/constants.d.ts +0 -9
  78. package/dist/common/api-keys/constants.d.ts.map +0 -1
  79. package/dist/common/api-keys/constants.js +0 -26
  80. package/dist/common/api-keys/constants.js.map +0 -1
  81. package/dist/common/api-keys/crypto.d.ts +0 -25
  82. package/dist/common/api-keys/crypto.d.ts.map +0 -1
  83. package/dist/common/api-keys/crypto.js +0 -186
  84. package/dist/common/api-keys/crypto.js.map +0 -1
  85. package/dist/common/browser-actions.d.ts +0 -4416
  86. package/dist/common/browser-actions.d.ts.map +0 -1
  87. package/dist/common/browser-actions.js +0 -343
  88. package/dist/common/browser-actions.js.map +0 -1
  89. package/dist/common/constants/analytics-events.d.ts +0 -31
  90. package/dist/common/constants/analytics-events.d.ts.map +0 -1
  91. package/dist/common/constants/analytics-events.js +0 -39
  92. package/dist/common/constants/analytics-events.js.map +0 -1
  93. package/dist/common/constants/grant-priorities.d.ts +0 -3
  94. package/dist/common/constants/grant-priorities.d.ts.map +0 -1
  95. package/dist/common/constants/grant-priorities.js +0 -11
  96. package/dist/common/constants/grant-priorities.js.map +0 -1
  97. package/dist/common/constants/tools.d.ts +0 -19
  98. package/dist/common/constants/tools.d.ts.map +0 -1
  99. package/dist/common/constants/tools.js +0 -45
  100. package/dist/common/constants/tools.js.map +0 -1
  101. package/dist/common/constants.d.ts +0 -149
  102. package/dist/common/constants.d.ts.map +0 -1
  103. package/dist/common/constants.js +0 -234
  104. package/dist/common/constants.js.map +0 -1
  105. package/dist/common/db/drizzle.config.d.ts +0 -3
  106. package/dist/common/db/drizzle.config.d.ts.map +0 -1
  107. package/dist/common/db/drizzle.config.js +0 -17
  108. package/dist/common/db/drizzle.config.js.map +0 -1
  109. package/dist/common/db/index.d.ts +0 -7
  110. package/dist/common/db/index.d.ts.map +0 -1
  111. package/dist/common/db/index.js +0 -35
  112. package/dist/common/db/index.js.map +0 -1
  113. package/dist/common/db/schema.d.ts +0 -2449
  114. package/dist/common/db/schema.d.ts.map +0 -1
  115. package/dist/common/db/schema.js +0 -310
  116. package/dist/common/db/schema.js.map +0 -1
  117. package/dist/common/db/transaction.d.ts +0 -13
  118. package/dist/common/db/transaction.d.ts.map +0 -1
  119. package/dist/common/db/transaction.js +0 -36
  120. package/dist/common/db/transaction.js.map +0 -1
  121. package/dist/common/json-config/__tests__/__snapshots__/stringify-schema.test.js.snap +0 -144
  122. package/dist/common/json-config/__tests__/constants.test.d.ts +0 -2
  123. package/dist/common/json-config/__tests__/constants.test.d.ts.map +0 -1
  124. package/dist/common/json-config/__tests__/constants.test.js +0 -273
  125. package/dist/common/json-config/__tests__/constants.test.js.map +0 -1
  126. package/dist/common/json-config/__tests__/stringify-schema.test.d.ts +0 -2
  127. package/dist/common/json-config/__tests__/stringify-schema.test.d.ts.map +0 -1
  128. package/dist/common/json-config/__tests__/stringify-schema.test.js +0 -66
  129. package/dist/common/json-config/__tests__/stringify-schema.test.js.map +0 -1
  130. package/dist/common/json-config/constants.d.ts +0 -138
  131. package/dist/common/json-config/constants.d.ts.map +0 -1
  132. package/dist/common/json-config/constants.js +0 -78
  133. package/dist/common/json-config/constants.js.map +0 -1
  134. package/dist/common/json-config/default.d.ts +0 -3
  135. package/dist/common/json-config/default.d.ts.map +0 -1
  136. package/dist/common/json-config/default.js +0 -12
  137. package/dist/common/json-config/default.js.map +0 -1
  138. package/dist/common/json-config/stringify-schema.d.ts +0 -10
  139. package/dist/common/json-config/stringify-schema.d.ts.map +0 -1
  140. package/dist/common/json-config/stringify-schema.js +0 -131
  141. package/dist/common/json-config/stringify-schema.js.map +0 -1
  142. package/dist/common/project-file-tree.d.ts +0 -12
  143. package/dist/common/project-file-tree.d.ts.map +0 -1
  144. package/dist/common/project-file-tree.js +0 -212
  145. package/dist/common/project-file-tree.js.map +0 -1
  146. package/dist/common/types/agent-state.d.ts +0 -265
  147. package/dist/common/types/agent-state.d.ts.map +0 -1
  148. package/dist/common/types/agent-state.js +0 -48
  149. package/dist/common/types/agent-state.js.map +0 -1
  150. package/dist/common/types/grant.d.ts +0 -3
  151. package/dist/common/types/grant.d.ts.map +0 -1
  152. package/dist/common/types/grant.js +0 -11
  153. package/dist/common/types/grant.js.map +0 -1
  154. package/dist/common/types/message.d.ts +0 -320
  155. package/dist/common/types/message.d.ts.map +0 -1
  156. package/dist/common/types/message.js +0 -60
  157. package/dist/common/types/message.js.map +0 -1
  158. package/dist/common/types/organization.d.ts +0 -106
  159. package/dist/common/types/organization.d.ts.map +0 -1
  160. package/dist/common/types/organization.js +0 -3
  161. package/dist/common/types/organization.js.map +0 -1
  162. package/dist/common/types/referral.d.ts +0 -3
  163. package/dist/common/types/referral.d.ts.map +0 -1
  164. package/dist/common/types/referral.js +0 -5
  165. package/dist/common/types/referral.js.map +0 -1
  166. package/dist/common/types/tools.d.ts +0 -6
  167. package/dist/common/types/tools.d.ts.map +0 -1
  168. package/dist/common/types/tools.js +0 -3
  169. package/dist/common/types/tools.js.map +0 -1
  170. package/dist/common/types/usage.d.ts +0 -41
  171. package/dist/common/types/usage.d.ts.map +0 -1
  172. package/dist/common/types/usage.js +0 -16
  173. package/dist/common/types/usage.js.map +0 -1
  174. package/dist/common/util/__tests__/messages.test.d.ts +0 -2
  175. package/dist/common/util/__tests__/messages.test.d.ts.map +0 -1
  176. package/dist/common/util/__tests__/messages.test.js +0 -70
  177. package/dist/common/util/__tests__/messages.test.js.map +0 -1
  178. package/dist/common/util/__tests__/saxy.test.d.ts +0 -2
  179. package/dist/common/util/__tests__/saxy.test.d.ts.map +0 -1
  180. package/dist/common/util/__tests__/saxy.test.js +0 -906
  181. package/dist/common/util/__tests__/saxy.test.js.map +0 -1
  182. package/dist/common/util/__tests__/string.test.d.ts +0 -2
  183. package/dist/common/util/__tests__/string.test.d.ts.map +0 -1
  184. package/dist/common/util/__tests__/string.test.js +0 -82
  185. package/dist/common/util/__tests__/string.test.js.map +0 -1
  186. package/dist/common/util/array.d.ts +0 -7
  187. package/dist/common/util/array.d.ts.map +0 -1
  188. package/dist/common/util/array.js +0 -32
  189. package/dist/common/util/array.js.map +0 -1
  190. package/dist/common/util/changes.d.ts +0 -9
  191. package/dist/common/util/changes.d.ts.map +0 -1
  192. package/dist/common/util/changes.js +0 -87
  193. package/dist/common/util/changes.js.map +0 -1
  194. package/dist/common/util/credentials.d.ts +0 -26
  195. package/dist/common/util/credentials.d.ts.map +0 -1
  196. package/dist/common/util/credentials.js +0 -24
  197. package/dist/common/util/credentials.js.map +0 -1
  198. package/dist/common/util/currency.d.ts +0 -15
  199. package/dist/common/util/currency.d.ts.map +0 -1
  200. package/dist/common/util/currency.js +0 -23
  201. package/dist/common/util/currency.js.map +0 -1
  202. package/dist/common/util/dates.d.ts +0 -11
  203. package/dist/common/util/dates.d.ts.map +0 -1
  204. package/dist/common/util/dates.js +0 -22
  205. package/dist/common/util/dates.js.map +0 -1
  206. package/dist/common/util/file.d.ts +0 -171
  207. package/dist/common/util/file.d.ts.map +0 -1
  208. package/dist/common/util/file.js +0 -216
  209. package/dist/common/util/file.js.map +0 -1
  210. package/dist/common/util/git.d.ts +0 -7
  211. package/dist/common/util/git.d.ts.map +0 -1
  212. package/dist/common/util/git.js +0 -81
  213. package/dist/common/util/git.js.map +0 -1
  214. package/dist/common/util/logger.d.ts +0 -9
  215. package/dist/common/util/logger.d.ts.map +0 -1
  216. package/dist/common/util/logger.js +0 -52
  217. package/dist/common/util/logger.js.map +0 -1
  218. package/dist/common/util/lru-cache.d.ts +0 -31
  219. package/dist/common/util/lru-cache.d.ts.map +0 -1
  220. package/dist/common/util/lru-cache.js +0 -68
  221. package/dist/common/util/lru-cache.js.map +0 -1
  222. package/dist/common/util/messages.d.ts +0 -12
  223. package/dist/common/util/messages.d.ts.map +0 -1
  224. package/dist/common/util/messages.js +0 -81
  225. package/dist/common/util/messages.js.map +0 -1
  226. package/dist/common/util/min-heap.d.ts +0 -16
  227. package/dist/common/util/min-heap.d.ts.map +0 -1
  228. package/dist/common/util/min-heap.js +0 -73
  229. package/dist/common/util/min-heap.js.map +0 -1
  230. package/dist/common/util/object.d.ts +0 -19
  231. package/dist/common/util/object.d.ts.map +0 -1
  232. package/dist/common/util/object.js +0 -91
  233. package/dist/common/util/object.js.map +0 -1
  234. package/dist/common/util/patch.d.ts +0 -2
  235. package/dist/common/util/patch.d.ts.map +0 -1
  236. package/dist/common/util/patch.js +0 -215
  237. package/dist/common/util/patch.js.map +0 -1
  238. package/dist/common/util/promise.d.ts +0 -17
  239. package/dist/common/util/promise.d.ts.map +0 -1
  240. package/dist/common/util/promise.js +0 -51
  241. package/dist/common/util/promise.js.map +0 -1
  242. package/dist/common/util/random.d.ts +0 -2
  243. package/dist/common/util/random.d.ts.map +0 -1
  244. package/dist/common/util/random.js +0 -17
  245. package/dist/common/util/random.js.map +0 -1
  246. package/dist/common/util/referral.d.ts +0 -2
  247. package/dist/common/util/referral.d.ts.map +0 -1
  248. package/dist/common/util/referral.js +0 -6
  249. package/dist/common/util/referral.js.map +0 -1
  250. package/dist/common/util/saxy.d.ts +0 -179
  251. package/dist/common/util/saxy.d.ts.map +0 -1
  252. package/dist/common/util/saxy.js +0 -548
  253. package/dist/common/util/saxy.js.map +0 -1
  254. package/dist/common/util/string.d.ts +0 -80
  255. package/dist/common/util/string.d.ts.map +0 -1
  256. package/dist/common/util/string.js +0 -275
  257. package/dist/common/util/string.js.map +0 -1
  258. package/dist/common/util/stripe.d.ts +0 -4
  259. package/dist/common/util/stripe.d.ts.map +0 -1
  260. package/dist/common/util/stripe.js +0 -22
  261. package/dist/common/util/stripe.js.map +0 -1
  262. package/dist/common/util/sync-failure.d.ts +0 -2
  263. package/dist/common/util/sync-failure.d.ts.map +0 -1
  264. package/dist/common/util/sync-failure.js +0 -57
  265. package/dist/common/util/sync-failure.js.map +0 -1
  266. package/dist/common/websockets/websocket-client.d.ts +0 -43
  267. package/dist/common/websockets/websocket-client.d.ts.map +0 -1
  268. package/dist/common/websockets/websocket-client.js +0 -216
  269. package/dist/common/websockets/websocket-client.js.map +0 -1
  270. package/dist/common/websockets/websocket-schema.d.ts +0 -3679
  271. package/dist/common/websockets/websocket-schema.d.ts.map +0 -1
  272. package/dist/common/websockets/websocket-schema.js +0 -55
  273. package/dist/common/websockets/websocket-schema.js.map +0 -1
  274. package/dist/config.d.ts +0 -4
  275. package/dist/config.js +0 -12
  276. package/dist/config.js.map +0 -1
  277. package/dist/create-template-project.d.ts +0 -1
  278. package/dist/create-template-project.js +0 -131
  279. package/dist/create-template-project.js.map +0 -1
  280. package/dist/credentials.d.ts +0 -4
  281. package/dist/credentials.js +0 -44
  282. package/dist/credentials.js.map +0 -1
  283. package/dist/dev-process-manager.d.ts +0 -10
  284. package/dist/dev-process-manager.js +0 -56
  285. package/dist/dev-process-manager.js.map +0 -1
  286. package/dist/display.d.ts +0 -9
  287. package/dist/display.js +0 -137
  288. package/dist/display.js.map +0 -1
  289. package/dist/fingerprint.d.ts +0 -1
  290. package/dist/fingerprint.js +0 -48
  291. package/dist/fingerprint.js.map +0 -1
  292. package/dist/index.d.ts +0 -2
  293. package/dist/index.js +0 -128
  294. package/dist/index.js.map +0 -1
  295. package/dist/json-config/hooks.d.ts +0 -9
  296. package/dist/json-config/hooks.js +0 -60
  297. package/dist/json-config/hooks.js.map +0 -1
  298. package/dist/json-config/parser.d.ts +0 -7
  299. package/dist/json-config/parser.js +0 -54
  300. package/dist/json-config/parser.js.map +0 -1
  301. package/dist/menu.d.ts +0 -14
  302. package/dist/menu.js +0 -344
  303. package/dist/menu.js.map +0 -1
  304. package/dist/project-files.d.ts +0 -104
  305. package/dist/project-files.js +0 -621
  306. package/dist/project-files.js.map +0 -1
  307. package/dist/rage-detectors.d.ts +0 -15
  308. package/dist/rage-detectors.js +0 -55
  309. package/dist/rage-detectors.js.map +0 -1
  310. package/dist/startup-process-handler.d.ts +0 -1
  311. package/dist/startup-process-handler.js +0 -25
  312. package/dist/startup-process-handler.js.map +0 -1
  313. package/dist/terminal/background.d.ts +0 -12
  314. package/dist/terminal/background.js +0 -148
  315. package/dist/terminal/background.js.map +0 -1
  316. package/dist/terminal/base.d.ts +0 -41
  317. package/dist/terminal/base.js +0 -553
  318. package/dist/terminal/base.js.map +0 -1
  319. package/dist/tool-handlers.d.ts +0 -31
  320. package/dist/tool-handlers.js +0 -275
  321. package/dist/tool-handlers.js.map +0 -1
  322. package/dist/types.d.ts +0 -15
  323. package/dist/types.js +0 -3
  324. package/dist/types.js.map +0 -1
  325. package/dist/update-codebuff.d.ts +0 -1
  326. package/dist/update-codebuff.js +0 -169
  327. package/dist/update-codebuff.js.map +0 -1
  328. package/dist/utils/__tests__/background-process-manager.test.d.ts +0 -1
  329. package/dist/utils/__tests__/background-process-manager.test.js +0 -326
  330. package/dist/utils/__tests__/background-process-manager.test.js.map +0 -1
  331. package/dist/utils/__tests__/rage-detector.test.d.ts +0 -1
  332. package/dist/utils/__tests__/rage-detector.test.js +0 -450
  333. package/dist/utils/__tests__/rage-detector.test.js.map +0 -1
  334. package/dist/utils/__tests__/response-example-4-files.txt +0 -621
  335. package/dist/utils/__tests__/tool-renderers.test.d.ts +0 -1
  336. package/dist/utils/__tests__/tool-renderers.test.js +0 -83
  337. package/dist/utils/__tests__/tool-renderers.test.js.map +0 -1
  338. package/dist/utils/__tests__/xml-stream-parser.test.d.ts +0 -1
  339. package/dist/utils/__tests__/xml-stream-parser.test.js +0 -255
  340. package/dist/utils/__tests__/xml-stream-parser.test.js.map +0 -1
  341. package/dist/utils/analytics.d.ts +0 -7
  342. package/dist/utils/analytics.js +0 -132
  343. package/dist/utils/analytics.js.map +0 -1
  344. package/dist/utils/detect-shell.d.ts +0 -1
  345. package/dist/utils/detect-shell.js +0 -65
  346. package/dist/utils/detect-shell.js.map +0 -1
  347. package/dist/utils/git.d.ts +0 -13
  348. package/dist/utils/git.js +0 -143
  349. package/dist/utils/git.js.map +0 -1
  350. package/dist/utils/logger.d.ts +0 -21
  351. package/dist/utils/logger.js +0 -109
  352. package/dist/utils/logger.js.map +0 -1
  353. package/dist/utils/rage-detector.d.ts +0 -32
  354. package/dist/utils/rage-detector.js +0 -143
  355. package/dist/utils/rage-detector.js.map +0 -1
  356. package/dist/utils/spinner.d.ts +0 -13
  357. package/dist/utils/spinner.js +0 -94
  358. package/dist/utils/spinner.js.map +0 -1
  359. package/dist/utils/system-info.d.ts +0 -8
  360. package/dist/utils/system-info.js +0 -22
  361. package/dist/utils/system-info.js.map +0 -1
  362. package/dist/utils/tool-renderers.d.ts +0 -16
  363. package/dist/utils/tool-renderers.js +0 -216
  364. package/dist/utils/tool-renderers.js.map +0 -1
  365. package/dist/utils/with-hang-detection.d.ts +0 -1
  366. package/dist/utils/with-hang-detection.js +0 -18
  367. package/dist/utils/with-hang-detection.js.map +0 -1
  368. package/dist/utils/xml-stream-parser.d.ts +0 -9
  369. package/dist/utils/xml-stream-parser.js +0 -143
  370. package/dist/utils/xml-stream-parser.js.map +0 -1
  371. package/dist/web-scraper.d.ts +0 -3
  372. package/dist/web-scraper.js +0 -59
  373. package/dist/web-scraper.js.map +0 -1
  374. package/dist/workers/checkpoint-worker.d.ts +0 -1
  375. package/dist/workers/checkpoint-worker.js +0 -51
  376. package/dist/workers/checkpoint-worker.js.map +0 -1
  377. package/dist/workers/project-context.d.ts +0 -1
  378. package/dist/workers/project-context.js +0 -27
  379. package/dist/workers/project-context.js.map +0 -1
@@ -1,1809 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const FileChangeSchema: z.ZodObject<{
3
- type: z.ZodEnum<["patch", "file"]>;
4
- path: z.ZodString;
5
- content: z.ZodString;
6
- }, "strip", z.ZodTypeAny, {
7
- path: string;
8
- type: "patch" | "file";
9
- content: string;
10
- }, {
11
- path: string;
12
- type: "patch" | "file";
13
- content: string;
14
- }>;
15
- export type FileChange = z.infer<typeof FileChangeSchema>;
16
- export declare const CHANGES: z.ZodArray<z.ZodObject<{
17
- type: z.ZodEnum<["patch", "file"]>;
18
- path: z.ZodString;
19
- content: z.ZodString;
20
- }, "strip", z.ZodTypeAny, {
21
- path: string;
22
- type: "patch" | "file";
23
- content: string;
24
- }, {
25
- path: string;
26
- type: "patch" | "file";
27
- content: string;
28
- }>, "many">;
29
- export type FileChanges = z.infer<typeof CHANGES>;
30
- export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
31
- type: z.ZodLiteral<"prompt">;
32
- promptId: z.ZodString;
33
- prompt: z.ZodUnion<[z.ZodString, z.ZodUndefined]>;
34
- fingerprintId: z.ZodString;
35
- authToken: z.ZodOptional<z.ZodString>;
36
- costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max", "experimental", "ask"]>>>;
37
- agentState: z.ZodObject<{
38
- agentContext: z.ZodString;
39
- fileContext: z.ZodObject<{
40
- projectRoot: z.ZodString;
41
- cwd: z.ZodString;
42
- fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
43
- fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
44
- tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
45
- knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
46
- userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
47
- gitChanges: z.ZodObject<{
48
- status: z.ZodString;
49
- diff: z.ZodString;
50
- diffCached: z.ZodString;
51
- lastCommitMessages: z.ZodString;
52
- }, "strip", z.ZodTypeAny, {
53
- status: string;
54
- diff: string;
55
- diffCached: string;
56
- lastCommitMessages: string;
57
- }, {
58
- status: string;
59
- diff: string;
60
- diffCached: string;
61
- lastCommitMessages: string;
62
- }>;
63
- changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
64
- shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
65
- systemInfo: z.ZodObject<{
66
- platform: z.ZodString;
67
- shell: z.ZodString;
68
- nodeVersion: z.ZodString;
69
- arch: z.ZodString;
70
- homedir: z.ZodString;
71
- cpus: z.ZodNumber;
72
- }, "strip", z.ZodTypeAny, {
73
- platform: string;
74
- shell: string;
75
- nodeVersion: string;
76
- arch: string;
77
- homedir: string;
78
- cpus: number;
79
- }, {
80
- platform: string;
81
- shell: string;
82
- nodeVersion: string;
83
- arch: string;
84
- homedir: string;
85
- cpus: number;
86
- }>;
87
- fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
88
- path: z.ZodString;
89
- content: z.ZodString;
90
- }, "strip", z.ZodTypeAny, {
91
- path: string;
92
- content: string;
93
- }, {
94
- path: string;
95
- content: string;
96
- }>, "many">, "many">>;
97
- }, "strip", z.ZodTypeAny, {
98
- projectRoot: string;
99
- cwd: string;
100
- fileTree: import("./util/file").FileTreeNode[];
101
- fileTokenScores: Record<string, Record<string, number>>;
102
- knowledgeFiles: Record<string, string>;
103
- gitChanges: {
104
- status: string;
105
- diff: string;
106
- diffCached: string;
107
- lastCommitMessages: string;
108
- };
109
- changesSinceLastChat: Record<string, string>;
110
- shellConfigFiles: Record<string, string>;
111
- systemInfo: {
112
- platform: string;
113
- shell: string;
114
- nodeVersion: string;
115
- arch: string;
116
- homedir: string;
117
- cpus: number;
118
- };
119
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
120
- userKnowledgeFiles?: Record<string, string> | undefined;
121
- fileVersions?: {
122
- path: string;
123
- content: string;
124
- }[][] | undefined;
125
- }, {
126
- projectRoot: string;
127
- cwd: string;
128
- fileTree: import("./util/file").FileTreeNode[];
129
- fileTokenScores: Record<string, Record<string, number>>;
130
- knowledgeFiles: Record<string, string>;
131
- gitChanges: {
132
- status: string;
133
- diff: string;
134
- diffCached: string;
135
- lastCommitMessages: string;
136
- };
137
- changesSinceLastChat: Record<string, string>;
138
- shellConfigFiles: Record<string, string>;
139
- systemInfo: {
140
- platform: string;
141
- shell: string;
142
- nodeVersion: string;
143
- arch: string;
144
- homedir: string;
145
- cpus: number;
146
- };
147
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
148
- userKnowledgeFiles?: Record<string, string> | undefined;
149
- fileVersions?: {
150
- path: string;
151
- content: string;
152
- }[][] | undefined;
153
- }>;
154
- messageHistory: z.ZodArray<z.ZodIntersection<z.ZodType<import("ai").CoreMessage, z.ZodTypeDef, import("ai").CoreMessage>, z.ZodObject<{
155
- timeToLive: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"agentStep">, z.ZodLiteral<"userPrompt">]>>;
156
- }, "strip", z.ZodTypeAny, {
157
- timeToLive?: "agentStep" | "userPrompt" | undefined;
158
- }, {
159
- timeToLive?: "agentStep" | "userPrompt" | undefined;
160
- }>>, "many">;
161
- agents: z.ZodDefault<z.ZodArray<z.ZodType<{
162
- agentId: string;
163
- agentName: import("./types/agent-state").AgentTemplateName;
164
- agents: import("./types/agent-state").SubagentState[];
165
- messageHistory: import("./types/message").CodebuffMessage[];
166
- }, z.ZodTypeDef, {
167
- agentId: string;
168
- agentName: import("./types/agent-state").AgentTemplateName;
169
- agents: import("./types/agent-state").SubagentState[];
170
- messageHistory: import("./types/message").CodebuffMessage[];
171
- }>, "many">>;
172
- agentStepsRemaining: z.ZodNumber;
173
- }, "strip", z.ZodTypeAny, {
174
- agentContext: string;
175
- fileContext: {
176
- projectRoot: string;
177
- cwd: string;
178
- fileTree: import("./util/file").FileTreeNode[];
179
- fileTokenScores: Record<string, Record<string, number>>;
180
- knowledgeFiles: Record<string, string>;
181
- gitChanges: {
182
- status: string;
183
- diff: string;
184
- diffCached: string;
185
- lastCommitMessages: string;
186
- };
187
- changesSinceLastChat: Record<string, string>;
188
- shellConfigFiles: Record<string, string>;
189
- systemInfo: {
190
- platform: string;
191
- shell: string;
192
- nodeVersion: string;
193
- arch: string;
194
- homedir: string;
195
- cpus: number;
196
- };
197
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
198
- userKnowledgeFiles?: Record<string, string> | undefined;
199
- fileVersions?: {
200
- path: string;
201
- content: string;
202
- }[][] | undefined;
203
- };
204
- messageHistory: (import("ai").CoreMessage & {
205
- timeToLive?: "agentStep" | "userPrompt" | undefined;
206
- })[];
207
- agents: {
208
- agentId: string;
209
- agentName: import("./types/agent-state").AgentTemplateName;
210
- agents: import("./types/agent-state").SubagentState[];
211
- messageHistory: import("./types/message").CodebuffMessage[];
212
- }[];
213
- agentStepsRemaining: number;
214
- }, {
215
- agentContext: string;
216
- fileContext: {
217
- projectRoot: string;
218
- cwd: string;
219
- fileTree: import("./util/file").FileTreeNode[];
220
- fileTokenScores: Record<string, Record<string, number>>;
221
- knowledgeFiles: Record<string, string>;
222
- gitChanges: {
223
- status: string;
224
- diff: string;
225
- diffCached: string;
226
- lastCommitMessages: string;
227
- };
228
- changesSinceLastChat: Record<string, string>;
229
- shellConfigFiles: Record<string, string>;
230
- systemInfo: {
231
- platform: string;
232
- shell: string;
233
- nodeVersion: string;
234
- arch: string;
235
- homedir: string;
236
- cpus: number;
237
- };
238
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
239
- userKnowledgeFiles?: Record<string, string> | undefined;
240
- fileVersions?: {
241
- path: string;
242
- content: string;
243
- }[][] | undefined;
244
- };
245
- messageHistory: (import("ai").CoreMessage & {
246
- timeToLive?: "agentStep" | "userPrompt" | undefined;
247
- })[];
248
- agentStepsRemaining: number;
249
- agents?: {
250
- agentId: string;
251
- agentName: import("./types/agent-state").AgentTemplateName;
252
- agents: import("./types/agent-state").SubagentState[];
253
- messageHistory: import("./types/message").CodebuffMessage[];
254
- }[] | undefined;
255
- }>;
256
- toolResults: z.ZodArray<z.ZodObject<{
257
- toolName: z.ZodString;
258
- toolCallId: z.ZodString;
259
- result: z.ZodString;
260
- }, "strip", z.ZodTypeAny, {
261
- toolName: string;
262
- toolCallId: string;
263
- result: string;
264
- }, {
265
- toolName: string;
266
- toolCallId: string;
267
- result: string;
268
- }>, "many">;
269
- model: z.ZodOptional<z.ZodString>;
270
- repoUrl: z.ZodOptional<z.ZodString>;
271
- }, "strip", z.ZodTypeAny, {
272
- type: "prompt";
273
- promptId: string;
274
- fingerprintId: string;
275
- costMode: "max" | "lite" | "normal" | "experimental" | "ask";
276
- agentState: {
277
- agentContext: string;
278
- fileContext: {
279
- projectRoot: string;
280
- cwd: string;
281
- fileTree: import("./util/file").FileTreeNode[];
282
- fileTokenScores: Record<string, Record<string, number>>;
283
- knowledgeFiles: Record<string, string>;
284
- gitChanges: {
285
- status: string;
286
- diff: string;
287
- diffCached: string;
288
- lastCommitMessages: string;
289
- };
290
- changesSinceLastChat: Record<string, string>;
291
- shellConfigFiles: Record<string, string>;
292
- systemInfo: {
293
- platform: string;
294
- shell: string;
295
- nodeVersion: string;
296
- arch: string;
297
- homedir: string;
298
- cpus: number;
299
- };
300
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
301
- userKnowledgeFiles?: Record<string, string> | undefined;
302
- fileVersions?: {
303
- path: string;
304
- content: string;
305
- }[][] | undefined;
306
- };
307
- messageHistory: (import("ai").CoreMessage & {
308
- timeToLive?: "agentStep" | "userPrompt" | undefined;
309
- })[];
310
- agents: {
311
- agentId: string;
312
- agentName: import("./types/agent-state").AgentTemplateName;
313
- agents: import("./types/agent-state").SubagentState[];
314
- messageHistory: import("./types/message").CodebuffMessage[];
315
- }[];
316
- agentStepsRemaining: number;
317
- };
318
- toolResults: {
319
- toolName: string;
320
- toolCallId: string;
321
- result: string;
322
- }[];
323
- prompt?: string | undefined;
324
- authToken?: string | undefined;
325
- model?: string | undefined;
326
- repoUrl?: string | undefined;
327
- }, {
328
- type: "prompt";
329
- promptId: string;
330
- fingerprintId: string;
331
- agentState: {
332
- agentContext: string;
333
- fileContext: {
334
- projectRoot: string;
335
- cwd: string;
336
- fileTree: import("./util/file").FileTreeNode[];
337
- fileTokenScores: Record<string, Record<string, number>>;
338
- knowledgeFiles: Record<string, string>;
339
- gitChanges: {
340
- status: string;
341
- diff: string;
342
- diffCached: string;
343
- lastCommitMessages: string;
344
- };
345
- changesSinceLastChat: Record<string, string>;
346
- shellConfigFiles: Record<string, string>;
347
- systemInfo: {
348
- platform: string;
349
- shell: string;
350
- nodeVersion: string;
351
- arch: string;
352
- homedir: string;
353
- cpus: number;
354
- };
355
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
356
- userKnowledgeFiles?: Record<string, string> | undefined;
357
- fileVersions?: {
358
- path: string;
359
- content: string;
360
- }[][] | undefined;
361
- };
362
- messageHistory: (import("ai").CoreMessage & {
363
- timeToLive?: "agentStep" | "userPrompt" | undefined;
364
- })[];
365
- agentStepsRemaining: number;
366
- agents?: {
367
- agentId: string;
368
- agentName: import("./types/agent-state").AgentTemplateName;
369
- agents: import("./types/agent-state").SubagentState[];
370
- messageHistory: import("./types/message").CodebuffMessage[];
371
- }[] | undefined;
372
- };
373
- toolResults: {
374
- toolName: string;
375
- toolCallId: string;
376
- result: string;
377
- }[];
378
- prompt?: string | undefined;
379
- authToken?: string | undefined;
380
- costMode?: "max" | "lite" | "normal" | "experimental" | "ask" | undefined;
381
- model?: string | undefined;
382
- repoUrl?: string | undefined;
383
- }>, z.ZodObject<{
384
- type: z.ZodLiteral<"read-files-response">;
385
- files: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull]>>;
386
- requestId: z.ZodOptional<z.ZodString>;
387
- }, "strip", z.ZodTypeAny, {
388
- type: "read-files-response";
389
- files: Record<string, string | null>;
390
- requestId?: string | undefined;
391
- }, {
392
- type: "read-files-response";
393
- files: Record<string, string | null>;
394
- requestId?: string | undefined;
395
- }>, z.ZodObject<{
396
- type: z.ZodLiteral<"init">;
397
- fingerprintId: z.ZodString;
398
- authToken: z.ZodOptional<z.ZodString>;
399
- fileContext: z.ZodObject<{
400
- projectRoot: z.ZodString;
401
- cwd: z.ZodString;
402
- fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
403
- fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
404
- tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
405
- knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
406
- userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
407
- gitChanges: z.ZodObject<{
408
- status: z.ZodString;
409
- diff: z.ZodString;
410
- diffCached: z.ZodString;
411
- lastCommitMessages: z.ZodString;
412
- }, "strip", z.ZodTypeAny, {
413
- status: string;
414
- diff: string;
415
- diffCached: string;
416
- lastCommitMessages: string;
417
- }, {
418
- status: string;
419
- diff: string;
420
- diffCached: string;
421
- lastCommitMessages: string;
422
- }>;
423
- changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
424
- shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
425
- systemInfo: z.ZodObject<{
426
- platform: z.ZodString;
427
- shell: z.ZodString;
428
- nodeVersion: z.ZodString;
429
- arch: z.ZodString;
430
- homedir: z.ZodString;
431
- cpus: z.ZodNumber;
432
- }, "strip", z.ZodTypeAny, {
433
- platform: string;
434
- shell: string;
435
- nodeVersion: string;
436
- arch: string;
437
- homedir: string;
438
- cpus: number;
439
- }, {
440
- platform: string;
441
- shell: string;
442
- nodeVersion: string;
443
- arch: string;
444
- homedir: string;
445
- cpus: number;
446
- }>;
447
- fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
448
- path: z.ZodString;
449
- content: z.ZodString;
450
- }, "strip", z.ZodTypeAny, {
451
- path: string;
452
- content: string;
453
- }, {
454
- path: string;
455
- content: string;
456
- }>, "many">, "many">>;
457
- }, "strip", z.ZodTypeAny, {
458
- projectRoot: string;
459
- cwd: string;
460
- fileTree: import("./util/file").FileTreeNode[];
461
- fileTokenScores: Record<string, Record<string, number>>;
462
- knowledgeFiles: Record<string, string>;
463
- gitChanges: {
464
- status: string;
465
- diff: string;
466
- diffCached: string;
467
- lastCommitMessages: string;
468
- };
469
- changesSinceLastChat: Record<string, string>;
470
- shellConfigFiles: Record<string, string>;
471
- systemInfo: {
472
- platform: string;
473
- shell: string;
474
- nodeVersion: string;
475
- arch: string;
476
- homedir: string;
477
- cpus: number;
478
- };
479
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
480
- userKnowledgeFiles?: Record<string, string> | undefined;
481
- fileVersions?: {
482
- path: string;
483
- content: string;
484
- }[][] | undefined;
485
- }, {
486
- projectRoot: string;
487
- cwd: string;
488
- fileTree: import("./util/file").FileTreeNode[];
489
- fileTokenScores: Record<string, Record<string, number>>;
490
- knowledgeFiles: Record<string, string>;
491
- gitChanges: {
492
- status: string;
493
- diff: string;
494
- diffCached: string;
495
- lastCommitMessages: string;
496
- };
497
- changesSinceLastChat: Record<string, string>;
498
- shellConfigFiles: Record<string, string>;
499
- systemInfo: {
500
- platform: string;
501
- shell: string;
502
- nodeVersion: string;
503
- arch: string;
504
- homedir: string;
505
- cpus: number;
506
- };
507
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
508
- userKnowledgeFiles?: Record<string, string> | undefined;
509
- fileVersions?: {
510
- path: string;
511
- content: string;
512
- }[][] | undefined;
513
- }>;
514
- repoUrl: z.ZodOptional<z.ZodString>;
515
- }, "strip", z.ZodTypeAny, {
516
- type: "init";
517
- fileContext: {
518
- projectRoot: string;
519
- cwd: string;
520
- fileTree: import("./util/file").FileTreeNode[];
521
- fileTokenScores: Record<string, Record<string, number>>;
522
- knowledgeFiles: Record<string, string>;
523
- gitChanges: {
524
- status: string;
525
- diff: string;
526
- diffCached: string;
527
- lastCommitMessages: string;
528
- };
529
- changesSinceLastChat: Record<string, string>;
530
- shellConfigFiles: Record<string, string>;
531
- systemInfo: {
532
- platform: string;
533
- shell: string;
534
- nodeVersion: string;
535
- arch: string;
536
- homedir: string;
537
- cpus: number;
538
- };
539
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
540
- userKnowledgeFiles?: Record<string, string> | undefined;
541
- fileVersions?: {
542
- path: string;
543
- content: string;
544
- }[][] | undefined;
545
- };
546
- fingerprintId: string;
547
- authToken?: string | undefined;
548
- repoUrl?: string | undefined;
549
- }, {
550
- type: "init";
551
- fileContext: {
552
- projectRoot: string;
553
- cwd: string;
554
- fileTree: import("./util/file").FileTreeNode[];
555
- fileTokenScores: Record<string, Record<string, number>>;
556
- knowledgeFiles: Record<string, string>;
557
- gitChanges: {
558
- status: string;
559
- diff: string;
560
- diffCached: string;
561
- lastCommitMessages: string;
562
- };
563
- changesSinceLastChat: Record<string, string>;
564
- shellConfigFiles: Record<string, string>;
565
- systemInfo: {
566
- platform: string;
567
- shell: string;
568
- nodeVersion: string;
569
- arch: string;
570
- homedir: string;
571
- cpus: number;
572
- };
573
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
574
- userKnowledgeFiles?: Record<string, string> | undefined;
575
- fileVersions?: {
576
- path: string;
577
- content: string;
578
- }[][] | undefined;
579
- };
580
- fingerprintId: string;
581
- authToken?: string | undefined;
582
- repoUrl?: string | undefined;
583
- }>, z.ZodObject<{
584
- type: z.ZodLiteral<"generate-commit-message">;
585
- fingerprintId: z.ZodString;
586
- authToken: z.ZodOptional<z.ZodString>;
587
- stagedChanges: z.ZodString;
588
- }, "strip", z.ZodTypeAny, {
589
- type: "generate-commit-message";
590
- fingerprintId: string;
591
- stagedChanges: string;
592
- authToken?: string | undefined;
593
- }, {
594
- type: "generate-commit-message";
595
- fingerprintId: string;
596
- stagedChanges: string;
597
- authToken?: string | undefined;
598
- }>]>;
599
- export type ClientAction = z.infer<typeof CLIENT_ACTION_SCHEMA>;
600
- export declare const UsageReponseSchema: z.ZodObject<{
601
- type: z.ZodLiteral<"usage-response">;
602
- usage: z.ZodNumber;
603
- remainingBalance: z.ZodNumber;
604
- balanceBreakdown: z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin" | "organization")[]]>, z.ZodNumber>>;
605
- next_quota_reset: z.ZodNullable<z.ZodDate>;
606
- autoTopupAdded: z.ZodOptional<z.ZodNumber>;
607
- }, "strip", z.ZodTypeAny, {
608
- type: "usage-response";
609
- usage: number;
610
- remainingBalance: number;
611
- next_quota_reset: Date | null;
612
- balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
613
- autoTopupAdded?: number | undefined;
614
- }, {
615
- type: "usage-response";
616
- usage: number;
617
- remainingBalance: number;
618
- next_quota_reset: Date | null;
619
- balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
620
- autoTopupAdded?: number | undefined;
621
- }>;
622
- export type UsageResponse = z.infer<typeof UsageReponseSchema>;
623
- export declare const InitResponseSchema: z.ZodObject<z.objectUtil.extendShape<{
624
- type: z.ZodLiteral<"init-response">;
625
- }, Omit<{
626
- type: z.ZodLiteral<"usage-response">;
627
- usage: z.ZodNumber;
628
- remainingBalance: z.ZodNumber;
629
- balanceBreakdown: z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin" | "organization")[]]>, z.ZodNumber>>;
630
- next_quota_reset: z.ZodNullable<z.ZodDate>;
631
- autoTopupAdded: z.ZodOptional<z.ZodNumber>;
632
- }, "type">>, "strip", z.ZodTypeAny, {
633
- type: "init-response";
634
- usage: number;
635
- remainingBalance: number;
636
- next_quota_reset: Date | null;
637
- balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
638
- autoTopupAdded?: number | undefined;
639
- }, {
640
- type: "init-response";
641
- usage: number;
642
- remainingBalance: number;
643
- next_quota_reset: Date | null;
644
- balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
645
- autoTopupAdded?: number | undefined;
646
- }>;
647
- export type InitResponse = z.infer<typeof InitResponseSchema>;
648
- export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShape<{
649
- type: z.ZodLiteral<"response-complete">;
650
- userInputId: z.ZodString;
651
- response: z.ZodString;
652
- changes: z.ZodArray<z.ZodObject<{
653
- type: z.ZodEnum<["patch", "file"]>;
654
- path: z.ZodString;
655
- content: z.ZodString;
656
- }, "strip", z.ZodTypeAny, {
657
- path: string;
658
- type: "patch" | "file";
659
- content: string;
660
- }, {
661
- path: string;
662
- type: "patch" | "file";
663
- content: string;
664
- }>, "many">;
665
- changesAlreadyApplied: z.ZodArray<z.ZodObject<{
666
- type: z.ZodEnum<["patch", "file"]>;
667
- path: z.ZodString;
668
- content: z.ZodString;
669
- }, "strip", z.ZodTypeAny, {
670
- path: string;
671
- type: "patch" | "file";
672
- content: string;
673
- }, {
674
- path: string;
675
- type: "patch" | "file";
676
- content: string;
677
- }>, "many">;
678
- addedFileVersions: z.ZodArray<z.ZodObject<{
679
- path: z.ZodString;
680
- content: z.ZodString;
681
- }, "strip", z.ZodTypeAny, {
682
- path: string;
683
- content: string;
684
- }, {
685
- path: string;
686
- content: string;
687
- }>, "many">;
688
- resetFileVersions: z.ZodBoolean;
689
- }, {
690
- usage: z.ZodOptional<z.ZodNumber>;
691
- remainingBalance: z.ZodOptional<z.ZodNumber>;
692
- balanceBreakdown: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin" | "organization")[]]>, z.ZodNumber>>>;
693
- next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
694
- autoTopupAdded: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
695
- }>, "strip", z.ZodTypeAny, {
696
- type: "response-complete";
697
- userInputId: string;
698
- response: string;
699
- changes: {
700
- path: string;
701
- type: "patch" | "file";
702
- content: string;
703
- }[];
704
- changesAlreadyApplied: {
705
- path: string;
706
- type: "patch" | "file";
707
- content: string;
708
- }[];
709
- addedFileVersions: {
710
- path: string;
711
- content: string;
712
- }[];
713
- resetFileVersions: boolean;
714
- usage?: number | undefined;
715
- remainingBalance?: number | undefined;
716
- balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
717
- next_quota_reset?: Date | null | undefined;
718
- autoTopupAdded?: number | undefined;
719
- }, {
720
- type: "response-complete";
721
- userInputId: string;
722
- response: string;
723
- changes: {
724
- path: string;
725
- type: "patch" | "file";
726
- content: string;
727
- }[];
728
- changesAlreadyApplied: {
729
- path: string;
730
- type: "patch" | "file";
731
- content: string;
732
- }[];
733
- addedFileVersions: {
734
- path: string;
735
- content: string;
736
- }[];
737
- resetFileVersions: boolean;
738
- usage?: number | undefined;
739
- remainingBalance?: number | undefined;
740
- balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
741
- next_quota_reset?: Date | null | undefined;
742
- autoTopupAdded?: number | undefined;
743
- }>;
744
- export declare const MessageCostResponseSchema: z.ZodObject<{
745
- type: z.ZodLiteral<"message-cost-response">;
746
- promptId: z.ZodString;
747
- credits: z.ZodNumber;
748
- }, "strip", z.ZodTypeAny, {
749
- type: "message-cost-response";
750
- promptId: string;
751
- credits: number;
752
- }, {
753
- type: "message-cost-response";
754
- promptId: string;
755
- credits: number;
756
- }>;
757
- export type MessageCostResponse = z.infer<typeof MessageCostResponseSchema>;
758
- export declare const PromptResponseSchema: z.ZodObject<{
759
- type: z.ZodLiteral<"prompt-response">;
760
- promptId: z.ZodString;
761
- agentState: z.ZodObject<{
762
- agentContext: z.ZodString;
763
- fileContext: z.ZodObject<{
764
- projectRoot: z.ZodString;
765
- cwd: z.ZodString;
766
- fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
767
- fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
768
- tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
769
- knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
770
- userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
771
- gitChanges: z.ZodObject<{
772
- status: z.ZodString;
773
- diff: z.ZodString;
774
- diffCached: z.ZodString;
775
- lastCommitMessages: z.ZodString;
776
- }, "strip", z.ZodTypeAny, {
777
- status: string;
778
- diff: string;
779
- diffCached: string;
780
- lastCommitMessages: string;
781
- }, {
782
- status: string;
783
- diff: string;
784
- diffCached: string;
785
- lastCommitMessages: string;
786
- }>;
787
- changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
788
- shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
789
- systemInfo: z.ZodObject<{
790
- platform: z.ZodString;
791
- shell: z.ZodString;
792
- nodeVersion: z.ZodString;
793
- arch: z.ZodString;
794
- homedir: z.ZodString;
795
- cpus: z.ZodNumber;
796
- }, "strip", z.ZodTypeAny, {
797
- platform: string;
798
- shell: string;
799
- nodeVersion: string;
800
- arch: string;
801
- homedir: string;
802
- cpus: number;
803
- }, {
804
- platform: string;
805
- shell: string;
806
- nodeVersion: string;
807
- arch: string;
808
- homedir: string;
809
- cpus: number;
810
- }>;
811
- fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
812
- path: z.ZodString;
813
- content: z.ZodString;
814
- }, "strip", z.ZodTypeAny, {
815
- path: string;
816
- content: string;
817
- }, {
818
- path: string;
819
- content: string;
820
- }>, "many">, "many">>;
821
- }, "strip", z.ZodTypeAny, {
822
- projectRoot: string;
823
- cwd: string;
824
- fileTree: import("./util/file").FileTreeNode[];
825
- fileTokenScores: Record<string, Record<string, number>>;
826
- knowledgeFiles: Record<string, string>;
827
- gitChanges: {
828
- status: string;
829
- diff: string;
830
- diffCached: string;
831
- lastCommitMessages: string;
832
- };
833
- changesSinceLastChat: Record<string, string>;
834
- shellConfigFiles: Record<string, string>;
835
- systemInfo: {
836
- platform: string;
837
- shell: string;
838
- nodeVersion: string;
839
- arch: string;
840
- homedir: string;
841
- cpus: number;
842
- };
843
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
844
- userKnowledgeFiles?: Record<string, string> | undefined;
845
- fileVersions?: {
846
- path: string;
847
- content: string;
848
- }[][] | undefined;
849
- }, {
850
- projectRoot: string;
851
- cwd: string;
852
- fileTree: import("./util/file").FileTreeNode[];
853
- fileTokenScores: Record<string, Record<string, number>>;
854
- knowledgeFiles: Record<string, string>;
855
- gitChanges: {
856
- status: string;
857
- diff: string;
858
- diffCached: string;
859
- lastCommitMessages: string;
860
- };
861
- changesSinceLastChat: Record<string, string>;
862
- shellConfigFiles: Record<string, string>;
863
- systemInfo: {
864
- platform: string;
865
- shell: string;
866
- nodeVersion: string;
867
- arch: string;
868
- homedir: string;
869
- cpus: number;
870
- };
871
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
872
- userKnowledgeFiles?: Record<string, string> | undefined;
873
- fileVersions?: {
874
- path: string;
875
- content: string;
876
- }[][] | undefined;
877
- }>;
878
- messageHistory: z.ZodArray<z.ZodIntersection<z.ZodType<import("ai").CoreMessage, z.ZodTypeDef, import("ai").CoreMessage>, z.ZodObject<{
879
- timeToLive: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"agentStep">, z.ZodLiteral<"userPrompt">]>>;
880
- }, "strip", z.ZodTypeAny, {
881
- timeToLive?: "agentStep" | "userPrompt" | undefined;
882
- }, {
883
- timeToLive?: "agentStep" | "userPrompt" | undefined;
884
- }>>, "many">;
885
- agents: z.ZodDefault<z.ZodArray<z.ZodType<{
886
- agentId: string;
887
- agentName: import("./types/agent-state").AgentTemplateName;
888
- agents: import("./types/agent-state").SubagentState[];
889
- messageHistory: import("./types/message").CodebuffMessage[];
890
- }, z.ZodTypeDef, {
891
- agentId: string;
892
- agentName: import("./types/agent-state").AgentTemplateName;
893
- agents: import("./types/agent-state").SubagentState[];
894
- messageHistory: import("./types/message").CodebuffMessage[];
895
- }>, "many">>;
896
- agentStepsRemaining: z.ZodNumber;
897
- }, "strip", z.ZodTypeAny, {
898
- agentContext: string;
899
- fileContext: {
900
- projectRoot: string;
901
- cwd: string;
902
- fileTree: import("./util/file").FileTreeNode[];
903
- fileTokenScores: Record<string, Record<string, number>>;
904
- knowledgeFiles: Record<string, string>;
905
- gitChanges: {
906
- status: string;
907
- diff: string;
908
- diffCached: string;
909
- lastCommitMessages: string;
910
- };
911
- changesSinceLastChat: Record<string, string>;
912
- shellConfigFiles: Record<string, string>;
913
- systemInfo: {
914
- platform: string;
915
- shell: string;
916
- nodeVersion: string;
917
- arch: string;
918
- homedir: string;
919
- cpus: number;
920
- };
921
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
922
- userKnowledgeFiles?: Record<string, string> | undefined;
923
- fileVersions?: {
924
- path: string;
925
- content: string;
926
- }[][] | undefined;
927
- };
928
- messageHistory: (import("ai").CoreMessage & {
929
- timeToLive?: "agentStep" | "userPrompt" | undefined;
930
- })[];
931
- agents: {
932
- agentId: string;
933
- agentName: import("./types/agent-state").AgentTemplateName;
934
- agents: import("./types/agent-state").SubagentState[];
935
- messageHistory: import("./types/message").CodebuffMessage[];
936
- }[];
937
- agentStepsRemaining: number;
938
- }, {
939
- agentContext: string;
940
- fileContext: {
941
- projectRoot: string;
942
- cwd: string;
943
- fileTree: import("./util/file").FileTreeNode[];
944
- fileTokenScores: Record<string, Record<string, number>>;
945
- knowledgeFiles: Record<string, string>;
946
- gitChanges: {
947
- status: string;
948
- diff: string;
949
- diffCached: string;
950
- lastCommitMessages: string;
951
- };
952
- changesSinceLastChat: Record<string, string>;
953
- shellConfigFiles: Record<string, string>;
954
- systemInfo: {
955
- platform: string;
956
- shell: string;
957
- nodeVersion: string;
958
- arch: string;
959
- homedir: string;
960
- cpus: number;
961
- };
962
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
963
- userKnowledgeFiles?: Record<string, string> | undefined;
964
- fileVersions?: {
965
- path: string;
966
- content: string;
967
- }[][] | undefined;
968
- };
969
- messageHistory: (import("ai").CoreMessage & {
970
- timeToLive?: "agentStep" | "userPrompt" | undefined;
971
- })[];
972
- agentStepsRemaining: number;
973
- agents?: {
974
- agentId: string;
975
- agentName: import("./types/agent-state").AgentTemplateName;
976
- agents: import("./types/agent-state").SubagentState[];
977
- messageHistory: import("./types/message").CodebuffMessage[];
978
- }[] | undefined;
979
- }>;
980
- toolCalls: z.ZodArray<z.ZodObject<{
981
- toolName: z.ZodString;
982
- args: z.ZodRecord<z.ZodString, z.ZodString>;
983
- toolCallId: z.ZodString;
984
- }, "strip", z.ZodTypeAny, {
985
- toolName: string;
986
- args: Record<string, string>;
987
- toolCallId: string;
988
- }, {
989
- toolName: string;
990
- args: Record<string, string>;
991
- toolCallId: string;
992
- }>, "many">;
993
- toolResults: z.ZodArray<z.ZodObject<{
994
- toolName: z.ZodString;
995
- toolCallId: z.ZodString;
996
- result: z.ZodString;
997
- }, "strip", z.ZodTypeAny, {
998
- toolName: string;
999
- toolCallId: string;
1000
- result: string;
1001
- }, {
1002
- toolName: string;
1003
- toolCallId: string;
1004
- result: string;
1005
- }>, "many">;
1006
- }, "strip", z.ZodTypeAny, {
1007
- type: "prompt-response";
1008
- promptId: string;
1009
- agentState: {
1010
- agentContext: string;
1011
- fileContext: {
1012
- projectRoot: string;
1013
- cwd: string;
1014
- fileTree: import("./util/file").FileTreeNode[];
1015
- fileTokenScores: Record<string, Record<string, number>>;
1016
- knowledgeFiles: Record<string, string>;
1017
- gitChanges: {
1018
- status: string;
1019
- diff: string;
1020
- diffCached: string;
1021
- lastCommitMessages: string;
1022
- };
1023
- changesSinceLastChat: Record<string, string>;
1024
- shellConfigFiles: Record<string, string>;
1025
- systemInfo: {
1026
- platform: string;
1027
- shell: string;
1028
- nodeVersion: string;
1029
- arch: string;
1030
- homedir: string;
1031
- cpus: number;
1032
- };
1033
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1034
- userKnowledgeFiles?: Record<string, string> | undefined;
1035
- fileVersions?: {
1036
- path: string;
1037
- content: string;
1038
- }[][] | undefined;
1039
- };
1040
- messageHistory: (import("ai").CoreMessage & {
1041
- timeToLive?: "agentStep" | "userPrompt" | undefined;
1042
- })[];
1043
- agents: {
1044
- agentId: string;
1045
- agentName: import("./types/agent-state").AgentTemplateName;
1046
- agents: import("./types/agent-state").SubagentState[];
1047
- messageHistory: import("./types/message").CodebuffMessage[];
1048
- }[];
1049
- agentStepsRemaining: number;
1050
- };
1051
- toolResults: {
1052
- toolName: string;
1053
- toolCallId: string;
1054
- result: string;
1055
- }[];
1056
- toolCalls: {
1057
- toolName: string;
1058
- args: Record<string, string>;
1059
- toolCallId: string;
1060
- }[];
1061
- }, {
1062
- type: "prompt-response";
1063
- promptId: string;
1064
- agentState: {
1065
- agentContext: string;
1066
- fileContext: {
1067
- projectRoot: string;
1068
- cwd: string;
1069
- fileTree: import("./util/file").FileTreeNode[];
1070
- fileTokenScores: Record<string, Record<string, number>>;
1071
- knowledgeFiles: Record<string, string>;
1072
- gitChanges: {
1073
- status: string;
1074
- diff: string;
1075
- diffCached: string;
1076
- lastCommitMessages: string;
1077
- };
1078
- changesSinceLastChat: Record<string, string>;
1079
- shellConfigFiles: Record<string, string>;
1080
- systemInfo: {
1081
- platform: string;
1082
- shell: string;
1083
- nodeVersion: string;
1084
- arch: string;
1085
- homedir: string;
1086
- cpus: number;
1087
- };
1088
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1089
- userKnowledgeFiles?: Record<string, string> | undefined;
1090
- fileVersions?: {
1091
- path: string;
1092
- content: string;
1093
- }[][] | undefined;
1094
- };
1095
- messageHistory: (import("ai").CoreMessage & {
1096
- timeToLive?: "agentStep" | "userPrompt" | undefined;
1097
- })[];
1098
- agentStepsRemaining: number;
1099
- agents?: {
1100
- agentId: string;
1101
- agentName: import("./types/agent-state").AgentTemplateName;
1102
- agents: import("./types/agent-state").SubagentState[];
1103
- messageHistory: import("./types/message").CodebuffMessage[];
1104
- }[] | undefined;
1105
- };
1106
- toolResults: {
1107
- toolName: string;
1108
- toolCallId: string;
1109
- result: string;
1110
- }[];
1111
- toolCalls: {
1112
- toolName: string;
1113
- args: Record<string, string>;
1114
- toolCallId: string;
1115
- }[];
1116
- }>;
1117
- export type PromptResponse = z.infer<typeof PromptResponseSchema>;
1118
- export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1119
- type: z.ZodLiteral<"response-chunk">;
1120
- userInputId: z.ZodString;
1121
- chunk: z.ZodString;
1122
- }, "strip", z.ZodTypeAny, {
1123
- type: "response-chunk";
1124
- userInputId: string;
1125
- chunk: string;
1126
- }, {
1127
- type: "response-chunk";
1128
- userInputId: string;
1129
- chunk: string;
1130
- }>, z.ZodObject<z.objectUtil.extendShape<{
1131
- type: z.ZodLiteral<"response-complete">;
1132
- userInputId: z.ZodString;
1133
- response: z.ZodString;
1134
- changes: z.ZodArray<z.ZodObject<{
1135
- type: z.ZodEnum<["patch", "file"]>;
1136
- path: z.ZodString;
1137
- content: z.ZodString;
1138
- }, "strip", z.ZodTypeAny, {
1139
- path: string;
1140
- type: "patch" | "file";
1141
- content: string;
1142
- }, {
1143
- path: string;
1144
- type: "patch" | "file";
1145
- content: string;
1146
- }>, "many">;
1147
- changesAlreadyApplied: z.ZodArray<z.ZodObject<{
1148
- type: z.ZodEnum<["patch", "file"]>;
1149
- path: z.ZodString;
1150
- content: z.ZodString;
1151
- }, "strip", z.ZodTypeAny, {
1152
- path: string;
1153
- type: "patch" | "file";
1154
- content: string;
1155
- }, {
1156
- path: string;
1157
- type: "patch" | "file";
1158
- content: string;
1159
- }>, "many">;
1160
- addedFileVersions: z.ZodArray<z.ZodObject<{
1161
- path: z.ZodString;
1162
- content: z.ZodString;
1163
- }, "strip", z.ZodTypeAny, {
1164
- path: string;
1165
- content: string;
1166
- }, {
1167
- path: string;
1168
- content: string;
1169
- }>, "many">;
1170
- resetFileVersions: z.ZodBoolean;
1171
- }, {
1172
- usage: z.ZodOptional<z.ZodNumber>;
1173
- remainingBalance: z.ZodOptional<z.ZodNumber>;
1174
- balanceBreakdown: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin" | "organization")[]]>, z.ZodNumber>>>;
1175
- next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1176
- autoTopupAdded: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
1177
- }>, "strip", z.ZodTypeAny, {
1178
- type: "response-complete";
1179
- userInputId: string;
1180
- response: string;
1181
- changes: {
1182
- path: string;
1183
- type: "patch" | "file";
1184
- content: string;
1185
- }[];
1186
- changesAlreadyApplied: {
1187
- path: string;
1188
- type: "patch" | "file";
1189
- content: string;
1190
- }[];
1191
- addedFileVersions: {
1192
- path: string;
1193
- content: string;
1194
- }[];
1195
- resetFileVersions: boolean;
1196
- usage?: number | undefined;
1197
- remainingBalance?: number | undefined;
1198
- balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
1199
- next_quota_reset?: Date | null | undefined;
1200
- autoTopupAdded?: number | undefined;
1201
- }, {
1202
- type: "response-complete";
1203
- userInputId: string;
1204
- response: string;
1205
- changes: {
1206
- path: string;
1207
- type: "patch" | "file";
1208
- content: string;
1209
- }[];
1210
- changesAlreadyApplied: {
1211
- path: string;
1212
- type: "patch" | "file";
1213
- content: string;
1214
- }[];
1215
- addedFileVersions: {
1216
- path: string;
1217
- content: string;
1218
- }[];
1219
- resetFileVersions: boolean;
1220
- usage?: number | undefined;
1221
- remainingBalance?: number | undefined;
1222
- balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
1223
- next_quota_reset?: Date | null | undefined;
1224
- autoTopupAdded?: number | undefined;
1225
- }>, z.ZodObject<{
1226
- type: z.ZodLiteral<"prompt-response">;
1227
- promptId: z.ZodString;
1228
- agentState: z.ZodObject<{
1229
- agentContext: z.ZodString;
1230
- fileContext: z.ZodObject<{
1231
- projectRoot: z.ZodString;
1232
- cwd: z.ZodString;
1233
- fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
1234
- fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
1235
- tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
1236
- knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
1237
- userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1238
- gitChanges: z.ZodObject<{
1239
- status: z.ZodString;
1240
- diff: z.ZodString;
1241
- diffCached: z.ZodString;
1242
- lastCommitMessages: z.ZodString;
1243
- }, "strip", z.ZodTypeAny, {
1244
- status: string;
1245
- diff: string;
1246
- diffCached: string;
1247
- lastCommitMessages: string;
1248
- }, {
1249
- status: string;
1250
- diff: string;
1251
- diffCached: string;
1252
- lastCommitMessages: string;
1253
- }>;
1254
- changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
1255
- shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
1256
- systemInfo: z.ZodObject<{
1257
- platform: z.ZodString;
1258
- shell: z.ZodString;
1259
- nodeVersion: z.ZodString;
1260
- arch: z.ZodString;
1261
- homedir: z.ZodString;
1262
- cpus: z.ZodNumber;
1263
- }, "strip", z.ZodTypeAny, {
1264
- platform: string;
1265
- shell: string;
1266
- nodeVersion: string;
1267
- arch: string;
1268
- homedir: string;
1269
- cpus: number;
1270
- }, {
1271
- platform: string;
1272
- shell: string;
1273
- nodeVersion: string;
1274
- arch: string;
1275
- homedir: string;
1276
- cpus: number;
1277
- }>;
1278
- fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
1279
- path: z.ZodString;
1280
- content: z.ZodString;
1281
- }, "strip", z.ZodTypeAny, {
1282
- path: string;
1283
- content: string;
1284
- }, {
1285
- path: string;
1286
- content: string;
1287
- }>, "many">, "many">>;
1288
- }, "strip", z.ZodTypeAny, {
1289
- projectRoot: string;
1290
- cwd: string;
1291
- fileTree: import("./util/file").FileTreeNode[];
1292
- fileTokenScores: Record<string, Record<string, number>>;
1293
- knowledgeFiles: Record<string, string>;
1294
- gitChanges: {
1295
- status: string;
1296
- diff: string;
1297
- diffCached: string;
1298
- lastCommitMessages: string;
1299
- };
1300
- changesSinceLastChat: Record<string, string>;
1301
- shellConfigFiles: Record<string, string>;
1302
- systemInfo: {
1303
- platform: string;
1304
- shell: string;
1305
- nodeVersion: string;
1306
- arch: string;
1307
- homedir: string;
1308
- cpus: number;
1309
- };
1310
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1311
- userKnowledgeFiles?: Record<string, string> | undefined;
1312
- fileVersions?: {
1313
- path: string;
1314
- content: string;
1315
- }[][] | undefined;
1316
- }, {
1317
- projectRoot: string;
1318
- cwd: string;
1319
- fileTree: import("./util/file").FileTreeNode[];
1320
- fileTokenScores: Record<string, Record<string, number>>;
1321
- knowledgeFiles: Record<string, string>;
1322
- gitChanges: {
1323
- status: string;
1324
- diff: string;
1325
- diffCached: string;
1326
- lastCommitMessages: string;
1327
- };
1328
- changesSinceLastChat: Record<string, string>;
1329
- shellConfigFiles: Record<string, string>;
1330
- systemInfo: {
1331
- platform: string;
1332
- shell: string;
1333
- nodeVersion: string;
1334
- arch: string;
1335
- homedir: string;
1336
- cpus: number;
1337
- };
1338
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1339
- userKnowledgeFiles?: Record<string, string> | undefined;
1340
- fileVersions?: {
1341
- path: string;
1342
- content: string;
1343
- }[][] | undefined;
1344
- }>;
1345
- messageHistory: z.ZodArray<z.ZodIntersection<z.ZodType<import("ai").CoreMessage, z.ZodTypeDef, import("ai").CoreMessage>, z.ZodObject<{
1346
- timeToLive: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"agentStep">, z.ZodLiteral<"userPrompt">]>>;
1347
- }, "strip", z.ZodTypeAny, {
1348
- timeToLive?: "agentStep" | "userPrompt" | undefined;
1349
- }, {
1350
- timeToLive?: "agentStep" | "userPrompt" | undefined;
1351
- }>>, "many">;
1352
- agents: z.ZodDefault<z.ZodArray<z.ZodType<{
1353
- agentId: string;
1354
- agentName: import("./types/agent-state").AgentTemplateName;
1355
- agents: import("./types/agent-state").SubagentState[];
1356
- messageHistory: import("./types/message").CodebuffMessage[];
1357
- }, z.ZodTypeDef, {
1358
- agentId: string;
1359
- agentName: import("./types/agent-state").AgentTemplateName;
1360
- agents: import("./types/agent-state").SubagentState[];
1361
- messageHistory: import("./types/message").CodebuffMessage[];
1362
- }>, "many">>;
1363
- agentStepsRemaining: z.ZodNumber;
1364
- }, "strip", z.ZodTypeAny, {
1365
- agentContext: string;
1366
- fileContext: {
1367
- projectRoot: string;
1368
- cwd: string;
1369
- fileTree: import("./util/file").FileTreeNode[];
1370
- fileTokenScores: Record<string, Record<string, number>>;
1371
- knowledgeFiles: Record<string, string>;
1372
- gitChanges: {
1373
- status: string;
1374
- diff: string;
1375
- diffCached: string;
1376
- lastCommitMessages: string;
1377
- };
1378
- changesSinceLastChat: Record<string, string>;
1379
- shellConfigFiles: Record<string, string>;
1380
- systemInfo: {
1381
- platform: string;
1382
- shell: string;
1383
- nodeVersion: string;
1384
- arch: string;
1385
- homedir: string;
1386
- cpus: number;
1387
- };
1388
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1389
- userKnowledgeFiles?: Record<string, string> | undefined;
1390
- fileVersions?: {
1391
- path: string;
1392
- content: string;
1393
- }[][] | undefined;
1394
- };
1395
- messageHistory: (import("ai").CoreMessage & {
1396
- timeToLive?: "agentStep" | "userPrompt" | undefined;
1397
- })[];
1398
- agents: {
1399
- agentId: string;
1400
- agentName: import("./types/agent-state").AgentTemplateName;
1401
- agents: import("./types/agent-state").SubagentState[];
1402
- messageHistory: import("./types/message").CodebuffMessage[];
1403
- }[];
1404
- agentStepsRemaining: number;
1405
- }, {
1406
- agentContext: string;
1407
- fileContext: {
1408
- projectRoot: string;
1409
- cwd: string;
1410
- fileTree: import("./util/file").FileTreeNode[];
1411
- fileTokenScores: Record<string, Record<string, number>>;
1412
- knowledgeFiles: Record<string, string>;
1413
- gitChanges: {
1414
- status: string;
1415
- diff: string;
1416
- diffCached: string;
1417
- lastCommitMessages: string;
1418
- };
1419
- changesSinceLastChat: Record<string, string>;
1420
- shellConfigFiles: Record<string, string>;
1421
- systemInfo: {
1422
- platform: string;
1423
- shell: string;
1424
- nodeVersion: string;
1425
- arch: string;
1426
- homedir: string;
1427
- cpus: number;
1428
- };
1429
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1430
- userKnowledgeFiles?: Record<string, string> | undefined;
1431
- fileVersions?: {
1432
- path: string;
1433
- content: string;
1434
- }[][] | undefined;
1435
- };
1436
- messageHistory: (import("ai").CoreMessage & {
1437
- timeToLive?: "agentStep" | "userPrompt" | undefined;
1438
- })[];
1439
- agentStepsRemaining: number;
1440
- agents?: {
1441
- agentId: string;
1442
- agentName: import("./types/agent-state").AgentTemplateName;
1443
- agents: import("./types/agent-state").SubagentState[];
1444
- messageHistory: import("./types/message").CodebuffMessage[];
1445
- }[] | undefined;
1446
- }>;
1447
- toolCalls: z.ZodArray<z.ZodObject<{
1448
- toolName: z.ZodString;
1449
- args: z.ZodRecord<z.ZodString, z.ZodString>;
1450
- toolCallId: z.ZodString;
1451
- }, "strip", z.ZodTypeAny, {
1452
- toolName: string;
1453
- args: Record<string, string>;
1454
- toolCallId: string;
1455
- }, {
1456
- toolName: string;
1457
- args: Record<string, string>;
1458
- toolCallId: string;
1459
- }>, "many">;
1460
- toolResults: z.ZodArray<z.ZodObject<{
1461
- toolName: z.ZodString;
1462
- toolCallId: z.ZodString;
1463
- result: z.ZodString;
1464
- }, "strip", z.ZodTypeAny, {
1465
- toolName: string;
1466
- toolCallId: string;
1467
- result: string;
1468
- }, {
1469
- toolName: string;
1470
- toolCallId: string;
1471
- result: string;
1472
- }>, "many">;
1473
- }, "strip", z.ZodTypeAny, {
1474
- type: "prompt-response";
1475
- promptId: string;
1476
- agentState: {
1477
- agentContext: string;
1478
- fileContext: {
1479
- projectRoot: string;
1480
- cwd: string;
1481
- fileTree: import("./util/file").FileTreeNode[];
1482
- fileTokenScores: Record<string, Record<string, number>>;
1483
- knowledgeFiles: Record<string, string>;
1484
- gitChanges: {
1485
- status: string;
1486
- diff: string;
1487
- diffCached: string;
1488
- lastCommitMessages: string;
1489
- };
1490
- changesSinceLastChat: Record<string, string>;
1491
- shellConfigFiles: Record<string, string>;
1492
- systemInfo: {
1493
- platform: string;
1494
- shell: string;
1495
- nodeVersion: string;
1496
- arch: string;
1497
- homedir: string;
1498
- cpus: number;
1499
- };
1500
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1501
- userKnowledgeFiles?: Record<string, string> | undefined;
1502
- fileVersions?: {
1503
- path: string;
1504
- content: string;
1505
- }[][] | undefined;
1506
- };
1507
- messageHistory: (import("ai").CoreMessage & {
1508
- timeToLive?: "agentStep" | "userPrompt" | undefined;
1509
- })[];
1510
- agents: {
1511
- agentId: string;
1512
- agentName: import("./types/agent-state").AgentTemplateName;
1513
- agents: import("./types/agent-state").SubagentState[];
1514
- messageHistory: import("./types/message").CodebuffMessage[];
1515
- }[];
1516
- agentStepsRemaining: number;
1517
- };
1518
- toolResults: {
1519
- toolName: string;
1520
- toolCallId: string;
1521
- result: string;
1522
- }[];
1523
- toolCalls: {
1524
- toolName: string;
1525
- args: Record<string, string>;
1526
- toolCallId: string;
1527
- }[];
1528
- }, {
1529
- type: "prompt-response";
1530
- promptId: string;
1531
- agentState: {
1532
- agentContext: string;
1533
- fileContext: {
1534
- projectRoot: string;
1535
- cwd: string;
1536
- fileTree: import("./util/file").FileTreeNode[];
1537
- fileTokenScores: Record<string, Record<string, number>>;
1538
- knowledgeFiles: Record<string, string>;
1539
- gitChanges: {
1540
- status: string;
1541
- diff: string;
1542
- diffCached: string;
1543
- lastCommitMessages: string;
1544
- };
1545
- changesSinceLastChat: Record<string, string>;
1546
- shellConfigFiles: Record<string, string>;
1547
- systemInfo: {
1548
- platform: string;
1549
- shell: string;
1550
- nodeVersion: string;
1551
- arch: string;
1552
- homedir: string;
1553
- cpus: number;
1554
- };
1555
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1556
- userKnowledgeFiles?: Record<string, string> | undefined;
1557
- fileVersions?: {
1558
- path: string;
1559
- content: string;
1560
- }[][] | undefined;
1561
- };
1562
- messageHistory: (import("ai").CoreMessage & {
1563
- timeToLive?: "agentStep" | "userPrompt" | undefined;
1564
- })[];
1565
- agentStepsRemaining: number;
1566
- agents?: {
1567
- agentId: string;
1568
- agentName: import("./types/agent-state").AgentTemplateName;
1569
- agents: import("./types/agent-state").SubagentState[];
1570
- messageHistory: import("./types/message").CodebuffMessage[];
1571
- }[] | undefined;
1572
- };
1573
- toolResults: {
1574
- toolName: string;
1575
- toolCallId: string;
1576
- result: string;
1577
- }[];
1578
- toolCalls: {
1579
- toolName: string;
1580
- args: Record<string, string>;
1581
- toolCallId: string;
1582
- }[];
1583
- }>, z.ZodObject<{
1584
- type: z.ZodLiteral<"read-files">;
1585
- filePaths: z.ZodArray<z.ZodString, "many">;
1586
- requestId: z.ZodString;
1587
- }, "strip", z.ZodTypeAny, {
1588
- type: "read-files";
1589
- requestId: string;
1590
- filePaths: string[];
1591
- }, {
1592
- type: "read-files";
1593
- requestId: string;
1594
- filePaths: string[];
1595
- }>, z.ZodObject<{
1596
- type: z.ZodLiteral<"tool-call">;
1597
- userInputId: z.ZodString;
1598
- response: z.ZodString;
1599
- data: z.ZodObject<{
1600
- toolName: z.ZodString;
1601
- args: z.ZodRecord<z.ZodString, z.ZodString>;
1602
- toolCallId: z.ZodString;
1603
- }, "strip", z.ZodTypeAny, {
1604
- toolName: string;
1605
- args: Record<string, string>;
1606
- toolCallId: string;
1607
- }, {
1608
- toolName: string;
1609
- args: Record<string, string>;
1610
- toolCallId: string;
1611
- }>;
1612
- changes: z.ZodArray<z.ZodObject<{
1613
- type: z.ZodEnum<["patch", "file"]>;
1614
- path: z.ZodString;
1615
- content: z.ZodString;
1616
- }, "strip", z.ZodTypeAny, {
1617
- path: string;
1618
- type: "patch" | "file";
1619
- content: string;
1620
- }, {
1621
- path: string;
1622
- type: "patch" | "file";
1623
- content: string;
1624
- }>, "many">;
1625
- changesAlreadyApplied: z.ZodArray<z.ZodObject<{
1626
- type: z.ZodEnum<["patch", "file"]>;
1627
- path: z.ZodString;
1628
- content: z.ZodString;
1629
- }, "strip", z.ZodTypeAny, {
1630
- path: string;
1631
- type: "patch" | "file";
1632
- content: string;
1633
- }, {
1634
- path: string;
1635
- type: "patch" | "file";
1636
- content: string;
1637
- }>, "many">;
1638
- addedFileVersions: z.ZodArray<z.ZodObject<{
1639
- path: z.ZodString;
1640
- content: z.ZodString;
1641
- }, "strip", z.ZodTypeAny, {
1642
- path: string;
1643
- content: string;
1644
- }, {
1645
- path: string;
1646
- content: string;
1647
- }>, "many">;
1648
- resetFileVersions: z.ZodBoolean;
1649
- }, "strip", z.ZodTypeAny, {
1650
- type: "tool-call";
1651
- userInputId: string;
1652
- response: string;
1653
- changes: {
1654
- path: string;
1655
- type: "patch" | "file";
1656
- content: string;
1657
- }[];
1658
- changesAlreadyApplied: {
1659
- path: string;
1660
- type: "patch" | "file";
1661
- content: string;
1662
- }[];
1663
- addedFileVersions: {
1664
- path: string;
1665
- content: string;
1666
- }[];
1667
- resetFileVersions: boolean;
1668
- data: {
1669
- toolName: string;
1670
- args: Record<string, string>;
1671
- toolCallId: string;
1672
- };
1673
- }, {
1674
- type: "tool-call";
1675
- userInputId: string;
1676
- response: string;
1677
- changes: {
1678
- path: string;
1679
- type: "patch" | "file";
1680
- content: string;
1681
- }[];
1682
- changesAlreadyApplied: {
1683
- path: string;
1684
- type: "patch" | "file";
1685
- content: string;
1686
- }[];
1687
- addedFileVersions: {
1688
- path: string;
1689
- content: string;
1690
- }[];
1691
- resetFileVersions: boolean;
1692
- data: {
1693
- toolName: string;
1694
- args: Record<string, string>;
1695
- toolCallId: string;
1696
- };
1697
- }>, z.ZodObject<{
1698
- type: z.ZodLiteral<"terminal-command-result">;
1699
- userInputId: z.ZodString;
1700
- result: z.ZodString;
1701
- }, "strip", z.ZodTypeAny, {
1702
- type: "terminal-command-result";
1703
- result: string;
1704
- userInputId: string;
1705
- }, {
1706
- type: "terminal-command-result";
1707
- result: string;
1708
- userInputId: string;
1709
- }>, z.ZodObject<{
1710
- type: z.ZodLiteral<"npm-version-status">;
1711
- isUpToDate: z.ZodBoolean;
1712
- latestVersion: z.ZodString;
1713
- }, "strip", z.ZodTypeAny, {
1714
- type: "npm-version-status";
1715
- isUpToDate: boolean;
1716
- latestVersion: string;
1717
- }, {
1718
- type: "npm-version-status";
1719
- isUpToDate: boolean;
1720
- latestVersion: string;
1721
- }>, z.ZodObject<z.objectUtil.extendShape<{
1722
- type: z.ZodLiteral<"init-response">;
1723
- }, Omit<{
1724
- type: z.ZodLiteral<"usage-response">;
1725
- usage: z.ZodNumber;
1726
- remainingBalance: z.ZodNumber;
1727
- balanceBreakdown: z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin" | "organization")[]]>, z.ZodNumber>>;
1728
- next_quota_reset: z.ZodNullable<z.ZodDate>;
1729
- autoTopupAdded: z.ZodOptional<z.ZodNumber>;
1730
- }, "type">>, "strip", z.ZodTypeAny, {
1731
- type: "init-response";
1732
- usage: number;
1733
- remainingBalance: number;
1734
- next_quota_reset: Date | null;
1735
- balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
1736
- autoTopupAdded?: number | undefined;
1737
- }, {
1738
- type: "init-response";
1739
- usage: number;
1740
- remainingBalance: number;
1741
- next_quota_reset: Date | null;
1742
- balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
1743
- autoTopupAdded?: number | undefined;
1744
- }>, z.ZodObject<{
1745
- type: z.ZodLiteral<"usage-response">;
1746
- usage: z.ZodNumber;
1747
- remainingBalance: z.ZodNumber;
1748
- balanceBreakdown: z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin" | "organization")[]]>, z.ZodNumber>>;
1749
- next_quota_reset: z.ZodNullable<z.ZodDate>;
1750
- autoTopupAdded: z.ZodOptional<z.ZodNumber>;
1751
- }, "strip", z.ZodTypeAny, {
1752
- type: "usage-response";
1753
- usage: number;
1754
- remainingBalance: number;
1755
- next_quota_reset: Date | null;
1756
- balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
1757
- autoTopupAdded?: number | undefined;
1758
- }, {
1759
- type: "usage-response";
1760
- usage: number;
1761
- remainingBalance: number;
1762
- next_quota_reset: Date | null;
1763
- balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
1764
- autoTopupAdded?: number | undefined;
1765
- }>, z.ZodObject<{
1766
- type: z.ZodLiteral<"message-cost-response">;
1767
- promptId: z.ZodString;
1768
- credits: z.ZodNumber;
1769
- }, "strip", z.ZodTypeAny, {
1770
- type: "message-cost-response";
1771
- promptId: string;
1772
- credits: number;
1773
- }, {
1774
- type: "message-cost-response";
1775
- promptId: string;
1776
- credits: number;
1777
- }>, z.ZodObject<{
1778
- type: z.ZodLiteral<"action-error">;
1779
- message: z.ZodString;
1780
- error: z.ZodOptional<z.ZodString>;
1781
- remainingBalance: z.ZodOptional<z.ZodNumber>;
1782
- }, "strip", z.ZodTypeAny, {
1783
- message: string;
1784
- type: "action-error";
1785
- remainingBalance?: number | undefined;
1786
- error?: string | undefined;
1787
- }, {
1788
- message: string;
1789
- type: "action-error";
1790
- remainingBalance?: number | undefined;
1791
- error?: string | undefined;
1792
- }>, z.ZodObject<{
1793
- type: z.ZodLiteral<"commit-message-response">;
1794
- commitMessage: z.ZodString;
1795
- }, "strip", z.ZodTypeAny, {
1796
- type: "commit-message-response";
1797
- commitMessage: string;
1798
- }, {
1799
- type: "commit-message-response";
1800
- commitMessage: string;
1801
- }>, z.ZodObject<{
1802
- type: z.ZodLiteral<"request-reconnect">;
1803
- }, "strip", z.ZodTypeAny, {
1804
- type: "request-reconnect";
1805
- }, {
1806
- type: "request-reconnect";
1807
- }>]>;
1808
- export type ServerAction = z.infer<typeof SERVER_ACTION_SCHEMA>;
1809
- //# sourceMappingURL=actions.d.ts.map