@opencode/server 0.0.0-dev-1347 → 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/{media-uri-hvn8tnxr.js → request-site-0vqsbvsa.js} +4 -4
  4. package/dist/chunks/{media-uri-pv4dnzzq.js → request-site-10sj2tcf.js} +1 -1
  5. package/dist/chunks/{media-uri-dqfyxmp4.js → request-site-1dbhk1te.js} +7 -6
  6. package/dist/chunks/{media-uri-4r2ye500.js → request-site-2tmcamrc.js} +2 -2
  7. package/dist/chunks/{media-uri-39nnfjx1.js → request-site-39nnfjx1.js} +1 -1
  8. package/dist/chunks/{media-uri-7dtbad8d.js → request-site-3te71694.js} +7 -7
  9. package/dist/chunks/{media-uri-hgrkvk6s.js → request-site-6pm6ek88.js} +1 -1
  10. package/dist/chunks/request-site-74nxvsrn.js +27 -0
  11. package/dist/chunks/{media-uri-t8azv5ge.js → request-site-7dkb5ks8.js} +2 -2
  12. package/dist/chunks/{media-uri-edwk6ehd.js → request-site-8nezxn08.js} +1 -1
  13. package/dist/chunks/{media-uri-zrptb2x8.js → request-site-8qsq6tbs.js} +2 -2
  14. package/dist/chunks/{media-uri-8sb6qqpn.js → request-site-8sb6qqpn.js} +1 -1
  15. package/dist/chunks/{media-uri-86dz2n4m.js → request-site-8xdajgpr.js} +2 -2
  16. package/dist/chunks/{media-uri-g97h7k0s.js → request-site-am27j67f.js} +1 -1
  17. package/dist/chunks/{media-uri-j80tzjj3.js → request-site-br4x4prt.js} +3 -3
  18. package/dist/chunks/{media-uri-n6ypjnhz.js → request-site-ca564221.js} +1 -1
  19. package/dist/chunks/{media-uri-vh37ha9e.js → request-site-csetzeb0.js} +8 -8
  20. package/dist/chunks/{media-uri-b7yt2ykh.js → request-site-csnx1nj3.js} +2 -2
  21. package/dist/chunks/{media-uri-g80pvn6e.js → request-site-cwx7pqk1.js} +2 -2
  22. package/dist/chunks/{media-uri-n74dt79t.js → request-site-dc91e8gy.js} +16 -16
  23. package/dist/chunks/{media-uri-djr0jy89.js → request-site-djr0jy89.js} +1 -1
  24. package/dist/chunks/{media-uri-qahj7606.js → request-site-ehyp3zqd.js} +1 -1
  25. package/dist/chunks/{media-uri-20wvj9q6.js → request-site-em7ed65n.js} +2 -2
  26. package/dist/chunks/{media-uri-k26h7zjg.js → request-site-exwy1kbj.js} +2 -2
  27. package/dist/chunks/{media-uri-b1x3j2e8.js → request-site-f3gr6hfv.js} +2 -2
  28. package/dist/chunks/{media-uri-fvpjvjpp.js → request-site-fvpjvjpp.js} +1 -1
  29. package/dist/chunks/{media-uri-50kbksvb.js → request-site-g23ffrnz.js} +2 -2
  30. package/dist/chunks/{media-uri-w13ad1dk.js → request-site-g4964mny.js} +3 -3
  31. package/dist/chunks/{media-uri-j4at0y5c.js → request-site-j4at0y5c.js} +1 -1
  32. package/dist/chunks/{media-uri-t62b1gmw.js → request-site-javgytnb.js} +2 -2
  33. package/dist/chunks/{media-uri-p4zkxzv7.js → request-site-k74zefsg.js} +1 -1
  34. package/dist/chunks/{media-uri-8n1ypg70.js → request-site-kmwr1xw9.js} +3 -3
  35. package/dist/chunks/{media-uri-ad35pjas.js → request-site-kshqfq8s.js} +2 -2
  36. package/dist/chunks/{media-uri-zwmx42kw.js → request-site-mnjcp51m.js} +33 -33
  37. package/dist/chunks/{media-uri-myqk22k5.js → request-site-myqk22k5.js} +2 -2
  38. package/dist/chunks/{media-uri-w9jcwh65.js → request-site-mzs0n5xz.js} +7 -7
  39. package/dist/chunks/{media-uri-p9wp66hf.js → request-site-n2zyxnzr.js} +1 -1
  40. package/dist/chunks/{media-uri-202t0v28.js → request-site-nswmrzft.js} +14 -9
  41. package/dist/chunks/{media-uri-wh07bcjv.js → request-site-p3bbq7g3.js} +1 -1
  42. package/dist/chunks/{media-uri-baxwenvw.js → request-site-pmv5pv9v.js} +4 -4
  43. package/dist/chunks/{media-uri-8mfdzabk.js → request-site-prwd5gwt.js} +2 -2
  44. package/dist/chunks/{media-uri-7x6cg3xs.js → request-site-qq3f8fnn.js} +2 -2
  45. package/dist/chunks/{media-uri-b87bs0cf.js → request-site-rgbnpstw.js} +2 -2
  46. package/dist/chunks/{media-uri-v0z8pce5.js → request-site-rjhxbsc4.js} +2 -2
  47. package/dist/chunks/{media-uri-rktygpea.js → request-site-rktygpea.js} +1 -1
  48. package/dist/chunks/{media-uri-q8jgva1w.js → request-site-rm5kndzh.js} +4 -4
  49. package/dist/chunks/{media-uri-smaf4a18.js → request-site-rqgv9x42.js} +6 -2
  50. package/dist/chunks/{media-uri-fyve7tsy.js → request-site-rs6c9pjq.js} +9 -9
  51. package/dist/chunks/{media-uri-d0advawr.js → request-site-s0zgx365.js} +2 -2
  52. package/dist/chunks/{media-uri-t32e1bbt.js → request-site-t32e1bbt.js} +1 -1
  53. package/dist/chunks/{media-uri-s8t5gq7c.js → request-site-whvq72as.js} +3 -3
  54. package/dist/chunks/{media-uri-4gbck4qg.js → request-site-wsvmph03.js} +2 -2
  55. package/dist/chunks/{media-uri-7ydfwv45.js → request-site-x2qy7jg1.js} +1 -1
  56. package/dist/chunks/{media-uri-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 +1 -1
  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/media-uri-4apj6a8e.js +0 -13
  123. /package/dist/chunks/{media-uri-017ycvbx.js → request-site-017ycvbx.js} +0 -0
  124. /package/dist/chunks/{media-uri-9rqn6x4v.js → request-site-9rqn6x4v.js} +0 -0
  125. /package/dist/chunks/{media-uri-bd8755ek.js → request-site-bd8755ek.js} +0 -0
  126. /package/dist/chunks/{media-uri-n26yr6pw.js → request-site-n26yr6pw.js} +0 -0
  127. /package/dist/chunks/{media-uri-q187pxxd.js → request-site-q187pxxd.js} +0 -0
  128. /package/dist/chunks/{media-uri-q4bn6dy8.js → request-site-q4bn6dy8.js} +0 -0
  129. /package/dist/chunks/{media-uri-xthc02cw.js → request-site-xthc02cw.js} +0 -0
  130. /package/dist/chunks/{media-uri-yc7nft6q.js → request-site-yc7nft6q.js} +0 -0
@@ -1,102 +1,102 @@
1
1
  import {
2
2
  GenerateHandler2
3
- } from "./media-uri-8mfdzabk.js";
3
+ } from "./request-site-prwd5gwt.js";
4
4
  import {
5
5
  VoiceHandler2
6
- } from "./media-uri-v0z8pce5.js";
6
+ } from "./request-site-rjhxbsc4.js";
7
7
  import {
8
8
  MessageHandler2
9
- } from "./media-uri-w13ad1dk.js";
9
+ } from "./request-site-g4964mny.js";
10
10
  import {
11
11
  ModelHandler2
12
- } from "./media-uri-d0advawr.js";
12
+ } from "./request-site-s0zgx365.js";
13
13
  import {
14
14
  ProviderHandler2
15
- } from "./media-uri-6t6fd9bq.js";
15
+ } from "./request-site-yc92za0p.js";
16
16
  import {
17
17
  SessionHandler2
18
- } from "./media-uri-dqfyxmp4.js";
18
+ } from "./request-site-1dbhk1te.js";
19
19
  import {
20
20
  PermissionHandler2
21
- } from "./media-uri-8n1ypg70.js";
21
+ } from "./request-site-kmwr1xw9.js";
22
22
  import {
23
23
  FileSystemHandler2
24
- } from "./media-uri-baxwenvw.js";
24
+ } from "./request-site-pmv5pv9v.js";
25
25
  import {
26
26
  FormHandler2
27
- } from "./media-uri-zrptb2x8.js";
27
+ } from "./request-site-8qsq6tbs.js";
28
28
  import {
29
29
  CommandHandler2
30
- } from "./media-uri-b87bs0cf.js";
30
+ } from "./request-site-rgbnpstw.js";
31
31
  import {
32
32
  SkillHandler2
33
- } from "./media-uri-4apj6a8e.js";
33
+ } from "./request-site-74nxvsrn.js";
34
34
  import {
35
35
  RpcHandler2
36
- } from "./media-uri-p4zkxzv7.js";
36
+ } from "./request-site-k74zefsg.js";
37
37
  import {
38
38
  layer2
39
- } from "./media-uri-fvpjvjpp.js";
39
+ } from "./request-site-fvpjvjpp.js";
40
40
  import {
41
41
  EventHandler2
42
- } from "./media-uri-ad35pjas.js";
42
+ } from "./request-site-kshqfq8s.js";
43
43
  import {
44
44
  AgentHandler2
45
- } from "./media-uri-k26h7zjg.js";
45
+ } from "./request-site-exwy1kbj.js";
46
46
  import {
47
47
  PluginHandler2
48
- } from "./media-uri-20wvj9q6.js";
48
+ } from "./request-site-em7ed65n.js";
49
49
  import {
50
50
  ServerHandler2
51
- } from "./media-uri-vh37ha9e.js";
51
+ } from "./request-site-csetzeb0.js";
52
52
  import {
53
53
  DebugHandler2
54
- } from "./media-uri-b7yt2ykh.js";
54
+ } from "./request-site-csnx1nj3.js";
55
55
  import {
56
56
  PtyHandler2
57
- } from "./media-uri-hvn8tnxr.js";
57
+ } from "./request-site-0vqsbvsa.js";
58
58
  import {
59
59
  PersistentPtyHandler2
60
- } from "./media-uri-fyve7tsy.js";
60
+ } from "./request-site-rs6c9pjq.js";
61
61
  import {
62
62
  ShellHandler2
63
- } from "./media-uri-b1x3j2e8.js";
63
+ } from "./request-site-f3gr6hfv.js";
64
64
  import {
65
65
  ReferenceHandler2
66
- } from "./media-uri-t8azv5ge.js";
66
+ } from "./request-site-7dkb5ks8.js";
67
67
  import {
68
68
  LocationHandler2
69
- } from "./media-uri-wh07bcjv.js";
69
+ } from "./request-site-p3bbq7g3.js";
70
70
  import {
71
71
  IntegrationHandler2
72
- } from "./media-uri-4r2ye500.js";
72
+ } from "./request-site-2tmcamrc.js";
73
73
  import {
74
74
  WebSearchHandler2
75
- } from "./media-uri-7x6cg3xs.js";
75
+ } from "./request-site-qq3f8fnn.js";
76
76
  import {
77
77
  UsageHandler2
78
- } from "./media-uri-4gbck4qg.js";
78
+ } from "./request-site-wsvmph03.js";
79
79
  import {
80
80
  McpHandler2
81
- } from "./media-uri-q8jgva1w.js";
81
+ } from "./request-site-rm5kndzh.js";
82
82
  import {
83
83
  CredentialHandler2
84
- } from "./media-uri-86dz2n4m.js";
84
+ } from "./request-site-8xdajgpr.js";
85
85
  import {
86
86
  ProjectHandler2
87
- } from "./media-uri-edwk6ehd.js";
87
+ } from "./request-site-8nezxn08.js";
88
88
  import {
89
89
  WorktreeHandler2
90
- } from "./media-uri-p9wp66hf.js";
90
+ } from "./request-site-n2zyxnzr.js";
91
91
  import {
92
92
  VcsHandler2
93
- } from "./media-uri-g80pvn6e.js";
93
+ } from "./request-site-cwx7pqk1.js";
94
94
  import {
95
95
  MigrationHandler2
96
- } from "./media-uri-pv4dnzzq.js";
96
+ } from "./request-site-10sj2tcf.js";
97
97
  import {
98
98
  ConfigHandler2
99
- } from "./media-uri-g97h7k0s.js";
99
+ } from "./request-site-am27j67f.js";
100
100
 
