@opencode/server 0.0.0-dev-1360 → 0.0.0-dev-1361

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 (144) hide show
  1. package/dist/api.d.ts +171 -2
  2. package/dist/api.js +5 -5
  3. package/dist/auth.js +1 -1
  4. package/dist/chunks/{auth-0wjm8gvs.js → cors-0wjm8gvs.js} +2 -2
  5. package/dist/chunks/{auth-10sj2tcf.js → cors-10sj2tcf.js} +1 -1
  6. package/dist/chunks/{auth-1z9qd4y2.js → cors-1z9qd4y2.js} +4 -4
  7. package/dist/chunks/{auth-29nx48hm.js → cors-29nx48hm.js} +1 -1
  8. package/dist/chunks/{auth-2tmcamrc.js → cors-2tmcamrc.js} +2 -2
  9. package/dist/chunks/{auth-2p8psxn9.js → cors-3cx4ac5j.js} +17 -13
  10. package/dist/chunks/{auth-74nxvsrn.js → cors-3xkwxcke.js} +7 -4
  11. package/dist/chunks/cors-5fn432p6.js +44 -0
  12. package/dist/chunks/{auth-z3e7v67k.js → cors-5pdfedjd.js} +5 -5
  13. package/dist/chunks/{auth-59yyxpa4.js → cors-6cmsxt3d.js} +8 -8
  14. package/dist/chunks/{auth-6pm6ek88.js → cors-6pm6ek88.js} +1 -1
  15. package/dist/chunks/{auth-7dkb5ks8.js → cors-7dkb5ks8.js} +2 -2
  16. package/dist/chunks/{auth-8nezxn08.js → cors-8nezxn08.js} +1 -1
  17. package/dist/chunks/{auth-8qsq6tbs.js → cors-8qsq6tbs.js} +2 -2
  18. package/dist/chunks/{auth-8sb6qqpn.js → cors-8sb6qqpn.js} +1 -1
  19. package/dist/chunks/{auth-8xdajgpr.js → cors-8xdajgpr.js} +2 -2
  20. package/dist/chunks/{auth-9hynp6rm.js → cors-9hynp6rm.js} +2 -2
  21. package/dist/chunks/{auth-am27j67f.js → cors-am27j67f.js} +1 -1
  22. package/dist/chunks/{auth-br4x4prt.js → cors-br4x4prt.js} +1 -1
  23. package/dist/chunks/{auth-ca564221.js → cors-ca564221.js} +1 -1
  24. package/dist/chunks/{auth-csnx1nj3.js → cors-csnx1nj3.js} +2 -2
  25. package/dist/chunks/{auth-djr0jy89.js → cors-djr0jy89.js} +1 -1
  26. package/dist/chunks/{auth-0q7s66m2.js → cors-e6e4kz0w.js} +4 -4
  27. package/dist/chunks/{auth-ehyp3zqd.js → cors-ehyp3zqd.js} +1 -1
  28. package/dist/chunks/{auth-em7ed65n.js → cors-em7ed65n.js} +2 -2
  29. package/dist/chunks/{auth-enx9e1dz.js → cors-enx9e1dz.js} +4 -4
  30. package/dist/chunks/{auth-exwy1kbj.js → cors-exwy1kbj.js} +2 -2
  31. package/dist/chunks/{auth-f3gr6hfv.js → cors-f3gr6hfv.js} +2 -2
  32. package/dist/chunks/{auth-ey0z35hy.js → cors-fa6nnfxm.js} +38 -35
  33. package/dist/chunks/{auth-g23ffrnz.js → cors-g23ffrnz.js} +2 -2
  34. package/dist/chunks/{auth-g4964mny.js → cors-g4964mny.js} +3 -3
  35. package/dist/chunks/{auth-xcshf76p.js → cors-hb1ty1t1.js} +5 -6
  36. package/dist/chunks/{auth-j4at0y5c.js → cors-j4at0y5c.js} +1 -1
  37. package/dist/chunks/{auth-javgytnb.js → cors-javgytnb.js} +2 -2
  38. package/dist/chunks/{auth-k74zefsg.js → cors-k74zefsg.js} +1 -1
  39. package/dist/chunks/{auth-ka2mtp6f.js → cors-ka2mtp6f.js} +2 -2
  40. package/dist/chunks/{auth-kmwr1xw9.js → cors-kmwr1xw9.js} +3 -3
  41. package/dist/chunks/{auth-1aar1z9e.js → cors-msvebcy2.js} +5 -5
  42. package/dist/chunks/{auth-myqk22k5.js → cors-myqk22k5.js} +2 -2
  43. package/dist/chunks/{auth-n2zyxnzr.js → cors-n2zyxnzr.js} +1 -1
  44. package/dist/chunks/{auth-nvb61mgq.js → cors-nvb61mgq.js} +4 -4
  45. package/dist/chunks/{auth-p3bbq7g3.js → cors-p3bbq7g3.js} +1 -1
  46. package/dist/chunks/{auth-prwd5gwt.js → cors-prwd5gwt.js} +2 -2
  47. package/dist/chunks/{auth-qq3f8fnn.js → cors-qq3f8fnn.js} +2 -2
  48. package/dist/chunks/{auth-qssmdh31.js → cors-qssmdh31.js} +4 -4
  49. package/dist/chunks/{auth-rgbnpstw.js → cors-rgbnpstw.js} +2 -2
  50. package/dist/chunks/{auth-rjhxbsc4.js → cors-rjhxbsc4.js} +2 -2
  51. package/dist/chunks/{auth-s0zgx365.js → cors-s0zgx365.js} +2 -2
  52. package/dist/chunks/{auth-gaegw7xv.js → cors-sv3a4xc1.js} +16 -12
  53. package/dist/chunks/{auth-t32e1bbt.js → cors-t32e1bbt.js} +1 -1
  54. package/dist/chunks/{auth-w9jcwh65.js → cors-v9t81kwn.js} +8 -8
  55. package/dist/chunks/cors-w6xb5z15.js +196 -0
  56. package/dist/chunks/{auth-whvq72as.js → cors-whvq72as.js} +3 -3
  57. package/dist/chunks/{auth-wsvmph03.js → cors-wsvmph03.js} +2 -2
  58. package/dist/chunks/{auth-x2qy7jg1.js → cors-x2qy7jg1.js} +1 -1
  59. package/dist/chunks/{auth-yc92za0p.js → cors-yc92za0p.js} +2 -2
  60. package/dist/chunks/{auth-tjxfj8xj.js → cors-z5c20bjd.js} +29 -12
  61. package/dist/content-headers.js +1 -1
  62. package/dist/cors.js +1 -1
  63. package/dist/event-feed.d.ts +14 -2
  64. package/dist/event-feed.js +3 -3
  65. package/dist/fetch.d.ts +1 -1
  66. package/dist/fetch.js +65 -63
  67. package/dist/handlers/agent.js +6 -6
  68. package/dist/handlers/artifact.js +3 -3
  69. package/dist/handlers/automation.js +2 -2
  70. package/dist/handlers/blob.js +3 -3
  71. package/dist/handlers/command.js +6 -6
  72. package/dist/handlers/config.js +6 -6
  73. package/dist/handlers/credential.js +7 -7
  74. package/dist/handlers/debug.js +6 -6
  75. package/dist/handlers/event.js +7 -7
  76. package/dist/handlers/experimental/browser-tunnel.js +4 -4
  77. package/dist/handlers/flag.js +6 -6
  78. package/dist/handlers/form.js +6 -6
  79. package/dist/handlers/fs.js +8 -8
  80. package/dist/handlers/generate.js +6 -6
  81. package/dist/handlers/integration.js +6 -6
  82. package/dist/handlers/job.js +2 -2
  83. package/dist/handlers/location.js +6 -6
  84. package/dist/handlers/machine.js +1 -1
  85. package/dist/handlers/mcp.js +8 -8
  86. package/dist/handlers/media.js +2 -2
  87. package/dist/handlers/message.js +7 -7
  88. package/dist/handlers/migration.js +6 -6
  89. package/dist/handlers/model.js +6 -6
  90. package/dist/handlers/permission.js +6 -6
  91. package/dist/handlers/persistent-pty.d.ts +1 -1
  92. package/dist/handlers/persistent-pty.js +20 -18
  93. package/dist/handlers/plugin.js +6 -6
  94. package/dist/handlers/project.js +6 -6
  95. package/dist/handlers/provider.js +6 -6
  96. package/dist/handlers/pty-socket.js +1 -1
  97. package/dist/handlers/pty.js +8 -8
  98. package/dist/handlers/push.js +1 -1
  99. package/dist/handlers/reference.js +6 -6
  100. package/dist/handlers/rpc.js +6 -6
  101. package/dist/handlers/server.js +9 -9
  102. package/dist/handlers/session-error.js +1 -1
  103. package/dist/handlers/session.js +7 -7
  104. package/dist/handlers/shell.js +6 -6
  105. package/dist/handlers/skill.js +6 -6
  106. package/dist/handlers/space.d.ts +44 -0
  107. package/dist/handlers/space.js +7 -0
  108. package/dist/handlers/usage.js +6 -6
  109. package/dist/handlers/vcs.js +6 -6
  110. package/dist/handlers/voice.js +6 -6
  111. package/dist/handlers/websearch.js +6 -6
  112. package/dist/handlers/worktree.js +6 -6
  113. package/dist/handlers.d.ts +2 -1
  114. package/dist/handlers.js +58 -56
  115. package/dist/location.js +2 -2
  116. package/dist/media-uri.js +1 -1
  117. package/dist/middleware/authorization.js +2 -2
  118. package/dist/middleware/defect-response.js +1 -1
  119. package/dist/middleware/form-location.js +3 -3
  120. package/dist/middleware/schema-error.js +1 -1
  121. package/dist/middleware/session-location.js +3 -3
  122. package/dist/pairing.js +5 -5
  123. package/dist/process.js +68 -66
  124. package/dist/range.js +1 -1
  125. package/dist/request-site.js +2 -2
  126. package/dist/request-tracing.js +1 -1
  127. package/dist/routes.d.ts +3 -2
  128. package/dist/routes.js +62 -60
  129. package/dist/server-info.js +3 -3
  130. package/dist/service-status.js +3 -3
  131. package/dist/space-store.d.ts +49 -0
  132. package/dist/space-store.js +16 -0
  133. package/dist/workerd.js +66 -64
  134. package/package.json +8 -8
  135. /package/dist/chunks/{auth-017ycvbx.js → cors-017ycvbx.js} +0 -0
  136. /package/dist/chunks/{auth-9rqn6x4v.js → cors-9rqn6x4v.js} +0 -0
  137. /package/dist/chunks/{auth-bd8755ek.js → cors-bd8755ek.js} +0 -0
  138. /package/dist/chunks/{auth-n26yr6pw.js → cors-n26yr6pw.js} +0 -0
  139. /package/dist/chunks/{auth-q187pxxd.js → cors-q187pxxd.js} +0 -0
  140. /package/dist/chunks/{auth-q4bn6dy8.js → cors-q4bn6dy8.js} +0 -0
  141. /package/dist/chunks/{auth-qpnw2qd1.js → cors-qpnw2qd1.js} +0 -0
  142. /package/dist/chunks/{auth-rqgv9x42.js → cors-rqgv9x42.js} +0 -0
  143. /package/dist/chunks/{auth-xthc02cw.js → cors-xthc02cw.js} +0 -0
  144. /package/dist/chunks/{auth-yc7nft6q.js → cors-yc7nft6q.js} +0 -0
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  __export
3
- } from "./auth-9rqn6x4v.js";
3
+ } from "./cors-9rqn6x4v.js";
4
4
 
