@opencode/core 0.0.0-dev-1155 → 0.0.0-dev-1169
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.
- package/dist/account/sql.js +1 -1
- package/dist/agent.js +92 -92
- package/dist/aisdk-native.js +1 -1
- package/dist/aisdk.js +109 -109
- package/dist/app.js +5 -5
- package/dist/artifact.js +253 -253
- package/dist/bus.js +80 -80
- package/dist/chunks/{filesystem-3b3p5y89.js → schema-00pd6sp3.js} +8 -8
- package/dist/chunks/{filesystem-kkg2t6c6.js → schema-01h9qvbn.js} +35 -35
- package/dist/chunks/{filesystem-gfgvxw2h.js → schema-040bqqk0.js} +1 -1
- package/dist/chunks/{filesystem-491q2x3b.js → schema-054zc0xd.js} +19 -19
- package/dist/chunks/{filesystem-3ryz99p0.js → schema-0ahs07zn.js} +4 -4
- package/dist/chunks/{filesystem-53g3ek9f.js → schema-0dpgc71n.js} +19 -19
- package/dist/chunks/{filesystem-sqjzf8x2.js → schema-0j7gp832.js} +4 -4
- package/dist/chunks/{filesystem-r0jx365g.js → schema-0jfy4hkm.js} +11 -11
- package/dist/chunks/{filesystem-ntnvj5mg.js → schema-0khwxjqg.js} +7 -7
- package/dist/chunks/{filesystem-0ma9gw4f.js → schema-0ma9gw4f.js} +2 -2
- package/dist/chunks/{filesystem-5pah5g87.js → schema-0vb5mjcv.js} +21 -21
- package/dist/chunks/{filesystem-083b6r2x.js → schema-12t8q5ww.js} +29 -29
- package/dist/chunks/{filesystem-160yv0cs.js → schema-160yv0cs.js} +1 -1
- package/dist/chunks/{filesystem-1aqsckx4.js → schema-1aqsckx4.js} +1 -1
- package/dist/chunks/{filesystem-ykvbdmjf.js → schema-1awa9fg3.js} +9 -9
- package/dist/chunks/{filesystem-h7ccewpy.js → schema-1fqa7gdp.js} +3 -3
- package/dist/chunks/{filesystem-he2040d4.js → schema-1p6p0791.js} +7 -7
- package/dist/chunks/{filesystem-txdz8mmb.js → schema-1wdt4fx4.js} +8 -8
- package/dist/chunks/{filesystem-1x2knyw4.js → schema-1x2knyw4.js} +1 -1
- package/dist/chunks/{filesystem-p7vhpwh8.js → schema-1yq9hg58.js} +5 -5
- package/dist/chunks/{filesystem-pg8c6wdy.js → schema-1yzf0qyg.js} +28 -28
- package/dist/chunks/{filesystem-tjpnqare.js → schema-1zt50wep.js} +12 -12
- package/dist/chunks/{filesystem-px7qpgcn.js → schema-229tvxdn.js} +4 -4
- package/dist/chunks/{filesystem-1ep2p91f.js → schema-27w5k9zf.js} +2 -2
- package/dist/chunks/{filesystem-hv4b246c.js → schema-28yt5ya3.js} +8 -8
- package/dist/chunks/{filesystem-2fc7eemy.js → schema-2fc7eemy.js} +1 -1
- package/dist/chunks/{filesystem-q7qbye6s.js → schema-2gpvmrfd.js} +33 -33
- package/dist/chunks/{filesystem-1rncpvfz.js → schema-2hpjgcj7.js} +17 -17
- package/dist/chunks/{filesystem-79f5ryf5.js → schema-2m6srr37.js} +13 -13
- package/dist/chunks/{filesystem-s1ba0vj0.js → schema-2p60zmnr.js} +2 -2
- package/dist/chunks/{filesystem-svaf9hke.js → schema-2p7ww4m4.js} +37 -37
- package/dist/chunks/{filesystem-12a87htm.js → schema-2s709x84.js} +4 -4
- package/dist/chunks/{filesystem-be4x5m7x.js → schema-2tkbb2hd.js} +17 -17
- package/dist/chunks/{filesystem-ay2fkrah.js → schema-32zvh7m8.js} +33 -33
- package/dist/chunks/{filesystem-9y2szkpc.js → schema-34nzn3j8.js} +20 -20
- package/dist/chunks/{filesystem-b9d5jw54.js → schema-35jtqnzh.js} +15 -15
- package/dist/chunks/{filesystem-w8jdb2jn.js → schema-37rq3n90.js} +18 -14
- package/dist/chunks/{filesystem-3adw4bt5.js → schema-3adw4bt5.js} +2 -2
- package/dist/chunks/{filesystem-ayjs7tqn.js → schema-3cbjf1nt.js} +2 -2
- package/dist/chunks/{filesystem-gzm4ykdm.js → schema-3ew67rpx.js} +26 -26
- package/dist/chunks/{filesystem-1ef5n38d.js → schema-3gt03n7r.js} +18 -18
- package/dist/chunks/{filesystem-3hepkmqq.js → schema-3hepkmqq.js} +1 -1
- package/dist/chunks/{filesystem-tr6gb3ke.js → schema-3n8639p5.js} +10 -10
- package/dist/chunks/{filesystem-3nnrz6f6.js → schema-3nnrz6f6.js} +1 -1
- package/dist/chunks/{filesystem-bex4xsk5.js → schema-3p57dcxh.js} +4 -4
- package/dist/chunks/{filesystem-vk0z4zg0.js → schema-3xnqrhgf.js} +32 -32
- package/dist/chunks/{filesystem-40y6dtc2.js → schema-40y6dtc2.js} +1 -1
- package/dist/chunks/{filesystem-s8kfvqtc.js → schema-41ta799d.js} +4 -4
- package/dist/chunks/{filesystem-jxd6f16v.js → schema-44pmzq9c.js} +2 -2
- package/dist/chunks/{filesystem-4dx1dgte.js → schema-4dx1dgte.js} +1 -1
- package/dist/chunks/{filesystem-4f25tdd0.js → schema-4f25tdd0.js} +1 -1
- package/dist/chunks/{filesystem-ycyeq6c3.js → schema-4m48desf.js} +11 -11
- package/dist/chunks/{filesystem-4pyp9zr9.js → schema-4pyp9zr9.js} +1 -1
- package/dist/chunks/{filesystem-4v008n1t.js → schema-4v008n1t.js} +1 -1
- package/dist/chunks/{filesystem-3s9hkh01.js → schema-4vhxd4fz.js} +2 -2
- package/dist/chunks/{filesystem-n1q9dan8.js → schema-4w9c1rv8.js} +84 -84
- package/dist/chunks/{filesystem-0php2d2a.js → schema-4zcepfyr.js} +4 -4
- package/dist/chunks/{filesystem-bwkfv57n.js → schema-53m7ep8y.js} +39 -39
- package/dist/chunks/{filesystem-b1x243mb.js → schema-55a1w20j.js} +17 -17
- package/dist/chunks/{filesystem-8dfptpqb.js → schema-5c0ay57s.js} +4 -4
- package/dist/chunks/{filesystem-ewp531bs.js → schema-5cxze2ek.js} +23 -23
- package/dist/chunks/{filesystem-5m9w47nd.js → schema-5m9w47nd.js} +1 -1
- package/dist/chunks/{filesystem-bhfd478d.js → schema-5n0rnk8e.js} +4 -4
- package/dist/chunks/{filesystem-2jt5ssd0.js → schema-5sq7dtyr.js} +3 -3
- package/dist/chunks/{filesystem-5whx36p1.js → schema-5whx36p1.js} +1 -1
- package/dist/chunks/{filesystem-h8apfp5a.js → schema-5xymd101.js} +14 -14
- package/dist/chunks/{filesystem-c1bfpsqy.js → schema-5zpqhmp2.js} +6 -6
- package/dist/chunks/{filesystem-czmwpxsy.js → schema-626jn072.js} +21 -21
- package/dist/chunks/{filesystem-c57y1876.js → schema-65g7jm80.js} +20 -20
- package/dist/chunks/{filesystem-g5a4a3mq.js → schema-6a3nme33.js} +18 -18
- package/dist/chunks/{filesystem-zqng6tfv.js → schema-6a3yqv2r.js} +3 -3
- package/dist/chunks/{filesystem-cgmxejc8.js → schema-6c25bs39.js} +26 -26
- package/dist/chunks/{filesystem-vq0qa3sh.js → schema-6h8vcvjm.js} +9 -9
- package/dist/chunks/{filesystem-vwcz1f45.js → schema-6y2b864j.js} +7 -7
- package/dist/chunks/{filesystem-5bcr6264.js → schema-6y4qc4mp.js} +15 -15
- package/dist/chunks/{filesystem-nw3gtmag.js → schema-7357t78n.js} +7 -7
- package/dist/chunks/{filesystem-8w95ndt2.js → schema-73tv2q91.js} +14 -14
- package/dist/chunks/{filesystem-775hqbnd.js → schema-775hqbnd.js} +3 -3
- package/dist/chunks/{filesystem-05rxf7ag.js → schema-7a2p64p0.js} +20 -20
- package/dist/chunks/{filesystem-c9z1d5hy.js → schema-7a9m1j2x.js} +11 -11
- package/dist/chunks/{filesystem-9y4ybsjj.js → schema-7afn9zz1.js} +21 -21
- package/dist/chunks/{filesystem-7bmhse3q.js → schema-7bmhse3q.js} +1 -1
- package/dist/chunks/{filesystem-2cpdbpj8.js → schema-7c8hwk2v.js} +16 -16
- package/dist/chunks/{filesystem-x82r7ffc.js → schema-7k5jmvhj.js} +18 -18
- package/dist/chunks/{filesystem-9fcfg85h.js → schema-7mpsrzpa.js} +12 -12
- package/dist/chunks/{filesystem-pk5ktw9t.js → schema-7tf6362t.js} +47 -47
- package/dist/chunks/{filesystem-mnmjr1v5.js → schema-7tfjg757.js} +16 -16
- package/dist/chunks/{filesystem-7w2ypzdf.js → schema-7w2ypzdf.js} +1 -1
- package/dist/chunks/{filesystem-14qtwrnd.js → schema-7w972mxx.js} +28 -28
- package/dist/chunks/{filesystem-7weczvnd.js → schema-7weczvnd.js} +1 -1
- package/dist/chunks/{filesystem-3smzfgkv.js → schema-7xwq3sd0.js} +8 -8
- package/dist/chunks/{filesystem-madhs7qf.js → schema-7y3w56wa.js} +3 -3
- package/dist/chunks/{filesystem-2d5vwg09.js → schema-7zqxd1dh.js} +6 -6
- package/dist/chunks/{filesystem-80pdk984.js → schema-80pdk984.js} +1 -1
- package/dist/chunks/{filesystem-jycw55y7.js → schema-82t6hvvc.js} +4 -4
- package/dist/chunks/{filesystem-tf77d83d.js → schema-83r2q2tc.js} +31 -31
- package/dist/chunks/{filesystem-85jq8dht.js → schema-85jq8dht.js} +1 -1
- package/dist/chunks/{filesystem-0ty7x2vf.js → schema-87g0g3vw.js} +41 -41
- package/dist/chunks/{filesystem-gx76kxxn.js → schema-87kxp3gn.js} +11 -11
- package/dist/chunks/{filesystem-7ynxdpkt.js → schema-894qcq1y.js} +59 -59
- package/dist/chunks/{filesystem-t48jrnqq.js → schema-8akjpyn6.js} +3 -3
- package/dist/chunks/{filesystem-25h84942.js → schema-8b3vzgkx.js} +4 -4
- package/dist/chunks/{filesystem-8wdkt6y0.js → schema-8jv95stc.js} +6 -6
- package/dist/chunks/{filesystem-8kjyvwy5.js → schema-8kjyvwy5.js} +1 -1
- package/dist/chunks/{filesystem-8wtp7s3z.js → schema-8wtp7s3z.js} +1 -1
- package/dist/chunks/{filesystem-mb7mbhnz.js → schema-8z6m94af.js} +3 -3
- package/dist/chunks/{filesystem-8zv0xmg5.js → schema-8zv0xmg5.js} +1 -1
- package/dist/chunks/{filesystem-1y1at900.js → schema-90kfgkgm.js} +13 -13
- package/dist/chunks/{filesystem-k2r0m066.js → schema-92mnqtsa.js} +12 -12
- package/dist/chunks/{filesystem-8cxxjpvd.js → schema-93f9eha0.js} +17 -17
- package/dist/chunks/{filesystem-h5chy42v.js → schema-94e33dpz.js} +3 -3
- package/dist/chunks/{filesystem-zq6pgs90.js → schema-95zwqs5c.js} +156 -156
- package/dist/chunks/{filesystem-963hk181.js → schema-963hk181.js} +2 -2
- package/dist/chunks/{filesystem-vzydmz2c.js → schema-980raww3.js} +14 -14
- package/dist/chunks/{filesystem-a2c7ns4r.js → schema-9hjrmeye.js} +11 -11
- package/dist/chunks/{filesystem-aq906svt.js → schema-9nh708zh.js} +6 -6
- package/dist/chunks/{filesystem-qfsm01t2.js → schema-9rtfsky6.js} +32 -32
- package/dist/chunks/{filesystem-z9tq0y3w.js → schema-9rwnj3cf.js} +21 -21
- package/dist/chunks/{filesystem-kmekj7m2.js → schema-9sk33afj.js} +8 -8
- package/dist/chunks/{filesystem-0srmv9a7.js → schema-9wxzp1qr.js} +28 -28
- package/dist/chunks/{filesystem-fxstjx9a.js → schema-9zf7nxcy.js} +10 -10
- package/dist/chunks/{filesystem-pa971bt4.js → schema-a6kay9xz.js} +6 -6
- package/dist/chunks/{filesystem-7dc4gc5v.js → schema-ae2hmq0b.js} +32 -32
- package/dist/chunks/{filesystem-034tev2y.js → schema-aj7mw0zk.js} +2 -2
- package/dist/chunks/{filesystem-23mseg9w.js → schema-akbak9kn.js} +10 -10
- package/dist/chunks/{filesystem-z1ma5m5g.js → schema-apvw9r81.js} +7 -7
- package/dist/chunks/{filesystem-cgfra67r.js → schema-ar7qhdy9.js} +16 -16
- package/dist/chunks/{filesystem-96xmncfy.js → schema-ayevjdp6.js} +4 -4
- package/dist/chunks/{filesystem-g4txs7zc.js → schema-b26ddj6h.js} +4 -4
- package/dist/chunks/{filesystem-b6cq1fvz.js → schema-b6cq1fvz.js} +1 -1
- package/dist/chunks/{filesystem-xtq9xpt1.js → schema-b7nkz392.js} +1 -1
- package/dist/chunks/{filesystem-tb2mrvc9.js → schema-ba5f9dy2.js} +4 -4
- package/dist/chunks/{filesystem-8sxe6kv8.js → schema-bb3mmwvh.js} +2 -2
- package/dist/chunks/{filesystem-csxpn9yn.js → schema-bb65ze16.js} +3 -3
- package/dist/chunks/{filesystem-nc4bhxkd.js → schema-bfmj02kq.js} +16 -16
- package/dist/chunks/{filesystem-b0je4vth.js → schema-bjnxymnv.js} +18 -18
- package/dist/chunks/{filesystem-2yzwas0f.js → schema-bq0ysetc.js} +14 -14
- package/dist/chunks/{filesystem-bstexjd6.js → schema-bstexjd6.js} +1 -1
- package/dist/chunks/{filesystem-qp2996hh.js → schema-bszd1e77.js} +5 -5
- package/dist/chunks/{filesystem-by8ty0bx.js → schema-by8ty0bx.js} +1 -1
- package/dist/chunks/{filesystem-c7cw818c.js → schema-c7cw818c.js} +2 -2
- package/dist/chunks/{filesystem-ckttgx1m.js → schema-ca2kttj4.js} +4 -4
- package/dist/chunks/{filesystem-79dx1dc6.js → schema-cb9p0hr3.js} +5 -5
- package/dist/chunks/{filesystem-qhxa6c6a.js → schema-cce0647p.js} +38 -38
- package/dist/chunks/{filesystem-4gxktgp4.js → schema-cd40mm2x.js} +25 -25
- package/dist/chunks/{filesystem-fwke0v11.js → schema-cn0khwc2.js} +24 -24
- package/dist/chunks/{filesystem-t190ewm6.js → schema-cqmt8zzz.js} +7 -7
- package/dist/chunks/{filesystem-cwrgdav8.js → schema-cwrgdav8.js} +2 -2
- package/dist/chunks/{filesystem-d4v9tmah.js → schema-d4v9tmah.js} +2 -2
- package/dist/chunks/{filesystem-kxdwvqnx.js → schema-djbn8b3v.js} +23 -23
- package/dist/chunks/{filesystem-b62sbhp2.js → schema-djejg4dy.js} +9 -9
- package/dist/chunks/{filesystem-wxgjsayh.js → schema-dnern54h.js} +11 -11
- package/dist/chunks/{filesystem-j1ftk7bn.js → schema-dsgstd3d.js} +15 -15
- package/dist/chunks/{filesystem-ackgvjab.js → schema-dszy2cs3.js} +4 -4
- package/dist/chunks/{filesystem-dt77769w.js → schema-dt77769w.js} +1 -1
- package/dist/chunks/{filesystem-9yqjp86x.js → schema-dwwyec8z.js} +6 -6
- package/dist/chunks/{filesystem-j26j1va9.js → schema-e2sh8fdv.js} +7 -7
- package/dist/chunks/{filesystem-rh3ncdjm.js → schema-e36kjsvh.js} +6 -6
- package/dist/chunks/{filesystem-9zz91ck0.js → schema-e4shjbcy.js} +19 -19
- package/dist/chunks/{filesystem-y1jg12an.js → schema-e5q9zwm8.js} +12 -12
- package/dist/chunks/{filesystem-hn0c49ha.js → schema-ed7x67as.js} +3 -3
- package/dist/chunks/{filesystem-bffnw3zy.js → schema-eestr1ap.js} +11 -11
- package/dist/chunks/{filesystem-kxkzc9ky.js → schema-egv7nm33.js} +24 -24
- package/dist/chunks/{filesystem-qk5sk9d1.js → schema-ep6pe98a.js} +5 -5
- package/dist/chunks/{filesystem-eqw4pqj1.js → schema-eqw4pqj1.js} +2 -2
- package/dist/chunks/{filesystem-cs92ehcm.js → schema-essv7e64.js} +8 -8
- package/dist/chunks/{filesystem-pnwsrq7c.js → schema-etrnj9s7.js} +8 -8
- package/dist/chunks/{filesystem-wedze56r.js → schema-f0wpasqh.js} +21 -21
- package/dist/chunks/{filesystem-rm9v0bwn.js → schema-f6aj1kd5.js} +10 -10
- package/dist/chunks/{filesystem-8ws1cnew.js → schema-fb3jq07n.js} +15 -15
- package/dist/chunks/{filesystem-s5zrq09q.js → schema-fc93665r.js} +8 -8
- package/dist/chunks/{filesystem-5xkprpgc.js → schema-fcha702q.js} +15 -15
- package/dist/chunks/{filesystem-fg9p65nk.js → schema-fg9p65nk.js} +2 -2
- package/dist/chunks/{filesystem-4ydapqmf.js → schema-fq23ffp0.js} +5 -5
- package/dist/chunks/{filesystem-2r0xhr37.js → schema-fqpvdrje.js} +6 -6
- package/dist/chunks/{filesystem-bydyckw6.js → schema-g2183vvk.js} +3 -3
- package/dist/chunks/{filesystem-mwbh0fme.js → schema-g44npge0.js} +23 -23
- package/dist/chunks/{filesystem-gbjdnr5j.js → schema-gbjdnr5j.js} +2 -2
- package/dist/chunks/{filesystem-ghrv1g9c.js → schema-ghrv1g9c.js} +1 -1
- package/dist/chunks/{filesystem-36tjmfsy.js → schema-gsm10rjf.js} +4 -4
- package/dist/chunks/{filesystem-exy8xd7k.js → schema-gvah0j30.js} +11 -11
- package/dist/chunks/{filesystem-mpp1y76d.js → schema-gy85zcy8.js} +19 -19
- package/dist/chunks/{filesystem-xdmazz3w.js → schema-h1wwt2d4.js} +33 -33
- package/dist/chunks/{filesystem-ffvvmdd5.js → schema-h5gm5jf1.js} +7 -7
- package/dist/chunks/{filesystem-x645n76j.js → schema-hagqs1d2.js} +23 -23
- package/dist/chunks/{filesystem-hs74eps7.js → schema-hatv92we.js} +11 -11
- package/dist/chunks/{filesystem-hpsk3ppz.js → schema-hcnkffw2.js} +13 -13
- package/dist/chunks/{filesystem-hgzwgvze.js → schema-hgzwgvze.js} +2 -2
- package/dist/chunks/{filesystem-mpq3970x.js → schema-hw67g06k.js} +17 -12
- package/dist/chunks/{filesystem-2cjx21jp.js → schema-j8exsrxy.js} +30 -30
- package/dist/chunks/{filesystem-j9nxzz3g.js → schema-j9nxzz3g.js} +3 -3
- package/dist/chunks/{filesystem-6vcwkhp6.js → schema-j9x1g365.js} +25 -25
- package/dist/chunks/{filesystem-w83qxrsc.js → schema-jg2ygqjd.js} +6 -6
- package/dist/chunks/{filesystem-0x2ag7me.js → schema-jh3vmqnb.js} +86 -86
- package/dist/chunks/{filesystem-jm70asfg.js → schema-jm70asfg.js} +1 -1
- package/dist/chunks/{filesystem-h6e51344.js → schema-jpaeaxj3.js} +10 -10
- package/dist/chunks/{filesystem-yhx801ee.js → schema-jpg972ga.js} +5 -5
- package/dist/chunks/{filesystem-4n5cstwr.js → schema-jvnqdmg7.js} +371 -371
- package/dist/chunks/{filesystem-gshvyxec.js → schema-jxw3nqfr.js} +5 -5
- package/dist/chunks/{filesystem-3fzw2dgx.js → schema-jyqxtn40.js} +13 -13
- package/dist/chunks/{filesystem-06kr05p9.js → schema-k278m6zw.js} +38 -38
- package/dist/chunks/{filesystem-vnt99xy7.js → schema-k3ggfjkb.js} +2 -2
- package/dist/chunks/{filesystem-pp3k6pe8.js → schema-kad56yks.js} +21 -21
- package/dist/chunks/{filesystem-tc7r93jj.js → schema-knq5zpdc.js} +8 -8
- package/dist/chunks/{filesystem-fmvrz9hx.js → schema-kny7n17h.js} +52 -52
- package/dist/chunks/{filesystem-b62kntzp.js → schema-ksd47y91.js} +34 -34
- package/dist/chunks/{filesystem-kt3bjfbg.js → schema-kt3bjfbg.js} +1 -1
- package/dist/chunks/{filesystem-2s9mae96.js → schema-ktck1cjp.js} +6 -6
- package/dist/chunks/{filesystem-kzczzf4v.js → schema-kzczzf4v.js} +1 -1
- package/dist/chunks/{filesystem-m1714858.js → schema-m1714858.js} +1 -1
- package/dist/chunks/{filesystem-94n1qn39.js → schema-m8071f4b.js} +1 -1
- package/dist/chunks/{filesystem-m90tx7mw.js → schema-m90tx7mw.js} +1 -1
- package/dist/chunks/{filesystem-gbetm1xc.js → schema-m98552er.js} +2 -2
- package/dist/chunks/{filesystem-m9w0rfyh.js → schema-m9w0rfyh.js} +1 -1
- package/dist/chunks/schema-me0dhgxs.js +18 -0
- package/dist/chunks/{filesystem-j4qxbzz7.js → schema-mkqrt9r1.js} +13 -13
- package/dist/chunks/{filesystem-hh8a7g2z.js → schema-mmk0jhxb.js} +18 -18
- package/dist/chunks/{filesystem-0h86f0az.js → schema-msd2a3qm.js} +4 -4
- package/dist/chunks/schema-n0yx1q4a.js +26 -0
- package/dist/chunks/{filesystem-kq4fnwb1.js → schema-n320gsn2.js} +4 -4
- package/dist/chunks/{filesystem-q3n6jbga.js → schema-n5k4x34p.js} +45 -45
- package/dist/chunks/{filesystem-r1x3rphc.js → schema-n9g0jqka.js} +33 -33
- package/dist/chunks/{filesystem-y4h9vdhr.js → schema-nbbfmg35.js} +11 -10
- package/dist/chunks/{filesystem-324k4kgm.js → schema-nd6a1rw0.js} +3 -3
- package/dist/chunks/{filesystem-w5r8nw58.js → schema-nfdz4xt8.js} +21 -21
- package/dist/chunks/{filesystem-y8wtdb2c.js → schema-ngrhmx0y.js} +41 -41
- package/dist/chunks/{filesystem-xgjg0k83.js → schema-ns3f0y8s.js} +9 -9
- package/dist/chunks/{filesystem-9jer5kqh.js → schema-ns5s5x7n.js} +12 -12
- package/dist/chunks/{filesystem-w48gbg6x.js → schema-nstbetgn.js} +8 -8
- package/dist/chunks/{filesystem-mf0kks93.js → schema-ntn2vp5r.js} +17 -17
- package/dist/chunks/{filesystem-1d41vqxy.js → schema-nvrhh2jh.js} +32 -32
- package/dist/chunks/{filesystem-wegkxhrn.js → schema-nx4vzyjd.js} +2 -2
- package/dist/chunks/{filesystem-2ns59sfh.js → schema-p021jaq0.js} +10 -10
- package/dist/chunks/{filesystem-thkr7sfr.js → schema-p1tqk3wj.js} +6 -6
- package/dist/chunks/{filesystem-n3j33rb6.js → schema-p94p4v4n.js} +4 -4
- package/dist/chunks/{filesystem-mnx4hk0n.js → schema-pe69sqjx.js} +8 -8
- package/dist/chunks/{filesystem-v15cxm8r.js → schema-pet7zff3.js} +18 -18
- package/dist/chunks/{filesystem-00j42c4a.js → schema-pfgfzn9w.js} +21 -21
- package/dist/chunks/{filesystem-rge58vnh.js → schema-ph6zr0my.js} +22 -22
- package/dist/chunks/{filesystem-ekhvmsd2.js → schema-pj4g6jw6.js} +9 -9
- package/dist/chunks/{filesystem-fc74xdpv.js → schema-pjf82mvf.js} +33 -33
- package/dist/chunks/{filesystem-dpcxbnzm.js → schema-pkdvs1r0.js} +5 -5
- package/dist/chunks/{filesystem-pknna89w.js → schema-pknna89w.js} +1 -1
- package/dist/chunks/{filesystem-77e37j3z.js → schema-pmpqfy7z.js} +32 -32
- package/dist/chunks/{filesystem-43j7jt16.js → schema-pmpycxtw.js} +18 -18
- package/dist/chunks/{filesystem-n2tfgszc.js → schema-pp2hmg1m.js} +7 -7
- package/dist/chunks/{filesystem-qkaww9q1.js → schema-pstexa60.js} +11 -11
- package/dist/chunks/{filesystem-zf9mw93b.js → schema-pve6n1f6.js} +17 -17
- package/dist/chunks/{filesystem-tn1by9h5.js → schema-pwm9xzc0.js} +22 -22
- package/dist/chunks/{filesystem-j6xgaej1.js → schema-q0cx4jd1.js} +14 -14
- package/dist/chunks/{filesystem-16m4fety.js → schema-q4bddqzm.js} +10 -10
- package/dist/chunks/{filesystem-3w4j854v.js → schema-q7n78wgf.js} +10 -10
- package/dist/chunks/{filesystem-kwf3mc6b.js → schema-qfbkhxhn.js} +4 -4
- package/dist/chunks/{filesystem-1zd29w7p.js → schema-qjjf83ye.js} +6 -6
- package/dist/chunks/{filesystem-mz3k47ct.js → schema-qmqqtqcn.js} +3 -3
- package/dist/chunks/schema-qp3r9mzz.js +273 -0
- package/dist/chunks/{filesystem-qp7r0hxv.js → schema-qp7r0hxv.js} +1 -1
- package/dist/chunks/{filesystem-wn6h1xmg.js → schema-qqan37dg.js} +60 -60
- package/dist/chunks/{filesystem-bamve3at.js → schema-qr8vfs2f.js} +49 -49
- package/dist/chunks/{filesystem-nwda1bfv.js → schema-qrnbag0z.js} +26 -26
- package/dist/chunks/{filesystem-6q8jj3zs.js → schema-qtf35215.js} +3 -3
- package/dist/chunks/{filesystem-r17fbvme.js → schema-r17fbvme.js} +1 -1
- package/dist/chunks/{filesystem-jngkd2xt.js → schema-r6ar04y2.js} +26 -26
- package/dist/chunks/{filesystem-rb9dy4dg.js → schema-rb9dy4dg.js} +1 -1
- package/dist/chunks/{filesystem-rgc9cx3e.js → schema-rgc9cx3e.js} +2 -2
- package/dist/chunks/{filesystem-g6aam94y.js → schema-s02m1st8.js} +22 -22
- package/dist/chunks/{filesystem-96yvqpwb.js → schema-s1xc4ekk.js} +11 -11
- package/dist/chunks/{filesystem-0fn5ab0k.js → schema-s5jhzpr9.js} +27 -25
- package/dist/chunks/{filesystem-1tcdzert.js → schema-s5pjjcby.js} +9 -9
- package/dist/chunks/{filesystem-6j19asys.js → schema-s62h8xwa.js} +42 -42
- package/dist/chunks/{filesystem-rbg54dp1.js → schema-s85z3cra.js} +4 -4
- package/dist/chunks/{filesystem-sbya78hr.js → schema-sbya78hr.js} +1 -1
- package/dist/chunks/{filesystem-90ct6wq4.js → schema-sf9y72b7.js} +4 -4
- package/dist/chunks/{filesystem-ft91cex6.js → schema-sgmpg1at.js} +15 -15
- package/dist/chunks/{filesystem-hww7tg5r.js → schema-sswnp1hr.js} +18 -18
- package/dist/chunks/{filesystem-svcy3p9a.js → schema-svcy3p9a.js} +1 -1
- package/dist/chunks/{filesystem-gatcy5wf.js → schema-swtby07c.js} +15 -15
- package/dist/chunks/{filesystem-qz4vhj1z.js → schema-t2trxbvf.js} +26 -26
- package/dist/chunks/{filesystem-9qxtrk0a.js → schema-t5zz07dm.js} +28 -28
- package/dist/chunks/{filesystem-txgc4ptp.js → schema-t9vhjqng.js} +16 -16
- package/dist/chunks/{filesystem-444evg8n.js → schema-tamm6359.js} +36 -36
- package/dist/chunks/{filesystem-tbpn7jtk.js → schema-tbpn7jtk.js} +1 -1
- package/dist/chunks/{filesystem-tczq8hjw.js → schema-tczq8hjw.js} +1 -1
- package/dist/chunks/{filesystem-tg7s7b5t.js → schema-tg7s7b5t.js} +1 -1
- package/dist/chunks/{filesystem-bvhssps7.js → schema-tmgn3zs9.js} +24 -24
- package/dist/chunks/{filesystem-6er1m856.js → schema-tqwq9s5x.js} +32 -32
- package/dist/chunks/{filesystem-j376ae4e.js → schema-tr8x705m.js} +5 -5
- package/dist/chunks/{filesystem-tvtps2q9.js → schema-tvtps2q9.js} +1 -1
- package/dist/chunks/{filesystem-twssxy5n.js → schema-twssxy5n.js} +2 -2
- package/dist/chunks/{filesystem-7f186e6p.js → schema-txgthtwa.js} +12 -12
- package/dist/chunks/{filesystem-21f92tpx.js → schema-v1nrzbej.js} +9 -7
- package/dist/chunks/{filesystem-v2r1d0zg.js → schema-v2r1d0zg.js} +1 -1
- package/dist/chunks/{filesystem-hwpa77gc.js → schema-v8vtkzra.js} +83 -83
- package/dist/chunks/{filesystem-68dsae6w.js → schema-vgp39c3q.js} +19 -19
- package/dist/chunks/{filesystem-vjf35v1f.js → schema-vjf35v1f.js} +1 -1
- package/dist/chunks/{filesystem-kj9n5bvh.js → schema-vmqe41cb.js} +4 -4
- package/dist/chunks/{filesystem-14q26q0h.js → schema-vtkvgxem.js} +16 -16
- package/dist/chunks/{filesystem-cjdqh2wj.js → schema-vz5bqa0f.js} +5 -5
- package/dist/chunks/{filesystem-r41sfy63.js → schema-w2eysc6j.js} +6 -6
- package/dist/chunks/{filesystem-w3wsvvr9.js → schema-w3wsvvr9.js} +1 -1
- package/dist/chunks/{filesystem-9q8g9sv8.js → schema-w79nt68w.js} +4 -4
- package/dist/chunks/{filesystem-wakvkjy4.js → schema-wakvkjy4.js} +1 -1
- package/dist/chunks/{filesystem-wd87259q.js → schema-wd87259q.js} +1 -1
- package/dist/chunks/{filesystem-sh6sjrys.js → schema-wgtjsce3.js} +2 -2
- package/dist/chunks/{filesystem-wd8c1es6.js → schema-wjt8g24f.js} +49 -49
- package/dist/chunks/{filesystem-wr3re1en.js → schema-wr3re1en.js} +1 -1
- package/dist/chunks/{filesystem-dsxe3vjz.js → schema-wrfejyj7.js} +9 -9
- package/dist/chunks/{filesystem-8xmc89yx.js → schema-wvp6s5r8.js} +36 -36
- package/dist/chunks/{filesystem-sdn2zcx3.js → schema-x150ncgg.js} +2 -2
- package/dist/chunks/{filesystem-5fc8hcg9.js → schema-x2199xg7.js} +28 -28
- package/dist/chunks/{filesystem-xy63rwa2.js → schema-xfk334w4.js} +5 -5
- package/dist/chunks/{filesystem-r2xmn65f.js → schema-xh9sbx5d.js} +31 -31
- package/dist/chunks/{filesystem-0zz2bnr1.js → schema-xneeh6s4.js} +15 -15
- package/dist/chunks/{filesystem-kx57agve.js → schema-xv3aaf54.js} +15 -15
- package/dist/chunks/{filesystem-xjr6c8m4.js → schema-xxschbft.js} +4 -4
- package/dist/chunks/{filesystem-6gpahs7y.js → schema-xznbj9qp.js} +25 -25
- package/dist/chunks/schema-y32xxt00.js +16 -0
- package/dist/chunks/{filesystem-jv5ccajn.js → schema-y3p3hzkr.js} +5 -5
- package/dist/chunks/{filesystem-3v1jab5g.js → schema-y5ken5vs.js} +7 -7
- package/dist/chunks/{filesystem-7fczfqhg.js → schema-y682mywm.js} +13 -13
- package/dist/chunks/{filesystem-yb20nhc3.js → schema-yb20nhc3.js} +1 -1
- package/dist/chunks/{filesystem-vjhrddsw.js → schema-yepd7x5v.js} +5 -5
- package/dist/chunks/{filesystem-ahhdqv1f.js → schema-yhy601mr.js} +11 -11
- package/dist/chunks/{filesystem-kr8bp0nb.js → schema-yj5p50qd.js} +5 -5
- package/dist/chunks/{filesystem-z6p3htzk.js → schema-ym2hf25x.js} +11 -11
- package/dist/chunks/{filesystem-apmfn43p.js → schema-ymfq94hg.js} +21 -21
- package/dist/chunks/{filesystem-0kgbgg4w.js → schema-ync0ket7.js} +5 -5
- package/dist/chunks/{filesystem-7yv86tzv.js → schema-ynq5d5wj.js} +17 -17
- package/dist/chunks/{filesystem-yr705xyq.js → schema-yr705xyq.js} +1 -1
- package/dist/chunks/{filesystem-04tq37rg.js → schema-yrzcpjjp.js} +40 -40
- package/dist/chunks/{filesystem-8xz27cp9.js → schema-yts2a8qm.js} +4 -4
- package/dist/chunks/{filesystem-b1azjyxw.js → schema-yve512cx.js} +11 -11
- package/dist/chunks/{filesystem-yvtc2x31.js → schema-yvtc2x31.js} +1 -1
- package/dist/chunks/{filesystem-nw8met9v.js → schema-yyb7x4q2.js} +38 -38
- package/dist/chunks/{filesystem-q50958an.js → schema-z583g8kc.js} +4 -4
- package/dist/chunks/{filesystem-5fjyrr2e.js → schema-zded71tf.js} +18 -18
- package/dist/chunks/{filesystem-5r3dv39m.js → schema-zf02ae39.js} +9 -9
- package/dist/chunks/{filesystem-h8bg152s.js → schema-zk8ezkjv.js} +12 -12
- package/dist/chunks/{filesystem-k77faqfm.js → schema-zxxfjzbm.js} +7 -7
- package/dist/chunks/{filesystem-k8tgqm9f.js → schema-zz0y7mj6.js} +10 -10
- package/dist/codemode/catalog.js +1 -1
- package/dist/codemode/execution.js +5 -5
- package/dist/codemode/fetch.js +149 -149
- package/dist/codemode/instructions.js +9 -9
- package/dist/codemode/tool.js +156 -156
- package/dist/command.js +94 -94
- package/dist/config/discovery.js +95 -95
- package/dist/config/integration.js +1 -1
- package/dist/config/managed.js +1 -1
- package/dist/config/markdown.js +1 -1
- package/dist/config/normalize.js +113 -113
- package/dist/config/plugin/agent.js +134 -134
- package/dist/config/plugin/command.js +245 -245
- package/dist/config/plugin/compaction.js +174 -174
- package/dist/config/plugin/compatibility.js +154 -154
- package/dist/config/plugin/entry-observer.js +1 -1
- package/dist/config/plugin/formatter.js +132 -132
- package/dist/config/plugin/image.js +131 -131
- package/dist/config/plugin/instruction.js +131 -131
- package/dist/config/plugin/location-watcher.js +133 -133
- package/dist/config/plugin/mcp.js +146 -146
- package/dist/config/plugin/policy.js +131 -131
- package/dist/config/plugin/provider.js +131 -131
- package/dist/config/plugin/reference.js +133 -133
- package/dist/config/plugin/shell.js +133 -133
- package/dist/config/plugin/skill-file.js +150 -150
- package/dist/config/plugin/skill-scan.js +1 -1
- package/dist/config/plugin/skill.js +157 -157
- package/dist/config/plugin/snapshot.js +131 -131
- package/dist/config/plugin/source.js +135 -135
- package/dist/config/plugin/tool-output.js +132 -132
- package/dist/config/plugin/websearch.js +132 -132
- package/dist/config/plugin/worktree.js +133 -133
- package/dist/config/variable.js +1 -1
- package/dist/config/watch.js +1 -1
- package/dist/config.js +136 -136
- package/dist/console-access.js +1 -1
- package/dist/credential/sql.js +2 -2
- package/dist/credential.js +90 -90
- package/dist/database/batch.js +1 -1
- package/dist/database/database.js +77 -77
- package/dist/database/drizzle/effect-sqlite/driver.js +12 -12
- package/dist/database/drizzle/effect-sqlite/index.js +12 -12
- package/dist/database/drizzle/effect-sqlite/session.js +11 -11
- package/dist/database/drizzle/index.js +13 -13
- package/dist/database/drizzle/internal/drizzle-utils.js +1 -1
- package/dist/database/drizzle/sqlite-core/effect/count.js +1 -1
- package/dist/database/drizzle/sqlite-core/effect/db.js +9 -9
- package/dist/database/drizzle/sqlite-core/effect/delete.js +2 -2
- package/dist/database/drizzle/sqlite-core/effect/index.js +10 -10
- package/dist/database/drizzle/sqlite-core/effect/insert.js +2 -2
- package/dist/database/drizzle/sqlite-core/effect/query.js +1 -1
- package/dist/database/drizzle/sqlite-core/effect/raw.js +1 -1
- package/dist/database/drizzle/sqlite-core/effect/select.js +2 -2
- package/dist/database/drizzle/sqlite-core/effect/session.js +10 -10
- package/dist/database/drizzle/sqlite-core/effect/update.js +2 -2
- package/dist/database/drizzle.js +14 -14
- package/dist/database/migration/20260127222353_familiar_lady_ursula.js +1 -1
- package/dist/database/migration/20260211171708_add_project_commands.js +1 -1
- package/dist/database/migration/20260213144116_wakeful_the_professor.js +1 -1
- package/dist/database/migration/20260225215848_workspace.js +1 -1
- package/dist/database/migration/20260227213759_add_session_workspace_id.js +1 -1
- package/dist/database/migration/20260228203230_blue_harpoon.js +1 -1
- package/dist/database/migration/20260303231226_add_workspace_fields.js +1 -1
- package/dist/database/migration/20260309230000_move_org_to_state.js +1 -1
- package/dist/database/migration/20260312043431_session_message_cursor.js +1 -1
- package/dist/database/migration/20260323234822_events.js +1 -1
- package/dist/database/migration/20260410174513_workspace-name.js +1 -1
- package/dist/database/migration/20260413175956_chief_energizer.js +1 -1
- package/dist/database/migration/20260423070820_add_icon_url_override.js +1 -1
- package/dist/database/migration/20260427172553_slow_nightmare.js +1 -1
- package/dist/database/migration/20260428004200_add_session_path.js +1 -1
- package/dist/database/migration/20260501142318_next_venus.js +1 -1
- package/dist/database/migration/20260504145000_add_sync_owner.js +1 -1
- package/dist/database/migration/20260507164347_add_workspace_time.js +1 -1
- package/dist/database/migration/20260510033149_session_usage.js +1 -1
- package/dist/database/migration/20260511000411_data_migration_state.js +1 -1
- package/dist/database/migration/20260511173437_session-metadata.js +1 -1
- package/dist/database/migration/20260601010001_normalize_storage_paths.js +1 -1
- package/dist/database/migration/20260601202201_amazing_prowler.js +1 -1
- package/dist/database/migration/20260602002951_lowly_union_jack.js +1 -1
- package/dist/database/migration/20260602182828_add_project_directories.js +1 -1
- package/dist/database/migration/20260603001617_session_message_projection_indexes.js +1 -1
- package/dist/database/migration/20260603040000_session_message_projection_order.js +1 -1
- package/dist/database/migration/20260603141458_session_input_inbox.js +1 -1
- package/dist/database/migration/20260603160727_jittery_ezekiel_stane.js +1 -1
- package/dist/database/migration/20260604172448_event_sourced_session_input.js +1 -1
- package/dist/database/migration/20260605003541_add_session_context_snapshot.js +1 -1
- package/dist/database/migration/20260605042240_add_context_epoch_agent.js +1 -1
- package/dist/database/migration/20260611035744_credential.js +1 -1
- package/dist/database/migration/20260611192811_lush_chimera.js +1 -1
- package/dist/database/migration/20260612174303_project_dir_strategy.js +1 -1
- package/dist/database/migration/20260622142730_simplify_session_context_epoch.js +1 -1
- package/dist/database/migration/20260622170816_reset_v2_session_state.js +1 -1
- package/dist/database/migration/20260622202450_simplify_session_input.js +1 -1
- package/dist/database/migration/20260804233008_loose_psylocke.js +1 -1
- package/dist/database/migration/20260805200742_import_legacy_credentials.js +1 -1
- package/dist/database/migration/20260808023530_workspace_domain.js +1 -1
- package/dist/database/migration/20260811161259_execution_claim_attempts.js +1 -1
- package/dist/database/migration/20260812181746_session_inbox.js +1 -1
- package/dist/database/migration/20260812213948_worktree.js +1 -1
- package/dist/database/migration/20260819222447_session_viewed_state.js +1 -1
- package/dist/database/migration/20260823191254_nullable_workspace_binding.js +1 -1
- package/dist/database/migration/20260910120000_clear_v1_session_permission.js +1 -1
- package/dist/database/migration/20260923013825_project_time_active.js +1 -1
- package/dist/database/migration/20261007190000_azure_cli_external_credential.js +1 -1
- package/dist/database/migration/20261010180456_project_time_archived.js +1 -1
- package/dist/database/migration/20261024002554_session_allowance.js +1 -1
- package/dist/database/migration/20261024175301_drop_session_allowance.js +1 -1
- package/dist/database/migration/20261025123711_blob.js +1 -1
- package/dist/database/migration/20261025154125_drop_session_pending.js +1 -1
- package/dist/database/migration/20261026223005_schedule.js +1 -1
- package/dist/database/migration/20261029002625_session_part.js +1 -1
- package/dist/database/migration/20261029073502_session_time_busy.js +1 -1
- package/dist/database/migration/20261029165540_schedule_checks.js +1 -1
- package/dist/database/migration/20261030054400_job.js +1 -1
- package/dist/database/migration.gen.js +60 -60
- package/dist/database/migration.js +76 -76
- package/dist/database/path.js +2 -2
- package/dist/database/schema.gen.js +1 -1
- package/dist/database/schema.sql.js +1 -1
- package/dist/database/v1-migration.bun.js +98 -98
- package/dist/effect/app-node-builder.js +442 -442
- package/dist/effect/app-node-platform.js +2 -2
- package/dist/effect/keyed-mutex.js +1 -1
- package/dist/effect/websocket-constructor.js +1 -1
- package/dist/environment/driver.js +1 -1
- package/dist/environment/environment.js +105 -105
- package/dist/environment/exec-defaults.js +2 -2
- package/dist/environment/files.js +1 -1
- package/dist/environment/index.js +107 -107
- package/dist/environment/local.js +2 -2
- package/dist/environment/memory.js +2 -2
- package/dist/environment/unavailable.js +1 -1
- package/dist/event/sql.js +1 -1
- package/dist/event-logger.js +81 -81
- package/dist/file-access.js +161 -161
- package/dist/file-mutation.js +108 -108
- package/dist/file-retention.js +1 -1
- package/dist/file-write.js +165 -165
- package/dist/filesystem/fff.bun.js +2 -2
- package/dist/filesystem/fff.js +1 -1
- package/dist/filesystem/fff.node.js +2 -2
- package/dist/filesystem/fff.workerd.js +2 -2
- package/dist/filesystem/file-watch.js +88 -88
- package/dist/filesystem/location-watcher-policy.js +6 -6
- package/dist/filesystem/location-watcher.js +255 -255
- package/dist/filesystem/protected.js +1 -1
- package/dist/filesystem/search.js +113 -113
- package/dist/filesystem/watcher-binding.js +1 -1
- package/dist/filesystem/watcher.js +11 -11
- package/dist/filesystem.js +118 -118
- package/dist/flag.js +136 -136
- package/dist/form.js +87 -87
- package/dist/formatter/builtins.js +4 -4
- package/dist/formatter.js +100 -100
- package/dist/generate.js +123 -123
- package/dist/git.js +7 -7
- package/dist/github-copilot/models.js +113 -113
- package/dist/image/notice.js +3 -3
- package/dist/image/photon-normalize.js +1 -1
- package/dist/image/photon-worker.js +1 -1
- package/dist/image/photon.js +4 -4
- package/dist/image.js +6 -6
- package/dist/instance/service.js +5 -5
- package/dist/instance.js +433 -433
- package/dist/instruction-discovery.js +95 -95
- package/dist/instructions/builtins.js +100 -100
- package/dist/instructions/index.js +3 -3
- package/dist/integration/connection.js +3 -3
- package/dist/integration.js +96 -96
- package/dist/job/list.js +5 -5
- package/dist/job/recovery.js +2 -2
- package/dist/job/sql.js +2 -2
- package/dist/job.js +90 -90
- package/dist/kv/sql.js +2 -2
- package/dist/kv.js +84 -84
- package/dist/location-activity.js +183 -183
- package/dist/location-lifecycle.js +154 -154
- package/dist/location-service-map.js +99 -99
- package/dist/location-services.js +430 -430
- package/dist/location.js +102 -102
- package/dist/managed-policy.js +3 -3
- package/dist/mcp/client.js +162 -161
- package/dist/mcp/connection.js +106 -106
- package/dist/mcp/index.js +126 -126
- package/dist/mcp/instructions.js +188 -188
- package/dist/mcp/oauth.js +219 -264
- package/dist/mcp/pool.js +112 -112
- package/dist/mcp/socket-client.js +1 -1
- package/dist/mcp/stdio.js +158 -158
- package/dist/mime.js +1 -1
- package/dist/modal/models.js +113 -113
- package/dist/model-resolver.js +113 -113
- package/dist/model-retry.js +1 -1
- package/dist/model.js +104 -104
- package/dist/models-dev/v1.js +1 -1
- package/dist/models-dev.js +122 -122
- package/dist/oauth/page.js +1 -1
- package/dist/permission/saved.js +93 -93
- package/dist/permission/sql.js +5 -5
- package/dist/permission.js +155 -155
- package/dist/persistent-pty/binary.bun.js +1 -1
- package/dist/persistent-pty/daemon.js +1 -1
- package/dist/persistent-pty/index.js +99 -99
- package/dist/persistent-pty/pty-binding.js +1 -1
- package/dist/persistent-pty.js +86 -86
- package/dist/plugin/agent.js +87 -87
- package/dist/plugin/command.js +119 -119
- package/dist/plugin/goal.js +3 -3
- package/dist/plugin/hooks.js +5 -5
- package/dist/plugin/host.js +246 -246
- package/dist/plugin/identity.js +5 -5
- package/dist/plugin/instance.js +1 -1
- package/dist/plugin/internal.js +409 -409
- package/dist/plugin/mcp-codemode-defaults.js +3 -3
- package/dist/plugin/models-dev.js +111 -111
- package/dist/plugin/module.js +130 -130
- package/dist/plugin/optimize.js +4 -4
- package/dist/plugin/plan.js +150 -150
- package/dist/plugin/promise.js +1 -1
- package/dist/plugin/provider/amazon-bedrock.js +107 -107
- package/dist/plugin/provider/azure.js +134 -134
- package/dist/plugin/provider/cerebras.js +1 -1
- package/dist/plugin/provider/chatgpt.js +134 -134
- package/dist/plugin/provider/claude-agent/aisdk.js +118 -118
- package/dist/plugin/provider/claude-agent/claude/fork.js +2 -2
- package/dist/plugin/provider/claude-agent/claude/io.js +4 -4
- package/dist/plugin/provider/claude-agent/claude/probe.js +2 -2
- package/dist/plugin/provider/claude-agent/claude/query-options.js +4 -4
- package/dist/plugin/provider/claude-agent/claude/sdk.js +3 -3
- package/dist/plugin/provider/claude-agent/claude/session.js +4 -4
- package/dist/plugin/provider/claude-agent/claude/sessions.js +16 -16
- package/dist/plugin/provider/claude-agent/claude/status.js +9 -9
- package/dist/plugin/provider/claude-agent/index.js +149 -149
- package/dist/plugin/provider/claude-agent/instructions.js +113 -113
- package/dist/plugin/provider/claude-agent/integration.js +116 -116
- package/dist/plugin/provider/claude-agent/language-model/claude-agent-error.js +3 -3
- package/dist/plugin/provider/claude-agent/language-model/claude-agent-language-model.js +7 -7
- package/dist/plugin/provider/claude-agent/language-model/convert-claude-stream.js +6 -6
- package/dist/plugin/provider/claude-agent/language-model/convert-to-claude-message.js +1 -1
- package/dist/plugin/provider/claude-agent/language-model/request-kind.js +1 -1
- package/dist/plugin/provider/claude-agent/language-model/system-prompt.js +3 -3
- package/dist/plugin/provider/claude-agent/language-model/usage.js +3 -3
- package/dist/plugin/provider/claude-agent/provider.js +111 -111
- package/dist/plugin/provider/claude-agent/session.js +113 -113
- package/dist/plugin/provider/claude-agent/sync/catch-up.js +3 -3
- package/dist/plugin/provider/claude-agent/sync/checkpoints.js +2 -2
- package/dist/plugin/provider/claude-agent/sync/decide.js +2 -2
- package/dist/plugin/provider/claude-agent/sync/fingerprint.js +1 -1
- package/dist/plugin/provider/claude-agent/sync/record.js +3 -3
- package/dist/plugin/provider/claude-agent/tools/hooks.js +3 -3
- package/dist/plugin/provider/claude-agent/tools/names.js +1 -1
- package/dist/plugin/provider/claude-agent/tools/pending.js +3 -3
- package/dist/plugin/provider/claude-agent/tools/result.js +3 -3
- package/dist/plugin/provider/claude-agent/tools/server.js +4 -4
- package/dist/plugin/provider/cloudflare-ai-gateway.js +131 -131
- package/dist/plugin/provider/cloudflare-workers-ai.js +131 -131
- package/dist/plugin/provider/configured.js +127 -127
- package/dist/plugin/provider/credential-settings.js +88 -88
- package/dist/plugin/provider/databricks.js +1 -1
- package/dist/plugin/provider/digitalocean.js +110 -110
- package/dist/plugin/provider/dynamic.js +2 -2
- package/dist/plugin/provider/github-copilot.js +112 -112
- package/dist/plugin/provider/gitlab.js +110 -110
- package/dist/plugin/provider/google-vertex.js +128 -128
- package/dist/plugin/provider/kilo.js +1 -1
- package/dist/plugin/provider/llmgateway.js +89 -89
- package/dist/plugin/provider/lmstudio.js +141 -141
- package/dist/plugin/provider/local.js +138 -138
- package/dist/plugin/provider/modal.js +109 -109
- package/dist/plugin/provider/neon.js +1 -1
- package/dist/plugin/provider/nvidia.js +1 -1
- package/dist/plugin/provider/ollama.js +141 -141
- package/dist/plugin/provider/openai-context-caps.js +107 -107
- package/dist/plugin/provider/openai.js +136 -136
- package/dist/plugin/provider/opencode-watches.js +4 -4
- package/dist/plugin/provider/opencode.js +162 -162
- package/dist/plugin/provider/openrouter.js +105 -105
- package/dist/plugin/provider/poe.js +90 -90
- package/dist/plugin/provider/prompt-cache-key.js +1 -1
- package/dist/plugin/provider/refresh.js +87 -87
- package/dist/plugin/provider/sap-ai-core.js +105 -105
- package/dist/plugin/provider/sdk-factory.js +1 -1
- package/dist/plugin/provider/snowflake-cortex.js +132 -132
- package/dist/plugin/provider/vllm.js +141 -141
- package/dist/plugin/provider/xai.js +105 -105
- package/dist/plugin/provider/zenmux.js +1 -1
- package/dist/plugin/provider.js +240 -240
- package/dist/plugin/sdk.js +89 -89
- package/dist/plugin/service.js +3 -3
- package/dist/plugin/skill.js +153 -153
- package/dist/plugin/source-directory.js +1 -1
- package/dist/plugin/supervisor.js +419 -419
- package/dist/plugin/tool-input-repair.js +4 -4
- package/dist/plugin/update.js +6 -6
- package/dist/plugin/vcs/git.js +99 -99
- package/dist/plugin/vcs/hg.js +99 -99
- package/dist/plugin/verbosity.js +107 -107
- package/dist/plugin/warming.js +131 -131
- package/dist/plugin/websearch/exa.js +8 -8
- package/dist/plugin/websearch/firecrawl.js +9 -9
- package/dist/plugin/websearch/index.js +10 -10
- package/dist/plugin/websearch/mcp.js +4 -4
- package/dist/plugin/websearch/parallel.js +7 -7
- package/dist/plugin/websearch/provider.js +3 -3
- package/dist/plugin/websearch/tavily.js +7 -7
- package/dist/plugin/websearch/tinyfish.js +7 -7
- package/dist/plugin.js +255 -255
- package/dist/project/icon.js +5 -5
- package/dist/project/schema.js +2 -2
- package/dist/project/sql.js +4 -4
- package/dist/project.js +93 -93
- package/dist/provider.js +103 -103
- package/dist/pty/protocol.js +1 -1
- package/dist/pty/ticket.js +1 -1
- package/dist/pty.js +113 -113
- package/dist/reference/instructions.js +101 -101
- package/dist/reference.js +103 -103
- package/dist/repository-cache.js +93 -93
- package/dist/repository.js +1 -1
- package/dist/ripgrep/binary.js +2 -2
- package/dist/ripgrep.js +111 -111
- package/dist/rpc.js +99 -99
- package/dist/schedule/check.js +251 -251
- package/dist/schedule/sql.js +6 -6
- package/dist/schedule.js +261 -261
- package/dist/schema.js +1 -1
- package/dist/session/affinity.js +1 -1
- package/dist/session/background.js +1 -1
- package/dist/session/blob.js +133 -133
- package/dist/session/command.js +85 -85
- package/dist/session/compaction.js +176 -176
- package/dist/session/context.js +206 -206
- package/dist/session/diff.js +101 -101
- package/dist/session/environment.js +3 -3
- package/dist/session/error.js +5 -5
- package/dist/session/event.js +1 -1
- package/dist/session/execution/restart.js +269 -269
- package/dist/session/execution.js +172 -172
- package/dist/session/generate.js +208 -208
- package/dist/session/history.js +140 -140
- package/dist/session/inbox.js +153 -153
- package/dist/session/info.js +3 -3
- package/dist/session/instruction-entry.js +90 -90
- package/dist/session/instruction-state.js +8 -8
- package/dist/session/instructions.js +145 -145
- package/dist/session/message-updater.js +2 -2
- package/dist/session/message.js +1 -1
- package/dist/session/model-request.js +170 -170
- package/dist/session/model-transport.js +7 -7
- package/dist/session/move.js +172 -172
- package/dist/session/projector.js +147 -147
- package/dist/session/prompt.js +152 -152
- package/dist/session/recent-text.js +1 -1
- package/dist/session/revert.js +143 -143
- package/dist/session/run-coordinator.js +1 -1
- package/dist/session/runner/index.js +3 -3
- package/dist/session/runner/llm.js +259 -259
- package/dist/session/runner/max-steps.js +1 -1
- package/dist/session/runner/model.js +115 -115
- package/dist/session/runner/publish-llm-event.js +154 -154
- package/dist/session/runner/retry.js +5 -5
- package/dist/session/runner/step.js +165 -165
- package/dist/session/runner/to-llm-message.js +141 -141
- package/dist/session/schema.js +5 -5
- package/dist/session/session.js +192 -192
- package/dist/session/shell.js +149 -149
- package/dist/session/skill.js +151 -151
- package/dist/session/sql.js +5 -5
- package/dist/session/stats.js +85 -85
- package/dist/session/store.js +146 -146
- package/dist/session/stored.js +2 -2
- package/dist/session/subagent-completion.js +3 -3
- package/dist/session/subagent-job.js +242 -242
- package/dist/session/system-prompt.js +5 -5
- package/dist/session/title.js +208 -208
- package/dist/session/to-session-error.js +153 -153
- package/dist/session/transfer.js +249 -249
- package/dist/session/usage.js +1 -1
- package/dist/session.js +246 -246
- package/dist/shared-cache.js +5 -5
- package/dist/shell/parse.js +6 -6
- package/dist/shell/result.js +1 -1
- package/dist/shell/scan.js +1 -1
- package/dist/shell/select.js +15 -15
- package/dist/shell.js +147 -147
- package/dist/skill/discovery.js +2 -2
- package/dist/skill/instructions.js +153 -153
- package/dist/skill.js +160 -160
- package/dist/snapshot.js +104 -104
- package/dist/state.js +1 -1
- package/dist/tool/html-markdown.js +1 -1
- package/dist/tool/http-body.js +1 -1
- package/dist/tool/mcp.js +187 -187
- package/dist/tool/plugin/artifact.js +241 -241
- package/dist/tool/plugin/edit.js +171 -171
- package/dist/tool/plugin/file-diff.js +1 -1
- package/dist/tool/plugin/glob.js +175 -175
- package/dist/tool/plugin/grep.js +172 -172
- package/dist/tool/plugin/image-generate.js +252 -252
- package/dist/tool/plugin/mcp-resource.js +170 -170
- package/dist/tool/plugin/opencode.js +167 -167
- package/dist/tool/plugin/patch.js +172 -172
- package/dist/tool/plugin/question.js +148 -148
- package/dist/tool/plugin/read.js +174 -174
- package/dist/tool/plugin/schedule.js +257 -257
- package/dist/tool/plugin/shell.js +248 -248
- package/dist/tool/plugin/skill.js +161 -161
- package/dist/tool/plugin/subagent.js +249 -249
- package/dist/tool/plugin/todo.js +157 -157
- package/dist/tool/plugin/webfetch.js +153 -153
- package/dist/tool/plugin/websearch.js +157 -157
- package/dist/tool/plugin/write.js +172 -172
- package/dist/tool/read-filesystem.js +116 -116
- package/dist/tool/runtime.js +1 -1
- package/dist/tool/search.js +109 -109
- package/dist/tool-output.js +7 -7
- package/dist/tool.js +166 -166
- package/dist/types/credential.d.ts +2 -2
- package/dist/types/mcp/client.d.ts +3 -3
- package/dist/types/mcp/connection.d.ts +2 -2
- package/dist/types/mcp/oauth.d.ts +7 -6
- package/dist/types/mcp/pool.d.ts +2 -2
- package/dist/types/plugin/provider/local.d.ts +2 -0
- package/dist/usage-limits.js +100 -100
- package/dist/util/error-summary.js +1 -1
- package/dist/util/git-executable.js +3 -3
- package/dist/util/lazy.js +1 -1
- package/dist/util/slug.js +1 -1
- package/dist/util/token.js +1 -1
- package/dist/util/which.js +1 -1
- package/dist/util/wildcard.js +1 -1
- package/dist/v1/config/agent.js +5 -5
- package/dist/v1/config/command.js +3 -3
- package/dist/v1/config/mcp.js +4 -4
- package/dist/v1/config/migrate.js +106 -106
- package/dist/v1/config/permission.js +3 -3
- package/dist/v1/config/plugin.js +3 -3
- package/dist/v1/config/provider-options.js +1 -1
- package/dist/v1/config/provider.js +4 -4
- package/dist/variant.js +107 -107
- package/dist/vcs/patch.js +1 -1
- package/dist/vcs.js +102 -102
- package/dist/voice.js +99 -99
- package/dist/websearch.js +91 -91
- package/dist/wellknown/plugin.js +87 -87
- package/dist/wellknown.js +92 -92
- package/dist/workspace/driver.js +7 -7
- package/dist/workspace/sql.js +1 -1
- package/dist/workspace.js +93 -93
- package/dist/worktree/directory.js +2 -2
- package/dist/worktree/git.js +11 -11
- package/dist/worktree/sql.js +5 -5
- package/dist/worktree/strategies.js +102 -102
- package/dist/worktree.js +113 -113
- package/package.json +8 -8
- package/dist/chunks/filesystem-1xjver7d.js +0 -16
- package/dist/chunks/filesystem-1ywg999t.js +0 -273
- package/dist/chunks/filesystem-f8ma18fn.js +0 -18
- package/dist/chunks/filesystem-kwjwsaah.js +0 -26
- /package/dist/chunks/{filesystem-0qkdqm5v.js → schema-0qkdqm5v.js} +0 -0
- /package/dist/chunks/{filesystem-0zkw76rk.js → schema-0zkw76rk.js} +0 -0
- /package/dist/chunks/{filesystem-17cy0kzp.js → schema-17cy0kzp.js} +0 -0
- /package/dist/chunks/{filesystem-1cnp2v09.js → schema-1cnp2v09.js} +0 -0
- /package/dist/chunks/{filesystem-1kah00gy.js → schema-1kah00gy.js} +0 -0
- /package/dist/chunks/{filesystem-24dcb14g.js → schema-24dcb14g.js} +0 -0
- /package/dist/chunks/{filesystem-2710q6r3.js → schema-2710q6r3.js} +0 -0
- /package/dist/chunks/{filesystem-2c3vjs8z.js → schema-2c3vjs8z.js} +0 -0
- /package/dist/chunks/{filesystem-359p4xyc.js → schema-359p4xyc.js} +0 -0
- /package/dist/chunks/{filesystem-3v8g72cx.js → schema-3v8g72cx.js} +0 -0
- /package/dist/chunks/{filesystem-43n2bw4t.js → schema-43n2bw4t.js} +0 -0
- /package/dist/chunks/{filesystem-4knz6hnm.js → schema-4knz6hnm.js} +0 -0
- /package/dist/chunks/{filesystem-4qk9sjk2.js → schema-4qk9sjk2.js} +0 -0
- /package/dist/chunks/{filesystem-53557ph1.js → schema-53557ph1.js} +0 -0
- /package/dist/chunks/{filesystem-5w3e23ze.js → schema-5w3e23ze.js} +0 -0
- /package/dist/chunks/{filesystem-6agm2x70.js → schema-6agm2x70.js} +0 -0
- /package/dist/chunks/{filesystem-6prwharc.js → schema-6prwharc.js} +0 -0
- /package/dist/chunks/{filesystem-6q2bdcd1.js → schema-6q2bdcd1.js} +0 -0
- /package/dist/chunks/{filesystem-7akdwqpd.js → schema-7akdwqpd.js} +0 -0
- /package/dist/chunks/{filesystem-7m9af43g.js → schema-7m9af43g.js} +0 -0
- /package/dist/chunks/{filesystem-7rvsyqjv.js → schema-7rvsyqjv.js} +0 -0
- /package/dist/chunks/{filesystem-822emrt2.js → schema-822emrt2.js} +0 -0
- /package/dist/chunks/{filesystem-84wd9syh.js → schema-84wd9syh.js} +0 -0
- /package/dist/chunks/{filesystem-88xbtdfr.js → schema-88xbtdfr.js} +0 -0
- /package/dist/chunks/{filesystem-8n3pysct.js → schema-8n3pysct.js} +0 -0
- /package/dist/chunks/{filesystem-8wj87zfr.js → schema-8wj87zfr.js} +0 -0
- /package/dist/chunks/{filesystem-9a4afbnw.js → schema-9a4afbnw.js} +0 -0
- /package/dist/chunks/{filesystem-9rqn6x4v.js → schema-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{filesystem-aqzs7mqg.js → schema-aqzs7mqg.js} +0 -0
- /package/dist/chunks/{filesystem-atq7p7m5.js → schema-atq7p7m5.js} +0 -0
- /package/dist/chunks/{filesystem-beh6qq61.js → schema-beh6qq61.js} +0 -0
- /package/dist/chunks/{filesystem-bkyjaxrp.js → schema-bkyjaxrp.js} +0 -0
- /package/dist/chunks/{filesystem-bmr6ed5q.js → schema-bmr6ed5q.js} +0 -0
- /package/dist/chunks/{filesystem-cf4snx6d.js → schema-cf4snx6d.js} +0 -0
- /package/dist/chunks/{filesystem-cqv5kn06.js → schema-cqv5kn06.js} +0 -0
- /package/dist/chunks/{filesystem-cvy3z8tj.js → schema-cvy3z8tj.js} +0 -0
- /package/dist/chunks/{filesystem-d9fn303g.js → schema-d9fn303g.js} +0 -0
- /package/dist/chunks/{filesystem-d9jj8t3e.js → schema-d9jj8t3e.js} +0 -0
- /package/dist/chunks/{filesystem-df08tz66.js → schema-df08tz66.js} +0 -0
- /package/dist/chunks/{filesystem-dy18nga0.js → schema-dy18nga0.js} +0 -0
- /package/dist/chunks/{filesystem-e5kj55wp.js → schema-e5kj55wp.js} +0 -0
- /package/dist/chunks/{filesystem-ean2d8b5.js → schema-ean2d8b5.js} +0 -0
- /package/dist/chunks/{filesystem-ec1grn59.js → schema-ec1grn59.js} +0 -0
- /package/dist/chunks/{filesystem-emrn6kk6.js → schema-emrn6kk6.js} +0 -0
- /package/dist/chunks/{filesystem-f0mxakyp.js → schema-f0mxakyp.js} +0 -0
- /package/dist/chunks/{filesystem-f6n9ztr4.js → schema-f6n9ztr4.js} +0 -0
- /package/dist/chunks/{filesystem-faypxj3z.js → schema-faypxj3z.js} +0 -0
- /package/dist/chunks/{filesystem-fd410y7t.js → schema-fd410y7t.js} +0 -0
- /package/dist/chunks/{filesystem-fkpq3x5p.js → schema-fkpq3x5p.js} +0 -0
- /package/dist/chunks/{filesystem-g86h250q.js → schema-g86h250q.js} +0 -0
- /package/dist/chunks/{filesystem-gebd4c9n.js → schema-gebd4c9n.js} +0 -0
- /package/dist/chunks/{filesystem-gftt206x.js → schema-gftt206x.js} +0 -0
- /package/dist/chunks/{filesystem-hcxmzztb.js → schema-hcxmzztb.js} +0 -0
- /package/dist/chunks/{filesystem-hk9envan.js → schema-hk9envan.js} +0 -0
- /package/dist/chunks/{filesystem-j2ntwpah.js → schema-j2ntwpah.js} +0 -0
- /package/dist/chunks/{filesystem-jjkms2e6.js → schema-jjkms2e6.js} +0 -0
- /package/dist/chunks/{filesystem-jr7sbwjy.js → schema-jr7sbwjy.js} +0 -0
- /package/dist/chunks/{filesystem-jwfs4k6c.js → schema-jwfs4k6c.js} +0 -0
- /package/dist/chunks/{filesystem-jwr30sdr.js → schema-jwr30sdr.js} +0 -0
- /package/dist/chunks/{filesystem-jzg6c2d5.js → schema-jzg6c2d5.js} +0 -0
- /package/dist/chunks/{filesystem-m18g726c.js → schema-m18g726c.js} +0 -0
- /package/dist/chunks/{filesystem-mp448xyj.js → schema-mp448xyj.js} +0 -0
- /package/dist/chunks/{filesystem-msx8hqn2.js → schema-msx8hqn2.js} +0 -0
- /package/dist/chunks/{filesystem-n05xt0ee.js → schema-n05xt0ee.js} +0 -0
- /package/dist/chunks/{filesystem-n3j8tn72.js → schema-n3j8tn72.js} +0 -0
- /package/dist/chunks/{filesystem-nh4v3znn.js → schema-nh4v3znn.js} +0 -0
- /package/dist/chunks/{filesystem-njntx4h6.js → schema-njntx4h6.js} +0 -0
- /package/dist/chunks/{filesystem-p71gwv9c.js → schema-p71gwv9c.js} +0 -0
- /package/dist/chunks/{filesystem-q3sfg36h.js → schema-q3sfg36h.js} +0 -0
- /package/dist/chunks/{filesystem-q74kybfr.js → schema-q74kybfr.js} +0 -0
- /package/dist/chunks/{filesystem-qb87gjwd.js → schema-qb87gjwd.js} +0 -0
- /package/dist/chunks/{filesystem-qfa1cgps.js → schema-qfa1cgps.js} +0 -0
- /package/dist/chunks/{filesystem-qg3g05ea.js → schema-qg3g05ea.js} +0 -0
- /package/dist/chunks/{filesystem-qrg20bc0.js → schema-qrg20bc0.js} +0 -0
- /package/dist/chunks/{filesystem-rcb2kzg1.js → schema-rcb2kzg1.js} +0 -0
- /package/dist/chunks/{filesystem-sdp7kfr6.js → schema-sdp7kfr6.js} +0 -0
- /package/dist/chunks/{filesystem-ssg3fenm.js → schema-ssg3fenm.js} +0 -0
- /package/dist/chunks/{filesystem-syrav9an.js → schema-syrav9an.js} +0 -0
- /package/dist/chunks/{filesystem-t03h4f5z.js → schema-t03h4f5z.js} +0 -0
- /package/dist/chunks/{filesystem-ty7weeps.js → schema-ty7weeps.js} +0 -0
- /package/dist/chunks/{filesystem-v2dnd5dt.js → schema-v2dnd5dt.js} +0 -0
- /package/dist/chunks/{filesystem-ve7vex1e.js → schema-ve7vex1e.js} +0 -0
- /package/dist/chunks/{filesystem-vtarvj67.js → schema-vtarvj67.js} +0 -0
- /package/dist/chunks/{filesystem-w803qqfp.js → schema-w803qqfp.js} +0 -0
- /package/dist/chunks/{filesystem-wc3fc9cn.js → schema-wc3fc9cn.js} +0 -0
- /package/dist/chunks/{filesystem-wer8tq1h.js → schema-wer8tq1h.js} +0 -0
- /package/dist/chunks/{filesystem-wtztk69x.js → schema-wtztk69x.js} +0 -0
- /package/dist/chunks/{filesystem-x4th4bpe.js → schema-x4th4bpe.js} +0 -0
- /package/dist/chunks/{filesystem-y44na4kk.js → schema-y44na4kk.js} +0 -0
- /package/dist/chunks/{filesystem-y8f7s663.js → schema-y8f7s663.js} +0 -0
- /package/dist/chunks/{filesystem-ygaqb7jw.js → schema-ygaqb7jw.js} +0 -0
- /package/dist/chunks/{filesystem-z5v4ffb3.js → schema-z5v4ffb3.js} +0 -0
- /package/dist/chunks/{filesystem-z9919s4g.js → schema-z9919s4g.js} +0 -0
- /package/dist/chunks/{filesystem-zxpyjp51.js → schema-zxpyjp51.js} +0 -0
- /package/dist/chunks/{filesystem-zz5vv3aq.js → schema-zz5vv3aq.js} +0 -0
package/dist/mcp/oauth.js
CHANGED
|
@@ -1,99 +1,100 @@
|
|
|
1
|
-
import"../chunks/
|
|
2
|
-
import"../chunks/
|
|
3
|
-
import"../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
9
|
-
import"../chunks/
|
|
10
|
-
import"../chunks/
|
|
11
|
-
import"../chunks/
|
|
12
|
-
import"../chunks/
|
|
13
|
-
import"../chunks/
|
|
14
|
-
import"../chunks/
|
|
15
|
-
import"../chunks/
|
|
16
|
-
import"../chunks/
|
|
17
|
-
import"../chunks/
|
|
18
|
-
import"../chunks/
|
|
19
|
-
import"../chunks/
|
|
20
|
-
import"../chunks/
|
|
21
|
-
import"../chunks/
|
|
22
|
-
import"../chunks/
|
|
23
|
-
import"../chunks/
|
|
24
|
-
import"../chunks/
|
|
25
|
-
import"../chunks/
|
|
26
|
-
import"../chunks/
|
|
27
|
-
import"../chunks/
|
|
28
|
-
import"../chunks/
|
|
29
|
-
import"../chunks/
|
|
30
|
-
import"../chunks/
|
|
31
|
-
import"../chunks/
|
|
32
|
-
import"../chunks/
|
|
33
|
-
import"../chunks/
|
|
34
|
-
import"../chunks/
|
|
35
|
-
import"../chunks/
|
|
36
|
-
import"../chunks/
|
|
37
|
-
import"../chunks/
|
|
38
|
-
import"../chunks/
|
|
39
|
-
import"../chunks/
|
|
40
|
-
import"../chunks/
|
|
41
|
-
import"../chunks/
|
|
42
|
-
import"../chunks/
|
|
43
|
-
import"../chunks/
|
|
44
|
-
import"../chunks/
|
|
45
|
-
import"../chunks/
|
|
46
|
-
import"../chunks/
|
|
47
|
-
import"../chunks/
|
|
48
|
-
import"../chunks/
|
|
49
|
-
import"../chunks/
|
|
50
|
-
import"../chunks/
|
|
51
|
-
import"../chunks/
|
|
52
|
-
import"../chunks/
|
|
53
|
-
import"../chunks/
|
|
54
|
-
import"../chunks/
|
|
55
|
-
import"../chunks/
|
|
56
|
-
import"../chunks/
|
|
57
|
-
import"../chunks/
|
|
58
|
-
import"../chunks/
|
|
59
|
-
import"../chunks/
|
|
60
|
-
import"../chunks/
|
|
61
|
-
import"../chunks/
|
|
62
|
-
import"../chunks/
|
|
63
|
-
import"../chunks/
|
|
64
|
-
import"../chunks/
|
|
65
|
-
import"../chunks/
|
|
66
|
-
import"../chunks/
|
|
67
|
-
import"../chunks/
|
|
68
|
-
import"../chunks/
|
|
69
|
-
import"../chunks/
|
|
70
|
-
import"../chunks/
|
|
71
|
-
import"../chunks/
|
|
72
|
-
import"../chunks/
|
|
73
|
-
import"../chunks/
|
|
74
|
-
import"../chunks/
|
|
75
|
-
import"../chunks/
|
|
76
|
-
import"../chunks/
|
|
77
|
-
import"../chunks/
|
|
78
|
-
import"../chunks/
|
|
79
|
-
import"../chunks/
|
|
80
|
-
import"../chunks/
|
|
81
|
-
import"../chunks/
|
|
82
|
-
import"../chunks/
|
|
1
|
+
import"../chunks/schema-f0mxakyp.js";
|
|
2
|
+
import"../chunks/schema-emrn6kk6.js";
|
|
3
|
+
import"../chunks/schema-w3wsvvr9.js";
|
|
4
|
+
import"../chunks/schema-7bmhse3q.js";
|
|
5
|
+
import"../chunks/schema-cf4snx6d.js";
|
|
6
|
+
import"../chunks/schema-822emrt2.js";
|
|
7
|
+
import"../chunks/schema-wd87259q.js";
|
|
8
|
+
import"../chunks/schema-m9w0rfyh.js";
|
|
9
|
+
import"../chunks/schema-7357t78n.js";
|
|
10
|
+
import"../chunks/schema-wgtjsce3.js";
|
|
11
|
+
import"../chunks/schema-040bqqk0.js";
|
|
12
|
+
import"../chunks/schema-1fqa7gdp.js";
|
|
13
|
+
import"../chunks/schema-g2183vvk.js";
|
|
14
|
+
import"../chunks/schema-0zkw76rk.js";
|
|
15
|
+
import"../chunks/schema-jzg6c2d5.js";
|
|
16
|
+
import"../chunks/schema-q3sfg36h.js";
|
|
17
|
+
import"../chunks/schema-1cnp2v09.js";
|
|
18
|
+
import"../chunks/schema-rcb2kzg1.js";
|
|
19
|
+
import"../chunks/schema-msx8hqn2.js";
|
|
20
|
+
import"../chunks/schema-bkyjaxrp.js";
|
|
21
|
+
import"../chunks/schema-g86h250q.js";
|
|
22
|
+
import"../chunks/schema-jr7sbwjy.js";
|
|
23
|
+
import"../chunks/schema-7m9af43g.js";
|
|
24
|
+
import"../chunks/schema-j2ntwpah.js";
|
|
25
|
+
import"../chunks/schema-njntx4h6.js";
|
|
26
|
+
import"../chunks/schema-qrg20bc0.js";
|
|
27
|
+
import"../chunks/schema-z9919s4g.js";
|
|
28
|
+
import"../chunks/schema-43n2bw4t.js";
|
|
29
|
+
import"../chunks/schema-n3j8tn72.js";
|
|
30
|
+
import"../chunks/schema-d9jj8t3e.js";
|
|
31
|
+
import"../chunks/schema-fd410y7t.js";
|
|
32
|
+
import"../chunks/schema-e5kj55wp.js";
|
|
33
|
+
import"../chunks/schema-f6n9ztr4.js";
|
|
34
|
+
import"../chunks/schema-q74kybfr.js";
|
|
35
|
+
import"../chunks/schema-53557ph1.js";
|
|
36
|
+
import"../chunks/schema-7akdwqpd.js";
|
|
37
|
+
import"../chunks/schema-wer8tq1h.js";
|
|
38
|
+
import"../chunks/schema-wtztk69x.js";
|
|
39
|
+
import"../chunks/schema-ssg3fenm.js";
|
|
40
|
+
import"../chunks/schema-2c3vjs8z.js";
|
|
41
|
+
import"../chunks/schema-17cy0kzp.js";
|
|
42
|
+
import"../chunks/schema-hk9envan.js";
|
|
43
|
+
import"../chunks/schema-w803qqfp.js";
|
|
44
|
+
import"../chunks/schema-jwfs4k6c.js";
|
|
45
|
+
import"../chunks/schema-mp448xyj.js";
|
|
46
|
+
import"../chunks/schema-aqzs7mqg.js";
|
|
47
|
+
import"../chunks/schema-ygaqb7jw.js";
|
|
48
|
+
import"../chunks/schema-8n3pysct.js";
|
|
49
|
+
import"../chunks/schema-d9fn303g.js";
|
|
50
|
+
import"../chunks/schema-cvy3z8tj.js";
|
|
51
|
+
import"../chunks/schema-9a4afbnw.js";
|
|
52
|
+
import"../chunks/schema-n05xt0ee.js";
|
|
53
|
+
import"../chunks/schema-sdp7kfr6.js";
|
|
54
|
+
import"../chunks/schema-zz5vv3aq.js";
|
|
55
|
+
import"../chunks/schema-4knz6hnm.js";
|
|
56
|
+
import"../chunks/schema-df08tz66.js";
|
|
57
|
+
import"../chunks/schema-bmr6ed5q.js";
|
|
58
|
+
import"../chunks/schema-atq7p7m5.js";
|
|
59
|
+
import"../chunks/schema-qb87gjwd.js";
|
|
60
|
+
import"../chunks/schema-359p4xyc.js";
|
|
61
|
+
import"../chunks/schema-y8f7s663.js";
|
|
62
|
+
import"../chunks/schema-8wj87zfr.js";
|
|
63
|
+
import"../chunks/schema-84wd9syh.js";
|
|
64
|
+
import"../chunks/schema-m18g726c.js";
|
|
65
|
+
import"../chunks/schema-cqv5kn06.js";
|
|
66
|
+
import"../chunks/schema-jwr30sdr.js";
|
|
67
|
+
import"../chunks/schema-fkpq3x5p.js";
|
|
68
|
+
import"../chunks/schema-5w3e23ze.js";
|
|
69
|
+
import"../chunks/schema-nh4v3znn.js";
|
|
70
|
+
import"../chunks/schema-ty7weeps.js";
|
|
71
|
+
import"../chunks/schema-1kah00gy.js";
|
|
72
|
+
import"../chunks/schema-t03h4f5z.js";
|
|
73
|
+
import"../chunks/schema-vtarvj67.js";
|
|
74
|
+
import"../chunks/schema-894qcq1y.js";
|
|
75
|
+
import"../chunks/schema-6agm2x70.js";
|
|
76
|
+
import"../chunks/schema-yj5p50qd.js";
|
|
77
|
+
import"../chunks/schema-z583g8kc.js";
|
|
78
|
+
import"../chunks/schema-2710q6r3.js";
|
|
79
|
+
import"../chunks/schema-5whx36p1.js";
|
|
80
|
+
import"../chunks/schema-ayevjdp6.js";
|
|
81
|
+
import"../chunks/schema-qfa1cgps.js";
|
|
82
|
+
import"../chunks/schema-pknna89w.js";
|
|
83
83
|
import {
|
|
84
84
|
from2
|
|
85
|
-
} from "../chunks/
|
|
85
|
+
} from "../chunks/schema-m1714858.js";
|
|
86
86
|
import {
|
|
87
87
|
OAuth3,
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
expiring2,
|
|
89
|
+
Service88
|
|
90
|
+
} from "../chunks/schema-93f9eha0.js";
|
|
90
91
|
import {
|
|
91
92
|
success2,
|
|
92
93
|
error2
|
|
93
|
-
} from "../chunks/
|
|
94
|
+
} from "../chunks/schema-yb20nhc3.js";
|
|
94
95
|
import {
|
|
95
96
|
__export
|
|
96
|
-
} from "../chunks/
|
|
97
|
+
} from "../chunks/schema-9rqn6x4v.js";
|
|
97
98
|
|
|
98
99
|
// src/mcp/oauth.ts
|
|
99
100
|
var exports_oauth = {};
|
|
@@ -109,57 +110,36 @@ import {
|
|
|
109
110
|
auth,
|
|
110
111
|
LATEST_PROTOCOL_VERSION,
|
|
111
112
|
checkResourceAllowed,
|
|
113
|
+
discoverAuthorizationServerMetadata,
|
|
112
114
|
discoverOAuthServerInfo,
|
|
113
115
|
extractWWWAuthenticateParams,
|
|
116
|
+
OAuthError,
|
|
117
|
+
OAuthErrorCode,
|
|
114
118
|
parseErrorResponse,
|
|
119
|
+
refreshAuthorization,
|
|
115
120
|
resourceUrlFromServerUrl,
|
|
116
121
|
UnauthorizedError
|
|
117
122
|
} from "@modelcontextprotocol/client";
|
|
118
|
-
import {
|
|
119
|
-
|
|
120
|
-
OAuthTokensSchema,
|
|
121
|
-
OpenIdProviderDiscoveryMetadataSchema
|
|
122
|
-
} from "@modelcontextprotocol/core";
|
|
123
|
-
import { Cause, Data, Deferred, Effect, Option, Schema } from "effect";
|
|
123
|
+
import { OAuthMetadataSchema, OpenIdProviderDiscoveryMetadataSchema } from "@modelcontextprotocol/core";
|
|
124
|
+
import { Cause, Clock, Data, Deferred, Duration, Effect, Option, Schema } from "effect";
|
|
124
125
|
import { FetchHttpClient } from "effect/http";
|
|
125
126
|
var CLIENT_METADATA_URL = "https://opencode.ai/oauth/opencode/client.json";
|
|
126
|
-
var refreshes = new Map;
|
|
127
|
-
var lockedRefreshes = new WeakMap;
|
|
128
|
-
var decodeJson = Schema.decodeUnknownOption(Schema.fromJsonString(Schema.Unknown));
|
|
129
127
|
|
|
130
128
|
class RefreshRejected extends Data.TaggedError("McpOAuth.RefreshRejected") {
|
|
131
129
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
const send = (url, init) => {
|
|
143
|
-
const key = refreshKey(url, init);
|
|
144
|
-
if (key === undefined)
|
|
145
|
-
return base(url, init);
|
|
146
|
-
if (refresh && init?.body instanceof URLSearchParams)
|
|
147
|
-
return refresh(base, url, init, init.body.get("refresh_token") ?? "");
|
|
148
|
-
const current = refreshes.get(key);
|
|
149
|
-
if (current)
|
|
150
|
-
return share(current);
|
|
151
|
-
const pending = base(url, init).finally(() => {
|
|
152
|
-
if (refreshes.get(key) === pending)
|
|
153
|
-
refreshes.delete(key);
|
|
154
|
-
});
|
|
155
|
-
refreshes.set(key, pending);
|
|
156
|
-
return share(pending);
|
|
157
|
-
};
|
|
158
|
-
return send;
|
|
159
|
-
});
|
|
160
|
-
var loggedFetch = (fields, provider) => Effect.gen(function* () {
|
|
130
|
+
|
|
131
|
+
class IssuerChanged extends Data.TaggedError("McpOAuth.IssuerChanged") {
|
|
132
|
+
}
|
|
133
|
+
var REFRESH_AHEAD = Duration.seconds(30);
|
|
134
|
+
var rejections = new Set([
|
|
135
|
+
OAuthErrorCode.InvalidGrant,
|
|
136
|
+
OAuthErrorCode.InvalidClient,
|
|
137
|
+
OAuthErrorCode.UnauthorizedClient
|
|
138
|
+
]);
|
|
139
|
+
var loggedFetch = (fields) => Effect.gen(function* () {
|
|
161
140
|
const run = Effect.runPromiseWith(yield* Effect.context());
|
|
162
|
-
const
|
|
141
|
+
const fetch = yield* FetchHttpClient.Fetch;
|
|
142
|
+
const send = (url, init) => fetch(url, { ...init, timeout: false });
|
|
163
143
|
const request = (url, init) => {
|
|
164
144
|
const grant = init?.body instanceof URLSearchParams ? init.body.get("grant_type") : undefined;
|
|
165
145
|
const operation = grant === "refresh_token" ? "refresh" : grant === "authorization_code" ? "exchange" : undefined;
|
|
@@ -222,34 +202,18 @@ var provider = (options) => {
|
|
|
222
202
|
const oauth = options.config.oauth || undefined;
|
|
223
203
|
const client = oauth?.client_id ? { client_id: oauth.client_id, client_secret: oauth.client_secret } : undefined;
|
|
224
204
|
const redirect = options.redirect;
|
|
225
|
-
const redirectUrl = redirect?.url ?? oauth?.redirect_uri ?? "http://127.0.0.1/callback";
|
|
226
|
-
const refuse = (what) => new UnauthorizedError(`MCP server "${options.config.url}" requires ${what}`);
|
|
227
|
-
const identity = new URL(options.config.url);
|
|
228
|
-
identity.hash = "";
|
|
229
205
|
let discovery = options.discovery;
|
|
230
206
|
return {
|
|
231
|
-
redirectUrl,
|
|
232
|
-
discoveryState: async () =>
|
|
233
|
-
discovery ??= await configuredDiscovery({ config: options.config, fetchFn: options.fetch });
|
|
234
|
-
return discovery;
|
|
235
|
-
},
|
|
207
|
+
redirectUrl: redirect.url,
|
|
208
|
+
discoveryState: async () => discovery,
|
|
236
209
|
saveDiscoveryState: (state) => {
|
|
237
210
|
discovery = state;
|
|
238
211
|
},
|
|
239
|
-
validateResourceURL: async (_serverUrl, resource) =>
|
|
240
|
-
if (!resource)
|
|
241
|
-
return identity;
|
|
242
|
-
if (!checkResourceAllowed({ requestedResource: identity, configuredResource: resource }))
|
|
243
|
-
throw new Error(`Protected resource ${resource} does not cover ${identity}`);
|
|
244
|
-
const canonical = new URL(resource);
|
|
245
|
-
if (canonical.origin === identity.origin && canonical.pathname === identity.pathname)
|
|
246
|
-
return identity;
|
|
247
|
-
return canonical;
|
|
248
|
-
},
|
|
212
|
+
validateResourceURL: async (_serverUrl, resource) => selectResource(options.config, resource),
|
|
249
213
|
...options.clientMetadataUrl ? { clientMetadataUrl: options.clientMetadataUrl } : {},
|
|
250
|
-
|
|
214
|
+
state: () => redirect.state,
|
|
251
215
|
clientMetadata: {
|
|
252
|
-
redirect_uris: [
|
|
216
|
+
redirect_uris: [redirect.url],
|
|
253
217
|
client_name: "opencode",
|
|
254
218
|
client_uri: "https://opencode.ai",
|
|
255
219
|
logo_uri: "https://opencode.ai/web-app-manifest-512x512.png",
|
|
@@ -258,25 +222,15 @@ var provider = (options) => {
|
|
|
258
222
|
token_endpoint_auth_method: client?.client_secret ? "client_secret_post" : "none",
|
|
259
223
|
...oauth?.scope ? { scope: oauth.scope } : {}
|
|
260
224
|
},
|
|
261
|
-
clientInformation: async () =>
|
|
262
|
-
if (client)
|
|
263
|
-
return client;
|
|
264
|
-
const stored = await options.store.clientInformation();
|
|
265
|
-
if (!stored && !redirect)
|
|
266
|
-
throw refuse("a login before it can register a client");
|
|
267
|
-
return stored;
|
|
268
|
-
},
|
|
225
|
+
clientInformation: async () => client ?? await options.store.clientInformation(),
|
|
269
226
|
saveClientInformation: (info) => options.store.saveClientInformation(info),
|
|
270
227
|
tokens: () => options.store.tokens(),
|
|
271
228
|
saveTokens: (tokens) => options.store.saveTokens(tokens),
|
|
272
229
|
redirectToAuthorization: (url) => {
|
|
273
|
-
if (!redirect)
|
|
274
|
-
throw refuse("user authorization");
|
|
275
230
|
if (url.protocol !== "http:" && url.protocol !== "https:")
|
|
276
231
|
throw new Error(`MCP server "${options.config.url}" returned a ${url.protocol} authorization URL; only http and https are supported`);
|
|
277
232
|
return redirect.open(url);
|
|
278
233
|
},
|
|
279
|
-
...options.invalidate ? { invalidateCredentials: options.invalidate } : {},
|
|
280
234
|
saveCodeVerifier: (verifier) => options.store.saveCodeVerifier(verifier),
|
|
281
235
|
codeVerifier: async () => {
|
|
282
236
|
const verifier = await options.store.codeVerifier();
|
|
@@ -286,6 +240,18 @@ var provider = (options) => {
|
|
|
286
240
|
}
|
|
287
241
|
};
|
|
288
242
|
};
|
|
243
|
+
var selectResource = (config, resource) => {
|
|
244
|
+
const identity = new URL(config.url);
|
|
245
|
+
identity.hash = "";
|
|
246
|
+
if (!resource)
|
|
247
|
+
return identity;
|
|
248
|
+
if (!checkResourceAllowed({ requestedResource: identity, configuredResource: resource }))
|
|
249
|
+
throw new Error(`Protected resource ${resource} does not cover ${identity}`);
|
|
250
|
+
const canonical = new URL(resource);
|
|
251
|
+
if (canonical.origin === identity.origin && canonical.pathname === identity.pathname)
|
|
252
|
+
return identity;
|
|
253
|
+
return canonical;
|
|
254
|
+
};
|
|
289
255
|
var memoryStore = () => {
|
|
290
256
|
let tokens;
|
|
291
257
|
let client;
|
|
@@ -306,6 +272,9 @@ var memoryStore = () => {
|
|
|
306
272
|
};
|
|
307
273
|
};
|
|
308
274
|
var clientFromCredential = (credential) => credential.metadata?.client;
|
|
275
|
+
var Discovery = Schema.Struct({ authorizationServer: Schema.String, resource: Schema.String });
|
|
276
|
+
var decodeDiscovery = Schema.decodeUnknownOption(Discovery);
|
|
277
|
+
var discoveryFromCredential = (credential) => Option.getOrUndefined(decodeDiscovery(credential.metadata?.discovery));
|
|
309
278
|
var toCredential = (input) => OAuth3.make({
|
|
310
279
|
type: "oauth",
|
|
311
280
|
methodID: input.methodID,
|
|
@@ -317,124 +286,102 @@ var toCredential = (input) => OAuth3.make({
|
|
|
317
286
|
tokenType: input.tokens.token_type,
|
|
318
287
|
...input.tokens.scope ? { scope: input.tokens.scope } : {},
|
|
319
288
|
...input.tokens.issuer ? { issuer: input.tokens.issuer } : {},
|
|
289
|
+
...input.discovery ? { discovery: input.discovery } : {},
|
|
320
290
|
...input.client ? { client: input.client } : {}
|
|
321
291
|
}
|
|
322
292
|
});
|
|
323
|
-
var toTokens = (credential) => {
|
|
324
|
-
const metadata = credential.metadata ?? {};
|
|
325
|
-
return {
|
|
326
|
-
access_token: credential.access,
|
|
327
|
-
token_type: typeof metadata.tokenType === "string" ? metadata.tokenType : "Bearer",
|
|
328
|
-
...credential.refresh ? { refresh_token: credential.refresh } : {},
|
|
329
|
-
...credential.expires ? { expires_in: Math.max(0, Math.floor((credential.expires - Date.now()) / 1000)) } : {},
|
|
330
|
-
...typeof metadata.scope === "string" ? { scope: metadata.scope } : {},
|
|
331
|
-
...typeof metadata.issuer === "string" ? { issuer: metadata.issuer } : {}
|
|
332
|
-
};
|
|
333
|
-
};
|
|
334
293
|
var connectProvider = Effect.fnUntraced(function* (input) {
|
|
335
|
-
const credentials = yield* Service89;
|
|
336
|
-
const run = Effect.runPromiseWith(yield* Effect.context());
|
|
337
|
-
const fetch = yield* sender();
|
|
338
294
|
const found = input.credential;
|
|
339
|
-
if (
|
|
340
|
-
return
|
|
295
|
+
if (found?.value.type !== "oauth")
|
|
296
|
+
return { token: async () => {
|
|
297
|
+
return;
|
|
298
|
+
} };
|
|
341
299
|
const id = found.id;
|
|
342
|
-
const
|
|
343
|
-
const
|
|
344
|
-
|
|
345
|
-
|
|
300
|
+
const credentials = yield* Service88;
|
|
301
|
+
const fetchFn = yield* loggedFetch({ server: input.server });
|
|
302
|
+
const run = Effect.runPromiseWith(yield* Effect.context());
|
|
303
|
+
const read = credentials.get(id).pipe(Effect.map((row) => row?.value.type === "oauth" ? row.value : undefined));
|
|
304
|
+
const refresh = (stale, resourceMetadataUrl) => credentials.refresh(id, {
|
|
305
|
+
stale,
|
|
306
|
+
refresh: (current) => exchange({ config: input.config, fetchFn, current, resourceMetadataUrl }).pipe(Effect.tapError((error) => error instanceof RefreshRejected ? Effect.logWarning("mcp oauth credential invalidated", { credentialID: id, reason: error.message }).pipe(Effect.andThen(credentials.remove(id))) : Effect.void))
|
|
307
|
+
});
|
|
308
|
+
const due = (current, now) => expiring2(current, now, REFRESH_AHEAD);
|
|
309
|
+
const refused = () => new UnauthorizedError(`MCP server "${input.config.url}" requires user authorization`);
|
|
310
|
+
let presented;
|
|
311
|
+
return {
|
|
312
|
+
token: () => run(Effect.gen(function* () {
|
|
313
|
+
const current = yield* read;
|
|
314
|
+
const ahead = current?.refresh && discoveryFromCredential(current) && due(current, yield* Clock.currentTimeMillis);
|
|
315
|
+
const value = ahead ? yield* refresh(due).pipe(Effect.orElseSucceed(() => current)) : current;
|
|
316
|
+
presented = value?.access;
|
|
317
|
+
return presented;
|
|
318
|
+
})),
|
|
319
|
+
onUnauthorized: (context) => run(Effect.gen(function* () {
|
|
320
|
+
const rejected = presented;
|
|
321
|
+
if (!(yield* read)?.refresh)
|
|
322
|
+
return yield* Effect.fail(refused());
|
|
323
|
+
const value = yield* refresh((current) => current.access === rejected, extractWWWAuthenticateParams(context.response).resourceMetadataUrl).pipe(Effect.catch((error) => error instanceof RefreshRejected || error instanceof IssuerChanged ? Effect.fail(refused()) : Effect.fail(new OAuthError(OAuthErrorCode.TemporarilyUnavailable, `Could not refresh the OAuth token: ${error instanceof OAuthError ? error.code : error instanceof Error ? error.message : String(error)}`))));
|
|
324
|
+
if (!value)
|
|
325
|
+
return yield* Effect.fail(refused());
|
|
326
|
+
}))
|
|
346
327
|
};
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
const
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
if (
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
},
|
|
392
|
-
store: {
|
|
393
|
-
tokens: async () => {
|
|
394
|
-
const oauth = await read();
|
|
395
|
-
if (!oauth)
|
|
396
|
-
return;
|
|
397
|
-
presented = oauth.refresh;
|
|
398
|
-
return toTokens(oauth);
|
|
399
|
-
},
|
|
400
|
-
saveTokens: async (tokens) => {
|
|
401
|
-
const previous = await read();
|
|
402
|
-
if (previous && previous.refresh !== presented && previous.refresh !== (tokens.refresh_token ?? ""))
|
|
403
|
-
return;
|
|
404
|
-
const value = toCredential({
|
|
405
|
-
methodID,
|
|
406
|
-
serverUrl: input.config.url,
|
|
407
|
-
tokens,
|
|
408
|
-
client: previous ? clientFromCredential(previous) : undefined
|
|
409
|
-
});
|
|
410
|
-
presented = value.refresh;
|
|
411
|
-
await run(credentials.update(id, { value }));
|
|
412
|
-
},
|
|
413
|
-
clientInformation: async () => {
|
|
414
|
-
const oauth = await read();
|
|
415
|
-
return oauth ? clientFromCredential(oauth) : undefined;
|
|
416
|
-
},
|
|
417
|
-
saveClientInformation: async (client) => {
|
|
418
|
-
const oauth = await read();
|
|
419
|
-
if (!oauth)
|
|
420
|
-
return;
|
|
421
|
-
await run(credentials.update(id, { value: { ...oauth, metadata: { ...oauth.metadata, client } } }));
|
|
422
|
-
},
|
|
423
|
-
codeVerifier: async () => {
|
|
424
|
-
return;
|
|
328
|
+
});
|
|
329
|
+
var exchange = (input) => Effect.tryPromise({
|
|
330
|
+
try: async (signal) => {
|
|
331
|
+
const fetchFn = async (url, init) => {
|
|
332
|
+
const response = await input.fetchFn(url, { ...init, signal });
|
|
333
|
+
if (init?.method === "POST" && (response.status === 429 || response.status >= 500))
|
|
334
|
+
throw new Error(`HTTP ${response.status}`);
|
|
335
|
+
return response;
|
|
336
|
+
};
|
|
337
|
+
const oauth = input.config.oauth || undefined;
|
|
338
|
+
const client = oauth?.client_id ? { client_id: oauth.client_id, client_secret: oauth.client_secret } : clientFromCredential(input.current);
|
|
339
|
+
if (!client)
|
|
340
|
+
throw new RefreshRejected({ message: "no OAuth client information" });
|
|
341
|
+
const saved = discoveryFromCredential(input.current);
|
|
342
|
+
const configured = await configuredDiscovery({ config: input.config, fetchFn });
|
|
343
|
+
const server = configured ?? (saved ? {
|
|
344
|
+
authorizationServerUrl: saved.authorizationServer,
|
|
345
|
+
authorizationServerMetadata: await discoverAuthorizationServerMetadata(saved.authorizationServer, {
|
|
346
|
+
fetchFn
|
|
347
|
+
}),
|
|
348
|
+
resourceMetadata: undefined
|
|
349
|
+
} : await discoverOAuthServerInfo(input.config.url, {
|
|
350
|
+
resourceMetadataUrl: input.resourceMetadataUrl,
|
|
351
|
+
fetchFn
|
|
352
|
+
}));
|
|
353
|
+
const found = server.authorizationServerMetadata?.issuer ?? server.authorizationServerUrl;
|
|
354
|
+
const issuer = input.current.metadata?.issuer;
|
|
355
|
+
if (typeof issuer === "string" && found.replace(/\/$/, "") !== issuer.replace(/\/$/, ""))
|
|
356
|
+
throw new IssuerChanged({ message: `issued by ${issuer}, but discovery names ${found}` });
|
|
357
|
+
const resource = saved?.resource ?? selectResource(input.config, server.resourceMetadata?.resource).toString();
|
|
358
|
+
const tokens = await refreshAuthorization(server.authorizationServerUrl, {
|
|
359
|
+
metadata: server.authorizationServerMetadata,
|
|
360
|
+
clientInformation: client,
|
|
361
|
+
refreshToken: input.current.refresh,
|
|
362
|
+
resource,
|
|
363
|
+
fetchFn
|
|
364
|
+
});
|
|
365
|
+
return toCredential({
|
|
366
|
+
methodID: input.current.methodID,
|
|
367
|
+
serverUrl: input.config.url,
|
|
368
|
+
tokens: {
|
|
369
|
+
refresh_token: input.current.refresh,
|
|
370
|
+
...tokens,
|
|
371
|
+
issuer: found
|
|
425
372
|
},
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
373
|
+
client: clientFromCredential(input.current),
|
|
374
|
+
discovery: configured ? undefined : { authorizationServer: server.authorizationServerUrl, resource }
|
|
375
|
+
});
|
|
376
|
+
},
|
|
377
|
+
catch: (error) => error instanceof RefreshRejected || error instanceof IssuerChanged ? error : error instanceof OAuthError && rejections.has(error.code) ? new RefreshRejected({ message: error.message }) : error
|
|
431
378
|
});
|
|
432
379
|
var authorize = (input) => Effect.gen(function* () {
|
|
433
380
|
const fields = { server: input.name, methodID: input.methodID, oauthAttemptID: crypto.randomUUID() };
|
|
434
381
|
const context = yield* Effect.context();
|
|
435
382
|
const run = Effect.runPromiseWith(context);
|
|
436
383
|
const runFork = Effect.runForkWith(context);
|
|
437
|
-
const credentials = yield*
|
|
384
|
+
const credentials = yield* Service88;
|
|
438
385
|
const fetchFn = yield* loggedFetch({ server: input.name }).pipe(Effect.annotateLogs(fields));
|
|
439
386
|
yield* Effect.logInfo("mcp oauth authorization started", fields);
|
|
440
387
|
const oauth = input.config.oauth || undefined;
|
|
@@ -514,7 +461,6 @@ var authorize = (input) => Effect.gen(function* () {
|
|
|
514
461
|
const oauthProvider = provider({
|
|
515
462
|
config: input.config,
|
|
516
463
|
store,
|
|
517
|
-
fetch: fetchFn,
|
|
518
464
|
clientMetadataUrl: cimd ? CLIENT_METADATA_URL : undefined,
|
|
519
465
|
discovery: { ...discovery, resourceMetadataUrl: resourceMetadataUrl?.toString() },
|
|
520
466
|
redirect: {
|
|
@@ -536,7 +482,16 @@ var authorize = (input) => Effect.gen(function* () {
|
|
|
536
482
|
hasRefreshToken: Boolean(tokens.refresh_token),
|
|
537
483
|
expiresIn: tokens.expires_in
|
|
538
484
|
});
|
|
539
|
-
return toCredential({
|
|
485
|
+
return toCredential({
|
|
486
|
+
methodID: input.methodID,
|
|
487
|
+
serverUrl: input.config.url,
|
|
488
|
+
tokens,
|
|
489
|
+
client,
|
|
490
|
+
discovery: oauth?.auth_server_metadata_url ? undefined : {
|
|
491
|
+
authorizationServer: discovery.authorizationServerUrl,
|
|
492
|
+
resource: selectResource(input.config, discovery.resourceMetadata?.resource).toString()
|
|
493
|
+
}
|
|
494
|
+
});
|
|
540
495
|
});
|
|
541
496
|
yield* Effect.tryPromise({
|
|
542
497
|
try: () => auth(oauthProvider, { serverUrl: input.config.url, scope: oauth?.scope ?? challenge.scope, fetchFn }),
|