@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
package/dist/api.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LocationMiddleware } from "./location";
|
|
2
2
|
import { FormLocationMiddleware } from "./middleware/form-location";
|
|
3
3
|
import { SessionLocationMiddleware } from "./middleware/session-location";
|
|
4
|
-
export declare const Api: import("@opencode/protocol/api").Api<LocationMiddleware, import("effect/
|
|
4
|
+
export declare const Api: import("@opencode/protocol/api").Api<LocationMiddleware, import("effect/http-api/HttpApiMiddleware").HttpApiMiddleware<import("@opencode/core/instance").Services, readonly [typeof import("@opencode/protocol/errors").LocationNotFoundError], never>, FormLocationMiddleware, import("effect/http-api/HttpApiMiddleware").HttpApiMiddleware<import("@opencode/core/instance").Services, readonly [typeof import("@opencode/protocol/errors").InvalidRequestError, typeof import("@opencode/protocol/errors").SessionNotFoundError, typeof import("@opencode/protocol/errors").LocationNotFoundError], never>, SessionLocationMiddleware, import("effect/http-api/HttpApiMiddleware").HttpApiMiddleware<import("@opencode/core/instance").Services, readonly [typeof import("@opencode/protocol/errors").InvalidRequestError, typeof import("@opencode/protocol/errors").SessionNotFoundError, typeof import("@opencode/protocol/errors").LocationNotFoundError], never>, import("effect/http-api/HttpApiGroup").HttpApiGroup<"server.event", import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"event.subscribe", "GET", "/api/event", never, never, never, never, import("effect/http-api/HttpApiSchema").StreamSse<import("effect/http-api/HttpApiSchema").SseEventFromData<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
5
5
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
|
|
6
6
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
7
7
|
};
|
|
@@ -6373,6 +6373,11 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
|
|
|
6373
6373
|
readonly type: "string";
|
|
6374
6374
|
readonly key: string;
|
|
6375
6375
|
readonly required?: boolean | undefined;
|
|
6376
|
+
readonly options?: readonly {
|
|
6377
|
+
readonly value: string;
|
|
6378
|
+
readonly label: string;
|
|
6379
|
+
readonly description?: string | undefined;
|
|
6380
|
+
}[] | undefined;
|
|
6376
6381
|
readonly description?: string | undefined;
|
|
6377
6382
|
readonly format?: "email" | "uri" | "date" | "date-time" | undefined;
|
|
6378
6383
|
readonly minLength?: number | undefined;
|
|
@@ -6380,11 +6385,6 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
|
|
|
6380
6385
|
readonly pattern?: string | undefined;
|
|
6381
6386
|
readonly placeholder?: string | undefined;
|
|
6382
6387
|
readonly default?: string | undefined;
|
|
6383
|
-
readonly options?: readonly {
|
|
6384
|
-
readonly value: string;
|
|
6385
|
-
readonly label: string;
|
|
6386
|
-
readonly description?: string | undefined;
|
|
6387
|
-
}[] | undefined;
|
|
6388
6388
|
readonly custom?: boolean | undefined;
|
|
6389
6389
|
readonly title?: string | undefined;
|
|
6390
6390
|
readonly hidden?: boolean | undefined;
|
|
@@ -6438,12 +6438,12 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
|
|
|
6438
6438
|
}[] | undefined;
|
|
6439
6439
|
} | {
|
|
6440
6440
|
readonly type: "multiselect";
|
|
6441
|
-
readonly key: string;
|
|
6442
6441
|
readonly options: readonly {
|
|
6443
6442
|
readonly value: string;
|
|
6444
6443
|
readonly label: string;
|
|
6445
6444
|
readonly description?: string | undefined;
|
|
6446
6445
|
}[];
|
|
6446
|
+
readonly key: string;
|
|
6447
6447
|
readonly required?: boolean | undefined;
|
|
6448
6448
|
readonly description?: string | undefined;
|
|
6449
6449
|
readonly default?: readonly string[] | undefined;
|
|
@@ -6467,6 +6467,11 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
|
|
|
6467
6467
|
readonly type: "string";
|
|
6468
6468
|
readonly key: string;
|
|
6469
6469
|
readonly required?: boolean | undefined;
|
|
6470
|
+
readonly options?: readonly {
|
|
6471
|
+
readonly value: string;
|
|
6472
|
+
readonly label: string;
|
|
6473
|
+
readonly description?: string | undefined;
|
|
6474
|
+
}[] | undefined;
|
|
6470
6475
|
readonly description?: string | undefined;
|
|
6471
6476
|
readonly format?: "email" | "uri" | "date" | "date-time" | undefined;
|
|
6472
6477
|
readonly minLength?: number | undefined;
|
|
@@ -6474,11 +6479,6 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
|
|
|
6474
6479
|
readonly pattern?: string | undefined;
|
|
6475
6480
|
readonly placeholder?: string | undefined;
|
|
6476
6481
|
readonly default?: string | undefined;
|
|
6477
|
-
readonly options?: readonly {
|
|
6478
|
-
readonly value: string;
|
|
6479
|
-
readonly label: string;
|
|
6480
|
-
readonly description?: string | undefined;
|
|
6481
|
-
}[] | undefined;
|
|
6482
6482
|
readonly custom?: boolean | undefined;
|
|
6483
6483
|
readonly title?: string | undefined;
|
|
6484
6484
|
readonly hidden?: boolean | undefined;
|
|
@@ -6532,12 +6532,12 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
|
|
|
6532
6532
|
}[] | undefined;
|
|
6533
6533
|
} | {
|
|
6534
6534
|
readonly type: "multiselect";
|
|
6535
|
-
readonly key: string;
|
|
6536
6535
|
readonly options: readonly {
|
|
6537
6536
|
readonly value: string;
|
|
6538
6537
|
readonly label: string;
|
|
6539
6538
|
readonly description?: string | undefined;
|
|
6540
6539
|
}[];
|
|
6540
|
+
readonly key: string;
|
|
6541
6541
|
readonly required?: boolean | undefined;
|
|
6542
6542
|
readonly description?: string | undefined;
|
|
6543
6543
|
readonly default?: readonly string[] | undefined;
|
package/dist/api.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./chunks/
|
|
4
|
-
import"./chunks/
|
|
5
|
-
import"./chunks/
|
|
6
|
-
import"./chunks/
|
|
7
|
-
import"./chunks/
|
|
3
|
+
} from "./chunks/fetch-h2a6nn7k.js";
|
|
4
|
+
import"./chunks/fetch-ty73jqxf.js";
|
|
5
|
+
import"./chunks/fetch-vw0q3knq.js";
|
|
6
|
+
import"./chunks/fetch-ywn523ee.js";
|
|
7
|
+
import"./chunks/fetch-smaf4a18.js";
|
|
8
8
|
export {
|
|
9
9
|
Api2 as Api
|
|
10
10
|
};
|
package/dist/auth.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
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/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);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-h2a6nn7k.js";
|
|
4
4
|
|
|
5
5
|
// src/handlers/config.ts
|
|
6
6
|
import { Config } from "@opencode/core/config";
|
|
7
7
|
import { ShellSelect } from "@opencode/core/shell/select";
|
|
8
8
|
import { Effect } from "effect";
|
|
9
|
-
import { HttpApiBuilder } from "effect/
|
|
9
|
+
import { HttpApiBuilder } from "effect/http-api";
|
|
10
10
|
var ConfigHandler2 = HttpApiBuilder.group(Api2, "server.config", (handlers) => handlers.handle("config.get", () => Config.Service.use((config) => config.entries())).handle("config.update", Effect.fn(function* (ctx) {
|
|
11
11
|
const config = yield* Config.Service;
|
|
12
12
|
if (!config.update)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-h2a6nn7k.js";
|
|
4
4
|
|
|
5
5
|
// src/handlers/location.ts
|
|
6
6
|
import { Location } from "@opencode/core/location";
|
|
7
7
|
import { LocationServiceMap } from "@opencode/core/location-service-map";
|
|
8
8
|
import { ServiceUnavailableError } from "@opencode/protocol/errors";
|
|
9
9
|
import { Cause, Effect } from "effect";
|
|
10
|
-
import { HttpApiBuilder } from "effect/
|
|
10
|
+
import { HttpApiBuilder } from "effect/http-api";
|
|
11
11
|
var LocationHandler2 = HttpApiBuilder.group(Api2, "server.location", (handlers) => Effect.gen(function* () {
|
|
12
12
|
const locations = yield* LocationServiceMap.Service;
|
|
13
13
|
return handlers.handle("location.get", Effect.fn(function* () {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-h2a6nn7k.js";
|
|
4
4
|
|
|
5
5
|
// src/handlers/rpc.ts
|
|
6
6
|
import { Rpc } from "@opencode/core/rpc";
|
|
7
7
|
import { Plugin } from "@opencode/core/plugin";
|
|
8
8
|
import { RpcError, RpcInternalError } from "@opencode/protocol/errors";
|
|
9
9
|
import { Effect } from "effect";
|
|
10
|
-
import { HttpApiBuilder } from "effect/
|
|
10
|
+
import { HttpApiBuilder } from "effect/http-api";
|
|
11
11
|
var RpcHandler2 = HttpApiBuilder.group(Api2, "server.rpc", (handlers) => handlers.handle("rpc.call", ({ params, payload }) => Effect.gen(function* () {
|
|
12
12
|
yield* Plugin.awaitActivation;
|
|
13
13
|
const rpc = yield* Rpc.Service;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-h2a6nn7k.js";
|
|
4
4
|
import {
|
|
5
5
|
SESSION_TTL_SECONDS2,
|
|
6
6
|
Config2,
|
|
7
7
|
issueSession2,
|
|
8
8
|
sessionCookieName2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./fetch-anm12x33.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
} from "./
|
|
11
|
+
Service4
|
|
12
|
+
} from "./fetch-b8ygg5k2.js";
|
|
13
13
|
import {
|
|
14
|
-
|
|
15
|
-
} from "./
|
|
14
|
+
Service2
|
|
15
|
+
} from "./fetch-rbn15j6z.js";
|
|
16
16
|
|
|
17
17
|
// src/handlers/server.ts
|
|
18
18
|
import { Duration, Effect } from "effect";
|
|
19
|
-
import { HttpServerRequest, HttpServerResponse } from "effect/
|
|
20
|
-
import { HttpApiBuilder } from "effect/
|
|
19
|
+
import { HttpServerRequest, HttpServerResponse } from "effect/http";
|
|
20
|
+
import { HttpApiBuilder } from "effect/http-api";
|
|
21
21
|
import { PersistentPty } from "@opencode/core/persistent-pty";
|
|
22
22
|
import { UnauthorizedError } from "@opencode/protocol/errors";
|
|
23
23
|
var ServerHandler2 = HttpApiBuilder.group(Api2, "server.server", (handlers) => Effect.gen(function* () {
|
|
24
|
-
const pairing = yield*
|
|
24
|
+
const pairing = yield* Service2;
|
|
25
25
|
const auth = yield* Config2;
|
|
26
26
|
return handlers.handle("server.info", () => Effect.gen(function* () {
|
|
27
|
-
const info = yield*
|
|
27
|
+
const info = yield* Service4;
|
|
28
28
|
return {
|
|
29
29
|
version: info.app.version ?? "unknown",
|
|
30
30
|
pid: process.pid ?? 0,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
missingSession2,
|
|
3
3
|
failedMessageDecode2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./fetch-smaf4a18.js";
|
|
5
5
|
import {
|
|
6
6
|
Api2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./fetch-h2a6nn7k.js";
|
|
8
8
|
|
|
9
9
|
// src/handlers/message.ts
|
|
10
10
|
import { SessionMessage } from "@opencode/core/session/message";
|
|
11
11
|
import { Session } from "@opencode/core/session";
|
|
12
12
|
import { Effect, Schema } from "effect";
|
|
13
|
-
import { HttpApiBuilder } from "effect/
|
|
13
|
+
import { HttpApiBuilder } from "effect/http-api";
|
|
14
14
|
import { InvalidCursorError } from "@opencode/protocol/errors";
|
|
15
15
|
var DefaultMessagesLimit = 50;
|
|
16
16
|
var Cursor = Schema.Struct({
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-h2a6nn7k.js";
|
|
4
4
|
|
|
5
5
|
// src/handlers/credential.ts
|
|
6
6
|
import { Credential } from "@opencode/core/credential";
|
|
7
7
|
import { ConflictError } from "@opencode/protocol/errors";
|
|
8
8
|
import { Effect } from "effect";
|
|
9
|
-
import { HttpApiBuilder, HttpApiSchema } from "effect/
|
|
9
|
+
import { HttpApiBuilder, HttpApiSchema } from "effect/http-api";
|
|
10
10
|
var CredentialHandler2 = HttpApiBuilder.group(Api2, "server.credential", (handlers) => handlers.handle("credential.list", Effect.fn(function* () {
|
|
11
11
|
const credential = yield* Credential.Service;
|
|
12
12
|
return { data: entries(yield* credential.all()) };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-h2a6nn7k.js";
|
|
4
4
|
|
|
5
5
|
// src/handlers/project.ts
|
|
6
6
|
import { Project } from "@opencode/core/project";
|
|
7
7
|
import { Effect } from "effect";
|
|
8
|
-
import { HttpApiBuilder } from "effect/
|
|
8
|
+
import { HttpApiBuilder } from "effect/http-api";
|
|
9
9
|
import { ProjectNotFoundError } from "@opencode/protocol/errors";
|
|
10
10
|
var ProjectHandler2 = HttpApiBuilder.group(Api2, "server.project", (handlers) => handlers.handle("project.list", () => Project.Service.use((project) => project.list())).handle("project.update", (ctx) => Project.Service.use((project) => project.update({ ...ctx.payload, projectID: ctx.params.projectID }).pipe(Effect.mapError(() => new ProjectNotFoundError({
|
|
11
11
|
projectID: ctx.params.projectID,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
missingSession2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-smaf4a18.js";
|
|
4
4
|
import {
|
|
5
5
|
locationErrors2,
|
|
6
6
|
response2,
|
|
7
7
|
sessionInfo2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./fetch-ywn523ee.js";
|
|
9
9
|
import {
|
|
10
10
|
Api2
|
|
11
|
-
} from "./
|
|
11
|
+
} from "./fetch-h2a6nn7k.js";
|
|
12
12
|
|
|
13
13
|
// src/handlers/permission.ts
|
|
14
14
|
import { Instance } from "@opencode/core/instance/service";
|
|
@@ -17,7 +17,7 @@ import { Permission } from "@opencode/core/permission";
|
|
|
17
17
|
import { PermissionSaved } from "@opencode/core/permission/saved";
|
|
18
18
|
import { Session } from "@opencode/core/session";
|
|
19
19
|
import { Effect } from "effect";
|
|
20
|
-
import { HttpApiBuilder, HttpApiSchema } from "effect/
|
|
20
|
+
import { HttpApiBuilder, HttpApiSchema } from "effect/http-api";
|
|
21
21
|
import { PermissionNotFoundError } from "@opencode/protocol/errors";
|
|
22
22
|
function missingRequest(id) {
|
|
23
23
|
return new PermissionNotFoundError({ requestID: id, message: `Permission request not found: ${id}` });
|
|
@@ -1,14 +1,14 @@
|
|
|
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/form.ts
|
|
9
9
|
import { Form } from "@opencode/core/form";
|
|
10
10
|
import { Effect } from "effect";
|
|
11
|
-
import { HttpApiBuilder } from "effect/
|
|
11
|
+
import { HttpApiBuilder } from "effect/http-api";
|
|
12
12
|
var FormHandler2 = HttpApiBuilder.group(Api2, "server.form", (handlers) => handlers.handle("form.list", Effect.fn(function* () {
|
|
13
13
|
const form = yield* Form.Service;
|
|
14
14
|
return yield* response2(form.list());
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-9rqn6x4v.js";
|
|
4
4
|
|
|
5
5
|
// src/event-feed.ts
|
|
6
6
|
var exports_event_feed = {};
|
|
7
7
|
__export(exports_event_feed, {
|
|
8
8
|
EncodingError: () => EncodingError2,
|
|
9
9
|
EventFeed: () => exports_event_feed,
|
|
10
|
-
Service: () =>
|
|
10
|
+
Service: () => Service5,
|
|
11
11
|
SubscriberCapacity: () => SubscriberCapacity2,
|
|
12
12
|
SubscriberOverflowError: () => SubscriberOverflowError2,
|
|
13
13
|
frame: () => frame2,
|
|
14
|
-
layer: () =>
|
|
14
|
+
layer: () => layer5,
|
|
15
15
|
make: () => make4
|
|
16
16
|
});
|
|
17
17
|
import { Bus } from "@opencode/core/bus";
|
|
@@ -30,7 +30,7 @@ class EncodingError2 extends Schema.TaggedError()("EventFeed.EncodingError", {
|
|
|
30
30
|
}) {
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
class
|
|
33
|
+
class Service5 extends Context.Service()("@opencode/server/EventFeed") {
|
|
34
34
|
}
|
|
35
35
|
function frame2(event) {
|
|
36
36
|
return `data: ${JSON.stringify(event)}
|
|
@@ -71,13 +71,13 @@ var make4 = Effect.fn("EventFeed.make")(function* (observe, options) {
|
|
|
71
71
|
});
|
|
72
72
|
const unsubscribe = yield* observe(publish);
|
|
73
73
|
yield* Effect.addFinalizer(() => unsubscribe);
|
|
74
|
-
return
|
|
74
|
+
return Service5.of({
|
|
75
75
|
subscribe: Effect.acquireRelease(Queue.dropping(capacity).pipe(Effect.tap((queue) => Effect.sync(() => subscribers.add(queue)))), (queue) => Effect.sync(() => subscribers.delete(queue)).pipe(Effect.andThen(Queue.shutdown(queue)), Effect.asVoid)).pipe(Effect.map(Stream.fromQueue))
|
|
76
76
|
});
|
|
77
77
|
});
|
|
78
|
-
var
|
|
78
|
+
var layer5 = Layer.effect(Service5, Effect.gen(function* () {
|
|
79
79
|
const bus = yield* Bus.Service;
|
|
80
80
|
return yield* make4(bus.listen);
|
|
81
81
|
}));
|
|
82
82
|
|
|
83
|
-
export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2,
|
|
83
|
+
export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2, Service5, frame2, make4, layer5, exports_event_feed };
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
authorized2,
|
|
5
5
|
verifySession2,
|
|
6
6
|
sessionCookieName2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./fetch-anm12x33.js";
|
|
8
8
|
|
|
9
9
|
// src/middleware/authorization.ts
|
|
10
10
|
import { UnauthorizedError } from "@opencode/protocol/errors";
|
|
@@ -13,15 +13,16 @@ import { Authorization as Authorization2 } from "@opencode/protocol/middleware/a
|
|
|
13
13
|
import { hasPtyConnectTicketURL } from "@opencode/protocol/groups/pty";
|
|
14
14
|
import { hasPersistentPtyConnectTicketURL } from "@opencode/protocol/groups/persistent-pty";
|
|
15
15
|
import { isPairingConnectURL } from "@opencode/protocol/groups/server";
|
|
16
|
-
import { Effect,
|
|
17
|
-
import {
|
|
16
|
+
import { Effect, Layer, Redacted } from "effect";
|
|
17
|
+
import { Base64 } from "effect/encoding";
|
|
18
|
+
import { HttpEffect, HttpServerRequest, HttpServerResponse } from "effect/http";
|
|
18
19
|
var AUTH_TOKEN_QUERY = "auth_token";
|
|
19
20
|
var WWW_AUTHENTICATE = 'Basic realm="Secure Area"';
|
|
20
21
|
function emptyCredential() {
|
|
21
22
|
return { username: "", password: Redacted.make("") };
|
|
22
23
|
}
|
|
23
24
|
function decodeCredential(input) {
|
|
24
|
-
return Effect.fromResult(
|
|
25
|
+
return Effect.fromResult(Base64.decodeString(input)).pipe(Effect.match({
|
|
25
26
|
onFailure: emptyCredential,
|
|
26
27
|
onSuccess: (header) => {
|
|
27
28
|
const separator = header.indexOf(":");
|
|
@@ -1,16 +1,16 @@
|
|
|
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/plugin.ts
|
|
9
9
|
import { Plugin } from "@opencode/core/plugin";
|
|
10
10
|
import { PluginUpdate } from "@opencode/core/plugin/update";
|
|
11
11
|
import { InvalidRequestError, ServiceUnavailableError } from "@opencode/protocol/errors";
|
|
12
12
|
import { Cause, Effect, Exit } from "effect";
|
|
13
|
-
import { HttpApiBuilder } from "effect/
|
|
13
|
+
import { HttpApiBuilder } from "effect/http-api";
|
|
14
14
|
var PluginHandler2 = HttpApiBuilder.group(Api2, "server.plugin", (handlers) => handlers.handle("plugin.list", () => Effect.gen(function* () {
|
|
15
15
|
return yield* response2(Plugin.Service.use((plugin) => plugin.list()));
|
|
16
16
|
})).handle("plugin.check", (ctx) => Effect.gen(function* () {
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
missingMessage2,
|
|
4
4
|
failedMessageDecode2,
|
|
5
5
|
failedSnapshot2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./fetch-smaf4a18.js";
|
|
7
7
|
import {
|
|
8
8
|
locationErrors2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./fetch-ywn523ee.js";
|
|
10
10
|
import {
|
|
11
11
|
Api2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./fetch-h2a6nn7k.js";
|
|
13
13
|
|
|
14
14
|
// src/handlers/session.ts
|
|
15
15
|
import { Session } from "@opencode/core/session";
|
|
@@ -19,7 +19,7 @@ import { SessionTransfer } from "@opencode/core/session/transfer";
|
|
|
19
19
|
import { InstructionEntry } from "@opencode/core/session/instruction-entry";
|
|
20
20
|
import { Form } from "@opencode/core/form";
|
|
21
21
|
import { DateTime, Effect, Stream } from "effect";
|
|
22
|
-
import { HttpApiBuilder, HttpApiSchema } from "effect/
|
|
22
|
+
import { HttpApiBuilder, HttpApiSchema } from "effect/http-api";
|
|
23
23
|
import { SessionsCursor } from "@opencode/protocol/groups/session";
|
|
24
24
|
import {
|
|
25
25
|
ConflictError,
|
|
@@ -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/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
|
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/integration.ts
|
|
9
9
|
import { Integration } from "@opencode/core/integration";
|
|
10
10
|
import { Plugin } from "@opencode/core/plugin";
|
|
11
11
|
import { Effect } from "effect";
|
|
12
|
-
import { HttpApiBuilder, HttpApiSchema } from "effect/
|
|
12
|
+
import { HttpApiBuilder, HttpApiSchema } from "effect/http-api";
|
|
13
13
|
import {
|
|
14
14
|
IntegrationAttemptNotFoundError,
|
|
15
15
|
IntegrationMethodNotFoundError,
|
|
@@ -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/websearch.ts
|
|
9
9
|
import { WebSearch } from "@opencode/core/websearch";
|
|
10
10
|
import { InvalidRequestError, ServiceUnavailableError } from "@opencode/protocol/errors";
|
|
11
11
|
import { Effect } from "effect";
|
|
12
|
-
import { HttpApiBuilder } from "effect/
|
|
12
|
+
import { HttpApiBuilder } from "effect/http-api";
|
|
13
13
|
var WebSearchHandler2 = HttpApiBuilder.group(Api2, "server.websearch", (handlers) => Effect.gen(function* () {
|
|
14
14
|
return handlers.handle("websearch.providers", Effect.fn("server.websearch.providers")(function* () {
|
|
15
15
|
const websearch = yield* WebSearch.Service;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-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: () => Service4,
|
|
10
10
|
connectionURLs: () => connectionURLs2,
|
|
11
|
-
layer: () =>
|
|
11
|
+
layer: () => layer3
|
|
12
12
|
});
|
|
13
13
|
import { Context, Layer } from "effect";
|
|
14
14
|
import { networkInterfaces } from "node:os";
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class Service4 extends Context.Service()("@opencode/server/ServerInfo") {
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return Layer.succeed(
|
|
18
|
+
function layer3(urls, tmp, app = {}) {
|
|
19
|
+
return Layer.succeed(Service4, Service4.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 { Service4, layer3, connectionURLs2, exports_server_info };
|
|
@@ -1,14 +1,14 @@
|
|
|
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/model.ts
|
|
9
9
|
import { Model } from "@opencode/core/model";
|
|
10
10
|
import { Effect } from "effect";
|
|
11
|
-
import { HttpApiBuilder } from "effect/
|
|
11
|
+
import { HttpApiBuilder } from "effect/http-api";
|
|
12
12
|
var ModelHandler2 = HttpApiBuilder.group(Api2, "server.model", (handlers) => Effect.gen(function* () {
|
|
13
13
|
return handlers.handle("model.list", Effect.fn(function* () {
|
|
14
14
|
const models = yield* Model.Service;
|