@opencode/server 2.0.26 → 2.0.28

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 (144) hide show
  1. package/dist/api.d.ts +17 -14
  2. package/dist/api.js +5 -5
  3. package/dist/auth.js +1 -1
  4. package/dist/chunks/{fetch-6fr0a7bp.js → server-info-1fx5fmdj.js} +22 -21
  5. package/dist/chunks/{fetch-80mhd8t7.js → server-info-2nsepnqy.js} +3 -3
  6. package/dist/chunks/{fetch-zhympcbw.js → server-info-2yr2dq97.js} +3 -3
  7. package/dist/chunks/{fetch-d00srfh1.js → server-info-3154e7fk.js} +3 -3
  8. package/dist/chunks/{fetch-g9rgg5ys.js → server-info-31acg4hb.js} +3 -3
  9. package/dist/chunks/{fetch-w1fepcwh.js → server-info-49c878v9.js} +3 -3
  10. package/dist/chunks/{fetch-cm271yqe.js → server-info-4b0899hb.js} +3 -3
  11. package/dist/chunks/{fetch-8c9kbrtm.js → server-info-5w10ccet.js} +2 -2
  12. package/dist/chunks/{fetch-gtkdacvk.js → server-info-5ytyqf1q.js} +5 -4
  13. package/dist/chunks/{fetch-hajt4q09.js → server-info-72ygafj3.js} +3 -3
  14. package/dist/chunks/{fetch-n1svm92q.js → server-info-75c938bc.js} +6 -6
  15. package/dist/chunks/{fetch-agftk6b6.js → server-info-91mt6ewz.js} +3 -3
  16. package/dist/chunks/{fetch-t1n0m4wb.js → server-info-a6kxe6a7.js} +30 -34
  17. package/dist/chunks/{fetch-1kbkbftd.js → server-info-agw55v2c.js} +4 -4
  18. package/dist/chunks/{fetch-anm12x33.js → server-info-anm12x33.js} +1 -1
  19. package/dist/chunks/{fetch-mjepr257.js → server-info-cfhthk6z.js} +2 -2
  20. package/dist/chunks/{fetch-j3pdvhe2.js → server-info-cx1d1bht.js} +3 -3
  21. package/dist/chunks/{fetch-gj6tv0s4.js → server-info-e4x9285j.js} +6 -3
  22. package/dist/chunks/{fetch-r5bb0n1s.js → server-info-e7pctymn.js} +2 -2
  23. package/dist/chunks/{fetch-t8yzmczr.js → server-info-erzfdgke.js} +1 -1
  24. package/dist/chunks/{fetch-eekrj6qv.js → server-info-f4b2q3tn.js} +2 -2
  25. package/dist/chunks/{fetch-cy7y42ks.js → server-info-f6n7ws9b.js} +4 -4
  26. package/dist/chunks/{fetch-78n975k2.js → server-info-fzcjf2mc.js} +10 -10
  27. package/dist/chunks/{fetch-1w9kp1gg.js → server-info-ga3m49sz.js} +3 -3
  28. package/dist/chunks/{fetch-kzj5eept.js → server-info-gat934pw.js} +33 -33
  29. package/dist/chunks/{fetch-acgs9zzk.js → server-info-gymtz25n.js} +14 -6
  30. package/dist/chunks/server-info-h6rt5k9s.js +24 -0
  31. package/dist/chunks/{fetch-54sczv30.js → server-info-hg93khqa.js} +7 -7
  32. package/dist/chunks/server-info-j5aeaa16.js +15 -0
  33. package/dist/chunks/{fetch-bvp1r88z.js → server-info-jabz3c4v.js} +3 -3
  34. package/dist/chunks/{fetch-t70dy8sr.js → server-info-kd6vzpgq.js} +3 -3
  35. package/dist/chunks/{fetch-rwwc81rq.js → server-info-pf9p09ew.js} +2 -2
  36. package/dist/chunks/{fetch-wb43dd8f.js → server-info-pmjbkszz.js} +6 -4
  37. package/dist/chunks/{fetch-c6kb7fmf.js → server-info-s07e4y6n.js} +7 -7
  38. package/dist/chunks/{fetch-0chp8crd.js → server-info-sstsrjtg.js} +8 -8
  39. package/dist/chunks/{fetch-4qyjttng.js → server-info-swdgbzpj.js} +3 -3
  40. package/dist/chunks/{fetch-jxc39wgw.js → server-info-t3j5ftv1.js} +3 -3
  41. package/dist/chunks/{fetch-053p7hbt.js → server-info-v1czxanb.js} +7 -7
  42. package/dist/chunks/{fetch-b44t4qeg.js → server-info-wys7phx0.js} +30 -29
  43. package/dist/chunks/{fetch-rhnwnf76.js → server-info-x0608mvx.js} +2 -2
  44. package/dist/chunks/{fetch-nxdx74sv.js → server-info-x74w7e1f.js} +3 -3
  45. package/dist/chunks/{fetch-q9rkrfm7.js → server-info-x9vr2ttf.js} +5 -5
  46. package/dist/chunks/{fetch-0y03q8mn.js → server-info-xmwystkq.js} +3 -3
  47. package/dist/chunks/{fetch-5w24ch67.js → server-info-xsrtpxyd.js} +4 -4
  48. package/dist/chunks/{fetch-m4fq9qce.js → server-info-y9mzegx1.js} +6 -6
  49. package/dist/chunks/{fetch-m6xk774d.js → server-info-zs542hzz.js} +3 -3
  50. package/dist/cors.js +1 -1
  51. package/dist/event-feed.js +5 -5
  52. package/dist/fetch.d.ts +5 -5
  53. package/dist/fetch.js +49 -49
  54. package/dist/handlers/agent.d.ts +1 -1
  55. package/dist/handlers/agent.js +6 -6
  56. package/dist/handlers/command.d.ts +1 -1
  57. package/dist/handlers/command.js +6 -6
  58. package/dist/handlers/config.d.ts +1 -1
  59. package/dist/handlers/config.js +6 -6
  60. package/dist/handlers/credential.d.ts +1 -1
  61. package/dist/handlers/credential.js +6 -6
  62. package/dist/handlers/debug.d.ts +1 -1
  63. package/dist/handlers/debug.js +6 -6
  64. package/dist/handlers/event.d.ts +1 -1
  65. package/dist/handlers/event.js +7 -7
  66. package/dist/handlers/form.d.ts +1 -1
  67. package/dist/handlers/form.js +6 -6
  68. package/dist/handlers/fs.d.ts +1 -1
  69. package/dist/handlers/fs.js +6 -6
  70. package/dist/handlers/generate.d.ts +1 -1
  71. package/dist/handlers/generate.js +6 -6
  72. package/dist/handlers/integration.d.ts +1 -1
  73. package/dist/handlers/integration.js +6 -6
  74. package/dist/handlers/location.d.ts +1 -1
  75. package/dist/handlers/location.js +6 -6
  76. package/dist/handlers/mcp.d.ts +1 -1
  77. package/dist/handlers/mcp.js +6 -6
  78. package/dist/handlers/message.d.ts +1 -1
  79. package/dist/handlers/message.js +6 -6
  80. package/dist/handlers/migration.d.ts +1 -1
  81. package/dist/handlers/migration.js +6 -6
  82. package/dist/handlers/model.d.ts +1 -1
  83. package/dist/handlers/model.js +6 -6
  84. package/dist/handlers/permission.d.ts +1 -1
  85. package/dist/handlers/permission.js +6 -6
  86. package/dist/handlers/persistent-pty.d.ts +1 -1
  87. package/dist/handlers/persistent-pty.js +8 -8
  88. package/dist/handlers/plugin.d.ts +1 -1
  89. package/dist/handlers/plugin.js +6 -6
  90. package/dist/handlers/project.d.ts +1 -1
  91. package/dist/handlers/project.js +6 -6
  92. package/dist/handlers/provider.d.ts +1 -1
  93. package/dist/handlers/provider.js +6 -6
  94. package/dist/handlers/pty-socket.d.ts +10 -2
  95. package/dist/handlers/pty-socket.js +1 -1
  96. package/dist/handlers/pty.d.ts +1 -1
  97. package/dist/handlers/pty.js +9 -9
  98. package/dist/handlers/reference.d.ts +1 -1
  99. package/dist/handlers/reference.js +6 -6
  100. package/dist/handlers/rpc.d.ts +1 -1
  101. package/dist/handlers/rpc.js +6 -6
  102. package/dist/handlers/server.d.ts +1 -1
  103. package/dist/handlers/server.js +9 -9
  104. package/dist/handlers/session-error.js +1 -1
  105. package/dist/handlers/session.d.ts +1 -1
  106. package/dist/handlers/session.js +6 -6
  107. package/dist/handlers/shell.d.ts +1 -1
  108. package/dist/handlers/shell.js +6 -6
  109. package/dist/handlers/skill.d.ts +1 -1
  110. package/dist/handlers/skill.js +6 -6
  111. package/dist/handlers/vcs.d.ts +1 -1
  112. package/dist/handlers/vcs.js +6 -6
  113. package/dist/handlers/websearch.d.ts +1 -1
  114. package/dist/handlers/websearch.js +6 -6
  115. package/dist/handlers/worktree.d.ts +1 -1
  116. package/dist/handlers/worktree.js +6 -6
  117. package/dist/handlers.d.ts +1 -1
  118. package/dist/handlers.js +43 -43
  119. package/dist/location.d.ts +5 -3
  120. package/dist/location.js +6 -4
  121. package/dist/middleware/authorization.d.ts +1 -1
  122. package/dist/middleware/authorization.js +2 -2
  123. package/dist/middleware/form-location.d.ts +2 -2
  124. package/dist/middleware/form-location.js +3 -3
  125. package/dist/middleware/schema-error.js +1 -1
  126. package/dist/middleware/session-location.d.ts +1 -1
  127. package/dist/middleware/session-location.js +3 -3
  128. package/dist/pairing.js +5 -5
  129. package/dist/process.d.ts +9 -8
  130. package/dist/process.js +52 -52
  131. package/dist/pty-environment.js +5 -5
  132. package/dist/request-tracing.js +1 -1
  133. package/dist/routes.d.ts +3 -3
  134. package/dist/routes.js +46 -46
  135. package/dist/server-info.js +5 -5
  136. package/dist/service-status.js +3 -3
  137. package/dist/workerd.js +50 -50
  138. package/package.json +14 -12
  139. package/dist/chunks/fetch-dy0yben3.js +0 -15
  140. package/dist/chunks/fetch-hezj1jdf.js +0 -7
  141. /package/dist/chunks/{fetch-9rqn6x4v.js → server-info-9rqn6x4v.js} +0 -0
  142. /package/dist/chunks/{fetch-q4bn6dy8.js → server-info-q4bn6dy8.js} +0 -0
  143. /package/dist/chunks/{fetch-smaf4a18.js → server-info-smaf4a18.js} +0 -0
  144. /package/dist/chunks/{fetch-yc7nft6q.js → server-info-yc7nft6q.js} +0 -0
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  LocationMiddleware2
3
- } from "./fetch-acgs9zzk.js";
3
+ } from "./server-info-gymtz25n.js";
4
4
  import {
5
5
  FormLocationMiddleware2
6
- } from "./fetch-d00srfh1.js";
6
+ } from "./server-info-3154e7fk.js";
7
7
  import {
8
8
  SessionLocationMiddleware2
9
- } from "./fetch-nxdx74sv.js";
9
+ } from "./server-info-x74w7e1f.js";
10
10
 
