@opencode/server 0.0.0-dev-1346 → 0.0.0-dev-1348

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 (130) hide show
  1. package/dist/api.js +5 -5
  2. package/dist/auth.js +1 -1
  3. package/dist/chunks/{options-1s2hfsfr.js → request-site-0vqsbvsa.js} +4 -4
  4. package/dist/chunks/{options-pv4dnzzq.js → request-site-10sj2tcf.js} +1 -1
  5. package/dist/chunks/{options-1bx0qbf8.js → request-site-1dbhk1te.js} +7 -6
  6. package/dist/chunks/{options-4r2ye500.js → request-site-2tmcamrc.js} +2 -2
  7. package/dist/chunks/{options-39nnfjx1.js → request-site-39nnfjx1.js} +1 -1
  8. package/dist/chunks/{options-z3e7v67k.js → request-site-3te71694.js} +7 -7
  9. package/dist/chunks/{options-hgrkvk6s.js → request-site-6pm6ek88.js} +1 -1
  10. package/dist/chunks/request-site-74nxvsrn.js +27 -0
  11. package/dist/chunks/{options-t8azv5ge.js → request-site-7dkb5ks8.js} +2 -2
  12. package/dist/chunks/{options-edwk6ehd.js → request-site-8nezxn08.js} +1 -1
  13. package/dist/chunks/{options-zrptb2x8.js → request-site-8qsq6tbs.js} +2 -2
  14. package/dist/chunks/{options-8sb6qqpn.js → request-site-8sb6qqpn.js} +1 -1
  15. package/dist/chunks/{options-86dz2n4m.js → request-site-8xdajgpr.js} +2 -2
  16. package/dist/chunks/{options-g97h7k0s.js → request-site-am27j67f.js} +1 -1
  17. package/dist/chunks/{options-j80tzjj3.js → request-site-br4x4prt.js} +3 -3
  18. package/dist/chunks/{options-n6ypjnhz.js → request-site-ca564221.js} +1 -1
  19. package/dist/chunks/{options-tdx0cx27.js → request-site-csetzeb0.js} +8 -8
  20. package/dist/chunks/{options-b7yt2ykh.js → request-site-csnx1nj3.js} +2 -2
  21. package/dist/chunks/{options-g80pvn6e.js → request-site-cwx7pqk1.js} +2 -2
  22. package/dist/chunks/{options-pb8akwr3.js → request-site-dc91e8gy.js} +16 -16
  23. package/dist/chunks/{options-djr0jy89.js → request-site-djr0jy89.js} +1 -1
  24. package/dist/chunks/{options-qahj7606.js → request-site-ehyp3zqd.js} +1 -1
  25. package/dist/chunks/{options-20wvj9q6.js → request-site-em7ed65n.js} +2 -2
  26. package/dist/chunks/{options-k26h7zjg.js → request-site-exwy1kbj.js} +2 -2
  27. package/dist/chunks/{options-b1x3j2e8.js → request-site-f3gr6hfv.js} +2 -2
  28. package/dist/chunks/{options-wecgp61r.js → request-site-fvpjvjpp.js} +7 -7
  29. package/dist/chunks/{options-50kbksvb.js → request-site-g23ffrnz.js} +2 -2
  30. package/dist/chunks/{options-7t0tq67e.js → request-site-g4964mny.js} +3 -3
  31. package/dist/chunks/{options-j4at0y5c.js → request-site-j4at0y5c.js} +1 -1
  32. package/dist/chunks/{options-t62b1gmw.js → request-site-javgytnb.js} +2 -2
  33. package/dist/chunks/{options-p4zkxzv7.js → request-site-k74zefsg.js} +1 -1
  34. package/dist/chunks/{options-8n1ypg70.js → request-site-kmwr1xw9.js} +3 -3
  35. package/dist/chunks/{options-6s1v5h8n.js → request-site-kshqfq8s.js} +4 -4
  36. package/dist/chunks/{options-1jwvq3yw.js → request-site-mnjcp51m.js} +35 -35
  37. package/dist/chunks/{options-myqk22k5.js → request-site-myqk22k5.js} +2 -2
  38. package/dist/chunks/{options-w9jcwh65.js → request-site-mzs0n5xz.js} +7 -7
  39. package/dist/chunks/{options-p9wp66hf.js → request-site-n2zyxnzr.js} +1 -1
  40. package/dist/chunks/{options-6s5ea070.js → request-site-nswmrzft.js} +14 -9
  41. package/dist/chunks/{options-wh07bcjv.js → request-site-p3bbq7g3.js} +1 -1
  42. package/dist/chunks/{options-eybg47bf.js → request-site-pmv5pv9v.js} +4 -4
  43. package/dist/chunks/{options-8mfdzabk.js → request-site-prwd5gwt.js} +2 -2
  44. package/dist/chunks/{options-7x6cg3xs.js → request-site-qq3f8fnn.js} +2 -2
  45. package/dist/chunks/{options-b87bs0cf.js → request-site-rgbnpstw.js} +2 -2
  46. package/dist/chunks/{options-v0z8pce5.js → request-site-rjhxbsc4.js} +2 -2
  47. package/dist/chunks/{options-rktygpea.js → request-site-rktygpea.js} +1 -1
  48. package/dist/chunks/{options-w0qzmhfg.js → request-site-rm5kndzh.js} +4 -4
  49. package/dist/chunks/{options-smaf4a18.js → request-site-rqgv9x42.js} +6 -2
  50. package/dist/chunks/{options-8qp1zyc6.js → request-site-rs6c9pjq.js} +9 -9
  51. package/dist/chunks/{options-d0advawr.js → request-site-s0zgx365.js} +2 -2
  52. package/dist/chunks/{options-t32e1bbt.js → request-site-t32e1bbt.js} +1 -1
  53. package/dist/chunks/{options-s8t5gq7c.js → request-site-whvq72as.js} +3 -3
  54. package/dist/chunks/{options-4gbck4qg.js → request-site-wsvmph03.js} +2 -2
  55. package/dist/chunks/{options-7ydfwv45.js → request-site-x2qy7jg1.js} +1 -1
  56. package/dist/chunks/{options-6t6fd9bq.js → request-site-yc92za0p.js} +2 -2
  57. package/dist/content-headers.js +1 -1
  58. package/dist/cors.js +1 -1
  59. package/dist/event-feed.js +5 -5
  60. package/dist/fetch.d.ts +57 -0
  61. package/dist/fetch.js +63 -61
  62. package/dist/handlers/agent.js +6 -6
  63. package/dist/handlers/artifact.js +3 -3
  64. package/dist/handlers/automation.js +2 -2
  65. package/dist/handlers/blob.js +3 -3
  66. package/dist/handlers/command.js +6 -6
  67. package/dist/handlers/config.js +6 -6
  68. package/dist/handlers/credential.js +7 -7
  69. package/dist/handlers/debug.js +6 -6
  70. package/dist/handlers/event.js +7 -7
  71. package/dist/handlers/form.js +6 -6
  72. package/dist/handlers/fs.js +8 -8
  73. package/dist/handlers/generate.js +6 -6
  74. package/dist/handlers/integration.js +6 -6
  75. package/dist/handlers/job.js +2 -2
  76. package/dist/handlers/location.js +6 -6
  77. package/dist/handlers/machine.js +1 -1
  78. package/dist/handlers/mcp.js +8 -8
  79. package/dist/handlers/media.js +2 -2
  80. package/dist/handlers/message.js +7 -7
  81. package/dist/handlers/migration.js +6 -6
  82. package/dist/handlers/model.js +6 -6
  83. package/dist/handlers/permission.js +6 -6
  84. package/dist/handlers/persistent-pty.js +16 -16
  85. package/dist/handlers/plugin.js +6 -6
  86. package/dist/handlers/project.js +6 -6
  87. package/dist/handlers/provider.js +6 -6
  88. package/dist/handlers/pty-socket.js +1 -1
  89. package/dist/handlers/pty.js +8 -8
  90. package/dist/handlers/reference.js +6 -6
  91. package/dist/handlers/rpc.js +6 -6
  92. package/dist/handlers/server.js +9 -9
  93. package/dist/handlers/session-error.d.ts +3 -1
  94. package/dist/handlers/session-error.js +4 -2
  95. package/dist/handlers/session.js +7 -7
  96. package/dist/handlers/shell.js +6 -6
  97. package/dist/handlers/skill.js +6 -6
  98. package/dist/handlers/usage.js +6 -6
  99. package/dist/handlers/vcs.js +6 -6
  100. package/dist/handlers/voice.js +6 -6
  101. package/dist/handlers/websearch.js +6 -6
  102. package/dist/handlers/worktree.js +6 -6
  103. package/dist/handlers.js +53 -53
  104. package/dist/location.js +4 -4
  105. package/dist/media-uri.js +1 -1
  106. package/dist/middleware/authorization.js +2 -2
  107. package/dist/middleware/defect-response.js +1 -1
  108. package/dist/middleware/form-location.js +3 -3
  109. package/dist/middleware/schema-error.js +1 -1
  110. package/dist/middleware/session-location.js +3 -3
  111. package/dist/pairing.js +3 -3
  112. package/dist/process.js +61 -61
  113. package/dist/range.js +1 -1
  114. package/dist/request-site.js +2 -2
  115. package/dist/request-tracing.js +1 -1
  116. package/dist/routes.js +57 -57
  117. package/dist/server-info.js +5 -5
  118. package/dist/service-status.js +1 -1
  119. package/dist/workerd.d.ts +20 -2
  120. package/dist/workerd.js +88 -68
  121. package/package.json +8 -8
  122. package/dist/chunks/options-4apj6a8e.js +0 -13
  123. /package/dist/chunks/{options-017ycvbx.js → request-site-017ycvbx.js} +0 -0
  124. /package/dist/chunks/{options-9rqn6x4v.js → request-site-9rqn6x4v.js} +0 -0
  125. /package/dist/chunks/{options-bd8755ek.js → request-site-bd8755ek.js} +0 -0
  126. /package/dist/chunks/{options-n26yr6pw.js → request-site-n26yr6pw.js} +0 -0
  127. /package/dist/chunks/{options-q187pxxd.js → request-site-q187pxxd.js} +0 -0
  128. /package/dist/chunks/{options-q4bn6dy8.js → request-site-q4bn6dy8.js} +0 -0
  129. /package/dist/chunks/{options-xthc02cw.js → request-site-xthc02cw.js} +0 -0
  130. /package/dist/chunks/{options-yc7nft6q.js → request-site-yc7nft6q.js} +0 -0
