@opencode/server 2.0.16 → 2.0.17

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 (111) hide show
  1. package/dist/api.d.ts +9 -0
  2. package/dist/api.js +5 -5
  3. package/dist/auth.d.ts +4 -0
  4. package/dist/auth.js +10 -2
  5. package/dist/chunks/{auth-e3vgmqs2.js → handlers-140y8w7p.js} +2 -2
  6. package/dist/chunks/{auth-pqe05x32.js → handlers-26ta7ngt.js} +2 -2
  7. package/dist/chunks/{auth-vnsgjb6m.js → handlers-2ek8eabn.js} +3 -3
  8. package/dist/chunks/{auth-99sfd1j8.js → handlers-2sy3c7de.js} +7 -7
  9. package/dist/chunks/{auth-ahxdh0dq.js → handlers-367ngss7.js} +2 -2
  10. package/dist/chunks/{auth-d65y46ag.js → handlers-3kzx88w9.js} +1 -1
  11. package/dist/chunks/{auth-n0k9wajg.js → handlers-44xy5pnk.js} +1 -1
  12. package/dist/chunks/{auth-jd22znxy.js → handlers-5bwq5cz2.js} +2 -2
  13. package/dist/chunks/{auth-hrfm0p6n.js → handlers-5rwqcaw2.js} +1 -1
  14. package/dist/chunks/{auth-5w24ch67.js → handlers-5w24ch67.js} +1 -1
  15. package/dist/chunks/{auth-43k13dmj.js → handlers-6gkz39ey.js} +3 -3
  16. package/dist/chunks/{auth-fdfc8k8f.js → handlers-6qwktr1g.js} +1 -1
  17. package/dist/chunks/{auth-tsyxj4xh.js → handlers-7eckj7zq.js} +2 -2
  18. package/dist/chunks/{auth-vsmvcx85.js → handlers-96s6m0w3.js} +2 -2
  19. package/dist/chunks/handlers-anm12x33.js +66 -0
  20. package/dist/chunks/{auth-ybmm73jc.js → handlers-b1rdg9nf.js} +2 -2
  21. package/dist/chunks/{auth-y4j2wswm.js → handlers-bhrnjhj4.js} +7 -7
  22. package/dist/chunks/{auth-5frajas6.js → handlers-bmqkn4ah.js} +1 -1
  23. package/dist/chunks/{auth-jefcrg4z.js → handlers-bt9tc5rb.js} +1 -1
  24. package/dist/chunks/{auth-f2ryx3d8.js → handlers-ctscy0f5.js} +2 -2
  25. package/dist/chunks/{auth-1aa7fc0d.js → handlers-ees77nh9.js} +2 -2
  26. package/dist/chunks/{auth-kb2gw6wm.js → handlers-em4bkx9t.js} +4 -4
  27. package/dist/chunks/{auth-0xemx5a5.js → handlers-f05bgvye.js} +33 -33
  28. package/dist/chunks/{auth-50jg7xmc.js → handlers-f8rap8f6.js} +1 -1
  29. package/dist/chunks/{auth-m6wvgbfq.js → handlers-gtkdacvk.js} +28 -7
  30. package/dist/chunks/{auth-b6gan3yw.js → handlers-haswyr8z.js} +2 -2
  31. package/dist/chunks/{auth-83rfx0sp.js → handlers-hp5sxeae.js} +2 -2
  32. package/dist/chunks/{auth-qmx5gmxb.js → handlers-hr75rahr.js} +2 -2
  33. package/dist/chunks/handlers-j0xcyacv.js +53 -0
  34. package/dist/chunks/{auth-s4aja1df.js → handlers-mzr9gftb.js} +7 -7
  35. package/dist/chunks/{auth-bp2kj98m.js → handlers-np19kmxx.js} +2 -2
  36. package/dist/chunks/{auth-h91pzmtp.js → handlers-pme11y2y.js} +2 -2
  37. package/dist/chunks/{auth-eptkag0m.js → handlers-qj9kjxn3.js} +1 -1
  38. package/dist/chunks/{auth-9vrrrs57.js → handlers-rjqbhscq.js} +1 -1
  39. package/dist/chunks/{auth-v84hnbsb.js → handlers-s0padj6k.js} +3 -3
  40. package/dist/chunks/{auth-p0qxanbk.js → handlers-t88f2hhf.js} +3 -3
  41. package/dist/chunks/{auth-h1w0a8ky.js → handlers-v1emgcvb.js} +2 -2
  42. package/dist/chunks/{auth-2v3qky60.js → handlers-v573ws0d.js} +3 -3
  43. package/dist/chunks/{auth-mcn2wrk8.js → handlers-vdkg476e.js} +19 -15
  44. package/dist/chunks/{auth-s1rvn990.js → handlers-wv5twc2g.js} +8 -8
  45. package/dist/chunks/{auth-epwv4y6g.js → handlers-wz0qz28j.js} +2 -2
  46. package/dist/chunks/{auth-y07r8paj.js → handlers-x5ncpjy3.js} +1 -1
  47. package/dist/chunks/handlers-x6486bry.js +35 -0
  48. package/dist/chunks/{auth-7zxr3tkk.js → handlers-zpz5afwq.js} +2 -2
  49. package/dist/cors.js +1 -1
  50. package/dist/event-feed.js +5 -5
  51. package/dist/fetch.js +47 -46
  52. package/dist/handlers/agent.js +6 -6
  53. package/dist/handlers/command.js +6 -6
  54. package/dist/handlers/config.js +6 -6
  55. package/dist/handlers/credential.js +6 -6
  56. package/dist/handlers/debug.js +6 -6
  57. package/dist/handlers/event.js +7 -7
  58. package/dist/handlers/form.js +6 -6
  59. package/dist/handlers/fs.js +6 -6
  60. package/dist/handlers/generate.js +6 -6
  61. package/dist/handlers/integration.js +6 -6
  62. package/dist/handlers/location.js +6 -6
  63. package/dist/handlers/mcp.js +6 -6
  64. package/dist/handlers/message.js +6 -6
  65. package/dist/handlers/migration.js +6 -6
  66. package/dist/handlers/model.js +6 -6
  67. package/dist/handlers/permission.js +6 -6
  68. package/dist/handlers/persistent-pty.js +8 -8
  69. package/dist/handlers/plugin.js +6 -6
  70. package/dist/handlers/project.js +6 -6
  71. package/dist/handlers/provider.js +6 -6
  72. package/dist/handlers/pty-socket.js +1 -1
  73. package/dist/handlers/pty.js +9 -9
  74. package/dist/handlers/reference.js +6 -6
  75. package/dist/handlers/rpc.js +6 -6
  76. package/dist/handlers/server.d.ts +3 -1
  77. package/dist/handlers/server.js +9 -7
  78. package/dist/handlers/session-error.js +1 -1
  79. package/dist/handlers/session.js +6 -6
  80. package/dist/handlers/shell.js +6 -6
  81. package/dist/handlers/skill.js +6 -6
  82. package/dist/handlers/vcs.js +6 -6
  83. package/dist/handlers/websearch.js +6 -6
  84. package/dist/handlers/worktree.js +6 -6
  85. package/dist/handlers.d.ts +1 -1
  86. package/dist/handlers.js +43 -41
  87. package/dist/location.js +4 -4
  88. package/dist/middleware/authorization.d.ts +2 -1
  89. package/dist/middleware/authorization.js +5 -3
  90. package/dist/middleware/form-location.js +3 -3
  91. package/dist/middleware/schema-error.js +1 -1
  92. package/dist/middleware/session-location.js +3 -3
  93. package/dist/pairing.d.ts +13 -0
  94. package/dist/pairing.js +10 -0
  95. package/dist/process.js +54 -57
  96. package/dist/pty-environment.js +7 -7
  97. package/dist/request-tracing.js +1 -1
  98. package/dist/routes.d.ts +3 -2
  99. package/dist/routes.js +46 -45
  100. package/dist/server-info.js +5 -5
  101. package/dist/service-status.js +1 -1
  102. package/dist/workerd.js +48 -47
  103. package/package.json +8 -8
  104. package/dist/chunks/auth-qh9c2857.js +0 -21
  105. package/dist/chunks/auth-zyv89x5n.js +0 -30
  106. /package/dist/chunks/{auth-9rqn6x4v.js → handlers-9rqn6x4v.js} +0 -0
  107. /package/dist/chunks/{auth-hezj1jdf.js → handlers-hezj1jdf.js} +0 -0
  108. /package/dist/chunks/{auth-q4bn6dy8.js → handlers-q4bn6dy8.js} +0 -0
  109. /package/dist/chunks/{auth-smaf4a18.js → handlers-smaf4a18.js} +0 -0
  110. /package/dist/chunks/{auth-t8yzmczr.js → handlers-t8yzmczr.js} +0 -0
  111. /package/dist/chunks/{auth-yc7nft6q.js → handlers-yc7nft6q.js} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  missingMessage2,
