@opencode/server 0.0.0-dev-1347 → 0.0.0-dev-1349

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/{media-uri-86dz2n4m.js → service-status-0x6anvwr.js} +2 -2
  4. package/dist/chunks/{media-uri-202t0v28.js → service-status-1pcadgc2.js} +14 -9
  5. package/dist/chunks/{media-uri-39nnfjx1.js → service-status-39nnfjx1.js} +1 -1
  6. package/dist/chunks/{media-uri-b1x3j2e8.js → service-status-3rtm8r3z.js} +2 -2
  7. package/dist/chunks/{media-uri-50kbksvb.js → service-status-50kbksvb.js} +2 -2
  8. package/dist/chunks/{media-uri-hvn8tnxr.js → service-status-5pef2nys.js} +4 -4
  9. package/dist/chunks/{media-uri-zwmx42kw.js → service-status-62hb8n75.js} +35 -35
  10. package/dist/chunks/{media-uri-hgrkvk6s.js → service-status-6pm6ek88.js} +1 -1
  11. package/dist/chunks/{media-uri-n74dt79t.js → service-status-6r7y0ddy.js} +14 -14
  12. package/dist/chunks/{media-uri-20wvj9q6.js → service-status-78jk0pbb.js} +2 -2
  13. package/dist/chunks/{media-uri-7dtbad8d.js → service-status-7dtbad8d.js} +1 -1
  14. package/dist/chunks/{media-uri-7x6cg3xs.js → service-status-7zz6jxhb.js} +2 -2
  15. package/dist/chunks/{media-uri-8sb6qqpn.js → service-status-8sb6qqpn.js} +1 -1
  16. package/dist/chunks/{media-uri-4r2ye500.js → service-status-9agv2b4c.js} +2 -2
  17. package/dist/chunks/{media-uri-qahj7606.js → service-status-aexh791j.js} +1 -1
  18. package/dist/chunks/{media-uri-zrptb2x8.js → service-status-amxj52x5.js} +2 -2
  19. package/dist/chunks/{media-uri-fvpjvjpp.js → service-status-arzv3fj6.js} +4 -4
  20. package/dist/chunks/{media-uri-s8t5gq7c.js → service-status-ay32z58n.js} +3 -3
  21. package/dist/chunks/{media-uri-pv4dnzzq.js → service-status-b3sk57wg.js} +1 -1
  22. package/dist/chunks/{media-uri-b7yt2ykh.js → service-status-c6kzfg4f.js} +2 -2
  23. package/dist/chunks/{media-uri-djr0jy89.js → service-status-djr0jy89.js} +1 -1
  24. package/dist/chunks/service-status-dnyhqccw.js +27 -0
  25. package/dist/chunks/{media-uri-d0advawr.js → service-status-f93zkajm.js} +2 -2
  26. package/dist/chunks/{media-uri-wh07bcjv.js → service-status-gwtm9cga.js} +1 -1
  27. package/dist/chunks/{media-uri-v0z8pce5.js → service-status-heqw7kpr.js} +2 -2
  28. package/dist/chunks/{media-uri-6t6fd9bq.js → service-status-hgd5b6k8.js} +2 -2
  29. package/dist/chunks/{media-uri-myqk22k5.js → service-status-hmwn16zp.js} +2 -2
  30. package/dist/chunks/{media-uri-j4at0y5c.js → service-status-j4at0y5c.js} +1 -1
  31. package/dist/chunks/{media-uri-8mfdzabk.js → service-status-jrjpfy36.js} +2 -2
  32. package/dist/chunks/{media-uri-n6ypjnhz.js → service-status-jy2ammbg.js} +1 -1
  33. package/dist/chunks/{media-uri-g97h7k0s.js → service-status-k2bx5n4e.js} +1 -1
  34. package/dist/chunks/{media-uri-t8azv5ge.js → service-status-k518ftvz.js} +2 -2
  35. package/dist/chunks/{media-uri-edwk6ehd.js → service-status-k58xpxwn.js} +1 -1
  36. package/dist/chunks/{media-uri-w13ad1dk.js → service-status-kazddk2c.js} +3 -3
  37. package/dist/chunks/{media-uri-8n1ypg70.js → service-status-mjhh6jvz.js} +3 -3
  38. package/dist/chunks/{media-uri-b87bs0cf.js → service-status-pa4xtt5h.js} +2 -2
  39. package/dist/chunks/{media-uri-baxwenvw.js → service-status-pgtfa6tn.js} +14 -4
  40. package/dist/chunks/{media-uri-vh37ha9e.js → service-status-q9s5ja9h.js} +4 -4
  41. package/dist/chunks/{media-uri-rktygpea.js → service-status-rktygpea.js} +1 -1
  42. package/dist/chunks/{media-uri-k26h7zjg.js → service-status-rn83nvae.js} +2 -2
  43. package/dist/chunks/{media-uri-smaf4a18.js → service-status-rqgv9x42.js} +6 -2
  44. package/dist/chunks/{media-uri-fyve7tsy.js → service-status-saajga74.js} +9 -9
  45. package/dist/chunks/{media-uri-t62b1gmw.js → service-status-sqfq92mf.js} +2 -2
  46. package/dist/chunks/{media-uri-j80tzjj3.js → service-status-stx1bw5w.js} +3 -3
  47. package/dist/chunks/{media-uri-t32e1bbt.js → service-status-t32e1bbt.js} +1 -1
  48. package/dist/chunks/{media-uri-g80pvn6e.js → service-status-tmb89r25.js} +2 -2
  49. package/dist/chunks/{media-uri-4gbck4qg.js → service-status-vkj8vbyf.js} +2 -2
  50. package/dist/chunks/{media-uri-p9wp66hf.js → service-status-vnpm7f9y.js} +1 -1
  51. package/dist/chunks/{media-uri-w9jcwh65.js → service-status-w9jcwh65.js} +1 -1
  52. package/dist/chunks/{media-uri-q8jgva1w.js → service-status-wazndna9.js} +4 -4
  53. package/dist/chunks/{media-uri-7ydfwv45.js → service-status-x2qy7jg1.js} +1 -1
  54. package/dist/chunks/{media-uri-dqfyxmp4.js → service-status-yvjggjxh.js} +7 -6
  55. package/dist/chunks/{media-uri-ad35pjas.js → service-status-yw2226k4.js} +2 -2
  56. package/dist/chunks/{media-uri-p4zkxzv7.js → service-status-zx60pg73.js} +1 -1
  57. package/dist/content-headers.js +1 -1
  58. package/dist/cors.js +1 -1
  59. package/dist/event-feed.js +3 -3
  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 +1 -1
  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 +1 -1
  118. package/dist/service-status.js +1 -1
  119. package/dist/workerd.d.ts +25 -6
  120. package/dist/workerd.js +88 -81
  121. package/package.json +8 -8
  122. package/dist/chunks/media-uri-4apj6a8e.js +0 -13
  123. /package/dist/chunks/{media-uri-017ycvbx.js → service-status-017ycvbx.js} +0 -0
  124. /package/dist/chunks/{media-uri-9rqn6x4v.js → service-status-9rqn6x4v.js} +0 -0
  125. /package/dist/chunks/{media-uri-bd8755ek.js → service-status-bd8755ek.js} +0 -0
  126. /package/dist/chunks/{media-uri-n26yr6pw.js → service-status-n26yr6pw.js} +0 -0
  127. /package/dist/chunks/{media-uri-q187pxxd.js → service-status-q187pxxd.js} +0 -0
  128. /package/dist/chunks/{media-uri-q4bn6dy8.js → service-status-q4bn6dy8.js} +0 -0
  129. /package/dist/chunks/{media-uri-xthc02cw.js → service-status-xthc02cw.js} +0 -0
  130. /package/dist/chunks/{media-uri-yc7nft6q.js → service-status-yc7nft6q.js} +0 -0
