@opencode/server 0.0.0-dev-1366 → 0.0.0-dev-1367

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 (142) hide show
  1. package/dist/api.js +5 -5
  2. package/dist/auth.js +1 -1
  3. package/dist/chunks/{content-headers-qagtm26v.js → media-uri-07adkgh3.js} +4 -4
  4. package/dist/chunks/{content-headers-21qqm769.js → media-uri-0nzx8p8z.js} +12 -12
  5. package/dist/chunks/{content-headers-e6e4kz0w.js → media-uri-0q7s66m2.js} +4 -4
  6. package/dist/chunks/{content-headers-f1tstpac.js → media-uri-0wwbgx8t.js} +23 -27
  7. package/dist/chunks/{content-headers-r6qsbz4y.js → media-uri-0xhepbgy.js} +2 -2
  8. package/dist/chunks/{content-headers-y8sa9sbe.js → media-uri-1qgvww4g.js} +2 -2
  9. package/dist/chunks/{content-headers-8y9zssdg.js → media-uri-20m6qdhp.js} +2 -2
  10. package/dist/chunks/{content-headers-eacgzt6w.js → media-uri-23bsg0bb.js} +1 -1
  11. package/dist/chunks/{content-headers-29nx48hm.js → media-uri-29nx48hm.js} +1 -1
  12. package/dist/chunks/{content-headers-nh63c3gg.js → media-uri-3sdebxp3.js} +3 -3
  13. package/dist/chunks/{content-headers-phgds112.js → media-uri-44ywgpsx.js} +2 -2
  14. package/dist/chunks/{content-headers-ka2mtp6f.js → media-uri-44zzbkrb.js} +2 -2
  15. package/dist/chunks/{content-headers-wjh98yw2.js → media-uri-4a2eztcc.js} +1 -1
  16. package/dist/chunks/{content-headers-maarxay5.js → media-uri-4abt2dvn.js} +4 -4
  17. package/dist/chunks/{content-headers-ar950k47.js → media-uri-4dcft65w.js} +1 -1
  18. package/dist/chunks/{content-headers-cj97w75w.js → media-uri-61xgwjgp.js} +2 -2
  19. package/dist/chunks/{content-headers-6pm6ek88.js → media-uri-6pm6ek88.js} +1 -1
  20. package/dist/chunks/{content-headers-g9qy0kb1.js → media-uri-7qa33b41.js} +2 -2
  21. package/dist/chunks/{content-headers-8sb6qqpn.js → media-uri-8sb6qqpn.js} +1 -1
  22. package/dist/chunks/{content-headers-ddhjwr2w.js → media-uri-9bpmwzvq.js} +2 -2
  23. package/dist/chunks/{content-headers-ehyp3zqd.js → media-uri-aexh791j.js} +1 -1
  24. package/dist/chunks/{content-headers-8xffg4dw.js → media-uri-d77v3xnm.js} +4 -4
  25. package/dist/chunks/{content-headers-djr0jy89.js → media-uri-djr0jy89.js} +1 -1
  26. package/dist/chunks/{content-headers-7r996r31.js → media-uri-dxh72p2c.js} +2 -2
  27. package/dist/chunks/{content-headers-1nsytpdt.js → media-uri-ej8k6nk6.js} +4 -4
  28. package/dist/chunks/{content-headers-df03ef4a.js → media-uri-ezydv7x1.js} +2 -2
  29. package/dist/chunks/{content-headers-htk4x1jk.js → media-uri-g1wjh7qe.js} +2 -2
  30. package/dist/chunks/{content-headers-50kbksvb.js → media-uri-g23ffrnz.js} +2 -2
  31. package/dist/chunks/{content-headers-hs3dbf8w.js → media-uri-gb9bc2v4.js} +10 -10
  32. package/dist/chunks/{content-headers-esvnag9e.js → media-uri-gk96xf2h.js} +2 -2
  33. package/dist/chunks/{content-headers-5ky8bme5.js → media-uri-hj8z77wc.js} +3 -3
  34. package/dist/chunks/{content-headers-myqk22k5.js → media-uri-hmwn16zp.js} +2 -2
  35. package/dist/chunks/{content-headers-j4at0y5c.js → media-uri-j4at0y5c.js} +1 -1
  36. package/dist/chunks/{content-headers-rg932pab.js → media-uri-j4hk2st6.js} +2 -2
  37. package/dist/chunks/{content-headers-ca564221.js → media-uri-jy2ammbg.js} +1 -1
  38. package/dist/chunks/{content-headers-6n31atta.js → media-uri-katdrqa2.js} +37 -37
  39. package/dist/chunks/{content-headers-r682v2h3.js → media-uri-kpw06y11.js} +2 -2
  40. package/dist/chunks/{content-headers-ykr4m3zx.js → media-uri-kxxxzk43.js} +1 -1
  41. package/dist/chunks/{content-headers-3te71694.js → media-uri-megkv1kf.js} +7 -7
  42. package/dist/chunks/{content-headers-c6ktqe09.js → media-uri-mf0jv62d.js} +2 -2
  43. package/dist/chunks/{content-headers-fmkwyf76.js → media-uri-mj1ewmp1.js} +9 -9
  44. package/dist/chunks/{content-headers-z0v7xmc8.js → media-uri-nfv0r61b.js} +2 -2
  45. package/dist/chunks/media-uri-njmm6d43.js +43 -0
  46. package/dist/chunks/{content-headers-6anyjjh1.js → media-uri-npqc081y.js} +1 -1
  47. package/dist/chunks/{content-headers-jhs8rzvk.js → media-uri-p8x80wn6.js} +3 -3
  48. package/dist/chunks/{content-headers-f412ctvv.js → media-uri-r3c5pb1c.js} +2 -2
  49. package/dist/chunks/{content-headers-3w2mqh28.js → media-uri-sar77n3p.js} +2 -2
  50. package/dist/chunks/{content-headers-z80wqx10.js → media-uri-sh3ejx5x.js} +1 -1
  51. package/dist/chunks/{content-headers-javgytnb.js → media-uri-sqfq92mf.js} +2 -2
  52. package/dist/chunks/{content-headers-br4x4prt.js → media-uri-stx1bw5w.js} +3 -3
  53. package/dist/chunks/{content-headers-t32e1bbt.js → media-uri-t32e1bbt.js} +1 -1
  54. package/dist/chunks/{content-headers-mq10h3bj.js → media-uri-t6q8af35.js} +4 -4
  55. package/dist/chunks/{content-headers-nfrn9zxf.js → media-uri-t6ryhghb.js} +2 -2
  56. package/dist/chunks/{content-headers-8a8vhjqy.js → media-uri-tg713d3t.js} +8 -8
  57. package/dist/chunks/{content-headers-mzs0n5xz.js → media-uri-vb61dkrm.js} +8 -8
  58. package/dist/chunks/{content-headers-x2qy7jg1.js → media-uri-x2qy7jg1.js} +1 -1
  59. package/dist/chunks/{content-headers-v60tcbt5.js → media-uri-xw05m515.js} +3 -3
  60. package/dist/content-headers.js +1 -1
  61. package/dist/cors.js +1 -1
  62. package/dist/event-feed.js +7 -7
  63. package/dist/fetch.d.ts +22 -11
  64. package/dist/fetch.js +70 -66
  65. package/dist/handlers/agent.js +6 -6
  66. package/dist/handlers/artifact.js +3 -3
  67. package/dist/handlers/automation.js +2 -2
  68. package/dist/handlers/blob.js +3 -3
  69. package/dist/handlers/command.js +6 -6
  70. package/dist/handlers/config.js +6 -6
  71. package/dist/handlers/credential.js +7 -7
  72. package/dist/handlers/debug.js +6 -6
  73. package/dist/handlers/event.js +7 -7
  74. package/dist/handlers/experimental/browser-tunnel.js +4 -4
  75. package/dist/handlers/flag.js +6 -6
  76. package/dist/handlers/form.js +6 -6
  77. package/dist/handlers/fs.js +8 -8
  78. package/dist/handlers/generate.js +6 -6
  79. package/dist/handlers/integration.js +6 -6
  80. package/dist/handlers/job.js +2 -2
  81. package/dist/handlers/location.js +6 -6
  82. package/dist/handlers/machine.js +1 -1
  83. package/dist/handlers/mcp.js +8 -8
  84. package/dist/handlers/media.js +2 -2
  85. package/dist/handlers/message.js +7 -7
  86. package/dist/handlers/migration.js +6 -6
  87. package/dist/handlers/model.js +6 -6
  88. package/dist/handlers/permission.js +6 -6
  89. package/dist/handlers/persistent-pty.js +20 -20
  90. package/dist/handlers/plugin.js +6 -6
  91. package/dist/handlers/project.js +6 -6
  92. package/dist/handlers/provider.js +6 -6
  93. package/dist/handlers/pty-socket.js +1 -1
  94. package/dist/handlers/pty.js +8 -8
  95. package/dist/handlers/push.js +1 -1
  96. package/dist/handlers/reference.js +6 -6
  97. package/dist/handlers/rpc.js +6 -6
  98. package/dist/handlers/server.js +9 -9
  99. package/dist/handlers/session-error.js +1 -1
  100. package/dist/handlers/session.js +7 -7
  101. package/dist/handlers/shell.js +6 -6
  102. package/dist/handlers/skill.js +6 -6
  103. package/dist/handlers/space.js +2 -2
  104. package/dist/handlers/usage.js +6 -6
  105. package/dist/handlers/vcs.js +6 -6
  106. package/dist/handlers/voice.js +6 -6
  107. package/dist/handlers/websearch.js +6 -6
  108. package/dist/handlers/worktree.js +6 -6
  109. package/dist/handlers.js +58 -58
  110. package/dist/location.js +4 -4
  111. package/dist/media-uri.js +1 -1
  112. package/dist/middleware/authorization.js +2 -2
  113. package/dist/middleware/defect-response.js +1 -1
  114. package/dist/middleware/form-location.js +3 -3
  115. package/dist/middleware/schema-error.js +1 -1
  116. package/dist/middleware/session-location.js +3 -3
  117. package/dist/options.d.ts +69 -2
  118. package/dist/options.js +14 -6
  119. package/dist/pairing.js +5 -5
  120. package/dist/process.d.ts +5 -5
  121. package/dist/process.js +68 -68
  122. package/dist/range.js +1 -1
  123. package/dist/request-site.js +2 -2
  124. package/dist/request-tracing.js +1 -1
  125. package/dist/routes.d.ts +8 -2
  126. package/dist/routes.js +62 -62
  127. package/dist/server-info.js +5 -5
  128. package/dist/service-status.js +3 -3
  129. package/dist/space-store.js +5 -5
  130. package/dist/workerd.js +66 -66
  131. package/package.json +8 -8
  132. package/dist/chunks/content-headers-1kqc9805.js +0 -37
  133. /package/dist/chunks/{content-headers-017ycvbx.js → media-uri-017ycvbx.js} +0 -0
  134. /package/dist/chunks/{content-headers-9rqn6x4v.js → media-uri-9rqn6x4v.js} +0 -0
  135. /package/dist/chunks/{content-headers-bd8755ek.js → media-uri-bd8755ek.js} +0 -0
  136. /package/dist/chunks/{content-headers-n26yr6pw.js → media-uri-n26yr6pw.js} +0 -0
  137. /package/dist/chunks/{content-headers-q187pxxd.js → media-uri-q187pxxd.js} +0 -0
  138. /package/dist/chunks/{content-headers-q4bn6dy8.js → media-uri-q4bn6dy8.js} +0 -0
  139. /package/dist/chunks/{content-headers-qpnw2qd1.js → media-uri-qpnw2qd1.js} +0 -0
  140. /package/dist/chunks/{content-headers-rqgv9x42.js → media-uri-rqgv9x42.js} +0 -0
  141. /package/dist/chunks/{content-headers-xthc02cw.js → media-uri-xthc02cw.js} +0 -0
  142. /package/dist/chunks/{content-headers-yc7nft6q.js → media-uri-yc7nft6q.js} +0 -0
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./content-headers-rqgv9x42.js";
3
+ } from "./media-uri-rqgv9x42.js";
4
4
  import {
5
5
  locationErrors2,
6
6
  response2,
7
7
  sessionInfo2
8
- } from "./content-headers-br4x4prt.js";
8
+ } from "./media-uri-stx1bw5w.js";
9
9
  import {
10
10
  Api2
11
- } from "./content-headers-jhs8rzvk.js";
11
+ } from "./media-uri-p8x80wn6.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
  isAllowedRequestOrigin2
