@opencode/server 2.4.0 → 2.4.1

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 (131) hide show
  1. package/dist/api.js +5 -5
  2. package/dist/auth.js +1 -1
  3. package/dist/chunks/{content-headers-r40v995e.js → workerd-20wvj9q6.js} +2 -2
  4. package/dist/chunks/{content-headers-39nnfjx1.js → workerd-39nnfjx1.js} +1 -1
  5. package/dist/chunks/{content-headers-0r476wkb.js → workerd-3rn5pzng.js} +5 -5
  6. package/dist/chunks/{content-headers-jmmhprac.js → workerd-4apj6a8e.js} +2 -2
  7. package/dist/chunks/{content-headers-ykk3p1r3.js → workerd-4gbck4qg.js} +2 -2
  8. package/dist/chunks/{content-headers-hk9crnsa.js → workerd-4r2ye500.js} +2 -2
  9. package/dist/chunks/{content-headers-fjcqsaaz.js → workerd-5dgtfnrn.js} +16 -16
  10. package/dist/chunks/{content-headers-p83m65n5.js → workerd-6t6fd9bq.js} +2 -2
  11. package/dist/chunks/{content-headers-1r438we2.js → workerd-73tyf2qy.js} +8 -8
  12. package/dist/chunks/{content-headers-7jm4dc4a.js → workerd-77gnb026.js} +4 -4
  13. package/dist/chunks/{content-headers-z3e7v67k.js → workerd-7dtbad8d.js} +7 -7
  14. package/dist/chunks/{content-headers-8ja97vv6.js → workerd-7x6cg3xs.js} +2 -2
  15. package/dist/chunks/{content-headers-7ydfwv45.js → workerd-7ydfwv45.js} +1 -1
  16. package/dist/chunks/{content-headers-9t07vtvz.js → workerd-86dz2n4m.js} +2 -2
  17. package/dist/chunks/{content-headers-b03d5rht.js → workerd-8mfdzabk.js} +2 -2
  18. package/dist/chunks/{content-headers-gq4jwh93.js → workerd-8n1ypg70.js} +3 -3
  19. package/dist/chunks/{content-headers-8sb6qqpn.js → workerd-8sb6qqpn.js} +1 -1
  20. package/dist/chunks/{content-headers-801prsqk.js → workerd-b1x3j2e8.js} +2 -2
  21. package/dist/chunks/{content-headers-y60jfeab.js → workerd-b7yt2ykh.js} +2 -2
  22. package/dist/chunks/{content-headers-5jm9kajg.js → workerd-b87bs0cf.js} +2 -2
  23. package/dist/chunks/{content-headers-hf3kgjhr.js → workerd-bvm82fhd.js} +4 -4
  24. package/dist/chunks/{content-headers-100nc7c0.js → workerd-d0advawr.js} +2 -2
  25. package/dist/chunks/{content-headers-djr0jy89.js → workerd-djr0jy89.js} +1 -1
  26. package/dist/chunks/{content-headers-ky9xhfwk.js → workerd-dqfyxmp4.js} +4 -4
  27. package/dist/chunks/{content-headers-4zkx9wb3.js → workerd-edwk6ehd.js} +1 -1
  28. package/dist/chunks/{content-headers-qfyg9gb7.js → workerd-fvpjvjpp.js} +7 -7
  29. package/dist/chunks/{content-headers-g23ffrnz.js → workerd-g23ffrnz.js} +2 -2
  30. package/dist/chunks/{content-headers-w3xmknp7.js → workerd-g80pvn6e.js} +2 -2
  31. package/dist/chunks/{content-headers-d20xfnpc.js → workerd-g97h7k0s.js} +1 -1
  32. package/dist/chunks/workerd-hgrkvk6s.js +48 -0
  33. package/dist/chunks/{content-headers-j4at0y5c.js → workerd-j4at0y5c.js} +1 -1
  34. package/dist/chunks/{content-headers-ywn523ee.js → workerd-j80tzjj3.js} +3 -3
  35. package/dist/chunks/{content-headers-mvp6540g.js → workerd-jpqse2v9.js} +35 -35
  36. package/dist/chunks/{content-headers-4fc68szf.js → workerd-k26h7zjg.js} +2 -2
  37. package/dist/chunks/{content-headers-hnbeyfax.js → workerd-kffke7z4.js} +9 -9
  38. package/dist/chunks/{content-headers-hmwn16zp.js → workerd-myqk22k5.js} +2 -2
  39. package/dist/chunks/{content-headers-ah2sj2pr.js → workerd-n6ypjnhz.js} +1 -1
  40. package/dist/chunks/{content-headers-jhbndf2d.js → workerd-nkfbbfe7.js} +4 -4
  41. package/dist/chunks/{content-headers-rmfb1myj.js → workerd-p4zkxzv7.js} +1 -1
  42. package/dist/chunks/{content-headers-yty6dk04.js → workerd-p9wp66hf.js} +1 -1
  43. package/dist/chunks/{content-headers-2dzr03as.js → workerd-pv4dnzzq.js} +1 -1
  44. package/dist/chunks/{content-headers-vw0q3knq.js → workerd-qahj7606.js} +1 -1
  45. package/dist/chunks/{content-headers-rktygpea.js → workerd-rktygpea.js} +1 -1
  46. package/dist/chunks/{content-headers-zjmacp9c.js → workerd-s8t5gq7c.js} +3 -3
  47. package/dist/chunks/{content-headers-t32e1bbt.js → workerd-t32e1bbt.js} +1 -1
  48. package/dist/chunks/{content-headers-7qpea5x7.js → workerd-t62b1gmw.js} +2 -2
  49. package/dist/chunks/{content-headers-wka57cdm.js → workerd-t8azv5ge.js} +2 -2
  50. package/dist/chunks/{content-headers-s3zgwc17.js → workerd-v0z8pce5.js} +2 -2
  51. package/dist/chunks/{content-headers-ddrpmftb.js → workerd-vxy32kc1.js} +4 -4
  52. package/dist/chunks/{content-headers-2rb1ee6g.js → workerd-w13ad1dk.js} +3 -3
  53. package/dist/chunks/{content-headers-mzs0n5xz.js → workerd-w9jcwh65.js} +7 -7
  54. package/dist/chunks/{content-headers-prn0chz2.js → workerd-wh07bcjv.js} +1 -1
  55. package/dist/chunks/{content-headers-2cm4dfcc.js → workerd-zrptb2x8.js} +2 -2
  56. package/dist/content-headers.js +1 -1
  57. package/dist/cors.js +1 -1
  58. package/dist/event-feed.js +5 -5
  59. package/dist/fetch.js +60 -60
  60. package/dist/handlers/agent.js +6 -6
  61. package/dist/handlers/artifact.js +3 -3
  62. package/dist/handlers/automation.d.ts +1 -3
  63. package/dist/handlers/automation.js +2 -2
  64. package/dist/handlers/blob.js +3 -3
  65. package/dist/handlers/command.js +6 -6
  66. package/dist/handlers/config.js +6 -6
  67. package/dist/handlers/credential.js +7 -7
  68. package/dist/handlers/debug.js +6 -6
  69. package/dist/handlers/event.js +7 -7
  70. package/dist/handlers/form.js +6 -6
  71. package/dist/handlers/fs.js +8 -8
  72. package/dist/handlers/generate.js +6 -6
  73. package/dist/handlers/integration.js +6 -6
  74. package/dist/handlers/job.js +2 -2
  75. package/dist/handlers/location.js +6 -6
  76. package/dist/handlers/machine.js +1 -1
  77. package/dist/handlers/mcp.js +8 -8
  78. package/dist/handlers/media.js +2 -2
  79. package/dist/handlers/message.js +7 -7
  80. package/dist/handlers/migration.js +6 -6
  81. package/dist/handlers/model.js +6 -6
  82. package/dist/handlers/permission.js +6 -6
  83. package/dist/handlers/persistent-pty.d.ts +1 -1
  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.js +1 -1
  94. package/dist/handlers/session.js +7 -7
  95. package/dist/handlers/shell.js +6 -6
  96. package/dist/handlers/skill.js +6 -6
  97. package/dist/handlers/usage.js +6 -6
  98. package/dist/handlers/vcs.js +6 -6
  99. package/dist/handlers/voice.js +6 -6
  100. package/dist/handlers/websearch.js +6 -6
  101. package/dist/handlers/worktree.js +6 -6
  102. package/dist/handlers.d.ts +1 -1
  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.d.ts +2 -2
  117. package/dist/routes.js +57 -57
  118. package/dist/server-info.js +5 -5
  119. package/dist/service-status.js +1 -1
  120. package/dist/workerd.js +61 -61
  121. package/package.json +8 -8
  122. package/dist/chunks/content-headers-9cd3a4b8.js +0 -69
  123. /package/dist/chunks/{content-headers-0rzj25w4.js → workerd-0rzj25w4.js} +0 -0
  124. /package/dist/chunks/{content-headers-9rqn6x4v.js → workerd-9rqn6x4v.js} +0 -0
  125. /package/dist/chunks/{content-headers-bd8755ek.js → workerd-bd8755ek.js} +0 -0
  126. /package/dist/chunks/{content-headers-n26yr6pw.js → workerd-n26yr6pw.js} +0 -0
  127. /package/dist/chunks/{content-headers-q187pxxd.js → workerd-q187pxxd.js} +0 -0
  128. /package/dist/chunks/{content-headers-q4bn6dy8.js → workerd-q4bn6dy8.js} +0 -0
  129. /package/dist/chunks/{content-headers-smaf4a18.js → workerd-smaf4a18.js} +0 -0
  130. /package/dist/chunks/{content-headers-xthc02cw.js → workerd-xthc02cw.js} +0 -0
  131. /package/dist/chunks/{content-headers-yc7nft6q.js → workerd-yc7nft6q.js} +0 -0
