@opencode/server 0.0.0-dev-1357 → 0.0.0-dev-1359

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 (140) hide show
  1. package/dist/api.js +5 -5
  2. package/dist/auth.js +1 -1
  3. package/dist/chunks/api-0tgs6603.js +108 -0
  4. package/dist/chunks/{pairing-cwx7pqk1.js → api-0wjm8gvs.js} +3 -3
  5. package/dist/chunks/{pairing-10sj2tcf.js → api-10sj2tcf.js} +1 -1
  6. package/dist/chunks/{pairing-mp1tvqh7.js → api-1eazfxyk.js} +4 -4
  7. package/dist/chunks/{pairing-rktygpea.js → api-29nx48hm.js} +4 -1
  8. package/dist/chunks/{pairing-2tmcamrc.js → api-2tmcamrc.js} +2 -2
  9. package/dist/chunks/api-343ey9kd.js +189 -0
  10. package/dist/chunks/{pairing-39nnfjx1.js → api-39nnfjx1.js} +1 -1
  11. package/dist/chunks/{pairing-yjbzmfhm.js → api-3te71694.js} +5 -5
  12. package/dist/chunks/{pairing-ed0tz0nn.js → api-4aa8a7eb.js} +14 -12
  13. package/dist/chunks/{pairing-qssmdh31.js → api-5jwtxv1w.js} +4 -4
  14. package/dist/chunks/{pairing-6pm6ek88.js → api-6pm6ek88.js} +1 -1
  15. package/dist/chunks/{pairing-74nxvsrn.js → api-74nxvsrn.js} +2 -2
  16. package/dist/chunks/{pairing-7dkb5ks8.js → api-7dkb5ks8.js} +2 -2
  17. package/dist/chunks/{pairing-8fhq523v.js → api-8fhq523v.js} +4 -4
  18. package/dist/chunks/{pairing-8nezxn08.js → api-8nezxn08.js} +1 -1
  19. package/dist/chunks/{pairing-8qsq6tbs.js → api-8qsq6tbs.js} +2 -2
  20. package/dist/chunks/{pairing-8sb6qqpn.js → api-8sb6qqpn.js} +1 -1
  21. package/dist/chunks/{pairing-8xdajgpr.js → api-8xdajgpr.js} +2 -2
  22. package/dist/chunks/api-9hynp6rm.js +20 -0
  23. package/dist/chunks/{pairing-am27j67f.js → api-am27j67f.js} +1 -1
  24. package/dist/chunks/{pairing-ba6cev85.js → api-ba6cev85.js} +4 -4
  25. package/dist/chunks/{pairing-br4x4prt.js → api-br4x4prt.js} +1 -1
  26. package/dist/chunks/{pairing-ca564221.js → api-ca564221.js} +1 -1
  27. package/dist/chunks/{pairing-csnx1nj3.js → api-csnx1nj3.js} +2 -2
  28. package/dist/chunks/{pairing-djr0jy89.js → api-djr0jy89.js} +1 -1
  29. package/dist/chunks/{pairing-ehyp3zqd.js → api-ehyp3zqd.js} +1 -1
  30. package/dist/chunks/{pairing-em7ed65n.js → api-em7ed65n.js} +2 -2
  31. package/dist/chunks/{pairing-exwy1kbj.js → api-exwy1kbj.js} +2 -2
  32. package/dist/chunks/{pairing-f3gr6hfv.js → api-f3gr6hfv.js} +2 -2
  33. package/dist/chunks/{pairing-fvpjvjpp.js → api-fvpjvjpp.js} +1 -1
  34. package/dist/chunks/{pairing-darcrm5x.js → api-g1xn52zf.js} +8 -8
  35. package/dist/chunks/{pairing-50kbksvb.js → api-g23ffrnz.js} +2 -2
  36. package/dist/chunks/{pairing-bng99jk3.js → api-gbjwxtsb.js} +15 -11
  37. package/dist/chunks/{pairing-j4at0y5c.js → api-j4at0y5c.js} +1 -1
  38. package/dist/chunks/{pairing-javgytnb.js → api-javgytnb.js} +2 -2
  39. package/dist/chunks/{pairing-k74zefsg.js → api-k74zefsg.js} +1 -1
  40. package/dist/chunks/{pairing-kmwr1xw9.js → api-kmwr1xw9.js} +3 -3
  41. package/dist/chunks/{pairing-kshqfq8s.js → api-kshqfq8s.js} +2 -2
  42. package/dist/chunks/{pairing-myqk22k5.js → api-myqk22k5.js} +2 -2
  43. package/dist/chunks/{pairing-w9jcwh65.js → api-mzs0n5xz.js} +7 -7
  44. package/dist/chunks/{pairing-n2zyxnzr.js → api-n2zyxnzr.js} +1 -1
  45. package/dist/chunks/{pairing-p3bbq7g3.js → api-p3bbq7g3.js} +1 -1
  46. package/dist/chunks/{pairing-prwd5gwt.js → api-prwd5gwt.js} +2 -2
  47. package/dist/chunks/{pairing-qq3f8fnn.js → api-qq3f8fnn.js} +2 -2
  48. package/dist/chunks/{pairing-rgbnpstw.js → api-rgbnpstw.js} +2 -2
  49. package/dist/chunks/{pairing-rjhxbsc4.js → api-rjhxbsc4.js} +2 -2
  50. package/dist/chunks/{pairing-s0zgx365.js → api-s0zgx365.js} +2 -2
  51. package/dist/chunks/{pairing-t32e1bbt.js → api-t32e1bbt.js} +1 -1
  52. package/dist/chunks/{pairing-t5vqvama.js → api-thpam3yh.js} +5 -5
  53. package/dist/chunks/{pairing-g4964mny.js → api-ts1fhe9d.js} +3 -3
  54. package/dist/chunks/{pairing-whvq72as.js → api-whvq72as.js} +3 -3
  55. package/dist/chunks/{pairing-wsvmph03.js → api-wsvmph03.js} +2 -2
  56. package/dist/chunks/{pairing-x2qy7jg1.js → api-x2qy7jg1.js} +1 -1
  57. package/dist/chunks/{pairing-yc92za0p.js → api-yc92za0p.js} +2 -2
  58. package/dist/content-headers.js +1 -1
  59. package/dist/cors.js +1 -1
  60. package/dist/event-feed.js +1 -1
  61. package/dist/fetch.d.ts +1 -1
  62. package/dist/fetch.js +63 -61
  63. package/dist/handlers/agent.js +6 -6
  64. package/dist/handlers/artifact.js +3 -3
  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.js +7 -7
  70. package/dist/handlers/debug.js +6 -6
  71. package/dist/handlers/event.js +7 -7
  72. package/dist/handlers/experimental/browser-tunnel.d.ts +11 -0
  73. package/dist/handlers/experimental/browser-tunnel.js +9 -0
  74. package/dist/handlers/flag.d.ts +1 -0
  75. package/dist/handlers/flag.js +11 -0
  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.d.ts +1 -1
  90. package/dist/handlers/persistent-pty.js +18 -17
  91. package/dist/handlers/plugin.js +6 -6
  92. package/dist/handlers/project.js +6 -6
  93. package/dist/handlers/provider.js +6 -6
  94. package/dist/handlers/pty-socket.js +1 -1
  95. package/dist/handlers/pty.js +8 -8
  96. package/dist/handlers/push.js +1 -1
  97. package/dist/handlers/reference.js +6 -6
  98. package/dist/handlers/rpc.js +6 -6
  99. package/dist/handlers/server.js +9 -9
  100. package/dist/handlers/session-error.js +1 -1
  101. package/dist/handlers/session.js +7 -7
  102. package/dist/handlers/shell.js +6 -6
  103. package/dist/handlers/skill.js +6 -6
  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.d.ts +1 -1
  110. package/dist/handlers.js +56 -54
  111. package/dist/location.js +2 -2
  112. package/dist/media-uri.js +1 -1
  113. package/dist/middleware/authorization.js +2 -2
  114. package/dist/middleware/defect-response.js +1 -1
  115. package/dist/middleware/form-location.js +3 -3
  116. package/dist/middleware/schema-error.js +1 -1
  117. package/dist/middleware/session-location.js +3 -3
  118. package/dist/pairing.js +3 -3
  119. package/dist/process.js +73 -63
  120. package/dist/range.js +1 -1
  121. package/dist/request-site.js +2 -2
  122. package/dist/request-tracing.js +1 -1
  123. package/dist/routes.d.ts +3 -2
  124. package/dist/routes.js +60 -58
  125. package/dist/server-info.js +3 -3
  126. package/dist/service-status.js +1 -1
  127. package/dist/workerd.d.ts +5 -5
  128. package/dist/workerd.js +66 -93
  129. package/package.json +8 -8
  130. package/dist/chunks/pairing-dms2vwqd.js +0 -105
  131. /package/dist/chunks/{pairing-017ycvbx.js → api-017ycvbx.js} +0 -0
  132. /package/dist/chunks/{pairing-9rqn6x4v.js → api-9rqn6x4v.js} +0 -0
  133. /package/dist/chunks/{pairing-bd8755ek.js → api-bd8755ek.js} +0 -0
  134. /package/dist/chunks/{pairing-n26yr6pw.js → api-n26yr6pw.js} +0 -0
  135. /package/dist/chunks/{pairing-q187pxxd.js → api-q187pxxd.js} +0 -0
  136. /package/dist/chunks/{pairing-q4bn6dy8.js → api-q4bn6dy8.js} +0 -0
  137. /package/dist/chunks/{pairing-qpnw2qd1.js → api-qpnw2qd1.js} +0 -0
  138. /package/dist/chunks/{pairing-rqgv9x42.js → api-rqgv9x42.js} +0 -0
  139. /package/dist/chunks/{pairing-xthc02cw.js → api-xthc02cw.js} +0 -0
  140. /package/dist/chunks/{pairing-yc7nft6q.js → api-yc7nft6q.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./pairing-whvq72as.js";
3
+ } from "./api-whvq72as.js";
4
4
 