3
- } from "./content-headers-q4bn6dy8.js";
3
+ } from "./media-uri-q4bn6dy8.js";
4
4
  import {
5
5
  __export
6
- } from "./content-headers-9rqn6x4v.js";
6
+ } from "./media-uri-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 "./content-headers-9rqn6x4v.js";
3
+ } from "./media-uri-9rqn6x4v.js";
4
4
 
5
5
  // src/auth.ts
6
6
  var exports_auth = {};
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./content-headers-br4x4prt.js";
3
+ } from "./media-uri-stx1bw5w.js";
4
4
  import {
5
5
  Api2
6
- } from "./content-headers-jhs8rzvk.js";
6
+ } from "./media-uri-p8x80wn6.js";
7
7
 
8
8
  // src/handlers/reference.ts
9
9
  import { Reference } from "@opencode/core/reference";
@@ -2,7 +2,7 @@ import {
2
2
  locationErrors2,
3
3
  sessionInfo2,
4
4
  requestRef2
5
- } from "./content-headers-br4x4prt.js";
5
+ } from "./media-uri-stx1bw5w.js";
6
6
 
7
7
  // src/middleware/form-location.ts
8
8
  import { Instance } from "@opencode/core/instance/service";
@@ -1,111 +1,111 @@
1
1
  import {
2
2
  GenerateHandler2
3
- } from "./content-headers-r682v2h3.js";
3
+ } from "./media-uri-kpw06y11.js";
4
4
  import {
5
5
  VoiceHandler2
6
- } from "./content-headers-phgds112.js";
6
+ } from "./media-uri-44ywgpsx.js";
7
7
  import {
8
8
  MessageHandler2
9
- } from "./content-headers-nh63c3gg.js";
9
+ } from "./media-uri-3sdebxp3.js";
10
10
  import {
11
11
  ModelHandler2
12
- } from "./content-headers-y8sa9sbe.js";
12
+ } from "./media-uri-1qgvww4g.js";
13
13
  import {
14
14
  ProviderHandler2
15
- } from "./content-headers-cj97w75w.js";
15
+ } from "./media-uri-61xgwjgp.js";
16
16
  import {
17
17
  SessionHandler2
18
- } from "./content-headers-qagtm26v.js";
18
+ } from "./media-uri-07adkgh3.js";
19
19
  import {
20
20
  PermissionHandler2
21
- } from "./content-headers-5ky8bme5.js";
21
+ } from "./media-uri-hj8z77wc.js";
22
22
  import {
23
23
  FileSystemHandler2
24
- } from "./content-headers-maarxay5.js";
24
+ } from "./media-uri-4abt2dvn.js";
25
25
  import {
26
26
  FormHandler2
27
- } from "./content-headers-esvnag9e.js";
27
+ } from "./media-uri-gk96xf2h.js";
28
28
  import {
29
29
  CommandHandler2
30
- } from "./content-headers-8y9zssdg.js";
30
+ } from "./media-uri-20m6qdhp.js";
31
31
  import {
32
32
  SkillHandler2
33
- } from "./content-headers-g9qy0kb1.js";
33
+ } from "./media-uri-7qa33b41.js";
34
34
  import {
35
35
  RpcHandler2
36
- } from "./content-headers-ar950k47.js";
36
+ } from "./media-uri-4dcft65w.js";
37
37
  import {
38
- layer2
39
- } from "./content-headers-hs3dbf8w.js";
38
+ layer3
39
+ } from "./media-uri-gb9bc2v4.js";
40
40
  import {
41
41
  EventHandler2
42
- } from "./content-headers-8xffg4dw.js";
42
+ } from "./media-uri-d77v3xnm.js";
43
43
  import {
44
44
  AgentHandler2
45
- } from "./content-headers-f412ctvv.js";
45
+ } from "./media-uri-r3c5pb1c.js";
46
46
  import {
47
47
  PluginHandler2
48
- } from "./content-headers-z0v7xmc8.js";
48
+ } from "./media-uri-nfv0r61b.js";
49
49
  import {
50
50
  ServerHandler2
51
- } from "./content-headers-8a8vhjqy.js";
51
+ } from "./media-uri-tg713d3t.js";
52
52
  import {
53
53
  DebugHandler2
54
- } from "./content-headers-nfrn9zxf.js";
54
+ } from "./media-uri-t6ryhghb.js";
55
55
  import {
56
56
  PtyHandler2
57
- } from "./content-headers-mq10h3bj.js";
57
+ } from "./media-uri-t6q8af35.js";
58
58
  import {
59
59
  extension2
60
- } from "./content-headers-fmkwyf76.js";
60
+ } from "./media-uri-mj1ewmp1.js";
61
61
  import {
62
62
  PersistentPtyHandler2
63
- } from "./content-headers-21qqm769.js";
63
+ } from "./media-uri-0nzx8p8z.js";
64
64
  import {
65
65
  ShellHandler2
66
- } from "./content-headers-df03ef4a.js";
66
+ } from "./media-uri-ezydv7x1.js";
67
67
  import {
68
68
  ReferenceHandler2
69
- } from "./content-headers-rg932pab.js";
69
+ } from "./media-uri-j4hk2st6.js";
70
70
  import {
71
71
  LocationHandler2
72
- } from "./content-headers-z80wqx10.js";
72
+ } from "./media-uri-sh3ejx5x.js";
73
73
  import {
74
74
  IntegrationHandler2
75
- } from "./content-headers-7r996r31.js";
75
+ } from "./media-uri-dxh72p2c.js";
76
76
  import {
77
77
  WebSearchHandler2
78
- } from "./content-headers-htk4x1jk.js";
78
+ } from "./media-uri-g1wjh7qe.js";
79
79
  import {
80
80
  UsageHandler2
81
- } from "./content-headers-ddhjwr2w.js";
81
+ } from "./media-uri-9bpmwzvq.js";
82
82
  import {
83
83
  FlagHandler2
84
- } from "./content-headers-r6qsbz4y.js";
84
+ } from "./media-uri-0xhepbgy.js";
85
85
  import {
86
86
  McpHandler2
87
- } from "./content-headers-1nsytpdt.js";
87
+ } from "./media-uri-ej8k6nk6.js";
88
88
  import {
89
89
  CredentialHandler2
90
- } from "./content-headers-3w2mqh28.js";
90
+ } from "./media-uri-sar77n3p.js";
91
91
  import {
92
92
  ProjectHandler2
93
- } from "./content-headers-6anyjjh1.js";
93
+ } from "./media-uri-npqc081y.js";
94
94
  import {
95
95
  WorktreeHandler2
96
- } from "./content-headers-ykr4m3zx.js";
96
+ } from "./media-uri-kxxxzk43.js";
97
97
  import {
98
98
  VcsHandler2
99
- } from "./content-headers-c6ktqe09.js";
99
+ } from "./media-uri-mf0jv62d.js";
100
100
  import {
101
101
  MigrationHandler2
102
- } from "./content-headers-eacgzt6w.js";
102
+ } from "./media-uri-23bsg0bb.js";
103
103
  import {
104
104
  ConfigHandler2
105
- } from "./content-headers-wjh98yw2.js";
105
+ } from "./media-uri-4a2eztcc.js";
106
106
 