5
5
  // src/service-status.ts
6
6
  var exports_service_status = {};
7
7
  __export(exports_service_status, {
8
8
  Status: () => exports_service_status,
9
- make: () => make4
9
+ make: () => make3
10
10
  });
11
11
  import { Effect, Ref } from "effect";
12
- var make4 = Effect.fnUntraced(function* (options = {}) {
12
+ var make3 = Effect.fnUntraced(function* (options = {}) {
13
13
  const current = yield* Ref.make(options.initial ?? { type: "starting" });
14
14
  const beginStopping = Ref.update(current, (status) => status.type === "stopping" ? status : { type: "stopping" });
15
15
  return {
@@ -20,4 +20,4 @@ var make4 = Effect.fnUntraced(function* (options = {}) {
20
20
  };
21
21
  });
22
22
 
23
- export { make4, exports_service_status };
23
+ export { make3, exports_service_status };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  locationErrors2,
3
3
  sessionInfo2
4
- } from "./auth-br4x4prt.js";
4
+ } from "./cors-br4x4prt.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 "./auth-br4x4prt.js";
3
+ } from "./cors-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./auth-whvq72as.js";
6
+ } from "./cors-whvq72as.js";
7
7
 
8
8
  // src/handlers/plugin.ts
9
9
  import { Plugin } from "@opencode/core/plugin";