package/dist/api.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  Api2
3
- } from "./chunks/options-s8t5gq7c.js";
4
- import"./chunks/options-qahj7606.js";
5
- import"./chunks/options-n6ypjnhz.js";
6
- import"./chunks/options-j80tzjj3.js";
7
- import"./chunks/options-smaf4a18.js";
3
+ } from "./chunks/request-site-whvq72as.js";
4
+ import"./chunks/request-site-ehyp3zqd.js";
5
+ import"./chunks/request-site-ca564221.js";
6
+ import"./chunks/request-site-br4x4prt.js";
7
+ import"./chunks/request-site-rqgv9x42.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/request-site-j4at0y5c.js";
11
11
  export {
12
12
  Config2 as Config,
13
13
  SESSION_TTL_SECONDS2 as SESSION_TTL_SECONDS,
@@ -2,18 +2,18 @@ import {
2
2
  locationErrors2,
3
3
  response2,
4
4
  requestRef2
5
- } from "./options-j80tzjj3.js";
5
+ } from "./request-site-br4x4prt.js";
6
6
  import {
7
7
  Api2
8
- } from "./options-s8t5gq7c.js";
8
+ } from "./request-site-whvq72as.js";
9
9
  import {
10
10
  CorsConfig2,
11
11
  isAllowedRequestOrigin2
12
- } from "./options-q4bn6dy8.js";
12
+ } from "./request-site-q4bn6dy8.js";
13
13
  import {
14
14
  runPtySocket2,
15
15
  holdLocation2
16
- } from "./options-q187pxxd.js";
16
+ } from "./request-site-q187pxxd.js";
17
17
 
