@opencode/server 0.0.0-dev-1359 → 0.0.0-dev-1361
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 +171 -2
- package/dist/api.js +5 -5
- package/dist/auth.js +1 -1
- package/dist/chunks/{api-0wjm8gvs.js → cors-0wjm8gvs.js} +2 -2
- package/dist/chunks/{api-10sj2tcf.js → cors-10sj2tcf.js} +1 -1
- package/dist/chunks/{api-8fhq523v.js → cors-1z9qd4y2.js} +4 -4
- package/dist/chunks/{api-29nx48hm.js → cors-29nx48hm.js} +1 -1
- package/dist/chunks/{api-2tmcamrc.js → cors-2tmcamrc.js} +2 -2
- package/dist/chunks/{api-4aa8a7eb.js → cors-3cx4ac5j.js} +19 -15
- package/dist/chunks/{api-74nxvsrn.js → cors-3xkwxcke.js} +7 -4
- package/dist/chunks/cors-5fn432p6.js +44 -0
- package/dist/chunks/{api-3te71694.js → cors-5pdfedjd.js} +4 -4
- package/dist/chunks/{api-g1xn52zf.js → cors-6cmsxt3d.js} +6 -6
- package/dist/chunks/{api-6pm6ek88.js → cors-6pm6ek88.js} +1 -1
- package/dist/chunks/{api-7dkb5ks8.js → cors-7dkb5ks8.js} +2 -2
- package/dist/chunks/{api-8nezxn08.js → cors-8nezxn08.js} +1 -1
- package/dist/chunks/{api-8qsq6tbs.js → cors-8qsq6tbs.js} +2 -2
- package/dist/chunks/{api-8sb6qqpn.js → cors-8sb6qqpn.js} +1 -1
- package/dist/chunks/{api-8xdajgpr.js → cors-8xdajgpr.js} +2 -2
- package/dist/chunks/{api-9hynp6rm.js → cors-9hynp6rm.js} +2 -2
- package/dist/chunks/{api-am27j67f.js → cors-am27j67f.js} +1 -1
- package/dist/chunks/{api-br4x4prt.js → cors-br4x4prt.js} +1 -1
- package/dist/chunks/{api-ca564221.js → cors-ca564221.js} +1 -1
- package/dist/chunks/{api-csnx1nj3.js → cors-csnx1nj3.js} +2 -2
- package/dist/chunks/{api-djr0jy89.js → cors-djr0jy89.js} +1 -1
- package/dist/chunks/{api-39nnfjx1.js → cors-e6e4kz0w.js} +4 -4
- package/dist/chunks/{api-ehyp3zqd.js → cors-ehyp3zqd.js} +1 -1
- package/dist/chunks/{api-em7ed65n.js → cors-em7ed65n.js} +2 -2
- package/dist/chunks/{api-ba6cev85.js → cors-enx9e1dz.js} +4 -4
- package/dist/chunks/{api-exwy1kbj.js → cors-exwy1kbj.js} +2 -2
- package/dist/chunks/{api-f3gr6hfv.js → cors-f3gr6hfv.js} +2 -2
- package/dist/chunks/{api-0tgs6603.js → cors-fa6nnfxm.js} +39 -36
- package/dist/chunks/{api-g23ffrnz.js → cors-g23ffrnz.js} +2 -2
- package/dist/chunks/{api-ts1fhe9d.js → cors-g4964mny.js} +3 -3
- package/dist/chunks/{api-kshqfq8s.js → cors-hb1ty1t1.js} +7 -8
- package/dist/chunks/{api-j4at0y5c.js → cors-j4at0y5c.js} +1 -1
- package/dist/chunks/{api-javgytnb.js → cors-javgytnb.js} +2 -2
- package/dist/chunks/{api-k74zefsg.js → cors-k74zefsg.js} +1 -1
- package/dist/chunks/{api-343ey9kd.js → cors-ka2mtp6f.js} +2 -2
- package/dist/chunks/{api-kmwr1xw9.js → cors-kmwr1xw9.js} +3 -3
- package/dist/chunks/{api-thpam3yh.js → cors-msvebcy2.js} +8 -8
- package/dist/chunks/{api-myqk22k5.js → cors-myqk22k5.js} +2 -2
- package/dist/chunks/{api-n2zyxnzr.js → cors-n2zyxnzr.js} +1 -1
- package/dist/chunks/{api-1eazfxyk.js → cors-nvb61mgq.js} +4 -4
- package/dist/chunks/{api-p3bbq7g3.js → cors-p3bbq7g3.js} +1 -1
- package/dist/chunks/{api-prwd5gwt.js → cors-prwd5gwt.js} +2 -2
- package/dist/chunks/{api-qq3f8fnn.js → cors-qq3f8fnn.js} +2 -2
- package/dist/chunks/{api-5jwtxv1w.js → cors-qssmdh31.js} +4 -4
- package/dist/chunks/{api-rgbnpstw.js → cors-rgbnpstw.js} +2 -2
- package/dist/chunks/{api-rjhxbsc4.js → cors-rjhxbsc4.js} +2 -2
- package/dist/chunks/{api-s0zgx365.js → cors-s0zgx365.js} +2 -2
- package/dist/chunks/{api-gbjwxtsb.js → cors-sv3a4xc1.js} +16 -12
- package/dist/chunks/{api-t32e1bbt.js → cors-t32e1bbt.js} +1 -1
- package/dist/chunks/{api-mzs0n5xz.js → cors-v9t81kwn.js} +8 -8
- package/dist/chunks/cors-w6xb5z15.js +196 -0
- package/dist/chunks/{api-whvq72as.js → cors-whvq72as.js} +3 -3
- package/dist/chunks/{api-wsvmph03.js → cors-wsvmph03.js} +2 -2
- package/dist/chunks/{api-x2qy7jg1.js → cors-x2qy7jg1.js} +1 -1
- package/dist/chunks/{api-yc92za0p.js → cors-yc92za0p.js} +2 -2
- package/dist/chunks/{api-fvpjvjpp.js → cors-z5c20bjd.js} +31 -14
- package/dist/content-headers.js +1 -1
- package/dist/cors.js +1 -1
- package/dist/event-feed.d.ts +14 -2
- package/dist/event-feed.js +5 -5
- package/dist/fetch.d.ts +1 -1
- package/dist/fetch.js +67 -65
- package/dist/handlers/agent.js +6 -6
- package/dist/handlers/artifact.js +3 -3
- 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.js +7 -7
- package/dist/handlers/debug.js +6 -6
- package/dist/handlers/event.js +7 -7
- package/dist/handlers/experimental/browser-tunnel.js +4 -4
- package/dist/handlers/flag.js +6 -6
- 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.js +2 -2
- package/dist/handlers/location.js +6 -6
- package/dist/handlers/machine.js +1 -1
- 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 +20 -18
- 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/push.js +1 -1
- 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/space.d.ts +44 -0
- package/dist/handlers/space.js +7 -0
- 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 +2 -1
- package/dist/handlers.js +58 -56
- package/dist/location.js +2 -2
- 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 +5 -5
- package/dist/process.js +68 -66
- 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 +3 -2
- package/dist/routes.js +62 -60
- package/dist/server-info.js +3 -3
- package/dist/service-status.js +3 -3
- package/dist/space-store.d.ts +49 -0
- package/dist/space-store.js +16 -0
- package/dist/workerd.js +66 -64
- package/package.json +8 -8
- /package/dist/chunks/{api-017ycvbx.js → cors-017ycvbx.js} +0 -0
- /package/dist/chunks/{api-9rqn6x4v.js → cors-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{api-bd8755ek.js → cors-bd8755ek.js} +0 -0
- /package/dist/chunks/{api-n26yr6pw.js → cors-n26yr6pw.js} +0 -0
- /package/dist/chunks/{api-q187pxxd.js → cors-q187pxxd.js} +0 -0
- /package/dist/chunks/{api-q4bn6dy8.js → cors-q4bn6dy8.js} +0 -0
- /package/dist/chunks/{api-qpnw2qd1.js → cors-qpnw2qd1.js} +0 -0
- /package/dist/chunks/{api-rqgv9x42.js → cors-rqgv9x42.js} +0 -0
- /package/dist/chunks/{api-xthc02cw.js → cors-xthc02cw.js} +0 -0
- /package/dist/chunks/{api-yc7nft6q.js → cors-yc7nft6q.js} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./cors-9rqn6x4v.js";
|
|
4
4
|
|
|
5
5
|
// src/service-status.ts
|
|
6
6
|
var exports_service_status = {};
|
|
7
7
|
__export(exports_service_status, {
|
|
8
8
|
Status: () => exports_service_status,
|
|
9
|
-
make: () =>
|
|
9
|
+
make: () => make3
|
|
10
10
|
});
|
|
11
11
|
import { Effect, Ref } from "effect";
|
|
12
|
-
var
|
|
12
|
+
var make3 = Effect.fnUntraced(function* (options = {}) {
|
|
13
13
|
const current = yield* Ref.make(options.initial ?? { type: "starting" });
|
|
14
14
|
const beginStopping = Ref.update(current, (status) => status.type === "stopping" ? status : { type: "stopping" });
|
|
15
15
|
return {
|
|
@@ -20,4 +20,4 @@ var make2 = Effect.fnUntraced(function* (options = {}) {
|
|
|
20
20
|
};
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
-
export {
|
|
23
|
+
export { make3, exports_service_status };
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
locationErrors2,
|
|
3
3
|
response2,
|
|
4
4
|
requestRef2
|
|
5
|
-
} from "./
|
|
5
|
+
} from "./cors-br4x4prt.js";
|
|
6
6
|
import {
|
|
7
7
|
Api2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./cors-whvq72as.js";
|
|
9
9
|
import {
|
|
10
10
|
CorsConfig2,
|
|
11
11
|
isAllowedRequestOrigin2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./cors-q4bn6dy8.js";
|
|
13
13
|
import {
|
|
14
14
|
runPtySocket2,
|
|
15
15
|
holdLocation2
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./cors-q187pxxd.js";
|
|
17
17
|
|
|
18
18
|
// src/handlers/mcp.ts
|
|
19
19
|
import { Location } from "@opencode/core/location";
|
|
@@ -1,108 +1,111 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GenerateHandler2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./cors-prwd5gwt.js";
|
|
4
4
|
import {
|
|
5
5
|
VoiceHandler2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./cors-rjhxbsc4.js";
|
|
7
7
|
import {
|
|
8
8
|
MessageHandler2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./cors-g4964mny.js";
|
|
10
10
|
import {
|
|
11
11
|
ModelHandler2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./cors-s0zgx365.js";
|
|
13
13
|
import {
|
|
14
14
|
ProviderHandler2
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./cors-yc92za0p.js";
|
|
16
16
|
import {
|
|
17
17
|
SessionHandler2
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./cors-qssmdh31.js";
|
|
19
19
|
import {
|
|
20
20
|
PermissionHandler2
|
|
21
|
-
} from "./
|
|
21
|
+
} from "./cors-kmwr1xw9.js";
|
|
22
22
|
import {
|
|
23
23
|
FileSystemHandler2
|
|
24
|
-
} from "./
|
|
24
|
+
} from "./cors-nvb61mgq.js";
|
|
25
25
|
import {
|
|
26
26
|
FormHandler2
|
|
27
|
-
} from "./
|
|
27
|
+
} from "./cors-8qsq6tbs.js";
|
|
28
28
|
import {
|
|
29
29
|
CommandHandler2
|
|
30
|
-
} from "./
|
|
30
|
+
} from "./cors-rgbnpstw.js";
|
|
31
31
|
import {
|
|
32
32
|
SkillHandler2
|
|
33
|
-
} from "./
|
|
33
|
+
} from "./cors-3xkwxcke.js";
|
|
34
34
|
import {
|
|
35
35
|
RpcHandler2
|
|
36
|
-
} from "./
|
|
36
|
+
} from "./cors-k74zefsg.js";
|
|
37
37
|
import {
|
|
38
|
-
|
|
39
|
-
} from "./
|
|
38
|
+
layer3
|
|
39
|
+
} from "./cors-z5c20bjd.js";
|
|
40
40
|
import {
|
|
41
41
|
EventHandler2
|
|
42
|
-
} from "./
|
|
42
|
+
} from "./cors-hb1ty1t1.js";
|
|
43
43
|
import {
|
|
44
44
|
AgentHandler2
|
|
45
|
-
} from "./
|
|
45
|
+
} from "./cors-exwy1kbj.js";
|
|
46
46
|
import {
|
|
47
47
|
PluginHandler2
|
|
48
|
-
} from "./
|
|
48
|
+
} from "./cors-em7ed65n.js";
|
|
49
49
|
import {
|
|
50
50
|
ServerHandler2
|
|
51
|
-
} from "./
|
|
51
|
+
} from "./cors-6cmsxt3d.js";
|
|
52
52
|
import {
|
|
53
53
|
DebugHandler2
|
|
54
|
-
} from "./
|
|
54
|
+
} from "./cors-csnx1nj3.js";
|
|
55
55
|
import {
|
|
56
56
|
PtyHandler2
|
|
57
|
-
} from "./
|
|
57
|
+
} from "./cors-1z9qd4y2.js";
|
|
58
|
+
import {
|
|
59
|
+
extension2
|
|
60
|
+
} from "./cors-w6xb5z15.js";
|
|
58
61
|
import {
|
|
59
62
|
PersistentPtyHandler2
|
|
60
|
-
} from "./
|
|
63
|
+
} from "./cors-sv3a4xc1.js";
|
|
61
64
|
import {
|
|
62
65
|
ShellHandler2
|
|
63
|
-
} from "./
|
|
66
|
+
} from "./cors-f3gr6hfv.js";
|
|
64
67
|
import {
|
|
65
68
|
ReferenceHandler2
|
|
66
|
-
} from "./
|
|
69
|
+
} from "./cors-7dkb5ks8.js";
|
|
67
70
|
import {
|
|
68
71
|
LocationHandler2
|
|
69
|
-
} from "./
|
|
72
|
+
} from "./cors-p3bbq7g3.js";
|
|
70
73
|
import {
|
|
71
74
|
IntegrationHandler2
|
|
72
|
-
} from "./
|
|
75
|
+
} from "./cors-2tmcamrc.js";
|
|
73
76
|
import {
|
|
74
77
|
WebSearchHandler2
|
|
75
|
-
} from "./
|
|
78
|
+
} from "./cors-qq3f8fnn.js";
|
|
76
79
|
import {
|
|
77
80
|
UsageHandler2
|
|
78
|
-
} from "./
|
|
81
|
+
} from "./cors-wsvmph03.js";
|
|
79
82
|
import {
|
|
80
83
|
FlagHandler2
|
|
81
|
-
} from "./
|
|
84
|
+
} from "./cors-9hynp6rm.js";
|
|
82
85
|
import {
|
|
83
86
|
McpHandler2
|
|
84
|
-
} from "./
|
|
87
|
+
} from "./cors-enx9e1dz.js";
|
|
85
88
|
import {
|
|
86
89
|
CredentialHandler2
|
|
87
|
-
} from "./
|
|
90
|
+
} from "./cors-8xdajgpr.js";
|
|
88
91
|
import {
|
|
89
92
|
ProjectHandler2
|
|
90
|
-
} from "./
|
|
93
|
+
} from "./cors-8nezxn08.js";
|
|
91
94
|
import {
|
|
92
95
|
WorktreeHandler2
|
|
93
|
-
} from "./
|
|
96
|
+
} from "./cors-n2zyxnzr.js";
|
|
94
97
|
import {
|
|
95
98
|
VcsHandler2
|
|
96
|
-
} from "./
|
|
99
|
+
} from "./cors-0wjm8gvs.js";
|
|
97
100
|
import {
|
|
98
101
|
MigrationHandler2
|
|
99
|
-
} from "./
|
|
102
|
+
} from "./cors-10sj2tcf.js";
|
|
100
103
|
import {
|
|
101
104
|
ConfigHandler2
|
|
102
|
-
} from "./
|
|
105
|
+
} from "./cors-am27j67f.js";
|
|
103
106
|
|
|
104
107
|
// src/handlers.ts
|
|
105
108
|
import { Layer } from "effect";
|
|
106
|
-
var handlers2 = Layer.mergeAll(ServerHandler2, DebugHandler2, MigrationHandler2, LocationHandler2, AgentHandler2, PluginHandler2, SessionHandler2, MessageHandler2, ModelHandler2, GenerateHandler2, VoiceHandler2, ProviderHandler2, IntegrationHandler2, WebSearchHandler2, UsageHandler2, FlagHandler2, McpHandler2, CredentialHandler2, ProjectHandler2, FormHandler2, PermissionHandler2, FileSystemHandler2, CommandHandler2, SkillHandler2, RpcHandler2, EventHandler2.pipe(Layer.provide(
|
|
109
|
+
var handlers2 = Layer.mergeAll(ServerHandler2, DebugHandler2, MigrationHandler2, LocationHandler2, AgentHandler2, PluginHandler2, SessionHandler2, MessageHandler2, ModelHandler2, GenerateHandler2, VoiceHandler2, ProviderHandler2, IntegrationHandler2, WebSearchHandler2, UsageHandler2, FlagHandler2, McpHandler2, CredentialHandler2, ProjectHandler2, FormHandler2, PermissionHandler2, FileSystemHandler2, CommandHandler2, SkillHandler2, RpcHandler2, EventHandler2.pipe(Layer.provide(layer3(extension2))), PtyHandler2, PersistentPtyHandler2, ShellHandler2, ReferenceHandler2, WorktreeHandler2, VcsHandler2, ConfigHandler2);
|
|
107
110
|
|
|
108
111
|
export { handlers2 };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
missingSession2,
|
|
3
3
|
failedMessageDecode2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./cors-rqgv9x42.js";
|
|
5
5
|
import {
|
|
6
6
|
Api2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./cors-whvq72as.js";
|
|
8
8
|
import {
|
|
9
9
|
wantsMediaRefs2
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./cors-xthc02cw.js";
|
|
11
11
|
|
|
12
12
|
// src/handlers/message.ts
|
|
13
13
|
import { SessionMessage } from "@opencode/core/session/message";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./cors-whvq72as.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
5
|
+
Service4,
|
|
6
6
|
frame2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./cors-z5c20bjd.js";
|
|
8
8
|
|
|
9
9
|
// src/handlers/event.ts
|
|
10
10
|
import { Event } from "@opencode/schema/event";
|
|
@@ -12,14 +12,13 @@ import { Effect, Stream } from "effect";
|
|
|
12
12
|
import { HttpServerResponse } from "effect/http";
|
|
13
13
|
import { HttpApiBuilder } from "effect/http-api";
|
|
14
14
|
var EventHandler2 = HttpApiBuilder.group(Api2, "server.event", (handlers) => Effect.gen(function* () {
|
|
15
|
-
const feed = yield*
|
|
15
|
+
const feed = yield* Service4;
|
|
16
16
|
return handlers.handleRaw("event.subscribe", (ctx) => Effect.gen(function* () {
|
|
17
|
-
const
|
|
17
|
+
const output = Stream.unwrap(feed.subscribe(ctx.query.types).pipe(Effect.map((subscription) => Stream.make(frame2({
|
|
18
18
|
id: Event.ID.create(),
|
|
19
19
|
type: "server.connected",
|
|
20
|
-
data: {}
|
|
21
|
-
};
|
|
22
|
-
const output = Stream.unwrap(feed.subscribe(ctx.query.types).pipe(Effect.map((live) => Stream.make(frame2(connected)).pipe(Stream.concat(live)))));
|
|
20
|
+
data: { stream: subscription.id }
|
|
21
|
+
})).pipe(Stream.concat(subscription.events)))));
|
|
23
22
|
const heartbeat = Stream.tick("15 seconds").pipe(Stream.map(() => `: heartbeat
|
|
24
23
|
|
|
25
24
|
`));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
missingSession2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./cors-rqgv9x42.js";
|
|
4
4
|
import {
|
|
5
5
|
locationErrors2,
|
|
6
6
|
response2,
|
|
7
7
|
requestRef2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./cors-br4x4prt.js";
|
|
9
9
|
|
|
10
10
|
// src/handlers/artifact.ts
|
|
11
11
|
import { Artifact } from "@opencode/core/artifact";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CorsConfig2,
|
|
3
3
|
isAllowedRequestOrigin2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./cors-q4bn6dy8.js";
|
|
5
5
|
import {
|
|
6
6
|
locationErrors2,
|
|
7
7
|
requestRef2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./cors-br4x4prt.js";
|
|
9
9
|
|
|
10
10
|
// src/handlers/experimental/browser-tunnel.ts
|
|
11
11
|
import { NodeHttpServerRequest } from "@effect/platform-node";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
missingSession2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./cors-rqgv9x42.js";
|
|
4
4
|
import {
|
|
5
5
|
locationErrors2,
|
|
6
6
|
response2,
|
|
7
7
|
sessionInfo2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./cors-br4x4prt.js";
|
|
9
9
|
import {
|
|
10
10
|
Api2
|
|
11
|
-
} from "./
|
|
11
|
+
} from "./cors-whvq72as.js";
|
|
12
12
|
|
|
13
13
|
// src/handlers/permission.ts
|
|
14
14
|
import { Instance } from "@opencode/core/instance/service";
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isAllowedCorsOrigin2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./cors-q4bn6dy8.js";
|
|
4
4
|
import {
|
|
5
5
|
middleware2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./cors-myqk22k5.js";
|
|
7
7
|
import {
|
|
8
8
|
withoutParentSpan2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./cors-yc7nft6q.js";
|
|
10
10
|
import {
|
|
11
11
|
createRoutes2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./cors-3cx4ac5j.js";
|
|
13
13
|
import {
|
|
14
14
|
__export
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./cors-9rqn6x4v.js";
|
|
16
16
|
|
|
17
17
|
// src/fetch.ts
|
|
18
18
|
var exports_fetch = {};
|
|
19
19
|
__export(exports_fetch, {
|
|
20
20
|
ServerFetch: () => exports_fetch,
|
|
21
|
-
make: () =>
|
|
21
|
+
make: () => make2,
|
|
22
22
|
makeWithContext: () => makeWithContext2
|
|
23
23
|
});
|
|
24
24
|
import { Context, Effect, Layer } from "effect";
|
|
@@ -30,8 +30,8 @@ var makeWithContext2 = Effect.fn("ServerFetch.makeWithContext")(function* (optio
|
|
|
30
30
|
const handler = Context.get(context, HttpRouter.HttpRouter).asHttpEffect().pipe(middleware2(options), HttpMiddleware.cors({ allowedOrigins: (origin) => isAllowedCorsOrigin2(origin, options), maxAge: 86400 }), HttpEffect.toWebHandlerWith(context));
|
|
31
31
|
return { handler, context };
|
|
32
32
|
});
|
|
33
|
-
var
|
|
33
|
+
var make2 = Effect.fn("ServerFetch.make")(function* (options = {}, boot = {}) {
|
|
34
34
|
return (yield* makeWithContext2(options, boot)).handler;
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
-
export { makeWithContext2,
|
|
37
|
+
export { makeWithContext2, make2, exports_fetch };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./cors-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./cors-whvq72as.js";
|
|
7
7
|
import {
|
|
8
8
|
download2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./cors-t32e1bbt.js";
|
|
10
10
|
import {
|
|
11
11
|
parse2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./cors-8sb6qqpn.js";
|
|
13
13
|
|
|
14
14
|
// src/handlers/fs.ts
|
|
15
15
|
import { Environment } from "@opencode/core/environment/index";
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
missingMessage2,
|
|
5
5
|
failedMessageDecode2,
|
|
6
6
|
failedSnapshot2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./cors-rqgv9x42.js";
|
|
8
8
|
import {
|
|
9
9
|
locationErrors2
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./cors-br4x4prt.js";
|
|
11
11
|
import {
|
|
12
12
|
Api2
|
|
13
|
-
} from "./
|
|
13
|
+
} from "./cors-whvq72as.js";
|
|
14
14
|
import {
|
|
15
15
|
wantsMediaRefs2
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./cors-xthc02cw.js";
|
|
17
17
|
|
|
18
18
|
// src/handlers/session.ts
|
|
19
19
|
import { Instance } from "@opencode/core/instance/service";
|
|
@@ -1,38 +1,41 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./cors-whvq72as.js";
|
|
4
4
|
import {
|
|
5
5
|
CorsConfig2,
|
|
6
6
|
isAllowedRequestOrigin2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./cors-q4bn6dy8.js";
|
|
8
8
|
import {
|
|
9
9
|
makeArtifact2
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./cors-javgytnb.js";
|
|
11
11
|
import {
|
|
12
12
|
makeBlobGet2
|
|
13
|
-
} from "./
|
|
13
|
+
} from "./cors-g23ffrnz.js";
|
|
14
14
|
import {
|
|
15
15
|
makeBrowserTunnel2
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./cors-ka2mtp6f.js";
|
|
17
17
|
import {
|
|
18
18
|
makeAutomation2
|
|
19
|
-
} from "./
|
|
19
|
+
} from "./cors-6pm6ek88.js";
|
|
20
20
|
import {
|
|
21
21
|
makeJob2
|
|
22
|
-
} from "./
|
|
22
|
+
} from "./cors-x2qy7jg1.js";
|
|
23
23
|
import {
|
|
24
24
|
makeMachineLink2,
|
|
25
25
|
makeMachine2
|
|
26
|
-
} from "./
|
|
26
|
+
} from "./cors-017ycvbx.js";
|
|
27
27
|
import {
|
|
28
28
|
makeMediaGet2
|
|
29
|
-
} from "./
|
|
29
|
+
} from "./cors-djr0jy89.js";
|
|
30
30
|
import {
|
|
31
31
|
makePush2
|
|
32
|
-
} from "./
|
|
32
|
+
} from "./cors-qpnw2qd1.js";
|
|
33
|
+
import {
|
|
34
|
+
makeSpace2
|
|
35
|
+
} from "./cors-5fn432p6.js";
|
|
33
36
|
import {
|
|
34
37
|
runPtySocket2
|
|
35
|
-
} from "./
|
|
38
|
+
} from "./cors-q187pxxd.js";
|
|
36
39
|
|
|
37
40
|
// src/handlers/persistent-pty.ts
|
|
38
41
|
import { PersistentPty } from "@opencode/core/persistent-pty";
|
|
@@ -58,6 +61,7 @@ var PersistentPtyHandler2 = HttpApiBuilder.group(Api2, "server.experimental", (h
|
|
|
58
61
|
const pty = yield* PersistentPty.Service;
|
|
59
62
|
const artifact = yield* makeArtifact2;
|
|
60
63
|
const job = yield* makeJob2;
|
|
64
|
+
const space = yield* makeSpace2;
|
|
61
65
|
const mediaGet = yield* makeMediaGet2;
|
|
62
66
|
const blobGet = yield* makeBlobGet2;
|
|
63
67
|
const automation = yield* makeAutomation2;
|
|
@@ -65,7 +69,7 @@ var PersistentPtyHandler2 = HttpApiBuilder.group(Api2, "server.experimental", (h
|
|
|
65
69
|
const machineLink = yield* makeMachineLink2;
|
|
66
70
|
const browserTunnel = yield* makeBrowserTunnel2;
|
|
67
71
|
const push = yield* makePush2;
|
|
68
|
-
return handlers.handleRaw("media.get", (ctx) => mediaGet(ctx.params.hash, ctx.request)).handleRaw("blob.get", (ctx) => blobGet(ctx.params.id, ctx.request)).handleRaw("browser.tunnel", (ctx) => browserTunnel(ctx.request)).handle("job.list", (ctx) => job.list(ctx.query)).handle("job.cancel", (ctx) => job.cancel(ctx.params.id)).handleRaw("machine.link", (ctx) => machineLink(ctx.request)).handle("machine.list", () => machine.list()).handle("machine.add", (ctx) => machine.add(ctx.payload)).handle("machine.remove", (ctx) => machine.remove(ctx.params.name)).handle("push.get", () => push.get()).handle("push.device.register", (ctx) => push.register(ctx.params.deviceID, ctx.payload)).handle("push.device.remove", (ctx) => push.remove(ctx.params.deviceID)).handle("push.device.update", (ctx) => push.update(ctx.params.deviceID, ctx.payload)).handle("push.device.session.set", (ctx) => push.setDeviceBell(ctx.params.deviceID, ctx.params.sessionID, ctx.payload)).handle("push.device.session.remove", (ctx) => push.removeDeviceBell(ctx.params.deviceID, ctx.params.sessionID)).handle("push.session.set", (ctx) => push.setSessionBell(ctx.params.sessionID, ctx.payload)).handle("push.session.remove", (ctx) => push.removeSessionBell(ctx.params.sessionID)).handle("push.settings.set", (ctx) => push.setSettings(ctx.payload)).handle("artifacts.providers", (ctx) => artifact.providers(ctx.query, ctx.request)).handle("artifacts.list", (ctx) => artifact.list(ctx.query, ctx.request)).handle("artifacts.create", (ctx) => artifact.create(ctx.query, ctx.payload, ctx.request)).handle("artifacts.get", (ctx) => artifact.get(ctx.params.artifactID, ctx.query, ctx.request)).handle("artifacts.update", (ctx) => artifact.update(ctx.params.artifactID, ctx.query, ctx.payload, ctx.request)).handle("artifacts.delete", (ctx) => artifact.remove(ctx.params.artifactID, ctx.query, ctx.request)).handleRaw("artifacts.view", (ctx) => artifact.view(ctx.params.artifactID, ctx.query, ctx.request)).handle("automation.create", (ctx) => automation.create(ctx.payload)).handle("automation.list", (ctx) => automation.list(ctx.query)).handle("automation.get", (ctx) => automation.get(ctx.params.automationID)).handle("automation.pause", (ctx) => automation.pause(ctx.params.automationID)).handle("automation.resume", (ctx) => automation.resume(ctx.params.automationID)).handle("automation.delete", (ctx) => automation.remove(ctx.params.automationID)).handle("persistentPty.read", Effect.fn(function* (ctx) {
|
|
72
|
+
return handlers.handleRaw("media.get", (ctx) => mediaGet(ctx.params.hash, ctx.request)).handleRaw("blob.get", (ctx) => blobGet(ctx.params.id, ctx.request)).handleRaw("browser.tunnel", (ctx) => browserTunnel(ctx.request)).handle("job.list", (ctx) => job.list(ctx.query)).handle("job.cancel", (ctx) => job.cancel(ctx.params.id)).handleRaw("machine.link", (ctx) => machineLink(ctx.request)).handle("machine.list", () => machine.list()).handle("machine.add", (ctx) => machine.add(ctx.payload)).handle("machine.remove", (ctx) => machine.remove(ctx.params.name)).handle("push.get", () => push.get()).handle("push.device.register", (ctx) => push.register(ctx.params.deviceID, ctx.payload)).handle("push.device.remove", (ctx) => push.remove(ctx.params.deviceID)).handle("push.device.update", (ctx) => push.update(ctx.params.deviceID, ctx.payload)).handle("push.device.session.set", (ctx) => push.setDeviceBell(ctx.params.deviceID, ctx.params.sessionID, ctx.payload)).handle("push.device.session.remove", (ctx) => push.removeDeviceBell(ctx.params.deviceID, ctx.params.sessionID)).handle("push.session.set", (ctx) => push.setSessionBell(ctx.params.sessionID, ctx.payload)).handle("push.session.remove", (ctx) => push.removeSessionBell(ctx.params.sessionID)).handle("push.settings.set", (ctx) => push.setSettings(ctx.payload)).handle("space.set", (ctx) => space.set(ctx.params.space, ctx.params.key, ctx.payload.value)).handle("space.delete", (ctx) => space.remove(ctx.params.space, ctx.params.key)).handle("space.sync", (ctx) => space.sync(ctx.params.space, ctx.query.cursor)).handle("space.subscribe", (ctx) => space.subscribe(ctx.payload)).handle("space.unsubscribe", (ctx) => space.unsubscribe(ctx.payload)).handle("space.reset", () => space.reset()).handle("artifacts.providers", (ctx) => artifact.providers(ctx.query, ctx.request)).handle("artifacts.list", (ctx) => artifact.list(ctx.query, ctx.request)).handle("artifacts.create", (ctx) => artifact.create(ctx.query, ctx.payload, ctx.request)).handle("artifacts.get", (ctx) => artifact.get(ctx.params.artifactID, ctx.query, ctx.request)).handle("artifacts.update", (ctx) => artifact.update(ctx.params.artifactID, ctx.query, ctx.payload, ctx.request)).handle("artifacts.delete", (ctx) => artifact.remove(ctx.params.artifactID, ctx.query, ctx.request)).handleRaw("artifacts.view", (ctx) => artifact.view(ctx.params.artifactID, ctx.query, ctx.request)).handle("automation.create", (ctx) => automation.create(ctx.payload)).handle("automation.list", (ctx) => automation.list(ctx.query)).handle("automation.get", (ctx) => automation.get(ctx.params.automationID)).handle("automation.pause", (ctx) => automation.pause(ctx.params.automationID)).handle("automation.resume", (ctx) => automation.resume(ctx.params.automationID)).handle("automation.delete", (ctx) => automation.remove(ctx.params.automationID)).handle("persistentPty.read", Effect.fn(function* (ctx) {
|
|
69
73
|
return { data: yield* pty.read(ctx.params.sessionID, ctx.query.lines).pipe(mapUnavailable) };
|
|
70
74
|
})).handle("persistentPty.list", Effect.fn(function* (ctx) {
|
|
71
75
|
return { data: yield* pty.list(ctx.params.sessionID).pipe(mapUnavailable) };
|