4
4
  failedMessageDecode2,
5
5
  failedSnapshot2
6
- } from "../chunks/auth-smaf4a18.js";
6
+ } from "../chunks/handlers-smaf4a18.js";
7
7
  export {
8
8
  failedMessageDecode2 as failedMessageDecode,
9
9
  failedSnapshot2 as failedSnapshot,
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  SessionHandler2
3
- } from "../chunks/auth-ahxdh0dq.js";
4
- import"../chunks/auth-2v3qky60.js";
5
- import"../chunks/auth-d65y46ag.js";
6
- import"../chunks/auth-hrfm0p6n.js";
7
- import"../chunks/auth-43k13dmj.js";
8
- import"../chunks/auth-smaf4a18.js";
3
+ } from "../chunks/handlers-367ngss7.js";
4
+ import"../chunks/handlers-v573ws0d.js";
5
+ import"../chunks/handlers-5rwqcaw2.js";
6
+ import"../chunks/handlers-3kzx88w9.js";
7
+ import"../chunks/handlers-6gkz39ey.js";
8
+ import"../chunks/handlers-smaf4a18.js";
9
9
  export {
10
10
  SessionHandler2 as SessionHandler
11
11
  };
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  ShellHandler2
3
- } from "../chunks/auth-tsyxj4xh.js";
4
- import"../chunks/auth-2v3qky60.js";
5
- import"../chunks/auth-d65y46ag.js";
6
- import"../chunks/auth-hrfm0p6n.js";
7
- import"../chunks/auth-43k13dmj.js";
8
- import"../chunks/auth-smaf4a18.js";
3
+ } from "../chunks/handlers-7eckj7zq.js";
4
+ import"../chunks/handlers-v573ws0d.js";
5
+ import"../chunks/handlers-5rwqcaw2.js";
6
+ import"../chunks/handlers-3kzx88w9.js";
7
+ import"../chunks/handlers-6gkz39ey.js";
8
+ import"../chunks/handlers-smaf4a18.js";
9
9
  export {
10
10
  ShellHandler2 as ShellHandler
11
11
  };
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  SkillHandler2
3
- } from "../chunks/auth-83rfx0sp.js";
4
- import"../chunks/auth-2v3qky60.js";
5
- import"../chunks/auth-d65y46ag.js";
6
- import"../chunks/auth-hrfm0p6n.js";
7
- import"../chunks/auth-43k13dmj.js";
8
- import"../chunks/auth-smaf4a18.js";
3
+ } from "../chunks/handlers-hp5sxeae.js";
4
+ import"../chunks/handlers-v573ws0d.js";
5
+ import"../chunks/handlers-5rwqcaw2.js";
6
+ import"../chunks/handlers-3kzx88w9.js";
7
+ import"../chunks/handlers-6gkz39ey.js";
8
+ import"../chunks/handlers-smaf4a18.js";
9
9
  export {
10
10
  SkillHandler2 as SkillHandler
11
11
  };
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  VcsHandler2
3
- } from "../chunks/auth-7zxr3tkk.js";
4
- import"../chunks/auth-2v3qky60.js";
5
- import"../chunks/auth-d65y46ag.js";
6
- import"../chunks/auth-hrfm0p6n.js";
7
- import"../chunks/auth-43k13dmj.js";
8
- import"../chunks/auth-smaf4a18.js";
3
+ } from "../chunks/handlers-zpz5afwq.js";
4
+ import"../chunks/handlers-v573ws0d.js";
5
+ import"../chunks/handlers-5rwqcaw2.js";
6
+ import"../chunks/handlers-3kzx88w9.js";
7
+ import"../chunks/handlers-6gkz39ey.js";
8
+ import"../chunks/handlers-smaf4a18.js";
9
9
  export {
10
10
  VcsHandler2 as VcsHandler
11
11
  };
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  WebSearchHandler2
3
- } from "../chunks/auth-h1w0a8ky.js";
4
- import"../chunks/auth-2v3qky60.js";
5
- import"../chunks/auth-d65y46ag.js";
6
- import"../chunks/auth-hrfm0p6n.js";
7
- import"../chunks/auth-43k13dmj.js";
8
- import"../chunks/auth-smaf4a18.js";
3
+ } from "../chunks/handlers-v1emgcvb.js";
4
+ import"../chunks/handlers-v573ws0d.js";
5
+ import"../chunks/handlers-5rwqcaw2.js";
6
+ import"../chunks/handlers-3kzx88w9.js";
7
+ import"../chunks/handlers-6gkz39ey.js";
8
+ import"../chunks/handlers-smaf4a18.js";
9
9
  export {
10
10
  WebSearchHandler2 as WebSearchHandler
11
11
  };
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  WorktreeHandler2
3
- } from "../chunks/auth-jefcrg4z.js";
4
- import"../chunks/auth-2v3qky60.js";
5
- import"../chunks/auth-d65y46ag.js";
6
- import"../chunks/auth-hrfm0p6n.js";
7
- import"../chunks/auth-43k13dmj.js";
8
- import"../chunks/auth-smaf4a18.js";
3
+ } from "../chunks/handlers-bt9tc5rb.js";
4
+ import"../chunks/handlers-v573ws0d.js";
5
+ import"../chunks/handlers-5rwqcaw2.js";
6
+ import"../chunks/handlers-3kzx88w9.js";
7
+ import"../chunks/handlers-6gkz39ey.js";
8
+ import"../chunks/handlers-smaf4a18.js";
9
9
  export {
10
10
  WorktreeHandler2 as WorktreeHandler
11
11
  };
