@opencode/server 0.0.0-dev-20483 → 0.0.0-dev-20485

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 (107) hide show
  1. package/dist/api.d.ts +1 -1
  2. package/dist/api.js +5 -5
  3. package/dist/auth.js +1 -1
  4. package/dist/chunks/{handlers-rnws4wbc.js → fetch-00b7zw9n.js} +2 -2
  5. package/dist/chunks/{handlers-n1svm92q.js → fetch-0d9kah4z.js} +8 -8
  6. package/dist/chunks/{handlers-830yc5sa.js → fetch-0gwhtgb0.js} +2 -2
  7. package/dist/chunks/{handlers-77mkgw7d.js → fetch-0vcrsckz.js} +2 -2
  8. package/dist/chunks/{handlers-8j6eh3dh.js → fetch-14vy2pac.js} +13 -6
  9. package/dist/chunks/{handlers-42hredtt.js → fetch-2nwa3ky2.js} +2 -2
  10. package/dist/chunks/{handlers-54sczv30.js → fetch-2sy3c7de.js} +7 -7
  11. package/dist/chunks/{handlers-rre9g8c5.js → fetch-5w803dat.js} +5 -4
  12. package/dist/chunks/{handlers-27edjygf.js → fetch-6n8edpm0.js} +6 -5
  13. package/dist/chunks/{handlers-4zhj4tp6.js → fetch-6w79g1zd.js} +2 -2
  14. package/dist/chunks/{handlers-1syxrfr0.js → fetch-a44pvkv9.js} +3 -3
  15. package/dist/chunks/{handlers-334f1wqc.js → fetch-ajhv9q2g.js} +1 -1
  16. package/dist/chunks/{handlers-anm12x33.js → fetch-anm12x33.js} +1 -1
  17. package/dist/chunks/{handlers-rbn15j6z.js → fetch-byt4hbw9.js} +8 -8
  18. package/dist/chunks/{handlers-2nqgjchx.js → fetch-d261w70h.js} +2 -2
  19. package/dist/chunks/{handlers-t7mxrz5t.js → fetch-eces9922.js} +8 -8
  20. package/dist/chunks/{handlers-nq63h5nv.js → fetch-evmrcn2p.js} +2 -2
  21. package/dist/chunks/{handlers-h7dczx71.js → fetch-g27fjyd3.js} +2 -2
  22. package/dist/chunks/{handlers-8d2n01za.js → fetch-gesckh61.js} +2 -2
  23. package/dist/chunks/{handlers-9gjx5y7a.js → fetch-gr63yha5.js} +1 -1
  24. package/dist/chunks/{handlers-gtkdacvk.js → fetch-gtkdacvk.js} +1 -1
  25. package/dist/chunks/{handlers-fqvt1agm.js → fetch-h9qn14ck.js} +7 -7
  26. package/dist/chunks/{handlers-ybejac25.js → fetch-jv3gkh16.js} +2 -2
  27. package/dist/chunks/{handlers-tj793hqk.js → fetch-kcvfpwaw.js} +2 -2
  28. package/dist/chunks/{handlers-fbrf1xh2.js → fetch-kta0tack.js} +2 -2
  29. package/dist/chunks/{handlers-8tzsm9rr.js → fetch-kww1pvjb.js} +2 -2
  30. package/dist/chunks/{handlers-1g0h49bb.js → fetch-pmra5yx3.js} +2 -2
  31. package/dist/chunks/{handlers-sp0g6qt6.js → fetch-qf0s8ctx.js} +4 -4
  32. package/dist/chunks/{handlers-436zj0s2.js → fetch-qwcstt60.js} +1 -1
  33. package/dist/chunks/{handlers-m7cvtaax.js → fetch-r3mjvgfk.js} +1 -1
  34. package/dist/chunks/{handlers-c1rbvtgh.js → fetch-rdf72e8a.js} +33 -33
  35. package/dist/chunks/{handlers-3e7m37es.js → fetch-rytwz38r.js} +11 -8
  36. package/dist/chunks/{handlers-kb9735wh.js → fetch-tfdbmzkj.js} +5 -4
  37. package/dist/chunks/{handlers-mzr9gftb.js → fetch-v305azr7.js} +7 -7
  38. package/dist/chunks/{handlers-nq5wb210.js → fetch-vrg6639h.js} +2 -2
  39. package/dist/chunks/{handlers-t1ykn76g.js → fetch-w4srakgh.js} +19 -19
  40. package/dist/chunks/{handlers-qvxvnv5e.js → fetch-wkt3zs7x.js} +5 -2
  41. package/dist/chunks/{handlers-y7jha6td.js → fetch-wq6tfxrf.js} +1 -1
  42. package/dist/chunks/{handlers-cb0457h1.js → fetch-x22271m7.js} +3 -3
  43. package/dist/chunks/{handlers-xsrtpxyd.js → fetch-xsrtpxyd.js} +1 -1
  44. package/dist/chunks/{handlers-x34qkqqy.js → fetch-yddkh4zb.js} +2 -2
  45. package/dist/chunks/{handlers-9qna85w8.js → fetch-yjn29jjj.js} +3 -3
  46. package/dist/chunks/{handlers-ywj7qjmv.js → fetch-z854b9h8.js} +2 -2
  47. package/dist/chunks/{handlers-vgwss5ek.js → fetch-zgk9zpte.js} +1 -1
  48. package/dist/cors.js +1 -1
  49. package/dist/event-feed.js +5 -5
  50. package/dist/fetch.js +47 -47
  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.js +9 -9
  76. package/dist/handlers/session-error.js +1 -1
  77. package/dist/handlers/session.js +6 -6
  78. package/dist/handlers/shell.js +6 -6
  79. package/dist/handlers/skill.js +6 -6
  80. package/dist/handlers/vcs.js +6 -6
  81. package/dist/handlers/websearch.js +6 -6
  82. package/dist/handlers/worktree.js +6 -6
  83. package/dist/handlers.js +43 -43
  84. package/dist/location.d.ts +5 -3
  85. package/dist/location.js +6 -4
  86. package/dist/middleware/authorization.js +2 -2
  87. package/dist/middleware/form-location.d.ts +3 -3
  88. package/dist/middleware/form-location.js +3 -3
  89. package/dist/middleware/schema-error.js +1 -1
  90. package/dist/middleware/session-location.d.ts +3 -3
  91. package/dist/middleware/session-location.js +3 -3
  92. package/dist/pairing.js +5 -5
  93. package/dist/process.js +49 -49
  94. package/dist/pty-environment.js +7 -7
  95. package/dist/request-tracing.js +1 -1
  96. package/dist/routes.d.ts +2 -2
  97. package/dist/routes.js +46 -46
  98. package/dist/server-info.js +5 -5
  99. package/dist/service-status.js +1 -1
  100. package/dist/workerd.js +48 -48
  101. package/package.json +8 -8
  102. /package/dist/chunks/{handlers-9rqn6x4v.js → fetch-9rqn6x4v.js} +0 -0
  103. /package/dist/chunks/{handlers-hezj1jdf.js → fetch-hezj1jdf.js} +0 -0
  104. /package/dist/chunks/{handlers-q4bn6dy8.js → fetch-q4bn6dy8.js} +0 -0
  105. /package/dist/chunks/{handlers-smaf4a18.js → fetch-smaf4a18.js} +0 -0
  106. /package/dist/chunks/{handlers-t8yzmczr.js → fetch-t8yzmczr.js} +0 -0
  107. /package/dist/chunks/{handlers-yc7nft6q.js → fetch-yc7nft6q.js} +0 -0
