@opencode/server 0.0.0-dev-1074 → 0.0.0-dev-1112

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 (119) hide show
  1. package/dist/api.js +5 -5
  2. package/dist/auth.js +1 -1
  3. package/dist/chunks/{options-059rbh9c.js → api-059rbh9c.js} +1 -1
  4. package/dist/chunks/{options-z3gjns4k.js → api-0e4fm4yw.js} +1 -1
  5. package/dist/chunks/{options-39nnfjx1.js → api-0q7s66m2.js} +4 -4
  6. package/dist/chunks/{options-qqjx7zqw.js → api-1vxxxmgg.js} +2 -2
  7. package/dist/chunks/{options-jr0zs68z.js → api-2835150m.js} +6 -3
  8. package/dist/chunks/{options-xtx0rz3e.js → api-370cpmna.js} +5 -2
  9. package/dist/chunks/{options-b6cxph1w.js → api-4z8yg1dv.js} +4 -4
  10. package/dist/chunks/{options-wnw6k7m6.js → api-50xc6x42.js} +3 -3
  11. package/dist/chunks/{options-fepz0ta2.js → api-5553qfcy.js} +3 -3
  12. package/dist/chunks/{options-8yrm3yp0.js → api-74kxthdf.js} +1 -1
  13. package/dist/chunks/{options-78rcgzsr.js → api-78rcgzsr.js} +1 -1
  14. package/dist/chunks/{options-7b9xm1qg.js → api-7b9xm1qg.js} +1 -1
  15. package/dist/chunks/{options-6kxghskv.js → api-7cd61xtm.js} +4 -2
  16. package/dist/chunks/{options-b315n07t.js → api-7x1re4zg.js} +2 -2
  17. package/dist/chunks/{options-7nstrb2v.js → api-agenqygg.js} +2 -2
  18. package/dist/chunks/{options-tze85g2y.js → api-amndpc82.js} +2 -2
  19. package/dist/chunks/{options-qt7zz6ga.js → api-cmrqe852.js} +8 -8
  20. package/dist/chunks/{options-pk035j5m.js → api-dfxfd950.js} +4 -4
  21. package/dist/chunks/{options-djr0jy89.js → api-djr0jy89.js} +1 -1
  22. package/dist/chunks/{options-n6ypjnhz.js → api-gk0yxcp6.js} +1 -1
  23. package/dist/chunks/{options-j80tzjj3.js → api-gqq6kfhc.js} +11 -3
  24. package/dist/chunks/{options-j4at0y5c.js → api-j4at0y5c.js} +1 -1
  25. package/dist/chunks/{options-pcsx5fe9.js → api-jc2vwkyw.js} +2 -2
  26. package/dist/chunks/{options-3n3ecqk9.js → api-jex2fyhq.js} +8 -8
  27. package/dist/chunks/{options-myj773za.js → api-jg12h0ah.js} +7 -7
  28. package/dist/chunks/{options-qdrpva4m.js → api-jqvq1ywe.js} +2 -2
  29. package/dist/chunks/{options-myqk22k5.js → api-myqk22k5.js} +2 -2
  30. package/dist/chunks/{options-7w7s37ab.js → api-p3f060n2.js} +2 -2
  31. package/dist/chunks/{options-xa0sy2cm.js → api-r2veymj8.js} +4 -4
  32. package/dist/chunks/{options-n0a33cnc.js → api-r5696se6.js} +3 -3
  33. package/dist/chunks/{options-j2hee7a4.js → api-rcmctvp9.js} +1 -1
  34. package/dist/chunks/{options-9qbtnftt.js → api-rxyx8sa0.js} +2 -2
  35. package/dist/chunks/{options-wecgp61r.js → api-sawqcym6.js} +5 -5
  36. package/dist/chunks/{options-pmr95crm.js → api-skcryrty.js} +2 -2
  37. package/dist/chunks/{options-8g1x5cgg.js → api-sqxx1p54.js} +2 -2
  38. package/dist/chunks/{options-t32e1bbt.js → api-t32e1bbt.js} +1 -1
  39. package/dist/chunks/{options-v1nm30fe.js → api-vtfzy3at.js} +4 -2
  40. package/dist/chunks/{options-42tqx64k.js → api-vvp99hc9.js} +1 -1
  41. package/dist/chunks/{options-t62b1gmw.js → api-w5yp0ga8.js} +2 -2
  42. package/dist/chunks/{options-kqr36gas.js → api-w9jcwh65.js} +7 -7
  43. package/dist/chunks/{options-mzw3xmnn.js → api-wqv43pj9.js} +7 -3
  44. package/dist/chunks/{options-9k8e9m39.js → api-x6ytresh.js} +11 -11
  45. package/dist/chunks/{options-12zwgdzg.js → api-xbqm7mpj.js} +2 -2
  46. package/dist/chunks/{options-4zne1sdj.js → api-xpg37vzc.js} +2 -2
  47. package/dist/chunks/{options-jgbj3f80.js → api-y1rrh01f.js} +2 -2
  48. package/dist/chunks/{options-qahj7606.js → api-yet0vexm.js} +1 -1
  49. package/dist/chunks/{options-b1sd4cv4.js → api-yrecvjtv.js} +33 -33
  50. package/dist/chunks/{options-aaddmdw5.js → api-yvnxqg4x.js} +3 -3
  51. package/dist/chunks/{options-5pdfedjd.js → api-z3e7v67k.js} +5 -5
  52. package/dist/chunks/{options-h8savpc9.js → api-zds85vps.js} +1 -1
  53. package/dist/chunks/{options-7p3x2xdt.js → api-zmgfywqd.js} +1 -1
  54. package/dist/content-headers.js +1 -1
  55. package/dist/cors.js +1 -1
  56. package/dist/event-feed.js +3 -3
  57. package/dist/fetch.js +58 -58
  58. package/dist/handlers/agent.js +6 -6
  59. package/dist/handlers/artifact.js +3 -3
  60. package/dist/handlers/command.js +6 -6
  61. package/dist/handlers/config.js +6 -6
  62. package/dist/handlers/credential.js +7 -7
  63. package/dist/handlers/debug.js +6 -6
  64. package/dist/handlers/event.js +7 -7
  65. package/dist/handlers/form.js +6 -6
  66. package/dist/handlers/fs.js +7 -7
  67. package/dist/handlers/generate.js +6 -6
  68. package/dist/handlers/integration.js +6 -6
  69. package/dist/handlers/job.js +2 -2
  70. package/dist/handlers/location.js +6 -6
  71. package/dist/handlers/mcp.js +8 -8
  72. package/dist/handlers/media.js +2 -2
  73. package/dist/handlers/message.js +7 -7
  74. package/dist/handlers/migration.js +6 -6
  75. package/dist/handlers/model.js +6 -6
  76. package/dist/handlers/permission.js +6 -6
  77. package/dist/handlers/persistent-pty.js +13 -13
  78. package/dist/handlers/plugin.js +6 -6
  79. package/dist/handlers/project.js +6 -6
  80. package/dist/handlers/provider.js +6 -6
  81. package/dist/handlers/pty-socket.js +1 -1
  82. package/dist/handlers/pty.js +8 -8
  83. package/dist/handlers/reference.js +6 -6
  84. package/dist/handlers/rpc.js +6 -6
  85. package/dist/handlers/schedule.js +2 -2
  86. package/dist/handlers/server.js +9 -9
  87. package/dist/handlers/session-error.js +1 -1
  88. package/dist/handlers/session.js +7 -7
  89. package/dist/handlers/shell.js +6 -6
  90. package/dist/handlers/skill.js +6 -6
  91. package/dist/handlers/usage.js +6 -6
  92. package/dist/handlers/vcs.js +6 -6
  93. package/dist/handlers/voice.js +6 -6
  94. package/dist/handlers/websearch.js +6 -6
  95. package/dist/handlers/worktree.js +6 -6
  96. package/dist/handlers.js +50 -50
  97. package/dist/location.d.ts +3 -1
  98. package/dist/location.js +4 -2
  99. package/dist/media-uri.js +1 -1
  100. package/dist/middleware/authorization.js +2 -2
  101. package/dist/middleware/form-location.js +3 -3
  102. package/dist/middleware/schema-error.js +1 -1
  103. package/dist/middleware/session-location.js +3 -3
  104. package/dist/pairing.js +3 -3
  105. package/dist/process.js +59 -59
  106. package/dist/request-site.js +2 -2
  107. package/dist/request-tracing.js +1 -1
  108. package/dist/routes.js +53 -53
  109. package/dist/server-info.js +3 -3
  110. package/dist/service-status.js +3 -3
  111. package/dist/workerd.js +59 -59
  112. package/package.json +8 -8
  113. /package/dist/chunks/{options-9rqn6x4v.js → api-9rqn6x4v.js} +0 -0
  114. /package/dist/chunks/{options-bd8755ek.js → api-bd8755ek.js} +0 -0
  115. /package/dist/chunks/{options-q187pxxd.js → api-q187pxxd.js} +0 -0
  116. /package/dist/chunks/{options-q4bn6dy8.js → api-q4bn6dy8.js} +0 -0
  117. /package/dist/chunks/{options-smaf4a18.js → api-smaf4a18.js} +0 -0
  118. /package/dist/chunks/{options-xthc02cw.js → api-xthc02cw.js} +0 -0
  119. /package/dist/chunks/{options-yc7nft6q.js → api-yc7nft6q.js} +0 -0