107
107
  // src/handlers.ts
108
108
  import { Layer } from "effect";
109
- var handlers2 = Layer.mergeAll(ServerHandler2, DebugHandler2, MigrationHandler2, LocationHandler2, AgentHandler2, PluginHandler2, SessionHandler2, MessageHandler2, ModelHandler2, GenerateHandler2, VoiceHandler2, ProviderHandler2, IntegrationHandler2, WebSearchHandler2, UsageHandler2, FlagHandler2, McpHandler2, CredentialHandler2, ProjectHandler2, FormHandler2, PermissionHandler2, FileSystemHandler2, CommandHandler2, SkillHandler2, RpcHandler2, EventHandler2.pipe(Layer.provide(layer2(extension2))), PtyHandler2, PersistentPtyHandler2, ShellHandler2, ReferenceHandler2, WorktreeHandler2, VcsHandler2, ConfigHandler2);
109
+ var handlers2 = Layer.mergeAll(ServerHandler2, DebugHandler2, MigrationHandler2, LocationHandler2, AgentHandler2, PluginHandler2, SessionHandler2, MessageHandler2, ModelHandler2, GenerateHandler2, VoiceHandler2, ProviderHandler2, IntegrationHandler2, WebSearchHandler2, UsageHandler2, FlagHandler2, McpHandler2, CredentialHandler2, ProjectHandler2, FormHandler2, PermissionHandler2, FileSystemHandler2, CommandHandler2, SkillHandler2, RpcHandler2, EventHandler2.pipe(Layer.provide(layer3(extension2))), PtyHandler2, PersistentPtyHandler2, ShellHandler2, ReferenceHandler2, WorktreeHandler2, VcsHandler2, ConfigHandler2);
110
110
 