11
11
  // src/api.ts
12
12
  import { makeDefaultApi } from "@opencode/protocol/api";
@@ -1,26 +1,26 @@
1
1
  import {
2
2
  isAllowedCorsOrigin2
3
- } from "./fetch-q4bn6dy8.js";
3
+ } from "./server-info-q4bn6dy8.js";
4
4
  import {
5
5
  createRoutes2
6
- } from "./fetch-6fr0a7bp.js";
6
+ } from "./server-info-1fx5fmdj.js";
7
7
  import {
8
8
  __export
9
- } from "./fetch-9rqn6x4v.js";
9
+ } from "./server-info-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
- import { HttpEffect, HttpMiddleware, HttpRouter, HttpServer } from "effect/unstable/http";
18
+ import { HttpEffect, HttpMiddleware, HttpRouter, HttpServer } from "effect/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 };
@@ -2,20 +2,20 @@ import {
2
2
  locationErrors2,
3
3
  response2,
4
4
  requestRef2
5
- } from "./fetch-acgs9zzk.js";
5
+ } from "./server-info-gymtz25n.js";
6
6
  import {
7
7
  Api2
8
- } from "./fetch-jxc39wgw.js";
8
+ } from "./server-info-t3j5ftv1.js";
9
9
  import {
10
10
  CorsConfig2,
11
11
  isAllowedRequestOrigin2
12
- } from "./fetch-q4bn6dy8.js";
12
+ } from "./server-info-q4bn6dy8.js";
13
13
  import {
14
14
  Service4
15
- } from "./fetch-n1svm92q.js";
15
+ } from "./server-info-75c938bc.js";
16
16
  import {
17
17
  runPtySocket2
18
- } from "./fetch-hezj1jdf.js";
18
+ } from "./server-info-h6rt5k9s.js";
19
19
 
