@opencode-ai/core 0.0.0-beta-18219 → 0.0.0-beta-18269
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/agent.js +49 -53
- package/dist/aisdk-native.js +2 -2
- package/dist/aisdk.js +2 -2
- package/dist/bus.js +48 -52
- package/dist/catalog.js +54 -58
- package/dist/chunks/{state-qasbckzx.js → state-05wd10c5.js} +80 -80
- package/dist/chunks/{state-h9sy0va2.js → state-08sn05f7.js} +5 -5
- package/dist/chunks/{state-fvnc3e3d.js → state-0n5r8s68.js} +5 -5
- package/dist/chunks/{state-vvmq9xvn.js → state-0qdyn92p.js} +11 -11
- package/dist/chunks/{state-0r6r61g5.js → state-0rqcx54b.js} +1 -1
- package/dist/chunks/{state-3d1t6jqf.js → state-11jmdqxk.js} +2 -2
- package/dist/chunks/{state-hk8vx4ga.js → state-13bb7frp.js} +4 -4
- package/dist/chunks/{state-fxw49t4p.js → state-14n6xd2t.js} +1 -1
- package/dist/chunks/{state-5vpdk7xd.js → state-1dxwhedr.js} +3 -3
- package/dist/chunks/{state-en9qv3ee.js → state-1eyrk6kn.js} +2 -2
- package/dist/chunks/{state-efvmw2xw.js → state-1jg449r0.js} +1 -1
- package/dist/chunks/{state-6x98y149.js → state-1k8hd2s1.js} +1 -1
- package/dist/chunks/{state-x07gtesk.js → state-1z63g373.js} +2 -2
- package/dist/chunks/{state-wzvy0tx9.js → state-21cqa2vh.js} +3 -3
- package/dist/chunks/{state-xm8j1t5h.js → state-25g1tcbn.js} +2 -2
- package/dist/chunks/{state-rs9n91g6.js → state-2667yp75.js} +2 -6
- package/dist/chunks/{state-fkg79ekq.js → state-27mgx7wm.js} +8 -8
- package/dist/chunks/{state-mc1mz2pc.js → state-2q2hjh4d.js} +2 -2
- package/dist/chunks/{state-6yt963b8.js → state-2xb0r1c6.js} +3 -1
- package/dist/chunks/{state-gwpydf4a.js → state-2zjhyv5q.js} +1 -1
- package/dist/chunks/{state-e0wkpsf3.js → state-369rn14b.js} +4 -4
- package/dist/chunks/{state-5tehh5r2.js → state-3bgrn618.js} +10 -10
- package/dist/chunks/{state-y643ex83.js → state-3hnnvm1k.js} +2 -2
- package/dist/chunks/{state-g1zg5aqr.js → state-3j8hmcr0.js} +3 -3
- package/dist/chunks/{state-5gas9jc2.js → state-3kdskcc3.js} +4 -4
- package/dist/chunks/{state-myychbwq.js → state-3n6fpmg4.js} +2 -2
- package/dist/chunks/{state-6a16bmez.js → state-3ng63sbq.js} +3 -3
- package/dist/chunks/{state-1a3a2s70.js → state-3zyjx98r.js} +1 -1
- package/dist/chunks/{state-njywpcye.js → state-453w8ra4.js} +6 -6
- package/dist/chunks/{state-14wbm4hn.js → state-4cxzzthm.js} +3 -3
- package/dist/chunks/{state-3mexq3pq.js → state-4fa10fyv.js} +13 -13
- package/dist/chunks/{state-eaejza2t.js → state-4m26jex0.js} +1 -1
- package/dist/chunks/{state-5cj22h72.js → state-4p1mqhwg.js} +153 -153
- package/dist/chunks/{state-xz479kyk.js → state-4wqm8gvz.js} +4 -13
- package/dist/chunks/{state-rn9r0ddn.js → state-5dwqq0br.js} +13 -1
- package/dist/chunks/{state-qe0aav6y.js → state-5ew1nkwg.js} +7 -7
- package/dist/chunks/{state-dhccyx0v.js → state-5qgmwqxx.js} +1 -1
- package/dist/chunks/{state-ayfpp7hf.js → state-61ba6bgr.js} +24 -28
- package/dist/chunks/{state-tj4jvx23.js → state-6m78tbrd.js} +5 -5
- package/dist/chunks/{state-4g5pgmex.js → state-6mtxg7ec.js} +11 -11
- package/dist/chunks/{state-bh50qah0.js → state-6xtnn7py.js} +4 -4
- package/dist/chunks/{state-e1pa6vc2.js → state-6zbf46dw.js} +9 -9
- package/dist/chunks/{state-2r1bah04.js → state-6zrz2gj9.js} +5 -5
- package/dist/chunks/{state-bdhgfttt.js → state-7rn7c1wb.js} +10 -10
- package/dist/chunks/{state-jfgv8vsa.js → state-81mmkvpk.js} +11 -11
- package/dist/chunks/{state-z88k6s2w.js → state-8en9tkxq.js} +15 -3
- package/dist/chunks/{state-0dqphqhz.js → state-8hedmdhf.js} +2 -2
- package/dist/chunks/{state-te0cypm2.js → state-8mcwjqk5.js} +6 -6
- package/dist/chunks/{state-fwsc80k7.js → state-8nxrj4pj.js} +1 -1
- package/dist/chunks/{state-625h1wqn.js → state-91frc5mm.js} +4 -4
- package/dist/chunks/{state-qv06sb3r.js → state-9g8h1q3a.js} +1 -1
- package/dist/chunks/{state-9p8mhgdp.js → state-9p22jmaw.js} +1 -1
- package/dist/chunks/{state-3gsv1x0v.js → state-9tbj2q0z.js} +3 -13
- package/dist/chunks/{state-cb46h7pc.js → state-9y48xc9h.js} +3 -3
- package/dist/chunks/{state-7g3ydvzh.js → state-a1p868km.js} +4 -4
- package/dist/chunks/{state-kdn1ck8k.js → state-a4f6ct0f.js} +2 -2
- package/dist/chunks/{state-63gtrn1b.js → state-a600x74j.js} +1 -1
- package/dist/chunks/{state-hhfaz00h.js → state-a9dsqgp1.js} +1 -2
- package/dist/chunks/{state-2ya5073c.js → state-aaxez5kq.js} +1 -1
- package/dist/chunks/{state-8a9e14vy.js → state-adsxqz7v.js} +3 -3
- package/dist/chunks/{state-38jwdxby.js → state-asfw3td4.js} +1 -1
- package/dist/chunks/{state-effdwybp.js → state-b17xd5mf.js} +9 -10
- package/dist/chunks/{state-qtaajmpt.js → state-b4htb9ej.js} +1 -1
- package/dist/chunks/{state-1fqmpy8k.js → state-b64x4rkh.js} +35 -35
- package/dist/chunks/{state-d7y00n83.js → state-bc330n33.js} +27 -16
- package/dist/chunks/{state-esjk7kfz.js → state-be0semnx.js} +7 -7
- package/dist/chunks/{state-jm68rb0q.js → state-bkk1b4ms.js} +6 -6
- package/dist/chunks/{state-tjjf1q77.js → state-bmd659vv.js} +1 -1
- package/dist/chunks/{state-8mftgzpj.js → state-bnttfg6s.js} +1 -1
- package/dist/chunks/{state-qjnrmq1k.js → state-cc76sxm0.js} +4 -4
- package/dist/chunks/{state-yfq2zvb9.js → state-ck58sp58.js} +1 -1
- package/dist/chunks/{state-568e76aa.js → state-ckq2jga8.js} +3 -3
- package/dist/chunks/{state-4j7te1s0.js → state-d4ax61k3.js} +15 -3
- package/dist/chunks/{state-5xrsrne4.js → state-dvt8wt6j.js} +2 -2
- package/dist/chunks/state-e3fd12s5.js +151 -0
- package/dist/chunks/{state-8tw3qzpt.js → state-e4xwk5z4.js} +2 -2
- package/dist/chunks/{state-78y9e82n.js → state-e8nbj9tw.js} +3 -48
- package/dist/chunks/{state-5mntg4nb.js → state-e97zy5jx.js} +2 -2
- package/dist/chunks/{state-8gp1tmat.js → state-e9yzz6kb.js} +1 -1
- package/dist/chunks/{state-tpwp4gvc.js → state-eax51wg3.js} +4 -4
- package/dist/chunks/{state-tt8fjeh9.js → state-eekpgcpd.js} +62 -70
- package/dist/chunks/{state-bkw9e9jk.js → state-emksydcf.js} +26 -26
- package/dist/chunks/{state-xjn4tcwe.js → state-eq06mre2.js} +2 -2
- package/dist/chunks/{state-1g0dcjrg.js → state-eqzrzvwz.js} +2 -2
- package/dist/chunks/{state-qajwj4ps.js → state-fbnbqahk.js} +3 -3
- package/dist/chunks/{state-cwzmv738.js → state-fj104twx.js} +1 -1
- package/dist/chunks/{state-g7t6p8r2.js → state-fsqnkees.js} +1 -1
- package/dist/chunks/{state-hhxt27np.js → state-fyegnnfc.js} +1 -1
- package/dist/chunks/{state-5zayf0x8.js → state-g0aw0gzh.js} +66 -57
- package/dist/chunks/{state-yb8yd193.js → state-gbxfsqwm.js} +2 -2
- package/dist/chunks/{state-d19eexxk.js → state-gyrwtw78.js} +1 -1
- package/dist/chunks/{state-982wwmdk.js → state-h2t3q2wm.js} +1 -1
- package/dist/chunks/{state-59d95h76.js → state-h3y01asp.js} +12 -9
- package/dist/chunks/{state-jf35ek5b.js → state-h846wrk2.js} +1 -0
- package/dist/chunks/{state-djkt4gex.js → state-hhajr42d.js} +3 -0
- package/dist/chunks/{state-dgfy6zt2.js → state-jabxf61s.js} +5 -5
- package/dist/chunks/{state-cqdxefk2.js → state-jgvtg6c9.js} +40 -14
- package/dist/chunks/{state-7qqad34w.js → state-jkjzgk2k.js} +8 -8
- package/dist/chunks/{state-rmr740y4.js → state-jsm51fhb.js} +9 -9
- package/dist/chunks/{state-qh4vq1fm.js → state-jxwvj0fm.js} +8 -8
- package/dist/chunks/{state-6msxydxg.js → state-k6ybxbw4.js} +9 -9
- package/dist/chunks/{state-ftfyk4m7.js → state-kag74pk5.js} +2 -2
- package/dist/chunks/{state-t0tt4nmt.js → state-kb33ew3e.js} +8 -8
- package/dist/chunks/{state-4ce5qhvd.js → state-kxp8ef5p.js} +5 -5
- package/dist/chunks/{state-2zf7hxjt.js → state-m0ebj05k.js} +13 -2
- package/dist/chunks/{state-bcvcrp33.js → state-mjgqapyb.js} +2 -2
- package/dist/chunks/{state-va5k7fad.js → state-mr28yfk1.js} +27 -7
- package/dist/chunks/{state-wcc1vz83.js → state-mwymssey.js} +42 -42
- package/dist/chunks/{state-gg8gy1ab.js → state-n1x4rjqh.js} +2 -2
- package/dist/chunks/{state-e2qdw0tg.js → state-n5fzcn0n.js} +5 -5
- package/dist/chunks/{state-3zqgma8g.js → state-na8etft7.js} +2 -2
- package/dist/chunks/{state-h094egad.js → state-nfhhzyc6.js} +4 -4
- package/dist/chunks/{state-y966n2ac.js → state-njsznp42.js} +10 -10
- package/dist/chunks/{state-nzexh2ja.js → state-nrbk1kjp.js} +87 -87
- package/dist/chunks/{state-rgk6q7se.js → state-ntvdej23.js} +1 -1
- package/dist/chunks/{state-rph6nvyf.js → state-p1c6e6m1.js} +26 -26
- package/dist/chunks/{state-dr1mvjy7.js → state-p3twfje4.js} +3 -3
- package/dist/chunks/{state-epzxjdf4.js → state-p7764ja1.js} +2 -2
- package/dist/chunks/{state-2zyrrrhx.js → state-pewx9f2e.js} +3 -3
- package/dist/chunks/{state-vz30fbtb.js → state-pspf2xyp.js} +3 -3
- package/dist/chunks/{state-4gksgcvv.js → state-q22rp0t0.js} +14 -14
- package/dist/chunks/{state-cve546b2.js → state-q7kk6b5b.js} +1 -1
- package/dist/chunks/{state-1427k8mt.js → state-qe7xhz7y.js} +2 -2
- package/dist/chunks/{state-e9jfq0e9.js → state-rpqdmjwk.js} +1 -1
- package/dist/chunks/{state-993n0k7x.js → state-s57t7xkg.js} +1 -1
- package/dist/chunks/{state-wyhq3myq.js → state-ss47qkgm.js} +3 -3
- package/dist/chunks/{state-fdx44h11.js → state-syqxsax9.js} +1 -1
- package/dist/chunks/{state-9wqc5k0a.js → state-sz0e55kk.js} +4 -4
- package/dist/chunks/{state-0b13gwpq.js → state-t0m69jt4.js} +4 -4
- package/dist/chunks/{state-shhqc982.js → state-t7gaqyw5.js} +15 -15
- package/dist/chunks/{state-c9eyxdsa.js → state-tawttwre.js} +9 -9
- package/dist/chunks/{state-5m91ayta.js → state-v1g0nhk2.js} +1 -1
- package/dist/chunks/{state-7svew3xx.js → state-v4sgqzfn.js} +5 -5
- package/dist/chunks/{state-fypnrcda.js → state-vh3jgmz8.js} +6 -6
- package/dist/chunks/{state-6dpj79be.js → state-vs2j5dte.js} +2 -2
- package/dist/chunks/{state-qsh6aavw.js → state-w5aydxy7.js} +3 -3
- package/dist/chunks/{state-20hhthrk.js → state-w946z2q4.js} +4 -4
- package/dist/chunks/{state-1jaejmkb.js → state-wgfqc61v.js} +2 -2
- package/dist/chunks/{state-eq90zxhy.js → state-x9z4espg.js} +3 -3
- package/dist/chunks/{state-c9tk9ghs.js → state-xfry7hk8.js} +1 -1
- package/dist/chunks/{state-j5tp9x2q.js → state-y2q46fcs.js} +10 -10
- package/dist/chunks/{state-c09ww48j.js → state-y5as78a2.js} +1 -1
- package/dist/chunks/{state-zbjdaqcp.js → state-yah8vtgx.js} +4 -4
- package/dist/chunks/{state-fywp5vae.js → state-yv2xx3v3.js} +3 -3
- package/dist/chunks/{state-zrbk8s17.js → state-yx107q08.js} +9 -9
- package/dist/chunks/{state-crg4yysy.js → state-yxz07vzv.js} +1 -1
- package/dist/chunks/{state-0vgt3zn6.js → state-z6xdhe6c.js} +1 -1
- package/dist/chunks/{state-kb2qf3qs.js → state-zh7kq3j8.js} +3 -3
- package/dist/chunks/{state-77cj1yb3.js → state-zma7gfkw.js} +4 -4
- package/dist/chunks/{state-s4ame7nd.js → state-zmtjwfap.js} +4 -4
- package/dist/chunks/{state-hk8exvw2.js → state-zv8psbr7.js} +2 -2
- package/dist/command.js +49 -53
- package/dist/config/normalize.js +12 -12
- package/dist/config/plugin/agent.js +82 -86
- package/dist/config/plugin/command.js +71 -75
- package/dist/config/plugin/compaction.js +110 -114
- package/dist/config/plugin/entry-observer.js +68 -72
- package/dist/config/plugin/formatter.js +71 -75
- package/dist/config/plugin/image.js +79 -83
- package/dist/config/plugin/instruction.js +54 -58
- package/dist/config/plugin/location-watcher.js +70 -74
- package/dist/config/plugin/mcp.js +78 -82
- package/dist/config/plugin/policy.js +70 -74
- package/dist/config/plugin/provider.js +69 -73
- package/dist/config/plugin/reference.js +73 -77
- package/dist/config/plugin/shell.js +71 -75
- package/dist/config/plugin/skill-file.js +67 -71
- package/dist/config/plugin/skill.js +84 -88
- package/dist/config/plugin/snapshot.js +71 -75
- package/dist/config/plugin/source.js +69 -73
- package/dist/config/plugin/tool-output.js +72 -76
- package/dist/config/plugin/websearch.js +69 -73
- package/dist/config.js +68 -72
- package/dist/credential.js +52 -51
- package/dist/database/database.js +46 -50
- package/dist/database/drizzle/effect-sqlite/driver.js +8 -11
- package/dist/database/drizzle/effect-sqlite/index.js +8 -11
- package/dist/database/drizzle/effect-sqlite/session.js +7 -10
- package/dist/database/drizzle/index.js +9 -16
- package/dist/database/drizzle/sqlite-core/effect/db.js +5 -5
- package/dist/database/drizzle/sqlite-core/effect/index.js +16 -21
- package/dist/database/drizzle/sqlite-core/effect/session.js +7 -12
- package/dist/database/drizzle.js +9 -16
- package/dist/database/migration/20260410174513_workspace-name.js +1 -1
- package/dist/database/migration.gen.js +35 -35
- package/dist/database/migration.js +36 -36
- package/dist/database/v1-migration.bun.js +52 -56
- package/dist/effect/app-node-builder.js +254 -260
- package/dist/environment/environment.js +55 -59
- package/dist/environment/index.js +57 -61
- package/dist/event-logger.js +48 -52
- package/dist/file-mutation.js +56 -60
- package/dist/filesystem/location-watcher.js +237 -243
- package/dist/filesystem/search.js +58 -62
- package/dist/filesystem.js +58 -62
- package/dist/form.js +49 -53
- package/dist/formatter.js +53 -57
- package/dist/generate.js +58 -62
- package/dist/github-copilot/chat/openai-compatible-chat-language-model.js +3 -3
- package/dist/github-copilot/copilot-provider.js +8 -8
- package/dist/github-copilot/models.js +3 -3
- package/dist/github-copilot/responses/openai-responses-language-model.js +4 -4
- package/dist/github-copilot/responses/openai-responses-prepare-tools.js +2 -2
- package/dist/image/photon.js +60 -64
- package/dist/image.js +60 -64
- package/dist/instruction-discovery.js +50 -54
- package/dist/instructions/builtins.js +53 -57
- package/dist/integration.js +51 -55
- package/dist/job.js +1 -1
- package/dist/kv.js +47 -51
- package/dist/location-activity.js +51 -55
- package/dist/location-mutation.js +52 -56
- package/dist/location-service-map.js +51 -55
- package/dist/location-services.js +254 -260
- package/dist/location.js +51 -55
- package/dist/mcp/client.js +56 -60
- package/dist/mcp/index.js +62 -66
- package/dist/mcp/instructions.js +83 -87
- package/dist/mcp/stdio.js +56 -60
- package/dist/model-resolver.js +57 -61
- package/dist/model.js +2 -2
- package/dist/models-dev.js +52 -56
- package/dist/permission/saved.js +51 -55
- package/dist/permission/sql.js +1 -1
- package/dist/permission.js +65 -69
- package/dist/persistent-pty/index.js +49 -53
- package/dist/persistent-pty.js +49 -53
- package/dist/plugin/agent.js +66 -70
- package/dist/plugin/command.js +63 -67
- package/dist/plugin/host.js +117 -121
- package/dist/plugin/internal.js +229 -235
- package/dist/plugin/models-dev.js +53 -57
- package/dist/plugin/plan.js +66 -70
- package/dist/plugin/provider/amazon-bedrock.js +2 -2
- package/dist/plugin/provider/anthropic.js +2 -2
- package/dist/plugin/provider/azure.js +75 -79
- package/dist/plugin/provider/cerebras.js +2 -2
- package/dist/plugin/provider/cloudflare-ai-gateway.js +76 -80
- package/dist/plugin/provider/cloudflare-workers-ai.js +76 -80
- package/dist/plugin/provider/configured.js +74 -78
- package/dist/plugin/provider/github-copilot.js +57 -61
- package/dist/plugin/provider/gitlab.js +2 -2
- package/dist/plugin/provider/google-vertex.js +2 -2
- package/dist/plugin/provider/kilo.js +2 -2
- package/dist/plugin/provider/llmgateway.js +53 -57
- package/dist/plugin/provider/lmstudio.js +69 -73
- package/dist/plugin/provider/nvidia.js +2 -2
- package/dist/plugin/provider/ollama.js +69 -73
- package/dist/plugin/provider/openai.js +53 -57
- package/dist/plugin/provider/opencode.js +63 -67
- package/dist/plugin/provider/openrouter.js +3 -3
- package/dist/plugin/provider/sap-ai-core.js +2 -2
- package/dist/plugin/provider/snowflake-cortex.js +2 -2
- package/dist/plugin/provider/vercel.js +2 -2
- package/dist/plugin/provider/vllm.js +69 -73
- package/dist/plugin/provider/xai.js +53 -57
- package/dist/plugin/provider/zenmux.js +2 -2
- package/dist/plugin/provider.js +108 -114
- package/dist/plugin/runtime.js +103 -107
- package/dist/plugin/sdk.js +49 -53
- package/dist/plugin/skill.js +84 -88
- package/dist/plugin/supervisor.js +238 -244
- package/dist/plugin/variant.js +3 -3
- package/dist/plugin/vcs/git.js +52 -56
- package/dist/plugin/vcs/hg.js +52 -56
- package/dist/plugin/warming.js +70 -74
- package/dist/plugin/websearch/index.js +4 -4
- package/dist/plugin.js +118 -122
- package/dist/project/sql.js +1 -1
- package/dist/project.js +50 -54
- package/dist/provider.js +1 -1
- package/dist/pty/ticket.js +48 -52
- package/dist/pty.js +54 -58
- package/dist/reference/instructions.js +52 -56
- package/dist/reference.js +50 -54
- package/dist/ripgrep.js +57 -61
- package/dist/session/compaction.js +94 -98
- package/dist/session/context.js +242 -248
- package/dist/session/execution/restart.js +79 -83
- package/dist/session/execution.js +79 -83
- package/dist/session/generate-node.js +243 -249
- package/dist/session/history.js +50 -54
- package/dist/session/inbox.js +50 -54
- package/dist/session/info.js +58 -62
- package/dist/session/instruction-entry.js +49 -53
- package/dist/session/instruction-state.js +2 -2
- package/dist/session/instructions.js +62 -66
- package/dist/session/model-request.js +91 -95
- package/dist/session/model-transport.js +1 -1
- package/dist/session/projector.js +57 -61
- package/dist/session/revert.js +55 -59
- package/dist/session/runner/index.js +59 -63
- package/dist/session/runner/llm.js +246 -252
- package/dist/session/runner/model.js +59 -63
- package/dist/session/runner/retry.js +48 -52
- package/dist/session/runner/to-llm-message.js +1 -1
- package/dist/session/sql.js +1 -1
- package/dist/session/stats.js +47 -51
- package/dist/session/store.js +61 -65
- package/dist/session/title.js +92 -96
- package/dist/session/to-session-error.js +76 -80
- package/dist/session/transfer.js +102 -105
- package/dist/session.js +105 -109
- package/dist/shell/parse.js +3 -3
- package/dist/shell/select.js +2 -2
- package/dist/shell.js +61 -65
- package/dist/skill/instructions.js +67 -71
- package/dist/skill.js +68 -70
- package/dist/snapshot.js +53 -57
- package/dist/tool/mcp.js +82 -86
- package/dist/tool/plugin/edit.js +72 -76
- package/dist/tool/plugin/glob.js +74 -78
- package/dist/tool/plugin/grep.js +74 -78
- package/dist/tool/plugin/patch.js +72 -76
- package/dist/tool/plugin/question.js +67 -71
- package/dist/tool/plugin/read.js +76 -80
- package/dist/tool/plugin/shell.js +122 -126
- package/dist/tool/plugin/skill.js +67 -71
- package/dist/tool/plugin/subagent.js +119 -123
- package/dist/tool/plugin/webfetch.js +67 -71
- package/dist/tool/plugin/websearch.js +70 -74
- package/dist/tool/plugin/write.js +72 -76
- package/dist/tool/read-filesystem.js +59 -63
- package/dist/tool.js +75 -79
- package/dist/types/bus.d.ts +1 -0
- package/dist/types/credential.d.ts +156 -1
- package/dist/types/database/drizzle/index.d.ts +0 -1
- package/dist/types/database/drizzle/sqlite-core/effect/session.d.ts +0 -6
- package/dist/types/database/migration.d.ts +2 -2
- package/dist/types/integration.d.ts +4 -0
- package/dist/types/model.d.ts +3 -0
- package/dist/types/session/compaction.d.ts +1 -0
- package/dist/types/session/history.d.ts +5 -0
- package/dist/types/session/inbox.d.ts +5 -0
- package/dist/types/session/transfer.d.ts +2 -0
- package/dist/types/skill.d.ts +6 -0
- package/dist/types/v1/config/migrate.d.ts +1 -0
- package/dist/types/worktree.d.ts +20 -0
- package/dist/v1/config/config.js +7 -7
- package/dist/v1/config/migrate.js +11 -11
- package/dist/vcs.js +53 -57
- package/dist/websearch.js +50 -54
- package/dist/wellknown/plugin.js +51 -55
- package/dist/wellknown.js +50 -54
- package/dist/workspace.js +48 -52
- package/dist/worktree/sql.js +1 -1
- package/dist/worktree.js +52 -56
- package/package.json +8 -11
- package/dist/chunks/state-4pxf671z.js +0 -97
- package/dist/chunks/state-4zg0gww9.js +0 -55
- package/dist/chunks/state-f84sxdqn.js +0 -49
- package/dist/chunks/state-hsyk7kfz.js +0 -56
- package/dist/chunks/state-jssy2dr3.js +0 -18
- package/dist/chunks/state-pfqehjmy.js +0 -18
- package/dist/chunks/state-qqevkq7v.js +0 -12
- package/dist/database/drizzle/effect-sqlite/migrator.js +0 -20
- package/dist/database/drizzle/up-migrations/effect-sqlite.js +0 -9
- package/dist/database/drizzle/up-migrations/sqlite.js +0 -9
- package/dist/database/drizzle/up-migrations/utils.js +0 -9
- package/dist/plugin/provider/deepinfra.js +0 -8
- package/dist/plugin/provider/togetherai.js +0 -8
- package/dist/types/database/drizzle/effect-sqlite/migrator.d.ts +0 -4
- package/dist/types/database/drizzle/up-migrations/effect-sqlite.d.ts +0 -8
- package/dist/types/database/drizzle/up-migrations/sqlite.d.ts +0 -26
- package/dist/types/database/drizzle/up-migrations/utils.d.ts +0 -21
- package/dist/types/plugin/provider/deepinfra.d.ts +0 -1
- package/dist/types/plugin/provider/togetherai.d.ts +0 -1
- package/dist/chunks/{state-wrw92r0k.js → state-6embh6xw.js} +3 -3
- package/dist/chunks/{state-p1xvm7za.js → state-a8bn7nwa.js} +3 -3
- package/dist/chunks/{state-wvjbjymc.js → state-dnt65mkc.js} +0 -0
- package/dist/chunks/{state-shg9btfn.js → state-kfxvy8fx.js} +6 -6
- package/dist/chunks/{state-sh61temt.js → state-ky29wa5d.js} +17 -17
- package/dist/chunks/{state-rrc4sky2.js → state-qzaqf2fn.js} +3 -3
- package/dist/chunks/{state-7fr2g77j.js → state-xd2p33y8.js} +7 -7
- package/dist/chunks/{state-46qzmhmr.js → state-zaz2fh21.js} +10 -10
|
@@ -57,6 +57,8 @@ var builtins = new Map([
|
|
|
57
57
|
["@opencode-ai/ai/providers/azure", () => import("@opencode-ai/ai/providers/azure")],
|
|
58
58
|
["@opencode-ai/ai/providers/azure/chat", () => import("@opencode-ai/ai/providers/azure/chat")],
|
|
59
59
|
["@opencode-ai/ai/providers/azure/responses", () => import("@opencode-ai/ai/providers/azure/responses")],
|
|
60
|
+
["@opencode-ai/ai/providers/cerebras", () => import("@opencode-ai/ai/providers/cerebras")],
|
|
61
|
+
["@opencode-ai/ai/providers/deepinfra", () => import("@opencode-ai/ai/providers/deepinfra")],
|
|
60
62
|
["@opencode-ai/ai/providers/google", () => import("@opencode-ai/ai/providers/google")],
|
|
61
63
|
["@opencode-ai/ai/providers/google-vertex", () => import("@opencode-ai/ai/providers/google-vertex")],
|
|
62
64
|
["@opencode-ai/ai/providers/google-vertex/gemini", () => import("@opencode-ai/ai/providers/google-vertex/gemini")],
|
|
@@ -74,6 +76,7 @@ var builtins = new Map([
|
|
|
74
76
|
["@opencode-ai/ai/providers/openai/responses", () => import("@opencode-ai/ai/providers/openai/responses")],
|
|
75
77
|
["@opencode-ai/ai/providers/openai-compatible", () => import("@opencode-ai/ai/providers/openai-compatible")],
|
|
76
78
|
["@opencode-ai/ai/providers/openrouter", () => import("@opencode-ai/ai/providers/openrouter")],
|
|
79
|
+
["@opencode-ai/ai/providers/togetherai", () => import("@opencode-ai/ai/providers/togetherai")],
|
|
77
80
|
["@opencode-ai/ai/providers/xai", () => import("@opencode-ai/ai/providers/xai")]
|
|
78
81
|
]);
|
|
79
82
|
var loadPackage = Effect.fn("Provider.loadPackage")(function* (specifier, npm) {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
exports_model
|
|
3
|
-
} from "./state-
|
|
3
|
+
} from "./state-5ew1nkwg.js";
|
|
4
|
+
import {
|
|
5
|
+
exports_integration
|
|
6
|
+
} from "./state-61ba6bgr.js";
|
|
4
7
|
import {
|
|
5
8
|
exports_permission
|
|
6
|
-
} from "./state-
|
|
9
|
+
} from "./state-jsm51fhb.js";
|
|
7
10
|
import {
|
|
8
11
|
AgentNotFoundError,
|
|
9
12
|
StepFailedError,
|
|
10
13
|
UserInterruptedError
|
|
11
14
|
} from "./state-fb7nfzf2.js";
|
|
12
|
-
import {
|
|
13
|
-
exports_integration
|
|
14
|
-
} from "./state-ayfpp7hf.js";
|
|
15
15
|
|
|
16
16
|
// src/session/to-session-error.ts
|
|
17
17
|
import { AIError, ToolFailure } from "@opencode-ai/ai";
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
} from "./state-j07kk359.js";
|
|
17
17
|
import {
|
|
18
18
|
exports_bus
|
|
19
|
-
} from "./state-
|
|
19
|
+
} from "./state-kxp8ef5p.js";
|
|
20
20
|
import {
|
|
21
21
|
exports_database
|
|
22
|
-
} from "./state-
|
|
22
|
+
} from "./state-1z63g373.js";
|
|
23
23
|
import {
|
|
24
24
|
__export
|
|
25
25
|
} from "./state-rvfvac9x.js";
|
|
@@ -40,7 +40,7 @@ __export(exports_project, {
|
|
|
40
40
|
});
|
|
41
41
|
import { Context, Effect, Layer, Schema } from "effect";
|
|
42
42
|
import { ChildProcess } from "effect/unstable/process";
|
|
43
|
-
import { and, asc, desc, eq } from "drizzle-orm";
|
|
43
|
+
import { and, asc, desc, eq, gte, isNull, lte } from "drizzle-orm";
|
|
44
44
|
import path from "path";
|
|
45
45
|
import { Worktree } from "@opencode-ai/schema/worktree";
|
|
46
46
|
import { FSUtil } from "@opencode-ai/util/fs-util";
|
|
@@ -94,7 +94,13 @@ var layer = Layer.effect(Service, Effect.gen(function* () {
|
|
|
94
94
|
const db = (yield* exports_database.Service).db;
|
|
95
95
|
const announcing = new Set;
|
|
96
96
|
const persist = Effect.fnUntraced(function* (project) {
|
|
97
|
+
const previous = yield* db.select({ canonical: ProjectTable.worktree }).from(ProjectTable).where(eq(ProjectTable.id, project.id)).get().pipe(Effect.orDie);
|
|
97
98
|
yield* upsertProject(db, project).pipe(Effect.orDie);
|
|
99
|
+
if (previous && previous.canonical !== project.canonical) {
|
|
100
|
+
const row = yield* db.select().from(ProjectTable).where(eq(ProjectTable.id, project.id)).get().pipe(Effect.orDie);
|
|
101
|
+
if (row)
|
|
102
|
+
yield* bus.publish(exports_schema.Event.Updated, fromRow(row));
|
|
103
|
+
}
|
|
98
104
|
if (!project.vcs)
|
|
99
105
|
return project;
|
|
100
106
|
const directories = [
|
|
@@ -115,7 +121,24 @@ var layer = Layer.effect(Service, Effect.gen(function* () {
|
|
|
115
121
|
const stored = yield* db.select({ directory: WorktreeTable.directory }).from(WorktreeTable).where(and(eq(WorktreeTable.project_id, item.projectID), eq(WorktreeTable.directory, item.directory))).get().pipe(Effect.orDie);
|
|
116
122
|
if (stored)
|
|
117
123
|
return;
|
|
118
|
-
yield*
|
|
124
|
+
const directory = AbsolutePath.make(yield* fs.resolve(item.directory));
|
|
125
|
+
const markerless = yield* db.select({ id: ProjectTable.id, directory: ProjectTable.worktree }).from(ProjectTable).where(and(isNull(ProjectTable.vcs), gte(ProjectTable.worktree, directory), lte(ProjectTable.worktree, AbsolutePath.make(directory + "")))).all().pipe(Effect.orDie);
|
|
126
|
+
const adopted = yield* Effect.filter(markerless, (candidate) => Effect.gen(function* () {
|
|
127
|
+
if (candidate.id === item.projectID)
|
|
128
|
+
return false;
|
|
129
|
+
if (!FSUtil.contains(directory, candidate.directory))
|
|
130
|
+
return false;
|
|
131
|
+
const markers = yield* fs.up({ targets: [".git", ".hg"], start: candidate.directory, stop: directory, mode: "first" }).pipe(Effect.orElseSucceed(() => []));
|
|
132
|
+
if (!markers[0])
|
|
133
|
+
return false;
|
|
134
|
+
return (yield* fs.resolve(path.dirname(markers[0]))) === directory;
|
|
135
|
+
}));
|
|
136
|
+
yield* bus.publish(Worktree.Event.Resolved, {
|
|
137
|
+
projectID: item.projectID,
|
|
138
|
+
directory: item.directory,
|
|
139
|
+
previous: project.previous ?? ID.global,
|
|
140
|
+
...adopted.length ? { adopted: adopted.map((candidate) => candidate.id) } : {}
|
|
141
|
+
}, {
|
|
119
142
|
commit: () => db.insert(WorktreeTable).values({ project_id: item.projectID, directory: item.directory, strategy: item.strategy }).onConflictDoNothing().run().pipe(Effect.orDie, Effect.asVoid)
|
|
120
143
|
});
|
|
121
144
|
}).pipe(Effect.ensuring(Effect.sync(() => announcing.delete(key))));
|
|
@@ -196,12 +219,7 @@ var layer = Layer.effect(Service, Effect.gen(function* () {
|
|
|
196
219
|
`).map((item) => item.trim()).filter(Boolean).toSorted()[0];
|
|
197
220
|
return node ? ID.make(node) : undefined;
|
|
198
221
|
});
|
|
199
|
-
const hgDiscover = Effect.fnUntraced(function* (
|
|
200
|
-
const dotHg = yield* fs.up({ targets: [".hg"], start: input, mode: "first" }).pipe(Effect.map((matches) => matches[0]), Effect.orElseSucceed(() => {
|
|
201
|
-
return;
|
|
202
|
-
}));
|
|
203
|
-
if (!dotHg)
|
|
204
|
-
return;
|
|
222
|
+
const hgDiscover = Effect.fnUntraced(function* (dotHg) {
|
|
205
223
|
const worktree = AbsolutePath.make(path.dirname(dotHg));
|
|
206
224
|
const store = AbsolutePath.make(dotHg);
|
|
207
225
|
const previous = yield* cached(store);
|
|
@@ -214,7 +232,11 @@ var layer = Layer.effect(Service, Effect.gen(function* () {
|
|
|
214
232
|
};
|
|
215
233
|
});
|
|
216
234
|
const resolve = Effect.fn("Project.resolve")(function* (input) {
|
|
217
|
-
const
|
|
235
|
+
const directory = AbsolutePath.make(yield* fs.resolve(input));
|
|
236
|
+
const marker = yield* fs.up({ targets: [".git", ".hg"], start: directory, mode: "first" }).pipe(Effect.map((matches) => matches[0]), Effect.orElseSucceed(() => {
|
|
237
|
+
return;
|
|
238
|
+
}));
|
|
239
|
+
const repo = marker && path.basename(marker) === ".git" ? yield* git.repo.discover(AbsolutePath.make(path.dirname(marker))) : undefined;
|
|
218
240
|
if (repo) {
|
|
219
241
|
const previous = yield* cached(repo.commonDirectory);
|
|
220
242
|
const id = (yield* remote(repo)) ?? previous ?? (yield* rootCommit(repo));
|
|
@@ -227,11 +249,15 @@ var layer = Layer.effect(Service, Effect.gen(function* () {
|
|
|
227
249
|
vcs: { type: "git", store: repo.commonDirectory }
|
|
228
250
|
});
|
|
229
251
|
}
|
|
230
|
-
const hg = yield* hgDiscover(
|
|
252
|
+
const hg = marker && path.basename(marker) === ".hg" ? yield* hgDiscover(AbsolutePath.make(marker)) : undefined;
|
|
231
253
|
if (hg)
|
|
232
254
|
return yield* persist({ ...hg, canonical: hg.directory });
|
|
233
|
-
|
|
234
|
-
|
|
255
|
+
return yield* persist({
|
|
256
|
+
id: ID.make(Hash.fast(`directory:${directory}`)),
|
|
257
|
+
directory,
|
|
258
|
+
canonical: directory,
|
|
259
|
+
vcs: undefined
|
|
260
|
+
});
|
|
235
261
|
});
|
|
236
262
|
return Service.of({ list, update, resolve });
|
|
237
263
|
}));
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
exports_location_mutation
|
|
3
|
+
} from "./state-qe7xhz7y.js";
|
|
1
4
|
import {
|
|
2
5
|
exports_permission
|
|
3
|
-
} from "./state-
|
|
6
|
+
} from "./state-jsm51fhb.js";
|
|
4
7
|
import {
|
|
5
8
|
exports_filesystem
|
|
6
|
-
} from "./state-
|
|
9
|
+
} from "./state-1eyrk6kn.js";
|
|
7
10
|
import {
|
|
8
11
|
exports_ripgrep
|
|
9
|
-
} from "./state-
|
|
12
|
+
} from "./state-4m26jex0.js";
|
|
10
13
|
import {
|
|
11
14
|
exports_environment1 as exports_environment
|
|
12
|
-
} from "./state-
|
|
13
|
-
import {
|
|
14
|
-
exports_location_mutation
|
|
15
|
-
} from "./state-1427k8mt.js";
|
|
15
|
+
} from "./state-8mcwjqk5.js";
|
|
16
16
|
import {
|
|
17
17
|
exports_location
|
|
18
|
-
} from "./state-
|
|
18
|
+
} from "./state-1jg449r0.js";
|
|
19
19
|
import {
|
|
20
20
|
RelativePath
|
|
21
21
|
} from "./state-j07kk359.js";
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
exports_saved
|
|
3
|
+
} from "./state-eqzrzvwz.js";
|
|
1
4
|
import {
|
|
2
5
|
exports_store
|
|
3
|
-
} from "./state-
|
|
6
|
+
} from "./state-6m78tbrd.js";
|
|
4
7
|
import {
|
|
5
8
|
exports_error
|
|
6
9
|
} from "./state-fb7nfzf2.js";
|
|
7
|
-
import {
|
|
8
|
-
exports_saved
|
|
9
|
-
} from "./state-1g0dcjrg.js";
|
|
10
10
|
import {
|
|
11
11
|
exports_wildcard
|
|
12
12
|
} from "./state-y67x6rf6.js";
|
|
13
|
+
import {
|
|
14
|
+
exports_agent
|
|
15
|
+
} from "./state-2zjhyv5q.js";
|
|
13
16
|
import {
|
|
14
17
|
exports_hooks
|
|
15
18
|
} from "./state-v2wshkax.js";
|
|
16
|
-
import {
|
|
17
|
-
exports_agent
|
|
18
|
-
} from "./state-gwpydf4a.js";
|
|
19
19
|
import {
|
|
20
20
|
exports_location
|
|
21
|
-
} from "./state-
|
|
21
|
+
} from "./state-1jg449r0.js";
|
|
22
22
|
import {
|
|
23
23
|
exports_bus
|
|
24
|
-
} from "./state-
|
|
24
|
+
} from "./state-kxp8ef5p.js";
|
|
25
25
|
import {
|
|
26
26
|
__export
|
|
27
27
|
} from "./state-rvfvac9x.js";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
exports_location_mutation
|
|
3
|
+
} from "./state-qe7xhz7y.js";
|
|
1
4
|
import {
|
|
2
5
|
exports_permission
|
|
3
|
-
} from "./state-
|
|
6
|
+
} from "./state-jsm51fhb.js";
|
|
4
7
|
import {
|
|
5
8
|
exports_filesystem
|
|
6
|
-
} from "./state-
|
|
9
|
+
} from "./state-1eyrk6kn.js";
|
|
7
10
|
import {
|
|
8
11
|
exports_ripgrep
|
|
9
|
-
} from "./state-
|
|
12
|
+
} from "./state-4m26jex0.js";
|
|
10
13
|
import {
|
|
11
14
|
exports_environment1 as exports_environment
|
|
12
|
-
} from "./state-
|
|
13
|
-
import {
|
|
14
|
-
exports_location_mutation
|
|
15
|
-
} from "./state-1427k8mt.js";
|
|
15
|
+
} from "./state-8mcwjqk5.js";
|
|
16
16
|
import {
|
|
17
17
|
exports_location
|
|
18
|
-
} from "./state-
|
|
18
|
+
} from "./state-1jg449r0.js";
|
|
19
19
|
import {
|
|
20
20
|
RelativePath
|
|
21
21
|
} from "./state-j07kk359.js";
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
exports_migrate
|
|
3
|
-
} from "./state-
|
|
3
|
+
} from "./state-p7764ja1.js";
|
|
4
|
+
import {
|
|
5
|
+
exports_provider
|
|
6
|
+
} from "./state-18pv8fg3.js";
|
|
4
7
|
import {
|
|
5
8
|
exports_agent
|
|
6
9
|
} from "./state-4s2xwh5d.js";
|
|
7
10
|
import {
|
|
8
11
|
exports_command
|
|
9
12
|
} from "./state-thstd87d.js";
|
|
10
|
-
import {
|
|
11
|
-
exports_permission
|
|
12
|
-
} from "./state-v9bfv94f.js";
|
|
13
|
-
import {
|
|
14
|
-
exports_plugin
|
|
15
|
-
} from "./state-9f0rnpkn.js";
|
|
16
13
|
import {
|
|
17
14
|
exports_attachment
|
|
18
15
|
} from "./state-r3k9abhd.js";
|
|
@@ -20,8 +17,11 @@ import {
|
|
|
20
17
|
exports_mcp
|
|
21
18
|
} from "./state-e1z9a0ts.js";
|
|
22
19
|
import {
|
|
23
|
-
|
|
24
|
-
} from "./state-
|
|
20
|
+
exports_plugin
|
|
21
|
+
} from "./state-9f0rnpkn.js";
|
|
22
|
+
import {
|
|
23
|
+
exports_permission
|
|
24
|
+
} from "./state-v9bfv94f.js";
|
|
25
25
|
import {
|
|
26
26
|
PositiveInt
|
|
27
27
|
} from "./state-j07kk359.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
exports_kv
|
|
3
|
-
} from "./state-
|
|
3
|
+
} from "./state-s57t7xkg.js";
|
|
4
4
|
import {
|
|
5
5
|
exports_state
|
|
6
6
|
} from "./state-qhdqjp31.js";
|
|
7
7
|
import {
|
|
8
8
|
exports_bus
|
|
9
|
-
} from "./state-
|
|
9
|
+
} from "./state-kxp8ef5p.js";
|
|
10
10
|
import {
|
|
11
11
|
__export
|
|
12
12
|
} from "./state-rvfvac9x.js";
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
exports_question
|
|
3
|
+
} from "./state-sz0e55kk.js";
|
|
1
4
|
import {
|
|
2
5
|
toLLMMessages
|
|
3
|
-
} from "./state-
|
|
6
|
+
} from "./state-h846wrk2.js";
|
|
4
7
|
import {
|
|
5
8
|
exports_system_prompt
|
|
6
9
|
} from "./state-v80zsxnb.js";
|
|
7
10
|
import {
|
|
8
|
-
|
|
9
|
-
} from "./state-
|
|
11
|
+
exports_tool
|
|
12
|
+
} from "./state-rpqdmjwk.js";
|
|
10
13
|
import {
|
|
11
14
|
exports_model_transport
|
|
12
|
-
} from "./state-
|
|
15
|
+
} from "./state-d4ax61k3.js";
|
|
13
16
|
import {
|
|
14
17
|
exports_app
|
|
15
18
|
} from "./state-50jxp3hw.js";
|
|
16
|
-
import {
|
|
17
|
-
exports_tool
|
|
18
|
-
} from "./state-e9jfq0e9.js";
|
|
19
19
|
import {
|
|
20
20
|
exports_permission
|
|
21
|
-
} from "./state-
|
|
21
|
+
} from "./state-jsm51fhb.js";
|
|
22
22
|
import {
|
|
23
23
|
exports_hooks
|
|
24
24
|
} from "./state-v2wshkax.js";
|
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
EventSequenceTable,
|
|
3
3
|
EventTable
|
|
4
4
|
} from "./state-zsf8rs93.js";
|
|
5
|
+
import {
|
|
6
|
+
exports_database
|
|
7
|
+
} from "./state-1z63g373.js";
|
|
5
8
|
import {
|
|
6
9
|
exports_keyed_mutex
|
|
7
10
|
} from "./state-0kvmztkf.js";
|
|
8
|
-
import {
|
|
9
|
-
exports_database
|
|
10
|
-
} from "./state-x07gtesk.js";
|
|
11
11
|
import {
|
|
12
12
|
__export,
|
|
13
13
|
__require
|
|
@@ -246,7 +246,7 @@ function configured(options) {
|
|
|
246
246
|
function publish(definition, data, options2) {
|
|
247
247
|
return Effect.gen(function* () {
|
|
248
248
|
const serviceLocation = Option.getOrUndefined(yield* Effect.serviceOption(Location.Service));
|
|
249
|
-
const location = options2?.location ?? (serviceLocation ? { directory: serviceLocation.directory, workspaceID: serviceLocation.workspaceID } : undefined);
|
|
249
|
+
const location = options2?.global ? undefined : options2?.location ?? (serviceLocation ? { directory: serviceLocation.directory, workspaceID: serviceLocation.workspaceID } : undefined);
|
|
250
250
|
return yield* publishEvent(definition, {
|
|
251
251
|
id: options2?.id ?? Event.ID.create(),
|
|
252
252
|
created: yield* Clock.currentTimeMillis,
|
|
@@ -268,7 +268,7 @@ function configured(options) {
|
|
|
268
268
|
message: `Expected string aggregate field ${definition.durable.aggregate}`
|
|
269
269
|
}));
|
|
270
270
|
}
|
|
271
|
-
const location = options2?.location ?? (serviceLocation ? { directory: serviceLocation.directory, workspaceID: serviceLocation.workspaceID } : undefined);
|
|
271
|
+
const location = options2?.global ? undefined : options2?.location ?? (serviceLocation ? { directory: serviceLocation.directory, workspaceID: serviceLocation.workspaceID } : undefined);
|
|
272
272
|
return {
|
|
273
273
|
definition,
|
|
274
274
|
aggregateID: aggregateID2,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
exports_provider
|
|
3
|
-
} from "./state-
|
|
3
|
+
} from "./state-hhajr42d.js";
|
|
4
4
|
import {
|
|
5
5
|
__export
|
|
6
6
|
} from "./state-rvfvac9x.js";
|
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
import { Auth, Endpoint, RequestExecutor } from "@opencode-ai/ai/route";
|
|
31
31
|
import { ProviderShared } from "@opencode-ai/ai/protocols/shared";
|
|
32
32
|
import { Cause, Context, Effect, Layer, Option, Schema, Scope, Stream } from "effect";
|
|
33
|
+
import { makeParser } from "effect/unstable/encoding/Sse";
|
|
33
34
|
var decodeJson = Schema.decodeUnknownOption(Schema.fromJsonString(Schema.Unknown));
|
|
34
35
|
function wrapSSE(res, ms, ctl) {
|
|
35
36
|
if (typeof ms !== "number" || ms <= 0)
|
|
@@ -39,15 +40,24 @@ function wrapSSE(res, ms, ctl) {
|
|
|
39
40
|
if (!res.headers.get("content-type")?.includes("text/event-stream"))
|
|
40
41
|
return res;
|
|
41
42
|
const reader = res.body.getReader();
|
|
43
|
+
const decoder = new TextDecoder;
|
|
44
|
+
let deadline;
|
|
45
|
+
const parser = makeParser((event) => {
|
|
46
|
+
if (event._tag === "Event")
|
|
47
|
+
deadline = Date.now() + ms;
|
|
48
|
+
});
|
|
42
49
|
const body = new ReadableStream({
|
|
43
50
|
async pull(ctrl) {
|
|
51
|
+
const expires = deadline ?? Date.now() + ms;
|
|
52
|
+
deadline = expires;
|
|
44
53
|
const part = await new Promise((resolve, reject) => {
|
|
54
|
+
const remaining = Math.max(0, expires - Date.now());
|
|
45
55
|
const id = setTimeout(() => {
|
|
46
56
|
const err = new Error("SSE read timed out");
|
|
47
57
|
ctl.abort(err);
|
|
48
58
|
reader.cancel(err);
|
|
49
59
|
reject(err);
|
|
50
|
-
},
|
|
60
|
+
}, remaining);
|
|
51
61
|
reader.read().then((part2) => {
|
|
52
62
|
clearTimeout(id);
|
|
53
63
|
resolve(part2);
|
|
@@ -60,6 +70,7 @@ function wrapSSE(res, ms, ctl) {
|
|
|
60
70
|
ctrl.close();
|
|
61
71
|
return;
|
|
62
72
|
}
|
|
73
|
+
parser.feed(decoder.decode(part.value, { stream: true }));
|
|
63
74
|
ctrl.enqueue(part.value);
|
|
64
75
|
},
|
|
65
76
|
async cancel(reason) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
migrations
|
|
3
|
-
} from "./state-
|
|
3
|
+
} from "./state-05wd10c5.js";
|
|
4
4
|
import {
|
|
5
5
|
schema_gen_default
|
|
6
6
|
} from "./state-39ktntah.js";
|
|
@@ -45,12 +45,32 @@ function applyOnly(db, input) {
|
|
|
45
45
|
let completed = new Set((yield* db.all(sql`SELECT id FROM ${sql.identifier("migration")}`)).map((row) => row.id));
|
|
46
46
|
if (completed.size === 0) {
|
|
47
47
|
if (yield* db.get(sql`SELECT name FROM sqlite_master WHERE type = 'table' AND name = ${"__drizzle_migrations"}`)) {
|
|
48
|
-
yield* db.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
const named = (yield* db.all(sql`SELECT name FROM pragma_table_info('__drizzle_migrations')`)).some((column) => column.name === "name");
|
|
49
|
+
if (named) {
|
|
50
|
+
yield* db.run(sql`
|
|
51
|
+
INSERT OR IGNORE INTO ${sql.identifier("migration")} (id, time_completed)
|
|
52
|
+
SELECT name, ${Date.now()}
|
|
53
|
+
FROM ${sql.identifier("__drizzle_migrations")}
|
|
54
|
+
WHERE name IS NOT NULL
|
|
55
|
+
`);
|
|
56
|
+
}
|
|
57
|
+
if (!named) {
|
|
58
|
+
const entries = yield* db.all(sql`
|
|
59
|
+
SELECT created_at, strftime('%Y%m%d%H%M%S', created_at / 1000, 'unixepoch') AS prefix
|
|
60
|
+
FROM ${sql.identifier("__drizzle_migrations")}
|
|
61
|
+
WHERE created_at IS NOT NULL
|
|
62
|
+
`);
|
|
63
|
+
for (const entry of entries) {
|
|
64
|
+
const migration = input.find((item) => item.id.startsWith(`${entry.prefix}_`));
|
|
65
|
+
if (!migration) {
|
|
66
|
+
return yield* Effect.die(new Error(`Legacy migration timestamp ${entry.created_at} does not match any known migration`));
|
|
67
|
+
}
|
|
68
|
+
yield* db.run(sql`
|
|
69
|
+
INSERT OR IGNORE INTO ${sql.identifier("migration")} (id, time_completed)
|
|
70
|
+
VALUES (${migration.id}, ${Date.now()})
|
|
71
|
+
`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
54
74
|
completed = new Set((yield* db.all(sql`SELECT id FROM ${sql.identifier("migration")}`)).map((row) => row.id));
|
|
55
75
|
}
|
|
56
76
|
}
|
|
@@ -1,75 +1,75 @@
|
|
|
1
1
|
import {
|
|
2
2
|
exports_runtime
|
|
3
|
-
} from "./state-
|
|
3
|
+
} from "./state-27mgx7wm.js";
|
|
4
4
|
import {
|
|
5
5
|
exports_mcp
|
|
6
|
-
} from "./state-
|
|
6
|
+
} from "./state-t7gaqyw5.js";
|
|
7
|
+
import {
|
|
8
|
+
exports_websearch
|
|
9
|
+
} from "./state-kag74pk5.js";
|
|
10
|
+
import {
|
|
11
|
+
exports_vcs
|
|
12
|
+
} from "./state-nfhhzyc6.js";
|
|
13
|
+
import {
|
|
14
|
+
exports_tool
|
|
15
|
+
} from "./state-rpqdmjwk.js";
|
|
16
|
+
import {
|
|
17
|
+
exports_command
|
|
18
|
+
} from "./state-bnttfg6s.js";
|
|
7
19
|
import {
|
|
8
20
|
exports_reference
|
|
9
|
-
} from "./state-
|
|
21
|
+
} from "./state-91frc5mm.js";
|
|
10
22
|
import {
|
|
11
23
|
exports_app
|
|
12
24
|
} from "./state-50jxp3hw.js";
|
|
13
|
-
import {
|
|
14
|
-
exports_command
|
|
15
|
-
} from "./state-8mftgzpj.js";
|
|
16
25
|
import {
|
|
17
26
|
exports_skill
|
|
18
|
-
} from "./state-
|
|
27
|
+
} from "./state-8en9tkxq.js";
|
|
28
|
+
import {
|
|
29
|
+
exports_kv
|
|
30
|
+
} from "./state-s57t7xkg.js";
|
|
19
31
|
import {
|
|
20
32
|
exports_generate
|
|
21
|
-
} from "./state-
|
|
33
|
+
} from "./state-y5as78a2.js";
|
|
22
34
|
import {
|
|
23
|
-
|
|
24
|
-
} from "./state-
|
|
35
|
+
exports_catalog
|
|
36
|
+
} from "./state-bkk1b4ms.js";
|
|
25
37
|
import {
|
|
26
|
-
|
|
27
|
-
} from "./state-
|
|
38
|
+
exports_integration
|
|
39
|
+
} from "./state-61ba6bgr.js";
|
|
28
40
|
import {
|
|
29
|
-
|
|
30
|
-
} from "./state-
|
|
41
|
+
exports_credential
|
|
42
|
+
} from "./state-e3fd12s5.js";
|
|
43
|
+
import {
|
|
44
|
+
exports_aisdk
|
|
45
|
+
} from "./state-m0ebj05k.js";
|
|
46
|
+
import {
|
|
47
|
+
exports_permission
|
|
48
|
+
} from "./state-jsm51fhb.js";
|
|
31
49
|
import {
|
|
32
50
|
exports_agent
|
|
33
|
-
} from "./state-
|
|
51
|
+
} from "./state-2zjhyv5q.js";
|
|
34
52
|
import {
|
|
35
|
-
|
|
36
|
-
} from "./state-
|
|
53
|
+
exports_hooks
|
|
54
|
+
} from "./state-v2wshkax.js";
|
|
37
55
|
import {
|
|
38
|
-
|
|
39
|
-
} from "./state-
|
|
56
|
+
exports_model
|
|
57
|
+
} from "./state-3zyjx98r.js";
|
|
40
58
|
import {
|
|
41
|
-
|
|
42
|
-
} from "./state-
|
|
59
|
+
exports_provider
|
|
60
|
+
} from "./state-hhajr42d.js";
|
|
43
61
|
import {
|
|
44
62
|
exports_workspace
|
|
45
|
-
} from "./state-
|
|
63
|
+
} from "./state-9y48xc9h.js";
|
|
46
64
|
import {
|
|
47
65
|
exports_location
|
|
48
|
-
} from "./state-
|
|
66
|
+
} from "./state-1jg449r0.js";
|
|
49
67
|
import {
|
|
50
68
|
AbsolutePath
|
|
51
69
|
} from "./state-j07kk359.js";
|
|
52
|
-
import {
|
|
53
|
-
exports_catalog
|
|
54
|
-
} from "./state-jm68rb0q.js";
|
|
55
|
-
import {
|
|
56
|
-
exports_integration
|
|
57
|
-
} from "./state-ayfpp7hf.js";
|
|
58
|
-
import {
|
|
59
|
-
exports_credential
|
|
60
|
-
} from "./state-4pxf671z.js";
|
|
61
|
-
import {
|
|
62
|
-
exports_model
|
|
63
|
-
} from "./state-1a3a2s70.js";
|
|
64
|
-
import {
|
|
65
|
-
exports_aisdk
|
|
66
|
-
} from "./state-2zf7hxjt.js";
|
|
67
|
-
import {
|
|
68
|
-
exports_provider
|
|
69
|
-
} from "./state-djkt4gex.js";
|
|
70
70
|
import {
|
|
71
71
|
exports_bus
|
|
72
|
-
} from "./state-
|
|
72
|
+
} from "./state-kxp8ef5p.js";
|
|
73
73
|
import {
|
|
74
74
|
__export
|
|
75
75
|
} from "./state-rvfvac9x.js";
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
exports_context
|
|
3
|
-
} from "./state-
|
|
3
|
+
} from "./state-p1c6e6m1.js";
|
|
4
4
|
import {
|
|
5
5
|
exports_model_request
|
|
6
|
-
} from "./state-
|
|
6
|
+
} from "./state-kb33ew3e.js";
|
|
7
7
|
import {
|
|
8
8
|
exports_generate
|
|
9
9
|
} from "./state-xgv25zxy.js";
|
|
10
10
|
import {
|
|
11
11
|
exports_model
|
|
12
|
-
} from "./state-
|
|
12
|
+
} from "./state-5ew1nkwg.js";
|
|
13
13
|
import {
|
|
14
14
|
llmClient
|
|
15
15
|
} from "./state-k42t1tha.js";
|
|
16
16
|
import {
|
|
17
17
|
exports_history
|
|
18
|
-
} from "./state-
|
|
18
|
+
} from "./state-6embh6xw.js";
|
|
19
19
|
import {
|
|
20
20
|
exports_database
|
|
21
|
-
} from "./state-
|
|
21
|
+
} from "./state-1z63g373.js";
|
|
22
22
|
import {
|
|
23
23
|
__export
|
|
24
24
|
} from "./state-rvfvac9x.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
exports_compaction
|
|
3
|
-
} from "./state-
|
|
3
|
+
} from "./state-h3y01asp.js";
|
|
4
4
|
import {
|
|
5
5
|
exports_entry_observer
|
|
6
6
|
} from "./state-kp1t5rcy.js";
|
|
7
7
|
import {
|
|
8
8
|
exports_config
|
|
9
|
-
} from "./state-
|
|
9
|
+
} from "./state-b17xd5mf.js";
|
|
10
10
|
import {
|
|
11
11
|
__export
|
|
12
12
|
} from "./state-rvfvac9x.js";
|