@@ -2,18 +2,18 @@ import {
2
2
  locationErrors2,
3
3
  response2,
4
4
  requestRef2
5
- } from "./auth-br4x4prt.js";
5
+ } from "./cors-br4x4prt.js";
6
6
  import {
7
7
  Api2
8
- } from "./auth-whvq72as.js";
8
+ } from "./cors-whvq72as.js";
9
9
  import {
10
10
  CorsConfig2,
11
11
  isAllowedRequestOrigin2
12
- } from "./auth-q4bn6dy8.js";
12
+ } from "./cors-q4bn6dy8.js";
13
13
  import {
14
14
  runPtySocket2,
15
15
  holdLocation2
16
- } from "./auth-q187pxxd.js";
16
+ } from "./cors-q187pxxd.js";
17
17
 
18
18
  // src/handlers/mcp.ts
19
19
  import { Location } from "@opencode/core/location";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./auth-br4x4prt.js";
3
+ } from "./cors-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./auth-whvq72as.js";
6
+ } from "./cors-whvq72as.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
  response2
3
- } from "./auth-br4x4prt.js";
3
+ } from "./cors-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./auth-whvq72as.js";
6
+ } from "./cors-whvq72as.js";
7
7
 
8
8
  // src/handlers/shell.ts
9
9
  import { Shell } from "@opencode/core/shell";
