@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
package/dist/api.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  Api2
3
- } from "./chunks/media-uri-s8t5gq7c.js";
4
- import"./chunks/media-uri-qahj7606.js";
5
- import"./chunks/media-uri-n6ypjnhz.js";
6
- import"./chunks/media-uri-j80tzjj3.js";
7
- import"./chunks/media-uri-smaf4a18.js";
3
+ } from "./chunks/service-status-ay32z58n.js";
4
+ import"./chunks/service-status-aexh791j.js";
5
+ import"./chunks/service-status-jy2ammbg.js";
6
+ import"./chunks/service-status-stx1bw5w.js";
7
+ import"./chunks/service-status-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/media-uri-j4at0y5c.js";
10
+ } from "./chunks/service-status-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
  Api2
3
- } from "./media-uri-s8t5gq7c.js";
3
+ } from "./service-status-ay32z58n.js";
4
4
  import {
5
5
  requireConnectable2
6
- } from "./media-uri-4r2ye500.js";
6
+ } from "./service-status-9agv2b4c.js";
7
7
 
8
8
  // src/handlers/credential.ts
9
9
  import { Credential } from "@opencode/core/credential";
@@ -1,32 +1,37 @@
1
1
  import {
2
2
  isAllowedCorsOrigin2
3
- } from "./media-uri-q4bn6dy8.js";
3
+ } from "./service-status-q4bn6dy8.js";
4
4
  import {
5
5
  middleware2
6
- } from "./media-uri-myqk22k5.js";
6
+ } from "./service-status-hmwn16zp.js";
7
7
  import {
8
8
  withoutParentSpan2
9
- } from "./media-uri-yc7nft6q.js";
9
+ } from "./service-status-yc7nft6q.js";
10
10
  import {
11
11
  createRoutes2
12
- } from "./media-uri-n74dt79t.js";
12
+ } from "./service-status-6r7y0ddy.js";
13
13
  import {
14
14
  __export
15
- } from "./media-uri-9rqn6x4v.js";
15
+ } from "./service-status-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
  __export
3
- } from "./media-uri-9rqn6x4v.js";
3
+ } from "./service-status-9rqn6x4v.js";
4
4
 
5
5
  // src/service-status.ts
6
6
  var exports_service_status = {};
@@ -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/shell.ts
9
9
  import { Shell } from "@opencode/core/shell";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  download2
3
- } from "./media-uri-t32e1bbt.js";
3
+ } from "./service-status-t32e1bbt.js";
4
4
  import {
5
5
  parse2
6
- } from "./media-uri-8sb6qqpn.js";
6
+ } from "./service-status-8sb6qqpn.js";
7
7
 
8
8
  // src/handlers/blob.ts
9
9
  import { BlobStore } from "@opencode/core/blob-store";
@@ -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/pty.ts
19
19
  import { Pty } from "@opencode/core/pty";
