@opencode/core 2.2.4 → 2.2.6

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 (1359) hide show
  1. package/dist/account/sql.js +1 -1
  2. package/dist/agent.js +94 -94
  3. package/dist/aisdk-native.js +102 -102
  4. package/dist/aisdk.js +108 -108
  5. package/dist/app.js +7 -7
  6. package/dist/artifact.js +252 -244
  7. package/dist/bus.js +86 -86
  8. package/dist/chunks/persistent-pty-02w7mmza.js +94 -0
  9. package/dist/chunks/persistent-pty-04whjz6n.js +157 -0
  10. package/dist/chunks/persistent-pty-05bbevxk.js +169 -0
  11. package/dist/chunks/persistent-pty-063r2xj6.js +115 -0
  12. package/dist/chunks/persistent-pty-08mze6hq.js +113 -0
  13. package/dist/chunks/persistent-pty-091p9y2b.js +31 -0
  14. package/dist/chunks/persistent-pty-0hfrvc9d.js +49 -0
  15. package/dist/chunks/persistent-pty-0kh1sm0k.js +70 -0
  16. package/dist/chunks/persistent-pty-0ma9gw4f.js +38 -0
  17. package/dist/chunks/persistent-pty-0qh3s10f.js +99 -0
  18. package/dist/chunks/persistent-pty-0wpqm2xd.js +392 -0
  19. package/dist/chunks/persistent-pty-108x4f4w.js +22 -0
  20. package/dist/chunks/persistent-pty-126g862n.js +212 -0
  21. package/dist/chunks/persistent-pty-139s3676.js +266 -0
  22. package/dist/chunks/persistent-pty-179sz1m4.js +234 -0
  23. package/dist/chunks/persistent-pty-18aa7g5f.js +62 -0
  24. package/dist/chunks/persistent-pty-18b1hh0p.js +155 -0
  25. package/dist/chunks/persistent-pty-1aqsckx4.js +19 -0
  26. package/dist/chunks/persistent-pty-1b5a5vbs.js +244 -0
  27. package/dist/chunks/persistent-pty-1c3xs91p.js +341 -0
  28. package/dist/chunks/persistent-pty-1g3ebhf2.js +377 -0
  29. package/dist/chunks/persistent-pty-1gdzt2xj.js +29 -0
  30. package/dist/chunks/persistent-pty-1m0c458c.js +328 -0
  31. package/dist/chunks/persistent-pty-1v2g13eq.js +164 -0
  32. package/dist/chunks/persistent-pty-1v9bksbv.js +31 -0
  33. package/dist/chunks/persistent-pty-1w3h7axz.js +247 -0
  34. package/dist/chunks/persistent-pty-1x2knyw4.js +42 -0
  35. package/dist/chunks/persistent-pty-1yq9hg58.js +16 -0
  36. package/dist/chunks/persistent-pty-20z0h3k3.js +126 -0
  37. package/dist/chunks/persistent-pty-22yk7n52.js +205 -0
  38. package/dist/chunks/persistent-pty-253yfw9x.js +571 -0
  39. package/dist/chunks/persistent-pty-25h84942.js +17 -0
  40. package/dist/chunks/persistent-pty-26wfx3k0.js +55 -0
  41. package/dist/chunks/persistent-pty-27w5k9zf.js +18 -0
  42. package/dist/chunks/persistent-pty-2bzha7qh.js +37 -0
  43. package/dist/chunks/persistent-pty-2c6q2ht2.js +69 -0
  44. package/dist/chunks/persistent-pty-2e73aq9t.js +75 -0
  45. package/dist/chunks/persistent-pty-2fc7eemy.js +104 -0
  46. package/dist/chunks/persistent-pty-2hywfv6k.js +74 -0
  47. package/dist/chunks/persistent-pty-2p60zmnr.js +90 -0
  48. package/dist/chunks/persistent-pty-2phsebd4.js +224 -0
  49. package/dist/chunks/persistent-pty-2tjvg1nm.js +115 -0
  50. package/dist/chunks/persistent-pty-2wjcjen9.js +379 -0
  51. package/dist/chunks/persistent-pty-30cb13kd.js +123 -0
  52. package/dist/chunks/persistent-pty-3560wd9z.js +190 -0
  53. package/dist/chunks/persistent-pty-38341fq3.js +580 -0
  54. package/dist/chunks/persistent-pty-38aws4xb.js +43 -0
  55. package/dist/chunks/persistent-pty-3af0jn4w.js +32 -0
  56. package/dist/chunks/persistent-pty-3cbjf1nt.js +17 -0
  57. package/dist/chunks/persistent-pty-3e78ke3k.js +607 -0
  58. package/dist/chunks/persistent-pty-3gkz5e3w.js +446 -0
  59. package/dist/chunks/persistent-pty-3hepkmqq.js +13 -0
  60. package/dist/chunks/persistent-pty-3hr9xkk7.js +413 -0
  61. package/dist/chunks/persistent-pty-3nnrz6f6.js +13 -0
  62. package/dist/chunks/persistent-pty-3tc8hcs6.js +38 -0
  63. package/dist/chunks/persistent-pty-3vyfqjkc.js +197 -0
  64. package/dist/chunks/persistent-pty-3yaf1m62.js +156 -0
  65. package/dist/chunks/persistent-pty-40y6dtc2.js +175 -0
  66. package/dist/chunks/persistent-pty-40za9wsf.js +64 -0
  67. package/dist/chunks/persistent-pty-42w114d2.js +256 -0
  68. package/dist/chunks/persistent-pty-447d319c.js +40 -0
  69. package/dist/chunks/persistent-pty-44dgmqfm.js +748 -0
  70. package/dist/chunks/persistent-pty-44pmzq9c.js +41 -0
  71. package/dist/chunks/persistent-pty-47axnms0.js +204 -0
  72. package/dist/chunks/persistent-pty-4aaqgxak.js +26 -0
  73. package/dist/chunks/persistent-pty-4cstkb4g.js +42 -0
  74. package/dist/chunks/persistent-pty-4dx1dgte.js +16 -0
  75. package/dist/chunks/persistent-pty-4f25tdd0.js +54 -0
  76. package/dist/chunks/persistent-pty-4gbw8m3y.js +79 -0
  77. package/dist/chunks/persistent-pty-4j1xd2sd.js +222 -0
  78. package/dist/chunks/persistent-pty-4pyp9zr9.js +63 -0
  79. package/dist/chunks/persistent-pty-4rjq3p2b.js +107 -0
  80. package/dist/chunks/persistent-pty-4v008n1t.js +13 -0
  81. package/dist/chunks/persistent-pty-4v1x00p5.js +343 -0
  82. package/dist/chunks/persistent-pty-58zqeqzv.js +133 -0
  83. package/dist/chunks/persistent-pty-5c83rc9s.js +121 -0
  84. package/dist/chunks/persistent-pty-5f19tq12.js +319 -0
  85. package/dist/chunks/persistent-pty-5g4hhxfb.js +66 -0
  86. package/dist/chunks/persistent-pty-5hp418gn.js +140 -0
  87. package/dist/chunks/persistent-pty-5m9w47nd.js +21 -0
  88. package/dist/chunks/persistent-pty-5qhj5fv2.js +540 -0
  89. package/dist/chunks/persistent-pty-5w5ynrdw.js +494 -0
  90. package/dist/chunks/persistent-pty-5whx36p1.js +31 -0
  91. package/dist/chunks/persistent-pty-5y7gvv62.js +362 -0
  92. package/dist/chunks/persistent-pty-61qyptys.js +640 -0
  93. package/dist/chunks/persistent-pty-62qdftk9.js +116 -0
  94. package/dist/chunks/persistent-pty-68rpt6xy.js +107 -0
  95. package/dist/chunks/persistent-pty-6a7xpmp2.js +283 -0
  96. package/dist/chunks/persistent-pty-6bshxcsx.js +18 -0
  97. package/dist/chunks/persistent-pty-6mx54qcz.js +98 -0
  98. package/dist/chunks/persistent-pty-6mxnqg1m.js +282 -0
  99. package/dist/chunks/persistent-pty-6pb8p4nk.js +112 -0
  100. package/dist/chunks/persistent-pty-6vzsv6wb.js +213 -0
  101. package/dist/chunks/persistent-pty-716k91av.js +126 -0
  102. package/dist/chunks/persistent-pty-71t3bn24.js +61 -0
  103. package/dist/chunks/persistent-pty-74cafzxh.js +493 -0
  104. package/dist/chunks/persistent-pty-77jpgy83.js +1012 -0
  105. package/dist/chunks/persistent-pty-79dwsby7.js +58 -0
  106. package/dist/chunks/persistent-pty-79k544d0.js +49 -0
  107. package/dist/chunks/persistent-pty-7bmhse3q.js +118 -0
  108. package/dist/chunks/persistent-pty-7fqj4xqa.js +47 -0
  109. package/dist/chunks/persistent-pty-7mkkymnf.js +107 -0
  110. package/dist/chunks/persistent-pty-7q2r88jz.js +37 -0
  111. package/dist/chunks/persistent-pty-7vp8tax7.js +254 -0
  112. package/dist/chunks/persistent-pty-7vrm59b7.js +69 -0
  113. package/dist/chunks/persistent-pty-7w2ypzdf.js +62 -0
  114. package/dist/chunks/persistent-pty-7weczvnd.js +34 -0
  115. package/dist/chunks/persistent-pty-80mg3ag8.js +34 -0
  116. package/dist/chunks/persistent-pty-89287pr7.js +78 -0
  117. package/dist/chunks/persistent-pty-8a1g9q67.js +253 -0
  118. package/dist/chunks/persistent-pty-8b216np8.js +534 -0
  119. package/dist/chunks/persistent-pty-8bcc8xgx.js +262 -0
  120. package/dist/chunks/persistent-pty-8vbzkzg7.js +51 -0
  121. package/dist/chunks/persistent-pty-8vs9m3s4.js +500 -0
  122. package/dist/chunks/persistent-pty-8wtp7s3z.js +14 -0
  123. package/dist/chunks/persistent-pty-8yst3fhc.js +713 -0
  124. package/dist/chunks/persistent-pty-8z6m94af.js +133 -0
  125. package/dist/chunks/persistent-pty-8zv0xmg5.js +2121 -0
  126. package/dist/chunks/persistent-pty-915yv40h.js +128 -0
  127. package/dist/chunks/persistent-pty-94e33dpz.js +52 -0
  128. package/dist/chunks/persistent-pty-9pnznth3.js +22 -0
  129. package/dist/chunks/persistent-pty-9skjx99w.js +75 -0
  130. package/dist/chunks/persistent-pty-9y990azk.js +357 -0
  131. package/dist/chunks/persistent-pty-9zwexsxs.js +75 -0
  132. package/dist/chunks/persistent-pty-a0fq0pbv.js +31 -0
  133. package/dist/chunks/persistent-pty-ac86m9x4.js +416 -0
  134. package/dist/chunks/persistent-pty-aj7mw0zk.js +43 -0
  135. package/dist/chunks/persistent-pty-ampjv2jb.js +36 -0
  136. package/dist/chunks/persistent-pty-aqczazaa.js +16 -0
  137. package/dist/chunks/persistent-pty-av8rh11v.js +38 -0
  138. package/dist/chunks/persistent-pty-azqdag7d.js +26 -0
  139. package/dist/chunks/persistent-pty-b26ddj6h.js +34 -0
  140. package/dist/chunks/persistent-pty-b49tkbc2.js +580 -0
  141. package/dist/chunks/persistent-pty-b6njp3kk.js +307 -0
  142. package/dist/chunks/persistent-pty-bb3mmwvh.js +137 -0
  143. package/dist/chunks/persistent-pty-bbtw6cdp.js +96 -0
  144. package/dist/chunks/persistent-pty-bdrevdsj.js +348 -0
  145. package/dist/chunks/persistent-pty-bhk84baw.js +397 -0
  146. package/dist/chunks/persistent-pty-bhmrqjy3.js +549 -0
  147. package/dist/chunks/persistent-pty-bstexjd6.js +175 -0
  148. package/dist/chunks/persistent-pty-bt4gbfpf.js +52 -0
  149. package/dist/chunks/persistent-pty-c1sfsxsr.js +61 -0
  150. package/dist/chunks/persistent-pty-c4970w7t.js +20 -0
  151. package/dist/chunks/persistent-pty-c78rjr4q.js +108 -0
  152. package/dist/chunks/persistent-pty-c7cw818c.js +383 -0
  153. package/dist/chunks/persistent-pty-c9marekg.js +48 -0
  154. package/dist/chunks/persistent-pty-cfddrtjd.js +33 -0
  155. package/dist/chunks/persistent-pty-cfwct62t.js +141 -0
  156. package/dist/chunks/persistent-pty-cjqsf6bw.js +81 -0
  157. package/dist/chunks/persistent-pty-cmzpbnkd.js +43 -0
  158. package/dist/chunks/persistent-pty-cwrgdav8.js +83 -0
  159. package/dist/chunks/persistent-pty-cyy46ny5.js +73 -0
  160. package/dist/chunks/persistent-pty-d3m38gqf.js +73 -0
  161. package/dist/chunks/persistent-pty-d4v9tmah.js +25 -0
  162. package/dist/chunks/persistent-pty-dgazbzfj.js +119 -0
  163. package/dist/chunks/persistent-pty-dnw0m9wh.js +610 -0
  164. package/dist/chunks/persistent-pty-dt77769w.js +53 -0
  165. package/dist/chunks/persistent-pty-dts6s71t.js +106 -0
  166. package/dist/chunks/persistent-pty-e28sp9vt.js +749 -0
  167. package/dist/chunks/persistent-pty-e47k5bwg.js +108 -0
  168. package/dist/chunks/persistent-pty-e650nmr3.js +81 -0
  169. package/dist/chunks/persistent-pty-e834z07m.js +50 -0
  170. package/dist/chunks/persistent-pty-ea6gy4sr.js +66 -0
  171. package/dist/chunks/persistent-pty-ed89mcv9.js +99 -0
  172. package/dist/chunks/persistent-pty-edw3smvg.js +61 -0
  173. package/dist/chunks/persistent-pty-ehefk9sx.js +564 -0
  174. package/dist/chunks/persistent-pty-epqgzd8x.js +391 -0
  175. package/dist/chunks/persistent-pty-eqw4pqj1.js +48 -0
  176. package/dist/chunks/persistent-pty-ese77s7k.js +134 -0
  177. package/dist/chunks/persistent-pty-etfd2xfv.js +270 -0
  178. package/dist/chunks/persistent-pty-evdawnjk.js +111 -0
  179. package/dist/chunks/persistent-pty-exdy21t0.js +141 -0
  180. package/dist/chunks/persistent-pty-ez4sqtdc.js +7 -0
  181. package/dist/chunks/persistent-pty-f41bhrqc.js +147 -0
  182. package/dist/chunks/persistent-pty-f42awcjt.js +185 -0
  183. package/dist/chunks/persistent-pty-f7dfffjm.js +49 -0
  184. package/dist/chunks/persistent-pty-fbvk52b3.js +155 -0
  185. package/dist/chunks/persistent-pty-fcdwj5wv.js +376 -0
  186. package/dist/chunks/persistent-pty-fd8zwb2b.js +106 -0
  187. package/dist/chunks/persistent-pty-fffv3p7h.js +143 -0
  188. package/dist/chunks/persistent-pty-fg9dj41t.js +82 -0
  189. package/dist/chunks/persistent-pty-fg9p65nk.js +37 -0
  190. package/dist/chunks/persistent-pty-fragmerb.js +97 -0
  191. package/dist/chunks/persistent-pty-fre27jqt.js +331 -0
  192. package/dist/chunks/persistent-pty-fxwkgxhp.js +69 -0
  193. package/dist/chunks/persistent-pty-fyqjjzfm.js +182 -0
  194. package/dist/chunks/persistent-pty-g1e2r5aa.js +41 -0
  195. package/dist/chunks/persistent-pty-g6bb3rsm.js +95 -0
  196. package/dist/chunks/persistent-pty-g8pa3z0a.js +486 -0
  197. package/dist/chunks/persistent-pty-gbjdnr5j.js +72 -0
  198. package/dist/chunks/persistent-pty-ggx84v7x.js +59 -0
  199. package/dist/chunks/persistent-pty-ghrv1g9c.js +38 -0
  200. package/dist/chunks/persistent-pty-gjphqra2.js +184 -0
  201. package/dist/chunks/persistent-pty-gjtfw66n.js +35 -0
  202. package/dist/chunks/persistent-pty-gpewn0m2.js +181 -0
  203. package/dist/chunks/persistent-pty-gs46mg2n.js +36 -0
  204. package/dist/chunks/persistent-pty-gxs71cxp.js +39 -0
  205. package/dist/chunks/persistent-pty-h72zsqxc.js +238 -0
  206. package/dist/chunks/persistent-pty-ha34qwgr.js +74 -0
  207. package/dist/chunks/persistent-pty-hg4s95hg.js +265 -0
  208. package/dist/chunks/persistent-pty-hgzwgvze.js +46 -0
  209. package/dist/chunks/persistent-pty-hhv387f7.js +148 -0
  210. package/dist/chunks/persistent-pty-hq4wsqpj.js +63 -0
  211. package/dist/chunks/persistent-pty-hxtpqtkf.js +96 -0
  212. package/dist/chunks/persistent-pty-hy8c1z76.js +32 -0
  213. package/dist/chunks/persistent-pty-hzww1w63.js +42 -0
  214. package/dist/chunks/persistent-pty-jkdcm5hg.js +31 -0
  215. package/dist/chunks/persistent-pty-jkm37gtj.js +41 -0
  216. package/dist/chunks/persistent-pty-jm70asfg.js +21 -0
  217. package/dist/chunks/persistent-pty-jxjhmx0g.js +321 -0
  218. package/dist/chunks/persistent-pty-kbr5jc0t.js +150 -0
  219. package/dist/chunks/persistent-pty-kj9n5bvh.js +40 -0
  220. package/dist/chunks/persistent-pty-kpf6k8hn.js +152 -0
  221. package/dist/chunks/persistent-pty-krq6hmv5.js +410 -0
  222. package/dist/chunks/persistent-pty-ksqw3zv6.js +159 -0
  223. package/dist/chunks/persistent-pty-kt3bjfbg.js +26 -0
  224. package/dist/chunks/persistent-pty-kzczzf4v.js +25 -0
  225. package/dist/chunks/persistent-pty-kzdam8c6.js +37 -0
  226. package/dist/chunks/persistent-pty-m1714858.js +39 -0
  227. package/dist/chunks/persistent-pty-m3wn1bba.js +242 -0
  228. package/dist/chunks/persistent-pty-m8p3hyhs.js +215 -0
  229. package/dist/chunks/persistent-pty-m9w0rfyh.js +123 -0
  230. package/dist/chunks/persistent-pty-mjr7vcfd.js +71 -0
  231. package/dist/chunks/persistent-pty-mkqdp8ha.js +110 -0
  232. package/dist/chunks/persistent-pty-mvb5kz0b.js +31 -0
  233. package/dist/chunks/persistent-pty-n1tj0n33.js +100 -0
  234. package/dist/chunks/persistent-pty-n3j33rb6.js +216 -0
  235. package/dist/chunks/persistent-pty-n5v4eckm.js +90 -0
  236. package/dist/chunks/persistent-pty-n8b9c2t2.js +224 -0
  237. package/dist/chunks/persistent-pty-ndvwatd1.js +866 -0
  238. package/dist/chunks/persistent-pty-neary136.js +72 -0
  239. package/dist/chunks/persistent-pty-nx4vzyjd.js +37 -0
  240. package/dist/chunks/persistent-pty-nz31z0hk.js +186 -0
  241. package/dist/chunks/persistent-pty-p39nxm9j.js +45 -0
  242. package/dist/chunks/persistent-pty-p76me67c.js +18 -0
  243. package/dist/chunks/persistent-pty-pegdawfa.js +168 -0
  244. package/dist/chunks/persistent-pty-pknna89w.js +18 -0
  245. package/dist/chunks/persistent-pty-pn403w9z.js +228 -0
  246. package/dist/chunks/persistent-pty-pp0vk7bx.js +95 -0
  247. package/dist/chunks/persistent-pty-psrqx85q.js +170 -0
  248. package/dist/chunks/persistent-pty-pyxh12qf.js +57 -0
  249. package/dist/chunks/persistent-pty-q7yqtx4g.js +186 -0
  250. package/dist/chunks/persistent-pty-qc06jdmv.js +84 -0
  251. package/dist/chunks/persistent-pty-qcb2yv2f.js +237 -0
  252. package/dist/chunks/persistent-pty-qgxpp3m1.js +912 -0
  253. package/dist/chunks/persistent-pty-qp7r0hxv.js +120 -0
  254. package/dist/chunks/persistent-pty-qsdghx1p.js +82 -0
  255. package/dist/chunks/persistent-pty-qv961d3z.js +201 -0
  256. package/dist/chunks/persistent-pty-r17fbvme.js +93 -0
  257. package/dist/chunks/persistent-pty-r4br9955.js +279 -0
  258. package/dist/chunks/persistent-pty-r7b5bm8a.js +724 -0
  259. package/dist/chunks/persistent-pty-raaxx34n.js +117 -0
  260. package/dist/chunks/persistent-pty-rb9dy4dg.js +116 -0
  261. package/dist/chunks/persistent-pty-rcknebtx.js +86 -0
  262. package/dist/chunks/persistent-pty-rds0tsa1.js +35 -0
  263. package/dist/chunks/persistent-pty-re1rxjfh.js +202 -0
  264. package/dist/chunks/persistent-pty-rfyjn97v.js +88 -0
  265. package/dist/chunks/persistent-pty-rgc9cx3e.js +159 -0
  266. package/dist/chunks/persistent-pty-rj7j5fvs.js +67 -0
  267. package/dist/chunks/persistent-pty-rt4c92wf.js +459 -0
  268. package/dist/chunks/persistent-pty-rt5dr6hb.js +14 -0
  269. package/dist/chunks/persistent-pty-rwa0zg28.js +200 -0
  270. package/dist/chunks/persistent-pty-s0vfhqf8.js +85 -0
  271. package/dist/chunks/persistent-pty-s13c6xdk.js +53 -0
  272. package/dist/chunks/persistent-pty-s52sj0vg.js +78 -0
  273. package/dist/chunks/persistent-pty-s9dah0n5.js +113 -0
  274. package/dist/chunks/persistent-pty-sbya78hr.js +67 -0
  275. package/dist/chunks/persistent-pty-scnaqsdw.js +329 -0
  276. package/dist/chunks/persistent-pty-sd11ez4q.js +137 -0
  277. package/dist/chunks/persistent-pty-sd18byeb.js +272 -0
  278. package/dist/chunks/persistent-pty-sdqab33b.js +56 -0
  279. package/dist/chunks/persistent-pty-sp4qy80f.js +195 -0
  280. package/dist/chunks/persistent-pty-sqjzf8x2.js +41 -0
  281. package/dist/chunks/persistent-pty-svcy3p9a.js +38 -0
  282. package/dist/chunks/persistent-pty-sx27kt80.js +367 -0
  283. package/dist/chunks/persistent-pty-sx6js29a.js +800 -0
  284. package/dist/chunks/persistent-pty-syrav9an.js +63 -0
  285. package/dist/chunks/persistent-pty-szv14q3q.js +226 -0
  286. package/dist/chunks/persistent-pty-t0fj6fhw.js +51 -0
  287. package/dist/chunks/persistent-pty-t7w3ew5t.js +56 -0
  288. package/dist/chunks/persistent-pty-tbpn7jtk.js +129 -0
  289. package/dist/chunks/persistent-pty-tbqeaccv.js +215 -0
  290. package/dist/chunks/persistent-pty-tczq8hjw.js +25 -0
  291. package/dist/chunks/persistent-pty-tqjf3tfw.js +164 -0
  292. package/dist/chunks/persistent-pty-tr8x705m.js +22 -0
  293. package/dist/chunks/persistent-pty-tt3j66xn.js +46 -0
  294. package/dist/chunks/persistent-pty-tvtps2q9.js +40 -0
  295. package/dist/chunks/persistent-pty-tvvbs049.js +351 -0
  296. package/dist/chunks/persistent-pty-twssxy5n.js +170 -0
  297. package/dist/chunks/persistent-pty-tycv7n3a.js +165 -0
  298. package/dist/chunks/persistent-pty-tz26yf19.js +302 -0
  299. package/dist/chunks/persistent-pty-v0t28k2a.js +42 -0
  300. package/dist/chunks/persistent-pty-v0t96s7a.js +31 -0
  301. package/dist/chunks/persistent-pty-v2r1d0zg.js +86 -0
  302. package/dist/chunks/persistent-pty-v8vd993n.js +31 -0
  303. package/dist/chunks/persistent-pty-v9p61gnn.js +111 -0
  304. package/dist/chunks/persistent-pty-vdzf4xkw.js +153 -0
  305. package/dist/chunks/persistent-pty-vhanev6b.js +65 -0
  306. package/dist/chunks/persistent-pty-vjf35v1f.js +110 -0
  307. package/dist/chunks/persistent-pty-vkgj1s7v.js +72 -0
  308. package/dist/chunks/persistent-pty-vna9bx5y.js +401 -0
  309. package/dist/chunks/persistent-pty-vre17ymf.js +54 -0
  310. package/dist/chunks/persistent-pty-vt4r9rmy.js +53 -0
  311. package/dist/chunks/persistent-pty-vtzwm7wz.js +271 -0
  312. package/dist/chunks/persistent-pty-vx4x93jt.js +111 -0
  313. package/dist/chunks/persistent-pty-w0yw3hk3.js +40 -0
  314. package/dist/chunks/persistent-pty-w3wsvvr9.js +80 -0
  315. package/dist/chunks/persistent-pty-w9y1n7x1.js +28 -0
  316. package/dist/chunks/persistent-pty-wakvkjy4.js +79 -0
  317. package/dist/chunks/persistent-pty-wccfsw9j.js +183 -0
  318. package/dist/chunks/persistent-pty-wd87259q.js +102 -0
  319. package/dist/chunks/persistent-pty-wffzgpss.js +198 -0
  320. package/dist/chunks/persistent-pty-wgv42xfv.js +38 -0
  321. package/dist/chunks/persistent-pty-wr3re1en.js +22 -0
  322. package/dist/chunks/persistent-pty-ws7ae7qy.js +140 -0
  323. package/dist/chunks/persistent-pty-wz6tr7e6.js +46 -0
  324. package/dist/chunks/persistent-pty-x0sht1dz.js +184 -0
  325. package/dist/chunks/persistent-pty-x15v0mgj.js +173 -0
  326. package/dist/chunks/persistent-pty-x4mcewfn.js +450 -0
  327. package/dist/chunks/persistent-pty-x4th4bpe.js +24 -0
  328. package/dist/chunks/persistent-pty-xacr7438.js +156 -0
  329. package/dist/chunks/persistent-pty-xcr721py.js +343 -0
  330. package/dist/chunks/persistent-pty-xhx4xmx5.js +324 -0
  331. package/dist/chunks/persistent-pty-xjr6c8m4.js +37 -0
  332. package/dist/chunks/persistent-pty-xksw6ev0.js +28 -0
  333. package/dist/chunks/persistent-pty-xmx7xj34.js +21 -0
  334. package/dist/chunks/persistent-pty-xne834js.js +201 -0
  335. package/dist/chunks/persistent-pty-xq0509ej.js +42 -0
  336. package/dist/chunks/persistent-pty-xqn8r9n8.js +72 -0
  337. package/dist/chunks/persistent-pty-xvrjkejx.js +49 -0
  338. package/dist/chunks/persistent-pty-y80jy5b1.js +588 -0
  339. package/dist/chunks/persistent-pty-yb20nhc3.js +229 -0
  340. package/dist/chunks/persistent-pty-yb5mamag.js +185 -0
  341. package/dist/chunks/persistent-pty-yd0yae03.js +86 -0
  342. package/dist/chunks/persistent-pty-ye0egtn0.js +148 -0
  343. package/dist/chunks/persistent-pty-ye7szg1w.js +424 -0
  344. package/dist/chunks/persistent-pty-yepd7x5v.js +94 -0
  345. package/dist/chunks/persistent-pty-yqtep7re.js +82 -0
  346. package/dist/chunks/persistent-pty-yr705xyq.js +17 -0
  347. package/dist/chunks/persistent-pty-yvtc2x31.js +42 -0
  348. package/dist/chunks/persistent-pty-z0h12gs8.js +216 -0
  349. package/dist/chunks/persistent-pty-zcqrttz9.js +39 -0
  350. package/dist/chunks/persistent-pty-ze75qvmd.js +107 -0
  351. package/dist/chunks/persistent-pty-zkcqrzys.js +145 -0
  352. package/dist/chunks/persistent-pty-zmrqqrgv.js +143 -0
  353. package/dist/chunks/persistent-pty-zpbb9x1s.js +269 -0
  354. package/dist/chunks/persistent-pty-zpdbqgja.js +64 -0
  355. package/dist/chunks/persistent-pty-zwamn6nj.js +122 -0
  356. package/dist/chunks/persistent-pty-zxpyjp51.js +668 -0
  357. package/dist/codemode/catalog.js +1 -1
  358. package/dist/codemode/execution.js +3 -3
  359. package/dist/codemode/fetch.js +150 -145
  360. package/dist/codemode/instructions.js +9 -9
  361. package/dist/codemode/tool.js +155 -151
  362. package/dist/command.js +94 -94
  363. package/dist/config/discovery.js +95 -95
  364. package/dist/config/integration.js +3 -3
  365. package/dist/config/managed.js +1 -1
  366. package/dist/config/markdown.js +1 -1
  367. package/dist/config/normalize.js +112 -112
  368. package/dist/config/plugin/agent.js +131 -130
  369. package/dist/config/plugin/command.js +238 -229
  370. package/dist/config/plugin/compaction.js +173 -171
  371. package/dist/config/plugin/compatibility.js +153 -150
  372. package/dist/config/plugin/entry-observer.js +6 -2
  373. package/dist/config/plugin/formatter.js +131 -131
  374. package/dist/config/plugin/image.js +130 -130
  375. package/dist/config/plugin/instruction.js +130 -130
  376. package/dist/config/plugin/location-watcher.js +132 -132
  377. package/dist/config/plugin/mcp.js +143 -139
  378. package/dist/config/plugin/policy.js +130 -130
  379. package/dist/config/plugin/provider.js +132 -132
  380. package/dist/config/plugin/reference.js +132 -132
  381. package/dist/config/plugin/shell.js +132 -132
  382. package/dist/config/plugin/skill-file.js +149 -146
  383. package/dist/config/plugin/skill-scan.js +1 -1
  384. package/dist/config/plugin/skill.js +156 -153
  385. package/dist/config/plugin/snapshot.js +130 -130
  386. package/dist/config/plugin/source.js +134 -133
  387. package/dist/config/plugin/tool-output.js +131 -131
  388. package/dist/config/plugin/websearch.js +131 -131
  389. package/dist/config/plugin/worktree.js +132 -132
  390. package/dist/config/variable.js +1 -1
  391. package/dist/config/watch.js +1 -1
  392. package/dist/config.js +135 -135
  393. package/dist/console-access.js +1 -1
  394. package/dist/credential/sql.js +2 -2
  395. package/dist/credential.js +94 -94
  396. package/dist/database/batch.js +12 -0
  397. package/dist/database/database.js +85 -85
  398. package/dist/database/drizzle/effect-sqlite/driver.js +12 -12
  399. package/dist/database/drizzle/effect-sqlite/index.js +12 -12
  400. package/dist/database/drizzle/effect-sqlite/session.js +11 -11
  401. package/dist/database/drizzle/index.js +13 -13
  402. package/dist/database/drizzle/internal/drizzle-utils.js +1 -1
  403. package/dist/database/drizzle/sqlite-core/effect/count.js +1 -1
  404. package/dist/database/drizzle/sqlite-core/effect/db.js +9 -9
  405. package/dist/database/drizzle/sqlite-core/effect/delete.js +2 -2
  406. package/dist/database/drizzle/sqlite-core/effect/index.js +10 -10
  407. package/dist/database/drizzle/sqlite-core/effect/insert.js +2 -2
  408. package/dist/database/drizzle/sqlite-core/effect/query.js +1 -1
  409. package/dist/database/drizzle/sqlite-core/effect/raw.js +1 -1
  410. package/dist/database/drizzle/sqlite-core/effect/select.js +2 -2
  411. package/dist/database/drizzle/sqlite-core/effect/session.js +10 -10
  412. package/dist/database/drizzle/sqlite-core/effect/update.js +2 -2
  413. package/dist/database/drizzle.js +14 -14
  414. package/dist/database/migration/20260127222353_familiar_lady_ursula.js +1 -1
  415. package/dist/database/migration/20260211171708_add_project_commands.js +1 -1
  416. package/dist/database/migration/20260213144116_wakeful_the_professor.js +1 -1
  417. package/dist/database/migration/20260225215848_workspace.js +1 -1
  418. package/dist/database/migration/20260227213759_add_session_workspace_id.js +1 -1
  419. package/dist/database/migration/20260228203230_blue_harpoon.js +1 -1
  420. package/dist/database/migration/20260303231226_add_workspace_fields.js +1 -1
  421. package/dist/database/migration/20260309230000_move_org_to_state.js +1 -1
  422. package/dist/database/migration/20260312043431_session_message_cursor.js +1 -1
  423. package/dist/database/migration/20260323234822_events.js +1 -1
  424. package/dist/database/migration/20260410174513_workspace-name.js +1 -1
  425. package/dist/database/migration/20260413175956_chief_energizer.js +1 -1
  426. package/dist/database/migration/20260423070820_add_icon_url_override.js +1 -1
  427. package/dist/database/migration/20260427172553_slow_nightmare.js +1 -1
  428. package/dist/database/migration/20260428004200_add_session_path.js +1 -1
  429. package/dist/database/migration/20260501142318_next_venus.js +1 -1
  430. package/dist/database/migration/20260504145000_add_sync_owner.js +1 -1
  431. package/dist/database/migration/20260507164347_add_workspace_time.js +1 -1
  432. package/dist/database/migration/20260510033149_session_usage.js +1 -1
  433. package/dist/database/migration/20260511000411_data_migration_state.js +1 -1
  434. package/dist/database/migration/20260511173437_session-metadata.js +1 -1
  435. package/dist/database/migration/20260601010001_normalize_storage_paths.js +1 -1
  436. package/dist/database/migration/20260601202201_amazing_prowler.js +1 -1
  437. package/dist/database/migration/20260602002951_lowly_union_jack.js +1 -1
  438. package/dist/database/migration/20260602182828_add_project_directories.js +1 -1
  439. package/dist/database/migration/20260603001617_session_message_projection_indexes.js +1 -1
  440. package/dist/database/migration/20260603040000_session_message_projection_order.js +1 -1
  441. package/dist/database/migration/20260603141458_session_input_inbox.js +1 -1
  442. package/dist/database/migration/20260603160727_jittery_ezekiel_stane.js +1 -1
  443. package/dist/database/migration/20260604172448_event_sourced_session_input.js +1 -1
  444. package/dist/database/migration/20260605003541_add_session_context_snapshot.js +1 -1
  445. package/dist/database/migration/20260605042240_add_context_epoch_agent.js +1 -1
  446. package/dist/database/migration/20260611035744_credential.js +1 -1
  447. package/dist/database/migration/20260611192811_lush_chimera.js +1 -1
  448. package/dist/database/migration/20260612174303_project_dir_strategy.js +1 -1
  449. package/dist/database/migration/20260622142730_simplify_session_context_epoch.js +1 -1
  450. package/dist/database/migration/20260622170816_reset_v2_session_state.js +1 -1
  451. package/dist/database/migration/20260622202450_simplify_session_input.js +1 -1
  452. package/dist/database/migration/20260804233008_loose_psylocke.js +1 -1
  453. package/dist/database/migration/20260805200742_import_legacy_credentials.js +1 -1
  454. package/dist/database/migration/20260808023530_workspace_domain.js +1 -1
  455. package/dist/database/migration/20260811161259_execution_claim_attempts.js +1 -1
  456. package/dist/database/migration/20260812181746_session_inbox.js +1 -1
  457. package/dist/database/migration/20260812213948_worktree.js +1 -1
  458. package/dist/database/migration/20260819222447_session_viewed_state.js +1 -1
  459. package/dist/database/migration/20260823191254_nullable_workspace_binding.js +1 -1
  460. package/dist/database/migration/20260910120000_clear_v1_session_permission.js +1 -1
  461. package/dist/database/migration/20260923013825_project_time_active.js +1 -1
  462. package/dist/database/migration/20261007190000_azure_cli_external_credential.js +1 -1
  463. package/dist/database/migration/20261010180456_project_time_archived.js +1 -1
  464. package/dist/database/migration/20261024002554_session_allowance.js +1 -1
  465. package/dist/database/migration/20261024175301_drop_session_allowance.js +1 -1
  466. package/dist/database/migration/20261025123711_blob.js +1 -1
  467. package/dist/database/migration/20261025154125_drop_session_pending.js +1 -1
  468. package/dist/database/migration/20261026223005_schedule.js +1 -1
  469. package/dist/database/migration/20261029002625_session_part.js +1 -1
  470. package/dist/database/migration/20261029073502_session_time_busy.js +1 -1
  471. package/dist/database/migration/20261029165540_schedule_checks.js +1 -1
  472. package/dist/database/migration/20261030054400_job.js +1 -1
  473. package/dist/database/migration.gen.js +60 -60
  474. package/dist/database/migration.js +76 -62
  475. package/dist/database/path.js +2 -2
  476. package/dist/database/schema.gen.js +1 -1
  477. package/dist/database/schema.sql.js +1 -1
  478. package/dist/database/sqlite.bun.js +3 -71
  479. package/dist/database/sqlite.node.js +3 -67
  480. package/dist/database/sqlite.workerd.js +12 -19
  481. package/dist/database/v1-migration.bun.js +108 -108
  482. package/dist/database/v1-migration.js +1 -1
  483. package/dist/effect/app-node-builder.js +440 -428
  484. package/dist/effect/app-node-platform.js +2 -2
  485. package/dist/effect/keyed-mutex.js +3 -3
  486. package/dist/effect/websocket-constructor.js +1 -1
  487. package/dist/environment/driver.js +1 -1
  488. package/dist/environment/environment.js +107 -108
  489. package/dist/environment/exec-defaults.js +5 -3
  490. package/dist/environment/files.js +1 -1
  491. package/dist/environment/index.js +112 -110
  492. package/dist/environment/local.js +2 -2
  493. package/dist/environment/memory.js +2 -2
  494. package/dist/environment/unavailable.js +3 -3
  495. package/dist/event/sql.js +1 -1
  496. package/dist/event-logger.js +85 -85
  497. package/dist/file-access.js +160 -156
  498. package/dist/file-mutation.js +110 -107
  499. package/dist/file-retention.js +1 -1
  500. package/dist/file-write.js +169 -0
  501. package/dist/filesystem/fff.bun.js +2 -2
  502. package/dist/filesystem/fff.js +1 -1
  503. package/dist/filesystem/fff.node.js +2 -2
  504. package/dist/filesystem/fff.workerd.js +2 -2
  505. package/dist/filesystem/file-watch.js +91 -91
  506. package/dist/filesystem/location-watcher-policy.js +6 -6
  507. package/dist/filesystem/location-watcher.js +253 -245
  508. package/dist/filesystem/protected.js +2 -4
  509. package/dist/filesystem/search.js +113 -112
  510. package/dist/filesystem/watcher-binding.js +1 -1
  511. package/dist/filesystem/watcher.js +13 -13
  512. package/dist/filesystem.js +116 -115
  513. package/dist/flag.js +142 -0
  514. package/dist/form.js +95 -95
  515. package/dist/formatter/builtins.js +4 -4
  516. package/dist/formatter.js +98 -98
  517. package/dist/generate.js +116 -116
  518. package/dist/git.js +11 -11
  519. package/dist/github-copilot/chat/convert-to-openai-compatible-chat-messages.js +1 -1
  520. package/dist/github-copilot/chat/get-response-metadata.js +1 -1
  521. package/dist/github-copilot/chat/map-openai-compatible-finish-reason.js +1 -1
  522. package/dist/github-copilot/chat/openai-compatible-chat-language-model.js +7 -7
  523. package/dist/github-copilot/chat/openai-compatible-chat-options.js +1 -1
  524. package/dist/github-copilot/chat/openai-compatible-prepare-tools.js +1 -1
  525. package/dist/github-copilot/copilot-provider.js +17 -17
  526. package/dist/github-copilot/models.js +112 -112
  527. package/dist/github-copilot/openai-compatible-error.js +1 -1
  528. package/dist/github-copilot/responses/convert-to-openai-responses-input.js +1 -1
  529. package/dist/github-copilot/responses/map-openai-responses-finish-reason.js +1 -1
  530. package/dist/github-copilot/responses/openai-error.js +1 -1
  531. package/dist/github-copilot/responses/openai-responses-language-model.js +10 -10
  532. package/dist/github-copilot/responses/openai-responses-prepare-tools.js +6 -6
  533. package/dist/github-copilot/responses/tool/code-interpreter.js +3 -7
  534. package/dist/github-copilot/responses/tool/file-search.js +2 -4
  535. package/dist/github-copilot/responses/tool/image-generation.js +1 -1
  536. package/dist/github-copilot/responses/tool/web-search-preview.js +1 -1
  537. package/dist/github-copilot/responses/tool/web-search.js +1 -1
  538. package/dist/image/notice.js +3 -3
  539. package/dist/image/photon-normalize.js +1 -1
  540. package/dist/image/photon-worker.js +1 -1
  541. package/dist/image/photon.js +4 -4
  542. package/dist/image.js +6 -6
  543. package/dist/instance/service.js +5 -5
  544. package/dist/instance.js +431 -419
  545. package/dist/instruction-discovery.js +95 -95
  546. package/dist/instructions/builtins.js +100 -100
  547. package/dist/instructions/index.js +7 -5
  548. package/dist/integration/connection.js +7 -7
  549. package/dist/integration.js +100 -100
  550. package/dist/job/list.js +12 -0
  551. package/dist/job/recovery.js +7 -0
  552. package/dist/job/sql.js +2 -2
  553. package/dist/job.js +90 -88
  554. package/dist/kv/sql.js +2 -2
  555. package/dist/kv.js +84 -84
  556. package/dist/location-activity.js +193 -181
  557. package/dist/location-lifecycle.js +153 -150
  558. package/dist/location-service-map.js +99 -99
  559. package/dist/location-services.js +428 -416
  560. package/dist/location.js +102 -102
  561. package/dist/managed-policy.js +3 -3
  562. package/dist/mcp/client.js +261 -153
  563. package/dist/mcp/connection.js +111 -0
  564. package/dist/mcp/index.js +120 -116
  565. package/dist/mcp/instructions.js +187 -179
  566. package/dist/mcp/oauth.js +141 -125
  567. package/dist/mcp/pool.js +119 -0
  568. package/dist/mcp/socket-client.js +2 -4
  569. package/dist/mcp/stdio.js +160 -104
  570. package/dist/mime.js +1 -1
  571. package/dist/modal/models.js +112 -112
  572. package/dist/model-resolver.js +112 -112
  573. package/dist/model-retry.js +5 -1
  574. package/dist/model.js +113 -113
  575. package/dist/models-dev/v1.js +1 -1
  576. package/dist/models-dev.js +121 -121
  577. package/dist/oauth/page.js +1 -1
  578. package/dist/permission/saved.js +87 -87
  579. package/dist/permission/sql.js +5 -5
  580. package/dist/permission.js +154 -149
  581. package/dist/persistent-pty/binary.bun.js +1 -1
  582. package/dist/persistent-pty/daemon.js +1 -1
  583. package/dist/persistent-pty/index.js +99 -99
  584. package/dist/persistent-pty/pty-binding.js +1 -1
  585. package/dist/persistent-pty.js +86 -86
  586. package/dist/plugin/agent.js +85 -85
  587. package/dist/plugin/command.js +117 -113
  588. package/dist/plugin/goal.js +3 -3
  589. package/dist/plugin/hooks.js +5 -5
  590. package/dist/plugin/host.js +244 -236
  591. package/dist/plugin/identity.js +5 -5
  592. package/dist/plugin/instance.js +5 -5
  593. package/dist/plugin/internal.js +407 -395
  594. package/dist/plugin/mcp-codemode-defaults.js +3 -3
  595. package/dist/plugin/models-dev.js +110 -110
  596. package/dist/plugin/module.js +131 -129
  597. package/dist/plugin/optimize.js +2 -2
  598. package/dist/plugin/plan.js +149 -146
  599. package/dist/plugin/promise.js +1 -1
  600. package/dist/plugin/provider/amazon-bedrock.js +106 -104
  601. package/dist/plugin/provider/azure.js +133 -130
  602. package/dist/plugin/provider/cerebras.js +1 -1
  603. package/dist/plugin/provider/chatgpt.js +133 -130
  604. package/dist/plugin/provider/claude-agent/aisdk.js +117 -117
  605. package/dist/plugin/provider/claude-agent/claude/fork.js +2 -2
  606. package/dist/plugin/provider/claude-agent/claude/io.js +4 -4
  607. package/dist/plugin/provider/claude-agent/claude/probe.js +2 -2
  608. package/dist/plugin/provider/claude-agent/claude/query-options.js +4 -4
  609. package/dist/plugin/provider/claude-agent/claude/sdk.js +3 -3
  610. package/dist/plugin/provider/claude-agent/claude/session.js +4 -4
  611. package/dist/plugin/provider/claude-agent/claude/sessions.js +16 -16
  612. package/dist/plugin/provider/claude-agent/claude/status.js +9 -9
  613. package/dist/plugin/provider/claude-agent/index.js +148 -145
  614. package/dist/plugin/provider/claude-agent/instructions.js +112 -112
  615. package/dist/plugin/provider/claude-agent/integration.js +113 -111
  616. package/dist/plugin/provider/claude-agent/language-model/claude-agent-error.js +3 -3
  617. package/dist/plugin/provider/claude-agent/language-model/claude-agent-language-model.js +7 -7
  618. package/dist/plugin/provider/claude-agent/language-model/convert-claude-stream.js +6 -6
  619. package/dist/plugin/provider/claude-agent/language-model/convert-to-claude-message.js +1 -1
  620. package/dist/plugin/provider/claude-agent/language-model/request-kind.js +1 -1
  621. package/dist/plugin/provider/claude-agent/language-model/system-prompt.js +3 -3
  622. package/dist/plugin/provider/claude-agent/language-model/usage.js +3 -3
  623. package/dist/plugin/provider/claude-agent/provider.js +112 -112
  624. package/dist/plugin/provider/claude-agent/session.js +112 -112
  625. package/dist/plugin/provider/claude-agent/sync/catch-up.js +3 -3
  626. package/dist/plugin/provider/claude-agent/sync/checkpoints.js +2 -2
  627. package/dist/plugin/provider/claude-agent/sync/decide.js +2 -2
  628. package/dist/plugin/provider/claude-agent/sync/fingerprint.js +1 -1
  629. package/dist/plugin/provider/claude-agent/sync/record.js +1 -1
  630. package/dist/plugin/provider/claude-agent/tools/hooks.js +3 -3
  631. package/dist/plugin/provider/claude-agent/tools/names.js +1 -1
  632. package/dist/plugin/provider/claude-agent/tools/pending.js +3 -3
  633. package/dist/plugin/provider/claude-agent/tools/result.js +3 -3
  634. package/dist/plugin/provider/claude-agent/tools/server.js +4 -4
  635. package/dist/plugin/provider/cloudflare-ai-gateway.js +130 -128
  636. package/dist/plugin/provider/cloudflare-workers-ai.js +130 -128
  637. package/dist/plugin/provider/configured.js +126 -126
  638. package/dist/plugin/provider/credential-settings.js +90 -85
  639. package/dist/plugin/provider/databricks.js +1 -1
  640. package/dist/plugin/provider/digitalocean.js +109 -106
  641. package/dist/plugin/provider/dynamic.js +2 -2
  642. package/dist/plugin/provider/github-copilot.js +111 -108
  643. package/dist/plugin/provider/gitlab.js +109 -107
  644. package/dist/plugin/provider/google-vertex.js +127 -127
  645. package/dist/plugin/provider/kilo.js +1 -1
  646. package/dist/plugin/provider/llmgateway.js +89 -89
  647. package/dist/plugin/provider/lmstudio.js +140 -139
  648. package/dist/plugin/provider/local.js +137 -136
  649. package/dist/plugin/provider/modal.js +108 -105
  650. package/dist/plugin/provider/neon.js +1 -1
  651. package/dist/plugin/provider/nvidia.js +1 -1
  652. package/dist/plugin/provider/ollama.js +140 -139
  653. package/dist/plugin/provider/openai-context-caps.js +106 -103
  654. package/dist/plugin/provider/openai.js +133 -130
  655. package/dist/plugin/provider/opencode.js +159 -132
  656. package/dist/plugin/provider/openrouter.js +104 -104
  657. package/dist/plugin/provider/poe.js +90 -90
  658. package/dist/plugin/provider/prompt-cache-key.js +1 -1
  659. package/dist/plugin/provider/refresh.js +100 -0
  660. package/dist/plugin/provider/sap-ai-core.js +104 -104
  661. package/dist/plugin/provider/sdk-factory.js +1 -1
  662. package/dist/plugin/provider/snowflake-cortex.js +131 -129
  663. package/dist/plugin/provider/vllm.js +138 -137
  664. package/dist/plugin/provider/xai.js +104 -104
  665. package/dist/plugin/provider/zenmux.js +1 -1
  666. package/dist/plugin/provider.js +237 -210
  667. package/dist/plugin/sdk.js +89 -89
  668. package/dist/plugin/service.js +3 -3
  669. package/dist/plugin/skill.js +150 -147
  670. package/dist/plugin/source-directory.js +1 -1
  671. package/dist/plugin/supervisor.js +415 -403
  672. package/dist/plugin/tool-input-repair.js +4 -4
  673. package/dist/plugin/update.js +2 -2
  674. package/dist/plugin/vcs/git.js +99 -99
  675. package/dist/plugin/vcs/hg.js +99 -99
  676. package/dist/plugin/verbosity.js +106 -106
  677. package/dist/plugin/warming.js +130 -128
  678. package/dist/plugin/websearch/exa.js +6 -5
  679. package/dist/plugin/websearch/firecrawl.js +7 -6
  680. package/dist/plugin/websearch/index.js +10 -9
  681. package/dist/plugin/websearch/mcp.js +2 -2
  682. package/dist/plugin/websearch/parallel.js +9 -8
  683. package/dist/plugin/websearch/provider.js +8 -0
  684. package/dist/plugin/websearch/tavily.js +7 -6
  685. package/dist/plugin/websearch/tinyfish.js +9 -8
  686. package/dist/plugin.js +255 -247
  687. package/dist/project/icon.js +5 -5
  688. package/dist/project/schema.js +8 -8
  689. package/dist/project/sql.js +4 -4
  690. package/dist/project.js +107 -103
  691. package/dist/provider.js +114 -114
  692. package/dist/pty/protocol.js +1 -1
  693. package/dist/pty/ticket.js +1 -1
  694. package/dist/pty.js +113 -113
  695. package/dist/reference/instructions.js +99 -99
  696. package/dist/reference.js +101 -101
  697. package/dist/repository-cache.js +93 -93
  698. package/dist/repository.js +1 -1
  699. package/dist/ripgrep/binary.js +2 -2
  700. package/dist/ripgrep.js +109 -108
  701. package/dist/rpc.js +99 -99
  702. package/dist/schedule/check.js +249 -241
  703. package/dist/schedule/sql.js +6 -6
  704. package/dist/schedule.js +263 -255
  705. package/dist/schema.js +1 -1
  706. package/dist/session/affinity.js +1 -1
  707. package/dist/session/background.js +3 -1
  708. package/dist/session/blob.js +136 -131
  709. package/dist/session/command.js +85 -85
  710. package/dist/session/compaction.js +175 -173
  711. package/dist/session/context.js +203 -196
  712. package/dist/session/diff.js +101 -101
  713. package/dist/session/environment.js +5 -5
  714. package/dist/session/error.js +3 -3
  715. package/dist/session/event.js +1 -1
  716. package/dist/session/execution/restart.js +254 -246
  717. package/dist/session/execution.js +167 -161
  718. package/dist/session/generate.js +204 -198
  719. package/dist/session/history.js +143 -138
  720. package/dist/session/inbox.js +150 -147
  721. package/dist/session/info.js +3 -3
  722. package/dist/session/instruction-entry.js +88 -88
  723. package/dist/session/instruction-state.js +8 -8
  724. package/dist/session/instructions.js +144 -141
  725. package/dist/session/message-updater.js +2 -2
  726. package/dist/session/message.js +1 -1
  727. package/dist/session/model-request.js +171 -168
  728. package/dist/session/model-transport.js +9 -9
  729. package/dist/session/move.js +171 -165
  730. package/dist/session/projector.js +146 -143
  731. package/dist/session/prompt.js +151 -148
  732. package/dist/session/recent-text.js +1 -1
  733. package/dist/session/revert.js +142 -139
  734. package/dist/session/run-coordinator.js +1 -1
  735. package/dist/session/runner/index.js +3 -3
  736. package/dist/session/runner/llm.js +258 -250
  737. package/dist/session/runner/max-steps.js +1 -1
  738. package/dist/session/runner/model.js +113 -113
  739. package/dist/session/runner/publish-llm-event.js +153 -149
  740. package/dist/session/runner/retry.js +3 -3
  741. package/dist/session/runner/step.js +166 -163
  742. package/dist/session/runner/to-llm-message.js +140 -137
  743. package/dist/session/schema.js +5 -5
  744. package/dist/session/session.js +188 -181
  745. package/dist/session/shell.js +147 -146
  746. package/dist/session/skill.js +150 -147
  747. package/dist/session/sql.js +5 -5
  748. package/dist/session/stats.js +92 -92
  749. package/dist/session/store.js +145 -142
  750. package/dist/session/stored.js +2 -2
  751. package/dist/session/subagent-completion.js +3 -3
  752. package/dist/session/subagent-job.js +237 -229
  753. package/dist/session/system-prompt.js +5 -5
  754. package/dist/session/title.js +207 -200
  755. package/dist/session/to-session-error.js +152 -148
  756. package/dist/session/transfer.js +256 -245
  757. package/dist/session/usage.js +1 -1
  758. package/dist/session.js +239 -231
  759. package/dist/shared-cache.js +16 -0
  760. package/dist/shell/parse.js +6 -6
  761. package/dist/shell/result.js +1 -1
  762. package/dist/shell/scan.js +1 -1
  763. package/dist/shell/select.js +15 -15
  764. package/dist/shell.js +147 -146
  765. package/dist/skill/discovery.js +10 -6
  766. package/dist/skill/instructions.js +154 -151
  767. package/dist/skill.js +162 -155
  768. package/dist/snapshot.js +100 -100
  769. package/dist/state.js +1 -1
  770. package/dist/tool/html-markdown.js +1 -1
  771. package/dist/tool/http-body.js +1 -1
  772. package/dist/tool/mcp.js +184 -176
  773. package/dist/tool/plugin/artifact.js +236 -228
  774. package/dist/tool/plugin/edit.js +170 -164
  775. package/dist/tool/plugin/file-diff.js +1 -1
  776. package/dist/tool/plugin/glob.js +174 -168
  777. package/dist/tool/plugin/grep.js +173 -168
  778. package/dist/tool/plugin/image-generate.js +247 -239
  779. package/dist/tool/plugin/mcp-resource.js +169 -162
  780. package/dist/tool/plugin/opencode.js +166 -161
  781. package/dist/tool/plugin/patch.js +171 -166
  782. package/dist/tool/plugin/question.js +147 -144
  783. package/dist/tool/plugin/read.js +175 -169
  784. package/dist/tool/plugin/schedule.js +255 -247
  785. package/dist/tool/plugin/shell.js +243 -235
  786. package/dist/tool/plugin/skill.js +160 -157
  787. package/dist/tool/plugin/subagent.js +244 -236
  788. package/dist/tool/plugin/todo.js +156 -153
  789. package/dist/tool/plugin/webfetch.js +158 -155
  790. package/dist/tool/plugin/websearch.js +156 -153
  791. package/dist/tool/plugin/write.js +171 -166
  792. package/dist/tool/read-filesystem.js +114 -113
  793. package/dist/tool/runtime.js +5 -3
  794. package/dist/tool/search.js +118 -0
  795. package/dist/tool-output.js +7 -7
  796. package/dist/tool.js +163 -159
  797. package/dist/types/agent.d.ts +14 -0
  798. package/dist/types/codemode/fetch.d.ts +1 -0
  799. package/dist/types/config/integration.d.ts +4 -4
  800. package/dist/types/config/plugin/entry-observer.d.ts +15 -0
  801. package/dist/types/database/batch.d.ts +11 -0
  802. package/dist/types/database/migration.d.ts +5 -2
  803. package/dist/types/database/sqlite.bun.d.ts +3 -11
  804. package/dist/types/database/sqlite.node.d.ts +3 -13
  805. package/dist/types/database/sqlite.workerd.d.ts +1 -2
  806. package/dist/types/environment/exec-defaults.d.ts +3 -1
  807. package/dist/types/environment/index.d.ts +1 -4
  808. package/dist/types/environment/local.d.ts +2 -5
  809. package/dist/types/file-mutation.d.ts +8 -1
  810. package/dist/types/file-write.d.ts +30 -0
  811. package/dist/types/filesystem/protected.d.ts +0 -2
  812. package/dist/types/flag.d.ts +32 -0
  813. package/dist/types/github-copilot/chat/openai-compatible-chat-language-model.d.ts +2 -46
  814. package/dist/types/github-copilot/models.d.ts +4 -3
  815. package/dist/types/github-copilot/responses/openai-responses-language-model.d.ts +2 -96
  816. package/dist/types/github-copilot/responses/tool/code-interpreter.d.ts +0 -67
  817. package/dist/types/github-copilot/responses/tool/file-search.d.ts +0 -64
  818. package/dist/types/instance.d.ts +2 -1
  819. package/dist/types/instructions/index.d.ts +17 -1
  820. package/dist/types/integration.d.ts +2 -0
  821. package/dist/types/job/list.d.ts +13 -0
  822. package/dist/types/job/recovery.d.ts +27 -0
  823. package/dist/types/job.d.ts +4 -1
  824. package/dist/types/location-lifecycle.d.ts +6 -1
  825. package/dist/types/managed-policy.d.ts +1 -1
  826. package/dist/types/mcp/client.d.ts +47 -18
  827. package/dist/types/mcp/connection.d.ts +85 -0
  828. package/dist/types/mcp/index.d.ts +13 -13
  829. package/dist/types/mcp/oauth.d.ts +7 -45
  830. package/dist/types/mcp/pool.d.ts +48 -0
  831. package/dist/types/mcp/stdio.d.ts +10 -1
  832. package/dist/types/modal/models.d.ts +27 -3
  833. package/dist/types/model-resolver.d.ts +2 -2
  834. package/dist/types/model-retry.d.ts +4 -1
  835. package/dist/types/model.d.ts +28 -0
  836. package/dist/types/permission.d.ts +13 -0
  837. package/dist/types/persistent-pty/daemon.d.ts +10 -16
  838. package/dist/types/persistent-pty/index.d.ts +3 -16
  839. package/dist/types/plugin/host.d.ts +2 -2
  840. package/dist/types/plugin/internal.d.ts +21 -4
  841. package/dist/types/plugin/module.d.ts +13 -6
  842. package/dist/types/plugin/optimize.d.ts +1 -22
  843. package/dist/types/plugin/provider/azure.d.ts +3 -3
  844. package/dist/types/plugin/provider/chatgpt.d.ts +1 -2
  845. package/dist/types/plugin/provider/claude-agent/integration.d.ts +1 -2
  846. package/dist/types/plugin/provider/credential-settings.d.ts +12 -4
  847. package/dist/types/plugin/provider/digitalocean.d.ts +2 -2
  848. package/dist/types/plugin/provider/github-copilot.d.ts +3 -2
  849. package/dist/types/plugin/provider/gitlab.d.ts +1 -2
  850. package/dist/types/plugin/provider/modal.d.ts +3 -2
  851. package/dist/types/plugin/provider/openai-context-caps.d.ts +1 -2
  852. package/dist/types/plugin/provider/openai.d.ts +1 -2
  853. package/dist/types/plugin/provider/opencode.d.ts +4 -1
  854. package/dist/types/plugin/provider/refresh.d.ts +39 -0
  855. package/dist/types/plugin/provider/snowflake-cortex.d.ts +1 -2
  856. package/dist/types/plugin/websearch/provider.d.ts +12 -0
  857. package/dist/types/plugin.d.ts +1 -1
  858. package/dist/types/project/icon.d.ts +2 -2
  859. package/dist/types/project.d.ts +11 -2
  860. package/dist/types/provider.d.ts +65 -3
  861. package/dist/types/repository-cache.d.ts +1 -1
  862. package/dist/types/schedule/check.d.ts +2 -2
  863. package/dist/types/session/background.d.ts +53 -2
  864. package/dist/types/session/blob.d.ts +240 -857
  865. package/dist/types/session/compaction.d.ts +2 -2
  866. package/dist/types/session/history.d.ts +3149 -1072
  867. package/dist/types/session/message-updater.d.ts +10 -0
  868. package/dist/types/session/model-request.d.ts +3 -3
  869. package/dist/types/session/runner/index.d.ts +12 -86
  870. package/dist/types/session/runner/publish-llm-event.d.ts +1 -2
  871. package/dist/types/session/runner/step.d.ts +19 -137
  872. package/dist/types/shared-cache.d.ts +30 -0
  873. package/dist/types/skill/discovery.d.ts +2 -0
  874. package/dist/types/skill.d.ts +6 -2
  875. package/dist/types/tool/mcp.d.ts +5 -2
  876. package/dist/types/tool/plugin/edit.d.ts +2 -3
  877. package/dist/types/tool/plugin/image-generate.d.ts +1 -1
  878. package/dist/types/tool/plugin/read.d.ts +3 -1
  879. package/dist/types/tool/plugin/shell.d.ts +1 -1
  880. package/dist/types/tool/plugin/write.d.ts +2 -6
  881. package/dist/types/tool/runtime.d.ts +5 -3
  882. package/dist/types/tool/search.d.ts +9 -0
  883. package/dist/types/util/which.d.ts +1 -0
  884. package/dist/types/v1/config/migrate.d.ts +2 -2
  885. package/dist/types/v1/config/provider.d.ts +4 -4
  886. package/dist/usage-limits.js +100 -100
  887. package/dist/util/error-summary.js +1 -1
  888. package/dist/util/git-executable.js +3 -3
  889. package/dist/util/lazy.js +1 -1
  890. package/dist/util/slug.js +1 -1
  891. package/dist/util/token.js +1 -1
  892. package/dist/util/which.js +4 -2
  893. package/dist/util/wildcard.js +1 -1
  894. package/dist/v1/config/agent.js +7 -7
  895. package/dist/v1/config/command.js +3 -3
  896. package/dist/v1/config/mcp.js +4 -4
  897. package/dist/v1/config/migrate.js +105 -105
  898. package/dist/v1/config/permission.js +3 -3
  899. package/dist/v1/config/plugin.js +3 -3
  900. package/dist/v1/config/provider-options.js +1 -1
  901. package/dist/v1/config/provider.js +6 -6
  902. package/dist/variant.js +106 -106
  903. package/dist/vcs/patch.js +1 -1
  904. package/dist/vcs.js +102 -102
  905. package/dist/voice.js +95 -95
  906. package/dist/websearch.js +99 -99
  907. package/dist/wellknown/plugin.js +87 -87
  908. package/dist/wellknown.js +92 -92
  909. package/dist/workspace/driver.js +5 -5
  910. package/dist/workspace/sql.js +1 -1
  911. package/dist/workspace.js +89 -89
  912. package/dist/worktree/directory.js +2 -2
  913. package/dist/worktree/git.js +9 -9
  914. package/dist/worktree/sql.js +5 -5
  915. package/dist/worktree/strategies.js +102 -102
  916. package/dist/worktree.js +109 -109
  917. package/package.json +14 -13
  918. package/dist/chunks/managed-policy-01eadxr6.js +0 -56
  919. package/dist/chunks/managed-policy-034tev2y.js +0 -43
  920. package/dist/chunks/managed-policy-03bjg44z.js +0 -81
  921. package/dist/chunks/managed-policy-06b9nhqp.js +0 -388
  922. package/dist/chunks/managed-policy-0bvsw7yx.js +0 -377
  923. package/dist/chunks/managed-policy-0j7gp832.js +0 -41
  924. package/dist/chunks/managed-policy-136xnga9.js +0 -141
  925. package/dist/chunks/managed-policy-19n27wzj.js +0 -123
  926. package/dist/chunks/managed-policy-1aqsckx4.js +0 -19
  927. package/dist/chunks/managed-policy-1cc9arab.js +0 -921
  928. package/dist/chunks/managed-policy-1ep2p91f.js +0 -18
  929. package/dist/chunks/managed-policy-1ggg1bmw.js +0 -52
  930. package/dist/chunks/managed-policy-1m0e4qdv.js +0 -149
  931. package/dist/chunks/managed-policy-1ntmn9ab.js +0 -22
  932. package/dist/chunks/managed-policy-1pevy3nx.js +0 -558
  933. package/dist/chunks/managed-policy-1scgcwfj.js +0 -262
  934. package/dist/chunks/managed-policy-1sptxsjt.js +0 -37
  935. package/dist/chunks/managed-policy-1x2knyw4.js +0 -42
  936. package/dist/chunks/managed-policy-21sxfe34.js +0 -142
  937. package/dist/chunks/managed-policy-2419ajce.js +0 -118
  938. package/dist/chunks/managed-policy-270pchbm.js +0 -72
  939. package/dist/chunks/managed-policy-287n1fg5.js +0 -97
  940. package/dist/chunks/managed-policy-29b82d1q.js +0 -214
  941. package/dist/chunks/managed-policy-2cmv458r.js +0 -185
  942. package/dist/chunks/managed-policy-2dde2bqv.js +0 -50
  943. package/dist/chunks/managed-policy-2f367f5f.js +0 -242
  944. package/dist/chunks/managed-policy-2hsm6fs5.js +0 -96
  945. package/dist/chunks/managed-policy-2kg89srt.js +0 -31
  946. package/dist/chunks/managed-policy-2n444ktb.js +0 -7
  947. package/dist/chunks/managed-policy-2zxqx8ys.js +0 -224
  948. package/dist/chunks/managed-policy-3c2z2c96.js +0 -135
  949. package/dist/chunks/managed-policy-3hepkmqq.js +0 -13
  950. package/dist/chunks/managed-policy-3nnrz6f6.js +0 -13
  951. package/dist/chunks/managed-policy-3ypqts4w.js +0 -331
  952. package/dist/chunks/managed-policy-40hsfh67.js +0 -379
  953. package/dist/chunks/managed-policy-40y6dtc2.js +0 -175
  954. package/dist/chunks/managed-policy-40za9wsf.js +0 -64
  955. package/dist/chunks/managed-policy-42q33fcy.js +0 -378
  956. package/dist/chunks/managed-policy-434tyd3z.js +0 -71
  957. package/dist/chunks/managed-policy-463b2z95.js +0 -37
  958. package/dist/chunks/managed-policy-49pr0556.js +0 -198
  959. package/dist/chunks/managed-policy-4bnrb45g.js +0 -236
  960. package/dist/chunks/managed-policy-4d2dtj2f.js +0 -31
  961. package/dist/chunks/managed-policy-4dx1dgte.js +0 -16
  962. package/dist/chunks/managed-policy-4f25tdd0.js +0 -54
  963. package/dist/chunks/managed-policy-4nf8qk6q.js +0 -71
  964. package/dist/chunks/managed-policy-4p8d9zsw.js +0 -134
  965. package/dist/chunks/managed-policy-4pyp9zr9.js +0 -63
  966. package/dist/chunks/managed-policy-4s9gaqt0.js +0 -51
  967. package/dist/chunks/managed-policy-4v008n1t.js +0 -13
  968. package/dist/chunks/managed-policy-4vcrnpx2.js +0 -678
  969. package/dist/chunks/managed-policy-559ehxw4.js +0 -73
  970. package/dist/chunks/managed-policy-56nsecd8.js +0 -113
  971. package/dist/chunks/managed-policy-5et5jeav.js +0 -162
  972. package/dist/chunks/managed-policy-5fwsee5p.js +0 -587
  973. package/dist/chunks/managed-policy-5m9w47nd.js +0 -21
  974. package/dist/chunks/managed-policy-5n6aj46w.js +0 -226
  975. package/dist/chunks/managed-policy-5wwwytwh.js +0 -31
  976. package/dist/chunks/managed-policy-5zj75h3k.js +0 -279
  977. package/dist/chunks/managed-policy-60ekxqg5.js +0 -258
  978. package/dist/chunks/managed-policy-68cs06h1.js +0 -31
  979. package/dist/chunks/managed-policy-6a6q0d7c.js +0 -43
  980. package/dist/chunks/managed-policy-6esdw8yj.js +0 -34
  981. package/dist/chunks/managed-policy-6g8tavfv.js +0 -80
  982. package/dist/chunks/managed-policy-6h8vcvjm.js +0 -53
  983. package/dist/chunks/managed-policy-6ha1188e.js +0 -139
  984. package/dist/chunks/managed-policy-6jttym6s.js +0 -272
  985. package/dist/chunks/managed-policy-6kqgga64.js +0 -377
  986. package/dist/chunks/managed-policy-6qq16fm4.js +0 -156
  987. package/dist/chunks/managed-policy-6z26jatx.js +0 -201
  988. package/dist/chunks/managed-policy-72vbk3ar.js +0 -31
  989. package/dist/chunks/managed-policy-74e5yw4f.js +0 -48
  990. package/dist/chunks/managed-policy-76cb1hcw.js +0 -63
  991. package/dist/chunks/managed-policy-775hqbnd.js +0 -34
  992. package/dist/chunks/managed-policy-78p2h4ex.js +0 -75
  993. package/dist/chunks/managed-policy-7an7se55.js +0 -104
  994. package/dist/chunks/managed-policy-7bmhse3q.js +0 -118
  995. package/dist/chunks/managed-policy-7jen3kst.js +0 -54
  996. package/dist/chunks/managed-policy-7kr66rt3.js +0 -2158
  997. package/dist/chunks/managed-policy-7nqkf5r1.js +0 -450
  998. package/dist/chunks/managed-policy-7stb81gk.js +0 -218
  999. package/dist/chunks/managed-policy-7tasr1zh.js +0 -34
  1000. package/dist/chunks/managed-policy-7w2ypzdf.js +0 -62
  1001. package/dist/chunks/managed-policy-83qx3ke6.js +0 -184
  1002. package/dist/chunks/managed-policy-86h0wjde.js +0 -26
  1003. package/dist/chunks/managed-policy-88pezkjt.js +0 -1332
  1004. package/dist/chunks/managed-policy-89287pr7.js +0 -78
  1005. package/dist/chunks/managed-policy-8b3vzgkx.js +0 -17
  1006. package/dist/chunks/managed-policy-8ccg65k8.js +0 -41
  1007. package/dist/chunks/managed-policy-8kc4asgg.js +0 -171
  1008. package/dist/chunks/managed-policy-8m7xhrb5.js +0 -51
  1009. package/dist/chunks/managed-policy-8t99kr38.js +0 -93
  1010. package/dist/chunks/managed-policy-8v10h90y.js +0 -46
  1011. package/dist/chunks/managed-policy-8wtp7s3z.js +0 -14
  1012. package/dist/chunks/managed-policy-8zr350rg.js +0 -343
  1013. package/dist/chunks/managed-policy-90ct6wq4.js +0 -43
  1014. package/dist/chunks/managed-policy-90zstvax.js +0 -129
  1015. package/dist/chunks/managed-policy-959x9ysm.js +0 -108
  1016. package/dist/chunks/managed-policy-965hdc0f.js +0 -213
  1017. package/dist/chunks/managed-policy-96djdqw5.js +0 -34
  1018. package/dist/chunks/managed-policy-9avr9zeg.js +0 -416
  1019. package/dist/chunks/managed-policy-9e6f1fg9.js +0 -97
  1020. package/dist/chunks/managed-policy-9fsaj41x.js +0 -126
  1021. package/dist/chunks/managed-policy-9w1p0dyx.js +0 -122
  1022. package/dist/chunks/managed-policy-9xnn3ysh.js +0 -544
  1023. package/dist/chunks/managed-policy-a3fn0gmm.js +0 -62
  1024. package/dist/chunks/managed-policy-a44gt5xs.js +0 -597
  1025. package/dist/chunks/managed-policy-a7g40yxy.js +0 -152
  1026. package/dist/chunks/managed-policy-afkdtnn0.js +0 -63
  1027. package/dist/chunks/managed-policy-ag84v47q.js +0 -342
  1028. package/dist/chunks/managed-policy-ayjs7tqn.js +0 -17
  1029. package/dist/chunks/managed-policy-azwps28f.js +0 -103
  1030. package/dist/chunks/managed-policy-b1bn67nt.js +0 -552
  1031. package/dist/chunks/managed-policy-b2tnckj8.js +0 -58
  1032. package/dist/chunks/managed-policy-b5v72caj.js +0 -167
  1033. package/dist/chunks/managed-policy-b6vsg801.js +0 -406
  1034. package/dist/chunks/managed-policy-b6z35kmf.js +0 -22
  1035. package/dist/chunks/managed-policy-bc0rs3sc.js +0 -261
  1036. package/dist/chunks/managed-policy-bc15rhpb.js +0 -489
  1037. package/dist/chunks/managed-policy-bf4s7ger.js +0 -94
  1038. package/dist/chunks/managed-policy-bfczqde0.js +0 -186
  1039. package/dist/chunks/managed-policy-bhfd478d.js +0 -31
  1040. package/dist/chunks/managed-policy-bnxre28s.js +0 -291
  1041. package/dist/chunks/managed-policy-bq6hr9nb.js +0 -140
  1042. package/dist/chunks/managed-policy-brdjt4mv.js +0 -673
  1043. package/dist/chunks/managed-policy-bsfkzme1.js +0 -81
  1044. package/dist/chunks/managed-policy-bss5dhqt.js +0 -147
  1045. package/dist/chunks/managed-policy-bstexjd6.js +0 -175
  1046. package/dist/chunks/managed-policy-btbmdhe9.js +0 -181
  1047. package/dist/chunks/managed-policy-c1cz3d6p.js +0 -278
  1048. package/dist/chunks/managed-policy-c5zvymhv.js +0 -67
  1049. package/dist/chunks/managed-policy-c6x7d2ts.js +0 -21
  1050. package/dist/chunks/managed-policy-ckdnq1n6.js +0 -49
  1051. package/dist/chunks/managed-policy-cqatt09s.js +0 -115
  1052. package/dist/chunks/managed-policy-cwrgdav8.js +0 -83
  1053. package/dist/chunks/managed-policy-cytfdtqw.js +0 -282
  1054. package/dist/chunks/managed-policy-d0ng902m.js +0 -401
  1055. package/dist/chunks/managed-policy-d4nq9tsv.js +0 -313
  1056. package/dist/chunks/managed-policy-d4v9tmah.js +0 -25
  1057. package/dist/chunks/managed-policy-d562hvkc.js +0 -664
  1058. package/dist/chunks/managed-policy-d75yk3mt.js +0 -201
  1059. package/dist/chunks/managed-policy-d7pfhv53.js +0 -89
  1060. package/dist/chunks/managed-policy-dbsdr7s1.js +0 -739
  1061. package/dist/chunks/managed-policy-dt77769w.js +0 -53
  1062. package/dist/chunks/managed-policy-dv96216k.js +0 -200
  1063. package/dist/chunks/managed-policy-e041207b.js +0 -201
  1064. package/dist/chunks/managed-policy-e73j6tqm.js +0 -38
  1065. package/dist/chunks/managed-policy-e834z07m.js +0 -50
  1066. package/dist/chunks/managed-policy-eefq391r.js +0 -128
  1067. package/dist/chunks/managed-policy-eh3zwz77.js +0 -31
  1068. package/dist/chunks/managed-policy-eqw4pqj1.js +0 -48
  1069. package/dist/chunks/managed-policy-est5w5t7.js +0 -173
  1070. package/dist/chunks/managed-policy-etg0cwtm.js +0 -107
  1071. package/dist/chunks/managed-policy-ezna1kdx.js +0 -18
  1072. package/dist/chunks/managed-policy-f341sazs.js +0 -52
  1073. package/dist/chunks/managed-policy-f48x6yk9.js +0 -35
  1074. package/dist/chunks/managed-policy-f8b9931a.js +0 -128
  1075. package/dist/chunks/managed-policy-f9y1d2jm.js +0 -38
  1076. package/dist/chunks/managed-policy-f9ykeq0k.js +0 -347
  1077. package/dist/chunks/managed-policy-fb9sec3v.js +0 -65
  1078. package/dist/chunks/managed-policy-fdn2vdbv.js +0 -123
  1079. package/dist/chunks/managed-policy-fffv3p7h.js +0 -143
  1080. package/dist/chunks/managed-policy-fg9p65nk.js +0 -37
  1081. package/dist/chunks/managed-policy-fhagpdp3.js +0 -494
  1082. package/dist/chunks/managed-policy-fpn3a3gt.js +0 -672
  1083. package/dist/chunks/managed-policy-frrwr6v6.js +0 -75
  1084. package/dist/chunks/managed-policy-ft87ktz8.js +0 -43
  1085. package/dist/chunks/managed-policy-fxafnq16.js +0 -68
  1086. package/dist/chunks/managed-policy-g9nvgrsk.js +0 -75
  1087. package/dist/chunks/managed-policy-gbjdnr5j.js +0 -72
  1088. package/dist/chunks/managed-policy-gd5a6tf1.js +0 -74
  1089. package/dist/chunks/managed-policy-gh0bpv1j.js +0 -96
  1090. package/dist/chunks/managed-policy-gmemj5zs.js +0 -55
  1091. package/dist/chunks/managed-policy-gn6qas9s.js +0 -61
  1092. package/dist/chunks/managed-policy-gq1j8atk.js +0 -261
  1093. package/dist/chunks/managed-policy-gxs71cxp.js +0 -39
  1094. package/dist/chunks/managed-policy-h62wb0x5.js +0 -82
  1095. package/dist/chunks/managed-policy-hh7kjqtw.js +0 -66
  1096. package/dist/chunks/managed-policy-hjcswktf.js +0 -611
  1097. package/dist/chunks/managed-policy-hpg1pkwy.js +0 -20
  1098. package/dist/chunks/managed-policy-hx9f7eb9.js +0 -84
  1099. package/dist/chunks/managed-policy-hzadw6yz.js +0 -177
  1100. package/dist/chunks/managed-policy-hzmeqk45.js +0 -49
  1101. package/dist/chunks/managed-policy-hzmqfp9e.js +0 -157
  1102. package/dist/chunks/managed-policy-j376ae4e.js +0 -22
  1103. package/dist/chunks/managed-policy-j6cb228k.js +0 -201
  1104. package/dist/chunks/managed-policy-j75t0xp2.js +0 -357
  1105. package/dist/chunks/managed-policy-j9nxzz3g.js +0 -107
  1106. package/dist/chunks/managed-policy-jbxbfj7s.js +0 -284
  1107. package/dist/chunks/managed-policy-jc512s3p.js +0 -31
  1108. package/dist/chunks/managed-policy-jf43mb4q.js +0 -94
  1109. package/dist/chunks/managed-policy-jjb1gzpd.js +0 -348
  1110. package/dist/chunks/managed-policy-jnc7801c.js +0 -166
  1111. package/dist/chunks/managed-policy-jtnps1zs.js +0 -154
  1112. package/dist/chunks/managed-policy-jxd6f16v.js +0 -41
  1113. package/dist/chunks/managed-policy-jze0r7bz.js +0 -63
  1114. package/dist/chunks/managed-policy-jzefvsy9.js +0 -184
  1115. package/dist/chunks/managed-policy-k57zgysr.js +0 -111
  1116. package/dist/chunks/managed-policy-k9e7wxa4.js +0 -180
  1117. package/dist/chunks/managed-policy-k9kdpah1.js +0 -407
  1118. package/dist/chunks/managed-policy-kbgwzpfx.js +0 -163
  1119. package/dist/chunks/managed-policy-kh0hrg97.js +0 -410
  1120. package/dist/chunks/managed-policy-kjkz669j.js +0 -183
  1121. package/dist/chunks/managed-policy-kk2w4hd7.js +0 -537
  1122. package/dist/chunks/managed-policy-km24q7nj.js +0 -107
  1123. package/dist/chunks/managed-policy-kmzgegqq.js +0 -32
  1124. package/dist/chunks/managed-policy-knbsjr2y.js +0 -182
  1125. package/dist/chunks/managed-policy-knksxkbv.js +0 -465
  1126. package/dist/chunks/managed-policy-kpcg2qbg.js +0 -36
  1127. package/dist/chunks/managed-policy-kqe16f8w.js +0 -70
  1128. package/dist/chunks/managed-policy-kt3bjfbg.js +0 -26
  1129. package/dist/chunks/managed-policy-kxkg3ffz.js +0 -88
  1130. package/dist/chunks/managed-policy-kzczzf4v.js +0 -25
  1131. package/dist/chunks/managed-policy-m1714858.js +0 -39
  1132. package/dist/chunks/managed-policy-m1v9bxez.js +0 -311
  1133. package/dist/chunks/managed-policy-m2qbgzc7.js +0 -121
  1134. package/dist/chunks/managed-policy-m9w0rfyh.js +0 -123
  1135. package/dist/chunks/managed-policy-mb7mbhnz.js +0 -133
  1136. package/dist/chunks/managed-policy-md93d8zh.js +0 -133
  1137. package/dist/chunks/managed-policy-mghd1va0.js +0 -173
  1138. package/dist/chunks/managed-policy-mjzm24hs.js +0 -66
  1139. package/dist/chunks/managed-policy-mkdygwj6.js +0 -80
  1140. package/dist/chunks/managed-policy-mn7b4ex2.js +0 -262
  1141. package/dist/chunks/managed-policy-ms9b5y9t.js +0 -227
  1142. package/dist/chunks/managed-policy-mw7q7crg.js +0 -106
  1143. package/dist/chunks/managed-policy-n3bkb5q1.js +0 -83
  1144. package/dist/chunks/managed-policy-n51py251.js +0 -72
  1145. package/dist/chunks/managed-policy-na5hkyc1.js +0 -79
  1146. package/dist/chunks/managed-policy-nah043kf.js +0 -42
  1147. package/dist/chunks/managed-policy-ndnzjfn7.js +0 -42
  1148. package/dist/chunks/managed-policy-nn2nd58t.js +0 -37
  1149. package/dist/chunks/managed-policy-nq9pmrd9.js +0 -44
  1150. package/dist/chunks/managed-policy-nvv9923q.js +0 -793
  1151. package/dist/chunks/managed-policy-p015t6z3.js +0 -38
  1152. package/dist/chunks/managed-policy-p7vhpwh8.js +0 -16
  1153. package/dist/chunks/managed-policy-pcsafjv9.js +0 -98
  1154. package/dist/chunks/managed-policy-pew2z4vt.js +0 -868
  1155. package/dist/chunks/managed-policy-pf14vz1h.js +0 -319
  1156. package/dist/chunks/managed-policy-pknna89w.js +0 -18
  1157. package/dist/chunks/managed-policy-pmt93v80.js +0 -42
  1158. package/dist/chunks/managed-policy-pqj8q47r.js +0 -36
  1159. package/dist/chunks/managed-policy-px72b05w.js +0 -348
  1160. package/dist/chunks/managed-policy-q17kjq1f.js +0 -544
  1161. package/dist/chunks/managed-policy-q1njhf5v.js +0 -90
  1162. package/dist/chunks/managed-policy-q5xede89.js +0 -351
  1163. package/dist/chunks/managed-policy-q6q2xktk.js +0 -63
  1164. package/dist/chunks/managed-policy-q7m2zzxx.js +0 -215
  1165. package/dist/chunks/managed-policy-q7srkfd6.js +0 -126
  1166. package/dist/chunks/managed-policy-qaymkmh1.js +0 -14
  1167. package/dist/chunks/managed-policy-qfdvj3xm.js +0 -72
  1168. package/dist/chunks/managed-policy-qfz6bxfd.js +0 -40
  1169. package/dist/chunks/managed-policy-qnzq34kg.js +0 -110
  1170. package/dist/chunks/managed-policy-qp7r0hxv.js +0 -120
  1171. package/dist/chunks/managed-policy-qqvy8y24.js +0 -45
  1172. package/dist/chunks/managed-policy-qrjb4kxr.js +0 -126
  1173. package/dist/chunks/managed-policy-qsdghx1p.js +0 -82
  1174. package/dist/chunks/managed-policy-qw2t3dzn.js +0 -59
  1175. package/dist/chunks/managed-policy-qwxbqhw1.js +0 -111
  1176. package/dist/chunks/managed-policy-r1yc6pxk.js +0 -241
  1177. package/dist/chunks/managed-policy-r96ere88.js +0 -41
  1178. package/dist/chunks/managed-policy-rb9dy4dg.js +0 -116
  1179. package/dist/chunks/managed-policy-rbcw5qe2.js +0 -207
  1180. package/dist/chunks/managed-policy-rcbjwvze.js +0 -18
  1181. package/dist/chunks/managed-policy-rdfz5j26.js +0 -35
  1182. package/dist/chunks/managed-policy-rg3pcj18.js +0 -443
  1183. package/dist/chunks/managed-policy-rjnacbrz.js +0 -155
  1184. package/dist/chunks/managed-policy-rp3nzr1r.js +0 -125
  1185. package/dist/chunks/managed-policy-rt5dr6hb.js +0 -14
  1186. package/dist/chunks/managed-policy-rw4pt7k9.js +0 -101
  1187. package/dist/chunks/managed-policy-rwa4aggr.js +0 -137
  1188. package/dist/chunks/managed-policy-s1ba0vj0.js +0 -90
  1189. package/dist/chunks/managed-policy-s6bf677v.js +0 -123
  1190. package/dist/chunks/managed-policy-sa3fpqfw.js +0 -46
  1191. package/dist/chunks/managed-policy-sbya78hr.js +0 -67
  1192. package/dist/chunks/managed-policy-ss7vybzw.js +0 -35
  1193. package/dist/chunks/managed-policy-stqy4jgd.js +0 -336
  1194. package/dist/chunks/managed-policy-svcy3p9a.js +0 -38
  1195. package/dist/chunks/managed-policy-swfcsrh9.js +0 -120
  1196. package/dist/chunks/managed-policy-t272tsey.js +0 -182
  1197. package/dist/chunks/managed-policy-t41snsfg.js +0 -748
  1198. package/dist/chunks/managed-policy-tc9j04kb.js +0 -350
  1199. package/dist/chunks/managed-policy-tczq8hjw.js +0 -25
  1200. package/dist/chunks/managed-policy-tjt5q04z.js +0 -97
  1201. package/dist/chunks/managed-policy-tk9dn3q5.js +0 -96
  1202. package/dist/chunks/managed-policy-tn1fj239.js +0 -38
  1203. package/dist/chunks/managed-policy-tpx7n772.js +0 -283
  1204. package/dist/chunks/managed-policy-tv6keqhp.js +0 -40
  1205. package/dist/chunks/managed-policy-tw8r5m2h.js +0 -444
  1206. package/dist/chunks/managed-policy-twssxy5n.js +0 -170
  1207. package/dist/chunks/managed-policy-twzeptb6.js +0 -355
  1208. package/dist/chunks/managed-policy-tz5jp71x.js +0 -200
  1209. package/dist/chunks/managed-policy-v2r1d0zg.js +0 -86
  1210. package/dist/chunks/managed-policy-v35thh1y.js +0 -94
  1211. package/dist/chunks/managed-policy-v46wz7xc.js +0 -184
  1212. package/dist/chunks/managed-policy-v4fezs72.js +0 -429
  1213. package/dist/chunks/managed-policy-vbkfa9d6.js +0 -221
  1214. package/dist/chunks/managed-policy-vbqcwbdb.js +0 -633
  1215. package/dist/chunks/managed-policy-vg89zccs.js +0 -247
  1216. package/dist/chunks/managed-policy-vg9n6wfe.js +0 -197
  1217. package/dist/chunks/managed-policy-vjdgwz8s.js +0 -75
  1218. package/dist/chunks/managed-policy-vjf35v1f.js +0 -110
  1219. package/dist/chunks/managed-policy-vrmq5x6b.js +0 -549
  1220. package/dist/chunks/managed-policy-vrwtc5g6.js +0 -49
  1221. package/dist/chunks/managed-policy-vtw8zf69.js +0 -148
  1222. package/dist/chunks/managed-policy-vxhdz8br.js +0 -90
  1223. package/dist/chunks/managed-policy-vy5a248c.js +0 -187
  1224. package/dist/chunks/managed-policy-w3wsvvr9.js +0 -80
  1225. package/dist/chunks/managed-policy-w4ea6wv3.js +0 -73
  1226. package/dist/chunks/managed-policy-w8jj4pft.js +0 -362
  1227. package/dist/chunks/managed-policy-w9gqqhkc.js +0 -38
  1228. package/dist/chunks/managed-policy-w9hqtk1g.js +0 -254
  1229. package/dist/chunks/managed-policy-wa8k00xj.js +0 -20
  1230. package/dist/chunks/managed-policy-wakvkjy4.js +0 -79
  1231. package/dist/chunks/managed-policy-wd87259q.js +0 -102
  1232. package/dist/chunks/managed-policy-wegkxhrn.js +0 -37
  1233. package/dist/chunks/managed-policy-wnhgecwx.js +0 -93
  1234. package/dist/chunks/managed-policy-wqt923hk.js +0 -33
  1235. package/dist/chunks/managed-policy-wrjf7cv1.js +0 -226
  1236. package/dist/chunks/managed-policy-wvr8xscb.js +0 -49
  1237. package/dist/chunks/managed-policy-wws03c5r.js +0 -26
  1238. package/dist/chunks/managed-policy-xds81p3n.js +0 -40
  1239. package/dist/chunks/managed-policy-xhn0q2hm.js +0 -247
  1240. package/dist/chunks/managed-policy-xjg18zay.js +0 -116
  1241. package/dist/chunks/managed-policy-xksw6ev0.js +0 -28
  1242. package/dist/chunks/managed-policy-xmrgqw4h.js +0 -235
  1243. package/dist/chunks/managed-policy-xz6931mg.js +0 -99
  1244. package/dist/chunks/managed-policy-y6ahmkqk.js +0 -42
  1245. package/dist/chunks/managed-policy-y7f4acd9.js +0 -148
  1246. package/dist/chunks/managed-policy-yara3q77.js +0 -132
  1247. package/dist/chunks/managed-policy-yb20nhc3.js +0 -229
  1248. package/dist/chunks/managed-policy-ybws1qgk.js +0 -164
  1249. package/dist/chunks/managed-policy-ygx2r41v.js +0 -102
  1250. package/dist/chunks/managed-policy-yr705xyq.js +0 -17
  1251. package/dist/chunks/managed-policy-ywh3xphk.js +0 -16
  1252. package/dist/chunks/managed-policy-z6g8grb7.js +0 -591
  1253. package/dist/chunks/managed-policy-zbe5dcmq.js +0 -86
  1254. package/dist/chunks/managed-policy-zjbya51s.js +0 -95
  1255. package/dist/chunks/managed-policy-zk8fwrjq.js +0 -224
  1256. package/dist/database/sqlite.js +0 -12
  1257. package/dist/types/database/sqlite.d.ts +0 -20
  1258. /package/dist/chunks/{managed-policy-0qkdqm5v.js → persistent-pty-0qkdqm5v.js} +0 -0
  1259. /package/dist/chunks/{managed-policy-0zkw76rk.js → persistent-pty-0zkw76rk.js} +0 -0
  1260. /package/dist/chunks/{managed-policy-17cy0kzp.js → persistent-pty-17cy0kzp.js} +0 -0
  1261. /package/dist/chunks/{managed-policy-1cnp2v09.js → persistent-pty-1cnp2v09.js} +0 -0
  1262. /package/dist/chunks/{managed-policy-1kah00gy.js → persistent-pty-1kah00gy.js} +0 -0
  1263. /package/dist/chunks/{managed-policy-24dcb14g.js → persistent-pty-24dcb14g.js} +0 -0
  1264. /package/dist/chunks/{managed-policy-2710q6r3.js → persistent-pty-2710q6r3.js} +0 -0
  1265. /package/dist/chunks/{managed-policy-2bv980vf.js → persistent-pty-2bv980vf.js} +0 -0
  1266. /package/dist/chunks/{managed-policy-2c3vjs8z.js → persistent-pty-2c3vjs8z.js} +0 -0
  1267. /package/dist/chunks/{managed-policy-359p4xyc.js → persistent-pty-359p4xyc.js} +0 -0
  1268. /package/dist/chunks/{managed-policy-3asan66x.js → persistent-pty-3asan66x.js} +0 -0
  1269. /package/dist/chunks/{managed-policy-3v8g72cx.js → persistent-pty-3v8g72cx.js} +0 -0
  1270. /package/dist/chunks/{managed-policy-3wcehsnq.js → persistent-pty-3wcehsnq.js} +0 -0
  1271. /package/dist/chunks/{managed-policy-43n2bw4t.js → persistent-pty-43n2bw4t.js} +0 -0
  1272. /package/dist/chunks/{managed-policy-4knz6hnm.js → persistent-pty-4knz6hnm.js} +0 -0
  1273. /package/dist/chunks/{managed-policy-4qk9sjk2.js → persistent-pty-4qk9sjk2.js} +0 -0
  1274. /package/dist/chunks/{managed-policy-4y7fprxs.js → persistent-pty-4y7fprxs.js} +0 -0
  1275. /package/dist/chunks/{managed-policy-53557ph1.js → persistent-pty-53557ph1.js} +0 -0
  1276. /package/dist/chunks/{managed-policy-550bvhaj.js → persistent-pty-550bvhaj.js} +0 -0
  1277. /package/dist/chunks/{managed-policy-5w3e23ze.js → persistent-pty-5w3e23ze.js} +0 -0
  1278. /package/dist/chunks/{managed-policy-6agm2x70.js → persistent-pty-6agm2x70.js} +0 -0
  1279. /package/dist/chunks/{managed-policy-6prwharc.js → persistent-pty-6prwharc.js} +0 -0
  1280. /package/dist/chunks/{managed-policy-6q2bdcd1.js → persistent-pty-6q2bdcd1.js} +0 -0
  1281. /package/dist/chunks/{managed-policy-7akdwqpd.js → persistent-pty-7akdwqpd.js} +0 -0
  1282. /package/dist/chunks/{managed-policy-7m9af43g.js → persistent-pty-7m9af43g.js} +0 -0
  1283. /package/dist/chunks/{managed-policy-822emrt2.js → persistent-pty-822emrt2.js} +0 -0
  1284. /package/dist/chunks/{managed-policy-84wd9syh.js → persistent-pty-84wd9syh.js} +0 -0
  1285. /package/dist/chunks/{managed-policy-88xbtdfr.js → persistent-pty-88xbtdfr.js} +0 -0
  1286. /package/dist/chunks/{managed-policy-8n3pysct.js → persistent-pty-8n3pysct.js} +0 -0
  1287. /package/dist/chunks/{managed-policy-8wj87zfr.js → persistent-pty-8wj87zfr.js} +0 -0
  1288. /package/dist/chunks/{managed-policy-9a4afbnw.js → persistent-pty-9a4afbnw.js} +0 -0
  1289. /package/dist/chunks/{managed-policy-9rqn6x4v.js → persistent-pty-9rqn6x4v.js} +0 -0
  1290. /package/dist/chunks/{managed-policy-a6k6eb26.js → persistent-pty-a6k6eb26.js} +0 -0
  1291. /package/dist/chunks/{managed-policy-af5trqkr.js → persistent-pty-af5trqkr.js} +0 -0
  1292. /package/dist/chunks/{managed-policy-afrmfg78.js → persistent-pty-afrmfg78.js} +0 -0
  1293. /package/dist/chunks/{managed-policy-aqzs7mqg.js → persistent-pty-aqzs7mqg.js} +0 -0
  1294. /package/dist/chunks/{managed-policy-atq7p7m5.js → persistent-pty-atq7p7m5.js} +0 -0
  1295. /package/dist/chunks/{managed-policy-beh6qq61.js → persistent-pty-beh6qq61.js} +0 -0
  1296. /package/dist/chunks/{managed-policy-bkyjaxrp.js → persistent-pty-bkyjaxrp.js} +0 -0
  1297. /package/dist/chunks/{managed-policy-bmr6ed5q.js → persistent-pty-bmr6ed5q.js} +0 -0
  1298. /package/dist/chunks/{managed-policy-cf4snx6d.js → persistent-pty-cf4snx6d.js} +0 -0
  1299. /package/dist/chunks/{managed-policy-cqv5kn06.js → persistent-pty-cqv5kn06.js} +0 -0
  1300. /package/dist/chunks/{managed-policy-cvy3z8tj.js → persistent-pty-cvy3z8tj.js} +0 -0
  1301. /package/dist/chunks/{managed-policy-d9fn303g.js → persistent-pty-d9fn303g.js} +0 -0
  1302. /package/dist/chunks/{managed-policy-d9jj8t3e.js → persistent-pty-d9jj8t3e.js} +0 -0
  1303. /package/dist/chunks/{managed-policy-dap0rakb.js → persistent-pty-dap0rakb.js} +0 -0
  1304. /package/dist/chunks/{managed-policy-df08tz66.js → persistent-pty-df08tz66.js} +0 -0
  1305. /package/dist/chunks/{managed-policy-dy18nga0.js → persistent-pty-dy18nga0.js} +0 -0
  1306. /package/dist/chunks/{managed-policy-e5kj55wp.js → persistent-pty-e5kj55wp.js} +0 -0
  1307. /package/dist/chunks/{managed-policy-ean2d8b5.js → persistent-pty-ean2d8b5.js} +0 -0
  1308. /package/dist/chunks/{managed-policy-ec1grn59.js → persistent-pty-ec1grn59.js} +0 -0
  1309. /package/dist/chunks/{managed-policy-emrn6kk6.js → persistent-pty-emrn6kk6.js} +0 -0
  1310. /package/dist/chunks/{managed-policy-f0mxakyp.js → persistent-pty-f0mxakyp.js} +0 -0
  1311. /package/dist/chunks/{managed-policy-f6n9ztr4.js → persistent-pty-f6n9ztr4.js} +0 -0
  1312. /package/dist/chunks/{managed-policy-faypxj3z.js → persistent-pty-faypxj3z.js} +0 -0
  1313. /package/dist/chunks/{managed-policy-fd410y7t.js → persistent-pty-fd410y7t.js} +0 -0
  1314. /package/dist/chunks/{managed-policy-fkpq3x5p.js → persistent-pty-fkpq3x5p.js} +0 -0
  1315. /package/dist/chunks/{managed-policy-g4wezp1m.js → persistent-pty-g4wezp1m.js} +0 -0
  1316. /package/dist/chunks/{managed-policy-g86h250q.js → persistent-pty-g86h250q.js} +0 -0
  1317. /package/dist/chunks/{managed-policy-gebd4c9n.js → persistent-pty-gebd4c9n.js} +0 -0
  1318. /package/dist/chunks/{managed-policy-gftt206x.js → persistent-pty-gftt206x.js} +0 -0
  1319. /package/dist/chunks/{managed-policy-hcxmzztb.js → persistent-pty-hcxmzztb.js} +0 -0
  1320. /package/dist/chunks/{managed-policy-hk9envan.js → persistent-pty-hk9envan.js} +0 -0
  1321. /package/dist/chunks/{managed-policy-j2ntwpah.js → persistent-pty-j2ntwpah.js} +0 -0
  1322. /package/dist/chunks/{managed-policy-j5zkgpj8.js → persistent-pty-j5zkgpj8.js} +0 -0
  1323. /package/dist/chunks/{managed-policy-jjkms2e6.js → persistent-pty-jjkms2e6.js} +0 -0
  1324. /package/dist/chunks/{managed-policy-jr7sbwjy.js → persistent-pty-jr7sbwjy.js} +0 -0
  1325. /package/dist/chunks/{managed-policy-jwfs4k6c.js → persistent-pty-jwfs4k6c.js} +0 -0
  1326. /package/dist/chunks/{managed-policy-jwr30sdr.js → persistent-pty-jwr30sdr.js} +0 -0
  1327. /package/dist/chunks/{managed-policy-jzg6c2d5.js → persistent-pty-jzg6c2d5.js} +0 -0
  1328. /package/dist/chunks/{managed-policy-m18g726c.js → persistent-pty-m18g726c.js} +0 -0
  1329. /package/dist/chunks/{managed-policy-mp448xyj.js → persistent-pty-mp448xyj.js} +0 -0
  1330. /package/dist/chunks/{managed-policy-msx8hqn2.js → persistent-pty-msx8hqn2.js} +0 -0
  1331. /package/dist/chunks/{managed-policy-n05xt0ee.js → persistent-pty-n05xt0ee.js} +0 -0
  1332. /package/dist/chunks/{managed-policy-n3j8tn72.js → persistent-pty-n3j8tn72.js} +0 -0
  1333. /package/dist/chunks/{managed-policy-nh4v3znn.js → persistent-pty-nh4v3znn.js} +0 -0
  1334. /package/dist/chunks/{managed-policy-njntx4h6.js → persistent-pty-njntx4h6.js} +0 -0
  1335. /package/dist/chunks/{managed-policy-p71gwv9c.js → persistent-pty-p71gwv9c.js} +0 -0
  1336. /package/dist/chunks/{managed-policy-q3sfg36h.js → persistent-pty-q3sfg36h.js} +0 -0
  1337. /package/dist/chunks/{managed-policy-q74kybfr.js → persistent-pty-q74kybfr.js} +0 -0
  1338. /package/dist/chunks/{managed-policy-qb87gjwd.js → persistent-pty-qb87gjwd.js} +0 -0
  1339. /package/dist/chunks/{managed-policy-qfa1cgps.js → persistent-pty-qfa1cgps.js} +0 -0
  1340. /package/dist/chunks/{managed-policy-qg3g05ea.js → persistent-pty-qg3g05ea.js} +0 -0
  1341. /package/dist/chunks/{managed-policy-qrg20bc0.js → persistent-pty-qrg20bc0.js} +0 -0
  1342. /package/dist/chunks/{managed-policy-rcb2kzg1.js → persistent-pty-rcb2kzg1.js} +0 -0
  1343. /package/dist/chunks/{managed-policy-sdp7kfr6.js → persistent-pty-sdp7kfr6.js} +0 -0
  1344. /package/dist/chunks/{managed-policy-ssg3fenm.js → persistent-pty-ssg3fenm.js} +0 -0
  1345. /package/dist/chunks/{managed-policy-t03h4f5z.js → persistent-pty-t03h4f5z.js} +0 -0
  1346. /package/dist/chunks/{managed-policy-ty7weeps.js → persistent-pty-ty7weeps.js} +0 -0
  1347. /package/dist/chunks/{managed-policy-ve7vex1e.js → persistent-pty-ve7vex1e.js} +0 -0
  1348. /package/dist/chunks/{managed-policy-vtarvj67.js → persistent-pty-vtarvj67.js} +0 -0
  1349. /package/dist/chunks/{managed-policy-w803qqfp.js → persistent-pty-w803qqfp.js} +0 -0
  1350. /package/dist/chunks/{managed-policy-wc3fc9cn.js → persistent-pty-wc3fc9cn.js} +0 -0
  1351. /package/dist/chunks/{managed-policy-wer8tq1h.js → persistent-pty-wer8tq1h.js} +0 -0
  1352. /package/dist/chunks/{managed-policy-wtztk69x.js → persistent-pty-wtztk69x.js} +0 -0
  1353. /package/dist/chunks/{managed-policy-x0ckcb58.js → persistent-pty-x0ckcb58.js} +0 -0
  1354. /package/dist/chunks/{managed-policy-x61499pn.js → persistent-pty-x61499pn.js} +0 -0
  1355. /package/dist/chunks/{managed-policy-y44na4kk.js → persistent-pty-y44na4kk.js} +0 -0
  1356. /package/dist/chunks/{managed-policy-y8f7s663.js → persistent-pty-y8f7s663.js} +0 -0
  1357. /package/dist/chunks/{managed-policy-ygaqb7jw.js → persistent-pty-ygaqb7jw.js} +0 -0
  1358. /package/dist/chunks/{managed-policy-z5v4ffb3.js → persistent-pty-z5v4ffb3.js} +0 -0
  1359. /package/dist/chunks/{managed-policy-z9919s4g.js → persistent-pty-z9919s4g.js} +0 -0