@@ -1,108 +1,111 @@
1
1
  import {
2
2
  GenerateHandler2
3
- } from "./auth-prwd5gwt.js";
3
+ } from "./cors-prwd5gwt.js";
4
4
  import {
5
5
  VoiceHandler2
6
- } from "./auth-rjhxbsc4.js";
6
+ } from "./cors-rjhxbsc4.js";
7
7
  import {
8
8
  MessageHandler2
9
- } from "./auth-g4964mny.js";
9
+ } from "./cors-g4964mny.js";
10
10
  import {
11
11
  ModelHandler2
12
- } from "./auth-s0zgx365.js";
12
+ } from "./cors-s0zgx365.js";
13
13
  import {
14
14
  ProviderHandler2
15
- } from "./auth-yc92za0p.js";
15
+ } from "./cors-yc92za0p.js";
16
16
  import {
17
17
  SessionHandler2
18
- } from "./auth-qssmdh31.js";
18
+ } from "./cors-qssmdh31.js";
19
19
  import {
20
20
  PermissionHandler2
21
- } from "./auth-kmwr1xw9.js";
21
+ } from "./cors-kmwr1xw9.js";
22
22
  import {
23
23
  FileSystemHandler2
24
- } from "./auth-nvb61mgq.js";
24
+ } from "./cors-nvb61mgq.js";
25
25
  import {
26
26
  FormHandler2
27
- } from "./auth-8qsq6tbs.js";
27
+ } from "./cors-8qsq6tbs.js";
28
28
  import {
29
29
  CommandHandler2
30
- } from "./auth-rgbnpstw.js";
30
+ } from "./cors-rgbnpstw.js";
31
31
  import {
32
32
  SkillHandler2
33
- } from "./auth-74nxvsrn.js";
33
+ } from "./cors-3xkwxcke.js";
34
34
  import {
35
35
  RpcHandler2
36
- } from "./auth-k74zefsg.js";
36
+ } from "./cors-k74zefsg.js";
37
37
  import {
38
38
  layer3
39
- } from "./auth-tjxfj8xj.js";
39
+ } from "./cors-z5c20bjd.js";
40
40
  import {
41
41
  EventHandler2
42
- } from "./auth-xcshf76p.js";
42
+ } from "./cors-hb1ty1t1.js";
43
43
  import {
44
44
  AgentHandler2
45
- } from "./auth-exwy1kbj.js";
45
+ } from "./cors-exwy1kbj.js";
46
46
  import {
47
47
  PluginHandler2
48
- } from "./auth-em7ed65n.js";
48
+ } from "./cors-em7ed65n.js";
49
49
  import {
50
50
  ServerHandler2
51
- } from "./auth-59yyxpa4.js";
51
+ } from "./cors-6cmsxt3d.js";
52
52
  import {
53
53
  DebugHandler2
54
- } from "./auth-csnx1nj3.js";
54
+ } from "./cors-csnx1nj3.js";
55
55
  import {
56
56
  PtyHandler2
57
- } from "./auth-1z9qd4y2.js";
57
+ } from "./cors-1z9qd4y2.js";
58
+ import {
59
+ extension2
60
+ } from "./cors-w6xb5z15.js";
58
61
  import {
59
62
  PersistentPtyHandler2
60
- } from "./auth-gaegw7xv.js";
63
+ } from "./cors-sv3a4xc1.js";
61
64
  import {
62
65
  ShellHandler2
63
- } from "./auth-f3gr6hfv.js";
66
+ } from "./cors-f3gr6hfv.js";
64
67
  import {
65
68
  ReferenceHandler2
66
- } from "./auth-7dkb5ks8.js";
69
+ } from "./cors-7dkb5ks8.js";
67
70
  import {
68
71
  LocationHandler2
69
- } from "./auth-p3bbq7g3.js";
72
+ } from "./cors-p3bbq7g3.js";
70
73
  import {
71
74
  IntegrationHandler2
72
- } from "./auth-2tmcamrc.js";
75
+ } from "./cors-2tmcamrc.js";
73
76
  import {
74
77
  WebSearchHandler2
75
- } from "./auth-qq3f8fnn.js";
78
+ } from "./cors-qq3f8fnn.js";
76
79
  import {
77
80
  UsageHandler2
78
- } from "./auth-wsvmph03.js";
81
+ } from "./cors-wsvmph03.js";
79
82
  import {
80
83
  FlagHandler2
81
- } from "./auth-9hynp6rm.js";
84
+ } from "./cors-9hynp6rm.js";
82
85
  import {
83
86
  McpHandler2
84
- } from "./auth-enx9e1dz.js";
87
+ } from "./cors-enx9e1dz.js";
85
88
  import {
86
89
  CredentialHandler2
87
- } from "./auth-8xdajgpr.js";
90
+ } from "./cors-8xdajgpr.js";
88
91
  import {
89
92
  ProjectHandler2
90
- } from "./auth-8nezxn08.js";
93
+ } from "./cors-8nezxn08.js";
91
94
  import {
92
95
  WorktreeHandler2
93
- } from "./auth-n2zyxnzr.js";
96
+ } from "./cors-n2zyxnzr.js";
94
97
  import {
95
98
  VcsHandler2
96
- } from "./auth-0wjm8gvs.js";
99
+ } from "./cors-0wjm8gvs.js";
97
100
  import {
98
101
  MigrationHandler2
99
- } from "./auth-10sj2tcf.js";
102
+ } from "./cors-10sj2tcf.js";
100
103
  import {
101
104
  ConfigHandler2
102
- } from "./auth-am27j67f.js";
105
+ } from "./cors-am27j67f.js";
103
106
 
