@opencode/server 0.0.0-dev-1368 → 0.0.0-dev-1369
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/{workerd-39nnfjx1.js → fetch-0q7s66m2.js} +4 -4
- package/dist/chunks/{workerd-29nx48hm.js → fetch-29nx48hm.js} +1 -1
- package/dist/chunks/{workerd-ka2mtp6f.js → fetch-343ey9kd.js} +2 -2
- package/dist/chunks/{workerd-8xdajgpr.js → fetch-3w2mqh28.js} +2 -2
- package/dist/chunks/{workerd-9tw35sfc.js → fetch-547hv49q.js} +12 -12
- package/dist/chunks/{workerd-kmwr1xw9.js → fetch-5ky8bme5.js} +3 -3
- package/dist/chunks/{workerd-mj1ewmp1.js → fetch-64x7nvxd.js} +8 -8
- package/dist/chunks/{workerd-8nezxn08.js → fetch-6anyjjh1.js} +1 -1
- package/dist/chunks/{workerd-6pm6ek88.js → fetch-6pm6ek88.js} +1 -1
- package/dist/chunks/{workerd-a6b7h8n6.js → fetch-75etnwwx.js} +13 -13
- package/dist/chunks/{workerd-2tmcamrc.js → fetch-7r996r31.js} +2 -2
- package/dist/chunks/{workerd-23n65c7j.js → fetch-8gbtt6ty.js} +3 -3
- package/dist/chunks/{workerd-8sb6qqpn.js → fetch-8sb6qqpn.js} +1 -1
- package/dist/chunks/{workerd-rm5kndzh.js → fetch-8ssgdv74.js} +4 -4
- package/dist/chunks/{workerd-rgbnpstw.js → fetch-8y9zssdg.js} +2 -2
- package/dist/chunks/{workerd-k74zefsg.js → fetch-ar950k47.js} +1 -1
- package/dist/chunks/{workerd-br4x4prt.js → fetch-br4x4prt.js} +1 -1
- package/dist/chunks/{workerd-z5c20bjd.js → fetch-bsv8ejyp.js} +9 -9
- package/dist/chunks/{workerd-0wjm8gvs.js → fetch-c6ktqe09.js} +2 -2
- package/dist/chunks/{workerd-ca564221.js → fetch-ca564221.js} +1 -1
- package/dist/chunks/{workerd-yc92za0p.js → fetch-cj97w75w.js} +2 -2
- package/dist/chunks/{workerd-wsvmph03.js → fetch-ddhjwr2w.js} +2 -2
- package/dist/chunks/{workerd-f3gr6hfv.js → fetch-df03ef4a.js} +2 -2
- package/dist/chunks/{workerd-djr0jy89.js → fetch-djr0jy89.js} +1 -1
- package/dist/chunks/{workerd-10sj2tcf.js → fetch-eacgzt6w.js} +1 -1
- package/dist/chunks/{workerd-ehyp3zqd.js → fetch-ehyp3zqd.js} +1 -1
- package/dist/chunks/{workerd-8qsq6tbs.js → fetch-esvnag9e.js} +2 -2
- package/dist/chunks/{workerd-r8tdr8qd.js → fetch-etqag9r3.js} +8 -8
- package/dist/chunks/{workerd-exwy1kbj.js → fetch-f412ctvv.js} +2 -2
- package/dist/chunks/{workerd-50kbksvb.js → fetch-g23ffrnz.js} +2 -2
- package/dist/chunks/{workerd-0vqsbvsa.js → fetch-g2mvbng7.js} +4 -4
- package/dist/chunks/{workerd-3xkwxcke.js → fetch-g9qy0kb1.js} +2 -2
- package/dist/chunks/{workerd-qq3f8fnn.js → fetch-htk4x1jk.js} +2 -2
- package/dist/chunks/{workerd-j4at0y5c.js → fetch-j4at0y5c.js} +1 -1
- package/dist/chunks/{workerd-javgytnb.js → fetch-javgytnb.js} +2 -2
- package/dist/chunks/{workerd-whvq72as.js → fetch-jhs8rzvk.js} +3 -3
- package/dist/chunks/{workerd-myqk22k5.js → fetch-myqk22k5.js} +2 -2
- package/dist/chunks/{workerd-784gqmc7.js → fetch-nfrn9zxf.js} +2 -2
- package/dist/chunks/{workerd-rjhxbsc4.js → fetch-phgds112.js} +2 -2
- package/dist/chunks/{workerd-prwd5gwt.js → fetch-r682v2h3.js} +2 -2
- package/dist/chunks/{workerd-9hynp6rm.js → fetch-r6qsbz4y.js} +2 -2
- package/dist/chunks/{workerd-hfbw093d.js → fetch-r6s0e5nz.js} +35 -35
- package/dist/chunks/{workerd-7dkb5ks8.js → fetch-rg932pab.js} +2 -2
- package/dist/chunks/{workerd-t32e1bbt.js → fetch-t32e1bbt.js} +1 -1
- package/dist/chunks/{workerd-xw05m515.js → fetch-tt779q2a.js} +3 -3
- package/dist/chunks/{workerd-v9t81kwn.js → fetch-v9t81kwn.js} +1 -1
- package/dist/chunks/{workerd-dsxhsz16.js → fetch-w61t2v25.js} +6 -6
- package/dist/chunks/{workerd-1g4xykqx.js → fetch-wddrz15f.js} +4 -4
- package/dist/chunks/{workerd-am27j67f.js → fetch-wjh98yw2.js} +1 -1
- package/dist/chunks/{workerd-epfdwcja.js → fetch-x1nd0396.js} +4 -4
- package/dist/chunks/{workerd-x2qy7jg1.js → fetch-x2qy7jg1.js} +1 -1
- package/dist/chunks/{workerd-s0zgx365.js → fetch-y8sa9sbe.js} +2 -2
- package/dist/chunks/{workerd-n2zyxnzr.js → fetch-ykr4m3zx.js} +1 -1
- package/dist/chunks/{workerd-1pbjpk0f.js → fetch-yntmtmva.js} +4 -4
- package/dist/chunks/{workerd-em7ed65n.js → fetch-z0v7xmc8.js} +2 -2
- package/dist/chunks/{workerd-5pdfedjd.js → fetch-z3e7v67k.js} +5 -5
- package/dist/chunks/{workerd-e3jd9akj.js → fetch-z80wqx10.js} +1 -1
- package/dist/content-headers.js +1 -1
- package/dist/cors.js +1 -1
- package/dist/event-feed.js +5 -5
- package/dist/fetch.js +67 -67
- 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/experimental/browser-tunnel.js +4 -4
- package/dist/handlers/flag.js +6 -6
- 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 +20 -20
- 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/space.js +2 -2
- 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 +58 -58
- 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 +1 -1
- package/dist/process.js +68 -68
- package/dist/range.js +1 -1
- package/dist/request-site.js +2 -2
- package/dist/request-tracing.js +1 -1
- package/dist/routes.js +62 -62
- package/dist/server-info.js +3 -3
- package/dist/service-status.js +3 -3
- package/dist/space-store.js +3 -3
- package/dist/workerd.js +66 -66
- package/package.json +8 -8
- /package/dist/chunks/{workerd-017ycvbx.js → fetch-017ycvbx.js} +0 -0
- /package/dist/chunks/{workerd-9rqn6x4v.js → fetch-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{workerd-bd8755ek.js → fetch-bd8755ek.js} +0 -0
- /package/dist/chunks/{workerd-n26yr6pw.js → fetch-n26yr6pw.js} +0 -0
- /package/dist/chunks/{workerd-q187pxxd.js → fetch-q187pxxd.js} +0 -0
- /package/dist/chunks/{workerd-q4bn6dy8.js → fetch-q4bn6dy8.js} +0 -0
- /package/dist/chunks/{workerd-qpnw2qd1.js → fetch-qpnw2qd1.js} +0 -0
- /package/dist/chunks/{workerd-rqgv9x42.js → fetch-rqgv9x42.js} +0 -0
- /package/dist/chunks/{workerd-xthc02cw.js → fetch-xthc02cw.js} +0 -0
- /package/dist/chunks/{workerd-yc7nft6q.js → fetch-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/fetch-jhs8rzvk.js";
|
|
4
|
+
import"./chunks/fetch-ca564221.js";
|
|
5
|
+
import"./chunks/fetch-ehyp3zqd.js";
|
|
6
|
+
import"./chunks/fetch-br4x4prt.js";
|
|
7
|
+
import"./chunks/fetch-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 "./fetch-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,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CorsConfig2,
|
|
3
3
|
isAllowedRequestOrigin2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./fetch-q4bn6dy8.js";
|
|
5
5
|
import {
|
|
6
6
|
locationErrors2,
|
|
7
7
|
requestRef2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./fetch-br4x4prt.js";
|
|
9
9
|
|
|
10
10
|
// src/handlers/experimental/browser-tunnel.ts
|
|
11
11
|
import { NodeHttpServerRequest } from "@effect/platform-node";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-jhs8rzvk.js";
|
|
4
4
|
import {
|
|
5
5
|
requireConnectable2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./fetch-7r996r31.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/credential.ts
|
|
9
9
|
import { Credential } from "@opencode/core/credential";
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-jhs8rzvk.js";
|
|
4
4
|
import {
|
|
5
5
|
CorsConfig2,
|
|
6
6
|
isAllowedRequestOrigin2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./fetch-q4bn6dy8.js";
|
|
8
8
|
import {
|
|
9
9
|
makeArtifact2
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./fetch-javgytnb.js";
|
|
11
11
|
import {
|
|
12
12
|
makeBlobGet2
|
|
13
|
-
} from "./
|
|
13
|
+
} from "./fetch-g23ffrnz.js";
|
|
14
14
|
import {
|
|
15
15
|
makeBrowserTunnel2
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./fetch-343ey9kd.js";
|
|
17
17
|
import {
|
|
18
18
|
makeAutomation2
|
|
19
|
-
} from "./
|
|
19
|
+
} from "./fetch-6pm6ek88.js";
|
|
20
20
|
import {
|
|
21
21
|
makeJob2
|
|
22
|
-
} from "./
|
|
22
|
+
} from "./fetch-x2qy7jg1.js";
|
|
23
23
|
import {
|
|
24
24
|
makeMachineLink2,
|
|
25
25
|
makeMachine2
|
|
26
|
-
} from "./
|
|
26
|
+
} from "./fetch-017ycvbx.js";
|
|
27
27
|
import {
|
|
28
28
|
makeMediaGet2
|
|
29
|
-
} from "./
|
|
29
|
+
} from "./fetch-djr0jy89.js";
|
|
30
30
|
import {
|
|
31
31
|
makePush2
|
|
32
|
-
} from "./
|
|
32
|
+
} from "./fetch-qpnw2qd1.js";
|
|
33
33
|
import {
|
|
34
34
|
makeSpace2
|
|
35
|
-
} from "./
|
|
35
|
+
} from "./fetch-tt779q2a.js";
|
|
36
36
|
import {
|
|
37
37
|
runPtySocket2
|
|
38
|
-
} from "./
|
|
38
|
+
} from "./fetch-q187pxxd.js";
|
|
39
39
|
|
|
40
40
|
// src/handlers/persistent-pty.ts
|
|
41
41
|
import { PersistentPty } from "@opencode/core/persistent-pty";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
missingSession2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-rqgv9x42.js";
|
|
4
4
|
import {
|
|
5
5
|
locationErrors2,
|
|
6
6
|
response2,
|
|
7
7
|
sessionInfo2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./fetch-br4x4prt.js";
|
|
9
9
|
import {
|
|
10
10
|
Api2
|
|
11
|
-
} from "./
|
|
11
|
+
} from "./fetch-jhs8rzvk.js";
|
|
12
12
|
|
|
13
13
|
// src/handlers/permission.ts
|
|
14
14
|
import { Instance } from "@opencode/core/instance/service";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-9rqn6x4v.js";
|
|
4
4
|
|
|
5
5
|
// src/space-store.ts
|
|
6
6
|
var exports_space_store = {};
|
|
7
7
|
__export(exports_space_store, {
|
|
8
8
|
BatchSize: () => BatchSize2,
|
|
9
9
|
PurgeInterval: () => PurgeInterval2,
|
|
10
|
-
Service: () =>
|
|
10
|
+
Service: () => Service4,
|
|
11
11
|
SpaceStore: () => exports_space_store,
|
|
12
12
|
extension: () => extension2,
|
|
13
13
|
node: () => node2
|
|
@@ -22,9 +22,9 @@ import { Clock, Context, Effect, Layer } from "effect";
|
|
|
22
22
|
var BatchSize2 = 500;
|
|
23
23
|
var PurgeInterval2 = 64;
|
|
24
24
|
|
|
25
|
-
class
|
|
25
|
+
class Service4 extends Context.Service()("@opencode/server/SpaceStore") {
|
|
26
26
|
}
|
|
27
|
-
var layer = Layer.effect(
|
|
27
|
+
var layer = Layer.effect(Service4, Effect.gen(function* () {
|
|
28
28
|
const db = (yield* Database.Service).db;
|
|
29
29
|
let epoch = yield* SpaceRows.epoch(db).pipe(Effect.catchCause((cause) => Effect.logWarning("Could not read the space epoch", { cause }).pipe(Effect.as(crypto.randomUUID()))));
|
|
30
30
|
const listeners = new Array;
|
|
@@ -102,7 +102,7 @@ var layer = Layer.effect(Service2, Effect.gen(function* () {
|
|
|
102
102
|
events: read.rows.map((row) => change(space, row, created))
|
|
103
103
|
};
|
|
104
104
|
});
|
|
105
|
-
return
|
|
105
|
+
return Service4.of({
|
|
106
106
|
write: Effect.fn("SpaceStore.write")(function* (changes) {
|
|
107
107
|
return yield* [...new Set(changes.map((change) => change.space))].toSorted().reduceRight((effect, space) => locks.withLock(space)(effect), Effect.uninterruptible(Effect.gen(function* () {
|
|
108
108
|
const result = yield* SpaceRows.write(db, changes);
|
|
@@ -183,9 +183,9 @@ var layer = Layer.effect(Service2, Effect.gen(function* () {
|
|
|
183
183
|
})
|
|
184
184
|
});
|
|
185
185
|
}));
|
|
186
|
-
var node2 = makeGlobalNode({ service:
|
|
186
|
+
var node2 = makeGlobalNode({ service: Service4, layer, deps: [Database.node] });
|
|
187
187
|
var extension2 = Effect.gen(function* () {
|
|
188
|
-
const store = yield*
|
|
188
|
+
const store = yield* Service4;
|
|
189
189
|
return { open: (stream, send) => store.attach(stream, send) };
|
|
190
190
|
});
|
|
191
191
|
function change(space, row, created) {
|
|
@@ -216,4 +216,4 @@ function parse(epoch, cursor) {
|
|
|
216
216
|
return { since: Number(parts[0]), head: parts[1] === undefined ? undefined : Number(parts[1]) };
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
export { BatchSize2, PurgeInterval2,
|
|
219
|
+
export { BatchSize2, PurgeInterval2, Service4, node2, extension2, exports_space_store };
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import {
|
|
2
2
|
layer4
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
formLocationLayer2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./fetch-ca564221.js";
|
|
7
7
|
import {
|
|
8
8
|
sessionLocationLayer2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./fetch-ehyp3zqd.js";
|
|
10
10
|
import {
|
|
11
11
|
Api2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./fetch-jhs8rzvk.js";
|
|
13
13
|
import {
|
|
14
14
|
Config2
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./fetch-j4at0y5c.js";
|
|
16
16
|
import {
|
|
17
17
|
node2
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./fetch-64x7nvxd.js";
|
|
19
19
|
import {
|
|
20
20
|
CorsConfig2
|
|
21
|
-
} from "./
|
|
21
|
+
} from "./fetch-q4bn6dy8.js";
|
|
22
22
|
import {
|
|
23
23
|
layer2
|
|
24
|
-
} from "./
|
|
24
|
+
} from "./fetch-z3e7v67k.js";
|
|
25
25
|
import {
|
|
26
26
|
node3
|
|
27
|
-
} from "./
|
|
27
|
+
} from "./fetch-v9t81kwn.js";
|
|
28
28
|
import {
|
|
29
29
|
handlers2
|
|
30
|
-
} from "./
|
|
30
|
+
} from "./fetch-r6s0e5nz.js";
|
|
31
31
|
import {
|
|
32
32
|
authorizationLayer2
|
|
33
|
-
} from "./
|
|
33
|
+
} from "./fetch-29nx48hm.js";
|
|
34
34
|
import {
|
|
35
35
|
schemaErrorLayer2
|
|
36
|
-
} from "./
|
|
36
|
+
} from "./fetch-bd8755ek.js";
|
|
37
37
|
import {
|
|
38
38
|
defectResponseLayer2
|
|
39
|
-
} from "./
|
|
39
|
+
} from "./fetch-n26yr6pw.js";
|
|
40
40
|
|
|
41
41
|
// src/routes.ts
|
|
42
42
|
import { Database } from "@opencode/core/database/database";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./fetch-jhs8rzvk.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/integration.ts
|
|
9
9
|
import { Integration } from "@opencode/core/integration";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
missingSession2,
|
|
3
3
|
failedMessageDecode2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./fetch-rqgv9x42.js";
|
|
5
5
|
import {
|
|
6
6
|
Api2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./fetch-jhs8rzvk.js";
|
|
8
8
|
import {
|
|
9
9
|
wantsMediaRefs2
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./fetch-xthc02cw.js";
|
|
11
11
|
|
|
12
12
|
// src/handlers/message.ts
|
|
13
13
|
import { SessionMessage } from "@opencode/core/session/message";
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
locationErrors2,
|
|
3
3
|
response2,
|
|
4
4
|
requestRef2
|
|
5
|
-
} from "./
|
|
5
|
+
} from "./fetch-br4x4prt.js";
|
|
6
6
|
import {
|
|
7
7
|
Api2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./fetch-jhs8rzvk.js";
|
|
9
9
|
import {
|
|
10
10
|
CorsConfig2,
|
|
11
11
|
isAllowedRequestOrigin2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./fetch-q4bn6dy8.js";
|
|
13
13
|
import {
|
|
14
14
|
runPtySocket2,
|
|
15
15
|
holdLocation2
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./fetch-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
|
__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: () => Service3,
|
|
11
11
|
SubscriberCapacity: () => SubscriberCapacity2,
|
|
12
12
|
SubscriberOverflowError: () => SubscriberOverflowError2,
|
|
13
13
|
frame: () => frame2,
|
|
14
14
|
layer: () => layer3,
|
|
15
|
-
make: () =>
|
|
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 Service3 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;
|
|
@@ -75,7 +75,7 @@ var make4 = Effect.fn("EventFeed.make")(function* (observe, options) {
|
|
|
75
75
|
});
|
|
76
76
|
const unsubscribe = yield* observe(publish);
|
|
77
77
|
yield* Effect.addFinalizer(() => unsubscribe);
|
|
78
|
-
return
|
|
78
|
+
return Service3.of({
|
|
79
79
|
subscribe: (types) => Effect.gen(function* () {
|
|
80
80
|
const queue = yield* 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));
|
|
81
81
|
const id = crypto.randomUUID();
|
|
@@ -93,9 +93,9 @@ var make4 = Effect.fn("EventFeed.make")(function* (observe, options) {
|
|
|
93
93
|
})
|
|
94
94
|
});
|
|
95
95
|
});
|
|
96
|
-
var layer3 = (...extensions) => Layer.effect(
|
|
96
|
+
var layer3 = (...extensions) => Layer.effect(Service3, Effect.gen(function* () {
|
|
97
97
|
const bus = yield* Bus.Service;
|
|
98
|
-
return yield*
|
|
98
|
+
return yield* make3(bus.listen, { extensions: yield* Effect.all(extensions) });
|
|
99
99
|
}));
|
|
100
100
|
|
|
101
|
-
export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2,
|
|
101
|
+
export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2, Service3, frame2, make3, layer3, exports_event_feed };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./fetch-jhs8rzvk.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/usage.ts
|
|
9
9
|
import { UsageLimits } from "@opencode/core/usage-limits";
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isAllowedCorsOrigin2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-q4bn6dy8.js";
|
|
4
4
|
import {
|
|
5
5
|
middleware2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./fetch-myqk22k5.js";
|
|
7
7
|
import {
|
|
8
8
|
withoutParentSpan2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./fetch-yc7nft6q.js";
|
|
10
10
|
import {
|
|
11
11
|
createRoutes2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./fetch-75etnwwx.js";
|
|
13
13
|
import {
|
|
14
14
|
__export
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./fetch-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
21
|
build: () => build2,
|
|
22
|
-
make: () =>
|
|
22
|
+
make: () => make2,
|
|
23
23
|
makeWithContext: () => makeWithContext2,
|
|
24
24
|
serve: () => serve2
|
|
25
25
|
});
|
|
@@ -36,8 +36,8 @@ var serve2 = Effect.fnUntraced(function* (context, middleware = (app) => app) {
|
|
|
36
36
|
yield* Context.get(context, SessionRestart.Service).resumeSuspendedSessions.pipe(Effect.provideContext(context), withoutParentSpan2, Effect.forkScoped);
|
|
37
37
|
return Context.get(context, HttpRouter.HttpRouter).asHttpEffect().pipe(middleware, HttpEffect.toWebHandlerWith(context));
|
|
38
38
|
});
|
|
39
|
-
var
|
|
39
|
+
var make2 = Effect.fn("ServerFetch.make")(function* (options = {}, boot = {}) {
|
|
40
40
|
return (yield* makeWithContext2(options, boot)).handler;
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
-
export { makeWithContext2, build2, serve2,
|
|
43
|
+
export { makeWithContext2, build2, serve2, make2, exports_fetch };
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
locationErrors2,
|
|
3
3
|
response2,
|
|
4
4
|
requestRef2
|
|
5
|
-
} from "./
|
|
5
|
+
} from "./fetch-br4x4prt.js";
|
|
6
6
|
import {
|
|
7
7
|
Api2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./fetch-jhs8rzvk.js";
|
|
9
9
|
import {
|
|
10
10
|
CorsConfig2,
|
|
11
11
|
isAllowedRequestOrigin2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./fetch-q4bn6dy8.js";
|
|
13
13
|
import {
|
|
14
14
|
runPtySocket2,
|
|
15
15
|
holdLocation2
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./fetch-q187pxxd.js";
|
|
17
17
|
|
|
18
18
|
// src/handlers/pty.ts
|
|
19
19
|
import { Pty } from "@opencode/core/pty";
|