@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.
Files changed (110) hide show
  1. package/dist/api.js +5 -5
  2. package/dist/auth.d.ts +4 -0
  3. package/dist/auth.js +10 -2
  4. package/dist/chunks/{options-5bwq5cz2.js → fetch-1g0h49bb.js} +2 -2
  5. package/dist/chunks/{options-xewf68xm.js → fetch-1y0kev0a.js} +19 -15
  6. package/dist/chunks/{options-5rwqcaw2.js → fetch-27edjygf.js} +1 -1
  7. package/dist/chunks/{options-wz0qz28j.js → fetch-2nqgjchx.js} +2 -2
  8. package/dist/chunks/{options-18k6g42r.js → fetch-3jweah5a.js} +7 -7
  9. package/dist/chunks/{options-b1rdg9nf.js → fetch-42hredtt.js} +2 -2
  10. package/dist/chunks/{options-6qwktr1g.js → fetch-436zj0s2.js} +1 -1
  11. package/dist/chunks/{options-hp5sxeae.js → fetch-4zhj4tp6.js} +2 -2
  12. package/dist/chunks/{options-5jh9m3wx.js → fetch-5xpvxbxg.js} +5 -5
  13. package/dist/chunks/{options-g1cbdcxy.js → fetch-70rdrjmf.js} +4 -4
  14. package/dist/chunks/{options-v1emgcvb.js → fetch-77mkgw7d.js} +2 -2
  15. package/dist/chunks/{options-x5ncpjy3.js → fetch-830yc5sa.js} +1 -1
  16. package/dist/chunks/{options-6gkz39ey.js → fetch-8j6eh3dh.js} +3 -3
  17. package/dist/chunks/{options-haswyr8z.js → fetch-8tzsm9rr.js} +2 -2
  18. package/dist/chunks/{options-tjpn0s1b.js → fetch-99sfd1j8.js} +10 -10
  19. package/dist/chunks/{options-qj9kjxn3.js → fetch-9gjx5y7a.js} +1 -1
  20. package/dist/chunks/{options-s0padj6k.js → fetch-9qna85w8.js} +3 -3
  21. package/dist/chunks/fetch-anm12x33.js +66 -0
  22. package/dist/chunks/{options-v573ws0d.js → fetch-cb0457h1.js} +3 -3
  23. package/dist/chunks/{options-hr75rahr.js → fetch-fbrf1xh2.js} +2 -2
  24. package/dist/chunks/{options-m6wvgbfq.js → fetch-gtkdacvk.js} +28 -7
  25. package/dist/chunks/{options-ees77nh9.js → fetch-h7dczx71.js} +2 -2
  26. package/dist/chunks/{options-3kzx88w9.js → fetch-kb9735wh.js} +1 -1
  27. package/dist/chunks/{options-44xy5pnk.js → fetch-kbnh7vq7.js} +1 -1
  28. package/dist/chunks/{options-zpz5afwq.js → fetch-kpeb8xpg.js} +2 -2
  29. package/dist/chunks/{options-f1xg0r1h.js → fetch-kwec6m6e.js} +33 -33
  30. package/dist/chunks/{options-bt9tc5rb.js → fetch-m7cvtaax.js} +1 -1
  31. package/dist/chunks/{options-96s6m0w3.js → fetch-nq5wb210.js} +2 -2
  32. package/dist/chunks/{options-7eckj7zq.js → fetch-nq63h5nv.js} +2 -2
  33. package/dist/chunks/{options-rjqbhscq.js → fetch-qvxvnv5e.js} +1 -1
  34. package/dist/chunks/{options-pme11y2y.js → fetch-rnws4wbc.js} +2 -2
  35. package/dist/chunks/{options-t88f2hhf.js → fetch-rre9g8c5.js} +3 -3
  36. package/dist/chunks/fetch-sstsrjtg.js +35 -0
  37. package/dist/chunks/fetch-sxpmt7wt.js +53 -0
  38. package/dist/chunks/{options-bkk2wfbz.js → fetch-t7k3q1ah.js} +5 -5
  39. package/dist/chunks/{options-140y8w7p.js → fetch-tj793hqk.js} +2 -2
  40. package/dist/chunks/{options-f8rap8f6.js → fetch-vgwss5ek.js} +1 -1
  41. package/dist/chunks/{options-aa9bsk9n.js → fetch-vmxdyx1n.js} +6 -6
  42. package/dist/chunks/{options-ctscy0f5.js → fetch-x34qkqqy.js} +2 -2
  43. package/dist/chunks/{options-vpz7f20y.js → fetch-xsrtpxyd.js} +4 -4
  44. package/dist/chunks/{options-bmqkn4ah.js → fetch-y7jha6td.js} +1 -1
  45. package/dist/chunks/{options-np19kmxx.js → fetch-ybejac25.js} +2 -2
  46. package/dist/chunks/{options-26ta7ngt.js → fetch-ywj7qjmv.js} +2 -2
  47. package/dist/chunks/{options-367ngss7.js → fetch-yybhtx8s.js} +2 -2
  48. package/dist/cors.js +1 -1
  49. package/dist/event-feed.js +7 -7
  50. package/dist/fetch.js +49 -48
  51. package/dist/handlers/agent.js +6 -6
  52. package/dist/handlers/command.js +6 -6
  53. package/dist/handlers/config.js +6 -6
  54. package/dist/handlers/credential.js +6 -6
  55. package/dist/handlers/debug.js +6 -6
  56. package/dist/handlers/event.js +7 -7
  57. package/dist/handlers/form.js +6 -6
  58. package/dist/handlers/fs.js +6 -6
  59. package/dist/handlers/generate.js +6 -6
  60. package/dist/handlers/integration.js +6 -6
  61. package/dist/handlers/location.js +6 -6
  62. package/dist/handlers/mcp.js +6 -6
  63. package/dist/handlers/message.js +6 -6
  64. package/dist/handlers/migration.js +6 -6
  65. package/dist/handlers/model.js +6 -6
  66. package/dist/handlers/permission.js +6 -6
  67. package/dist/handlers/persistent-pty.js +8 -8
  68. package/dist/handlers/plugin.js +6 -6
  69. package/dist/handlers/project.js +6 -6
  70. package/dist/handlers/provider.js +6 -6
  71. package/dist/handlers/pty-socket.js +1 -1
  72. package/dist/handlers/pty.js +9 -9
  73. package/dist/handlers/reference.js +6 -6
  74. package/dist/handlers/rpc.js +6 -6
  75. package/dist/handlers/server.d.ts +3 -1
  76. package/dist/handlers/server.js +9 -7
  77. package/dist/handlers/session-error.js +1 -1
  78. package/dist/handlers/session.js +6 -6
  79. package/dist/handlers/shell.js +6 -6
  80. package/dist/handlers/skill.js +6 -6
  81. package/dist/handlers/vcs.js +6 -6
  82. package/dist/handlers/websearch.js +6 -6
  83. package/dist/handlers/worktree.js +6 -6
  84. package/dist/handlers.d.ts +1 -1
  85. package/dist/handlers.js +43 -41
  86. package/dist/location.js +4 -4
  87. package/dist/middleware/authorization.d.ts +2 -1
  88. package/dist/middleware/authorization.js +5 -3
  89. package/dist/middleware/form-location.js +3 -3
  90. package/dist/middleware/schema-error.js +1 -1
  91. package/dist/middleware/session-location.js +3 -3
  92. package/dist/pairing.d.ts +13 -0
  93. package/dist/pairing.js +10 -0
  94. package/dist/process.js +56 -59
  95. package/dist/pty-environment.js +3 -3
  96. package/dist/request-tracing.js +1 -1
  97. package/dist/routes.d.ts +3 -2
  98. package/dist/routes.js +46 -45
  99. package/dist/server-info.js +5 -5
  100. package/dist/service-status.js +3 -3
  101. package/dist/workerd.js +50 -49
  102. package/package.json +8 -8
  103. package/dist/chunks/options-veszktdp.js +0 -21
  104. package/dist/chunks/options-zyv89x5n.js +0 -30
  105. /package/dist/chunks/{options-9rqn6x4v.js → fetch-9rqn6x4v.js} +0 -0
  106. /package/dist/chunks/{options-hezj1jdf.js → fetch-hezj1jdf.js} +0 -0
  107. /package/dist/chunks/{options-q4bn6dy8.js → fetch-q4bn6dy8.js} +0 -0
  108. /package/dist/chunks/{options-smaf4a18.js → fetch-smaf4a18.js} +0 -0
  109. /package/dist/chunks/{options-t8yzmczr.js → fetch-t8yzmczr.js} +0 -0
  110. /package/dist/chunks/{options-yc7nft6q.js → fetch-yc7nft6q.js} +0 -0