18
18
  // src/handlers/pty.ts
19
19
  import { Pty } from "@opencode/core/pty";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./options-s8t5gq7c.js";
3
+ } from "./request-site-whvq72as.js";
4
4
 
5
5
  // src/handlers/migration.ts
6
6
  import { V1Migration } from "@opencode/core/database/v1-migration";
@@ -1,18 +1,19 @@
1
1
  import {
2
2
  missingSession2,
3
+ skillLoadFailed2,
3
4
  missingMessage2,
4
5
  failedMessageDecode2,
5
6
  failedSnapshot2
6
- } from "./options-smaf4a18.js";
7
+ } from "./request-site-rqgv9x42.js";
7
8
  import {
8
9
  locationErrors2
9
- } from "./options-j80tzjj3.js";
10
+ } from "./request-site-br4x4prt.js";
10
11
  import {
11
12
  Api2
12
- } from "./options-s8t5gq7c.js";
13
+ } from "./request-site-whvq72as.js";
13
14
  import {
14
15
  wantsMediaRefs2
15
- } from "./options-xthc02cw.js";
16
+ } from "./request-site-xthc02cw.js";
16
17
 
17
18
  // src/handlers/session.ts
18
19
  import { Instance } from "@opencode/core/instance/service";
@@ -172,7 +173,7 @@ var SessionHandler2 = HttpApiBuilder.group(Api2, "server.session", (handlers) =>
172
173
  }).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.PromptConflictError", (error) => Effect.fail(new ConflictError({