101
101
  // src/handlers.ts
102
102
  import { Layer } from "effect";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  isAllowedRequestOrigin2
3
- } from "./media-uri-q4bn6dy8.js";
3
+ } from "./request-site-q4bn6dy8.js";
4
4
  import {
5
5
  __export
6
- } from "./media-uri-9rqn6x4v.js";
6
+ } from "./request-site-9rqn6x4v.js";
7
7
 
8
8
  // src/request-site.ts
9
9
  var exports_request_site = {};
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  __export
3
- } from "./media-uri-9rqn6x4v.js";
3
+ } from "./request-site-9rqn6x4v.js";
4
4
 
5
5
  // src/pairing.ts
6
6
  var exports_pairing = {};
7
7
  __export(exports_pairing, {
8
8
  ServerPairing: () => exports_pairing,
9
- Service: () => Service3,
9
+ Service: () => Service4,
10
10
  node: () => node2
11
11
  });
12
12
  import { Cache, Context, Duration, Effect, Layer } from "effect";
@@ -14,12 +14,12 @@ import { makeGlobalNode } from "@opencode/util/effect/app-node";
14
14
  import { randomBytes } from "node:crypto";
15
15
  var TTL = Duration.minutes(5);
16
16
 
17
- class Service3 extends Context.Service()("@opencode/ServerPairing") {
17
+ class Service4 extends Context.Service()("@opencode/ServerPairing") {
18
18
  }
19
19
  var noLookup = () => Effect.die(new Error("ServerPairing cache must be used via set/invalidateWhen, never get"));
20
- var layer = Layer.effect(Service3, Effect.gen(function* () {
20
+ var layer = Layer.effect(Service4, Effect.gen(function* () {
21
21
  const cache = yield* Cache.make({ capacity: 1000, lookup: noLookup, timeToLive: TTL });
22
- return Service3.of({
22
+ return Service4.of({
23
23
  issue: Effect.fn("ServerPairing.issue")(function* () {
24
24
  const code = randomBytes(16).toString("base64url");
25
25
  yield* Cache.set(cache, code, true);
@@ -30,6 +30,6 @@ var layer = Layer.effect(Service3, Effect.gen(function* () {
30
30
  })
31
31
  });
32
32
  }));
33
- var node2 = makeGlobalNode({ service: Service3, layer, deps: [] });
33
+ var node2 = makeGlobalNode({ service: Service4, layer, deps: [] });
34
34
 
35
- export { Service3, node2, exports_pairing };
35
+ export { Service4, node2, exports_pairing };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./media-uri-s8t5gq7c.js";
3
+ } from "./request-site-whvq72as.js";
4
4
 
5
5
  // src/handlers/worktree.ts
6
6
  import { Git } from "@opencode/core/git";
@@ -1,32 +1,37 @@
1
1
  import {
2
2
  isAllowedCorsOrigin2
3
- } from "./media-uri-q4bn6dy8.js";
3
+ } from "./request-site-q4bn6dy8.js";
4
4
  import {
5
5
  middleware2
6
- } from "./media-uri-myqk22k5.js";
6
+ } from "./request-site-myqk22k5.js";
7
7
  import {
8
8
  withoutParentSpan2
9
- } from "./media-uri-yc7nft6q.js";
9
+ } from "./request-site-yc7nft6q.js";
10
10
  import {
11
11
  createRoutes2
12
- } from "./media-uri-n74dt79t.js";
12
+ } from "./request-site-dc91e8gy.js";
13
13
  import {
14
14
  __export
15
- } from "./media-uri-9rqn6x4v.js";
15
+ } from "./request-site-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: () => make3,
22
+ makeWithContext: () => makeWithContext2
22
23
  });
23
24
  import { Context, Effect, Layer } from "effect";
24
25
  import { HttpEffect, HttpMiddleware, HttpRouter, HttpServer } from "effect/http";
25
26
  import { SessionRestart } from "@opencode/core/session/execution/restart";
26
- var make3 = Effect.fn("ServerFetch.make")(function* (options = {}, boot = {}) {
27
+ var makeWithContext2 = Effect.fn("ServerFetch.makeWithContext")(function* (options = {}, boot = {}) {
27
28
  const context = yield* Layer.build(createRoutes2(options, () => [], boot.overrides ?? []).pipe(Layer.provide(HttpServer.layerServices))).pipe(withoutParentSpan2);
28
29
  yield* Effect.forkDetach(Context.get(context, SessionRestart.Service).resumeSuspendedSessions);
29
- return Context.get(context, HttpRouter.HttpRouter).asHttpEffect().pipe(middleware2(options), HttpMiddleware.cors({ allowedOrigins: (origin) => isAllowedCorsOrigin2(origin, options), maxAge: 86400 }), HttpEffect.toWebHandlerWith(context));
30
+ const handler = Context.get(context, HttpRouter.HttpRouter).asHttpEffect().pipe(middleware2(options), HttpMiddleware.cors({ allowedOrigins: (origin) => isAllowedCorsOrigin2(origin, options), maxAge: 86400 }), HttpEffect.toWebHandlerWith(context));
31
+ return { handler, context };
32
+ });
33
+ var make3 = Effect.fn("ServerFetch.make")(function* (options = {}, boot = {}) {
34
+ return (yield* makeWithContext2(options, boot)).handler;
30
35
  });
31
36
 
32
- export { make3, exports_fetch };
37
+ export { makeWithContext2, make3, exports_fetch };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./media-uri-s8t5gq7c.js";
3
+ } from "./request-site-whvq72as.js";
4
4
 
5
5
  // src/handlers/location.ts
6
6
  import { Location } from "@opencode/core/location";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  response2
3
- } from "./media-uri-j80tzjj3.js";
3
+ } from "./request-site-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./media-uri-s8t5gq7c.js";
6
+ } from "./request-site-whvq72as.js";
7
7
  import {
8
8
  download2
9
- } from "./media-uri-t32e1bbt.js";
9
+ } from "./request-site-t32e1bbt.js";
10
10
  import {
11
11
  parse2
12
- } from "./media-uri-8sb6qqpn.js";
12
+ } from "./request-site-8sb6qqpn.js";
13
13
 