package/dist/api.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  Api2
3
- } from "./chunks/options-n0a33cnc.js";
4
- import"./chunks/options-n6ypjnhz.js";
5
- import"./chunks/options-qahj7606.js";
6
- import"./chunks/options-j80tzjj3.js";
7
- import"./chunks/options-smaf4a18.js";
3
+ } from "./chunks/api-r5696se6.js";
4
+ import"./chunks/api-gk0yxcp6.js";
5
+ import"./chunks/api-yet0vexm.js";
6
+ import"./chunks/api-gqq6kfhc.js";
7
+ import"./chunks/api-smaf4a18.js";
8
8
  export {
9
9
  Api2 as Api
10
10
  };
package/dist/auth.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  verifySession2,
8
8
  sessionCookieName2,
9
9
  exports_auth
10
- } from "./chunks/options-j4at0y5c.js";
10
+ } from "./chunks/api-j4at0y5c.js";
11
11
  export {
12
12
  Config2 as Config,
13
13
  SESSION_TTL_SECONDS2 as SESSION_TTL_SECONDS,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./options-smaf4a18.js";
3
+ } from "./api-smaf4a18.js";
4
4
 
5
5
  // src/handlers/schedule.ts
6
6
  import { Permission } from "@opencode/core/permission";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./options-n0a33cnc.js";