@@ -1,99 +1,99 @@
1
1
  import {
2
2
  GenerateHandler2
3
- } from "./handlers-qvxvnv5e.js";
3
+ } from "./fetch-wkt3zs7x.js";
4
4
  import {
5
5
  MessageHandler2
6
- } from "./handlers-ywj7qjmv.js";
6
+ } from "./fetch-z854b9h8.js";
7
7
  import {
8
8
  ModelHandler2
9
- } from "./handlers-42hredtt.js";
9
+ } from "./fetch-2nwa3ky2.js";
10
10
  import {
11
11
  ProviderHandler2
12
- } from "./handlers-8tzsm9rr.js";
12
+ } from "./fetch-kww1pvjb.js";
13
13
  import {
14
14
  SessionHandler2
15
- } from "./handlers-3e7m37es.js";
15
+ } from "./fetch-rytwz38r.js";
16
16
  import {
17
17
  PermissionHandler2
18
- } from "./handlers-rre9g8c5.js";
18
+ } from "./fetch-5w803dat.js";
19
19
  import {
20
20
  FileSystemHandler2
21
- } from "./handlers-nq5wb210.js";
21
+ } from "./fetch-vrg6639h.js";
22
22
  import {
23
23
  FormHandler2
24
- } from "./handlers-h7dczx71.js";
24
+ } from "./fetch-g27fjyd3.js";
25
25
  import {
26
26
  CommandHandler2
27
- } from "./handlers-rnws4wbc.js";
27
+ } from "./fetch-00b7zw9n.js";
28
28
  import {
29
29
  SkillHandler2
30
- } from "./handlers-4zhj4tp6.js";
30
+ } from "./fetch-6w79g1zd.js";
31
31
  import {
32
32
  RpcHandler2
33
- } from "./handlers-vgwss5ek.js";
33
+ } from "./fetch-zgk9zpte.js";
34
34
  import {
35
- layer5
36
- } from "./handlers-54sczv30.js";
35
+ layer2
36
+ } from "./fetch-2sy3c7de.js";
37
37
  import {
38
38
  EventHandler2
39
- } from "./handlers-sp0g6qt6.js";
39
+ } from "./fetch-qf0s8ctx.js";
40
40
  import {
41
41
  AgentHandler2
42
- } from "./handlers-x34qkqqy.js";
42
+ } from "./fetch-yddkh4zb.js";
43
43
  import {
44
44
  PluginHandler2
45
- } from "./handlers-fbrf1xh2.js";
45
+ } from "./fetch-kta0tack.js";
46
46
  import {
47
47
  ServerHandler2
48
- } from "./handlers-t7mxrz5t.js";
48
+ } from "./fetch-eces9922.js";
49
49
  import {
50
50
  DebugHandler2
51
- } from "./handlers-tj793hqk.js";
51
+ } from "./fetch-kcvfpwaw.js";
52
52
  import {
53
53
  PtyHandler2
54
- } from "./handlers-fqvt1agm.js";
54
+ } from "./fetch-h9qn14ck.js";
55
55
  import {
56
56
  PersistentPtyHandler2
57
- } from "./handlers-9qna85w8.js";
57
+ } from "./fetch-yjn29jjj.js";
58
58
  import {
59
59
  ShellHandler2
60
- } from "./handlers-nq63h5nv.js";
60
+ } from "./fetch-evmrcn2p.js";
61
61
  import {
62
62
  ReferenceHandler2
63
- } from "./handlers-1g0h49bb.js";
63
+ } from "./fetch-pmra5yx3.js";
64
64
  import {
65
65
  LocationHandler2
66
- } from "./handlers-830yc5sa.js";
66
+ } from "./fetch-0gwhtgb0.js";
67
67
  import {
68
68
  IntegrationHandler2
69
- } from "./handlers-ybejac25.js";
69
+ } from "./fetch-jv3gkh16.js";
70
70
  import {
71
71
  WebSearchHandler2
72
- } from "./handlers-77mkgw7d.js";
72
+ } from "./fetch-0vcrsckz.js";
73
73
  import {
74
74
  McpHandler2
75
- } from "./handlers-2nqgjchx.js";
75
+ } from "./fetch-d261w70h.js";
76
76
  import {
77
77
  CredentialHandler2
78
- } from "./handlers-334f1wqc.js";
78
+ } from "./fetch-ajhv9q2g.js";
79
79
  import {
80
80
  ProjectHandler2
81
- } from "./handlers-9gjx5y7a.js";
81
+ } from "./fetch-gr63yha5.js";
82
82
  import {
83
83
  WorktreeHandler2
84
- } from "./handlers-m7cvtaax.js";
84
+ } from "./fetch-r3mjvgfk.js";
85
85
  import {
86
86
  VcsHandler2
87
- } from "./handlers-8d2n01za.js";
87
+ } from "./fetch-gesckh61.js";
88
88
  import {
89
89
  MigrationHandler2
90
- } from "./handlers-y7jha6td.js";
90
+ } from "./fetch-wq6tfxrf.js";
91
91
  import {
92
92
  ConfigHandler2
93
- } from "./handlers-436zj0s2.js";
93
+ } from "./fetch-qwcstt60.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(layer5)), 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(layer2)), PtyHandler2, PersistentPtyHandler2, ShellHandler2, ReferenceHandler2, WorktreeHandler2, VcsHandler2, ConfigHandler2);
98
98
 