5
5
  // src/handlers/config.ts
6
6
  import { Config } from "@opencode/core/config";
@@ -2,18 +2,18 @@ import {
2
2
  locationErrors2,
3
3
  response2,
4
4
  requestRef2
5
- } from "./pairing-br4x4prt.js";
5
+ } from "./api-br4x4prt.js";
6
6
  import {
7
7
  Api2
8
- } from "./pairing-whvq72as.js";
8
+ } from "./api-whvq72as.js";
9
9
  import {
10
10
  CorsConfig2,
11
11
  isAllowedRequestOrigin2
12
- } from "./pairing-q4bn6dy8.js";
12
+ } from "./api-q4bn6dy8.js";
13
13
  import {
14
14
  runPtySocket2,
15
15
  holdLocation2
16
- } from "./pairing-q187pxxd.js";
16
+ } from "./api-q187pxxd.js";
17
17
 
18
18
  // src/handlers/mcp.ts
19
19
  import { Location } from "@opencode/core/location";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./pairing-rqgv9x42.js";
3
+ } from "./api-rqgv9x42.js";
4
4
 
5
5
  // src/location.ts
6
6
  import { FileSystem } from "@opencode/core/filesystem";
@@ -2,7 +2,7 @@ import {
2
2
  locationErrors2,
3
3
  sessionInfo2,
4
4
  requestRef2
5
- } from "./pairing-br4x4prt.js";
5
+ } from "./api-br4x4prt.js";
6
6
 