3
+ } from "./api-r5696se6.js";
4
4
 
5
5
  // src/handlers/config.ts
6
6
  import { Config } from "@opencode/core/config";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  __export
3
- } from "./options-9rqn6x4v.js";
3
+ } from "./api-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: () => make2
9
+ make: () => make4
10
10
  });
11
11
  import { Effect, Ref } from "effect";
12
- var make2 = Effect.fnUntraced(function* (options = {}) {
12
+ var make4 = 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 make2 = Effect.fnUntraced(function* (options = {}) {
20
20
  };
21
21
  });
22
22
 
23
- export { make2, exports_service_status };
23
+ export { make4, exports_service_status };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  Api2
3
- } from "./options-n0a33cnc.js";
3
+ } from "./api-r5696se6.js";
4
4
  import {
5
5
  requireConnectable2
6
- } from "./options-tze85g2y.js";
6
+ } from "./api-amndpc82.js";
7
7
 
8
8
  // src/handlers/credential.ts
9
9
  import { Credential } from "@opencode/core/credential";
@@ -1,9 +1,10 @@
1
1
  import {
2
- locationErrors2
3
- } from "./options-j80tzjj3.js";
2
+ locationErrors2,
3
+ awaitPlugins2
4
+ } from "./api-gqq6kfhc.js";
4
5
  import {
5
6
  Api2
6
- } from "./options-n0a33cnc.js";
7
+ } from "./api-r5696se6.js";
7
8
 
8
9
  // src/handlers/voice.ts
9
10
  import { Location } from "@opencode/core/location";