20
20
  // src/handlers/pty.ts
21
21
  import { Pty } from "@opencode/core/pty";
@@ -24,9 +24,9 @@ import { PtyTicket } from "@opencode/core/pty/ticket";
24
24
  import { Location } from "@opencode/core/location";
25
25
  import { LocationServiceMap } from "@opencode/core/location-service-map";
26
26
  import { Effect, Queue } from "effect";
27
- import { HttpServerRequest, HttpServerResponse } from "effect/unstable/http";
28
- import { HttpApiBuilder, HttpApiSchema } from "effect/unstable/httpapi";
29
- import { Socket } from "effect/unstable/socket";
27
+ import { HttpServerRequest, HttpServerResponse } from "effect/http";
28
+ import { HttpApiBuilder, HttpApiSchema } from "effect/http-api";
29
+ import { Socket } from "effect/socket";
30
30
  import { ForbiddenError, PtyNotFoundError } from "@opencode/protocol/errors";
31
31
  import {
32
32
  PTY_CONNECT_TICKET_QUERY,
@@ -112,36 +112,37 @@ var PtyHandler2 = HttpApiBuilder.group(Api2, "server.pty", (handlers) => Effect.
112
112
  const cursorNumber = parsedCursor === null ? undefined : Number(parsedCursor);
113
113
  const cursor = cursorNumber !== undefined && Number.isSafeInteger(cursorNumber) && cursorNumber >= -1 ? cursorNumber : undefined;
114
114
  const socket = yield* Effect.orDie(ctx.request.upgrade);
115
- const write = yield* socket.writer;
116
- const closeAccepted = (event) => socket.runRaw(() => Effect.void, { onOpen: write(event).pipe(Effect.catch(() => Effect.void)) }).pipe(Effect.timeout("1 second"), Effect.catchReason("SocketError", "SocketCloseError", () => Effect.void), Effect.catch(() => Effect.void));
117
115
  const outbox = yield* Queue.unbounded();
118
116
  const attachment = yield* pty.attach(ctx.params.ptyID, {
119
117
  cursor,
120
118
  onData: (chunk) => Queue.offerUnsafe(outbox, chunk),
121
119
  onEnd: () => Queue.offerUnsafe(outbox, new Socket.CloseEvent(1000))
122
120
  }).pipe(Effect.catchTags({
123
- "Pty.NotFoundError": () => closeAccepted(new Socket.CloseEvent(4404, "session not found")).pipe(Effect.as(undefined)),
124
- "Pty.ExitedError": () => closeAccepted(new Socket.CloseEvent(4404, "session exited")).pipe(Effect.as(undefined))
121
+ "Pty.NotFoundError": () => Effect.sync(() => {
122
+ Queue.offerUnsafe(outbox, new Socket.CloseEvent(4404, "session not found"));
123
+ }),
124
+ "Pty.ExitedError": () => Effect.sync(() => {
125
+ Queue.offerUnsafe(outbox, new Socket.CloseEvent(4404, "session exited"));
126
+ })
125
127
  }));
126
- if (!attachment)
127
- return HttpServerResponse.empty();
128
- for (const chunk of PtyProtocol.chunks(attachment.replay))
129
- Queue.offerUnsafe(outbox, chunk);
130
- Queue.offerUnsafe(outbox, PtyProtocol.metaFrame(attachment.cursor));
131
- attachment.activate();
132
- const drain = Effect.gen(function* () {
133
- while (true) {
134
- const item = yield* Queue.take(outbox);
135
- yield* write(item);
136
- if (item instanceof Socket.CloseEvent)
128
+ if (attachment) {
129
+ for (const chunk of PtyProtocol.chunks(attachment.replay))
130
+ Queue.offerUnsafe(outbox, chunk);
131
+ Queue.offerUnsafe(outbox, PtyProtocol.metaFrame(attachment.cursor));
132
+ attachment.activate();
133
+ }
134
+ yield* runPtySocket2({
135
+ socket,
136
+ outbox,
137
+ onMessage: (message) => Effect.sync(() => {
138
+ if (!attachment)
137
139
  return;
138
- }
140
+ const decoded = PtyProtocol.decodeInput(message);
141
+ if (decoded !== undefined)
142
+ attachment.write(decoded);
143
+ }),
144
+ detach: () => attachment?.detach()
139
145
  });
140
- yield* runPtySocket2(drain, socket.runRaw((message) => {
141
- const decoded = PtyProtocol.decodeInput(message);
142
- if (decoded !== undefined)
143
- attachment.write(decoded);
144
- }), attachment.detach).pipe(Effect.catchReason("SocketError", "SocketCloseError", () => Effect.void), Effect.orDie);
145
146
  return HttpServerResponse.empty();
146
147
  }).pipe(Effect.provide(locations.get(ref)), locationErrors2);
147
148
  }));
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  Api2
3
- } from "./fetch-jxc39wgw.js";
3
+ } from "./server-info-t3j5ftv1.js";
4
4
 
