@opencode/server 2.1.3 → 2.2.0
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/api.d.ts +854 -969
- package/dist/api.js +5 -5
- package/dist/auth.js +1 -1
- package/dist/chunks/server-info-1gwc8nvb.js +69 -0
- package/dist/chunks/{service-status-z554rpg5.js → server-info-1v577ncx.js} +4 -2
- package/dist/chunks/{service-status-79n3507d.js → server-info-1wd9c1m3.js} +3 -3
- package/dist/chunks/{service-status-jwf0kwqx.js → server-info-2eaky32g.js} +12 -3
- package/dist/chunks/{service-status-a30hykaf.js → server-info-2h6qktqa.js} +24 -6
- package/dist/chunks/{service-status-6tj91hdj.js → server-info-4fy84009.js} +3 -3
- package/dist/chunks/{service-status-yzwm8eeq.js → server-info-4q6e7fh8.js} +2 -2
- package/dist/chunks/{service-status-gymtz25n.js → server-info-50bbk3b2.js} +3 -3
- package/dist/chunks/{service-status-rj8tbp10.js → server-info-5b42hxrf.js} +1 -1
- package/dist/chunks/{service-status-x2cwbfak.js → server-info-5pdfedjd.js} +7 -7
- package/dist/chunks/{service-status-1qc831kp.js → server-info-5s6gh8sx.js} +7 -3
- package/dist/chunks/{service-status-vg0x3zn0.js → server-info-6z9pvq7p.js} +1 -1
- package/dist/chunks/{service-status-6v4wsps6.js → server-info-7b9xm1qg.js} +3 -2
- package/dist/chunks/{service-status-7qrtcnv4.js → server-info-a8jcac9a.js} +1 -1
- package/dist/chunks/{service-status-5ewqf72w.js → server-info-az0609r6.js} +4 -2
- package/dist/chunks/server-info-b0f38s3n.js +105 -0
- package/dist/chunks/server-info-b105zy65.js +22 -0
- package/dist/chunks/{service-status-x74w7e1f.js → server-info-b3bmdkga.js} +1 -1
- package/dist/chunks/{service-status-erzfdgke.js → server-info-bd8755ek.js} +16 -1
- package/dist/chunks/server-info-bhbc7551.js +107 -0
- package/dist/chunks/{service-status-11d378s5.js → server-info-btahnm2b.js} +3 -3
- package/dist/chunks/{service-status-c2hv5jmf.js → server-info-cezwbsk5.js} +1 -1
- package/dist/chunks/{service-status-crt28xe4.js → server-info-d0edqfxx.js} +4 -11
- package/dist/chunks/{service-status-e6e4kz0w.js → server-info-e6e4kz0w.js} +1 -1
- package/dist/chunks/{service-status-5adf1am9.js → server-info-f559fakr.js} +2 -2
- package/dist/chunks/{service-status-pf9k0dqe.js → server-info-h29xjj1e.js} +2 -2
- package/dist/chunks/{service-status-3154e7fk.js → server-info-htyf2qs7.js} +5 -3
- package/dist/chunks/{service-status-5680j7c4.js → server-info-j2d131x1.js} +23 -20
- package/dist/chunks/{service-status-j4at0y5c.js → server-info-j4at0y5c.js} +1 -1
- package/dist/chunks/{service-status-r82dtfrk.js → server-info-j87xz9bt.js} +3 -3
- package/dist/chunks/{service-status-y89d99mz.js → server-info-kkdkqt8j.js} +2 -2
- package/dist/chunks/{service-status-vb61dkrm.js → server-info-kqr36gas.js} +8 -8
- package/dist/chunks/server-info-n321d8vm.js +46 -0
- package/dist/chunks/{service-status-rkmbbexc.js → server-info-nx6f5k7a.js} +4 -4
- package/dist/chunks/{service-status-0znmasm1.js → server-info-ny1j968n.js} +2 -2
- package/dist/chunks/server-info-qcg3sqtb.js +38 -0
- package/dist/chunks/{service-status-6e6jjne7.js → server-info-qd0r787n.js} +2 -2
- package/dist/chunks/{service-status-xcxwzp6z.js → server-info-rha2aq18.js} +4 -4
- package/dist/chunks/{service-status-6tjqh8g4.js → server-info-rw1dfckh.js} +8 -4
- package/dist/chunks/{service-status-2e16a9cc.js → server-info-s282vggx.js} +1 -1
- package/dist/chunks/{service-status-k6dz4enc.js → server-info-s802fzg1.js} +21 -20
- package/dist/chunks/{service-status-10kexchg.js → server-info-te8jwba1.js} +2 -2
- package/dist/chunks/{service-status-53jj3zgg.js → server-info-tjtyxt9h.js} +32 -12
- package/dist/chunks/server-info-xthc02cw.js +6 -0
- package/dist/chunks/server-info-yqhefp4s.js +83 -0
- package/dist/chunks/{service-status-7scj3y0h.js → server-info-yxw63vq5.js} +10 -8
- package/dist/chunks/{service-status-krqg3gd2.js → server-info-zcvan105.js} +1 -1
- package/dist/chunks/{service-status-q6jxy1hn.js → server-info-zpr61asr.js} +15 -38
- package/dist/cors.js +1 -1
- package/dist/event-feed.d.ts +1 -1
- package/dist/event-feed.js +3 -3
- package/dist/fetch.js +50 -48
- package/dist/handlers/agent.js +6 -6
- package/dist/handlers/command.js +6 -6
- package/dist/handlers/config.js +6 -6
- package/dist/handlers/credential.js +6 -6
- package/dist/handlers/debug.d.ts +2 -1
- package/dist/handlers/debug.js +6 -6
- package/dist/handlers/event.js +7 -7
- package/dist/handlers/form.js +6 -6
- package/dist/handlers/fs.d.ts +2 -1
- package/dist/handlers/fs.js +6 -6
- package/dist/handlers/generate.d.ts +1 -1
- package/dist/handlers/generate.js +6 -6
- package/dist/handlers/integration.js +6 -6
- package/dist/handlers/location.js +6 -6
- package/dist/handlers/mcp.d.ts +3 -1
- package/dist/handlers/mcp.js +8 -6
- package/dist/handlers/media.d.ts +6 -0
- package/dist/handlers/media.js +6 -0
- package/dist/handlers/message.js +7 -6
- package/dist/handlers/migration.js +6 -6
- package/dist/handlers/model.js +6 -6
- package/dist/handlers/permission.js +6 -6
- package/dist/handlers/persistent-pty.d.ts +1 -1
- package/dist/handlers/persistent-pty.js +9 -8
- package/dist/handlers/plugin.js +6 -6
- package/dist/handlers/project.d.ts +1 -1
- package/dist/handlers/project.js +6 -6
- package/dist/handlers/provider.js +6 -6
- package/dist/handlers/pty-socket.js +1 -1
- package/dist/handlers/pty.d.ts +1 -2
- package/dist/handlers/pty.js +8 -9
- package/dist/handlers/reference.js +6 -6
- package/dist/handlers/rpc.js +6 -6
- package/dist/handlers/server.js +9 -9
- package/dist/handlers/session-error.js +1 -1
- package/dist/handlers/session.d.ts +3 -1
- package/dist/handlers/session.js +7 -6
- package/dist/handlers/shell.js +6 -6
- package/dist/handlers/skill.js +6 -6
- package/dist/handlers/usage.d.ts +1 -0
- package/dist/handlers/usage.js +11 -0
- package/dist/handlers/vcs.js +6 -6
- package/dist/handlers/voice.d.ts +1 -1
- package/dist/handlers/voice.js +6 -6
- package/dist/handlers/websearch.js +6 -6
- package/dist/handlers/worktree.js +6 -6
- package/dist/handlers.d.ts +1 -1
- package/dist/handlers.js +46 -44
- package/dist/location.js +4 -4
- package/dist/media-uri.d.ts +6 -0
- package/dist/media-uri.js +6 -0
- package/dist/middleware/authorization.js +2 -2
- package/dist/middleware/form-location.js +3 -3
- package/dist/middleware/schema-error.js +1 -1
- package/dist/middleware/session-location.js +3 -3
- package/dist/pairing.js +5 -5
- package/dist/process.js +54 -51
- package/dist/request-tracing.js +1 -1
- package/dist/routes.d.ts +5 -3
- package/dist/routes.js +49 -47
- package/dist/server-info.js +5 -5
- package/dist/service-status.js +1 -1
- package/dist/workerd.js +51 -49
- package/package.json +12 -10
- package/dist/chunks/service-status-0f489yfb.js +0 -102
- package/dist/chunks/service-status-2f9g7rg2.js +0 -20
- package/dist/chunks/service-status-hwdnjend.js +0 -40
- package/dist/chunks/service-status-j3461ttv.js +0 -59
- package/dist/chunks/service-status-z9g9xjb3.js +0 -30
- package/dist/chunks/service-status-zy1wt1f8.js +0 -23
- package/dist/pty-environment.d.ts +0 -13
- package/dist/pty-environment.js +0 -12
- /package/dist/chunks/{service-status-9rqn6x4v.js → server-info-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{service-status-h6rt5k9s.js → server-info-h6rt5k9s.js} +0 -0
- /package/dist/chunks/{service-status-q4bn6dy8.js → server-info-q4bn6dy8.js} +0 -0
- /package/dist/chunks/{service-status-smaf4a18.js → server-info-smaf4a18.js} +0 -0
- /package/dist/chunks/{service-status-yc7nft6q.js → server-info-yc7nft6q.js} +0 -0
package/dist/routes.js
CHANGED
|
@@ -1,53 +1,55 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRoutes2,
|
|
3
3
|
createEmbeddedRoutes2
|
|
4
|
-
} from "./chunks/
|
|
5
|
-
import"./chunks/
|
|
6
|
-
import"./chunks/
|
|
7
|
-
import"./chunks/
|
|
8
|
-
import"./chunks/
|
|
9
|
-
import"./chunks/
|
|
10
|
-
import"./chunks/
|
|
11
|
-
import"./chunks/
|
|
12
|
-
import"./chunks/
|
|
13
|
-
import"./chunks/
|
|
14
|
-
import"./chunks/
|
|
15
|
-
import"./chunks/
|
|
16
|
-
import"./chunks/
|
|
17
|
-
import"./chunks/
|
|
18
|
-
import"./chunks/
|
|
19
|
-
import"./chunks/
|
|
20
|
-
import"./chunks/
|
|
21
|
-
import"./chunks/
|
|
22
|
-
import"./chunks/
|
|
23
|
-
import"./chunks/
|
|
24
|
-
import"./chunks/
|
|
25
|
-
import"./chunks/
|
|
26
|
-
import"./chunks/
|
|
27
|
-
import"./chunks/
|
|
28
|
-
import"./chunks/
|
|
29
|
-
import"./chunks/
|
|
30
|
-
import"./chunks/
|
|
31
|
-
import"./chunks/
|
|
32
|
-
import"./chunks/
|
|
33
|
-
import"./chunks/
|
|
34
|
-
import"./chunks/
|
|
35
|
-
import"./chunks/
|
|
36
|
-
import"./chunks/
|
|
37
|
-
import"./chunks/
|
|
38
|
-
import"./chunks/
|
|
39
|
-
import"./chunks/
|
|
40
|
-
import"./chunks/
|
|
41
|
-
import"./chunks/
|
|
42
|
-
import"./chunks/
|
|
43
|
-
import"./chunks/
|
|
44
|
-
import"./chunks/
|
|
45
|
-
import"./chunks/
|
|
46
|
-
import"./chunks/
|
|
47
|
-
import"./chunks/
|
|
48
|
-
import"./chunks/
|
|
49
|
-
import"./chunks/
|
|
50
|
-
import"./chunks/
|
|
4
|
+
} from "./chunks/server-info-j2d131x1.js";
|
|
5
|
+
import"./chunks/server-info-bd8755ek.js";
|
|
6
|
+
import"./chunks/server-info-7b9xm1qg.js";
|
|
7
|
+
import"./chunks/server-info-b0f38s3n.js";
|
|
8
|
+
import"./chunks/server-info-b105zy65.js";
|
|
9
|
+
import"./chunks/server-info-kkdkqt8j.js";
|
|
10
|
+
import"./chunks/server-info-1gwc8nvb.js";
|
|
11
|
+
import"./chunks/server-info-ny1j968n.js";
|
|
12
|
+
import"./chunks/server-info-zpr61asr.js";
|
|
13
|
+
import"./chunks/server-info-yxw63vq5.js";
|
|
14
|
+
import"./chunks/server-info-6z9pvq7p.js";
|
|
15
|
+
import"./chunks/server-info-f559fakr.js";
|
|
16
|
+
import"./chunks/server-info-btahnm2b.js";
|
|
17
|
+
import"./chunks/server-info-rw1dfckh.js";
|
|
18
|
+
import"./chunks/server-info-n321d8vm.js";
|
|
19
|
+
import"./chunks/server-info-1v577ncx.js";
|
|
20
|
+
import"./chunks/server-info-h29xjj1e.js";
|
|
21
|
+
import"./chunks/server-info-rha2aq18.js";
|
|
22
|
+
import"./chunks/server-info-te8jwba1.js";
|
|
23
|
+
import"./chunks/server-info-5b42hxrf.js";
|
|
24
|
+
import"./chunks/server-info-zcvan105.js";
|
|
25
|
+
import"./chunks/server-info-az0609r6.js";
|
|
26
|
+
import"./chunks/server-info-qcg3sqtb.js";
|
|
27
|
+
import"./chunks/server-info-qd0r787n.js";
|
|
28
|
+
import"./chunks/server-info-2h6qktqa.js";
|
|
29
|
+
import"./chunks/server-info-4q6e7fh8.js";
|
|
30
|
+
import"./chunks/server-info-yqhefp4s.js";
|
|
31
|
+
import"./chunks/server-info-cezwbsk5.js";
|
|
32
|
+
import"./chunks/server-info-bhbc7551.js";
|
|
33
|
+
import"./chunks/server-info-h6rt5k9s.js";
|
|
34
|
+
import"./chunks/server-info-d0edqfxx.js";
|
|
35
|
+
import"./chunks/server-info-a8jcac9a.js";
|
|
36
|
+
import"./chunks/server-info-4fy84009.js";
|
|
37
|
+
import"./chunks/server-info-2eaky32g.js";
|
|
38
|
+
import"./chunks/server-info-5s6gh8sx.js";
|
|
39
|
+
import"./chunks/server-info-tjtyxt9h.js";
|
|
40
|
+
import"./chunks/server-info-nx6f5k7a.js";
|
|
41
|
+
import"./chunks/server-info-s282vggx.js";
|
|
42
|
+
import"./chunks/server-info-j87xz9bt.js";
|
|
43
|
+
import"./chunks/server-info-htyf2qs7.js";
|
|
44
|
+
import"./chunks/server-info-b3bmdkga.js";
|
|
45
|
+
import"./chunks/server-info-j4at0y5c.js";
|
|
46
|
+
import"./chunks/server-info-kqr36gas.js";
|
|
47
|
+
import"./chunks/server-info-q4bn6dy8.js";
|
|
48
|
+
import"./chunks/server-info-5pdfedjd.js";
|
|
49
|
+
import"./chunks/server-info-xthc02cw.js";
|
|
50
|
+
import"./chunks/server-info-s802fzg1.js";
|
|
51
|
+
import"./chunks/server-info-50bbk3b2.js";
|
|
52
|
+
import"./chunks/server-info-smaf4a18.js";
|
|
51
53
|
export {
|
|
52
54
|
createEmbeddedRoutes2 as createEmbeddedRoutes,
|
|
53
55
|
createRoutes2 as createRoutes
|
package/dist/server-info.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
Service3,
|
|
3
|
+
layer2,
|
|
4
4
|
connectionURLs2,
|
|
5
5
|
exports_server_info
|
|
6
|
-
} from "./chunks/
|
|
6
|
+
} from "./chunks/server-info-5pdfedjd.js";
|
|
7
7
|
export {
|
|
8
8
|
exports_server_info as ServerInfo,
|
|
9
|
-
|
|
9
|
+
Service3 as Service,
|
|
10
10
|
connectionURLs2 as connectionURLs,
|
|
11
|
-
|
|
11
|
+
layer2 as layer
|
|
12
12
|
};
|
package/dist/service-status.js
CHANGED
package/dist/workerd.js
CHANGED
|
@@ -1,56 +1,58 @@
|
|
|
1
|
-
import"./chunks/
|
|
2
|
-
import"./chunks/
|
|
3
|
-
import"./chunks/
|
|
4
|
-
import"./chunks/
|
|
5
|
-
import"./chunks/
|
|
6
|
-
import"./chunks/
|
|
7
|
-
import"./chunks/
|
|
8
|
-
import"./chunks/
|
|
9
|
-
import"./chunks/
|
|
10
|
-
import"./chunks/
|
|
11
|
-
import"./chunks/
|
|
12
|
-
import"./chunks/
|
|
13
|
-
import"./chunks/
|
|
14
|
-
import"./chunks/
|
|
15
|
-
import"./chunks/
|
|
16
|
-
import"./chunks/
|
|
17
|
-
import"./chunks/
|
|
18
|
-
import"./chunks/
|
|
19
|
-
import"./chunks/
|
|
20
|
-
import"./chunks/
|
|
21
|
-
import"./chunks/
|
|
22
|
-
import"./chunks/
|
|
23
|
-
import"./chunks/
|
|
24
|
-
import"./chunks/
|
|
25
|
-
import"./chunks/
|
|
26
|
-
import"./chunks/
|
|
27
|
-
import"./chunks/
|
|
28
|
-
import"./chunks/
|
|
29
|
-
import"./chunks/
|
|
30
|
-
import"./chunks/
|
|
31
|
-
import"./chunks/
|
|
32
|
-
import"./chunks/
|
|
33
|
-
import"./chunks/
|
|
34
|
-
import"./chunks/
|
|
35
|
-
import"./chunks/
|
|
36
|
-
import"./chunks/
|
|
37
|
-
import"./chunks/
|
|
38
|
-
import"./chunks/
|
|
39
|
-
import"./chunks/
|
|
40
|
-
import"./chunks/
|
|
41
|
-
import"./chunks/
|
|
42
|
-
import"./chunks/
|
|
43
|
-
import"./chunks/
|
|
44
|
-
import"./chunks/
|
|
45
|
-
import"./chunks/
|
|
46
|
-
import"./chunks/
|
|
47
|
-
import"./chunks/
|
|
1
|
+
import"./chunks/server-info-q4bn6dy8.js";
|
|
2
|
+
import"./chunks/server-info-smaf4a18.js";
|
|
3
|
+
import"./chunks/server-info-50bbk3b2.js";
|
|
4
|
+
import"./chunks/server-info-htyf2qs7.js";
|
|
5
|
+
import"./chunks/server-info-b3bmdkga.js";
|
|
6
|
+
import"./chunks/server-info-j87xz9bt.js";
|
|
7
|
+
import"./chunks/server-info-j4at0y5c.js";
|
|
8
|
+
import"./chunks/server-info-yqhefp4s.js";
|
|
9
|
+
import"./chunks/server-info-d0edqfxx.js";
|
|
10
|
+
import"./chunks/server-info-xthc02cw.js";
|
|
11
|
+
import"./chunks/server-info-1gwc8nvb.js";
|
|
12
|
+
import"./chunks/server-info-rha2aq18.js";
|
|
13
|
+
import"./chunks/server-info-az0609r6.js";
|
|
14
|
+
import"./chunks/server-info-tjtyxt9h.js";
|
|
15
|
+
import"./chunks/server-info-btahnm2b.js";
|
|
16
|
+
import"./chunks/server-info-2h6qktqa.js";
|
|
17
|
+
import"./chunks/server-info-f559fakr.js";
|
|
18
|
+
import"./chunks/server-info-4q6e7fh8.js";
|
|
19
|
+
import"./chunks/server-info-ny1j968n.js";
|
|
20
|
+
import"./chunks/server-info-s282vggx.js";
|
|
21
|
+
import"./chunks/server-info-s802fzg1.js";
|
|
22
|
+
import"./chunks/server-info-nx6f5k7a.js";
|
|
23
|
+
import"./chunks/server-info-1v577ncx.js";
|
|
24
|
+
import"./chunks/server-info-2eaky32g.js";
|
|
25
|
+
import"./chunks/server-info-5pdfedjd.js";
|
|
26
|
+
import"./chunks/server-info-kqr36gas.js";
|
|
27
|
+
import"./chunks/server-info-yxw63vq5.js";
|
|
28
|
+
import"./chunks/server-info-qcg3sqtb.js";
|
|
29
|
+
import"./chunks/server-info-h6rt5k9s.js";
|
|
30
|
+
import"./chunks/server-info-zpr61asr.js";
|
|
31
|
+
import"./chunks/server-info-n321d8vm.js";
|
|
32
|
+
import"./chunks/server-info-rw1dfckh.js";
|
|
33
|
+
import"./chunks/server-info-qd0r787n.js";
|
|
34
|
+
import"./chunks/server-info-te8jwba1.js";
|
|
35
|
+
import"./chunks/server-info-zcvan105.js";
|
|
36
|
+
import"./chunks/server-info-h29xjj1e.js";
|
|
37
|
+
import"./chunks/server-info-kkdkqt8j.js";
|
|
38
|
+
import"./chunks/server-info-b105zy65.js";
|
|
39
|
+
import"./chunks/server-info-bhbc7551.js";
|
|
40
|
+
import"./chunks/server-info-5b42hxrf.js";
|
|
41
|
+
import"./chunks/server-info-a8jcac9a.js";
|
|
42
|
+
import"./chunks/server-info-4fy84009.js";
|
|
43
|
+
import"./chunks/server-info-5s6gh8sx.js";
|
|
44
|
+
import"./chunks/server-info-6z9pvq7p.js";
|
|
45
|
+
import"./chunks/server-info-cezwbsk5.js";
|
|
46
|
+
import"./chunks/server-info-b0f38s3n.js";
|
|
47
|
+
import"./chunks/server-info-7b9xm1qg.js";
|
|
48
|
+
import"./chunks/server-info-bd8755ek.js";
|
|
49
|
+
import"./chunks/server-info-j2d131x1.js";
|
|
48
50
|
import {
|
|
49
51
|
make2
|
|
50
|
-
} from "./chunks/
|
|
52
|
+
} from "./chunks/server-info-1wd9c1m3.js";
|
|
51
53
|
import {
|
|
52
54
|
__export
|
|
53
|
-
} from "./chunks/
|
|
55
|
+
} from "./chunks/server-info-9rqn6x4v.js";
|
|
54
56
|
|
|
55
57
|
// src/workerd.ts
|
|
56
58
|
var exports_workerd = {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@opencode/server",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -23,27 +23,29 @@
|
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"build": "bun run script/build.ts",
|
|
26
|
+
"pack": "bun run script/pack.ts",
|
|
26
27
|
"test": "bun test --only-failures",
|
|
27
|
-
"typecheck": "
|
|
28
|
+
"typecheck": "bun check --no-script -b",
|
|
29
|
+
"typecheck:tsc": "tsc -b",
|
|
28
30
|
"probe:workerd": "bun run script/workerd-probe.ts"
|
|
29
31
|
},
|
|
30
32
|
"dependencies": {
|
|
31
33
|
"@effect/platform-node": "4.0.1",
|
|
32
34
|
"@effect/platform-node-shared": "4.0.1",
|
|
33
|
-
"@opencode/core": "2.
|
|
34
|
-
"@opencode/protocol": "2.
|
|
35
|
-
"@opencode/schema": "2.
|
|
36
|
-
"@opencode/simulation": "2.
|
|
37
|
-
"@opencode/util": "2.
|
|
35
|
+
"@opencode/core": "2.2.0",
|
|
36
|
+
"@opencode/protocol": "2.2.0",
|
|
37
|
+
"@opencode/schema": "2.2.0",
|
|
38
|
+
"@opencode/simulation": "2.2.0",
|
|
39
|
+
"@opencode/util": "2.2.0",
|
|
38
40
|
"effect": "4.0.1"
|
|
39
41
|
},
|
|
40
42
|
"devDependencies": {
|
|
41
43
|
"@opencode-ai/pty": "0.3.1",
|
|
42
|
-
"@opencode/client": "2.
|
|
43
|
-
"@opencode/plugin": "2.
|
|
44
|
+
"@opencode/client": "2.2.0",
|
|
45
|
+
"@opencode/plugin": "2.2.0",
|
|
44
46
|
"@tsconfig/bun": "1.0.9",
|
|
45
47
|
"@types/bun": "1.4.3",
|
|
46
|
-
"@typescript/native": "npm:typescript@7.0
|
|
48
|
+
"@typescript/native": "npm:typescript@7.1.0-beta",
|
|
47
49
|
"fast-check": "4.9.0"
|
|
48
50
|
}
|
|
49
51
|
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
GenerateHandler2
|
|
3
|
-
} from "./service-status-z9g9xjb3.js";
|
|
4
|
-
import {
|
|
5
|
-
VoiceHandler2
|
|
6
|
-
} from "./service-status-crt28xe4.js";
|
|
7
|
-
import {
|
|
8
|
-
MessageHandler2
|
|
9
|
-
} from "./service-status-j3461ttv.js";
|
|
10
|
-
import {
|
|
11
|
-
ModelHandler2
|
|
12
|
-
} from "./service-status-xcxwzp6z.js";
|
|
13
|
-
import {
|
|
14
|
-
ProviderHandler2
|
|
15
|
-
} from "./service-status-5ewqf72w.js";
|
|
16
|
-
import {
|
|
17
|
-
SessionHandler2
|
|
18
|
-
} from "./service-status-53jj3zgg.js";
|
|
19
|
-
import {
|
|
20
|
-
PermissionHandler2
|
|
21
|
-
} from "./service-status-11d378s5.js";
|
|
22
|
-
import {
|
|
23
|
-
FileSystemHandler2
|
|
24
|
-
} from "./service-status-a30hykaf.js";
|
|
25
|
-
import {
|
|
26
|
-
FormHandler2
|
|
27
|
-
} from "./service-status-5adf1am9.js";
|
|
28
|
-
import {
|
|
29
|
-
CommandHandler2
|
|
30
|
-
} from "./service-status-yzwm8eeq.js";
|
|
31
|
-
import {
|
|
32
|
-
SkillHandler2
|
|
33
|
-
} from "./service-status-0znmasm1.js";
|
|
34
|
-
import {
|
|
35
|
-
RpcHandler2
|
|
36
|
-
} from "./service-status-2e16a9cc.js";
|
|
37
|
-
import {
|
|
38
|
-
layer4
|
|
39
|
-
} from "./service-status-k6dz4enc.js";
|
|
40
|
-
import {
|
|
41
|
-
EventHandler2
|
|
42
|
-
} from "./service-status-rkmbbexc.js";
|
|
43
|
-
import {
|
|
44
|
-
AgentHandler2
|
|
45
|
-
} from "./service-status-z554rpg5.js";
|
|
46
|
-
import {
|
|
47
|
-
PluginHandler2
|
|
48
|
-
} from "./service-status-jwf0kwqx.js";
|
|
49
|
-
import {
|
|
50
|
-
ServerHandler2
|
|
51
|
-
} from "./service-status-7scj3y0h.js";
|
|
52
|
-
import {
|
|
53
|
-
DebugHandler2
|
|
54
|
-
} from "./service-status-2f9g7rg2.js";
|
|
55
|
-
import {
|
|
56
|
-
PtyHandler2
|
|
57
|
-
} from "./service-status-q6jxy1hn.js";
|
|
58
|
-
import {
|
|
59
|
-
PersistentPtyHandler2
|
|
60
|
-
} from "./service-status-6tjqh8g4.js";
|
|
61
|
-
import {
|
|
62
|
-
ShellHandler2
|
|
63
|
-
} from "./service-status-6e6jjne7.js";
|
|
64
|
-
import {
|
|
65
|
-
ReferenceHandler2
|
|
66
|
-
} from "./service-status-10kexchg.js";
|
|
67
|
-
import {
|
|
68
|
-
LocationHandler2
|
|
69
|
-
} from "./service-status-krqg3gd2.js";
|
|
70
|
-
import {
|
|
71
|
-
IntegrationHandler2
|
|
72
|
-
} from "./service-status-pf9k0dqe.js";
|
|
73
|
-
import {
|
|
74
|
-
WebSearchHandler2
|
|
75
|
-
} from "./service-status-y89d99mz.js";
|
|
76
|
-
import {
|
|
77
|
-
McpHandler2
|
|
78
|
-
} from "./service-status-hwdnjend.js";
|
|
79
|
-
import {
|
|
80
|
-
CredentialHandler2
|
|
81
|
-
} from "./service-status-rj8tbp10.js";
|
|
82
|
-
import {
|
|
83
|
-
ProjectHandler2
|
|
84
|
-
} from "./service-status-7qrtcnv4.js";
|
|
85
|
-
import {
|
|
86
|
-
WorktreeHandler2
|
|
87
|
-
} from "./service-status-6tj91hdj.js";
|
|
88
|
-
import {
|
|
89
|
-
VcsHandler2
|
|
90
|
-
} from "./service-status-1qc831kp.js";
|
|
91
|
-
import {
|
|
92
|
-
MigrationHandler2
|
|
93
|
-
} from "./service-status-vg0x3zn0.js";
|
|
94
|
-
import {
|
|
95
|
-
ConfigHandler2
|
|
96
|
-
} from "./service-status-c2hv5jmf.js";
|
|
97
|
-
|
|
98
|
-
// src/handlers.ts
|
|
99
|
-
import { Layer } from "effect";
|
|
100
|
-
var handlers2 = Layer.mergeAll(ServerHandler2, DebugHandler2, MigrationHandler2, LocationHandler2, AgentHandler2, PluginHandler2, SessionHandler2, MessageHandler2, ModelHandler2, GenerateHandler2, VoiceHandler2, ProviderHandler2, IntegrationHandler2, WebSearchHandler2, McpHandler2, CredentialHandler2, ProjectHandler2, FormHandler2, PermissionHandler2, FileSystemHandler2, CommandHandler2, SkillHandler2, RpcHandler2, EventHandler2.pipe(Layer.provide(layer4)), PtyHandler2, PersistentPtyHandler2, ShellHandler2, ReferenceHandler2, WorktreeHandler2, VcsHandler2, ConfigHandler2);
|
|
101
|
-
|
|
102
|
-
export { handlers2 };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
requestRef2
|
|
3
|
-
} from "./service-status-gymtz25n.js";
|
|
4
|
-
import {
|
|
5
|
-
Api2
|
|
6
|
-
} from "./service-status-r82dtfrk.js";
|
|
7
|
-
|
|
8
|
-
// src/handlers/debug.ts
|
|
9
|
-
import { LocationServiceMap } from "@opencode/core/location-service-map";
|
|
10
|
-
import { Effect, Option, RcMap } from "effect";
|
|
11
|
-
import { HttpApiBuilder } from "effect/http-api";
|
|
12
|
-
var DebugHandler2 = HttpApiBuilder.group(Api2, "server.debug", (handlers) => handlers.handle("debug.location", Effect.fn(function* () {
|
|
13
|
-
const locations = Option.getOrThrow(yield* Effect.serviceOption(LocationServiceMap.Service));
|
|
14
|
-
return Array.from(yield* RcMap.keys(locations.rcMap));
|
|
15
|
-
})).handle("debug.location.evict", Effect.fn(function* (ctx) {
|
|
16
|
-
const locations = Option.getOrThrow(yield* Effect.serviceOption(LocationServiceMap.Service));
|
|
17
|
-
yield* locations.invalidate(requestRef2(ctx.request));
|
|
18
|
-
})));
|
|
19
|
-
|
|
20
|
-
export { DebugHandler2 };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
response2
|
|
3
|
-
} from "./service-status-gymtz25n.js";
|
|
4
|
-
import {
|
|
5
|
-
Api2
|
|
6
|
-
} from "./service-status-r82dtfrk.js";
|
|
7
|
-
|
|
8
|
-
// src/handlers/mcp.ts
|
|
9
|
-
import { Mcp } from "@opencode/core/mcp/index";
|
|
10
|
-
import { McpServerNotFoundError } from "@opencode/protocol/errors";
|
|
11
|
-
import { Effect } from "effect";
|
|
12
|
-
import { HttpApiBuilder, HttpApiSchema } from "effect/http-api";
|
|
13
|
-
var notFound = (effect) => effect.pipe(Effect.mapError((error) => new McpServerNotFoundError({ server: error.server, message: error.message })));
|
|
14
|
-
var McpHandler2 = HttpApiBuilder.group(Api2, "server.mcp", (handlers) => Effect.gen(function* () {
|
|
15
|
-
return handlers.handle("mcp.list", Effect.fn(function* () {
|
|
16
|
-
const service = yield* Mcp.Service;
|
|
17
|
-
return yield* response2(service.servers().pipe(Effect.map((servers) => servers.map((info) => ({ name: info.name, status: info.status, integrationID: info.integrationID })))));
|
|
18
|
-
})).handle("mcp.add", Effect.fn(function* (ctx) {
|
|
19
|
-
const service = yield* Mcp.Service;
|
|
20
|
-
yield* service.add(ctx.params.server, ctx.payload.config);
|
|
21
|
-
return HttpApiSchema.NoContent.make();
|
|
22
|
-
})).handle("mcp.remove", Effect.fn(function* (ctx) {
|
|
23
|
-
const service = yield* Mcp.Service;
|
|
24
|
-
yield* notFound(service.remove(ctx.params.server));
|
|
25
|
-
return HttpApiSchema.NoContent.make();
|
|
26
|
-
})).handle("mcp.connect", Effect.fn(function* (ctx) {
|
|
27
|
-
const service = yield* Mcp.Service;
|
|
28
|
-
yield* notFound(service.connect(ctx.params.server));
|
|
29
|
-
return HttpApiSchema.NoContent.make();
|
|
30
|
-
})).handle("mcp.disconnect", Effect.fn(function* (ctx) {
|
|
31
|
-
const service = yield* Mcp.Service;
|
|
32
|
-
yield* notFound(service.disconnect(ctx.params.server));
|
|
33
|
-
return HttpApiSchema.NoContent.make();
|
|
34
|
-
})).handle("mcp.resource.catalog", Effect.fn(function* () {
|
|
35
|
-
const service = yield* Mcp.Service;
|
|
36
|
-
return yield* response2(service.resourceCatalog());
|
|
37
|
-
}));
|
|
38
|
-
}));
|
|
39
|
-
|
|
40
|
-
export { McpHandler2 };
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
missingSession2,
|
|
3
|
-
failedMessageDecode2
|
|
4
|
-
} from "./service-status-smaf4a18.js";
|
|
5
|
-
import {
|
|
6
|
-
Api2
|
|
7
|
-
} from "./service-status-r82dtfrk.js";
|
|
8
|
-
|
|
9
|
-
// src/handlers/message.ts
|
|
10
|
-
import { SessionMessage } from "@opencode/core/session/message";
|
|
11
|
-
import { Session } from "@opencode/core/session";
|
|
12
|
-
import { Effect, Schema } from "effect";
|
|
13
|
-
import { HttpApiBuilder } from "effect/http-api";
|
|
14
|
-
import { InvalidCursorError } from "@opencode/protocol/errors";
|
|
15
|
-
var DefaultMessagesLimit = 50;
|
|
16
|
-
var Cursor = Schema.Struct({
|
|
17
|
-
id: SessionMessage.ID,
|
|
18
|
-
order: Schema.Union([Schema.Literal("asc"), Schema.Literal("desc")]),
|
|
19
|
-
direction: Schema.Union([Schema.Literal("previous"), Schema.Literal("next")])
|
|
20
|
-
});
|
|
21
|
-
var decodeCursor = Schema.decodeUnknownSync(Cursor);
|
|
22
|
-
var cursor = {
|
|
23
|
-
encode(message, order, direction) {
|
|
24
|
-
return Buffer.from(JSON.stringify({ id: message.id, order, direction })).toString("base64url");
|
|
25
|
-
},
|
|
26
|
-
decode(input) {
|
|
27
|
-
return decodeCursor(JSON.parse(Buffer.from(input, "base64url").toString("utf8")));
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
var MessageHandler2 = HttpApiBuilder.group(Api2, "server.message", (handlers) => Effect.gen(function* () {
|
|
31
|
-
const session = yield* Session.Service;
|
|
32
|
-
return handlers.handle("session.messages", Effect.fn(function* (ctx) {
|
|
33
|
-
if (ctx.query.cursor && ctx.query.order !== undefined)
|
|
34
|
-
return yield* new InvalidCursorError({ message: "Cursor cannot be combined with order" });
|
|
35
|
-
const decoded = yield* Effect.try({
|
|
36
|
-
try: () => ctx.query.cursor ? cursor.decode(ctx.query.cursor) : undefined,
|
|
37
|
-
catch: () => new InvalidCursorError({ message: "Invalid cursor" })
|
|
38
|
-
});
|
|
39
|
-
const order = decoded?.order ?? ctx.query.order ?? "desc";
|
|
40
|
-
const messages = yield* session.messages({
|
|
41
|
-
sessionID: ctx.params.sessionID,
|
|
42
|
-
limit: ctx.query.limit ?? DefaultMessagesLimit,
|
|
43
|
-
order,
|
|
44
|
-
type: ctx.query.type,
|
|
45
|
-
cursor: decoded ? { id: decoded.id, direction: decoded.direction } : undefined
|
|
46
|
-
}).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.MessageDecodeError", failedMessageDecode2));
|
|
47
|
-
const first = messages[0];
|
|
48
|
-
const last = messages.at(-1);
|
|
49
|
-
return {
|
|
50
|
-
data: messages,
|
|
51
|
-
cursor: {
|
|
52
|
-
previous: first ? cursor.encode(first, order, "previous") : undefined,
|
|
53
|
-
next: last ? cursor.encode(last, order, "next") : undefined
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
}));
|
|
57
|
-
}));
|
|
58
|
-
|
|
59
|
-
export { MessageHandler2 };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
locationErrors2,
|
|
3
|
-
awaitPlugins2
|
|
4
|
-
} from "./service-status-gymtz25n.js";
|
|
5
|
-
import {
|
|
6
|
-
Api2
|
|
7
|
-
} from "./service-status-r82dtfrk.js";
|
|
8
|
-
|
|
9
|
-
// src/handlers/generate.ts
|
|
10
|
-
import { Generate } from "@opencode/core/generate";
|
|
11
|
-
import { Location } from "@opencode/core/location";
|
|
12
|
-
import { LocationServiceMap } from "@opencode/core/location-services";
|
|
13
|
-
import { AbsolutePath } from "@opencode/core/schema";
|
|
14
|
-
import { InvalidRequestError, ServiceUnavailableError } from "@opencode/protocol/errors";
|
|
15
|
-
import { Global } from "@opencode/util/global";
|
|
16
|
-
import { Effect } from "effect";
|
|
17
|
-
import { HttpApiBuilder } from "effect/http-api";
|
|
18
|
-
var GenerateHandler2 = HttpApiBuilder.group(Api2, "server.generate", (handlers) => Effect.gen(function* () {
|
|
19
|
-
const global = yield* Global.Service;
|
|
20
|
-
const locations = yield* LocationServiceMap.Service;
|
|
21
|
-
const services = locations.get(Location.Ref.make({ directory: AbsolutePath.make(global.config) }));
|
|
22
|
-
return handlers.handle("generate.text", Effect.fn("server.generate.text")(function* (request) {
|
|
23
|
-
yield* awaitPlugins2;
|
|
24
|
-
const generate = yield* Generate.Service;
|
|
25
|
-
const text = yield* generate.text(request.payload).pipe(Effect.mapError((error) => error._tag === "Generate.ModelSelectionError" ? new InvalidRequestError({ message: error.message }) : new ServiceUnavailableError({ message: error.message, service: error.service })));
|
|
26
|
-
return { data: { text } };
|
|
27
|
-
}, Effect.provide(services), locationErrors2));
|
|
28
|
-
}));
|
|
29
|
-
|
|
30
|
-
export { GenerateHandler2 };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__export
|
|
3
|
-
} from "./service-status-9rqn6x4v.js";
|
|
4
|
-
|
|
5
|
-
// src/pty-environment.ts
|
|
6
|
-
var exports_pty_environment = {};
|
|
7
|
-
__export(exports_pty_environment, {
|
|
8
|
-
PtyEnvironment: () => exports_pty_environment,
|
|
9
|
-
Service: () => Service2,
|
|
10
|
-
layer: () => layer3,
|
|
11
|
-
node: () => node2
|
|
12
|
-
});
|
|
13
|
-
import { Context, Effect, Layer } from "effect";
|
|
14
|
-
import { makeGlobalNode } from "@opencode/util/effect/app-node";
|
|
15
|
-
|
|
16
|
-
class Service2 extends Context.Service()("@opencode/ServerPtyEnvironment") {
|
|
17
|
-
}
|
|
18
|
-
var layer3 = Layer.succeed(Service2, Service2.of({
|
|
19
|
-
get: () => Effect.succeed({})
|
|
20
|
-
}));
|
|
21
|
-
var node2 = makeGlobalNode({ service: Service2, layer: layer3, deps: [] });
|
|
22
|
-
|
|
23
|
-
export { Service2, layer3, node2, exports_pty_environment };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export * as PtyEnvironment from "./pty-environment";
|
|
2
|
-
import { Context, Effect, Layer } from "effect";
|
|
3
|
-
export interface Interface {
|
|
4
|
-
readonly get: (input: {
|
|
5
|
-
directory: string;
|
|
6
|
-
cwd: string;
|
|
7
|
-
}) => Effect.Effect<Record<string, string>>;
|
|
8
|
-
}
|
|
9
|
-
declare const Service_base: Context.ServiceClass<Service, "@opencode/ServerPtyEnvironment", Interface>;
|
|
10
|
-
export declare class Service extends Service_base {
|
|
11
|
-
}
|
|
12
|
-
export declare const layer: Layer.Layer<Service, never, never>;
|
|
13
|
-
export declare const node: import("@opencode/util/effect/layer-node").Provider<Service, never, import("@opencode/util/effect/layer-node").Tag<"global">>;
|
package/dist/pty-environment.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|