111
111
  export { handlers2 };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  locationErrors2
3
- } from "./content-headers-br4x4prt.js";
3
+ } from "./media-uri-stx1bw5w.js";
4
4
  import {
5
5
  Api2
6
- } from "./content-headers-jhs8rzvk.js";
6
+ } from "./media-uri-p8x80wn6.js";
7
7
 
8
8
  // src/handlers/generate.ts
9
9
  import { Generate } from "@opencode/core/generate";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./content-headers-jhs8rzvk.js";
3
+ } from "./media-uri-p8x80wn6.js";
4
4
 
5
5
  // src/handlers/worktree.ts
6
6
  import { Git } from "@opencode/core/git";
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  __export
3
- } from "./content-headers-9rqn6x4v.js";
3
+ } from "./media-uri-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: () => Service3,
9
+ Service: () => Service5,
10
10
  connectionURLs: () => connectionURLs2,
11
- layer: () => layer3
11
+ layer: () => layer4
12
12
  });
13
13
  import { Context, Layer } from "effect";
14
14
  import { networkInterfaces } from "node:os";
15
15
 
16
- class Service3 extends Context.Service()("@opencode/server/ServerInfo") {
16
+ class Service5 extends Context.Service()("@opencode/server/ServerInfo") {
17
17
  }
18
- function layer3(urls, tmp, app = {}) {
19
- return Layer.succeed(Service3, Service3.of({ urls, app, paths: { tmp } }));
18
+ function layer4(urls, tmp, app = {}) {
19
+ return Layer.succeed(Service5, Service5.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 { Service3, layer3, connectionURLs2, exports_server_info };
41
+ export { Service5, layer4, connectionURLs2, exports_server_info };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./content-headers-br4x4prt.js";
3
+ } from "./media-uri-stx1bw5w.js";
4
4
  import {
5
5
  Api2
6
- } from "./content-headers-jhs8rzvk.js";
6
+ } from "./media-uri-p8x80wn6.js";
7
7
 
8
8
  // src/handlers/vcs.ts
9
9
  import { Vcs } from "@opencode/core/vcs";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  __export
3
- } from "./content-headers-9rqn6x4v.js";
3
+ } from "./media-uri-9rqn6x4v.js";
4
4
 