@@ -19,9 +20,11 @@ var VoiceHandler2 = HttpApiBuilder.group(Api2, "server.voice", (handlers) => Eff
19
20
  const locations = yield* LocationServiceMap.Service;
20
21
  const services = locations.get(Location.Ref.make({ directory: AbsolutePath.make(global.config) }));
21
22
  return handlers.handle("voice.models", Effect.fn("server.voice.models")(function* () {
23
+ yield* awaitPlugins2;
22
24
  const voice = yield* Voice.Service;
23
25
  return { data: yield* voice.models() };
24
26
  }, Effect.provide(services), locationErrors2)).handle("voice.session", Effect.fn("server.voice.session")(function* (request) {
27
+ yield* awaitPlugins2;
25
28
  const voice = yield* Voice.Service;
26
29
  const transport = yield* voice.session(request.payload).pipe(Effect.mapError((error) => error._tag === "Voice.InvalidRequestError" ? new InvalidRequestError({ message: error.message }) : new ServiceUnavailableError({ message: error.message, service: error.service })));
27
30
  return { data: { transport } };
@@ -1,9 +1,10 @@
1
1
  import {
2
+ awaitPlugins2,
2
3
  response2
3
- } from "./options-j80tzjj3.js";
4
+ } from "./api-gqq6kfhc.js";
4
5
  import {
5
6
  Api2
6
- } from "./options-n0a33cnc.js";
7
+ } from "./api-r5696se6.js";
7
8
 
8
9
  // src/handlers/model.ts
9
10
  import { Model } from "@opencode/core/model";
@@ -11,9 +12,11 @@ import { Effect } from "effect";
11
12
  import { HttpApiBuilder } from "effect/http-api";
12
13
  var ModelHandler2 = HttpApiBuilder.group(Api2, "server.model", (handlers) => Effect.gen(function* () {
13
14
  return handlers.handle("model.list", Effect.fn(function* (ctx) {
15
+ yield* awaitPlugins2;
14
16
  const models = yield* Model.Service;
15
17
  return yield* response2(models.available(ctx.query.types));
16
18
  })).handle("model.default", Effect.fn(function* () {
19
+ yield* awaitPlugins2;
17
20
  const models = yield* Model.Service;
18
21
  return yield* response2(models.default());
19
22
  }));
@@ -2,18 +2,18 @@ import {
2
2
  locationErrors2,
3
3
  response2,
4
4
  requestRef2
5
- } from "./options-j80tzjj3.js";
5
+ } from "./api-gqq6kfhc.js";
6
6
  import {
7
7
  Api2
8
- } from "./options-n0a33cnc.js";
8
+ } from "./api-r5696se6.js";
9
9
  import {
10
10
  CorsConfig2,
11
11
  isAllowedRequestOrigin2
12
- } from "./options-q4bn6dy8.js";
12
+ } from "./api-q4bn6dy8.js";
13
13
  import {
14
14
  runPtySocket2,
15
15
  holdLocation2
16
- } from "./options-q187pxxd.js";
16
+ } from "./api-q187pxxd.js";
17
17
 
18
18
  // src/handlers/mcp.ts
19
19
  import { Location } from "@opencode/core/location";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./options-smaf4a18.js";
3
+ } from "./api-smaf4a18.js";
4
4
  import {
5
5
  locationErrors2,
6
6
  response2,
7
7
  sessionInfo2
8
- } from "./options-j80tzjj3.js";
8
+ } from "./api-gqq6kfhc.js";
9
9
  import {
10
10
  Api2
11
- } from "./options-n0a33cnc.js";
11
+ } from "./api-r5696se6.js";
12
12
 
13
13
  // src/handlers/permission.ts
14
14
  import { Instance } from "@opencode/core/instance/service";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  missingSession2,
3
3
  failedMessageDecode2
4
- } from "./options-smaf4a18.js";
4
+ } from "./api-smaf4a18.js";
5
5
  import {
6
6
  Api2
7
- } from "./options-n0a33cnc.js";
7
+ } from "./api-r5696se6.js";
8
8
  import {
9
9
  wantsMediaRefs2
10
- } from "./options-xthc02cw.js";
10
+ } from "./api-xthc02cw.js";
11
11
 