5
5
  // src/handlers/migration.ts
6
6
  import { V1Migration } from "@opencode/core/database/v1-migration";
7
- import { HttpApiBuilder } from "effect/unstable/httpapi";
7
+ import { HttpApiBuilder } from "effect/http-api";
8
8
  import { Effect } from "effect";
9
9
  var MigrationHandler2 = HttpApiBuilder.group(Api2, "server.migration", (handlers) => handlers.handle("migration.v1.status", Effect.fn(function* () {
10
10
  return yield* V1Migration.status();
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  locationErrors2,
3
3
  sessionInfo2
4
- } from "./fetch-acgs9zzk.js";
4
+ } from "./server-info-gymtz25n.js";
5
5
 
6
6
  // src/middleware/session-location.ts
7
7
  import { Instance } from "@opencode/core/instance/service";
8
8
  import { Session } from "@opencode/core/session";
9
9
  import { Effect, Layer } from "effect";
10
- import { HttpRouter } from "effect/unstable/http";
11
- import { HttpApiMiddleware } from "effect/unstable/httpapi";
10
+ import { HttpRouter } from "effect/http";
11
+ import { HttpApiMiddleware } from "effect/http-api";
12
12
  import { LocationNotFoundError, InvalidRequestError, SessionNotFoundError } from "@opencode/protocol/errors";
13
13
  class SessionLocationMiddleware2 extends HttpApiMiddleware.Service()("@opencode/HttpApiSessionLocation", {
14
14
  error: [InvalidRequestError, SessionNotFoundError, LocationNotFoundError]
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  response2
3
- } from "./fetch-acgs9zzk.js";
3
+ } from "./server-info-gymtz25n.js";
4
4
  import {
5
5
  Api2
6
- } from "./fetch-jxc39wgw.js";
6
+ } from "./server-info-t3j5ftv1.js";
7
7
 
8
8
  // src/handlers/fs.ts
9
9
  import { FileSystem } from "@opencode/core/filesystem";
10
10
  import { RelativePath } from "@opencode/core/schema";
11
11
  import { FileNotFoundError } from "@opencode/protocol/errors";
12
12
  import { Effect, Option, Stream } from "effect";
13
- import { HttpServerResponse } from "effect/unstable/http";
14
- import { HttpApiBuilder } from "effect/unstable/httpapi";
13
+ import { HttpServerResponse } from "effect/http";
14
+ import { HttpApiBuilder } from "effect/http-api";
15
15
  var FileSystemHandler2 = HttpApiBuilder.group(Api2, "server.fs", (handlers) => Effect.gen(function* () {
16
16
  return handlers.handleRaw("fs.read", (ctx) => Effect.gen(function* () {
17
17
  const path = yield* decodeRequestPath(ctx.request.url);
@@ -20,7 +20,7 @@ var FileSystemHandler2 = HttpApiBuilder.group(Api2, "server.fs", (handlers) => E
20
20
  return serveFile(ctx.request, file);
21
21
  })).handle("fs.list", (ctx) => response2(Effect.gen(function* () {
22
22
  const fs = yield* FileSystem.Service;
23
- return yield* fs.list(ctx.query);
23
+ return yield* fs.list(ctx.query).pipe(Effect.mapError((error) => new FileNotFoundError({ path: error.path, message: `Directory not found: ${error.path}` })));
24
24
  }))).handle("fs.find", (ctx) => response2(Effect.gen(function* () {
25
25
  const fs = yield* FileSystem.Service;
26
26
  return yield* fs.find(ctx.query);
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  response2
3
- } from "./fetch-acgs9zzk.js";
3
+ } from "./server-info-gymtz25n.js";
4
4
  import {
5
5
  Api2
6
- } from "./fetch-jxc39wgw.js";
6
+ } from "./server-info-t3j5ftv1.js";
7
7
 
8
8
  // src/handlers/command.ts
9
9
  import { Command } from "@opencode/core/command";
10
- import { HttpApiBuilder } from "effect/unstable/httpapi";
10
+ import { HttpApiBuilder } from "effect/http-api";
11
11
  var CommandHandler2 = HttpApiBuilder.group(Api2, "server.command", (handlers) => handlers.handle("command.list", () => response2(Command.Service.use((command) => command.list()))));
12
12
 
13
13
  export { CommandHandler2 };
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  __export
3
- } from "./fetch-9rqn6x4v.js";
3
+ } from "./server-info-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: () => make3
9
+ make: () => make2
10
10
  });
11
11
  import { Effect, Ref } from "effect";
12
- var make3 = 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 make3 = Effect.fnUntraced(function* (options = {}) {
20
20
  };
21
21
  });
22
22
 
23
- export { make3, exports_service_status };
23
+ export { make2, exports_service_status };
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  Api2
3
- } from "./fetch-jxc39wgw.js";
3
+ } from "./server-info-t3j5ftv1.js";
4
4
  import {
5
- Service5,
5
+ Service2,
6
6
  frame2
7
- } from "./fetch-54sczv30.js";
7
+ } from "./server-info-hg93khqa.js";
8
8
 
