@opencode/server 2.3.2 → 2.4.1
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 +249 -1
- package/dist/api.js +5 -5
- package/dist/auth.js +1 -1
- package/dist/chunks/workerd-0rzj25w4.js +194 -0
- package/dist/chunks/{media-uri-2eaky32g.js → workerd-20wvj9q6.js} +2 -2
- package/dist/chunks/{media-uri-39nnfjx1.js → workerd-39nnfjx1.js} +1 -1
- package/dist/chunks/{media-uri-tbqv89f6.js → workerd-3rn5pzng.js} +5 -5
- package/dist/chunks/{media-uri-ny1j968n.js → workerd-4apj6a8e.js} +2 -2
- package/dist/chunks/{media-uri-09kw3a77.js → workerd-4gbck4qg.js} +2 -2
- package/dist/chunks/{media-uri-91858wp1.js → workerd-4r2ye500.js} +2 -2
- package/dist/chunks/{media-uri-sssj0qa5.js → workerd-5dgtfnrn.js} +47 -20
- package/dist/chunks/{media-uri-az0609r6.js → workerd-6t6fd9bq.js} +2 -4
- package/dist/chunks/{media-uri-wmep189j.js → workerd-73tyf2qy.js} +8 -8
- package/dist/chunks/{media-uri-cmnrxx36.js → workerd-77gnb026.js} +4 -4
- package/dist/chunks/{media-uri-z3e7v67k.js → workerd-7dtbad8d.js} +7 -7
- package/dist/chunks/{media-uri-kkdkqt8j.js → workerd-7x6cg3xs.js} +2 -4
- package/dist/chunks/{media-uri-78rcgzsr.js → workerd-7ydfwv45.js} +4 -1
- package/dist/chunks/{media-uri-yk755swr.js → workerd-86dz2n4m.js} +5 -4
- package/dist/chunks/{media-uri-1h6b4sc5.js → workerd-8mfdzabk.js} +6 -18
- package/dist/chunks/{media-uri-btahnm2b.js → workerd-8n1ypg70.js} +3 -3
- package/dist/chunks/{media-uri-8sb6qqpn.js → workerd-8sb6qqpn.js} +1 -1
- package/dist/chunks/{media-uri-qd0r787n.js → workerd-b1x3j2e8.js} +2 -2
- package/dist/chunks/{media-uri-qcg3sqtb.js → workerd-b7yt2ykh.js} +2 -2
- package/dist/chunks/{media-uri-4q6e7fh8.js → workerd-b87bs0cf.js} +2 -2
- package/dist/chunks/{media-uri-z9zyd4qg.js → workerd-bvm82fhd.js} +4 -4
- package/dist/chunks/{media-uri-rha2aq18.js → workerd-d0advawr.js} +2 -5
- package/dist/chunks/{media-uri-djr0jy89.js → workerd-djr0jy89.js} +1 -1
- package/dist/chunks/{media-uri-ssxxka7j.js → workerd-dqfyxmp4.js} +4 -4
- package/dist/chunks/{media-uri-a8jcac9a.js → workerd-edwk6ehd.js} +1 -1
- package/dist/chunks/{media-uri-qfyg9gb7.js → workerd-fvpjvjpp.js} +7 -7
- package/dist/chunks/{media-uri-cr5sd8bz.js → workerd-g23ffrnz.js} +3 -3
- package/dist/chunks/{media-uri-rs3v36hp.js → workerd-g80pvn6e.js} +2 -2
- package/dist/chunks/{media-uri-cezwbsk5.js → workerd-g97h7k0s.js} +1 -1
- package/dist/chunks/workerd-hgrkvk6s.js +48 -0
- package/dist/chunks/{media-uri-j4at0y5c.js → workerd-j4at0y5c.js} +1 -1
- package/dist/chunks/{media-uri-50bbk3b2.js → workerd-j80tzjj3.js} +4 -12
- package/dist/chunks/{media-uri-3pb3n73h.js → workerd-jpqse2v9.js} +35 -35
- package/dist/chunks/{media-uri-8mj7kvhm.js → workerd-k26h7zjg.js} +2 -2
- package/dist/chunks/{media-uri-b4rhnd07.js → workerd-kffke7z4.js} +15 -9
- package/dist/chunks/{media-uri-myqk22k5.js → workerd-myqk22k5.js} +2 -2
- package/dist/chunks/{media-uri-htyf2qs7.js → workerd-n6ypjnhz.js} +1 -1
- package/dist/chunks/{media-uri-6kawhtwy.js → workerd-nkfbbfe7.js} +4 -4
- package/dist/chunks/{media-uri-5cpb32hf.js → workerd-p4zkxzv7.js} +1 -1
- package/dist/chunks/{media-uri-enp1bp7r.js → workerd-p9wp66hf.js} +1 -1
- package/dist/chunks/{media-uri-6z9pvq7p.js → workerd-pv4dnzzq.js} +1 -1
- package/dist/chunks/{media-uri-b3bmdkga.js → workerd-qahj7606.js} +1 -1
- package/dist/chunks/{media-uri-7b9xm1qg.js → workerd-rktygpea.js} +4 -1
- package/dist/chunks/{media-uri-j87xz9bt.js → workerd-s8t5gq7c.js} +3 -3
- package/dist/chunks/{media-uri-t32e1bbt.js → workerd-t32e1bbt.js} +1 -1
- package/dist/chunks/{media-uri-p86kew8c.js → workerd-t62b1gmw.js} +2 -2
- package/dist/chunks/{media-uri-te8jwba1.js → workerd-t8azv5ge.js} +2 -2
- package/dist/chunks/{media-uri-d0edqfxx.js → workerd-v0z8pce5.js} +3 -6
- package/dist/chunks/{media-uri-n0chxnkn.js → workerd-vxy32kc1.js} +4 -4
- package/dist/chunks/{media-uri-1gwc8nvb.js → workerd-w13ad1dk.js} +3 -3
- package/dist/chunks/{media-uri-mzs0n5xz.js → workerd-w9jcwh65.js} +7 -7
- package/dist/chunks/{media-uri-zcvan105.js → workerd-wh07bcjv.js} +1 -1
- package/dist/chunks/{media-uri-f559fakr.js → workerd-zrptb2x8.js} +2 -2
- package/dist/content-headers.js +1 -1
- package/dist/cors.js +1 -1
- package/dist/event-feed.js +5 -5
- package/dist/fetch.js +60 -59
- package/dist/handlers/agent.js +6 -6
- package/dist/handlers/artifact.js +3 -3
- package/dist/handlers/automation.d.ts +2 -4
- package/dist/handlers/automation.js +2 -2
- package/dist/handlers/blob.js +3 -3
- package/dist/handlers/command.js +6 -6
- package/dist/handlers/config.js +6 -6
- package/dist/handlers/credential.d.ts +1 -1
- package/dist/handlers/credential.js +7 -7
- 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 +8 -8
- package/dist/handlers/generate.js +6 -6
- package/dist/handlers/integration.js +6 -6
- package/dist/handlers/job.d.ts +13 -1
- package/dist/handlers/job.js +2 -2
- package/dist/handlers/location.js +6 -6
- package/dist/handlers/machine.d.ts +95 -0
- package/dist/handlers/machine.js +18 -0
- package/dist/handlers/mcp.js +8 -8
- package/dist/handlers/media.js +2 -2
- package/dist/handlers/message.js +7 -7
- 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 +16 -15
- 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 +8 -8
- 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.js +7 -7
- package/dist/handlers/shell.js +6 -6
- package/dist/handlers/skill.js +6 -6
- package/dist/handlers/usage.js +6 -6
- package/dist/handlers/vcs.js +6 -6
- 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 +53 -52
- package/dist/location.d.ts +1 -3
- package/dist/location.js +4 -6
- package/dist/media-uri.js +1 -1
- package/dist/middleware/authorization.js +2 -2
- package/dist/middleware/defect-response.js +1 -1
- 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 +3 -3
- package/dist/process.js +72 -63
- package/dist/range.js +1 -1
- package/dist/request-site.js +2 -2
- package/dist/request-tracing.js +1 -1
- package/dist/routes.d.ts +6 -2
- package/dist/routes.js +57 -56
- package/dist/server-info.js +5 -5
- package/dist/service-status.js +1 -1
- package/dist/workerd.js +63 -60
- package/package.json +8 -8
- package/dist/chunks/media-uri-9cd3a4b8.js +0 -69
- /package/dist/chunks/{media-uri-9rqn6x4v.js → workerd-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{media-uri-bd8755ek.js → workerd-bd8755ek.js} +0 -0
- /package/dist/chunks/{media-uri-n26yr6pw.js → workerd-n26yr6pw.js} +0 -0
- /package/dist/chunks/{media-uri-q187pxxd.js → workerd-q187pxxd.js} +0 -0
- /package/dist/chunks/{media-uri-q4bn6dy8.js → workerd-q4bn6dy8.js} +0 -0
- /package/dist/chunks/{media-uri-smaf4a18.js → workerd-smaf4a18.js} +0 -0
- /package/dist/chunks/{media-uri-xthc02cw.js → workerd-xthc02cw.js} +0 -0
- /package/dist/chunks/{media-uri-yc7nft6q.js → workerd-yc7nft6q.js} +0 -0
package/dist/location.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { FileSystem } from "@opencode/core/filesystem";
|
|
2
2
|
import { Location } from "@opencode/core/location";
|
|
3
|
-
import { Plugin } from "@opencode/core/plugin";
|
|
4
3
|
import { LocationServiceMap } from "@opencode/core/location-services";
|
|
5
4
|
import { Session } from "@opencode/core/session";
|
|
6
|
-
import { LocationNotFoundError, InvalidRequestError
|
|
5
|
+
import { LocationNotFoundError, InvalidRequestError } from "@opencode/protocol/errors";
|
|
7
6
|
import { Effect, Layer } from "effect";
|
|
8
7
|
import { HttpServerRequest } from "effect/http";
|
|
9
8
|
import { HttpApiMiddleware } from "effect/http-api";
|
|
@@ -19,7 +18,6 @@ declare const LocationMiddleware_base: HttpApiMiddleware.ServiceClass<LocationMi
|
|
|
19
18
|
export declare class LocationMiddleware extends LocationMiddleware_base {
|
|
20
19
|
}
|
|
21
20
|
export declare function locationErrors<A, E, R>(effect: Effect.Effect<A, E, R>): Effect.Effect<A, LocationNotFoundError | Exclude<E, Extract<E, FileSystem.DirectoryNotFoundError>>, R>;
|
|
22
|
-
export declare const awaitPlugins: Effect.Effect<void, ServiceUnavailableError, Plugin.Service>;
|
|
23
21
|
export declare function response<A, E, R>(data: Effect.Effect<A, E, R>): Effect.Effect<{
|
|
24
22
|
location: Location.Info;
|
|
25
23
|
data: A;
|
package/dist/location.js
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LocationMiddleware2,
|
|
3
3
|
locationErrors2,
|
|
4
|
-
awaitPlugins2,
|
|
5
4
|
response2,
|
|
6
5
|
sessionInfo2,
|
|
7
6
|
requestRef2,
|
|
8
|
-
|
|
9
|
-
} from "./chunks/
|
|
10
|
-
import"./chunks/
|
|
7
|
+
layer3
|
|
8
|
+
} from "./chunks/workerd-j80tzjj3.js";
|
|
9
|
+
import"./chunks/workerd-smaf4a18.js";
|
|
11
10
|
export {
|
|
12
11
|
LocationMiddleware2 as LocationMiddleware,
|
|
13
|
-
|
|
14
|
-
layer4 as layer,
|
|
12
|
+
layer3 as layer,
|
|
15
13
|
locationErrors2 as locationErrors,
|
|
16
14
|
requestRef2 as requestRef,
|
|
17
15
|
response2 as response,
|
package/dist/media-uri.js
CHANGED
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
authorizedRequest2,
|
|
4
4
|
authorizationLayer2,
|
|
5
5
|
Authorization2
|
|
6
|
-
} from "../chunks/
|
|
7
|
-
import"../chunks/
|
|
6
|
+
} from "../chunks/workerd-rktygpea.js";
|
|
7
|
+
import"../chunks/workerd-j4at0y5c.js";
|
|
8
8
|
export {
|
|
9
9
|
Authorization2 as Authorization,
|
|
10
10
|
authorizationLayer2 as authorizationLayer,
|
|
@@ -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/workerd-n6ypjnhz.js";
|
|
5
|
+
import"../chunks/workerd-j80tzjj3.js";
|
|
6
|
+
import"../chunks/workerd-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/workerd-qahj7606.js";
|
|
5
|
+
import"../chunks/workerd-j80tzjj3.js";
|
|
6
|
+
import"../chunks/workerd-smaf4a18.js";
|
|
7
7
|
export {
|
|
8
8
|
SessionLocationMiddleware2 as SessionLocationMiddleware,
|
|
9
9
|
sessionLocationLayer2 as sessionLocationLayer
|
package/dist/pairing.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
Service3,
|
|
3
3
|
node2,
|
|
4
4
|
exports_pairing
|
|
5
|
-
} from "./chunks/
|
|
5
|
+
} from "./chunks/workerd-w9jcwh65.js";
|
|
6
6
|
export {
|
|
7
7
|
exports_pairing as ServerPairing,
|
|
8
|
-
|
|
8
|
+
Service3 as Service,
|
|
9
9
|
node2 as node
|
|
10
10
|
};
|
package/dist/process.js
CHANGED
|
@@ -1,82 +1,85 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Config2
|
|
3
|
-
} from "./chunks/
|
|
3
|
+
} from "./chunks/workerd-j4at0y5c.js";
|
|
4
4
|
import {
|
|
5
5
|
isAllowedCorsOrigin2
|
|
6
|
-
} from "./chunks/
|
|
6
|
+
} from "./chunks/workerd-q4bn6dy8.js";
|
|
7
|
+
import {
|
|
8
|
+
machinesEnabled2
|
|
9
|
+
} from "./chunks/workerd-0rzj25w4.js";
|
|
7
10
|
import {
|
|
8
11
|
unauthorizedResponse2,
|
|
9
12
|
authorizedRequest2
|
|
10
|
-
} from "./chunks/
|
|
13
|
+
} from "./chunks/workerd-rktygpea.js";
|
|
11
14
|
import {
|
|
12
15
|
withoutParentSpan2
|
|
13
|
-
} from "./chunks/
|
|
16
|
+
} from "./chunks/workerd-yc7nft6q.js";
|
|
14
17
|
import {
|
|
15
18
|
middleware2
|
|
16
|
-
} from "./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/
|
|
19
|
+
} from "./chunks/workerd-myqk22k5.js";
|
|
20
|
+
import"./chunks/workerd-smaf4a18.js";
|
|
21
|
+
import"./chunks/workerd-j80tzjj3.js";
|
|
22
|
+
import"./chunks/workerd-n6ypjnhz.js";
|
|
23
|
+
import"./chunks/workerd-qahj7606.js";
|
|
24
|
+
import"./chunks/workerd-s8t5gq7c.js";
|
|
25
|
+
import"./chunks/workerd-8mfdzabk.js";
|
|
26
|
+
import"./chunks/workerd-v0z8pce5.js";
|
|
27
|
+
import"./chunks/workerd-xthc02cw.js";
|
|
28
|
+
import"./chunks/workerd-w13ad1dk.js";
|
|
29
|
+
import"./chunks/workerd-d0advawr.js";
|
|
30
|
+
import"./chunks/workerd-6t6fd9bq.js";
|
|
31
|
+
import"./chunks/workerd-dqfyxmp4.js";
|
|
32
|
+
import"./chunks/workerd-8n1ypg70.js";
|
|
33
|
+
import"./chunks/workerd-t32e1bbt.js";
|
|
34
|
+
import"./chunks/workerd-8sb6qqpn.js";
|
|
35
|
+
import"./chunks/workerd-vxy32kc1.js";
|
|
36
|
+
import"./chunks/workerd-zrptb2x8.js";
|
|
37
|
+
import"./chunks/workerd-b87bs0cf.js";
|
|
38
|
+
import"./chunks/workerd-4apj6a8e.js";
|
|
39
|
+
import"./chunks/workerd-p4zkxzv7.js";
|
|
40
|
+
import"./chunks/workerd-fvpjvjpp.js";
|
|
41
|
+
import"./chunks/workerd-77gnb026.js";
|
|
42
|
+
import"./chunks/workerd-k26h7zjg.js";
|
|
43
|
+
import"./chunks/workerd-20wvj9q6.js";
|
|
41
44
|
import {
|
|
42
45
|
connectionURLs2
|
|
43
|
-
} from "./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/
|
|
56
|
-
import"./chunks/
|
|
57
|
-
import"./chunks/
|
|
58
|
-
import"./chunks/
|
|
59
|
-
import"./chunks/
|
|
60
|
-
import"./chunks/
|
|
61
|
-
import"./chunks/
|
|
62
|
-
import"./chunks/
|
|
63
|
-
import"./chunks/
|
|
64
|
-
import"./chunks/
|
|
65
|
-
import"./chunks/
|
|
66
|
-
import"./chunks/
|
|
67
|
-
import"./chunks/
|
|
68
|
-
import"./chunks/
|
|
69
|
-
import"./chunks/
|
|
70
|
-
import"./chunks/
|
|
46
|
+
} from "./chunks/workerd-7dtbad8d.js";
|
|
47
|
+
import"./chunks/workerd-w9jcwh65.js";
|
|
48
|
+
import"./chunks/workerd-73tyf2qy.js";
|
|
49
|
+
import"./chunks/workerd-b7yt2ykh.js";
|
|
50
|
+
import"./chunks/workerd-q187pxxd.js";
|
|
51
|
+
import"./chunks/workerd-nkfbbfe7.js";
|
|
52
|
+
import"./chunks/workerd-t62b1gmw.js";
|
|
53
|
+
import"./chunks/workerd-g23ffrnz.js";
|
|
54
|
+
import"./chunks/workerd-hgrkvk6s.js";
|
|
55
|
+
import"./chunks/workerd-7ydfwv45.js";
|
|
56
|
+
import"./chunks/workerd-djr0jy89.js";
|
|
57
|
+
import"./chunks/workerd-kffke7z4.js";
|
|
58
|
+
import"./chunks/workerd-b1x3j2e8.js";
|
|
59
|
+
import"./chunks/workerd-t8azv5ge.js";
|
|
60
|
+
import"./chunks/workerd-wh07bcjv.js";
|
|
61
|
+
import"./chunks/workerd-4r2ye500.js";
|
|
62
|
+
import"./chunks/workerd-7x6cg3xs.js";
|
|
63
|
+
import"./chunks/workerd-4gbck4qg.js";
|
|
64
|
+
import"./chunks/workerd-bvm82fhd.js";
|
|
65
|
+
import"./chunks/workerd-86dz2n4m.js";
|
|
66
|
+
import"./chunks/workerd-edwk6ehd.js";
|
|
67
|
+
import"./chunks/workerd-p9wp66hf.js";
|
|
68
|
+
import"./chunks/workerd-g80pvn6e.js";
|
|
69
|
+
import"./chunks/workerd-pv4dnzzq.js";
|
|
70
|
+
import"./chunks/workerd-g97h7k0s.js";
|
|
71
|
+
import"./chunks/workerd-jpqse2v9.js";
|
|
72
|
+
import"./chunks/workerd-bd8755ek.js";
|
|
73
|
+
import"./chunks/workerd-n26yr6pw.js";
|
|
71
74
|
import {
|
|
72
75
|
createRoutes2
|
|
73
|
-
} from "./chunks/
|
|
76
|
+
} from "./chunks/workerd-5dgtfnrn.js";
|
|
74
77
|
import {
|
|
75
78
|
make2
|
|
76
|
-
} from "./chunks/
|
|
79
|
+
} from "./chunks/workerd-39nnfjx1.js";
|
|
77
80
|
import {
|
|
78
81
|
__export
|
|
79
|
-
} from "./chunks/
|
|
82
|
+
} from "./chunks/workerd-9rqn6x4v.js";
|
|
80
83
|
|
|
81
84
|
// src/process.ts
|
|
82
85
|
var exports_process = {};
|
|
@@ -88,10 +91,12 @@ import { NodeHttpServer } from "@effect/platform-node";
|
|
|
88
91
|
import { Bus } from "@opencode/core/bus";
|
|
89
92
|
import { SessionRestart } from "@opencode/core/session/execution/restart";
|
|
90
93
|
import { Automation } from "@opencode/core/automation";
|
|
94
|
+
import { SessionSearchBuild } from "@opencode/core/session/search-build";
|
|
91
95
|
import { InstallationEvent } from "@opencode/schema/installation-event";
|
|
92
96
|
import { hasPtyConnectTicketURL } from "@opencode/protocol/groups/pty";
|
|
93
97
|
import { hasPersistentPtyConnectTicketURL } from "@opencode/protocol/groups/persistent-pty";
|
|
94
98
|
import { hasMcpClientTicketURL } from "@opencode/protocol/groups/mcp";
|
|
99
|
+
import { isMachineLinkUpgrade } from "@opencode/protocol/groups/machine";
|
|
95
100
|
import { isPairingConnectURL } from "@opencode/protocol/groups/server";
|
|
96
101
|
import { Global } from "@opencode/util/global";
|
|
97
102
|
import { Cause, Context, Effect, Exit, Latch, Layer, Option, Ref, Scope } from "effect";
|
|
@@ -116,7 +121,8 @@ var start = Effect.fn("ServerProcess.start")(function* (options, lifecycle, tran
|
|
|
116
121
|
};
|
|
117
122
|
const urls = () => [...localURLs(), ...remoteURLs?.() ?? []];
|
|
118
123
|
const application = yield* Ref.make(Option.none());
|
|
119
|
-
const
|
|
124
|
+
const machinesFlag = yield* Ref.make(Effect.succeed(false));
|
|
125
|
+
const app = dispatch(password, status, application, machinesFlag, options.app?.version ?? "unknown", urls, Global.Path.tmp);
|
|
120
126
|
yield* bound.http.serve((transform ? transform(app) : app).pipe(middleware2(options), HttpMiddleware.compression(), HttpMiddleware.cors({ allowedOrigins: (origin) => isAllowedCorsOrigin2(origin, options), maxAge: 86400 })), errorResponseLogger).pipe(Effect.provide(NodeHttpServer.layerHttpServices), withoutParentSpan2);
|
|
121
127
|
if (lifecycle)
|
|
122
128
|
yield* lifecycle.onListen(bound.http.address, shutdown.open.pipe(Effect.asVoid)).pipe(Effect.flatMap((cleanup) => Effect.addFinalizer(() => Scope.close(bound.scope, Exit.void).pipe(Effect.andThen(cleanup)))), Effect.uninterruptible);
|
|
@@ -132,6 +138,8 @@ var start = Effect.fn("ServerProcess.start")(function* (options, lifecycle, tran
|
|
|
132
138
|
yield* installRestartContinuity(Context.get(context, SessionRestart.Service)).pipe(Effect.provideService(Scope.Scope, applicationScope));
|
|
133
139
|
}
|
|
134
140
|
yield* Effect.forkIn(Context.get(context, Automation.Service).run, applicationScope);
|
|
141
|
+
yield* Effect.forkIn(Context.get(context, SessionSearchBuild.Service).run, applicationScope);
|
|
142
|
+
yield* Ref.set(machinesFlag, yield* machinesEnabled2.pipe(Effect.provide(context)));
|
|
135
143
|
yield* Ref.set(application, Option.some(Context.get(context, HttpRouter.HttpRouter).asHttpEffect()));
|
|
136
144
|
yield* status.ready;
|
|
137
145
|
const bus = Context.get(context, Bus.Service);
|
|
@@ -174,20 +182,21 @@ function addressInUse(error) {
|
|
|
174
182
|
const cause = error.cause;
|
|
175
183
|
return typeof cause === "object" && cause !== null && "code" in cause && cause.code === "EADDRINUSE";
|
|
176
184
|
}
|
|
177
|
-
function dispatch(password, status, application, version, urls, tmp) {
|
|
185
|
+
function dispatch(password, status, application, machinesFlag, version, urls, tmp) {
|
|
178
186
|
const auth = Config2.of({ password: Option.some(password), username: "opencode" });
|
|
179
187
|
return Effect.gen(function* () {
|
|
180
188
|
const request = yield* HttpServerRequest.HttpServerRequest;
|
|
181
189
|
const url = new URL(request.url, "http://localhost");
|
|
182
190
|
const state = yield* status.current;
|
|
183
191
|
const app = yield* Ref.get(application);
|
|
192
|
+
const machines = yield* Ref.get(machinesFlag);
|
|
184
193
|
const ready = state.type === "ready" && Option.isSome(app);
|
|
185
194
|
if (request.method === "GET" && url.pathname === "/api/info" && !ready) {
|
|
186
195
|
if (!(yield* authorizedRequest2(request, auth)))
|
|
187
196
|
return unauthorizedResponse2(request);
|
|
188
197
|
return yield* infoResponse(status, version, urls, tmp);
|
|
189
198
|
}
|
|
190
|
-
if (!isPairingConnectURL(url) && (!ready || !hasPtyConnectTicketURL(url) && !hasPersistentPtyConnectTicketURL(url) && !hasMcpClientTicketURL(url)) && !(yield* authorizedRequest2(request, auth)))
|
|
199
|
+
if (!isPairingConnectURL(url) && (!ready || !hasPtyConnectTicketURL(url) && !hasPersistentPtyConnectTicketURL(url) && !hasMcpClientTicketURL(url) && !(isMachineLinkUpgrade(request) && (yield* machines))) && !(yield* authorizedRequest2(request, auth)))
|
|
191
200
|
return unauthorizedResponse2(request);
|
|
192
201
|
if (ready)
|
|
193
202
|
return yield* app.value;
|
package/dist/range.js
CHANGED
package/dist/request-site.js
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
rejected2,
|
|
3
3
|
middleware2,
|
|
4
4
|
exports_request_site
|
|
5
|
-
} from "./chunks/
|
|
6
|
-
import"./chunks/
|
|
5
|
+
} from "./chunks/workerd-myqk22k5.js";
|
|
6
|
+
import"./chunks/workerd-q4bn6dy8.js";
|
|
7
7
|
export {
|
|
8
8
|
exports_request_site as RequestSite,
|
|
9
9
|
middleware2 as middleware,
|
package/dist/request-tracing.js
CHANGED
package/dist/routes.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Database } from "@opencode/core/database/database";
|
|
2
2
|
import { App } from "@opencode/core/app";
|
|
3
|
+
import { CodeModeApi } from "@opencode/core/codemode/api";
|
|
3
4
|
import { LayerNode } from "@opencode/util/effect/layer-node";
|
|
4
5
|
import { Node } from "@opencode/util/effect/app-node";
|
|
5
6
|
import { Bus } from "@opencode/core/bus";
|
|
@@ -22,6 +23,9 @@ import { Global } from "@opencode/util/global";
|
|
|
22
23
|
import { FSUtil } from "@opencode/util/fs-util";
|
|
23
24
|
import { LocationServiceMap } from "@opencode/core/location-service-map";
|
|
24
25
|
import { LocationActivity } from "@opencode/core/location-activity";
|
|
26
|
+
import { Identity } from "@opencode/core/machine/identity";
|
|
27
|
+
import { Machines } from "@opencode/core/machine/machines";
|
|
28
|
+
import { SessionSearchBuild } from "@opencode/core/session/search-build";
|
|
25
29
|
import { SessionRestart } from "@opencode/core/session/execution/restart";
|
|
26
30
|
import { Automation } from "@opencode/core/automation";
|
|
27
31
|
import { PluginUpdate } from "@opencode/core/plugin/update";
|
|
@@ -33,7 +37,7 @@ import { HttpRouter } from "effect/http";
|
|
|
33
37
|
import { Layer } from "effect";
|
|
34
38
|
import { ServerPairing } from "./pairing";
|
|
35
39
|
import type { ServerOptions } from "./options";
|
|
36
|
-
export declare function createRoutes(options?: ServerOptions, serviceURLs?: () => ReadonlyArray<string>, overrides?: LayerNode.Replacements): Layer.Layer<Shell.Daemon | import("effect/http/HttpClient").HttpClient | HttpRouter.HttpRouter | FSUtil.Service | Global.Service | Database.Service | App.Service | Credential.Service | KV.Service | WellKnown.Service | InstructionEntry.Service | Job.Service | PermissionSaved.Service |
|
|
40
|
+
export declare function createRoutes(options?: ServerOptions, serviceURLs?: () => ReadonlyArray<string>, overrides?: LayerNode.Replacements): Layer.Layer<Shell.Daemon | import("effect/http/HttpClient").HttpClient | HttpRouter.HttpRouter | FSUtil.Service | Global.Service | Database.Service | App.Service | Credential.Service | KV.Service | WellKnown.Service | InstructionEntry.Service | Job.Service | Workspace.Service | Identity.Service | Machines.Service | PermissionSaved.Service | CodeModeApi.Service | LocationServiceMap.Service | PersistentPty.Service | Session.Service | Automation.Service | Worktree.Service | BlobStore.Service | SessionSearchBuild.Service | VideoGeneration.Service | SdkPlugins.Service | PluginUpdate.Service | Instance.Service | Bus.Service | Project.Service | SessionRestart.Service | PtyTicket.Service | SessionTransfer.Service | LocationActivity.Service | FileWatch.Service | ServerPairing.Service, Error | PersistentPty.UnavailableError, import("effect/FileSystem").FileSystem | import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/Path").Path>;
|
|
37
41
|
type InstanceNode = (replacements: () => LayerNode.Replacements) => LayerNode.Provider<Instance.Service, never, typeof Node.tags.values.global>;
|
|
38
|
-
export declare function createEmbeddedRoutes(options?: ServerOptions, overrides?: LayerNode.Replacements, instances?: InstanceNode): Layer.Layer<Shell.Daemon | import("effect/http/HttpClient").HttpClient | HttpRouter.HttpRouter | FSUtil.Service | Global.Service | Database.Service | App.Service | Credential.Service | KV.Service | WellKnown.Service | InstructionEntry.Service | Job.Service | PermissionSaved.Service |
|
|
42
|
+
export declare function createEmbeddedRoutes(options?: ServerOptions, overrides?: LayerNode.Replacements, instances?: InstanceNode): Layer.Layer<Shell.Daemon | import("effect/http/HttpClient").HttpClient | HttpRouter.HttpRouter | FSUtil.Service | Global.Service | Database.Service | App.Service | Credential.Service | KV.Service | WellKnown.Service | InstructionEntry.Service | Job.Service | Workspace.Service | Identity.Service | Machines.Service | PermissionSaved.Service | CodeModeApi.Service | LocationServiceMap.Service | PersistentPty.Service | Session.Service | Automation.Service | Worktree.Service | BlobStore.Service | SessionSearchBuild.Service | VideoGeneration.Service | SdkPlugins.Service | PluginUpdate.Service | Instance.Service | Bus.Service | Project.Service | SessionRestart.Service | PtyTicket.Service | SessionTransfer.Service | LocationActivity.Service | FileWatch.Service | ServerPairing.Service, Error | PersistentPty.UnavailableError, import("effect/FileSystem").FileSystem | import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/Path").Path>;
|
|
39
43
|
export {};
|
package/dist/routes.js
CHANGED
|
@@ -1,62 +1,63 @@
|
|
|
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/
|
|
51
|
-
import"./chunks/
|
|
52
|
-
import"./chunks/
|
|
53
|
-
import"./chunks/
|
|
54
|
-
import"./chunks/
|
|
55
|
-
import"./chunks/
|
|
56
|
-
import"./chunks/
|
|
57
|
-
import"./chunks/
|
|
58
|
-
import"./chunks/
|
|
59
|
-
import"./chunks/
|
|
4
|
+
} from "./chunks/workerd-5dgtfnrn.js";
|
|
5
|
+
import"./chunks/workerd-n26yr6pw.js";
|
|
6
|
+
import"./chunks/workerd-rktygpea.js";
|
|
7
|
+
import"./chunks/workerd-bd8755ek.js";
|
|
8
|
+
import"./chunks/workerd-jpqse2v9.js";
|
|
9
|
+
import"./chunks/workerd-v0z8pce5.js";
|
|
10
|
+
import"./chunks/workerd-20wvj9q6.js";
|
|
11
|
+
import"./chunks/workerd-bvm82fhd.js";
|
|
12
|
+
import"./chunks/workerd-8mfdzabk.js";
|
|
13
|
+
import"./chunks/workerd-t8azv5ge.js";
|
|
14
|
+
import"./chunks/workerd-g97h7k0s.js";
|
|
15
|
+
import"./chunks/workerd-dqfyxmp4.js";
|
|
16
|
+
import"./chunks/workerd-kffke7z4.js";
|
|
17
|
+
import"./chunks/workerd-nkfbbfe7.js";
|
|
18
|
+
import"./chunks/workerd-q187pxxd.js";
|
|
19
|
+
import"./chunks/workerd-p9wp66hf.js";
|
|
20
|
+
import"./chunks/workerd-t62b1gmw.js";
|
|
21
|
+
import"./chunks/workerd-86dz2n4m.js";
|
|
22
|
+
import"./chunks/workerd-7ydfwv45.js";
|
|
23
|
+
import"./chunks/workerd-p4zkxzv7.js";
|
|
24
|
+
import"./chunks/workerd-0rzj25w4.js";
|
|
25
|
+
import"./chunks/workerd-6t6fd9bq.js";
|
|
26
|
+
import"./chunks/workerd-w13ad1dk.js";
|
|
27
|
+
import"./chunks/workerd-7x6cg3xs.js";
|
|
28
|
+
import"./chunks/workerd-4gbck4qg.js";
|
|
29
|
+
import"./chunks/workerd-8n1ypg70.js";
|
|
30
|
+
import"./chunks/workerd-b7yt2ykh.js";
|
|
31
|
+
import"./chunks/workerd-4apj6a8e.js";
|
|
32
|
+
import"./chunks/workerd-vxy32kc1.js";
|
|
33
|
+
import"./chunks/workerd-djr0jy89.js";
|
|
34
|
+
import"./chunks/workerd-wh07bcjv.js";
|
|
35
|
+
import"./chunks/workerd-hgrkvk6s.js";
|
|
36
|
+
import"./chunks/workerd-77gnb026.js";
|
|
37
|
+
import"./chunks/workerd-b87bs0cf.js";
|
|
38
|
+
import"./chunks/workerd-d0advawr.js";
|
|
39
|
+
import"./chunks/workerd-zrptb2x8.js";
|
|
40
|
+
import"./chunks/workerd-edwk6ehd.js";
|
|
41
|
+
import"./chunks/workerd-b1x3j2e8.js";
|
|
42
|
+
import"./chunks/workerd-pv4dnzzq.js";
|
|
43
|
+
import"./chunks/workerd-73tyf2qy.js";
|
|
44
|
+
import"./chunks/workerd-g23ffrnz.js";
|
|
45
|
+
import"./chunks/workerd-k26h7zjg.js";
|
|
46
|
+
import"./chunks/workerd-g80pvn6e.js";
|
|
47
|
+
import"./chunks/workerd-4r2ye500.js";
|
|
48
|
+
import"./chunks/workerd-s8t5gq7c.js";
|
|
49
|
+
import"./chunks/workerd-qahj7606.js";
|
|
50
|
+
import"./chunks/workerd-n6ypjnhz.js";
|
|
51
|
+
import"./chunks/workerd-8sb6qqpn.js";
|
|
52
|
+
import"./chunks/workerd-fvpjvjpp.js";
|
|
53
|
+
import"./chunks/workerd-w9jcwh65.js";
|
|
54
|
+
import"./chunks/workerd-t32e1bbt.js";
|
|
55
|
+
import"./chunks/workerd-xthc02cw.js";
|
|
56
|
+
import"./chunks/workerd-j80tzjj3.js";
|
|
57
|
+
import"./chunks/workerd-smaf4a18.js";
|
|
58
|
+
import"./chunks/workerd-7dtbad8d.js";
|
|
59
|
+
import"./chunks/workerd-j4at0y5c.js";
|
|
60
|
+
import"./chunks/workerd-q4bn6dy8.js";
|
|
60
61
|
export {
|
|
61
62
|
createEmbeddedRoutes2 as createEmbeddedRoutes,
|
|
62
63
|
createRoutes2 as createRoutes
|
package/dist/server-info.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
Service4,
|
|
3
|
+
layer4,
|
|
4
4
|
connectionURLs2,
|
|
5
5
|
exports_server_info
|
|
6
|
-
} from "./chunks/
|
|
6
|
+
} from "./chunks/workerd-7dtbad8d.js";
|
|
7
7
|
export {
|
|
8
8
|
exports_server_info as ServerInfo,
|
|
9
|
-
|
|
9
|
+
Service4 as Service,
|
|
10
10
|
connectionURLs2 as connectionURLs,
|
|
11
|
-
|
|
11
|
+
layer4 as layer
|
|
12
12
|
};
|