@opencode/core 0.0.0-dev-627 → 0.0.0-dev-646

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 (930) hide show
  1. package/dist/account/sql.js +1 -1
  2. package/dist/agent.js +92 -92
  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 +245 -244
  7. package/dist/bus.js +80 -80
  8. package/dist/chunks/{tool-t8nm1vpg.js → rpc-004neqzs.js} +26 -26
  9. package/dist/chunks/{tool-yf2cgb8m.js → rpc-08t0djy6.js} +21 -21
  10. package/dist/chunks/{tool-wdx6g3kg.js → rpc-0cfqkzpv.js} +2 -2
  11. package/dist/chunks/{tool-6yc1yn4a.js → rpc-0g7vc9a7.js} +16 -16
  12. package/dist/chunks/{tool-0ma9gw4f.js → rpc-0ma9gw4f.js} +2 -2
  13. package/dist/chunks/{tool-vcfdc226.js → rpc-0mgprbja.js} +4 -4
  14. package/dist/chunks/{tool-wmndttsw.js → rpc-0mjnmhfm.js} +29 -14
  15. package/dist/chunks/{tool-vy064tmw.js → rpc-15ywqg70.js} +11 -11
  16. package/dist/chunks/{tool-rfrmsrgv.js → rpc-19q5145g.js} +5 -5
  17. package/dist/chunks/{tool-1aqsckx4.js → rpc-1aqsckx4.js} +1 -1
  18. package/dist/chunks/{tool-zhrtystx.js → rpc-1br6214n.js} +38 -38
  19. package/dist/chunks/{tool-j5f9jgzm.js → rpc-1h1rxc0v.js} +9 -9
  20. package/dist/chunks/{tool-4dn934sm.js → rpc-1jmsee8v.js} +18 -18
  21. package/dist/chunks/{tool-5y3wp1ns.js → rpc-1kzmdbp3.js} +33 -33
  22. package/dist/chunks/{tool-9hnph9wg.js → rpc-1mb5br25.js} +27 -27
  23. package/dist/chunks/{tool-84483szx.js → rpc-1qcbwvx4.js} +16 -16
  24. package/dist/chunks/{tool-7f5g0fx5.js → rpc-1vc1qkwa.js} +20 -20
  25. package/dist/chunks/{tool-1x2knyw4.js → rpc-1x2knyw4.js} +1 -1
  26. package/dist/chunks/{tool-qm1pyt2m.js → rpc-205vkxr7.js} +3 -3
  27. package/dist/chunks/{tool-p7vg4ymv.js → rpc-23ssfw3z.js} +8 -8
  28. package/dist/chunks/{tool-8b3vzgkx.js → rpc-25h84942.js} +4 -4
  29. package/dist/chunks/{tool-1ep2p91f.js → rpc-27w5k9zf.js} +2 -2
  30. package/dist/chunks/{tool-sbz71ybr.js → rpc-2cdjxzfg.js} +3 -3
  31. package/dist/chunks/{tool-ppedw7jc.js → rpc-2sv9e3tq.js} +15 -15
  32. package/dist/chunks/{tool-p8t94sdg.js → rpc-2vn974f1.js} +7 -7
  33. package/dist/chunks/{tool-v9zj8gmy.js → rpc-345thhfy.js} +23 -18
  34. package/dist/chunks/{tool-nrp7ym1y.js → rpc-35zs13km.js} +21 -21
  35. package/dist/chunks/{tool-6yebzpzq.js → rpc-389hvvbh.js} +21 -21
  36. package/dist/chunks/{tool-xr7xm7qf.js → rpc-391merv8.js} +28 -28
  37. package/dist/chunks/{tool-04whjz6n.js → rpc-3adw4bt5.js} +9 -9
  38. package/dist/chunks/{tool-ayjs7tqn.js → rpc-3cbjf1nt.js} +2 -2
  39. package/dist/chunks/{tool-tfgq9ps6.js → rpc-3gka3tcj.js} +28 -28
  40. package/dist/chunks/{tool-zn5cq78w.js → rpc-3hawgf56.js} +7 -7
  41. package/dist/chunks/{tool-3hepkmqq.js → rpc-3hepkmqq.js} +1 -1
  42. package/dist/chunks/{tool-1wkggrjf.js → rpc-3k34dyx0.js} +6 -6
  43. package/dist/chunks/{tool-3nnrz6f6.js → rpc-3nnrz6f6.js} +1 -1
  44. package/dist/chunks/{tool-pebg18yw.js → rpc-3q7q45f7.js} +5 -5
  45. package/dist/chunks/{tool-3qevzq3v.js → rpc-3qevzq3v.js} +4 -4
  46. package/dist/chunks/{tool-h6k67dd7.js → rpc-3vdwfq97.js} +20 -20
  47. package/dist/chunks/{tool-0hknrezz.js → rpc-3wn8m4b3.js} +295 -98
  48. package/dist/chunks/{tool-40y6dtc2.js → rpc-40y6dtc2.js} +1 -1
  49. package/dist/chunks/{tool-40za9wsf.js → rpc-40za9wsf.js} +2 -2
  50. package/dist/chunks/{tool-2k9qpqfa.js → rpc-49wfrjfy.js} +29 -29
  51. package/dist/chunks/{tool-qgcn30ny.js → rpc-4awkntzg.js} +5 -5
  52. package/dist/chunks/{tool-pdvy17jd.js → rpc-4cmsdm13.js} +33 -33
  53. package/dist/chunks/{tool-2y0y3f74.js → rpc-4djszhbx.js} +13 -13
  54. package/dist/chunks/{tool-4dx1dgte.js → rpc-4dx1dgte.js} +1 -1
  55. package/dist/chunks/{tool-4f25tdd0.js → rpc-4f25tdd0.js} +1 -1
  56. package/dist/chunks/{tool-8x4h6gj5.js → rpc-4g73aqqa.js} +161 -161
  57. package/dist/chunks/{tool-8vav0wt6.js → rpc-4hex22bp.js} +32 -32
  58. package/dist/chunks/{tool-y67570ve.js → rpc-4kh0f0rp.js} +26 -26
  59. package/dist/chunks/{tool-4pyp9zr9.js → rpc-4pyp9zr9.js} +1 -1
  60. package/dist/chunks/{tool-4v008n1t.js → rpc-4v008n1t.js} +1 -1
  61. package/dist/chunks/{tool-2dq8jpdd.js → rpc-4v1pynm1.js} +9 -9
  62. package/dist/chunks/{tool-mzf8qq5c.js → rpc-4xj4c1yz.js} +9 -9
  63. package/dist/chunks/{tool-55g2q5p5.js → rpc-55g2q5p5.js} +2 -2
  64. package/dist/chunks/{tool-gdqab8my.js → rpc-5ffced9w.js} +5 -5
  65. package/dist/chunks/{tool-4bwthz3m.js → rpc-5m6a7xby.js} +6 -6
  66. package/dist/chunks/{tool-5m9w47nd.js → rpc-5m9w47nd.js} +1 -1
  67. package/dist/chunks/{tool-5whx36p1.js → rpc-5whx36p1.js} +1 -1
  68. package/dist/chunks/{tool-p5shtcs3.js → rpc-60qzvh1w.js} +41 -41
  69. package/dist/chunks/{tool-k75at1a4.js → rpc-6cwsndx3.js} +6 -6
  70. package/dist/chunks/{tool-rp5s57se.js → rpc-6djh8caf.js} +9 -9
  71. package/dist/chunks/{tool-6dqyy18z.js → rpc-6dqyy18z.js} +1 -1
  72. package/dist/chunks/{tool-y094zgrg.js → rpc-6g4dj9bh.js} +19 -19
  73. package/dist/chunks/{tool-kq17g8gv.js → rpc-6t8b10qe.js} +4 -4
  74. package/dist/chunks/{tool-f3h7dwma.js → rpc-6xpjzpy1.js} +1 -1
  75. package/dist/chunks/{tool-v7mersgb.js → rpc-6y3dm1a8.js} +10 -10
  76. package/dist/chunks/{tool-3w3bwa55.js → rpc-6z8ksdmh.js} +14 -14
  77. package/dist/chunks/{tool-775hqbnd.js → rpc-775hqbnd.js} +3 -3
  78. package/dist/chunks/{tool-nh09tcxv.js → rpc-79a8yqrx.js} +11 -11
  79. package/dist/chunks/{tool-9v4dp1sv.js → rpc-79pd0f17.js} +39 -39
  80. package/dist/chunks/{tool-7bmhse3q.js → rpc-7bmhse3q.js} +1 -1
  81. package/dist/chunks/{tool-vkwey47a.js → rpc-7emk30k1.js} +2 -2
  82. package/dist/chunks/{tool-fvypmx9y.js → rpc-7jbjy6ff.js} +17 -17
  83. package/dist/chunks/{tool-g70vkb7s.js → rpc-7jffzeqh.js} +22 -22
  84. package/dist/chunks/{tool-99b14w1w.js → rpc-7s7n8dxk.js} +12 -12
  85. package/dist/chunks/{tool-7w2ypzdf.js → rpc-7w2ypzdf.js} +1 -1
  86. package/dist/chunks/{tool-7weczvnd.js → rpc-7weczvnd.js} +1 -1
  87. package/dist/chunks/{tool-2s7a5cr8.js → rpc-80hgmnp3.js} +62 -48
  88. package/dist/chunks/{tool-8qmf4c22.js → rpc-80xaqkqc.js} +15 -15
  89. package/dist/chunks/{tool-twz8991w.js → rpc-86wfwst0.js} +56 -31
  90. package/dist/chunks/{tool-h00e2jz3.js → rpc-87dpm5qp.js} +12 -12
  91. package/dist/chunks/{tool-89287pr7.js → rpc-89287pr7.js} +1 -1
  92. package/dist/chunks/{tool-mgrbscb1.js → rpc-8a7bakbg.js} +9 -9
  93. package/dist/chunks/{tool-0zrc1hgf.js → rpc-8gx9mvew.js} +33 -33
  94. package/dist/chunks/{tool-34kmj136.js → rpc-8nxj1m7z.js} +15 -15
  95. package/dist/chunks/{tool-y4rkeds0.js → rpc-8p5w1nab.js} +11 -11
  96. package/dist/chunks/{tool-v1t7h3ys.js → rpc-8pq932d2.js} +10 -10
  97. package/dist/chunks/{tool-8t99kr38.js → rpc-8t99kr38.js} +1 -1
  98. package/dist/chunks/{tool-kf978mzt.js → rpc-8vg81nvv.js} +16 -16
  99. package/dist/chunks/{tool-8wtp7s3z.js → rpc-8wtp7s3z.js} +1 -1
  100. package/dist/chunks/{tool-mb7mbhnz.js → rpc-8z6m94af.js} +3 -3
  101. package/dist/chunks/{tool-kh8gdsej.js → rpc-8zv0xmg5.js} +2 -2
  102. package/dist/chunks/{tool-90ct6wq4.js → rpc-90ct6wq4.js} +1 -1
  103. package/dist/chunks/{tool-90zstvax.js → rpc-90zstvax.js} +1 -1
  104. package/dist/chunks/{tool-zh6krqj4.js → rpc-92fkhyx5.js} +7 -7
  105. package/dist/chunks/{tool-68cs06h1.js → rpc-963hk181.js} +5 -5
  106. package/dist/chunks/{tool-szwm4crx.js → rpc-96djdqw5.js} +4 -4
  107. package/dist/chunks/{tool-5eh5vnwa.js → rpc-9bx2q5q2.js} +17 -17
  108. package/dist/chunks/{tool-g4yftf1w.js → rpc-9es52dbn.js} +77 -77
  109. package/dist/chunks/{tool-jj3d0q0a.js → rpc-9sncrprz.js} +11 -11
  110. package/dist/chunks/{tool-db4seax3.js → rpc-9y77hjqc.js} +9 -9
  111. package/dist/chunks/{tool-nzgq6x82.js → rpc-a5tw60yn.js} +4 -4
  112. package/dist/chunks/{tool-mnq1jwzt.js → rpc-a9abzbj8.js} +10 -10
  113. package/dist/chunks/{tool-4z0mnfsb.js → rpc-adjxjdcr.js} +136 -136
  114. package/dist/chunks/{tool-034tev2y.js → rpc-aj7mw0zk.js} +2 -2
  115. package/dist/chunks/{tool-wr3re1en.js → rpc-b6z35kmf.js} +4 -4
  116. package/dist/chunks/{tool-8sxe6kv8.js → rpc-bb3mmwvh.js} +2 -2
  117. package/dist/chunks/{tool-1yq9hg58.js → rpc-bdhd9h6e.js} +5 -5
  118. package/dist/chunks/{tool-z1tj3v26.js → rpc-bemn8wq5.js} +7 -7
  119. package/dist/chunks/{tool-tmsyzkdq.js → rpc-bg7jb7yr.js} +11 -11
  120. package/dist/chunks/{tool-6cqkw5v2.js → rpc-bj78ahtb.js} +5 -5
  121. package/dist/chunks/{tool-2r8wnwkh.js → rpc-bm41btk3.js} +9 -5
  122. package/dist/chunks/{tool-60scttwb.js → rpc-bnx0c7zt.js} +6 -6
  123. package/dist/chunks/{tool-x5vj74a2.js → rpc-bq50kgbn.js} +25 -25
  124. package/dist/chunks/{tool-8ww1xt0h.js → rpc-br2faagw.js} +16 -16
  125. package/dist/chunks/{tool-bstexjd6.js → rpc-bstexjd6.js} +1 -1
  126. package/dist/chunks/{tool-hjnjc3ts.js → rpc-c0tz6aqz.js} +11 -11
  127. package/dist/chunks/{tool-qhgzfx65.js → rpc-c3azk0ck.js} +78 -78
  128. package/dist/chunks/{tool-c5zvymhv.js → rpc-c5zvymhv.js} +1 -1
  129. package/dist/chunks/{tool-b6vsg801.js → rpc-c7cw818c.js} +40 -63
  130. package/dist/chunks/{tool-q2kq49nt.js → rpc-ccmk0qyf.js} +6 -6
  131. package/dist/chunks/{tool-n00hnt5k.js → rpc-cpmtb5yf.js} +9 -9
  132. package/dist/chunks/{tool-0ahs07zn.js → rpc-cpvd08na.js} +4 -4
  133. package/dist/chunks/{tool-bt50pbny.js → rpc-ctw67xcp.js} +14 -14
  134. package/dist/chunks/{tool-zggfewvb.js → rpc-cwfrbrce.js} +19 -19
  135. package/dist/chunks/{tool-cwrgdav8.js → rpc-cwrgdav8.js} +2 -2
  136. package/dist/chunks/{tool-0mv06tb8.js → rpc-cxst5ppf.js} +26 -26
  137. package/dist/chunks/{tool-qv28rmvw.js → rpc-d1vc0v24.js} +9 -9
  138. package/dist/chunks/{tool-d4v9tmah.js → rpc-d4v9tmah.js} +2 -2
  139. package/dist/chunks/{tool-fxgn3893.js → rpc-d58q3k8y.js} +11 -11
  140. package/dist/chunks/{tool-qd895tht.js → rpc-d7prq4ns.js} +22 -22
  141. package/dist/chunks/{tool-faaqe93r.js → rpc-d8h0gbzk.js} +44 -44
  142. package/dist/chunks/{tool-enaqqywp.js → rpc-d8v9ze8s.js} +15 -15
  143. package/dist/chunks/{tool-5jgwgsds.js → rpc-d94pcry3.js} +23 -23
  144. package/dist/chunks/{tool-78j7y49x.js → rpc-dbsreg9c.js} +6 -6
  145. package/dist/chunks/{tool-s818qefp.js → rpc-dbwvxspc.js} +5 -5
  146. package/dist/chunks/{tool-3pkw540f.js → rpc-de3bkzh9.js} +30 -30
  147. package/dist/chunks/{tool-mh6aekfc.js → rpc-dghgsnwg.js} +25 -25
  148. package/dist/chunks/{tool-57a3gt61.js → rpc-dj5xwh24.js} +6 -6
  149. package/dist/chunks/{tool-65zzbc8y.js → rpc-dkpjsqx5.js} +6 -6
  150. package/dist/chunks/{tool-nezv9r4s.js → rpc-dqbm7tyk.js} +86 -86
  151. package/dist/chunks/{tool-6fj7drec.js → rpc-dszvf9fw.js} +9 -9
  152. package/dist/chunks/{tool-dt77769w.js → rpc-dt77769w.js} +1 -1
  153. package/dist/chunks/{tool-47xhmy8n.js → rpc-dxn5atrg.js} +5 -5
  154. package/dist/chunks/{tool-1qtvm13f.js → rpc-dysznzey.js} +26 -26
  155. package/dist/chunks/rpc-e2rg5afv.js +16 -0
  156. package/dist/chunks/{tool-e834z07m.js → rpc-e834z07m.js} +1 -1
  157. package/dist/chunks/{tool-eqkq82nh.js → rpc-ecdekyzm.js} +37 -37
  158. package/dist/chunks/{tool-jswra5yg.js → rpc-ef21bzxj.js} +14 -14
  159. package/dist/chunks/{tool-wbzmgrmw.js → rpc-eghk0yr5.js} +32 -32
  160. package/dist/chunks/{tool-xg73td2j.js → rpc-egr99dza.js} +11 -11
  161. package/dist/chunks/{tool-29vsvq2t.js → rpc-ehj0y74b.js} +2 -2
  162. package/dist/chunks/{tool-3669yegd.js → rpc-epqyc128.js} +28 -28
  163. package/dist/chunks/{tool-qwfph5fh.js → rpc-eqhya4c4.js} +10 -10
  164. package/dist/chunks/{tool-eqw4pqj1.js → rpc-eqw4pqj1.js} +2 -2
  165. package/dist/chunks/{tool-mt3yb1mx.js → rpc-estpkht0.js} +10 -10
  166. package/dist/chunks/{tool-s9m725b8.js → rpc-evg5gsc5.js} +24 -24
  167. package/dist/chunks/{tool-m76bysk3.js → rpc-eyhpm276.js} +11 -11
  168. package/dist/chunks/{tool-zezjv31z.js → rpc-f0bhn954.js} +50 -50
  169. package/dist/chunks/{tool-bm60jz01.js → rpc-f1b763aa.js} +18 -18
  170. package/dist/chunks/{tool-pyc3gczw.js → rpc-f32m8sjz.js} +5 -5
  171. package/dist/chunks/{tool-haj538yg.js → rpc-f89994sv.js} +9 -9
  172. package/dist/chunks/{tool-75c0yt7x.js → rpc-f8gzv9v3.js} +21 -21
  173. package/dist/chunks/{tool-nn6t2hk7.js → rpc-f8tskfee.js} +14 -14
  174. package/dist/chunks/{tool-fffv3p7h.js → rpc-fffv3p7h.js} +1 -1
  175. package/dist/chunks/{tool-1555t097.js → rpc-ffsh7qxh.js} +4 -4
  176. package/dist/chunks/{tool-prq7xxp2.js → rpc-fg9p65nk.js} +6 -6
  177. package/dist/chunks/{tool-6fwyg1ss.js → rpc-g3qqz681.js} +20 -20
  178. package/dist/chunks/{tool-1v2g13eq.js → rpc-g650r2x6.js} +4 -4
  179. package/dist/chunks/{tool-ym84t9db.js → rpc-g8gqp9ty.js} +18 -18
  180. package/dist/chunks/{tool-5r3wrmp5.js → rpc-gbapedmp.js} +4 -4
  181. package/dist/chunks/{tool-gbjdnr5j.js → rpc-gbjdnr5j.js} +2 -2
  182. package/dist/chunks/{tool-wc9tj2ev.js → rpc-gcq5ft6z.js} +21 -21
  183. package/dist/chunks/{tool-7ft1dw8t.js → rpc-gezd8zhf.js} +7 -7
  184. package/dist/chunks/{tool-5vzkvv7b.js → rpc-gg4gmg42.js} +22 -22
  185. package/dist/chunks/{tool-zyjx7tf0.js → rpc-gge16ymh.js} +13 -13
  186. package/dist/chunks/{tool-ghrv1g9c.js → rpc-ghrv1g9c.js} +1 -1
  187. package/dist/chunks/{tool-dqmkpjk4.js → rpc-gm3xd94b.js} +13 -13
  188. package/dist/chunks/{tool-gmemj5zs.js → rpc-gmemj5zs.js} +1 -1
  189. package/dist/chunks/{tool-t2kbrzxc.js → rpc-gndtsf5k.js} +17 -17
  190. package/dist/chunks/{tool-gxs71cxp.js → rpc-gxs71cxp.js} +1 -1
  191. package/dist/chunks/{tool-r96ere88.js → rpc-h3b857xk.js} +4 -4
  192. package/dist/chunks/{tool-19r7p8qd.js → rpc-h4ycvhy0.js} +11 -11
  193. package/dist/chunks/{tool-sgzhenxf.js → rpc-h8d3bnh6.js} +41 -41
  194. package/dist/chunks/{tool-th2rzzzd.js → rpc-h9nfmswk.js} +49 -49
  195. package/dist/chunks/{tool-ptxs8w6f.js → rpc-ha989h0w.js} +23 -23
  196. package/dist/chunks/{tool-aapszx4f.js → rpc-hs26cfg4.js} +4 -4
  197. package/dist/chunks/{tool-1hw98qrx.js → rpc-hxw1x4nh.js} +8 -8
  198. package/dist/chunks/{tool-kmzgegqq.js → rpc-hy8c1z76.js} +8 -8
  199. package/dist/chunks/{tool-rv2ck8m4.js → rpc-hyp7bs5g.js} +14 -14
  200. package/dist/chunks/{tool-tr8x705m.js → rpc-j376ae4e.js} +5 -5
  201. package/dist/chunks/{tool-rqjqz1dx.js → rpc-j37xxr5e.js} +6 -6
  202. package/dist/chunks/{tool-y2wreccq.js → rpc-j3ww5bef.js} +3 -3
  203. package/dist/chunks/{tool-spbh5ss8.js → rpc-j6zxvz6v.js} +6 -6
  204. package/dist/chunks/{tool-j9nxzz3g.js → rpc-j9nxzz3g.js} +3 -3
  205. package/dist/chunks/{tool-8yf6c4ws.js → rpc-jgwpd6tj.js} +5 -5
  206. package/dist/chunks/rpc-jm70asfg.js +21 -0
  207. package/dist/chunks/{tool-wcgjrgaf.js → rpc-jnsm9xjz.js} +48 -48
  208. package/dist/chunks/{tool-44pmzq9c.js → rpc-jxd6f16v.js} +2 -2
  209. package/dist/chunks/{tool-hkajchxt.js → rpc-k4eb1gh1.js} +13 -13
  210. package/dist/chunks/rpc-k62y2wy8.js +18 -0
  211. package/dist/chunks/{tool-2p1fyn1z.js → rpc-kde8dky8.js} +59 -59
  212. package/dist/chunks/{tool-6015y25q.js → rpc-kfhj5nxg.js} +19 -19
  213. package/dist/chunks/{tool-fmjsjtqm.js → rpc-kh0hrg97.js} +4 -4
  214. package/dist/chunks/{tool-qxs6496v.js → rpc-kxryvpqv.js} +34 -35
  215. package/dist/chunks/{tool-kzczzf4v.js → rpc-kzczzf4v.js} +1 -1
  216. package/dist/chunks/{tool-kzdam8c6.js → rpc-kzdam8c6.js} +2 -2
  217. package/dist/chunks/{tool-9xkpsvpb.js → rpc-kzttzyzf.js} +20 -20
  218. package/dist/chunks/{tool-m1714858.js → rpc-m1714858.js} +1 -1
  219. package/dist/chunks/{tool-xa23xek1.js → rpc-m6mmsm2z.js} +8 -8
  220. package/dist/chunks/{tool-zcnch7vt.js → rpc-m6q02gsm.js} +11 -11
  221. package/dist/chunks/{tool-m9w0rfyh.js → rpc-m9w0rfyh.js} +1 -1
  222. package/dist/chunks/{tool-w2jbjawn.js → rpc-man3dt7s.js} +29 -29
  223. package/dist/chunks/{tool-m9f5rdz9.js → rpc-mddkztgb.js} +14 -14
  224. package/dist/chunks/{tool-vv9k68sd.js → rpc-mh4g2a1n.js} +15 -15
  225. package/dist/chunks/{tool-mm06edep.js → rpc-mm06edep.js} +1 -1
  226. package/dist/chunks/{tool-bqa8ney4.js → rpc-mrpnjyvf.js} +8 -8
  227. package/dist/chunks/{tool-kmq4a999.js → rpc-mt5exq5c.js} +7 -7
  228. package/dist/chunks/{tool-w5zs3rpn.js → rpc-mzm881x7.js} +9 -5
  229. package/dist/chunks/{tool-mycg523h.js → rpc-mzyxd1yt.js} +23 -23
  230. package/dist/chunks/{tool-vmjdpmwf.js → rpc-n9892r29.js} +25 -25
  231. package/dist/chunks/{tool-3kc70r3e.js → rpc-nbazyz2k.js} +17 -17
  232. package/dist/chunks/{tool-04r04va6.js → rpc-nc3vzsdk.js} +1 -1
  233. package/dist/chunks/{tool-nwzg2a6d.js → rpc-nma0tn22.js} +3 -3
  234. package/dist/chunks/{tool-35fxc5rr.js → rpc-nmeqmgb7.js} +3 -3
  235. package/dist/chunks/{tool-772thxeb.js → rpc-nswyd8cz.js} +8 -8
  236. package/dist/chunks/{tool-nt907s04.js → rpc-nt907s04.js} +3 -3
  237. package/dist/chunks/{tool-nw5eecxx.js → rpc-nw5eecxx.js} +1 -1
  238. package/dist/chunks/{tool-wegkxhrn.js → rpc-nx4vzyjd.js} +2 -2
  239. package/dist/chunks/{tool-czwy3yzx.js → rpc-nyxvvj5y.js} +7 -7
  240. package/dist/chunks/{tool-fwqqjaak.js → rpc-p2k3qf78.js} +13 -13
  241. package/dist/chunks/{tool-ret0xxsr.js → rpc-p4rq7y29.js} +38 -38
  242. package/dist/chunks/{tool-s0x6kf2p.js → rpc-p53gjtvj.js} +1 -1
  243. package/dist/chunks/{tool-vh5kkfdr.js → rpc-p8cdjwmc.js} +8 -8
  244. package/dist/chunks/{tool-p8pjvayg.js → rpc-p8pjvayg.js} +3 -3
  245. package/dist/chunks/{tool-senv5r2t.js → rpc-pddx3rnb.js} +27 -27
  246. package/dist/chunks/{tool-c5xfa1xp.js → rpc-pjt7rav7.js} +33 -33
  247. package/dist/chunks/{tool-pknna89w.js → rpc-pknna89w.js} +1 -1
  248. package/dist/chunks/{tool-e0d96e0q.js → rpc-pqh28dxt.js} +4 -4
  249. package/dist/chunks/{tool-t04y6rka.js → rpc-prwx221k.js} +30 -30
  250. package/dist/chunks/{tool-9n2jx8hn.js → rpc-pvhkn8ak.js} +38 -38
  251. package/dist/chunks/{tool-j64v0wxx.js → rpc-px5yk7rg.js} +9 -9
  252. package/dist/chunks/{tool-y3bjyseh.js → rpc-py386jfd.js} +14 -14
  253. package/dist/chunks/{tool-s2d4b5x8.js → rpc-q0jg482n.js} +7 -7
  254. package/dist/chunks/{tool-h78x36nt.js → rpc-q9b437eq.js} +13 -13
  255. package/dist/chunks/{tool-1j4h07zs.js → rpc-qaj4wxch.js} +8 -8
  256. package/dist/chunks/{tool-qfz6bxfd.js → rpc-qfz6bxfd.js} +1 -1
  257. package/dist/chunks/{tool-ctmpqb7w.js → rpc-qh5g3qaw.js} +9 -9
  258. package/dist/chunks/{tool-qp7r0hxv.js → rpc-qp7r0hxv.js} +1 -1
  259. package/dist/chunks/{tool-8ggfwbsw.js → rpc-qrt2gedc.js} +10 -10
  260. package/dist/chunks/{tool-77h00f9v.js → rpc-qs8hzakp.js} +26 -26
  261. package/dist/chunks/{tool-qsdghx1p.js → rpc-qsdghx1p.js} +1 -1
  262. package/dist/chunks/{tool-rmv7fhs4.js → rpc-qw2t3dzn.js} +6 -6
  263. package/dist/chunks/{tool-2na6qge8.js → rpc-qw3nfr4t.js} +25 -25
  264. package/dist/chunks/{tool-0b12brbm.js → rpc-qxkxe27f.js} +19 -19
  265. package/dist/chunks/{tool-fretqggx.js → rpc-r5a5ecss.js} +11 -11
  266. package/dist/chunks/{tool-y84y5pby.js → rpc-r8xya4dw.js} +13 -13
  267. package/dist/chunks/{tool-46eaz8xc.js → rpc-rae8p1jx.js} +20 -20
  268. package/dist/chunks/{tool-cc953ej2.js → rpc-rawg69rs.js} +9 -9
  269. package/dist/chunks/{tool-rb9dy4dg.js → rpc-rb9dy4dg.js} +1 -1
  270. package/dist/chunks/{tool-h0rg6s60.js → rpc-rcbjwvze.js} +4 -4
  271. package/dist/chunks/{tool-1brsnn94.js → rpc-rcgmzefb.js} +2 -2
  272. package/dist/chunks/{tool-rgc9cx3e.js → rpc-rgc9cx3e.js} +2 -2
  273. package/dist/chunks/{tool-pa056g0m.js → rpc-rgq3b32k.js} +16 -16
  274. package/dist/chunks/{tool-2qgmh7f2.js → rpc-rjj5aa6d.js} +30 -30
  275. package/dist/chunks/{tool-44fq2p83.js → rpc-rn5sdavf.js} +3 -3
  276. package/dist/chunks/{tool-rt5dr6hb.js → rpc-rt5dr6hb.js} +1 -1
  277. package/dist/chunks/{tool-qs1v69th.js → rpc-ryrybaxr.js} +16 -16
  278. package/dist/chunks/{tool-5kn2gf19.js → rpc-rzsrn50d.js} +2 -2
  279. package/dist/chunks/{tool-2p60zmnr.js → rpc-s1ba0vj0.js} +2 -2
  280. package/dist/chunks/{tool-4kfzmx5g.js → rpc-s8k27n21.js} +2 -2
  281. package/dist/chunks/{tool-1nhv4g69.js → rpc-s9tjx85e.js} +32 -32
  282. package/dist/chunks/{tool-sa3fpqfw.js → rpc-sa3fpqfw.js} +2 -2
  283. package/dist/chunks/{tool-sbya78hr.js → rpc-sbya78hr.js} +1 -1
  284. package/dist/chunks/{tool-a93bg3fh.js → rpc-sc63x3vv.js} +4 -4
  285. package/dist/chunks/{tool-9zwexsxs.js → rpc-scmk72rv.js} +5 -5
  286. package/dist/chunks/{tool-eqrv7k0x.js → rpc-se2efwm1.js} +22 -22
  287. package/dist/chunks/{tool-h1da92q3.js → rpc-sj1ckwst.js} +31 -31
  288. package/dist/chunks/{tool-few90dvn.js → rpc-sjk4zygs.js} +38 -38
  289. package/dist/chunks/{tool-debd8pf3.js → rpc-snfmt8y0.js} +3 -3
  290. package/dist/chunks/{tool-0j7gp832.js → rpc-sqjzf8x2.js} +4 -4
  291. package/dist/chunks/{tool-svcy3p9a.js → rpc-svcy3p9a.js} +1 -1
  292. package/dist/chunks/{tool-sd2het5a.js → rpc-sxa5kwve.js} +8 -8
  293. package/dist/chunks/{tool-q81kq6vk.js → rpc-sxvkt1rn.js} +7 -7
  294. package/dist/chunks/{tool-c7r9599d.js → rpc-t62dywgn.js} +6 -6
  295. package/dist/chunks/{tool-tczq8hjw.js → rpc-tczq8hjw.js} +1 -1
  296. package/dist/chunks/{tool-ew00rcme.js → rpc-tpj3d4qe.js} +35 -35
  297. package/dist/chunks/{tool-28rx08cw.js → rpc-tqvnh5vs.js} +31 -31
  298. package/dist/chunks/{tool-71dvczxp.js → rpc-tsf1jgs8.js} +21 -21
  299. package/dist/chunks/{tool-nhxnj8wq.js → rpc-tvxsch8n.js} +11 -11
  300. package/dist/chunks/{tool-twssxy5n.js → rpc-twssxy5n.js} +2 -2
  301. package/dist/chunks/{tool-c9djvm77.js → rpc-tww2n8q7.js} +22 -22
  302. package/dist/chunks/{tool-vre17ymf.js → rpc-tz8eqr11.js} +9 -9
  303. package/dist/chunks/{tool-2kg89srt.js → rpc-v0t96s7a.js} +4 -4
  304. package/dist/chunks/{tool-v2r1d0zg.js → rpc-v2r1d0zg.js} +1 -1
  305. package/dist/chunks/{tool-snkgcq6v.js → rpc-v4exvb3d.js} +6 -6
  306. package/dist/chunks/{tool-q8yjkgp4.js → rpc-va4swey4.js} +4 -4
  307. package/dist/chunks/{tool-1zc261y1.js → rpc-vb6mr57d.js} +8 -8
  308. package/dist/chunks/{tool-40dmbkek.js → rpc-vcgrbtr4.js} +20 -20
  309. package/dist/chunks/{tool-vjf35v1f.js → rpc-vjf35v1f.js} +1 -1
  310. package/dist/chunks/{tool-jkdcm5hg.js → rpc-vmxsyvj6.js} +4 -4
  311. package/dist/chunks/{tool-hqpnkr71.js → rpc-vsbx4m64.js} +1 -1
  312. package/dist/chunks/{tool-xdgtjw5x.js → rpc-w0eb3tse.js} +16 -16
  313. package/dist/chunks/{tool-w3wsvvr9.js → rpc-w3wsvvr9.js} +1 -1
  314. package/dist/chunks/{tool-he2d4cv0.js → rpc-w6n6rrga.js} +13 -13
  315. package/dist/chunks/{tool-2kkp9s70.js → rpc-w94dswrz.js} +350 -350
  316. package/dist/chunks/{tool-9m4t11kw.js → rpc-w9yzhvjr.js} +12 -12
  317. package/dist/chunks/{tool-wakvkjy4.js → rpc-wakvkjy4.js} +1 -1
  318. package/dist/chunks/{tool-ws4tpv13.js → rpc-wd5jsjr9.js} +3 -3
  319. package/dist/chunks/{tool-wd87259q.js → rpc-wd87259q.js} +1 -1
  320. package/dist/chunks/{tool-2dkpp6r2.js → rpc-wj7zzdkb.js} +5 -5
  321. package/dist/chunks/{tool-dd57nsvn.js → rpc-wn9xj1be.js} +8 -8
  322. package/dist/chunks/{tool-wnhgecwx.js → rpc-wnhgecwx.js} +1 -1
  323. package/dist/chunks/{tool-rgejq9ef.js → rpc-wtxkw3vt.js} +18 -18
  324. package/dist/chunks/{tool-k6r1bs0t.js → rpc-x08mprz8.js} +11 -11
  325. package/dist/chunks/{tool-e53hqhbg.js → rpc-xhd922bx.js} +29 -29
  326. package/dist/chunks/{tool-djadtdmr.js → rpc-xj9efrc3.js} +8 -8
  327. package/dist/chunks/{tool-xjr6c8m4.js → rpc-xjr6c8m4.js} +1 -1
  328. package/dist/chunks/{tool-k3pgnzh0.js → rpc-xk84y422.js} +8 -8
  329. package/dist/chunks/{tool-xksw6ev0.js → rpc-xksw6ev0.js} +1 -1
  330. package/dist/chunks/{tool-sfnc6e8w.js → rpc-xtb2snbe.js} +28 -28
  331. package/dist/chunks/{tool-0bgjjgx2.js → rpc-xwwdpjgj.js} +4 -4
  332. package/dist/chunks/{tool-yzt4cd6e.js → rpc-y8z65g1y.js} +11 -11
  333. package/dist/chunks/{tool-47p5bcf3.js → rpc-y99yq2zk.js} +3 -3
  334. package/dist/chunks/{tool-yb20nhc3.js → rpc-yb20nhc3.js} +1 -1
  335. package/dist/chunks/{tool-ejt8ytt0.js → rpc-ydsg6z44.js} +10 -10
  336. package/dist/chunks/{tool-ssx9tcnt.js → rpc-yezfxbvq.js} +6 -6
  337. package/dist/chunks/{tool-zeby9t0g.js → rpc-yft8zfkr.js} +12 -12
  338. package/dist/chunks/{tool-yr705xyq.js → rpc-yr705xyq.js} +1 -1
  339. package/dist/chunks/{tool-tah62rx7.js → rpc-ysgjvfep.js} +4 -4
  340. package/dist/chunks/{tool-yvtc2x31.js → rpc-yvtc2x31.js} +1 -1
  341. package/dist/chunks/{tool-2y3daeve.js → rpc-zeq8feve.js} +15 -15
  342. package/dist/chunks/{tool-zpdbqgja.js → rpc-zpdbqgja.js} +1 -1
  343. package/dist/chunks/{tool-p4a0yr3q.js → rpc-zskzjvas.js} +10 -10
  344. package/dist/chunks/{tool-rxs3kqv2.js → rpc-ztf2fpvj.js} +6 -6
  345. package/dist/chunks/{tool-5vnxagfg.js → rpc-zvg0e66m.js} +21 -21
  346. package/dist/chunks/{tool-1rapdk7p.js → rpc-zweyw312.js} +32 -32
  347. package/dist/codemode/catalog.js +1 -1
  348. package/dist/codemode/execution.js +5 -5
  349. package/dist/codemode/fetch.js +146 -145
  350. package/dist/codemode/instructions.js +9 -9
  351. package/dist/codemode/tool.js +152 -151
  352. package/dist/command.js +94 -94
  353. package/dist/config/discovery.js +95 -95
  354. package/dist/config/integration.js +1 -1
  355. package/dist/config/managed.js +1 -1
  356. package/dist/config/markdown.js +1 -1
  357. package/dist/config/normalize.js +112 -112
  358. package/dist/config/plugin/agent.js +131 -131
  359. package/dist/config/plugin/command.js +235 -234
  360. package/dist/config/plugin/compaction.js +172 -171
  361. package/dist/config/plugin/compatibility.js +151 -150
  362. package/dist/config/plugin/entry-observer.js +1 -1
  363. package/dist/config/plugin/formatter.js +131 -131
  364. package/dist/config/plugin/image.js +130 -130
  365. package/dist/config/plugin/instruction.js +130 -130
  366. package/dist/config/plugin/location-watcher.js +130 -130
  367. package/dist/config/plugin/mcp.js +139 -139
  368. package/dist/config/plugin/policy.js +128 -128
  369. package/dist/config/plugin/provider.js +130 -130
  370. package/dist/config/plugin/reference.js +132 -132
  371. package/dist/config/plugin/shell.js +130 -130
  372. package/dist/config/plugin/skill-file.js +147 -146
  373. package/dist/config/plugin/skill-scan.js +1 -1
  374. package/dist/config/plugin/skill.js +152 -151
  375. package/dist/config/plugin/snapshot.js +130 -130
  376. package/dist/config/plugin/source.js +130 -130
  377. package/dist/config/plugin/tool-output.js +131 -131
  378. package/dist/config/plugin/websearch.js +129 -129
  379. package/dist/config/plugin/worktree.js +132 -132
  380. package/dist/config/variable.js +1 -1
  381. package/dist/config/watch.js +1 -1
  382. package/dist/config.js +131 -131
  383. package/dist/console-access.js +7 -7
  384. package/dist/credential/sql.js +2 -2
  385. package/dist/credential.js +96 -96
  386. package/dist/database/batch.js +12 -0
  387. package/dist/database/database.js +77 -77
  388. package/dist/database/drizzle/effect-sqlite/driver.js +12 -12
  389. package/dist/database/drizzle/effect-sqlite/index.js +12 -12
  390. package/dist/database/drizzle/effect-sqlite/session.js +11 -11
  391. package/dist/database/drizzle/index.js +13 -13
  392. package/dist/database/drizzle/internal/drizzle-utils.js +1 -1
  393. package/dist/database/drizzle/sqlite-core/effect/count.js +1 -1
  394. package/dist/database/drizzle/sqlite-core/effect/db.js +9 -9
  395. package/dist/database/drizzle/sqlite-core/effect/delete.js +2 -2
  396. package/dist/database/drizzle/sqlite-core/effect/index.js +10 -10
  397. package/dist/database/drizzle/sqlite-core/effect/insert.js +2 -2
  398. package/dist/database/drizzle/sqlite-core/effect/query.js +1 -1
  399. package/dist/database/drizzle/sqlite-core/effect/raw.js +1 -1
  400. package/dist/database/drizzle/sqlite-core/effect/select.js +2 -2
  401. package/dist/database/drizzle/sqlite-core/effect/session.js +10 -10
  402. package/dist/database/drizzle/sqlite-core/effect/update.js +2 -2
  403. package/dist/database/drizzle.js +14 -14
  404. package/dist/database/migration/20260127222353_familiar_lady_ursula.js +1 -1
  405. package/dist/database/migration/20260211171708_add_project_commands.js +1 -1
  406. package/dist/database/migration/20260213144116_wakeful_the_professor.js +1 -1
  407. package/dist/database/migration/20260225215848_workspace.js +1 -1
  408. package/dist/database/migration/20260227213759_add_session_workspace_id.js +1 -1
  409. package/dist/database/migration/20260228203230_blue_harpoon.js +1 -1
  410. package/dist/database/migration/20260303231226_add_workspace_fields.js +1 -1
  411. package/dist/database/migration/20260309230000_move_org_to_state.js +1 -1
  412. package/dist/database/migration/20260312043431_session_message_cursor.js +1 -1
  413. package/dist/database/migration/20260323234822_events.js +1 -1
  414. package/dist/database/migration/20260410174513_workspace-name.js +1 -1
  415. package/dist/database/migration/20260413175956_chief_energizer.js +1 -1
  416. package/dist/database/migration/20260423070820_add_icon_url_override.js +1 -1
  417. package/dist/database/migration/20260427172553_slow_nightmare.js +1 -1
  418. package/dist/database/migration/20260428004200_add_session_path.js +1 -1
  419. package/dist/database/migration/20260501142318_next_venus.js +1 -1
  420. package/dist/database/migration/20260504145000_add_sync_owner.js +1 -1
  421. package/dist/database/migration/20260507164347_add_workspace_time.js +1 -1
  422. package/dist/database/migration/20260510033149_session_usage.js +1 -1
  423. package/dist/database/migration/20260511000411_data_migration_state.js +1 -1
  424. package/dist/database/migration/20260511173437_session-metadata.js +1 -1
  425. package/dist/database/migration/20260601010001_normalize_storage_paths.js +1 -1
  426. package/dist/database/migration/20260601202201_amazing_prowler.js +1 -1
  427. package/dist/database/migration/20260602002951_lowly_union_jack.js +1 -1
  428. package/dist/database/migration/20260602182828_add_project_directories.js +1 -1
  429. package/dist/database/migration/20260603001617_session_message_projection_indexes.js +1 -1
  430. package/dist/database/migration/20260603040000_session_message_projection_order.js +1 -1
  431. package/dist/database/migration/20260603141458_session_input_inbox.js +1 -1
  432. package/dist/database/migration/20260603160727_jittery_ezekiel_stane.js +1 -1
  433. package/dist/database/migration/20260604172448_event_sourced_session_input.js +1 -1
  434. package/dist/database/migration/20260605003541_add_session_context_snapshot.js +1 -1
  435. package/dist/database/migration/20260605042240_add_context_epoch_agent.js +1 -1
  436. package/dist/database/migration/20260611035744_credential.js +1 -1
  437. package/dist/database/migration/20260611192811_lush_chimera.js +1 -1
  438. package/dist/database/migration/20260612174303_project_dir_strategy.js +1 -1
  439. package/dist/database/migration/20260622142730_simplify_session_context_epoch.js +1 -1
  440. package/dist/database/migration/20260622170816_reset_v2_session_state.js +1 -1
  441. package/dist/database/migration/20260622202450_simplify_session_input.js +1 -1
  442. package/dist/database/migration/20260804233008_loose_psylocke.js +1 -1
  443. package/dist/database/migration/20260805200742_import_legacy_credentials.js +1 -1
  444. package/dist/database/migration/20260808023530_workspace_domain.js +1 -1
  445. package/dist/database/migration/20260811161259_execution_claim_attempts.js +1 -1
  446. package/dist/database/migration/20260812181746_session_inbox.js +1 -1
  447. package/dist/database/migration/20260812213948_worktree.js +1 -1
  448. package/dist/database/migration/20260819222447_session_viewed_state.js +1 -1
  449. package/dist/database/migration/20260823191254_nullable_workspace_binding.js +1 -1
  450. package/dist/database/migration/20260910120000_clear_v1_session_permission.js +1 -1
  451. package/dist/database/migration/20260923013825_project_time_active.js +1 -1
  452. package/dist/database/migration/20261007190000_azure_cli_external_credential.js +1 -1
  453. package/dist/database/migration/20261010180456_project_time_archived.js +1 -1
  454. package/dist/database/migration/20261024002554_session_allowance.js +1 -1
  455. package/dist/database/migration/20261024175301_drop_session_allowance.js +1 -1
  456. package/dist/database/migration/20261025123711_blob.js +1 -1
  457. package/dist/database/migration/20261025154125_drop_session_pending.js +1 -1
  458. package/dist/database/migration/20261026223005_schedule.js +1 -1
  459. package/dist/database/migration/20261029002625_session_part.js +1 -1
  460. package/dist/database/migration/20261029073502_session_time_busy.js +1 -1
  461. package/dist/database/migration/20261029165540_schedule_checks.js +1 -1
  462. package/dist/database/migration/20261030054400_job.js +1 -1
  463. package/dist/database/migration.gen.js +60 -60
  464. package/dist/database/migration.js +76 -62
  465. package/dist/database/path.js +2 -2
  466. package/dist/database/schema.gen.js +1 -1
  467. package/dist/database/schema.sql.js +1 -1
  468. package/dist/database/v1-migration.bun.js +100 -100
  469. package/dist/database/v1-migration.js +1 -1
  470. package/dist/effect/app-node-builder.js +433 -432
  471. package/dist/effect/app-node-platform.js +2 -2
  472. package/dist/effect/keyed-mutex.js +1 -1
  473. package/dist/effect/websocket-constructor.js +1 -1
  474. package/dist/environment/driver.js +1 -1
  475. package/dist/environment/environment.js +105 -105
  476. package/dist/environment/exec-defaults.js +2 -2
  477. package/dist/environment/files.js +1 -1
  478. package/dist/environment/index.js +108 -108
  479. package/dist/environment/local.js +2 -2
  480. package/dist/environment/memory.js +2 -2
  481. package/dist/environment/unavailable.js +3 -3
  482. package/dist/event/sql.js +1 -1
  483. package/dist/event-logger.js +81 -81
  484. package/dist/file-access.js +158 -157
  485. package/dist/file-mutation.js +108 -108
  486. package/dist/file-retention.js +1 -1
  487. package/dist/file-write.js +162 -161
  488. package/dist/filesystem/fff.bun.js +2 -2
  489. package/dist/filesystem/fff.js +1 -1
  490. package/dist/filesystem/fff.node.js +2 -2
  491. package/dist/filesystem/fff.workerd.js +2 -2
  492. package/dist/filesystem/file-watch.js +84 -84
  493. package/dist/filesystem/location-watcher-policy.js +6 -6
  494. package/dist/filesystem/location-watcher.js +248 -247
  495. package/dist/filesystem/protected.js +1 -1
  496. package/dist/filesystem/search.js +111 -111
  497. package/dist/filesystem/watcher-binding.js +1 -1
  498. package/dist/filesystem/watcher.js +7 -7
  499. package/dist/filesystem.js +118 -118
  500. package/dist/form.js +93 -93
  501. package/dist/formatter/builtins.js +4 -4
  502. package/dist/formatter.js +100 -100
  503. package/dist/generate.js +120 -120
  504. package/dist/git.js +11 -11
  505. package/dist/github-copilot/chat/convert-to-openai-compatible-chat-messages.js +1 -1
  506. package/dist/github-copilot/chat/get-response-metadata.js +1 -1
  507. package/dist/github-copilot/chat/map-openai-compatible-finish-reason.js +1 -1
  508. package/dist/github-copilot/chat/openai-compatible-chat-language-model.js +7 -7
  509. package/dist/github-copilot/chat/openai-compatible-chat-options.js +1 -1
  510. package/dist/github-copilot/chat/openai-compatible-prepare-tools.js +1 -1
  511. package/dist/github-copilot/copilot-provider.js +17 -17
  512. package/dist/github-copilot/models.js +112 -112
  513. package/dist/github-copilot/openai-compatible-error.js +1 -1
  514. package/dist/github-copilot/responses/convert-to-openai-responses-input.js +1 -1
  515. package/dist/github-copilot/responses/map-openai-responses-finish-reason.js +1 -1
  516. package/dist/github-copilot/responses/openai-error.js +1 -1
  517. package/dist/github-copilot/responses/openai-responses-language-model.js +10 -10
  518. package/dist/github-copilot/responses/openai-responses-prepare-tools.js +6 -6
  519. package/dist/github-copilot/responses/tool/code-interpreter.js +1 -1
  520. package/dist/github-copilot/responses/tool/file-search.js +1 -1
  521. package/dist/github-copilot/responses/tool/image-generation.js +1 -1
  522. package/dist/github-copilot/responses/tool/web-search-preview.js +1 -1
  523. package/dist/github-copilot/responses/tool/web-search.js +1 -1
  524. package/dist/image/notice.js +3 -3
  525. package/dist/image/photon-normalize.js +1 -1
  526. package/dist/image/photon-worker.js +1 -1
  527. package/dist/image/photon.js +4 -4
  528. package/dist/image.js +6 -6
  529. package/dist/instance/service.js +5 -5
  530. package/dist/instance.js +429 -428
  531. package/dist/instruction-discovery.js +97 -97
  532. package/dist/instructions/builtins.js +100 -100
  533. package/dist/instructions/index.js +3 -3
  534. package/dist/integration/connection.js +1 -1
  535. package/dist/integration.js +94 -94
  536. package/dist/job/list.js +5 -5
  537. package/dist/job/recovery.js +2 -2
  538. package/dist/job/sql.js +2 -2
  539. package/dist/job.js +90 -90
  540. package/dist/kv/sql.js +2 -2
  541. package/dist/kv.js +84 -84
  542. package/dist/location-activity.js +174 -173
  543. package/dist/location-lifecycle.js +151 -150
  544. package/dist/location-service-map.js +95 -95
  545. package/dist/location-services.js +426 -425
  546. package/dist/location.js +98 -98
  547. package/dist/managed-policy.js +3 -3
  548. package/dist/mcp/client.js +156 -155
  549. package/dist/mcp/connection.js +106 -106
  550. package/dist/mcp/index.js +118 -118
  551. package/dist/mcp/instructions.js +184 -183
  552. package/dist/mcp/oauth.js +89 -89
  553. package/dist/mcp/socket-client.js +1 -1
  554. package/dist/mcp/stdio.js +155 -154
  555. package/dist/mime.js +1 -1
  556. package/dist/modal/models.js +112 -112
  557. package/dist/model-resolver.js +110 -110
  558. package/dist/model-retry.js +1 -1
  559. package/dist/model.js +109 -109
  560. package/dist/models-dev/v1.js +1 -1
  561. package/dist/models-dev.js +119 -119
  562. package/dist/oauth/page.js +1 -1
  563. package/dist/permission/saved.js +89 -89
  564. package/dist/permission/sql.js +5 -5
  565. package/dist/permission.js +150 -149
  566. package/dist/persistent-pty/binary.bun.js +1 -1
  567. package/dist/persistent-pty/daemon.js +1 -1
  568. package/dist/persistent-pty/index.js +91 -91
  569. package/dist/persistent-pty/pty-binding.js +1 -1
  570. package/dist/persistent-pty.js +86 -86
  571. package/dist/plugin/agent.js +85 -85
  572. package/dist/plugin/command.js +115 -115
  573. package/dist/plugin/goal.js +3 -3
  574. package/dist/plugin/hooks.js +5 -5
  575. package/dist/plugin/host.js +241 -240
  576. package/dist/plugin/identity.js +3 -3
  577. package/dist/plugin/instance.js +5 -5
  578. package/dist/plugin/internal.js +405 -404
  579. package/dist/plugin/mcp-codemode-defaults.js +3 -3
  580. package/dist/plugin/models-dev.js +110 -110
  581. package/dist/plugin/module.js +129 -129
  582. package/dist/plugin/optimize.js +4 -4
  583. package/dist/plugin/plan.js +147 -146
  584. package/dist/plugin/promise.js +1 -1
  585. package/dist/plugin/provider/amazon-bedrock.js +106 -106
  586. package/dist/plugin/provider/azure.js +133 -133
  587. package/dist/plugin/provider/cerebras.js +1 -1
  588. package/dist/plugin/provider/chatgpt.js +133 -133
  589. package/dist/plugin/provider/claude-agent/aisdk.js +117 -117
  590. package/dist/plugin/provider/claude-agent/claude/fork.js +2 -2
  591. package/dist/plugin/provider/claude-agent/claude/io.js +4 -4
  592. package/dist/plugin/provider/claude-agent/claude/probe.js +2 -2
  593. package/dist/plugin/provider/claude-agent/claude/query-options.js +4 -4
  594. package/dist/plugin/provider/claude-agent/claude/sdk.js +3 -3
  595. package/dist/plugin/provider/claude-agent/claude/session.js +4 -4
  596. package/dist/plugin/provider/claude-agent/claude/sessions.js +16 -16
  597. package/dist/plugin/provider/claude-agent/claude/status.js +9 -9
  598. package/dist/plugin/provider/claude-agent/index.js +148 -148
  599. package/dist/plugin/provider/claude-agent/instructions.js +112 -112
  600. package/dist/plugin/provider/claude-agent/integration.js +115 -115
  601. package/dist/plugin/provider/claude-agent/language-model/claude-agent-error.js +1 -1
  602. package/dist/plugin/provider/claude-agent/language-model/claude-agent-language-model.js +7 -7
  603. package/dist/plugin/provider/claude-agent/language-model/convert-claude-stream.js +4 -4
  604. package/dist/plugin/provider/claude-agent/language-model/convert-to-claude-message.js +1 -1
  605. package/dist/plugin/provider/claude-agent/language-model/request-kind.js +1 -1
  606. package/dist/plugin/provider/claude-agent/language-model/system-prompt.js +1 -1
  607. package/dist/plugin/provider/claude-agent/language-model/usage.js +1 -1
  608. package/dist/plugin/provider/claude-agent/provider.js +108 -108
  609. package/dist/plugin/provider/claude-agent/session.js +112 -112
  610. package/dist/plugin/provider/claude-agent/sync/catch-up.js +3 -3
  611. package/dist/plugin/provider/claude-agent/sync/checkpoints.js +2 -2
  612. package/dist/plugin/provider/claude-agent/sync/decide.js +2 -2
  613. package/dist/plugin/provider/claude-agent/sync/fingerprint.js +1 -1
  614. package/dist/plugin/provider/claude-agent/sync/record.js +1 -1
  615. package/dist/plugin/provider/claude-agent/tools/hooks.js +3 -3
  616. package/dist/plugin/provider/claude-agent/tools/names.js +1 -1
  617. package/dist/plugin/provider/claude-agent/tools/pending.js +1 -1
  618. package/dist/plugin/provider/claude-agent/tools/result.js +3 -3
  619. package/dist/plugin/provider/claude-agent/tools/server.js +2 -2
  620. package/dist/plugin/provider/cloudflare-ai-gateway.js +130 -130
  621. package/dist/plugin/provider/cloudflare-workers-ai.js +130 -130
  622. package/dist/plugin/provider/configured.js +126 -126
  623. package/dist/plugin/provider/credential-settings.js +88 -88
  624. package/dist/plugin/provider/databricks.js +1 -1
  625. package/dist/plugin/provider/digitalocean.js +109 -109
  626. package/dist/plugin/provider/dynamic.js +2 -2
  627. package/dist/plugin/provider/github-copilot.js +111 -111
  628. package/dist/plugin/provider/gitlab.js +109 -109
  629. package/dist/plugin/provider/google-vertex.js +127 -127
  630. package/dist/plugin/provider/kilo.js +1 -1
  631. package/dist/plugin/provider/llmgateway.js +89 -89
  632. package/dist/plugin/provider/lmstudio.js +138 -138
  633. package/dist/plugin/provider/local.js +137 -137
  634. package/dist/plugin/provider/modal.js +108 -108
  635. package/dist/plugin/provider/neon.js +1 -1
  636. package/dist/plugin/provider/nvidia.js +1 -1
  637. package/dist/plugin/provider/ollama.js +140 -140
  638. package/dist/plugin/provider/openai-context-caps.js +106 -106
  639. package/dist/plugin/provider/openai.js +135 -135
  640. package/dist/plugin/provider/opencode.js +158 -157
  641. package/dist/plugin/provider/openrouter.js +104 -104
  642. package/dist/plugin/provider/poe.js +90 -90
  643. package/dist/plugin/provider/prompt-cache-key.js +1 -1
  644. package/dist/plugin/provider/refresh.js +87 -87
  645. package/dist/plugin/provider/sap-ai-core.js +104 -104
  646. package/dist/plugin/provider/sdk-factory.js +1 -1
  647. package/dist/plugin/provider/snowflake-cortex.js +131 -131
  648. package/dist/plugin/provider/vllm.js +138 -138
  649. package/dist/plugin/provider/xai.js +104 -104
  650. package/dist/plugin/provider/zenmux.js +1 -1
  651. package/dist/plugin/provider.js +236 -235
  652. package/dist/plugin/sdk.js +89 -89
  653. package/dist/plugin/service.js +3 -3
  654. package/dist/plugin/skill.js +148 -147
  655. package/dist/plugin/source-directory.js +1 -1
  656. package/dist/plugin/supervisor.js +413 -412
  657. package/dist/plugin/tool-input-repair.js +4 -4
  658. package/dist/plugin/update.js +6 -6
  659. package/dist/plugin/vcs/git.js +99 -99
  660. package/dist/plugin/vcs/hg.js +99 -99
  661. package/dist/plugin/verbosity.js +106 -106
  662. package/dist/plugin/warming.js +130 -130
  663. package/dist/plugin/websearch/exa.js +8 -8
  664. package/dist/plugin/websearch/firecrawl.js +7 -7
  665. package/dist/plugin/websearch/index.js +10 -10
  666. package/dist/plugin/websearch/mcp.js +2 -2
  667. package/dist/plugin/websearch/parallel.js +9 -9
  668. package/dist/plugin/websearch/provider.js +1 -1
  669. package/dist/plugin/websearch/tavily.js +5 -5
  670. package/dist/plugin/websearch/tinyfish.js +7 -7
  671. package/dist/plugin.js +246 -245
  672. package/dist/project/icon.js +5 -5
  673. package/dist/project/schema.js +4 -4
  674. package/dist/project/sql.js +4 -4
  675. package/dist/project.js +97 -97
  676. package/dist/provider.js +108 -108
  677. package/dist/pty/protocol.js +1 -1
  678. package/dist/pty/ticket.js +1 -1
  679. package/dist/pty.js +109 -109
  680. package/dist/reference/instructions.js +101 -101
  681. package/dist/reference.js +103 -103
  682. package/dist/repository-cache.js +93 -93
  683. package/dist/repository.js +1 -1
  684. package/dist/ripgrep/binary.js +2 -2
  685. package/dist/ripgrep.js +109 -109
  686. package/dist/rpc.js +99 -99
  687. package/dist/schedule/check.js +246 -245
  688. package/dist/schedule/sql.js +6 -6
  689. package/dist/schedule.js +260 -259
  690. package/dist/schema.js +1 -1
  691. package/dist/session/affinity.js +1 -1
  692. package/dist/session/background.js +1 -1
  693. package/dist/session/blob.js +132 -129
  694. package/dist/session/command.js +85 -85
  695. package/dist/session/compaction.js +174 -173
  696. package/dist/session/context.js +201 -200
  697. package/dist/session/diff.js +101 -101
  698. package/dist/session/environment.js +5 -5
  699. package/dist/session/error.js +5 -5
  700. package/dist/session/event.js +1 -1
  701. package/dist/session/execution/restart.js +248 -247
  702. package/dist/session/execution.js +168 -167
  703. package/dist/session/generate.js +203 -202
  704. package/dist/session/history.js +143 -136
  705. package/dist/session/inbox.js +148 -147
  706. package/dist/session/info.js +3 -3
  707. package/dist/session/instruction-entry.js +88 -88
  708. package/dist/session/instruction-state.js +8 -8
  709. package/dist/session/instructions.js +142 -141
  710. package/dist/session/message-updater.js +2 -2
  711. package/dist/session/message.js +1 -1
  712. package/dist/session/model-request.js +169 -168
  713. package/dist/session/model-transport.js +9 -9
  714. package/dist/session/move.js +168 -167
  715. package/dist/session/projector.js +144 -143
  716. package/dist/session/prompt.js +149 -148
  717. package/dist/session/recent-text.js +1 -1
  718. package/dist/session/revert.js +140 -139
  719. package/dist/session/run-coordinator.js +1 -1
  720. package/dist/session/runner/index.js +3 -3
  721. package/dist/session/runner/llm.js +253 -252
  722. package/dist/session/runner/max-steps.js +1 -1
  723. package/dist/session/runner/model.js +113 -113
  724. package/dist/session/runner/publish-llm-event.js +150 -149
  725. package/dist/session/runner/retry.js +5 -5
  726. package/dist/session/runner/step.js +164 -163
  727. package/dist/session/runner/to-llm-message.js +138 -137
  728. package/dist/session/schema.js +1 -1
  729. package/dist/session/session.js +183 -182
  730. package/dist/session/shell.js +145 -145
  731. package/dist/session/skill.js +148 -147
  732. package/dist/session/sql.js +5 -5
  733. package/dist/session/stats.js +90 -90
  734. package/dist/session/store.js +143 -142
  735. package/dist/session/stored.js +4 -4
  736. package/dist/session/subagent-completion.js +3 -3
  737. package/dist/session/subagent-job.js +234 -233
  738. package/dist/session/system-prompt.js +5 -5
  739. package/dist/session/title.js +205 -204
  740. package/dist/session/to-session-error.js +149 -148
  741. package/dist/session/transfer.js +243 -239
  742. package/dist/session/usage.js +1 -1
  743. package/dist/session.js +234 -233
  744. package/dist/shared-cache.js +5 -5
  745. package/dist/shell/parse.js +6 -6
  746. package/dist/shell/result.js +1 -1
  747. package/dist/shell/scan.js +1 -1
  748. package/dist/shell/select.js +5 -5
  749. package/dist/shell.js +147 -147
  750. package/dist/skill/discovery.js +6 -6
  751. package/dist/skill/instructions.js +152 -151
  752. package/dist/skill.js +157 -156
  753. package/dist/snapshot.js +106 -106
  754. package/dist/state.js +1 -1
  755. package/dist/tool/html-markdown.js +1 -1
  756. package/dist/tool/http-body.js +1 -1
  757. package/dist/tool/mcp.js +181 -180
  758. package/dist/tool/plugin/artifact.js +233 -232
  759. package/dist/tool/plugin/edit.js +168 -167
  760. package/dist/tool/plugin/file-diff.js +1 -1
  761. package/dist/tool/plugin/glob.js +170 -169
  762. package/dist/tool/plugin/grep.js +171 -170
  763. package/dist/tool/plugin/image-generate.js +244 -243
  764. package/dist/tool/plugin/mcp-resource.js +165 -164
  765. package/dist/tool/plugin/opencode.js +164 -163
  766. package/dist/tool/plugin/patch.js +161 -160
  767. package/dist/tool/plugin/question.js +147 -146
  768. package/dist/tool/plugin/read.js +173 -172
  769. package/dist/tool/plugin/schedule.js +252 -251
  770. package/dist/tool/plugin/shell.js +238 -237
  771. package/dist/tool/plugin/skill.js +156 -155
  772. package/dist/tool/plugin/subagent.js +239 -238
  773. package/dist/tool/plugin/todo.js +154 -153
  774. package/dist/tool/plugin/webfetch.js +156 -155
  775. package/dist/tool/plugin/websearch.js +154 -153
  776. package/dist/tool/plugin/write.js +169 -168
  777. package/dist/tool/read-filesystem.js +114 -114
  778. package/dist/tool/runtime.js +1 -1
  779. package/dist/tool/search.js +109 -109
  780. package/dist/tool-output.js +7 -7
  781. package/dist/tool.js +162 -161
  782. package/dist/types/database/batch.d.ts +11 -0
  783. package/dist/types/database/migration.d.ts +5 -2
  784. package/dist/types/session/blob.d.ts +234 -853
  785. package/dist/types/session/history.d.ts +2202 -324
  786. package/dist/types/session/message-updater.d.ts +10 -0
  787. package/dist/usage-limits.js +100 -100
  788. package/dist/util/error-summary.js +1 -1
  789. package/dist/util/git-executable.js +3 -3
  790. package/dist/util/lazy.js +1 -1
  791. package/dist/util/slug.js +1 -1
  792. package/dist/util/token.js +1 -1
  793. package/dist/util/which.js +1 -1
  794. package/dist/util/wildcard.js +1 -1
  795. package/dist/v1/config/agent.js +7 -7
  796. package/dist/v1/config/command.js +3 -3
  797. package/dist/v1/config/mcp.js +4 -4
  798. package/dist/v1/config/migrate.js +105 -105
  799. package/dist/v1/config/permission.js +3 -3
  800. package/dist/v1/config/plugin.js +3 -3
  801. package/dist/v1/config/provider-options.js +1 -1
  802. package/dist/v1/config/provider.js +4 -4
  803. package/dist/variant.js +106 -106
  804. package/dist/vcs/patch.js +1 -1
  805. package/dist/vcs.js +102 -102
  806. package/dist/voice.js +99 -99
  807. package/dist/websearch.js +101 -101
  808. package/dist/wellknown/plugin.js +87 -87
  809. package/dist/wellknown.js +90 -90
  810. package/dist/workspace/driver.js +3 -3
  811. package/dist/workspace/sql.js +1 -1
  812. package/dist/workspace.js +87 -87
  813. package/dist/worktree/directory.js +2 -2
  814. package/dist/worktree/git.js +11 -11
  815. package/dist/worktree/sql.js +5 -5
  816. package/dist/worktree/strategies.js +102 -102
  817. package/dist/worktree.js +109 -109
  818. package/package.json +8 -8
  819. package/dist/chunks/tool-6zjm2phc.js +0 -18
  820. package/dist/chunks/tool-tt9rk80g.js +0 -16
  821. /package/dist/chunks/{tool-0qkdqm5v.js → rpc-0qkdqm5v.js} +0 -0
  822. /package/dist/chunks/{tool-0zkw76rk.js → rpc-0zkw76rk.js} +0 -0
  823. /package/dist/chunks/{tool-108x4f4w.js → rpc-108x4f4w.js} +0 -0
  824. /package/dist/chunks/{tool-17cy0kzp.js → rpc-17cy0kzp.js} +0 -0
  825. /package/dist/chunks/{tool-1cnp2v09.js → rpc-1cnp2v09.js} +0 -0
  826. /package/dist/chunks/{tool-1kah00gy.js → rpc-1kah00gy.js} +0 -0
  827. /package/dist/chunks/{tool-24dcb14g.js → rpc-24dcb14g.js} +0 -0
  828. /package/dist/chunks/{tool-2710q6r3.js → rpc-2710q6r3.js} +0 -0
  829. /package/dist/chunks/{tool-2bv980vf.js → rpc-2bv980vf.js} +0 -0
  830. /package/dist/chunks/{tool-2c3vjs8z.js → rpc-2c3vjs8z.js} +0 -0
  831. /package/dist/chunks/{tool-359p4xyc.js → rpc-359p4xyc.js} +0 -0
  832. /package/dist/chunks/{tool-3af0jn4w.js → rpc-3af0jn4w.js} +0 -0
  833. /package/dist/chunks/{tool-3asan66x.js → rpc-3asan66x.js} +0 -0
  834. /package/dist/chunks/{tool-3v8g72cx.js → rpc-3v8g72cx.js} +0 -0
  835. /package/dist/chunks/{tool-3wcehsnq.js → rpc-3wcehsnq.js} +0 -0
  836. /package/dist/chunks/{tool-43n2bw4t.js → rpc-43n2bw4t.js} +0 -0
  837. /package/dist/chunks/{tool-4knz6hnm.js → rpc-4knz6hnm.js} +0 -0
  838. /package/dist/chunks/{tool-4qk9sjk2.js → rpc-4qk9sjk2.js} +0 -0
  839. /package/dist/chunks/{tool-4y7fprxs.js → rpc-4y7fprxs.js} +0 -0
  840. /package/dist/chunks/{tool-53557ph1.js → rpc-53557ph1.js} +0 -0
  841. /package/dist/chunks/{tool-550bvhaj.js → rpc-550bvhaj.js} +0 -0
  842. /package/dist/chunks/{tool-5w3e23ze.js → rpc-5w3e23ze.js} +0 -0
  843. /package/dist/chunks/{tool-6agm2x70.js → rpc-6agm2x70.js} +0 -0
  844. /package/dist/chunks/{tool-6prwharc.js → rpc-6prwharc.js} +0 -0
  845. /package/dist/chunks/{tool-6q2bdcd1.js → rpc-6q2bdcd1.js} +0 -0
  846. /package/dist/chunks/{tool-7akdwqpd.js → rpc-7akdwqpd.js} +0 -0
  847. /package/dist/chunks/{tool-7m9af43g.js → rpc-7m9af43g.js} +0 -0
  848. /package/dist/chunks/{tool-822emrt2.js → rpc-822emrt2.js} +0 -0
  849. /package/dist/chunks/{tool-84wd9syh.js → rpc-84wd9syh.js} +0 -0
  850. /package/dist/chunks/{tool-88xbtdfr.js → rpc-88xbtdfr.js} +0 -0
  851. /package/dist/chunks/{tool-8n3pysct.js → rpc-8n3pysct.js} +0 -0
  852. /package/dist/chunks/{tool-8wj87zfr.js → rpc-8wj87zfr.js} +0 -0
  853. /package/dist/chunks/{tool-9a4afbnw.js → rpc-9a4afbnw.js} +0 -0
  854. /package/dist/chunks/{tool-9rqn6x4v.js → rpc-9rqn6x4v.js} +0 -0
  855. /package/dist/chunks/{tool-a6k6eb26.js → rpc-a6k6eb26.js} +0 -0
  856. /package/dist/chunks/{tool-af5trqkr.js → rpc-af5trqkr.js} +0 -0
  857. /package/dist/chunks/{tool-afrmfg78.js → rpc-afrmfg78.js} +0 -0
  858. /package/dist/chunks/{tool-aqzs7mqg.js → rpc-aqzs7mqg.js} +0 -0
  859. /package/dist/chunks/{tool-atq7p7m5.js → rpc-atq7p7m5.js} +0 -0
  860. /package/dist/chunks/{tool-beh6qq61.js → rpc-beh6qq61.js} +0 -0
  861. /package/dist/chunks/{tool-bhmrqjy3.js → rpc-bhmrqjy3.js} +0 -0
  862. /package/dist/chunks/{tool-bkyjaxrp.js → rpc-bkyjaxrp.js} +0 -0
  863. /package/dist/chunks/{tool-bmr6ed5q.js → rpc-bmr6ed5q.js} +0 -0
  864. /package/dist/chunks/{tool-cf4snx6d.js → rpc-cf4snx6d.js} +0 -0
  865. /package/dist/chunks/{tool-cqv5kn06.js → rpc-cqv5kn06.js} +0 -0
  866. /package/dist/chunks/{tool-cvy3z8tj.js → rpc-cvy3z8tj.js} +0 -0
  867. /package/dist/chunks/{tool-d9fn303g.js → rpc-d9fn303g.js} +0 -0
  868. /package/dist/chunks/{tool-d9jj8t3e.js → rpc-d9jj8t3e.js} +0 -0
  869. /package/dist/chunks/{tool-dap0rakb.js → rpc-dap0rakb.js} +0 -0
  870. /package/dist/chunks/{tool-df08tz66.js → rpc-df08tz66.js} +0 -0
  871. /package/dist/chunks/{tool-dy18nga0.js → rpc-dy18nga0.js} +0 -0
  872. /package/dist/chunks/{tool-e5kj55wp.js → rpc-e5kj55wp.js} +0 -0
  873. /package/dist/chunks/{tool-ean2d8b5.js → rpc-ean2d8b5.js} +0 -0
  874. /package/dist/chunks/{tool-ec1grn59.js → rpc-ec1grn59.js} +0 -0
  875. /package/dist/chunks/{tool-emrn6kk6.js → rpc-emrn6kk6.js} +0 -0
  876. /package/dist/chunks/{tool-f0mxakyp.js → rpc-f0mxakyp.js} +0 -0
  877. /package/dist/chunks/{tool-f6n9ztr4.js → rpc-f6n9ztr4.js} +0 -0
  878. /package/dist/chunks/{tool-faypxj3z.js → rpc-faypxj3z.js} +0 -0
  879. /package/dist/chunks/{tool-fd410y7t.js → rpc-fd410y7t.js} +0 -0
  880. /package/dist/chunks/{tool-fkpq3x5p.js → rpc-fkpq3x5p.js} +0 -0
  881. /package/dist/chunks/{tool-g4wezp1m.js → rpc-g4wezp1m.js} +0 -0
  882. /package/dist/chunks/{tool-g86h250q.js → rpc-g86h250q.js} +0 -0
  883. /package/dist/chunks/{tool-gebd4c9n.js → rpc-gebd4c9n.js} +0 -0
  884. /package/dist/chunks/{tool-gftt206x.js → rpc-gftt206x.js} +0 -0
  885. /package/dist/chunks/{tool-hcxmzztb.js → rpc-hcxmzztb.js} +0 -0
  886. /package/dist/chunks/{tool-hk9envan.js → rpc-hk9envan.js} +0 -0
  887. /package/dist/chunks/{tool-j2ntwpah.js → rpc-j2ntwpah.js} +0 -0
  888. /package/dist/chunks/{tool-j5zkgpj8.js → rpc-j5zkgpj8.js} +0 -0
  889. /package/dist/chunks/{tool-jjkms2e6.js → rpc-jjkms2e6.js} +0 -0
  890. /package/dist/chunks/{tool-jr7sbwjy.js → rpc-jr7sbwjy.js} +0 -0
  891. /package/dist/chunks/{tool-jwfs4k6c.js → rpc-jwfs4k6c.js} +0 -0
  892. /package/dist/chunks/{tool-jwr30sdr.js → rpc-jwr30sdr.js} +0 -0
  893. /package/dist/chunks/{tool-jzg6c2d5.js → rpc-jzg6c2d5.js} +0 -0
  894. /package/dist/chunks/{tool-m18g726c.js → rpc-m18g726c.js} +0 -0
  895. /package/dist/chunks/{tool-mp448xyj.js → rpc-mp448xyj.js} +0 -0
  896. /package/dist/chunks/{tool-msx8hqn2.js → rpc-msx8hqn2.js} +0 -0
  897. /package/dist/chunks/{tool-n05xt0ee.js → rpc-n05xt0ee.js} +0 -0
  898. /package/dist/chunks/{tool-n3j8tn72.js → rpc-n3j8tn72.js} +0 -0
  899. /package/dist/chunks/{tool-nh4v3znn.js → rpc-nh4v3znn.js} +0 -0
  900. /package/dist/chunks/{tool-njntx4h6.js → rpc-njntx4h6.js} +0 -0
  901. /package/dist/chunks/{tool-p71gwv9c.js → rpc-p71gwv9c.js} +0 -0
  902. /package/dist/chunks/{tool-q3sfg36h.js → rpc-q3sfg36h.js} +0 -0
  903. /package/dist/chunks/{tool-q74kybfr.js → rpc-q74kybfr.js} +0 -0
  904. /package/dist/chunks/{tool-qaymkmh1.js → rpc-qaymkmh1.js} +0 -0
  905. /package/dist/chunks/{tool-qb87gjwd.js → rpc-qb87gjwd.js} +0 -0
  906. /package/dist/chunks/{tool-qfa1cgps.js → rpc-qfa1cgps.js} +0 -0
  907. /package/dist/chunks/{tool-qg3g05ea.js → rpc-qg3g05ea.js} +0 -0
  908. /package/dist/chunks/{tool-qrg20bc0.js → rpc-qrg20bc0.js} +0 -0
  909. /package/dist/chunks/{tool-rcb2kzg1.js → rpc-rcb2kzg1.js} +0 -0
  910. /package/dist/chunks/{tool-sdp7kfr6.js → rpc-sdp7kfr6.js} +0 -0
  911. /package/dist/chunks/{tool-ssg3fenm.js → rpc-ssg3fenm.js} +0 -0
  912. /package/dist/chunks/{tool-syrav9an.js → rpc-syrav9an.js} +0 -0
  913. /package/dist/chunks/{tool-t03h4f5z.js → rpc-t03h4f5z.js} +0 -0
  914. /package/dist/chunks/{tool-ty7weeps.js → rpc-ty7weeps.js} +0 -0
  915. /package/dist/chunks/{tool-ve7vex1e.js → rpc-ve7vex1e.js} +0 -0
  916. /package/dist/chunks/{tool-vtarvj67.js → rpc-vtarvj67.js} +0 -0
  917. /package/dist/chunks/{tool-w803qqfp.js → rpc-w803qqfp.js} +0 -0
  918. /package/dist/chunks/{tool-wc3fc9cn.js → rpc-wc3fc9cn.js} +0 -0
  919. /package/dist/chunks/{tool-weqc7sb9.js → rpc-weqc7sb9.js} +0 -0
  920. /package/dist/chunks/{tool-wer8tq1h.js → rpc-wer8tq1h.js} +0 -0
  921. /package/dist/chunks/{tool-wtztk69x.js → rpc-wtztk69x.js} +0 -0
  922. /package/dist/chunks/{tool-x0ckcb58.js → rpc-x0ckcb58.js} +0 -0
  923. /package/dist/chunks/{tool-x61499pn.js → rpc-x61499pn.js} +0 -0
  924. /package/dist/chunks/{tool-y44na4kk.js → rpc-y44na4kk.js} +0 -0
  925. /package/dist/chunks/{tool-y8f7s663.js → rpc-y8f7s663.js} +0 -0
  926. /package/dist/chunks/{tool-ygaqb7jw.js → rpc-ygaqb7jw.js} +0 -0
  927. /package/dist/chunks/{tool-z0h12gs8.js → rpc-z0h12gs8.js} +0 -0
  928. /package/dist/chunks/{tool-z5v4ffb3.js → rpc-z5v4ffb3.js} +0 -0
  929. /package/dist/chunks/{tool-z9919s4g.js → rpc-z9919s4g.js} +0 -0
  930. /package/dist/chunks/{tool-zxpyjp51.js → rpc-zxpyjp51.js} +0 -0
