@opencode/server 0.0.0-dev-1350 → 0.0.0-dev-1352
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/{request-tracing-0dfmev2z.js → workerd-0dfmev2z.js} +1 -1
- package/dist/chunks/{request-tracing-39nnfjx1.js → workerd-0q7s66m2.js} +4 -4
- package/dist/chunks/{request-tracing-bqg3w4bn.js → workerd-2h3x7256.js} +1 -1
- package/dist/chunks/{request-tracing-e3htq44t.js → workerd-341zm3rs.js} +2 -2
- package/dist/chunks/{request-tracing-g23ffrnz.js → workerd-50kbksvb.js} +2 -2
- package/dist/chunks/{request-tracing-6pm6ek88.js → workerd-6pm6ek88.js} +1 -1
- package/dist/chunks/{request-tracing-72bf7qt9.js → workerd-72bf7qt9.js} +1 -1
- package/dist/chunks/{request-tracing-z3e7v67k.js → workerd-7dtbad8d.js} +7 -7
- package/dist/chunks/{request-tracing-ttrap0vm.js → workerd-7tv8nec1.js} +1 -1
- package/dist/chunks/{request-tracing-h2fpekzg.js → workerd-7wqhvmdw.js} +4 -4
- package/dist/chunks/{request-tracing-zpdw139q.js → workerd-844nmnmk.js} +2 -2
- package/dist/chunks/{request-tracing-jwfjvgfr.js → workerd-89vcfemc.js} +10 -10
- package/dist/chunks/{request-tracing-8sb6qqpn.js → workerd-8sb6qqpn.js} +1 -1
- package/dist/chunks/{request-tracing-5zfzwsmf.js → workerd-8vb7b9fr.js} +4 -4
- package/dist/chunks/{request-tracing-wpn4n92f.js → workerd-8y4d9f30.js} +3 -3
- package/dist/chunks/{request-tracing-xhw3kfnn.js → workerd-bcs2rr9e.js} +2 -2
- package/dist/chunks/{request-tracing-ase6j722.js → workerd-cgcw2b0e.js} +2 -2
- package/dist/chunks/{request-tracing-b4k0vyky.js → workerd-chs3pn0j.js} +8 -8
- package/dist/chunks/{request-tracing-djr0jy89.js → workerd-djr0jy89.js} +1 -1
- package/dist/chunks/{request-tracing-v7rcpbey.js → workerd-dyvstyyh.js} +24 -20
- package/dist/chunks/{request-tracing-qd05162x.js → workerd-e0ppd0jy.js} +10 -10
- package/dist/chunks/{request-tracing-b0crtbhe.js → workerd-fcw485c9.js} +2 -2
- package/dist/chunks/{request-tracing-0g9mdpgv.js → workerd-fdy3gtcd.js} +4 -4
- package/dist/chunks/{request-tracing-bae6b5xr.js → workerd-fegnxd42.js} +1 -1
- package/dist/chunks/{request-tracing-fsvp99pe.js → workerd-fsvp99pe.js} +1 -1
- package/dist/chunks/{request-tracing-n9kqh2yj.js → workerd-g7jcf7zq.js} +8 -8
- package/dist/chunks/{request-tracing-xckv21dk.js → workerd-ggw25rqf.js} +1 -1
- package/dist/chunks/{request-tracing-k788ajcj.js → workerd-gqstb6bx.js} +2 -2
- package/dist/chunks/{request-tracing-j4at0y5c.js → workerd-j4at0y5c.js} +1 -1
- package/dist/chunks/{request-tracing-g003exja.js → workerd-j605n900.js} +2 -2
- package/dist/chunks/{request-tracing-j6y32kmq.js → workerd-j6y32kmq.js} +2 -2
- package/dist/chunks/{request-tracing-4ndpf0hp.js → workerd-k12h8tw9.js} +1 -1
- package/dist/chunks/{request-tracing-9azap84r.js → workerd-kc553r92.js} +2 -2
- package/dist/chunks/{request-tracing-myqk22k5.js → workerd-myqk22k5.js} +2 -2
- package/dist/chunks/{request-tracing-mn3zdbxb.js → workerd-n9xnk9z3.js} +2 -2
- package/dist/chunks/{request-tracing-h9ta72b2.js → workerd-nessw55r.js} +14 -14
- package/dist/chunks/{request-tracing-fynca550.js → workerd-ntf3tw9k.js} +1 -1
- package/dist/chunks/{request-tracing-fmgwey40.js → workerd-pertn7qr.js} +4 -4
- package/dist/chunks/{request-tracing-8rexn64v.js → workerd-qcnb494j.js} +2 -2
- package/dist/chunks/{request-tracing-5q8dz5z1.js → workerd-qgjb3f4w.js} +2 -2
- package/dist/chunks/{request-tracing-1x93nrj9.js → workerd-raj3p8q0.js} +3 -3
- package/dist/chunks/{request-tracing-rktygpea.js → workerd-rktygpea.js} +1 -1
- package/dist/chunks/{request-tracing-304n6v78.js → workerd-sn8sqewc.js} +2 -2
- package/dist/chunks/{request-tracing-t32e1bbt.js → workerd-t32e1bbt.js} +1 -1
- package/dist/chunks/{request-tracing-ex3bavcc.js → workerd-tktas153.js} +2 -2
- package/dist/chunks/{request-tracing-mzs0n5xz.js → workerd-w9jcwh65.js} +7 -7
- package/dist/chunks/{request-tracing-h4tjxgze.js → workerd-wq8p9yvz.js} +35 -35
- package/dist/chunks/{request-tracing-szv33b9b.js → workerd-ws2ckpmb.js} +3 -3
- package/dist/chunks/{request-tracing-x2qy7jg1.js → workerd-x2qy7jg1.js} +1 -1
- package/dist/chunks/{request-tracing-q5rgkj8j.js → workerd-yvy5qft7.js} +2 -2
- package/dist/chunks/{request-tracing-1cv9x2r2.js → workerd-zmrq0y42.js} +2 -2
- package/dist/chunks/{request-tracing-6jf8ezha.js → workerd-zs1mkg1y.js} +2 -2
- package/dist/chunks/{request-tracing-65cb9hat.js → workerd-zs3a96ke.js} +2 -2
- package/dist/content-headers.js +1 -1
- package/dist/cors.js +1 -1
- package/dist/event-feed.js +7 -7
- package/dist/fetch.js +63 -63
- package/dist/handlers/agent.js +6 -6
- package/dist/handlers/artifact.js +3 -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.js +17 -17
- 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/push.js +1 -1
- 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.js +54 -54
- package/dist/location.js +2 -2
- 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 +64 -64
- package/dist/range.js +1 -1
- package/dist/request-site.js +2 -2
- package/dist/request-tracing.js +1 -1
- package/dist/routes.js +58 -58
- package/dist/server-info.js +5 -5
- package/dist/service-status.js +3 -3
- package/dist/workerd.js +62 -62
- package/package.json +8 -8
- /package/dist/chunks/{request-tracing-017ycvbx.js → workerd-017ycvbx.js} +0 -0
- /package/dist/chunks/{request-tracing-9rqn6x4v.js → workerd-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{request-tracing-bd8755ek.js → workerd-bd8755ek.js} +0 -0
- /package/dist/chunks/{request-tracing-n26yr6pw.js → workerd-n26yr6pw.js} +0 -0
- /package/dist/chunks/{request-tracing-q187pxxd.js → workerd-q187pxxd.js} +0 -0
- /package/dist/chunks/{request-tracing-q4bn6dy8.js → workerd-q4bn6dy8.js} +0 -0
- /package/dist/chunks/{request-tracing-qpnw2qd1.js → workerd-qpnw2qd1.js} +0 -0
- /package/dist/chunks/{request-tracing-rqgv9x42.js → workerd-rqgv9x42.js} +0 -0
- /package/dist/chunks/{request-tracing-xthc02cw.js → workerd-xthc02cw.js} +0 -0
- /package/dist/chunks/{request-tracing-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-8y4d9f30.js";
|
|
4
|
+
import"./chunks/workerd-0dfmev2z.js";
|
|
5
|
+
import"./chunks/workerd-fsvp99pe.js";
|
|
6
|
+
import"./chunks/workerd-72bf7qt9.js";
|
|
7
|
+
import"./chunks/workerd-rqgv9x42.js";
|
|
8
8
|
export {
|
|
9
9
|
Api2 as Api
|
|
10
10
|
};
|
package/dist/auth.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-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: () => make4
|
|
10
10
|
});
|
|
11
11
|
import { Effect, Ref } from "effect";
|
|
12
|
-
var
|
|
12
|
+
var make4 = 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 make2 = Effect.fnUntraced(function* (options = {}) {
|
|
|
20
20
|
};
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
-
export {
|
|
23
|
+
export { make4, exports_service_status };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-72bf7qt9.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-8y4d9f30.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/command.ts
|
|
9
9
|
import { Command } from "@opencode/core/command";
|
|
@@ -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,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,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-72bf7qt9.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-8y4d9f30.js";
|
|
7
7
|
import {
|
|
8
8
|
download2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./workerd-t32e1bbt.js";
|
|
10
10
|
import {
|
|
11
11
|
parse2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./workerd-8sb6qqpn.js";
|
|
13
13
|
|
|
14
14
|
// src/handlers/fs.ts
|
|
15
15
|
import { Environment } from "@opencode/core/environment/index";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-72bf7qt9.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-8y4d9f30.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/usage.ts
|
|
9
9
|
import { UsageLimits } from "@opencode/core/usage-limits";
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-8y4d9f30.js";
|
|
4
4
|
import {
|
|
5
5
|
CorsConfig2,
|
|
6
6
|
isAllowedRequestOrigin2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./workerd-q4bn6dy8.js";
|
|
8
8
|
import {
|
|
9
9
|
makeArtifact2
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./workerd-j6y32kmq.js";
|
|
11
11
|
import {
|
|
12
12
|
makeBlobGet2
|
|
13
|
-
} from "./
|
|
13
|
+
} from "./workerd-50kbksvb.js";
|
|
14
14
|
import {
|
|
15
15
|
makeAutomation2
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./workerd-6pm6ek88.js";
|
|
17
17
|
import {
|
|
18
18
|
makeJob2
|
|
19
|
-
} from "./
|
|
19
|
+
} from "./workerd-x2qy7jg1.js";
|
|
20
20
|
import {
|
|
21
21
|
makeMachineLink2,
|
|
22
22
|
makeMachine2
|
|
23
|
-
} from "./
|
|
23
|
+
} from "./workerd-017ycvbx.js";
|
|
24
24
|
import {
|
|
25
25
|
makeMediaGet2
|
|
26
|
-
} from "./
|
|
26
|
+
} from "./workerd-djr0jy89.js";
|
|
27
27
|
import {
|
|
28
28
|
makePush2
|
|
29
|
-
} from "./
|
|
29
|
+
} from "./workerd-qpnw2qd1.js";
|
|
30
30
|
import {
|
|
31
31
|
runPtySocket2
|
|
32
|
-
} from "./
|
|
32
|
+
} from "./workerd-q187pxxd.js";
|
|
33
33
|
|
|
34
34
|
// src/handlers/persistent-pty.ts
|
|
35
35
|
import { PersistentPty } from "@opencode/core/persistent-pty";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-8y4d9f30.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
5
|
+
Service2,
|
|
6
6
|
frame2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./workerd-e0ppd0jy.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,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LocationMiddleware2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-72bf7qt9.js";
|
|
4
4
|
import {
|
|
5
5
|
FormLocationMiddleware2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-0dfmev2z.js";
|
|
7
7
|
import {
|
|
8
8
|
SessionLocationMiddleware2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./workerd-fsvp99pe.js";
|
|
10
10
|
|
|
11
11
|
// src/api.ts
|
|
12
12
|
import { makeDefaultApi } from "@opencode/protocol/api";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
requestRef2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-72bf7qt9.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-8y4d9f30.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
|
locationErrors2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-72bf7qt9.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-8y4d9f30.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/voice.ts
|
|
9
9
|
import { Location } from "@opencode/core/location";
|
|
@@ -1,24 +1,24 @@
|
|
|
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-nessw55r.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 = {};
|
|
19
19
|
__export(exports_fetch, {
|
|
20
20
|
ServerFetch: () => exports_fetch,
|
|
21
|
-
make: () =>
|
|
21
|
+
make: () => make2,
|
|
22
22
|
makeWithContext: () => makeWithContext2
|
|
23
23
|
});
|
|
24
24
|
import { Context, Effect, Layer } from "effect";
|
|
@@ -30,8 +30,8 @@ var makeWithContext2 = Effect.fn("ServerFetch.makeWithContext")(function* (optio
|
|
|
30
30
|
const handler = Context.get(context, HttpRouter.HttpRouter).asHttpEffect().pipe(middleware2(options), HttpMiddleware.cors({ allowedOrigins: (origin) => isAllowedCorsOrigin2(origin, options), maxAge: 86400 }), HttpEffect.toWebHandlerWith(context));
|
|
31
31
|
return { handler, context };
|
|
32
32
|
});
|
|
33
|
-
var
|
|
33
|
+
var make2 = Effect.fn("ServerFetch.make")(function* (options = {}, boot = {}) {
|
|
34
34
|
return (yield* makeWithContext2(options, boot)).handler;
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
-
export { makeWithContext2,
|
|
37
|
+
export { makeWithContext2, make2, exports_fetch };
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
missingMessage2,
|
|
5
5
|
failedMessageDecode2,
|
|
6
6
|
failedSnapshot2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./workerd-rqgv9x42.js";
|
|
8
8
|
import {
|
|
9
9
|
locationErrors2
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./workerd-72bf7qt9.js";
|
|
11
11
|
import {
|
|
12
12
|
Api2
|
|
13
|
-
} from "./
|
|
13
|
+
} from "./workerd-8y4d9f30.js";
|
|
14
14
|
import {
|
|
15
15
|
wantsMediaRefs2
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./workerd-xthc02cw.js";
|
|
17
17
|
|
|
18
18
|
// src/handlers/session.ts
|
|
19
19
|
import { Instance } from "@opencode/core/instance/service";
|
|
@@ -59,6 +59,7 @@ var SessionHandler2 = HttpApiBuilder.group(Api2, "server.session", (handlers) =>
|
|
|
59
59
|
return yield* missingForm(formID);
|
|
60
60
|
return { form, info };
|
|
61
61
|
});
|
|
62
|
+
const unarchiveOnUserInput = (sessionID) => session.unarchive(sessionID).pipe(Effect.catchTag("Session.NotFoundError", missingSession2));
|
|
62
63
|
const busySession = (error) => new SessionBusyError({
|
|
63
64
|
sessionID: error.sessionID,
|
|
64
65
|
message: `Session is busy: ${error.sessionID}`
|
|
@@ -159,22 +160,22 @@ var SessionHandler2 = HttpApiBuilder.group(Api2, "server.session", (handlers) =>
|
|
|
159
160
|
}).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.DestinationNotFoundError", (error) => Effect.fail(new InvalidRequestError({ message: `Directory does not exist: ${error.directory}` }))), Effect.catchTag("Session.DestinationNotDirectoryError", (error) => Effect.fail(new InvalidRequestError({ message: `Not a directory: ${error.directory}` }))), Effect.catchTag("Session.DestinationUnavailableError", (error) => Effect.fail(new InvalidRequestError({ message: `Directory is unavailable: ${error.directory}` }))));
|
|
160
161
|
return HttpApiSchema.NoContent.make();
|
|
161
162
|
})).handle("session.prompt", Effect.fn(function* (ctx) {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
};
|
|
163
|
+
const data = yield* session.prompt({
|
|
164
|
+
sessionID: ctx.params.sessionID,
|
|
165
|
+
id: ctx.payload.id,
|
|
166
|
+
text: ctx.payload.text,
|
|
167
|
+
files: ctx.payload.files,
|
|
168
|
+
agents: ctx.payload.agents,
|
|
169
|
+
skills: ctx.payload.skills,
|
|
170
|
+
metadata: ctx.payload.metadata,
|
|
171
|
+
delivery: ctx.payload.delivery,
|
|
172
|
+
resume: ctx.payload.resume
|
|
173
|
+
}).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.PromptConflictError", (error) => Effect.fail(new ConflictError({
|
|
174
|
+
message: `Prompt message ID conflicts with an existing durable record: ${error.messageID}`,
|
|
175
|
+
resource: error.messageID
|
|
176
|
+
}))), Effect.catchTag("Session.AttachmentError", (error) => Effect.fail(new InvalidRequestError({ message: error.message, field: "files" }))), Effect.catchTag("Session.SkillNotFoundError", (error) => Effect.fail(new InvalidRequestError({ message: `Skill not found: ${error.skill}`, field: "skills" }))), Effect.catchTag("Skill.LoadError", skillLoadFailed2), locationErrors2);
|
|
177
|
+
yield* unarchiveOnUserInput(ctx.params.sessionID);
|
|
178
|
+
return { data };
|
|
178
179
|
})).handle("session.command", Effect.fn(function* (ctx) {
|
|
179
180
|
yield* session.command({
|
|
180
181
|
sessionID: ctx.params.sessionID,
|
|
@@ -191,6 +192,7 @@ var SessionHandler2 = HttpApiBuilder.group(Api2, "server.session", (handlers) =>
|
|
|
191
192
|
command: error.command,
|
|
192
193
|
message: error.message
|
|
193
194
|
}))), locationErrors2);
|
|
195
|
+
yield* unarchiveOnUserInput(ctx.params.sessionID);
|
|
194
196
|
return HttpApiSchema.NoContent.make();
|
|
195
197
|
})).handle("session.skill", Effect.fn(function* (ctx) {
|
|
196
198
|
yield* session.skill({
|
|
@@ -198,6 +200,7 @@ var SessionHandler2 = HttpApiBuilder.group(Api2, "server.session", (handlers) =>
|
|
|
198
200
|
skill: ctx.payload.id,
|
|
199
201
|
resume: ctx.payload.resume
|
|
200
202
|
}).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.SkillNotFoundError", (error) => Effect.fail(new SkillNotFoundError({ skill: error.skill, message: `Skill not found: ${error.skill}` }))), Effect.catchTag("Skill.LoadError", skillLoadFailed2), locationErrors2);
|
|
203
|
+
yield* unarchiveOnUserInput(ctx.params.sessionID);
|
|
201
204
|
return HttpApiSchema.NoContent.make();
|
|
202
205
|
})).handle("session.synthetic", Effect.fn(function* (ctx) {
|
|
203
206
|
const data = yield* session.synthetic({
|
|
@@ -214,6 +217,7 @@ var SessionHandler2 = HttpApiBuilder.group(Api2, "server.session", (handlers) =>
|
|
|
214
217
|
}))));
|
|
215
218
|
return { data };
|
|
216
219
|
})).handle("session.shell", Effect.fn(function* (ctx) {
|
|
220
|
+
yield* unarchiveOnUserInput(ctx.params.sessionID);
|
|
217
221
|
yield* session.shell({ sessionID: ctx.params.sessionID, id: ctx.payload.id, command: ctx.payload.command }).pipe(Effect.catchTag("Session.NotFoundError", missingSession2));
|
|
218
222
|
return HttpApiSchema.NoContent.make();
|
|
219
223
|
})).handle("session.compact", Effect.fn(function* (ctx) {
|
|
@@ -1,18 +1,18 @@
|
|
|
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: () =>
|
|
15
|
-
make: () =>
|
|
14
|
+
layer: () => layer2,
|
|
15
|
+
make: () => make3
|
|
16
16
|
});
|
|
17
17
|
import { Bus } from "@opencode/core/bus";
|
|
18
18
|
import { Event } from "@opencode/schema/event";
|
|
@@ -30,14 +30,14 @@ 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)}
|
|
37
37
|
|
|
38
38
|
`;
|
|
39
39
|
}
|
|
40
|
-
var
|
|
40
|
+
var make3 = Effect.fn("EventFeed.make")(function* (observe, options) {
|
|
41
41
|
const capacity = options?.capacity ?? SubscriberCapacity2;
|
|
42
42
|
const render = options?.encode ?? frame2;
|
|
43
43
|
const subscribers = new Map;
|
|
@@ -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
|
-
return yield*
|
|
81
|
+
return yield* make3(bus.listen);
|
|
82
82
|
}));
|
|
83
83
|
|
|
84
|
-
export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2,
|
|
84
|
+
export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2, Service2, frame2, make3, layer2, exports_event_feed };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-72bf7qt9.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-8y4d9f30.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/reference.ts
|
|
9
9
|
import { Reference } from "@opencode/core/reference";
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
locationErrors2,
|
|
3
3
|
response2,
|
|
4
4
|
requestRef2
|
|
5
|
-
} from "./
|
|
5
|
+
} from "./workerd-72bf7qt9.js";
|
|
6
6
|
import {
|
|
7
7
|
Api2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./workerd-8y4d9f30.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,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-8y4d9f30.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 "./request-tracing-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,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./workerd-72bf7qt9.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./workerd-8y4d9f30.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/plugin.ts
|
|
9
9
|
import { Plugin } from "@opencode/core/plugin";
|