5
5
  // src/space-store.ts
6
6
  var exports_space_store = {};
7
7
  __export(exports_space_store, {
8
8
  BatchSize: () => BatchSize2,
9
9
  PurgeInterval: () => PurgeInterval2,
10
- Service: () => Service5,
10
+ Service: () => Service2,
11
11
  SpaceStore: () => exports_space_store,
12
12
  extension: () => extension2,
13
- node: () => node3
13
+ node: () => node2
14
14
  });
15
15
  import { SpaceRows } from "@opencode/core/space";
16
16
  import { Database } from "@opencode/core/database/database";
@@ -22,9 +22,9 @@ import { Clock, Context, Effect, Layer } from "effect";
22
22
  var BatchSize2 = 500;
23
23
  var PurgeInterval2 = 64;
24
24
 
25
- class Service5 extends Context.Service()("@opencode/server/SpaceStore") {
25
+ class Service2 extends Context.Service()("@opencode/server/SpaceStore") {
26
26
  }
27
- var layer = Layer.effect(Service5, Effect.gen(function* () {
27
+ var layer = Layer.effect(Service2, Effect.gen(function* () {
28
28
  const db = (yield* Database.Service).db;
29
29
  let epoch = yield* SpaceRows.epoch(db).pipe(Effect.catchCause((cause) => Effect.logWarning("Could not read the space epoch", { cause }).pipe(Effect.as(crypto.randomUUID()))));
30
30
  const listeners = new Array;
@@ -102,7 +102,7 @@ var layer = Layer.effect(Service5, Effect.gen(function* () {
102
102
  events: read.rows.map((row) => change(space, row, created))
103
103
  };
104
104
  });
105
- return Service5.of({
105
+ return Service2.of({
106
106
  write: Effect.fn("SpaceStore.write")(function* (changes) {
107
107
  return yield* [...new Set(changes.map((change) => change.space))].toSorted().reduceRight((effect, space) => locks.withLock(space)(effect), Effect.uninterruptible(Effect.gen(function* () {
108
108
  const result = yield* SpaceRows.write(db, changes);
@@ -183,9 +183,9 @@ var layer = Layer.effect(Service5, Effect.gen(function* () {
183
183
  })
184
184
  });
185
185
  }));
186
- var node3 = makeGlobalNode({ service: Service5, layer, deps: [Database.node] });
186
+ var node2 = makeGlobalNode({ service: Service2, layer, deps: [Database.node] });
187
187
  var extension2 = Effect.gen(function* () {
188
- const store = yield* Service5;
188
+ const store = yield* Service2;
189
189
  return { open: (stream, send) => store.attach(stream, send) };
190
190
  });
191
191
  function change(space, row, created) {
@@ -216,4 +216,4 @@ function parse(epoch, cursor) {
216
216
  return { since: Number(parts[0]), head: parts[1] === undefined ? undefined : Number(parts[1]) };
217
217
  }
218
218
 
219
- export { BatchSize2, PurgeInterval2, Service5, node3, extension2, exports_space_store };
219
+ export { BatchSize2, PurgeInterval2, Service2, node2, extension2, exports_space_store };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./content-headers-br4x4prt.js";
3
+ } from "./media-uri-stx1bw5w.js";
4
4
  import {
5
5
  Api2
6
- } from "./content-headers-jhs8rzvk.js";
6
+ } from "./media-uri-p8x80wn6.js";
7
7
 
8
8
  // src/handlers/plugin.ts
9
9
  import { Plugin } from "@opencode/core/plugin";
@@ -0,0 +1,43 @@
1
+ import {
2
+ isAllowedCorsOrigin2
3
+ } from "./media-uri-q4bn6dy8.js";
4
+ import {
5
+ middleware2
6
+ } from "./media-uri-hmwn16zp.js";
7
+ import {
8
+ withoutParentSpan2
9
+ } from "./media-uri-yc7nft6q.js";
10
+ import {
11
+ createRoutes2
12
+ } from "./media-uri-0wwbgx8t.js";
13
+ import {
14
+ __export
15
+ } from "./media-uri-9rqn6x4v.js";
16
+
17
+ // src/fetch.ts
18
+ var exports_fetch = {};
19
+ __export(exports_fetch, {
20
+ ServerFetch: () => exports_fetch,
21
+ build: () => build2,
22
+ make: () => make2,
23
+ makeWithContext: () => makeWithContext2,
24
+ serve: () => serve2
25
+ });
26
+ import { Context, Effect, flow, Layer } from "effect";
27
+ import { HttpEffect, HttpMiddleware, HttpRouter, HttpServer } from "effect/http";
28
+ import { SessionRestart } from "@opencode/core/session/execution/restart";
29
+ var makeWithContext2 = Effect.fn("ServerFetch.makeWithContext")(function* (options = {}, boot = {}) {
30
+ const context = yield* build2(createRoutes2(options, () => [], boot.overrides ?? []));
31
+ const handler = yield* serve2(context, flow(middleware2(options), HttpMiddleware.cors({ allowedOrigins: (origin) => isAllowedCorsOrigin2(origin, options), maxAge: 86400 })));
32
+ return { handler, context };
33
+ });
34
+ var build2 = (routes) => Layer.build(routes.pipe(Layer.provide(HttpServer.layerServices))).pipe(withoutParentSpan2);
35
+ var serve2 = Effect.fnUntraced(function* (context, middleware = (app) => app) {
36
+ yield* Context.get(context, SessionRestart.Service).resumeSuspendedSessions.pipe(Effect.provideContext(context), withoutParentSpan2, Effect.forkScoped);
37
+ return Context.get(context, HttpRouter.HttpRouter).asHttpEffect().pipe(middleware, HttpEffect.toWebHandlerWith(context));
38
+ });
39
+ var make2 = Effect.fn("ServerFetch.make")(function* (options = {}, boot = {}) {
40
+ return (yield* makeWithContext2(options, boot)).handler;
41
+ });
42
+
43
+ export { makeWithContext2, build2, serve2, make2, exports_fetch };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./content-headers-jhs8rzvk.js";
3
+ } from "./media-uri-p8x80wn6.js";
4
4
 
5
5
  // src/handlers/project.ts
6
6
  import { Project } from "@opencode/core/project";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  LocationMiddleware2
3
- } from "./content-headers-br4x4prt.js";
3
+ } from "./media-uri-stx1bw5w.js";
4
4
  import {
5
5
  FormLocationMiddleware2
6
- } from "./content-headers-ca564221.js";
6
+ } from "./media-uri-jy2ammbg.js";
7
7
  import {
8
8
  SessionLocationMiddleware2
9
- } from "./content-headers-ehyp3zqd.js";
9
+ } from "./media-uri-aexh791j.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 "./content-headers-br4x4prt.js";
3
+ } from "./media-uri-stx1bw5w.js";
4
4
  import {
5
5
  Api2
6
- } from "./content-headers-jhs8rzvk.js";
6
+ } from "./media-uri-p8x80wn6.js";
7
7
 
8
8
  // src/handlers/agent.ts
9
9
  import { Agent } from "@opencode/core/agent";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  Api2
3
- } from "./content-headers-jhs8rzvk.js";
3
+ } from "./media-uri-p8x80wn6.js";
4
4
  import {
5
5
  requireConnectable2
6
- } from "./content-headers-7r996r31.js";
6
+ } from "./media-uri-dxh72p2c.js";
7
7
 
8
8
  // src/handlers/credential.ts
9
9
  import { Credential } from "@opencode/core/credential";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./content-headers-jhs8rzvk.js";
3
+ } from "./media-uri-p8x80wn6.js";
4
4
 
5
5
  // src/handlers/location.ts
6
6
  import { Location } from "@opencode/core/location";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./content-headers-rqgv9x42.js";
3
+ } from "./media-uri-rqgv9x42.js";
4
4
  import {
5
5
  locationErrors2,
6
6
  response2,
7
7
  requestRef2
8
- } from "./content-headers-br4x4prt.js";
8
+ } from "./media-uri-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 "./content-headers-rqgv9x42.js";
3
+ } from "./media-uri-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 layer4 = 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 layer4 = Layer.effect(LocationMiddleware2, Effect.gen(function* () {
59
59
  }));