package/dist/api.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  Api2
3
- } from "./chunks/content-headers-zjmacp9c.js";
4
- import"./chunks/content-headers-vw0q3knq.js";
5
- import"./chunks/content-headers-ah2sj2pr.js";
6
- import"./chunks/content-headers-ywn523ee.js";
7
- import"./chunks/content-headers-smaf4a18.js";
3
+ } from "./chunks/workerd-s8t5gq7c.js";
4
+ import"./chunks/workerd-qahj7606.js";
5
+ import"./chunks/workerd-n6ypjnhz.js";
6
+ import"./chunks/workerd-j80tzjj3.js";
7
+ import"./chunks/workerd-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/content-headers-j4at0y5c.js";
10
+ } from "./chunks/workerd-j4at0y5c.js";
11
11
  export {
12
12
  Config2 as Config,
13
13
  SESSION_TTL_SECONDS2 as SESSION_TTL_SECONDS,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./content-headers-ywn523ee.js";
3
+ } from "./workerd-j80tzjj3.js";
4
4
  import {
5
5
  Api2
6
- } from "./content-headers-zjmacp9c.js";
6
+ } from "./workerd-s8t5gq7c.js";
7
7
 
8
8
  // src/handlers/plugin.ts
9
9
  import { Plugin } from "@opencode/core/plugin";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./content-headers-9rqn6x4v.js";