99
99
  export { handlers2 };
@@ -3,10 +3,13 @@ import {
3
3
  missingMessage2,
4
4
  failedMessageDecode2,
5
5
  failedSnapshot2
6
- } from "./handlers-smaf4a18.js";
6
+ } from "./fetch-smaf4a18.js";
7
+ import {
8
+ locationErrors2
9
+ } from "./fetch-14vy2pac.js";
7
10
  import {
8
11
  Api2
9
- } from "./handlers-cb0457h1.js";
12
+ } from "./fetch-x22271m7.js";
10
13
 
11
14
  // src/handlers/session.ts
12
15
  import { Session } from "@opencode/core/session";
@@ -188,7 +191,7 @@ var SessionHandler2 = HttpApiBuilder.group(Api2, "server.session", (handlers) =>
188
191
  }).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.PromptConflictError", (error) => Effect.fail(new ConflictError({
189
192
  message: `Prompt message ID conflicts with an existing durable record: ${error.messageID}`,
190
193
  resource: error.messageID
191
- }))), Effect.catchTag("Session.AttachmentError", (error) => Effect.fail(new InvalidRequestError({ message: error.message, field: "files" }))), Effect.catchTag("Session.SkillNotFoundError", (error) => Effect.fail(new InvalidRequestError({ message: `Skill not found: ${error.skill}`, field: "skills" }))))
194
+ }))), Effect.catchTag("Session.AttachmentError", (error) => Effect.fail(new InvalidRequestError({ message: error.message, field: "files" }))), Effect.catchTag("Session.SkillNotFoundError", (error) => Effect.fail(new InvalidRequestError({ message: `Skill not found: ${error.skill}`, field: "skills" }))), locationErrors2)
192
195
  };