7
7
  // src/middleware/form-location.ts
8
8
  import { Instance } from "@opencode/core/instance/service";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  requestRef2
3
- } from "./pairing-br4x4prt.js";
3
+ } from "./api-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./pairing-whvq72as.js";
6
+ } from "./api-whvq72as.js";
7
7
 
8
8
  // src/handlers/debug.ts
9
9
  import { LocationServiceMap } from "@opencode/core/location-service-map";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CONTENT_SECURITY_POLICY2,
3
3
  disposition2
4
- } from "./pairing-t32e1bbt.js";
4
+ } from "./api-t32e1bbt.js";
5
5
 
6
6
  // src/handlers/media.ts
7
7
  import { Database } from "@opencode/core/database/database";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  locationErrors2,
3
3
  sessionInfo2
4
- } from "./pairing-br4x4prt.js";
4
+ } from "./api-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 "./pairing-br4x4prt.js";
3
+ } from "./api-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./pairing-whvq72as.js";
6
+ } from "./api-whvq72as.js";
7
7
 
8
8
  // src/handlers/plugin.ts
9
9
  import { Plugin } from "@opencode/core/plugin";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./pairing-br4x4prt.js";
3
+ } from "./api-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./pairing-whvq72as.js";
6
+ } from "./api-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 "./pairing-br4x4prt.js";
3
+ } from "./api-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./pairing-whvq72as.js";
6
+ } from "./api-whvq72as.js";
7
7
 
8
8
  // src/handlers/shell.ts
