@opencode-ai/core 0.0.0-beta-17728 → 0.0.0-beta-17793
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 +55 -55
- package/dist/aisdk.js +1 -1
- package/dist/bus.js +54 -54
- package/dist/catalog.js +60 -60
- package/dist/chunks/{workspace-7ydvt0cn.js → workspace-0a6rv85p.js} +2 -2
- package/dist/chunks/{workspace-y0b7h1zm.js → workspace-0ankgmxn.js} +2 -2
- package/dist/chunks/{workspace-qsgvz7g8.js → workspace-0b17sr9d.js} +5 -0
- package/dist/chunks/{workspace-r6fg1hkq.js → workspace-0bxpjz5v.js} +7 -7
- package/dist/chunks/{workspace-b9wjddqq.js → workspace-12te9h01.js} +6 -6
- package/dist/chunks/{workspace-542hpkbj.js → workspace-1afm1b6n.js} +6 -6
- package/dist/chunks/{workspace-eymrs8ew.js → workspace-1x1rapwb.js} +1 -1
- package/dist/chunks/{workspace-62hqezf8.js → workspace-20m6kz67.js} +1 -1
- package/dist/chunks/{workspace-3zpfm7cp.js → workspace-29g7zza5.js} +6 -6
- package/dist/chunks/{workspace-90gmgs4x.js → workspace-37d718jr.js} +9 -9
- package/dist/chunks/{workspace-pravh8e3.js → workspace-38y8nwsh.js} +6 -6
- package/dist/chunks/{workspace-g0crqrc2.js → workspace-3zgv951r.js} +10 -10
- package/dist/chunks/{workspace-hrep3ykt.js → workspace-4s6c9e56.js} +5 -5
- package/dist/chunks/{workspace-ard6xt9g.js → workspace-5hakc3n5.js} +2 -2
- package/dist/chunks/{workspace-d6a81qeg.js → workspace-5mg8q2r2.js} +1 -1
- package/dist/chunks/{workspace-vrvhhgwk.js → workspace-5p73vhh3.js} +9 -9
- package/dist/chunks/{workspace-mjat1551.js → workspace-5qqhchyw.js} +12 -12
- package/dist/chunks/{workspace-p76g51s8.js → workspace-6103r997.js} +3 -3
- package/dist/chunks/{workspace-2zg2bwk8.js → workspace-62faaqw9.js} +3 -3
- package/dist/chunks/{workspace-1z2gdby2.js → workspace-6p15na29.js} +1 -1
- package/dist/chunks/{workspace-atjbfv7r.js → workspace-6prg4qz0.js} +1 -1
- package/dist/chunks/{workspace-c1eth9b5.js → workspace-76qm5nqf.js} +10 -29
- package/dist/chunks/{workspace-fcgydxrm.js → workspace-7f3c62hs.js} +10 -10
- package/dist/chunks/{workspace-b8rm84kg.js → workspace-7gqqz1s8.js} +2 -162
- package/dist/chunks/{workspace-pjg7v2c2.js → workspace-8jssm6tx.js} +3 -3
- package/dist/chunks/{workspace-fcpmx6c6.js → workspace-8t1bhfvh.js} +1 -1
- package/dist/chunks/{workspace-4gm39vc0.js → workspace-92cpjck4.js} +14 -14
- package/dist/chunks/{workspace-g58f6qy3.js → workspace-9jeda383.js} +1 -1
- package/dist/chunks/{workspace-gfqm9jc2.js → workspace-9jzaagxn.js} +7 -7
- package/dist/chunks/{workspace-0tse6crn.js → workspace-9z7sbd73.js} +1 -1
- package/dist/chunks/{workspace-b5njd4gp.js → workspace-a7458xm9.js} +1 -1
- package/dist/chunks/{workspace-3sjkbjbh.js → workspace-adfr8vkf.js} +3 -3
- package/dist/chunks/{workspace-vg3gxz15.js → workspace-afy8tpbe.js} +1 -1
- package/dist/chunks/{workspace-d6s8p2vk.js → workspace-aqg9wnx6.js} +3 -1
- package/dist/chunks/{workspace-czrtce5t.js → workspace-azhye5zs.js} +10 -10
- package/dist/chunks/{workspace-1mzs2gbp.js → workspace-b04yncak.js} +4 -4
- package/dist/chunks/{workspace-p5fvt5wk.js → workspace-b2csa971.js} +5 -5
- package/dist/chunks/{workspace-dy7dh4rb.js → workspace-bd453e9f.js} +2 -2
- package/dist/chunks/{workspace-52myrd5r.js → workspace-bftvctww.js} +1 -1
- package/dist/chunks/{workspace-r66pqccc.js → workspace-bg6er1xr.js} +42 -17
- package/dist/chunks/{workspace-tt2xddbf.js → workspace-byr5z3qa.js} +88 -88
- package/dist/chunks/{workspace-b477gca3.js → workspace-c16qn48m.js} +3 -3
- package/dist/chunks/{workspace-2fwsdk3a.js → workspace-c8h311wd.js} +23 -23
- package/dist/chunks/{workspace-8mj3f4mv.js → workspace-cd4gxvhq.js} +11 -11
- package/dist/chunks/{workspace-ntzxc0jn.js → workspace-ctdgtkbw.js} +4 -4
- package/dist/chunks/{workspace-md5jaask.js → workspace-d0r2hzy0.js} +1 -1
- package/dist/chunks/{workspace-fwtk8ym7.js → workspace-d9bbznyn.js} +2 -2
- package/dist/chunks/{workspace-c3zqsg3q.js → workspace-daqkr6yp.js} +2 -2
- package/dist/chunks/{workspace-rnzrc4h3.js → workspace-dfrm5wx2.js} +8 -8
- package/dist/chunks/{workspace-kj1ajs9d.js → workspace-dfspp6r4.js} +9 -9
- package/dist/chunks/{workspace-rdgshxnb.js → workspace-dmq0pk88.js} +1 -1
- package/dist/chunks/{workspace-23mrxj1z.js → workspace-dstxtxkt.js} +1 -1
- package/dist/chunks/{workspace-sthz35eq.js → workspace-dt2pbfh8.js} +66 -66
- package/dist/chunks/{workspace-s6g6g4wn.js → workspace-dtq2eppm.js} +5 -5
- package/dist/chunks/{workspace-a67bq5a9.js → workspace-dvghb557.js} +2 -2
- package/dist/chunks/{workspace-g71xsz50.js → workspace-e1fj3hnt.js} +4 -4
- package/dist/chunks/{workspace-bt40hje9.js → workspace-e8j1nhvt.js} +2 -2
- package/dist/chunks/{workspace-yz0wm9s3.js → workspace-e9yfe4g9.js} +1 -1
- package/dist/chunks/{workspace-m70vpsdq.js → workspace-ef1ebqv9.js} +1 -1
- package/dist/chunks/{workspace-g9xk0fp4.js → workspace-egfckg0q.js} +49 -49
- package/dist/chunks/{workspace-se1c3nna.js → workspace-emcgmnta.js} +5 -5
- package/dist/chunks/{workspace-jsz1keww.js → workspace-f56b6eec.js} +10 -10
- package/dist/chunks/{workspace-wrxb8r8b.js → workspace-fgk5sp52.js} +2 -2
- package/dist/chunks/{workspace-8j7q3az7.js → workspace-fx25bfyk.js} +2 -2
- package/dist/chunks/{workspace-6k2gs826.js → workspace-fycc0m1w.js} +6 -6
- package/dist/chunks/{workspace-mh4qv5pj.js → workspace-ghg83jvf.js} +12 -12
- package/dist/chunks/{workspace-wkxytz5r.js → workspace-h3vs7mve.js} +1 -1
- package/dist/chunks/{workspace-g0mkpa64.js → workspace-h6r3t75p.js} +2 -2
- package/dist/chunks/{workspace-ybk1zn4f.js → workspace-hhffyw1t.js} +5 -5
- package/dist/chunks/{workspace-y3mwbphg.js → workspace-hwx2w7zf.js} +1 -1
- package/dist/chunks/{workspace-s50pr0y2.js → workspace-j1zjb56y.js} +3 -3
- package/dist/chunks/workspace-jmmc1vfj.js +177 -0
- package/dist/chunks/{workspace-r2rbw5tv.js → workspace-k1b850en.js} +3 -3
- package/dist/chunks/{workspace-4mgybwn2.js → workspace-ks77wmnj.js} +1 -1
- package/dist/chunks/{workspace-d6d2y6z3.js → workspace-kwbvxbjz.js} +1 -1
- package/dist/chunks/{workspace-mvqmrqwd.js → workspace-mceg3fc8.js} +13 -14
- package/dist/chunks/{workspace-a102bg6e.js → workspace-mjyfgnw8.js} +2 -2
- package/dist/chunks/{workspace-zjqk1kz3.js → workspace-mmbfffa0.js} +1 -1
- package/dist/chunks/{workspace-tgfxjpg6.js → workspace-mp82cem1.js} +9 -9
- package/dist/chunks/{workspace-t7n14jhv.js → workspace-mz28rckj.js} +2 -2
- package/dist/chunks/{workspace-g1sw3zg8.js → workspace-mznpwsa6.js} +3 -3
- package/dist/chunks/{workspace-8qmsdysr.js → workspace-n1869kza.js} +4 -4
- package/dist/chunks/{workspace-fq8eqd5r.js → workspace-n44ep8ax.js} +2 -2
- package/dist/chunks/{workspace-6v05w4qg.js → workspace-njrg7yr8.js} +1 -1
- package/dist/chunks/{workspace-6e6yzfbs.js → workspace-nxs45nrs.js} +17 -17
- package/dist/chunks/{workspace-f1fk1fwk.js → workspace-p6edj0et.js} +36 -34
- package/dist/chunks/{workspace-jeqzp82b.js → workspace-p7enbrfs.js} +1 -1
- package/dist/chunks/{workspace-2q1fvqax.js → workspace-pcp53y3y.js} +1 -1
- package/dist/chunks/{workspace-814sw5b8.js → workspace-pd55t4m6.js} +29 -29
- package/dist/chunks/{workspace-rqnb0dc3.js → workspace-ppea70bb.js} +1 -1
- package/dist/chunks/{workspace-yzbgy9nd.js → workspace-ppg6z601.js} +5 -5
- package/dist/chunks/{workspace-6503fc24.js → workspace-pqg6v7an.js} +4 -4
- package/dist/chunks/{workspace-tz7xrhct.js → workspace-pw5qhcym.js} +44 -38
- package/dist/chunks/{workspace-9vcje7gs.js → workspace-q1q6wfxa.js} +7 -7
- package/dist/chunks/{workspace-yeep7k6z.js → workspace-r0chg1wz.js} +5 -5
- package/dist/chunks/{workspace-fpfxym37.js → workspace-r15s1bd3.js} +2 -2
- package/dist/chunks/{workspace-ej8mqssz.js → workspace-r9bsqnhw.js} +4 -4
- package/dist/chunks/{workspace-5p6y381a.js → workspace-rbn77fxp.js} +1 -1
- package/dist/chunks/{workspace-q1dc5e6j.js → workspace-rgk2vntt.js} +2 -2
- package/dist/chunks/{workspace-z3rydcef.js → workspace-s6zr15p0.js} +1 -1
- package/dist/chunks/{workspace-mvg5hf3w.js → workspace-s7pbx90j.js} +4 -4
- package/dist/chunks/{workspace-41db28r2.js → workspace-sney8k4p.js} +23 -19
- package/dist/chunks/{workspace-fvfr1h9h.js → workspace-sphyh08q.js} +8 -8
- package/dist/chunks/{workspace-awt1vy08.js → workspace-st1tmxxz.js} +2 -2
- package/dist/chunks/{workspace-bffjrazf.js → workspace-swnnf7jm.js} +1 -1
- package/dist/chunks/{workspace-23pmvn2v.js → workspace-t2ccr6s6.js} +0 -10
- package/dist/chunks/{workspace-5v0jvcad.js → workspace-thrfs9vw.js} +4 -4
- package/dist/chunks/{workspace-f1mxyn57.js → workspace-thrqaz0e.js} +2 -2
- package/dist/chunks/{workspace-trb4b12r.js → workspace-tk479mxv.js} +2 -2
- package/dist/chunks/{workspace-zjcjb8a1.js → workspace-tsj2cygv.js} +21 -21
- package/dist/chunks/{workspace-vpv9n6y4.js → workspace-v4xjagz7.js} +6 -6
- package/dist/chunks/{workspace-y1gjwkyb.js → workspace-vfekzexe.js} +1 -1
- package/dist/chunks/{workspace-4d67s52a.js → workspace-vgjwjeca.js} +1 -1
- package/dist/chunks/{workspace-bfkpqtqx.js → workspace-vptxxpwc.js} +3 -3
- package/dist/chunks/{workspace-vjshw6kw.js → workspace-vq4xdzwy.js} +2 -2
- package/dist/chunks/{workspace-gvgy736b.js → workspace-vxayaa8z.js} +1 -1
- package/dist/chunks/{workspace-67w1s9dj.js → workspace-vzsgyrq1.js} +1 -1
- package/dist/chunks/{workspace-azfr4z12.js → workspace-wwkgmt0p.js} +5 -5
- package/dist/chunks/{workspace-xf8gwdhy.js → workspace-x6bsrrkz.js} +8 -8
- package/dist/chunks/{workspace-yw66mecz.js → workspace-x7z5vctn.js} +2 -2
- package/dist/chunks/{workspace-pxa9b4s7.js → workspace-xaf8phze.js} +63 -46
- package/dist/chunks/{workspace-5zfpf3c3.js → workspace-xp27tpff.js} +32 -44
- package/dist/chunks/{workspace-rvtzwf9v.js → workspace-xvjmrenr.js} +4 -4
- package/dist/chunks/{workspace-c6137mdz.js → workspace-y44ckmk4.js} +7 -7
- package/dist/chunks/{workspace-y9w1r2sz.js → workspace-yw6774fb.js} +3 -3
- package/dist/chunks/{workspace-c67gxqy3.js → workspace-z5tq16yp.js} +147 -147
- package/dist/chunks/{workspace-h39nbqxt.js → workspace-z6g48jge.js} +1 -1
- package/dist/chunks/{workspace-7yt03gw4.js → workspace-zebyd4z6.js} +2 -2
- package/dist/chunks/{workspace-nr7nt42m.js → workspace-zeqnj68x.js} +7 -7
- package/dist/chunks/{workspace-44dp1sb2.js → workspace-zqdn9cme.js} +3 -3
- package/dist/codemode/tool.js +2 -2
- package/dist/command.js +73 -73
- package/dist/config/normalize.js +9 -9
- package/dist/config/plugin/agent.js +92 -92
- package/dist/config/plugin/command.js +91 -91
- package/dist/config/plugin/compaction.js +126 -106
- package/dist/config/plugin/formatter.js +81 -81
- package/dist/config/plugin/image.js +88 -88
- package/dist/config/plugin/instruction.js +63 -63
- package/dist/config/plugin/location-watcher.js +80 -80
- package/dist/config/plugin/mcp.js +89 -89
- package/dist/config/plugin/policy.js +80 -80
- package/dist/config/plugin/provider.js +80 -80
- package/dist/config/plugin/reference.js +83 -83
- package/dist/config/plugin/shell.js +80 -80
- package/dist/config/plugin/skill-file.js +74 -74
- package/dist/config/plugin/skill.js +94 -94
- package/dist/config/plugin/snapshot.js +81 -81
- package/dist/config/plugin/source.js +80 -80
- package/dist/config/plugin/tool-output.js +81 -81
- package/dist/config/plugin/websearch.js +80 -80
- package/dist/config.js +79 -79
- package/dist/credential.js +54 -54
- package/dist/database/database.js +53 -53
- package/dist/database/drizzle/effect-sqlite/driver.js +9 -9
- package/dist/database/drizzle/effect-sqlite/index.js +9 -9
- package/dist/database/drizzle/effect-sqlite/migrator.js +8 -8
- package/dist/database/drizzle/effect-sqlite/session.js +8 -8
- package/dist/database/drizzle/index.js +11 -11
- package/dist/database/drizzle/sqlite-core/effect/db.js +5 -5
- package/dist/database/drizzle/sqlite-core/effect/index.js +16 -16
- package/dist/database/drizzle/sqlite-core/effect/session.js +7 -7
- package/dist/database/drizzle.js +11 -11
- package/dist/database/migration.gen.js +34 -34
- package/dist/database/migration.js +35 -35
- package/dist/database/v1-migration.bun.js +54 -54
- package/dist/effect/app-node-builder.js +265 -265
- package/dist/environment/environment.js +65 -65
- package/dist/environment/index.js +67 -67
- package/dist/event-logger.js +54 -54
- package/dist/file-mutation.js +66 -66
- package/dist/filesystem/location-watcher.js +242 -239
- package/dist/filesystem/search.js +67 -67
- package/dist/filesystem.js +67 -67
- package/dist/form.js +55 -55
- package/dist/formatter.js +61 -61
- package/dist/generate.js +63 -63
- package/dist/github-copilot/chat/openai-compatible-chat-language-model.js +4 -4
- package/dist/github-copilot/copilot-provider.js +10 -10
- package/dist/github-copilot/responses/openai-responses-language-model.js +5 -5
- package/dist/github-copilot/responses/openai-responses-prepare-tools.js +3 -3
- package/dist/image/photon.js +68 -68
- package/dist/image.js +68 -68
- package/dist/instruction-discovery.js +56 -56
- package/dist/instructions/builtins.js +62 -62
- package/dist/integration.js +57 -57
- package/dist/kv.js +54 -54
- package/dist/location-mutation.js +61 -61
- package/dist/location-service-map.js +60 -60
- package/dist/location-services.js +265 -265
- package/dist/location.js +60 -60
- package/dist/mcp/client.js +66 -66
- package/dist/mcp/index.js +71 -71
- package/dist/mcp/instructions.js +94 -94
- package/dist/mcp/stdio.js +66 -66
- package/dist/model-resolver.js +62 -62
- package/dist/models-dev.js +56 -56
- package/dist/permission/saved.js +60 -60
- package/dist/permission/sql.js +1 -1
- package/dist/permission.js +72 -72
- package/dist/plugin/agent.js +73 -73
- package/dist/plugin/command.js +61 -61
- package/dist/plugin/host.js +125 -125
- package/dist/plugin/internal.js +236 -233
- package/dist/plugin/models-dev.js +57 -57
- package/dist/plugin/plan.js +89 -56
- package/dist/plugin/provider/azure.js +85 -85
- package/dist/plugin/provider/cloudflare-ai-gateway.js +86 -86
- package/dist/plugin/provider/cloudflare-workers-ai.js +86 -86
- package/dist/plugin/provider/configured.js +84 -84
- package/dist/plugin/provider/github-copilot.js +62 -62
- package/dist/plugin/provider/llmgateway.js +59 -59
- package/dist/plugin/provider/lmstudio.js +80 -80
- package/dist/plugin/provider/ollama.js +80 -80
- package/dist/plugin/provider/openai.js +60 -60
- package/dist/plugin/provider/opencode.js +68 -68
- package/dist/plugin/provider/vllm.js +80 -80
- package/dist/plugin/provider/xai.js +59 -59
- package/dist/plugin/provider.js +117 -117
- package/dist/plugin/runtime.js +114 -114
- package/dist/plugin/sdk.js +55 -55
- package/dist/plugin/skill.js +94 -94
- package/dist/plugin/supervisor.js +242 -239
- package/dist/plugin/system-prompt.js +1 -3
- package/dist/plugin/warming.js +80 -80
- package/dist/plugin/websearch/index.js +2 -2
- package/dist/plugin.js +126 -126
- package/dist/project/sql.js +1 -1
- package/dist/project.js +59 -59
- package/dist/pty/ticket.js +55 -55
- package/dist/pty.js +61 -61
- package/dist/reference/instructions.js +61 -61
- package/dist/reference.js +59 -59
- package/dist/ripgrep.js +66 -66
- package/dist/session/compaction.js +110 -88
- package/dist/session/context.js +248 -245
- package/dist/session/execution/restart.js +83 -83
- package/dist/session/execution.js +83 -83
- package/dist/session/generate-node.js +249 -249
- package/dist/session/history.js +57 -57
- package/dist/session/inbox.js +55 -55
- package/dist/session/info.js +65 -65
- package/dist/session/instruction-entry.js +56 -56
- package/dist/session/instruction-state.js +2 -2
- package/dist/session/instructions.js +70 -70
- package/dist/session/model-headers.js +1 -1
- package/dist/session/model-request.js +103 -103
- package/dist/session/projector.js +62 -62
- package/dist/session/revert.js +62 -62
- package/dist/session/runner/index.js +63 -63
- package/dist/session/runner/llm.js +252 -252
- package/dist/session/runner/model.js +63 -63
- package/dist/session/runner/retry.js +55 -55
- package/dist/session/runner/to-llm-message.js +1 -1
- package/dist/session/sql.js +1 -1
- package/dist/session/store.js +69 -69
- package/dist/session/title.js +107 -82
- package/dist/session/to-session-error.js +82 -82
- package/dist/session/transfer.js +120 -120
- package/dist/session.js +114 -114
- package/dist/shell.js +69 -69
- package/dist/skill/instructions.js +74 -74
- package/dist/skill.js +73 -73
- package/dist/snapshot.js +61 -61
- package/dist/tool/mcp.js +93 -93
- package/dist/tool/plugin/edit.js +81 -81
- package/dist/tool/plugin/glob.js +84 -84
- package/dist/tool/plugin/grep.js +84 -84
- package/dist/tool/plugin/patch.js +81 -81
- package/dist/tool/plugin/question.js +74 -74
- package/dist/tool/plugin/read.js +86 -86
- package/dist/tool/plugin/shell.js +135 -135
- package/dist/tool/plugin/skill.js +74 -74
- package/dist/tool/plugin/subagent.js +133 -133
- package/dist/tool/plugin/webfetch.js +73 -73
- package/dist/tool/plugin/websearch.js +76 -76
- package/dist/tool/plugin/write.js +81 -81
- package/dist/tool/read-filesystem.js +68 -68
- package/dist/tool/runtime.js +1 -1
- package/dist/tool.js +86 -86
- package/dist/types/location-service-map.d.ts +2 -2
- package/dist/types/location-services.d.ts +1 -1
- package/dist/types/plugin/host.d.ts +8 -0
- package/dist/types/plugin/plan.d.ts +3 -1
- package/dist/types/plugin/system-prompt.d.ts +1 -2
- package/dist/types/session/compaction.d.ts +4 -3
- package/dist/types/session/model-request.d.ts +8 -1
- package/dist/types/session/title.d.ts +3 -2
- package/dist/v1/config/config.js +7 -7
- package/dist/v1/config/migrate.js +8 -8
- package/dist/vcs.js +62 -62
- package/dist/websearch.js +56 -56
- package/dist/wellknown/plugin.js +57 -57
- package/dist/wellknown.js +56 -56
- package/dist/workspace.js +55 -55
- package/dist/worktree/sql.js +1 -1
- package/dist/worktree.js +61 -61
- package/package.json +8 -8
- package/dist/chunks/workspace-dgagesms.js +0 -166
- package/dist/chunks/{workspace-n7qmgaea.js → workspace-75dc4a2v.js} +79 -79
- package/dist/chunks/{workspace-38t54vkz.js → workspace-7ard301f.js} +17 -17
- package/dist/chunks/{workspace-kmtnn037.js → workspace-95dhhjyp.js} +9 -9
- package/dist/chunks/{workspace-bk2c2kb7.js → workspace-b7wyyjhh.js} +0 -0
- package/dist/chunks/{workspace-xvawdh7j.js → workspace-dn5xz30q.js} +10 -10
- package/dist/chunks/{workspace-xsfdrhg6.js → workspace-dwvaj8pd.js} +3 -3
- package/dist/chunks/{workspace-na8kvh3y.js → workspace-pfrv4bm3.js} +6 -6
- package/dist/chunks/{workspace-fs1q3vja.js → workspace-ra765m8n.js} +6 -6
- package/dist/chunks/{workspace-ff2y1ddn.js → workspace-tva2scp3.js} +7 -7
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
exports_location_mutation
|
|
3
|
-
} from "./workspace-
|
|
3
|
+
} from "./workspace-thrqaz0e.js";
|
|
4
|
+
import {
|
|
5
|
+
exports_permission
|
|
6
|
+
} from "./workspace-dfspp6r4.js";
|
|
4
7
|
import {
|
|
5
8
|
exports_filesystem
|
|
6
|
-
} from "./workspace-
|
|
9
|
+
} from "./workspace-bd453e9f.js";
|
|
7
10
|
import {
|
|
8
11
|
exports_ripgrep
|
|
9
|
-
} from "./workspace-
|
|
12
|
+
} from "./workspace-hwx2w7zf.js";
|
|
10
13
|
import {
|
|
11
14
|
exports_environment1 as exports_environment
|
|
12
|
-
} from "./workspace-
|
|
13
|
-
import {
|
|
14
|
-
exports_permission
|
|
15
|
-
} from "./workspace-kj1ajs9d.js";
|
|
15
|
+
} from "./workspace-y44ckmk4.js";
|
|
16
16
|
import {
|
|
17
17
|
exports_location
|
|
18
|
-
} from "./workspace-
|
|
18
|
+
} from "./workspace-kwbvxbjz.js";
|
|
19
19
|
import {
|
|
20
20
|
RelativePath
|
|
21
21
|
} from "./workspace-j07kk359.js";
|
|
@@ -97,16 +97,6 @@ function prepareOptions(model, pkg) {
|
|
|
97
97
|
opts.signal = abortSignals[0];
|
|
98
98
|
if (abortSignals.length > 1)
|
|
99
99
|
opts.signal = AbortSignal.any(abortSignals);
|
|
100
|
-
if ((pkg === "@ai-sdk/openai" || pkg === "@ai-sdk/azure" || pkg === "@ai-sdk/amazon-bedrock/mantle") && opts.body && opts.method === "POST") {
|
|
101
|
-
const body = JSON.parse(opts.body);
|
|
102
|
-
if (body.store !== true && Array.isArray(body.input)) {
|
|
103
|
-
for (const item of body.input) {
|
|
104
|
-
if ("id" in item)
|
|
105
|
-
delete item.id;
|
|
106
|
-
}
|
|
107
|
-
opts.body = JSON.stringify(body);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
100
|
if (typeof opts.body === "string" && model.body !== undefined) {
|
|
111
101
|
const decoded = Option.getOrUndefined(decodeJson(opts.body));
|
|
112
102
|
if (Schema.is(Schema.Record(Schema.String, Schema.Json))(decoded)) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
exports_driver
|
|
3
|
-
} from "./workspace-t14kykx1.js";
|
|
4
1
|
import {
|
|
5
2
|
WorkspaceTable
|
|
6
3
|
} from "./workspace-3c4nztf9.js";
|
|
4
|
+
import {
|
|
5
|
+
exports_driver
|
|
6
|
+
} from "./workspace-t14kykx1.js";
|
|
7
7
|
import {
|
|
8
8
|
exports_database
|
|
9
|
-
} from "./workspace-
|
|
9
|
+
} from "./workspace-s7pbx90j.js";
|
|
10
10
|
import {
|
|
11
11
|
exports_keyed_mutex
|
|
12
12
|
} from "./workspace-0kvmztkf.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
exports_location
|
|
3
|
-
} from "./workspace-
|
|
3
|
+
} from "./workspace-kwbvxbjz.js";
|
|
4
4
|
import {
|
|
5
5
|
exports_project
|
|
6
|
-
} from "./workspace-
|
|
6
|
+
} from "./workspace-37d718jr.js";
|
|
7
7
|
import {
|
|
8
8
|
AbsolutePath
|
|
9
9
|
} from "./workspace-j07kk359.js";
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
} from "./workspace-19e1vard.js";
|
|
10
10
|
import {
|
|
11
11
|
exports_location
|
|
12
|
-
} from "./workspace-
|
|
12
|
+
} from "./workspace-kwbvxbjz.js";
|
|
13
13
|
import {
|
|
14
14
|
exports_bus
|
|
15
|
-
} from "./workspace-
|
|
15
|
+
} from "./workspace-njrg7yr8.js";
|
|
16
16
|
import {
|
|
17
17
|
__export,
|
|
18
18
|
__require
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
exports_environment1 as exports_environment
|
|
3
|
-
} from "./workspace-c6137mdz.js";
|
|
4
|
-
import {
|
|
5
|
-
exports_location
|
|
6
|
-
} from "./workspace-d6d2y6z3.js";
|
|
7
1
|
import {
|
|
8
2
|
exports_integration
|
|
9
|
-
} from "./workspace-
|
|
3
|
+
} from "./workspace-b2csa971.js";
|
|
4
|
+
import {
|
|
5
|
+
exports_form
|
|
6
|
+
} from "./workspace-vgjwjeca.js";
|
|
10
7
|
import {
|
|
11
8
|
exports_credential
|
|
12
|
-
} from "./workspace-
|
|
9
|
+
} from "./workspace-vzsgyrq1.js";
|
|
13
10
|
import {
|
|
14
|
-
|
|
15
|
-
} from "./workspace-
|
|
11
|
+
exports_environment1 as exports_environment
|
|
12
|
+
} from "./workspace-y44ckmk4.js";
|
|
13
|
+
import {
|
|
14
|
+
exports_location
|
|
15
|
+
} from "./workspace-kwbvxbjz.js";
|
|
16
16
|
import {
|
|
17
17
|
exports_state
|
|
18
18
|
} from "./workspace-f2kz495y.js";
|
|
19
19
|
import {
|
|
20
20
|
exports_bus
|
|
21
|
-
} from "./workspace-
|
|
21
|
+
} from "./workspace-njrg7yr8.js";
|
|
22
22
|
import {
|
|
23
23
|
exports_keyed_mutex
|
|
24
24
|
} from "./workspace-0kvmztkf.js";
|
|
@@ -60,7 +60,7 @@ import { McpEvent } from "@opencode-ai/schema/mcp-event";
|
|
|
60
60
|
import { Command } from "@opencode-ai/schema/command";
|
|
61
61
|
import { createHash } from "node:crypto";
|
|
62
62
|
import { isDeepStrictEqual } from "node:util";
|
|
63
|
-
import { Cause, Context,
|
|
63
|
+
import { Cause, Context, Effect, Exit, FiberSet, Latch, Layer, Schema, Scope, Stream } from "effect";
|
|
64
64
|
import { makeLocationNode } from "@opencode-ai/util/effect/app-node";
|
|
65
65
|
import { waitForAbort } from "@opencode-ai/util/process";
|
|
66
66
|
var ServerName = Schema.String.pipe(Schema.brand("MCP.ServerName"));
|
|
@@ -394,7 +394,7 @@ var layer = (options) => Layer.effect(Service, Effect.gen(function* () {
|
|
|
394
394
|
entry.status = error instanceof MCPClient.NeedsAuthError ? { status: "needs_auth" } : { status: "failed", error: error instanceof Error ? error.message : String(error) };
|
|
395
395
|
yield* Effect.logWarning("mcp connect failed", { server: name, status: entry.status });
|
|
396
396
|
yield* bus.publish(McpEvent.StatusChanged, { server: name }).pipe(Effect.ignore);
|
|
397
|
-
}).pipe(Effect.ensuring(
|
|
397
|
+
}).pipe(Effect.ensuring(entry.startup.open));
|
|
398
398
|
const stopServer = Effect.fnUntraced(function* (name, entry) {
|
|
399
399
|
const scope = entry.scope;
|
|
400
400
|
if (!scope)
|
|
@@ -422,7 +422,7 @@ var layer = (options) => Layer.effect(Service, Effect.gen(function* () {
|
|
|
422
422
|
const entry = {
|
|
423
423
|
config: serverConfig,
|
|
424
424
|
status: { status: "pending" },
|
|
425
|
-
startup:
|
|
425
|
+
startup: Latch.makeUnsafe()
|
|
426
426
|
};
|
|
427
427
|
entries.set(name, entry);
|
|
428
428
|
yield* Effect.gen(function* () {
|
|
@@ -433,7 +433,7 @@ var layer = (options) => Layer.effect(Service, Effect.gen(function* () {
|
|
|
433
433
|
return;
|
|
434
434
|
}
|
|
435
435
|
yield* startServer(name, entry);
|
|
436
|
-
}).pipe(Effect.ensuring(
|
|
436
|
+
}).pipe(Effect.ensuring(entry.startup.open));
|
|
437
437
|
});
|
|
438
438
|
const removeServer = Effect.fnUntraced(function* (name) {
|
|
439
439
|
const entry = entries.get(name);
|
|
@@ -452,7 +452,7 @@ var layer = (options) => Layer.effect(Service, Effect.gen(function* () {
|
|
|
452
452
|
entries.set(name, {
|
|
453
453
|
config: server,
|
|
454
454
|
status: { status: "pending" },
|
|
455
|
-
startup:
|
|
455
|
+
startup: Latch.makeUnsafe()
|
|
456
456
|
});
|
|
457
457
|
}
|
|
458
458
|
yield* Effect.forEach(entries, ([name, entry]) => register(name, entry), { discard: true });
|
|
@@ -460,7 +460,7 @@ var layer = (options) => Layer.effect(Service, Effect.gen(function* () {
|
|
|
460
460
|
for (const [name, entry] of entries) {
|
|
461
461
|
if (entry.config.disabled) {
|
|
462
462
|
entry.status = { status: "disabled" };
|
|
463
|
-
|
|
463
|
+
entry.startup.openUnsafe();
|
|
464
464
|
yield* bus.publish(McpEvent.StatusChanged, { server: name }).pipe(Effect.ignore);
|
|
465
465
|
continue;
|
|
466
466
|
}
|
|
@@ -523,7 +523,7 @@ var layer = (options) => Layer.effect(Service, Effect.gen(function* () {
|
|
|
523
523
|
}),
|
|
524
524
|
finalize: reconcile
|
|
525
525
|
});
|
|
526
|
-
const whenAllReady = Effect.suspend(() => Effect.forEach(Array.from(entries.values()), (entry) =>
|
|
526
|
+
const whenAllReady = Effect.suspend(() => Effect.forEach(Array.from(entries.values()), (entry) => entry.startup.await, {
|
|
527
527
|
concurrency: "unbounded",
|
|
528
528
|
discard: true
|
|
529
529
|
}));
|
|
@@ -567,7 +567,7 @@ var layer = (options) => Layer.effect(Service, Effect.gen(function* () {
|
|
|
567
567
|
}),
|
|
568
568
|
callTool: Effect.fn("MCP.callTool")(function* (input) {
|
|
569
569
|
const target = yield* requireServer(input.server);
|
|
570
|
-
yield*
|
|
570
|
+
yield* target.entry.startup.await;
|
|
571
571
|
if (!target.entry.client)
|
|
572
572
|
return yield* new ToolCallError({
|
|
573
573
|
server: target.name,
|
|
@@ -597,7 +597,7 @@ var layer = (options) => Layer.effect(Service, Effect.gen(function* () {
|
|
|
597
597
|
}),
|
|
598
598
|
prompt: Effect.fn("MCP.prompt")(function* (input) {
|
|
599
599
|
const target = yield* requireServer(input.server);
|
|
600
|
-
yield*
|
|
600
|
+
yield* target.entry.startup.await;
|
|
601
601
|
if (!target.entry.client)
|
|
602
602
|
return;
|
|
603
603
|
const result = yield* target.entry.client.prompt({ name: input.name, args: input.args }).pipe(Effect.catch(() => Effect.succeed(undefined)));
|
|
@@ -629,7 +629,7 @@ var layer = (options) => Layer.effect(Service, Effect.gen(function* () {
|
|
|
629
629
|
}),
|
|
630
630
|
readResource: Effect.fn("MCP.readResource")(function* (input) {
|
|
631
631
|
const target = yield* requireServer(input.server);
|
|
632
|
-
yield*
|
|
632
|
+
yield* target.entry.startup.await;
|
|
633
633
|
if (!target.entry.client)
|
|
634
634
|
return;
|
|
635
635
|
const result = yield* target.entry.client.readResource({ uri: input.uri }).pipe(Effect.catch(() => Effect.succeed(undefined)));
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
exports_tool
|
|
3
|
-
} from "./workspace-
|
|
3
|
+
} from "./workspace-e9yfe4g9.js";
|
|
4
4
|
import {
|
|
5
5
|
definition,
|
|
6
6
|
execute,
|
|
7
7
|
normalizeContent
|
|
8
|
-
} from "./workspace-
|
|
8
|
+
} from "./workspace-aqg9wnx6.js";
|
|
9
|
+
import {
|
|
10
|
+
exports_wildcard
|
|
11
|
+
} from "./workspace-y67x6rf6.js";
|
|
9
12
|
import {
|
|
10
13
|
exports_image
|
|
11
|
-
} from "./workspace-
|
|
14
|
+
} from "./workspace-b7wyyjhh.js";
|
|
12
15
|
import {
|
|
13
16
|
exports_hooks
|
|
14
17
|
} from "./workspace-v2wshkax.js";
|
|
15
|
-
import {
|
|
16
|
-
exports_wildcard
|
|
17
|
-
} from "./workspace-y67x6rf6.js";
|
|
18
18
|
import {
|
|
19
19
|
__export
|
|
20
20
|
} from "./workspace-rvfvac9x.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
exports_mcp as exports_mcp2
|
|
3
|
-
} from "./workspace-
|
|
3
|
+
} from "./workspace-29g7zza5.js";
|
|
4
4
|
import {
|
|
5
5
|
exports_mcp
|
|
6
|
-
} from "./workspace-
|
|
6
|
+
} from "./workspace-tsj2cygv.js";
|
|
7
7
|
import {
|
|
8
8
|
exports_permission
|
|
9
|
-
} from "./workspace-
|
|
9
|
+
} from "./workspace-dfspp6r4.js";
|
|
10
10
|
import {
|
|
11
11
|
exports_instructions
|
|
12
12
|
} from "./workspace-ec8vrfw5.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
exports_config
|
|
3
|
-
} from "./workspace-
|
|
3
|
+
} from "./workspace-ghg83jvf.js";
|
|
4
4
|
import {
|
|
5
5
|
exports_watcher
|
|
6
6
|
} from "./workspace-y980s7ka.js";
|
|
7
7
|
import {
|
|
8
8
|
exports_location
|
|
9
|
-
} from "./workspace-
|
|
9
|
+
} from "./workspace-kwbvxbjz.js";
|
|
10
10
|
import {
|
|
11
11
|
__export
|
|
12
12
|
} from "./workspace-rvfvac9x.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
exports_history
|
|
3
|
-
} from "./workspace-fs1q3vja.js";
|
|
4
1
|
import {
|
|
5
2
|
fromRow
|
|
6
|
-
} from "./workspace-
|
|
3
|
+
} from "./workspace-5qqhchyw.js";
|
|
4
|
+
import {
|
|
5
|
+
exports_history
|
|
6
|
+
} from "./workspace-ra765m8n.js";
|
|
7
7
|
import {
|
|
8
8
|
SessionMessageTable,
|
|
9
9
|
SessionTable
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./workspace-25pxtba7.js";
|
|
14
14
|
import {
|
|
15
15
|
exports_database
|
|
16
|
-
} from "./workspace-
|
|
16
|
+
} from "./workspace-s7pbx90j.js";
|
|
17
17
|
import {
|
|
18
18
|
__export
|
|
19
19
|
} from "./workspace-rvfvac9x.js";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
exports_location_mutation
|
|
3
|
-
} from "./workspace-
|
|
3
|
+
} from "./workspace-thrqaz0e.js";
|
|
4
|
+
import {
|
|
5
|
+
exports_permission
|
|
6
|
+
} from "./workspace-dfspp6r4.js";
|
|
4
7
|
import {
|
|
5
8
|
exports_filesystem
|
|
6
|
-
} from "./workspace-
|
|
9
|
+
} from "./workspace-bd453e9f.js";
|
|
7
10
|
import {
|
|
8
11
|
exports_ripgrep
|
|
9
|
-
} from "./workspace-
|
|
12
|
+
} from "./workspace-hwx2w7zf.js";
|
|
10
13
|
import {
|
|
11
14
|
exports_environment1 as exports_environment
|
|
12
|
-
} from "./workspace-
|
|
13
|
-
import {
|
|
14
|
-
exports_permission
|
|
15
|
-
} from "./workspace-kj1ajs9d.js";
|
|
15
|
+
} from "./workspace-y44ckmk4.js";
|
|
16
16
|
import {
|
|
17
17
|
exports_location
|
|
18
|
-
} from "./workspace-
|
|
18
|
+
} from "./workspace-kwbvxbjz.js";
|
|
19
19
|
import {
|
|
20
20
|
RelativePath
|
|
21
21
|
} from "./workspace-j07kk359.js";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./workspace-nesb2rcz.js";
|
|
4
4
|
import {
|
|
5
5
|
exports_project
|
|
6
|
-
} from "./workspace-
|
|
6
|
+
} from "./workspace-37d718jr.js";
|
|
7
7
|
import {
|
|
8
8
|
exports_database
|
|
9
|
-
} from "./workspace-
|
|
9
|
+
} from "./workspace-s7pbx90j.js";
|
|
10
10
|
import {
|
|
11
11
|
__export
|
|
12
12
|
} from "./workspace-rvfvac9x.js";
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
exports_parse
|
|
3
3
|
} from "./workspace-fjtxtbhx.js";
|
|
4
|
+
import {
|
|
5
|
+
exports_config
|
|
6
|
+
} from "./workspace-ghg83jvf.js";
|
|
7
|
+
import {
|
|
8
|
+
exports_tool_output
|
|
9
|
+
} from "./workspace-81wsrtjr.js";
|
|
4
10
|
import {
|
|
5
11
|
exports_runtime
|
|
6
|
-
} from "./workspace-
|
|
12
|
+
} from "./workspace-0bxpjz5v.js";
|
|
7
13
|
import {
|
|
8
14
|
exports_location_mutation
|
|
9
|
-
} from "./workspace-
|
|
10
|
-
import {
|
|
11
|
-
exports_config
|
|
12
|
-
} from "./workspace-mh4qv5pj.js";
|
|
15
|
+
} from "./workspace-thrqaz0e.js";
|
|
13
16
|
import {
|
|
14
17
|
exports_shell
|
|
15
|
-
} from "./workspace-
|
|
16
|
-
import {
|
|
17
|
-
exports_environment1 as exports_environment
|
|
18
|
-
} from "./workspace-c6137mdz.js";
|
|
19
|
-
import {
|
|
20
|
-
exports_tool_output
|
|
21
|
-
} from "./workspace-81wsrtjr.js";
|
|
18
|
+
} from "./workspace-nxs45nrs.js";
|
|
22
19
|
import {
|
|
23
20
|
exports_permission
|
|
24
|
-
} from "./workspace-
|
|
21
|
+
} from "./workspace-dfspp6r4.js";
|
|
22
|
+
import {
|
|
23
|
+
exports_environment1 as exports_environment
|
|
24
|
+
} from "./workspace-y44ckmk4.js";
|
|
25
25
|
import {
|
|
26
26
|
NonNegativeInt
|
|
27
27
|
} from "./workspace-j07kk359.js";
|
|
@@ -79,12 +79,29 @@ var Output = Schema.Struct({
|
|
|
79
79
|
output: Schema.String,
|
|
80
80
|
status: Schema.optionalKey(Schema.Literals(["completed", "running"]))
|
|
81
81
|
});
|
|
82
|
-
var
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
82
|
+
var resultMessages = (output) => {
|
|
83
|
+
const notice = (() => {
|
|
84
|
+
if (output.status === "running")
|
|
85
|
+
return BACKGROUND_INSTRUCTION;
|
|
86
|
+
if (output.timeout)
|
|
87
|
+
return "Command timed out before completion.";
|
|
88
|
+
if (output.exit !== undefined)
|
|
89
|
+
return `Command exited with code ${output.exit}.`;
|
|
90
|
+
})();
|
|
91
|
+
return [output.output, ...notice ? [notice] : []];
|
|
92
|
+
};
|
|
93
|
+
var toolResult = (output) => {
|
|
94
|
+
return {
|
|
95
|
+
output,
|
|
96
|
+
content: resultMessages(output).map((text) => ({ type: "text", text })),
|
|
97
|
+
metadata: {
|
|
98
|
+
status: output.status,
|
|
99
|
+
truncated: output.truncated,
|
|
100
|
+
...output.exit !== undefined ? { exit: output.exit } : {},
|
|
101
|
+
...output.shellID !== undefined ? { shellID: output.shellID } : {},
|
|
102
|
+
...output.timeout !== undefined ? { timeout: output.timeout } : {}
|
|
103
|
+
}
|
|
104
|
+
};
|
|
88
105
|
};
|
|
89
106
|
var Plugin = {
|
|
90
107
|
id: "opencode.tool.shell",
|
|
@@ -96,21 +113,37 @@ var Plugin = {
|
|
|
96
113
|
const shell = yield* exports_shell.Service;
|
|
97
114
|
const permission = yield* exports_permission.Service;
|
|
98
115
|
const config = yield* exports_config.Service;
|
|
99
|
-
const notifyWhenDone = Effect.fn("ShellTool.notifyWhenDone")(function* (sessionID, id, command) {
|
|
100
|
-
yield* runtime.job.wait({ id }).pipe(Effect.flatMap((result) => {
|
|
101
|
-
const
|
|
116
|
+
const notifyWhenDone = Effect.fn("ShellTool.notifyWhenDone")(function* (sessionID, id, shellID, command, settled) {
|
|
117
|
+
yield* runtime.job.wait({ id }).pipe(Effect.flatMap((result) => Effect.gen(function* () {
|
|
118
|
+
const info = result.info;
|
|
119
|
+
if (!info)
|
|
120
|
+
return;
|
|
121
|
+
const state = info.status === "completed" ? "completed" : info.status === "error" ? "error" : info.status === "cancelled" ? "cancelled" : undefined;
|
|
102
122
|
if (state === undefined)
|
|
103
|
-
return
|
|
104
|
-
const
|
|
105
|
-
|
|
123
|
+
return;
|
|
124
|
+
const output = state === "completed" ? yield* Deferred.await(settled) : undefined;
|
|
125
|
+
const text = output ? resultMessages(output).join(`
|
|
126
|
+
|
|
127
|
+
`) : state === "error" ? info.error ?? "Command failed" : "Command cancelled";
|
|
128
|
+
yield* runtime.session.synthetic({
|
|
106
129
|
sessionID,
|
|
107
130
|
text: `<shell id="${id}" state="${state}" command="${command}">
|
|
108
131
|
${text}
|
|
109
132
|
</shell>`,
|
|
110
133
|
description: command,
|
|
111
|
-
metadata: {
|
|
134
|
+
metadata: {
|
|
135
|
+
source: "shell",
|
|
136
|
+
jobID: id,
|
|
137
|
+
shellID,
|
|
138
|
+
state,
|
|
139
|
+
...output ? {
|
|
140
|
+
truncated: output.truncated,
|
|
141
|
+
...output.exit !== undefined ? { exit: output.exit } : {},
|
|
142
|
+
...output.timeout !== undefined ? { timeout: output.timeout } : {}
|
|
143
|
+
} : {}
|
|
144
|
+
}
|
|
112
145
|
});
|
|
113
|
-
}), Effect.forkIn(scope, { startImmediately: true }));
|
|
146
|
+
})), Effect.forkIn(scope, { startImmediately: true }));
|
|
114
147
|
});
|
|
115
148
|
yield* ctx.tool.transform((draft) => draft.add({
|
|
116
149
|
name,
|
|
@@ -232,7 +265,7 @@ Command exceeded timeout of ${finalTimeout} ms. Retry with a larger timeout if t
|
|
|
232
265
|
});
|
|
233
266
|
if (input.background === true) {
|
|
234
267
|
yield* runtime.job.background(job.id);
|
|
235
|
-
yield* notifyWhenDone(context.sessionID, context.id, info.command);
|
|
268
|
+
yield* notifyWhenDone(context.sessionID, context.id, info.id, info.command, settled);
|
|
236
269
|
return {
|
|
237
270
|
output: BACKGROUND_STARTED,
|
|
238
271
|
shellID: info.id,
|
|
@@ -243,7 +276,7 @@ Command exceeded timeout of ${finalTimeout} ms. Retry with a larger timeout if t
|
|
|
243
276
|
const result = yield* runtime.job.block({ id: job.id, sessionID: context.sessionID }).pipe(Effect.onInterrupt(() => runtime.job.cancel(job.id).pipe(Effect.ignore)));
|
|
244
277
|
if (result?.type === "backgrounded") {
|
|
245
278
|
yield* shell.timeout(info.id, 0);
|
|
246
|
-
yield* notifyWhenDone(context.sessionID, context.id, info.command);
|
|
279
|
+
yield* notifyWhenDone(context.sessionID, context.id, info.id, info.command, settled);
|
|
247
280
|
return {
|
|
248
281
|
output: BACKGROUND_STARTED,
|
|
249
282
|
shellID: info.id,
|
|
@@ -256,23 +289,7 @@ Command exceeded timeout of ${finalTimeout} ms. Retry with a larger timeout if t
|
|
|
256
289
|
if (result?.info.status === "cancelled")
|
|
257
290
|
return yield* Effect.fail(new Error("Command cancelled"));
|
|
258
291
|
return yield* Deferred.await(settled);
|
|
259
|
-
}).pipe(Effect.map((
|
|
260
|
-
const content = [{ type: "text", text: output.output }];
|
|
261
|
-
const model = modelOutput(output);
|
|
262
|
-
if (model)
|
|
263
|
-
content.push({ type: "text", text: model });
|
|
264
|
-
return {
|
|
265
|
-
output,
|
|
266
|
-
content,
|
|
267
|
-
metadata: {
|
|
268
|
-
status: output.status,
|
|
269
|
-
truncated: output.truncated,
|
|
270
|
-
..."exit" in output && output.exit !== undefined ? { exit: output.exit } : {},
|
|
271
|
-
..."shellID" in output && output.shellID !== undefined ? { shellID: output.shellID } : {},
|
|
272
|
-
..."timeout" in output && output.timeout !== undefined ? { timeout: output.timeout } : {}
|
|
273
|
-
}
|
|
274
|
-
};
|
|
275
|
-
}), Effect.mapError((error) => new ToolFailure({ message: `Unable to execute command: ${input.command}`, error })))
|
|
292
|
+
}).pipe(Effect.map(toolResult), Effect.mapError((error) => new ToolFailure({ message: `Unable to execute command: ${input.command}`, error })))
|
|
276
293
|
})).pipe(Effect.orDie);
|
|
277
294
|
yield* ctx.session.hook("context", (event) => Effect.gen(function* () {
|
|
278
295
|
const tool = event.tools[name];
|