@opencode/server 0.0.0-dev-1346 → 0.0.0-dev-1348
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/{options-1s2hfsfr.js → request-site-0vqsbvsa.js} +4 -4
- package/dist/chunks/{options-pv4dnzzq.js → request-site-10sj2tcf.js} +1 -1
- package/dist/chunks/{options-1bx0qbf8.js → request-site-1dbhk1te.js} +7 -6
- package/dist/chunks/{options-4r2ye500.js → request-site-2tmcamrc.js} +2 -2
- package/dist/chunks/{options-39nnfjx1.js → request-site-39nnfjx1.js} +1 -1
- package/dist/chunks/{options-z3e7v67k.js → request-site-3te71694.js} +7 -7
- package/dist/chunks/{options-hgrkvk6s.js → request-site-6pm6ek88.js} +1 -1
- package/dist/chunks/request-site-74nxvsrn.js +27 -0
- package/dist/chunks/{options-t8azv5ge.js → request-site-7dkb5ks8.js} +2 -2
- package/dist/chunks/{options-edwk6ehd.js → request-site-8nezxn08.js} +1 -1
- package/dist/chunks/{options-zrptb2x8.js → request-site-8qsq6tbs.js} +2 -2
- package/dist/chunks/{options-8sb6qqpn.js → request-site-8sb6qqpn.js} +1 -1
- package/dist/chunks/{options-86dz2n4m.js → request-site-8xdajgpr.js} +2 -2
- package/dist/chunks/{options-g97h7k0s.js → request-site-am27j67f.js} +1 -1
- package/dist/chunks/{options-j80tzjj3.js → request-site-br4x4prt.js} +3 -3
- package/dist/chunks/{options-n6ypjnhz.js → request-site-ca564221.js} +1 -1
- package/dist/chunks/{options-tdx0cx27.js → request-site-csetzeb0.js} +8 -8
- package/dist/chunks/{options-b7yt2ykh.js → request-site-csnx1nj3.js} +2 -2
- package/dist/chunks/{options-g80pvn6e.js → request-site-cwx7pqk1.js} +2 -2
- package/dist/chunks/{options-pb8akwr3.js → request-site-dc91e8gy.js} +16 -16
- package/dist/chunks/{options-djr0jy89.js → request-site-djr0jy89.js} +1 -1
- package/dist/chunks/{options-qahj7606.js → request-site-ehyp3zqd.js} +1 -1
- package/dist/chunks/{options-20wvj9q6.js → request-site-em7ed65n.js} +2 -2
- package/dist/chunks/{options-k26h7zjg.js → request-site-exwy1kbj.js} +2 -2
- package/dist/chunks/{options-b1x3j2e8.js → request-site-f3gr6hfv.js} +2 -2
- package/dist/chunks/{options-wecgp61r.js → request-site-fvpjvjpp.js} +7 -7
- package/dist/chunks/{options-50kbksvb.js → request-site-g23ffrnz.js} +2 -2
- package/dist/chunks/{options-7t0tq67e.js → request-site-g4964mny.js} +3 -3
- package/dist/chunks/{options-j4at0y5c.js → request-site-j4at0y5c.js} +1 -1
- package/dist/chunks/{options-t62b1gmw.js → request-site-javgytnb.js} +2 -2
- package/dist/chunks/{options-p4zkxzv7.js → request-site-k74zefsg.js} +1 -1
- package/dist/chunks/{options-8n1ypg70.js → request-site-kmwr1xw9.js} +3 -3
- package/dist/chunks/{options-6s1v5h8n.js → request-site-kshqfq8s.js} +4 -4
- package/dist/chunks/{options-1jwvq3yw.js → request-site-mnjcp51m.js} +35 -35
- package/dist/chunks/{options-myqk22k5.js → request-site-myqk22k5.js} +2 -2
- package/dist/chunks/{options-w9jcwh65.js → request-site-mzs0n5xz.js} +7 -7
- package/dist/chunks/{options-p9wp66hf.js → request-site-n2zyxnzr.js} +1 -1
- package/dist/chunks/{options-6s5ea070.js → request-site-nswmrzft.js} +14 -9
- package/dist/chunks/{options-wh07bcjv.js → request-site-p3bbq7g3.js} +1 -1
- package/dist/chunks/{options-eybg47bf.js → request-site-pmv5pv9v.js} +4 -4
- package/dist/chunks/{options-8mfdzabk.js → request-site-prwd5gwt.js} +2 -2
- package/dist/chunks/{options-7x6cg3xs.js → request-site-qq3f8fnn.js} +2 -2
- package/dist/chunks/{options-b87bs0cf.js → request-site-rgbnpstw.js} +2 -2
- package/dist/chunks/{options-v0z8pce5.js → request-site-rjhxbsc4.js} +2 -2
- package/dist/chunks/{options-rktygpea.js → request-site-rktygpea.js} +1 -1
- package/dist/chunks/{options-w0qzmhfg.js → request-site-rm5kndzh.js} +4 -4
- package/dist/chunks/{options-smaf4a18.js → request-site-rqgv9x42.js} +6 -2
- package/dist/chunks/{options-8qp1zyc6.js → request-site-rs6c9pjq.js} +9 -9
- package/dist/chunks/{options-d0advawr.js → request-site-s0zgx365.js} +2 -2
- package/dist/chunks/{options-t32e1bbt.js → request-site-t32e1bbt.js} +1 -1
- package/dist/chunks/{options-s8t5gq7c.js → request-site-whvq72as.js} +3 -3
- package/dist/chunks/{options-4gbck4qg.js → request-site-wsvmph03.js} +2 -2
- package/dist/chunks/{options-7ydfwv45.js → request-site-x2qy7jg1.js} +1 -1
- package/dist/chunks/{options-6t6fd9bq.js → request-site-yc92za0p.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.d.ts +57 -0
- package/dist/fetch.js +63 -61
- 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 +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.d.ts +3 -1
- package/dist/handlers/session-error.js +4 -2
- 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 +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.js +57 -57
- package/dist/server-info.js +5 -5
- package/dist/service-status.js +1 -1
- package/dist/workerd.d.ts +20 -2
- package/dist/workerd.js +88 -68
- package/package.json +8 -8
- package/dist/chunks/options-4apj6a8e.js +0 -13
- /package/dist/chunks/{options-017ycvbx.js → request-site-017ycvbx.js} +0 -0
- /package/dist/chunks/{options-9rqn6x4v.js → request-site-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{options-bd8755ek.js → request-site-bd8755ek.js} +0 -0
- /package/dist/chunks/{options-n26yr6pw.js → request-site-n26yr6pw.js} +0 -0
- /package/dist/chunks/{options-q187pxxd.js → request-site-q187pxxd.js} +0 -0
- /package/dist/chunks/{options-q4bn6dy8.js → request-site-q4bn6dy8.js} +0 -0
- /package/dist/chunks/{options-xthc02cw.js → request-site-xthc02cw.js} +0 -0
- /package/dist/chunks/{options-yc7nft6q.js → request-site-yc7nft6q.js} +0 -0
|
@@ -1,105 +1,105 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GenerateHandler2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-prwd5gwt.js";
|
|
4
4
|
import {
|
|
5
5
|
VoiceHandler2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-rjhxbsc4.js";
|
|
7
7
|
import {
|
|
8
8
|
MessageHandler2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./request-site-g4964mny.js";
|
|
10
10
|
import {
|
|
11
11
|
ModelHandler2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./request-site-s0zgx365.js";
|
|
13
13
|
import {
|
|
14
14
|
ProviderHandler2
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./request-site-yc92za0p.js";
|
|
16
16
|
import {
|
|
17
17
|
SessionHandler2
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./request-site-1dbhk1te.js";
|
|
19
19
|
import {
|
|
20
20
|
PermissionHandler2
|
|
21
|
-
} from "./
|
|
21
|
+
} from "./request-site-kmwr1xw9.js";
|
|
22
22
|
import {
|
|
23
23
|
FileSystemHandler2
|
|
24
|
-
} from "./
|
|
24
|
+
} from "./request-site-pmv5pv9v.js";
|
|
25
25
|
import {
|
|
26
26
|
FormHandler2
|
|
27
|
-
} from "./
|
|
27
|
+
} from "./request-site-8qsq6tbs.js";
|
|
28
28
|
import {
|
|
29
29
|
CommandHandler2
|
|
30
|
-
} from "./
|
|
30
|
+
} from "./request-site-rgbnpstw.js";
|
|
31
31
|
import {
|
|
32
32
|
SkillHandler2
|
|
33
|
-
} from "./
|
|
33
|
+
} from "./request-site-74nxvsrn.js";
|
|
34
34
|
import {
|
|
35
35
|
RpcHandler2
|
|
36
|
-
} from "./
|
|
36
|
+
} from "./request-site-k74zefsg.js";
|
|
37
37
|
import {
|
|
38
|
-
|
|
39
|
-
} from "./
|
|
38
|
+
layer2
|
|
39
|
+
} from "./request-site-fvpjvjpp.js";
|
|
40
40
|
import {
|
|
41
41
|
EventHandler2
|
|
42
|
-
} from "./
|
|
42
|
+
} from "./request-site-kshqfq8s.js";
|
|
43
43
|
import {
|
|
44
44
|
AgentHandler2
|
|
45
|
-
} from "./
|
|
45
|
+
} from "./request-site-exwy1kbj.js";
|
|
46
46
|
import {
|
|
47
47
|
PluginHandler2
|
|
48
|
-
} from "./
|
|
48
|
+
} from "./request-site-em7ed65n.js";
|
|
49
49
|
import {
|
|
50
50
|
ServerHandler2
|
|
51
|
-
} from "./
|
|
51
|
+
} from "./request-site-csetzeb0.js";
|
|
52
52
|
import {
|
|
53
53
|
DebugHandler2
|
|
54
|
-
} from "./
|
|
54
|
+
} from "./request-site-csnx1nj3.js";
|
|
55
55
|
import {
|
|
56
56
|
PtyHandler2
|
|
57
|
-
} from "./
|
|
57
|
+
} from "./request-site-0vqsbvsa.js";
|
|
58
58
|
import {
|
|
59
59
|
PersistentPtyHandler2
|
|
60
|
-
} from "./
|
|
60
|
+
} from "./request-site-rs6c9pjq.js";
|
|
61
61
|
import {
|
|
62
62
|
ShellHandler2
|
|
63
|
-
} from "./
|
|
63
|
+
} from "./request-site-f3gr6hfv.js";
|
|
64
64
|
import {
|
|
65
65
|
ReferenceHandler2
|
|
66
|
-
} from "./
|
|
66
|
+
} from "./request-site-7dkb5ks8.js";
|
|
67
67
|
import {
|
|
68
68
|
LocationHandler2
|
|
69
|
-
} from "./
|
|
69
|
+
} from "./request-site-p3bbq7g3.js";
|
|
70
70
|
import {
|
|
71
71
|
IntegrationHandler2
|
|
72
|
-
} from "./
|
|
72
|
+
} from "./request-site-2tmcamrc.js";
|
|
73
73
|
import {
|
|
74
74
|
WebSearchHandler2
|
|
75
|
-
} from "./
|
|
75
|
+
} from "./request-site-qq3f8fnn.js";
|
|
76
76
|
import {
|
|
77
77
|
UsageHandler2
|
|
78
|
-
} from "./
|
|
78
|
+
} from "./request-site-wsvmph03.js";
|
|
79
79
|
import {
|
|
80
80
|
McpHandler2
|
|
81
|
-
} from "./
|
|
81
|
+
} from "./request-site-rm5kndzh.js";
|
|
82
82
|
import {
|
|
83
83
|
CredentialHandler2
|
|
84
|
-
} from "./
|
|
84
|
+
} from "./request-site-8xdajgpr.js";
|
|
85
85
|
import {
|
|
86
86
|
ProjectHandler2
|
|
87
|
-
} from "./
|
|
87
|
+
} from "./request-site-8nezxn08.js";
|
|
88
88
|
import {
|
|
89
89
|
WorktreeHandler2
|
|
90
|
-
} from "./
|
|
90
|
+
} from "./request-site-n2zyxnzr.js";
|
|
91
91
|
import {
|
|
92
92
|
VcsHandler2
|
|
93
|
-
} from "./
|
|
93
|
+
} from "./request-site-cwx7pqk1.js";
|
|
94
94
|
import {
|
|
95
95
|
MigrationHandler2
|
|
96
|
-
} from "./
|
|
96
|
+
} from "./request-site-10sj2tcf.js";
|
|
97
97
|
import {
|
|
98
98
|
ConfigHandler2
|
|
99
|
-
} from "./
|
|
99
|
+
} from "./request-site-am27j67f.js";
|
|
100
100
|
|
|
101
101
|
// src/handlers.ts
|
|
102
102
|
import { Layer } from "effect";
|
|
103
|
-
var handlers2 = Layer.mergeAll(ServerHandler2, DebugHandler2, MigrationHandler2, LocationHandler2, AgentHandler2, PluginHandler2, SessionHandler2, MessageHandler2, ModelHandler2, GenerateHandler2, VoiceHandler2, ProviderHandler2, IntegrationHandler2, WebSearchHandler2, UsageHandler2, McpHandler2, CredentialHandler2, ProjectHandler2, FormHandler2, PermissionHandler2, FileSystemHandler2, CommandHandler2, SkillHandler2, RpcHandler2, EventHandler2.pipe(Layer.provide(
|
|
103
|
+
var handlers2 = Layer.mergeAll(ServerHandler2, DebugHandler2, MigrationHandler2, LocationHandler2, AgentHandler2, PluginHandler2, SessionHandler2, MessageHandler2, ModelHandler2, GenerateHandler2, VoiceHandler2, ProviderHandler2, IntegrationHandler2, WebSearchHandler2, UsageHandler2, McpHandler2, CredentialHandler2, ProjectHandler2, FormHandler2, PermissionHandler2, FileSystemHandler2, CommandHandler2, SkillHandler2, RpcHandler2, EventHandler2.pipe(Layer.provide(layer2)), PtyHandler2, PersistentPtyHandler2, ShellHandler2, ReferenceHandler2, WorktreeHandler2, VcsHandler2, ConfigHandler2);
|
|
104
104
|
|
|
105
105
|
export { handlers2 };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isAllowedRequestOrigin2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-q4bn6dy8.js";
|
|
4
4
|
import {
|
|
5
5
|
__export
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-9rqn6x4v.js";
|
|
7
7
|
|
|
8
8
|
// src/request-site.ts
|
|
9
9
|
var exports_request_site = {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-9rqn6x4v.js";
|
|
4
4
|
|
|
5
5
|
// src/pairing.ts
|
|
6
6
|
var exports_pairing = {};
|
|
7
7
|
__export(exports_pairing, {
|
|
8
8
|
ServerPairing: () => exports_pairing,
|
|
9
|
-
Service: () =>
|
|
9
|
+
Service: () => Service4,
|
|
10
10
|
node: () => node2
|
|
11
11
|
});
|
|
12
12
|
import { Cache, Context, Duration, Effect, Layer } from "effect";
|
|
@@ -14,12 +14,12 @@ import { makeGlobalNode } from "@opencode/util/effect/app-node";
|
|
|
14
14
|
import { randomBytes } from "node:crypto";
|
|
15
15
|
var TTL = Duration.minutes(5);
|
|
16
16
|
|
|
17
|
-
class
|
|
17
|
+
class Service4 extends Context.Service()("@opencode/ServerPairing") {
|
|
18
18
|
}
|
|
19
19
|
var noLookup = () => Effect.die(new Error("ServerPairing cache must be used via set/invalidateWhen, never get"));
|
|
20
|
-
var layer = Layer.effect(
|
|
20
|
+
var layer = Layer.effect(Service4, Effect.gen(function* () {
|
|
21
21
|
const cache = yield* Cache.make({ capacity: 1000, lookup: noLookup, timeToLive: TTL });
|
|
22
|
-
return
|
|
22
|
+
return Service4.of({
|
|
23
23
|
issue: Effect.fn("ServerPairing.issue")(function* () {
|
|
24
24
|
const code = randomBytes(16).toString("base64url");
|
|
25
25
|
yield* Cache.set(cache, code, true);
|
|
@@ -30,6 +30,6 @@ var layer = Layer.effect(Service3, Effect.gen(function* () {
|
|
|
30
30
|
})
|
|
31
31
|
});
|
|
32
32
|
}));
|
|
33
|
-
var node2 = makeGlobalNode({ service:
|
|
33
|
+
var node2 = makeGlobalNode({ service: Service4, layer, deps: [] });
|
|
34
34
|
|
|
35
|
-
export {
|
|
35
|
+
export { Service4, node2, exports_pairing };
|
|
@@ -1,32 +1,37 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isAllowedCorsOrigin2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-q4bn6dy8.js";
|
|
4
4
|
import {
|
|
5
5
|
middleware2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-myqk22k5.js";
|
|
7
7
|
import {
|
|
8
8
|
withoutParentSpan2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./request-site-yc7nft6q.js";
|
|
10
10
|
import {
|
|
11
11
|
createRoutes2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./request-site-dc91e8gy.js";
|
|
13
13
|
import {
|
|
14
14
|
__export
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./request-site-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: () => make3
|
|
21
|
+
make: () => make3,
|
|
22
|
+
makeWithContext: () => makeWithContext2
|
|
22
23
|
});
|
|
23
24
|
import { Context, Effect, Layer } from "effect";
|
|
24
25
|
import { HttpEffect, HttpMiddleware, HttpRouter, HttpServer } from "effect/http";
|
|
25
26
|
import { SessionRestart } from "@opencode/core/session/execution/restart";
|
|
26
|
-
var
|
|
27
|
+
var makeWithContext2 = Effect.fn("ServerFetch.makeWithContext")(function* (options = {}, boot = {}) {
|
|
27
28
|
const context = yield* Layer.build(createRoutes2(options, () => [], boot.overrides ?? []).pipe(Layer.provide(HttpServer.layerServices))).pipe(withoutParentSpan2);
|
|
28
29
|
yield* Effect.forkDetach(Context.get(context, SessionRestart.Service).resumeSuspendedSessions);
|
|
29
|
-
|
|
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
|
+
return { handler, context };
|
|
32
|
+
});
|
|
33
|
+
var make3 = Effect.fn("ServerFetch.make")(function* (options = {}, boot = {}) {
|
|
34
|
+
return (yield* makeWithContext2(options, boot)).handler;
|
|
30
35
|
});
|
|
31
36
|
|
|
32
|
-
export { make3, exports_fetch };
|
|
37
|
+
export { makeWithContext2, make3, exports_fetch };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-whvq72as.js";
|
|
7
7
|
import {
|
|
8
8
|
download2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./request-site-t32e1bbt.js";
|
|
10
10
|
import {
|
|
11
11
|
parse2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./request-site-8sb6qqpn.js";
|
|
13
13
|
|
|
14
14
|
// src/handlers/fs.ts
|
|
15
15
|
import { FileSystem } from "@opencode/core/filesystem";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
locationErrors2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-whvq72as.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/generate.ts
|
|
9
9
|
import { Generate } from "@opencode/core/generate";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-whvq72as.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
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-whvq72as.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
|
locationErrors2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-whvq72as.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/voice.ts
|
|
9
9
|
import { Location } from "@opencode/core/location";
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
locationErrors2,
|
|
3
3
|
response2,
|
|
4
4
|
requestRef2
|
|
5
|
-
} from "./
|
|
5
|
+
} from "./request-site-br4x4prt.js";
|
|
6
6
|
import {
|
|
7
7
|
Api2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./request-site-whvq72as.js";
|
|
9
9
|
import {
|
|
10
10
|
CorsConfig2,
|
|
11
11
|
isAllowedRequestOrigin2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./request-site-q4bn6dy8.js";
|
|
13
13
|
import {
|
|
14
14
|
runPtySocket2,
|
|
15
15
|
holdLocation2
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./request-site-q187pxxd.js";
|
|
17
17
|
|
|
18
18
|
// src/handlers/mcp.ts
|
|
19
19
|
import { Location } from "@opencode/core/location";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// src/handlers/session-error.ts
|
|
2
|
-
import {
|
|
2
|
+
import { Skill } from "@opencode/core/skill";
|
|
3
|
+
import { MessageNotFoundError, SessionNotFoundError, SkillLoadError, UnknownError } from "@opencode/protocol/errors";
|
|
3
4
|
import { Effect } from "effect";
|
|
4
5
|
function missingSession2(error) {
|
|
5
6
|
return new SessionNotFoundError({
|
|
@@ -7,6 +8,9 @@ function missingSession2(error) {
|
|
|
7
8
|
message: `Session not found: ${error.sessionID}`
|
|
8
9
|
});
|
|
9
10
|
}
|
|
11
|
+
function skillLoadFailed2(error) {
|
|
12
|
+
return new SkillLoadError({ skill: Skill.ID.make(error.skill), message: error.message });
|
|
13
|
+
}
|
|
10
14
|
function missingMessage2(error) {
|
|
11
15
|
return new MessageNotFoundError({
|
|
12
16
|
sessionID: error.sessionID,
|
|
@@ -25,4 +29,4 @@ function failedSnapshot2(operation, sessionID) {
|
|
|
25
29
|
};
|
|
26
30
|
}
|
|
27
31
|
|
|
28
|
-
export { missingSession2, missingMessage2, failedMessageDecode2, failedSnapshot2 };
|
|
32
|
+
export { missingSession2, skillLoadFailed2, missingMessage2, failedMessageDecode2, failedSnapshot2 };
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-whvq72as.js";
|
|
4
4
|
import {
|
|
5
5
|
CorsConfig2,
|
|
6
6
|
isAllowedRequestOrigin2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./request-site-q4bn6dy8.js";
|
|
8
8
|
import {
|
|
9
9
|
makeArtifact2
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./request-site-javgytnb.js";
|
|
11
11
|
import {
|
|
12
12
|
makeBlobGet2
|
|
13
|
-
} from "./
|
|
13
|
+
} from "./request-site-g23ffrnz.js";
|
|
14
14
|
import {
|
|
15
15
|
makeAutomation2
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./request-site-6pm6ek88.js";
|
|
17
17
|
import {
|
|
18
18
|
makeJob2
|
|
19
|
-
} from "./
|
|
19
|
+
} from "./request-site-x2qy7jg1.js";
|
|
20
20
|
import {
|
|
21
21
|
makeMachineLink2,
|
|
22
22
|
makeMachine2
|
|
23
|
-
} from "./
|
|
23
|
+
} from "./request-site-017ycvbx.js";
|
|
24
24
|
import {
|
|
25
25
|
makeMediaGet2
|
|
26
|
-
} from "./
|
|
26
|
+
} from "./request-site-djr0jy89.js";
|
|
27
27
|
import {
|
|
28
28
|
runPtySocket2
|
|
29
|
-
} from "./
|
|
29
|
+
} from "./request-site-q187pxxd.js";
|
|
30
30
|
|
|
31
31
|
// src/handlers/persistent-pty.ts
|
|
32
32
|
import { PersistentPty } from "@opencode/core/persistent-pty";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-whvq72as.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/model.ts
|
|
9
9
|
import { Model } from "@opencode/core/model";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LocationMiddleware2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
FormLocationMiddleware2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-ca564221.js";
|
|
7
7
|
import {
|
|
8
8
|
SessionLocationMiddleware2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./request-site-ehyp3zqd.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
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-whvq72as.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 "./request-site-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-whvq72as.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/provider.ts
|
|
9
9
|
import { Provider } from "@opencode/core/provider";
|
package/dist/content-headers.js
CHANGED
package/dist/cors.js
CHANGED
package/dist/event-feed.js
CHANGED
|
@@ -2,19 +2,19 @@ import {
|
|
|
2
2
|
SubscriberCapacity2,
|
|
3
3
|
SubscriberOverflowError2,
|
|
4
4
|
EncodingError2,
|
|
5
|
-
|
|
5
|
+
Service2,
|
|
6
6
|
frame2,
|
|
7
7
|
make4,
|
|
8
|
-
|
|
8
|
+
layer2,
|
|
9
9
|
exports_event_feed
|
|
10
|
-
} from "./chunks/
|
|
10
|
+
} from "./chunks/request-site-fvpjvjpp.js";
|
|
11
11
|
export {
|
|
12
12
|
EncodingError2 as EncodingError,
|
|
13
13
|
exports_event_feed as EventFeed,
|
|
14
|
-
|
|
14
|
+
Service2 as Service,
|
|
15
15
|
SubscriberCapacity2 as SubscriberCapacity,
|
|
16
16
|
SubscriberOverflowError2 as SubscriberOverflowError,
|
|
17
17
|
frame2 as frame,
|
|
18
|
-
|
|
18
|
+
layer2 as layer,
|
|
19
19
|
make4 as make
|
|
20
20
|
};
|
package/dist/fetch.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * as ServerFetch from "./fetch";
|
|
2
2
|
import { Context, Effect } from "effect";
|
|
3
|
+
import { HttpRouter } from "effect/http";
|
|
4
|
+
import { SessionRestart } from "@opencode/core/session/execution/restart";
|
|
3
5
|
import type { LayerNode } from "@opencode/util/effect/layer-node";
|
|
4
6
|
export interface BootOptions {
|
|
5
7
|
/**
|
|
@@ -8,6 +10,61 @@ export interface BootOptions {
|
|
|
8
10
|
*/
|
|
9
11
|
readonly overrides?: LayerNode.Replacements;
|
|
10
12
|
}
|
|
13
|
+
/** Internal entry for runtime profiles (such as `ServerWorkerd.create`) that also need the built service context. */
|
|
14
|
+
export declare const makeWithContext: (options?: {
|
|
15
|
+
readonly app?: {
|
|
16
|
+
readonly name?: string | undefined;
|
|
17
|
+
readonly version?: string | undefined;
|
|
18
|
+
readonly channel?: string | undefined;
|
|
19
|
+
} | undefined;
|
|
20
|
+
readonly hostname?: string | undefined;
|
|
21
|
+
readonly port?: number | undefined;
|
|
22
|
+
readonly password?: string | undefined;
|
|
23
|
+
readonly cors?: readonly string[] | undefined;
|
|
24
|
+
readonly simulation?: boolean | undefined;
|
|
25
|
+
readonly database?: {
|
|
26
|
+
readonly path?: string | undefined;
|
|
27
|
+
} | undefined;
|
|
28
|
+
readonly pty?: {
|
|
29
|
+
readonly handoff?: {
|
|
30
|
+
readonly directory: string;
|
|
31
|
+
readonly instanceID: string;
|
|
32
|
+
readonly ticket: string;
|
|
33
|
+
readonly expiresAt: number;
|
|
34
|
+
} | undefined;
|
|
35
|
+
readonly root?: string | undefined;
|
|
36
|
+
} | undefined;
|
|
37
|
+
readonly events?: {
|
|
38
|
+
readonly persist?: boolean | undefined;
|
|
39
|
+
} | undefined;
|
|
40
|
+
readonly models?: {
|
|
41
|
+
readonly url?: string | undefined;
|
|
42
|
+
readonly file?: string | undefined;
|
|
43
|
+
readonly fetch?: boolean | undefined;
|
|
44
|
+
readonly snapshot?: boolean | undefined;
|
|
45
|
+
} | undefined;
|
|
46
|
+
readonly fetch?: import("@opencode/util/effect/app-node-platform").Fetch | undefined;
|
|
47
|
+
readonly config?: {
|
|
48
|
+
readonly directory?: string | undefined;
|
|
49
|
+
readonly project?: boolean | undefined;
|
|
50
|
+
readonly claude?: boolean | undefined;
|
|
51
|
+
readonly file?: string | undefined;
|
|
52
|
+
readonly content?: string | undefined;
|
|
53
|
+
} | undefined;
|
|
54
|
+
readonly instructions?: {
|
|
55
|
+
readonly claude?: boolean | undefined;
|
|
56
|
+
} | undefined;
|
|
57
|
+
readonly windows?: {
|
|
58
|
+
readonly gitbash?: string | undefined;
|
|
59
|
+
} | undefined;
|
|
60
|
+
readonly fs?: {
|
|
61
|
+
readonly filewatcher?: boolean | undefined;
|
|
62
|
+
readonly fff?: boolean | undefined;
|
|
63
|
+
} | undefined;
|
|
64
|
+
} | undefined, boot?: BootOptions | undefined) => Effect.Effect<{
|
|
65
|
+
handler: (request: Request, context?: Context.Context<never> | undefined) => Promise<globalThis.Response>;
|
|
66
|
+
context: Context.Context<import("@opencode/core/shell").Daemon | import("effect/http/HttpClient").HttpClient | HttpRouter.HttpRouter | import("@opencode/util/fs-util").FSUtil.Service | import("@opencode/util/global").Service | import("@opencode/core/database/database").Service | import("@opencode/core/app").Service | import("@opencode/core/credential").Service | import("@opencode/core/kv").Service | import("@opencode/core/wellknown").Service | import("@opencode/core/session/instruction-entry").Service | import("@opencode/core/job").Service | import("@opencode/core/machine/identity").Service | import("@opencode/core/machine/machines").Service | import("@opencode/core/workspace").Service | import("@opencode/core/permission/saved").Service | import("@opencode/core/codemode/api").Service | import("@opencode/core/location-service-map").Service | import("@opencode/core/persistent-pty/index").Service | import("@opencode/core/session").Service | import("@opencode/core/automation").Service | import("@opencode/core/worktree").Service | import("@opencode/core/blob-store").Service | import("@opencode/core/session/search-build").Service | import("@opencode/core/video-generation").Service | import("@opencode/core/plugin/sdk").Service | import("@opencode/core/plugin/update").Service | import("@opencode/core/instance").Service | import("@opencode/core/bus").Service | import("@opencode/core/project").Service | SessionRestart.Service | import("@opencode/core/pty/ticket").Service | import("@opencode/core/session/transfer").Service | import("@opencode/core/location-activity").Service | import("@opencode/core/filesystem/file-watch").Service | import("./pairing").Service>;
|
|
67
|
+
}, Error, import("effect/Scope").Scope>;
|
|
11
68
|
/**
|
|
12
69
|
* Builds a web-standard fetch handler — `(request: Request) => Promise<Response>` — serving the
|
|
13
70
|
* same HttpApi routes as the Node server process without binding a port, owning a listener, or
|