14
14
  // src/handlers/fs.ts
15
15
  import { FileSystem } from "@opencode/core/filesystem";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  locationErrors2
3
- } from "./media-uri-j80tzjj3.js";
3
+ } from "./request-site-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./media-uri-s8t5gq7c.js";
6
+ } from "./request-site-whvq72as.js";
7
7
 
8
8
  // src/handlers/generate.ts
9
9
  import { Generate } from "@opencode/core/generate";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./media-uri-j80tzjj3.js";
3
+ } from "./request-site-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./media-uri-s8t5gq7c.js";
6
+ } from "./request-site-whvq72as.js";
7
7
 
8
8
  // src/handlers/websearch.ts
9
9
  import { WebSearch } from "@opencode/core/websearch";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./media-uri-j80tzjj3.js";
3
+ } from "./request-site-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./media-uri-s8t5gq7c.js";
6
+ } from "./request-site-whvq72as.js";
7
7
 
8
8
  // src/handlers/command.ts
9
9
  import { Command } from "@opencode/core/command";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  locationErrors2
3
- } from "./media-uri-j80tzjj3.js";
3
+ } from "./request-site-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./media-uri-s8t5gq7c.js";
6
+ } from "./request-site-whvq72as.js";
7
7
 
8
8
  // src/handlers/voice.ts