@@ -1,2 +1,2 @@
1
1
  import { Layer } from "effect";
2
- export declare const handlers: Layer.Layer<import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.generate"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.message"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.model"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.provider"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.session"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.permission"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.fs"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.form"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.command"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.skill"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.rpc"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.event"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.agent"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.plugin"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.server"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.debug"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.pty"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.experimental"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.shell"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.reference"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.location"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.integration"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.websearch"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.mcp"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.credential"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.project"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.worktree"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.vcs"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.migration"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.config">, never, import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization | import("@opencode/util/global").Service | import("@opencode/core/bus").Service | import("@opencode/core/persistent-pty/index").Service | import("@opencode/core/location-service-map").Service | import("@opencode/core/session").Service | import("@opencode/core/worktree").Service | import("@opencode/core/instance").Service | import("./location").LocationMiddleware | import("./middleware/form-location").FormLocationMiddleware | import("./middleware/session-location").SessionLocationMiddleware | import("@opencode/core/pty/ticket").Service | import("@opencode/core/session/transfer").Service | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/database/database").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/permission/saved").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/plugin/update").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("./server-info").Service> | import("./pty-environment").Service | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/wellknown").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/credential").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/project").Service>>;
2
+ export declare const handlers: Layer.Layer<import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.generate"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.message"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.model"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.provider"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.session"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.permission"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.fs"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.form"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.command"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.skill"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.rpc"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.event"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.agent"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.plugin"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.server"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.debug"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.pty"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.experimental"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.shell"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.reference"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.location"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.integration"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.websearch"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.mcp"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.credential"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.project"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.worktree"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.vcs"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.migration"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.config">, never, import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization | import("@opencode/util/global").Service | import("@opencode/core/bus").Service | import("@opencode/core/persistent-pty/index").Service | import("@opencode/core/location-service-map").Service | import("@opencode/core/session").Service | import("@opencode/core/worktree").Service | import("@opencode/core/instance").Service | import("./location").LocationMiddleware | import("./middleware/form-location").FormLocationMiddleware | import("./middleware/session-location").SessionLocationMiddleware | import("./auth").Config | import("@opencode/core/pty/ticket").Service | import("@opencode/core/session/transfer").Service | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/database/database").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/permission/saved").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/plugin/update").Service> | import("./pairing").Service | import("effect/unstable/http/HttpRouter").Request<"Requires", import("./server-info").Service> | import("./pty-environment").Service | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/wellknown").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/credential").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/project").Service>>;
package/dist/handlers.js CHANGED
@@ -1,46 +1,48 @@
1
1
  import {
2
2
  handlers2
3
- } from "./chunks/auth-0xemx5a5.js";
4
- import"./chunks/auth-b6gan3yw.js";
5
- import"./chunks/auth-jefcrg4z.js";
6
- import"./chunks/auth-fdfc8k8f.js";
7
- import"./chunks/auth-f2ryx3d8.js";
8
- import"./chunks/auth-ybmm73jc.js";
9
- import"./chunks/auth-epwv4y6g.js";
10
- import"./chunks/auth-p0qxanbk.js";
11
- import"./chunks/auth-7zxr3tkk.js";
12
- import"./chunks/auth-v84hnbsb.js";
13
- import"./chunks/auth-50jg7xmc.js";
14
- import"./chunks/auth-vsmvcx85.js";
15
- import"./chunks/auth-h91pzmtp.js";
16
- import"./chunks/auth-kb2gw6wm.js";
17
- import"./chunks/auth-1aa7fc0d.js";
18
- import"./chunks/auth-9vrrrs57.js";
19
- import"./chunks/auth-bp2kj98m.js";
20
- import"./chunks/auth-e3vgmqs2.js";
21
- import"./chunks/auth-eptkag0m.js";
22
- import"./chunks/auth-83rfx0sp.js";
23
- import"./chunks/auth-y07r8paj.js";
24
- import"./chunks/auth-h1w0a8ky.js";
25
- import"./chunks/auth-ahxdh0dq.js";
26
- import"./chunks/auth-y4j2wswm.js";
27
- import"./chunks/auth-hezj1jdf.js";
28
- import"./chunks/auth-jd22znxy.js";
29
- import"./chunks/auth-5frajas6.js";
30
- import"./chunks/auth-pqe05x32.js";
31
- import"./chunks/auth-qmx5gmxb.js";
32
- import"./chunks/auth-qh9c2857.js";
33
- import"./chunks/auth-tsyxj4xh.js";
34
- import"./chunks/auth-s4aja1df.js";
35
- import"./chunks/auth-n0k9wajg.js";
36
- import"./chunks/auth-2v3qky60.js";
37
- import"./chunks/auth-d65y46ag.js";
38
- import"./chunks/auth-hrfm0p6n.js";
39
- import"./chunks/auth-43k13dmj.js";
40
- import"./chunks/auth-smaf4a18.js";
41
- import"./chunks/auth-q4bn6dy8.js";
42
- import"./chunks/auth-s1rvn990.js";
43
- import"./chunks/auth-99sfd1j8.js";
3
+ } from "./chunks/handlers-f05bgvye.js";
4
+ import"./chunks/handlers-t88f2hhf.js";
5
+ import"./chunks/handlers-s0padj6k.js";
6
+ import"./chunks/handlers-qj9kjxn3.js";
7
+ import"./chunks/handlers-7eckj7zq.js";
8
+ import"./chunks/handlers-hr75rahr.js";
9
+ import"./chunks/handlers-367ngss7.js";
10
+ import"./chunks/handlers-rjqbhscq.js";
11
+ import"./chunks/handlers-em4bkx9t.js";
12
+ import"./chunks/handlers-44xy5pnk.js";
13
+ import"./chunks/handlers-96s6m0w3.js";
14
+ import"./chunks/handlers-f8rap8f6.js";
15
+ import"./chunks/handlers-bmqkn4ah.js";
16
+ import"./chunks/handlers-b1rdg9nf.js";
17
+ import"./chunks/handlers-haswyr8z.js";
18
+ import"./chunks/handlers-6qwktr1g.js";
19
+ import"./chunks/handlers-ees77nh9.js";
20
+ import"./chunks/handlers-140y8w7p.js";
21
+ import"./chunks/handlers-pme11y2y.js";
22
+ import"./chunks/handlers-zpz5afwq.js";
23
+ import"./chunks/handlers-v1emgcvb.js";
24
+ import"./chunks/handlers-x5ncpjy3.js";
25
+ import"./chunks/handlers-hp5sxeae.js";
26
+ import"./chunks/handlers-np19kmxx.js";
27
+ import"./chunks/handlers-bhrnjhj4.js";
28
+ import"./chunks/handlers-26ta7ngt.js";
29
+ import"./chunks/handlers-5bwq5cz2.js";
30
+ import"./chunks/handlers-bt9tc5rb.js";
31
+ import"./chunks/handlers-wz0qz28j.js";
32
+ import"./chunks/handlers-j0xcyacv.js";
33
+ import"./chunks/handlers-hezj1jdf.js";
34
+ import"./chunks/handlers-ctscy0f5.js";
35
+ import"./chunks/handlers-q4bn6dy8.js";
36
+ import"./chunks/handlers-2sy3c7de.js";
37
+ import"./chunks/handlers-mzr9gftb.js";
38
+ import"./chunks/handlers-v573ws0d.js";
39
+ import"./chunks/handlers-5rwqcaw2.js";
40
+ import"./chunks/handlers-3kzx88w9.js";
41
+ import"./chunks/handlers-6gkz39ey.js";
42
+ import"./chunks/handlers-smaf4a18.js";
43
+ import"./chunks/handlers-x6486bry.js";
44
+ import"./chunks/handlers-anm12x33.js";
45
+ import"./chunks/handlers-wv5twc2g.js";
44
46
  export {
45
47
  handlers2 as handlers
46
48
  };
