@opencode/server 0.0.0-dev-20782 → 0.0.0-dev-20784
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 +13 -13
- package/dist/api.js +5 -5
- package/dist/auth.js +1 -1
- package/dist/chunks/{workerd-yzp5qqh7.js → fetch-00mapsdc.js} +4 -4
- package/dist/chunks/{workerd-7rxakzjh.js → fetch-0b39h07j.js} +2 -2
- package/dist/chunks/{workerd-4znne276.js → fetch-0q1fp77w.js} +2 -2
- package/dist/chunks/{workerd-y1grnrmm.js → fetch-10bq7mg4.js} +2 -2
- package/dist/chunks/{workerd-zyx1txgf.js → fetch-125dj052.js} +10 -10
- package/dist/chunks/{workerd-4rww2e47.js → fetch-13tvbs17.js} +3 -3
- package/dist/chunks/{workerd-1nwce8pe.js → fetch-19taf7de.js} +2 -2
- package/dist/chunks/{workerd-vb9atgxj.js → fetch-360ay1ws.js} +2 -2
- package/dist/chunks/{workerd-ym27c8rr.js → fetch-44qh4kfc.js} +4 -4
- package/dist/chunks/{workerd-v9pcqbqn.js → fetch-4r8g7rwq.js} +3 -3
- package/dist/chunks/{workerd-5ybpxcad.js → fetch-54sczv30.js} +7 -7
- package/dist/chunks/{workerd-gtkdacvk.js → fetch-5ytyqf1q.js} +5 -4
- package/dist/chunks/{workerd-weqhmjbd.js → fetch-735x1s0d.js} +3 -3
- package/dist/chunks/{workerd-gny2k2ap.js → fetch-73mn2n3x.js} +4 -4
- package/dist/chunks/{workerd-1xva44q8.js → fetch-8cnxq26y.js} +3 -3
- package/dist/chunks/{workerd-934cmkaf.js → fetch-8d0mn004.js} +3 -3
- package/dist/chunks/{workerd-16qfdx6b.js → fetch-9e4rhycp.js} +3 -3
- package/dist/chunks/{workerd-anm12x33.js → fetch-anm12x33.js} +1 -1
- package/dist/chunks/{workerd-9very778.js → fetch-b8ygg5k2.js} +7 -7
- package/dist/chunks/{workerd-td9k2nw3.js → fetch-bwz286mg.js} +3 -3
- package/dist/chunks/{workerd-1pc0tr9h.js → fetch-en4n16hb.js} +33 -33
- package/dist/chunks/{workerd-t8yzmczr.js → fetch-erzfdgke.js} +1 -1
- package/dist/chunks/{workerd-n52yc5x0.js → fetch-f3xezvck.js} +3 -3
- package/dist/chunks/{workerd-rz196gzy.js → fetch-gd6nn1mx.js} +21 -21
- package/dist/chunks/{workerd-9cw9axw5.js → fetch-h2a6nn7k.js} +3 -3
- package/dist/chunks/fetch-h6rt5k9s.js +24 -0
- package/dist/chunks/{workerd-dqsr2g0t.js → fetch-j03v2rh9.js} +3 -3
- package/dist/chunks/{workerd-3hev21p5.js → fetch-jp72ysbz.js} +4 -4
- package/dist/chunks/{workerd-yybdkkb6.js → fetch-jphw74cq.js} +3 -3
- package/dist/chunks/{workerd-x2by5wsf.js → fetch-ke8kc592.js} +30 -34
- package/dist/chunks/{workerd-g85r3kcp.js → fetch-nqswsw3h.js} +3 -3
- package/dist/chunks/{workerd-0vyswjsz.js → fetch-p177e0cw.js} +3 -3
- package/dist/chunks/{workerd-krn4521r.js → fetch-qggsn6y0.js} +3 -3
- package/dist/chunks/{workerd-kr61w04k.js → fetch-rbn15j6z.js} +8 -8
- package/dist/chunks/{workerd-7gfv664k.js → fetch-s1824482.js} +3 -3
- package/dist/chunks/{workerd-h7se5k3v.js → fetch-sb0dyttf.js} +32 -31
- package/dist/chunks/{workerd-hvft24jv.js → fetch-tr76qvg4.js} +2 -2
- package/dist/chunks/{workerd-w070c2h2.js → fetch-ty73jqxf.js} +3 -3
- package/dist/chunks/{workerd-bkk2wfbz.js → fetch-vvagfka3.js} +7 -7
- package/dist/chunks/{workerd-796j10e5.js → fetch-vw0q3knq.js} +3 -3
- package/dist/chunks/{workerd-ca257yb3.js → fetch-x5jn5rep.js} +3 -3
- package/dist/chunks/{workerd-xsrtpxyd.js → fetch-xsrtpxyd.js} +1 -1
- package/dist/chunks/{workerd-jzqzrtw5.js → fetch-ybxyv6z5.js} +2 -2
- package/dist/chunks/{workerd-ajzgetf8.js → fetch-ysb51p4r.js} +3 -3
- package/dist/chunks/{workerd-a5j49w62.js → fetch-yvtnm9hy.js} +6 -6
- package/dist/chunks/{workerd-f2c3fmpg.js → fetch-ywn523ee.js} +5 -5
- package/dist/cors.js +1 -1
- package/dist/event-feed.js +5 -5
- package/dist/fetch.js +47 -47
- package/dist/handlers/agent.d.ts +1 -1
- package/dist/handlers/agent.js +6 -6
- package/dist/handlers/command.d.ts +1 -1
- package/dist/handlers/command.js +6 -6
- package/dist/handlers/config.d.ts +1 -1
- package/dist/handlers/config.js +6 -6
- package/dist/handlers/credential.d.ts +1 -1
- package/dist/handlers/credential.js +6 -6
- package/dist/handlers/debug.d.ts +1 -1
- package/dist/handlers/debug.js +6 -6
- package/dist/handlers/event.d.ts +1 -1
- package/dist/handlers/event.js +7 -7
- package/dist/handlers/form.d.ts +1 -1
- package/dist/handlers/form.js +6 -6
- package/dist/handlers/fs.d.ts +1 -1
- package/dist/handlers/fs.js +6 -6
- package/dist/handlers/generate.d.ts +1 -1
- package/dist/handlers/generate.js +6 -6
- package/dist/handlers/integration.d.ts +1 -1
- package/dist/handlers/integration.js +6 -6
- package/dist/handlers/location.d.ts +1 -1
- package/dist/handlers/location.js +6 -6
- package/dist/handlers/mcp.d.ts +1 -1
- package/dist/handlers/mcp.js +6 -6
- package/dist/handlers/message.d.ts +1 -1
- package/dist/handlers/message.js +6 -6
- package/dist/handlers/migration.d.ts +1 -1
- package/dist/handlers/migration.js +6 -6
- package/dist/handlers/model.d.ts +1 -1
- package/dist/handlers/model.js +6 -6
- package/dist/handlers/permission.d.ts +1 -1
- package/dist/handlers/permission.js +6 -6
- package/dist/handlers/persistent-pty.d.ts +1 -1
- package/dist/handlers/persistent-pty.js +8 -8
- package/dist/handlers/plugin.d.ts +1 -1
- package/dist/handlers/plugin.js +6 -6
- package/dist/handlers/project.d.ts +1 -1
- package/dist/handlers/project.js +6 -6
- package/dist/handlers/provider.d.ts +1 -1
- package/dist/handlers/provider.js +6 -6
- package/dist/handlers/pty-socket.d.ts +10 -2
- package/dist/handlers/pty-socket.js +1 -1
- package/dist/handlers/pty.d.ts +1 -1
- package/dist/handlers/pty.js +9 -9
- package/dist/handlers/reference.d.ts +1 -1
- package/dist/handlers/reference.js +6 -6
- package/dist/handlers/rpc.d.ts +1 -1
- package/dist/handlers/rpc.js +6 -6
- package/dist/handlers/server.d.ts +1 -1
- package/dist/handlers/server.js +9 -9
- package/dist/handlers/session-error.js +1 -1
- package/dist/handlers/session.d.ts +1 -1
- package/dist/handlers/session.js +6 -6
- package/dist/handlers/shell.d.ts +1 -1
- package/dist/handlers/shell.js +6 -6
- package/dist/handlers/skill.d.ts +1 -1
- package/dist/handlers/skill.js +6 -6
- package/dist/handlers/vcs.d.ts +1 -1
- package/dist/handlers/vcs.js +6 -6
- package/dist/handlers/websearch.d.ts +1 -1
- package/dist/handlers/websearch.js +6 -6
- package/dist/handlers/worktree.d.ts +1 -1
- package/dist/handlers/worktree.js +6 -6
- package/dist/handlers.d.ts +1 -1
- package/dist/handlers.js +43 -43
- package/dist/location.d.ts +2 -2
- package/dist/location.js +4 -4
- package/dist/middleware/authorization.d.ts +1 -1
- package/dist/middleware/authorization.js +2 -2
- package/dist/middleware/form-location.d.ts +1 -1
- package/dist/middleware/form-location.js +3 -3
- package/dist/middleware/schema-error.js +1 -1
- package/dist/middleware/session-location.d.ts +1 -1
- package/dist/middleware/session-location.js +3 -3
- package/dist/pairing.js +5 -5
- package/dist/process.d.ts +4 -3
- package/dist/process.js +50 -50
- package/dist/pty-environment.js +5 -5
- package/dist/request-tracing.js +1 -1
- package/dist/routes.d.ts +3 -3
- package/dist/routes.js +46 -46
- package/dist/server-info.js +5 -5
- package/dist/service-status.js +1 -1
- package/dist/workerd.js +48 -48
- package/package.json +14 -12
- package/dist/chunks/workerd-hezj1jdf.js +0 -7
- /package/dist/chunks/{workerd-9rqn6x4v.js → fetch-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{workerd-q4bn6dy8.js → fetch-q4bn6dy8.js} +0 -0
- /package/dist/chunks/{workerd-smaf4a18.js → fetch-smaf4a18.js} +0 -0
- /package/dist/chunks/{workerd-yc7nft6q.js → fetch-yc7nft6q.js} +0 -0
|
@@ -2,20 +2,20 @@ import {
|
|
|
2
2
|
locationErrors2,
|
|
3
3
|
response2,
|
|
4
4
|
requestRef2
|
|
5
|
-
} from "./
|
|
5
|
+
} from "./fetch-ywn523ee.js";
|
|
6
6
|
import {
|
|
7
7
|
Api2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./fetch-h2a6nn7k.js";
|
|
9
9
|
import {
|
|
10
10
|
CorsConfig2,
|
|
11
11
|
isAllowedRequestOrigin2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./fetch-q4bn6dy8.js";
|
|
13
13
|
import {
|
|
14
|
-
|
|
15
|
-
} from "./
|
|
14
|
+
Service3
|
|
15
|
+
} from "./fetch-vvagfka3.js";
|
|
16
16
|
import {
|
|
17
17
|
runPtySocket2
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./fetch-h6rt5k9s.js";
|
|
19
19
|
|
|
20
20
|
// src/handlers/pty.ts
|
|
21
21
|
import { Pty } from "@opencode/core/pty";
|
|
@@ -24,9 +24,9 @@ import { PtyTicket } from "@opencode/core/pty/ticket";
|
|
|
24
24
|
import { Location } from "@opencode/core/location";
|
|
25
25
|
import { LocationServiceMap } from "@opencode/core/location-service-map";
|
|
26
26
|
import { Effect, Queue } from "effect";
|
|
27
|
-
import { HttpServerRequest, HttpServerResponse } from "effect/
|
|
28
|
-
import { HttpApiBuilder, HttpApiSchema } from "effect/
|
|
29
|
-
import { Socket } from "effect/
|
|
27
|
+
import { HttpServerRequest, HttpServerResponse } from "effect/http";
|
|
28
|
+
import { HttpApiBuilder, HttpApiSchema } from "effect/http-api";
|
|
29
|
+
import { Socket } from "effect/socket";
|
|
30
30
|
import { ForbiddenError, PtyNotFoundError } from "@opencode/protocol/errors";
|
|
31
31
|
import {
|
|
32
32
|
PTY_CONNECT_TICKET_QUERY,
|
|
@@ -41,7 +41,7 @@ var PtyHandler2 = HttpApiBuilder.group(Api2, "server.pty", (handlers) => Effect.
|
|
|
41
41
|
const locations = yield* LocationServiceMap.Service;
|
|
42
42
|
const tickets = yield* PtyTicket.Service;
|
|
43
43
|
const cors = yield* CorsConfig2;
|
|
44
|
-
const environment = yield*
|
|
44
|
+
const environment = yield* Service3;
|
|
45
45
|
return handlers.handle("pty.list", Effect.fn(function* () {
|
|
46
46
|
const pty = yield* Pty.Service;
|
|
47
47
|
return yield* response2(pty.list());
|
|
@@ -112,36 +112,37 @@ var PtyHandler2 = HttpApiBuilder.group(Api2, "server.pty", (handlers) => Effect.
|
|
|
112
112
|
const cursorNumber = parsedCursor === null ? undefined : Number(parsedCursor);
|
|
113
113
|
const cursor = cursorNumber !== undefined && Number.isSafeInteger(cursorNumber) && cursorNumber >= -1 ? cursorNumber : undefined;
|
|
114
114
|
const socket = yield* Effect.orDie(ctx.request.upgrade);
|
|
115
|
-
const write = yield* socket.writer;
|
|
116
|
-
const closeAccepted = (event) => socket.runRaw(() => Effect.void, { onOpen: write(event).pipe(Effect.catch(() => Effect.void)) }).pipe(Effect.timeout("1 second"), Effect.catchReason("SocketError", "SocketCloseError", () => Effect.void), Effect.catch(() => Effect.void));
|
|
117
115
|
const outbox = yield* Queue.unbounded();
|
|
118
116
|
const attachment = yield* pty.attach(ctx.params.ptyID, {
|
|
119
117
|
cursor,
|
|
120
118
|
onData: (chunk) => Queue.offerUnsafe(outbox, chunk),
|
|
121
119
|
onEnd: () => Queue.offerUnsafe(outbox, new Socket.CloseEvent(1000))
|
|
122
120
|
}).pipe(Effect.catchTags({
|
|
123
|
-
"Pty.NotFoundError": () =>
|
|
124
|
-
|
|
121
|
+
"Pty.NotFoundError": () => Effect.sync(() => {
|
|
122
|
+
Queue.offerUnsafe(outbox, new Socket.CloseEvent(4404, "session not found"));
|
|
123
|
+
}),
|
|
124
|
+
"Pty.ExitedError": () => Effect.sync(() => {
|
|
125
|
+
Queue.offerUnsafe(outbox, new Socket.CloseEvent(4404, "session exited"));
|
|
126
|
+
})
|
|
125
127
|
}));
|
|
126
|
-
if (
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
Queue.offerUnsafe(outbox,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
if (
|
|
128
|
+
if (attachment) {
|
|
129
|
+
for (const chunk of PtyProtocol.chunks(attachment.replay))
|
|
130
|
+
Queue.offerUnsafe(outbox, chunk);
|
|
131
|
+
Queue.offerUnsafe(outbox, PtyProtocol.metaFrame(attachment.cursor));
|
|
132
|
+
attachment.activate();
|
|
133
|
+
}
|
|
134
|
+
yield* runPtySocket2({
|
|
135
|
+
socket,
|
|
136
|
+
outbox,
|
|
137
|
+
onMessage: (message) => Effect.sync(() => {
|
|
138
|
+
if (!attachment)
|
|
137
139
|
return;
|
|
138
|
-
|
|
140
|
+
const decoded = PtyProtocol.decodeInput(message);
|
|
141
|
+
if (decoded !== undefined)
|
|
142
|
+
attachment.write(decoded);
|
|
143
|
+
}),
|
|
144
|
+
detach: () => attachment?.detach()
|
|
139
145
|
});
|
|
140
|
-
yield* runPtySocket2(drain, socket.runRaw((message) => {
|
|
141
|
-
const decoded = PtyProtocol.decodeInput(message);
|
|
142
|
-
if (decoded !== undefined)
|
|
143
|
-
attachment.write(decoded);
|
|
144
|
-
}), attachment.detach).pipe(Effect.catchReason("SocketError", "SocketCloseError", () => Effect.void), Effect.orDie);
|
|
145
146
|
return HttpServerResponse.empty();
|
|
146
147
|
}).pipe(Effect.provide(locations.get(ref)), locationErrors2);
|
|
147
148
|
}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-h2a6nn7k.js";
|
|
4
4
|
|
|
5
5
|
// src/handlers/worktree.ts
|
|
6
6
|
import { Git } from "@opencode/core/git";
|
|
@@ -8,7 +8,7 @@ import { Worktree } from "@opencode/core/worktree";
|
|
|
8
8
|
import { ProjectNotFoundError } from "@opencode/protocol/errors";
|
|
9
9
|
import { WorktreeError } from "@opencode/protocol/groups/worktree";
|
|
10
10
|
import { Effect } from "effect";
|
|
11
|
-
import { HttpApiBuilder, HttpApiSchema } from "effect/
|
|
11
|
+
import { HttpApiBuilder, HttpApiSchema } from "effect/http-api";
|
|
12
12
|
var WorktreeHandler2 = HttpApiBuilder.group(Api2, "server.worktree", (handlers) => Effect.gen(function* () {
|
|
13
13
|
const worktrees = yield* Worktree.Service;
|
|
14
14
|
return handlers.handle("worktree.list", (ctx) => worktrees.list(ctx.query).pipe(Effect.catchTag("Project.NotFoundError", missingProject))).handle("worktree.create", (ctx) => worktrees.create(ctx.payload).pipe(badRequest)).handle("worktree.remove", (ctx) => worktrees.remove(ctx.payload).pipe(badRequest, Effect.as(HttpApiSchema.NoContent.make()))).handle("worktree.refresh", (ctx) => worktrees.refresh(ctx.payload).pipe(badRequest, Effect.as(HttpApiSchema.NoContent.make())));
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
locationErrors2,
|
|
3
3
|
sessionInfo2,
|
|
4
4
|
requestRef2
|
|
5
|
-
} from "./
|
|
5
|
+
} from "./fetch-ywn523ee.js";
|
|
6
6
|
|
|
7
7
|
// src/middleware/form-location.ts
|
|
8
8
|
import { Instance } from "@opencode/core/instance/service";
|
|
@@ -10,8 +10,8 @@ import { LocationServiceMap } from "@opencode/core/location-services";
|
|
|
10
10
|
import { Session } from "@opencode/core/session";
|
|
11
11
|
import { LocationNotFoundError, InvalidRequestError, SessionNotFoundError } from "@opencode/protocol/errors";
|
|
12
12
|
import { Effect, Layer } from "effect";
|
|
13
|
-
import { HttpRouter, HttpServerRequest } from "effect/
|
|
14
|
-
import { HttpApiMiddleware } from "effect/
|
|
13
|
+
import { HttpRouter, HttpServerRequest } from "effect/http";
|
|
14
|
+
import { HttpApiMiddleware } from "effect/http-api";
|
|
15
15
|
class FormLocationMiddleware2 extends HttpApiMiddleware.Service()("@opencode/HttpApiFormLocation", {
|
|
16
16
|
error: [InvalidRequestError, SessionNotFoundError, LocationNotFoundError]
|
|
17
17
|
}) {
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-9rqn6x4v.js";
|
|
4
4
|
|
|
5
5
|
// src/pty-environment.ts
|
|
6
6
|
var exports_pty_environment = {};
|
|
7
7
|
__export(exports_pty_environment, {
|
|
8
8
|
PtyEnvironment: () => exports_pty_environment,
|
|
9
|
-
Service: () =>
|
|
9
|
+
Service: () => Service3,
|
|
10
10
|
layer: () => layer2,
|
|
11
|
-
node: () =>
|
|
11
|
+
node: () => node3
|
|
12
12
|
});
|
|
13
13
|
import { Context, Effect, Layer } from "effect";
|
|
14
14
|
import { makeGlobalNode } from "@opencode/util/effect/app-node";
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class Service3 extends Context.Service()("@opencode/ServerPtyEnvironment") {
|
|
17
17
|
}
|
|
18
|
-
var layer2 = Layer.succeed(
|
|
18
|
+
var layer2 = Layer.succeed(Service3, Service3.of({
|
|
19
19
|
get: () => Effect.succeed({})
|
|
20
20
|
}));
|
|
21
|
-
var
|
|
21
|
+
var node3 = makeGlobalNode({ service: Service3, layer: layer2, deps: [] });
|
|
22
22
|
|
|
23
|
-
export {
|
|
23
|
+
export { Service3, layer2, node3, exports_pty_environment };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
locationErrors2,
|
|
3
3
|
sessionInfo2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./fetch-ywn523ee.js";
|
|
5
5
|
|
|
6
6
|
// src/middleware/session-location.ts
|
|
7
7
|
import { Instance } from "@opencode/core/instance/service";
|
|
8
8
|
import { Session } from "@opencode/core/session";
|
|
9
9
|
import { Effect, Layer } from "effect";
|
|
10
|
-
import { HttpRouter } from "effect/
|
|
11
|
-
import { HttpApiMiddleware } from "effect/
|
|
10
|
+
import { HttpRouter } from "effect/http";
|
|
11
|
+
import { HttpApiMiddleware } from "effect/http-api";
|
|
12
12
|
import { LocationNotFoundError, InvalidRequestError, SessionNotFoundError } from "@opencode/protocol/errors";
|
|
13
13
|
class SessionLocationMiddleware2 extends HttpApiMiddleware.Service()("@opencode/HttpApiSessionLocation", {
|
|
14
14
|
error: [InvalidRequestError, SessionNotFoundError, LocationNotFoundError]
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-ywn523ee.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./fetch-h2a6nn7k.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/mcp.ts
|
|
9
9
|
import { Mcp } from "@opencode/core/mcp/index";
|
|
10
10
|
import { McpServerNotFoundError } from "@opencode/protocol/errors";
|
|
11
11
|
import { Effect } from "effect";
|
|
12
|
-
import { HttpApiBuilder, HttpApiSchema } from "effect/
|
|
12
|
+
import { HttpApiBuilder, HttpApiSchema } from "effect/http-api";
|
|
13
13
|
var notFound = (effect) => effect.pipe(Effect.mapError((error) => new McpServerNotFoundError({ server: error.server, message: error.message })));
|
|
14
14
|
var McpHandler2 = HttpApiBuilder.group(Api2, "server.mcp", (handlers) => Effect.gen(function* () {
|
|
15
15
|
return handlers.handle("mcp.list", Effect.fn(function* () {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-h2a6nn7k.js";
|
|
4
4
|
|
|
5
5
|
// src/handlers/migration.ts
|
|
6
6
|
import { V1Migration } from "@opencode/core/database/v1-migration";
|
|
7
|
-
import { HttpApiBuilder } from "effect/
|
|
7
|
+
import { HttpApiBuilder } from "effect/http-api";
|
|
8
8
|
import { Effect } from "effect";
|
|
9
9
|
var MigrationHandler2 = HttpApiBuilder.group(Api2, "server.migration", (handlers) => handlers.handle("migration.v1.status", Effect.fn(function* () {
|
|
10
10
|
return yield* V1Migration.status();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-ywn523ee.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./fetch-h2a6nn7k.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/reference.ts
|
|
9
9
|
import { Reference } from "@opencode/core/reference";
|
|
10
|
-
import { HttpApiBuilder } from "effect/
|
|
10
|
+
import { HttpApiBuilder } from "effect/http-api";
|
|
11
11
|
var ReferenceHandler2 = HttpApiBuilder.group(Api2, "server.reference", (handlers) => handlers.handle("reference.list", () => response2(Reference.Service.use((reference) => reference.list()))));
|
|
12
12
|
|
|
13
13
|
export { ReferenceHandler2 };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-h2a6nn7k.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
5
|
+
Service5,
|
|
6
6
|
frame2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./fetch-54sczv30.js";
|
|
8
8
|
|
|
9
9
|
// src/handlers/event.ts
|
|
10
10
|
import { Event } from "@opencode/schema/event";
|
|
11
11
|
import { Effect, Stream } from "effect";
|
|
12
|
-
import { HttpServerResponse } from "effect/
|
|
13
|
-
import { HttpApiBuilder } from "effect/
|
|
12
|
+
import { HttpServerResponse } from "effect/http";
|
|
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* Service5;
|
|
16
16
|
return handlers.handleRaw("event.subscribe", () => Effect.gen(function* () {
|
|
17
17
|
const connected = {
|
|
18
18
|
id: Event.ID.create(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
missingSession2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-smaf4a18.js";
|
|
4
4
|
|
|
5
5
|
// src/location.ts
|
|
6
6
|
import { FileSystem } from "@opencode/core/filesystem";
|
|
@@ -10,8 +10,8 @@ import { AbsolutePath } from "@opencode/core/schema";
|
|
|
10
10
|
import { Session } from "@opencode/core/session";
|
|
11
11
|
import { LocationNotFoundError, InvalidRequestError } from "@opencode/protocol/errors";
|
|
12
12
|
import { Effect, Layer, Schema } from "effect";
|
|
13
|
-
import { HttpServerRequest } from "effect/
|
|
14
|
-
import { HttpApiMiddleware } from "effect/
|
|
13
|
+
import { HttpServerRequest } from "effect/http";
|
|
14
|
+
import { HttpApiMiddleware } from "effect/http-api";
|
|
15
15
|
class LocationMiddleware2 extends HttpApiMiddleware.Service()("@opencode/HttpApiLocation", { error: [LocationNotFoundError] }) {
|
|
16
16
|
}
|
|
17
17
|
function locationErrors2(effect) {
|
|
@@ -51,7 +51,7 @@ function decode(input) {
|
|
|
51
51
|
return input;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
var
|
|
54
|
+
var layer4 = Layer.effect(LocationMiddleware2, Effect.gen(function* () {
|
|
55
55
|
const locations = yield* LocationServiceMap.Service;
|
|
56
56
|
return LocationMiddleware2.of((effect) => Effect.gen(function* () {
|
|
57
57
|
const request = yield* HttpServerRequest.HttpServerRequest;
|
|
@@ -59,4 +59,4 @@ var layer5 = Layer.effect(LocationMiddleware2, Effect.gen(function* () {
|
|
|
59
59
|
}));
|
|
60
60
|
}));
|
|
61
61
|
|
|
62
|
-
export { LocationMiddleware2, locationErrors2, response2, sessionInfo2, requestRef2,
|
|
62
|
+
export { LocationMiddleware2, locationErrors2, response2, sessionInfo2, requestRef2, layer4 };
|
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
|
+
Service5,
|
|
6
6
|
frame2,
|
|
7
7
|
make4,
|
|
8
|
-
|
|
8
|
+
layer5,
|
|
9
9
|
exports_event_feed
|
|
10
|
-
} from "./chunks/
|
|
10
|
+
} from "./chunks/fetch-54sczv30.js";
|
|
11
11
|
export {
|
|
12
12
|
EncodingError2 as EncodingError,
|
|
13
13
|
exports_event_feed as EventFeed,
|
|
14
|
-
|
|
14
|
+
Service5 as Service,
|
|
15
15
|
SubscriberCapacity2 as SubscriberCapacity,
|
|
16
16
|
SubscriberOverflowError2 as SubscriberOverflowError,
|
|
17
17
|
frame2 as frame,
|
|
18
|
-
|
|
18
|
+
layer5 as layer,
|
|
19
19
|
make4 as make
|
|
20
20
|
};
|
package/dist/fetch.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
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/fetch-jp72ysbz.js";
|
|
5
|
+
import"./chunks/fetch-gd6nn1mx.js";
|
|
6
|
+
import"./chunks/fetch-erzfdgke.js";
|
|
7
|
+
import"./chunks/fetch-5ytyqf1q.js";
|
|
8
|
+
import"./chunks/fetch-en4n16hb.js";
|
|
9
|
+
import"./chunks/fetch-sb0dyttf.js";
|
|
10
|
+
import"./chunks/fetch-x5jn5rep.js";
|
|
11
|
+
import"./chunks/fetch-tr76qvg4.js";
|
|
12
|
+
import"./chunks/fetch-bwz286mg.js";
|
|
13
|
+
import"./chunks/fetch-19taf7de.js";
|
|
14
|
+
import"./chunks/fetch-j03v2rh9.js";
|
|
15
|
+
import"./chunks/fetch-p177e0cw.js";
|
|
16
|
+
import"./chunks/fetch-00mapsdc.js";
|
|
17
|
+
import"./chunks/fetch-44qh4kfc.js";
|
|
18
|
+
import"./chunks/fetch-4r8g7rwq.js";
|
|
19
|
+
import"./chunks/fetch-jphw74cq.js";
|
|
20
|
+
import"./chunks/fetch-9e4rhycp.js";
|
|
21
|
+
import"./chunks/fetch-73mn2n3x.js";
|
|
22
|
+
import"./chunks/fetch-8cnxq26y.js";
|
|
23
|
+
import"./chunks/fetch-10bq7mg4.js";
|
|
24
|
+
import"./chunks/fetch-0b39h07j.js";
|
|
25
|
+
import"./chunks/fetch-0q1fp77w.js";
|
|
26
|
+
import"./chunks/fetch-ybxyv6z5.js";
|
|
27
|
+
import"./chunks/fetch-ysb51p4r.js";
|
|
28
|
+
import"./chunks/fetch-ke8kc592.js";
|
|
29
|
+
import"./chunks/fetch-h6rt5k9s.js";
|
|
30
|
+
import"./chunks/fetch-360ay1ws.js";
|
|
31
|
+
import"./chunks/fetch-13tvbs17.js";
|
|
32
|
+
import"./chunks/fetch-qggsn6y0.js";
|
|
33
|
+
import"./chunks/fetch-125dj052.js";
|
|
34
|
+
import"./chunks/fetch-nqswsw3h.js";
|
|
35
|
+
import"./chunks/fetch-yvtnm9hy.js";
|
|
36
|
+
import"./chunks/fetch-s1824482.js";
|
|
37
|
+
import"./chunks/fetch-8d0mn004.js";
|
|
38
|
+
import"./chunks/fetch-f3xezvck.js";
|
|
39
|
+
import"./chunks/fetch-735x1s0d.js";
|
|
40
|
+
import"./chunks/fetch-rbn15j6z.js";
|
|
41
|
+
import"./chunks/fetch-vvagfka3.js";
|
|
42
|
+
import"./chunks/fetch-b8ygg5k2.js";
|
|
43
|
+
import"./chunks/fetch-h2a6nn7k.js";
|
|
44
|
+
import"./chunks/fetch-ty73jqxf.js";
|
|
45
|
+
import"./chunks/fetch-vw0q3knq.js";
|
|
46
|
+
import"./chunks/fetch-anm12x33.js";
|
|
47
|
+
import"./chunks/fetch-q4bn6dy8.js";
|
|
48
|
+
import"./chunks/fetch-ywn523ee.js";
|
|
49
|
+
import"./chunks/fetch-smaf4a18.js";
|
|
50
|
+
import"./chunks/fetch-54sczv30.js";
|
|
51
51
|
export {
|
|
52
52
|
exports_fetch as ServerFetch,
|
|
53
53
|
make3 as make
|
package/dist/handlers/agent.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AgentHandler: import("effect/Layer").Layer<import("effect/
|
|
1
|
+
export declare const AgentHandler: import("effect/Layer").Layer<import("effect/http-api/HttpApiGroup").Service<"server", "server.agent">, never, import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization | import("../location").LocationMiddleware>;
|
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/fetch-jphw74cq.js";
|
|
4
|
+
import"../chunks/fetch-h2a6nn7k.js";
|
|
5
|
+
import"../chunks/fetch-ty73jqxf.js";
|
|
6
|
+
import"../chunks/fetch-vw0q3knq.js";
|
|
7
|
+
import"../chunks/fetch-ywn523ee.js";
|
|
8
|
+
import"../chunks/fetch-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
AgentHandler2 as AgentHandler
|
|
11
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const CommandHandler: import("effect/Layer").Layer<import("effect/
|
|
1
|
+
export declare const CommandHandler: import("effect/Layer").Layer<import("effect/http-api/HttpApiGroup").Service<"server", "server.command">, never, import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization | import("../location").LocationMiddleware>;
|
package/dist/handlers/command.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CommandHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/fetch-8cnxq26y.js";
|
|
4
|
+
import"../chunks/fetch-h2a6nn7k.js";
|
|
5
|
+
import"../chunks/fetch-ty73jqxf.js";
|
|
6
|
+
import"../chunks/fetch-vw0q3knq.js";
|
|
7
|
+
import"../chunks/fetch-ywn523ee.js";
|
|
8
|
+
import"../chunks/fetch-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
CommandHandler2 as CommandHandler
|
|
11
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const ConfigHandler: import("effect/Layer").Layer<import("effect/
|
|
1
|
+
export declare const ConfigHandler: import("effect/Layer").Layer<import("effect/http-api/HttpApiGroup").Service<"server", "server.config">, never, import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization | import("../location").LocationMiddleware>;
|
package/dist/handlers/config.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ConfigHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/fetch-0b39h07j.js";
|
|
4
|
+
import"../chunks/fetch-h2a6nn7k.js";
|
|
5
|
+
import"../chunks/fetch-ty73jqxf.js";
|
|
6
|
+
import"../chunks/fetch-vw0q3knq.js";
|
|
7
|
+
import"../chunks/fetch-ywn523ee.js";
|
|
8
|
+
import"../chunks/fetch-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
ConfigHandler2 as ConfigHandler
|
|
11
11
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Credential } from "@opencode/core/credential";
|
|
2
|
-
export declare const CredentialHandler: import("effect/Layer").Layer<import("effect/
|
|
2
|
+
export declare const CredentialHandler: import("effect/Layer").Layer<import("effect/http-api/HttpApiGroup").Service<"server", "server.credential">, never, import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization | import("effect/http/HttpRouter").Request<"Requires", Credential.Service>>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CredentialHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/fetch-19taf7de.js";
|
|
4
|
+
import"../chunks/fetch-h2a6nn7k.js";
|
|
5
|
+
import"../chunks/fetch-ty73jqxf.js";
|
|
6
|
+
import"../chunks/fetch-vw0q3knq.js";
|
|
7
|
+
import"../chunks/fetch-ywn523ee.js";
|
|
8
|
+
import"../chunks/fetch-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
CredentialHandler2 as CredentialHandler
|
|
11
11
|
};
|
package/dist/handlers/debug.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const DebugHandler: import("effect/Layer").Layer<import("effect/
|
|
1
|
+
export declare const DebugHandler: import("effect/Layer").Layer<import("effect/http-api/HttpApiGroup").Service<"server", "server.debug">, never, import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization>;
|
package/dist/handlers/debug.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DebugHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/fetch-f3xezvck.js";
|
|
4
|
+
import"../chunks/fetch-h2a6nn7k.js";
|
|
5
|
+
import"../chunks/fetch-ty73jqxf.js";
|
|
6
|
+
import"../chunks/fetch-vw0q3knq.js";
|
|
7
|
+
import"../chunks/fetch-ywn523ee.js";
|
|
8
|
+
import"../chunks/fetch-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
DebugHandler2 as DebugHandler
|
|
11
11
|
};
|
package/dist/handlers/event.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { EventFeed } from "../event-feed";
|
|
2
|
-
export declare const EventHandler: import("effect/Layer").Layer<import("effect/
|
|
2
|
+
export declare const EventHandler: import("effect/Layer").Layer<import("effect/http-api/HttpApiGroup").Service<"server", "server.event">, never, EventFeed.Service | (import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization)>;
|
package/dist/handlers/event.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EventHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
9
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/fetch-yvtnm9hy.js";
|
|
4
|
+
import"../chunks/fetch-h2a6nn7k.js";
|
|
5
|
+
import"../chunks/fetch-ty73jqxf.js";
|
|
6
|
+
import"../chunks/fetch-vw0q3knq.js";
|
|
7
|
+
import"../chunks/fetch-ywn523ee.js";
|
|
8
|
+
import"../chunks/fetch-smaf4a18.js";
|
|
9
|
+
import"../chunks/fetch-54sczv30.js";
|
|
10
10
|
export {
|
|
11
11
|
EventHandler2 as EventHandler
|
|
12
12
|
};
|
package/dist/handlers/form.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const FormHandler: import("effect/Layer").Layer<import("effect/
|
|
1
|
+
export declare const FormHandler: import("effect/Layer").Layer<import("effect/http-api/HttpApiGroup").Service<"server", "server.form">, never, import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization | import("../location").LocationMiddleware>;
|