9
9
  import { Location } from "@opencode/core/location";
@@ -4,7 +4,7 @@ import {
4
4
  authorized2,
5
5
  verifySession2,
6
6
  sessionCookieName2
7
- } from "./media-uri-j4at0y5c.js";
7
+ } from "./request-site-j4at0y5c.js";
8
8
 
9
9
  // src/middleware/authorization.ts
10
10
  import { UnauthorizedError } from "@opencode/protocol/errors";
@@ -2,18 +2,18 @@ import {
2
2
  locationErrors2,
3
3
  response2,
4
4
  requestRef2
5
- } from "./media-uri-j80tzjj3.js";
5
+ } from "./request-site-br4x4prt.js";
6
6
  import {
7
7
  Api2
8
- } from "./media-uri-s8t5gq7c.js";
8
+ } from "./request-site-whvq72as.js";
9
9
  import {
10
10
  CorsConfig2,
11
11
  isAllowedRequestOrigin2
12
- } from "./media-uri-q4bn6dy8.js";
12
+ } from "./request-site-q4bn6dy8.js";
13
13
  import {
14
14
  runPtySocket2,
15
15
  holdLocation2
16
- } from "./media-uri-q187pxxd.js";
16
+ } from "./request-site-q187pxxd.js";
17
17
 