package/dist/location.js CHANGED
@@ -3,12 +3,12 @@ import {
3
3
  response2,
4
4
  sessionInfo2,
5
5
  requestRef2,
6
- layer3
7
- } from "./chunks/auth-43k13dmj.js";
8
- import"./chunks/auth-smaf4a18.js";
6
+ layer4
7
+ } from "./chunks/handlers-6gkz39ey.js";
8
+ import"./chunks/handlers-smaf4a18.js";
9
9
  export {
10
10
  LocationMiddleware2 as LocationMiddleware,
11
- layer3 as layer,
11
+ layer4 as layer,
12
12
  requestRef2 as requestRef,
13
13
  response2 as response,
14
14
  sessionInfo2 as sessionInfo
@@ -2,6 +2,7 @@ import { ServerAuth } from "../auth";
2
2
  import { Authorization } from "@opencode/protocol/middleware/authorization";
3
3
  export { Authorization } from "@opencode/protocol/middleware/authorization";
4
4
  import { Effect, Layer } from "effect";
5
- import { HttpServerRequest } from "effect/unstable/http";
5
+ import { HttpServerRequest, HttpServerResponse } from "effect/unstable/http";
6
+ export declare function unauthorizedResponse(request: HttpServerRequest.HttpServerRequest): HttpServerResponse.HttpServerResponse;
6
7
  export declare function authorizedRequest(request: HttpServerRequest.HttpServerRequest, config: ServerAuth.Info): Effect.Effect<boolean, never, never>;
7
8
  export declare const authorizationLayer: Layer.Layer<Authorization, never, ServerAuth.Config>;
@@ -1,11 +1,13 @@
1
1
  import {
2
+ unauthorizedResponse2,
2
3
  authorizedRequest2,
3
4
  authorizationLayer2,
4
5
  Authorization2
5
- } from "../chunks/auth-m6wvgbfq.js";
6
- import"../chunks/auth-zyv89x5n.js";
6
+ } from "../chunks/handlers-gtkdacvk.js";
7
+ import"../chunks/handlers-anm12x33.js";
7
8
  export {
8
9
  Authorization2 as Authorization,
9
10
  authorizationLayer2 as authorizationLayer,
10
- authorizedRequest2 as authorizedRequest
11
+ authorizedRequest2 as authorizedRequest,
12
+ unauthorizedResponse2 as unauthorizedResponse
11
13
  };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  FormLocationMiddleware2,