173
174
  message: `Prompt message ID conflicts with an existing durable record: ${error.messageID}`,
174
175
  resource: error.messageID
175
- }))), 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)
176
+ }))), 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" }))), Effect.catchTag("Skill.LoadError", skillLoadFailed2), locationErrors2)
176
177
  };
177
178
  })).handle("session.command", Effect.fn(function* (ctx) {
178
179
  yield* session.command({
@@ -196,7 +197,7 @@ var SessionHandler2 = HttpApiBuilder.group(Api2, "server.session", (handlers) =>
196
197
  sessionID: ctx.params.sessionID,
197
198
  skill: ctx.payload.id,
198
199
  resume: ctx.payload.resume
199
- }).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);
200
+ }).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.SkillNotFoundError", (error) => Effect.fail(new SkillNotFoundError({ skill: error.skill, message: `Skill not found: ${error.skill}` }))), Effect.catchTag("Skill.LoadError", skillLoadFailed2), locationErrors2);
200
201
  return HttpApiSchema.NoContent.make();
201
202
  })).handle("session.synthetic", Effect.fn(function* (ctx) {
202
203
  const data = yield* session.synthetic({
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./options-j80tzjj3.js";
3
+ } from "./request-site-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-s8t5gq7c.js";
6
+ } from "./request-site-whvq72as.js";
7
7
 
8
8
  // src/handlers/integration.ts
9
9
  import { Integration } from "@opencode/core/integration";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./options-9rqn6x4v.js";
3
+ } from "./request-site-9rqn6x4v.js";
4
4
 
5
5
  // src/service-status.ts
6
6
  var exports_service_status = {};
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  __export
3
- } from "./options-9rqn6x4v.js";
3
+ } from "./request-site-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: () => Service2,
9
+ Service: () => Service3,
10
10
  connectionURLs: () => connectionURLs2,
11
- layer: () => layer2
11
+ layer: () => layer3
12
12
  });
13
13
  import { Context, Layer } from "effect";
14
14
  import { networkInterfaces } from "node:os";
15
15
 