@@ -2,7 +2,7 @@ import {
2
2
  locationErrors2,
3
3
  sessionInfo2,
4
4
  requestRef2
5
- } from "./media-uri-j80tzjj3.js";
5
+ } from "./service-status-stx1bw5w.js";
6
6
 
7
7
  // src/middleware/form-location.ts
8
8
  import { Instance } from "@opencode/core/instance/service";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./media-uri-s8t5gq7c.js";
3
+ } from "./service-status-ay32z58n.js";
4
4
 
5
5
  // src/handlers/config.ts
6
6
  import { Config } from "@opencode/core/config";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./media-uri-j80tzjj3.js";
3
+ } from "./service-status-stx1bw5w.js";
4
4
  import {
5
5
  Api2
6
- } from "./media-uri-s8t5gq7c.js";
6
+ } from "./service-status-ay32z58n.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 "./media-uri-s8t5gq7c.js";
3
+ } from "./service-status-ay32z58n.js";
4
4
 
5
5
  // src/handlers/project.ts
6
6
  import { Project } from "@opencode/core/project";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  missingSession2,
3
3
  failedMessageDecode2
4
- } from "./media-uri-smaf4a18.js";
4
+ } from "./service-status-rqgv9x42.js";
5
5
  import {
6
6
  Api2
7
- } from "./media-uri-s8t5gq7c.js";
7
+ } from "./service-status-ay32z58n.js";
8
8
  import {
9
9
  wantsMediaRefs2
10
- } from "./media-uri-xthc02cw.js";
10
+ } from "./service-status-xthc02cw.js";
11
11
 