3
3
  formLocationLayer2
4
- } from "../chunks/auth-hrfm0p6n.js";
5
- import"../chunks/auth-43k13dmj.js";
6
- import"../chunks/auth-smaf4a18.js";
4
+ } from "../chunks/handlers-5rwqcaw2.js";
5
+ import"../chunks/handlers-6gkz39ey.js";
6
+ import"../chunks/handlers-smaf4a18.js";
7
7
  export {
8
8
  FormLocationMiddleware2 as FormLocationMiddleware,
9
9
  formLocationLayer2 as formLocationLayer
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  schemaErrorLayer2,
3
3
  SchemaErrorMiddleware2
4
- } from "../chunks/auth-t8yzmczr.js";
4
+ } from "../chunks/handlers-t8yzmczr.js";
5
5
  export {
6
6
  SchemaErrorMiddleware2 as SchemaErrorMiddleware,
7
7
  schemaErrorLayer2 as schemaErrorLayer
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  SessionLocationMiddleware2,
3
3
  sessionLocationLayer2
4
- } from "../chunks/auth-d65y46ag.js";
5
- import"../chunks/auth-43k13dmj.js";
6
- import"../chunks/auth-smaf4a18.js";
4
+ } from "../chunks/handlers-3kzx88w9.js";
5
+ import"../chunks/handlers-6gkz39ey.js";
6
+ import"../chunks/handlers-smaf4a18.js";
7
7
  export {
8
8
  SessionLocationMiddleware2 as SessionLocationMiddleware,
9
9
  sessionLocationLayer2 as sessionLocationLayer
@@ -0,0 +1,13 @@
1
+ export * as ServerPairing from "./pairing";
2
+ import { Context, Effect } from "effect";
3
+ export interface Interface {
4
+ readonly issue: () => Effect.Effect<{
5
+ readonly code: string;
6
+ readonly expires_in: number;
7
+ }>;
8
+ readonly consume: (code: string) => Effect.Effect<boolean>;
9
+ }
10
+ declare const Service_base: Context.ServiceClass<Service, "@opencode/ServerPairing", Interface>;
11
+ export declare class Service extends Service_base {
12
+ }
13
+ export declare const node: import("@opencode/util/effect/layer-node").Provider<Service, never, import("@opencode/util/effect/layer-node").Tag<"global">>;
@@ -0,0 +1,10 @@
1
+ import {
2
+ Service4,
3
+ node2,
4
+ exports_pairing
5
+ } from "./chunks/handlers-x6486bry.js";
6
+ export {
7
+ exports_pairing as ServerPairing,
8
+ Service4 as Service,
9
+ node2 as node
10
+ };
package/dist/process.js CHANGED
@@ -1,67 +1,69 @@
1
1
  import {
2
2
  Config2
3
- } from "./chunks/auth-zyv89x5n.js";
3
+ } from "./chunks/handlers-anm12x33.js";
4
4
  import {
5
5
  isAllowedCorsOrigin2
6
- } from "./chunks/auth-q4bn6dy8.js";
6
+ } from "./chunks/handlers-q4bn6dy8.js";
7
7
  import {
8
+ unauthorizedResponse2,
8
9
  authorizedRequest2
9
- } from "./chunks/auth-m6wvgbfq.js";
10
+ } from "./chunks/handlers-gtkdacvk.js";
10
11
  import {
11
12
  withoutParentSpan2
12
- } from "./chunks/auth-yc7nft6q.js";
13
- import"./chunks/auth-smaf4a18.js";
14
- import"./chunks/auth-43k13dmj.js";
15
- import"./chunks/auth-hrfm0p6n.js";
16
- import"./chunks/auth-d65y46ag.js";
17
- import"./chunks/auth-2v3qky60.js";
18
- import"./chunks/auth-9vrrrs57.js";
19
- import"./chunks/auth-pqe05x32.js";
20
- import"./chunks/auth-ybmm73jc.js";
21
- import"./chunks/auth-b6gan3yw.js";
22
- import"./chunks/auth-ahxdh0dq.js";
23
- import"./chunks/auth-p0qxanbk.js";
24
- import"./chunks/auth-vsmvcx85.js";
25
- import"./chunks/auth-1aa7fc0d.js";
26
- import"./chunks/auth-h91pzmtp.js";
27
- import"./chunks/auth-83rfx0sp.js";
28
- import"./chunks/auth-50jg7xmc.js";
29
- import"./chunks/auth-99sfd1j8.js";
30
- import"./chunks/auth-kb2gw6wm.js";
31
- import"./chunks/auth-f2ryx3d8.js";
32
- import"./chunks/auth-qmx5gmxb.js";
13
+ } from "./chunks/handlers-yc7nft6q.js";
14
+ import"./chunks/handlers-smaf4a18.js";
15
+ import"./chunks/handlers-6gkz39ey.js";
16
+ import"./chunks/handlers-5rwqcaw2.js";
17
+ import"./chunks/handlers-3kzx88w9.js";
18
+ import"./chunks/handlers-v573ws0d.js";
19
+ import"./chunks/handlers-rjqbhscq.js";
20
+ import"./chunks/handlers-26ta7ngt.js";
21
+ import"./chunks/handlers-b1rdg9nf.js";
22
+ import"./chunks/handlers-haswyr8z.js";
23
+ import"./chunks/handlers-367ngss7.js";
24
+ import"./chunks/handlers-t88f2hhf.js";
25
+ import"./chunks/handlers-96s6m0w3.js";
26
+ import"./chunks/handlers-ees77nh9.js";
27
+ import"./chunks/handlers-pme11y2y.js";
28
+ import"./chunks/handlers-hp5sxeae.js";
29
+ import"./chunks/handlers-f8rap8f6.js";
30
+ import"./chunks/handlers-2sy3c7de.js";
31
+ import"./chunks/handlers-em4bkx9t.js";
32
+ import"./chunks/handlers-ctscy0f5.js";
33
+ import"./chunks/handlers-hr75rahr.js";
33
34
  import {
34
35
  connectionURLs2
35
- } from "./chunks/auth-s4aja1df.js";
36
- import"./chunks/auth-qh9c2857.js";
37
- import"./chunks/auth-e3vgmqs2.js";
38
- import"./chunks/auth-s1rvn990.js";
39
- import"./chunks/auth-hezj1jdf.js";
40
- import"./chunks/auth-y4j2wswm.js";
41
- import"./chunks/auth-v84hnbsb.js";
42
- import"./chunks/auth-tsyxj4xh.js";
43
- import"./chunks/auth-jd22znxy.js";
44
- import"./chunks/auth-y07r8paj.js";
45
- import"./chunks/auth-bp2kj98m.js";
46
- import"./chunks/auth-h1w0a8ky.js";
47
- import"./chunks/auth-epwv4y6g.js";
48
- import"./chunks/auth-n0k9wajg.js";
49
- import"./chunks/auth-eptkag0m.js";
50
- import"./chunks/auth-jefcrg4z.js";
51
- import"./chunks/auth-7zxr3tkk.js";
52
- import"./chunks/auth-5frajas6.js";
53
- import"./chunks/auth-fdfc8k8f.js";
54
- import"./chunks/auth-0xemx5a5.js";
55
- import"./chunks/auth-t8yzmczr.js";
36
+ } from "./chunks/handlers-mzr9gftb.js";
37
+ import"./chunks/handlers-x6486bry.js";
38
+ import"./chunks/handlers-j0xcyacv.js";
39
+ import"./chunks/handlers-140y8w7p.js";
40
+ import"./chunks/handlers-wv5twc2g.js";
41
+ import"./chunks/handlers-hezj1jdf.js";
42
+ import"./chunks/handlers-bhrnjhj4.js";
43
+ import"./chunks/handlers-s0padj6k.js";
44
+ import"./chunks/handlers-7eckj7zq.js";
45
+ import"./chunks/handlers-5bwq5cz2.js";
46
+ import"./chunks/handlers-x5ncpjy3.js";
47
+ import"./chunks/handlers-np19kmxx.js";
48
+ import"./chunks/handlers-v1emgcvb.js";
49
+ import"./chunks/handlers-wz0qz28j.js";
50
+ import"./chunks/handlers-44xy5pnk.js";
51
+ import"./chunks/handlers-qj9kjxn3.js";
52
+ import"./chunks/handlers-bt9tc5rb.js";
53
+ import"./chunks/handlers-zpz5afwq.js";
54
+ import"./chunks/handlers-bmqkn4ah.js";
55
+ import"./chunks/handlers-6qwktr1g.js";
56
+ import"./chunks/handlers-f05bgvye.js";
57
+ import"./chunks/handlers-t8yzmczr.js";
56
58
  import {
57
59
  createRoutes2
58
- } from "./chunks/auth-mcn2wrk8.js";
60
+ } from "./chunks/handlers-vdkg476e.js";
59
61
  import {
60
62
  make3
61
- } from "./chunks/auth-5w24ch67.js";
63
+ } from "./chunks/handlers-5w24ch67.js";
62
64
  import {
63
65
  __export
64
- } from "./chunks/auth-9rqn6x4v.js";
66
+ } from "./chunks/handlers-9rqn6x4v.js";
65
67
 