9
9
  // src/handlers/event.ts
10
10
  import { Event } from "@opencode/schema/event";
11
11
  import { Effect, Stream } from "effect";
12
- import { HttpServerResponse } from "effect/unstable/http";
13
- import { HttpApiBuilder } from "effect/unstable/httpapi";
12
+ import { HttpServerResponse } from "effect/http";
13
+ import { HttpApiBuilder } from "effect/http-api";
14
14
  var EventHandler2 = HttpApiBuilder.group(Api2, "server.event", (handlers) => Effect.gen(function* () {
15
- const feed = yield* Service5;
15
+ const feed = yield* Service2;
16
16
  return handlers.handleRaw("event.subscribe", () => Effect.gen(function* () {
17
17
  const connected = {
18
18
  id: Event.ID.create(),
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  requestRef2
3
- } from "./fetch-acgs9zzk.js";
3
+ } from "./server-info-gymtz25n.js";
4
4
  import {
5
5
  Api2
6
- } from "./fetch-jxc39wgw.js";
6
+ } from "./server-info-t3j5ftv1.js";
7
7
 
8
8
  // src/handlers/debug.ts
9
9
  import { LocationServiceMap } from "@opencode/core/location-service-map";
10
10
  import { Effect, Option, RcMap } from "effect";
11
- import { HttpApiBuilder } from "effect/unstable/httpapi";
11
+ import { HttpApiBuilder } from "effect/http-api";
12
12
  var DebugHandler2 = HttpApiBuilder.group(Api2, "server.debug", (handlers) => handlers.handle("debug.location", Effect.fn(function* () {
13
13
  const locations = Option.getOrThrow(yield* Effect.serviceOption(LocationServiceMap.Service));
14
14
  return Array.from(yield* RcMap.keys(locations.rcMap));
package/dist/cors.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  CorsConfig2,
3
3
  isAllowedCorsOrigin2,
4
4
  isAllowedRequestOrigin2
5
- } from "./chunks/fetch-q4bn6dy8.js";
5
+ } from "./chunks/server-info-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
- Service5,
5
+ Service2,
6
6
  frame2,
7
7
  make4,
8
- layer5,
8
+ layer3,
9
9
  exports_event_feed
10
- } from "./chunks/fetch-54sczv30.js";
10
+ } from "./chunks/server-info-hg93khqa.js";
11
11
  export {
12
12
  EncodingError2 as EncodingError,
13
13
  exports_event_feed as EventFeed,
14
- Service5 as Service,
14
+ Service2 as Service,
15
15
  SubscriberCapacity2 as SubscriberCapacity,
16
16
  SubscriberOverflowError2 as SubscriberOverflowError,
17
17
  frame2 as frame,
18
- layer5 as layer,
18
+ layer3 as layer,
19
19
  make4 as make
20
20
  };
package/dist/fetch.d.ts CHANGED
@@ -55,22 +55,22 @@ export declare const make: (options?: {
55
55
  readonly content?: string | undefined;
56
56
  readonly file?: string | undefined;
57
57
  } | undefined;
58
+ readonly port?: number | undefined;
59
+ readonly fs?: {
60
+ readonly fff?: boolean | undefined;
61
+ readonly filewatcher?: boolean | undefined;
62
+ } | undefined;
58
63
  readonly hostname?: string | undefined;
59
64
  readonly cors?: readonly string[] | undefined;
60
65
  readonly windows?: {
61
66
  readonly gitbash?: string | undefined;
62
67
  } | undefined;
63
68
  readonly password?: string | undefined;
64
- readonly port?: number | undefined;
65
69
  readonly app?: {
66
70
  readonly version?: string | undefined;
67
71
  readonly name?: string | undefined;
68
72
  readonly channel?: string | undefined;
69
73
  } | undefined;
70
- readonly fs?: {
71
- readonly fff?: boolean | undefined;
72
- readonly filewatcher?: boolean | undefined;
73
- } | undefined;
74
74
  readonly simulation?: boolean | undefined;
75
75
  readonly database?: {
76
76
  readonly path?: string | undefined;
package/dist/fetch.js CHANGED
@@ -1,54 +1,54 @@
1
1
  import {
2
- make2,
2
+ make3,
3
3
  exports_fetch
4
- } from "./chunks/fetch-053p7hbt.js";
5
- import"./chunks/fetch-6fr0a7bp.js";
6
- import"./chunks/fetch-gtkdacvk.js";
7
- import"./chunks/fetch-t8yzmczr.js";
8
- import"./chunks/fetch-kzj5eept.js";
9
- import"./chunks/fetch-w1fepcwh.js";
10
- import"./chunks/fetch-dy0yben3.js";
11
- import"./chunks/fetch-t1n0m4wb.js";
12
- import"./chunks/fetch-wb43dd8f.js";
13
- import"./chunks/fetch-eekrj6qv.js";
14
- import"./chunks/fetch-m4fq9qce.js";
15
- import"./chunks/fetch-r5bb0n1s.js";
16
- import"./chunks/fetch-gj6tv0s4.js";
17
- import"./chunks/fetch-cy7y42ks.js";
18
- import"./chunks/fetch-0y03q8mn.js";
19
- import"./chunks/fetch-8c9kbrtm.js";
20
- import"./chunks/fetch-80mhd8t7.js";
21
- import"./chunks/fetch-agftk6b6.js";
22
- import"./chunks/fetch-1kbkbftd.js";
23
- import"./chunks/fetch-hajt4q09.js";
24
- import"./chunks/fetch-b44t4qeg.js";
25
- import"./chunks/fetch-hezj1jdf.js";
26
- import"./chunks/fetch-rwwc81rq.js";
27
- import"./chunks/fetch-rhnwnf76.js";
28
- import"./chunks/fetch-zhympcbw.js";
29
- import"./chunks/fetch-m6xk774d.js";
30
- import"./chunks/fetch-mjepr257.js";
31
- import"./chunks/fetch-1w9kp1gg.js";
32
- import"./chunks/fetch-cm271yqe.js";
33
- import"./chunks/fetch-q9rkrfm7.js";
34
- import"./chunks/fetch-4qyjttng.js";
35
- import"./chunks/fetch-g9rgg5ys.js";
36
- import"./chunks/fetch-j3pdvhe2.js";
37
- import"./chunks/fetch-bvp1r88z.js";
38
- import"./chunks/fetch-78n975k2.js";
39
- import"./chunks/fetch-t70dy8sr.js";
40
- import"./chunks/fetch-jxc39wgw.js";
41
- import"./chunks/fetch-nxdx74sv.js";
42
- import"./chunks/fetch-d00srfh1.js";
43
- import"./chunks/fetch-anm12x33.js";
44
- import"./chunks/fetch-c6kb7fmf.js";
45
- import"./chunks/fetch-0chp8crd.js";
46
- import"./chunks/fetch-acgs9zzk.js";
47
- import"./chunks/fetch-smaf4a18.js";
48
- import"./chunks/fetch-q4bn6dy8.js";
49
- import"./chunks/fetch-n1svm92q.js";
50
- import"./chunks/fetch-54sczv30.js";
4
+ } from "./chunks/server-info-v1czxanb.js";
5
+ import"./chunks/server-info-1fx5fmdj.js";
6
+ import"./chunks/server-info-erzfdgke.js";
7
+ import"./chunks/server-info-5ytyqf1q.js";
8
+ import"./chunks/server-info-gat934pw.js";
9
+ import"./chunks/server-info-cfhthk6z.js";
10
+ import"./chunks/server-info-x0608mvx.js";
11
+ import"./chunks/server-info-zs542hzz.js";
12
+ import"./chunks/server-info-ga3m49sz.js";
13
+ import"./chunks/server-info-y9mzegx1.js";
14
+ import"./chunks/server-info-4b0899hb.js";
15
+ import"./chunks/server-info-a6kxe6a7.js";
16
+ import"./chunks/server-info-31acg4hb.js";
17
+ import"./chunks/server-info-x9vr2ttf.js";
18
+ import"./chunks/server-info-jabz3c4v.js";
19
+ import"./chunks/server-info-e7pctymn.js";
20
+ import"./chunks/server-info-91mt6ewz.js";
21
+ import"./chunks/server-info-72ygafj3.js";
22
+ import"./chunks/server-info-wys7phx0.js";
23
+ import"./chunks/server-info-h6rt5k9s.js";
24
+ import"./chunks/server-info-f6n7ws9b.js";
25
+ import"./chunks/server-info-2yr2dq97.js";
26
+ import"./chunks/server-info-agw55v2c.js";
27
+ import"./chunks/server-info-fzcjf2mc.js";
28
+ import"./chunks/server-info-pmjbkszz.js";
29
+ import"./chunks/server-info-f4b2q3tn.js";
30
+ import"./chunks/server-info-swdgbzpj.js";
31
+ import"./chunks/server-info-cx1d1bht.js";
32
+ import"./chunks/server-info-pf9p09ew.js";
33
+ import"./chunks/server-info-2nsepnqy.js";
34
+ import"./chunks/server-info-5w10ccet.js";
35
+ import"./chunks/server-info-kd6vzpgq.js";
36
+ import"./chunks/server-info-e4x9285j.js";
37
+ import"./chunks/server-info-49c878v9.js";
38
+ import"./chunks/server-info-j5aeaa16.js";
39
+ import"./chunks/server-info-xmwystkq.js";
40
+ import"./chunks/server-info-anm12x33.js";
41
+ import"./chunks/server-info-q4bn6dy8.js";
42
+ import"./chunks/server-info-t3j5ftv1.js";
43
+ import"./chunks/server-info-3154e7fk.js";
44
+ import"./chunks/server-info-x74w7e1f.js";
45
+ import"./chunks/server-info-gymtz25n.js";
46
+ import"./chunks/server-info-smaf4a18.js";
47
+ import"./chunks/server-info-hg93khqa.js";
48
+ import"./chunks/server-info-s07e4y6n.js";
49
+ import"./chunks/server-info-75c938bc.js";
50
+ import"./chunks/server-info-sstsrjtg.js";
51
51
  export {
52
52
  exports_fetch as ServerFetch,
53
- make2 as make
53
+ make3 as make
54
54
  };
@@ -1 +1 @@
1
- export declare const AgentHandler: import("effect/Layer").Layer<import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.agent">, never, import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization | import("../location").LocationMiddleware>;
1
+ export declare const AgentHandler: import("effect/Layer").Layer<import("effect/http-api/HttpApiGroup").Service<"server", "server.agent">, never, import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization | import("../location").LocationMiddleware>;
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  AgentHandler2
3
- } from "../chunks/fetch-1w9kp1gg.js";
4
- import"../chunks/fetch-jxc39wgw.js";
5
- import"../chunks/fetch-nxdx74sv.js";
6
- import"../chunks/fetch-d00srfh1.js";
7
- import"../chunks/fetch-acgs9zzk.js";
8
- import"../chunks/fetch-smaf4a18.js";
3
+ } from "../chunks/server-info-ga3m49sz.js";
4
+ import"../chunks/server-info-t3j5ftv1.js";
5
+ import"../chunks/server-info-3154e7fk.js";
6
+ import"../chunks/server-info-x74w7e1f.js";
7
+ import"../chunks/server-info-gymtz25n.js";
8
+ import"../chunks/server-info-smaf4a18.js";
9
9
  export {
10
10
  AgentHandler2 as AgentHandler
11
11
  };
@@ -1 +1 @@
1
- export declare const CommandHandler: import("effect/Layer").Layer<import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.command">, never, import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization | import("../location").LocationMiddleware>;
1
+ export declare const CommandHandler: import("effect/Layer").Layer<import("effect/http-api/HttpApiGroup").Service<"server", "server.command">, never, import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization | import("../location").LocationMiddleware>;
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  CommandHandler2
3
- } from "../chunks/fetch-0y03q8mn.js";
4
- import"../chunks/fetch-jxc39wgw.js";
5
- import"../chunks/fetch-nxdx74sv.js";
6
- import"../chunks/fetch-d00srfh1.js";
7
- import"../chunks/fetch-acgs9zzk.js";
8
- import"../chunks/fetch-smaf4a18.js";
3
+ } from "../chunks/server-info-xmwystkq.js";
4
+ import"../chunks/server-info-t3j5ftv1.js";
5
+ import"../chunks/server-info-3154e7fk.js";
6
+ import"../chunks/server-info-x74w7e1f.js";
7
+ import"../chunks/server-info-gymtz25n.js";
8
+ import"../chunks/server-info-smaf4a18.js";
9
9
  export {
10
10
  CommandHandler2 as CommandHandler
11
11
  };
@@ -1 +1 @@
1
- export declare const ConfigHandler: import("effect/Layer").Layer<import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.config">, never, import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization | import("../location").LocationMiddleware>;
1
+ export declare const ConfigHandler: import("effect/Layer").Layer<import("effect/http-api/HttpApiGroup").Service<"server", "server.config">, never, import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization | import("../location").LocationMiddleware>;
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  ConfigHandler2
3
- } from "../chunks/fetch-r5bb0n1s.js";
4
- import"../chunks/fetch-jxc39wgw.js";
5
- import"../chunks/fetch-nxdx74sv.js";
6
- import"../chunks/fetch-d00srfh1.js";
7
- import"../chunks/fetch-acgs9zzk.js";
8
- import"../chunks/fetch-smaf4a18.js";
3
+ } from "../chunks/server-info-e7pctymn.js";
4
+ import"../chunks/server-info-t3j5ftv1.js";
5
+ import"../chunks/server-info-3154e7fk.js";
6
+ import"../chunks/server-info-x74w7e1f.js";
7
+ import"../chunks/server-info-gymtz25n.js";
8
+ import"../chunks/server-info-smaf4a18.js";
9
9
  export {
10
10
  ConfigHandler2 as ConfigHandler
11
11
  };