12
12
  // src/handlers/message.ts
13
13
  import { SessionMessage } from "@opencode/core/session/message";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./media-uri-smaf4a18.js";
3
+ } from "./service-status-rqgv9x42.js";
4
4
  import {
5
5
  locationErrors2,
6
6
  response2,
7
7
  sessionInfo2
8
- } from "./media-uri-j80tzjj3.js";
8
+ } from "./service-status-stx1bw5w.js";
9
9
  import {
10
10
  Api2
11
- } from "./media-uri-s8t5gq7c.js";
11
+ } from "./service-status-ay32z58n.js";
12
12
 
13
13
  // src/handlers/permission.ts
14
14
  import { Instance } from "@opencode/core/instance/service";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./media-uri-j80tzjj3.js";
3
+ } from "./service-status-stx1bw5w.js";
4
4
  import {
5
5
  Api2
6
- } from "./media-uri-s8t5gq7c.js";
6
+ } from "./service-status-ay32z58n.js";
7
7
 
8
8
  // src/handlers/command.ts
9
9
  import { Command } from "@opencode/core/command";
@@ -1,17 +1,18 @@
1
1
  import {
2
2
  response2
3
- } from "./media-uri-j80tzjj3.js";
3
+ } from "./service-status-stx1bw5w.js";
4
4
  import {
5
5
  Api2
6
- } from "./media-uri-s8t5gq7c.js";
6
+ } from "./service-status-ay32z58n.js";
7
7
  import {
8
8
  download2
9
- } from "./media-uri-t32e1bbt.js";
9
+ } from "./service-status-t32e1bbt.js";
10
10
  import {
11
11
  parse2
12
- } from "./media-uri-8sb6qqpn.js";
12
+ } from "./service-status-8sb6qqpn.js";
13
13
 
14
14
  // src/handlers/fs.ts
15
+ import { Environment } from "@opencode/core/environment/index";
15
16
  import { FileSystem } from "@opencode/core/filesystem";
16
17
  import { FileWatch } from "@opencode/core/filesystem/file-watch";
17
18
  import { Location } from "@opencode/core/location";