12
12
  // src/handlers/message.ts
13
13
  import { SessionMessage } from "@opencode/core/session/message";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./options-n0a33cnc.js";
3
+ } from "./api-r5696se6.js";
4
4
 
5
5
  // src/handlers/location.ts
6
6
  import { Location } from "@opencode/core/location";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./options-smaf4a18.js";
3
+ } from "./api-smaf4a18.js";
4
4
 
5
5
  // src/handlers/job.ts
6
6
  import { Job } from "@opencode/core/job";
@@ -4,7 +4,7 @@ import {
4
4
  authorized2,
5
5
  verifySession2,
6
6
  sessionCookieName2
7
- } from "./options-j4at0y5c.js";
7
+ } from "./api-j4at0y5c.js";
8
8
 
9
9
  // src/middleware/authorization.ts
10
10
  import { UnauthorizedError } from "@opencode/protocol/errors";
@@ -1,9 +1,10 @@
1
1
  import {
2
+ awaitPlugins2,
2
3
  response2
3
- } from "./options-j80tzjj3.js";
4
+ } from "./api-gqq6kfhc.js";
4
5
  import {
5
6
  Api2
6
- } from "./options-n0a33cnc.js";
7
+ } from "./api-r5696se6.js";
7
8
 
8
9
  // src/handlers/websearch.ts
9
10
  import { WebSearch } from "@opencode/core/websearch";
@@ -15,6 +16,7 @@ var WebSearchHandler2 = HttpApiBuilder.group(Api2, "server.websearch", (handlers
15
16
  const websearch = yield* WebSearch.Service;
16
17
  return yield* response2(websearch.providers());
17
18
  })).handle("websearch.query", Effect.fn("server.websearch.query")(function* (request) {
19
+ yield* awaitPlugins2;
18
20
  const websearch = yield* WebSearch.Service;
19
21
  return yield* response2(websearch.query(request.payload).pipe(Effect.catchTags({
20
22
  "WebSearch.ProviderRequired": () => new InvalidRequestError({
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./options-j80tzjj3.js";
3
+ } from "./api-gqq6kfhc.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-n0a33cnc.js";
6
+ } from "./api-r5696se6.js";
7
7
 
8
8
  // src/handlers/form.ts
9
9
  import { Form } from "@opencode/core/form";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./options-j80tzjj3.js";
3
+ } from "./api-gqq6kfhc.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-n0a33cnc.js";
6
+ } from "./api-r5696se6.js";
7
7
 
8
8
  // src/handlers/vcs.ts
9
9
  import { Vcs } from "@opencode/core/vcs";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./options-j80tzjj3.js";
3
+ } from "./api-gqq6kfhc.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-n0a33cnc.js";
6
+ } from "./api-r5696se6.js";
7
7
 
8
8
  // src/handlers/integration.ts
9
9
  import { Integration } from "@opencode/core/integration";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  Api2
3
- } from "./options-n0a33cnc.js";
3
+ } from "./api-r5696se6.js";
4
4
  import {
5
5
  SESSION_TTL_SECONDS2,
6
6
  Config2,
7
7
  issueSession2,
8
8
  sessionCookieName2
9
- } from "./options-j4at0y5c.js";
10
- import {
11
- Service3
12
- } from "./options-5pdfedjd.js";
9
+ } from "./api-j4at0y5c.js";
13
10
  import {
14
11
  Service2
15
- } from "./options-kqr36gas.js";
12
+ } from "./api-z3e7v67k.js";
13
+ import {
14
+ Service3
15
+ } from "./api-w9jcwh65.js";
16
16
 
17
17
  // src/handlers/server.ts
18
18
  import { hostname } from "node:os";
@@ -22,10 +22,10 @@ import { HttpApiBuilder } from "effect/http-api";
22
22
  import { PersistentPty } from "@opencode/core/persistent-pty";
23
23
  import { UnauthorizedError } from "@opencode/protocol/errors";