193
196
  })).handle("session.command", Effect.fn(function* (ctx) {
194
197
  yield* session.command({
@@ -205,14 +208,14 @@ var SessionHandler2 = HttpApiBuilder.group(Api2, "server.session", (handlers) =>
205
208
  }))), Effect.catchTag("Command.ExecutionError", (error) => Effect.fail(new CommandExecutionError({
206
209
  command: error.command,
207
210
  message: error.message
208
- }))));
211
+ }))), locationErrors2);
209
212
  return HttpApiSchema.NoContent.make();
210
213
  })).handle("session.skill", Effect.fn(function* (ctx) {
211
214
  yield* session.skill({
212
215
  sessionID: ctx.params.sessionID,
213
216
  skill: ctx.payload.id,
214
217
  resume: ctx.payload.resume
215
- }).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.SkillNotFoundError", (error) => Effect.fail(new SkillNotFoundError({ skill: error.skill, message: `Skill not found: ${error.skill}` }))));
218
+ }).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.SkillNotFoundError", (error) => Effect.fail(new SkillNotFoundError({ skill: error.skill, message: `Skill not found: ${error.skill}` }))), locationErrors2);
216
219
  return HttpApiSchema.NoContent.make();
217
220
  })).handle("session.synthetic", Effect.fn(function* (ctx) {
218
221
  const data = yield* session.synthetic({
@@ -248,11 +251,11 @@ var SessionHandler2 = HttpApiBuilder.group(Api2, "server.session", (handlers) =>
248
251
  files: ctx.payload.files
249
252
  });
250
253
  return {
251
- data: yield* session.revert.stage({ ...ctx.params, ...ctx.payload }).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.MessageNotFoundError", missingMessage2), Effect.catchTag("Session.BusyError", busySession), Effect.catchTag("Snapshot.Error", failedSnapshot2("stage session revert", ctx.params.sessionID)))
254
+ data: yield* session.revert.stage({ ...ctx.params, ...ctx.payload }).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.MessageNotFoundError", missingMessage2), Effect.catchTag("Session.BusyError", busySession), Effect.catchTag("Snapshot.Error", failedSnapshot2("stage session revert", ctx.params.sessionID)), locationErrors2)
252
255
  };
253
256
  })).handle("session.revert.clear", Effect.fn(function* (ctx) {
254
257
  yield* Effect.log("session.revert.clear", { sessionID: ctx.params.sessionID });
255
- yield* session.revert.clear(ctx.params.sessionID).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.BusyError", busySession), Effect.catchTag("Snapshot.Error", failedSnapshot2("clear session revert", ctx.params.sessionID)));
258
+ yield* session.revert.clear(ctx.params.sessionID).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.BusyError", busySession), Effect.catchTag("Snapshot.Error", failedSnapshot2("clear session revert", ctx.params.sessionID)), locationErrors2);
256
259
  return HttpApiSchema.NoContent.make();
257
260
  })).handle("session.revert.commit", Effect.fn(function* (ctx) {
258
261
  yield* Effect.log("session.revert.commit", { sessionID: ctx.params.sessionID });
@@ -264,7 +267,7 @@ var SessionHandler2 = HttpApiBuilder.group(Api2, "server.session", (handlers) =>
264
267
  };
265
268
  })).handle("session.diff", Effect.fn(function* (ctx) {
266
269
  return {
267
- data: yield* session.diff({ sessionID: ctx.params.sessionID, ...ctx.query }).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.MessageNotFoundError", missingMessage2), Effect.catchTag("Session.TurnRangeError", (error) => new InvalidRequestError({ message: error.message, field: error.field })), Effect.catchTag("Snapshot.Error", failedSnapshot2("diff session turn", ctx.params.sessionID)))
270
+ data: yield* session.diff({ sessionID: ctx.params.sessionID, ...ctx.query }).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.MessageNotFoundError", missingMessage2), Effect.catchTag("Session.TurnRangeError", (error) => new InvalidRequestError({ message: error.message, field: error.field })), Effect.catchTag("Snapshot.Error", failedSnapshot2("diff session turn", ctx.params.sessionID)), locationErrors2)
268
271
  };
269
272
  })).handle("session.inbox.list", Effect.fn(function* (ctx) {
270
273
  return {
@@ -1,6 +1,7 @@
1
1
  import {
2
+ locationErrors2,
2
3
  sessionInfo2
3
- } from "./handlers-8j6eh3dh.js";
4
+ } from "./fetch-14vy2pac.js";
4
5
 
5
6
  // src/middleware/session-location.ts
6
7
  import { Instance } from "@opencode/core/instance/service";
@@ -8,9 +9,9 @@ import { Session } from "@opencode/core/session";
8
9
  import { Effect, Layer } from "effect";
9
10
  import { HttpRouter } from "effect/unstable/http";
10
11
  import { HttpApiMiddleware } from "effect/unstable/httpapi";
11
- import { InvalidRequestError, SessionNotFoundError } from "@opencode/protocol/errors";
12
+ import { LocationNotFoundError, InvalidRequestError, SessionNotFoundError } from "@opencode/protocol/errors";
12
13
  class SessionLocationMiddleware2 extends HttpApiMiddleware.Service()("@opencode/HttpApiSessionLocation", {
13
- error: [InvalidRequestError, SessionNotFoundError]
14
+ error: [InvalidRequestError, SessionNotFoundError, LocationNotFoundError]
14
15
  }) {
15
16
  }
16
17
  var sessionLocationLayer2 = Layer.effect(SessionLocationMiddleware2, Effect.gen(function* () {
@@ -19,7 +20,7 @@ var sessionLocationLayer2 = Layer.effect(SessionLocationMiddleware2, Effect.gen(
19
20
  return SessionLocationMiddleware2.of((effect) => Effect.gen(function* () {
20
21
  const route = yield* HttpRouter.RouteContext;
21
22
  const session = yield* sessionInfo2(sessions, route.params.sessionID);
22
- return yield* effect.pipe(instances.provide(session));
23
+ return yield* effect.pipe(instances.provide(session), locationErrors2);
23
24
  }));
24
25
  }));
25
26
 
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  __export
3
- } from "./handlers-9rqn6x4v.js";
3
+ } from "./fetch-9rqn6x4v.js";
4
4
 
5
5
  // src/server-info.ts
6
6
  var exports_server_info = {};
7
7
  __export(exports_server_info, {
8
8
  ServerInfo: () => exports_server_info,
9
- Service: () => Service3,
9
+ Service: () => Service5,
10
10
  connectionURLs: () => connectionURLs2,
11
- layer: () => layer3
11
+ layer: () => layer5
12
12
  });
13
13
  import { Context, Layer } from "effect";
14
14
  import { networkInterfaces } from "node:os";
15
15
 
16
- class Service3 extends Context.Service()("@opencode/server/ServerInfo") {
16
+ class Service5 extends Context.Service()("@opencode/server/ServerInfo") {
17
17
  }
18
- function layer3(urls, tmp, app = {}) {
19
- return Layer.succeed(Service3, Service3.of({ urls, app, paths: { tmp } }));
18
+ function layer5(urls, tmp, app = {}) {
19
+ return Layer.succeed(Service5, Service5.of({ urls, app, paths: { tmp } }));
20
20
  }
21
21
  function connectionURLs2(value, requestedHostname) {
22
22
  const url = new URL(value);
@@ -33,4 +33,4 @@ function connectionURLs2(value, requestedHostname) {
33
33
  ];
34
34
  }
35
35
 
36
- export { Service3, layer3, connectionURLs2, exports_server_info };
36
+ export { Service5, layer5, connectionURLs2, exports_server_info };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./handlers-8j6eh3dh.js";
3
+ } from "./fetch-14vy2pac.js";
4
4
  import {
5
5
  Api2
6
- } from "./handlers-cb0457h1.js";
6
+ } from "./fetch-x22271m7.js";
7
7
 
8
8
  // src/handlers/fs.ts
9
9
  import { FileSystem } from "@opencode/core/filesystem";
@@ -1,39 +1,39 @@
1
1
  import {
2
- layer2
3
- } from "./handlers-8j6eh3dh.js";
2
+ layer4
3
+ } from "./fetch-14vy2pac.js";
4
4
  import {
5
5
  formLocationLayer2
6
- } from "./handlers-27edjygf.js";
6
+ } from "./fetch-6n8edpm0.js";
7
7
  import {
8
8
  sessionLocationLayer2
9
- } from "./handlers-kb9735wh.js";
9
+ } from "./fetch-tfdbmzkj.js";
10
10
  import {
11
11
  Api2
12
- } from "./handlers-cb0457h1.js";
12
+ } from "./fetch-x22271m7.js";
13
13
  import {
14
14
  Config2
15
- } from "./handlers-anm12x33.js";
15
+ } from "./fetch-anm12x33.js";
16
16
  import {
17
17
  CorsConfig2
18
- } from "./handlers-q4bn6dy8.js";
18
+ } from "./fetch-q4bn6dy8.js";
19
19
  import {
20
- layer3
21
- } from "./handlers-mzr9gftb.js";
22
- import {
23
- node2
24
- } from "./handlers-rbn15j6z.js";
20
+ layer5
21
+ } from "./fetch-v305azr7.js";
25
22
  import {
26
23
  node3
27
- } from "./handlers-n1svm92q.js";
24
+ } from "./fetch-byt4hbw9.js";
25
+ import {
26
+ node2
27
+ } from "./fetch-0d9kah4z.js";
28
28
  import {
29
29
  handlers2
30
- } from "./handlers-c1rbvtgh.js";
30
+ } from "./fetch-rdf72e8a.js";
31
31
  import {
32
32
  authorizationLayer2
33
- } from "./handlers-gtkdacvk.js";
33
+ } from "./fetch-gtkdacvk.js";
34
34
  import {
35
35
  schemaErrorLayer2
36
- } from "./handlers-t8yzmczr.js";
36
+ } from "./fetch-t8yzmczr.js";
37
37
 