@@ -4,7 +4,208 @@ import type { Model } from "@opencode/schema/model";
4
4
  import { MessageDecodeError } from "./error.js";
5
5
  import { SessionMessage } from "./message.js";
6
6
  import { Instructions } from "../instructions/index.js";
7
- import { SessionMessageTable } from "./sql.js";
7
+ import { SessionMessageTable, SessionPartTable } from "./sql.js";
8
+ export declare const encodePart: (input: {
9
+ readonly type: "tool";
10
+ readonly id: string;
11
+ readonly name: string;
12
+ readonly executed?: boolean | undefined;
13
+ readonly native?: {
14
+ readonly [x: string]: unknown;
15
+ } | undefined;
16
+ readonly state: {
17
+ readonly status: "streaming";
18
+ readonly input: string;
19
+ } | {
20
+ readonly status: "running";
21
+ readonly input: {
22
+ readonly [x: string]: unknown;
23
+ };
24
+ readonly metadata: {
25
+ readonly [x: string]: Schema.Json;
26
+ };
27
+ } | {
28
+ readonly status: "completed";
29
+ readonly input: {
30
+ readonly [x: string]: unknown;
31
+ };
32
+ readonly content: readonly [{
33
+ readonly type: "text";
34
+ readonly text: string;
35
+ } | {
36
+ readonly type: "file";
37
+ readonly uri: string;
38
+ readonly mime: string;
39
+ readonly name?: string | undefined;
40
+ }, ...({
41
+ readonly type: "text";
42
+ readonly text: string;
43
+ } | {
44
+ readonly type: "file";
45
+ readonly uri: string;
46
+ readonly mime: string;
47
+ readonly name?: string | undefined;
48
+ })[]];
49
+ readonly metadata?: {
50
+ readonly [x: string]: Schema.Json;
51
+ } | undefined;
52
+ } | {
53
+ readonly status: "error";
54
+ readonly input: {
55
+ readonly [x: string]: unknown;
56
+ };
57
+ readonly error: {
58
+ readonly type: string;
59
+ readonly message: string;
60
+ readonly status?: number | undefined;
61
+ readonly response?: {
62
+ readonly body: string;
63
+ } | undefined;
64
+ readonly retryAfterMs?: number | undefined;
65
+ };
66
+ readonly content?: readonly [{
67
+ readonly type: "text";
68
+ readonly text: string;
69
+ } | {
70
+ readonly type: "file";
71
+ readonly uri: string;
72
+ readonly mime: string;
73
+ readonly name?: string | undefined;
74
+ }, ...({
75
+ readonly type: "text";
76
+ readonly text: string;
77
+ } | {
78
+ readonly type: "file";
79
+ readonly uri: string;
80
+ readonly mime: string;
81
+ readonly name?: string | undefined;
82
+ })[]] | undefined;
83
+ readonly metadata?: {
84
+ readonly [x: string]: Schema.Json;
85
+ } | undefined;
86
+ };
87
+ readonly time: {
88
+ readonly created: import("effect/DateTime").Utc;
89
+ readonly ran?: import("effect/DateTime").Utc | undefined;
90
+ readonly completed?: import("effect/DateTime").Utc | undefined;
91
+ };
92
+ } | {
93
+ readonly type: "text";
94
+ readonly text: string;
95
+ readonly native?: {
96
+ readonly [x: string]: unknown;
97
+ } | undefined;
98
+ } | {
99
+ readonly type: "reasoning";
100
+ readonly text: string;
101
+ readonly native?: {
102
+ readonly [x: string]: unknown;
103
+ } | undefined;
104
+ readonly time?: {
105
+ readonly created: import("effect/DateTime").Utc;
106
+ readonly completed?: import("effect/DateTime").Utc | undefined;
107
+ } | undefined;
108
+ }, options?: import("effect/SchemaAST").ParseOptions) => {
109
+ readonly type: "tool";
110
+ readonly id: string;
111
+ readonly name: string;
112
+ readonly executed?: boolean | undefined;
113
+ readonly native?: {
114
+ readonly [x: string]: unknown;
115
+ } | undefined;
116
+ readonly state: {
117
+ readonly status: "streaming";
118
+ readonly input: string;
119
+ } | {
120
+ readonly status: "running";
121
+ readonly input: {
122
+ readonly [x: string]: unknown;
123
+ };
124
+ readonly metadata: {
125
+ readonly [x: string]: Schema.Json;
126
+ };
127
+ } | {
128
+ readonly status: "completed";
129
+ readonly input: {
130
+ readonly [x: string]: unknown;
131
+ };
132
+ readonly content: readonly [{
133
+ readonly type: "text";
134
+ readonly text: string;
135
+ } | {
136
+ readonly type: "file";
137
+ readonly uri: string;
138
+ readonly mime: string;
139
+ readonly name?: string | undefined;
140
+ }, ...({
141
+ readonly type: "text";
142
+ readonly text: string;
143
+ } | {
144
+ readonly type: "file";
145
+ readonly uri: string;
146
+ readonly mime: string;
147
+ readonly name?: string | undefined;
148
+ })[]];
149
+ readonly metadata?: {
150
+ readonly [x: string]: Schema.Json;
151
+ } | undefined;
152
+ } | {
153
+ readonly status: "error";
154
+ readonly input: {
155
+ readonly [x: string]: unknown;
156
+ };
157
+ readonly error: {
158
+ readonly type: string;
159
+ readonly message: string;
160
+ readonly status?: number | undefined;
161
+ readonly response?: {
162
+ readonly body: string;
163
+ } | undefined;
164
+ readonly retryAfterMs?: number | undefined;
165
+ };
166
+ readonly content?: readonly [{
167
+ readonly type: "text";
168
+ readonly text: string;
169
+ } | {
170
+ readonly type: "file";
171
+ readonly uri: string;
172
+ readonly mime: string;
173
+ readonly name?: string | undefined;
174
+ }, ...({
175
+ readonly type: "text";
176
+ readonly text: string;
177
+ } | {
178
+ readonly type: "file";
179
+ readonly uri: string;
180
+ readonly mime: string;
181
+ readonly name?: string | undefined;
182
+ })[]] | undefined;
183
+ readonly metadata?: {
184
+ readonly [x: string]: Schema.Json;
185
+ } | undefined;
186
+ };
187
+ readonly time: {
188
+ readonly created: number;
189
+ readonly ran?: number | undefined;
190
+ readonly completed?: number | undefined;
191
+ };
192
+ } | {
193
+ readonly type: "text";
194
+ readonly text: string;
195
+ readonly native?: {
196
+ readonly [x: string]: unknown;
197
+ } | undefined;
198
+ } | {
199
+ readonly type: "reasoning";
200
+ readonly text: string;
201
+ readonly native?: {
202
+ readonly [x: string]: unknown;
203
+ } | undefined;
204
+ readonly time?: {
205
+ readonly created: number;
206
+ readonly completed?: number | undefined;
207
+ } | undefined;
208
+ };
8
209
  /**
9
210
  * Which completed compactions bound a history read. Local summaries always do. Native
10
211
  * windows do for model-neutral readers (`latest`), never for the original transcript
@@ -113,7 +314,9 @@ export declare const NativeWindow: Schema.toCodecJson<Schema.$Array<Schema.Union
113
314
  }>>;
114
315
  /**
115
316
  * Puts each assistant row's `session_part` rows into its `data.content`, in ordinal order. Rows without parts keep
116
- * 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.
117
320
  */