3
+ } from "./workerd-9rqn6x4v.js";
4
4
 
5
5
  // src/service-status.ts
6
6
  var exports_service_status = {};
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  isAllowedCorsOrigin2
3
- } from "./content-headers-q4bn6dy8.js";
3
+ } from "./workerd-q4bn6dy8.js";
4
4
  import {
5
5
  middleware2
6
- } from "./content-headers-hmwn16zp.js";
6
+ } from "./workerd-myqk22k5.js";
7
7
  import {
8
8
  withoutParentSpan2
9
- } from "./content-headers-yc7nft6q.js";
9
+ } from "./workerd-yc7nft6q.js";
10
10
  import {
11
11
  createRoutes2
12
- } from "./content-headers-fjcqsaaz.js";
12
+ } from "./workerd-5dgtfnrn.js";
13
13
  import {
14
14
  __export
15
- } from "./content-headers-9rqn6x4v.js";
15
+ } from "./workerd-9rqn6x4v.js";
16
16
 
17
17
  // src/fetch.ts
18
18
  var exports_fetch = {};
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./content-headers-ywn523ee.js";
3
+ } from "./workerd-j80tzjj3.js";
4
4
  import {
5
5
  Api2
6
- } from "./content-headers-zjmacp9c.js";
6
+ } from "./workerd-s8t5gq7c.js";
7
7
 