24
24
  var ServerHandler2 = HttpApiBuilder.group(Api2, "server.server", (handlers) => Effect.gen(function* () {
25
- const pairing = yield* Service2;
25
+ const pairing = yield* Service3;
26
26
  const auth = yield* Config2;
27
27
  return handlers.handle("server.info", () => Effect.gen(function* () {
28
- const info = yield* Service3;
28
+ const info = yield* Service2;
29
29
  return {
30
30
  version: info.app.version ?? "unknown",
31
31
  pid: process.pid ?? 0,
@@ -3,16 +3,16 @@ import {
3
3
  missingMessage2,
4
4
  failedMessageDecode2,
5
5
  failedSnapshot2
6
- } from "./options-smaf4a18.js";
6
+ } from "./api-smaf4a18.js";
7
7
  import {
8
8
  locationErrors2
9
- } from "./options-j80tzjj3.js";
9
+ } from "./api-gqq6kfhc.js";
10
10
  import {
11
11
  Api2
12
- } from "./options-n0a33cnc.js";
12
+ } from "./api-r5696se6.js";
13
13
  import {
14
14
  wantsMediaRefs2
15
- } from "./options-xthc02cw.js";
15
+ } from "./api-xthc02cw.js";
16
16
 
17
17
  // src/handlers/session.ts
18
18
  import { Instance } from "@opencode/core/instance/service";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CONTENT_SECURITY_POLICY2,
3
3
  disposition2
4
- } from "./options-t32e1bbt.js";
4
+ } from "./api-t32e1bbt.js";
5
5
 
6
6
  // src/handlers/media.ts
7
7
  import { Database } from "@opencode/core/database/database";
@@ -2,7 +2,7 @@ import {
2
2
  locationErrors2,
3
3
  sessionInfo2,
4
4
  requestRef2
5
- } from "./options-j80tzjj3.js";
5
+ } from "./api-gqq6kfhc.js";
6
6
 
7
7
  // src/middleware/form-location.ts
8
8
  import { Instance } from "@opencode/core/instance/service";
@@ -1,14 +1,15 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./options-smaf4a18.js";
3
+ } from "./api-smaf4a18.js";
4
4
 
5
5
  // src/location.ts
6
6
  import { FileSystem } from "@opencode/core/filesystem";
7
7
  import { Location } from "@opencode/core/location";
8
+ import { Plugin } from "@opencode/core/plugin";
8
9
  import { LocationServiceMap } from "@opencode/core/location-services";
9
10
  import { AbsolutePath } from "@opencode/core/schema";
10
11
  import { Session } from "@opencode/core/session";
11
- import { LocationNotFoundError, InvalidRequestError } from "@opencode/protocol/errors";
12
+ import { LocationNotFoundError, InvalidRequestError, ServiceUnavailableError } from "@opencode/protocol/errors";
12
13
  import { Effect, Layer, Schema } from "effect";
13
14
  import { HttpServerRequest } from "effect/http";
14
15
  import { HttpApiMiddleware } from "effect/http-api";
@@ -20,6 +21,13 @@ function locationErrors2(effect) {
20
21
  message: `Location not found: ${error.directory}`
21
22
  }))));
22
23
  }
24
+ var awaitPlugins2 = Plugin.awaitActivation.pipe(Effect.timeoutOrElse({
25
+ duration: "5 seconds",
26
+ orElse: () => Effect.fail(new ServiceUnavailableError({
27
+ message: "Location plugins did not finish activating",
28
+ service: "plugin"
29
+ }))
30
+ }));
23
31
  function response2(data) {
24
32
  return Effect.gen(function* () {
25
33
  const location = yield* Location.Service;
@@ -59,4 +67,4 @@ var layer3 = Layer.effect(LocationMiddleware2, Effect.gen(function* () {
59
67
  }));
60
68
  }));
61
69
 
62
- export { LocationMiddleware2, locationErrors2, response2, sessionInfo2, requestRef2, layer3 };
70
+ export { LocationMiddleware2, locationErrors2, awaitPlugins2, response2, sessionInfo2, requestRef2, layer3 };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./options-9rqn6x4v.js";
3
+ } from "./api-9rqn6x4v.js";
4
4
 
5
5
  // src/auth.ts