@@ -1,99 +1,99 @@
1
1
  import {
2
2
  GenerateHandler2
3
- } from "./options-rjqbhscq.js";
3
+ } from "./fetch-qvxvnv5e.js";
4
4
  import {
5
5
  MessageHandler2
6
- } from "./options-26ta7ngt.js";
6
+ } from "./fetch-ywj7qjmv.js";
7
7
  import {
8
8
  ModelHandler2
9
- } from "./options-b1rdg9nf.js";
9
+ } from "./fetch-42hredtt.js";
10
10
  import {
11
11
  ProviderHandler2
12
- } from "./options-haswyr8z.js";
12
+ } from "./fetch-8tzsm9rr.js";
13
13
  import {
14
14
  SessionHandler2
15
- } from "./options-367ngss7.js";
15
+ } from "./fetch-yybhtx8s.js";
16
16
  import {
17
17
  PermissionHandler2
18
- } from "./options-t88f2hhf.js";
18
+ } from "./fetch-rre9g8c5.js";
19
19
  import {
20
20
  FileSystemHandler2
21
- } from "./options-96s6m0w3.js";
21
+ } from "./fetch-nq5wb210.js";
22
22
  import {
23
23
  FormHandler2
24
- } from "./options-ees77nh9.js";
24
+ } from "./fetch-h7dczx71.js";
25
25
  import {
26
26
  CommandHandler2
27
- } from "./options-pme11y2y.js";
27
+ } from "./fetch-rnws4wbc.js";
28
28
  import {
29
29
  SkillHandler2
30
- } from "./options-hp5sxeae.js";
30
+ } from "./fetch-4zhj4tp6.js";
31
31
  import {
32
32
  RpcHandler2
33
- } from "./options-f8rap8f6.js";
33
+ } from "./fetch-vgwss5ek.js";
34
34
  import {
35
- layer3
36
- } from "./options-tjpn0s1b.js";
35
+ layer5
36
+ } from "./fetch-99sfd1j8.js";
37
37
  import {
38
38
  EventHandler2
39
- } from "./options-g1cbdcxy.js";
39
+ } from "./fetch-70rdrjmf.js";
40
40
  import {
41
41
  AgentHandler2
42
- } from "./options-ctscy0f5.js";
42
+ } from "./fetch-x34qkqqy.js";
43
43
  import {
44
44
  PluginHandler2
45
- } from "./options-hr75rahr.js";
45
+ } from "./fetch-fbrf1xh2.js";
46
46
  import {
47
47
  ServerHandler2
48
- } from "./options-veszktdp.js";
48
+ } from "./fetch-sxpmt7wt.js";
49
49
  import {
50
50
  DebugHandler2
51
- } from "./options-140y8w7p.js";
51
+ } from "./fetch-tj793hqk.js";
52
52
  import {
53
53
  PtyHandler2
54
- } from "./options-5jh9m3wx.js";
54
+ } from "./fetch-5xpvxbxg.js";
55
55
  import {
56
56
  PersistentPtyHandler2
57
- } from "./options-s0padj6k.js";
57
+ } from "./fetch-9qna85w8.js";
58
58
  import {
59
59
  ShellHandler2
60
- } from "./options-7eckj7zq.js";
60
+ } from "./fetch-nq63h5nv.js";
61
61
  import {
62
62
  ReferenceHandler2
63
- } from "./options-5bwq5cz2.js";
63
+ } from "./fetch-1g0h49bb.js";
64
64
  import {
65
65
  LocationHandler2
66
- } from "./options-x5ncpjy3.js";
66
+ } from "./fetch-830yc5sa.js";
67
67
  import {
68
68
  IntegrationHandler2
69
- } from "./options-np19kmxx.js";
69
+ } from "./fetch-ybejac25.js";
70
70
  import {
71
71
  WebSearchHandler2
72
- } from "./options-v1emgcvb.js";
72
+ } from "./fetch-77mkgw7d.js";
73
73
  import {
74
74
  McpHandler2
75
- } from "./options-wz0qz28j.js";
75
+ } from "./fetch-2nqgjchx.js";
76
76
  import {
77
77
  CredentialHandler2
78
- } from "./options-44xy5pnk.js";
78
+ } from "./fetch-kbnh7vq7.js";
79
79
  import {
80
80
  ProjectHandler2
81
- } from "./options-qj9kjxn3.js";
81
+ } from "./fetch-9gjx5y7a.js";
82
82
  import {
83
83
  WorktreeHandler2
84
- } from "./options-bt9tc5rb.js";
84
+ } from "./fetch-m7cvtaax.js";
85
85
  import {
86
86
  VcsHandler2
87
- } from "./options-zpz5afwq.js";
87
+ } from "./fetch-kpeb8xpg.js";
88
88
  import {
89
89
  MigrationHandler2
90
- } from "./options-bmqkn4ah.js";
90
+ } from "./fetch-y7jha6td.js";
91
91
  import {
92
92
  ConfigHandler2
93
- } from "./options-6qwktr1g.js";
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(layer3)), PtyHandler2, PersistentPtyHandler2, ShellHandler2, ReferenceHandler2, WorktreeHandler2, VcsHandler2, ConfigHandler2);
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,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./options-v573ws0d.js";
3
+ } from "./fetch-cb0457h1.js";
4
4
 