9
9
  import { Shell } from "@opencode/core/shell";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./pairing-9rqn6x4v.js";
3
+ } from "./api-9rqn6x4v.js";
4
4
 
5
5
  // src/event-feed.ts
6
6
  var exports_event_feed = {};
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  Api2
3
- } from "./pairing-whvq72as.js";
3
+ } from "./api-whvq72as.js";
4
4
  import {
5
5
  SESSION_TTL_SECONDS2,
6
6
  Config2,
7
7
  issueSession2,
8
8
  sessionCookieName2
9
- } from "./pairing-j4at0y5c.js";
10
- import {
11
- Service4
12
- } from "./pairing-yjbzmfhm.js";
9
+ } from "./api-j4at0y5c.js";
13
10
  import {
14
11
  Service3
15
- } from "./pairing-w9jcwh65.js";
12
+ } from "./api-3te71694.js";
13
+ import {
14
+ Service4
15
+ } from "./api-mzs0n5xz.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* Service3;
25
+ const pairing = yield* Service4;
26
26
  const auth = yield* Config2;
27
27
  return handlers.handle("server.info", () => Effect.gen(function* () {
28
- const info = yield* Service4;
28
+ const info = yield* Service3;
29
29
  return {
30
30
  version: info.app.version ?? "unknown",
31
31
  pid: process.pid ?? 0,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  download2
3
- } from "./pairing-t32e1bbt.js";
3
+ } from "./api-t32e1bbt.js";
4
4
  import {
5
5
  parse2
6
- } from "./pairing-8sb6qqpn.js";
6
+ } from "./api-8sb6qqpn.js";
7
7
 
8
8
  // src/handlers/blob.ts
9
9
  import { BlobStore } from "@opencode/core/blob-store";
@@ -1,35 +1,38 @@
1
1
  import {
2
2
  Api2
3
- } from "./pairing-whvq72as.js";
3
+ } from "./api-whvq72as.js";
4
4
  import {
5
5
  CorsConfig2,
6
6
  isAllowedRequestOrigin2
7
- } from "./pairing-q4bn6dy8.js";
7
+ } from "./api-q4bn6dy8.js";
8
8
  import {
9
9
  makeArtifact2
10
- } from "./pairing-javgytnb.js";
10
+ } from "./api-javgytnb.js";
11
11
  import {
12
12
  makeBlobGet2
13
- } from "./pairing-50kbksvb.js";
13
+ } from "./api-g23ffrnz.js";
14
+ import {
15
+ makeBrowserTunnel2
16
+ } from "./api-343ey9kd.js";
14
17
  import {
15
18
  makeAutomation2
16
- } from "./pairing-6pm6ek88.js";
19
+ } from "./api-6pm6ek88.js";
17
20
  import {
18
21
  makeJob2
19
- } from "./pairing-x2qy7jg1.js";
22
+ } from "./api-x2qy7jg1.js";
20
23
  import {
21
24
  makeMachineLink2,
22
25
  makeMachine2
23
- } from "./pairing-017ycvbx.js";
26
+ } from "./api-017ycvbx.js";
24
27
  import {
25
28
  makeMediaGet2
26
- } from "./pairing-djr0jy89.js";
29
+ } from "./api-djr0jy89.js";
27
30
  import {
28
31
  makePush2
29
- } from "./pairing-qpnw2qd1.js";
32
+ } from "./api-qpnw2qd1.js";
30
33
  import {
31
34
  runPtySocket2
32
- } from "./pairing-q187pxxd.js";
35
+ } from "./api-q187pxxd.js";
33
36
 
34
37
  // src/handlers/persistent-pty.ts
35
38
  import { PersistentPty } from "@opencode/core/persistent-pty";
@@ -60,8 +63,9 @@ var PersistentPtyHandler2 = HttpApiBuilder.group(Api2, "server.experimental", (h
60
63
  const automation = yield* makeAutomation2;
61
64
  const machine = yield* makeMachine2;
62
65
  const machineLink = yield* makeMachineLink2;
66
+ const browserTunnel = yield* makeBrowserTunnel2;
63
67
  const push = yield* makePush2;
64
- return handlers.handleRaw("media.get", (ctx) => mediaGet(ctx.params.hash, ctx.request)).handleRaw("blob.get", (ctx) => blobGet(ctx.params.id, 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) {
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) {
65
69
  return { data: yield* pty.read(ctx.params.sessionID, ctx.query.lines).pipe(mapUnavailable) };
66
70
  })).handle("persistentPty.list", Effect.fn(function* (ctx) {
67
71
  return { data: yield* pty.list(ctx.params.sessionID).pipe(mapUnavailable) };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./pairing-9rqn6x4v.js";
3
+ } from "./api-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 "./pairing-rqgv9x42.js";
3
+ } from "./api-rqgv9x42.js";
4
4
  import {
5
5
  locationErrors2,
6
6
  response2,
7
7
  requestRef2
8
- } from "./pairing-br4x4prt.js";
8
+ } from "./api-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 "./pairing-whvq72as.js";
3
+ } from "./api-whvq72as.js";
4
4
 