@@ -38,6 +39,12 @@ var FileSystemHandler2 = HttpApiBuilder.group(Api2, "server.fs", (handlers) => E
38
39
  const fs = yield* FileSystem.Service;
39
40
  return yield* fs.write({ path: ctx.query.path, data: ctx.payload });
40
41
  }))).handle("fs.watch", (ctx) => Effect.gen(function* () {
42
+ const environment = yield* Environment.Service;
43
+ if (!environment.local)
44
+ return yield* new ServiceUnavailableError({
45
+ service: "filewatcher",
46
+ message: "File watching is not available for this location"
47
+ });
41
48
  const fs = yield* FileSystem.Service;
42
49
  const location = yield* Location.Service;
43
50
  yield* fs.read({ path: RelativePath.make(ctx.payload.path) }).pipe(Effect.mapError((error) => new FileNotFoundError({ path: error.path, message: `File not found: ${error.path}` })));
@@ -46,6 +53,9 @@ var FileSystemHandler2 = HttpApiBuilder.group(Api2, "server.fs", (handlers) => E
46
53
  file: path.resolve(location.directory, ctx.payload.path)
47
54
  }).pipe(Effect.mapError((error) => new ServiceUnavailableError({ message: error.message, service: "filewatcher" })));
48
55
  })).handle("fs.unwatch", (ctx) => Effect.gen(function* () {
56
+ const environment = yield* Environment.Service;
57
+ if (!environment.local)
58
+ return;
49
59
  const location = yield* Location.Service;
50
60
  yield* fileWatch.unwatch({
51
61
  location: { directory: location.directory, workspaceID: location.workspaceID },
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  Api2
3
- } from "./media-uri-s8t5gq7c.js";
3
+ } from "./service-status-ay32z58n.js";
4
4
  import {
5
5
  SESSION_TTL_SECONDS2,
6
6
  Config2,
7
7
  issueSession2,
8
8
  sessionCookieName2
9
- } from "./media-uri-j4at0y5c.js";
9
+ } from "./service-status-j4at0y5c.js";
10
10
  import {
11
11
  Service4
12
- } from "./media-uri-7dtbad8d.js";
12
+ } from "./service-status-7dtbad8d.js";
13
13
  import {
14
14
  Service3
15
- } from "./media-uri-w9jcwh65.js";
15
+ } from "./service-status-w9jcwh65.js";
16
16
 
17
17
  // src/handlers/server.ts
18
18
  import { hostname } from "node:os";
@@ -4,7 +4,7 @@ import {
4
4
  authorized2,
5
5
  verifySession2,
6
6
  sessionCookieName2
7
- } from "./media-uri-j4at0y5c.js";
7
+ } from "./service-status-j4at0y5c.js";
8
8
 
9
9
  // src/middleware/authorization.ts
10
10
  import { UnauthorizedError } from "@opencode/protocol/errors";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./media-uri-j80tzjj3.js";
3
+ } from "./service-status-stx1bw5w.js";
4
4
  import {
5
5
  Api2
6
- } from "./media-uri-s8t5gq7c.js";
6
+ } from "./service-status-ay32z58n.js";
7
7
 
8
8
  // src/handlers/agent.ts
9
9
  import { Agent } from "@opencode/core/agent";
@@ -1,5 +1,6 @@
1
1
  // src/handlers/session-error.ts
2
- import { MessageNotFoundError, SessionNotFoundError, UnknownError } from "@opencode/protocol/errors";
2
+ import { Skill } from "@opencode/core/skill";
3
+ import { MessageNotFoundError, SessionNotFoundError, SkillLoadError, UnknownError } from "@opencode/protocol/errors";
3
4
  import { Effect } from "effect";