60
60
  }));
61
61
 
62
- export { LocationMiddleware2, locationErrors2, response2, sessionInfo2, requestRef2, layer4 };
62
+ export { LocationMiddleware2, locationErrors2, response2, sessionInfo2, requestRef2, layer2 };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./content-headers-9rqn6x4v.js";
3
+ } from "./media-uri-9rqn6x4v.js";
4
4
 
5
5
  // src/content-headers.ts
6
6
  var exports_content_headers = {};
@@ -2,18 +2,18 @@ import {
2
2
  locationErrors2,
3
3
  response2,
4
4
  requestRef2
5
- } from "./content-headers-br4x4prt.js";
5
+ } from "./media-uri-stx1bw5w.js";
6
6
  import {
7
7
  Api2
8
- } from "./content-headers-jhs8rzvk.js";
8
+ } from "./media-uri-p8x80wn6.js";
9
9
  import {
10
10
  CorsConfig2,
11
11
  isAllowedRequestOrigin2
12
- } from "./content-headers-q4bn6dy8.js";
12
+ } from "./media-uri-q4bn6dy8.js";
13
13
  import {
14
14
  runPtySocket2,
15
15
  holdLocation2
16
- } from "./content-headers-q187pxxd.js";
16
+ } from "./media-uri-q187pxxd.js";
17
17
 