8
8
  // src/handlers/skill.ts
9
9
  import { Skill } from "@opencode/core/skill";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./content-headers-ywn523ee.js";
3
+ } from "./workerd-j80tzjj3.js";
4
4
  import {
5
5
  Api2
6
- } from "./content-headers-zjmacp9c.js";
6
+ } from "./workerd-s8t5gq7c.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
  response2
3
- } from "./content-headers-ywn523ee.js";
3
+ } from "./workerd-j80tzjj3.js";
4
4
  import {
5
5
  Api2
6
- } from "./content-headers-zjmacp9c.js";
6
+ } from "./workerd-s8t5gq7c.js";
7
7
 
8
8
  // src/handlers/integration.ts
9
9
  import { Integration } from "@opencode/core/integration";
@@ -1,39 +1,39 @@
1
1
  import {
2
- layer4
3
- } from "./content-headers-ywn523ee.js";
2
+ layer3
3
+ } from "./workerd-j80tzjj3.js";
4
4
  import {
5
5
  formLocationLayer2
6
- } from "./content-headers-ah2sj2pr.js";
6
+ } from "./workerd-n6ypjnhz.js";
7
7
  import {
8
8
  sessionLocationLayer2
9
- } from "./content-headers-vw0q3knq.js";
9
+ } from "./workerd-qahj7606.js";
10
10
  import {
11
11
  Api2
12
- } from "./content-headers-zjmacp9c.js";
12
+ } from "./workerd-s8t5gq7c.js";
13
13
  import {
14
14
  Config2
15
- } from "./content-headers-j4at0y5c.js";
15
+ } from "./workerd-j4at0y5c.js";
16
16
  import {
17
17
  CorsConfig2
18
- } from "./content-headers-q4bn6dy8.js";
18
+ } from "./workerd-q4bn6dy8.js";
19
19
  import {
20
- layer2
21
- } from "./content-headers-z3e7v67k.js";
20
+ layer4
21
+ } from "./workerd-7dtbad8d.js";
22
22
  import {
23
23
  node2
24
- } from "./content-headers-mzs0n5xz.js";
24
+ } from "./workerd-w9jcwh65.js";
25
25
  import {
26
26
  handlers2
27
- } from "./content-headers-mvp6540g.js";
27
+ } from "./workerd-jpqse2v9.js";
28
28
  import {
29
29
  authorizationLayer2
30
- } from "./content-headers-rktygpea.js";
30
+ } from "./workerd-rktygpea.js";
31
31
  import {
32
32
  schemaErrorLayer2
33
- } from "./content-headers-bd8755ek.js";
33
+ } from "./workerd-bd8755ek.js";
34
34
  import {
35
35
  defectResponseLayer2
36
- } from "./content-headers-n26yr6pw.js";
36
+ } from "./workerd-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(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(() => {
195
+ const requestServices = Layer.merge(Layer.succeedContext(Context.pick(Database.Service, Credential.Service, PermissionSaved.Service, PluginUpdate.Service, Project.Service, WellKnown.Service)(context)), layer4(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(() => {
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,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./content-headers-ywn523ee.js";
3
+ } from "./workerd-j80tzjj3.js";
4
4
  import {
5
5
  Api2
6
- } from "./content-headers-zjmacp9c.js";
6
+ } from "./workerd-s8t5gq7c.js";
7
7
 
8
8
  // src/handlers/provider.ts
9
9
  import { Provider } from "@opencode/core/provider";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  Api2
3
- } from "./content-headers-zjmacp9c.js";
3
+ } from "./workerd-s8t5gq7c.js";
4
4
  import {
5
5
  SESSION_TTL_SECONDS2,
6
6
  Config2,
7
7
  issueSession2,
8
8
  sessionCookieName2
9
- } from "./content-headers-j4at0y5c.js";
10
- import {
11
- Service2
12
- } from "./content-headers-z3e7v67k.js";
9
+ } from "./workerd-j4at0y5c.js";
13
10
  import {
14
11
  Service4
15
- } from "./content-headers-mzs0n5xz.js";
12
+ } from "./workerd-7dtbad8d.js";
13
+ import {
14
+ Service3
15
+ } from "./workerd-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* Service4;
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* Service2;
28
+ const info = yield* Service4;
29
29
  return {
30
30
  version: info.app.version ?? "unknown",
31
31
  pid: process.pid ?? 0,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  Api2
3
- } from "./content-headers-zjmacp9c.js";
3
+ } from "./workerd-s8t5gq7c.js";
4
4
  import {
5
- Service3,
5
+ Service2,
6
6
  frame2
7
- } from "./content-headers-qfyg9gb7.js";
7
+ } from "./workerd-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* Service3;
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(),
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  __export
3
- } from "./content-headers-9rqn6x4v.js";
3
+ } from "./workerd-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: () => Service4,
10
10
  connectionURLs: () => connectionURLs2,