4
5
  function missingSession2(error) {
5
6
  return new SessionNotFoundError({
@@ -7,6 +8,9 @@ function missingSession2(error) {
7
8
  message: `Session not found: ${error.sessionID}`
8
9
  });
9
10
  }
11
+ function skillLoadFailed2(error) {
12
+ return new SkillLoadError({ skill: Skill.ID.make(error.skill), message: error.message });
13
+ }
10
14
  function missingMessage2(error) {
11
15
  return new MessageNotFoundError({
12
16
  sessionID: error.sessionID,
@@ -25,4 +29,4 @@ function failedSnapshot2(operation, sessionID) {
25
29
  };
26
30
  }
27
31
 
28
- export { missingSession2, missingMessage2, failedMessageDecode2, failedSnapshot2 };
32
+ export { missingSession2, skillLoadFailed2, missingMessage2, failedMessageDecode2, failedSnapshot2 };
@@ -1,32 +1,32 @@
1
1
  import {
2
2
  Api2
3
- } from "./media-uri-s8t5gq7c.js";
3
+ } from "./service-status-ay32z58n.js";
4
4
  import {
5
5
  CorsConfig2,
6
6
  isAllowedRequestOrigin2
7
- } from "./media-uri-q4bn6dy8.js";
7
+ } from "./service-status-q4bn6dy8.js";
8
8
  import {
9
9
  makeArtifact2
10
- } from "./media-uri-t62b1gmw.js";
10
+ } from "./service-status-sqfq92mf.js";
11
11
  import {
12
12
  makeBlobGet2
13
- } from "./media-uri-50kbksvb.js";
13
+ } from "./service-status-50kbksvb.js";
14
14
  import {
15
15
  makeAutomation2
16
- } from "./media-uri-hgrkvk6s.js";
16
+ } from "./service-status-6pm6ek88.js";
17
17
  import {
18
18
  makeJob2
19
- } from "./media-uri-7ydfwv45.js";
19
+ } from "./service-status-x2qy7jg1.js";
20
20
  import {
21
21
  makeMachineLink2,
22
22
  makeMachine2
23
- } from "./media-uri-017ycvbx.js";
23
+ } from "./service-status-017ycvbx.js";
24
24
  import {
25
25
  makeMediaGet2
26
- } from "./media-uri-djr0jy89.js";
26
+ } from "./service-status-djr0jy89.js";
27
27
  import {
28
28
  runPtySocket2
29
- } from "./media-uri-q187pxxd.js";
29
+ } from "./service-status-q187pxxd.js";
30
30
 
31
31
  // src/handlers/persistent-pty.ts
32
32
  import { PersistentPty } from "@opencode/core/persistent-pty";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./media-uri-smaf4a18.js";
3
+ } from "./service-status-rqgv9x42.js";
4
4
  import {
5
5
  locationErrors2,
6
6
  response2,
7
7
  requestRef2
8
- } from "./media-uri-j80tzjj3.js";
8
+ } from "./service-status-stx1bw5w.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
  missingSession2
3
- } from "./media-uri-smaf4a18.js";
3
+ } from "./service-status-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 layer2 = 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, layer2 };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./media-uri-9rqn6x4v.js";
3
+ } from "./service-status-9rqn6x4v.js";
4
4
 
5
5
  // src/content-headers.ts
6
6
  var exports_content_headers = {};
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./media-uri-j80tzjj3.js";
3
+ } from "./service-status-stx1bw5w.js";
4
4
  import {
5
5
  Api2
6
- } from "./media-uri-s8t5gq7c.js";
6
+ } from "./service-status-ay32z58n.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 "./media-uri-j80tzjj3.js";
3
+ } from "./service-status-stx1bw5w.js";
4
4
  import {
5
5
  Api2
6
- } from "./media-uri-s8t5gq7c.js";
6
+ } from "./service-status-ay32z58n.js";
7
7
 
8
8
  // src/handlers/usage.ts
9
9
  import { UsageLimits } from "@opencode/core/usage-limits";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./media-uri-s8t5gq7c.js";
3
+ } from "./service-status-ay32z58n.js";
4
4
 
5
5
  // src/handlers/worktree.ts
6
6
  import { Git } from "@opencode/core/git";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./media-uri-9rqn6x4v.js";
3
+ } from "./service-status-9rqn6x4v.js";
4
4
 
5
5
  // src/pairing.ts
6
6
  var exports_pairing = {};
@@ -2,18 +2,18 @@ import {
2
2
  locationErrors2,
3
3
  response2,
4
4
  requestRef2
5
- } from "./media-uri-j80tzjj3.js";
5
+ } from "./service-status-stx1bw5w.js";
6
6
  import {
7
7
  Api2
8
- } from "./media-uri-s8t5gq7c.js";
8
+ } from "./service-status-ay32z58n.js";
9
9
  import {
10
10
  CorsConfig2,
11
11
  isAllowedRequestOrigin2
12
- } from "./media-uri-q4bn6dy8.js";
12
+ } from "./service-status-q4bn6dy8.js";
13
13
  import {
14
14
  runPtySocket2,
15
15
  holdLocation2
16
- } from "./media-uri-q187pxxd.js";
16
+ } from "./service-status-q187pxxd.js";
17
17
 