5
5
  // src/handlers/worktree.ts
6
6
  import { Git } from "@opencode/core/git";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./options-6gkz39ey.js";
3
+ } from "./fetch-8j6eh3dh.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-v573ws0d.js";
6
+ } from "./fetch-cb0457h1.js";
7
7
 
8
8
  // src/handlers/fs.ts
9
9
  import { FileSystem } from "@opencode/core/filesystem";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./options-6gkz39ey.js";
3
+ } from "./fetch-8j6eh3dh.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-v573ws0d.js";
6
+ } from "./fetch-cb0457h1.js";
7
7
 
8
8
  // src/handlers/shell.ts
9
9
  import { Shell } from "@opencode/core/shell";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./options-v573ws0d.js";
3
+ } from "./fetch-cb0457h1.js";
4
4
 
5
5
  // src/handlers/generate.ts
6
6
  import { Generate } from "@opencode/core/generate";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./options-6gkz39ey.js";
3
+ } from "./fetch-8j6eh3dh.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-v573ws0d.js";
6
+ } from "./fetch-cb0457h1.js";
7
7
 
8
8
  // src/handlers/command.ts
9
9
  import { Command } from "@opencode/core/command";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./options-smaf4a18.js";
3
+ } from "./fetch-smaf4a18.js";
4
4
  import {
5
5
  response2,
6
6
  sessionInfo2
7
- } from "./options-6gkz39ey.js";
7
+ } from "./fetch-8j6eh3dh.js";
8
8
  import {
9
9
  Api2
10
- } from "./options-v573ws0d.js";
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 "./options-9rqn6x4v.js";
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: () => layer2,
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 layer2 = Layer.succeed(Service2, Service2.of({
18
+ var layer3 = Layer.succeed(Service2, Service2.of({
19
19
  get: () => Effect.succeed({})
20
20
  }));
21
- var node2 = makeGlobalNode({ service: Service2, layer: layer2, deps: [] });
21
+ var node2 = makeGlobalNode({ service: Service2, layer: layer3, deps: [] });
22
22
 
23
- export { Service2, layer2, node2, exports_pty_environment };
23
+ export { Service2, layer3, node2, exports_pty_environment };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  requestRef2
3
- } from "./options-6gkz39ey.js";
3
+ } from "./fetch-8j6eh3dh.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-v573ws0d.js";
6
+ } from "./fetch-cb0457h1.js";
7
7
 