104
107
  // src/handlers.ts
105
108
  import { Layer } from "effect";
106
- 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)), 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);
107
110
 
108
111
  export { handlers2 };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  download2
3
- } from "./auth-t32e1bbt.js";
3
+ } from "./cors-t32e1bbt.js";
4
4
  import {
5
5
  parse2
6
- } from "./auth-8sb6qqpn.js";
6
+ } from "./cors-8sb6qqpn.js";
7
7
 
8
8
  // src/handlers/blob.ts
9
9
  import { BlobStore } from "@opencode/core/blob-store";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  missingSession2,
3
3
  failedMessageDecode2
4
- } from "./auth-rqgv9x42.js";
4
+ } from "./cors-rqgv9x42.js";
5
5
  import {
6
6
  Api2
7
- } from "./auth-whvq72as.js";
7
+ } from "./cors-whvq72as.js";
8
8
  import {
9
9
  wantsMediaRefs2
10
- } from "./auth-xthc02cw.js";
10
+ } from "./cors-xthc02cw.js";
11
11
 
12
12
  // src/handlers/message.ts
13
13
  import { SessionMessage } from "@opencode/core/session/message";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  Api2
3
- } from "./auth-whvq72as.js";
3
+ } from "./cors-whvq72as.js";
4
4
  import {
5
5
  Service4,
6
6
  frame2
7
- } from "./auth-tjxfj8xj.js";
7
+ } from "./cors-z5c20bjd.js";
8
8
 
9
9
  // src/handlers/event.ts
10
10
  import { Event } from "@opencode/schema/event";
@@ -14,12 +14,11 @@ import { HttpApiBuilder } from "effect/http-api";
14
14
  var EventHandler2 = HttpApiBuilder.group(Api2, "server.event", (handlers) => Effect.gen(function* () {
15
15
  const feed = yield* Service4;
16
16
  return handlers.handleRaw("event.subscribe", (ctx) => Effect.gen(function* () {
17
- const connected = {
17
+ const output = Stream.unwrap(feed.subscribe(ctx.query.types).pipe(Effect.map((subscription) => Stream.make(frame2({
18
18
  id: Event.ID.create(),
19
19
  type: "server.connected",
20
- data: {}
21
- };
22
- const output = Stream.unwrap(feed.subscribe(ctx.query.types).pipe(Effect.map((live) => Stream.make(frame2(connected)).pipe(Stream.concat(live)))));
20
+ data: { stream: subscription.id }
21
+ })).pipe(Stream.concat(subscription.events)))));
23
22
  const heartbeat = Stream.tick("15 seconds").pipe(Stream.map(() => `: heartbeat
24
23
 
25
24
  `));
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./auth-9rqn6x4v.js";
3
+ } from "./cors-9rqn6x4v.js";
4
4
 
5
5
  // src/auth.ts
6
6
  var exports_auth = {};
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./auth-rqgv9x42.js";
3
+ } from "./cors-rqgv9x42.js";
4
4
  import {
5
5
  locationErrors2,
6
6
  response2,
7
7
  requestRef2
8
- } from "./auth-br4x4prt.js";
8
+ } from "./cors-br4x4prt.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
  Api2
3
- } from "./auth-whvq72as.js";
3
+ } from "./cors-whvq72as.js";
4
4
 
5
5
  // src/handlers/rpc.ts
6
6
  import { Rpc } from "@opencode/core/rpc";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  CorsConfig2,
3
3
  isAllowedRequestOrigin2
4
- } from "./auth-q4bn6dy8.js";
4
+ } from "./cors-q4bn6dy8.js";
5
5
  import {
6
6
  locationErrors2,
7
7
  requestRef2
8
- } from "./auth-br4x4prt.js";
8
+ } from "./cors-br4x4prt.js";
9
9
 