@@ -1,105 +1,105 @@
1
1
  import {
2
2
  GenerateHandler2
3
- } from "./media-uri-8mfdzabk.js";
3
+ } from "./service-status-jrjpfy36.js";
4
4
  import {
5
5
  VoiceHandler2
6
- } from "./media-uri-v0z8pce5.js";
6
+ } from "./service-status-heqw7kpr.js";
7
7
  import {
8
8
  MessageHandler2
9
- } from "./media-uri-w13ad1dk.js";
9
+ } from "./service-status-kazddk2c.js";
10
10
  import {
11
11
  ModelHandler2
12
- } from "./media-uri-d0advawr.js";
12
+ } from "./service-status-f93zkajm.js";
13
13
  import {
14
14
  ProviderHandler2
15
- } from "./media-uri-6t6fd9bq.js";
15
+ } from "./service-status-hgd5b6k8.js";
16
16
  import {
17
17
  SessionHandler2
18
- } from "./media-uri-dqfyxmp4.js";
18
+ } from "./service-status-yvjggjxh.js";
19
19
  import {
20
20
  PermissionHandler2
21
- } from "./media-uri-8n1ypg70.js";
21
+ } from "./service-status-mjhh6jvz.js";
22
22
  import {
23
23
  FileSystemHandler2
24
- } from "./media-uri-baxwenvw.js";
24
+ } from "./service-status-pgtfa6tn.js";
25
25
  import {
26
26
  FormHandler2
27
- } from "./media-uri-zrptb2x8.js";
27
+ } from "./service-status-amxj52x5.js";
28
28
  import {
29
29
  CommandHandler2
30
- } from "./media-uri-b87bs0cf.js";
30
+ } from "./service-status-pa4xtt5h.js";
31
31
  import {
32
32
  SkillHandler2
33
- } from "./media-uri-4apj6a8e.js";
33
+ } from "./service-status-dnyhqccw.js";
34
34
  import {
35
35
  RpcHandler2
36
- } from "./media-uri-p4zkxzv7.js";
36
+ } from "./service-status-zx60pg73.js";
37
37
  import {
38
- layer2
39
- } from "./media-uri-fvpjvjpp.js";
38
+ layer3
39
+ } from "./service-status-arzv3fj6.js";
40
40
  import {
41
41
  EventHandler2
42
- } from "./media-uri-ad35pjas.js";
42
+ } from "./service-status-yw2226k4.js";
43
43
  import {
44
44
  AgentHandler2
45
- } from "./media-uri-k26h7zjg.js";
45
+ } from "./service-status-rn83nvae.js";
46
46
  import {
47
47
  PluginHandler2
48
- } from "./media-uri-20wvj9q6.js";
48
+ } from "./service-status-78jk0pbb.js";
49
49
  import {
50
50
  ServerHandler2
51
- } from "./media-uri-vh37ha9e.js";
51
+ } from "./service-status-q9s5ja9h.js";
52
52
  import {
53
53
  DebugHandler2
54
- } from "./media-uri-b7yt2ykh.js";
54
+ } from "./service-status-c6kzfg4f.js";
55
55
  import {
56
56
  PtyHandler2
57
- } from "./media-uri-hvn8tnxr.js";
57
+ } from "./service-status-5pef2nys.js";
58
58
  import {
59
59
  PersistentPtyHandler2
60
- } from "./media-uri-fyve7tsy.js";
60
+ } from "./service-status-saajga74.js";
61
61
  import {
62
62
  ShellHandler2
63
- } from "./media-uri-b1x3j2e8.js";
63
+ } from "./service-status-3rtm8r3z.js";
64
64
  import {
65
65
  ReferenceHandler2
66
- } from "./media-uri-t8azv5ge.js";
66
+ } from "./service-status-k518ftvz.js";
67
67
  import {
68
68
  LocationHandler2
69
- } from "./media-uri-wh07bcjv.js";
69
+ } from "./service-status-gwtm9cga.js";
70
70
  import {
71
71
  IntegrationHandler2
72
- } from "./media-uri-4r2ye500.js";
72
+ } from "./service-status-9agv2b4c.js";
73
73
  import {
74
74
  WebSearchHandler2
75
- } from "./media-uri-7x6cg3xs.js";
75
+ } from "./service-status-7zz6jxhb.js";
76
76
  import {
77
77
  UsageHandler2
78
- } from "./media-uri-4gbck4qg.js";
78
+ } from "./service-status-vkj8vbyf.js";
79
79
  import {
80
80
  McpHandler2
81
- } from "./media-uri-q8jgva1w.js";
81
+ } from "./service-status-wazndna9.js";
82
82
  import {
83
83
  CredentialHandler2
84
- } from "./media-uri-86dz2n4m.js";
84
+ } from "./service-status-0x6anvwr.js";
85
85
  import {
86
86
  ProjectHandler2
87
- } from "./media-uri-edwk6ehd.js";
87
+ } from "./service-status-k58xpxwn.js";
88
88
  import {
89
89
  WorktreeHandler2
90
- } from "./media-uri-p9wp66hf.js";
90
+ } from "./service-status-vnpm7f9y.js";
91
91
  import {
92
92
  VcsHandler2
93
- } from "./media-uri-g80pvn6e.js";
93
+ } from "./service-status-tmb89r25.js";
94
94
  import {
95
95
  MigrationHandler2
96
- } from "./media-uri-pv4dnzzq.js";
96
+ } from "./service-status-b3sk57wg.js";
97
97
  import {
98
98
  ConfigHandler2
99
- } from "./media-uri-g97h7k0s.js";
99
+ } from "./service-status-k2bx5n4e.js";
100
100
 