8
8
  // src/handlers/debug.ts
9
9
  import { LocationServiceMap } from "@opencode/core/location-service-map";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./options-v573ws0d.js";
3
+ } from "./fetch-cb0457h1.js";
4
4
 
5
5
  // src/handlers/rpc.ts
6
6
  import { Rpc } from "@opencode/core/rpc";
@@ -1,26 +1,26 @@
1
1
  import {
2
2
  isAllowedCorsOrigin2
3
- } from "./options-q4bn6dy8.js";
3
+ } from "./fetch-q4bn6dy8.js";
4
4
  import {
5
5
  createRoutes2
6
- } from "./options-xewf68xm.js";
6
+ } from "./fetch-1y0kev0a.js";
7
7
  import {
8
8
  __export
9
- } from "./options-9rqn6x4v.js";
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: () => make2
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 make2 = Effect.fn("ServerFetch.make")(function* (options = {}, boot = {}) {
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 { make2, exports_fetch };
26
+ export { make3, exports_fetch };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./options-6gkz39ey.js";
3
+ } from "./fetch-8j6eh3dh.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-v573ws0d.js";
6
+ } from "./fetch-cb0457h1.js";
7
7
 
8
8
  // src/handlers/agent.ts
9
9
  import { Agent } from "@opencode/core/agent";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  __export