10
10
  // src/handlers/experimental/browser-tunnel.ts
11
11
  import { NodeHttpServerRequest } from "@effect/platform-node";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./auth-rqgv9x42.js";
3
+ } from "./cors-rqgv9x42.js";
4
4
  import {
5
5
  locationErrors2,
6
6
  response2,
7
7
  sessionInfo2
8
- } from "./auth-br4x4prt.js";
8
+ } from "./cors-br4x4prt.js";
9
9
  import {
10
10
  Api2
11
- } from "./auth-whvq72as.js";
11
+ } from "./cors-whvq72as.js";
12
12
 
13
13
  // src/handlers/permission.ts
14
14
  import { Instance } from "@opencode/core/instance/service";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  isAllowedCorsOrigin2
3
- } from "./auth-q4bn6dy8.js";
3
+ } from "./cors-q4bn6dy8.js";
4
4
  import {
5
5
  middleware2
6
- } from "./auth-myqk22k5.js";
6
+ } from "./cors-myqk22k5.js";
7
7
  import {
8
8
  withoutParentSpan2
9
- } from "./auth-yc7nft6q.js";
9
+ } from "./cors-yc7nft6q.js";
10
10
  import {
11
11
  createRoutes2
12
- } from "./auth-2p8psxn9.js";
12
+ } from "./cors-3cx4ac5j.js";
13
13
  import {
14
14
  __export
15
- } from "./auth-9rqn6x4v.js";
15
+ } from "./cors-9rqn6x4v.js";
16
16
 
17
17
  // src/fetch.ts
18
18
  var exports_fetch = {};
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  isAllowedRequestOrigin2
3
- } from "./auth-q4bn6dy8.js";
3
+ } from "./cors-q4bn6dy8.js";
4
4
  import {
5
5
  __export
6
- } from "./auth-9rqn6x4v.js";
6
+ } from "./cors-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
  Api2
3
- } from "./auth-whvq72as.js";
3
+ } from "./cors-whvq72as.js";
4
4
 
5
5
  // src/handlers/worktree.ts
6
6
  import { Git } from "@opencode/core/git";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  response2
3
- } from "./auth-br4x4prt.js";
3
+ } from "./cors-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./auth-whvq72as.js";
6
+ } from "./cors-whvq72as.js";
7
7
  import {
8
8
  download2
9
- } from "./auth-t32e1bbt.js";
9
+ } from "./cors-t32e1bbt.js";
10
10
  import {
11
11
  parse2
12
- } from "./auth-8sb6qqpn.js";
12
+ } from "./cors-8sb6qqpn.js";
13
13
 
14
14
  // src/handlers/fs.ts
15
15
  import { Environment } from "@opencode/core/environment/index";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./auth-whvq72as.js";
3
+ } from "./cors-whvq72as.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 "./auth-br4x4prt.js";
3
+ } from "./cors-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./auth-whvq72as.js";
6
+ } from "./cors-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 "./auth-br4x4prt.js";
3
+ } from "./cors-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./auth-whvq72as.js";
6
+ } from "./cors-whvq72as.js";
7
7
 
8
8
  // src/handlers/websearch.ts
9
9
  import { WebSearch } from "@opencode/core/websearch";
@@ -4,16 +4,16 @@ import {
4
4
  missingMessage2,
5
5
  failedMessageDecode2,
6
6
  failedSnapshot2
7
- } from "./auth-rqgv9x42.js";
7
+ } from "./cors-rqgv9x42.js";
8
8
  import {
9
9
  locationErrors2
10
- } from "./auth-br4x4prt.js";
10
+ } from "./cors-br4x4prt.js";
11
11
  import {
12
12
  Api2
13
- } from "./auth-whvq72as.js";
13
+ } from "./cors-whvq72as.js";
14
14
  import {
15
15
  wantsMediaRefs2
16
- } from "./auth-xthc02cw.js";
16
+ } from "./cors-xthc02cw.js";
17
17
 
18
18
  // src/handlers/session.ts
19
19
  import { Instance } from "@opencode/core/instance/service";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./auth-br4x4prt.js";
3
+ } from "./cors-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./auth-whvq72as.js";
6
+ } from "./cors-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 "./auth-br4x4prt.js";
3
+ } from "./cors-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./auth-whvq72as.js";
6
+ } from "./cors-whvq72as.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 "./auth-br4x4prt.js";
3
+ } from "./cors-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./auth-whvq72as.js";
6
+ } from "./cors-whvq72as.js";
7
7
 
8
8
  // src/handlers/model.ts
9
9
  import { Model } from "@opencode/core/model";