18
18
  // src/handlers/mcp.ts
19
19
  import { Location } from "@opencode/core/location";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./media-uri-smaf4a18.js";
3
+ } from "./service-status-rqgv9x42.js";
4
4
 
5
5
  // src/handlers/job.ts
6
6
  import { Job } from "@opencode/core/job";
@@ -1,18 +1,19 @@
1
1
  import {
2
2
  missingSession2,
3
+ skillLoadFailed2,
3
4
  missingMessage2,
4
5
  failedMessageDecode2,
5
6
  failedSnapshot2
6
- } from "./media-uri-smaf4a18.js";
7
+ } from "./service-status-rqgv9x42.js";
7
8
  import {
8
9
  locationErrors2
9
- } from "./media-uri-j80tzjj3.js";
10
+ } from "./service-status-stx1bw5w.js";
10
11
  import {
11
12
  Api2
12
- } from "./media-uri-s8t5gq7c.js";
13
+ } from "./service-status-ay32z58n.js";
13
14
  import {
14
15
  wantsMediaRefs2
15
- } from "./media-uri-xthc02cw.js";
16
+ } from "./service-status-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,10 +1,10 @@
1
1
  import {
2
2
  Api2
3
- } from "./media-uri-s8t5gq7c.js";
3
+ } from "./service-status-ay32z58n.js";
4
4
  import {
5
5
  Service2,
6
6
  frame2
7
- } from "./media-uri-fvpjvjpp.js";
7
+ } from "./service-status-arzv3fj6.js";
8
8
 
9
9
  // src/handlers/event.ts
10
10
  import { Event } from "@opencode/schema/event";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./media-uri-s8t5gq7c.js";
3
+ } from "./service-status-ay32z58n.js";
4
4
 
5
5
  // src/handlers/rpc.ts
6
6
  import { Rpc } from "@opencode/core/rpc";
