@opencode/server 0.0.0-dev-20855 → 0.0.0-dev-20858
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.js +2 -2
- package/dist/chunks/{pairing-h1at1yrk.js → pairing-1wak6f7y.js} +31 -31
- package/dist/chunks/{pairing-zyh4j6y7.js → pairing-2sy3c7de.js} +5 -5
- package/dist/chunks/{pairing-k8rzy6d4.js → pairing-3d7qdbre.js} +1 -1
- package/dist/chunks/{pairing-krpsczf8.js → pairing-547pgmmc.js} +1 -1
- package/dist/chunks/{pairing-xsrtpxyd.js → pairing-5w24ch67.js} +3 -3
- package/dist/chunks/{pairing-3aej5azy.js → pairing-7xe5pzvy.js} +1 -1
- package/dist/chunks/{pairing-3atcw39t.js → pairing-8t0ckx4f.js} +1 -1
- package/dist/chunks/{pairing-jew3mb73.js → pairing-9dze5bvw.js} +4 -4
- package/dist/chunks/{pairing-3kknkdhs.js → pairing-a5enak0e.js} +1 -1
- package/dist/chunks/{pairing-v4mq5ya7.js → pairing-apeppj4j.js} +1 -1
- package/dist/chunks/{pairing-e2hzz5kk.js → pairing-brs8esa7.js} +1 -1
- package/dist/chunks/{pairing-yv9sxhn9.js → pairing-cpp0zjdy.js} +1 -1
- package/dist/chunks/{pairing-7wjagj0z.js → pairing-d3wfv610.js} +4 -4
- package/dist/chunks/{pairing-v5v02dd7.js → pairing-dknpej2x.js} +1 -1
- package/dist/chunks/{pairing-gx9nwmym.js → pairing-fazm2c7b.js} +1 -1
- package/dist/chunks/{pairing-0614xxr7.js → pairing-fge4n079.js} +1 -1
- package/dist/chunks/{pairing-mahm5rvs.js → pairing-fysmzcya.js} +1 -1
- package/dist/chunks/{pairing-mk2mz66m.js → pairing-g7sdbt1s.js} +1 -1
- package/dist/chunks/{pairing-b8ygg5k2.js → pairing-ghk96rjy.js} +4 -4
- package/dist/chunks/{pairing-w0jn068c.js → pairing-gq8jw616.js} +1 -1
- package/dist/chunks/{pairing-rc3nk1bx.js → pairing-gw6rc7x0.js} +1 -1
- package/dist/chunks/{pairing-ez8kk7rt.js → pairing-hwqxzcvy.js} +1 -1
- package/dist/chunks/{pairing-gh08vxaw.js → pairing-j03cgyxr.js} +7 -7
- package/dist/chunks/{pairing-0cppk2bc.js → pairing-jd2d9483.js} +1 -1
- package/dist/chunks/{pairing-mhfbkkb7.js → pairing-jk5edc6h.js} +1 -1
- package/dist/chunks/{pairing-j1p3e665.js → pairing-qcfps8nc.js} +1 -1
- package/dist/chunks/{pairing-n60r5keb.js → pairing-qx5ydgm0.js} +1 -1
- package/dist/chunks/{pairing-esbdfpyn.js → pairing-rhdada90.js} +1 -1
- package/dist/chunks/{pairing-gsqctp76.js → pairing-s0qm098c.js} +1 -1
- package/dist/chunks/{pairing-6ypp9np2.js → pairing-t4c683g8.js} +1 -1
- package/dist/chunks/{pairing-vbanrv0z.js → pairing-tp6qcw6t.js} +1 -1
- package/dist/chunks/{pairing-7b00qdf6.js → pairing-w4e9jgda.js} +1 -1
- package/dist/chunks/{pairing-rbn15j6z.js → pairing-x6486bry.js} +6 -6
- package/dist/chunks/{pairing-svwxhgra.js → pairing-xc8jd108.js} +4 -4
- package/dist/chunks/{pairing-p6ct2ak8.js → pairing-yeebkdj0.js} +1 -1
- package/dist/chunks/{pairing-eaxk76q8.js → pairing-z6z134jc.js} +1 -1
- package/dist/chunks/{pairing-tp1rntzw.js → pairing-zfbzqd0e.js} +1 -1
- package/dist/event-feed.js +3 -3
- package/dist/fetch.js +42 -42
- package/dist/handlers/agent.js +3 -3
- package/dist/handlers/command.js +3 -3
- package/dist/handlers/config.js +3 -3
- package/dist/handlers/credential.js +3 -3
- package/dist/handlers/debug.js +3 -3
- package/dist/handlers/event.js +4 -4
- package/dist/handlers/form.js +3 -3
- package/dist/handlers/fs.js +3 -3
- package/dist/handlers/generate.js +3 -3
- package/dist/handlers/integration.js +3 -3
- package/dist/handlers/location.js +3 -3
- package/dist/handlers/mcp.js +3 -3
- package/dist/handlers/message.js +3 -3
- package/dist/handlers/migration.js +3 -3
- package/dist/handlers/model.js +3 -3
- package/dist/handlers/permission.js +3 -3
- package/dist/handlers/persistent-pty.js +4 -4
- package/dist/handlers/plugin.js +3 -3
- package/dist/handlers/project.js +3 -3
- package/dist/handlers/provider.js +3 -3
- package/dist/handlers/pty.js +4 -4
- package/dist/handlers/reference.js +3 -3
- package/dist/handlers/rpc.js +3 -3
- package/dist/handlers/server.js +6 -6
- package/dist/handlers/session.js +3 -3
- package/dist/handlers/shell.js +3 -3
- package/dist/handlers/skill.js +3 -3
- package/dist/handlers/vcs.js +3 -3
- package/dist/handlers/websearch.js +3 -3
- package/dist/handlers/worktree.js +3 -3
- package/dist/handlers.js +38 -38
- package/dist/pairing.js +3 -3
- package/dist/process.js +39 -39
- package/dist/routes.js +39 -39
- package/dist/server-info.js +3 -3
- package/dist/service-status.js +3 -3
- package/dist/workerd.js +39 -39
- package/package.json +8 -8
- /package/dist/chunks/{pairing-q8n44kky.js → pairing-4nbah0zs.js} +0 -0
package/dist/api.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./chunks/pairing-
|
|
4
|
-
import"./chunks/pairing-b3bmdkga.js";
|
|
3
|
+
} from "./chunks/pairing-4nbah0zs.js";
|
|
5
4
|
import"./chunks/pairing-4gnb9897.js";
|
|
5
|
+
import"./chunks/pairing-b3bmdkga.js";
|
|
6
6
|
import"./chunks/pairing-50bbk3b2.js";
|
|
7
7
|
import"./chunks/pairing-smaf4a18.js";
|
|
8
8
|
export {
|
|
@@ -1,96 +1,96 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GenerateHandler2
|
|
3
|
-
} from "./pairing-
|
|
3
|
+
} from "./pairing-gq8jw616.js";
|
|
4
4
|
import {
|
|
5
5
|
MessageHandler2
|
|
6
|
-
} from "./pairing-
|
|
6
|
+
} from "./pairing-8t0ckx4f.js";
|
|
7
7
|
import {
|
|
8
8
|
ModelHandler2
|
|
9
|
-
} from "./pairing-
|
|
9
|
+
} from "./pairing-cpp0zjdy.js";
|
|
10
10
|
import {
|
|
11
11
|
ProviderHandler2
|
|
12
|
-
} from "./pairing-
|
|
12
|
+
} from "./pairing-fazm2c7b.js";
|
|
13
13
|
import {
|
|
14
14
|
SessionHandler2
|
|
15
|
-
} from "./pairing-
|
|
15
|
+
} from "./pairing-fge4n079.js";
|
|
16
16
|
import {
|
|
17
17
|
PermissionHandler2
|
|
18
|
-
} from "./pairing-
|
|
18
|
+
} from "./pairing-brs8esa7.js";
|
|
19
19
|
import {
|
|
20
20
|
FileSystemHandler2
|
|
21
|
-
} from "./pairing-
|
|
21
|
+
} from "./pairing-qcfps8nc.js";
|
|
22
22
|
import {
|
|
23
23
|
FormHandler2
|
|
24
|
-
} from "./pairing-
|
|
24
|
+
} from "./pairing-s0qm098c.js";
|
|
25
25
|
import {
|
|
26
26
|
CommandHandler2
|
|
27
|
-
} from "./pairing-
|
|
27
|
+
} from "./pairing-fysmzcya.js";
|
|
28
28
|
import {
|
|
29
29
|
SkillHandler2
|
|
30
|
-
} from "./pairing-
|
|
30
|
+
} from "./pairing-547pgmmc.js";
|
|
31
31
|
import {
|
|
32
32
|
RpcHandler2
|
|
33
|
-
} from "./pairing-
|
|
33
|
+
} from "./pairing-w4e9jgda.js";
|
|
34
34
|
import {
|
|
35
35
|
layer2
|
|
36
|
-
} from "./pairing-
|
|
36
|
+
} from "./pairing-2sy3c7de.js";
|
|
37
37
|
import {
|
|
38
38
|
EventHandler2
|
|
39
|
-
} from "./pairing-
|
|
39
|
+
} from "./pairing-9dze5bvw.js";
|
|
40
40
|
import {
|
|
41
41
|
AgentHandler2
|
|
42
|
-
} from "./pairing-
|
|
42
|
+
} from "./pairing-g7sdbt1s.js";
|
|
43
43
|
import {
|
|
44
44
|
PluginHandler2
|
|
45
|
-
} from "./pairing-
|
|
45
|
+
} from "./pairing-jd2d9483.js";
|
|
46
46
|
import {
|
|
47
47
|
ServerHandler2
|
|
48
|
-
} from "./pairing-
|
|
48
|
+
} from "./pairing-j03cgyxr.js";
|
|
49
49
|
import {
|
|
50
50
|
DebugHandler2
|
|
51
|
-
} from "./pairing-
|
|
51
|
+
} from "./pairing-rhdada90.js";
|
|
52
52
|
import {
|
|
53
53
|
PtyHandler2
|
|
54
|
-
} from "./pairing-
|
|
54
|
+
} from "./pairing-dknpej2x.js";
|
|
55
55
|
import {
|
|
56
56
|
PersistentPtyHandler2
|
|
57
|
-
} from "./pairing-
|
|
57
|
+
} from "./pairing-apeppj4j.js";
|
|
58
58
|
import {
|
|
59
59
|
ShellHandler2
|
|
60
|
-
} from "./pairing-
|
|
60
|
+
} from "./pairing-t4c683g8.js";
|
|
61
61
|
import {
|
|
62
62
|
ReferenceHandler2
|
|
63
|
-
} from "./pairing-
|
|
63
|
+
} from "./pairing-z6z134jc.js";
|
|
64
64
|
import {
|
|
65
65
|
LocationHandler2
|
|
66
|
-
} from "./pairing-
|
|
66
|
+
} from "./pairing-7xe5pzvy.js";
|
|
67
67
|
import {
|
|
68
68
|
IntegrationHandler2
|
|
69
|
-
} from "./pairing-
|
|
69
|
+
} from "./pairing-jk5edc6h.js";
|
|
70
70
|
import {
|
|
71
71
|
WebSearchHandler2
|
|
72
|
-
} from "./pairing-
|
|
72
|
+
} from "./pairing-a5enak0e.js";
|
|
73
73
|
import {
|
|
74
74
|
McpHandler2
|
|
75
|
-
} from "./pairing-
|
|
75
|
+
} from "./pairing-yeebkdj0.js";
|
|
76
76
|
import {
|
|
77
77
|
CredentialHandler2
|
|
78
|
-
} from "./pairing-
|
|
78
|
+
} from "./pairing-qx5ydgm0.js";
|
|
79
79
|
import {
|
|
80
80
|
ProjectHandler2
|
|
81
|
-
} from "./pairing-
|
|
81
|
+
} from "./pairing-3d7qdbre.js";
|
|
82
82
|
import {
|
|
83
83
|
WorktreeHandler2
|
|
84
|
-
} from "./pairing-
|
|
84
|
+
} from "./pairing-zfbzqd0e.js";
|
|
85
85
|
import {
|
|
86
86
|
VcsHandler2
|
|
87
|
-
} from "./pairing-
|
|
87
|
+
} from "./pairing-gw6rc7x0.js";
|
|
88
88
|
import {
|
|
89
89
|
MigrationHandler2
|
|
90
|
-
} from "./pairing-
|
|
90
|
+
} from "./pairing-tp6qcw6t.js";
|
|
91
91
|
import {
|
|
92
92
|
ConfigHandler2
|
|
93
|
-
} from "./pairing-
|
|
93
|
+
} from "./pairing-hwqxzcvy.js";
|
|
94
94
|
|
|
95
95
|
// src/handlers.ts
|
|
96
96
|
import { Layer } from "effect";
|
|
@@ -7,7 +7,7 @@ var exports_event_feed = {};
|
|
|
7
7
|
__export(exports_event_feed, {
|
|
8
8
|
EncodingError: () => EncodingError2,
|
|
9
9
|
EventFeed: () => exports_event_feed,
|
|
10
|
-
Service: () =>
|
|
10
|
+
Service: () => Service2,
|
|
11
11
|
SubscriberCapacity: () => SubscriberCapacity2,
|
|
12
12
|
SubscriberOverflowError: () => SubscriberOverflowError2,
|
|
13
13
|
frame: () => frame2,
|
|
@@ -30,7 +30,7 @@ class EncodingError2 extends Schema.TaggedError()("EventFeed.EncodingError", {
|
|
|
30
30
|
}) {
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
class
|
|
33
|
+
class Service2 extends Context.Service()("@opencode/server/EventFeed") {
|
|
34
34
|
}
|
|
35
35
|
function frame2(event) {
|
|
36
36
|
return `data: ${JSON.stringify(event)}
|
|
@@ -71,13 +71,13 @@ var make4 = Effect.fn("EventFeed.make")(function* (observe, options) {
|
|
|
71
71
|
});
|
|
72
72
|
const unsubscribe = yield* observe(publish);
|
|
73
73
|
yield* Effect.addFinalizer(() => unsubscribe);
|
|
74
|
-
return
|
|
74
|
+
return Service2.of({
|
|
75
75
|
subscribe: Effect.acquireRelease(Queue.dropping(capacity).pipe(Effect.tap((queue) => Effect.sync(() => subscribers.add(queue)))), (queue) => Effect.sync(() => subscribers.delete(queue)).pipe(Effect.andThen(Queue.shutdown(queue)), Effect.asVoid)).pipe(Effect.map(Stream.fromQueue))
|
|
76
76
|
});
|
|
77
77
|
});
|
|
78
|
-
var layer2 = Layer.effect(
|
|
78
|
+
var layer2 = Layer.effect(Service2, Effect.gen(function* () {
|
|
79
79
|
const bus = yield* Bus.Service;
|
|
80
80
|
return yield* make4(bus.listen);
|
|
81
81
|
}));
|
|
82
82
|
|
|
83
|
-
export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2,
|
|
83
|
+
export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2, Service2, frame2, make4, layer2, exports_event_feed };
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
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 };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./pairing-
|
|
3
|
+
} from "./pairing-4nbah0zs.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
5
|
+
Service2,
|
|
6
6
|
frame2
|
|
7
|
-
} from "./pairing-
|
|
7
|
+
} from "./pairing-2sy3c7de.js";
|
|
8
8
|
|
|
9
9
|
// src/handlers/event.ts
|
|
10
10
|
import { Event } from "@opencode/schema/event";
|
|
@@ -12,7 +12,7 @@ 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* Service2;
|
|
16
16
|
return handlers.handleRaw("event.subscribe", () => Effect.gen(function* () {
|
|
17
17
|
const connected = {
|
|
18
18
|
id: Event.ID.create(),
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./pairing-b3bmdkga.js";
|
|
10
10
|
import {
|
|
11
11
|
Api2
|
|
12
|
-
} from "./pairing-
|
|
12
|
+
} from "./pairing-4nbah0zs.js";
|
|
13
13
|
import {
|
|
14
14
|
Config2
|
|
15
15
|
} from "./pairing-anm12x33.js";
|
|
@@ -18,16 +18,16 @@ import {
|
|
|
18
18
|
} from "./pairing-q4bn6dy8.js";
|
|
19
19
|
import {
|
|
20
20
|
layer3
|
|
21
|
-
} from "./pairing-
|
|
21
|
+
} from "./pairing-ghk96rjy.js";
|
|
22
22
|
import {
|
|
23
23
|
node2
|
|
24
|
-
} from "./pairing-
|
|
24
|
+
} from "./pairing-x6486bry.js";
|
|
25
25
|
import {
|
|
26
26
|
node3
|
|
27
27
|
} from "./pairing-wv5twc2g.js";
|
|
28
28
|
import {
|
|
29
29
|
handlers2
|
|
30
|
-
} from "./pairing-
|
|
30
|
+
} from "./pairing-1wak6f7y.js";
|
|
31
31
|
import {
|
|
32
32
|
authorizationLayer2
|
|
33
33
|
} from "./pairing-5ytyqf1q.js";
|
|
@@ -6,17 +6,17 @@ import {
|
|
|
6
6
|
var exports_server_info = {};
|
|
7
7
|
__export(exports_server_info, {
|
|
8
8
|
ServerInfo: () => exports_server_info,
|
|
9
|
-
Service: () =>
|
|
9
|
+
Service: () => Service3,
|
|
10
10
|
connectionURLs: () => connectionURLs2,
|
|
11
11
|
layer: () => layer3
|
|
12
12
|
});
|
|
13
13
|
import { Context, Layer } from "effect";
|
|
14
14
|
import { networkInterfaces } from "node:os";
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class Service3 extends Context.Service()("@opencode/server/ServerInfo") {
|
|
17
17
|
}
|
|
18
18
|
function layer3(urls, tmp, app = {}) {
|
|
19
|
-
return Layer.succeed(
|
|
19
|
+
return Layer.succeed(Service3, Service3.of({ urls, app, paths: { tmp } }));
|
|
20
20
|
}
|
|
21
21
|
function connectionURLs2(value, requestedHostname) {
|
|
22
22
|
const url = new URL(value);
|
|
@@ -38,4 +38,4 @@ function connectionURLs2(value, requestedHostname) {
|
|
|
38
38
|
];
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
export {
|
|
41
|
+
export { Service3, layer3, connectionURLs2, exports_server_info };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./pairing-
|
|
3
|
+
} from "./pairing-4nbah0zs.js";
|
|
4
4
|
import {
|
|
5
5
|
SESSION_TTL_SECONDS2,
|
|
6
6
|
Config2,
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
sessionCookieName2
|
|
9
9
|
} from "./pairing-anm12x33.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
} from "./pairing-
|
|
11
|
+
Service3
|
|
12
|
+
} from "./pairing-ghk96rjy.js";
|
|
13
13
|
import {
|
|
14
|
-
|
|
15
|
-
} from "./pairing-
|
|
14
|
+
Service4
|
|
15
|
+
} from "./pairing-x6486bry.js";
|
|
16
16
|
|
|
17
17
|
// src/handlers/server.ts
|
|
18
18
|
import { Duration, Effect } from "effect";
|
|
@@ -21,10 +21,10 @@ import { HttpApiBuilder } from "effect/http-api";
|
|
|
21
21
|
import { PersistentPty } from "@opencode/core/persistent-pty";
|
|
22
22
|
import { UnauthorizedError } from "@opencode/protocol/errors";
|
|
23
23
|
var ServerHandler2 = HttpApiBuilder.group(Api2, "server.server", (handlers) => Effect.gen(function* () {
|
|
24
|
-
const pairing = yield*
|
|
24
|
+
const pairing = yield* Service4;
|
|
25
25
|
const auth = yield* Config2;
|
|
26
26
|
return handlers.handle("server.info", () => Effect.gen(function* () {
|
|
27
|
-
const info = yield*
|
|
27
|
+
const info = yield* Service3;
|
|
28
28
|
return {
|
|
29
29
|
version: info.app.version ?? "unknown",
|
|
30
30
|
pid: process.pid ?? 0,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
var exports_pairing = {};
|
|
7
7
|
__export(exports_pairing, {
|
|
8
8
|
ServerPairing: () => exports_pairing,
|
|
9
|
-
Service: () =>
|
|
9
|
+
Service: () => Service4,
|
|
10
10
|
node: () => node2
|
|
11
11
|
});
|
|
12
12
|
import { Cache, Context, Duration, Effect, Layer } from "effect";
|
|
@@ -14,12 +14,12 @@ import { makeGlobalNode } from "@opencode/util/effect/app-node";
|
|
|
14
14
|
import { randomBytes } from "node:crypto";
|
|
15
15
|
var TTL = Duration.minutes(5);
|
|
16
16
|
|
|
17
|
-
class
|
|
17
|
+
class Service4 extends Context.Service()("@opencode/ServerPairing") {
|
|
18
18
|
}
|
|
19
19
|
var noLookup = () => Effect.die(new Error("ServerPairing cache must be used via set/invalidateWhen, never get"));
|
|
20
|
-
var layer = Layer.effect(
|
|
20
|
+
var layer = Layer.effect(Service4, Effect.gen(function* () {
|
|
21
21
|
const cache = yield* Cache.make({ capacity: 1000, lookup: noLookup, timeToLive: TTL });
|
|
22
|
-
return
|
|
22
|
+
return Service4.of({
|
|
23
23
|
issue: Effect.fn("ServerPairing.issue")(function* () {
|
|
24
24
|
const code = randomBytes(16).toString("base64url");
|
|
25
25
|
yield* Cache.set(cache, code, true);
|
|
@@ -30,6 +30,6 @@ var layer = Layer.effect(Service2, Effect.gen(function* () {
|
|
|
30
30
|
})
|
|
31
31
|
});
|
|
32
32
|
}));
|
|
33
|
-
var node2 = makeGlobalNode({ service:
|
|
33
|
+
var node2 = makeGlobalNode({ service: Service4, layer, deps: [] });
|
|
34
34
|
|
|
35
|
-
export {
|
|
35
|
+
export { Service4, node2, exports_pairing };
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./pairing-q4bn6dy8.js";
|
|
4
4
|
import {
|
|
5
5
|
createRoutes2
|
|
6
|
-
} from "./pairing-
|
|
6
|
+
} from "./pairing-d3wfv610.js";
|
|
7
7
|
import {
|
|
8
8
|
__export
|
|
9
9
|
} from "./pairing-9rqn6x4v.js";
|
|
@@ -12,15 +12,15 @@ import {
|
|
|
12
12
|
var exports_fetch = {};
|
|
13
13
|
__export(exports_fetch, {
|
|
14
14
|
ServerFetch: () => exports_fetch,
|
|
15
|
-
make: () =>
|
|
15
|
+
make: () => make2
|
|
16
16
|
});
|
|
17
17
|
import { Context, Effect, Layer } from "effect";
|
|
18
18
|
import { HttpEffect, HttpMiddleware, HttpRouter, HttpServer } from "effect/http";
|
|
19
19
|
import { SessionRestart } from "@opencode/core/session/execution/restart";
|
|
20
|
-
var
|
|
20
|
+
var make2 = Effect.fn("ServerFetch.make")(function* (options = {}, boot = {}) {
|
|
21
21
|
const context = yield* Layer.build(createRoutes2(options, () => [], boot.overrides ?? []).pipe(Layer.provide(HttpServer.layerServices)));
|
|
22
22
|
yield* Effect.forkDetach(Context.get(context, SessionRestart.Service).resumeSuspendedSessions);
|
|
23
23
|
return Context.get(context, HttpRouter.HttpRouter).asHttpEffect().pipe(HttpMiddleware.cors({ allowedOrigins: (origin) => isAllowedCorsOrigin2(origin, options), maxAge: 86400 }), HttpEffect.toWebHandlerWith(context));
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
-
export {
|
|
26
|
+
export { make2, exports_fetch };
|