6
6
  var exports_auth = {};
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  requestRef2
3
- } from "./options-j80tzjj3.js";
3
+ } from "./api-gqq6kfhc.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-n0a33cnc.js";
6
+ } from "./api-r5696se6.js";
7
7
 
8
8
  // src/handlers/debug.ts
9
9
  import { LocationServiceMap } from "@opencode/core/location-service-map";
@@ -1,32 +1,32 @@
1
1
  import {
2
2
  isAllowedCorsOrigin2
3
- } from "./options-q4bn6dy8.js";
3
+ } from "./api-q4bn6dy8.js";
4
4
  import {
5
5
  middleware2
6
- } from "./options-myqk22k5.js";
6
+ } from "./api-myqk22k5.js";
7
7
  import {
8
8
  withoutParentSpan2
9
- } from "./options-yc7nft6q.js";
9
+ } from "./api-yc7nft6q.js";
10
10
  import {
11
11
  createRoutes2
12
- } from "./options-9k8e9m39.js";
12
+ } from "./api-x6ytresh.js";
13
13
  import {
14
14
  __export
15
- } from "./options-9rqn6x4v.js";
15
+ } from "./api-9rqn6x4v.js";
16
16
 
17
17
  // src/fetch.ts
18
18
  var exports_fetch = {};
19
19
  __export(exports_fetch, {
20
20
  ServerFetch: () => exports_fetch,
21
- make: () => make3
21
+ make: () => make2
22
22
  });
23
23
  import { Context, Effect, Layer } from "effect";
24
24
  import { HttpEffect, HttpMiddleware, HttpRouter, HttpServer } from "effect/http";
25
25
  import { SessionRestart } from "@opencode/core/session/execution/restart";
26
- var make3 = Effect.fn("ServerFetch.make")(function* (options = {}, boot = {}) {
26
+ var make2 = Effect.fn("ServerFetch.make")(function* (options = {}, boot = {}) {
27
27
  const context = yield* Layer.build(createRoutes2(options, () => [], boot.overrides ?? []).pipe(Layer.provide(HttpServer.layerServices))).pipe(withoutParentSpan2);
28
28
  yield* Effect.forkDetach(Context.get(context, SessionRestart.Service).resumeSuspendedSessions);
29
29
  return Context.get(context, HttpRouter.HttpRouter).asHttpEffect().pipe(middleware2(options), HttpMiddleware.cors({ allowedOrigins: (origin) => isAllowedCorsOrigin2(origin, options), maxAge: 86400 }), HttpEffect.toWebHandlerWith(context));
30
30
  });
31
31
 
32
- export { make3, exports_fetch };
32
+ export { make2, exports_fetch };
@@ -1,25 +1,25 @@
1
1
  import {
2
2
  Api2
3
- } from "./options-n0a33cnc.js";
3
+ } from "./api-r5696se6.js";
4
4
  import {
5
5
  CorsConfig2,
6
6
  isAllowedRequestOrigin2
7
- } from "./options-q4bn6dy8.js";
7
+ } from "./api-q4bn6dy8.js";
8
8
  import {
9
9
  makeArtifact2
10
- } from "./options-t62b1gmw.js";
10
+ } from "./api-w5yp0ga8.js";
11
11
  import {
12
12
  makeJob2
13
- } from "./options-78rcgzsr.js";
13
+ } from "./api-78rcgzsr.js";
14
14
  import {
15
15
  makeMediaGet2
16
- } from "./options-djr0jy89.js";
16
+ } from "./api-djr0jy89.js";
17
17
  import {
18
18
  runPtySocket2
19
- } from "./options-q187pxxd.js";
19
+ } from "./api-q187pxxd.js";
20
20
  import {
21
21
  makeSchedule2
22
- } from "./options-059rbh9c.js";
22
+ } from "./api-059rbh9c.js";
23
23
 
24
24
  // src/handlers/persistent-pty.ts
25
25
  import { PersistentPty } from "@opencode/core/persistent-pty";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./options-j80tzjj3.js";
3
+ } from "./api-gqq6kfhc.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-n0a33cnc.js";
6
+ } from "./api-r5696se6.js";
7
7
 
8
8
  // src/handlers/usage.ts