3
- } from "./options-9rqn6x4v.js";
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: () => make4
9
+ make: () => make2
10
10
  });
11
11
  import { Effect, Ref } from "effect";
12
- var make4 = Effect.fnUntraced(function* (options = {}) {
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 { make4, exports_service_status };
23
+ export { make2, exports_service_status };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./options-v573ws0d.js";
3
+ } from "./fetch-cb0457h1.js";
4
4
 
5
5
  // src/handlers/migration.ts
6
6
  import { V1Migration } from "@opencode/core/database/v1-migration";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./options-6gkz39ey.js";
3
+ } from "./fetch-8j6eh3dh.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-v573ws0d.js";
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 "./options-smaf4a18.js";
4
+ } from "./fetch-smaf4a18.js";
5
5
  import {
6
6
  Api2
7
- } from "./options-v573ws0d.js";
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 "./options-smaf4a18.js";
6
+ } from "./fetch-smaf4a18.js";
7
7
  import {
8
8
  Api2
9
- } from "./options-v573ws0d.js";
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
@@ -2,7 +2,7 @@ import {
2
2
  CorsConfig2,
3
3
  isAllowedCorsOrigin2,
4
4
  isAllowedRequestOrigin2
5
- } from "./chunks/options-q4bn6dy8.js";
5
+ } from "./chunks/fetch-q4bn6dy8.js";
6
6
  export {
7
7
  CorsConfig2 as CorsConfig,
8
8
  isAllowedCorsOrigin2 as isAllowedCorsOrigin,
@@ -2,19 +2,19 @@ import {
2
2
  SubscriberCapacity2,
3
3
  SubscriberOverflowError2,
4
4
  EncodingError2,
5
- Service3,
5
+ Service4,
6
6
  frame2,
7
- make3,
8
- layer3,
7
+ make4,
8
+ layer5,
9
9
  exports_event_feed
10
- } from "./chunks/options-tjpn0s1b.js";
10
+ } from "./chunks/fetch-99sfd1j8.js";
11
11
  export {
12
12
  EncodingError2 as EncodingError,
13
13
  exports_event_feed as EventFeed,
14
- Service3 as Service,
14
+ Service4 as Service,
15
15
  SubscriberCapacity2 as SubscriberCapacity,
16
16
  SubscriberOverflowError2 as SubscriberOverflowError,
17
17
  frame2 as frame,
18
- layer3 as layer,
19
- make3 as make
18
+ layer5 as layer,
19
+ make4 as make
20
20
  };