5
5
  // src/handlers/rpc.ts
6
6
  import { Rpc } from "@opencode/core/rpc";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./pairing-rqgv9x42.js";
3
+ } from "./api-rqgv9x42.js";
4
4
  import {
5
5
  locationErrors2,
6
6
  response2,
7
7
  sessionInfo2
8
- } from "./pairing-br4x4prt.js";
8
+ } from "./api-br4x4prt.js";
9
9
  import {
10
10
  Api2
11
- } from "./pairing-whvq72as.js";
11
+ } from "./api-whvq72as.js";
12
12
 
13
13
  // src/handlers/permission.ts
14
14
  import { Instance } from "@opencode/core/instance/service";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  Api2
3
- } from "./pairing-whvq72as.js";
3
+ } from "./api-whvq72as.js";
4
4
  import {
5
5
  Service2,
6
6
  frame2
7
- } from "./pairing-fvpjvjpp.js";
7
+ } from "./api-fvpjvjpp.js";
8
8
 
9
9
  // src/handlers/event.ts
10
10
  import { Event } from "@opencode/schema/event";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  isAllowedRequestOrigin2
3
- } from "./pairing-q4bn6dy8.js";
3
+ } from "./api-q4bn6dy8.js";
4
4
  import {
5
5
  __export
6
- } from "./pairing-9rqn6x4v.js";
6
+ } from "./api-9rqn6x4v.js";
7
7
 
8
8
  // src/request-site.ts
9
9
  var exports_request_site = {};
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  __export
3
- } from "./pairing-9rqn6x4v.js";
3
+ } from "./api-9rqn6x4v.js";
4
4
 
5
5
  // src/pairing.ts
6
6
  var exports_pairing = {};
7
7
  __export(exports_pairing, {
8
8
  ServerPairing: () => exports_pairing,
9
- Service: () => Service3,
9
+ Service: () => Service4,
10
10
  node: () => node2
11
11
  });
12
12
  import { Cache, Context, Duration, Effect, Layer } from "effect";
@@ -14,12 +14,12 @@ import { makeGlobalNode } from "@opencode/util/effect/app-node";
14
14
  import { randomBytes } from "node:crypto";
15
15
  var TTL = Duration.minutes(5);
16
16
 
17
- class Service3 extends Context.Service()("@opencode/ServerPairing") {
17
+ class Service4 extends Context.Service()("@opencode/ServerPairing") {
18
18
  }
19
19
  var noLookup = () => Effect.die(new Error("ServerPairing cache must be used via set/invalidateWhen, never get"));
20
- var layer = Layer.effect(Service3, Effect.gen(function* () {
20
+ var layer = Layer.effect(Service4, Effect.gen(function* () {
21
21
  const cache = yield* Cache.make({ capacity: 1000, lookup: noLookup, timeToLive: TTL });
22
- return Service3.of({
22
+ return Service4.of({
23
23
  issue: Effect.fn("ServerPairing.issue")(function* () {
24
24
  const code = randomBytes(16).toString("base64url");
25
25
  yield* Cache.set(cache, code, true);
@@ -30,6 +30,6 @@ var layer = Layer.effect(Service3, Effect.gen(function* () {
30
30
  })
31
31
  });
32
32
  }));
33
- var node2 = makeGlobalNode({ service: Service3, layer, deps: [] });
33
+ var node2 = makeGlobalNode({ service: Service4, layer, deps: [] });
34
34
 
35
- export { Service3, node2, exports_pairing };
35
+ export { Service4, node2, exports_pairing };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./pairing-whvq72as.js";
3
+ } from "./api-whvq72as.js";
4
4
 
5
5
  // src/handlers/worktree.ts
6
6
  import { Git } from "@opencode/core/git";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./pairing-whvq72as.js";
3
+ } from "./api-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 "./pairing-br4x4prt.js";
3
+ } from "./api-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./pairing-whvq72as.js";
6
+ } from "./api-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 "./pairing-br4x4prt.js";
3
+ } from "./api-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./pairing-whvq72as.js";
6
+ } from "./api-whvq72as.js";
7
7
 
8
8
  // src/handlers/websearch.ts
9
9
  import { WebSearch } from "@opencode/core/websearch";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./pairing-br4x4prt.js";
3
+ } from "./api-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./pairing-whvq72as.js";
6
+ } from "./api-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 "./pairing-br4x4prt.js";
3
+ } from "./api-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./pairing-whvq72as.js";
6
+ } from "./api-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 "./pairing-br4x4prt.js";
3
+ } from "./api-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./pairing-whvq72as.js";
6
+ } from "./api-whvq72as.js";
7
7
 