66
68
  // src/process.ts
67
69
  var exports_process = {};
@@ -75,6 +77,7 @@ import { SessionRestart } from "@opencode/core/session/execution/restart";
75
77
  import { InstallationEvent } from "@opencode/schema/installation-event";
76
78
  import { hasPtyConnectTicketURL } from "@opencode/protocol/groups/pty";
77
79
  import { hasPersistentPtyConnectTicketURL } from "@opencode/protocol/groups/persistent-pty";
80
+ import { isPairingConnectURL } from "@opencode/protocol/groups/server";
78
81
  import { Global } from "@opencode/util/global";
79
82
  import { Cause, Context, Effect, Exit, Latch, Layer, Option, Ref, Scope } from "effect";
80
83
  import { HttpMiddleware, HttpRouter, HttpServerRequest, HttpServerResponse } from "effect/unstable/http";
@@ -164,22 +167,16 @@ function dispatch(password, status, application, version, urls, tmp) {
164
167
  const ready = state.type === "ready" && Option.isSome(app);
165
168
  if (request.method === "GET" && url.pathname === "/api/info" && !ready) {
166
169
  if (!(yield* authorizedRequest2(request, auth)))
167
- return unauthorized();
170
+ return unauthorizedResponse2(request);
168
171
  return yield* infoResponse(status, version, urls, tmp);
169
172
  }
170
- if ((!ready || !hasPtyConnectTicketURL(url) && !hasPersistentPtyConnectTicketURL(url)) && !(yield* authorizedRequest2(request, auth)))
171
- return unauthorized();
173
+ if (!isPairingConnectURL(url) && (!ready || !hasPtyConnectTicketURL(url) && !hasPersistentPtyConnectTicketURL(url)) && !(yield* authorizedRequest2(request, auth)))
174
+ return unauthorizedResponse2(request);
172
175
  if (ready)
173
176
  return yield* app.value;
174
177
  return unavailable(state);
175
178
  });