@@ -1,38 +1,41 @@
1
1
  import {
2
2
  Api2
3
- } from "./auth-whvq72as.js";
3
+ } from "./cors-whvq72as.js";
4
4
  import {
5
5
  CorsConfig2,
6
6
  isAllowedRequestOrigin2
7
- } from "./auth-q4bn6dy8.js";
7
+ } from "./cors-q4bn6dy8.js";
8
8
  import {
9
9
  makeArtifact2
10
- } from "./auth-javgytnb.js";
10
+ } from "./cors-javgytnb.js";
11
11
  import {
12
12
  makeBlobGet2
13
- } from "./auth-g23ffrnz.js";
13
+ } from "./cors-g23ffrnz.js";
14
14
  import {
15
15
  makeBrowserTunnel2
16
- } from "./auth-ka2mtp6f.js";
16
+ } from "./cors-ka2mtp6f.js";
17
17
  import {
18
18
  makeAutomation2
19
- } from "./auth-6pm6ek88.js";
19
+ } from "./cors-6pm6ek88.js";
20
20
  import {
21
21
  makeJob2
22
- } from "./auth-x2qy7jg1.js";
22
+ } from "./cors-x2qy7jg1.js";
23
23
  import {
24
24
  makeMachineLink2,
25
25
  makeMachine2
26
- } from "./auth-017ycvbx.js";
26
+ } from "./cors-017ycvbx.js";
27
27
  import {
28
28
  makeMediaGet2
29
- } from "./auth-djr0jy89.js";
29
+ } from "./cors-djr0jy89.js";
30
30
  import {
31
31
  makePush2
32
- } from "./auth-qpnw2qd1.js";
32
+ } from "./cors-qpnw2qd1.js";
33
+ import {
34
+ makeSpace2
35
+ } from "./cors-5fn432p6.js";
33
36
  import {
34
37
  runPtySocket2
35
- } from "./auth-q187pxxd.js";
38
+ } from "./cors-q187pxxd.js";
36
39
 
37
40
  // src/handlers/persistent-pty.ts
38
41
  import { PersistentPty } from "@opencode/core/persistent-pty";