8
8
  // src/handlers/model.ts
9
9
  import { Model } from "@opencode/core/model";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./pairing-9rqn6x4v.js";
3
+ } from "./api-9rqn6x4v.js";
4
4
 
5
5
  // src/content-headers.ts
6
6
  var exports_content_headers = {};
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  isAllowedCorsOrigin2
3
- } from "./pairing-q4bn6dy8.js";
3
+ } from "./api-q4bn6dy8.js";
4
4
  import {
5
5
  middleware2
6
- } from "./pairing-myqk22k5.js";
6
+ } from "./api-myqk22k5.js";
7
7
  import {
8
8
  withoutParentSpan2
9
- } from "./pairing-yc7nft6q.js";
9
+ } from "./api-yc7nft6q.js";
10
10
  import {
11
11
  createRoutes2
12
- } from "./pairing-ed0tz0nn.js";
12
+ } from "./api-4aa8a7eb.js";
13
13
  import {
14
14
  __export
15
- } from "./pairing-9rqn6x4v.js";
15
+ } from "./api-9rqn6x4v.js";
16
16
 
17
17
  // src/fetch.ts
18
18
  var exports_fetch = {};
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  missingSession2,
3
3
  failedMessageDecode2
4
- } from "./pairing-rqgv9x42.js";
4
+ } from "./api-rqgv9x42.js";
5
5
  import {
6
6
  Api2
7
- } from "./pairing-whvq72as.js";
7
+ } from "./api-whvq72as.js";
8
8
  import {
9
9
  wantsMediaRefs2
10
- } from "./pairing-xthc02cw.js";
10
+ } from "./api-xthc02cw.js";
11
11
 
12
12
  // src/handlers/message.ts
13
13
  import { SessionMessage } from "@opencode/core/session/message";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  LocationMiddleware2
3
- } from "./pairing-br4x4prt.js";
3
+ } from "./api-br4x4prt.js";
4
4
  import {
5
5
  FormLocationMiddleware2
6
- } from "./pairing-ca564221.js";
6
+ } from "./api-ca564221.js";
7
7
  import {
8
8
  SessionLocationMiddleware2
9
- } from "./pairing-ehyp3zqd.js";
9
+ } from "./api-ehyp3zqd.js";
10
10
 
11
11
  // src/api.ts
12
12
  import { makeDefaultApi } from "@opencode/protocol/api";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./pairing-br4x4prt.js";
3
+ } from "./api-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./pairing-whvq72as.js";
6
+ } from "./api-whvq72as.js";
7
7
 
8
8
  // src/handlers/usage.ts
9
9
  import { UsageLimits } from "@opencode/core/usage-limits";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./pairing-rqgv9x42.js";
3
+ } from "./api-rqgv9x42.js";
4
4
 
5
5
  // src/handlers/job.ts
6
6
  import { Job } from "@opencode/core/job";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./pairing-br4x4prt.js";
3
+ } from "./api-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./pairing-whvq72as.js";
6
+ } from "./api-whvq72as.js";
7
7
 
8
8
  // src/handlers/provider.ts
9
9
  import { Provider } from "@opencode/core/provider";
