@opencode/server 2.3.1 → 2.4.0

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 (135) hide show
  1. package/dist/api.d.ts +249 -1
  2. package/dist/api.js +5 -5
  3. package/dist/auth.js +1 -1
  4. package/dist/chunks/{request-tracing-n5et0xgm.js → content-headers-0r476wkb.js} +5 -5
  5. package/dist/chunks/content-headers-0rzj25w4.js +194 -0
  6. package/dist/chunks/{request-tracing-4p2y0qs3.js → content-headers-100nc7c0.js} +2 -5
  7. package/dist/chunks/{request-tracing-z2ndp6vh.js → content-headers-1r438we2.js} +6 -6
  8. package/dist/chunks/{request-tracing-v8aqacn3.js → content-headers-2cm4dfcc.js} +2 -2
  9. package/dist/chunks/{request-tracing-x4b2rtcb.js → content-headers-2dzr03as.js} +1 -1
  10. package/dist/chunks/{request-tracing-ap1t95t8.js → content-headers-2rb1ee6g.js} +3 -3
  11. package/dist/chunks/{request-tracing-39nnfjx1.js → content-headers-39nnfjx1.js} +1 -1
  12. package/dist/chunks/{request-tracing-dezpcckc.js → content-headers-4fc68szf.js} +2 -2
  13. package/dist/chunks/{request-tracing-05c5061t.js → content-headers-4zkx9wb3.js} +1 -1
  14. package/dist/chunks/{request-tracing-b4mqtccx.js → content-headers-5jm9kajg.js} +2 -2
  15. package/dist/chunks/{request-tracing-7nb2rv11.js → content-headers-7jm4dc4a.js} +4 -4
  16. package/dist/chunks/{request-tracing-p86kew8c.js → content-headers-7qpea5x7.js} +2 -2
  17. package/dist/chunks/{request-tracing-78rcgzsr.js → content-headers-7ydfwv45.js} +4 -1
  18. package/dist/chunks/{request-tracing-f8r9p2vr.js → content-headers-801prsqk.js} +2 -2
  19. package/dist/chunks/{request-tracing-dx89xydc.js → content-headers-8ja97vv6.js} +2 -4
  20. package/dist/chunks/{request-tracing-8sb6qqpn.js → content-headers-8sb6qqpn.js} +1 -1
  21. package/dist/chunks/{request-tracing-9cd3a4b8.js → content-headers-9cd3a4b8.js} +1 -1
  22. package/dist/chunks/{request-tracing-tk56ffsq.js → content-headers-9t07vtvz.js} +5 -4
  23. package/dist/chunks/{request-tracing-htyf2qs7.js → content-headers-ah2sj2pr.js} +1 -1
  24. package/dist/chunks/{request-tracing-ayveq98d.js → content-headers-b03d5rht.js} +6 -18
  25. package/dist/chunks/{request-tracing-hx8bsq9d.js → content-headers-d20xfnpc.js} +1 -1
  26. package/dist/chunks/{request-tracing-r7knxm63.js → content-headers-ddrpmftb.js} +4 -4
  27. package/dist/chunks/{request-tracing-djr0jy89.js → content-headers-djr0jy89.js} +1 -1
  28. package/dist/chunks/{request-tracing-v0r38a4t.js → content-headers-fjcqsaaz.js} +46 -19
  29. package/dist/chunks/{request-tracing-sy2e93cn.js → content-headers-g23ffrnz.js} +3 -3
  30. package/dist/chunks/{request-tracing-kg0ybx4v.js → content-headers-gq4jwh93.js} +3 -3
  31. package/dist/chunks/{request-tracing-d4534456.js → content-headers-hf3kgjhr.js} +4 -4
  32. package/dist/chunks/{request-tracing-2pbbrzpp.js → content-headers-hk9crnsa.js} +2 -2
  33. package/dist/chunks/{request-tracing-myqk22k5.js → content-headers-hmwn16zp.js} +2 -2
  34. package/dist/chunks/{request-tracing-g6yhb3a8.js → content-headers-hnbeyfax.js} +15 -9
  35. package/dist/chunks/{request-tracing-j4at0y5c.js → content-headers-j4at0y5c.js} +1 -1
  36. package/dist/chunks/{request-tracing-jjvpqmx6.js → content-headers-jhbndf2d.js} +4 -4
  37. package/dist/chunks/{request-tracing-q44yktpv.js → content-headers-jmmhprac.js} +2 -2
  38. package/dist/chunks/{request-tracing-rd9e3qfx.js → content-headers-ky9xhfwk.js} +4 -4
  39. package/dist/chunks/{request-tracing-0gf4dfn8.js → content-headers-mvp6540g.js} +35 -35
  40. package/dist/chunks/{request-tracing-mzs0n5xz.js → content-headers-mzs0n5xz.js} +1 -1
  41. package/dist/chunks/{request-tracing-9grnt8dc.js → content-headers-p83m65n5.js} +2 -4
  42. package/dist/chunks/{request-tracing-zbe9jfhy.js → content-headers-prn0chz2.js} +1 -1
  43. package/dist/chunks/{request-tracing-fvpjvjpp.js → content-headers-qfyg9gb7.js} +7 -7
  44. package/dist/chunks/{request-tracing-vbgqk0mr.js → content-headers-r40v995e.js} +2 -2
  45. package/dist/chunks/{request-tracing-7b9xm1qg.js → content-headers-rktygpea.js} +4 -1
  46. package/dist/chunks/{request-tracing-d8b9pm2q.js → content-headers-rmfb1myj.js} +1 -1
  47. package/dist/chunks/{request-tracing-et00mhwf.js → content-headers-s3zgwc17.js} +3 -6
  48. package/dist/chunks/{request-tracing-t32e1bbt.js → content-headers-t32e1bbt.js} +1 -1
  49. package/dist/chunks/{request-tracing-b3bmdkga.js → content-headers-vw0q3knq.js} +1 -1
  50. package/dist/chunks/{request-tracing-h286a6py.js → content-headers-w3xmknp7.js} +2 -2
  51. package/dist/chunks/{request-tracing-s9tkswmw.js → content-headers-wka57cdm.js} +2 -2
  52. package/dist/chunks/{request-tracing-h1thjy6x.js → content-headers-y60jfeab.js} +2 -2
  53. package/dist/chunks/{request-tracing-4ed680xg.js → content-headers-ykk3p1r3.js} +2 -2
  54. package/dist/chunks/{request-tracing-861wfsmy.js → content-headers-yty6dk04.js} +1 -1
  55. package/dist/chunks/{request-tracing-50bbk3b2.js → content-headers-ywn523ee.js} +3 -11
  56. package/dist/chunks/{request-tracing-3te71694.js → content-headers-z3e7v67k.js} +7 -7
  57. package/dist/chunks/{request-tracing-0e81et3m.js → content-headers-zjmacp9c.js} +3 -3
  58. package/dist/content-headers.js +1 -1
  59. package/dist/cors.js +1 -1
  60. package/dist/event-feed.js +5 -5
  61. package/dist/fetch.js +60 -59
  62. package/dist/handlers/agent.js +6 -6
  63. package/dist/handlers/artifact.js +3 -3
  64. package/dist/handlers/automation.d.ts +1 -1
  65. package/dist/handlers/automation.js +2 -2
  66. package/dist/handlers/blob.js +3 -3
  67. package/dist/handlers/command.js +6 -6
  68. package/dist/handlers/config.js +6 -6
  69. package/dist/handlers/credential.d.ts +1 -1
  70. package/dist/handlers/credential.js +7 -7
  71. package/dist/handlers/debug.js +6 -6
  72. package/dist/handlers/event.js +7 -7
  73. package/dist/handlers/form.js +6 -6
  74. package/dist/handlers/fs.js +8 -8
  75. package/dist/handlers/generate.js +6 -6
  76. package/dist/handlers/integration.js +6 -6
  77. package/dist/handlers/job.d.ts +13 -1
  78. package/dist/handlers/job.js +2 -2
  79. package/dist/handlers/location.js +6 -6
  80. package/dist/handlers/machine.d.ts +95 -0
  81. package/dist/handlers/machine.js +18 -0
  82. package/dist/handlers/mcp.js +8 -8
  83. package/dist/handlers/media.js +2 -2
  84. package/dist/handlers/message.js +7 -7
  85. package/dist/handlers/migration.js +6 -6
  86. package/dist/handlers/model.js +6 -6
  87. package/dist/handlers/permission.js +6 -6
  88. package/dist/handlers/persistent-pty.d.ts +1 -1
  89. package/dist/handlers/persistent-pty.js +16 -15
  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/reference.js +6 -6
  96. package/dist/handlers/rpc.js +6 -6
  97. package/dist/handlers/server.js +9 -9
  98. package/dist/handlers/session-error.js +1 -1
  99. package/dist/handlers/session.js +7 -7
  100. package/dist/handlers/shell.js +6 -6
  101. package/dist/handlers/skill.js +6 -6
  102. package/dist/handlers/usage.js +6 -6
  103. package/dist/handlers/vcs.js +6 -6
  104. package/dist/handlers/voice.js +6 -6
  105. package/dist/handlers/websearch.js +6 -6
  106. package/dist/handlers/worktree.js +6 -6
  107. package/dist/handlers.d.ts +1 -1
  108. package/dist/handlers.js +53 -52
  109. package/dist/location.d.ts +1 -3
  110. package/dist/location.js +2 -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/pairing.js +1 -1
  118. package/dist/process.js +72 -63
  119. package/dist/range.js +1 -1
  120. package/dist/request-site.js +2 -2
  121. package/dist/request-tracing.js +1 -1
  122. package/dist/routes.d.ts +6 -2
  123. package/dist/routes.js +57 -56
  124. package/dist/server-info.js +5 -5
  125. package/dist/service-status.js +1 -1
  126. package/dist/workerd.js +63 -60
  127. package/package.json +8 -8
  128. /package/dist/chunks/{request-tracing-9rqn6x4v.js → content-headers-9rqn6x4v.js} +0 -0
  129. /package/dist/chunks/{request-tracing-bd8755ek.js → content-headers-bd8755ek.js} +0 -0
  130. /package/dist/chunks/{request-tracing-n26yr6pw.js → content-headers-n26yr6pw.js} +0 -0
  131. /package/dist/chunks/{request-tracing-q187pxxd.js → content-headers-q187pxxd.js} +0 -0
  132. /package/dist/chunks/{request-tracing-q4bn6dy8.js → content-headers-q4bn6dy8.js} +0 -0
  133. /package/dist/chunks/{request-tracing-smaf4a18.js → content-headers-smaf4a18.js} +0 -0
  134. /package/dist/chunks/{request-tracing-xthc02cw.js → content-headers-xthc02cw.js} +0 -0
  135. /package/dist/chunks/{request-tracing-yc7nft6q.js → content-headers-yc7nft6q.js} +0 -0
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./request-tracing-50bbk3b2.js";
3
+ } from "./content-headers-ywn523ee.js";
4
4
  import {
5
5
  Api2
6
- } from "./request-tracing-0e81et3m.js";
6
+ } from "./content-headers-zjmacp9c.js";
7
7
 