18
18
  // src/handlers/pty.ts
19
19
  import { Pty } from "@opencode/core/pty";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  requestRef2
3
- } from "./content-headers-br4x4prt.js";
3
+ } from "./media-uri-stx1bw5w.js";
4
4
  import {
5
5
  Api2
6
- } from "./content-headers-jhs8rzvk.js";
6
+ } from "./media-uri-p8x80wn6.js";
7
7
 
8
8
  // src/handlers/debug.ts
9
9
  import { LocationServiceMap } from "@opencode/core/location-service-map";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  Api2
3
- } from "./content-headers-jhs8rzvk.js";
3
+ } from "./media-uri-p8x80wn6.js";
4
4
  import {
5
5
  SESSION_TTL_SECONDS2,
6
6
  Config2,
7
7
  issueSession2,
8
8
  sessionCookieName2
9
- } from "./content-headers-j4at0y5c.js";
9
+ } from "./media-uri-j4at0y5c.js";
10
10
  import {
11
- Service3
12
- } from "./content-headers-3te71694.js";
11
+ Service5
12
+ } from "./media-uri-megkv1kf.js";
13
13
  import {
14
- Service4
15
- } from "./content-headers-mzs0n5xz.js";
14
+ Service3
15
+ } from "./media-uri-vb61dkrm.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* Service3;
28
+ const info = yield* Service5;
29
29
  return {
30
30
  version: info.app.version ?? "unknown",
31
31
  pid: process.pid ?? 0,
@@ -1,25 +1,25 @@
1
1
  import {
2
2
  __export
3
- } from "./content-headers-9rqn6x4v.js";
3
+ } from "./media-uri-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: () => Service4,
10
- node: () => node2
9
+ Service: () => Service3,
10
+ node: () => node3
11
11
  });
12
12
  import { Cache, Context, Duration, Effect, Layer } from "effect";
13
13
  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 Service4 extends Context.Service()("@opencode/ServerPairing") {
17
+ class Service3 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(Service4, Effect.gen(function* () {
20
+ var layer = Layer.effect(Service3, Effect.gen(function* () {
21
21
  const cache = yield* Cache.make({ capacity: 1000, lookup: noLookup, timeToLive: TTL });
22
- return Service4.of({
22
+ return Service3.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(Service4, Effect.gen(function* () {
30
30
  })
31
31
  });
32
32
  }));
33
- var node2 = makeGlobalNode({ service: Service4, layer, deps: [] });
33
+ var node3 = makeGlobalNode({ service: Service3, layer, deps: [] });
34
34
 
35
- export { Service4, node2, exports_pairing };
35
+ export { Service3, node3, exports_pairing };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./content-headers-rqgv9x42.js";
3
+ } from "./media-uri-rqgv9x42.js";
4
4
 
5
5
  // src/handlers/job.ts
6
6
  import { Job } from "@opencode/core/job";