16
- class Service2 extends Context.Service()("@opencode/server/ServerInfo") {
16
+ class Service3 extends Context.Service()("@opencode/server/ServerInfo") {
17
17
  }
18
- function layer2(urls, tmp, app = {}) {
19
- return Layer.succeed(Service2, Service2.of({ urls, app, paths: { tmp } }));
18
+ function layer3(urls, tmp, app = {}) {
19
+ return Layer.succeed(Service3, Service3.of({ urls, app, paths: { tmp } }));
20
20
  }
21
21
  function connectionURLs2(value, requestedHostname) {
22
22
  const url = new URL(value);
@@ -38,4 +38,4 @@ function connectionURLs2(value, requestedHostname) {
38
38
  ];
39
39
  }
40
40
 
41
- export { Service2, layer2, connectionURLs2, exports_server_info };
41
+ export { Service3, layer3, connectionURLs2, exports_server_info };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./options-smaf4a18.js";
3
+ } from "./request-site-rqgv9x42.js";
4
4
 
5
5
  // src/handlers/automation.ts
6
6
  import { Automation } from "@opencode/core/automation";
@@ -0,0 +1,27 @@
1
+ import {
2
+ response2
3
+ } from "./request-site-br4x4prt.js";
4
+ import {
5
+ Api2
6
+ } from "./request-site-whvq72as.js";
7
+
8
+ // src/handlers/skill.ts
9
+ import { Skill } from "@opencode/core/skill";
10
+ import { FileNotFoundError, SkillLoadError, SkillNotFoundError } from "@opencode/protocol/errors";
11
+ import { Effect } from "effect";
12
+ import { HttpApiBuilder } from "effect/http-api";
13
+ var SkillHandler2 = HttpApiBuilder.group(Api2, "server.skill", (handlers) => handlers.handle("skill.list", () => response2(Skill.Service.use((skill) => skill.list()))).handle("skill.file", (ctx) => Effect.gen(function* () {
14
+ const skills = yield* Skill.Service;
15
+ const raw = new URL(ctx.request.url, "http://localhost").pathname.split("/").slice(6).join("/");
16
+ const file = yield* Effect.try({
17
+ try: () => decodeURIComponent(raw),
18
+ catch: () => new FileNotFoundError({ path: raw, message: `File not found: ${raw}` })
19
+ });
20
+ return yield* skills.read(ctx.params.skillID, file).pipe(Effect.catchTags({
21
+ "Skill.NotFoundError": (error) => Effect.fail(new SkillNotFoundError({ skill: ctx.params.skillID, message: `Skill not found: ${error.skill}` })),
22
+ "Skill.FileNotFoundError": (error) => Effect.fail(new FileNotFoundError({ path: error.file, message: `File not found: ${error.file}` })),
23
+ "Skill.LoadError": (error) => Effect.fail(new SkillLoadError({ skill: ctx.params.skillID, message: error.message }))
24
+ }));
25
+ })));
26
+
27
+ export { SkillHandler2 };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./options-j80tzjj3.js";
3
+ } from "./request-site-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-s8t5gq7c.js";
6
+ } from "./request-site-whvq72as.js";
7
7
 
8
8
  // src/handlers/reference.ts
9
9
  import { Reference } from "@opencode/core/reference";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./options-s8t5gq7c.js";
3
+ } from "./request-site-whvq72as.js";
4
4
 
5
5
  // src/handlers/project.ts
6
6
  import { Project } from "@opencode/core/project";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./options-j80tzjj3.js";
3
+ } from "./request-site-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-s8t5gq7c.js";
6
+ } from "./request-site-whvq72as.js";
7
7
 
8
8
  // src/handlers/form.ts
9
9
  import { Form } from "@opencode/core/form";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./options-9rqn6x4v.js";
3
+ } from "./request-site-9rqn6x4v.js";
4
4
 
5
5
  // src/range.ts
6
6
  var exports_range = {};
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  Api2
3
- } from "./options-s8t5gq7c.js";
3
+ } from "./request-site-whvq72as.js";
4
4
  import {
5
5
  requireConnectable2
6
- } from "./options-4r2ye500.js";
6
+ } from "./request-site-2tmcamrc.js";
7
7
 
8
8
  // src/handlers/credential.ts
9
9
  import { Credential } from "@opencode/core/credential";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./options-s8t5gq7c.js";
3
+ } from "./request-site-whvq72as.js";
4
4
 
5
5
  // src/handlers/config.ts
6
6
  import { Config } from "@opencode/core/config";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./options-smaf4a18.js";
3
+ } from "./request-site-rqgv9x42.js";
4
4
 
5
5
  // src/location.ts
6
6
  import { FileSystem } from "@opencode/core/filesystem";
@@ -51,7 +51,7 @@ function decode(input) {
51
51
  return input;
52
52
  }
53
53
  }