18
18
  // src/handlers/mcp.ts
19
19
  import { Location } from "@opencode/core/location";
@@ -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 "./request-site-whvq72as.js";
4
4
  import {
5
5
  CorsConfig2,
6
6
  isAllowedRequestOrigin2
7
- } from "./media-uri-q4bn6dy8.js";
7
+ } from "./request-site-q4bn6dy8.js";
8
8
  import {
9
9
  makeArtifact2
10
- } from "./media-uri-t62b1gmw.js";
10
+ } from "./request-site-javgytnb.js";
11
11
  import {
12
12
  makeBlobGet2
13
- } from "./media-uri-50kbksvb.js";
13
+ } from "./request-site-g23ffrnz.js";
14
14
  import {
15
15
  makeAutomation2
16
- } from "./media-uri-hgrkvk6s.js";
16
+ } from "./request-site-6pm6ek88.js";
17
17
  import {
18
18
  makeJob2
19
- } from "./media-uri-7ydfwv45.js";
19
+ } from "./request-site-x2qy7jg1.js";
20
20
  import {
21
21
  makeMachineLink2,
22
22
  makeMachine2
23
- } from "./media-uri-017ycvbx.js";
23
+ } from "./request-site-017ycvbx.js";
24
24
  import {
25
25
  makeMediaGet2
26
- } from "./media-uri-djr0jy89.js";
26
+ } from "./request-site-djr0jy89.js";
27
27
  import {
28
28
  runPtySocket2
29
- } from "./media-uri-q187pxxd.js";
29
+ } from "./request-site-q187pxxd.js";
30
30
 