11
- layer: () => layer2
11
+ layer: () => layer4
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 Service4 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 layer4(urls, tmp, app = {}) {
19
+ return Layer.succeed(Service4, Service4.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 { Service4, layer4, connectionURLs2, exports_server_info };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./content-headers-ywn523ee.js";
3
+ } from "./workerd-j80tzjj3.js";
4
4
  import {
5
5
  Api2
6
- } from "./content-headers-zjmacp9c.js";
6
+ } from "./workerd-s8t5gq7c.js";
7
7
 
8
8
  // src/handlers/websearch.ts
9
9
  import { WebSearch } from "@opencode/core/websearch";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./content-headers-smaf4a18.js";
3
+ } from "./workerd-smaf4a18.js";
4
4
 
5
5
  // src/handlers/job.ts
6
6
  import { Job } from "@opencode/core/job";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  Api2
3
- } from "./content-headers-zjmacp9c.js";
3
+ } from "./workerd-s8t5gq7c.js";
4
4
  import {
5
5
  requireConnectable2
6
- } from "./content-headers-hk9crnsa.js";
6
+ } from "./workerd-4r2ye500.js";
7
7
 
8
8
  // src/handlers/credential.ts
9
9
  import { Credential } from "@opencode/core/credential";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  locationErrors2
3
- } from "./content-headers-ywn523ee.js";
3
+ } from "./workerd-j80tzjj3.js";
4
4
  import {
5
5
  Api2
6
- } from "./content-headers-zjmacp9c.js";
6
+ } from "./workerd-s8t5gq7c.js";
7
7
 
8
8
  // src/handlers/generate.ts
9
9
  import { Generate } from "@opencode/core/generate";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./content-headers-smaf4a18.js";
3
+ } from "./workerd-smaf4a18.js";
4
4
  import {
5
5
  locationErrors2,
6
6
  response2,
7
7
  sessionInfo2
8
- } from "./content-headers-ywn523ee.js";
8
+ } from "./workerd-j80tzjj3.js";
9
9
  import {
10
10
  Api2
11
- } from "./content-headers-zjmacp9c.js";
11
+ } from "./workerd-s8t5gq7c.js";
12
12
 
13
13
  // src/handlers/permission.ts
14
14
  import { Instance } from "@opencode/core/instance/service";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./content-headers-9rqn6x4v.js";
3
+ } from "./workerd-9rqn6x4v.js";
4
4
 
5
5
  // src/range.ts
6
6
  var exports_range = {};
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./content-headers-ywn523ee.js";
3
+ } from "./workerd-j80tzjj3.js";
4
4
  import {
5
5
  Api2
6
- } from "./content-headers-zjmacp9c.js";
6
+ } from "./workerd-s8t5gq7c.js";
7
7
 