8
8
  // src/handlers/skill.ts
9
9
  import { Skill } from "@opencode/core/skill";
@@ -3,16 +3,16 @@ import {
3
3
  missingMessage2,
4
4
  failedMessageDecode2,
5
5
  failedSnapshot2
6
- } from "./request-tracing-smaf4a18.js";
6
+ } from "./content-headers-smaf4a18.js";
7
7
  import {
8
8
  locationErrors2
9
- } from "./request-tracing-50bbk3b2.js";
9
+ } from "./content-headers-ywn523ee.js";
10
10
  import {
11
11
  Api2
12
- } from "./request-tracing-0e81et3m.js";
12
+ } from "./content-headers-zjmacp9c.js";
13
13
  import {
14
14
  wantsMediaRefs2
15
- } from "./request-tracing-xthc02cw.js";
15
+ } from "./content-headers-xthc02cw.js";
16
16
 
17
17
  // src/handlers/session.ts
18
18
  import { Instance } from "@opencode/core/instance/service";
@@ -1,105 +1,105 @@
1
1
  import {
2
2
  GenerateHandler2
3
- } from "./request-tracing-ayveq98d.js";
3
+ } from "./content-headers-b03d5rht.js";
4
4
  import {
5
5
  VoiceHandler2
6
- } from "./request-tracing-et00mhwf.js";
6
+ } from "./content-headers-s3zgwc17.js";
7
7
  import {
8
8
  MessageHandler2
9
- } from "./request-tracing-ap1t95t8.js";
9
+ } from "./content-headers-2rb1ee6g.js";
10
10
  import {
11
11
  ModelHandler2
12
- } from "./request-tracing-4p2y0qs3.js";
12
+ } from "./content-headers-100nc7c0.js";
13
13
  import {
14
14
  ProviderHandler2
15
- } from "./request-tracing-9grnt8dc.js";
15
+ } from "./content-headers-p83m65n5.js";
16
16
  import {
17
17
  SessionHandler2
18
- } from "./request-tracing-rd9e3qfx.js";
18
+ } from "./content-headers-ky9xhfwk.js";
19
19
  import {
20
20
  PermissionHandler2
21
- } from "./request-tracing-kg0ybx4v.js";
21
+ } from "./content-headers-gq4jwh93.js";
22
22
  import {
23
23
  FileSystemHandler2
24
- } from "./request-tracing-r7knxm63.js";
24
+ } from "./content-headers-ddrpmftb.js";
25
25
  import {
26
26
  FormHandler2
27
- } from "./request-tracing-v8aqacn3.js";
27
+ } from "./content-headers-2cm4dfcc.js";
28
28
  import {
29
29
  CommandHandler2
30
- } from "./request-tracing-b4mqtccx.js";
30
+ } from "./content-headers-5jm9kajg.js";
31
31
  import {
32
32
  SkillHandler2
33
- } from "./request-tracing-q44yktpv.js";
33
+ } from "./content-headers-jmmhprac.js";
34
34
  import {
35
35
  RpcHandler2
36
- } from "./request-tracing-d8b9pm2q.js";
36
+ } from "./content-headers-rmfb1myj.js";
37
37
  import {
38
- layer2
39
- } from "./request-tracing-fvpjvjpp.js";
38
+ layer3
39
+ } from "./content-headers-qfyg9gb7.js";
40
40
  import {
41
41
  EventHandler2
42
- } from "./request-tracing-7nb2rv11.js";
42
+ } from "./content-headers-7jm4dc4a.js";
43
43
  import {
44
44
  AgentHandler2
45
- } from "./request-tracing-dezpcckc.js";
45
+ } from "./content-headers-4fc68szf.js";
46
46
  import {
47
47
  PluginHandler2
48
- } from "./request-tracing-vbgqk0mr.js";
48
+ } from "./content-headers-r40v995e.js";
49
49
  import {
50
50
  ServerHandler2
51
- } from "./request-tracing-z2ndp6vh.js";
51
+ } from "./content-headers-1r438we2.js";
52
52
  import {
53
53
  DebugHandler2
54
- } from "./request-tracing-h1thjy6x.js";
54
+ } from "./content-headers-y60jfeab.js";
55
55
  import {
56
56
  PtyHandler2
57
- } from "./request-tracing-jjvpqmx6.js";
57
+ } from "./content-headers-jhbndf2d.js";
58
58
  import {
59
59
  PersistentPtyHandler2
60
- } from "./request-tracing-g6yhb3a8.js";
60
+ } from "./content-headers-hnbeyfax.js";
61
61
  import {
62
62
  ShellHandler2
63
- } from "./request-tracing-f8r9p2vr.js";
63
+ } from "./content-headers-801prsqk.js";
64
64
  import {
65
65
  ReferenceHandler2
66
- } from "./request-tracing-s9tkswmw.js";
66
+ } from "./content-headers-wka57cdm.js";
67
67
  import {
68
68
  LocationHandler2
69
- } from "./request-tracing-zbe9jfhy.js";
69
+ } from "./content-headers-prn0chz2.js";
70
70
  import {
71
71
  IntegrationHandler2
72
- } from "./request-tracing-2pbbrzpp.js";
72
+ } from "./content-headers-hk9crnsa.js";
73
73
  import {
74
74
  WebSearchHandler2
75
- } from "./request-tracing-dx89xydc.js";
75
+ } from "./content-headers-8ja97vv6.js";
76
76
  import {
77
77
  UsageHandler2
78
- } from "./request-tracing-4ed680xg.js";
78
+ } from "./content-headers-ykk3p1r3.js";
79
79
  import {
80
80
  McpHandler2
81
- } from "./request-tracing-d4534456.js";
81
+ } from "./content-headers-hf3kgjhr.js";
82
82
  import {
83
83
  CredentialHandler2
84
- } from "./request-tracing-tk56ffsq.js";
84
+ } from "./content-headers-9t07vtvz.js";
85
85
  import {
86
86
  ProjectHandler2
87
- } from "./request-tracing-05c5061t.js";
87
+ } from "./content-headers-4zkx9wb3.js";
88
88
  import {
89
89
  WorktreeHandler2
90
- } from "./request-tracing-861wfsmy.js";
90
+ } from "./content-headers-yty6dk04.js";
91
91
  import {
92
92
  VcsHandler2
93
- } from "./request-tracing-h286a6py.js";
93
+ } from "./content-headers-w3xmknp7.js";
94
94
  import {
95
95
  MigrationHandler2
96
- } from "./request-tracing-x4b2rtcb.js";
96
+ } from "./content-headers-2dzr03as.js";
97
97
  import {
98
98
  ConfigHandler2
99
- } from "./request-tracing-hx8bsq9d.js";
99
+ } from "./content-headers-d20xfnpc.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
  __export