package/dist/fetch.js CHANGED
@@ -1,53 +1,54 @@
1
1
  import {
2
- make2,
2
+ make3,
3
3
  exports_fetch
4
- } from "./chunks/options-aa9bsk9n.js";
5
- import"./chunks/options-xewf68xm.js";
6
- import"./chunks/options-t8yzmczr.js";
7
- import"./chunks/options-m6wvgbfq.js";
8
- import"./chunks/options-f1xg0r1h.js";
9
- import"./chunks/options-s0padj6k.js";
10
- import"./chunks/options-g1cbdcxy.js";
11
- import"./chunks/options-bt9tc5rb.js";
12
- import"./chunks/options-wz0qz28j.js";
13
- import"./chunks/options-f8rap8f6.js";
14
- import"./chunks/options-hr75rahr.js";
15
- import"./chunks/options-96s6m0w3.js";
16
- import"./chunks/options-qj9kjxn3.js";
17
- import"./chunks/options-zpz5afwq.js";
18
- import"./chunks/options-5jh9m3wx.js";
19
- import"./chunks/options-hezj1jdf.js";
20
- import"./chunks/options-367ngss7.js";
21
- import"./chunks/options-veszktdp.js";
22
- import"./chunks/options-7eckj7zq.js";
23
- import"./chunks/options-5bwq5cz2.js";
24
- import"./chunks/options-26ta7ngt.js";
25
- import"./chunks/options-bmqkn4ah.js";
26
- import"./chunks/options-6qwktr1g.js";
27
- import"./chunks/options-haswyr8z.js";
28
- import"./chunks/options-np19kmxx.js";
29
- import"./chunks/options-b1rdg9nf.js";
30
- import"./chunks/options-pme11y2y.js";
31
- import"./chunks/options-v1emgcvb.js";
32
- import"./chunks/options-hp5sxeae.js";
33
- import"./chunks/options-x5ncpjy3.js";
34
- import"./chunks/options-ees77nh9.js";
35
- import"./chunks/options-140y8w7p.js";
36
- import"./chunks/options-44xy5pnk.js";
37
- import"./chunks/options-rjqbhscq.js";
38
- import"./chunks/options-ctscy0f5.js";
39
- import"./chunks/options-bkk2wfbz.js";
40
- import"./chunks/options-q4bn6dy8.js";
41
- import"./chunks/options-tjpn0s1b.js";
42
- import"./chunks/options-t88f2hhf.js";
43
- import"./chunks/options-zyv89x5n.js";
44
- import"./chunks/options-v573ws0d.js";
45
- import"./chunks/options-5rwqcaw2.js";
46
- import"./chunks/options-3kzx88w9.js";
47
- import"./chunks/options-6gkz39ey.js";
48
- import"./chunks/options-smaf4a18.js";
49
- import"./chunks/options-18k6g42r.js";
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
- make2 as make
53
+ make3 as make
53
54
  };
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  AgentHandler2
3
- } from "../chunks/options-ctscy0f5.js";
4
- import"../chunks/options-v573ws0d.js";
5
- import"../chunks/options-5rwqcaw2.js";
6
- import"../chunks/options-3kzx88w9.js";
7
- import"../chunks/options-6gkz39ey.js";
8
- import"../chunks/options-smaf4a18.js";
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
  };