@@ -1,2 +1,2 @@
1
1
  import { Credential } from "@opencode/core/credential";
2
- export declare const CredentialHandler: import("effect/Layer").Layer<import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.credential">, never, import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization | import("effect/unstable/http/HttpRouter").Request<"Requires", Credential.Service>>;
2
+ export declare const CredentialHandler: import("effect/Layer").Layer<import("effect/http-api/HttpApiGroup").Service<"server", "server.credential">, never, import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization | import("effect/http/HttpRouter").Request<"Requires", Credential.Service>>;
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  CredentialHandler2
3
- } from "../chunks/fetch-eekrj6qv.js";
4
- import"../chunks/fetch-jxc39wgw.js";
5
- import"../chunks/fetch-nxdx74sv.js";
6
- import"../chunks/fetch-d00srfh1.js";
7
- import"../chunks/fetch-acgs9zzk.js";
8
- import"../chunks/fetch-smaf4a18.js";
3
+ } from "../chunks/server-info-f4b2q3tn.js";
4
+ import"../chunks/server-info-t3j5ftv1.js";
5
+ import"../chunks/server-info-3154e7fk.js";
6
+ import"../chunks/server-info-x74w7e1f.js";
7
+ import"../chunks/server-info-gymtz25n.js";
8
+ import"../chunks/server-info-smaf4a18.js";
9
9
  export {
10
10
  CredentialHandler2 as CredentialHandler
11
11
  };
