@opencode/server 2.0.26 → 2.0.28
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 +17 -14
- package/dist/api.js +5 -5
- package/dist/auth.js +1 -1
- package/dist/chunks/{fetch-6fr0a7bp.js → server-info-1fx5fmdj.js} +22 -21
- package/dist/chunks/{fetch-80mhd8t7.js → server-info-2nsepnqy.js} +3 -3
- package/dist/chunks/{fetch-zhympcbw.js → server-info-2yr2dq97.js} +3 -3
- package/dist/chunks/{fetch-d00srfh1.js → server-info-3154e7fk.js} +3 -3
- package/dist/chunks/{fetch-g9rgg5ys.js → server-info-31acg4hb.js} +3 -3
- package/dist/chunks/{fetch-w1fepcwh.js → server-info-49c878v9.js} +3 -3
- package/dist/chunks/{fetch-cm271yqe.js → server-info-4b0899hb.js} +3 -3
- package/dist/chunks/{fetch-8c9kbrtm.js → server-info-5w10ccet.js} +2 -2
- package/dist/chunks/{fetch-gtkdacvk.js → server-info-5ytyqf1q.js} +5 -4
- package/dist/chunks/{fetch-hajt4q09.js → server-info-72ygafj3.js} +3 -3
- package/dist/chunks/{fetch-n1svm92q.js → server-info-75c938bc.js} +6 -6
- package/dist/chunks/{fetch-agftk6b6.js → server-info-91mt6ewz.js} +3 -3
- package/dist/chunks/{fetch-t1n0m4wb.js → server-info-a6kxe6a7.js} +30 -34
- package/dist/chunks/{fetch-1kbkbftd.js → server-info-agw55v2c.js} +4 -4
- package/dist/chunks/{fetch-anm12x33.js → server-info-anm12x33.js} +1 -1
- package/dist/chunks/{fetch-mjepr257.js → server-info-cfhthk6z.js} +2 -2
- package/dist/chunks/{fetch-j3pdvhe2.js → server-info-cx1d1bht.js} +3 -3
- package/dist/chunks/{fetch-gj6tv0s4.js → server-info-e4x9285j.js} +6 -3
- package/dist/chunks/{fetch-r5bb0n1s.js → server-info-e7pctymn.js} +2 -2
- package/dist/chunks/{fetch-t8yzmczr.js → server-info-erzfdgke.js} +1 -1
- package/dist/chunks/{fetch-eekrj6qv.js → server-info-f4b2q3tn.js} +2 -2
- package/dist/chunks/{fetch-cy7y42ks.js → server-info-f6n7ws9b.js} +4 -4
- package/dist/chunks/{fetch-78n975k2.js → server-info-fzcjf2mc.js} +10 -10
- package/dist/chunks/{fetch-1w9kp1gg.js → server-info-ga3m49sz.js} +3 -3
- package/dist/chunks/{fetch-kzj5eept.js → server-info-gat934pw.js} +33 -33
- package/dist/chunks/{fetch-acgs9zzk.js → server-info-gymtz25n.js} +14 -6
- package/dist/chunks/server-info-h6rt5k9s.js +24 -0
- package/dist/chunks/{fetch-54sczv30.js → server-info-hg93khqa.js} +7 -7
- package/dist/chunks/server-info-j5aeaa16.js +15 -0
- package/dist/chunks/{fetch-bvp1r88z.js → server-info-jabz3c4v.js} +3 -3
- package/dist/chunks/{fetch-t70dy8sr.js → server-info-kd6vzpgq.js} +3 -3
- package/dist/chunks/{fetch-rwwc81rq.js → server-info-pf9p09ew.js} +2 -2
- package/dist/chunks/{fetch-wb43dd8f.js → server-info-pmjbkszz.js} +6 -4
- package/dist/chunks/{fetch-c6kb7fmf.js → server-info-s07e4y6n.js} +7 -7
- package/dist/chunks/{fetch-0chp8crd.js → server-info-sstsrjtg.js} +8 -8
- package/dist/chunks/{fetch-4qyjttng.js → server-info-swdgbzpj.js} +3 -3
- package/dist/chunks/{fetch-jxc39wgw.js → server-info-t3j5ftv1.js} +3 -3
- package/dist/chunks/{fetch-053p7hbt.js → server-info-v1czxanb.js} +7 -7
- package/dist/chunks/{fetch-b44t4qeg.js → server-info-wys7phx0.js} +30 -29
- package/dist/chunks/{fetch-rhnwnf76.js → server-info-x0608mvx.js} +2 -2
- package/dist/chunks/{fetch-nxdx74sv.js → server-info-x74w7e1f.js} +3 -3
- package/dist/chunks/{fetch-q9rkrfm7.js → server-info-x9vr2ttf.js} +5 -5
- package/dist/chunks/{fetch-0y03q8mn.js → server-info-xmwystkq.js} +3 -3
- package/dist/chunks/{fetch-5w24ch67.js → server-info-xsrtpxyd.js} +4 -4
- package/dist/chunks/{fetch-m4fq9qce.js → server-info-y9mzegx1.js} +6 -6
- package/dist/chunks/{fetch-m6xk774d.js → server-info-zs542hzz.js} +3 -3
- package/dist/cors.js +1 -1
- package/dist/event-feed.js +5 -5
- package/dist/fetch.d.ts +5 -5
- package/dist/fetch.js +49 -49
- 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 +5 -3
- package/dist/location.js +6 -4
- package/dist/middleware/authorization.d.ts +1 -1
- package/dist/middleware/authorization.js +2 -2
- package/dist/middleware/form-location.d.ts +2 -2
- 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 +9 -8
- package/dist/process.js +52 -52
- 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 +3 -3
- package/dist/workerd.js +50 -50
- package/package.json +14 -12
- package/dist/chunks/fetch-dy0yben3.js +0 -15
- package/dist/chunks/fetch-hezj1jdf.js +0 -7
- /package/dist/chunks/{fetch-9rqn6x4v.js → server-info-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{fetch-q4bn6dy8.js → server-info-q4bn6dy8.js} +0 -0
- /package/dist/chunks/{fetch-smaf4a18.js → server-info-smaf4a18.js} +0 -0
- /package/dist/chunks/{fetch-yc7nft6q.js → server-info-yc7nft6q.js} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LocationMiddleware2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./server-info-gymtz25n.js";
|
|
4
4
|
import {
|
|
5
5
|
FormLocationMiddleware2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./server-info-3154e7fk.js";
|
|
7
7
|
import {
|
|
8
8
|
SessionLocationMiddleware2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./server-info-x74w7e1f.js";
|
|
10
10
|
|
|
11
11
|
// src/api.ts
|
|
12
12
|
import { makeDefaultApi } from "@opencode/protocol/api";
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isAllowedCorsOrigin2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./server-info-q4bn6dy8.js";
|
|
4
4
|
import {
|
|
5
5
|
createRoutes2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./server-info-1fx5fmdj.js";
|
|
7
7
|
import {
|
|
8
8
|
__export
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./server-info-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
|
-
import { HttpEffect, HttpMiddleware, HttpRouter, HttpServer } from "effect/
|
|
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 };
|
|
@@ -2,20 +2,20 @@ import {
|
|
|
2
2
|
locationErrors2,
|
|
3
3
|
response2,
|
|
4
4
|
requestRef2
|
|
5
|
-
} from "./
|
|
5
|
+
} from "./server-info-gymtz25n.js";
|
|
6
6
|
import {
|
|
7
7
|
Api2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./server-info-t3j5ftv1.js";
|
|
9
9
|
import {
|
|
10
10
|
CorsConfig2,
|
|
11
11
|
isAllowedRequestOrigin2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./server-info-q4bn6dy8.js";
|
|
13
13
|
import {
|
|
14
14
|
Service4
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./server-info-75c938bc.js";
|
|
16
16
|
import {
|
|
17
17
|
runPtySocket2
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./server-info-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,
|
|
@@ -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,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./server-info-t3j5ftv1.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,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
locationErrors2,
|
|
3
3
|
sessionInfo2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./server-info-gymtz25n.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,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./server-info-gymtz25n.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./server-info-t3j5ftv1.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/fs.ts
|
|
9
9
|
import { FileSystem } from "@opencode/core/filesystem";
|
|
10
10
|
import { RelativePath } from "@opencode/core/schema";
|
|
11
11
|
import { FileNotFoundError } from "@opencode/protocol/errors";
|
|
12
12
|
import { Effect, Option, Stream } from "effect";
|
|
13
|
-
import { HttpServerResponse } from "effect/
|
|
14
|
-
import { HttpApiBuilder } from "effect/
|
|
13
|
+
import { HttpServerResponse } from "effect/http";
|
|
14
|
+
import { HttpApiBuilder } from "effect/http-api";
|
|
15
15
|
var FileSystemHandler2 = HttpApiBuilder.group(Api2, "server.fs", (handlers) => Effect.gen(function* () {
|
|
16
16
|
return handlers.handleRaw("fs.read", (ctx) => Effect.gen(function* () {
|
|
17
17
|
const path = yield* decodeRequestPath(ctx.request.url);
|
|
@@ -20,7 +20,7 @@ var FileSystemHandler2 = HttpApiBuilder.group(Api2, "server.fs", (handlers) => E
|
|
|
20
20
|
return serveFile(ctx.request, file);
|
|
21
21
|
})).handle("fs.list", (ctx) => response2(Effect.gen(function* () {
|
|
22
22
|
const fs = yield* FileSystem.Service;
|
|
23
|
-
return yield* fs.list(ctx.query);
|
|
23
|
+
return yield* fs.list(ctx.query).pipe(Effect.mapError((error) => new FileNotFoundError({ path: error.path, message: `Directory not found: ${error.path}` })));
|
|
24
24
|
}))).handle("fs.find", (ctx) => response2(Effect.gen(function* () {
|
|
25
25
|
const fs = yield* FileSystem.Service;
|
|
26
26
|
return yield* fs.find(ctx.query);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./server-info-gymtz25n.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./server-info-t3j5ftv1.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/command.ts
|
|
9
9
|
import { Command } from "@opencode/core/command";
|
|
10
|
-
import { HttpApiBuilder } from "effect/
|
|
10
|
+
import { HttpApiBuilder } from "effect/http-api";
|
|
11
11
|
var CommandHandler2 = HttpApiBuilder.group(Api2, "server.command", (handlers) => handlers.handle("command.list", () => response2(Command.Service.use((command) => command.list()))));
|
|
12
12
|
|
|
13
13
|
export { CommandHandler2 };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./server-info-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: () => make2
|
|
10
10
|
});
|
|
11
11
|
import { Effect, Ref } from "effect";
|
|
12
|
-
var
|
|
12
|
+
var make2 = 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 make3 = Effect.fnUntraced(function* (options = {}) {
|
|
|
20
20
|
};
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
-
export {
|
|
23
|
+
export { make2, exports_service_status };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./server-info-t3j5ftv1.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
5
|
+
Service2,
|
|
6
6
|
frame2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./server-info-hg93khqa.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* Service2;
|
|
16
16
|
return handlers.handleRaw("event.subscribe", () => Effect.gen(function* () {
|
|
17
17
|
const connected = {
|
|
18
18
|
id: Event.ID.create(),
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
requestRef2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./server-info-gymtz25n.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./server-info-t3j5ftv1.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/debug.ts
|
|
9
9
|
import { LocationServiceMap } from "@opencode/core/location-service-map";
|
|
10
10
|
import { Effect, Option, RcMap } from "effect";
|
|
11
|
-
import { HttpApiBuilder } from "effect/
|
|
11
|
+
import { HttpApiBuilder } from "effect/http-api";
|
|
12
12
|
var DebugHandler2 = HttpApiBuilder.group(Api2, "server.debug", (handlers) => handlers.handle("debug.location", Effect.fn(function* () {
|
|
13
13
|
const locations = Option.getOrThrow(yield* Effect.serviceOption(LocationServiceMap.Service));
|
|
14
14
|
return Array.from(yield* RcMap.keys(locations.rcMap));
|
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
|
+
Service2,
|
|
6
6
|
frame2,
|
|
7
7
|
make4,
|
|
8
|
-
|
|
8
|
+
layer3,
|
|
9
9
|
exports_event_feed
|
|
10
|
-
} from "./chunks/
|
|
10
|
+
} from "./chunks/server-info-hg93khqa.js";
|
|
11
11
|
export {
|
|
12
12
|
EncodingError2 as EncodingError,
|
|
13
13
|
exports_event_feed as EventFeed,
|
|
14
|
-
|
|
14
|
+
Service2 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.d.ts
CHANGED
|
@@ -55,22 +55,22 @@ export declare const make: (options?: {
|
|
|
55
55
|
readonly content?: string | undefined;
|
|
56
56
|
readonly file?: string | undefined;
|
|
57
57
|
} | undefined;
|
|
58
|
+
readonly port?: number | undefined;
|
|
59
|
+
readonly fs?: {
|
|
60
|
+
readonly fff?: boolean | undefined;
|
|
61
|
+
readonly filewatcher?: boolean | undefined;
|
|
62
|
+
} | undefined;
|
|
58
63
|
readonly hostname?: string | undefined;
|
|
59
64
|
readonly cors?: readonly string[] | undefined;
|
|
60
65
|
readonly windows?: {
|
|
61
66
|
readonly gitbash?: string | undefined;
|
|
62
67
|
} | undefined;
|
|
63
68
|
readonly password?: string | undefined;
|
|
64
|
-
readonly port?: number | undefined;
|
|
65
69
|
readonly app?: {
|
|
66
70
|
readonly version?: string | undefined;
|
|
67
71
|
readonly name?: string | undefined;
|
|
68
72
|
readonly channel?: string | undefined;
|
|
69
73
|
} | undefined;
|
|
70
|
-
readonly fs?: {
|
|
71
|
-
readonly fff?: boolean | undefined;
|
|
72
|
-
readonly filewatcher?: boolean | undefined;
|
|
73
|
-
} | undefined;
|
|
74
74
|
readonly simulation?: boolean | undefined;
|
|
75
75
|
readonly database?: {
|
|
76
76
|
readonly path?: string | undefined;
|
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/server-info-v1czxanb.js";
|
|
5
|
+
import"./chunks/server-info-1fx5fmdj.js";
|
|
6
|
+
import"./chunks/server-info-erzfdgke.js";
|
|
7
|
+
import"./chunks/server-info-5ytyqf1q.js";
|
|
8
|
+
import"./chunks/server-info-gat934pw.js";
|
|
9
|
+
import"./chunks/server-info-cfhthk6z.js";
|
|
10
|
+
import"./chunks/server-info-x0608mvx.js";
|
|
11
|
+
import"./chunks/server-info-zs542hzz.js";
|
|
12
|
+
import"./chunks/server-info-ga3m49sz.js";
|
|
13
|
+
import"./chunks/server-info-y9mzegx1.js";
|
|
14
|
+
import"./chunks/server-info-4b0899hb.js";
|
|
15
|
+
import"./chunks/server-info-a6kxe6a7.js";
|
|
16
|
+
import"./chunks/server-info-31acg4hb.js";
|
|
17
|
+
import"./chunks/server-info-x9vr2ttf.js";
|
|
18
|
+
import"./chunks/server-info-jabz3c4v.js";
|
|
19
|
+
import"./chunks/server-info-e7pctymn.js";
|
|
20
|
+
import"./chunks/server-info-91mt6ewz.js";
|
|
21
|
+
import"./chunks/server-info-72ygafj3.js";
|
|
22
|
+
import"./chunks/server-info-wys7phx0.js";
|
|
23
|
+
import"./chunks/server-info-h6rt5k9s.js";
|
|
24
|
+
import"./chunks/server-info-f6n7ws9b.js";
|
|
25
|
+
import"./chunks/server-info-2yr2dq97.js";
|
|
26
|
+
import"./chunks/server-info-agw55v2c.js";
|
|
27
|
+
import"./chunks/server-info-fzcjf2mc.js";
|
|
28
|
+
import"./chunks/server-info-pmjbkszz.js";
|
|
29
|
+
import"./chunks/server-info-f4b2q3tn.js";
|
|
30
|
+
import"./chunks/server-info-swdgbzpj.js";
|
|
31
|
+
import"./chunks/server-info-cx1d1bht.js";
|
|
32
|
+
import"./chunks/server-info-pf9p09ew.js";
|
|
33
|
+
import"./chunks/server-info-2nsepnqy.js";
|
|
34
|
+
import"./chunks/server-info-5w10ccet.js";
|
|
35
|
+
import"./chunks/server-info-kd6vzpgq.js";
|
|
36
|
+
import"./chunks/server-info-e4x9285j.js";
|
|
37
|
+
import"./chunks/server-info-49c878v9.js";
|
|
38
|
+
import"./chunks/server-info-j5aeaa16.js";
|
|
39
|
+
import"./chunks/server-info-xmwystkq.js";
|
|
40
|
+
import"./chunks/server-info-anm12x33.js";
|
|
41
|
+
import"./chunks/server-info-q4bn6dy8.js";
|
|
42
|
+
import"./chunks/server-info-t3j5ftv1.js";
|
|
43
|
+
import"./chunks/server-info-3154e7fk.js";
|
|
44
|
+
import"./chunks/server-info-x74w7e1f.js";
|
|
45
|
+
import"./chunks/server-info-gymtz25n.js";
|
|
46
|
+
import"./chunks/server-info-smaf4a18.js";
|
|
47
|
+
import"./chunks/server-info-hg93khqa.js";
|
|
48
|
+
import"./chunks/server-info-s07e4y6n.js";
|
|
49
|
+
import"./chunks/server-info-75c938bc.js";
|
|
50
|
+
import"./chunks/server-info-sstsrjtg.js";
|
|
51
51
|
export {
|
|
52
52
|
exports_fetch as ServerFetch,
|
|
53
|
-
|
|
53
|
+
make3 as make
|
|
54
54
|
};
|
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/server-info-ga3m49sz.js";
|
|
4
|
+
import"../chunks/server-info-t3j5ftv1.js";
|
|
5
|
+
import"../chunks/server-info-3154e7fk.js";
|
|
6
|
+
import"../chunks/server-info-x74w7e1f.js";
|
|
7
|
+
import"../chunks/server-info-gymtz25n.js";
|
|
8
|
+
import"../chunks/server-info-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/server-info-xmwystkq.js";
|
|
4
|
+
import"../chunks/server-info-t3j5ftv1.js";
|
|
5
|
+
import"../chunks/server-info-3154e7fk.js";
|
|
6
|
+
import"../chunks/server-info-x74w7e1f.js";
|
|
7
|
+
import"../chunks/server-info-gymtz25n.js";
|
|
8
|
+
import"../chunks/server-info-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/server-info-e7pctymn.js";
|
|
4
|
+
import"../chunks/server-info-t3j5ftv1.js";
|
|
5
|
+
import"../chunks/server-info-3154e7fk.js";
|
|
6
|
+
import"../chunks/server-info-x74w7e1f.js";
|
|
7
|
+
import"../chunks/server-info-gymtz25n.js";
|
|
8
|
+
import"../chunks/server-info-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/server-info-f4b2q3tn.js";
|
|
4
|
+
import"../chunks/server-info-t3j5ftv1.js";
|
|
5
|
+
import"../chunks/server-info-3154e7fk.js";
|
|
6
|
+
import"../chunks/server-info-x74w7e1f.js";
|
|
7
|
+
import"../chunks/server-info-gymtz25n.js";
|
|
8
|
+
import"../chunks/server-info-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/server-info-zs542hzz.js";
|
|
4
|
+
import"../chunks/server-info-t3j5ftv1.js";
|
|
5
|
+
import"../chunks/server-info-3154e7fk.js";
|
|
6
|
+
import"../chunks/server-info-x74w7e1f.js";
|
|
7
|
+
import"../chunks/server-info-gymtz25n.js";
|
|
8
|
+
import"../chunks/server-info-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/server-info-y9mzegx1.js";
|
|
4
|
+
import"../chunks/server-info-t3j5ftv1.js";
|
|
5
|
+
import"../chunks/server-info-3154e7fk.js";
|
|
6
|
+
import"../chunks/server-info-x74w7e1f.js";
|
|
7
|
+
import"../chunks/server-info-gymtz25n.js";
|
|
8
|
+
import"../chunks/server-info-smaf4a18.js";
|
|
9
|
+
import"../chunks/server-info-hg93khqa.js";
|
|
10
10
|
export {
|
|
11
11
|
EventHandler2 as EventHandler
|
|
12
12
|
};
|