54
- var layer3 = Layer.effect(LocationMiddleware2, Effect.gen(function* () {
54
+ var layer4 = Layer.effect(LocationMiddleware2, Effect.gen(function* () {
55
55
  const locations = yield* LocationServiceMap.Service;
56
56
  return LocationMiddleware2.of((effect) => Effect.gen(function* () {
57
57
  const request = yield* HttpServerRequest.HttpServerRequest;
@@ -59,4 +59,4 @@ var layer3 = Layer.effect(LocationMiddleware2, Effect.gen(function* () {
59
59
  }));
60
60
  }));
61
61
 
62
- export { LocationMiddleware2, locationErrors2, response2, sessionInfo2, requestRef2, layer3 };
62
+ export { LocationMiddleware2, locationErrors2, response2, sessionInfo2, requestRef2, layer4 };
@@ -2,7 +2,7 @@ import {
2
2
  locationErrors2,
3
3
  sessionInfo2,
4
4
  requestRef2
5
- } from "./options-j80tzjj3.js";
5
+ } from "./request-site-br4x4prt.js";
6
6
 
7
7
  // src/middleware/form-location.ts
8
8
  import { Instance } from "@opencode/core/instance/service";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  Api2
3
- } from "./options-s8t5gq7c.js";
3
+ } from "./request-site-whvq72as.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
- Service2
12
- } from "./options-z3e7v67k.js";
9
+ } from "./request-site-j4at0y5c.js";
13
10
  import {
14
11
  Service3
15
- } from "./options-w9jcwh65.js";
12
+ } from "./request-site-3te71694.js";
13
+ import {
14
+ Service4
15
+ } from "./request-site-mzs0n5xz.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* Service3;
25
+ const pairing = yield* Service4;
26
26
  const auth = yield* Config2;
27
27
  return handlers.handle("server.info", () => Effect.gen(function* () {
28
- const info = yield* Service2;
28
+ const info = yield* Service3;
29
29
  return {
30
30
  version: info.app.version ?? "unknown",
31
31
  pid: process.pid ?? 0,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  requestRef2
3
- } from "./options-j80tzjj3.js";
3
+ } from "./request-site-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-s8t5gq7c.js";
6
+ } from "./request-site-whvq72as.js";
7
7
 
8
8
  // src/handlers/debug.ts
9
9
  import { LocationServiceMap } from "@opencode/core/location-service-map";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./options-j80tzjj3.js";
3
+ } from "./request-site-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-s8t5gq7c.js";
6
+ } from "./request-site-whvq72as.js";
7
7
 
8
8
  // src/handlers/vcs.ts
9
9
  import { Vcs } from "@opencode/core/vcs";
@@ -1,39 +1,39 @@
1
1
  import {
2
- layer3
3
- } from "./options-j80tzjj3.js";
2
+ layer4
3
+ } from "./request-site-br4x4prt.js";
4
4
  import {
5
5
  formLocationLayer2
6
- } from "./options-n6ypjnhz.js";
6
+ } from "./request-site-ca564221.js";
7
7
  import {
8
8
  sessionLocationLayer2
9
- } from "./options-qahj7606.js";
9
+ } from "./request-site-ehyp3zqd.js";
10
10
  import {
11
11
  Api2
12
- } from "./options-s8t5gq7c.js";
12
+ } from "./request-site-whvq72as.js";
13
13
  import {
14
14
  Config2
15
- } from "./options-j4at0y5c.js";
15
+ } from "./request-site-j4at0y5c.js";
16
16
  import {
17
17
  CorsConfig2
18
- } from "./options-q4bn6dy8.js";
18
+ } from "./request-site-q4bn6dy8.js";
19
19
  import {
20
- layer2
21
- } from "./options-z3e7v67k.js";
20
+ layer3
21
+ } from "./request-site-3te71694.js";
22
22
  import {
23
23
  node2
24
- } from "./options-w9jcwh65.js";
24
+ } from "./request-site-mzs0n5xz.js";
25
25
  import {
26
26
  handlers2
27
- } from "./options-1jwvq3yw.js";
27
+ } from "./request-site-mnjcp51m.js";
28
28
  import {
29
29
  authorizationLayer2
30
- } from "./options-rktygpea.js";
30
+ } from "./request-site-rktygpea.js";
31
31
  import {
32
32
  schemaErrorLayer2
33
- } from "./options-bd8755ek.js";
33
+ } from "./request-site-bd8755ek.js";
34
34
  import {
35
35
  defectResponseLayer2
36
- } from "./options-n26yr6pw.js";
36
+ } from "./request-site-n26yr6pw.js";
37
37
 
38
38
  // src/routes.ts
39
39
  import { Database } from "@opencode/core/database/database";
@@ -192,8 +192,8 @@ function makeRoutes(password, options, serviceURLs, overrides, instances) {
192
192
  })) : build(overrides);