@@ -58,6 +61,7 @@ var PersistentPtyHandler2 = HttpApiBuilder.group(Api2, "server.experimental", (h
58
61
  const pty = yield* PersistentPty.Service;
59
62
  const artifact = yield* makeArtifact2;
60
63
  const job = yield* makeJob2;
64
+ const space = yield* makeSpace2;
61
65
  const mediaGet = yield* makeMediaGet2;
62
66
  const blobGet = yield* makeBlobGet2;
63
67
  const automation = yield* makeAutomation2;
@@ -65,7 +69,7 @@ var PersistentPtyHandler2 = HttpApiBuilder.group(Api2, "server.experimental", (h
65
69
  const machineLink = yield* makeMachineLink2;
66
70
  const browserTunnel = yield* makeBrowserTunnel2;
67
71
  const push = yield* makePush2;
68
- return handlers.handleRaw("media.get", (ctx) => mediaGet(ctx.params.hash, ctx.request)).handleRaw("blob.get", (ctx) => blobGet(ctx.params.id, ctx.request)).handleRaw("browser.tunnel", (ctx) => browserTunnel(ctx.request)).handle("job.list", (ctx) => job.list(ctx.query)).handle("job.cancel", (ctx) => job.cancel(ctx.params.id)).handleRaw("machine.link", (ctx) => machineLink(ctx.request)).handle("machine.list", () => machine.list()).handle("machine.add", (ctx) => machine.add(ctx.payload)).handle("machine.remove", (ctx) => machine.remove(ctx.params.name)).handle("push.get", () => push.get()).handle("push.device.register", (ctx) => push.register(ctx.params.deviceID, ctx.payload)).handle("push.device.remove", (ctx) => push.remove(ctx.params.deviceID)).handle("push.device.update", (ctx) => push.update(ctx.params.deviceID, ctx.payload)).handle("push.device.session.set", (ctx) => push.setDeviceBell(ctx.params.deviceID, ctx.params.sessionID, ctx.payload)).handle("push.device.session.remove", (ctx) => push.removeDeviceBell(ctx.params.deviceID, ctx.params.sessionID)).handle("push.session.set", (ctx) => push.setSessionBell(ctx.params.sessionID, ctx.payload)).handle("push.session.remove", (ctx) => push.removeSessionBell(ctx.params.sessionID)).handle("push.settings.set", (ctx) => push.setSettings(ctx.payload)).handle("artifacts.providers", (ctx) => artifact.providers(ctx.query, ctx.request)).handle("artifacts.list", (ctx) => artifact.list(ctx.query, ctx.request)).handle("artifacts.create", (ctx) => artifact.create(ctx.query, ctx.payload, ctx.request)).handle("artifacts.get", (ctx) => artifact.get(ctx.params.artifactID, ctx.query, ctx.request)).handle("artifacts.update", (ctx) => artifact.update(ctx.params.artifactID, ctx.query, ctx.payload, ctx.request)).handle("artifacts.delete", (ctx) => artifact.remove(ctx.params.artifactID, ctx.query, ctx.request)).handleRaw("artifacts.view", (ctx) => artifact.view(ctx.params.artifactID, ctx.query, ctx.request)).handle("automation.create", (ctx) => automation.create(ctx.payload)).handle("automation.list", (ctx) => automation.list(ctx.query)).handle("automation.get", (ctx) => automation.get(ctx.params.automationID)).handle("automation.pause", (ctx) => automation.pause(ctx.params.automationID)).handle("automation.resume", (ctx) => automation.resume(ctx.params.automationID)).handle("automation.delete", (ctx) => automation.remove(ctx.params.automationID)).handle("persistentPty.read", Effect.fn(function* (ctx) {
72
+ return handlers.handleRaw("media.get", (ctx) => mediaGet(ctx.params.hash, ctx.request)).handleRaw("blob.get", (ctx) => blobGet(ctx.params.id, ctx.request)).handleRaw("browser.tunnel", (ctx) => browserTunnel(ctx.request)).handle("job.list", (ctx) => job.list(ctx.query)).handle("job.cancel", (ctx) => job.cancel(ctx.params.id)).handleRaw("machine.link", (ctx) => machineLink(ctx.request)).handle("machine.list", () => machine.list()).handle("machine.add", (ctx) => machine.add(ctx.payload)).handle("machine.remove", (ctx) => machine.remove(ctx.params.name)).handle("push.get", () => push.get()).handle("push.device.register", (ctx) => push.register(ctx.params.deviceID, ctx.payload)).handle("push.device.remove", (ctx) => push.remove(ctx.params.deviceID)).handle("push.device.update", (ctx) => push.update(ctx.params.deviceID, ctx.payload)).handle("push.device.session.set", (ctx) => push.setDeviceBell(ctx.params.deviceID, ctx.params.sessionID, ctx.payload)).handle("push.device.session.remove", (ctx) => push.removeDeviceBell(ctx.params.deviceID, ctx.params.sessionID)).handle("push.session.set", (ctx) => push.setSessionBell(ctx.params.sessionID, ctx.payload)).handle("push.session.remove", (ctx) => push.removeSessionBell(ctx.params.sessionID)).handle("push.settings.set", (ctx) => push.setSettings(ctx.payload)).handle("space.set", (ctx) => space.set(ctx.params.space, ctx.params.key, ctx.payload.value)).handle("space.delete", (ctx) => space.remove(ctx.params.space, ctx.params.key)).handle("space.sync", (ctx) => space.sync(ctx.params.space, ctx.query.cursor)).handle("space.subscribe", (ctx) => space.subscribe(ctx.payload)).handle("space.unsubscribe", (ctx) => space.unsubscribe(ctx.payload)).handle("space.reset", () => space.reset()).handle("artifacts.providers", (ctx) => artifact.providers(ctx.query, ctx.request)).handle("artifacts.list", (ctx) => artifact.list(ctx.query, ctx.request)).handle("artifacts.create", (ctx) => artifact.create(ctx.query, ctx.payload, ctx.request)).handle("artifacts.get", (ctx) => artifact.get(ctx.params.artifactID, ctx.query, ctx.request)).handle("artifacts.update", (ctx) => artifact.update(ctx.params.artifactID, ctx.query, ctx.payload, ctx.request)).handle("artifacts.delete", (ctx) => artifact.remove(ctx.params.artifactID, ctx.query, ctx.request)).handleRaw("artifacts.view", (ctx) => artifact.view(ctx.params.artifactID, ctx.query, ctx.request)).handle("automation.create", (ctx) => automation.create(ctx.payload)).handle("automation.list", (ctx) => automation.list(ctx.query)).handle("automation.get", (ctx) => automation.get(ctx.params.automationID)).handle("automation.pause", (ctx) => automation.pause(ctx.params.automationID)).handle("automation.resume", (ctx) => automation.resume(ctx.params.automationID)).handle("automation.delete", (ctx) => automation.remove(ctx.params.automationID)).handle("persistentPty.read", Effect.fn(function* (ctx) {
69
73
  return { data: yield* pty.read(ctx.params.sessionID, ctx.query.lines).pipe(mapUnavailable) };
70
74
  })).handle("persistentPty.list", Effect.fn(function* (ctx) {
71
75
  return { data: yield* pty.list(ctx.params.sessionID).pipe(mapUnavailable) };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./auth-9rqn6x4v.js";
3
+ } from "./cors-9rqn6x4v.js";
4
4
 
5
5
  // src/content-headers.ts
6
6
  var exports_content_headers = {};