176
179
  }
177
- function unauthorized() {
178
- return HttpServerResponse.empty({
179
- status: 401,
180
- headers: { "www-authenticate": 'Basic realm="Secure Area"' }
181
- });
182
- }
183
180
  var infoResponse = Effect.fnUntraced(function* (status, version, urls, tmp) {
184
181
  const state = yield* status.current;
185
182
  return HttpServerResponse.jsonUnsafe({ version, pid: process.pid, urls: urls(), paths: { tmp } }, {
@@ -1,12 +1,12 @@
1
1
  import {
2
- Service3,
3
- layer4,
4
- node2,
2
+ Service5,
3
+ layer5,
4
+ node3,
5
5
  exports_pty_environment
6
- } from "./chunks/auth-s1rvn990.js";
6
+ } from "./chunks/handlers-wv5twc2g.js";
7
7
  export {
8
8
  exports_pty_environment as PtyEnvironment,
9
- Service3 as Service,
10
- layer4 as layer,
11
- node2 as node
9
+ Service5 as Service,
10
+ layer5 as layer,
11
+ node3 as node
12
12
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withoutParentSpan2
3
- } from "./chunks/auth-yc7nft6q.js";
3
+ } from "./chunks/handlers-yc7nft6q.js";
4
4
  export {
5
5
  withoutParentSpan2 as withoutParentSpan
6
6
  };
package/dist/routes.d.ts CHANGED
@@ -23,8 +23,9 @@ import { Workspace } from "@opencode/core/workspace";
23
23
  import { HttpRouter } from "effect/unstable/http";
24
24
  import { Layer } from "effect";
25
25
  import { PtyEnvironment } from "./pty-environment";
26
+ import { ServerPairing } from "./pairing";
26
27
  import type { ServerOptions } from "./options";
27
- export declare function createRoutes(options?: ServerOptions, serviceURLs?: () => ReadonlyArray<string>, overrides?: LayerNode.Replacements): Layer.Layer<Global.Service | Database.Service | Bus.Service | import("effect/unstable/http/HttpClient").HttpClient | Project.Service | Credential.Service | WellKnown.Service | Workspace.Service | PermissionSaved.Service | PersistentPty.Service | LocationServiceMap.Service | SdkPlugins.Service | PluginUpdate.Service | Job.Service | Session.Service | Worktree.Service | Instance.Service | SessionRestart.Service | PtyTicket.Service | SessionTransfer.Service | LocationActivity.Service | PtyEnvironment.Service | HttpRouter.HttpRouter, Error | PersistentPty.UnavailableError, import("effect/FileSystem").FileSystem | import("effect/Path").Path | import("effect/unstable/http/Etag").Generator | import("effect/unstable/http/HttpPlatform").HttpPlatform>;
28
+ export declare function createRoutes(options?: ServerOptions, serviceURLs?: () => ReadonlyArray<string>, overrides?: LayerNode.Replacements): Layer.Layer<Global.Service | Database.Service | Bus.Service | import("effect/unstable/http/HttpClient").HttpClient | Project.Service | Credential.Service | WellKnown.Service | Workspace.Service | PermissionSaved.Service | PersistentPty.Service | LocationServiceMap.Service | SdkPlugins.Service | PluginUpdate.Service | Job.Service | Session.Service | Worktree.Service | Instance.Service | SessionRestart.Service | PtyTicket.Service | SessionTransfer.Service | LocationActivity.Service | ServerPairing.Service | PtyEnvironment.Service | HttpRouter.HttpRouter, Error | PersistentPty.UnavailableError, import("effect/FileSystem").FileSystem | import("effect/Path").Path | import("effect/unstable/http/Etag").Generator | import("effect/unstable/http/HttpPlatform").HttpPlatform>;
28
29
  type InstanceNode = (replacements: () => LayerNode.Replacements) => LayerNode.Provider<Instance.Service, never, typeof Node.tags.values.global>;
29
- export declare function createEmbeddedRoutes(options?: ServerOptions, overrides?: LayerNode.Replacements, instances?: InstanceNode): Layer.Layer<Global.Service | Database.Service | Bus.Service | import("effect/unstable/http/HttpClient").HttpClient | Project.Service | Credential.Service | WellKnown.Service | Workspace.Service | PermissionSaved.Service | PersistentPty.Service | LocationServiceMap.Service | SdkPlugins.Service | PluginUpdate.Service | Job.Service | Session.Service | Worktree.Service | Instance.Service | SessionRestart.Service | PtyTicket.Service | SessionTransfer.Service | LocationActivity.Service | PtyEnvironment.Service | HttpRouter.HttpRouter, Error | PersistentPty.UnavailableError, import("effect/FileSystem").FileSystem | import("effect/Path").Path | import("effect/unstable/http/Etag").Generator | import("effect/unstable/http/HttpPlatform").HttpPlatform>;
30
+ export declare function createEmbeddedRoutes(options?: ServerOptions, overrides?: LayerNode.Replacements, instances?: InstanceNode): Layer.Layer<Global.Service | Database.Service | Bus.Service | import("effect/unstable/http/HttpClient").HttpClient | Project.Service | Credential.Service | WellKnown.Service | Workspace.Service | PermissionSaved.Service | PersistentPty.Service | LocationServiceMap.Service | SdkPlugins.Service | PluginUpdate.Service | Job.Service | Session.Service | Worktree.Service | Instance.Service | SessionRestart.Service | PtyTicket.Service | SessionTransfer.Service | LocationActivity.Service | ServerPairing.Service | PtyEnvironment.Service | HttpRouter.HttpRouter, Error | PersistentPty.UnavailableError, import("effect/FileSystem").FileSystem | import("effect/Path").Path | import("effect/unstable/http/Etag").Generator | import("effect/unstable/http/HttpPlatform").HttpPlatform>;
30
31
  export {};