9
9
  import { UsageLimits } from "@opencode/core/usage-limits";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  isAllowedRequestOrigin2
3
- } from "./options-q4bn6dy8.js";
3
+ } from "./api-q4bn6dy8.js";
4
4
  import {
5
5
  __export
6
- } from "./options-9rqn6x4v.js";
6
+ } from "./api-9rqn6x4v.js";
7
7
 
8
8
  // src/request-site.ts
9
9
  var exports_request_site = {};
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./options-j80tzjj3.js";
3
+ } from "./api-gqq6kfhc.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-n0a33cnc.js";
6
+ } from "./api-r5696se6.js";
7
7
 
8
8
  // src/handlers/agent.ts
9
9
  import { Agent } from "@opencode/core/agent";
@@ -2,18 +2,18 @@ import {
2
2
  locationErrors2,
3
3
  response2,
4
4
  requestRef2
5
- } from "./options-j80tzjj3.js";
5
+ } from "./api-gqq6kfhc.js";
6
6
  import {
7
7
  Api2
8
- } from "./options-n0a33cnc.js";
8
+ } from "./api-r5696se6.js";
9
9
  import {
10
10
  CorsConfig2,
11
11
  isAllowedRequestOrigin2
12
- } from "./options-q4bn6dy8.js";
12
+ } from "./api-q4bn6dy8.js";
13
13
  import {
14
14
  runPtySocket2,
15
15
  holdLocation2
16
- } from "./options-q187pxxd.js";
16
+ } from "./api-q187pxxd.js";
17
17
 
18
18
  // src/handlers/pty.ts
19
19
  import { Pty } from "@opencode/core/pty";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  LocationMiddleware2
3
- } from "./options-j80tzjj3.js";
3
+ } from "./api-gqq6kfhc.js";
4
4
  import {
5
5
  FormLocationMiddleware2
6
- } from "./options-n6ypjnhz.js";
6
+ } from "./api-gk0yxcp6.js";
7
7
  import {
8
8
  SessionLocationMiddleware2
9
- } from "./options-qahj7606.js";
9
+ } from "./api-yet0vexm.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
  Api2
3
- } from "./options-n0a33cnc.js";
3
+ } from "./api-r5696se6.js";
4
4
 
5
5
  // src/handlers/rpc.ts
6
6
  import { Rpc } from "@opencode/core/rpc";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./options-j80tzjj3.js";
3
+ } from "./api-gqq6kfhc.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-n0a33cnc.js";
6
+ } from "./api-r5696se6.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
  __export
3
- } from "./options-9rqn6x4v.js";
3
+ } from "./api-9rqn6x4v.js";
4
4
 
5
5
  // src/event-feed.ts
6
6
  var exports_event_feed = {};
@@ -12,7 +12,7 @@ __export(exports_event_feed, {
12
12
  SubscriberOverflowError: () => SubscriberOverflowError2,
13
13
  frame: () => frame2,
14
14
  layer: () => layer4,
15
- make: () => make4
15
+ make: () => make3
16
16
  });
17
17
  import { Bus } from "@opencode/core/bus";
18
18
  import { Event } from "@opencode/schema/event";
@@ -37,7 +37,7 @@ function frame2(event) {
37
37
 
38
38
  `;
39
39
  }
40
- var make4 = Effect.fn("EventFeed.make")(function* (observe, options) {
40
+ var make3 = Effect.fn("EventFeed.make")(function* (observe, options) {
41
41
  const capacity = options?.capacity ?? SubscriberCapacity2;
42
42
  const render = options?.encode ?? frame2;
43
43
  const subscribers = new Map;
@@ -78,7 +78,7 @@ var make4 = Effect.fn("EventFeed.make")(function* (observe, options) {
78
78
  });
79
79
  var layer4 = Layer.effect(Service4, Effect.gen(function* () {
80
80
  const bus = yield* Bus.Service;
81
- return yield* make4(bus.listen);
81
+ return yield* make3(bus.listen);
82
82
  }));
83
83
 
84
- export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2, Service4, frame2, make4, layer4, exports_event_feed };
84
+ export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2, Service4, frame2, make3, layer4, exports_event_feed };