@@ -3,7 +3,7 @@ import {
3
3
  download2,
4
4
  disposition2,
5
5
  exports_content_headers
6
- } from "./chunks/media-uri-t32e1bbt.js";
6
+ } from "./chunks/service-status-t32e1bbt.js";
7
7
  export {
8
8
  CONTENT_SECURITY_POLICY2 as CONTENT_SECURITY_POLICY,
9
9
  exports_content_headers as ContentHeaders,
package/dist/cors.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  CorsConfig2,
3
3
  isAllowedCorsOrigin2,
4
4
  isAllowedRequestOrigin2
5
- } from "./chunks/media-uri-q4bn6dy8.js";
5
+ } from "./chunks/service-status-q4bn6dy8.js";
6
6
  export {
7
7
  CorsConfig2 as CorsConfig,
8
8
  isAllowedCorsOrigin2 as isAllowedCorsOrigin,
@@ -5,9 +5,9 @@ import {
5
5
  Service2,
6
6
  frame2,
7
7
  make4,
8
- layer2,
8
+ layer3,
9
9
  exports_event_feed
10
- } from "./chunks/media-uri-fvpjvjpp.js";
10
+ } from "./chunks/service-status-arzv3fj6.js";
11
11
  export {
12
12
  EncodingError2 as EncodingError,
13
13
  exports_event_feed as EventFeed,
@@ -15,6 +15,6 @@ export {
15
15
  SubscriberCapacity2 as SubscriberCapacity,
16
16
  SubscriberOverflowError2 as SubscriberOverflowError,
17
17
  frame2 as frame,
18
- layer2 as layer,
18
+ layer3 as layer,
19
19
  make4 as make
20
20
  };
package/dist/fetch.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  export * as ServerFetch from "./fetch";
2
2
  import { Context, Effect } from "effect";
3
+ import { HttpRouter } from "effect/http";
4
+ import { SessionRestart } from "@opencode/core/session/execution/restart";
3
5
  import type { LayerNode } from "@opencode/util/effect/layer-node";
4
6
  export interface BootOptions {
5
7
  /**
@@ -8,6 +10,61 @@ export interface BootOptions {
8
10
  */
9
11
  readonly overrides?: LayerNode.Replacements;
10
12
  }
13
+ /** Internal entry for runtime profiles (such as `ServerWorkerd.create`) that also need the built service context. */
14
+ export declare const makeWithContext: (options?: {
15
+ readonly app?: {
16
+ readonly name?: string | undefined;
17
+ readonly version?: string | undefined;
18
+ readonly channel?: string | undefined;
19
+ } | undefined;
20
+ readonly hostname?: string | undefined;
21
+ readonly port?: number | undefined;
22
+ readonly password?: string | undefined;
23
+ readonly cors?: readonly string[] | undefined;
24
+ readonly simulation?: boolean | undefined;
25
+ readonly database?: {
26
+ readonly path?: string | undefined;
27
+ } | undefined;
28
+ readonly pty?: {
29
+ readonly handoff?: {
30
+ readonly directory: string;
31
+ readonly instanceID: string;
32
+ readonly ticket: string;
33
+ readonly expiresAt: number;
34
+ } | undefined;
35
+ readonly root?: string | undefined;
36
+ } | undefined;
37
+ readonly events?: {
38
+ readonly persist?: boolean | undefined;
39
+ } | undefined;
40
+ readonly models?: {
41
+ readonly url?: string | undefined;
42
+ readonly file?: string | undefined;
43
+ readonly fetch?: boolean | undefined;
44
+ readonly snapshot?: boolean | undefined;
45
+ } | undefined;
46
+ readonly fetch?: import("@opencode/util/effect/app-node-platform").Fetch | undefined;
47
+ readonly config?: {
48
+ readonly directory?: string | undefined;
49
+ readonly project?: boolean | undefined;
50
+ readonly claude?: boolean | undefined;
51
+ readonly file?: string | undefined;
52
+ readonly content?: string | undefined;
53
+ } | undefined;
54
+ readonly instructions?: {
55
+ readonly claude?: boolean | undefined;
56
+ } | undefined;
57
+ readonly windows?: {
58
+ readonly gitbash?: string | undefined;
59
+ } | undefined;
60
+ readonly fs?: {
61
+ readonly filewatcher?: boolean | undefined;
62
+ readonly fff?: boolean | undefined;
63
+ } | undefined;
64
+ } | undefined, boot?: BootOptions | undefined) => Effect.Effect<{
65
+ handler: (request: Request, context?: Context.Context<never> | undefined) => Promise<globalThis.Response>;
66
+ context: Context.Context<import("@opencode/core/shell").Daemon | import("effect/http/HttpClient").HttpClient | HttpRouter.HttpRouter | import("@opencode/util/fs-util").FSUtil.Service | import("@opencode/util/global").Service | import("@opencode/core/database/database").Service | import("@opencode/core/app").Service | import("@opencode/core/credential").Service | import("@opencode/core/kv").Service | import("@opencode/core/wellknown").Service | import("@opencode/core/session/instruction-entry").Service | import("@opencode/core/job").Service | import("@opencode/core/machine/identity").Service | import("@opencode/core/machine/machines").Service | import("@opencode/core/workspace").Service | import("@opencode/core/permission/saved").Service | import("@opencode/core/codemode/api").Service | import("@opencode/core/location-service-map").Service | import("@opencode/core/persistent-pty/index").Service | import("@opencode/core/session").Service | import("@opencode/core/automation").Service | import("@opencode/core/worktree").Service | import("@opencode/core/blob-store").Service | import("@opencode/core/session/search-build").Service | import("@opencode/core/video-generation").Service | import("@opencode/core/plugin/sdk").Service | import("@opencode/core/plugin/update").Service | import("@opencode/core/instance").Service | import("@opencode/core/bus").Service | import("@opencode/core/project").Service | SessionRestart.Service | import("@opencode/core/pty/ticket").Service | import("@opencode/core/session/transfer").Service | import("@opencode/core/location-activity").Service | import("@opencode/core/filesystem/file-watch").Service | import("./pairing").Service>;
67
+ }, Error, import("effect/Scope").Scope>;
11
68
  /**
12
69
  * Builds a web-standard fetch handler — `(request: Request) => Promise<Response>` — serving the
13
70
  * same HttpApi routes as the Node server process without binding a port, owning a listener, or