193
193
  return serviceLayer.pipe(Layer.flatMap((context) => {
194
194
  const services = Layer.succeedContext(context);
195
- const requestServices = Layer.merge(Layer.succeedContext(Context.pick(Database.Service, Credential.Service, PermissionSaved.Service, PluginUpdate.Service, Project.Service, WellKnown.Service)(context)), layer2(serviceURLs, Context.get(context, Global.Service).tmp, options.app));
196
- 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(layer3), Layer.provide(authorizationLayer2), Layer.provide(schemaErrorLayer2), Layer.provide(auth), HttpRouter.provideRequest(requestServices), Layer.merge(defectResponseLayer2), Layer.provideMerge(services), Layer.provideMerge(HttpRouter.layer), Layer.tap((context) => Effect.sync(() => {
195
+ 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));
196
+ 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.merge(defectResponseLayer2), Layer.provideMerge(services), Layer.provideMerge(HttpRouter.layer), Layer.tap((context) => Effect.sync(() => {
197
197
  internal = Context.get(context, HttpRouter.HttpRouter).asHttpEffect().pipe(HttpEffect.toWebHandlerWith(context));
198
198
  })));
199
199
  return Layer.merge(api, V1Migration.layer.pipe(Layer.provide(services)));
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CONTENT_SECURITY_POLICY2,
3
3
  disposition2
4
- } from "./options-t32e1bbt.js";
4
+ } from "./request-site-t32e1bbt.js";
5
5
 
6
6
  // src/handlers/media.ts
7
7
  import { Database } from "@opencode/core/database/database";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  locationErrors2,
3
3
  sessionInfo2
4
- } from "./options-j80tzjj3.js";
4
+ } from "./request-site-br4x4prt.js";
5
5
 
6
6
  // src/middleware/session-location.ts
7
7
  import { Instance } from "@opencode/core/instance/service";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./options-j80tzjj3.js";
3
+ } from "./request-site-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-s8t5gq7c.js";
6
+ } from "./request-site-whvq72as.js";
7
7
 
8
8
  // src/handlers/plugin.ts
9
9
  import { Plugin } from "@opencode/core/plugin";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./options-j80tzjj3.js";
3
+ } from "./request-site-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-s8t5gq7c.js";
6
+ } from "./request-site-whvq72as.js";
7
7
 
8
8
  // src/handlers/agent.ts
9
9
  import { Agent } from "@opencode/core/agent";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./options-j80tzjj3.js";
3
+ } from "./request-site-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-s8t5gq7c.js";
6
+ } from "./request-site-whvq72as.js";
7
7
 
8
8
  // src/handlers/shell.ts
9
9
  import { Shell } from "@opencode/core/shell";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  __export
3
- } from "./options-9rqn6x4v.js";
3
+ } from "./request-site-9rqn6x4v.js";
4
4
 
5
5
  // src/event-feed.ts
6
6
  var exports_event_feed = {};
7
7
  __export(exports_event_feed, {
8
8
  EncodingError: () => EncodingError2,
9
9
  EventFeed: () => exports_event_feed,
10
- Service: () => Service4,
10
+ Service: () => Service2,
11
11
  SubscriberCapacity: () => SubscriberCapacity2,
12
12
  SubscriberOverflowError: () => SubscriberOverflowError2,
13
13
  frame: () => frame2,
14
- layer: () => layer4,
14
+ layer: () => layer2,
15
15
  make: () => make4
16
16
  });
17
17
  import { Bus } from "@opencode/core/bus";
@@ -30,7 +30,7 @@ class EncodingError2 extends Schema.TaggedError()("EventFeed.EncodingError", {
30
30
  }) {
31
31
  }
32
32
 