38
38
  // src/routes.ts
39
39
  import { Database } from "@opencode/core/database/database";
@@ -91,8 +91,8 @@ var applicationServiceNodes = [
91
91
  PersistentPty.node,
92
92
  Credential.node,
93
93
  WellKnown.node,
94
- node3,
95
94
  node2,
95
+ node3,
96
96
  LocationServiceMap.node,
97
97
  LocationActivity.node,
98
98
  SessionRestart.node,
@@ -144,8 +144,8 @@ function makeRoutes(auth, options, serviceURLs, overrides, instances) {
144
144
  })) : build(overrides);
145
145
  return serviceLayer.pipe(Layer.flatMap((context) => {
146
146
  const services = Layer.succeedContext(context);
147
- const requestServices = Layer.merge(Layer.succeedContext(Context.pick(Database.Service, Credential.Service, PermissionSaved.Service, PluginUpdate.Service, Project.Service, WellKnown.Service)(context)), layer3(serviceURLs, Context.get(context, Global.Service).tmp, options.app));
148
- const api = HttpApiBuilder.layer(Api2, { openapiPath: "/openapi.json" }).pipe(Layer.provide(handlers2.pipe(Layer.provide(services), Layer.provide(Layer.succeed(CorsConfig2, options)))), Layer.provide(formLocationLayer2), Layer.provide(sessionLocationLayer2), Layer.provide(layer2), Layer.provide(authorizationLayer2), Layer.provide(schemaErrorLayer2), Layer.provide(auth), HttpRouter.provideRequest(requestServices), Layer.provideMerge(services), Layer.provideMerge(HttpRouter.layer));
147
+ const requestServices = Layer.merge(Layer.succeedContext(Context.pick(Database.Service, Credential.Service, PermissionSaved.Service, PluginUpdate.Service, Project.Service, WellKnown.Service)(context)), layer5(serviceURLs, Context.get(context, Global.Service).tmp, options.app));
148
+ const api = HttpApiBuilder.layer(Api2, { openapiPath: "/openapi.json" }).pipe(Layer.provide(handlers2.pipe(Layer.provide(services), Layer.provide(Layer.succeed(CorsConfig2, options)))), Layer.provide(formLocationLayer2), Layer.provide(sessionLocationLayer2), Layer.provide(layer4), Layer.provide(authorizationLayer2), Layer.provide(schemaErrorLayer2), Layer.provide(auth), HttpRouter.provideRequest(requestServices), Layer.provideMerge(services), Layer.provideMerge(HttpRouter.layer));
149
149
  return Layer.merge(api, V1Migration.layer.pipe(Layer.provide(services)));
150
150
  }));