8
8
  // src/handlers/shell.ts
9
9
  import { Shell } from "@opencode/core/shell";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  requestRef2
3
- } from "./content-headers-ywn523ee.js";
3
+ } from "./workerd-j80tzjj3.js";
4
4
  import {
5
5
  Api2
6
- } from "./content-headers-zjmacp9c.js";
6
+ } from "./workerd-s8t5gq7c.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 "./content-headers-ywn523ee.js";
3
+ } from "./workerd-j80tzjj3.js";
4
4
  import {
5
5
  Api2
6
- } from "./content-headers-zjmacp9c.js";
6
+ } from "./workerd-s8t5gq7c.js";
7
7
 
8
8
  // src/handlers/command.ts
9
9
  import { Command } from "@opencode/core/command";
@@ -2,18 +2,18 @@ import {
2
2
  locationErrors2,
3
3
  response2,
4
4
  requestRef2
5
- } from "./content-headers-ywn523ee.js";
5
+ } from "./workerd-j80tzjj3.js";
6
6
  import {
7
7
  Api2
8
- } from "./content-headers-zjmacp9c.js";
8
+ } from "./workerd-s8t5gq7c.js";
9
9
  import {
10
10
  CorsConfig2,
11
11
  isAllowedRequestOrigin2
12
- } from "./content-headers-q4bn6dy8.js";
12
+ } from "./workerd-q4bn6dy8.js";
13
13
  import {
14
14
  runPtySocket2,
15
15
  holdLocation2
16
- } from "./content-headers-q187pxxd.js";
16
+ } from "./workerd-q187pxxd.js";
17
17
 
18
18
  // src/handlers/mcp.ts
19
19
  import { Location } from "@opencode/core/location";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./content-headers-ywn523ee.js";
3
+ } from "./workerd-j80tzjj3.js";
4
4
  import {
5
5
  Api2
6
- } from "./content-headers-zjmacp9c.js";
6
+ } from "./workerd-s8t5gq7c.js";
7
7
 
8
8
  // src/handlers/model.ts
9
9
  import { Model } from "@opencode/core/model";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CONTENT_SECURITY_POLICY2,
3
3
  disposition2
4
- } from "./content-headers-t32e1bbt.js";
4
+ } from "./workerd-t32e1bbt.js";
5
5
 
6
6
  // src/handlers/media.ts
7
7
  import { Database } from "@opencode/core/database/database";
@@ -3,16 +3,16 @@ import {
3
3
  missingMessage2,
4
4
  failedMessageDecode2,
5
5
  failedSnapshot2
6
- } from "./content-headers-smaf4a18.js";
6
+ } from "./workerd-smaf4a18.js";
7
7
  import {
8
8
  locationErrors2
9
- } from "./content-headers-ywn523ee.js";
9
+ } from "./workerd-j80tzjj3.js";
10
10
  import {
11
11
  Api2
12
- } from "./content-headers-zjmacp9c.js";
12
+ } from "./workerd-s8t5gq7c.js";
13
13
  import {
14
14
  wantsMediaRefs2
15
- } from "./content-headers-xthc02cw.js";
15
+ } from "./workerd-xthc02cw.js";
16
16
 
17
17
  // src/handlers/session.ts
18
18
  import { Instance } from "@opencode/core/instance/service";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./content-headers-zjmacp9c.js";
3
+ } from "./workerd-s8t5gq7c.js";
4
4
 
5
5
  // src/handlers/project.ts
6
6
  import { Project } from "@opencode/core/project";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  __export
3
- } from "./content-headers-9rqn6x4v.js";
3
+ } from "./workerd-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: () => Service3,
10
+ Service: () => Service2,
11
11
  SubscriberCapacity: () => SubscriberCapacity2,
12
12
  SubscriberOverflowError: () => SubscriberOverflowError2,
13
13
  frame: () => frame2,
14
- layer: () => layer3,
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 Service3 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 Service3.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 layer3 = Layer.effect(Service3, 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, Service3, frame2, make4, layer3, 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 "./content-headers-t32e1bbt.js";
3
+ } from "./workerd-t32e1bbt.js";
4
4
  import {
5
5
  parse2
6
- } from "./content-headers-8sb6qqpn.js";
6
+ } from "./workerd-8sb6qqpn.js";
7
7
 
