@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
|
@@ -1,243 +1,243 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./state-
|
|
2
|
+
exports_git
|
|
3
|
+
} from "./state-ck58sp58.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./state-
|
|
5
|
+
exports_hg
|
|
6
|
+
} from "./state-9g8h1q3a.js";
|
|
7
|
+
import {
|
|
8
|
+
WebSearchPlugins
|
|
9
|
+
} from "./state-xd2p33y8.js";
|
|
10
|
+
import {
|
|
11
|
+
exports_mcp_codemode_exclusion
|
|
12
|
+
} from "./state-6q0m15b3.js";
|
|
13
|
+
import {
|
|
14
|
+
exports_variant
|
|
15
|
+
} from "./state-11jmdqxk.js";
|
|
16
|
+
import {
|
|
17
|
+
exports_system_prompt
|
|
18
|
+
} from "./state-7gqqz1s8.js";
|
|
19
|
+
import {
|
|
20
|
+
exports_command as exports_command3
|
|
21
|
+
} from "./state-w5aydxy7.js";
|
|
22
|
+
import {
|
|
23
|
+
ModelsDevPlugin
|
|
24
|
+
} from "./state-x9z4espg.js";
|
|
25
|
+
import {
|
|
26
|
+
exports_warming
|
|
27
|
+
} from "./state-0rqcx54b.js";
|
|
28
|
+
import {
|
|
29
|
+
ProviderPlugins
|
|
30
|
+
} from "./state-eekpgcpd.js";
|
|
31
|
+
import {
|
|
32
|
+
exports_agent as exports_agent3
|
|
33
|
+
} from "./state-mjgqapyb.js";
|
|
34
|
+
import {
|
|
35
|
+
exports_skill as exports_skill4
|
|
36
|
+
} from "./state-wgfqc61v.js";
|
|
37
|
+
import {
|
|
38
|
+
exports_plan
|
|
39
|
+
} from "./state-8hedmdhf.js";
|
|
7
40
|
import {
|
|
8
41
|
exports_skill as exports_skill3
|
|
9
|
-
} from "./state-
|
|
42
|
+
} from "./state-4wqm8gvz.js";
|
|
43
|
+
import {
|
|
44
|
+
exports_edit
|
|
45
|
+
} from "./state-3bgrn618.js";
|
|
46
|
+
import {
|
|
47
|
+
exports_websearch as exports_websearch3
|
|
48
|
+
} from "./state-08sn05f7.js";
|
|
10
49
|
import {
|
|
11
50
|
exports_glob
|
|
12
|
-
} from "./state-
|
|
51
|
+
} from "./state-jxwvj0fm.js";
|
|
13
52
|
import {
|
|
14
53
|
exports_shell as exports_shell3
|
|
15
|
-
} from "./state-
|
|
54
|
+
} from "./state-q22rp0t0.js";
|
|
16
55
|
import {
|
|
17
56
|
exports_grep
|
|
18
|
-
} from "./state-
|
|
57
|
+
} from "./state-jkjzgk2k.js";
|
|
19
58
|
import {
|
|
20
59
|
exports_patch
|
|
21
|
-
} from "./state-
|
|
22
|
-
import {
|
|
23
|
-
exports_edit
|
|
24
|
-
} from "./state-5tehh5r2.js";
|
|
25
|
-
import {
|
|
26
|
-
exports_webfetch
|
|
27
|
-
} from "./state-0b13gwpq.js";
|
|
60
|
+
} from "./state-njsznp42.js";
|
|
28
61
|
import {
|
|
29
62
|
exports_read
|
|
30
|
-
} from "./state-
|
|
63
|
+
} from "./state-tawttwre.js";
|
|
31
64
|
import {
|
|
32
|
-
|
|
33
|
-
} from "./state-
|
|
65
|
+
exports_read_filesystem
|
|
66
|
+
} from "./state-3n6fpmg4.js";
|
|
34
67
|
import {
|
|
35
|
-
|
|
36
|
-
} from "./state-
|
|
68
|
+
exports_webfetch
|
|
69
|
+
} from "./state-t0m69jt4.js";
|
|
37
70
|
import {
|
|
38
|
-
|
|
39
|
-
} from "./state-
|
|
71
|
+
exports_write
|
|
72
|
+
} from "./state-yx107q08.js";
|
|
40
73
|
import {
|
|
41
|
-
|
|
42
|
-
} from "./state-
|
|
74
|
+
exports_subagent
|
|
75
|
+
} from "./state-vh3jgmz8.js";
|
|
43
76
|
import {
|
|
44
|
-
|
|
45
|
-
} from "./state-
|
|
77
|
+
exports_instructions
|
|
78
|
+
} from "./state-yv2xx3v3.js";
|
|
46
79
|
import {
|
|
47
|
-
|
|
48
|
-
} from "./state-
|
|
80
|
+
exports_plugin
|
|
81
|
+
} from "./state-vs2j5dte.js";
|
|
49
82
|
import {
|
|
50
|
-
|
|
51
|
-
} from "./state-
|
|
83
|
+
exports_agent as exports_agent2
|
|
84
|
+
} from "./state-pewx9f2e.js";
|
|
52
85
|
import {
|
|
53
|
-
|
|
54
|
-
} from "./state-
|
|
86
|
+
exports_instruction
|
|
87
|
+
} from "./state-w946z2q4.js";
|
|
55
88
|
import {
|
|
56
89
|
exports_shell as exports_shell2
|
|
57
|
-
} from "./state-
|
|
90
|
+
} from "./state-e97zy5jx.js";
|
|
58
91
|
import {
|
|
59
|
-
|
|
60
|
-
} from "./state-
|
|
92
|
+
exports_command as exports_command2
|
|
93
|
+
} from "./state-fbnbqahk.js";
|
|
94
|
+
import {
|
|
95
|
+
exports_reference as exports_reference2
|
|
96
|
+
} from "./state-6zrz2gj9.js";
|
|
61
97
|
import {
|
|
62
98
|
exports_compaction as exports_compaction2
|
|
63
|
-
} from "./state-
|
|
99
|
+
} from "./state-na8etft7.js";
|
|
64
100
|
import {
|
|
65
101
|
exports_compaction
|
|
66
|
-
} from "./state-
|
|
102
|
+
} from "./state-h3y01asp.js";
|
|
67
103
|
import {
|
|
68
104
|
exports_question
|
|
69
|
-
} from "./state-
|
|
105
|
+
} from "./state-sz0e55kk.js";
|
|
70
106
|
import {
|
|
71
|
-
|
|
72
|
-
} from "./state-
|
|
73
|
-
import {
|
|
74
|
-
exports_discovery
|
|
75
|
-
} from "./state-ybhfpy64.js";
|
|
107
|
+
exports_tool_output as exports_tool_output2
|
|
108
|
+
} from "./state-1dxwhedr.js";
|
|
76
109
|
import {
|
|
77
|
-
|
|
78
|
-
} from "./state-
|
|
110
|
+
exports_provider
|
|
111
|
+
} from "./state-eq06mre2.js";
|
|
79
112
|
import {
|
|
80
|
-
|
|
81
|
-
} from "./state-
|
|
113
|
+
exports_source
|
|
114
|
+
} from "./state-2q2hjh4d.js";
|
|
82
115
|
import {
|
|
83
116
|
exports_formatter as exports_formatter2
|
|
84
|
-
} from "./state-
|
|
117
|
+
} from "./state-0n5r8s68.js";
|
|
85
118
|
import {
|
|
86
|
-
|
|
87
|
-
} from "./state-
|
|
119
|
+
exports_websearch as exports_websearch2
|
|
120
|
+
} from "./state-h2t3q2wm.js";
|
|
88
121
|
import {
|
|
89
|
-
|
|
90
|
-
} from "./state-
|
|
122
|
+
exports_image as exports_image2
|
|
123
|
+
} from "./state-25g1tcbn.js";
|
|
91
124
|
import {
|
|
92
|
-
|
|
93
|
-
} from "./state-
|
|
125
|
+
exports_snapshot as exports_snapshot2
|
|
126
|
+
} from "./state-3hnnvm1k.js";
|
|
94
127
|
import {
|
|
95
|
-
|
|
96
|
-
} from "./state-
|
|
128
|
+
exports_skill as exports_skill2
|
|
129
|
+
} from "./state-3kdskcc3.js";
|
|
97
130
|
import {
|
|
98
|
-
|
|
99
|
-
} from "./state-
|
|
131
|
+
exports_discovery
|
|
132
|
+
} from "./state-ybhfpy64.js";
|
|
100
133
|
import {
|
|
101
|
-
|
|
102
|
-
} from "./state-
|
|
134
|
+
exports_location_watcher
|
|
135
|
+
} from "./state-v1g0nhk2.js";
|
|
103
136
|
import {
|
|
104
|
-
|
|
105
|
-
} from "./state-
|
|
137
|
+
exports_location_watcher_policy
|
|
138
|
+
} from "./state-37e9hbzs.js";
|
|
106
139
|
import {
|
|
107
|
-
|
|
108
|
-
} from "./state-
|
|
140
|
+
exports_policy
|
|
141
|
+
} from "./state-14n6xd2t.js";
|
|
109
142
|
import {
|
|
110
|
-
|
|
111
|
-
} from "./state-
|
|
143
|
+
exports_mcp as exports_mcp2
|
|
144
|
+
} from "./state-zma7gfkw.js";
|
|
112
145
|
import {
|
|
113
|
-
|
|
114
|
-
} from "./state-
|
|
146
|
+
exports_formatter
|
|
147
|
+
} from "./state-zh7kq3j8.js";
|
|
115
148
|
import {
|
|
116
|
-
|
|
117
|
-
} from "./state-
|
|
149
|
+
exports_instruction_discovery
|
|
150
|
+
} from "./state-a1p868km.js";
|
|
118
151
|
import {
|
|
119
|
-
|
|
120
|
-
} from "./state-
|
|
152
|
+
exports_file_mutation
|
|
153
|
+
} from "./state-8nxrj4pj.js";
|
|
121
154
|
import {
|
|
122
|
-
|
|
123
|
-
} from "./state-
|
|
155
|
+
exports_tool_output
|
|
156
|
+
} from "./state-19nk26qg.js";
|
|
124
157
|
import {
|
|
125
|
-
|
|
126
|
-
} from "./state-
|
|
158
|
+
exports_config
|
|
159
|
+
} from "./state-b17xd5mf.js";
|
|
127
160
|
import {
|
|
128
|
-
|
|
129
|
-
} from "./state-
|
|
161
|
+
exports_watcher
|
|
162
|
+
} from "./state-y980s7ka.js";
|
|
130
163
|
import {
|
|
131
|
-
|
|
132
|
-
} from "./state-
|
|
164
|
+
exports_runtime
|
|
165
|
+
} from "./state-27mgx7wm.js";
|
|
133
166
|
import {
|
|
134
|
-
|
|
135
|
-
} from "./state-
|
|
167
|
+
exports_mcp
|
|
168
|
+
} from "./state-t7gaqyw5.js";
|
|
136
169
|
import {
|
|
137
|
-
|
|
138
|
-
} from "./state-
|
|
170
|
+
exports_websearch
|
|
171
|
+
} from "./state-kag74pk5.js";
|
|
139
172
|
import {
|
|
140
|
-
|
|
141
|
-
} from "./state-
|
|
173
|
+
exports_tool
|
|
174
|
+
} from "./state-rpqdmjwk.js";
|
|
142
175
|
import {
|
|
143
|
-
|
|
144
|
-
} from "./state-
|
|
176
|
+
exports_command
|
|
177
|
+
} from "./state-bnttfg6s.js";
|
|
145
178
|
import {
|
|
146
|
-
|
|
147
|
-
} from "./state-
|
|
179
|
+
exports_shell
|
|
180
|
+
} from "./state-6zbf46dw.js";
|
|
148
181
|
import {
|
|
149
|
-
|
|
150
|
-
} from "./state-
|
|
182
|
+
exports_reference
|
|
183
|
+
} from "./state-91frc5mm.js";
|
|
151
184
|
import {
|
|
152
|
-
|
|
153
|
-
} from "./state-
|
|
185
|
+
exports_location_mutation
|
|
186
|
+
} from "./state-qe7xhz7y.js";
|
|
154
187
|
import {
|
|
155
|
-
|
|
156
|
-
} from "./state-
|
|
188
|
+
exports_models_dev
|
|
189
|
+
} from "./state-yah8vtgx.js";
|
|
157
190
|
import {
|
|
158
|
-
|
|
159
|
-
} from "./state-
|
|
191
|
+
exports_select
|
|
192
|
+
} from "./state-a8bn7nwa.js";
|
|
160
193
|
import {
|
|
161
|
-
|
|
162
|
-
} from "./state-
|
|
194
|
+
exports_skill
|
|
195
|
+
} from "./state-8en9tkxq.js";
|
|
163
196
|
import {
|
|
164
197
|
exports_wellknown
|
|
165
|
-
} from "./state-
|
|
166
|
-
import {
|
|
167
|
-
exports_shell
|
|
168
|
-
} from "./state-e1pa6vc2.js";
|
|
198
|
+
} from "./state-e4xwk5z4.js";
|
|
169
199
|
import {
|
|
170
|
-
|
|
171
|
-
} from "./state-
|
|
200
|
+
exports_kv
|
|
201
|
+
} from "./state-s57t7xkg.js";
|
|
172
202
|
import {
|
|
173
203
|
exports_snapshot
|
|
174
|
-
} from "./state-
|
|
204
|
+
} from "./state-zmtjwfap.js";
|
|
175
205
|
import {
|
|
176
|
-
|
|
177
|
-
} from "./state-
|
|
178
|
-
import {
|
|
179
|
-
exports_instruction_discovery
|
|
180
|
-
} from "./state-7g3ydvzh.js";
|
|
206
|
+
exports_catalog
|
|
207
|
+
} from "./state-bkk1b4ms.js";
|
|
181
208
|
import {
|
|
182
|
-
|
|
183
|
-
} from "./state-
|
|
209
|
+
exports_integration
|
|
210
|
+
} from "./state-61ba6bgr.js";
|
|
184
211
|
import {
|
|
185
|
-
|
|
186
|
-
} from "./state-
|
|
212
|
+
exports_credential
|
|
213
|
+
} from "./state-e3fd12s5.js";
|
|
187
214
|
import {
|
|
188
|
-
|
|
189
|
-
} from "./state-
|
|
215
|
+
exports_form
|
|
216
|
+
} from "./state-a600x74j.js";
|
|
190
217
|
import {
|
|
191
218
|
exports_permission
|
|
192
|
-
} from "./state-
|
|
219
|
+
} from "./state-jsm51fhb.js";
|
|
193
220
|
import {
|
|
194
221
|
exports_agent
|
|
195
|
-
} from "./state-
|
|
222
|
+
} from "./state-2zjhyv5q.js";
|
|
196
223
|
import {
|
|
197
224
|
exports_image
|
|
198
|
-
} from "./state-
|
|
225
|
+
} from "./state-dnt65mkc.js";
|
|
199
226
|
import {
|
|
200
227
|
exports_filesystem
|
|
201
|
-
} from "./state-
|
|
202
|
-
import {
|
|
203
|
-
exports_websearch
|
|
204
|
-
} from "./state-ftfyk4m7.js";
|
|
205
|
-
import {
|
|
206
|
-
exports_kv
|
|
207
|
-
} from "./state-993n0k7x.js";
|
|
208
|
-
import {
|
|
209
|
-
exports_tool_output
|
|
210
|
-
} from "./state-19nk26qg.js";
|
|
228
|
+
} from "./state-1eyrk6kn.js";
|
|
211
229
|
import {
|
|
212
230
|
exports_ripgrep
|
|
213
|
-
} from "./state-
|
|
214
|
-
import {
|
|
215
|
-
exports_file_mutation
|
|
216
|
-
} from "./state-fwsc80k7.js";
|
|
231
|
+
} from "./state-4m26jex0.js";
|
|
217
232
|
import {
|
|
218
233
|
exports_environment1 as exports_environment
|
|
219
|
-
} from "./state-
|
|
220
|
-
import {
|
|
221
|
-
exports_location_mutation
|
|
222
|
-
} from "./state-1427k8mt.js";
|
|
234
|
+
} from "./state-8mcwjqk5.js";
|
|
223
235
|
import {
|
|
224
236
|
exports_location
|
|
225
|
-
} from "./state-
|
|
226
|
-
import {
|
|
227
|
-
exports_catalog
|
|
228
|
-
} from "./state-jm68rb0q.js";
|
|
229
|
-
import {
|
|
230
|
-
exports_integration
|
|
231
|
-
} from "./state-ayfpp7hf.js";
|
|
232
|
-
import {
|
|
233
|
-
exports_credential
|
|
234
|
-
} from "./state-4pxf671z.js";
|
|
235
|
-
import {
|
|
236
|
-
exports_form
|
|
237
|
-
} from "./state-63gtrn1b.js";
|
|
237
|
+
} from "./state-1jg449r0.js";
|
|
238
238
|
import {
|
|
239
239
|
exports_bus
|
|
240
|
-
} from "./state-
|
|
240
|
+
} from "./state-kxp8ef5p.js";
|
|
241
241
|
import {
|
|
242
242
|
__export
|
|
243
243
|
} from "./state-rvfvac9x.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
exports_skill
|
|
3
|
-
} from "./state-
|
|
3
|
+
} from "./state-8en9tkxq.js";
|
|
4
4
|
import {
|
|
5
5
|
exports_permission
|
|
6
|
-
} from "./state-
|
|
6
|
+
} from "./state-jsm51fhb.js";
|
|
7
7
|
import {
|
|
8
8
|
__export
|
|
9
9
|
} from "./state-rvfvac9x.js";
|
|
@@ -19,12 +19,10 @@ __export(exports_skill2, {
|
|
|
19
19
|
Output: () => Output,
|
|
20
20
|
Input: () => Input
|
|
21
21
|
});
|
|
22
|
-
import path from "path";
|
|
23
22
|
import { ToolFailure } from "@opencode-ai/ai";
|
|
24
23
|
import { Effect, Schema } from "effect";
|
|
25
24
|
import { FSUtil } from "@opencode-ai/util/fs-util";
|
|
26
25
|
var name = "skill";
|
|
27
|
-
var FILE_LIMIT = 10;
|
|
28
26
|
var Input = Schema.Struct({
|
|
29
27
|
id: exports_skill.ID.annotate({ description: "The ID of an available skill or a skill explicitly referenced by the user" })
|
|
30
28
|
});
|
|
@@ -54,8 +52,7 @@ var Plugin = {
|
|
|
54
52
|
input: Input,
|
|
55
53
|
output: Output,
|
|
56
54
|
execute: (input, context) => Effect.gen(function* () {
|
|
57
|
-
const
|
|
58
|
-
const skill = current.find((skill2) => skill2.id === input.id);
|
|
55
|
+
const skill = yield* skills.get(input.id);
|
|
59
56
|
if (!skill)
|
|
60
57
|
return yield* unableToLoad(input.id);
|
|
61
58
|
return yield* Effect.gen(function* () {
|
|
@@ -67,13 +64,7 @@ var Plugin = {
|
|
|
67
64
|
agent: context.agent,
|
|
68
65
|
source: { type: "tool", messageID: context.messageID, id: context.id }
|
|
69
66
|
});
|
|
70
|
-
|
|
71
|
-
const files = path.basename(skill.location) === "SKILL.md" ? (yield* fs.scan("**/*", { cwd: directory, absolute: true, include: "file", dot: true })).filter((file) => path.basename(file) !== "SKILL.md").toSorted().slice(0, FILE_LIMIT) : [];
|
|
72
|
-
return {
|
|
73
|
-
name: skill.name,
|
|
74
|
-
directory,
|
|
75
|
-
output: exports_skill.toModelOutput(skill, files)
|
|
76
|
-
};
|
|
67
|
+
return { name: skill.name, ...yield* exports_skill.prepare(fs, skill) };
|
|
77
68
|
}).pipe(Effect.mapError((error) => unableToLoad(input.id, error)));
|
|
78
69
|
}).pipe(Effect.map((output) => ({
|
|
79
70
|
output,
|
|
@@ -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";
|
|
@@ -46,6 +46,18 @@ function map(input) {
|
|
|
46
46
|
...mapOpenAIOptions(input.settings)
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
+
case "@ai-sdk/cerebras":
|
|
50
|
+
case "@ai-sdk/deepinfra":
|
|
51
|
+
case "@ai-sdk/togetherai":
|
|
52
|
+
return {
|
|
53
|
+
package: `@opencode-ai/ai/providers/${input.packageName.slice("@ai-sdk/".length)}`,
|
|
54
|
+
settings: {
|
|
55
|
+
...baseSettings,
|
|
56
|
+
...mapAPIKey(input.settings),
|
|
57
|
+
...mapProviderOptions(input.settings, ["apiKey", "baseURL", "fetch", "headers", "name"])
|
|
58
|
+
},
|
|
59
|
+
...isStringRecord(input.settings.headers) ? { headers: input.settings.headers } : {}
|
|
60
|
+
};
|
|
49
61
|
case "@ai-sdk/google":
|
|
50
62
|
return {
|
|
51
63
|
package: "@opencode-ai/ai/providers/google",
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SessionSchema
|
|
3
|
-
} from "./state-bjwj8hwv.js";
|
|
4
1
|
import {
|
|
5
2
|
exports_model_resolver
|
|
6
|
-
} from "./state-
|
|
3
|
+
} from "./state-81mmkvpk.js";
|
|
7
4
|
import {
|
|
8
5
|
exports_catalog
|
|
9
|
-
} from "./state-
|
|
6
|
+
} from "./state-bkk1b4ms.js";
|
|
7
|
+
import {
|
|
8
|
+
SessionSchema
|
|
9
|
+
} from "./state-bjwj8hwv.js";
|
|
10
10
|
import {
|
|
11
11
|
ID,
|
|
12
12
|
Ref
|
|
13
|
-
} from "./state-
|
|
13
|
+
} from "./state-3zyjx98r.js";
|
|
14
14
|
import {
|
|
15
15
|
exports_provider
|
|
16
|
-
} from "./state-
|
|
16
|
+
} from "./state-hhajr42d.js";
|
|
17
17
|
import {
|
|
18
18
|
__export
|
|
19
19
|
} from "./state-rvfvac9x.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
exports_credential
|
|
3
|
-
} from "./state-
|
|
3
|
+
} from "./state-e3fd12s5.js";
|
|
4
4
|
import {
|
|
5
5
|
exports_form
|
|
6
|
-
} from "./state-
|
|
6
|
+
} from "./state-a600x74j.js";
|
|
7
7
|
import {
|
|
8
8
|
exports_state
|
|
9
9
|
} from "./state-qhdqjp31.js";
|
|
10
10
|
import {
|
|
11
11
|
exports_bus
|
|
12
|
-
} from "./state-
|
|
12
|
+
} from "./state-kxp8ef5p.js";
|
|
13
13
|
import {
|
|
14
14
|
__export
|
|
15
15
|
} from "./state-rvfvac9x.js";
|
|
@@ -166,6 +166,14 @@ var layer = Layer.effect(Service, Effect.gen(function* () {
|
|
|
166
166
|
}),
|
|
167
167
|
finalize: () => bus.publish(Integration.Event.Updated, {}).pipe(Effect.asVoid)
|
|
168
168
|
});
|
|
169
|
+
const createCredential = Effect.fnUntraced(function* (input) {
|
|
170
|
+
if (input.label !== undefined)
|
|
171
|
+
return yield* credentials.create(input);
|
|
172
|
+
const name = state.get().integrations.get(input.integrationID)?.ref.name ?? input.integrationID;
|
|
173
|
+
const labels = new Set((yield* credentials.list(input.integrationID)).map((credential) => credential.label));
|
|
174
|
+
const label = Array.from({ length: labels.size + 1 }, (_, index) => index === 0 ? name : `${name} ${index + 1}`).find((candidate) => !labels.has(candidate)) ?? name;
|
|
175
|
+
return yield* credentials.create({ ...input, label });
|
|
176
|
+
});
|
|
169
177
|
const resolveConnections = (entry, saved) => {
|
|
170
178
|
const credentials2 = saved.map((credential) => ({
|
|
171
179
|
type: "credential",
|
|
@@ -178,6 +186,7 @@ var layer = Layer.effect(Service, Effect.gen(function* () {
|
|
|
178
186
|
const project = (entry, connections) => Info.make({
|
|
179
187
|
id: entry.ref.id,
|
|
180
188
|
name: entry.ref.name,
|
|
189
|
+
...entry.ref.metadata === undefined ? {} : { metadata: entry.ref.metadata },
|
|
181
190
|
methods: entry.methods,
|
|
182
191
|
connections
|
|
183
192
|
});
|
|
@@ -211,7 +220,7 @@ var layer = Layer.effect(Service, Effect.gen(function* () {
|
|
|
211
220
|
}
|
|
212
221
|
yield* Effect.gen(function* () {
|
|
213
222
|
const implementation = state.get().integrations.get(attempt.integrationID)?.implementations.get(attempt.methodID);
|
|
214
|
-
const persistence = yield* Effect.sync(() => attempt.label ?? implementation?.label?.(exit.value)).pipe(Effect.flatMap((label) =>
|
|
223
|
+
const persistence = yield* Effect.sync(() => attempt.label ?? implementation?.label?.(exit.value)).pipe(Effect.flatMap((label) => createCredential({
|
|
215
224
|
integrationID: attempt.integrationID,
|
|
216
225
|
label,
|
|
217
226
|
value: exit.value
|
|
@@ -232,8 +241,6 @@ var layer = Layer.effect(Service, Effect.gen(function* () {
|
|
|
232
241
|
yield* SynchronizedRef.update(attempts, (current) => new Map(current).set(attemptID, terminal));
|
|
233
242
|
if (Exit.isFailure(persistence))
|
|
234
243
|
yield* Effect.failCause(persistence.cause);
|
|
235
|
-
yield* bus.publish(Integration.Event.ConnectionUpdated, { integrationID: attempt.integrationID });
|
|
236
|
-
yield* bus.publish(Integration.Event.Updated, {});
|
|
237
244
|
}).pipe(Effect.ensuring(close(attempt.scope)));
|
|
238
245
|
}));
|
|
239
246
|
});
|
|
@@ -259,7 +266,7 @@ var layer = Layer.effect(Service, Effect.gen(function* () {
|
|
|
259
266
|
yield* close(attempt.scope);
|
|
260
267
|
return;
|
|
261
268
|
}
|
|
262
|
-
const persistence = yield*
|
|
269
|
+
const persistence = yield* createCredential({
|
|
263
270
|
integrationID: attempt.integrationID,
|
|
264
271
|
label: attempt.label,
|
|
265
272
|
value: exports_credential.Key.make({ type: "key", key: exit.value })
|
|
@@ -279,10 +286,6 @@ var layer = Layer.effect(Service, Effect.gen(function* () {
|
|
|
279
286
|
};
|
|
280
287
|
yield* SynchronizedRef.update(commandAttempts, (current) => new Map(current).set(attemptID, terminal));
|
|
281
288
|
yield* close(attempt.scope);
|
|
282
|
-
if (Exit.isFailure(persistence))
|
|
283
|
-
return;
|
|
284
|
-
yield* bus.publish(Integration.Event.ConnectionUpdated, { integrationID: attempt.integrationID });
|
|
285
|
-
yield* bus.publish(Integration.Event.Updated, {});
|
|
286
289
|
}));
|
|
287
290
|
});
|
|
288
291
|
const scrub = Effect.fnUntraced(function* () {
|
|
@@ -464,7 +467,7 @@ var layer = Layer.effect(Service, Effect.gen(function* () {
|
|
|
464
467
|
if (!method.form && Object.keys(answer).length > 0) {
|
|
465
468
|
return yield* new AuthorizationError({ cause: new Error("Key method does not accept a form answer") });
|
|
466
469
|
}
|
|
467
|
-
yield*
|
|
470
|
+
yield* createCredential({
|
|
468
471
|
integrationID: input.integrationID,
|
|
469
472
|
label: input.label,
|
|
470
473
|
value: exports_credential.Key.make({
|
|
@@ -473,25 +476,18 @@ var layer = Layer.effect(Service, Effect.gen(function* () {
|
|
|
473
476
|
...Object.keys(answer).length > 0 ? { configuration: answer } : {}
|
|
474
477
|
})
|
|
475
478
|
});
|
|
476
|
-
yield* bus.publish(Integration.Event.ConnectionUpdated, { integrationID: input.integrationID });
|
|
477
|
-
yield* bus.publish(Integration.Event.Updated, {});
|
|
478
479
|
}),
|
|
479
|
-
|
|
480
|
+
activate: Effect.fn("Integration.connection.activate")(function* (credentialID) {
|
|
480
481
|
const credential = yield* credentials.get(credentialID);
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
482
|
+
if (!credential)
|
|
483
|
+
return;
|
|
484
|
+
const active = resolveConnections(state.get().integrations.get(credential.integrationID), yield* credentials.list(credential.integrationID))[0];
|
|
485
|
+
if (active?.type === "credential" && active.id === credentialID)
|
|
486
|
+
return;
|
|
487
|
+
yield* credentials.activate(credentialID);
|
|
486
488
|
}),
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
yield* credentials.remove(credentialID);
|
|
490
|
-
if (credential) {
|
|
491
|
-
yield* bus.publish(Integration.Event.ConnectionUpdated, { integrationID: credential.integrationID });
|
|
492
|
-
}
|
|
493
|
-
yield* bus.publish(Integration.Event.Updated, {});
|
|
494
|
-
})
|
|
489
|
+
update: Effect.fn("Integration.connection.update")((credentialID, updates) => credentials.update(credentialID, updates)),
|
|
490
|
+
remove: Effect.fn("Integration.connection.remove")((credentialID) => credentials.remove(credentialID))
|
|
495
491
|
},
|
|
496
492
|
oauth: {
|
|
497
493
|
connect: connectOAuth,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
exports_history
|
|
3
|
-
} from "./state-
|
|
3
|
+
} from "./state-6embh6xw.js";
|
|
4
|
+
import {
|
|
5
|
+
fromRow
|
|
6
|
+
} from "./state-4fa10fyv.js";
|
|
4
7
|
import {
|
|
5
8
|
SessionMessageTable,
|
|
6
9
|
SessionTable
|
|
7
10
|
} from "./state-ygy0xbqa.js";
|
|
8
|
-
import {
|
|
9
|
-
fromRow
|
|
10
|
-
} from "./state-3mexq3pq.js";
|
|
11
11
|
import {
|
|
12
12
|
exports_database
|
|
13
|
-
} from "./state-
|
|
13
|
+
} from "./state-1z63g373.js";
|
|
14
14
|
import {
|
|
15
15
|
__export
|
|
16
16
|
} from "./state-rvfvac9x.js";
|