118
321
  export declare const withParts: (db: import("../database/drizzle.js").EffectSQLiteDatabase<import("drizzle-orm").EmptyRelations> & {
119
322
  $client: import("effect/sql/SqlClient").SqlClient;
@@ -544,7 +747,7 @@ export declare const withParts: (db: import("../database/drizzle.js").EffectSQLi
544
747
  time_created: number;
545
748
  time_updated: number;
546
749
  type: "agent-switched" | "assistant" | "compaction" | "idle" | "location-switched" | "model-switched" | "shell" | "skill" | "synthetic" | "system" | "user";
547
- }[]) => Effect.Effect<readonly {
750
+ }[]) => Effect.Effect<({
548
751
  data: Omit<{
549
752
  readonly id: string;
550
753
  readonly metadata?: {
@@ -971,102 +1174,1347 @@ export declare const withParts: (db: import("../database/drizzle.js").EffectSQLi
971
1174
  time_created: number;
972
1175
  time_updated: number;
973
1176
  type: "agent-switched" | "assistant" | "compaction" | "idle" | "location-switched" | "model-switched" | "shell" | "skill" | "synthetic" | "system" | "user";
974
- }[], never, never>;
975
- export declare const decodeMessageRowSync: (row: typeof SessionMessageTable.$inferSelect) => {
976
- readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
977
- readonly metadata?: {
978
- readonly [x: string]: unknown;
979
- } | undefined;
980
- readonly time: {
981
- readonly created: import("effect/DateTime").Utc;
982
- };
983
- readonly type: "agent-switched";
984
- readonly agent: string & import("effect/Brand").Brand<"Agent.ID">;
985
- readonly previous?: (string & import("effect/Brand").Brand<"Agent.ID">) | undefined;
986
- } | {
987
- readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
988
- readonly metadata?: {
989
- readonly [x: string]: unknown;
990
- } | undefined;
991
- readonly time: {
992
- readonly created: import("effect/DateTime").Utc;
993
- };
994
- readonly type: "model-switched";
995
- readonly model: {
996
- readonly id: string & import("effect/Brand").Brand<"Model.ID">;
997
- readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
998
- readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
999
- };
1000
- readonly previous?: {
1001
- readonly id: string & import("effect/Brand").Brand<"Model.ID">;
1002
- readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
1003
- readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
1004
- } | undefined;
1005
1177
  } | {
1006
- readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1007
- readonly metadata?: {
1008
- readonly [x: string]: unknown;
1009
- } | undefined;
1010
- readonly time: {
1011
- readonly created: import("effect/DateTime").Utc;
1012
- };
1013
- readonly type: "location-switched";
1014
- readonly location: {
1015
- readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
1016
- readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
1017
- };
1018
- readonly projectID?: (string & import("effect/Brand").Brand<"Project.ID">) | undefined;
1019
- readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
1020
- readonly previous?: {
1021
- readonly location: {
1022
- readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
1023
- readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
1178
+ data: {
1179
+ metadata?: {
1180
+ readonly [x: string]: unknown;
1181
+ } | undefined;
1182
+ time: {
1183
+ readonly created: number;
1024
1184
  };
1025
- readonly projectID?: (string & import("effect/Brand").Brand<"Project.ID">) | undefined;
1026
- readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
1027
- } | undefined;
1028
- } | {
1029
- readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1030
- readonly metadata?: {
1031
- readonly [x: string]: unknown;
1032
- } | undefined;
1033
- readonly time: {
1034
- readonly created: import("effect/DateTime").Utc;
1035
- };
1036
- readonly text: string;
1037
- readonly files?: readonly {
1038
- readonly data: string;
1039
- readonly mime: string;
1040
- readonly source: {
1041
- readonly type: "inline";
1042
- } | {
1043
- readonly type: "uri";
1044
- readonly uri: string;
1185
+ agent: string;
1186
+ previous?: string | undefined;
1187
+ content: any[];
1188
+ } | {
1189
+ metadata?: {
1190
+ readonly [x: string]: unknown;
1191
+ } | undefined;
1192
+ time: {
1193
+ readonly created: number;
1045
1194
  };
1046
- readonly name?: string | undefined;
1047
- readonly description?: string | undefined;
1048
- readonly mention?: {
1049
- readonly start: number;
1050
- readonly end: number;
1051
- readonly text: string;
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;
1052
1204
  } | undefined;
1053
- }[] | undefined;
1054
- readonly agents?: readonly {
1055
- readonly name: string;
1056
- readonly mention?: {
1057
- readonly start: number;
1058
- readonly end: number;
1059
- readonly text: string;
1205
+ content: any[];
1206
+ } | {
1207
+ metadata?: {
1208
+ readonly [x: string]: unknown;
1060
1209
  } | undefined;
1061
- }[] | undefined;
1062
- readonly skills?: readonly {
1063
- readonly id: string & import("effect/Brand").Brand<"Skill.ID">;
1064
- readonly name: string & import("effect/Brand").Brand<"Skill.Name">;
1065
- readonly text?: string | undefined;
1066
- readonly mention?: {
1067
- readonly start: number;
1068
- readonly end: number;
1069
- readonly text: string;
1210
+ time: {
1211
+ readonly created: number;
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[];
1228
+ } | {
1229
+ metadata?: {
1230
+ readonly [x: string]: unknown;
1231
+ } | undefined;
1232
+ time: {
1233
+ readonly created: number;
1234
+ };
1235
+ text: string;
1236
+ description?: string | undefined;
1237
+ content: any[];
1238
+ } | {
1239
+ metadata?: {
1240
+ readonly [x: string]: unknown;
1241
+ } | undefined;
1242
+ time: {
1243
+ readonly created: number;
1244
+ };
1245
+ text: string;
1246
+ description?: string | undefined;
1247
+ content: any[];
1248
+ } | {
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?: {
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;
1276
+ };
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?: {
1309
+ readonly type: string;
1310
+ readonly message: string;
1311
+ readonly status?: number | undefined;
1312
+ readonly response?: {
1313
+ readonly body: string;
1314
+ } | undefined;
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;
1334
+ };
1335
+ content: any[];
1336
+ } | {
1337
+ metadata?: {
1338
+ readonly [x: string]: unknown;
1339
+ } | 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;
2472
+ };
2473
+ readonly projectID?: (string & import("effect/Brand").Brand<"Project.ID">) | undefined;
2474
+ readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
2475
+ } | undefined;
2476
+ } | {
2477
+ readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2478
+ readonly metadata?: {
2479
+ readonly [x: string]: unknown;
2480
+ } | undefined;
2481
+ readonly time: {
2482
+ readonly created: import("effect/DateTime").Utc;
2483
+ };
2484
+ readonly text: string;
2485
+ readonly files?: readonly {
2486
+ readonly data: string;
2487
+ readonly mime: string;
2488
+ readonly source: {
2489
+ readonly type: "inline";
2490
+ } | {
2491
+ readonly type: "uri";
2492
+ readonly uri: string;
2493
+ };
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;
1070
2518
  } | undefined;
1071
2519
  }[] | undefined;
1072
2520
  readonly type: "user";
@@ -1078,9 +2526,212 @@ export declare const decodeMessageRowSync: (row: typeof SessionMessageTable.$inf
1078
2526
  readonly time: {
1079
2527
  readonly created: import("effect/DateTime").Utc;
1080
2528
  };
1081
- readonly text: string;
1082
- readonly description?: string | undefined;
1083
- readonly type: "synthetic";
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;
2676
+ } | undefined;
2677
+ } | {
2678
+ readonly type: "reasoning";
2679
+ readonly text: string;
2680
+ readonly native?: {
2681
+ readonly [x: string]: unknown;
2682
+ } | undefined;
2683
+ readonly time?: {
2684
+ readonly created: import("effect/DateTime").Utc;
2685
+ readonly completed?: import("effect/DateTime").Utc | undefined;
2686
+ } | undefined;
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?: {
2696
+ readonly [x: string]: unknown;
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;
2730
+ readonly time: {
2731
+ readonly created: import("effect/DateTime").Utc;
2732
+ readonly streamed?: import("effect/DateTime").Utc | undefined;
2733
+ readonly completed?: import("effect/DateTime").Utc | undefined;
2734
+ };
1084
2735
  } | {
1085
2736
  readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1086
2737
  readonly metadata?: {
@@ -1089,9 +2740,10 @@ export declare const decodeMessageRowSync: (row: typeof SessionMessageTable.$inf
1089
2740
  readonly time: {
1090
2741
  readonly created: import("effect/DateTime").Utc;
1091
2742
  };
1092
- readonly type: "system";
1093
- readonly text: string;
1094
- readonly description?: string | undefined;
2743
+ readonly type: "compaction";
2744
+ readonly status: "running";
2745
+ readonly reason: "auto" | "manual";
2746
+ readonly summary: string;
1095
2747
  } | {
1096
2748
  readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1097
2749
  readonly metadata?: {
@@ -1100,91 +2752,334 @@ export declare const decodeMessageRowSync: (row: typeof SessionMessageTable.$inf
1100
2752
  readonly time: {
1101
2753
  readonly created: import("effect/DateTime").Utc;
1102
2754
  };
1103
- readonly type: "skill";
1104
- readonly skill: string & import("effect/Brand").Brand<"Skill.ID">;
1105
- readonly name: string & import("effect/Brand").Brand<"Skill.Name">;
1106
- 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;
1107
2777
  } | {
1108
2778
  readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1109
2779
  readonly metadata?: {
1110
2780
  readonly [x: string]: unknown;
1111
2781
  } | undefined;
1112
- readonly type: "shell";
1113
- readonly shellID: string & import("effect/Brand").Brand<"Shell.ID">;
1114
- readonly command: string;
1115
- readonly status: "exited" | "killed" | "running" | "timeout";
1116
- readonly exit?: number | undefined;
1117
- readonly output?: {
1118
- readonly output: string;
1119
- readonly cursor: number;
1120
- readonly size: number;
1121
- readonly truncated: boolean;
1122
- } | undefined;
1123
2782
  readonly time: {
1124
2783
  readonly created: import("effect/DateTime").Utc;
1125
- 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;
1126
2806
  };
1127
2807
  } | {
1128
2808
  readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1129
2809
  readonly metadata?: {
1130
2810
  readonly [x: string]: unknown;
1131
2811
  } | undefined;
1132
- readonly type: "assistant";
1133
- readonly agent: string & import("effect/Brand").Brand<"Agent.ID">;
1134
- readonly model: {
1135
- readonly id: string & import("effect/Brand").Brand<"Model.ID">;
1136
- readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
1137
- readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2812
+ readonly time: {
2813
+ readonly created: import("effect/DateTime").Utc;
1138
2814
  };
1139
- readonly content: readonly ({
1140
- 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<{
1141
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;
1142
2916
  readonly name: string;
1143
- readonly executed?: boolean | undefined;
1144
- readonly native?: {
2917
+ readonly text: string;
2918
+ }, "id" | "type"> | Omit<{
2919
+ readonly id: string;
2920
+ readonly metadata?: {
1145
2921
  readonly [x: string]: unknown;
1146
2922
  } | undefined;
1147
- readonly state: {
1148
- readonly status: "streaming";
1149
- readonly input: string;
1150
- } | {
1151
- readonly status: "running";
1152
- 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?: {
1153
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;
1154
3028
  };
1155
- readonly metadata: {
1156
- readonly [x: string]: Schema.Json;
3029
+ readonly time: {
3030
+ readonly created: number;
3031
+ readonly ran?: number | undefined;
3032
+ readonly completed?: number | undefined;
1157
3033
  };
1158
3034
  } | {
1159
- readonly status: "completed";
1160
- readonly input: {
3035
+ readonly type: "text";
3036
+ readonly text: string;
3037
+ readonly native?: {
1161
3038
  readonly [x: string]: unknown;
1162
- };
1163
- readonly content: readonly [{
1164
- readonly type: "text";
1165
- readonly text: string;
1166
- } | {
1167
- readonly type: "file";
1168
- readonly uri: string;
1169
- readonly mime: string;
1170
- readonly name?: string | undefined;
1171
- }, ...({
1172
- readonly type: "text";
1173
- readonly text: string;
1174
- } | {
1175
- readonly type: "file";
1176
- readonly uri: string;
1177
- readonly mime: string;
1178
- readonly name?: string | undefined;
1179
- })[]];
1180
- readonly metadata?: {
1181
- readonly [x: string]: Schema.Json;
1182
3039
  } | undefined;
1183
3040
  } | {
1184
- readonly status: "error";
1185
- readonly input: {
3041
+ readonly type: "reasoning";
3042
+ readonly text: string;
3043
+ readonly native?: {
1186
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;
1187
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;
1188
3083
  readonly error: {
1189
3084
  readonly type: string;
1190
3085
  readonly message: string;
@@ -1194,81 +3089,75 @@ export declare const decodeMessageRowSync: (row: typeof SessionMessageTable.$inf
1194
3089
  } | undefined;
1195
3090
  readonly retryAfterMs?: number | undefined;
1196
3091
  };
1197
- readonly content?: readonly [{
1198
- readonly type: "text";
1199
- readonly text: string;
1200
- } | {
1201
- readonly type: "file";
1202
- readonly uri: string;
1203
- readonly mime: string;
1204
- readonly name?: string | undefined;
1205
- }, ...({
1206
- readonly type: "text";
1207
- readonly text: string;
1208
- } | {
1209
- readonly type: "file";
1210
- readonly uri: string;
1211
- readonly mime: string;
1212
- readonly name?: string | undefined;
1213
- })[]] | undefined;
1214
- readonly metadata?: {
1215
- readonly [x: string]: Schema.Json;
1216
- } | undefined;
3092
+ } | undefined;
3093
+ readonly time: {
3094
+ readonly created: number;
3095
+ readonly streamed?: number | undefined;
3096
+ readonly completed?: number | undefined;
1217
3097
  };
3098
+ }, "id" | "type"> | Omit<{
3099
+ readonly id: string;
3100
+ readonly metadata?: {
3101
+ readonly [x: string]: unknown;
3102
+ } | undefined;
1218
3103
  readonly time: {
1219
- readonly created: import("effect/DateTime").Utc;
1220
- readonly ran?: import("effect/DateTime").Utc | undefined;
1221
- readonly completed?: import("effect/DateTime").Utc | undefined;
3104
+ readonly created: number;
1222
3105
  };
1223
- } | {
1224
- readonly type: "text";
1225
- readonly text: string;
1226
- 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?: {
1227
3113
  readonly [x: string]: unknown;
1228
3114
  } | undefined;
1229
- } | {
1230
- readonly type: "reasoning";
1231
- 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;
1232
3136
  readonly native?: {
1233
3137
  readonly [x: string]: unknown;
1234
3138
  } | undefined;
1235
- readonly time?: {
1236
- readonly created: import("effect/DateTime").Utc;
1237
- 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;
1238
3144
  } | undefined;
1239
- })[];
1240
- readonly snapshot?: {
1241
- readonly start?: (string & import("effect/Brand").Brand<"Snapshot.ID">) | undefined;
1242
- readonly end?: (string & import("effect/Brand").Brand<"Snapshot.ID">) | undefined;
1243
- readonly files?: readonly (string & import("effect/Brand").Brand<"RelativePath">)[] | undefined;
1244
- } | undefined;
1245
- readonly finish?: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown" | undefined;
1246
- readonly rawFinish?: string | undefined;
1247
- readonly native?: {
1248
- readonly [x: string]: unknown;
1249
- } | undefined;
1250
- readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
1251
- readonly tokens?: {
1252
- readonly input: number;
1253
- readonly output: number;
1254
- readonly reasoning: number;
1255
- readonly cache: {
1256
- readonly read: number;
1257
- readonly write: number;
3145
+ readonly time: {
3146
+ readonly created: number;
1258
3147
  };
1259
- } | undefined;
1260
- readonly error?: {
1261
- readonly type: string;
1262
- readonly message: string;
1263
- readonly status?: number | undefined;
1264
- readonly response?: {
1265
- 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
+ };
1266
3158
  } | undefined;
1267
- readonly retryAfterMs?: number | undefined;
1268
- } | undefined;
1269
- readonly retry?: {
1270
- readonly attempt: number;
1271
- readonly at: import("effect/DateTime").Utc;
3159
+ readonly status: "failed";
3160
+ readonly reason: "auto" | "manual";
1272
3161
  readonly error: {
1273
3162
  readonly type: string;
1274
3163
  readonly message: string;
@@ -1278,105 +3167,94 @@ export declare const decodeMessageRowSync: (row: typeof SessionMessageTable.$inf
1278
3167
  } | undefined;
1279
3168
  readonly retryAfterMs?: number | undefined;
1280
3169
  };
1281
- } | undefined;
1282
- readonly time: {
1283
- readonly created: import("effect/DateTime").Utc;
1284
- readonly streamed?: import("effect/DateTime").Utc | undefined;
1285
- readonly completed?: import("effect/DateTime").Utc | undefined;
1286
- };
1287
- } | {
1288
- readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1289
- readonly metadata?: {
1290
- readonly [x: string]: unknown;
1291
- } | undefined;
1292
- readonly time: {
1293
- readonly created: import("effect/DateTime").Utc;
1294
- };
1295
- readonly type: "compaction";
1296
- readonly status: "running";
1297
- readonly reason: "auto" | "manual";
1298
- readonly summary: string;
1299
- } | {
1300
- readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1301
- readonly metadata?: {
1302
- readonly [x: string]: unknown;
1303
- } | undefined;
1304
- readonly time: {
1305
- readonly created: import("effect/DateTime").Utc;
1306
- };
1307
- readonly type: "compaction";
1308
- readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
1309
- readonly tokens?: {
1310
- readonly input: number;
1311
- readonly output: number;
1312
- readonly reasoning: number;
1313
- readonly cache: {
1314
- readonly read: number;
1315
- readonly write: number;
1316
- };
1317
- } | undefined;
1318
- readonly status: "completed";
1319
- readonly reason: "auto" | "manual";
1320
- readonly model?: {
1321
- readonly id: string & import("effect/Brand").Brand<"Model.ID">;
1322
- readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
1323
- readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
1324
- } | undefined;
1325
- readonly native?: {
1326
- readonly [x: string]: unknown;
1327
- } | undefined;
1328
- readonly summary: string;
1329
- } | {
1330
- readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1331
- readonly metadata?: {
1332
- readonly [x: string]: unknown;
1333
- } | undefined;
1334
- readonly time: {
1335
- readonly created: import("effect/DateTime").Utc;
1336
- };
1337
- readonly type: "compaction";
1338
- readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
1339
- readonly tokens?: {
1340
- readonly input: number;
1341
- readonly output: number;
1342
- readonly reasoning: number;
1343
- readonly cache: {
1344
- readonly read: number;
1345
- 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;
1346
3177
  };
1347
- } | undefined;
1348
- readonly status: "failed";
1349
- readonly reason: "auto" | "manual";
1350
- readonly error: {
1351
- readonly type: string;
1352
- readonly message: string;
1353
- readonly status?: number | undefined;
1354
- readonly response?: {
1355
- 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;
1356
3188
  } | undefined;
1357
- readonly retryAfterMs?: number | undefined;
1358
- };
1359
- } | {
1360
- readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1361
- readonly metadata?: {
1362
- readonly [x: string]: unknown;
1363
- } | undefined;
1364
- readonly time: {
1365
- readonly created: import("effect/DateTime").Utc;
1366
- };
1367
- readonly type: "idle";
1368
- readonly outcome: "failed" | "interrupted" | "succeeded";
1369
- readonly error?: {
1370
- readonly type: string;
1371
- readonly message: string;
1372
- readonly status?: number | undefined;
1373
- readonly response?: {
1374
- readonly body: string;
3189
+ }, "id" | "type"> | Omit<{
3190
+ readonly id: string;
3191
+ readonly metadata?: {
3192
+ readonly [x: string]: unknown;
1375
3193
  } | undefined;
1376
- readonly retryAfterMs?: number | undefined;
1377
- } | undefined;
1378
- };
1379
- 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<({
1380
3258
  readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
1381
3259
  readonly metadata?: {
1382
3260
  readonly [x: string]: unknown;
@@ -1779,11 +3657,11 @@ export declare const decodeMessageRow: (row: typeof SessionMessageTable.$inferSe
1779
3657
  } | undefined;
1780
3658
  readonly retryAfterMs?: number | undefined;
1781
3659
  } | undefined;
1782
- }, MessageDecodeError, never>;
1783
- /** Decodes rows after restoring media stored in `blob`. Reads that return media must use this. */
1784
- 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> & {
1785
3663
  $client: import("effect/sql/SqlClient").SqlClient;
1786
- }, rows: readonly {
3664
+ }, row: {
1787
3665
  data: Omit<{
1788
3666
  readonly id: string;
1789
3667
  readonly metadata?: {
@@ -2210,7 +4088,7 @@ export declare const decodeMessageRows: (db: import("../database/drizzle.js").Ef
2210
4088
  time_created: number;
2211
4089
  time_updated: number;
2212
4090
  type: "agent-switched" | "assistant" | "compaction" | "idle" | "location-switched" | "model-switched" | "shell" | "skill" | "synthetic" | "system" | "user";
2213
- }[]) => Effect.Effect<({
4091
+ }) => Effect.Effect<{
2214
4092
  readonly id: string & import("effect/Brand").Brand<"Session.Message.ID">;
2215
4093
  readonly metadata?: {
2216
4094
  readonly [x: string]: unknown;
@@ -2613,7 +4491,7 @@ export declare const decodeMessageRows: (db: import("../database/drizzle.js").Ef
2613
4491
  } | undefined;
2614
4492
  readonly retryAfterMs?: number | undefined;
2615
4493
  } | undefined;
2616
- })[], MessageDecodeError, never>;
4494
+ }, MessageDecodeError, never>;
2617
4495
  /** Decodes rows for clients that fetch media themselves, so files stored in `blob` stay `media:` refs. */
2618
4496
  export declare const decodeMessageRowsWithRefs: (db: import("../database/drizzle.js").EffectSQLiteDatabase<import("drizzle-orm").EmptyRelations> & {
2619
4497
  $client: import("effect/sql/SqlClient").SqlClient;