@@ -219,11 +219,104 @@ export declare const isNativeCompaction: (message: SessionMessage.Info) => messa
219
219
  };
220
220
  };
221
221
  /** A native compaction's window: canonical AI messages, stored as JSON. */
222
- export declare const NativeWindow: Schema.toCodecJson<Schema.$Array<typeof Message>>;
223
- export declare const hasInlineContent: (data: typeof SessionMessageTable.$inferSelect.data) => boolean;
222
+ export declare const NativeWindow: Schema.toCodecJson<Schema.$Array<Schema.Union<readonly [typeof import("@opencode/ai/effect").SystemMessage, typeof import("@opencode/ai/effect").UserMessage, typeof import("@opencode/ai/effect").AssistantMessage, typeof import("@opencode/ai/effect").ToolMessage]> & {
223
+ text: (value: string) => import("@opencode/ai/effect").TextPart;
224
+ media: (media: import("@opencode/ai/effect").MediaPartInput["media"], options?: Omit<import("@opencode/ai/effect").MediaPartInput, "type" | "media">) => import("@opencode/ai/effect").MediaPart;
225
+ content: {
226
+ (input: Message.UserContentInput): import("@opencode/ai/effect").UserMessage["content"];
227
+ (input: Message.AssistantContentInput): import("@opencode/ai/effect").AssistantMessage["content"];
228
+ (input: Message.ContentInput): ReadonlyArray<import("@opencode/ai/effect").ContentPart>;
229
+ };
230
+ make: {
231
+ (input: import("@opencode/ai/effect").SystemMessage | Message.SystemInput): import("@opencode/ai/effect").SystemMessage;
232
+ (input: import("@opencode/ai/effect").UserMessage | Message.UserInput): import("@opencode/ai/effect").UserMessage;
233
+ (input: import("@opencode/ai/effect").AssistantMessage | Message.AssistantInput): import("@opencode/ai/effect").AssistantMessage;
234
+ (input: import("@opencode/ai/effect").ToolMessage | Message.ToolInput): import("@opencode/ai/effect").ToolMessage;
235
+ (input: Message | Message.Input): Message;
236
+ };
237
+ user: (input: Message.UserContentInput) => import("@opencode/ai/effect").UserMessage;
238
+ assistant: (input: Message.AssistantContentInput) => import("@opencode/ai/effect").AssistantMessage;
239
+ system: (input: Message.SystemContentInput) => import("@opencode/ai/effect").SystemMessage;
240
+ effort: (input: {
241
+ readonly effort?: import("@opencode/ai/effect").ReasoningEffort;
242
+ readonly previous?: import("@opencode/ai/effect").ReasoningEffort;
243
+ }) => import("@opencode/ai/effect").SystemMessage;
244
+ tool: (result: import("@opencode/ai/effect").ToolResultPart | Parameters<((input: {
245
+ readonly type: "tool-result";
246
+ readonly id: string;
247
+ readonly name: string;
248
+ readonly namespace?: string | undefined;
249
+ readonly result: {
250
+ readonly type: "json";
251
+ readonly value: unknown;
252
+ } | {
253
+ readonly type: "text";
254
+ readonly value: unknown;
255
+ } | {
256
+ readonly type: "error";
257
+ readonly value: unknown;
258
+ } | {
259
+ readonly type: "content";
260
+ readonly value: readonly ({
261
+ readonly type: "text";
262
+ readonly text: string;
263
+ } | {
264
+ readonly type: "file";
265
+ readonly uri: string;
266
+ readonly mime: string;
267
+ readonly name?: string | undefined;
268
+ })[];
269
+ };
270
+ readonly providerExecuted?: boolean | undefined;
271
+ readonly cache?: import("@opencode/ai/effect").CacheHint | undefined;
272
+ readonly providerMetadata?: {
273
+ readonly [x: string]: {
274
+ readonly [x: string]: unknown;
275
+ };
276
+ } | undefined;
277
+ }, options?: Schema.MakeOptions) => {
278
+ readonly type: "tool-result";
279
+ readonly id: string;
280
+ readonly name: string;
281
+ readonly namespace?: string | undefined;
282
+ readonly result: {
283
+ readonly type: "json";
284
+ readonly value: unknown;
285
+ } | {
286
+ readonly type: "text";
287
+ readonly value: unknown;
288
+ } | {
289
+ readonly type: "error";
290
+ readonly value: unknown;
291
+ } | {
292
+ readonly type: "content";
293
+ readonly value: readonly ({
294
+ readonly type: "text";
295
+ readonly text: string;
296
+ } | {
297
+ readonly type: "file";
298
+ readonly uri: string;
299
+ readonly mime: string;
300
+ readonly name?: string | undefined;
301
+ })[];
302
+ };
303
+ readonly providerExecuted?: boolean | undefined;
304
+ readonly cache?: import("@opencode/ai/effect").CacheHint | undefined;
305
+ readonly providerMetadata?: {
306
+ readonly [x: string]: {
307
+ readonly [x: string]: unknown;
308
+ };
309
+ } | undefined;
310
+ }) & ((input: Omit<import("@opencode/ai/effect").ToolResultPart, "type" | "result"> & {
311
+ readonly result: unknown;
312
+ readonly resultType?: import("@opencode/ai/effect").ToolResultValue["type"];
313
+ }) => import("@opencode/ai/effect").ToolResultPart)>[0]) => import("@opencode/ai/effect").ToolMessage;
314
+ }>>;
224
315
  /**
225
316
  * Puts each assistant row's `session_part` rows into its `data.content`, in ordinal order. Rows without parts keep
226
- * their inline content, so legacy rows read unchanged. Runs before blob hydration so media in parts restores too.
317
+ * their inline content, so legacy rows read unchanged. A row an older build wrote inline content to after its parts
318
+ * were split reads as the parts followed by that content, the order the projector moves them in. Runs before blob
319
+ * hydration so media in parts restores too.
227
320
  */