151
151
  }
@@ -1,6 +1,9 @@
1
+ import {
2
+ locationErrors2
3
+ } from "./fetch-14vy2pac.js";
1
4
  import {
2
5
  Api2
3
- } from "./handlers-cb0457h1.js";
6
+ } from "./fetch-x22271m7.js";
4
7
 
5
8
  // src/handlers/generate.ts
6
9
  import { Generate } from "@opencode/core/generate";
@@ -19,7 +22,7 @@ var GenerateHandler2 = HttpApiBuilder.group(Api2, "server.generate", (handlers)
19
22
  const generate = yield* Generate.Service;
20
23
  const text = yield* generate.text(request.payload).pipe(Effect.mapError((error) => error._tag === "Generate.ModelSelectionError" ? new InvalidRequestError({ message: error.message }) : new ServiceUnavailableError({ message: error.message, service: error.service })));
21
24
  return { data: { text } };
22
- }, Effect.provide(services)));
25
+ }, Effect.provide(services), locationErrors2));
23
26
  }));
24
27
 
25
28
  export { GenerateHandler2 };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./handlers-cb0457h1.js";
3
+ } from "./fetch-x22271m7.js";
4
4
 
5
5
  // src/handlers/migration.ts
6
6
  import { V1Migration } from "@opencode/core/database/v1-migration";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  LocationMiddleware2
3
- } from "./handlers-8j6eh3dh.js";
3
+ } from "./fetch-14vy2pac.js";
4
4
  import {
5
5
  FormLocationMiddleware2
6
- } from "./handlers-27edjygf.js";
6
+ } from "./fetch-6n8edpm0.js";
7
7
  import {
8
8
  SessionLocationMiddleware2
9
- } from "./handlers-kb9735wh.js";
9
+ } from "./fetch-tfdbmzkj.js";
10
10
 
11
11
  // src/api.ts
12
12
  import { makeDefaultApi } from "@opencode/protocol/api";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./handlers-9rqn6x4v.js";
3
+ } from "./fetch-9rqn6x4v.js";
4
4
 
5
5
  // src/service-status.ts
6
6
  var exports_service_status = {};
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./handlers-8j6eh3dh.js";
3
+ } from "./fetch-14vy2pac.js";
4
4
  import {
5
5
  Api2
6
- } from "./handlers-cb0457h1.js";
6
+ } from "./fetch-x22271m7.js";
7
7
 
