@opencode/server 2.4.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.js +5 -5
- package/dist/auth.js +1 -1
- package/dist/chunks/{content-headers-r40v995e.js → workerd-20wvj9q6.js} +2 -2
- package/dist/chunks/{content-headers-39nnfjx1.js → workerd-39nnfjx1.js} +1 -1
- package/dist/chunks/{content-headers-0r476wkb.js → workerd-3rn5pzng.js} +5 -5
- package/dist/chunks/{content-headers-jmmhprac.js → workerd-4apj6a8e.js} +2 -2
- package/dist/chunks/{content-headers-ykk3p1r3.js → workerd-4gbck4qg.js} +2 -2
- package/dist/chunks/{content-headers-hk9crnsa.js → workerd-4r2ye500.js} +2 -2
- package/dist/chunks/{content-headers-fjcqsaaz.js → workerd-5dgtfnrn.js} +16 -16
- package/dist/chunks/{content-headers-p83m65n5.js → workerd-6t6fd9bq.js} +2 -2
- package/dist/chunks/{content-headers-1r438we2.js → workerd-73tyf2qy.js} +8 -8
- package/dist/chunks/{content-headers-7jm4dc4a.js → workerd-77gnb026.js} +4 -4
- package/dist/chunks/{content-headers-z3e7v67k.js → workerd-7dtbad8d.js} +7 -7
- package/dist/chunks/{content-headers-8ja97vv6.js → workerd-7x6cg3xs.js} +2 -2
- package/dist/chunks/{content-headers-7ydfwv45.js → workerd-7ydfwv45.js} +1 -1
- package/dist/chunks/{content-headers-9t07vtvz.js → workerd-86dz2n4m.js} +2 -2
- package/dist/chunks/{content-headers-b03d5rht.js → workerd-8mfdzabk.js} +2 -2
- package/dist/chunks/{content-headers-gq4jwh93.js → workerd-8n1ypg70.js} +3 -3
- package/dist/chunks/{content-headers-8sb6qqpn.js → workerd-8sb6qqpn.js} +1 -1
- package/dist/chunks/{content-headers-801prsqk.js → workerd-b1x3j2e8.js} +2 -2
- package/dist/chunks/{content-headers-y60jfeab.js → workerd-b7yt2ykh.js} +2 -2
- package/dist/chunks/{content-headers-5jm9kajg.js → workerd-b87bs0cf.js} +2 -2
- package/dist/chunks/{content-headers-hf3kgjhr.js → workerd-bvm82fhd.js} +4 -4
- package/dist/chunks/{content-headers-100nc7c0.js → workerd-d0advawr.js} +2 -2
- package/dist/chunks/{content-headers-djr0jy89.js → workerd-djr0jy89.js} +1 -1
- package/dist/chunks/{content-headers-ky9xhfwk.js → workerd-dqfyxmp4.js} +4 -4
- package/dist/chunks/{content-headers-4zkx9wb3.js → workerd-edwk6ehd.js} +1 -1
- package/dist/chunks/{content-headers-qfyg9gb7.js → workerd-fvpjvjpp.js} +7 -7
- package/dist/chunks/{content-headers-g23ffrnz.js → workerd-g23ffrnz.js} +2 -2
- package/dist/chunks/{content-headers-w3xmknp7.js → workerd-g80pvn6e.js} +2 -2
- package/dist/chunks/{content-headers-d20xfnpc.js → workerd-g97h7k0s.js} +1 -1
- package/dist/chunks/workerd-hgrkvk6s.js +48 -0
- package/dist/chunks/{content-headers-j4at0y5c.js → workerd-j4at0y5c.js} +1 -1
- package/dist/chunks/{content-headers-ywn523ee.js → workerd-j80tzjj3.js} +3 -3
- package/dist/chunks/{content-headers-mvp6540g.js → workerd-jpqse2v9.js} +35 -35
- package/dist/chunks/{content-headers-4fc68szf.js → workerd-k26h7zjg.js} +2 -2
- package/dist/chunks/{content-headers-hnbeyfax.js → workerd-kffke7z4.js} +9 -9
- package/dist/chunks/{content-headers-hmwn16zp.js → workerd-myqk22k5.js} +2 -2
- package/dist/chunks/{content-headers-ah2sj2pr.js → workerd-n6ypjnhz.js} +1 -1
- package/dist/chunks/{content-headers-jhbndf2d.js → workerd-nkfbbfe7.js} +4 -4
- package/dist/chunks/{content-headers-rmfb1myj.js → workerd-p4zkxzv7.js} +1 -1
- package/dist/chunks/{content-headers-yty6dk04.js → workerd-p9wp66hf.js} +1 -1
- package/dist/chunks/{content-headers-2dzr03as.js → workerd-pv4dnzzq.js} +1 -1
- package/dist/chunks/{content-headers-vw0q3knq.js → workerd-qahj7606.js} +1 -1
- package/dist/chunks/{content-headers-rktygpea.js → workerd-rktygpea.js} +1 -1
- package/dist/chunks/{content-headers-zjmacp9c.js → workerd-s8t5gq7c.js} +3 -3
- package/dist/chunks/{content-headers-t32e1bbt.js → workerd-t32e1bbt.js} +1 -1
- package/dist/chunks/{content-headers-7qpea5x7.js → workerd-t62b1gmw.js} +2 -2
- package/dist/chunks/{content-headers-wka57cdm.js → workerd-t8azv5ge.js} +2 -2
- package/dist/chunks/{content-headers-s3zgwc17.js → workerd-v0z8pce5.js} +2 -2
- package/dist/chunks/{content-headers-ddrpmftb.js → workerd-vxy32kc1.js} +4 -4
- package/dist/chunks/{content-headers-2rb1ee6g.js → workerd-w13ad1dk.js} +3 -3
- package/dist/chunks/{content-headers-mzs0n5xz.js → workerd-w9jcwh65.js} +7 -7
- package/dist/chunks/{content-headers-prn0chz2.js → workerd-wh07bcjv.js} +1 -1
- package/dist/chunks/{content-headers-2cm4dfcc.js → workerd-zrptb2x8.js} +2 -2
- package/dist/content-headers.js +1 -1
- package/dist/cors.js +1 -1
- package/dist/event-feed.js +5 -5
- package/dist/fetch.js +60 -60
- package/dist/handlers/agent.js +6 -6
- package/dist/handlers/artifact.js +3 -3
- package/dist/handlers/automation.d.ts +1 -3
- package/dist/handlers/automation.js +2 -2
- package/dist/handlers/blob.js +3 -3
- package/dist/handlers/command.js +6 -6
- package/dist/handlers/config.js +6 -6
- package/dist/handlers/credential.js +7 -7
- package/dist/handlers/debug.js +6 -6
- package/dist/handlers/event.js +7 -7
- package/dist/handlers/form.js +6 -6
- package/dist/handlers/fs.js +8 -8
- package/dist/handlers/generate.js +6 -6
- package/dist/handlers/integration.js +6 -6
- package/dist/handlers/job.js +2 -2
- package/dist/handlers/location.js +6 -6
- package/dist/handlers/machine.js +1 -1
- package/dist/handlers/mcp.js +8 -8
- package/dist/handlers/media.js +2 -2
- package/dist/handlers/message.js +7 -7
- package/dist/handlers/migration.js +6 -6
- package/dist/handlers/model.js +6 -6
- package/dist/handlers/permission.js +6 -6
- package/dist/handlers/persistent-pty.d.ts +1 -1
- package/dist/handlers/persistent-pty.js +16 -16
- package/dist/handlers/plugin.js +6 -6
- package/dist/handlers/project.js +6 -6
- package/dist/handlers/provider.js +6 -6
- package/dist/handlers/pty-socket.js +1 -1
- package/dist/handlers/pty.js +8 -8
- package/dist/handlers/reference.js +6 -6
- package/dist/handlers/rpc.js +6 -6
- package/dist/handlers/server.js +9 -9
- package/dist/handlers/session-error.js +1 -1
- package/dist/handlers/session.js +7 -7
- package/dist/handlers/shell.js +6 -6
- package/dist/handlers/skill.js +6 -6
- package/dist/handlers/usage.js +6 -6
- package/dist/handlers/vcs.js +6 -6
- package/dist/handlers/voice.js +6 -6
- package/dist/handlers/websearch.js +6 -6
- package/dist/handlers/worktree.js +6 -6
- package/dist/handlers.d.ts +1 -1
- package/dist/handlers.js +53 -53
- package/dist/location.js +4 -4
- package/dist/media-uri.js +1 -1
- package/dist/middleware/authorization.js +2 -2
- package/dist/middleware/defect-response.js +1 -1
- package/dist/middleware/form-location.js +3 -3
- package/dist/middleware/schema-error.js +1 -1
- package/dist/middleware/session-location.js +3 -3
- package/dist/pairing.js +3 -3
- package/dist/process.js +61 -61
- package/dist/range.js +1 -1
- package/dist/request-site.js +2 -2
- package/dist/request-tracing.js +1 -1
- package/dist/routes.d.ts +2 -2
- package/dist/routes.js +57 -57
- package/dist/server-info.js +5 -5
- package/dist/service-status.js +1 -1
- package/dist/workerd.js +61 -61
- package/package.json +8 -8
- package/dist/chunks/content-headers-9cd3a4b8.js +0 -69
- /package/dist/chunks/{content-headers-0rzj25w4.js → workerd-0rzj25w4.js} +0 -0
- /package/dist/chunks/{content-headers-9rqn6x4v.js → workerd-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{content-headers-bd8755ek.js → workerd-bd8755ek.js} +0 -0
- /package/dist/chunks/{content-headers-n26yr6pw.js → workerd-n26yr6pw.js} +0 -0
- /package/dist/chunks/{content-headers-q187pxxd.js → workerd-q187pxxd.js} +0 -0
- /package/dist/chunks/{content-headers-q4bn6dy8.js → workerd-q4bn6dy8.js} +0 -0
- /package/dist/chunks/{content-headers-smaf4a18.js → workerd-smaf4a18.js} +0 -0
- /package/dist/chunks/{content-headers-xthc02cw.js → workerd-xthc02cw.js} +0 -0
- /package/dist/chunks/{content-headers-yc7nft6q.js → workerd-yc7nft6q.js} +0 -0
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/workerd-s8t5gq7c.js";
|
|
4
|
+
import"./chunks/workerd-qahj7606.js";
|
|
5
|
+
import"./chunks/workerd-n6ypjnhz.js";
|
|
6
|
+
import"./chunks/workerd-j80tzjj3.js";
|
|
7
|
+
import"./chunks/workerd-smaf4a18.js";
|
|
8
8
|
export {
|
|
9
9
|
Api2 as Api
|
|
10
10
|
};
|
package/dist/auth.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-j80tzjj3.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-s8t5gq7c.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/plugin.ts
|
|
9
9
|
import { Plugin } from "@opencode/core/plugin";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isAllowedCorsOrigin2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-q4bn6dy8.js";
|
|
4
4
|
import {
|
|
5
5
|
middleware2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-myqk22k5.js";
|
|
7
7
|
import {
|
|
8
8
|
withoutParentSpan2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./workerd-yc7nft6q.js";
|
|
10
10
|
import {
|
|
11
11
|
createRoutes2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./workerd-5dgtfnrn.js";
|
|
13
13
|
import {
|
|
14
14
|
__export
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./workerd-9rqn6x4v.js";
|
|
16
16
|
|
|
17
17
|
// src/fetch.ts
|
|
18
18
|
var exports_fetch = {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-j80tzjj3.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-s8t5gq7c.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/skill.ts
|
|
9
9
|
import { Skill } from "@opencode/core/skill";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-j80tzjj3.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-s8t5gq7c.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/usage.ts
|
|
9
9
|
import { UsageLimits } from "@opencode/core/usage-limits";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-j80tzjj3.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-s8t5gq7c.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/integration.ts
|
|
9
9
|
import { Integration } from "@opencode/core/integration";
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./
|
|
2
|
+
layer3
|
|
3
|
+
} from "./workerd-j80tzjj3.js";
|
|
4
4
|
import {
|
|
5
5
|
formLocationLayer2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-n6ypjnhz.js";
|
|
7
7
|
import {
|
|
8
8
|
sessionLocationLayer2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./workerd-qahj7606.js";
|
|
10
10
|
import {
|
|
11
11
|
Api2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./workerd-s8t5gq7c.js";
|
|
13
13
|
import {
|
|
14
14
|
Config2
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./workerd-j4at0y5c.js";
|
|
16
16
|
import {
|
|
17
17
|
CorsConfig2
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./workerd-q4bn6dy8.js";
|
|
19
19
|
import {
|
|
20
|
-
|
|
21
|
-
} from "./
|
|
20
|
+
layer4
|
|
21
|
+
} from "./workerd-7dtbad8d.js";
|
|
22
22
|
import {
|
|
23
23
|
node2
|
|
24
|
-
} from "./
|
|
24
|
+
} from "./workerd-w9jcwh65.js";
|
|
25
25
|
import {
|
|
26
26
|
handlers2
|
|
27
|
-
} from "./
|
|
27
|
+
} from "./workerd-jpqse2v9.js";
|
|
28
28
|
import {
|
|
29
29
|
authorizationLayer2
|
|
30
|
-
} from "./
|
|
30
|
+
} from "./workerd-rktygpea.js";
|
|
31
31
|
import {
|
|
32
32
|
schemaErrorLayer2
|
|
33
|
-
} from "./
|
|
33
|
+
} from "./workerd-bd8755ek.js";
|
|
34
34
|
import {
|
|
35
35
|
defectResponseLayer2
|
|
36
|
-
} from "./
|
|
36
|
+
} from "./workerd-n26yr6pw.js";
|
|
37
37
|
|
|
38
38
|
// src/routes.ts
|
|
39
39
|
import { Database } from "@opencode/core/database/database";
|
|
@@ -192,8 +192,8 @@ function makeRoutes(password, options, serviceURLs, overrides, instances) {
|
|
|
192
192
|
})) : build(overrides);
|
|
193
193
|
return serviceLayer.pipe(Layer.flatMap((context) => {
|
|
194
194
|
const services = Layer.succeedContext(context);
|
|
195
|
-
const requestServices = Layer.merge(Layer.succeedContext(Context.pick(Database.Service, Credential.Service, PermissionSaved.Service, PluginUpdate.Service, Project.Service, WellKnown.Service)(context)),
|
|
196
|
-
const api = HttpApiBuilder.layer(Api2, { openapiPath: "/openapi.json" }).pipe(Layer.provide(handlers2.pipe(Layer.provide(services), Layer.provide(Layer.succeed(CorsConfig2, options)))), Layer.provide(formLocationLayer2), Layer.provide(sessionLocationLayer2), Layer.provide(
|
|
195
|
+
const requestServices = Layer.merge(Layer.succeedContext(Context.pick(Database.Service, Credential.Service, PermissionSaved.Service, PluginUpdate.Service, Project.Service, WellKnown.Service)(context)), layer4(serviceURLs, Context.get(context, Global.Service).tmp, options.app));
|
|
196
|
+
const api = HttpApiBuilder.layer(Api2, { openapiPath: "/openapi.json" }).pipe(Layer.provide(handlers2.pipe(Layer.provide(services), Layer.provide(Layer.succeed(CorsConfig2, options)))), Layer.provide(formLocationLayer2), Layer.provide(sessionLocationLayer2), Layer.provide(layer3), Layer.provide(authorizationLayer2), Layer.provide(schemaErrorLayer2), Layer.provide(auth), HttpRouter.provideRequest(requestServices), Layer.merge(defectResponseLayer2), Layer.provideMerge(services), Layer.provideMerge(HttpRouter.layer), Layer.tap((context) => Effect.sync(() => {
|
|
197
197
|
internal = Context.get(context, HttpRouter.HttpRouter).asHttpEffect().pipe(HttpEffect.toWebHandlerWith(context));
|
|
198
198
|
})));
|
|
199
199
|
return Layer.merge(api, V1Migration.layer.pipe(Layer.provide(services)));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-j80tzjj3.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-s8t5gq7c.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/provider.ts
|
|
9
9
|
import { Provider } from "@opencode/core/provider";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-s8t5gq7c.js";
|
|
4
4
|
import {
|
|
5
5
|
SESSION_TTL_SECONDS2,
|
|
6
6
|
Config2,
|
|
7
7
|
issueSession2,
|
|
8
8
|
sessionCookieName2
|
|
9
|
-
} from "./
|
|
10
|
-
import {
|
|
11
|
-
Service2
|
|
12
|
-
} from "./content-headers-z3e7v67k.js";
|
|
9
|
+
} from "./workerd-j4at0y5c.js";
|
|
13
10
|
import {
|
|
14
11
|
Service4
|
|
15
|
-
} from "./
|
|
12
|
+
} from "./workerd-7dtbad8d.js";
|
|
13
|
+
import {
|
|
14
|
+
Service3
|
|
15
|
+
} from "./workerd-w9jcwh65.js";
|
|
16
16
|
|
|
17
17
|
// src/handlers/server.ts
|
|
18
18
|
import { hostname } from "node:os";
|
|
@@ -22,10 +22,10 @@ import { HttpApiBuilder } from "effect/http-api";
|
|
|
22
22
|
import { PersistentPty } from "@opencode/core/persistent-pty";
|
|
23
23
|
import { UnauthorizedError } from "@opencode/protocol/errors";
|
|
24
24
|
var ServerHandler2 = HttpApiBuilder.group(Api2, "server.server", (handlers) => Effect.gen(function* () {
|
|
25
|
-
const pairing = yield*
|
|
25
|
+
const pairing = yield* Service3;
|
|
26
26
|
const auth = yield* Config2;
|
|
27
27
|
return handlers.handle("server.info", () => Effect.gen(function* () {
|
|
28
|
-
const info = yield*
|
|
28
|
+
const info = yield* Service4;
|
|
29
29
|
return {
|
|
30
30
|
version: info.app.version ?? "unknown",
|
|
31
31
|
pid: process.pid ?? 0,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-s8t5gq7c.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
5
|
+
Service2,
|
|
6
6
|
frame2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./workerd-fvpjvjpp.js";
|
|
8
8
|
|
|
9
9
|
// src/handlers/event.ts
|
|
10
10
|
import { Event } from "@opencode/schema/event";
|
|
@@ -12,7 +12,7 @@ import { Effect, Stream } from "effect";
|
|
|
12
12
|
import { HttpServerResponse } from "effect/http";
|
|
13
13
|
import { HttpApiBuilder } from "effect/http-api";
|
|
14
14
|
var EventHandler2 = HttpApiBuilder.group(Api2, "server.event", (handlers) => Effect.gen(function* () {
|
|
15
|
-
const feed = yield*
|
|
15
|
+
const feed = yield* Service2;
|
|
16
16
|
return handlers.handleRaw("event.subscribe", (ctx) => Effect.gen(function* () {
|
|
17
17
|
const connected = {
|
|
18
18
|
id: Event.ID.create(),
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-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: () => layer4
|
|
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 layer4(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, layer4, connectionURLs2, exports_server_info };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-j80tzjj3.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-s8t5gq7c.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/websearch.ts
|
|
9
9
|
import { WebSearch } from "@opencode/core/websearch";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-s8t5gq7c.js";
|
|
4
4
|
import {
|
|
5
5
|
requireConnectable2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-4r2ye500.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/credential.ts
|
|
9
9
|
import { Credential } from "@opencode/core/credential";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
locationErrors2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-j80tzjj3.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-s8t5gq7c.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/generate.ts
|
|
9
9
|
import { Generate } from "@opencode/core/generate";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
missingSession2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-smaf4a18.js";
|
|
4
4
|
import {
|
|
5
5
|
locationErrors2,
|
|
6
6
|
response2,
|
|
7
7
|
sessionInfo2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./workerd-j80tzjj3.js";
|
|
9
9
|
import {
|
|
10
10
|
Api2
|
|
11
|
-
} from "./
|
|
11
|
+
} from "./workerd-s8t5gq7c.js";
|
|
12
12
|
|
|
13
13
|
// src/handlers/permission.ts
|
|
14
14
|
import { Instance } from "@opencode/core/instance/service";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-j80tzjj3.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-s8t5gq7c.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/shell.ts
|
|
9
9
|
import { Shell } from "@opencode/core/shell";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
requestRef2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-j80tzjj3.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-s8t5gq7c.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/debug.ts
|
|
9
9
|
import { LocationServiceMap } from "@opencode/core/location-service-map";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-j80tzjj3.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-s8t5gq7c.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/command.ts
|
|
9
9
|
import { Command } from "@opencode/core/command";
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
locationErrors2,
|
|
3
3
|
response2,
|
|
4
4
|
requestRef2
|
|
5
|
-
} from "./
|
|
5
|
+
} from "./workerd-j80tzjj3.js";
|
|
6
6
|
import {
|
|
7
7
|
Api2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./workerd-s8t5gq7c.js";
|
|
9
9
|
import {
|
|
10
10
|
CorsConfig2,
|
|
11
11
|
isAllowedRequestOrigin2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./workerd-q4bn6dy8.js";
|
|
13
13
|
import {
|
|
14
14
|
runPtySocket2,
|
|
15
15
|
holdLocation2
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./workerd-q187pxxd.js";
|
|
17
17
|
|
|
18
18
|
// src/handlers/mcp.ts
|
|
19
19
|
import { Location } from "@opencode/core/location";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-j80tzjj3.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-s8t5gq7c.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/model.ts
|
|
9
9
|
import { Model } from "@opencode/core/model";
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
missingMessage2,
|
|
4
4
|
failedMessageDecode2,
|
|
5
5
|
failedSnapshot2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-smaf4a18.js";
|
|
7
7
|
import {
|
|
8
8
|
locationErrors2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./workerd-j80tzjj3.js";
|
|
10
10
|
import {
|
|
11
11
|
Api2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./workerd-s8t5gq7c.js";
|
|
13
13
|
import {
|
|
14
14
|
wantsMediaRefs2
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./workerd-xthc02cw.js";
|
|
16
16
|
|
|
17
17
|
// src/handlers/session.ts
|
|
18
18
|
import { Instance } from "@opencode/core/instance/service";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-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: () => Service2,
|
|
11
11
|
SubscriberCapacity: () => SubscriberCapacity2,
|
|
12
12
|
SubscriberOverflowError: () => SubscriberOverflowError2,
|
|
13
13
|
frame: () => frame2,
|
|
14
|
-
layer: () =>
|
|
14
|
+
layer: () => layer2,
|
|
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 Service2 extends Context.Service()("@opencode/server/EventFeed") {
|
|
34
34
|
}
|
|
35
35
|
function frame2(event) {
|
|
36
36
|
return `data: ${JSON.stringify(event)}
|
|
@@ -72,13 +72,13 @@ var make4 = Effect.fn("EventFeed.make")(function* (observe, options) {
|
|
|
72
72
|
});
|
|
73
73
|
const unsubscribe = yield* observe(publish);
|
|
74
74
|
yield* Effect.addFinalizer(() => unsubscribe);
|
|
75
|
-
return
|
|
75
|
+
return Service2.of({
|
|
76
76
|
subscribe: (types) => Effect.acquireRelease(Queue.dropping(capacity).pipe(Effect.tap((queue) => Effect.sync(() => subscribers.set(queue, types?.length ? new Set(types) : undefined)))), (queue) => Effect.sync(() => subscribers.delete(queue)).pipe(Effect.andThen(Queue.shutdown(queue)), Effect.asVoid)).pipe(Effect.map(Stream.fromQueue))
|
|
77
77
|
});
|
|
78
78
|
});
|
|
79
|
-
var
|
|
79
|
+
var layer2 = Layer.effect(Service2, Effect.gen(function* () {
|
|
80
80
|
const bus = yield* Bus.Service;
|
|
81
81
|
return yield* make4(bus.listen);
|
|
82
82
|
}));
|
|
83
83
|
|
|
84
|
-
export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2,
|
|
84
|
+
export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2, Service2, frame2, make4, layer2, exports_event_feed };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
download2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-t32e1bbt.js";
|
|
4
4
|
import {
|
|
5
5
|
parse2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-8sb6qqpn.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/blob.ts
|
|
9
9
|
import { BlobStore } from "@opencode/core/blob-store";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-j80tzjj3.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-s8t5gq7c.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/vcs.ts
|
|
9
9
|
import { Vcs } from "@opencode/core/vcs";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {
|
|
2
|
+
missingSession2
|
|
3
|
+
} from "./workerd-smaf4a18.js";
|
|
4
|
+
|
|
5
|
+
// src/handlers/automation.ts
|
|
6
|
+
import { Automation } from "@opencode/core/automation";
|
|
7
|
+
import { Permission } from "@opencode/core/permission";
|
|
8
|
+
import { AutomationNotFoundError, ForbiddenError, InvalidRequestError } from "@opencode/protocol/errors";
|
|
9
|
+
import { Effect } from "effect";
|
|
10
|
+
import { HttpApiSchema } from "effect/http-api";
|
|
11
|
+
var makeAutomation2 = Effect.gen(function* () {
|
|
12
|
+
const automations = yield* Automation.Service;
|
|
13
|
+
return {
|
|
14
|
+
create: (payload) => automations.create(payload).pipe(Effect.provideService(Permission.Unattended, []), Effect.map((data) => ({ data })), Effect.catchTags({
|
|
15
|
+
"Automation.InvalidError": (error) => Effect.fail(new InvalidRequestError({ message: error.message, kind: "automation" })),
|
|
16
|
+
"Automation.DisabledError": () => Effect.fail(disabled()),
|
|
17
|
+
"Permission.BlockedError": (error) => Effect.fail(new ForbiddenError({ message: error.message })),
|
|
18
|
+
"Permission.CorrectedError": (error) => Effect.fail(new ForbiddenError({ message: error.feedback })),
|
|
19
|
+
"Session.NotFoundError": (error) => Effect.fail(missingSession2(error))
|
|
20
|
+
})),
|
|
21
|
+
list: (query) => automations.list(query).pipe(Effect.map((data) => ({ data })), Effect.catchTags({
|
|
22
|
+
"Automation.InvalidError": (error) => Effect.fail(new InvalidRequestError({ message: error.message, kind: "automation" })),
|
|
23
|
+
"Automation.DisabledError": () => Effect.fail(disabled()),
|
|
24
|
+
"Session.NotFoundError": (error) => Effect.fail(missingSession2(error))
|
|
25
|
+
})),
|
|
26
|
+
get: (id) => managed(automations.get(id).pipe(Effect.map((data) => ({ data })))),
|
|
27
|
+
pause: (id) => managed(automations.pause(id).pipe(Effect.map((data) => ({ data })))),
|
|
28
|
+
resume: (id) => managed(automations.resume(id).pipe(Effect.map((data) => ({ data })))),
|
|
29
|
+
remove: (id) => managed(automations.remove(id).pipe(Effect.as(HttpApiSchema.NoContent.make())))
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
function managed(effect) {
|
|
33
|
+
return effect.pipe(Effect.catchTags({
|
|
34
|
+
"Automation.NotFoundError": (error) => Effect.fail(missingAutomation(error)),
|
|
35
|
+
"Automation.DisabledError": () => Effect.fail(disabled())
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
function missingAutomation(error) {
|
|
39
|
+
return new AutomationNotFoundError({
|
|
40
|
+
automationID: error.automationID,
|
|
41
|
+
message: `Automation not found: ${error.automationID}`
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function disabled() {
|
|
45
|
+
return new ForbiddenError({ message: new Automation.DisabledError().message });
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { makeAutomation2 };
|