@opencode/server 2.0.15 → 2.0.17
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 +9 -0
- package/dist/api.js +5 -5
- package/dist/auth.d.ts +4 -0
- package/dist/auth.js +10 -2
- package/dist/chunks/{location-00nn3k4b.js → handlers-140y8w7p.js} +2 -2
- package/dist/chunks/{location-rcg4y18n.js → handlers-26ta7ngt.js} +2 -2
- package/dist/chunks/{location-drtkgc0f.js → handlers-2ek8eabn.js} +6 -6
- package/dist/chunks/{location-99sfd1j8.js → handlers-2sy3c7de.js} +7 -7
- package/dist/chunks/{location-gdvmrvey.js → handlers-367ngss7.js} +2 -2
- package/dist/chunks/{location-3kzx88w9.js → handlers-3kzx88w9.js} +1 -1
- package/dist/chunks/{location-04xw3v55.js → handlers-44xy5pnk.js} +1 -1
- package/dist/chunks/{location-ysabas57.js → handlers-5bwq5cz2.js} +2 -2
- package/dist/chunks/{location-5rwqcaw2.js → handlers-5rwqcaw2.js} +1 -1
- package/dist/chunks/{location-xsrtpxyd.js → handlers-5w24ch67.js} +4 -4
- package/dist/chunks/{location-6gkz39ey.js → handlers-6gkz39ey.js} +1 -1
- package/dist/chunks/{location-qnwpcgp7.js → handlers-6qwktr1g.js} +1 -1
- package/dist/chunks/{location-br99j6q1.js → handlers-7eckj7zq.js} +2 -2
- package/dist/chunks/{location-hjnxtxmk.js → handlers-96s6m0w3.js} +2 -2
- package/dist/chunks/handlers-anm12x33.js +66 -0
- package/dist/chunks/{location-254zvkj6.js → handlers-b1rdg9nf.js} +2 -2
- package/dist/chunks/{location-5kep8qnm.js → handlers-bhrnjhj4.js} +7 -7
- package/dist/chunks/{location-7rzt3wm8.js → handlers-bmqkn4ah.js} +1 -1
- package/dist/chunks/{location-j2pfq4q6.js → handlers-bt9tc5rb.js} +1 -1
- package/dist/chunks/{location-ceh2h0m9.js → handlers-ctscy0f5.js} +2 -2
- package/dist/chunks/{location-6nvan4e0.js → handlers-ees77nh9.js} +2 -2
- package/dist/chunks/{location-d4bshj6j.js → handlers-em4bkx9t.js} +4 -4
- package/dist/chunks/{location-syqhk5a3.js → handlers-f05bgvye.js} +33 -33
- package/dist/chunks/{location-bjrwanme.js → handlers-f8rap8f6.js} +1 -1
- package/dist/chunks/{location-m6wvgbfq.js → handlers-gtkdacvk.js} +28 -7
- package/dist/chunks/{location-pnqq1zxv.js → handlers-haswyr8z.js} +2 -2
- package/dist/chunks/{location-q0ycym90.js → handlers-hp5sxeae.js} +2 -2
- package/dist/chunks/{location-19c9ysa1.js → handlers-hr75rahr.js} +2 -2
- package/dist/chunks/handlers-j0xcyacv.js +53 -0
- package/dist/chunks/{location-s4aja1df.js → handlers-mzr9gftb.js} +7 -7
- package/dist/chunks/{location-a6yp8301.js → handlers-np19kmxx.js} +2 -2
- package/dist/chunks/{location-r7e9r02j.js → handlers-pme11y2y.js} +2 -2
- package/dist/chunks/{location-zp2jm6dt.js → handlers-qj9kjxn3.js} +1 -1
- package/dist/chunks/{location-4vn5bvkr.js → handlers-rjqbhscq.js} +1 -1
- package/dist/chunks/{location-mwnk46cf.js → handlers-s0padj6k.js} +3 -3
- package/dist/chunks/{location-arj41x43.js → handlers-t88f2hhf.js} +3 -3
- package/dist/chunks/{location-b0b71rwa.js → handlers-v1emgcvb.js} +2 -2
- package/dist/chunks/{location-z5shrcz9.js → handlers-v573ws0d.js} +3 -3
- package/dist/chunks/{location-amg15650.js → handlers-vdkg476e.js} +17 -13
- package/dist/chunks/{location-0d9kah4z.js → handlers-wv5twc2g.js} +8 -8
- package/dist/chunks/{location-8bajbwjh.js → handlers-wz0qz28j.js} +2 -2
- package/dist/chunks/{location-req22b70.js → handlers-x5ncpjy3.js} +1 -1
- package/dist/chunks/handlers-x6486bry.js +35 -0
- package/dist/chunks/{location-4g0fa6m0.js → handlers-zpz5afwq.js} +2 -2
- package/dist/cors.js +1 -1
- package/dist/event-feed.js +5 -5
- package/dist/fetch.js +49 -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.js +6 -6
- package/dist/handlers/event.js +7 -7
- package/dist/handlers/form.js +6 -6
- package/dist/handlers/fs.js +6 -6
- 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.js +6 -6
- package/dist/handlers/message.js +6 -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.js +8 -8
- package/dist/handlers/plugin.js +6 -6
- 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.js +9 -9
- package/dist/handlers/reference.js +6 -6
- package/dist/handlers/rpc.js +6 -6
- package/dist/handlers/server.d.ts +3 -1
- package/dist/handlers/server.js +9 -7
- package/dist/handlers/session-error.js +1 -1
- package/dist/handlers/session.js +6 -6
- package/dist/handlers/shell.js +6 -6
- package/dist/handlers/skill.js +6 -6
- package/dist/handlers/vcs.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 +43 -41
- package/dist/location.js +2 -2
- package/dist/middleware/authorization.d.ts +2 -1
- package/dist/middleware/authorization.js +5 -3
- 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.d.ts +13 -0
- package/dist/pairing.js +10 -0
- package/dist/process.js +56 -59
- package/dist/pty-environment.js +7 -7
- package/dist/request-tracing.js +1 -1
- package/dist/routes.d.ts +3 -2
- package/dist/routes.js +46 -45
- package/dist/server-info.js +5 -5
- package/dist/service-status.js +3 -3
- package/dist/workerd.js +50 -49
- package/package.json +8 -8
- package/dist/chunks/location-4cf3x1kw.js +0 -21
- package/dist/chunks/location-zyv89x5n.js +0 -30
- /package/dist/chunks/{location-9rqn6x4v.js → handlers-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{location-hezj1jdf.js → handlers-hezj1jdf.js} +0 -0
- /package/dist/chunks/{location-q4bn6dy8.js → handlers-q4bn6dy8.js} +0 -0
- /package/dist/chunks/{location-smaf4a18.js → handlers-smaf4a18.js} +0 -0
- /package/dist/chunks/{location-t8yzmczr.js → handlers-t8yzmczr.js} +0 -0
- /package/dist/chunks/{location-yc7nft6q.js → handlers-yc7nft6q.js} +0 -0
package/dist/handlers/session.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SessionHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/handlers-367ngss7.js";
|
|
4
|
+
import"../chunks/handlers-v573ws0d.js";
|
|
5
|
+
import"../chunks/handlers-5rwqcaw2.js";
|
|
6
|
+
import"../chunks/handlers-3kzx88w9.js";
|
|
7
|
+
import"../chunks/handlers-6gkz39ey.js";
|
|
8
|
+
import"../chunks/handlers-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
SessionHandler2 as SessionHandler
|
|
11
11
|
};
|
package/dist/handlers/shell.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ShellHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/handlers-7eckj7zq.js";
|
|
4
|
+
import"../chunks/handlers-v573ws0d.js";
|
|
5
|
+
import"../chunks/handlers-5rwqcaw2.js";
|
|
6
|
+
import"../chunks/handlers-3kzx88w9.js";
|
|
7
|
+
import"../chunks/handlers-6gkz39ey.js";
|
|
8
|
+
import"../chunks/handlers-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
ShellHandler2 as ShellHandler
|
|
11
11
|
};
|
package/dist/handlers/skill.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SkillHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/handlers-hp5sxeae.js";
|
|
4
|
+
import"../chunks/handlers-v573ws0d.js";
|
|
5
|
+
import"../chunks/handlers-5rwqcaw2.js";
|
|
6
|
+
import"../chunks/handlers-3kzx88w9.js";
|
|
7
|
+
import"../chunks/handlers-6gkz39ey.js";
|
|
8
|
+
import"../chunks/handlers-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
SkillHandler2 as SkillHandler
|
|
11
11
|
};
|
package/dist/handlers/vcs.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
VcsHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/handlers-zpz5afwq.js";
|
|
4
|
+
import"../chunks/handlers-v573ws0d.js";
|
|
5
|
+
import"../chunks/handlers-5rwqcaw2.js";
|
|
6
|
+
import"../chunks/handlers-3kzx88w9.js";
|
|
7
|
+
import"../chunks/handlers-6gkz39ey.js";
|
|
8
|
+
import"../chunks/handlers-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
VcsHandler2 as VcsHandler
|
|
11
11
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WebSearchHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/handlers-v1emgcvb.js";
|
|
4
|
+
import"../chunks/handlers-v573ws0d.js";
|
|
5
|
+
import"../chunks/handlers-5rwqcaw2.js";
|
|
6
|
+
import"../chunks/handlers-3kzx88w9.js";
|
|
7
|
+
import"../chunks/handlers-6gkz39ey.js";
|
|
8
|
+
import"../chunks/handlers-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
WebSearchHandler2 as WebSearchHandler
|
|
11
11
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WorktreeHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/handlers-bt9tc5rb.js";
|
|
4
|
+
import"../chunks/handlers-v573ws0d.js";
|
|
5
|
+
import"../chunks/handlers-5rwqcaw2.js";
|
|
6
|
+
import"../chunks/handlers-3kzx88w9.js";
|
|
7
|
+
import"../chunks/handlers-6gkz39ey.js";
|
|
8
|
+
import"../chunks/handlers-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
WorktreeHandler2 as WorktreeHandler
|
|
11
11
|
};
|
package/dist/handlers.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Layer } from "effect";
|
|
2
|
-
export declare const handlers: Layer.Layer<import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.generate"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.message"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.model"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.provider"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.session"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.permission"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.fs"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.form"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.command"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.skill"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.rpc"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.event"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.agent"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.plugin"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.server"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.debug"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.pty"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.experimental"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.shell"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.reference"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.location"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.integration"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.websearch"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.mcp"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.credential"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.project"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.worktree"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.vcs"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.migration"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.config">, never, import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization | import("@opencode/util/global").Service | import("@opencode/core/bus").Service | import("@opencode/core/persistent-pty/index").Service | import("@opencode/core/location-service-map").Service | import("@opencode/core/session").Service | import("@opencode/core/worktree").Service | import("@opencode/core/instance").Service | import("./location").LocationMiddleware | import("./middleware/form-location").FormLocationMiddleware | import("./middleware/session-location").SessionLocationMiddleware | import("@opencode/core/pty/ticket").Service | import("@opencode/core/session/transfer").Service | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/database/database").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/permission/saved").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/plugin/update").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("./server-info").Service> | import("./pty-environment").Service | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/wellknown").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/credential").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/project").Service>>;
|
|
2
|
+
export declare const handlers: Layer.Layer<import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.generate"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.message"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.model"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.provider"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.session"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.permission"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.fs"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.form"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.command"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.skill"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.rpc"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.event"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.agent"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.plugin"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.server"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.debug"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.pty"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.experimental"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.shell"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.reference"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.location"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.integration"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.websearch"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.mcp"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.credential"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.project"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.worktree"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.vcs"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.migration"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.config">, never, import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization | import("@opencode/util/global").Service | import("@opencode/core/bus").Service | import("@opencode/core/persistent-pty/index").Service | import("@opencode/core/location-service-map").Service | import("@opencode/core/session").Service | import("@opencode/core/worktree").Service | import("@opencode/core/instance").Service | import("./location").LocationMiddleware | import("./middleware/form-location").FormLocationMiddleware | import("./middleware/session-location").SessionLocationMiddleware | import("./auth").Config | import("@opencode/core/pty/ticket").Service | import("@opencode/core/session/transfer").Service | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/database/database").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/permission/saved").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/plugin/update").Service> | import("./pairing").Service | import("effect/unstable/http/HttpRouter").Request<"Requires", import("./server-info").Service> | import("./pty-environment").Service | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/wellknown").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/credential").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/project").Service>>;
|
package/dist/handlers.js
CHANGED
|
@@ -1,46 +1,48 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handlers2
|
|
3
|
-
} from "./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/
|
|
3
|
+
} from "./chunks/handlers-f05bgvye.js";
|
|
4
|
+
import"./chunks/handlers-t88f2hhf.js";
|
|
5
|
+
import"./chunks/handlers-s0padj6k.js";
|
|
6
|
+
import"./chunks/handlers-qj9kjxn3.js";
|
|
7
|
+
import"./chunks/handlers-7eckj7zq.js";
|
|
8
|
+
import"./chunks/handlers-hr75rahr.js";
|
|
9
|
+
import"./chunks/handlers-367ngss7.js";
|
|
10
|
+
import"./chunks/handlers-rjqbhscq.js";
|
|
11
|
+
import"./chunks/handlers-em4bkx9t.js";
|
|
12
|
+
import"./chunks/handlers-44xy5pnk.js";
|
|
13
|
+
import"./chunks/handlers-96s6m0w3.js";
|
|
14
|
+
import"./chunks/handlers-f8rap8f6.js";
|
|
15
|
+
import"./chunks/handlers-bmqkn4ah.js";
|
|
16
|
+
import"./chunks/handlers-b1rdg9nf.js";
|
|
17
|
+
import"./chunks/handlers-haswyr8z.js";
|
|
18
|
+
import"./chunks/handlers-6qwktr1g.js";
|
|
19
|
+
import"./chunks/handlers-ees77nh9.js";
|
|
20
|
+
import"./chunks/handlers-140y8w7p.js";
|
|
21
|
+
import"./chunks/handlers-pme11y2y.js";
|
|
22
|
+
import"./chunks/handlers-zpz5afwq.js";
|
|
23
|
+
import"./chunks/handlers-v1emgcvb.js";
|
|
24
|
+
import"./chunks/handlers-x5ncpjy3.js";
|
|
25
|
+
import"./chunks/handlers-hp5sxeae.js";
|
|
26
|
+
import"./chunks/handlers-np19kmxx.js";
|
|
27
|
+
import"./chunks/handlers-bhrnjhj4.js";
|
|
28
|
+
import"./chunks/handlers-26ta7ngt.js";
|
|
29
|
+
import"./chunks/handlers-5bwq5cz2.js";
|
|
30
|
+
import"./chunks/handlers-bt9tc5rb.js";
|
|
31
|
+
import"./chunks/handlers-wz0qz28j.js";
|
|
32
|
+
import"./chunks/handlers-j0xcyacv.js";
|
|
33
|
+
import"./chunks/handlers-hezj1jdf.js";
|
|
34
|
+
import"./chunks/handlers-ctscy0f5.js";
|
|
35
|
+
import"./chunks/handlers-q4bn6dy8.js";
|
|
36
|
+
import"./chunks/handlers-2sy3c7de.js";
|
|
37
|
+
import"./chunks/handlers-mzr9gftb.js";
|
|
38
|
+
import"./chunks/handlers-v573ws0d.js";
|
|
39
|
+
import"./chunks/handlers-5rwqcaw2.js";
|
|
40
|
+
import"./chunks/handlers-3kzx88w9.js";
|
|
41
|
+
import"./chunks/handlers-6gkz39ey.js";
|
|
42
|
+
import"./chunks/handlers-smaf4a18.js";
|
|
43
|
+
import"./chunks/handlers-x6486bry.js";
|
|
44
|
+
import"./chunks/handlers-anm12x33.js";
|
|
45
|
+
import"./chunks/handlers-wv5twc2g.js";
|
|
44
46
|
export {
|
|
45
47
|
handlers2 as handlers
|
|
46
48
|
};
|
package/dist/location.js
CHANGED
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
sessionInfo2,
|
|
5
5
|
requestRef2,
|
|
6
6
|
layer4
|
|
7
|
-
} from "./chunks/
|
|
8
|
-
import"./chunks/
|
|
7
|
+
} from "./chunks/handlers-6gkz39ey.js";
|
|
8
|
+
import"./chunks/handlers-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
LocationMiddleware2 as LocationMiddleware,
|
|
11
11
|
layer4 as layer,
|
|
@@ -2,6 +2,7 @@ import { ServerAuth } from "../auth";
|
|
|
2
2
|
import { Authorization } from "@opencode/protocol/middleware/authorization";
|
|
3
3
|
export { Authorization } from "@opencode/protocol/middleware/authorization";
|
|
4
4
|
import { Effect, Layer } from "effect";
|
|
5
|
-
import { HttpServerRequest } from "effect/unstable/http";
|
|
5
|
+
import { HttpServerRequest, HttpServerResponse } from "effect/unstable/http";
|
|
6
|
+
export declare function unauthorizedResponse(request: HttpServerRequest.HttpServerRequest): HttpServerResponse.HttpServerResponse;
|
|
6
7
|
export declare function authorizedRequest(request: HttpServerRequest.HttpServerRequest, config: ServerAuth.Info): Effect.Effect<boolean, never, never>;
|
|
7
8
|
export declare const authorizationLayer: Layer.Layer<Authorization, never, ServerAuth.Config>;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
+
unauthorizedResponse2,
|
|
2
3
|
authorizedRequest2,
|
|
3
4
|
authorizationLayer2,
|
|
4
5
|
Authorization2
|
|
5
|
-
} from "../chunks/
|
|
6
|
-
import"../chunks/
|
|
6
|
+
} from "../chunks/handlers-gtkdacvk.js";
|
|
7
|
+
import"../chunks/handlers-anm12x33.js";
|
|
7
8
|
export {
|
|
8
9
|
Authorization2 as Authorization,
|
|
9
10
|
authorizationLayer2 as authorizationLayer,
|
|
10
|
-
authorizedRequest2 as authorizedRequest
|
|
11
|
+
authorizedRequest2 as authorizedRequest,
|
|
12
|
+
unauthorizedResponse2 as unauthorizedResponse
|
|
11
13
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FormLocationMiddleware2,
|
|
3
3
|
formLocationLayer2
|
|
4
|
-
} from "../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
4
|
+
} from "../chunks/handlers-5rwqcaw2.js";
|
|
5
|
+
import"../chunks/handlers-6gkz39ey.js";
|
|
6
|
+
import"../chunks/handlers-smaf4a18.js";
|
|
7
7
|
export {
|
|
8
8
|
FormLocationMiddleware2 as FormLocationMiddleware,
|
|
9
9
|
formLocationLayer2 as formLocationLayer
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SessionLocationMiddleware2,
|
|
3
3
|
sessionLocationLayer2
|
|
4
|
-
} from "../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
4
|
+
} from "../chunks/handlers-3kzx88w9.js";
|
|
5
|
+
import"../chunks/handlers-6gkz39ey.js";
|
|
6
|
+
import"../chunks/handlers-smaf4a18.js";
|
|
7
7
|
export {
|
|
8
8
|
SessionLocationMiddleware2 as SessionLocationMiddleware,
|
|
9
9
|
sessionLocationLayer2 as sessionLocationLayer
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * as ServerPairing from "./pairing";
|
|
2
|
+
import { Context, Effect } from "effect";
|
|
3
|
+
export interface Interface {
|
|
4
|
+
readonly issue: () => Effect.Effect<{
|
|
5
|
+
readonly code: string;
|
|
6
|
+
readonly expires_in: number;
|
|
7
|
+
}>;
|
|
8
|
+
readonly consume: (code: string) => Effect.Effect<boolean>;
|
|
9
|
+
}
|
|
10
|
+
declare const Service_base: Context.ServiceClass<Service, "@opencode/ServerPairing", Interface>;
|
|
11
|
+
export declare class Service extends Service_base {
|
|
12
|
+
}
|
|
13
|
+
export declare const node: import("@opencode/util/effect/layer-node").Provider<Service, never, import("@opencode/util/effect/layer-node").Tag<"global">>;
|
package/dist/pairing.js
ADDED
package/dist/process.js
CHANGED
|
@@ -1,67 +1,69 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Config2
|
|
3
|
-
} from "./chunks/
|
|
3
|
+
} from "./chunks/handlers-anm12x33.js";
|
|
4
4
|
import {
|
|
5
5
|
isAllowedCorsOrigin2
|
|
6
|
-
} from "./chunks/
|
|
6
|
+
} from "./chunks/handlers-q4bn6dy8.js";
|
|
7
7
|
import {
|
|
8
|
+
unauthorizedResponse2,
|
|
8
9
|
authorizedRequest2
|
|
9
|
-
} from "./chunks/
|
|
10
|
+
} from "./chunks/handlers-gtkdacvk.js";
|
|
10
11
|
import {
|
|
11
12
|
withoutParentSpan2
|
|
12
|
-
} from "./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/
|
|
13
|
+
} from "./chunks/handlers-yc7nft6q.js";
|
|
14
|
+
import"./chunks/handlers-smaf4a18.js";
|
|
15
|
+
import"./chunks/handlers-6gkz39ey.js";
|
|
16
|
+
import"./chunks/handlers-5rwqcaw2.js";
|
|
17
|
+
import"./chunks/handlers-3kzx88w9.js";
|
|
18
|
+
import"./chunks/handlers-v573ws0d.js";
|
|
19
|
+
import"./chunks/handlers-rjqbhscq.js";
|
|
20
|
+
import"./chunks/handlers-26ta7ngt.js";
|
|
21
|
+
import"./chunks/handlers-b1rdg9nf.js";
|
|
22
|
+
import"./chunks/handlers-haswyr8z.js";
|
|
23
|
+
import"./chunks/handlers-367ngss7.js";
|
|
24
|
+
import"./chunks/handlers-t88f2hhf.js";
|
|
25
|
+
import"./chunks/handlers-96s6m0w3.js";
|
|
26
|
+
import"./chunks/handlers-ees77nh9.js";
|
|
27
|
+
import"./chunks/handlers-pme11y2y.js";
|
|
28
|
+
import"./chunks/handlers-hp5sxeae.js";
|
|
29
|
+
import"./chunks/handlers-f8rap8f6.js";
|
|
30
|
+
import"./chunks/handlers-2sy3c7de.js";
|
|
31
|
+
import"./chunks/handlers-em4bkx9t.js";
|
|
32
|
+
import"./chunks/handlers-ctscy0f5.js";
|
|
33
|
+
import"./chunks/handlers-hr75rahr.js";
|
|
33
34
|
import {
|
|
34
35
|
connectionURLs2
|
|
35
|
-
} from "./chunks/
|
|
36
|
-
import"./chunks/
|
|
37
|
-
import"./chunks/
|
|
38
|
-
import"./chunks/
|
|
39
|
-
import"./chunks/
|
|
40
|
-
import"./chunks/
|
|
41
|
-
import"./chunks/
|
|
42
|
-
import"./chunks/
|
|
43
|
-
import"./chunks/
|
|
44
|
-
import"./chunks/
|
|
45
|
-
import"./chunks/
|
|
46
|
-
import"./chunks/
|
|
47
|
-
import"./chunks/
|
|
48
|
-
import"./chunks/
|
|
49
|
-
import"./chunks/
|
|
50
|
-
import"./chunks/
|
|
51
|
-
import"./chunks/
|
|
52
|
-
import"./chunks/
|
|
53
|
-
import"./chunks/
|
|
54
|
-
import"./chunks/
|
|
55
|
-
import"./chunks/
|
|
36
|
+
} from "./chunks/handlers-mzr9gftb.js";
|
|
37
|
+
import"./chunks/handlers-x6486bry.js";
|
|
38
|
+
import"./chunks/handlers-j0xcyacv.js";
|
|
39
|
+
import"./chunks/handlers-140y8w7p.js";
|
|
40
|
+
import"./chunks/handlers-wv5twc2g.js";
|
|
41
|
+
import"./chunks/handlers-hezj1jdf.js";
|
|
42
|
+
import"./chunks/handlers-bhrnjhj4.js";
|
|
43
|
+
import"./chunks/handlers-s0padj6k.js";
|
|
44
|
+
import"./chunks/handlers-7eckj7zq.js";
|
|
45
|
+
import"./chunks/handlers-5bwq5cz2.js";
|
|
46
|
+
import"./chunks/handlers-x5ncpjy3.js";
|
|
47
|
+
import"./chunks/handlers-np19kmxx.js";
|
|
48
|
+
import"./chunks/handlers-v1emgcvb.js";
|
|
49
|
+
import"./chunks/handlers-wz0qz28j.js";
|
|
50
|
+
import"./chunks/handlers-44xy5pnk.js";
|
|
51
|
+
import"./chunks/handlers-qj9kjxn3.js";
|
|
52
|
+
import"./chunks/handlers-bt9tc5rb.js";
|
|
53
|
+
import"./chunks/handlers-zpz5afwq.js";
|
|
54
|
+
import"./chunks/handlers-bmqkn4ah.js";
|
|
55
|
+
import"./chunks/handlers-6qwktr1g.js";
|
|
56
|
+
import"./chunks/handlers-f05bgvye.js";
|
|
57
|
+
import"./chunks/handlers-t8yzmczr.js";
|
|
56
58
|
import {
|
|
57
59
|
createRoutes2
|
|
58
|
-
} from "./chunks/
|
|
60
|
+
} from "./chunks/handlers-vdkg476e.js";
|
|
59
61
|
import {
|
|
60
|
-
|
|
61
|
-
} from "./chunks/
|
|
62
|
+
make3
|
|
63
|
+
} from "./chunks/handlers-5w24ch67.js";
|
|
62
64
|
import {
|
|
63
65
|
__export
|
|
64
|
-
} from "./chunks/
|
|
66
|
+
} from "./chunks/handlers-9rqn6x4v.js";
|
|
65
67
|
|
|
66
68
|
// src/process.ts
|
|
67
69
|
var exports_process = {};
|
|
@@ -75,6 +77,7 @@ import { SessionRestart } from "@opencode/core/session/execution/restart";
|
|
|
75
77
|
import { InstallationEvent } from "@opencode/schema/installation-event";
|
|
76
78
|
import { hasPtyConnectTicketURL } from "@opencode/protocol/groups/pty";
|
|
77
79
|
import { hasPersistentPtyConnectTicketURL } from "@opencode/protocol/groups/persistent-pty";
|
|
80
|
+
import { isPairingConnectURL } from "@opencode/protocol/groups/server";
|
|
78
81
|
import { Global } from "@opencode/util/global";
|
|
79
82
|
import { Cause, Context, Effect, Exit, Latch, Layer, Option, Ref, Scope } from "effect";
|
|
80
83
|
import { HttpMiddleware, HttpRouter, HttpServerRequest, HttpServerResponse } from "effect/unstable/http";
|
|
@@ -87,7 +90,7 @@ var start = Effect.fn("ServerProcess.start")(function* (options, lifecycle, tran
|
|
|
87
90
|
const hostname = options.hostname ?? "127.0.0.1";
|
|
88
91
|
const port = Option.fromNullishOr(options.port);
|
|
89
92
|
const shutdown = yield* Latch.make();
|
|
90
|
-
const status = yield*
|
|
93
|
+
const status = yield* make3();
|
|
91
94
|
const bound = yield* listen({ hostname, port });
|
|
92
95
|
const urls = () => {
|
|
93
96
|
const address = bound.server.address();
|
|
@@ -164,22 +167,16 @@ function dispatch(password, status, application, version, urls, tmp) {
|
|
|
164
167
|
const ready = state.type === "ready" && Option.isSome(app);
|
|
165
168
|
if (request.method === "GET" && url.pathname === "/api/info" && !ready) {
|
|
166
169
|
if (!(yield* authorizedRequest2(request, auth)))
|
|
167
|
-
return
|
|
170
|
+
return unauthorizedResponse2(request);
|
|
168
171
|
return yield* infoResponse(status, version, urls, tmp);
|
|
169
172
|
}
|
|
170
|
-
if ((!ready || !hasPtyConnectTicketURL(url) && !hasPersistentPtyConnectTicketURL(url)) && !(yield* authorizedRequest2(request, auth)))
|
|
171
|
-
return
|
|
173
|
+
if (!isPairingConnectURL(url) && (!ready || !hasPtyConnectTicketURL(url) && !hasPersistentPtyConnectTicketURL(url)) && !(yield* authorizedRequest2(request, auth)))
|
|
174
|
+
return unauthorizedResponse2(request);
|
|
172
175
|
if (ready)
|
|
173
176
|
return yield* app.value;
|
|
174
177
|
return unavailable(state);
|
|
175
178
|
});
|
|
176
179
|
}
|
|
177
|
-
function unauthorized() {
|
|
178
|
-
return HttpServerResponse.empty({
|
|
179
|
-
status: 401,
|
|
180
|
-
headers: { "www-authenticate": 'Basic realm="Secure Area"' }
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
180
|
var infoResponse = Effect.fnUntraced(function* (status, version, urls, tmp) {
|
|
184
181
|
const state = yield* status.current;
|
|
185
182
|
return HttpServerResponse.jsonUnsafe({ version, pid: process.pid, urls: urls(), paths: { tmp } }, {
|
package/dist/pty-environment.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
Service5,
|
|
3
|
+
layer5,
|
|
4
|
+
node3,
|
|
5
5
|
exports_pty_environment
|
|
6
|
-
} from "./chunks/
|
|
6
|
+
} from "./chunks/handlers-wv5twc2g.js";
|
|
7
7
|
export {
|
|
8
8
|
exports_pty_environment as PtyEnvironment,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
Service5 as Service,
|
|
10
|
+
layer5 as layer,
|
|
11
|
+
node3 as node
|
|
12
12
|
};
|
package/dist/request-tracing.js
CHANGED
package/dist/routes.d.ts
CHANGED
|
@@ -23,8 +23,9 @@ import { Workspace } from "@opencode/core/workspace";
|
|
|
23
23
|
import { HttpRouter } from "effect/unstable/http";
|
|
24
24
|
import { Layer } from "effect";
|
|
25
25
|
import { PtyEnvironment } from "./pty-environment";
|
|
26
|
+
import { ServerPairing } from "./pairing";
|
|
26
27
|
import type { ServerOptions } from "./options";
|
|
27
|
-
export declare function createRoutes(options?: ServerOptions, serviceURLs?: () => ReadonlyArray<string>, overrides?: LayerNode.Replacements): Layer.Layer<Global.Service | Database.Service | Bus.Service | import("effect/unstable/http/HttpClient").HttpClient | Project.Service | Credential.Service | WellKnown.Service | Workspace.Service | PermissionSaved.Service | PersistentPty.Service | LocationServiceMap.Service | SdkPlugins.Service | PluginUpdate.Service | Job.Service | Session.Service | Worktree.Service | Instance.Service | SessionRestart.Service | PtyTicket.Service | SessionTransfer.Service | LocationActivity.Service | PtyEnvironment.Service | HttpRouter.HttpRouter, Error | PersistentPty.UnavailableError, import("effect/FileSystem").FileSystem | import("effect/Path").Path | import("effect/unstable/http/Etag").Generator | import("effect/unstable/http/HttpPlatform").HttpPlatform>;
|
|
28
|
+
export declare function createRoutes(options?: ServerOptions, serviceURLs?: () => ReadonlyArray<string>, overrides?: LayerNode.Replacements): Layer.Layer<Global.Service | Database.Service | Bus.Service | import("effect/unstable/http/HttpClient").HttpClient | Project.Service | Credential.Service | WellKnown.Service | Workspace.Service | PermissionSaved.Service | PersistentPty.Service | LocationServiceMap.Service | SdkPlugins.Service | PluginUpdate.Service | Job.Service | Session.Service | Worktree.Service | Instance.Service | SessionRestart.Service | PtyTicket.Service | SessionTransfer.Service | LocationActivity.Service | ServerPairing.Service | PtyEnvironment.Service | HttpRouter.HttpRouter, Error | PersistentPty.UnavailableError, import("effect/FileSystem").FileSystem | import("effect/Path").Path | import("effect/unstable/http/Etag").Generator | import("effect/unstable/http/HttpPlatform").HttpPlatform>;
|
|
28
29
|
type InstanceNode = (replacements: () => LayerNode.Replacements) => LayerNode.Provider<Instance.Service, never, typeof Node.tags.values.global>;
|
|
29
|
-
export declare function createEmbeddedRoutes(options?: ServerOptions, overrides?: LayerNode.Replacements, instances?: InstanceNode): Layer.Layer<Global.Service | Database.Service | Bus.Service | import("effect/unstable/http/HttpClient").HttpClient | Project.Service | Credential.Service | WellKnown.Service | Workspace.Service | PermissionSaved.Service | PersistentPty.Service | LocationServiceMap.Service | SdkPlugins.Service | PluginUpdate.Service | Job.Service | Session.Service | Worktree.Service | Instance.Service | SessionRestart.Service | PtyTicket.Service | SessionTransfer.Service | LocationActivity.Service | PtyEnvironment.Service | HttpRouter.HttpRouter, Error | PersistentPty.UnavailableError, import("effect/FileSystem").FileSystem | import("effect/Path").Path | import("effect/unstable/http/Etag").Generator | import("effect/unstable/http/HttpPlatform").HttpPlatform>;
|
|
30
|
+
export declare function createEmbeddedRoutes(options?: ServerOptions, overrides?: LayerNode.Replacements, instances?: InstanceNode): Layer.Layer<Global.Service | Database.Service | Bus.Service | import("effect/unstable/http/HttpClient").HttpClient | Project.Service | Credential.Service | WellKnown.Service | Workspace.Service | PermissionSaved.Service | PersistentPty.Service | LocationServiceMap.Service | SdkPlugins.Service | PluginUpdate.Service | Job.Service | Session.Service | Worktree.Service | Instance.Service | SessionRestart.Service | PtyTicket.Service | SessionTransfer.Service | LocationActivity.Service | ServerPairing.Service | PtyEnvironment.Service | HttpRouter.HttpRouter, Error | PersistentPty.UnavailableError, import("effect/FileSystem").FileSystem | import("effect/Path").Path | import("effect/unstable/http/Etag").Generator | import("effect/unstable/http/HttpPlatform").HttpPlatform>;
|
|
30
31
|
export {};
|