@@ -3,7 +3,7 @@ import {
3
3
  download2,
4
4
  disposition2,
5
5
  exports_content_headers
6
- } from "./chunks/pairing-t32e1bbt.js";
6
+ } from "./chunks/api-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/pairing-q4bn6dy8.js";
5
+ } from "./chunks/api-q4bn6dy8.js";
6
6
  export {
7
7
  CorsConfig2 as CorsConfig,
8
8
  isAllowedCorsOrigin2 as isAllowedCorsOrigin,
@@ -7,7 +7,7 @@ import {
7
7
  make4,
8
8
  layer2,
9
9
  exports_event_feed
10
- } from "./chunks/pairing-fvpjvjpp.js";
10
+ } from "./chunks/api-fvpjvjpp.js";
11
11
  export {
12
12
  EncodingError2 as EncodingError,
13
13
  exports_event_feed as EventFeed,
package/dist/fetch.d.ts CHANGED
@@ -63,7 +63,7 @@ export declare const makeWithContext: (options?: {
63
63
  } | undefined;
64
64
  } | undefined, boot?: BootOptions | undefined) => Effect.Effect<{
65
65
  handler: (request: Request, context?: Context.Context<never> | undefined) => Promise<globalThis.Response>;
66
- context: Context.Context<import("@opencode/core/shell").Daemon | import("effect/http/HttpClient").HttpClient | HttpRouter.HttpRouter | import("@opencode/util/fs-util").FSUtil.Service | import("@opencode/util/global").Service | import("@opencode/core/database/database").Service | import("@opencode/core/app").Service | import("@opencode/core/credential").Service | import("@opencode/core/kv").Service | import("@opencode/core/wellknown").Service | import("@opencode/core/session/instruction-entry").Service | import("@opencode/core/job").Service | import("@opencode/core/machine/identity").Service | import("@opencode/core/machine/machines").Service | import("@opencode/core/workspace").Service | import("@opencode/core/permission/saved").Service | import("@opencode/core/codemode/api").Service | import("@opencode/core/location-service-map").Service | import("@opencode/core/persistent-pty/index").Service | import("@opencode/core/session").Service | import("@opencode/core/automation").Service | import("@opencode/core/worktree").Service | import("@opencode/core/blob-store").Service | import("@opencode/core/session/search-build").Service | import("@opencode/core/video-generation").Service | import("@opencode/core/plugin/sdk").Service | import("@opencode/core/plugin/update").Service | import("@opencode/core/instance").Service | import("@opencode/core/bus").Service | import("@opencode/core/project").Service | SessionRestart.Service | import("@opencode/core/pty/ticket").Service | import("@opencode/core/session/transfer").Service | import("@opencode/core/location-activity").Service | import("@opencode/core/push/list").Service | import("@opencode/core/push/sender").Service | import("@opencode/core/filesystem/file-watch").Service | import("./pairing").Service>;
66
+ context: Context.Context<import("@opencode/core/shell").Daemon | import("effect/http/HttpClient").HttpClient | HttpRouter.HttpRouter | import("@opencode/util/fs-util").FSUtil.Service | import("@opencode/util/global").Service | import("@opencode/core/database/database").Service | import("@opencode/core/app").Service | import("@opencode/core/credential").Service | import("@opencode/core/kv").Service | import("@opencode/core/wellknown").Service | import("@opencode/core/session/instruction-entry").Service | import("@opencode/core/job").Service | import("@opencode/core/machine/identity").Service | import("@opencode/core/machine/machines").Service | import("@opencode/core/workspace").Service | import("@opencode/core/permission/saved").Service | import("@opencode/core/codemode/api").Service | import("@opencode/core/location-service-map").Service | import("@opencode/core/persistent-pty/index").Service | import("@opencode/core/session").Service | import("@opencode/core/automation").Service | import("@opencode/core/worktree").Service | import("@opencode/core/blob-store").Service | import("@opencode/core/session/search-build").Service | import("@opencode/core/video-generation").Service | import("@opencode/core/experimental/browser-tunnel").Service | import("@opencode/core/plugin/sdk").Service | import("@opencode/core/plugin/update").Service | import("@opencode/core/instance").Service | import("@opencode/core/bus").Service | import("@opencode/core/project").Service | SessionRestart.Service | import("@opencode/core/pty/ticket").Service | import("@opencode/core/session/transfer").Service | import("@opencode/core/location-activity").Service | import("@opencode/core/push/list").Service | import("@opencode/core/push/sender").Service | import("@opencode/core/filesystem/file-watch").Service | import("./pairing").Service>;
67
67
  }, Error, import("effect/Scope").Scope>;
68
68
  /**
69
69
  * Builds a web-standard fetch handler — `(request: Request) => Promise<Response>` — serving the