@@ -1 +1 @@
1
- export declare const DebugHandler: import("effect/Layer").Layer<import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.debug">, never, import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization>;
1
+ export declare const DebugHandler: import("effect/Layer").Layer<import("effect/http-api/HttpApiGroup").Service<"server", "server.debug">, never, import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization>;
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  DebugHandler2
3
- } from "../chunks/fetch-m6xk774d.js";
4
- import"../chunks/fetch-jxc39wgw.js";
5
- import"../chunks/fetch-nxdx74sv.js";
6
- import"../chunks/fetch-d00srfh1.js";
7
- import"../chunks/fetch-acgs9zzk.js";
8
- import"../chunks/fetch-smaf4a18.js";
3
+ } from "../chunks/server-info-zs542hzz.js";
4
+ import"../chunks/server-info-t3j5ftv1.js";
5
+ import"../chunks/server-info-3154e7fk.js";
6
+ import"../chunks/server-info-x74w7e1f.js";
7
+ import"../chunks/server-info-gymtz25n.js";
8
+ import"../chunks/server-info-smaf4a18.js";
9
9
  export {
10
10
  DebugHandler2 as DebugHandler
11
11
  };
@@ -1,2 +1,2 @@
1
1
  import { EventFeed } from "../event-feed";
2
- export declare const EventHandler: import("effect/Layer").Layer<import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.event">, never, EventFeed.Service | (import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization)>;
2
+ export declare const EventHandler: import("effect/Layer").Layer<import("effect/http-api/HttpApiGroup").Service<"server", "server.event">, never, EventFeed.Service | (import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization)>;
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  EventHandler2
3
- } from "../chunks/fetch-m4fq9qce.js";
4
- import"../chunks/fetch-jxc39wgw.js";
5
- import"../chunks/fetch-nxdx74sv.js";
6
- import"../chunks/fetch-d00srfh1.js";
7
- import"../chunks/fetch-acgs9zzk.js";
8
- import"../chunks/fetch-smaf4a18.js";
9
- import"../chunks/fetch-54sczv30.js";
3
+ } from "../chunks/server-info-y9mzegx1.js";
4
+ import"../chunks/server-info-t3j5ftv1.js";
5
+ import"../chunks/server-info-3154e7fk.js";
6
+ import"../chunks/server-info-x74w7e1f.js";
7
+ import"../chunks/server-info-gymtz25n.js";
8
+ import"../chunks/server-info-smaf4a18.js";
9
+ import"../chunks/server-info-hg93khqa.js";
10
10
  export {
11
11
  EventHandler2 as EventHandler
12
12
  };