8
8
  // src/handlers/agent.ts
9
9
  import { Agent } from "@opencode/core/agent";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  Api2
3
- } from "./handlers-cb0457h1.js";
3
+ } from "./fetch-x22271m7.js";
4
4
  import {
5
5
  CorsConfig2,
6
6
  isAllowedRequestOrigin2
7
- } from "./handlers-q4bn6dy8.js";
7
+ } from "./fetch-q4bn6dy8.js";
8
8
  import {
9
9
  runPtySocket2
10
- } from "./handlers-hezj1jdf.js";
10
+ } from "./fetch-hezj1jdf.js";
11
11
 
12
12
  // src/handlers/persistent-pty.ts
13
13
  import { PersistentPty } from "@opencode/core/persistent-pty";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  missingSession2,
3
3
  failedMessageDecode2
4
- } from "./handlers-smaf4a18.js";
4
+ } from "./fetch-smaf4a18.js";
5
5
  import {
6
6
  Api2
7
- } from "./handlers-cb0457h1.js";
7
+ } from "./fetch-x22271m7.js";
8
8
 
9
9
  // src/handlers/message.ts
10
10
  import { SessionMessage } from "@opencode/core/session/message";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./handlers-cb0457h1.js";
3
+ } from "./fetch-x22271m7.js";
4
4
 
5
5
  // src/handlers/rpc.ts
6
6
  import { Rpc } from "@opencode/core/rpc";
package/dist/cors.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  CorsConfig2,
3
3
  isAllowedCorsOrigin2,
4
4
  isAllowedRequestOrigin2
5
- } from "./chunks/handlers-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
- Service5,
5
+ Service2,
6
6
  frame2,
7
7
  make4,
8
- layer5,
8
+ layer2,
9
9
  exports_event_feed
10
- } from "./chunks/handlers-54sczv30.js";
10
+ } from "./chunks/fetch-2sy3c7de.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
+ layer2 as layer,
19
19
  make4 as make
20
20
  };