8
8
  // src/handlers/blob.ts
9
9
  import { BlobStore } from "@opencode/core/blob-store";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./content-headers-ywn523ee.js";
3
+ } from "./workerd-j80tzjj3.js";
4
4
  import {
5
5
  Api2
6
- } from "./content-headers-zjmacp9c.js";
6
+ } from "./workerd-s8t5gq7c.js";
7
7
 
8
8
  // src/handlers/vcs.ts
9
9
  import { Vcs } from "@opencode/core/vcs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./content-headers-zjmacp9c.js";
3
+ } from "./workerd-s8t5gq7c.js";
4
4
 
5
5
  // src/handlers/config.ts
6
6
  import { Config } from "@opencode/core/config";
@@ -0,0 +1,48 @@
1
+ import {
2
+ missingSession2
3
+ } from "./workerd-smaf4a18.js";
4
+
5
+ // src/handlers/automation.ts
6
+ import { Automation } from "@opencode/core/automation";
7
+ import { Permission } from "@opencode/core/permission";
8
+ import { AutomationNotFoundError, ForbiddenError, InvalidRequestError } from "@opencode/protocol/errors";
9
+ import { Effect } from "effect";
10
+ import { HttpApiSchema } from "effect/http-api";
11
+ var makeAutomation2 = Effect.gen(function* () {
12
+ const automations = yield* Automation.Service;
13
+ return {
14
+ create: (payload) => automations.create(payload).pipe(Effect.provideService(Permission.Unattended, []), Effect.map((data) => ({ data })), Effect.catchTags({
15
+ "Automation.InvalidError": (error) => Effect.fail(new InvalidRequestError({ message: error.message, kind: "automation" })),
16
+ "Automation.DisabledError": () => Effect.fail(disabled()),
17
+ "Permission.BlockedError": (error) => Effect.fail(new ForbiddenError({ message: error.message })),
18
+ "Permission.CorrectedError": (error) => Effect.fail(new ForbiddenError({ message: error.feedback })),
19
+ "Session.NotFoundError": (error) => Effect.fail(missingSession2(error))
20
+ })),
21
+ list: (query) => automations.list(query).pipe(Effect.map((data) => ({ data })), Effect.catchTags({
22
+ "Automation.InvalidError": (error) => Effect.fail(new InvalidRequestError({ message: error.message, kind: "automation" })),
23
+ "Automation.DisabledError": () => Effect.fail(disabled()),
24
+ "Session.NotFoundError": (error) => Effect.fail(missingSession2(error))
25
+ })),
26
+ get: (id) => managed(automations.get(id).pipe(Effect.map((data) => ({ data })))),
27
+ pause: (id) => managed(automations.pause(id).pipe(Effect.map((data) => ({ data })))),
28
+ resume: (id) => managed(automations.resume(id).pipe(Effect.map((data) => ({ data })))),
29
+ remove: (id) => managed(automations.remove(id).pipe(Effect.as(HttpApiSchema.NoContent.make())))
30
+ };
31
+ });
32
+ function managed(effect) {
33
+ return effect.pipe(Effect.catchTags({
34
+ "Automation.NotFoundError": (error) => Effect.fail(missingAutomation(error)),
35
+ "Automation.DisabledError": () => Effect.fail(disabled())
36
+ }));
37
+ }
38
+ function missingAutomation(error) {
39
+ return new AutomationNotFoundError({
40
+ automationID: error.automationID,
41
+ message: `Automation not found: ${error.automationID}`
42
+ });
43
+ }
44
+ function disabled() {
45
+ return new ForbiddenError({ message: new Automation.DisabledError().message });
46
+ }
47
+
48
+ export { makeAutomation2 };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./content-headers-9rqn6x4v.js";
3
+ } from "./workerd-9rqn6x4v.js";
4
4
 
5
5
  // src/auth.ts
6
6
  var exports_auth = {};