101
101
  // src/handlers.ts
102
102
  import { Layer } from "effect";
103
- var handlers2 = Layer.mergeAll(ServerHandler2, DebugHandler2, MigrationHandler2, LocationHandler2, AgentHandler2, PluginHandler2, SessionHandler2, MessageHandler2, ModelHandler2, GenerateHandler2, VoiceHandler2, ProviderHandler2, IntegrationHandler2, WebSearchHandler2, UsageHandler2, McpHandler2, CredentialHandler2, ProjectHandler2, FormHandler2, PermissionHandler2, FileSystemHandler2, CommandHandler2, SkillHandler2, RpcHandler2, EventHandler2.pipe(Layer.provide(layer2)), PtyHandler2, PersistentPtyHandler2, ShellHandler2, ReferenceHandler2, WorktreeHandler2, VcsHandler2, ConfigHandler2);
103
+ var handlers2 = Layer.mergeAll(ServerHandler2, DebugHandler2, MigrationHandler2, LocationHandler2, AgentHandler2, PluginHandler2, SessionHandler2, MessageHandler2, ModelHandler2, GenerateHandler2, VoiceHandler2, ProviderHandler2, IntegrationHandler2, WebSearchHandler2, UsageHandler2, McpHandler2, CredentialHandler2, ProjectHandler2, FormHandler2, PermissionHandler2, FileSystemHandler2, CommandHandler2, SkillHandler2, RpcHandler2, EventHandler2.pipe(Layer.provide(layer3)), PtyHandler2, PersistentPtyHandler2, ShellHandler2, ReferenceHandler2, WorktreeHandler2, VcsHandler2, ConfigHandler2);
104
104
 
105
105
  export { handlers2 };
@@ -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/automation.ts
6
6
  import { Automation } from "@opencode/core/automation";
@@ -1,39 +1,39 @@
1
1
  import {
2
- layer3
3
- } from "./media-uri-j80tzjj3.js";
2
+ layer2
3
+ } from "./service-status-stx1bw5w.js";
4
4
  import {
5
5
  formLocationLayer2
6
- } from "./media-uri-n6ypjnhz.js";
6
+ } from "./service-status-jy2ammbg.js";
7
7
  import {
8
8
  sessionLocationLayer2
9
- } from "./media-uri-qahj7606.js";
9
+ } from "./service-status-aexh791j.js";
10
10
  import {
11
11
  Api2
12
- } from "./media-uri-s8t5gq7c.js";
12
+ } from "./service-status-ay32z58n.js";
13
13
  import {
14
14
  Config2
15
- } from "./media-uri-j4at0y5c.js";
15
+ } from "./service-status-j4at0y5c.js";
16
16
  import {
17
17
  CorsConfig2
18
- } from "./media-uri-q4bn6dy8.js";
18
+ } from "./service-status-q4bn6dy8.js";
19
19
  import {
20
20
  layer4
21
- } from "./media-uri-7dtbad8d.js";
21
+ } from "./service-status-7dtbad8d.js";
22
22
  import {
23
23
  node2
24
- } from "./media-uri-w9jcwh65.js";
24
+ } from "./service-status-w9jcwh65.js";
25
25
  import {
26
26
  handlers2
27
- } from "./media-uri-zwmx42kw.js";
27
+ } from "./service-status-62hb8n75.js";
28
28
  import {
29
29
  authorizationLayer2
30
- } from "./media-uri-rktygpea.js";
30
+ } from "./service-status-rktygpea.js";
31
31
  import {
32
32
  schemaErrorLayer2
33
- } from "./media-uri-bd8755ek.js";
33
+ } from "./service-status-bd8755ek.js";
34
34
  import {
35
35
  defectResponseLayer2
36
- } from "./media-uri-n26yr6pw.js";
36
+ } from "./service-status-n26yr6pw.js";
37
37
 
38
38
  // src/routes.ts
39
39
  import { Database } from "@opencode/core/database/database";
