@opencode/server 0.0.0-dev-21603 → 0.0.0-dev-21614
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 +5 -5
- package/dist/auth.js +1 -1
- package/dist/chunks/{pairing-j49n4591.js → location-1e765wh0.js} +2 -2
- package/dist/chunks/{pairing-e6e4kz0w.js → location-39nnfjx1.js} +4 -4
- package/dist/chunks/{pairing-aqzwjzmb.js → location-3d7qdbre.js} +1 -1
- package/dist/chunks/{pairing-1ahadpvw.js → location-4gnb9897.js} +1 -1
- package/dist/chunks/{pairing-gb66h69v.js → location-4nbah0zs.js} +3 -3
- package/dist/chunks/{pairing-gqq6kfhc.js → location-50bbk3b2.js} +3 -3
- package/dist/chunks/{pairing-hspp8v12.js → location-547pgmmc.js} +2 -2
- package/dist/chunks/{pairing-6v4wsps6.js → location-7b9xm1qg.js} +3 -2
- package/dist/chunks/{pairing-6br0y3ag.js → location-7xe5pzvy.js} +1 -1
- package/dist/chunks/{pairing-s1vhsdh5.js → location-9r2awqr1.js} +2 -2
- package/dist/chunks/{pairing-8xcr0amw.js → location-9szahwb7.js} +34 -34
- package/dist/chunks/{pairing-yet0vexm.js → location-b3bmdkga.js} +1 -1
- package/dist/chunks/{pairing-t1m5ngrv.js → location-ba71rqfr.js} +8 -8
- package/dist/chunks/{pairing-xx1dn4ke.js → location-brapb58t.js} +4 -4
- package/dist/chunks/{pairing-k6dz4enc.js → location-c8a27nas.js} +7 -7
- package/dist/chunks/{pairing-xxxx0904.js → location-cpp0zjdy.js} +2 -2
- package/dist/chunks/{pairing-nj3hhwxg.js → location-dcdfzfgt.js} +13 -13
- package/dist/chunks/{pairing-e54xd2ay.js → location-emkxpff3.js} +3 -3
- package/dist/chunks/{pairing-6kta5392.js → location-fazm2c7b.js} +2 -2
- package/dist/chunks/{pairing-67kmywtk.js → location-fysmzcya.js} +2 -2
- package/dist/chunks/location-g3mfewdn.js +107 -0
- package/dist/chunks/{pairing-cqhyyp3f.js → location-g7sdbt1s.js} +2 -2
- package/dist/chunks/{pairing-j8p25vmv.js → location-gq8jw616.js} +2 -2
- package/dist/chunks/{pairing-q8cqvm6j.js → location-gw6rc7x0.js} +2 -2
- package/dist/chunks/{pairing-gv627jgt.js → location-hwqxzcvy.js} +1 -1
- package/dist/chunks/{pairing-j4at0y5c.js → location-j4at0y5c.js} +1 -1
- package/dist/chunks/{pairing-6t8za67t.js → location-jd2d9483.js} +2 -2
- package/dist/chunks/{pairing-19dc7z8q.js → location-jk5edc6h.js} +2 -2
- package/dist/chunks/{pairing-kqr36gas.js → location-mzs0n5xz.js} +7 -7
- package/dist/chunks/{pairing-9k4wjdze.js → location-nnsgc8by.js} +3 -3
- package/dist/chunks/{pairing-77mqkxfz.js → location-qcfps8nc.js} +2 -2
- package/dist/chunks/{pairing-v1jdrp9c.js → location-qx5ydgm0.js} +1 -1
- package/dist/chunks/{pairing-nvdz1s2r.js → location-rhdada90.js} +2 -2
- package/dist/chunks/{pairing-wtxh433d.js → location-s0qm098c.js} +2 -2
- package/dist/chunks/{pairing-gx2yvssc.js → location-sc3gatcy.js} +3 -3
- package/dist/chunks/{pairing-vtvdbwhg.js → location-t4c683g8.js} +2 -2
- package/dist/chunks/{pairing-74sf36cc.js → location-tp6qcw6t.js} +1 -1
- package/dist/chunks/{pairing-m0y4004e.js → location-w4e9jgda.js} +1 -1
- package/dist/chunks/{pairing-atk2et4d.js → location-wexwfee0.js} +2 -2
- package/dist/chunks/{pairing-3gg5y4jd.js → location-ye9tw5gq.js} +4 -4
- package/dist/chunks/{pairing-6n9b1fbm.js → location-z3akqjf6.js} +1 -1
- package/dist/chunks/{pairing-5pdfedjd.js → location-z3e7v67k.js} +5 -5
- package/dist/chunks/{pairing-ej45n981.js → location-z6z134jc.js} +2 -2
- package/dist/chunks/{pairing-0yqfz42w.js → location-zvmj8bt4.js} +6 -6
- package/dist/cors.js +1 -1
- package/dist/event-feed.js +5 -5
- package/dist/fetch.js +49 -49
- 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.d.ts +3 -1
- package/dist/handlers/mcp.js +8 -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 +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 +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/voice.js +6 -6
- package/dist/handlers/websearch.js +6 -6
- package/dist/handlers/worktree.js +6 -6
- package/dist/handlers.js +43 -43
- package/dist/location.js +4 -4
- package/dist/middleware/authorization.js +2 -2
- package/dist/middleware/form-location.js +3 -3
- package/dist/middleware/schema-error.js +1 -1
- package/dist/middleware/session-location.js +3 -3
- package/dist/pairing.js +3 -3
- package/dist/process.js +53 -52
- package/dist/request-tracing.js +1 -1
- package/dist/routes.js +46 -46
- package/dist/server-info.js +3 -3
- package/dist/service-status.js +3 -3
- package/dist/workerd.js +50 -50
- package/package.json +8 -8
- package/dist/chunks/pairing-j25hpmpx.js +0 -40
- /package/dist/chunks/{pairing-9rqn6x4v.js → location-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{pairing-erzfdgke.js → location-erzfdgke.js} +0 -0
- /package/dist/chunks/{pairing-h6rt5k9s.js → location-h6rt5k9s.js} +0 -0
- /package/dist/chunks/{pairing-q4bn6dy8.js → location-q4bn6dy8.js} +0 -0
- /package/dist/chunks/{pairing-smaf4a18.js → location-smaf4a18.js} +0 -0
- /package/dist/chunks/{pairing-yc7nft6q.js → location-yc7nft6q.js} +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import {
|
|
2
|
+
locationErrors2,
|
|
3
|
+
response2,
|
|
4
|
+
requestRef2
|
|
5
|
+
} from "./location-50bbk3b2.js";
|
|
6
|
+
import {
|
|
7
|
+
Api2
|
|
8
|
+
} from "./location-4nbah0zs.js";
|
|
9
|
+
import {
|
|
10
|
+
CorsConfig2,
|
|
11
|
+
isAllowedRequestOrigin2
|
|
12
|
+
} from "./location-q4bn6dy8.js";
|
|
13
|
+
import {
|
|
14
|
+
runPtySocket2
|
|
15
|
+
} from "./location-h6rt5k9s.js";
|
|
16
|
+
|
|
17
|
+
// src/handlers/mcp.ts
|
|
18
|
+
import { Location } from "@opencode/core/location";
|
|
19
|
+
import { LocationServiceMap } from "@opencode/core/location-service-map";
|
|
20
|
+
import { Mcp } from "@opencode/core/mcp/index";
|
|
21
|
+
import { PtyTicket } from "@opencode/core/pty/ticket";
|
|
22
|
+
import { ForbiddenError, McpServerNotFoundError } from "@opencode/protocol/errors";
|
|
23
|
+
import { PTY_CONNECT_TOKEN_HEADER, PTY_CONNECT_TOKEN_HEADER_VALUE } from "@opencode/protocol/groups/pty";
|
|
24
|
+
import { Effect, Queue } from "effect";
|
|
25
|
+
import { HttpServerResponse } from "effect/http";
|
|
26
|
+
import { HttpApiBuilder, HttpApiSchema } from "effect/http-api";
|
|
27
|
+
import { Socket } from "effect/socket";
|
|
28
|
+
var notFound = (effect) => effect.pipe(Effect.mapError((error) => new McpServerNotFoundError({ server: error.server, message: error.message })));
|
|
29
|
+
var McpHandler2 = HttpApiBuilder.group(Api2, "server.mcp", (handlers) => Effect.gen(function* () {
|
|
30
|
+
const locations = yield* LocationServiceMap.Service;
|
|
31
|
+
const cors = yield* CorsConfig2;
|
|
32
|
+
const tickets = yield* PtyTicket.Service;
|
|
33
|
+
return handlers.handle("mcp.list", Effect.fn(function* () {
|
|
34
|
+
const service = yield* Mcp.Service;
|
|
35
|
+
return yield* response2(service.servers());
|
|
36
|
+
})).handle("mcp.add", Effect.fn(function* (ctx) {
|
|
37
|
+
const service = yield* Mcp.Service;
|
|
38
|
+
yield* service.add(ctx.params.server, ctx.payload.config);
|
|
39
|
+
return HttpApiSchema.NoContent.make();
|
|
40
|
+
})).handle("mcp.remove", Effect.fn(function* (ctx) {
|
|
41
|
+
const service = yield* Mcp.Service;
|
|
42
|
+
yield* notFound(service.remove(ctx.params.server));
|
|
43
|
+
return HttpApiSchema.NoContent.make();
|
|
44
|
+
})).handle("mcp.connect", Effect.fn(function* (ctx) {
|
|
45
|
+
const service = yield* Mcp.Service;
|
|
46
|
+
yield* notFound(service.connect(ctx.params.server));
|
|
47
|
+
return HttpApiSchema.NoContent.make();
|
|
48
|
+
})).handle("mcp.disconnect", Effect.fn(function* (ctx) {
|
|
49
|
+
const service = yield* Mcp.Service;
|
|
50
|
+
yield* notFound(service.disconnect(ctx.params.server));
|
|
51
|
+
return HttpApiSchema.NoContent.make();
|
|
52
|
+
})).handle("mcp.resource.catalog", Effect.fn(function* () {
|
|
53
|
+
const service = yield* Mcp.Service;
|
|
54
|
+
return yield* response2(service.resourceCatalog());
|
|
55
|
+
})).handle("mcp.clientToken", Effect.fn(function* (ctx) {
|
|
56
|
+
if (ctx.headers[PTY_CONNECT_TOKEN_HEADER] !== PTY_CONNECT_TOKEN_HEADER_VALUE || !isAllowedRequestOrigin2(ctx.request.headers.origin, ctx.request.headers.host, cors))
|
|
57
|
+
return yield* new ForbiddenError({ message: "Invalid client MCP connect token request" });
|
|
58
|
+
const location = yield* Location.Service;
|
|
59
|
+
return yield* response2(tickets.issue({
|
|
60
|
+
mcpClient: ctx.query.name,
|
|
61
|
+
directory: location.directory,
|
|
62
|
+
workspaceID: location.workspaceID
|
|
63
|
+
}));
|
|
64
|
+
})).handleRaw("mcp.client", Effect.fn("McpHandler.client")(function* (ctx) {
|
|
65
|
+
if (!isAllowedRequestOrigin2(ctx.request.headers.origin, ctx.request.headers.host, cors))
|
|
66
|
+
return HttpServerResponse.empty({ status: 403 });
|
|
67
|
+
const name = ctx.query.name;
|
|
68
|
+
const ref = LocationServiceMap.canonical(requestRef2(ctx.request));
|
|
69
|
+
if (ctx.query.ticket && !(yield* tickets.consume({
|
|
70
|
+
ticket: ctx.query.ticket,
|
|
71
|
+
mcpClient: name,
|
|
72
|
+
directory: ref.directory,
|
|
73
|
+
workspaceID: ref.workspaceID
|
|
74
|
+
})))
|
|
75
|
+
return HttpServerResponse.empty({ status: 403 });
|
|
76
|
+
return yield* Effect.gen(function* () {
|
|
77
|
+
const mcp = yield* Mcp.Service;
|
|
78
|
+
const { McpSocketClient } = yield* Effect.promise(() => import("@opencode/core/mcp/socket-client"));
|
|
79
|
+
const socket = yield* Effect.orDie(ctx.request.upgrade);
|
|
80
|
+
const outbox = yield* Queue.unbounded();
|
|
81
|
+
const state = { attached: false, disconnected: false };
|
|
82
|
+
const transport = McpSocketClient.make({
|
|
83
|
+
send: (text) => Queue.offerUnsafe(outbox, text),
|
|
84
|
+
close: (code, reason) => {
|
|
85
|
+
if (state.attached)
|
|
86
|
+
Queue.offerUnsafe(outbox, new Socket.CloseEvent(code, reason));
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
const decoder = new TextDecoder;
|
|
90
|
+
yield* mcp.attach(name, transport).pipe(Effect.tap(() => Effect.sync(() => {
|
|
91
|
+
state.attached = true;
|
|
92
|
+
})), Effect.catch((error) => state.disconnected ? Effect.logInfo("client MCP disconnected during initialize", { name, error: error.message }) : Effect.logError("client MCP attach failed", { name, error: error.message }).pipe(Effect.andThen(Effect.sync(() => Queue.offerUnsafe(outbox, new Socket.CloseEvent(1011, "attach failed")))))), Effect.forkScoped);
|
|
93
|
+
yield* runPtySocket2({
|
|
94
|
+
socket,
|
|
95
|
+
outbox,
|
|
96
|
+
onMessage: (message) => Effect.sync(() => transport.deliver(typeof message === "string" ? message : decoder.decode(message))),
|
|
97
|
+
detach: () => {
|
|
98
|
+
state.disconnected = true;
|
|
99
|
+
transport.ended();
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
return HttpServerResponse.empty();
|
|
103
|
+
}).pipe(Effect.scoped, Effect.provide(locations.get(ref)), locationErrors2);
|
|
104
|
+
}));
|
|
105
|
+
}));
|
|
106
|
+
|
|
107
|
+
export { McpHandler2 };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
locationErrors2,
|
|
3
3
|
awaitPlugins2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./location-50bbk3b2.js";
|
|
5
5
|
import {
|
|
6
6
|
Api2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./location-4nbah0zs.js";
|
|
8
8
|
|
|
9
9
|
// src/handlers/generate.ts
|
|
10
10
|
import { Generate } from "@opencode/core/generate";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./location-50bbk3b2.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./location-4nbah0zs.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/integration.ts
|
|
9
9
|
import { Integration } from "@opencode/core/integration";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./location-9rqn6x4v.js";
|
|
4
4
|
|
|
5
5
|
// src/pairing.ts
|
|
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,13 +3,13 @@ import {
|
|
|
3
3
|
missingMessage2,
|
|
4
4
|
failedMessageDecode2,
|
|
5
5
|
failedSnapshot2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./location-smaf4a18.js";
|
|
7
7
|
import {
|
|
8
8
|
locationErrors2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./location-50bbk3b2.js";
|
|
10
10
|
import {
|
|
11
11
|
Api2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./location-4nbah0zs.js";
|
|
13
13
|
|
|
14
14
|
// src/handlers/session.ts
|
|
15
15
|
import { Session } from "@opencode/core/session";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./location-50bbk3b2.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./location-4nbah0zs.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/fs.ts
|
|
9
9
|
import { FileSystem } from "@opencode/core/filesystem";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
requestRef2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./location-50bbk3b2.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./location-4nbah0zs.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/debug.ts
|
|
9
9
|
import { LocationServiceMap } from "@opencode/core/location-service-map";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./location-4nbah0zs.js";
|
|
4
4
|
import {
|
|
5
5
|
CorsConfig2,
|
|
6
6
|
isAllowedRequestOrigin2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./location-q4bn6dy8.js";
|
|
8
8
|
import {
|
|
9
9
|
runPtySocket2
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./location-h6rt5k9s.js";
|
|
11
11
|
|
|
12
12
|
// src/handlers/persistent-pty.ts
|
|
13
13
|
import { PersistentPty } from "@opencode/core/persistent-pty";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
awaitPlugins2,
|
|
3
3
|
response2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./location-50bbk3b2.js";
|
|
5
5
|
import {
|
|
6
6
|
Api2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./location-4nbah0zs.js";
|
|
8
8
|
|
|
9
9
|
// src/handlers/websearch.ts
|
|
10
10
|
import { WebSearch } from "@opencode/core/websearch";
|
|
@@ -2,17 +2,17 @@ import {
|
|
|
2
2
|
locationErrors2,
|
|
3
3
|
response2,
|
|
4
4
|
requestRef2
|
|
5
|
-
} from "./
|
|
5
|
+
} from "./location-50bbk3b2.js";
|
|
6
6
|
import {
|
|
7
7
|
Api2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./location-4nbah0zs.js";
|
|
9
9
|
import {
|
|
10
10
|
CorsConfig2,
|
|
11
11
|
isAllowedRequestOrigin2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./location-q4bn6dy8.js";
|
|
13
13
|
import {
|
|
14
14
|
runPtySocket2
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./location-h6rt5k9s.js";
|
|
16
16
|
|
|
17
17
|
// src/handlers/pty.ts
|
|
18
18
|
import { Pty } from "@opencode/core/pty";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./location-9rqn6x4v.js";
|
|
4
4
|
|
|
5
5
|
// src/server-info.ts
|
|
6
6
|
var exports_server_info = {};
|
|
7
7
|
__export(exports_server_info, {
|
|
8
8
|
ServerInfo: () => exports_server_info,
|
|
9
|
-
Service: () =>
|
|
9
|
+
Service: () => Service2,
|
|
10
10
|
connectionURLs: () => connectionURLs2,
|
|
11
11
|
layer: () => layer2
|
|
12
12
|
});
|
|
13
13
|
import { Context, Layer } from "effect";
|
|
14
14
|
import { networkInterfaces } from "node:os";
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class Service2 extends Context.Service()("@opencode/server/ServerInfo") {
|
|
17
17
|
}
|
|
18
18
|
function layer2(urls, tmp, app = {}) {
|
|
19
|
-
return Layer.succeed(
|
|
19
|
+
return Layer.succeed(Service2, Service2.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 { Service2, layer2, connectionURLs2, exports_server_info };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./location-50bbk3b2.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./location-4nbah0zs.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/reference.ts
|
|
9
9
|
import { Reference } from "@opencode/core/reference";
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isAllowedCorsOrigin2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./location-q4bn6dy8.js";
|
|
4
4
|
import {
|
|
5
5
|
createRoutes2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./location-dcdfzfgt.js";
|
|
7
7
|
import {
|
|
8
8
|
__export
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./location-9rqn6x4v.js";
|
|
10
10
|
|
|
11
11
|
// src/fetch.ts
|
|
12
12
|
var exports_fetch = {};
|
|
13
13
|
__export(exports_fetch, {
|
|
14
14
|
ServerFetch: () => exports_fetch,
|
|
15
|
-
make: () =>
|
|
15
|
+
make: () => make3
|
|
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 make3 = 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 { make3, exports_fetch };
|
package/dist/cors.js
CHANGED
package/dist/event-feed.js
CHANGED
|
@@ -2,19 +2,19 @@ import {
|
|
|
2
2
|
SubscriberCapacity2,
|
|
3
3
|
SubscriberOverflowError2,
|
|
4
4
|
EncodingError2,
|
|
5
|
-
|
|
5
|
+
Service3,
|
|
6
6
|
frame2,
|
|
7
7
|
make4,
|
|
8
|
-
|
|
8
|
+
layer3,
|
|
9
9
|
exports_event_feed
|
|
10
|
-
} from "./chunks/
|
|
10
|
+
} from "./chunks/location-c8a27nas.js";
|
|
11
11
|
export {
|
|
12
12
|
EncodingError2 as EncodingError,
|
|
13
13
|
exports_event_feed as EventFeed,
|
|
14
|
-
|
|
14
|
+
Service3 as Service,
|
|
15
15
|
SubscriberCapacity2 as SubscriberCapacity,
|
|
16
16
|
SubscriberOverflowError2 as SubscriberOverflowError,
|
|
17
17
|
frame2 as frame,
|
|
18
|
-
|
|
18
|
+
layer3 as layer,
|
|
19
19
|
make4 as make
|
|
20
20
|
};
|
package/dist/fetch.js
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
make3,
|
|
3
3
|
exports_fetch
|
|
4
|
-
} from "./chunks/
|
|
5
|
-
import"./chunks/
|
|
6
|
-
import"./chunks/
|
|
7
|
-
import"./chunks/
|
|
8
|
-
import"./chunks/
|
|
9
|
-
import"./chunks/
|
|
10
|
-
import"./chunks/
|
|
11
|
-
import"./chunks/
|
|
12
|
-
import"./chunks/
|
|
13
|
-
import"./chunks/
|
|
14
|
-
import"./chunks/
|
|
15
|
-
import"./chunks/
|
|
16
|
-
import"./chunks/
|
|
17
|
-
import"./chunks/
|
|
18
|
-
import"./chunks/
|
|
19
|
-
import"./chunks/
|
|
20
|
-
import"./chunks/
|
|
21
|
-
import"./chunks/
|
|
22
|
-
import"./chunks/
|
|
23
|
-
import"./chunks/
|
|
24
|
-
import"./chunks/
|
|
25
|
-
import"./chunks/
|
|
26
|
-
import"./chunks/
|
|
27
|
-
import"./chunks/
|
|
28
|
-
import"./chunks/
|
|
29
|
-
import"./chunks/
|
|
30
|
-
import"./chunks/
|
|
31
|
-
import"./chunks/
|
|
32
|
-
import"./chunks/
|
|
33
|
-
import"./chunks/
|
|
34
|
-
import"./chunks/
|
|
35
|
-
import"./chunks/
|
|
36
|
-
import"./chunks/
|
|
37
|
-
import"./chunks/
|
|
38
|
-
import"./chunks/
|
|
39
|
-
import"./chunks/
|
|
40
|
-
import"./chunks/
|
|
41
|
-
import"./chunks/
|
|
42
|
-
import"./chunks/
|
|
43
|
-
import"./chunks/
|
|
44
|
-
import"./chunks/
|
|
45
|
-
import"./chunks/
|
|
46
|
-
import"./chunks/
|
|
47
|
-
import"./chunks/
|
|
48
|
-
import"./chunks/
|
|
49
|
-
import"./chunks/
|
|
50
|
-
import"./chunks/
|
|
4
|
+
} from "./chunks/location-zvmj8bt4.js";
|
|
5
|
+
import"./chunks/location-dcdfzfgt.js";
|
|
6
|
+
import"./chunks/location-erzfdgke.js";
|
|
7
|
+
import"./chunks/location-7b9xm1qg.js";
|
|
8
|
+
import"./chunks/location-9szahwb7.js";
|
|
9
|
+
import"./chunks/location-tp6qcw6t.js";
|
|
10
|
+
import"./chunks/location-cpp0zjdy.js";
|
|
11
|
+
import"./chunks/location-jk5edc6h.js";
|
|
12
|
+
import"./chunks/location-fysmzcya.js";
|
|
13
|
+
import"./chunks/location-sc3gatcy.js";
|
|
14
|
+
import"./chunks/location-fazm2c7b.js";
|
|
15
|
+
import"./chunks/location-emkxpff3.js";
|
|
16
|
+
import"./chunks/location-qcfps8nc.js";
|
|
17
|
+
import"./chunks/location-ba71rqfr.js";
|
|
18
|
+
import"./chunks/location-gq8jw616.js";
|
|
19
|
+
import"./chunks/location-547pgmmc.js";
|
|
20
|
+
import"./chunks/location-w4e9jgda.js";
|
|
21
|
+
import"./chunks/location-ye9tw5gq.js";
|
|
22
|
+
import"./chunks/location-g7sdbt1s.js";
|
|
23
|
+
import"./chunks/location-rhdada90.js";
|
|
24
|
+
import"./chunks/location-3d7qdbre.js";
|
|
25
|
+
import"./chunks/location-qx5ydgm0.js";
|
|
26
|
+
import"./chunks/location-hwqxzcvy.js";
|
|
27
|
+
import"./chunks/location-gw6rc7x0.js";
|
|
28
|
+
import"./chunks/location-nnsgc8by.js";
|
|
29
|
+
import"./chunks/location-jd2d9483.js";
|
|
30
|
+
import"./chunks/location-wexwfee0.js";
|
|
31
|
+
import"./chunks/location-9r2awqr1.js";
|
|
32
|
+
import"./chunks/location-1e765wh0.js";
|
|
33
|
+
import"./chunks/location-7xe5pzvy.js";
|
|
34
|
+
import"./chunks/location-s0qm098c.js";
|
|
35
|
+
import"./chunks/location-z3akqjf6.js";
|
|
36
|
+
import"./chunks/location-z6z134jc.js";
|
|
37
|
+
import"./chunks/location-t4c683g8.js";
|
|
38
|
+
import"./chunks/location-g3mfewdn.js";
|
|
39
|
+
import"./chunks/location-h6rt5k9s.js";
|
|
40
|
+
import"./chunks/location-z3e7v67k.js";
|
|
41
|
+
import"./chunks/location-q4bn6dy8.js";
|
|
42
|
+
import"./chunks/location-brapb58t.js";
|
|
43
|
+
import"./chunks/location-4nbah0zs.js";
|
|
44
|
+
import"./chunks/location-4gnb9897.js";
|
|
45
|
+
import"./chunks/location-b3bmdkga.js";
|
|
46
|
+
import"./chunks/location-c8a27nas.js";
|
|
47
|
+
import"./chunks/location-50bbk3b2.js";
|
|
48
|
+
import"./chunks/location-smaf4a18.js";
|
|
49
|
+
import"./chunks/location-j4at0y5c.js";
|
|
50
|
+
import"./chunks/location-mzs0n5xz.js";
|
|
51
51
|
export {
|
|
52
52
|
exports_fetch as ServerFetch,
|
|
53
|
-
|
|
53
|
+
make3 as make
|
|
54
54
|
};
|
package/dist/handlers/agent.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/location-g7sdbt1s.js";
|
|
4
|
+
import"../chunks/location-4nbah0zs.js";
|
|
5
|
+
import"../chunks/location-4gnb9897.js";
|
|
6
|
+
import"../chunks/location-b3bmdkga.js";
|
|
7
|
+
import"../chunks/location-50bbk3b2.js";
|
|
8
|
+
import"../chunks/location-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
AgentHandler2 as AgentHandler
|
|
11
11
|
};
|