31
31
  // src/handlers/persistent-pty.ts
32
32
  import { PersistentPty } from "@opencode/core/persistent-pty";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./media-uri-j80tzjj3.js";
3
+ } from "./request-site-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./media-uri-s8t5gq7c.js";
6
+ } from "./request-site-whvq72as.js";
7
7
 
8
8
  // src/handlers/model.ts
9
9
  import { Model } from "@opencode/core/model";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./media-uri-9rqn6x4v.js";
3
+ } from "./request-site-9rqn6x4v.js";
4
4
 
5
5
  // src/content-headers.ts
6
6
  var exports_content_headers = {};
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  LocationMiddleware2
3
- } from "./media-uri-j80tzjj3.js";
3
+ } from "./request-site-br4x4prt.js";
4
4
  import {
5
5
  FormLocationMiddleware2
6
- } from "./media-uri-n6ypjnhz.js";
6
+ } from "./request-site-ca564221.js";
7
7
  import {
8
8
  SessionLocationMiddleware2
9
- } from "./media-uri-qahj7606.js";
9
+ } from "./request-site-ehyp3zqd.js";
10
10
 
11
11
  // src/api.ts
12
12
  import { makeDefaultApi } from "@opencode/protocol/api";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./media-uri-j80tzjj3.js";
3
+ } from "./request-site-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./media-uri-s8t5gq7c.js";
6
+ } from "./request-site-whvq72as.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
  missingSession2
3
- } from "./media-uri-smaf4a18.js";
3
+ } from "./request-site-rqgv9x42.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
  response2
3
- } from "./media-uri-j80tzjj3.js";
3
+ } from "./request-site-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./media-uri-s8t5gq7c.js";
6
+ } from "./request-site-whvq72as.js";
7
7
 
8
8
  // src/handlers/provider.ts
9
9
  import { Provider } from "@opencode/core/provider";
@@ -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/request-site-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/request-site-q4bn6dy8.js";
6
6
  export {
7
7
  CorsConfig2 as CorsConfig,
8
8
  isAllowedCorsOrigin2 as isAllowedCorsOrigin,
@@ -7,7 +7,7 @@ import {
7
7
  make4,
8
8
  layer2,
9
9
  exports_event_feed
10
- } from "./chunks/media-uri-fvpjvjpp.js";
10
+ } from "./chunks/request-site-fvpjvjpp.js";
11
11
  export {
12
12
  EncodingError2 as EncodingError,
13
13
  exports_event_feed as EventFeed,
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