@@ -193,7 +193,7 @@ function makeRoutes(password, options, serviceURLs, overrides, instances) {
193
193
  return serviceLayer.pipe(Layer.flatMap((context) => {
194
194
  const services = Layer.succeedContext(context);
195
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(() => {
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(layer2), 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 "./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/plugin.ts
9
9
  import { Plugin } from "@opencode/core/plugin";
@@ -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/server-info.ts
6
6
  var exports_server_info = {};
@@ -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/websearch.ts
9
9
  import { WebSearch } from "@opencode/core/websearch";
@@ -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/range.ts
6
6
  var exports_range = {};
@@ -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/integration.ts
9
9
  import { Integration } from "@opencode/core/integration";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  locationErrors2,
3
3
  sessionInfo2
4
- } from "./media-uri-j80tzjj3.js";
4
+ } from "./service-status-stx1bw5w.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 "./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/form.ts
9
9
  import { Form } from "@opencode/core/form";
@@ -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/event-feed.ts
6
6
  var exports_event_feed = {};
@@ -11,7 +11,7 @@ __export(exports_event_feed, {
11
11
  SubscriberCapacity: () => SubscriberCapacity2,
12
12
  SubscriberOverflowError: () => SubscriberOverflowError2,
13
13
  frame: () => frame2,
14
- layer: () => layer2,
14
+ layer: () => layer3,
15
15
  make: () => make4
16
16
  });
17
17
  import { Bus } from "@opencode/core/bus";
@@ -76,9 +76,9 @@ var make4 = Effect.fn("EventFeed.make")(function* (observe, options) {
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 layer2 = Layer.effect(Service2, Effect.gen(function* () {
79
+ var layer3 = 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, Service2, frame2, make4, layer2, exports_event_feed };
84
+ export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2, Service2, frame2, make4, layer3, exports_event_feed };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  LocationMiddleware2
3
- } from "./media-uri-j80tzjj3.js";
3
+ } from "./service-status-stx1bw5w.js";
4
4
  import {
5
5
  FormLocationMiddleware2
6
- } from "./media-uri-n6ypjnhz.js";
6
+ } from "./service-status-jy2ammbg.js";
7
7
  import {
8
8
  SessionLocationMiddleware2
9
- } from "./media-uri-qahj7606.js";
9
+ } from "./service-status-aexh791j.js";
10
10
 
11
11
  // src/api.ts
12
12
  import { makeDefaultApi } from "@opencode/protocol/api";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./media-uri-s8t5gq7c.js";
3
+ } from "./service-status-ay32z58n.js";
4
4
 
5
5
  // src/handlers/migration.ts
6
6
  import { V1Migration } from "@opencode/core/database/v1-migration";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  requestRef2
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/debug.ts
9
9
  import { LocationServiceMap } from "@opencode/core/location-service-map";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CONTENT_SECURITY_POLICY2,
3
3
  disposition2
4
- } from "./media-uri-t32e1bbt.js";
4
+ } from "./service-status-t32e1bbt.js";
5
5
 
6
6
  // src/handlers/media.ts
7
7
  import { Database } from "@opencode/core/database/database";
@@ -0,0 +1,27 @@
1
+ import {
2
+ response2
3
+ } from "./service-status-stx1bw5w.js";
4
+ import {
5
+ Api2
6
+ } from "./service-status-ay32z58n.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 "./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/model.ts
9
9
  import { Model } from "@opencode/core/model";
@@ -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/location.ts
6
6
  import { Location } from "@opencode/core/location";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  locationErrors2
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/voice.ts
9
9
  import { Location } from "@opencode/core/location";
@@ -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/provider.ts
9
9
  import { Provider } from "@opencode/core/provider";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  isAllowedRequestOrigin2
3
- } from "./media-uri-q4bn6dy8.js";
3
+ } from "./service-status-q4bn6dy8.js";
4
4
  import {
5
5
  __export
6
- } from "./media-uri-9rqn6x4v.js";
6
+ } from "./service-status-9rqn6x4v.js";
7
7
 
8
8
  // src/request-site.ts
9
9
  var exports_request_site = {};
@@ -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/auth.ts
6
6
  var exports_auth = {};
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  locationErrors2
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/generate.ts
9
9
  import { Generate } from "@opencode/core/generate";