@opencode/server 0.0.0-dev-20113 → 0.0.0-dev-20115
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.d.ts +4 -0
- package/dist/auth.js +10 -2
- package/dist/chunks/{options-5bwq5cz2.js → fetch-1g0h49bb.js} +2 -2
- package/dist/chunks/{options-xewf68xm.js → fetch-1y0kev0a.js} +19 -15
- package/dist/chunks/{options-5rwqcaw2.js → fetch-27edjygf.js} +1 -1
- package/dist/chunks/{options-wz0qz28j.js → fetch-2nqgjchx.js} +2 -2
- package/dist/chunks/{options-18k6g42r.js → fetch-3jweah5a.js} +7 -7
- package/dist/chunks/{options-b1rdg9nf.js → fetch-42hredtt.js} +2 -2
- package/dist/chunks/{options-6qwktr1g.js → fetch-436zj0s2.js} +1 -1
- package/dist/chunks/{options-hp5sxeae.js → fetch-4zhj4tp6.js} +2 -2
- package/dist/chunks/{options-5jh9m3wx.js → fetch-5xpvxbxg.js} +5 -5
- package/dist/chunks/{options-g1cbdcxy.js → fetch-70rdrjmf.js} +4 -4
- package/dist/chunks/{options-v1emgcvb.js → fetch-77mkgw7d.js} +2 -2
- package/dist/chunks/{options-x5ncpjy3.js → fetch-830yc5sa.js} +1 -1
- package/dist/chunks/{options-6gkz39ey.js → fetch-8j6eh3dh.js} +3 -3
- package/dist/chunks/{options-haswyr8z.js → fetch-8tzsm9rr.js} +2 -2
- package/dist/chunks/{options-tjpn0s1b.js → fetch-99sfd1j8.js} +10 -10
- package/dist/chunks/{options-qj9kjxn3.js → fetch-9gjx5y7a.js} +1 -1
- package/dist/chunks/{options-s0padj6k.js → fetch-9qna85w8.js} +3 -3
- package/dist/chunks/fetch-anm12x33.js +66 -0
- package/dist/chunks/{options-v573ws0d.js → fetch-cb0457h1.js} +3 -3
- package/dist/chunks/{options-hr75rahr.js → fetch-fbrf1xh2.js} +2 -2
- package/dist/chunks/{options-m6wvgbfq.js → fetch-gtkdacvk.js} +28 -7
- package/dist/chunks/{options-ees77nh9.js → fetch-h7dczx71.js} +2 -2
- package/dist/chunks/{options-3kzx88w9.js → fetch-kb9735wh.js} +1 -1
- package/dist/chunks/{options-44xy5pnk.js → fetch-kbnh7vq7.js} +1 -1
- package/dist/chunks/{options-zpz5afwq.js → fetch-kpeb8xpg.js} +2 -2
- package/dist/chunks/{options-f1xg0r1h.js → fetch-kwec6m6e.js} +33 -33
- package/dist/chunks/{options-bt9tc5rb.js → fetch-m7cvtaax.js} +1 -1
- package/dist/chunks/{options-96s6m0w3.js → fetch-nq5wb210.js} +2 -2
- package/dist/chunks/{options-7eckj7zq.js → fetch-nq63h5nv.js} +2 -2
- package/dist/chunks/{options-rjqbhscq.js → fetch-qvxvnv5e.js} +1 -1
- package/dist/chunks/{options-pme11y2y.js → fetch-rnws4wbc.js} +2 -2
- package/dist/chunks/{options-t88f2hhf.js → fetch-rre9g8c5.js} +3 -3
- package/dist/chunks/fetch-sstsrjtg.js +35 -0
- package/dist/chunks/fetch-sxpmt7wt.js +53 -0
- package/dist/chunks/{options-bkk2wfbz.js → fetch-t7k3q1ah.js} +5 -5
- package/dist/chunks/{options-140y8w7p.js → fetch-tj793hqk.js} +2 -2
- package/dist/chunks/{options-f8rap8f6.js → fetch-vgwss5ek.js} +1 -1
- package/dist/chunks/{options-aa9bsk9n.js → fetch-vmxdyx1n.js} +6 -6
- package/dist/chunks/{options-ctscy0f5.js → fetch-x34qkqqy.js} +2 -2
- package/dist/chunks/{options-vpz7f20y.js → fetch-xsrtpxyd.js} +4 -4
- package/dist/chunks/{options-bmqkn4ah.js → fetch-y7jha6td.js} +1 -1
- package/dist/chunks/{options-np19kmxx.js → fetch-ybejac25.js} +2 -2
- package/dist/chunks/{options-26ta7ngt.js → fetch-ywj7qjmv.js} +2 -2
- package/dist/chunks/{options-367ngss7.js → fetch-yybhtx8s.js} +2 -2
- package/dist/cors.js +1 -1
- package/dist/event-feed.js +7 -7
- package/dist/fetch.js +49 -48
- package/dist/handlers/agent.js +6 -6
- package/dist/handlers/command.js +6 -6
- package/dist/handlers/config.js +6 -6
- package/dist/handlers/credential.js +6 -6
- 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 +6 -6
- package/dist/handlers/generate.js +6 -6
- package/dist/handlers/integration.js +6 -6
- package/dist/handlers/location.js +6 -6
- package/dist/handlers/mcp.js +6 -6
- package/dist/handlers/message.js +6 -6
- 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 +8 -8
- 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 +9 -9
- package/dist/handlers/reference.js +6 -6
- package/dist/handlers/rpc.js +6 -6
- package/dist/handlers/server.d.ts +3 -1
- package/dist/handlers/server.js +9 -7
- package/dist/handlers/session-error.js +1 -1
- package/dist/handlers/session.js +6 -6
- package/dist/handlers/shell.js +6 -6
- package/dist/handlers/skill.js +6 -6
- package/dist/handlers/vcs.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 +43 -41
- package/dist/location.js +4 -4
- package/dist/middleware/authorization.d.ts +2 -1
- package/dist/middleware/authorization.js +5 -3
- 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.d.ts +13 -0
- package/dist/pairing.js +10 -0
- package/dist/process.js +56 -59
- package/dist/pty-environment.js +3 -3
- package/dist/request-tracing.js +1 -1
- package/dist/routes.d.ts +3 -2
- package/dist/routes.js +46 -45
- package/dist/server-info.js +5 -5
- package/dist/service-status.js +3 -3
- package/dist/workerd.js +50 -49
- package/package.json +8 -8
- package/dist/chunks/options-veszktdp.js +0 -21
- package/dist/chunks/options-zyv89x5n.js +0 -30
- /package/dist/chunks/{options-9rqn6x4v.js → fetch-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{options-hezj1jdf.js → fetch-hezj1jdf.js} +0 -0
- /package/dist/chunks/{options-q4bn6dy8.js → fetch-q4bn6dy8.js} +0 -0
- /package/dist/chunks/{options-smaf4a18.js → fetch-smaf4a18.js} +0 -0
- /package/dist/chunks/{options-t8yzmczr.js → fetch-t8yzmczr.js} +0 -0
- /package/dist/chunks/{options-yc7nft6q.js → fetch-yc7nft6q.js} +0 -0
|
@@ -1,99 +1,99 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GenerateHandler2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-qvxvnv5e.js";
|
|
4
4
|
import {
|
|
5
5
|
MessageHandler2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./fetch-ywj7qjmv.js";
|
|
7
7
|
import {
|
|
8
8
|
ModelHandler2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./fetch-42hredtt.js";
|
|
10
10
|
import {
|
|
11
11
|
ProviderHandler2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./fetch-8tzsm9rr.js";
|
|
13
13
|
import {
|
|
14
14
|
SessionHandler2
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./fetch-yybhtx8s.js";
|
|
16
16
|
import {
|
|
17
17
|
PermissionHandler2
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./fetch-rre9g8c5.js";
|
|
19
19
|
import {
|
|
20
20
|
FileSystemHandler2
|
|
21
|
-
} from "./
|
|
21
|
+
} from "./fetch-nq5wb210.js";
|
|
22
22
|
import {
|
|
23
23
|
FormHandler2
|
|
24
|
-
} from "./
|
|
24
|
+
} from "./fetch-h7dczx71.js";
|
|
25
25
|
import {
|
|
26
26
|
CommandHandler2
|
|
27
|
-
} from "./
|
|
27
|
+
} from "./fetch-rnws4wbc.js";
|
|
28
28
|
import {
|
|
29
29
|
SkillHandler2
|
|
30
|
-
} from "./
|
|
30
|
+
} from "./fetch-4zhj4tp6.js";
|
|
31
31
|
import {
|
|
32
32
|
RpcHandler2
|
|
33
|
-
} from "./
|
|
33
|
+
} from "./fetch-vgwss5ek.js";
|
|
34
34
|
import {
|
|
35
|
-
|
|
36
|
-
} from "./
|
|
35
|
+
layer5
|
|
36
|
+
} from "./fetch-99sfd1j8.js";
|
|
37
37
|
import {
|
|
38
38
|
EventHandler2
|
|
39
|
-
} from "./
|
|
39
|
+
} from "./fetch-70rdrjmf.js";
|
|
40
40
|
import {
|
|
41
41
|
AgentHandler2
|
|
42
|
-
} from "./
|
|
42
|
+
} from "./fetch-x34qkqqy.js";
|
|
43
43
|
import {
|
|
44
44
|
PluginHandler2
|
|
45
|
-
} from "./
|
|
45
|
+
} from "./fetch-fbrf1xh2.js";
|
|
46
46
|
import {
|
|
47
47
|
ServerHandler2
|
|
48
|
-
} from "./
|
|
48
|
+
} from "./fetch-sxpmt7wt.js";
|
|
49
49
|
import {
|
|
50
50
|
DebugHandler2
|
|
51
|
-
} from "./
|
|
51
|
+
} from "./fetch-tj793hqk.js";
|
|
52
52
|
import {
|
|
53
53
|
PtyHandler2
|
|
54
|
-
} from "./
|
|
54
|
+
} from "./fetch-5xpvxbxg.js";
|
|
55
55
|
import {
|
|
56
56
|
PersistentPtyHandler2
|
|
57
|
-
} from "./
|
|
57
|
+
} from "./fetch-9qna85w8.js";
|
|
58
58
|
import {
|
|
59
59
|
ShellHandler2
|
|
60
|
-
} from "./
|
|
60
|
+
} from "./fetch-nq63h5nv.js";
|
|
61
61
|
import {
|
|
62
62
|
ReferenceHandler2
|
|
63
|
-
} from "./
|
|
63
|
+
} from "./fetch-1g0h49bb.js";
|
|
64
64
|
import {
|
|
65
65
|
LocationHandler2
|
|
66
|
-
} from "./
|
|
66
|
+
} from "./fetch-830yc5sa.js";
|
|
67
67
|
import {
|
|
68
68
|
IntegrationHandler2
|
|
69
|
-
} from "./
|
|
69
|
+
} from "./fetch-ybejac25.js";
|
|
70
70
|
import {
|
|
71
71
|
WebSearchHandler2
|
|
72
|
-
} from "./
|
|
72
|
+
} from "./fetch-77mkgw7d.js";
|
|
73
73
|
import {
|
|
74
74
|
McpHandler2
|
|
75
|
-
} from "./
|
|
75
|
+
} from "./fetch-2nqgjchx.js";
|
|
76
76
|
import {
|
|
77
77
|
CredentialHandler2
|
|
78
|
-
} from "./
|
|
78
|
+
} from "./fetch-kbnh7vq7.js";
|
|
79
79
|
import {
|
|
80
80
|
ProjectHandler2
|
|
81
|
-
} from "./
|
|
81
|
+
} from "./fetch-9gjx5y7a.js";
|
|
82
82
|
import {
|
|
83
83
|
WorktreeHandler2
|
|
84
|
-
} from "./
|
|
84
|
+
} from "./fetch-m7cvtaax.js";
|
|
85
85
|
import {
|
|
86
86
|
VcsHandler2
|
|
87
|
-
} from "./
|
|
87
|
+
} from "./fetch-kpeb8xpg.js";
|
|
88
88
|
import {
|
|
89
89
|
MigrationHandler2
|
|
90
|
-
} from "./
|
|
90
|
+
} from "./fetch-y7jha6td.js";
|
|
91
91
|
import {
|
|
92
92
|
ConfigHandler2
|
|
93
|
-
} from "./
|
|
93
|
+
} from "./fetch-436zj0s2.js";
|
|
94
94
|
|
|
95
95
|
// src/handlers.ts
|
|
96
96
|
import { Layer } from "effect";
|
|
97
|
-
var handlers2 = Layer.mergeAll(ServerHandler2, DebugHandler2, MigrationHandler2, LocationHandler2, AgentHandler2, PluginHandler2, SessionHandler2, MessageHandler2, ModelHandler2, GenerateHandler2, ProviderHandler2, IntegrationHandler2, WebSearchHandler2, McpHandler2, CredentialHandler2, ProjectHandler2, FormHandler2, PermissionHandler2, FileSystemHandler2, CommandHandler2, SkillHandler2, RpcHandler2, EventHandler2.pipe(Layer.provide(
|
|
97
|
+
var handlers2 = Layer.mergeAll(ServerHandler2, DebugHandler2, MigrationHandler2, LocationHandler2, AgentHandler2, PluginHandler2, SessionHandler2, MessageHandler2, ModelHandler2, GenerateHandler2, ProviderHandler2, IntegrationHandler2, WebSearchHandler2, McpHandler2, CredentialHandler2, ProjectHandler2, FormHandler2, PermissionHandler2, FileSystemHandler2, CommandHandler2, SkillHandler2, RpcHandler2, EventHandler2.pipe(Layer.provide(layer5)), PtyHandler2, PersistentPtyHandler2, ShellHandler2, ReferenceHandler2, WorktreeHandler2, VcsHandler2, ConfigHandler2);
|
|
98
98
|
|
|
99
99
|
export { handlers2 };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
missingSession2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-smaf4a18.js";
|
|
4
4
|
import {
|
|
5
5
|
response2,
|
|
6
6
|
sessionInfo2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./fetch-8j6eh3dh.js";
|
|
8
8
|
import {
|
|
9
9
|
Api2
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./fetch-cb0457h1.js";
|
|
11
11
|
|
|
12
12
|
// src/handlers/permission.ts
|
|
13
13
|
import { Instance } from "@opencode/core/instance/service";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__export
|
|
3
|
+
} from "./fetch-9rqn6x4v.js";
|
|
4
|
+
|
|
5
|
+
// src/pairing.ts
|
|
6
|
+
var exports_pairing = {};
|
|
7
|
+
__export(exports_pairing, {
|
|
8
|
+
ServerPairing: () => exports_pairing,
|
|
9
|
+
Service: () => Service5,
|
|
10
|
+
node: () => node3
|
|
11
|
+
});
|
|
12
|
+
import { Cache, Context, Duration, Effect, Layer } from "effect";
|
|
13
|
+
import { makeGlobalNode } from "@opencode/util/effect/app-node";
|
|
14
|
+
import { randomBytes } from "node:crypto";
|
|
15
|
+
var TTL = Duration.minutes(5);
|
|
16
|
+
|
|
17
|
+
class Service5 extends Context.Service()("@opencode/ServerPairing") {
|
|
18
|
+
}
|
|
19
|
+
var noLookup = () => Effect.die(new Error("ServerPairing cache must be used via set/invalidateWhen, never get"));
|
|
20
|
+
var layer = Layer.effect(Service5, Effect.gen(function* () {
|
|
21
|
+
const cache = yield* Cache.make({ capacity: 1000, lookup: noLookup, timeToLive: TTL });
|
|
22
|
+
return Service5.of({
|
|
23
|
+
issue: Effect.fn("ServerPairing.issue")(function* () {
|
|
24
|
+
const code = randomBytes(16).toString("base64url");
|
|
25
|
+
yield* Cache.set(cache, code, true);
|
|
26
|
+
return { code, expires_in: Duration.toSeconds(TTL) };
|
|
27
|
+
}),
|
|
28
|
+
consume: Effect.fn("ServerPairing.consume")(function* (code) {
|
|
29
|
+
return yield* Cache.invalidateWhen(cache, code, () => true);
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
}));
|
|
33
|
+
var node3 = makeGlobalNode({ service: Service5, layer, deps: [] });
|
|
34
|
+
|
|
35
|
+
export { Service5, node3, exports_pairing };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Api2
|
|
3
|
+
} from "./fetch-cb0457h1.js";
|
|
4
|
+
import {
|
|
5
|
+
SESSION_TTL_SECONDS2,
|
|
6
|
+
Config2,
|
|
7
|
+
issueSession2,
|
|
8
|
+
sessionCookieName2
|
|
9
|
+
} from "./fetch-anm12x33.js";
|
|
10
|
+
import {
|
|
11
|
+
Service3
|
|
12
|
+
} from "./fetch-3jweah5a.js";
|
|
13
|
+
import {
|
|
14
|
+
Service5
|
|
15
|
+
} from "./fetch-sstsrjtg.js";
|
|
16
|
+
|
|
17
|
+
// src/handlers/server.ts
|
|
18
|
+
import { Duration, Effect } from "effect";
|
|
19
|
+
import { HttpServerRequest, HttpServerResponse } from "effect/unstable/http";
|
|
20
|
+
import { HttpApiBuilder } from "effect/unstable/httpapi";
|
|
21
|
+
import { UnauthorizedError } from "@opencode/protocol/errors";
|
|
22
|
+
var ServerHandler2 = HttpApiBuilder.group(Api2, "server.server", (handlers) => Effect.gen(function* () {
|
|
23
|
+
const pairing = yield* Service5;
|
|
24
|
+
const auth = yield* Config2;
|
|
25
|
+
return handlers.handle("server.info", () => Effect.gen(function* () {
|
|
26
|
+
const info = yield* Service3;
|
|
27
|
+
return {
|
|
28
|
+
version: info.app.version ?? "unknown",
|
|
29
|
+
pid: process.pid ?? 0,
|
|
30
|
+
urls: info.urls(),
|
|
31
|
+
paths: info.paths
|
|
32
|
+
};
|
|
33
|
+
})).handle("server.pair", () => pairing.issue()).handle("server.connect", Effect.fn(function* (ctx) {
|
|
34
|
+
const request = yield* HttpServerRequest.HttpServerRequest;
|
|
35
|
+
const browser = request.headers.accept?.includes("text/html") === true;
|
|
36
|
+
const token = (yield* pairing.consume(ctx.params.code)) ? issueSession2(auth) : undefined;
|
|
37
|
+
if (token === undefined) {
|
|
38
|
+
if (!browser)
|
|
39
|
+
return yield* new UnauthorizedError({ message: "Pairing link expired or already used" });
|
|
40
|
+
return HttpServerResponse.text("This pairing link expired or was already used. Run `opencode pair` to get a new one.", { status: 401 });
|
|
41
|
+
}
|
|
42
|
+
if (!browser)
|
|
43
|
+
return { token };
|
|
44
|
+
return HttpServerResponse.redirect("/").pipe(HttpServerResponse.setCookieUnsafe(sessionCookieName2(request.headers.host), token, {
|
|
45
|
+
path: "/",
|
|
46
|
+
httpOnly: true,
|
|
47
|
+
sameSite: "lax",
|
|
48
|
+
maxAge: Duration.seconds(SESSION_TTL_SECONDS2)
|
|
49
|
+
}));
|
|
50
|
+
}));
|
|
51
|
+
}));
|
|
52
|
+
|
|
53
|
+
export { ServerHandler2 };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-9rqn6x4v.js";
|
|
4
4
|
|
|
5
5
|
// src/pty-environment.ts
|
|
6
6
|
var exports_pty_environment = {};
|
|
7
7
|
__export(exports_pty_environment, {
|
|
8
8
|
PtyEnvironment: () => exports_pty_environment,
|
|
9
9
|
Service: () => Service2,
|
|
10
|
-
layer: () =>
|
|
10
|
+
layer: () => layer3,
|
|
11
11
|
node: () => node2
|
|
12
12
|
});
|
|
13
13
|
import { Context, Effect, Layer } from "effect";
|
|
@@ -15,9 +15,9 @@ import { makeGlobalNode } from "@opencode/util/effect/app-node";
|
|
|
15
15
|
|
|
16
16
|
class Service2 extends Context.Service()("@opencode/ServerPtyEnvironment") {
|
|
17
17
|
}
|
|
18
|
-
var
|
|
18
|
+
var layer3 = Layer.succeed(Service2, Service2.of({
|
|
19
19
|
get: () => Effect.succeed({})
|
|
20
20
|
}));
|
|
21
|
-
var node2 = makeGlobalNode({ service: Service2, layer:
|
|
21
|
+
var node2 = makeGlobalNode({ service: Service2, layer: layer3, deps: [] });
|
|
22
22
|
|
|
23
|
-
export { Service2,
|
|
23
|
+
export { Service2, layer3, node2, exports_pty_environment };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
requestRef2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-8j6eh3dh.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./fetch-cb0457h1.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/debug.ts
|
|
9
9
|
import { LocationServiceMap } from "@opencode/core/location-service-map";
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isAllowedCorsOrigin2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-q4bn6dy8.js";
|
|
4
4
|
import {
|
|
5
5
|
createRoutes2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./fetch-1y0kev0a.js";
|
|
7
7
|
import {
|
|
8
8
|
__export
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./fetch-9rqn6x4v.js";
|
|
10
10
|
|
|
11
11
|
// src/fetch.ts
|
|
12
12
|
var exports_fetch = {};
|
|
13
13
|
__export(exports_fetch, {
|
|
14
14
|
ServerFetch: () => exports_fetch,
|
|
15
|
-
make: () =>
|
|
15
|
+
make: () => make3
|
|
16
16
|
});
|
|
17
17
|
import { Context, Effect, Layer } from "effect";
|
|
18
18
|
import { HttpEffect, HttpMiddleware, HttpRouter, HttpServer } from "effect/unstable/http";
|
|
19
19
|
import { SessionRestart } from "@opencode/core/session/execution/restart";
|
|
20
|
-
var
|
|
20
|
+
var make3 = Effect.fn("ServerFetch.make")(function* (options = {}, boot = {}) {
|
|
21
21
|
const context = yield* Layer.build(createRoutes2(options, () => [], boot.overrides ?? []).pipe(Layer.provide(HttpServer.layerServices)));
|
|
22
22
|
yield* Effect.forkDetach(Context.get(context, SessionRestart.Service).resumeSuspendedSessions);
|
|
23
23
|
return Context.get(context, HttpRouter.HttpRouter).asHttpEffect().pipe(HttpMiddleware.cors({ allowedOrigins: (origin) => isAllowedCorsOrigin2(origin, options), maxAge: 86400 }), HttpEffect.toWebHandlerWith(context));
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
-
export {
|
|
26
|
+
export { make3, exports_fetch };
|
|
@@ -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: () => make2
|
|
10
10
|
});
|
|
11
11
|
import { Effect, Ref } from "effect";
|
|
12
|
-
var
|
|
12
|
+
var make2 = 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 make4 = Effect.fnUntraced(function* (options = {}) {
|
|
|
20
20
|
};
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
-
export {
|
|
23
|
+
export { make2, exports_service_status };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-8j6eh3dh.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./fetch-cb0457h1.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/integration.ts
|
|
9
9
|
import { Integration } from "@opencode/core/integration";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
missingSession2,
|
|
3
3
|
failedMessageDecode2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./fetch-smaf4a18.js";
|
|
5
5
|
import {
|
|
6
6
|
Api2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./fetch-cb0457h1.js";
|
|
8
8
|
|
|
9
9
|
// src/handlers/message.ts
|
|
10
10
|
import { SessionMessage } from "@opencode/core/session/message";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
missingMessage2,
|
|
4
4
|
failedMessageDecode2,
|
|
5
5
|
failedSnapshot2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./fetch-smaf4a18.js";
|
|
7
7
|
import {
|
|
8
8
|
Api2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./fetch-cb0457h1.js";
|
|
10
10
|
|
|
11
11
|
// src/handlers/session.ts
|
|
12
12
|
import { Session } from "@opencode/core/session";
|
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
|
+
Service4,
|
|
6
6
|
frame2,
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
make4,
|
|
8
|
+
layer5,
|
|
9
9
|
exports_event_feed
|
|
10
|
-
} from "./chunks/
|
|
10
|
+
} from "./chunks/fetch-99sfd1j8.js";
|
|
11
11
|
export {
|
|
12
12
|
EncodingError2 as EncodingError,
|
|
13
13
|
exports_event_feed as EventFeed,
|
|
14
|
-
|
|
14
|
+
Service4 as Service,
|
|
15
15
|
SubscriberCapacity2 as SubscriberCapacity,
|
|
16
16
|
SubscriberOverflowError2 as SubscriberOverflowError,
|
|
17
17
|
frame2 as frame,
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
layer5 as layer,
|
|
19
|
+
make4 as make
|
|
20
20
|
};
|
package/dist/fetch.js
CHANGED
|
@@ -1,53 +1,54 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
make3,
|
|
3
3
|
exports_fetch
|
|
4
|
-
} from "./chunks/
|
|
5
|
-
import"./chunks/
|
|
6
|
-
import"./chunks/
|
|
7
|
-
import"./chunks/
|
|
8
|
-
import"./chunks/
|
|
9
|
-
import"./chunks/
|
|
10
|
-
import"./chunks/
|
|
11
|
-
import"./chunks/
|
|
12
|
-
import"./chunks/
|
|
13
|
-
import"./chunks/
|
|
14
|
-
import"./chunks/
|
|
15
|
-
import"./chunks/
|
|
16
|
-
import"./chunks/
|
|
17
|
-
import"./chunks/
|
|
18
|
-
import"./chunks/
|
|
19
|
-
import"./chunks/
|
|
20
|
-
import"./chunks/
|
|
21
|
-
import"./chunks/
|
|
22
|
-
import"./chunks/
|
|
23
|
-
import"./chunks/
|
|
24
|
-
import"./chunks/
|
|
25
|
-
import"./chunks/
|
|
26
|
-
import"./chunks/
|
|
27
|
-
import"./chunks/
|
|
28
|
-
import"./chunks/
|
|
29
|
-
import"./chunks/
|
|
30
|
-
import"./chunks/
|
|
31
|
-
import"./chunks/
|
|
32
|
-
import"./chunks/
|
|
33
|
-
import"./chunks/
|
|
34
|
-
import"./chunks/
|
|
35
|
-
import"./chunks/
|
|
36
|
-
import"./chunks/
|
|
37
|
-
import"./chunks/
|
|
38
|
-
import"./chunks/
|
|
39
|
-
import"./chunks/
|
|
40
|
-
import"./chunks/
|
|
41
|
-
import"./chunks/
|
|
42
|
-
import"./chunks/
|
|
43
|
-
import"./chunks/
|
|
44
|
-
import"./chunks/
|
|
45
|
-
import"./chunks/
|
|
46
|
-
import"./chunks/
|
|
47
|
-
import"./chunks/
|
|
48
|
-
import"./chunks/
|
|
49
|
-
import"./chunks/
|
|
4
|
+
} from "./chunks/fetch-vmxdyx1n.js";
|
|
5
|
+
import"./chunks/fetch-1y0kev0a.js";
|
|
6
|
+
import"./chunks/fetch-gtkdacvk.js";
|
|
7
|
+
import"./chunks/fetch-t8yzmczr.js";
|
|
8
|
+
import"./chunks/fetch-kwec6m6e.js";
|
|
9
|
+
import"./chunks/fetch-rre9g8c5.js";
|
|
10
|
+
import"./chunks/fetch-yybhtx8s.js";
|
|
11
|
+
import"./chunks/fetch-830yc5sa.js";
|
|
12
|
+
import"./chunks/fetch-m7cvtaax.js";
|
|
13
|
+
import"./chunks/fetch-5xpvxbxg.js";
|
|
14
|
+
import"./chunks/fetch-h7dczx71.js";
|
|
15
|
+
import"./chunks/fetch-tj793hqk.js";
|
|
16
|
+
import"./chunks/fetch-4zhj4tp6.js";
|
|
17
|
+
import"./chunks/fetch-vgwss5ek.js";
|
|
18
|
+
import"./chunks/fetch-70rdrjmf.js";
|
|
19
|
+
import"./chunks/fetch-kpeb8xpg.js";
|
|
20
|
+
import"./chunks/fetch-sxpmt7wt.js";
|
|
21
|
+
import"./chunks/fetch-1g0h49bb.js";
|
|
22
|
+
import"./chunks/fetch-9qna85w8.js";
|
|
23
|
+
import"./chunks/fetch-x34qkqqy.js";
|
|
24
|
+
import"./chunks/fetch-hezj1jdf.js";
|
|
25
|
+
import"./chunks/fetch-42hredtt.js";
|
|
26
|
+
import"./chunks/fetch-kbnh7vq7.js";
|
|
27
|
+
import"./chunks/fetch-nq5wb210.js";
|
|
28
|
+
import"./chunks/fetch-8tzsm9rr.js";
|
|
29
|
+
import"./chunks/fetch-ywj7qjmv.js";
|
|
30
|
+
import"./chunks/fetch-2nqgjchx.js";
|
|
31
|
+
import"./chunks/fetch-436zj0s2.js";
|
|
32
|
+
import"./chunks/fetch-y7jha6td.js";
|
|
33
|
+
import"./chunks/fetch-nq63h5nv.js";
|
|
34
|
+
import"./chunks/fetch-9gjx5y7a.js";
|
|
35
|
+
import"./chunks/fetch-fbrf1xh2.js";
|
|
36
|
+
import"./chunks/fetch-qvxvnv5e.js";
|
|
37
|
+
import"./chunks/fetch-ybejac25.js";
|
|
38
|
+
import"./chunks/fetch-77mkgw7d.js";
|
|
39
|
+
import"./chunks/fetch-rnws4wbc.js";
|
|
40
|
+
import"./chunks/fetch-anm12x33.js";
|
|
41
|
+
import"./chunks/fetch-cb0457h1.js";
|
|
42
|
+
import"./chunks/fetch-27edjygf.js";
|
|
43
|
+
import"./chunks/fetch-kb9735wh.js";
|
|
44
|
+
import"./chunks/fetch-8j6eh3dh.js";
|
|
45
|
+
import"./chunks/fetch-smaf4a18.js";
|
|
46
|
+
import"./chunks/fetch-t7k3q1ah.js";
|
|
47
|
+
import"./chunks/fetch-3jweah5a.js";
|
|
48
|
+
import"./chunks/fetch-99sfd1j8.js";
|
|
49
|
+
import"./chunks/fetch-q4bn6dy8.js";
|
|
50
|
+
import"./chunks/fetch-sstsrjtg.js";
|
|
50
51
|
export {
|
|
51
52
|
exports_fetch as ServerFetch,
|
|
52
|
-
|
|
53
|
+
make3 as make
|
|
53
54
|
};
|
package/dist/handlers/agent.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/fetch-x34qkqqy.js";
|
|
4
|
+
import"../chunks/fetch-cb0457h1.js";
|
|
5
|
+
import"../chunks/fetch-27edjygf.js";
|
|
6
|
+
import"../chunks/fetch-kb9735wh.js";
|
|
7
|
+
import"../chunks/fetch-8j6eh3dh.js";
|
|
8
|
+
import"../chunks/fetch-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
AgentHandler2 as AgentHandler
|
|
11
11
|
};
|