package/dist/fetch.js CHANGED
@@ -1,53 +1,53 @@
1
1
  import {
2
2
  make3,
3
3
  exports_fetch
4
- } from "./chunks/handlers-1syxrfr0.js";
5
- import"./chunks/handlers-t1ykn76g.js";
6
- import"./chunks/handlers-t8yzmczr.js";
7
- import"./chunks/handlers-gtkdacvk.js";
8
- import"./chunks/handlers-c1rbvtgh.js";
9
- import"./chunks/handlers-334f1wqc.js";
10
- import"./chunks/handlers-nq5wb210.js";
11
- import"./chunks/handlers-42hredtt.js";
12
- import"./chunks/handlers-ywj7qjmv.js";
13
- import"./chunks/handlers-rre9g8c5.js";
14
- import"./chunks/handlers-rnws4wbc.js";
15
- import"./chunks/handlers-1g0h49bb.js";
16
- import"./chunks/handlers-vgwss5ek.js";
17
- import"./chunks/handlers-sp0g6qt6.js";
18
- import"./chunks/handlers-830yc5sa.js";
19
- import"./chunks/handlers-8d2n01za.js";
20
- import"./chunks/handlers-fqvt1agm.js";
21
- import"./chunks/handlers-y7jha6td.js";
22
- import"./chunks/handlers-m7cvtaax.js";
23
- import"./chunks/handlers-4zhj4tp6.js";
24
- import"./chunks/handlers-h7dczx71.js";
25
- import"./chunks/handlers-nq63h5nv.js";
26
- import"./chunks/handlers-9qna85w8.js";
27
- import"./chunks/handlers-hezj1jdf.js";
28
- import"./chunks/handlers-8tzsm9rr.js";
29
- import"./chunks/handlers-77mkgw7d.js";
30
- import"./chunks/handlers-436zj0s2.js";
31
- import"./chunks/handlers-ybejac25.js";
32
- import"./chunks/handlers-9gjx5y7a.js";
33
- import"./chunks/handlers-tj793hqk.js";
34
- import"./chunks/handlers-qvxvnv5e.js";
35
- import"./chunks/handlers-fbrf1xh2.js";
36
- import"./chunks/handlers-x34qkqqy.js";
37
- import"./chunks/handlers-2nqgjchx.js";
38
- import"./chunks/handlers-3e7m37es.js";
39
- import"./chunks/handlers-t7mxrz5t.js";
40
- import"./chunks/handlers-cb0457h1.js";
41
- import"./chunks/handlers-27edjygf.js";
42
- import"./chunks/handlers-kb9735wh.js";
43
- import"./chunks/handlers-rbn15j6z.js";
44
- import"./chunks/handlers-8j6eh3dh.js";
45
- import"./chunks/handlers-smaf4a18.js";
46
- import"./chunks/handlers-mzr9gftb.js";
47
- import"./chunks/handlers-n1svm92q.js";
48
- import"./chunks/handlers-anm12x33.js";
49
- import"./chunks/handlers-q4bn6dy8.js";
50
- import"./chunks/handlers-54sczv30.js";
4
+ } from "./chunks/fetch-a44pvkv9.js";
5
+ import"./chunks/fetch-w4srakgh.js";
6
+ import"./chunks/fetch-t8yzmczr.js";
7
+ import"./chunks/fetch-gtkdacvk.js";
8
+ import"./chunks/fetch-rdf72e8a.js";
9
+ import"./chunks/fetch-vrg6639h.js";
10
+ import"./chunks/fetch-rytwz38r.js";
11
+ import"./chunks/fetch-eces9922.js";
12
+ import"./chunks/fetch-jv3gkh16.js";
13
+ import"./chunks/fetch-gesckh61.js";
14
+ import"./chunks/fetch-yjn29jjj.js";
15
+ import"./chunks/fetch-pmra5yx3.js";
16
+ import"./chunks/fetch-g27fjyd3.js";
17
+ import"./chunks/fetch-r3mjvgfk.js";
18
+ import"./chunks/fetch-yddkh4zb.js";
19
+ import"./chunks/fetch-h9qn14ck.js";
20
+ import"./chunks/fetch-hezj1jdf.js";
21
+ import"./chunks/fetch-wq6tfxrf.js";
22
+ import"./chunks/fetch-kta0tack.js";
23
+ import"./chunks/fetch-wkt3zs7x.js";
24
+ import"./chunks/fetch-gr63yha5.js";
25
+ import"./chunks/fetch-0vcrsckz.js";
26
+ import"./chunks/fetch-6w79g1zd.js";
27
+ import"./chunks/fetch-z854b9h8.js";
28
+ import"./chunks/fetch-0gwhtgb0.js";
29
+ import"./chunks/fetch-evmrcn2p.js";
30
+ import"./chunks/fetch-kcvfpwaw.js";
31
+ import"./chunks/fetch-5w803dat.js";
32
+ import"./chunks/fetch-qwcstt60.js";
33
+ import"./chunks/fetch-00b7zw9n.js";
34
+ import"./chunks/fetch-qf0s8ctx.js";
35
+ import"./chunks/fetch-kww1pvjb.js";
36
+ import"./chunks/fetch-2nwa3ky2.js";
37
+ import"./chunks/fetch-zgk9zpte.js";
38
+ import"./chunks/fetch-d261w70h.js";
39
+ import"./chunks/fetch-ajhv9q2g.js";
40
+ import"./chunks/fetch-q4bn6dy8.js";
41
+ import"./chunks/fetch-x22271m7.js";
42
+ import"./chunks/fetch-tfdbmzkj.js";
43
+ import"./chunks/fetch-6n8edpm0.js";
44
+ import"./chunks/fetch-2sy3c7de.js";
45
+ import"./chunks/fetch-0d9kah4z.js";
46
+ import"./chunks/fetch-byt4hbw9.js";
47
+ import"./chunks/fetch-14vy2pac.js";
48
+ import"./chunks/fetch-smaf4a18.js";
49
+ import"./chunks/fetch-anm12x33.js";
50
+ import"./chunks/fetch-v305azr7.js";
51
51
  export {
52
52
  exports_fetch as ServerFetch,
53
53
  make3 as make
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  AgentHandler2
3
- } from "../chunks/handlers-x34qkqqy.js";
4
- import"../chunks/handlers-cb0457h1.js";
5
- import"../chunks/handlers-27edjygf.js";
6
- import"../chunks/handlers-kb9735wh.js";
7
- import"../chunks/handlers-8j6eh3dh.js";
8
- import"../chunks/handlers-smaf4a18.js";
3
+ } from "../chunks/fetch-yddkh4zb.js";
4
+ import"../chunks/fetch-x22271m7.js";
5
+ import"../chunks/fetch-tfdbmzkj.js";
6
+ import"../chunks/fetch-6n8edpm0.js";
7
+ import"../chunks/fetch-14vy2pac.js";
8
+ import"../chunks/fetch-smaf4a18.js";
9
9
  export {
10
10
  AgentHandler2 as AgentHandler
11
11
  };
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  CommandHandler2
3
- } from "../chunks/handlers-rnws4wbc.js";
4
- import"../chunks/handlers-cb0457h1.js";
5
- import"../chunks/handlers-27edjygf.js";
6
- import"../chunks/handlers-kb9735wh.js";
7
- import"../chunks/handlers-8j6eh3dh.js";
8
- import"../chunks/handlers-smaf4a18.js";
3
+ } from "../chunks/fetch-00b7zw9n.js";
4
+ import"../chunks/fetch-x22271m7.js";
5
+ import"../chunks/fetch-tfdbmzkj.js";
6
+ import"../chunks/fetch-6n8edpm0.js";
7
+ import"../chunks/fetch-14vy2pac.js";
8
+ import"../chunks/fetch-smaf4a18.js";
9
9
  export {
10
10
  CommandHandler2 as CommandHandler
11
11
  };