33
- class Service4 extends Context.Service()("@opencode/server/EventFeed") {
33
+ class Service2 extends Context.Service()("@opencode/server/EventFeed") {
34
34
  }
35
35
  function frame2(event) {
36
36
  return `data: ${JSON.stringify(event)}
@@ -72,13 +72,13 @@ var make4 = Effect.fn("EventFeed.make")(function* (observe, options) {
72
72
  });
73
73
  const unsubscribe = yield* observe(publish);
74
74
  yield* Effect.addFinalizer(() => unsubscribe);
75
- return Service4.of({
75
+ return Service2.of({
76
76
  subscribe: (types) => Effect.acquireRelease(Queue.dropping(capacity).pipe(Effect.tap((queue) => Effect.sync(() => subscribers.set(queue, types?.length ? new Set(types) : undefined)))), (queue) => Effect.sync(() => subscribers.delete(queue)).pipe(Effect.andThen(Queue.shutdown(queue)), Effect.asVoid)).pipe(Effect.map(Stream.fromQueue))
77
77
  });
78
78
  });
79
- var layer4 = Layer.effect(Service4, Effect.gen(function* () {
79
+ var layer2 = Layer.effect(Service2, Effect.gen(function* () {
80
80
  const bus = yield* Bus.Service;
81
81
  return yield* make4(bus.listen);
82
82
  }));
83
83
 
84
- export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2, Service4, frame2, make4, layer4, exports_event_feed };
84
+ export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2, Service2, frame2, make4, layer2, exports_event_feed };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  download2
3
- } from "./options-t32e1bbt.js";
3
+ } from "./request-site-t32e1bbt.js";
4
4
  import {
5
5
  parse2
6
- } from "./options-8sb6qqpn.js";
6
+ } from "./request-site-8sb6qqpn.js";
7
7
 
8
8
  // src/handlers/blob.ts
9
9
  import { BlobStore } from "@opencode/core/blob-store";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  missingSession2,
3
3
  failedMessageDecode2
4
- } from "./options-smaf4a18.js";
4
+ } from "./request-site-rqgv9x42.js";
5
5
  import {
6
6
  Api2
7
- } from "./options-s8t5gq7c.js";
7
+ } from "./request-site-whvq72as.js";
8
8
  import {
9
9
  wantsMediaRefs2
10
- } from "./options-xthc02cw.js";
10
+ } from "./request-site-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
  __export
3
- } from "./options-9rqn6x4v.js";
3
+ } from "./request-site-9rqn6x4v.js";
4
4
 
5
5
  // src/auth.ts
6
6
  var exports_auth = {};
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./options-smaf4a18.js";
3
+ } from "./request-site-rqgv9x42.js";
4
4
  import {
5
5
  locationErrors2,
6
6
  response2,
7
7
  requestRef2
8
- } from "./options-j80tzjj3.js";
8
+ } from "./request-site-br4x4prt.js";
9
9
 
10
10
  // src/handlers/artifact.ts
11
11
  import { Artifact } from "@opencode/core/artifact";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./options-s8t5gq7c.js";
3
+ } from "./request-site-whvq72as.js";
4
4
 
5
5
  // src/handlers/rpc.ts
6
6
  import { Rpc } from "@opencode/core/rpc";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./options-smaf4a18.js";
3
+ } from "./request-site-rqgv9x42.js";
4
4
  import {
5
5
  locationErrors2,
6
6
  response2,
7
7
  sessionInfo2
8
- } from "./options-j80tzjj3.js";
8
+ } from "./request-site-br4x4prt.js";
9
9
  import {
10
10
  Api2
11
- } from "./options-s8t5gq7c.js";
11
+ } from "./request-site-whvq72as.js";
12
12
 
13
13
  // src/handlers/permission.ts
14
14
  import { Instance } from "@opencode/core/instance/service";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  Api2
3
- } from "./options-s8t5gq7c.js";
3
+ } from "./request-site-whvq72as.js";
4
4
  import {
5
- Service4,
5
+ Service2,
6
6
  frame2
7
- } from "./options-wecgp61r.js";
7
+ } from "./request-site-fvpjvjpp.js";
8
8
 
9
9
  // src/handlers/event.ts
10
10
  import { Event } from "@opencode/schema/event";
@@ -12,7 +12,7 @@ import { Effect, Stream } from "effect";
12
12
  import { HttpServerResponse } from "effect/http";
13
13
  import { HttpApiBuilder } from "effect/http-api";
14
14
  var EventHandler2 = HttpApiBuilder.group(Api2, "server.event", (handlers) => Effect.gen(function* () {
15
- const feed = yield* Service4;
15
+ const feed = yield* Service2;
16
16
  return handlers.handleRaw("event.subscribe", (ctx) => Effect.gen(function* () {
17
17
  const connected = {
18
18
  id: Event.ID.create(),