3
- } from "./request-tracing-9rqn6x4v.js";
3
+ } from "./content-headers-9rqn6x4v.js";
4
4
 
5
5
  // src/pairing.ts
6
6
  var exports_pairing = {};
@@ -1,10 +1,9 @@
1
1
  import {
2
- awaitPlugins2,
3
2
  response2
4
- } from "./request-tracing-50bbk3b2.js";
3
+ } from "./content-headers-ywn523ee.js";
5
4
  import {
6
5
  Api2
7
- } from "./request-tracing-0e81et3m.js";
6
+ } from "./content-headers-zjmacp9c.js";
8
7
 
9
8
  // src/handlers/provider.ts
10
9
  import { Provider } from "@opencode/core/provider";
@@ -13,7 +12,6 @@ import { Effect } from "effect";
13
12
  import { HttpApiBuilder } from "effect/http-api";
14
13
  var ProviderHandler2 = HttpApiBuilder.group(Api2, "server.provider", (handlers) => Effect.gen(function* () {
15
14
  return handlers.handle("provider.list", Effect.fn(function* () {
16
- yield* awaitPlugins2;
17
15
  const providers = yield* Provider.Service;
18
16
  return yield* response2(providers.available());
19
17
  })).handle("provider.get", Effect.fn(function* (ctx) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./request-tracing-0e81et3m.js";
3
+ } from "./content-headers-zjmacp9c.js";
4
4
 
5
5
  // src/handlers/location.ts
6
6
  import { Location } from "@opencode/core/location";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  __export
3
- } from "./request-tracing-9rqn6x4v.js";
3
+ } from "./content-headers-9rqn6x4v.js";
4
4
 
5
5
  // src/event-feed.ts
6
6
  var exports_event_feed = {};
7
7
  __export(exports_event_feed, {
8
8
  EncodingError: () => EncodingError2,
9
9
  EventFeed: () => exports_event_feed,
10
- Service: () => Service2,
10
+ Service: () => Service3,
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";
@@ -30,7 +30,7 @@ class EncodingError2 extends Schema.TaggedError()("EventFeed.EncodingError", {
30
30
  }) {
31
31
  }
32
32
 
33
- class Service2 extends Context.Service()("@opencode/server/EventFeed") {
33
+ class Service3 extends Context.Service()("@opencode/server/EventFeed") {
34
34
  }
35
35
  function frame2(event) {
36
36
  return `data: ${JSON.stringify(event)}
@@ -72,13 +72,13 @@ var make4 = Effect.fn("EventFeed.make")(function* (observe, options) {
72
72
  });
73
73
  const unsubscribe = yield* observe(publish);
74
74
  yield* Effect.addFinalizer(() => unsubscribe);
75
- return Service2.of({
75
+ return Service3.of({
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(Service3, 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, Service3, frame2, make4, layer3, exports_event_feed };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./request-tracing-50bbk3b2.js";
3
+ } from "./content-headers-ywn523ee.js";
4
4
  import {
5
5
  Api2
6
- } from "./request-tracing-0e81et3m.js";
6
+ } from "./content-headers-zjmacp9c.js";
7
7
 
8
8
  // src/handlers/plugin.ts
9
9
  import { Plugin } from "@opencode/core/plugin";
@@ -4,7 +4,7 @@ import {
4
4
  authorized2,
5
5
  verifySession2,
6
6
  sessionCookieName2
7
- } from "./request-tracing-j4at0y5c.js";
7
+ } from "./content-headers-j4at0y5c.js";
8
8
 
9
9
  // src/middleware/authorization.ts
10
10
  import { UnauthorizedError } from "@opencode/protocol/errors";
@@ -13,6 +13,7 @@ import { Authorization as Authorization2 } from "@opencode/protocol/middleware/a
13
13
  import { PTY_CONNECT_PATH, PTY_CONNECT_TICKET_QUERY } from "@opencode/protocol/groups/pty";
14
14
  import { PERSISTENT_PTY_CONNECT_PATH } from "@opencode/protocol/groups/persistent-pty";
15
15
  import { MCP_CLIENT_PATH } from "@opencode/protocol/groups/mcp";
16
+ import { isWebSocketUpgrade, MACHINE_LINK_PATH } from "@opencode/protocol/groups/machine";
16
17
  import { PAIRING_CONNECT_PATH } from "@opencode/protocol/groups/server";
17
18
  import { Effect, Layer, Redacted } from "effect";
18
19
  import { Base64 } from "effect/encoding";
@@ -73,6 +74,8 @@ var authorizationLayer2 = Layer.effect(Authorization, Effect.gen(function* () {
73
74
  const url = new URL(request.url, "http://localhost");
74
75
  if ((route.route.path === PTY_CONNECT_PATH || route.route.path === PERSISTENT_PTY_CONNECT_PATH || route.route.path === MCP_CLIENT_PATH) && !!url.searchParams.get(PTY_CONNECT_TICKET_QUERY) || route.route.path === PAIRING_CONNECT_PATH)
75
76
  return yield* effect;
77
+ if (route.route.path === MACHINE_LINK_PATH && isWebSocketUpgrade(request))
78
+ return yield* effect;
76
79
  if (yield* authorizedRequest2(request, config))
77
80
  return yield* effect;
78
81
  if (challengeRequest(request))
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./request-tracing-0e81et3m.js";
3
+ } from "./content-headers-zjmacp9c.js";
4
4
 
5
5
  // src/handlers/rpc.ts
6
6
  import { Rpc } from "@opencode/core/rpc";
@@ -1,10 +1,9 @@
1
1
  import {
2
- locationErrors2,
3
- awaitPlugins2
4
- } from "./request-tracing-50bbk3b2.js";
2
+ locationErrors2
3
+ } from "./content-headers-ywn523ee.js";
5
4
  import {
6
5
  Api2
7
- } from "./request-tracing-0e81et3m.js";
6
+ } from "./content-headers-zjmacp9c.js";
8
7
 
9
8
  // src/handlers/voice.ts
10
9
  import { Location } from "@opencode/core/location";
@@ -20,11 +19,9 @@ var VoiceHandler2 = HttpApiBuilder.group(Api2, "server.voice", (handlers) => Eff
20
19
  const locations = yield* LocationServiceMap.Service;
21
20
  const services = locations.get(Location.Ref.make({ directory: AbsolutePath.make(global.config) }));
22
21
  return handlers.handle("voice.models", Effect.fn("server.voice.models")(function* () {
23
- yield* awaitPlugins2;
24
22
  const voice = yield* Voice.Service;
25
23
  return { data: yield* voice.models() };
26
24
  }, Effect.provide(services), locationErrors2)).handle("voice.session", Effect.fn("server.voice.session")(function* (request) {
27
- yield* awaitPlugins2;
28
25
  const voice = yield* Voice.Service;
29
26
  const transport = yield* voice.session(request.payload).pipe(Effect.mapError((error) => error._tag === "Voice.InvalidRequestError" ? new InvalidRequestError({ message: error.message }) : new ServiceUnavailableError({ message: error.message, service: error.service })));
30
27
  return { data: { transport } };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./request-tracing-9rqn6x4v.js";
3
+ } from "./content-headers-9rqn6x4v.js";
4
4
 
5
5
  // src/content-headers.ts
6
6
  var exports_content_headers = {};
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  locationErrors2,
3
3
  sessionInfo2
4
- } from "./request-tracing-50bbk3b2.js";
4
+ } from "./content-headers-ywn523ee.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 "./request-tracing-50bbk3b2.js";
3
+ } from "./content-headers-ywn523ee.js";
4
4
  import {
5
5
  Api2
6
- } from "./request-tracing-0e81et3m.js";
6
+ } from "./content-headers-zjmacp9c.js";
7
7
 
8
8
  // src/handlers/vcs.ts
9
9
  import { Vcs } from "@opencode/core/vcs";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./request-tracing-50bbk3b2.js";
3
+ } from "./content-headers-ywn523ee.js";
4
4
  import {
5
5
  Api2
6
- } from "./request-tracing-0e81et3m.js";
6
+ } from "./content-headers-zjmacp9c.js";
7
7
 
8
8
  // src/handlers/reference.ts
9
9
  import { Reference } from "@opencode/core/reference";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  requestRef2
3
- } from "./request-tracing-50bbk3b2.js";
3
+ } from "./content-headers-ywn523ee.js";
4
4
  import {
5
5
  Api2
6
- } from "./request-tracing-0e81et3m.js";
6
+ } from "./content-headers-zjmacp9c.js";
7
7
 
8
8
  // src/handlers/debug.ts
9
9
  import { LocationServiceMap } from "@opencode/core/location-service-map";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./request-tracing-50bbk3b2.js";
3
+ } from "./content-headers-ywn523ee.js";
4
4
  import {
5
5
  Api2
6
- } from "./request-tracing-0e81et3m.js";
6
+ } from "./content-headers-zjmacp9c.js";
7
7
 
8
8
  // src/handlers/usage.ts
9
9
  import { UsageLimits } from "@opencode/core/usage-limits";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./request-tracing-0e81et3m.js";
3
+ } from "./content-headers-zjmacp9c.js";
4
4
 
5
5
  // src/handlers/worktree.ts
6
6
  import { Git } from "@opencode/core/git";
@@ -1,15 +1,14 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./request-tracing-smaf4a18.js";
3
+ } from "./content-headers-smaf4a18.js";
4
4
 
5
5
  // src/location.ts
6
6
  import { FileSystem } from "@opencode/core/filesystem";
7
7
  import { Location } from "@opencode/core/location";
8
- import { Plugin } from "@opencode/core/plugin";
9
8
  import { LocationServiceMap } from "@opencode/core/location-services";
10
9
  import { AbsolutePath } from "@opencode/core/schema";
11
10
  import { Session } from "@opencode/core/session";
12
- import { LocationNotFoundError, InvalidRequestError, ServiceUnavailableError } from "@opencode/protocol/errors";
11
+ import { LocationNotFoundError, InvalidRequestError } from "@opencode/protocol/errors";
13
12
  import { Effect, Layer, Schema } from "effect";
14
13
  import { HttpServerRequest } from "effect/http";
15
14
  import { HttpApiMiddleware } from "effect/http-api";
@@ -21,13 +20,6 @@ function locationErrors2(effect) {
21
20
  message: `Location not found: ${error.directory}`
22
21
  }))));
23
22
  }
24
- var awaitPlugins2 = Plugin.awaitActivation.pipe(Effect.timeoutOrElse({
25
- duration: "5 seconds",
26
- orElse: () => Effect.fail(new ServiceUnavailableError({
27
- message: "Location plugins did not finish activating",
28
- service: "plugin"
29
- }))
30
- }));
31
23
  function response2(data) {
32
24
  return Effect.gen(function* () {
33
25
  const location = yield* Location.Service;
@@ -67,4 +59,4 @@ var layer4 = Layer.effect(LocationMiddleware2, Effect.gen(function* () {
67
59
  }));
68
60
  }));
69
61
 
70
- export { LocationMiddleware2, locationErrors2, awaitPlugins2, response2, sessionInfo2, requestRef2, layer4 };
62
+ export { LocationMiddleware2, locationErrors2, response2, sessionInfo2, requestRef2, layer4 };
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  __export
3
- } from "./request-tracing-9rqn6x4v.js";
3
+ } from "./content-headers-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: () => Service2,
10
10
  connectionURLs: () => connectionURLs2,
11
- layer: () => layer3
11
+ layer: () => layer2
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 Service2 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 layer2(urls, tmp, app = {}) {
19
+ return Layer.succeed(Service2, Service2.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 { Service2, layer2, connectionURLs2, exports_server_info };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  LocationMiddleware2
3
- } from "./request-tracing-50bbk3b2.js";
3
+ } from "./content-headers-ywn523ee.js";
4
4
  import {
5
5
  FormLocationMiddleware2
6
- } from "./request-tracing-htyf2qs7.js";
6
+ } from "./content-headers-ah2sj2pr.js";
7
7
  import {
8
8
  SessionLocationMiddleware2
9
- } from "./request-tracing-b3bmdkga.js";
9
+ } from "./content-headers-vw0q3knq.js";
10
10
 
11
11
  // src/api.ts
12
12
  import { makeDefaultApi } from "@opencode/protocol/api";
@@ -3,7 +3,7 @@ import {
3
3
  download2,
4
4
  disposition2,
5
5
  exports_content_headers
6
- } from "./chunks/request-tracing-t32e1bbt.js";
6
+ } from "./chunks/content-headers-t32e1bbt.js";
7
7
  export {
8
8
  CONTENT_SECURITY_POLICY2 as CONTENT_SECURITY_POLICY,
9
9
  exports_content_headers as ContentHeaders,
package/dist/cors.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  CorsConfig2,
3
3
  isAllowedCorsOrigin2,
4
4
  isAllowedRequestOrigin2
5
- } from "./chunks/request-tracing-q4bn6dy8.js";
5
+ } from "./chunks/content-headers-q4bn6dy8.js";
6
6
  export {
7
7
  CorsConfig2 as CorsConfig,
8
8
  isAllowedCorsOrigin2 as isAllowedCorsOrigin,
@@ -2,19 +2,19 @@ import {
2
2
  SubscriberCapacity2,
3
3
  SubscriberOverflowError2,
4
4
  EncodingError2,
5
- Service2,
5
+ Service3,
6
6
  frame2,
7
7
  make4,
8
- layer2,
8
+ layer3,
9
9
  exports_event_feed
10
- } from "./chunks/request-tracing-fvpjvjpp.js";
10
+ } from "./chunks/content-headers-qfyg9gb7.js";
11
11
  export {
12
12
  EncodingError2 as EncodingError,
13
13
  exports_event_feed as EventFeed,
14
- Service2 as Service,
14
+ Service3 as Service,
15
15
  SubscriberCapacity2 as SubscriberCapacity,
16
16
  SubscriberOverflowError2 as SubscriberOverflowError,
17
17
  frame2 as frame,
18
- layer2 as layer,
18
+ layer3 as layer,
19
19
  make4 as make
20
20
  };