228
321
  export declare const withParts: (db: import("../database/drizzle.js").EffectSQLiteDatabase<import("drizzle-orm").EmptyRelations> & {
229
322
  $client: import("effect/sql/SqlClient").SqlClient;
@@ -654,7 +747,7 @@ export declare const withParts: (db: import("../database/drizzle.js").EffectSQLi
654
747
  time_created: number;
655
748
  time_updated: number;
656
749
  type: "agent-switched" | "assistant" | "compaction" | "idle" | "location-switched" | "model-switched" | "shell" | "skill" | "synthetic" | "system" | "user";
657
- }[]) => Effect.Effect<readonly {
750
+ }[]) => Effect.Effect<({
658
751
  data: Omit<{
659
752
  readonly id: string;
660
753
  readonly metadata?: {
@@ -1081,57 +1174,138 @@ export declare const withParts: (db: import("../database/drizzle.js").EffectSQLi
1081
1174
  time_created: number;
1082
1175
  time_updated: number;
1083
1176
  type: "agent-switched" | "assistant" | "compaction" | "idle" | "location-switched" | "model-switched" | "shell" | "skill" | "synthetic" | "system" | "user";
1084
- }[], never, never>;
1085
- export declare const decodePartRowSync: (row: typeof SessionPartTable.$inferSelect) => {
1086
- readonly type: "tool";
1087
- readonly id: string;
1088
- readonly name: string;
1089
- readonly executed?: boolean | undefined;
1090
- readonly native?: {
1091
- readonly [x: string]: unknown;
1092
- } | undefined;
1093
- readonly state: {
1094
- readonly status: "streaming";
1095
- readonly input: string;
1177
+ } | {
1178
+ data: {
1179
+ metadata?: {
1180
+ readonly [x: string]: unknown;
1181
+ } | undefined;
1182
+ time: {
1183
+ readonly created: number;
1184
+ };
1185
+ agent: string;
1186
+ previous?: string | undefined;
1187
+ content: any[];
1096
1188
  } | {
1097
- readonly status: "running";
1098
- readonly input: {
1189
+ metadata?: {
1099
1190
  readonly [x: string]: unknown;
1191
+ } | undefined;
1192
+ time: {
1193
+ readonly created: number;
1100
1194
  };
1101
- readonly metadata: {
1102
- readonly [x: string]: Schema.Json;
1195
+ model: {
1196
+ readonly id: string;
1197
+ readonly providerID: string;
1198
+ readonly variant?: string | undefined;
1199
+ };
1200
+ previous?: {
1201
+ readonly id: string;
1202
+ readonly providerID: string;
1203
+ readonly variant?: string | undefined;
1204
+ } | undefined;
1205
+ content: any[];
1206
+ } | {
1207
+ metadata?: {
1208
+ readonly [x: string]: unknown;
1209
+ } | undefined;
1210
+ time: {
1211
+ readonly created: number;
1103
1212
  };
1213
+ location: {
1214
+ readonly directory: string;
1215
+ readonly workspaceID?: string | undefined;
1216
+ };
1217
+ projectID?: string | undefined;
1218
+ subpath?: string | undefined;
1219
+ previous?: {
1220
+ readonly location: {
1221
+ readonly directory: string;
1222
+ readonly workspaceID?: string | undefined;
1223
+ };
1224
+ readonly projectID?: string | undefined;
1225
+ readonly subpath?: string | undefined;
1226
+ } | undefined;
1227
+ content: any[];
1104
1228
  } | {
1105
- readonly status: "completed";
1106
- readonly input: {
1229
+ metadata?: {
1107
1230
  readonly [x: string]: unknown;
1231
+ } | undefined;
1232
+ time: {
1233
+ readonly created: number;
1108
1234
  };
1109
- readonly content: readonly [{
1110
- readonly type: "text";
1111
- readonly text: string;
1112
- } | {
1113
- readonly type: "file";
1114
- readonly uri: string;
1115
- readonly mime: string;
1116
- readonly name?: string | undefined;
1117
- }, ...({
1118
- readonly type: "text";
1119
- readonly text: string;
1120
- } | {
1121
- readonly type: "file";
1122
- readonly uri: string;
1123
- readonly mime: string;
1124
- readonly name?: string | undefined;
1125
- })[]];
1126
- readonly metadata?: {
1127
- readonly [x: string]: Schema.Json;
1235
+ text: string;
1236
+ description?: string | undefined;
1237
+ content: any[];
1238
+ } | {
1239
+ metadata?: {
1240
+ readonly [x: string]: unknown;
1128
1241
  } | undefined;
1242
+ time: {
1243
+ readonly created: number;
1244
+ };
1245
+ text: string;
1246
+ description?: string | undefined;
1247
+ content: any[];
1129
1248
  } | {
1130
- readonly status: "error";
1131
- readonly input: {
1249
+ metadata?: {
1250
+ readonly [x: string]: unknown;
1251
+ } | undefined;
1252
+ time: {
1253
+ readonly created: number;
1254
+ };
1255
+ skill: string;
1256
+ name: string;
1257
+ text: string;
1258
+ content: any[];
1259
+ } | {
1260
+ metadata?: {
1132
1261
  readonly [x: string]: unknown;
1262
+ } | undefined;
1263
+ shellID: string;
1264
+ command: string;
1265
+ status: "exited" | "killed" | "running" | "timeout";
1266
+ exit?: number | undefined;
1267
+ output?: {
1268
+ readonly output: string;
1269
+ readonly cursor: number;
1270
+ readonly size: number;
1271
+ readonly truncated: boolean;
1272
+ } | undefined;
1273
+ time: {
1274
+ readonly created: number;
1275
+ readonly completed?: number | undefined;
1133
1276
  };
1134
- readonly error: {
1277
+ content: any[];
1278
+ } | {
1279
+ metadata?: {
1280
+ readonly [x: string]: unknown;
1281
+ } | undefined;
1282
+ agent: string;
1283
+ model: {
1284
+ readonly id: string;
1285
+ readonly providerID: string;
1286
+ readonly variant?: string | undefined;
1287
+ };
1288
+ snapshot?: {
1289
+ readonly start?: string | undefined;
1290
+ readonly end?: string | undefined;
1291
+ readonly files?: readonly string[] | undefined;
1292
+ } | undefined;
1293
+ finish?: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown" | undefined;
1294
+ rawFinish?: string | undefined;
1295
+ native?: {
1296
+ readonly [x: string]: unknown;
1297
+ } | undefined;
1298
+ cost?: number | undefined;
1299
+ tokens?: {
1300
+ readonly input: number;
1301
+ readonly output: number;
1302
+ readonly reasoning: number;
1303
+ readonly cache: {
1304
+ readonly read: number;
1305
+ readonly write: number;
1306
+ };
1307
+ } | undefined;
1308
+ error?: {
1135
1309
  readonly type: string;
1136
1310
  readonly message: string;
1137
1311
  readonly status?: number | undefined;
@@ -1139,99 +1313,1162 @@ export declare const decodePartRowSync: (row: typeof SessionPartTable.$inferSele
1139
1313
  readonly body: string;
1140
1314
  } | undefined;
1141
1315
  readonly retryAfterMs?: number | undefined;
1316
+ } | undefined;
1317
+ retry?: {
1318
+ readonly attempt: number;
1319
+ readonly at: number;
1320
+ readonly error: {
1321
+ readonly type: string;
1322
+ readonly message: string;
1323
+ readonly status?: number | undefined;
1324
+ readonly response?: {
1325
+ readonly body: string;
1326
+ } | undefined;
1327
+ readonly retryAfterMs?: number | undefined;
1328
+ };
1329
+ } | undefined;
1330
+ time: {
1331
+ readonly created: number;
1332
+ readonly streamed?: number | undefined;
1333
+ readonly completed?: number | undefined;
1142
1334
  };
1143
- readonly content?: readonly [{
1144
- readonly type: "text";
1145
- readonly text: string;
1146
- } | {
1147
- readonly type: "file";
1148
- readonly uri: string;
1149
- readonly mime: string;
1150
- readonly name?: string | undefined;
1151
- }, ...({
1152
- readonly type: "text";
1153
- readonly text: string;
1154
- } | {
1155
- readonly type: "file";
1156
- readonly uri: string;
1157
- readonly mime: string;
1158
- readonly name?: string | undefined;
1159
- })[]] | undefined;
1160
- readonly metadata?: {
1161
- readonly [x: string]: Schema.Json;
1335
+ content: any[];
1336
+ } | {
1337
+ metadata?: {
1338
+ readonly [x: string]: unknown;
1162
1339
  } | undefined;
1163
- };
1164
- readonly time: {
1165
- readonly created: import("effect/DateTime").Utc;
1166
- readonly ran?: import("effect/DateTime").Utc | undefined;
1167
- readonly completed?: import("effect/DateTime").Utc | undefined;
1168
- };
1169
- } | {
1170
- readonly type: "text";
1171
- readonly text: string;
1172
- readonly native?: {
1173
- readonly [x: string]: unknown;
1174
- } | undefined;
1175
- } | {
1176
- readonly type: "reasoning";
1177
- readonly text: string;
1178
- readonly native?: {
1179
- readonly [x: string]: unknown;
1180
- } | undefined;
1181
- readonly time?: {
1182
- readonly created: import("effect/DateTime").Utc;
1183
- readonly completed?: import("effect/DateTime").Utc | undefined;
1184
- } | undefined;
1185
- };
1186
- export declare const decodeMessageRowSync: (row: typeof SessionMessageTable.$inferSelect) => {
1187
- readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1188
- readonly metadata?: {
1189
- readonly [x: string]: unknown;
1190
- } | undefined;
1191
- readonly time: {
1192
- readonly created: import("effect/DateTime").Utc;
1193
- };
1194
- readonly type: "agent-switched";
1195
- readonly agent: string & import("effect/Brand").Brand<"Agent.ID">;
1196
- readonly previous?: (string & import("effect/Brand").Brand<"Agent.ID">) | undefined;
1197
- } | {
1198
- readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1199
- readonly metadata?: {
1200
- readonly [x: string]: unknown;
1201
- } | undefined;
1202
- readonly time: {
1203
- readonly created: import("effect/DateTime").Utc;
1204
- };
1205
- readonly type: "model-switched";
1206
- readonly model: {
1207
- readonly id: string & import("effect/Brand").Brand<"Model.ID">;
1208
- readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
1209
- readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
1210
- };
1211
- readonly previous?: {
1212
- readonly id: string & import("effect/Brand").Brand<"Model.ID">;
1213
- readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
1214
- readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
1215
- } | undefined;
1216
- } | {
1217
- readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1218
- readonly metadata?: {
1219
- readonly [x: string]: unknown;
1220
- } | undefined;
1221
- readonly time: {
1222
- readonly created: import("effect/DateTime").Utc;
1223
- };
1224
- readonly type: "location-switched";
1225
- readonly location: {
1226
- readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
1227
- readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
1228
- };
1229
- readonly projectID?: (string & import("effect/Brand").Brand<"Project.ID">) | undefined;
1230
- readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
1231
- readonly previous?: {
1232
- readonly location: {
1233
- readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
1234
- readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
1340
+ time: {
1341
+ readonly created: number;
1342
+ };
1343
+ status: "running";
1344
+ reason: "auto" | "manual";
1345
+ summary: string;
1346
+ content: any[];
1347
+ } | {
1348
+ metadata?: {
1349
+ readonly [x: string]: unknown;
1350
+ } | undefined;
1351
+ time: {
1352
+ readonly created: number;
1353
+ };
1354
+ cost?: number | undefined;
1355
+ tokens?: {
1356
+ readonly input: number;
1357
+ readonly output: number;
1358
+ readonly reasoning: number;
1359
+ readonly cache: {
1360
+ readonly read: number;
1361
+ readonly write: number;
1362
+ };
1363
+ } | undefined;
1364
+ status: "completed";
1365
+ reason: "auto" | "manual";
1366
+ model?: {
1367
+ readonly id: string;
1368
+ readonly providerID: string;
1369
+ readonly variant?: string | undefined;
1370
+ } | undefined;
1371
+ native?: {
1372
+ readonly [x: string]: unknown;
1373
+ } | undefined;
1374
+ summary: string;
1375
+ content: any[];
1376
+ } | {
1377
+ metadata?: {
1378
+ readonly [x: string]: unknown;
1379
+ } | undefined;
1380
+ time: {
1381
+ readonly created: number;
1382
+ };
1383
+ cost?: number | undefined;
1384
+ tokens?: {
1385
+ readonly input: number;
1386
+ readonly output: number;
1387
+ readonly reasoning: number;
1388
+ readonly cache: {
1389
+ readonly read: number;
1390
+ readonly write: number;
1391
+ };
1392
+ } | undefined;
1393
+ status: "failed";
1394
+ reason: "auto" | "manual";
1395
+ error: {
1396
+ readonly type: string;
1397
+ readonly message: string;
1398
+ readonly status?: number | undefined;
1399
+ readonly response?: {
1400
+ readonly body: string;
1401
+ } | undefined;
1402
+ readonly retryAfterMs?: number | undefined;
1403
+ };
1404
+ content: any[];
1405
+ } | {
1406
+ metadata?: {
1407
+ readonly [x: string]: unknown;
1408
+ } | undefined;
1409
+ time: {
1410
+ readonly created: number;
1411
+ };
1412
+ outcome: "failed" | "interrupted" | "succeeded";
1413
+ error?: {
1414
+ readonly type: string;
1415
+ readonly message: string;
1416
+ readonly status?: number | undefined;
1417
+ readonly response?: {
1418
+ readonly body: string;
1419
+ } | undefined;
1420
+ readonly retryAfterMs?: number | undefined;
1421
+ } | undefined;
1422
+ content: any[];
1423
+ } | {
1424
+ metadata?: {
1425
+ readonly [x: string]: unknown;
1426
+ } | undefined;
1427
+ time: {
1428
+ readonly created: number;
1429
+ };
1430
+ text: string;
1431
+ agents?: readonly {
1432
+ readonly name: string;
1433
+ readonly mention?: {
1434
+ readonly start: number;
1435
+ readonly end: number;
1436
+ readonly text: string;
1437
+ } | undefined;
1438
+ }[] | undefined;
1439
+ skills?: readonly {
1440
+ readonly id: string;
1441
+ readonly name: string;
1442
+ readonly text?: string | undefined;
1443
+ readonly mention?: {
1444
+ readonly start: number;
1445
+ readonly end: number;
1446
+ readonly text: string;
1447
+ } | undefined;
1448
+ }[] | undefined;
1449
+ files?: readonly ({
1450
+ readonly data: string;
1451
+ readonly mime: string;
1452
+ readonly source: {
1453
+ readonly type: "inline";
1454
+ } | {
1455
+ readonly type: "uri";
1456
+ readonly uri: string;
1457
+ };
1458
+ readonly name?: string | undefined;
1459
+ readonly description?: string | undefined;
1460
+ readonly mention?: {
1461
+ readonly start: number;
1462
+ readonly end: number;
1463
+ readonly text: string;
1464
+ } | undefined;
1465
+ } | {
1466
+ readonly mime: string;
1467
+ readonly source: {
1468
+ readonly type: "inline";
1469
+ } | {
1470
+ readonly type: "uri";
1471
+ readonly uri: string;
1472
+ };
1473
+ readonly name?: string | undefined;
1474
+ readonly description?: string | undefined;
1475
+ readonly mention?: {
1476
+ readonly start: number;
1477
+ readonly end: number;
1478
+ readonly text: string;
1479
+ } | undefined;
1480
+ readonly uri: string;
1481
+ })[] | undefined;
1482
+ content: any[];
1483
+ };
1484
+ id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1485
+ seq: number;
1486
+ session_id: string & import("effect/Brand").Brand<"SessionID">;
1487
+ time_created: number;
1488
+ time_updated: number;
1489
+ type: "agent-switched" | "assistant" | "compaction" | "idle" | "location-switched" | "model-switched" | "shell" | "skill" | "synthetic" | "system" | "user";
1490
+ })[] | readonly {
1491
+ data: Omit<{
1492
+ readonly id: string;
1493
+ readonly metadata?: {
1494
+ readonly [x: string]: unknown;
1495
+ } | undefined;
1496
+ readonly time: {
1497
+ readonly created: number;
1498
+ };
1499
+ readonly type: "agent-switched";
1500
+ readonly agent: string;
1501
+ readonly previous?: string | undefined;
1502
+ }, "id" | "type"> | Omit<{
1503
+ readonly id: string;
1504
+ readonly metadata?: {
1505
+ readonly [x: string]: unknown;
1506
+ } | undefined;
1507
+ readonly time: {
1508
+ readonly created: number;
1509
+ };
1510
+ readonly type: "model-switched";
1511
+ readonly model: {
1512
+ readonly id: string;
1513
+ readonly providerID: string;
1514
+ readonly variant?: string | undefined;
1515
+ };
1516
+ readonly previous?: {
1517
+ readonly id: string;
1518
+ readonly providerID: string;
1519
+ readonly variant?: string | undefined;
1520
+ } | undefined;
1521
+ }, "id" | "type"> | Omit<{
1522
+ readonly id: string;
1523
+ readonly metadata?: {
1524
+ readonly [x: string]: unknown;
1525
+ } | undefined;
1526
+ readonly time: {
1527
+ readonly created: number;
1528
+ };
1529
+ readonly type: "location-switched";
1530
+ readonly location: {
1531
+ readonly directory: string;
1532
+ readonly workspaceID?: string | undefined;
1533
+ };
1534
+ readonly projectID?: string | undefined;
1535
+ readonly subpath?: string | undefined;
1536
+ readonly previous?: {
1537
+ readonly location: {
1538
+ readonly directory: string;
1539
+ readonly workspaceID?: string | undefined;
1540
+ };
1541
+ readonly projectID?: string | undefined;
1542
+ readonly subpath?: string | undefined;
1543
+ } | undefined;
1544
+ }, "id" | "type"> | Omit<{
1545
+ readonly id: string;
1546
+ readonly metadata?: {
1547
+ readonly [x: string]: unknown;
1548
+ } | undefined;
1549
+ readonly time: {
1550
+ readonly created: number;
1551
+ };
1552
+ readonly text: string;
1553
+ readonly description?: string | undefined;
1554
+ readonly type: "synthetic";
1555
+ }, "id" | "type"> | Omit<{
1556
+ readonly id: string;
1557
+ readonly metadata?: {
1558
+ readonly [x: string]: unknown;
1559
+ } | undefined;
1560
+ readonly time: {
1561
+ readonly created: number;
1562
+ };
1563
+ readonly type: "system";
1564
+ readonly text: string;
1565
+ readonly description?: string | undefined;
1566
+ }, "id" | "type"> | Omit<{
1567
+ readonly id: string;
1568
+ readonly metadata?: {
1569
+ readonly [x: string]: unknown;
1570
+ } | undefined;
1571
+ readonly time: {
1572
+ readonly created: number;
1573
+ };
1574
+ readonly type: "skill";
1575
+ readonly skill: string;
1576
+ readonly name: string;
1577
+ readonly text: string;
1578
+ }, "id" | "type"> | Omit<{
1579
+ readonly id: string;
1580
+ readonly metadata?: {
1581
+ readonly [x: string]: unknown;
1582
+ } | undefined;
1583
+ readonly type: "shell";
1584
+ readonly shellID: string;
1585
+ readonly command: string;
1586
+ readonly status: "exited" | "killed" | "running" | "timeout";
1587
+ readonly exit?: number | undefined;
1588
+ readonly output?: {
1589
+ readonly output: string;
1590
+ readonly cursor: number;
1591
+ readonly size: number;
1592
+ readonly truncated: boolean;
1593
+ } | undefined;
1594
+ readonly time: {
1595
+ readonly created: number;
1596
+ readonly completed?: number | undefined;
1597
+ };
1598
+ }, "id" | "type"> | Omit<{
1599
+ readonly id: string;
1600
+ readonly metadata?: {
1601
+ readonly [x: string]: unknown;
1602
+ } | undefined;
1603
+ readonly type: "assistant";
1604
+ readonly agent: string;
1605
+ readonly model: {
1606
+ readonly id: string;
1607
+ readonly providerID: string;
1608
+ readonly variant?: string | undefined;
1609
+ };
1610
+ readonly content: readonly ({
1611
+ readonly type: "tool";
1612
+ readonly id: string;
1613
+ readonly name: string;
1614
+ readonly executed?: boolean | undefined;
1615
+ readonly native?: {
1616
+ readonly [x: string]: unknown;
1617
+ } | undefined;
1618
+ readonly state: {
1619
+ readonly status: "streaming";
1620
+ readonly input: string;
1621
+ } | {
1622
+ readonly status: "running";
1623
+ readonly input: {
1624
+ readonly [x: string]: unknown;
1625
+ };
1626
+ readonly metadata: {
1627
+ readonly [x: string]: Schema.Json;
1628
+ };
1629
+ } | {
1630
+ readonly status: "completed";
1631
+ readonly input: {
1632
+ readonly [x: string]: unknown;
1633
+ };
1634
+ readonly content: readonly [{
1635
+ readonly type: "text";
1636
+ readonly text: string;
1637
+ } | {
1638
+ readonly type: "file";
1639
+ readonly uri: string;
1640
+ readonly mime: string;
1641
+ readonly name?: string | undefined;
1642
+ }, ...({
1643
+ readonly type: "text";
1644
+ readonly text: string;
1645
+ } | {
1646
+ readonly type: "file";
1647
+ readonly uri: string;
1648
+ readonly mime: string;
1649
+ readonly name?: string | undefined;
1650
+ })[]];
1651
+ readonly metadata?: {
1652
+ readonly [x: string]: Schema.Json;
1653
+ } | undefined;
1654
+ } | {
1655
+ readonly status: "error";
1656
+ readonly input: {
1657
+ readonly [x: string]: unknown;
1658
+ };
1659
+ readonly error: {
1660
+ readonly type: string;
1661
+ readonly message: string;
1662
+ readonly status?: number | undefined;
1663
+ readonly response?: {
1664
+ readonly body: string;
1665
+ } | undefined;
1666
+ readonly retryAfterMs?: number | undefined;
1667
+ };
1668
+ readonly content?: readonly [{
1669
+ readonly type: "text";
1670
+ readonly text: string;
1671
+ } | {
1672
+ readonly type: "file";
1673
+ readonly uri: string;
1674
+ readonly mime: string;
1675
+ readonly name?: string | undefined;
1676
+ }, ...({
1677
+ readonly type: "text";
1678
+ readonly text: string;
1679
+ } | {
1680
+ readonly type: "file";
1681
+ readonly uri: string;
1682
+ readonly mime: string;
1683
+ readonly name?: string | undefined;
1684
+ })[]] | undefined;
1685
+ readonly metadata?: {
1686
+ readonly [x: string]: Schema.Json;
1687
+ } | undefined;
1688
+ };
1689
+ readonly time: {
1690
+ readonly created: number;
1691
+ readonly ran?: number | undefined;
1692
+ readonly completed?: number | undefined;
1693
+ };
1694
+ } | {
1695
+ readonly type: "text";
1696
+ readonly text: string;
1697
+ readonly native?: {
1698
+ readonly [x: string]: unknown;
1699
+ } | undefined;
1700
+ } | {
1701
+ readonly type: "reasoning";
1702
+ readonly text: string;
1703
+ readonly native?: {
1704
+ readonly [x: string]: unknown;
1705
+ } | undefined;
1706
+ readonly time?: {
1707
+ readonly created: number;
1708
+ readonly completed?: number | undefined;
1709
+ } | undefined;
1710
+ })[];
1711
+ readonly snapshot?: {
1712
+ readonly start?: string | undefined;
1713
+ readonly end?: string | undefined;
1714
+ readonly files?: readonly string[] | undefined;
1715
+ } | undefined;
1716
+ readonly finish?: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown" | undefined;
1717
+ readonly rawFinish?: string | undefined;
1718
+ readonly native?: {
1719
+ readonly [x: string]: unknown;
1720
+ } | undefined;
1721
+ readonly cost?: number | undefined;
1722
+ readonly tokens?: {
1723
+ readonly input: number;
1724
+ readonly output: number;
1725
+ readonly reasoning: number;
1726
+ readonly cache: {
1727
+ readonly read: number;
1728
+ readonly write: number;
1729
+ };
1730
+ } | undefined;
1731
+ readonly error?: {
1732
+ readonly type: string;
1733
+ readonly message: string;
1734
+ readonly status?: number | undefined;
1735
+ readonly response?: {
1736
+ readonly body: string;
1737
+ } | undefined;
1738
+ readonly retryAfterMs?: number | undefined;
1739
+ } | undefined;
1740
+ readonly retry?: {
1741
+ readonly attempt: number;
1742
+ readonly at: number;
1743
+ readonly error: {
1744
+ readonly type: string;
1745
+ readonly message: string;
1746
+ readonly status?: number | undefined;
1747
+ readonly response?: {
1748
+ readonly body: string;
1749
+ } | undefined;
1750
+ readonly retryAfterMs?: number | undefined;
1751
+ };
1752
+ } | undefined;
1753
+ readonly time: {
1754
+ readonly created: number;
1755
+ readonly streamed?: number | undefined;
1756
+ readonly completed?: number | undefined;
1757
+ };
1758
+ }, "id" | "type"> | Omit<{
1759
+ readonly id: string;
1760
+ readonly metadata?: {
1761
+ readonly [x: string]: unknown;
1762
+ } | undefined;
1763
+ readonly time: {
1764
+ readonly created: number;
1765
+ };
1766
+ readonly type: "compaction";
1767
+ readonly status: "running";
1768
+ readonly reason: "auto" | "manual";
1769
+ readonly summary: string;
1770
+ }, "id" | "type"> | Omit<{
1771
+ readonly id: string;
1772
+ readonly metadata?: {
1773
+ readonly [x: string]: unknown;
1774
+ } | undefined;
1775
+ readonly time: {
1776
+ readonly created: number;
1777
+ };
1778
+ readonly type: "compaction";
1779
+ readonly cost?: number | undefined;
1780
+ readonly tokens?: {
1781
+ readonly input: number;
1782
+ readonly output: number;
1783
+ readonly reasoning: number;
1784
+ readonly cache: {
1785
+ readonly read: number;
1786
+ readonly write: number;
1787
+ };
1788
+ } | undefined;
1789
+ readonly status: "completed";
1790
+ readonly reason: "auto" | "manual";
1791
+ readonly model?: {
1792
+ readonly id: string;
1793
+ readonly providerID: string;
1794
+ readonly variant?: string | undefined;
1795
+ } | undefined;
1796
+ readonly native?: {
1797
+ readonly [x: string]: unknown;
1798
+ } | undefined;
1799
+ readonly summary: string;
1800
+ }, "id" | "type"> | Omit<{
1801
+ readonly id: string;
1802
+ readonly metadata?: {
1803
+ readonly [x: string]: unknown;
1804
+ } | undefined;
1805
+ readonly time: {
1806
+ readonly created: number;
1807
+ };
1808
+ readonly type: "compaction";
1809
+ readonly cost?: number | undefined;
1810
+ readonly tokens?: {
1811
+ readonly input: number;
1812
+ readonly output: number;
1813
+ readonly reasoning: number;
1814
+ readonly cache: {
1815
+ readonly read: number;
1816
+ readonly write: number;
1817
+ };
1818
+ } | undefined;
1819
+ readonly status: "failed";
1820
+ readonly reason: "auto" | "manual";
1821
+ readonly error: {
1822
+ readonly type: string;
1823
+ readonly message: string;
1824
+ readonly status?: number | undefined;
1825
+ readonly response?: {
1826
+ readonly body: string;
1827
+ } | undefined;
1828
+ readonly retryAfterMs?: number | undefined;
1829
+ };
1830
+ }, "id" | "type"> | Omit<{
1831
+ readonly id: string;
1832
+ readonly metadata?: {
1833
+ readonly [x: string]: unknown;
1834
+ } | undefined;
1835
+ readonly time: {
1836
+ readonly created: number;
1837
+ };
1838
+ readonly type: "idle";
1839
+ readonly outcome: "failed" | "interrupted" | "succeeded";
1840
+ readonly error?: {
1841
+ readonly type: string;
1842
+ readonly message: string;
1843
+ readonly status?: number | undefined;
1844
+ readonly response?: {
1845
+ readonly body: string;
1846
+ } | undefined;
1847
+ readonly retryAfterMs?: number | undefined;
1848
+ } | undefined;
1849
+ }, "id" | "type"> | Omit<{
1850
+ readonly id: string;
1851
+ readonly metadata?: {
1852
+ readonly [x: string]: unknown;
1853
+ } | undefined;
1854
+ readonly time: {
1855
+ readonly created: number;
1856
+ };
1857
+ readonly text: string;
1858
+ readonly agents?: readonly {
1859
+ readonly name: string;
1860
+ readonly mention?: {
1861
+ readonly start: number;
1862
+ readonly end: number;
1863
+ readonly text: string;
1864
+ } | undefined;
1865
+ }[] | undefined;
1866
+ readonly skills?: readonly {
1867
+ readonly id: string;
1868
+ readonly name: string;
1869
+ readonly text?: string | undefined;
1870
+ readonly mention?: {
1871
+ readonly start: number;
1872
+ readonly end: number;
1873
+ readonly text: string;
1874
+ } | undefined;
1875
+ }[] | undefined;
1876
+ readonly type: "user";
1877
+ readonly files?: readonly ({
1878
+ readonly data: string;
1879
+ readonly mime: string;
1880
+ readonly source: {
1881
+ readonly type: "inline";
1882
+ } | {
1883
+ readonly type: "uri";
1884
+ readonly uri: string;
1885
+ };
1886
+ readonly name?: string | undefined;
1887
+ readonly description?: string | undefined;
1888
+ readonly mention?: {
1889
+ readonly start: number;
1890
+ readonly end: number;
1891
+ readonly text: string;
1892
+ } | undefined;
1893
+ } | {
1894
+ readonly mime: string;
1895
+ readonly source: {
1896
+ readonly type: "inline";
1897
+ } | {
1898
+ readonly type: "uri";
1899
+ readonly uri: string;
1900
+ };
1901
+ readonly name?: string | undefined;
1902
+ readonly description?: string | undefined;
1903
+ readonly mention?: {
1904
+ readonly start: number;
1905
+ readonly end: number;
1906
+ readonly text: string;
1907
+ } | undefined;
1908
+ readonly uri: string;
1909
+ })[] | undefined;
1910
+ }, "id" | "type">;
1911
+ id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1912
+ seq: number;
1913
+ session_id: string & import("effect/Brand").Brand<"SessionID">;
1914
+ time_created: number;
1915
+ time_updated: number;
1916
+ type: "agent-switched" | "assistant" | "compaction" | "idle" | "location-switched" | "model-switched" | "shell" | "skill" | "synthetic" | "system" | "user";
1917
+ }[], never, never>;
1918
+ export declare const decodePartRowSync: (row: typeof SessionPartTable.$inferSelect) => {
1919
+ readonly type: "tool";
1920
+ readonly id: string;
1921
+ readonly name: string;
1922
+ readonly executed?: boolean | undefined;
1923
+ readonly native?: {
1924
+ readonly [x: string]: unknown;
1925
+ } | undefined;
1926
+ readonly state: {
1927
+ readonly status: "streaming";
1928
+ readonly input: string;
1929
+ } | {
1930
+ readonly status: "running";
1931
+ readonly input: {
1932
+ readonly [x: string]: unknown;
1933
+ };
1934
+ readonly metadata: {
1935
+ readonly [x: string]: Schema.Json;
1936
+ };
1937
+ } | {
1938
+ readonly status: "completed";
1939
+ readonly input: {
1940
+ readonly [x: string]: unknown;
1941
+ };
1942
+ readonly content: readonly [{
1943
+ readonly type: "text";
1944
+ readonly text: string;
1945
+ } | {
1946
+ readonly type: "file";
1947
+ readonly uri: string;
1948
+ readonly mime: string;
1949
+ readonly name?: string | undefined;
1950
+ }, ...({
1951
+ readonly type: "text";
1952
+ readonly text: string;
1953
+ } | {
1954
+ readonly type: "file";
1955
+ readonly uri: string;
1956
+ readonly mime: string;
1957
+ readonly name?: string | undefined;
1958
+ })[]];
1959
+ readonly metadata?: {
1960
+ readonly [x: string]: Schema.Json;
1961
+ } | undefined;
1962
+ } | {
1963
+ readonly status: "error";
1964
+ readonly input: {
1965
+ readonly [x: string]: unknown;
1966
+ };
1967
+ readonly error: {
1968
+ readonly type: string;
1969
+ readonly message: string;
1970
+ readonly status?: number | undefined;
1971
+ readonly response?: {
1972
+ readonly body: string;
1973
+ } | undefined;
1974
+ readonly retryAfterMs?: number | undefined;
1975
+ };
1976
+ readonly content?: readonly [{
1977
+ readonly type: "text";
1978
+ readonly text: string;
1979
+ } | {
1980
+ readonly type: "file";
1981
+ readonly uri: string;
1982
+ readonly mime: string;
1983
+ readonly name?: string | undefined;
1984
+ }, ...({
1985
+ readonly type: "text";
1986
+ readonly text: string;
1987
+ } | {
1988
+ readonly type: "file";
1989
+ readonly uri: string;
1990
+ readonly mime: string;
1991
+ readonly name?: string | undefined;
1992
+ })[]] | undefined;
1993
+ readonly metadata?: {
1994
+ readonly [x: string]: Schema.Json;
1995
+ } | undefined;
1996
+ };
1997
+ readonly time: {
1998
+ readonly created: import("effect/DateTime").Utc;
1999
+ readonly ran?: import("effect/DateTime").Utc | undefined;
2000
+ readonly completed?: import("effect/DateTime").Utc | undefined;
2001
+ };
2002
+ } | {
2003
+ readonly type: "text";
2004
+ readonly text: string;
2005
+ readonly native?: {
2006
+ readonly [x: string]: unknown;
2007
+ } | undefined;
2008
+ } | {
2009
+ readonly type: "reasoning";
2010
+ readonly text: string;
2011
+ readonly native?: {
2012
+ readonly [x: string]: unknown;
2013
+ } | undefined;
2014
+ readonly time?: {
2015
+ readonly created: import("effect/DateTime").Utc;
2016
+ readonly completed?: import("effect/DateTime").Utc | undefined;
2017
+ } | undefined;
2018
+ };
2019
+ export declare const decodeMessageRowSync: (row: typeof SessionMessageTable.$inferSelect) => {
2020
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2021
+ readonly metadata?: {
2022
+ readonly [x: string]: unknown;
2023
+ } | undefined;
2024
+ readonly time: {
2025
+ readonly created: import("effect/DateTime").Utc;
2026
+ };
2027
+ readonly type: "agent-switched";
2028
+ readonly agent: string & import("effect/Brand").Brand<"Agent.ID">;
2029
+ readonly previous?: (string & import("effect/Brand").Brand<"Agent.ID">) | undefined;
2030
+ } | {
2031
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2032
+ readonly metadata?: {
2033
+ readonly [x: string]: unknown;
2034
+ } | undefined;
2035
+ readonly time: {
2036
+ readonly created: import("effect/DateTime").Utc;
2037
+ };
2038
+ readonly type: "model-switched";
2039
+ readonly model: {
2040
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
2041
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
2042
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2043
+ };
2044
+ readonly previous?: {
2045
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
2046
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
2047
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2048
+ } | undefined;
2049
+ } | {
2050
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2051
+ readonly metadata?: {
2052
+ readonly [x: string]: unknown;
2053
+ } | undefined;
2054
+ readonly time: {
2055
+ readonly created: import("effect/DateTime").Utc;
2056
+ };
2057
+ readonly type: "location-switched";
2058
+ readonly location: {
2059
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
2060
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
2061
+ };
2062
+ readonly projectID?: (string & import("effect/Brand").Brand<"Project.ID">) | undefined;
2063
+ readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
2064
+ readonly previous?: {
2065
+ readonly location: {
2066
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
2067
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
2068
+ };
2069
+ readonly projectID?: (string & import("effect/Brand").Brand<"Project.ID">) | undefined;
2070
+ readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
2071
+ } | undefined;
2072
+ } | {
2073
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2074
+ readonly metadata?: {
2075
+ readonly [x: string]: unknown;
2076
+ } | undefined;
2077
+ readonly time: {
2078
+ readonly created: import("effect/DateTime").Utc;
2079
+ };
2080
+ readonly text: string;
2081
+ readonly files?: readonly {
2082
+ readonly data: string;
2083
+ readonly mime: string;
2084
+ readonly source: {
2085
+ readonly type: "inline";
2086
+ } | {
2087
+ readonly type: "uri";
2088
+ readonly uri: string;
2089
+ };
2090
+ readonly name?: string | undefined;
2091
+ readonly description?: string | undefined;
2092
+ readonly mention?: {
2093
+ readonly start: number;
2094
+ readonly end: number;
2095
+ readonly text: string;
2096
+ } | undefined;
2097
+ }[] | undefined;
2098
+ readonly agents?: readonly {
2099
+ readonly name: string;
2100
+ readonly mention?: {
2101
+ readonly start: number;
2102
+ readonly end: number;
2103
+ readonly text: string;
2104
+ } | undefined;
2105
+ }[] | undefined;
2106
+ readonly skills?: readonly {
2107
+ readonly id: string & import("effect/Brand").Brand<"Skill.ID">;
2108
+ readonly name: string & import("effect/Brand").Brand<"Skill.Name">;
2109
+ readonly text?: string | undefined;
2110
+ readonly mention?: {
2111
+ readonly start: number;
2112
+ readonly end: number;
2113
+ readonly text: string;
2114
+ } | undefined;
2115
+ }[] | undefined;
2116
+ readonly type: "user";
2117
+ } | {
2118
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2119
+ readonly metadata?: {
2120
+ readonly [x: string]: unknown;
2121
+ } | undefined;
2122
+ readonly time: {
2123
+ readonly created: import("effect/DateTime").Utc;
2124
+ };
2125
+ readonly text: string;
2126
+ readonly description?: string | undefined;
2127
+ readonly type: "synthetic";
2128
+ } | {
2129
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2130
+ readonly metadata?: {
2131
+ readonly [x: string]: unknown;
2132
+ } | undefined;
2133
+ readonly time: {
2134
+ readonly created: import("effect/DateTime").Utc;
2135
+ };
2136
+ readonly type: "system";
2137
+ readonly text: string;
2138
+ readonly description?: string | undefined;
2139
+ } | {
2140
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2141
+ readonly metadata?: {
2142
+ readonly [x: string]: unknown;
2143
+ } | undefined;
2144
+ readonly time: {
2145
+ readonly created: import("effect/DateTime").Utc;
2146
+ };
2147
+ readonly type: "skill";
2148
+ readonly skill: string & import("effect/Brand").Brand<"Skill.ID">;
2149
+ readonly name: string & import("effect/Brand").Brand<"Skill.Name">;
2150
+ readonly text: string;
2151
+ } | {
2152
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2153
+ readonly metadata?: {
2154
+ readonly [x: string]: unknown;
2155
+ } | undefined;
2156
+ readonly type: "shell";
2157
+ readonly shellID: string & import("effect/Brand").Brand<"Shell.ID">;
2158
+ readonly command: string;
2159
+ readonly status: "exited" | "killed" | "running" | "timeout";
2160
+ readonly exit?: number | undefined;
2161
+ readonly output?: {
2162
+ readonly output: string;
2163
+ readonly cursor: number;
2164
+ readonly size: number;
2165
+ readonly truncated: boolean;
2166
+ } | undefined;
2167
+ readonly time: {
2168
+ readonly created: import("effect/DateTime").Utc;
2169
+ readonly completed?: import("effect/DateTime").Utc | undefined;
2170
+ };
2171
+ } | {
2172
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2173
+ readonly metadata?: {
2174
+ readonly [x: string]: unknown;
2175
+ } | undefined;
2176
+ readonly type: "assistant";
2177
+ readonly agent: string & import("effect/Brand").Brand<"Agent.ID">;
2178
+ readonly model: {
2179
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
2180
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
2181
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2182
+ };
2183
+ readonly content: readonly ({
2184
+ readonly type: "tool";
2185
+ readonly id: string;
2186
+ readonly name: string;
2187
+ readonly executed?: boolean | undefined;
2188
+ readonly native?: {
2189
+ readonly [x: string]: unknown;
2190
+ } | undefined;
2191
+ readonly state: {
2192
+ readonly status: "streaming";
2193
+ readonly input: string;
2194
+ } | {
2195
+ readonly status: "running";
2196
+ readonly input: {
2197
+ readonly [x: string]: unknown;
2198
+ };
2199
+ readonly metadata: {
2200
+ readonly [x: string]: Schema.Json;
2201
+ };
2202
+ } | {
2203
+ readonly status: "completed";
2204
+ readonly input: {
2205
+ readonly [x: string]: unknown;
2206
+ };
2207
+ readonly content: readonly [{
2208
+ readonly type: "text";
2209
+ readonly text: string;
2210
+ } | {
2211
+ readonly type: "file";
2212
+ readonly uri: string;
2213
+ readonly mime: string;
2214
+ readonly name?: string | undefined;
2215
+ }, ...({
2216
+ readonly type: "text";
2217
+ readonly text: string;
2218
+ } | {
2219
+ readonly type: "file";
2220
+ readonly uri: string;
2221
+ readonly mime: string;
2222
+ readonly name?: string | undefined;
2223
+ })[]];
2224
+ readonly metadata?: {
2225
+ readonly [x: string]: Schema.Json;
2226
+ } | undefined;
2227
+ } | {
2228
+ readonly status: "error";
2229
+ readonly input: {
2230
+ readonly [x: string]: unknown;
2231
+ };
2232
+ readonly error: {
2233
+ readonly type: string;
2234
+ readonly message: string;
2235
+ readonly status?: number | undefined;
2236
+ readonly response?: {
2237
+ readonly body: string;
2238
+ } | undefined;
2239
+ readonly retryAfterMs?: number | undefined;
2240
+ };
2241
+ readonly content?: readonly [{
2242
+ readonly type: "text";
2243
+ readonly text: string;
2244
+ } | {
2245
+ readonly type: "file";
2246
+ readonly uri: string;
2247
+ readonly mime: string;
2248
+ readonly name?: string | undefined;
2249
+ }, ...({
2250
+ readonly type: "text";
2251
+ readonly text: string;
2252
+ } | {
2253
+ readonly type: "file";
2254
+ readonly uri: string;
2255
+ readonly mime: string;
2256
+ readonly name?: string | undefined;
2257
+ })[]] | undefined;
2258
+ readonly metadata?: {
2259
+ readonly [x: string]: Schema.Json;
2260
+ } | undefined;
2261
+ };
2262
+ readonly time: {
2263
+ readonly created: import("effect/DateTime").Utc;
2264
+ readonly ran?: import("effect/DateTime").Utc | undefined;
2265
+ readonly completed?: import("effect/DateTime").Utc | undefined;
2266
+ };
2267
+ } | {
2268
+ readonly type: "text";
2269
+ readonly text: string;
2270
+ readonly native?: {
2271
+ readonly [x: string]: unknown;
2272
+ } | undefined;
2273
+ } | {
2274
+ readonly type: "reasoning";
2275
+ readonly text: string;
2276
+ readonly native?: {
2277
+ readonly [x: string]: unknown;
2278
+ } | undefined;
2279
+ readonly time?: {
2280
+ readonly created: import("effect/DateTime").Utc;
2281
+ readonly completed?: import("effect/DateTime").Utc | undefined;
2282
+ } | undefined;
2283
+ })[];
2284
+ readonly snapshot?: {
2285
+ readonly start?: (string & import("effect/Brand").Brand<"Snapshot.ID">) | undefined;
2286
+ readonly end?: (string & import("effect/Brand").Brand<"Snapshot.ID">) | undefined;
2287
+ readonly files?: readonly (string & import("effect/Brand").Brand<"RelativePath">)[] | undefined;
2288
+ } | undefined;
2289
+ readonly finish?: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown" | undefined;
2290
+ readonly rawFinish?: string | undefined;
2291
+ readonly native?: {
2292
+ readonly [x: string]: unknown;
2293
+ } | undefined;
2294
+ readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
2295
+ readonly tokens?: {
2296
+ readonly input: number;
2297
+ readonly output: number;
2298
+ readonly reasoning: number;
2299
+ readonly cache: {
2300
+ readonly read: number;
2301
+ readonly write: number;
2302
+ };
2303
+ } | undefined;
2304
+ readonly error?: {
2305
+ readonly type: string;
2306
+ readonly message: string;
2307
+ readonly status?: number | undefined;
2308
+ readonly response?: {
2309
+ readonly body: string;
2310
+ } | undefined;
2311
+ readonly retryAfterMs?: number | undefined;
2312
+ } | undefined;
2313
+ readonly retry?: {
2314
+ readonly attempt: number;
2315
+ readonly at: import("effect/DateTime").Utc;
2316
+ readonly error: {
2317
+ readonly type: string;
2318
+ readonly message: string;
2319
+ readonly status?: number | undefined;
2320
+ readonly response?: {
2321
+ readonly body: string;
2322
+ } | undefined;
2323
+ readonly retryAfterMs?: number | undefined;
2324
+ };
2325
+ } | undefined;
2326
+ readonly time: {
2327
+ readonly created: import("effect/DateTime").Utc;
2328
+ readonly streamed?: import("effect/DateTime").Utc | undefined;
2329
+ readonly completed?: import("effect/DateTime").Utc | undefined;
2330
+ };
2331
+ } | {
2332
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2333
+ readonly metadata?: {
2334
+ readonly [x: string]: unknown;
2335
+ } | undefined;
2336
+ readonly time: {
2337
+ readonly created: import("effect/DateTime").Utc;
2338
+ };
2339
+ readonly type: "compaction";
2340
+ readonly status: "running";
2341
+ readonly reason: "auto" | "manual";
2342
+ readonly summary: string;
2343
+ } | {
2344
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2345
+ readonly metadata?: {
2346
+ readonly [x: string]: unknown;
2347
+ } | undefined;
2348
+ readonly time: {
2349
+ readonly created: import("effect/DateTime").Utc;
2350
+ };
2351
+ readonly type: "compaction";
2352
+ readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
2353
+ readonly tokens?: {
2354
+ readonly input: number;
2355
+ readonly output: number;
2356
+ readonly reasoning: number;
2357
+ readonly cache: {
2358
+ readonly read: number;
2359
+ readonly write: number;
2360
+ };
2361
+ } | undefined;
2362
+ readonly status: "completed";
2363
+ readonly reason: "auto" | "manual";
2364
+ readonly model?: {
2365
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
2366
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
2367
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2368
+ } | undefined;
2369
+ readonly native?: {
2370
+ readonly [x: string]: unknown;
2371
+ } | undefined;
2372
+ readonly summary: string;
2373
+ } | {
2374
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2375
+ readonly metadata?: {
2376
+ readonly [x: string]: unknown;
2377
+ } | undefined;
2378
+ readonly time: {
2379
+ readonly created: import("effect/DateTime").Utc;
2380
+ };
2381
+ readonly type: "compaction";
2382
+ readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
2383
+ readonly tokens?: {
2384
+ readonly input: number;
2385
+ readonly output: number;
2386
+ readonly reasoning: number;
2387
+ readonly cache: {
2388
+ readonly read: number;
2389
+ readonly write: number;
2390
+ };
2391
+ } | undefined;
2392
+ readonly status: "failed";
2393
+ readonly reason: "auto" | "manual";
2394
+ readonly error: {
2395
+ readonly type: string;
2396
+ readonly message: string;
2397
+ readonly status?: number | undefined;
2398
+ readonly response?: {
2399
+ readonly body: string;
2400
+ } | undefined;
2401
+ readonly retryAfterMs?: number | undefined;
2402
+ };
2403
+ } | {
2404
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2405
+ readonly metadata?: {
2406
+ readonly [x: string]: unknown;
2407
+ } | undefined;
2408
+ readonly time: {
2409
+ readonly created: import("effect/DateTime").Utc;
2410
+ };
2411
+ readonly type: "idle";
2412
+ readonly outcome: "failed" | "interrupted" | "succeeded";
2413
+ readonly error?: {
2414
+ readonly type: string;
2415
+ readonly message: string;
2416
+ readonly status?: number | undefined;
2417
+ readonly response?: {
2418
+ readonly body: string;
2419
+ } | undefined;
2420
+ readonly retryAfterMs?: number | undefined;
2421
+ } | undefined;
2422
+ };
2423
+ export declare const decodeMessageRow: (row: typeof SessionMessageTable.$inferSelect) => Effect.Effect<{
2424
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2425
+ readonly metadata?: {
2426
+ readonly [x: string]: unknown;
2427
+ } | undefined;
2428
+ readonly time: {
2429
+ readonly created: import("effect/DateTime").Utc;
2430
+ };
2431
+ readonly type: "agent-switched";
2432
+ readonly agent: string & import("effect/Brand").Brand<"Agent.ID">;
2433
+ readonly previous?: (string & import("effect/Brand").Brand<"Agent.ID">) | undefined;
2434
+ } | {
2435
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2436
+ readonly metadata?: {
2437
+ readonly [x: string]: unknown;
2438
+ } | undefined;
2439
+ readonly time: {
2440
+ readonly created: import("effect/DateTime").Utc;
2441
+ };
2442
+ readonly type: "model-switched";
2443
+ readonly model: {
2444
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
2445
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
2446
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2447
+ };
2448
+ readonly previous?: {
2449
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
2450
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
2451
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2452
+ } | undefined;
2453
+ } | {
2454
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2455
+ readonly metadata?: {
2456
+ readonly [x: string]: unknown;
2457
+ } | undefined;
2458
+ readonly time: {
2459
+ readonly created: import("effect/DateTime").Utc;
2460
+ };
2461
+ readonly type: "location-switched";
2462
+ readonly location: {
2463
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
2464
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
2465
+ };
2466
+ readonly projectID?: (string & import("effect/Brand").Brand<"Project.ID">) | undefined;
2467
+ readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
2468
+ readonly previous?: {
2469
+ readonly location: {
2470
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
2471
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
1235
2472
  };
1236
2473
  readonly projectID?: (string & import("effect/Brand").Brand<"Project.ID">) | undefined;
1237
2474
  readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
@@ -1254,44 +2491,247 @@ export declare const decodeMessageRowSync: (row: typeof SessionMessageTable.$inf
1254
2491
  readonly type: "uri";
1255
2492
  readonly uri: string;
1256
2493
  };
1257
- readonly name?: string | undefined;
1258
- readonly description?: string | undefined;
1259
- readonly mention?: {
1260
- readonly start: number;
1261
- readonly end: number;
1262
- readonly text: string;
2494
+ readonly name?: string | undefined;
2495
+ readonly description?: string | undefined;
2496
+ readonly mention?: {
2497
+ readonly start: number;
2498
+ readonly end: number;
2499
+ readonly text: string;
2500
+ } | undefined;
2501
+ }[] | undefined;
2502
+ readonly agents?: readonly {
2503
+ readonly name: string;
2504
+ readonly mention?: {
2505
+ readonly start: number;
2506
+ readonly end: number;
2507
+ readonly text: string;
2508
+ } | undefined;
2509
+ }[] | undefined;
2510
+ readonly skills?: readonly {
2511
+ readonly id: string & import("effect/Brand").Brand<"Skill.ID">;
2512
+ readonly name: string & import("effect/Brand").Brand<"Skill.Name">;
2513
+ readonly text?: string | undefined;
2514
+ readonly mention?: {
2515
+ readonly start: number;
2516
+ readonly end: number;
2517
+ readonly text: string;
2518
+ } | undefined;
2519
+ }[] | undefined;
2520
+ readonly type: "user";
2521
+ } | {
2522
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2523
+ readonly metadata?: {
2524
+ readonly [x: string]: unknown;
2525
+ } | undefined;
2526
+ readonly time: {
2527
+ readonly created: import("effect/DateTime").Utc;
2528
+ };
2529
+ readonly text: string;
2530
+ readonly description?: string | undefined;
2531
+ readonly type: "synthetic";
2532
+ } | {
2533
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2534
+ readonly metadata?: {
2535
+ readonly [x: string]: unknown;
2536
+ } | undefined;
2537
+ readonly time: {
2538
+ readonly created: import("effect/DateTime").Utc;
2539
+ };
2540
+ readonly type: "system";
2541
+ readonly text: string;
2542
+ readonly description?: string | undefined;
2543
+ } | {
2544
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2545
+ readonly metadata?: {
2546
+ readonly [x: string]: unknown;
2547
+ } | undefined;
2548
+ readonly time: {
2549
+ readonly created: import("effect/DateTime").Utc;
2550
+ };
2551
+ readonly type: "skill";
2552
+ readonly skill: string & import("effect/Brand").Brand<"Skill.ID">;
2553
+ readonly name: string & import("effect/Brand").Brand<"Skill.Name">;
2554
+ readonly text: string;
2555
+ } | {
2556
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2557
+ readonly metadata?: {
2558
+ readonly [x: string]: unknown;
2559
+ } | undefined;
2560
+ readonly type: "shell";
2561
+ readonly shellID: string & import("effect/Brand").Brand<"Shell.ID">;
2562
+ readonly command: string;
2563
+ readonly status: "exited" | "killed" | "running" | "timeout";
2564
+ readonly exit?: number | undefined;
2565
+ readonly output?: {
2566
+ readonly output: string;
2567
+ readonly cursor: number;
2568
+ readonly size: number;
2569
+ readonly truncated: boolean;
2570
+ } | undefined;
2571
+ readonly time: {
2572
+ readonly created: import("effect/DateTime").Utc;
2573
+ readonly completed?: import("effect/DateTime").Utc | undefined;
2574
+ };
2575
+ } | {
2576
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2577
+ readonly metadata?: {
2578
+ readonly [x: string]: unknown;
2579
+ } | undefined;
2580
+ readonly type: "assistant";
2581
+ readonly agent: string & import("effect/Brand").Brand<"Agent.ID">;
2582
+ readonly model: {
2583
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
2584
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
2585
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2586
+ };
2587
+ readonly content: readonly ({
2588
+ readonly type: "tool";
2589
+ readonly id: string;
2590
+ readonly name: string;
2591
+ readonly executed?: boolean | undefined;
2592
+ readonly native?: {
2593
+ readonly [x: string]: unknown;
2594
+ } | undefined;
2595
+ readonly state: {
2596
+ readonly status: "streaming";
2597
+ readonly input: string;
2598
+ } | {
2599
+ readonly status: "running";
2600
+ readonly input: {
2601
+ readonly [x: string]: unknown;
2602
+ };
2603
+ readonly metadata: {
2604
+ readonly [x: string]: Schema.Json;
2605
+ };
2606
+ } | {
2607
+ readonly status: "completed";
2608
+ readonly input: {
2609
+ readonly [x: string]: unknown;
2610
+ };
2611
+ readonly content: readonly [{
2612
+ readonly type: "text";
2613
+ readonly text: string;
2614
+ } | {
2615
+ readonly type: "file";
2616
+ readonly uri: string;
2617
+ readonly mime: string;
2618
+ readonly name?: string | undefined;
2619
+ }, ...({
2620
+ readonly type: "text";
2621
+ readonly text: string;
2622
+ } | {
2623
+ readonly type: "file";
2624
+ readonly uri: string;
2625
+ readonly mime: string;
2626
+ readonly name?: string | undefined;
2627
+ })[]];
2628
+ readonly metadata?: {
2629
+ readonly [x: string]: Schema.Json;
2630
+ } | undefined;
2631
+ } | {
2632
+ readonly status: "error";
2633
+ readonly input: {
2634
+ readonly [x: string]: unknown;
2635
+ };
2636
+ readonly error: {
2637
+ readonly type: string;
2638
+ readonly message: string;
2639
+ readonly status?: number | undefined;
2640
+ readonly response?: {
2641
+ readonly body: string;
2642
+ } | undefined;
2643
+ readonly retryAfterMs?: number | undefined;
2644
+ };
2645
+ readonly content?: readonly [{
2646
+ readonly type: "text";
2647
+ readonly text: string;
2648
+ } | {
2649
+ readonly type: "file";
2650
+ readonly uri: string;
2651
+ readonly mime: string;
2652
+ readonly name?: string | undefined;
2653
+ }, ...({
2654
+ readonly type: "text";
2655
+ readonly text: string;
2656
+ } | {
2657
+ readonly type: "file";
2658
+ readonly uri: string;
2659
+ readonly mime: string;
2660
+ readonly name?: string | undefined;
2661
+ })[]] | undefined;
2662
+ readonly metadata?: {
2663
+ readonly [x: string]: Schema.Json;
2664
+ } | undefined;
2665
+ };
2666
+ readonly time: {
2667
+ readonly created: import("effect/DateTime").Utc;
2668
+ readonly ran?: import("effect/DateTime").Utc | undefined;
2669
+ readonly completed?: import("effect/DateTime").Utc | undefined;
2670
+ };
2671
+ } | {
2672
+ readonly type: "text";
2673
+ readonly text: string;
2674
+ readonly native?: {
2675
+ readonly [x: string]: unknown;
1263
2676
  } | undefined;
1264
- }[] | undefined;
1265
- readonly agents?: readonly {
1266
- readonly name: string;
1267
- readonly mention?: {
1268
- readonly start: number;
1269
- readonly end: number;
1270
- readonly text: string;
2677
+ } | {
2678
+ readonly type: "reasoning";
2679
+ readonly text: string;
2680
+ readonly native?: {
2681
+ readonly [x: string]: unknown;
1271
2682
  } | undefined;
1272
- }[] | undefined;
1273
- readonly skills?: readonly {
1274
- readonly id: string & import("effect/Brand").Brand<"Skill.ID">;
1275
- readonly name: string & import("effect/Brand").Brand<"Skill.Name">;
1276
- readonly text?: string | undefined;
1277
- readonly mention?: {
1278
- readonly start: number;
1279
- readonly end: number;
1280
- readonly text: string;
2683
+ readonly time?: {
2684
+ readonly created: import("effect/DateTime").Utc;
2685
+ readonly completed?: import("effect/DateTime").Utc | undefined;
1281
2686
  } | undefined;
1282
- }[] | undefined;
1283
- readonly type: "user";
1284
- } | {
1285
- readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1286
- readonly metadata?: {
2687
+ })[];
2688
+ readonly snapshot?: {
2689
+ readonly start?: (string & import("effect/Brand").Brand<"Snapshot.ID">) | undefined;
2690
+ readonly end?: (string & import("effect/Brand").Brand<"Snapshot.ID">) | undefined;
2691
+ readonly files?: readonly (string & import("effect/Brand").Brand<"RelativePath">)[] | undefined;
2692
+ } | undefined;
2693
+ readonly finish?: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown" | undefined;
2694
+ readonly rawFinish?: string | undefined;
2695
+ readonly native?: {
1287
2696
  readonly [x: string]: unknown;
1288
2697
  } | undefined;
2698
+ readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
2699
+ readonly tokens?: {
2700
+ readonly input: number;
2701
+ readonly output: number;
2702
+ readonly reasoning: number;
2703
+ readonly cache: {
2704
+ readonly read: number;
2705
+ readonly write: number;
2706
+ };
2707
+ } | undefined;
2708
+ readonly error?: {
2709
+ readonly type: string;
2710
+ readonly message: string;
2711
+ readonly status?: number | undefined;
2712
+ readonly response?: {
2713
+ readonly body: string;
2714
+ } | undefined;
2715
+ readonly retryAfterMs?: number | undefined;
2716
+ } | undefined;
2717
+ readonly retry?: {
2718
+ readonly attempt: number;
2719
+ readonly at: import("effect/DateTime").Utc;
2720
+ readonly error: {
2721
+ readonly type: string;
2722
+ readonly message: string;
2723
+ readonly status?: number | undefined;
2724
+ readonly response?: {
2725
+ readonly body: string;
2726
+ } | undefined;
2727
+ readonly retryAfterMs?: number | undefined;
2728
+ };
2729
+ } | undefined;
1289
2730
  readonly time: {
1290
2731
  readonly created: import("effect/DateTime").Utc;
2732
+ readonly streamed?: import("effect/DateTime").Utc | undefined;
2733
+ readonly completed?: import("effect/DateTime").Utc | undefined;
1291
2734
  };
1292
- readonly text: string;
1293
- readonly description?: string | undefined;
1294
- readonly type: "synthetic";
1295
2735
  } | {
1296
2736
  readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1297
2737
  readonly metadata?: {
@@ -1300,9 +2740,10 @@ export declare const decodeMessageRowSync: (row: typeof SessionMessageTable.$inf
1300
2740
  readonly time: {
1301
2741
  readonly created: import("effect/DateTime").Utc;
1302
2742
  };
1303
- readonly type: "system";
1304
- readonly text: string;
1305
- readonly description?: string | undefined;
2743
+ readonly type: "compaction";
2744
+ readonly status: "running";
2745
+ readonly reason: "auto" | "manual";
2746
+ readonly summary: string;
1306
2747
  } | {
1307
2748
  readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1308
2749
  readonly metadata?: {
@@ -1311,91 +2752,334 @@ export declare const decodeMessageRowSync: (row: typeof SessionMessageTable.$inf
1311
2752
  readonly time: {
1312
2753
  readonly created: import("effect/DateTime").Utc;
1313
2754
  };
1314
- readonly type: "skill";
1315
- readonly skill: string & import("effect/Brand").Brand<"Skill.ID">;
1316
- readonly name: string & import("effect/Brand").Brand<"Skill.Name">;
1317
- readonly text: string;
2755
+ readonly type: "compaction";
2756
+ readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
2757
+ readonly tokens?: {
2758
+ readonly input: number;
2759
+ readonly output: number;
2760
+ readonly reasoning: number;
2761
+ readonly cache: {
2762
+ readonly read: number;
2763
+ readonly write: number;
2764
+ };
2765
+ } | undefined;
2766
+ readonly status: "completed";
2767
+ readonly reason: "auto" | "manual";
2768
+ readonly model?: {
2769
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
2770
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
2771
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2772
+ } | undefined;
2773
+ readonly native?: {
2774
+ readonly [x: string]: unknown;
2775
+ } | undefined;
2776
+ readonly summary: string;
1318
2777
  } | {
1319
2778
  readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1320
2779
  readonly metadata?: {
1321
2780
  readonly [x: string]: unknown;
1322
2781
  } | undefined;
1323
- readonly type: "shell";
1324
- readonly shellID: string & import("effect/Brand").Brand<"Shell.ID">;
1325
- readonly command: string;
1326
- readonly status: "exited" | "killed" | "running" | "timeout";
1327
- readonly exit?: number | undefined;
1328
- readonly output?: {
1329
- readonly output: string;
1330
- readonly cursor: number;
1331
- readonly size: number;
1332
- readonly truncated: boolean;
1333
- } | undefined;
1334
2782
  readonly time: {
1335
2783
  readonly created: import("effect/DateTime").Utc;
1336
- readonly completed?: import("effect/DateTime").Utc | undefined;
2784
+ };
2785
+ readonly type: "compaction";
2786
+ readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
2787
+ readonly tokens?: {
2788
+ readonly input: number;
2789
+ readonly output: number;
2790
+ readonly reasoning: number;
2791
+ readonly cache: {
2792
+ readonly read: number;
2793
+ readonly write: number;
2794
+ };
2795
+ } | undefined;
2796
+ readonly status: "failed";
2797
+ readonly reason: "auto" | "manual";
2798
+ readonly error: {
2799
+ readonly type: string;
2800
+ readonly message: string;
2801
+ readonly status?: number | undefined;
2802
+ readonly response?: {
2803
+ readonly body: string;
2804
+ } | undefined;
2805
+ readonly retryAfterMs?: number | undefined;
1337
2806
  };
1338
2807
  } | {
1339
2808
  readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1340
2809
  readonly metadata?: {
1341
2810
  readonly [x: string]: unknown;
1342
2811
  } | undefined;
1343
- readonly type: "assistant";
1344
- readonly agent: string & import("effect/Brand").Brand<"Agent.ID">;
1345
- readonly model: {
1346
- readonly id: string & import("effect/Brand").Brand<"Model.ID">;
1347
- readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
1348
- readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2812
+ readonly time: {
2813
+ readonly created: import("effect/DateTime").Utc;
1349
2814
  };
1350
- readonly content: readonly ({
1351
- readonly type: "tool";
2815
+ readonly type: "idle";
2816
+ readonly outcome: "failed" | "interrupted" | "succeeded";
2817
+ readonly error?: {
2818
+ readonly type: string;
2819
+ readonly message: string;
2820
+ readonly status?: number | undefined;
2821
+ readonly response?: {
2822
+ readonly body: string;
2823
+ } | undefined;
2824
+ readonly retryAfterMs?: number | undefined;
2825
+ } | undefined;
2826
+ }, MessageDecodeError, never>;
2827
+ /** Decodes rows after restoring media stored in `blob`. Reads that return media must use this. */
2828
+ export declare const decodeMessageRows: (db: import("../database/drizzle.js").EffectSQLiteDatabase<import("drizzle-orm").EmptyRelations> & {
2829
+ $client: import("effect/sql/SqlClient").SqlClient;
2830
+ }, rows: readonly {
2831
+ data: Omit<{
2832
+ readonly id: string;
2833
+ readonly metadata?: {
2834
+ readonly [x: string]: unknown;
2835
+ } | undefined;
2836
+ readonly time: {
2837
+ readonly created: number;
2838
+ };
2839
+ readonly type: "agent-switched";
2840
+ readonly agent: string;
2841
+ readonly previous?: string | undefined;
2842
+ }, "id" | "type"> | Omit<{
2843
+ readonly id: string;
2844
+ readonly metadata?: {
2845
+ readonly [x: string]: unknown;
2846
+ } | undefined;
2847
+ readonly time: {
2848
+ readonly created: number;
2849
+ };
2850
+ readonly type: "model-switched";
2851
+ readonly model: {
2852
+ readonly id: string;
2853
+ readonly providerID: string;
2854
+ readonly variant?: string | undefined;
2855
+ };
2856
+ readonly previous?: {
2857
+ readonly id: string;
2858
+ readonly providerID: string;
2859
+ readonly variant?: string | undefined;
2860
+ } | undefined;
2861
+ }, "id" | "type"> | Omit<{
2862
+ readonly id: string;
2863
+ readonly metadata?: {
2864
+ readonly [x: string]: unknown;
2865
+ } | undefined;
2866
+ readonly time: {
2867
+ readonly created: number;
2868
+ };
2869
+ readonly type: "location-switched";
2870
+ readonly location: {
2871
+ readonly directory: string;
2872
+ readonly workspaceID?: string | undefined;
2873
+ };
2874
+ readonly projectID?: string | undefined;
2875
+ readonly subpath?: string | undefined;
2876
+ readonly previous?: {
2877
+ readonly location: {
2878
+ readonly directory: string;
2879
+ readonly workspaceID?: string | undefined;
2880
+ };
2881
+ readonly projectID?: string | undefined;
2882
+ readonly subpath?: string | undefined;
2883
+ } | undefined;
2884
+ }, "id" | "type"> | Omit<{
2885
+ readonly id: string;
2886
+ readonly metadata?: {
2887
+ readonly [x: string]: unknown;
2888
+ } | undefined;
2889
+ readonly time: {
2890
+ readonly created: number;
2891
+ };
2892
+ readonly text: string;
2893
+ readonly description?: string | undefined;
2894
+ readonly type: "synthetic";
2895
+ }, "id" | "type"> | Omit<{
2896
+ readonly id: string;
2897
+ readonly metadata?: {
2898
+ readonly [x: string]: unknown;
2899
+ } | undefined;
2900
+ readonly time: {
2901
+ readonly created: number;
2902
+ };
2903
+ readonly type: "system";
2904
+ readonly text: string;
2905
+ readonly description?: string | undefined;
2906
+ }, "id" | "type"> | Omit<{
1352
2907
  readonly id: string;
2908
+ readonly metadata?: {
2909
+ readonly [x: string]: unknown;
2910
+ } | undefined;
2911
+ readonly time: {
2912
+ readonly created: number;
2913
+ };
2914
+ readonly type: "skill";
2915
+ readonly skill: string;
1353
2916
  readonly name: string;
1354
- readonly executed?: boolean | undefined;
1355
- readonly native?: {
2917
+ readonly text: string;
2918
+ }, "id" | "type"> | Omit<{
2919
+ readonly id: string;
2920
+ readonly metadata?: {
1356
2921
  readonly [x: string]: unknown;
1357
2922
  } | undefined;
1358
- readonly state: {
1359
- readonly status: "streaming";
1360
- readonly input: string;
1361
- } | {
1362
- readonly status: "running";
1363
- readonly input: {
2923
+ readonly type: "shell";
2924
+ readonly shellID: string;
2925
+ readonly command: string;
2926
+ readonly status: "exited" | "killed" | "running" | "timeout";
2927
+ readonly exit?: number | undefined;
2928
+ readonly output?: {
2929
+ readonly output: string;
2930
+ readonly cursor: number;
2931
+ readonly size: number;
2932
+ readonly truncated: boolean;
2933
+ } | undefined;
2934
+ readonly time: {
2935
+ readonly created: number;
2936
+ readonly completed?: number | undefined;
2937
+ };
2938
+ }, "id" | "type"> | Omit<{
2939
+ readonly id: string;
2940
+ readonly metadata?: {
2941
+ readonly [x: string]: unknown;
2942
+ } | undefined;
2943
+ readonly type: "assistant";
2944
+ readonly agent: string;
2945
+ readonly model: {
2946
+ readonly id: string;
2947
+ readonly providerID: string;
2948
+ readonly variant?: string | undefined;
2949
+ };
2950
+ readonly content: readonly ({
2951
+ readonly type: "tool";
2952
+ readonly id: string;
2953
+ readonly name: string;
2954
+ readonly executed?: boolean | undefined;
2955
+ readonly native?: {
1364
2956
  readonly [x: string]: unknown;
2957
+ } | undefined;
2958
+ readonly state: {
2959
+ readonly status: "streaming";
2960
+ readonly input: string;
2961
+ } | {
2962
+ readonly status: "running";
2963
+ readonly input: {
2964
+ readonly [x: string]: unknown;
2965
+ };
2966
+ readonly metadata: {
2967
+ readonly [x: string]: Schema.Json;
2968
+ };
2969
+ } | {
2970
+ readonly status: "completed";
2971
+ readonly input: {
2972
+ readonly [x: string]: unknown;
2973
+ };
2974
+ readonly content: readonly [{
2975
+ readonly type: "text";
2976
+ readonly text: string;
2977
+ } | {
2978
+ readonly type: "file";
2979
+ readonly uri: string;
2980
+ readonly mime: string;
2981
+ readonly name?: string | undefined;
2982
+ }, ...({
2983
+ readonly type: "text";
2984
+ readonly text: string;
2985
+ } | {
2986
+ readonly type: "file";
2987
+ readonly uri: string;
2988
+ readonly mime: string;
2989
+ readonly name?: string | undefined;
2990
+ })[]];
2991
+ readonly metadata?: {
2992
+ readonly [x: string]: Schema.Json;
2993
+ } | undefined;
2994
+ } | {
2995
+ readonly status: "error";
2996
+ readonly input: {
2997
+ readonly [x: string]: unknown;
2998
+ };
2999
+ readonly error: {
3000
+ readonly type: string;
3001
+ readonly message: string;
3002
+ readonly status?: number | undefined;
3003
+ readonly response?: {
3004
+ readonly body: string;
3005
+ } | undefined;
3006
+ readonly retryAfterMs?: number | undefined;
3007
+ };
3008
+ readonly content?: readonly [{
3009
+ readonly type: "text";
3010
+ readonly text: string;
3011
+ } | {
3012
+ readonly type: "file";
3013
+ readonly uri: string;
3014
+ readonly mime: string;
3015
+ readonly name?: string | undefined;
3016
+ }, ...({
3017
+ readonly type: "text";
3018
+ readonly text: string;
3019
+ } | {
3020
+ readonly type: "file";
3021
+ readonly uri: string;
3022
+ readonly mime: string;
3023
+ readonly name?: string | undefined;
3024
+ })[]] | undefined;
3025
+ readonly metadata?: {
3026
+ readonly [x: string]: Schema.Json;
3027
+ } | undefined;
1365
3028
  };
1366
- readonly metadata: {
1367
- readonly [x: string]: Schema.Json;
3029
+ readonly time: {
3030
+ readonly created: number;
3031
+ readonly ran?: number | undefined;
3032
+ readonly completed?: number | undefined;
1368
3033
  };
1369
3034
  } | {
1370
- readonly status: "completed";
1371
- readonly input: {
3035
+ readonly type: "text";
3036
+ readonly text: string;
3037
+ readonly native?: {
1372
3038
  readonly [x: string]: unknown;
1373
- };
1374
- readonly content: readonly [{
1375
- readonly type: "text";
1376
- readonly text: string;
1377
- } | {
1378
- readonly type: "file";
1379
- readonly uri: string;
1380
- readonly mime: string;
1381
- readonly name?: string | undefined;
1382
- }, ...({
1383
- readonly type: "text";
1384
- readonly text: string;
1385
- } | {
1386
- readonly type: "file";
1387
- readonly uri: string;
1388
- readonly mime: string;
1389
- readonly name?: string | undefined;
1390
- })[]];
1391
- readonly metadata?: {
1392
- readonly [x: string]: Schema.Json;
1393
3039
  } | undefined;
1394
3040
  } | {
1395
- readonly status: "error";
1396
- readonly input: {
3041
+ readonly type: "reasoning";
3042
+ readonly text: string;
3043
+ readonly native?: {
1397
3044
  readonly [x: string]: unknown;
3045
+ } | undefined;
3046
+ readonly time?: {
3047
+ readonly created: number;
3048
+ readonly completed?: number | undefined;
3049
+ } | undefined;
3050
+ })[];
3051
+ readonly snapshot?: {
3052
+ readonly start?: string | undefined;
3053
+ readonly end?: string | undefined;
3054
+ readonly files?: readonly string[] | undefined;
3055
+ } | undefined;
3056
+ readonly finish?: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown" | undefined;
3057
+ readonly rawFinish?: string | undefined;
3058
+ readonly native?: {
3059
+ readonly [x: string]: unknown;
3060
+ } | undefined;
3061
+ readonly cost?: number | undefined;
3062
+ readonly tokens?: {
3063
+ readonly input: number;
3064
+ readonly output: number;
3065
+ readonly reasoning: number;
3066
+ readonly cache: {
3067
+ readonly read: number;
3068
+ readonly write: number;
1398
3069
  };
3070
+ } | undefined;
3071
+ readonly error?: {
3072
+ readonly type: string;
3073
+ readonly message: string;
3074
+ readonly status?: number | undefined;
3075
+ readonly response?: {
3076
+ readonly body: string;
3077
+ } | undefined;
3078
+ readonly retryAfterMs?: number | undefined;
3079
+ } | undefined;
3080
+ readonly retry?: {
3081
+ readonly attempt: number;
3082
+ readonly at: number;
1399
3083
  readonly error: {
1400
3084
  readonly type: string;
1401
3085
  readonly message: string;
@@ -1405,81 +3089,75 @@ export declare const decodeMessageRowSync: (row: typeof SessionMessageTable.$inf
1405
3089
  } | undefined;
1406
3090
  readonly retryAfterMs?: number | undefined;
1407
3091
  };
1408
- readonly content?: readonly [{
1409
- readonly type: "text";
1410
- readonly text: string;
1411
- } | {
1412
- readonly type: "file";
1413
- readonly uri: string;
1414
- readonly mime: string;
1415
- readonly name?: string | undefined;
1416
- }, ...({
1417
- readonly type: "text";
1418
- readonly text: string;
1419
- } | {
1420
- readonly type: "file";
1421
- readonly uri: string;
1422
- readonly mime: string;
1423
- readonly name?: string | undefined;
1424
- })[]] | undefined;
1425
- readonly metadata?: {
1426
- readonly [x: string]: Schema.Json;
1427
- } | undefined;
3092
+ } | undefined;
3093
+ readonly time: {
3094
+ readonly created: number;
3095
+ readonly streamed?: number | undefined;
3096
+ readonly completed?: number | undefined;
1428
3097
  };
3098
+ }, "id" | "type"> | Omit<{
3099
+ readonly id: string;
3100
+ readonly metadata?: {
3101
+ readonly [x: string]: unknown;
3102
+ } | undefined;
1429
3103
  readonly time: {
1430
- readonly created: import("effect/DateTime").Utc;
1431
- readonly ran?: import("effect/DateTime").Utc | undefined;
1432
- readonly completed?: import("effect/DateTime").Utc | undefined;
3104
+ readonly created: number;
1433
3105
  };
1434
- } | {
1435
- readonly type: "text";
1436
- readonly text: string;
1437
- readonly native?: {
3106
+ readonly type: "compaction";
3107
+ readonly status: "running";
3108
+ readonly reason: "auto" | "manual";
3109
+ readonly summary: string;
3110
+ }, "id" | "type"> | Omit<{
3111
+ readonly id: string;
3112
+ readonly metadata?: {
1438
3113
  readonly [x: string]: unknown;
1439
3114
  } | undefined;
1440
- } | {
1441
- readonly type: "reasoning";
1442
- readonly text: string;
3115
+ readonly time: {
3116
+ readonly created: number;
3117
+ };
3118
+ readonly type: "compaction";
3119
+ readonly cost?: number | undefined;
3120
+ readonly tokens?: {
3121
+ readonly input: number;
3122
+ readonly output: number;
3123
+ readonly reasoning: number;
3124
+ readonly cache: {
3125
+ readonly read: number;
3126
+ readonly write: number;
3127
+ };
3128
+ } | undefined;
3129
+ readonly status: "completed";
3130
+ readonly reason: "auto" | "manual";
3131
+ readonly model?: {
3132
+ readonly id: string;
3133
+ readonly providerID: string;
3134
+ readonly variant?: string | undefined;
3135
+ } | undefined;
1443
3136
  readonly native?: {
1444
3137
  readonly [x: string]: unknown;
1445
3138
  } | undefined;
1446
- readonly time?: {
1447
- readonly created: import("effect/DateTime").Utc;
1448
- readonly completed?: import("effect/DateTime").Utc | undefined;
3139
+ readonly summary: string;
3140
+ }, "id" | "type"> | Omit<{
3141
+ readonly id: string;
3142
+ readonly metadata?: {
3143
+ readonly [x: string]: unknown;
1449
3144
  } | undefined;
1450
- })[];
1451
- readonly snapshot?: {
1452
- readonly start?: (string & import("effect/Brand").Brand<"Snapshot.ID">) | undefined;
1453
- readonly end?: (string & import("effect/Brand").Brand<"Snapshot.ID">) | undefined;
1454
- readonly files?: readonly (string & import("effect/Brand").Brand<"RelativePath">)[] | undefined;
1455
- } | undefined;
1456
- readonly finish?: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown" | undefined;
1457
- readonly rawFinish?: string | undefined;
1458
- readonly native?: {
1459
- readonly [x: string]: unknown;
1460
- } | undefined;
1461
- readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
1462
- readonly tokens?: {
1463
- readonly input: number;
1464
- readonly output: number;
1465
- readonly reasoning: number;
1466
- readonly cache: {
1467
- readonly read: number;
1468
- readonly write: number;
3145
+ readonly time: {
3146
+ readonly created: number;
1469
3147
  };
1470
- } | undefined;
1471
- readonly error?: {
1472
- readonly type: string;
1473
- readonly message: string;
1474
- readonly status?: number | undefined;
1475
- readonly response?: {
1476
- readonly body: string;
3148
+ readonly type: "compaction";
3149
+ readonly cost?: number | undefined;
3150
+ readonly tokens?: {
3151
+ readonly input: number;
3152
+ readonly output: number;
3153
+ readonly reasoning: number;
3154
+ readonly cache: {
3155
+ readonly read: number;
3156
+ readonly write: number;
3157
+ };
1477
3158
  } | undefined;
1478
- readonly retryAfterMs?: number | undefined;
1479
- } | undefined;
1480
- readonly retry?: {
1481
- readonly attempt: number;
1482
- readonly at: import("effect/DateTime").Utc;
3159
+ readonly status: "failed";
3160
+ readonly reason: "auto" | "manual";
1483
3161
  readonly error: {
1484
3162
  readonly type: string;
1485
3163
  readonly message: string;
@@ -1489,105 +3167,94 @@ export declare const decodeMessageRowSync: (row: typeof SessionMessageTable.$inf
1489
3167
  } | undefined;
1490
3168
  readonly retryAfterMs?: number | undefined;
1491
3169
  };
1492
- } | undefined;
1493
- readonly time: {
1494
- readonly created: import("effect/DateTime").Utc;
1495
- readonly streamed?: import("effect/DateTime").Utc | undefined;
1496
- readonly completed?: import("effect/DateTime").Utc | undefined;
1497
- };
1498
- } | {
1499
- readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1500
- readonly metadata?: {
1501
- readonly [x: string]: unknown;
1502
- } | undefined;
1503
- readonly time: {
1504
- readonly created: import("effect/DateTime").Utc;
1505
- };
1506
- readonly type: "compaction";
1507
- readonly status: "running";
1508
- readonly reason: "auto" | "manual";
1509
- readonly summary: string;
1510
- } | {
1511
- readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1512
- readonly metadata?: {
1513
- readonly [x: string]: unknown;
1514
- } | undefined;
1515
- readonly time: {
1516
- readonly created: import("effect/DateTime").Utc;
1517
- };
1518
- readonly type: "compaction";
1519
- readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
1520
- readonly tokens?: {
1521
- readonly input: number;
1522
- readonly output: number;
1523
- readonly reasoning: number;
1524
- readonly cache: {
1525
- readonly read: number;
1526
- readonly write: number;
1527
- };
1528
- } | undefined;
1529
- readonly status: "completed";
1530
- readonly reason: "auto" | "manual";
1531
- readonly model?: {
1532
- readonly id: string & import("effect/Brand").Brand<"Model.ID">;
1533
- readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
1534
- readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
1535
- } | undefined;
1536
- readonly native?: {
1537
- readonly [x: string]: unknown;
1538
- } | undefined;
1539
- readonly summary: string;
1540
- } | {
1541
- readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1542
- readonly metadata?: {
1543
- readonly [x: string]: unknown;
1544
- } | undefined;
1545
- readonly time: {
1546
- readonly created: import("effect/DateTime").Utc;
1547
- };
1548
- readonly type: "compaction";
1549
- readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
1550
- readonly tokens?: {
1551
- readonly input: number;
1552
- readonly output: number;
1553
- readonly reasoning: number;
1554
- readonly cache: {
1555
- readonly read: number;
1556
- readonly write: number;
3170
+ }, "id" | "type"> | Omit<{
3171
+ readonly id: string;
3172
+ readonly metadata?: {
3173
+ readonly [x: string]: unknown;
3174
+ } | undefined;
3175
+ readonly time: {
3176
+ readonly created: number;
1557
3177
  };
1558
- } | undefined;
1559
- readonly status: "failed";
1560
- readonly reason: "auto" | "manual";
1561
- readonly error: {
1562
- readonly type: string;
1563
- readonly message: string;
1564
- readonly status?: number | undefined;
1565
- readonly response?: {
1566
- readonly body: string;
3178
+ readonly type: "idle";
3179
+ readonly outcome: "failed" | "interrupted" | "succeeded";
3180
+ readonly error?: {
3181
+ readonly type: string;
3182
+ readonly message: string;
3183
+ readonly status?: number | undefined;
3184
+ readonly response?: {
3185
+ readonly body: string;
3186
+ } | undefined;
3187
+ readonly retryAfterMs?: number | undefined;
1567
3188
  } | undefined;
1568
- readonly retryAfterMs?: number | undefined;
1569
- };
1570
- } | {
1571
- readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1572
- readonly metadata?: {
1573
- readonly [x: string]: unknown;
1574
- } | undefined;
1575
- readonly time: {
1576
- readonly created: import("effect/DateTime").Utc;
1577
- };
1578
- readonly type: "idle";
1579
- readonly outcome: "failed" | "interrupted" | "succeeded";
1580
- readonly error?: {
1581
- readonly type: string;
1582
- readonly message: string;
1583
- readonly status?: number | undefined;
1584
- readonly response?: {
1585
- readonly body: string;
3189
+ }, "id" | "type"> | Omit<{
3190
+ readonly id: string;
3191
+ readonly metadata?: {
3192
+ readonly [x: string]: unknown;
1586
3193
  } | undefined;
1587
- readonly retryAfterMs?: number | undefined;
1588
- } | undefined;
1589
- };
1590
- export declare const decodeMessageRow: (row: typeof SessionMessageTable.$inferSelect) => Effect.Effect<{
3194
+ readonly time: {
3195
+ readonly created: number;
3196
+ };
3197
+ readonly text: string;
3198
+ readonly agents?: readonly {
3199
+ readonly name: string;
3200
+ readonly mention?: {
3201
+ readonly start: number;
3202
+ readonly end: number;
3203
+ readonly text: string;
3204
+ } | undefined;
3205
+ }[] | undefined;
3206
+ readonly skills?: readonly {
3207
+ readonly id: string;
3208
+ readonly name: string;
3209
+ readonly text?: string | undefined;
3210
+ readonly mention?: {
3211
+ readonly start: number;
3212
+ readonly end: number;
3213
+ readonly text: string;
3214
+ } | undefined;
3215
+ }[] | undefined;
3216
+ readonly type: "user";
3217
+ readonly files?: readonly ({
3218
+ readonly data: string;
3219
+ readonly mime: string;
3220
+ readonly source: {
3221
+ readonly type: "inline";
3222
+ } | {
3223
+ readonly type: "uri";
3224
+ readonly uri: string;
3225
+ };
3226
+ readonly name?: string | undefined;
3227
+ readonly description?: string | undefined;
3228
+ readonly mention?: {
3229
+ readonly start: number;
3230
+ readonly end: number;
3231
+ readonly text: string;
3232
+ } | undefined;
3233
+ } | {
3234
+ readonly mime: string;
3235
+ readonly source: {
3236
+ readonly type: "inline";
3237
+ } | {
3238
+ readonly type: "uri";
3239
+ readonly uri: string;
3240
+ };
3241
+ readonly name?: string | undefined;
3242
+ readonly description?: string | undefined;
3243
+ readonly mention?: {
3244
+ readonly start: number;
3245
+ readonly end: number;
3246
+ readonly text: string;
3247
+ } | undefined;
3248
+ readonly uri: string;
3249
+ })[] | undefined;
3250
+ }, "id" | "type">;
3251
+ id: string & import("effect/Brand").Brand<"Session.Message.ID">;
3252
+ seq: number;
3253
+ session_id: string & import("effect/Brand").Brand<"SessionID">;
3254
+ time_created: number;
3255
+ time_updated: number;
3256
+ type: "agent-switched" | "assistant" | "compaction" | "idle" | "location-switched" | "model-switched" | "shell" | "skill" | "synthetic" | "system" | "user";
3257
+ }[]) => Effect.Effect<({
1591
3258
  readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1592
3259
  readonly metadata?: {
1593
3260
  readonly [x: string]: unknown;
@@ -1990,11 +3657,11 @@ export declare const decodeMessageRow: (row: typeof SessionMessageTable.$inferSe
1990
3657
  } | undefined;
1991
3658
  readonly retryAfterMs?: number | undefined;
1992
3659
  } | undefined;
1993
- }, MessageDecodeError, never>;
1994
- /** Decodes rows after restoring media stored in `blob`. Reads that return media must use this. */
1995
- export declare const decodeMessageRows: (db: import("../database/drizzle.js").EffectSQLiteDatabase<import("drizzle-orm").EmptyRelations> & {
3660
+ })[], MessageDecodeError, never>;
3661
+ /** {@link decodeMessageRows} for one row. */
3662
+ export declare const loadMessageRow: (db: import("../database/drizzle.js").EffectSQLiteDatabase<import("drizzle-orm").EmptyRelations> & {
1996
3663
  $client: import("effect/sql/SqlClient").SqlClient;
1997
- }, rows: readonly {
3664
+ }, row: {
1998
3665
  data: Omit<{
1999
3666
  readonly id: string;
2000
3667
  readonly metadata?: {
@@ -2421,7 +4088,7 @@ export declare const decodeMessageRows: (db: import("../database/drizzle.js").Ef
2421
4088
  time_created: number;
2422
4089
  time_updated: number;
2423
4090
  type: "agent-switched" | "assistant" | "compaction" | "idle" | "location-switched" | "model-switched" | "shell" | "skill" | "synthetic" | "system" | "user";
2424
- }[]) => Effect.Effect<({
4091
+ }) => Effect.Effect<{
2425
4092
  readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2426
4093
  readonly metadata?: {
2427
4094
  readonly [x: string]: unknown;
@@ -2471,54 +4138,268 @@ export declare const decodeMessageRows: (db: import("../database/drizzle.js").Ef
2471
4138
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
2472
4139
  readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
2473
4140
  };
2474
- readonly projectID?: (string & import("effect/Brand").Brand<"Project.ID">) | undefined;
2475
- readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
4141
+ readonly projectID?: (string & import("effect/Brand").Brand<"Project.ID">) | undefined;
4142
+ readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
4143
+ } | undefined;
4144
+ } | {
4145
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
4146
+ readonly metadata?: {
4147
+ readonly [x: string]: unknown;
4148
+ } | undefined;
4149
+ readonly time: {
4150
+ readonly created: import("effect/DateTime").Utc;
4151
+ };
4152
+ readonly text: string;
4153
+ readonly files?: readonly {
4154
+ readonly data: string;
4155
+ readonly mime: string;
4156
+ readonly source: {
4157
+ readonly type: "inline";
4158
+ } | {
4159
+ readonly type: "uri";
4160
+ readonly uri: string;
4161
+ };
4162
+ readonly name?: string | undefined;
4163
+ readonly description?: string | undefined;
4164
+ readonly mention?: {
4165
+ readonly start: number;
4166
+ readonly end: number;
4167
+ readonly text: string;
4168
+ } | undefined;
4169
+ }[] | undefined;
4170
+ readonly agents?: readonly {
4171
+ readonly name: string;
4172
+ readonly mention?: {
4173
+ readonly start: number;
4174
+ readonly end: number;
4175
+ readonly text: string;
4176
+ } | undefined;
4177
+ }[] | undefined;
4178
+ readonly skills?: readonly {
4179
+ readonly id: string & import("effect/Brand").Brand<"Skill.ID">;
4180
+ readonly name: string & import("effect/Brand").Brand<"Skill.Name">;
4181
+ readonly text?: string | undefined;
4182
+ readonly mention?: {
4183
+ readonly start: number;
4184
+ readonly end: number;
4185
+ readonly text: string;
4186
+ } | undefined;
4187
+ }[] | undefined;
4188
+ readonly type: "user";
4189
+ } | {
4190
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
4191
+ readonly metadata?: {
4192
+ readonly [x: string]: unknown;
4193
+ } | undefined;
4194
+ readonly time: {
4195
+ readonly created: import("effect/DateTime").Utc;
4196
+ };
4197
+ readonly text: string;
4198
+ readonly description?: string | undefined;
4199
+ readonly type: "synthetic";
4200
+ } | {
4201
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
4202
+ readonly metadata?: {
4203
+ readonly [x: string]: unknown;
4204
+ } | undefined;
4205
+ readonly time: {
4206
+ readonly created: import("effect/DateTime").Utc;
4207
+ };
4208
+ readonly type: "system";
4209
+ readonly text: string;
4210
+ readonly description?: string | undefined;
4211
+ } | {
4212
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
4213
+ readonly metadata?: {
4214
+ readonly [x: string]: unknown;
4215
+ } | undefined;
4216
+ readonly time: {
4217
+ readonly created: import("effect/DateTime").Utc;
4218
+ };
4219
+ readonly type: "skill";
4220
+ readonly skill: string & import("effect/Brand").Brand<"Skill.ID">;
4221
+ readonly name: string & import("effect/Brand").Brand<"Skill.Name">;
4222
+ readonly text: string;
4223
+ } | {
4224
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
4225
+ readonly metadata?: {
4226
+ readonly [x: string]: unknown;
4227
+ } | undefined;
4228
+ readonly type: "shell";
4229
+ readonly shellID: string & import("effect/Brand").Brand<"Shell.ID">;
4230
+ readonly command: string;
4231
+ readonly status: "exited" | "killed" | "running" | "timeout";
4232
+ readonly exit?: number | undefined;
4233
+ readonly output?: {
4234
+ readonly output: string;
4235
+ readonly cursor: number;
4236
+ readonly size: number;
4237
+ readonly truncated: boolean;
4238
+ } | undefined;
4239
+ readonly time: {
4240
+ readonly created: import("effect/DateTime").Utc;
4241
+ readonly completed?: import("effect/DateTime").Utc | undefined;
4242
+ };
4243
+ } | {
4244
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
4245
+ readonly metadata?: {
4246
+ readonly [x: string]: unknown;
4247
+ } | undefined;
4248
+ readonly type: "assistant";
4249
+ readonly agent: string & import("effect/Brand").Brand<"Agent.ID">;
4250
+ readonly model: {
4251
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
4252
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
4253
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
4254
+ };
4255
+ readonly content: readonly ({
4256
+ readonly type: "tool";
4257
+ readonly id: string;
4258
+ readonly name: string;
4259
+ readonly executed?: boolean | undefined;
4260
+ readonly native?: {
4261
+ readonly [x: string]: unknown;
4262
+ } | undefined;
4263
+ readonly state: {
4264
+ readonly status: "streaming";
4265
+ readonly input: string;
4266
+ } | {
4267
+ readonly status: "running";
4268
+ readonly input: {
4269
+ readonly [x: string]: unknown;
4270
+ };
4271
+ readonly metadata: {
4272
+ readonly [x: string]: Schema.Json;
4273
+ };
4274
+ } | {
4275
+ readonly status: "completed";
4276
+ readonly input: {
4277
+ readonly [x: string]: unknown;
4278
+ };
4279
+ readonly content: readonly [{
4280
+ readonly type: "text";
4281
+ readonly text: string;
4282
+ } | {
4283
+ readonly type: "file";
4284
+ readonly uri: string;
4285
+ readonly mime: string;
4286
+ readonly name?: string | undefined;
4287
+ }, ...({
4288
+ readonly type: "text";
4289
+ readonly text: string;
4290
+ } | {
4291
+ readonly type: "file";
4292
+ readonly uri: string;
4293
+ readonly mime: string;
4294
+ readonly name?: string | undefined;
4295
+ })[]];
4296
+ readonly metadata?: {
4297
+ readonly [x: string]: Schema.Json;
4298
+ } | undefined;
4299
+ } | {
4300
+ readonly status: "error";
4301
+ readonly input: {
4302
+ readonly [x: string]: unknown;
4303
+ };
4304
+ readonly error: {
4305
+ readonly type: string;
4306
+ readonly message: string;
4307
+ readonly status?: number | undefined;
4308
+ readonly response?: {
4309
+ readonly body: string;
4310
+ } | undefined;
4311
+ readonly retryAfterMs?: number | undefined;
4312
+ };
4313
+ readonly content?: readonly [{
4314
+ readonly type: "text";
4315
+ readonly text: string;
4316
+ } | {
4317
+ readonly type: "file";
4318
+ readonly uri: string;
4319
+ readonly mime: string;
4320
+ readonly name?: string | undefined;
4321
+ }, ...({
4322
+ readonly type: "text";
4323
+ readonly text: string;
4324
+ } | {
4325
+ readonly type: "file";
4326
+ readonly uri: string;
4327
+ readonly mime: string;
4328
+ readonly name?: string | undefined;
4329
+ })[]] | undefined;
4330
+ readonly metadata?: {
4331
+ readonly [x: string]: Schema.Json;
4332
+ } | undefined;
4333
+ };
4334
+ readonly time: {
4335
+ readonly created: import("effect/DateTime").Utc;
4336
+ readonly ran?: import("effect/DateTime").Utc | undefined;
4337
+ readonly completed?: import("effect/DateTime").Utc | undefined;
4338
+ };
4339
+ } | {
4340
+ readonly type: "text";
4341
+ readonly text: string;
4342
+ readonly native?: {
4343
+ readonly [x: string]: unknown;
4344
+ } | undefined;
4345
+ } | {
4346
+ readonly type: "reasoning";
4347
+ readonly text: string;
4348
+ readonly native?: {
4349
+ readonly [x: string]: unknown;
4350
+ } | undefined;
4351
+ readonly time?: {
4352
+ readonly created: import("effect/DateTime").Utc;
4353
+ readonly completed?: import("effect/DateTime").Utc | undefined;
4354
+ } | undefined;
4355
+ })[];
4356
+ readonly snapshot?: {
4357
+ readonly start?: (string & import("effect/Brand").Brand<"Snapshot.ID">) | undefined;
4358
+ readonly end?: (string & import("effect/Brand").Brand<"Snapshot.ID">) | undefined;
4359
+ readonly files?: readonly (string & import("effect/Brand").Brand<"RelativePath">)[] | undefined;
4360
+ } | undefined;
4361
+ readonly finish?: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown" | undefined;
4362
+ readonly rawFinish?: string | undefined;
4363
+ readonly native?: {
4364
+ readonly [x: string]: unknown;
4365
+ } | undefined;
4366
+ readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
4367
+ readonly tokens?: {
4368
+ readonly input: number;
4369
+ readonly output: number;
4370
+ readonly reasoning: number;
4371
+ readonly cache: {
4372
+ readonly read: number;
4373
+ readonly write: number;
4374
+ };
2476
4375
  } | undefined;
2477
- } | {
2478
- readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2479
- readonly metadata?: {
2480
- readonly [x: string]: unknown;
4376
+ readonly error?: {
4377
+ readonly type: string;
4378
+ readonly message: string;
4379
+ readonly status?: number | undefined;
4380
+ readonly response?: {
4381
+ readonly body: string;
4382
+ } | undefined;
4383
+ readonly retryAfterMs?: number | undefined;
4384
+ } | undefined;
4385
+ readonly retry?: {
4386
+ readonly attempt: number;
4387
+ readonly at: import("effect/DateTime").Utc;
4388
+ readonly error: {
4389
+ readonly type: string;
4390
+ readonly message: string;
4391
+ readonly status?: number | undefined;
4392
+ readonly response?: {
4393
+ readonly body: string;
4394
+ } | undefined;
4395
+ readonly retryAfterMs?: number | undefined;
4396
+ };
2481
4397
  } | undefined;
2482
4398
  readonly time: {
2483
4399
  readonly created: import("effect/DateTime").Utc;
4400
+ readonly streamed?: import("effect/DateTime").Utc | undefined;
4401
+ readonly completed?: import("effect/DateTime").Utc | undefined;
2484
4402
  };
2485
- readonly text: string;
2486
- readonly files?: readonly {
2487
- readonly data: string;
2488
- readonly mime: string;
2489
- readonly source: {
2490
- readonly type: "inline";
2491
- } | {
2492
- readonly type: "uri";
2493
- readonly uri: string;
2494
- };
2495
- readonly name?: string | undefined;
2496
- readonly description?: string | undefined;
2497
- readonly mention?: {
2498
- readonly start: number;
2499
- readonly end: number;
2500
- readonly text: string;
2501
- } | undefined;
2502
- }[] | undefined;
2503
- readonly agents?: readonly {
2504
- readonly name: string;
2505
- readonly mention?: {
2506
- readonly start: number;
2507
- readonly end: number;
2508
- readonly text: string;
2509
- } | undefined;
2510
- }[] | undefined;
2511
- readonly skills?: readonly {
2512
- readonly id: string & import("effect/Brand").Brand<"Skill.ID">;
2513
- readonly name: string & import("effect/Brand").Brand<"Skill.Name">;
2514
- readonly text?: string | undefined;
2515
- readonly mention?: {
2516
- readonly start: number;
2517
- readonly end: number;
2518
- readonly text: string;
2519
- } | undefined;
2520
- }[] | undefined;
2521
- readonly type: "user";
2522
4403
  } | {
2523
4404
  readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2524
4405
  readonly metadata?: {
@@ -2527,9 +4408,10 @@ export declare const decodeMessageRows: (db: import("../database/drizzle.js").Ef
2527
4408
  readonly time: {
2528
4409
  readonly created: import("effect/DateTime").Utc;
2529
4410
  };
2530
- readonly text: string;
2531
- readonly description?: string | undefined;
2532
- readonly type: "synthetic";
4411
+ readonly type: "compaction";
4412
+ readonly status: "running";
4413
+ readonly reason: "auto" | "manual";
4414
+ readonly summary: string;
2533
4415
  } | {
2534
4416
  readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2535
4417
  readonly metadata?: {
@@ -2538,9 +4420,28 @@ export declare const decodeMessageRows: (db: import("../database/drizzle.js").Ef
2538
4420
  readonly time: {
2539
4421
  readonly created: import("effect/DateTime").Utc;
2540
4422
  };
2541
- readonly type: "system";
2542
- readonly text: string;
2543
- readonly description?: string | undefined;
4423
+ readonly type: "compaction";
4424
+ readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
4425
+ readonly tokens?: {
4426
+ readonly input: number;
4427
+ readonly output: number;
4428
+ readonly reasoning: number;
4429
+ readonly cache: {
4430
+ readonly read: number;
4431
+ readonly write: number;
4432
+ };
4433
+ } | undefined;
4434
+ readonly status: "completed";
4435
+ readonly reason: "auto" | "manual";
4436
+ readonly model?: {
4437
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
4438
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
4439
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
4440
+ } | undefined;
4441
+ readonly native?: {
4442
+ readonly [x: string]: unknown;
4443
+ } | undefined;
4444
+ readonly summary: string;
2544
4445
  } | {
2545
4446
  readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2546
4447
  readonly metadata?: {
@@ -2549,91 +4450,304 @@ export declare const decodeMessageRows: (db: import("../database/drizzle.js").Ef
2549
4450
  readonly time: {
2550
4451
  readonly created: import("effect/DateTime").Utc;
2551
4452
  };
2552
- readonly type: "skill";
2553
- readonly skill: string & import("effect/Brand").Brand<"Skill.ID">;
2554
- readonly name: string & import("effect/Brand").Brand<"Skill.Name">;
2555
- readonly text: string;
4453
+ readonly type: "compaction";
4454
+ readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
4455
+ readonly tokens?: {
4456
+ readonly input: number;
4457
+ readonly output: number;
4458
+ readonly reasoning: number;
4459
+ readonly cache: {
4460
+ readonly read: number;
4461
+ readonly write: number;
4462
+ };
4463
+ } | undefined;
4464
+ readonly status: "failed";
4465
+ readonly reason: "auto" | "manual";
4466
+ readonly error: {
4467
+ readonly type: string;
4468
+ readonly message: string;
4469
+ readonly status?: number | undefined;
4470
+ readonly response?: {
4471
+ readonly body: string;
4472
+ } | undefined;
4473
+ readonly retryAfterMs?: number | undefined;
4474
+ };
2556
4475
  } | {
2557
4476
  readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2558
4477
  readonly metadata?: {
2559
4478
  readonly [x: string]: unknown;
2560
4479
  } | undefined;
2561
- readonly type: "shell";
2562
- readonly shellID: string & import("effect/Brand").Brand<"Shell.ID">;
2563
- readonly command: string;
2564
- readonly status: "exited" | "killed" | "running" | "timeout";
2565
- readonly exit?: number | undefined;
2566
- readonly output?: {
2567
- readonly output: string;
2568
- readonly cursor: number;
2569
- readonly size: number;
2570
- readonly truncated: boolean;
2571
- } | undefined;
2572
4480
  readonly time: {
2573
4481
  readonly created: import("effect/DateTime").Utc;
2574
- readonly completed?: import("effect/DateTime").Utc | undefined;
2575
4482
  };
2576
- } | {
2577
- readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2578
- readonly metadata?: {
2579
- readonly [x: string]: unknown;
4483
+ readonly type: "idle";
4484
+ readonly outcome: "failed" | "interrupted" | "succeeded";
4485
+ readonly error?: {
4486
+ readonly type: string;
4487
+ readonly message: string;
4488
+ readonly status?: number | undefined;
4489
+ readonly response?: {
4490
+ readonly body: string;
4491
+ } | undefined;
4492
+ readonly retryAfterMs?: number | undefined;
2580
4493
  } | undefined;
2581
- readonly type: "assistant";
2582
- readonly agent: string & import("effect/Brand").Brand<"Agent.ID">;
2583
- readonly model: {
2584
- readonly id: string & import("effect/Brand").Brand<"Model.ID">;
2585
- readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
2586
- readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2587
- };
2588
- readonly content: readonly ({
2589
- readonly type: "tool";
4494
+ }, MessageDecodeError, never>;
4495
+ /** Decodes rows for clients that fetch media themselves, so files stored in `blob` stay `media:` refs. */
4496
+ export declare const decodeMessageRowsWithRefs: (db: import("../database/drizzle.js").EffectSQLiteDatabase<import("drizzle-orm").EmptyRelations> & {
4497
+ $client: import("effect/sql/SqlClient").SqlClient;
4498
+ }, rows: readonly {
4499
+ data: Omit<{
4500
+ readonly id: string;
4501
+ readonly metadata?: {
4502
+ readonly [x: string]: unknown;
4503
+ } | undefined;
4504
+ readonly time: {
4505
+ readonly created: number;
4506
+ };
4507
+ readonly type: "agent-switched";
4508
+ readonly agent: string;
4509
+ readonly previous?: string | undefined;
4510
+ }, "id" | "type"> | Omit<{
4511
+ readonly id: string;
4512
+ readonly metadata?: {
4513
+ readonly [x: string]: unknown;
4514
+ } | undefined;
4515
+ readonly time: {
4516
+ readonly created: number;
4517
+ };
4518
+ readonly type: "model-switched";
4519
+ readonly model: {
4520
+ readonly id: string;
4521
+ readonly providerID: string;
4522
+ readonly variant?: string | undefined;
4523
+ };
4524
+ readonly previous?: {
4525
+ readonly id: string;
4526
+ readonly providerID: string;
4527
+ readonly variant?: string | undefined;
4528
+ } | undefined;
4529
+ }, "id" | "type"> | Omit<{
4530
+ readonly id: string;
4531
+ readonly metadata?: {
4532
+ readonly [x: string]: unknown;
4533
+ } | undefined;
4534
+ readonly time: {
4535
+ readonly created: number;
4536
+ };
4537
+ readonly type: "location-switched";
4538
+ readonly location: {
4539
+ readonly directory: string;
4540
+ readonly workspaceID?: string | undefined;
4541
+ };
4542
+ readonly projectID?: string | undefined;
4543
+ readonly subpath?: string | undefined;
4544
+ readonly previous?: {
4545
+ readonly location: {
4546
+ readonly directory: string;
4547
+ readonly workspaceID?: string | undefined;
4548
+ };
4549
+ readonly projectID?: string | undefined;
4550
+ readonly subpath?: string | undefined;
4551
+ } | undefined;
4552
+ }, "id" | "type"> | Omit<{
4553
+ readonly id: string;
4554
+ readonly metadata?: {
4555
+ readonly [x: string]: unknown;
4556
+ } | undefined;
4557
+ readonly time: {
4558
+ readonly created: number;
4559
+ };
4560
+ readonly text: string;
4561
+ readonly description?: string | undefined;
4562
+ readonly type: "synthetic";
4563
+ }, "id" | "type"> | Omit<{
4564
+ readonly id: string;
4565
+ readonly metadata?: {
4566
+ readonly [x: string]: unknown;
4567
+ } | undefined;
4568
+ readonly time: {
4569
+ readonly created: number;
4570
+ };
4571
+ readonly type: "system";
4572
+ readonly text: string;
4573
+ readonly description?: string | undefined;
4574
+ }, "id" | "type"> | Omit<{
4575
+ readonly id: string;
4576
+ readonly metadata?: {
4577
+ readonly [x: string]: unknown;
4578
+ } | undefined;
4579
+ readonly time: {
4580
+ readonly created: number;
4581
+ };
4582
+ readonly type: "skill";
4583
+ readonly skill: string;
4584
+ readonly name: string;
4585
+ readonly text: string;
4586
+ }, "id" | "type"> | Omit<{
4587
+ readonly id: string;
4588
+ readonly metadata?: {
4589
+ readonly [x: string]: unknown;
4590
+ } | undefined;
4591
+ readonly type: "shell";
4592
+ readonly shellID: string;
4593
+ readonly command: string;
4594
+ readonly status: "exited" | "killed" | "running" | "timeout";
4595
+ readonly exit?: number | undefined;
4596
+ readonly output?: {
4597
+ readonly output: string;
4598
+ readonly cursor: number;
4599
+ readonly size: number;
4600
+ readonly truncated: boolean;
4601
+ } | undefined;
4602
+ readonly time: {
4603
+ readonly created: number;
4604
+ readonly completed?: number | undefined;
4605
+ };
4606
+ }, "id" | "type"> | Omit<{
2590
4607
  readonly id: string;
2591
- readonly name: string;
2592
- readonly executed?: boolean | undefined;
2593
- readonly native?: {
4608
+ readonly metadata?: {
2594
4609
  readonly [x: string]: unknown;
2595
4610
  } | undefined;
2596
- readonly state: {
2597
- readonly status: "streaming";
2598
- readonly input: string;
2599
- } | {
2600
- readonly status: "running";
2601
- readonly input: {
4611
+ readonly type: "assistant";
4612
+ readonly agent: string;
4613
+ readonly model: {
4614
+ readonly id: string;
4615
+ readonly providerID: string;
4616
+ readonly variant?: string | undefined;
4617
+ };
4618
+ readonly content: readonly ({
4619
+ readonly type: "tool";
4620
+ readonly id: string;
4621
+ readonly name: string;
4622
+ readonly executed?: boolean | undefined;
4623
+ readonly native?: {
2602
4624
  readonly [x: string]: unknown;
4625
+ } | undefined;
4626
+ readonly state: {
4627
+ readonly status: "streaming";
4628
+ readonly input: string;
4629
+ } | {
4630
+ readonly status: "running";
4631
+ readonly input: {
4632
+ readonly [x: string]: unknown;
4633
+ };
4634
+ readonly metadata: {
4635
+ readonly [x: string]: Schema.Json;
4636
+ };
4637
+ } | {
4638
+ readonly status: "completed";
4639
+ readonly input: {
4640
+ readonly [x: string]: unknown;
4641
+ };
4642
+ readonly content: readonly [{
4643
+ readonly type: "text";
4644
+ readonly text: string;
4645
+ } | {
4646
+ readonly type: "file";
4647
+ readonly uri: string;
4648
+ readonly mime: string;
4649
+ readonly name?: string | undefined;
4650
+ }, ...({
4651
+ readonly type: "text";
4652
+ readonly text: string;
4653
+ } | {
4654
+ readonly type: "file";
4655
+ readonly uri: string;
4656
+ readonly mime: string;
4657
+ readonly name?: string | undefined;
4658
+ })[]];
4659
+ readonly metadata?: {
4660
+ readonly [x: string]: Schema.Json;
4661
+ } | undefined;
4662
+ } | {
4663
+ readonly status: "error";
4664
+ readonly input: {
4665
+ readonly [x: string]: unknown;
4666
+ };
4667
+ readonly error: {
4668
+ readonly type: string;
4669
+ readonly message: string;
4670
+ readonly status?: number | undefined;
4671
+ readonly response?: {
4672
+ readonly body: string;
4673
+ } | undefined;
4674
+ readonly retryAfterMs?: number | undefined;
4675
+ };
4676
+ readonly content?: readonly [{
4677
+ readonly type: "text";
4678
+ readonly text: string;
4679
+ } | {
4680
+ readonly type: "file";
4681
+ readonly uri: string;
4682
+ readonly mime: string;
4683
+ readonly name?: string | undefined;
4684
+ }, ...({
4685
+ readonly type: "text";
4686
+ readonly text: string;
4687
+ } | {
4688
+ readonly type: "file";
4689
+ readonly uri: string;
4690
+ readonly mime: string;
4691
+ readonly name?: string | undefined;
4692
+ })[]] | undefined;
4693
+ readonly metadata?: {
4694
+ readonly [x: string]: Schema.Json;
4695
+ } | undefined;
2603
4696
  };
2604
- readonly metadata: {
2605
- readonly [x: string]: Schema.Json;
4697
+ readonly time: {
4698
+ readonly created: number;
4699
+ readonly ran?: number | undefined;
4700
+ readonly completed?: number | undefined;
2606
4701
  };
2607
4702
  } | {
2608
- readonly status: "completed";
2609
- readonly input: {
4703
+ readonly type: "text";
4704
+ readonly text: string;
4705
+ readonly native?: {
2610
4706
  readonly [x: string]: unknown;
2611
- };
2612
- readonly content: readonly [{
2613
- readonly type: "text";
2614
- readonly text: string;
2615
- } | {
2616
- readonly type: "file";
2617
- readonly uri: string;
2618
- readonly mime: string;
2619
- readonly name?: string | undefined;
2620
- }, ...({
2621
- readonly type: "text";
2622
- readonly text: string;
2623
- } | {
2624
- readonly type: "file";
2625
- readonly uri: string;
2626
- readonly mime: string;
2627
- readonly name?: string | undefined;
2628
- })[]];
2629
- readonly metadata?: {
2630
- readonly [x: string]: Schema.Json;
2631
4707
  } | undefined;
2632
4708
  } | {
2633
- readonly status: "error";
2634
- readonly input: {
4709
+ readonly type: "reasoning";
4710
+ readonly text: string;
4711
+ readonly native?: {
2635
4712
  readonly [x: string]: unknown;
4713
+ } | undefined;
4714
+ readonly time?: {
4715
+ readonly created: number;
4716
+ readonly completed?: number | undefined;
4717
+ } | undefined;
4718
+ })[];
4719
+ readonly snapshot?: {
4720
+ readonly start?: string | undefined;
4721
+ readonly end?: string | undefined;
4722
+ readonly files?: readonly string[] | undefined;
4723
+ } | undefined;
4724
+ readonly finish?: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown" | undefined;
4725
+ readonly rawFinish?: string | undefined;
4726
+ readonly native?: {
4727
+ readonly [x: string]: unknown;
4728
+ } | undefined;
4729
+ readonly cost?: number | undefined;
4730
+ readonly tokens?: {
4731
+ readonly input: number;
4732
+ readonly output: number;
4733
+ readonly reasoning: number;
4734
+ readonly cache: {
4735
+ readonly read: number;
4736
+ readonly write: number;
2636
4737
  };
4738
+ } | undefined;
4739
+ readonly error?: {
4740
+ readonly type: string;
4741
+ readonly message: string;
4742
+ readonly status?: number | undefined;
4743
+ readonly response?: {
4744
+ readonly body: string;
4745
+ } | undefined;
4746
+ readonly retryAfterMs?: number | undefined;
4747
+ } | undefined;
4748
+ readonly retry?: {
4749
+ readonly attempt: number;
4750
+ readonly at: number;
2637
4751
  readonly error: {
2638
4752
  readonly type: string;
2639
4753
  readonly message: string;
@@ -2643,81 +4757,75 @@ export declare const decodeMessageRows: (db: import("../database/drizzle.js").Ef
2643
4757
  } | undefined;
2644
4758
  readonly retryAfterMs?: number | undefined;
2645
4759
  };
2646
- readonly content?: readonly [{
2647
- readonly type: "text";
2648
- readonly text: string;
2649
- } | {
2650
- readonly type: "file";
2651
- readonly uri: string;
2652
- readonly mime: string;
2653
- readonly name?: string | undefined;
2654
- }, ...({
2655
- readonly type: "text";
2656
- readonly text: string;
2657
- } | {
2658
- readonly type: "file";
2659
- readonly uri: string;
2660
- readonly mime: string;
2661
- readonly name?: string | undefined;
2662
- })[]] | undefined;
2663
- readonly metadata?: {
2664
- readonly [x: string]: Schema.Json;
2665
- } | undefined;
4760
+ } | undefined;
4761
+ readonly time: {
4762
+ readonly created: number;
4763
+ readonly streamed?: number | undefined;
4764
+ readonly completed?: number | undefined;
2666
4765
  };
4766
+ }, "id" | "type"> | Omit<{
4767
+ readonly id: string;
4768
+ readonly metadata?: {
4769
+ readonly [x: string]: unknown;
4770
+ } | undefined;
2667
4771
  readonly time: {
2668
- readonly created: import("effect/DateTime").Utc;
2669
- readonly ran?: import("effect/DateTime").Utc | undefined;
2670
- readonly completed?: import("effect/DateTime").Utc | undefined;
4772
+ readonly created: number;
2671
4773
  };
2672
- } | {
2673
- readonly type: "text";
2674
- readonly text: string;
2675
- readonly native?: {
4774
+ readonly type: "compaction";
4775
+ readonly status: "running";
4776
+ readonly reason: "auto" | "manual";
4777
+ readonly summary: string;
4778
+ }, "id" | "type"> | Omit<{
4779
+ readonly id: string;
4780
+ readonly metadata?: {
2676
4781
  readonly [x: string]: unknown;
2677
4782
  } | undefined;
2678
- } | {
2679
- readonly type: "reasoning";
2680
- readonly text: string;
4783
+ readonly time: {
4784
+ readonly created: number;
4785
+ };
4786
+ readonly type: "compaction";
4787
+ readonly cost?: number | undefined;
4788
+ readonly tokens?: {
4789
+ readonly input: number;
4790
+ readonly output: number;
4791
+ readonly reasoning: number;
4792
+ readonly cache: {
4793
+ readonly read: number;
4794
+ readonly write: number;
4795
+ };
4796
+ } | undefined;
4797
+ readonly status: "completed";
4798
+ readonly reason: "auto" | "manual";
4799
+ readonly model?: {
4800
+ readonly id: string;
4801
+ readonly providerID: string;
4802
+ readonly variant?: string | undefined;
4803
+ } | undefined;
2681
4804
  readonly native?: {
2682
4805
  readonly [x: string]: unknown;
2683
4806
  } | undefined;
2684
- readonly time?: {
2685
- readonly created: import("effect/DateTime").Utc;
2686
- readonly completed?: import("effect/DateTime").Utc | undefined;
2687
- } | undefined;
2688
- })[];
2689
- readonly snapshot?: {
2690
- readonly start?: (string & import("effect/Brand").Brand<"Snapshot.ID">) | undefined;
2691
- readonly end?: (string & import("effect/Brand").Brand<"Snapshot.ID">) | undefined;
2692
- readonly files?: readonly (string & import("effect/Brand").Brand<"RelativePath">)[] | undefined;
2693
- } | undefined;
2694
- readonly finish?: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown" | undefined;
2695
- readonly rawFinish?: string | undefined;
2696
- readonly native?: {
2697
- readonly [x: string]: unknown;
2698
- } | undefined;
2699
- readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
2700
- readonly tokens?: {
2701
- readonly input: number;
2702
- readonly output: number;
2703
- readonly reasoning: number;
2704
- readonly cache: {
2705
- readonly read: number;
2706
- readonly write: number;
4807
+ readonly summary: string;
4808
+ }, "id" | "type"> | Omit<{
4809
+ readonly id: string;
4810
+ readonly metadata?: {
4811
+ readonly [x: string]: unknown;
4812
+ } | undefined;
4813
+ readonly time: {
4814
+ readonly created: number;
2707
4815
  };
2708
- } | undefined;
2709
- readonly error?: {
2710
- readonly type: string;
2711
- readonly message: string;
2712
- readonly status?: number | undefined;
2713
- readonly response?: {
2714
- readonly body: string;
4816
+ readonly type: "compaction";
4817
+ readonly cost?: number | undefined;
4818
+ readonly tokens?: {
4819
+ readonly input: number;
4820
+ readonly output: number;
4821
+ readonly reasoning: number;
4822
+ readonly cache: {
4823
+ readonly read: number;
4824
+ readonly write: number;
4825
+ };
2715
4826
  } | undefined;
2716
- readonly retryAfterMs?: number | undefined;
2717
- } | undefined;
2718
- readonly retry?: {
2719
- readonly attempt: number;
2720
- readonly at: import("effect/DateTime").Utc;
4827
+ readonly status: "failed";
4828
+ readonly reason: "auto" | "manual";
2721
4829
  readonly error: {
2722
4830
  readonly type: string;
2723
4831
  readonly message: string;
@@ -2727,12 +4835,104 @@ export declare const decodeMessageRows: (db: import("../database/drizzle.js").Ef
2727
4835
  } | undefined;
2728
4836
  readonly retryAfterMs?: number | undefined;
2729
4837
  };
4838
+ }, "id" | "type"> | Omit<{
4839
+ readonly id: string;
4840
+ readonly metadata?: {
4841
+ readonly [x: string]: unknown;
4842
+ } | undefined;
4843
+ readonly time: {
4844
+ readonly created: number;
4845
+ };
4846
+ readonly type: "idle";
4847
+ readonly outcome: "failed" | "interrupted" | "succeeded";
4848
+ readonly error?: {
4849
+ readonly type: string;
4850
+ readonly message: string;
4851
+ readonly status?: number | undefined;
4852
+ readonly response?: {
4853
+ readonly body: string;
4854
+ } | undefined;
4855
+ readonly retryAfterMs?: number | undefined;
4856
+ } | undefined;
4857
+ }, "id" | "type"> | Omit<{
4858
+ readonly id: string;
4859
+ readonly metadata?: {
4860
+ readonly [x: string]: unknown;
4861
+ } | undefined;
4862
+ readonly time: {
4863
+ readonly created: number;
4864
+ };
4865
+ readonly text: string;
4866
+ readonly agents?: readonly {
4867
+ readonly name: string;
4868
+ readonly mention?: {
4869
+ readonly start: number;
4870
+ readonly end: number;
4871
+ readonly text: string;
4872
+ } | undefined;
4873
+ }[] | undefined;
4874
+ readonly skills?: readonly {
4875
+ readonly id: string;
4876
+ readonly name: string;
4877
+ readonly text?: string | undefined;
4878
+ readonly mention?: {
4879
+ readonly start: number;
4880
+ readonly end: number;
4881
+ readonly text: string;
4882
+ } | undefined;
4883
+ }[] | undefined;
4884
+ readonly type: "user";
4885
+ readonly files?: readonly ({
4886
+ readonly data: string;
4887
+ readonly mime: string;
4888
+ readonly source: {
4889
+ readonly type: "inline";
4890
+ } | {
4891
+ readonly type: "uri";
4892
+ readonly uri: string;
4893
+ };
4894
+ readonly name?: string | undefined;
4895
+ readonly description?: string | undefined;
4896
+ readonly mention?: {
4897
+ readonly start: number;
4898
+ readonly end: number;
4899
+ readonly text: string;
4900
+ } | undefined;
4901
+ } | {
4902
+ readonly mime: string;
4903
+ readonly source: {
4904
+ readonly type: "inline";
4905
+ } | {
4906
+ readonly type: "uri";
4907
+ readonly uri: string;
4908
+ };
4909
+ readonly name?: string | undefined;
4910
+ readonly description?: string | undefined;
4911
+ readonly mention?: {
4912
+ readonly start: number;
4913
+ readonly end: number;
4914
+ readonly text: string;
4915
+ } | undefined;
4916
+ readonly uri: string;
4917
+ })[] | undefined;
4918
+ }, "id" | "type">;
4919
+ id: string & import("effect/Brand").Brand<"Session.Message.ID">;
4920
+ seq: number;
4921
+ session_id: string & import("effect/Brand").Brand<"SessionID">;
4922
+ time_created: number;
4923
+ time_updated: number;
4924
+ type: "agent-switched" | "assistant" | "compaction" | "idle" | "location-switched" | "model-switched" | "shell" | "skill" | "synthetic" | "system" | "user";
4925
+ }[]) => Effect.Effect<({
4926
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
4927
+ readonly metadata?: {
4928
+ readonly [x: string]: unknown;
2730
4929
  } | undefined;
2731
4930
  readonly time: {
2732
4931
  readonly created: import("effect/DateTime").Utc;
2733
- readonly streamed?: import("effect/DateTime").Utc | undefined;
2734
- readonly completed?: import("effect/DateTime").Utc | undefined;
2735
4932
  };
4933
+ readonly type: "agent-switched";
4934
+ readonly agent: string & import("effect/Brand").Brand<"Agent.ID">;
4935
+ readonly previous?: (string & import("effect/Brand").Brand<"Agent.ID">) | undefined;
2736
4936
  } | {
2737
4937
  readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2738
4938
  readonly metadata?: {
@@ -2741,10 +4941,17 @@ export declare const decodeMessageRows: (db: import("../database/drizzle.js").Ef
2741
4941
  readonly time: {
2742
4942
  readonly created: import("effect/DateTime").Utc;
2743
4943
  };
2744
- readonly type: "compaction";
2745
- readonly status: "running";
2746
- readonly reason: "auto" | "manual";
2747
- readonly summary: string;
4944
+ readonly type: "model-switched";
4945
+ readonly model: {
4946
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
4947
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
4948
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
4949
+ };
4950
+ readonly previous?: {
4951
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
4952
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
4953
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
4954
+ } | undefined;
2748
4955
  } | {
2749
4956
  readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2750
4957
  readonly metadata?: {
@@ -2753,28 +4960,85 @@ export declare const decodeMessageRows: (db: import("../database/drizzle.js").Ef
2753
4960
  readonly time: {
2754
4961
  readonly created: import("effect/DateTime").Utc;
2755
4962
  };
2756
- readonly type: "compaction";
2757
- readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
2758
- readonly tokens?: {
2759
- readonly input: number;
2760
- readonly output: number;
2761
- readonly reasoning: number;
2762
- readonly cache: {
2763
- readonly read: number;
2764
- readonly write: number;
4963
+ readonly type: "location-switched";
4964
+ readonly location: {
4965
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
4966
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
4967
+ };
4968
+ readonly projectID?: (string & import("effect/Brand").Brand<"Project.ID">) | undefined;
4969
+ readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
4970
+ readonly previous?: {
4971
+ readonly location: {
4972
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
4973
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
2765
4974
  };
4975
+ readonly projectID?: (string & import("effect/Brand").Brand<"Project.ID">) | undefined;
4976
+ readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
2766
4977
  } | undefined;
2767
- readonly status: "completed";
2768
- readonly reason: "auto" | "manual";
2769
- readonly model?: {
2770
- readonly id: string & import("effect/Brand").Brand<"Model.ID">;
2771
- readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
2772
- readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2773
- } | undefined;
2774
- readonly native?: {
4978
+ } | {
4979
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
4980
+ readonly metadata?: {
2775
4981
  readonly [x: string]: unknown;
2776
4982
  } | undefined;
2777
- readonly summary: string;
4983
+ readonly time: {
4984
+ readonly created: import("effect/DateTime").Utc;
4985
+ };
4986
+ readonly text: string;
4987
+ readonly agents?: readonly {
4988
+ readonly name: string;
4989
+ readonly mention?: {
4990
+ readonly start: number;
4991
+ readonly end: number;
4992
+ readonly text: string;
4993
+ } | undefined;
4994
+ }[] | undefined;
4995
+ readonly skills?: readonly {
4996
+ readonly id: string & import("effect/Brand").Brand<"Skill.ID">;
4997
+ readonly name: string & import("effect/Brand").Brand<"Skill.Name">;
4998
+ readonly text?: string | undefined;
4999
+ readonly mention?: {
5000
+ readonly start: number;
5001
+ readonly end: number;
5002
+ readonly text: string;
5003
+ } | undefined;
5004
+ }[] | undefined;
5005
+ readonly type: "user";
5006
+ readonly files?: readonly ({
5007
+ readonly data: string;
5008
+ readonly mime: string;
5009
+ readonly source: {
5010
+ readonly type: "inline";
5011
+ } | {
5012
+ readonly type: "uri";
5013
+ readonly uri: string;
5014
+ };
5015
+ readonly name?: string | undefined;
5016
+ readonly description?: string | undefined;
5017
+ readonly mention?: {
5018
+ readonly start: number;
5019
+ readonly end: number;
5020
+ readonly text: string;
5021
+ } | undefined;
5022
+ } | {
5023
+ readonly mime: string;
5024
+ readonly source: {
5025
+ readonly type: "inline";
5026
+ } | {
5027
+ readonly type: "uri";
5028
+ readonly uri: string;
5029
+ };
5030
+ readonly name?: string | undefined;
5031
+ readonly description?: string | undefined;
5032
+ readonly mention?: {
5033
+ readonly start: number;
5034
+ readonly end: number;
5035
+ readonly text: string;
5036
+ } | undefined;
5037
+ readonly uri: string;
5038
+ readonly bytes?: number | undefined;
5039
+ readonly width?: number | undefined;
5040
+ readonly height?: number | undefined;
5041
+ })[] | undefined;
2778
5042
  } | {
2779
5043
  readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2780
5044
  readonly metadata?: {
@@ -2783,28 +5047,20 @@ export declare const decodeMessageRows: (db: import("../database/drizzle.js").Ef
2783
5047
  readonly time: {
2784
5048
  readonly created: import("effect/DateTime").Utc;
2785
5049
  };
2786
- readonly type: "compaction";
2787
- readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
2788
- readonly tokens?: {
2789
- readonly input: number;
2790
- readonly output: number;
2791
- readonly reasoning: number;
2792
- readonly cache: {
2793
- readonly read: number;
2794
- readonly write: number;
2795
- };
5050
+ readonly text: string;
5051
+ readonly description?: string | undefined;
5052
+ readonly type: "synthetic";
5053
+ } | {
5054
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
5055
+ readonly metadata?: {
5056
+ readonly [x: string]: unknown;
2796
5057
  } | undefined;
2797
- readonly status: "failed";
2798
- readonly reason: "auto" | "manual";
2799
- readonly error: {
2800
- readonly type: string;
2801
- readonly message: string;
2802
- readonly status?: number | undefined;
2803
- readonly response?: {
2804
- readonly body: string;
2805
- } | undefined;
2806
- readonly retryAfterMs?: number | undefined;
5058
+ readonly time: {
5059
+ readonly created: import("effect/DateTime").Utc;
2807
5060
  };
5061
+ readonly type: "system";
5062
+ readonly text: string;
5063
+ readonly description?: string | undefined;
2808
5064
  } | {
2809
5065
  readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2810
5066
  readonly metadata?: {
@@ -2813,274 +5069,91 @@ export declare const decodeMessageRows: (db: import("../database/drizzle.js").Ef
2813
5069
  readonly time: {
2814
5070
  readonly created: import("effect/DateTime").Utc;
2815
5071
  };
2816
- readonly type: "idle";
2817
- readonly outcome: "failed" | "interrupted" | "succeeded";
2818
- readonly error?: {
2819
- readonly type: string;
2820
- readonly message: string;
2821
- readonly status?: number | undefined;
2822
- readonly response?: {
2823
- readonly body: string;
2824
- } | undefined;
2825
- readonly retryAfterMs?: number | undefined;
5072
+ readonly type: "skill";
5073
+ readonly skill: string & import("effect/Brand").Brand<"Skill.ID">;
5074
+ readonly name: string & import("effect/Brand").Brand<"Skill.Name">;
5075
+ readonly text: string;
5076
+ } | {
5077
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
5078
+ readonly metadata?: {
5079
+ readonly [x: string]: unknown;
2826
5080
  } | undefined;
2827
- })[], MessageDecodeError, never>;
2828
- /** Decodes rows for clients that fetch media themselves, so files stored in `blob` stay `media:` refs. */
2829
- export declare const decodeMessageRowsWithRefs: (db: import("../database/drizzle.js").EffectSQLiteDatabase<import("drizzle-orm").EmptyRelations> & {
2830
- $client: import("effect/sql/SqlClient").SqlClient;
2831
- }, rows: readonly {
2832
- data: Omit<{
2833
- readonly id: string;
2834
- readonly metadata?: {
2835
- readonly [x: string]: unknown;
2836
- } | undefined;
2837
- readonly time: {
2838
- readonly created: number;
2839
- };
2840
- readonly type: "agent-switched";
2841
- readonly agent: string;
2842
- readonly previous?: string | undefined;
2843
- }, "id" | "type"> | Omit<{
2844
- readonly id: string;
2845
- readonly metadata?: {
2846
- readonly [x: string]: unknown;
2847
- } | undefined;
2848
- readonly time: {
2849
- readonly created: number;
2850
- };
2851
- readonly type: "model-switched";
2852
- readonly model: {
2853
- readonly id: string;
2854
- readonly providerID: string;
2855
- readonly variant?: string | undefined;
2856
- };
2857
- readonly previous?: {
2858
- readonly id: string;
2859
- readonly providerID: string;
2860
- readonly variant?: string | undefined;
2861
- } | undefined;
2862
- }, "id" | "type"> | Omit<{
2863
- readonly id: string;
2864
- readonly metadata?: {
2865
- readonly [x: string]: unknown;
2866
- } | undefined;
2867
- readonly time: {
2868
- readonly created: number;
2869
- };
2870
- readonly type: "location-switched";
2871
- readonly location: {
2872
- readonly directory: string;
2873
- readonly workspaceID?: string | undefined;
2874
- };
2875
- readonly projectID?: string | undefined;
2876
- readonly subpath?: string | undefined;
2877
- readonly previous?: {
2878
- readonly location: {
2879
- readonly directory: string;
2880
- readonly workspaceID?: string | undefined;
2881
- };
2882
- readonly projectID?: string | undefined;
2883
- readonly subpath?: string | undefined;
2884
- } | undefined;
2885
- }, "id" | "type"> | Omit<{
2886
- readonly id: string;
2887
- readonly metadata?: {
2888
- readonly [x: string]: unknown;
2889
- } | undefined;
2890
- readonly time: {
2891
- readonly created: number;
2892
- };
2893
- readonly text: string;
2894
- readonly description?: string | undefined;
2895
- readonly type: "synthetic";
2896
- }, "id" | "type"> | Omit<{
2897
- readonly id: string;
2898
- readonly metadata?: {
2899
- readonly [x: string]: unknown;
2900
- } | undefined;
2901
- readonly time: {
2902
- readonly created: number;
2903
- };
2904
- readonly type: "system";
2905
- readonly text: string;
2906
- readonly description?: string | undefined;
2907
- }, "id" | "type"> | Omit<{
2908
- readonly id: string;
2909
- readonly metadata?: {
2910
- readonly [x: string]: unknown;
2911
- } | undefined;
2912
- readonly time: {
2913
- readonly created: number;
2914
- };
2915
- readonly type: "skill";
2916
- readonly skill: string;
2917
- readonly name: string;
2918
- readonly text: string;
2919
- }, "id" | "type"> | Omit<{
2920
- readonly id: string;
2921
- readonly metadata?: {
2922
- readonly [x: string]: unknown;
2923
- } | undefined;
2924
- readonly type: "shell";
2925
- readonly shellID: string;
2926
- readonly command: string;
2927
- readonly status: "exited" | "killed" | "running" | "timeout";
2928
- readonly exit?: number | undefined;
2929
- readonly output?: {
2930
- readonly output: string;
2931
- readonly cursor: number;
2932
- readonly size: number;
2933
- readonly truncated: boolean;
2934
- } | undefined;
2935
- readonly time: {
2936
- readonly created: number;
2937
- readonly completed?: number | undefined;
2938
- };
2939
- }, "id" | "type"> | Omit<{
2940
- readonly id: string;
2941
- readonly metadata?: {
2942
- readonly [x: string]: unknown;
2943
- } | undefined;
2944
- readonly type: "assistant";
2945
- readonly agent: string;
2946
- readonly model: {
2947
- readonly id: string;
2948
- readonly providerID: string;
2949
- readonly variant?: string | undefined;
2950
- };
2951
- readonly content: readonly ({
2952
- readonly type: "tool";
2953
- readonly id: string;
2954
- readonly name: string;
2955
- readonly executed?: boolean | undefined;
2956
- readonly native?: {
2957
- readonly [x: string]: unknown;
2958
- } | undefined;
2959
- readonly state: {
2960
- readonly status: "streaming";
2961
- readonly input: string;
2962
- } | {
2963
- readonly status: "running";
2964
- readonly input: {
2965
- readonly [x: string]: unknown;
2966
- };
2967
- readonly metadata: {
2968
- readonly [x: string]: Schema.Json;
2969
- };
2970
- } | {
2971
- readonly status: "completed";
2972
- readonly input: {
2973
- readonly [x: string]: unknown;
2974
- };
2975
- readonly content: readonly [{
2976
- readonly type: "text";
2977
- readonly text: string;
2978
- } | {
2979
- readonly type: "file";
2980
- readonly uri: string;
2981
- readonly mime: string;
2982
- readonly name?: string | undefined;
2983
- }, ...({
2984
- readonly type: "text";
2985
- readonly text: string;
2986
- } | {
2987
- readonly type: "file";
2988
- readonly uri: string;
2989
- readonly mime: string;
2990
- readonly name?: string | undefined;
2991
- })[]];
2992
- readonly metadata?: {
2993
- readonly [x: string]: Schema.Json;
2994
- } | undefined;
2995
- } | {
2996
- readonly status: "error";
2997
- readonly input: {
2998
- readonly [x: string]: unknown;
2999
- };
3000
- readonly error: {
3001
- readonly type: string;
3002
- readonly message: string;
3003
- readonly status?: number | undefined;
3004
- readonly response?: {
3005
- readonly body: string;
3006
- } | undefined;
3007
- readonly retryAfterMs?: number | undefined;
3008
- };
3009
- readonly content?: readonly [{
3010
- readonly type: "text";
3011
- readonly text: string;
3012
- } | {
3013
- readonly type: "file";
3014
- readonly uri: string;
3015
- readonly mime: string;
3016
- readonly name?: string | undefined;
3017
- }, ...({
3018
- readonly type: "text";
3019
- readonly text: string;
3020
- } | {
3021
- readonly type: "file";
3022
- readonly uri: string;
3023
- readonly mime: string;
3024
- readonly name?: string | undefined;
3025
- })[]] | undefined;
3026
- readonly metadata?: {
3027
- readonly [x: string]: Schema.Json;
3028
- } | undefined;
5081
+ readonly type: "shell";
5082
+ readonly shellID: string & import("effect/Brand").Brand<"Shell.ID">;
5083
+ readonly command: string;
5084
+ readonly status: "exited" | "killed" | "running" | "timeout";
5085
+ readonly exit?: number | undefined;
5086
+ readonly output?: {
5087
+ readonly output: string;
5088
+ readonly cursor: number;
5089
+ readonly size: number;
5090
+ readonly truncated: boolean;
5091
+ } | undefined;
5092
+ readonly time: {
5093
+ readonly created: import("effect/DateTime").Utc;
5094
+ readonly completed?: import("effect/DateTime").Utc | undefined;
5095
+ };
5096
+ } | {
5097
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
5098
+ readonly metadata?: {
5099
+ readonly [x: string]: unknown;
5100
+ } | undefined;
5101
+ readonly type: "assistant";
5102
+ readonly agent: string & import("effect/Brand").Brand<"Agent.ID">;
5103
+ readonly model: {
5104
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
5105
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
5106
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
5107
+ };
5108
+ readonly content: readonly ({
5109
+ readonly type: "tool";
5110
+ readonly id: string;
5111
+ readonly name: string;
5112
+ readonly executed?: boolean | undefined;
5113
+ readonly native?: {
5114
+ readonly [x: string]: unknown;
5115
+ } | undefined;
5116
+ readonly state: {
5117
+ readonly status: "streaming";
5118
+ readonly input: string;
5119
+ } | {
5120
+ readonly status: "running";
5121
+ readonly input: {
5122
+ readonly [x: string]: unknown;
3029
5123
  };
3030
- readonly time: {
3031
- readonly created: number;
3032
- readonly ran?: number | undefined;
3033
- readonly completed?: number | undefined;
5124
+ readonly metadata: {
5125
+ readonly [x: string]: Schema.Json;
3034
5126
  };
3035
5127
  } | {
3036
- readonly type: "text";
3037
- readonly text: string;
3038
- readonly native?: {
5128
+ readonly status: "completed";
5129
+ readonly input: {
3039
5130
  readonly [x: string]: unknown;
5131
+ };
5132
+ readonly content: readonly [{
5133
+ readonly type: "text";
5134
+ readonly text: string;
5135
+ } | {
5136
+ readonly type: "file";
5137
+ readonly uri: string;
5138
+ readonly mime: string;
5139
+ readonly name?: string | undefined;
5140
+ }, ...({
5141
+ readonly type: "text";
5142
+ readonly text: string;
5143
+ } | {
5144
+ readonly type: "file";
5145
+ readonly uri: string;
5146
+ readonly mime: string;
5147
+ readonly name?: string | undefined;
5148
+ })[]];
5149
+ readonly metadata?: {
5150
+ readonly [x: string]: Schema.Json;
3040
5151
  } | undefined;
3041
5152
  } | {
3042
- readonly type: "reasoning";
3043
- readonly text: string;
3044
- readonly native?: {
5153
+ readonly status: "error";
5154
+ readonly input: {
3045
5155
  readonly [x: string]: unknown;
3046
- } | undefined;
3047
- readonly time?: {
3048
- readonly created: number;
3049
- readonly completed?: number | undefined;
3050
- } | undefined;
3051
- })[];
3052
- readonly snapshot?: {
3053
- readonly start?: string | undefined;
3054
- readonly end?: string | undefined;
3055
- readonly files?: readonly string[] | undefined;
3056
- } | undefined;
3057
- readonly finish?: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown" | undefined;
3058
- readonly rawFinish?: string | undefined;
3059
- readonly native?: {
3060
- readonly [x: string]: unknown;
3061
- } | undefined;
3062
- readonly cost?: number | undefined;
3063
- readonly tokens?: {
3064
- readonly input: number;
3065
- readonly output: number;
3066
- readonly reasoning: number;
3067
- readonly cache: {
3068
- readonly read: number;
3069
- readonly write: number;
3070
5156
  };
3071
- } | undefined;
3072
- readonly error?: {
3073
- readonly type: string;
3074
- readonly message: string;
3075
- readonly status?: number | undefined;
3076
- readonly response?: {
3077
- readonly body: string;
3078
- } | undefined;
3079
- readonly retryAfterMs?: number | undefined;
3080
- } | undefined;
3081
- readonly retry?: {
3082
- readonly attempt: number;
3083
- readonly at: number;
3084
5157
  readonly error: {
3085
5158
  readonly type: string;
3086
5159
  readonly message: string;
@@ -3090,75 +5163,81 @@ export declare const decodeMessageRowsWithRefs: (db: import("../database/drizzle
3090
5163
  } | undefined;
3091
5164
  readonly retryAfterMs?: number | undefined;
3092
5165
  };
3093
- } | undefined;
3094
- readonly time: {
3095
- readonly created: number;
3096
- readonly streamed?: number | undefined;
3097
- readonly completed?: number | undefined;
5166
+ readonly content?: readonly [{
5167
+ readonly type: "text";
5168
+ readonly text: string;
5169
+ } | {
5170
+ readonly type: "file";
5171
+ readonly uri: string;
5172
+ readonly mime: string;
5173
+ readonly name?: string | undefined;
5174
+ }, ...({
5175
+ readonly type: "text";
5176
+ readonly text: string;
5177
+ } | {
5178
+ readonly type: "file";
5179
+ readonly uri: string;
5180
+ readonly mime: string;
5181
+ readonly name?: string | undefined;
5182
+ })[]] | undefined;
5183
+ readonly metadata?: {
5184
+ readonly [x: string]: Schema.Json;
5185
+ } | undefined;
3098
5186
  };
3099
- }, "id" | "type"> | Omit<{
3100
- readonly id: string;
3101
- readonly metadata?: {
3102
- readonly [x: string]: unknown;
3103
- } | undefined;
3104
5187
  readonly time: {
3105
- readonly created: number;
5188
+ readonly created: import("effect/DateTime").Utc;
5189
+ readonly ran?: import("effect/DateTime").Utc | undefined;
5190
+ readonly completed?: import("effect/DateTime").Utc | undefined;
3106
5191
  };
3107
- readonly type: "compaction";
3108
- readonly status: "running";
3109
- readonly reason: "auto" | "manual";
3110
- readonly summary: string;
3111
- }, "id" | "type"> | Omit<{
3112
- readonly id: string;
3113
- readonly metadata?: {
5192
+ } | {
5193
+ readonly type: "text";
5194
+ readonly text: string;
5195
+ readonly native?: {
3114
5196
  readonly [x: string]: unknown;
3115
5197
  } | undefined;
3116
- readonly time: {
3117
- readonly created: number;
3118
- };
3119
- readonly type: "compaction";
3120
- readonly cost?: number | undefined;
3121
- readonly tokens?: {
3122
- readonly input: number;
3123
- readonly output: number;
3124
- readonly reasoning: number;
3125
- readonly cache: {
3126
- readonly read: number;
3127
- readonly write: number;
3128
- };
3129
- } | undefined;
3130
- readonly status: "completed";
3131
- readonly reason: "auto" | "manual";
3132
- readonly model?: {
3133
- readonly id: string;
3134
- readonly providerID: string;
3135
- readonly variant?: string | undefined;
3136
- } | undefined;
5198
+ } | {
5199
+ readonly type: "reasoning";
5200
+ readonly text: string;
3137
5201
  readonly native?: {
3138
5202
  readonly [x: string]: unknown;
3139
5203
  } | undefined;
3140
- readonly summary: string;
3141
- }, "id" | "type"> | Omit<{
3142
- readonly id: string;
3143
- readonly metadata?: {
3144
- readonly [x: string]: unknown;
5204
+ readonly time?: {
5205
+ readonly created: import("effect/DateTime").Utc;
5206
+ readonly completed?: import("effect/DateTime").Utc | undefined;
3145
5207
  } | undefined;
3146
- readonly time: {
3147
- readonly created: number;
5208
+ })[];
5209
+ readonly snapshot?: {
5210
+ readonly start?: (string & import("effect/Brand").Brand<"Snapshot.ID">) | undefined;
5211
+ readonly end?: (string & import("effect/Brand").Brand<"Snapshot.ID">) | undefined;
5212
+ readonly files?: readonly (string & import("effect/Brand").Brand<"RelativePath">)[] | undefined;
5213
+ } | undefined;
5214
+ readonly finish?: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown" | undefined;
5215
+ readonly rawFinish?: string | undefined;
5216
+ readonly native?: {
5217
+ readonly [x: string]: unknown;
5218
+ } | undefined;
5219
+ readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
5220
+ readonly tokens?: {
5221
+ readonly input: number;
5222
+ readonly output: number;
5223
+ readonly reasoning: number;
5224
+ readonly cache: {
5225
+ readonly read: number;
5226
+ readonly write: number;
3148
5227
  };
3149
- readonly type: "compaction";
3150
- readonly cost?: number | undefined;
3151
- readonly tokens?: {
3152
- readonly input: number;
3153
- readonly output: number;
3154
- readonly reasoning: number;
3155
- readonly cache: {
3156
- readonly read: number;
3157
- readonly write: number;
3158
- };
5228
+ } | undefined;
5229
+ readonly error?: {
5230
+ readonly type: string;
5231
+ readonly message: string;
5232
+ readonly status?: number | undefined;
5233
+ readonly response?: {
5234
+ readonly body: string;
3159
5235
  } | undefined;
3160
- readonly status: "failed";
3161
- readonly reason: "auto" | "manual";
5236
+ readonly retryAfterMs?: number | undefined;
5237
+ } | undefined;
5238
+ readonly retry?: {
5239
+ readonly attempt: number;
5240
+ readonly at: import("effect/DateTime").Utc;
3162
5241
  readonly error: {
3163
5242
  readonly type: string;
3164
5243
  readonly message: string;
@@ -3168,94 +5247,130 @@ export declare const decodeMessageRowsWithRefs: (db: import("../database/drizzle
3168
5247
  } | undefined;
3169
5248
  readonly retryAfterMs?: number | undefined;
3170
5249
  };
3171
- }, "id" | "type"> | Omit<{
3172
- readonly id: string;
3173
- readonly metadata?: {
3174
- readonly [x: string]: unknown;
3175
- } | undefined;
3176
- readonly time: {
3177
- readonly created: number;
5250
+ } | undefined;
5251
+ readonly time: {
5252
+ readonly created: import("effect/DateTime").Utc;
5253
+ readonly streamed?: import("effect/DateTime").Utc | undefined;
5254
+ readonly completed?: import("effect/DateTime").Utc | undefined;
5255
+ };
5256
+ } | {
5257
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
5258
+ readonly metadata?: {
5259
+ readonly [x: string]: unknown;
5260
+ } | undefined;
5261
+ readonly time: {
5262
+ readonly created: import("effect/DateTime").Utc;
5263
+ };
5264
+ readonly type: "compaction";
5265
+ readonly status: "running";
5266
+ readonly reason: "auto" | "manual";
5267
+ readonly summary: string;
5268
+ } | {
5269
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
5270
+ readonly metadata?: {
5271
+ readonly [x: string]: unknown;
5272
+ } | undefined;
5273
+ readonly time: {
5274
+ readonly created: import("effect/DateTime").Utc;
5275
+ };
5276
+ readonly type: "compaction";
5277
+ readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
5278
+ readonly tokens?: {
5279
+ readonly input: number;
5280
+ readonly output: number;
5281
+ readonly reasoning: number;
5282
+ readonly cache: {
5283
+ readonly read: number;
5284
+ readonly write: number;
5285
+ };
5286
+ } | undefined;
5287
+ readonly status: "completed";
5288
+ readonly reason: "auto" | "manual";
5289
+ readonly model?: {
5290
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
5291
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
5292
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
5293
+ } | undefined;
5294
+ readonly native?: {
5295
+ readonly [x: string]: unknown;
5296
+ } | undefined;
5297
+ readonly summary: string;
5298
+ } | {
5299
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
5300
+ readonly metadata?: {
5301
+ readonly [x: string]: unknown;
5302
+ } | undefined;
5303
+ readonly time: {
5304
+ readonly created: import("effect/DateTime").Utc;
5305
+ };
5306
+ readonly type: "compaction";
5307
+ readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
5308
+ readonly tokens?: {
5309
+ readonly input: number;
5310
+ readonly output: number;
5311
+ readonly reasoning: number;
5312
+ readonly cache: {
5313
+ readonly read: number;
5314
+ readonly write: number;
3178
5315
  };
3179
- readonly type: "idle";
3180
- readonly outcome: "failed" | "interrupted" | "succeeded";
3181
- readonly error?: {
3182
- readonly type: string;
3183
- readonly message: string;
3184
- readonly status?: number | undefined;
3185
- readonly response?: {
3186
- readonly body: string;
3187
- } | undefined;
3188
- readonly retryAfterMs?: number | undefined;
5316
+ } | undefined;
5317
+ readonly status: "failed";
5318
+ readonly reason: "auto" | "manual";
5319
+ readonly error: {
5320
+ readonly type: string;
5321
+ readonly message: string;
5322
+ readonly status?: number | undefined;
5323
+ readonly response?: {
5324
+ readonly body: string;
3189
5325
  } | undefined;
3190
- }, "id" | "type"> | Omit<{
3191
- readonly id: string;
3192
- readonly metadata?: {
3193
- readonly [x: string]: unknown;
5326
+ readonly retryAfterMs?: number | undefined;
5327
+ };
5328
+ } | {
5329
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
5330
+ readonly metadata?: {
5331
+ readonly [x: string]: unknown;
5332
+ } | undefined;
5333
+ readonly time: {
5334
+ readonly created: import("effect/DateTime").Utc;
5335
+ };
5336
+ readonly type: "idle";
5337
+ readonly outcome: "failed" | "interrupted" | "succeeded";
5338
+ readonly error?: {
5339
+ readonly type: string;
5340
+ readonly message: string;
5341
+ readonly status?: number | undefined;
5342
+ readonly response?: {
5343
+ readonly body: string;
3194
5344
  } | undefined;
3195
- readonly time: {
3196
- readonly created: number;
3197
- };
3198
- readonly text: string;
3199
- readonly agents?: readonly {
3200
- readonly name: string;
3201
- readonly mention?: {
3202
- readonly start: number;
3203
- readonly end: number;
3204
- readonly text: string;
3205
- } | undefined;
3206
- }[] | undefined;
3207
- readonly skills?: readonly {
3208
- readonly id: string;
3209
- readonly name: string;
3210
- readonly text?: string | undefined;
3211
- readonly mention?: {
3212
- readonly start: number;
3213
- readonly end: number;
3214
- readonly text: string;
3215
- } | undefined;
3216
- }[] | undefined;
3217
- readonly type: "user";
3218
- readonly files?: readonly ({
3219
- readonly data: string;
3220
- readonly mime: string;
3221
- readonly source: {
3222
- readonly type: "inline";
3223
- } | {
3224
- readonly type: "uri";
3225
- readonly uri: string;
3226
- };
3227
- readonly name?: string | undefined;
3228
- readonly description?: string | undefined;
3229
- readonly mention?: {
3230
- readonly start: number;
3231
- readonly end: number;
3232
- readonly text: string;
3233
- } | undefined;
3234
- } | {
3235
- readonly mime: string;
3236
- readonly source: {
3237
- readonly type: "inline";
3238
- } | {
3239
- readonly type: "uri";
3240
- readonly uri: string;
3241
- };
3242
- readonly name?: string | undefined;
3243
- readonly description?: string | undefined;
3244
- readonly mention?: {
3245
- readonly start: number;
3246
- readonly end: number;
3247
- readonly text: string;
3248
- } | undefined;
3249
- readonly uri: string;
3250
- })[] | undefined;
3251
- }, "id" | "type">;
3252
- id: string & import("effect/Brand").Brand<"Session.Message.ID">;
3253
- seq: number;
3254
- session_id: string & import("effect/Brand").Brand<"SessionID">;
3255
- time_created: number;
3256
- time_updated: number;
3257
- type: "agent-switched" | "assistant" | "compaction" | "idle" | "location-switched" | "model-switched" | "shell" | "skill" | "synthetic" | "system" | "user";
3258
- }[]) => Effect.Effect<({
5345
+ readonly retryAfterMs?: number | undefined;
5346
+ } | undefined;
5347
+ })[], MessageDecodeError, never>;
5348
+ export declare const load: (db: import("../database/drizzle.js").EffectSQLiteDatabase<import("drizzle-orm").EmptyRelations> & {
5349
+ $client: import("effect/sql/SqlClient").SqlClient;
5350
+ }, sessionID: string & import("effect/Brand").Brand<"SessionID">, boundary: Boundary) => Effect.Effect<SessionMessage.Info[], MessageDecodeError, never>;
5351
+ export declare const entriesForRunner: (db: import("../database/drizzle.js").EffectSQLiteDatabase<import("drizzle-orm").EmptyRelations> & {
5352
+ $client: import("effect/sql/SqlClient").SqlClient;
5353
+ }, sessionID: string & import("effect/Brand").Brand<"SessionID">, instructions: Instructions.List, boundary: Boundary) => Effect.Effect<{
5354
+ initial: readonly Instructions.Rendered[];
5355
+ entries: readonly {
5356
+ readonly seq: number;
5357
+ readonly message: SessionMessage.Info;
5358
+ }[];
5359
+ }, never, never>;
5360
+ export declare const preview: (db: import("../database/drizzle.js").EffectSQLiteDatabase<import("drizzle-orm").EmptyRelations> & {
5361
+ $client: import("effect/sql/SqlClient").SqlClient;
5362
+ }, sessionID: string & import("effect/Brand").Brand<"SessionID">, instructions: Instructions.List, boundary: Boundary) => Effect.Effect<{
5363
+ initial: readonly Instructions.Rendered[];
5364
+ messages: SessionMessage.Info[];
5365
+ instructionUpdate: string;
5366
+ }, Instructions.InitializationBlocked, never>;
5367
+ /**
5368
+ * The synthetic messages `load(db, sessionID, "latest")` would return, read without the rest of the transcript. Under
5369
+ * that boundary every row from the latest completed compaction on is kept, and synthetic rows carry no media.
5370
+ */
5371
+ export declare const synthetics: (db: import("../database/drizzle.js").EffectSQLiteDatabase<import("drizzle-orm").EmptyRelations> & {
5372
+ $client: import("effect/sql/SqlClient").SqlClient;
5373
+ }, sessionID: string & import("effect/Brand").Brand<"SessionID">) => Effect.Effect<({
3259
5374
  readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
3260
5375
  readonly metadata?: {
3261
5376
  readonly [x: string]: unknown;
@@ -3317,26 +5432,7 @@ export declare const decodeMessageRowsWithRefs: (db: import("../database/drizzle
3317
5432
  readonly created: import("effect/DateTime").Utc;
3318
5433
  };
3319
5434
  readonly text: string;
3320
- readonly agents?: readonly {
3321
- readonly name: string;
3322
- readonly mention?: {
3323
- readonly start: number;
3324
- readonly end: number;
3325
- readonly text: string;
3326
- } | undefined;
3327
- }[] | undefined;
3328
- readonly skills?: readonly {
3329
- readonly id: string & import("effect/Brand").Brand<"Skill.ID">;
3330
- readonly name: string & import("effect/Brand").Brand<"Skill.Name">;
3331
- readonly text?: string | undefined;
3332
- readonly mention?: {
3333
- readonly start: number;
3334
- readonly end: number;
3335
- readonly text: string;
3336
- } | undefined;
3337
- }[] | undefined;
3338
- readonly type: "user";
3339
- readonly files?: readonly ({
5435
+ readonly files?: readonly {
3340
5436
  readonly data: string;
3341
5437
  readonly mime: string;
3342
5438
  readonly source: {
@@ -3352,26 +5448,26 @@ export declare const decodeMessageRowsWithRefs: (db: import("../database/drizzle
3352
5448
  readonly end: number;
3353
5449
  readonly text: string;
3354
5450
  } | undefined;
3355
- } | {
3356
- readonly mime: string;
3357
- readonly source: {
3358
- readonly type: "inline";
3359
- } | {
3360
- readonly type: "uri";
3361
- readonly uri: string;
3362
- };
3363
- readonly name?: string | undefined;
3364
- readonly description?: string | undefined;
5451
+ }[] | undefined;
5452
+ readonly agents?: readonly {
5453
+ readonly name: string;
3365
5454
  readonly mention?: {
3366
5455
  readonly start: number;
3367
5456
  readonly end: number;
3368
5457
  readonly text: string;
3369
5458
  } | undefined;
3370
- readonly uri: string;
3371
- readonly bytes?: number | undefined;
3372
- readonly width?: number | undefined;
3373
- readonly height?: number | undefined;
3374
- })[] | undefined;
5459
+ }[] | undefined;
5460
+ readonly skills?: readonly {
5461
+ readonly id: string & import("effect/Brand").Brand<"Skill.ID">;
5462
+ readonly name: string & import("effect/Brand").Brand<"Skill.Name">;
5463
+ readonly text?: string | undefined;
5464
+ readonly mention?: {
5465
+ readonly start: number;
5466
+ readonly end: number;
5467
+ readonly text: string;
5468
+ } | undefined;
5469
+ }[] | undefined;
5470
+ readonly type: "user";
3375
5471
  } | {
3376
5472
  readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
3377
5473
  readonly metadata?: {
@@ -3678,30 +5774,11 @@ export declare const decodeMessageRowsWithRefs: (db: import("../database/drizzle
3678
5774
  readonly retryAfterMs?: number | undefined;
3679
5775
  } | undefined;
3680
5776
  })[], MessageDecodeError, never>;
3681
- export declare const load: (db: import("../database/drizzle.js").EffectSQLiteDatabase<import("drizzle-orm").EmptyRelations> & {
3682
- $client: import("effect/sql/SqlClient").SqlClient;
3683
- }, sessionID: string & import("effect/Brand").Brand<"SessionID">, boundary: Boundary) => Effect.Effect<SessionMessage.Info[], MessageDecodeError, never>;
3684
- export declare const entriesForRunner: (db: import("../database/drizzle.js").EffectSQLiteDatabase<import("drizzle-orm").EmptyRelations> & {
3685
- $client: import("effect/sql/SqlClient").SqlClient;
3686
- }, sessionID: string & import("effect/Brand").Brand<"SessionID">, instructions: Instructions.List, boundary: Boundary) => Effect.Effect<{
3687
- initial: readonly Instructions.Rendered[];
3688
- entries: readonly {
3689
- readonly seq: number;
3690
- readonly message: SessionMessage.Info;
3691
- }[];
3692
- }, never, never>;
3693
- export declare const preview: (db: import("../database/drizzle.js").EffectSQLiteDatabase<import("drizzle-orm").EmptyRelations> & {
3694
- $client: import("effect/sql/SqlClient").SqlClient;
3695
- }, sessionID: string & import("effect/Brand").Brand<"SessionID">, instructions: Instructions.List, boundary: Boundary) => Effect.Effect<{
3696
- initial: readonly Instructions.Rendered[];
3697
- messages: SessionMessage.Info[];
3698
- instructionUpdate: string;
3699
- }, Instructions.InitializationBlocked, never>;
3700
5777
  /**
3701
- * The synthetic messages `load(db, sessionID, "latest")` would return, read without the rest of the transcript. Under
3702
- * that boundary every row from the latest completed compaction on is kept, and synthetic rows carry no media.
5778
+ * The unfinished assistant messages `load(db, sessionID, "latest")` would return, read without the rest of the
5779
+ * transcript. Only these can hold a tool call that is still streaming or running.
3703
5780
  */
3704
- export declare const synthetics: (db: import("../database/drizzle.js").EffectSQLiteDatabase<import("drizzle-orm").EmptyRelations> & {
5781
+ export declare const incompleteAssistants: (db: import("../database/drizzle.js").EffectSQLiteDatabase<import("drizzle-orm").EmptyRelations> & {
3705
5782
  $client: import("effect/sql/SqlClient").SqlClient;
3706
5783
  }, sessionID: string & import("effect/Brand").Brand<"SessionID">) => Effect.Effect<({
3707
5784
  readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;