@opencode/server 0.0.0-dev-20783 → 0.0.0-dev-20786

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/dist/api.d.ts +13 -13
  2. package/dist/api.js +5 -5
  3. package/dist/auth.js +1 -1
  4. package/dist/chunks/{service-status-j87rfkvt.js → cors-00mapsdc.js} +4 -4
  5. package/dist/chunks/{service-status-jskw5q1g.js → cors-0b39h07j.js} +2 -2
  6. package/dist/chunks/{service-status-da5stqtt.js → cors-0q1fp77w.js} +2 -2
  7. package/dist/chunks/{service-status-zhqf1t9m.js → cors-10bq7mg4.js} +2 -2
  8. package/dist/chunks/{service-status-0b1t2b2s.js → cors-13tvbs17.js} +3 -3
  9. package/dist/chunks/{service-status-j54drd5e.js → cors-19taf7de.js} +2 -2
  10. package/dist/chunks/{service-status-np6fwbmz.js → cors-1tk2rec1.js} +30 -29
  11. package/dist/chunks/{service-status-mhyatxpf.js → cors-1x5dvcb3.js} +18 -18
  12. package/dist/chunks/{service-status-5fmydwgy.js → cors-360ay1ws.js} +2 -2
  13. package/dist/chunks/{service-status-pg3sqc69.js → cors-44qh4kfc.js} +4 -4
  14. package/dist/chunks/{service-status-2vy10eeh.js → cors-4r8g7rwq.js} +3 -3
  15. package/dist/chunks/{service-status-gtkdacvk.js → cors-5ytyqf1q.js} +5 -4
  16. package/dist/chunks/{service-status-9m28rhbj.js → cors-72xpy55t.js} +6 -6
  17. package/dist/chunks/{service-status-62qjgyra.js → cors-735x1s0d.js} +3 -3
  18. package/dist/chunks/{service-status-30gqa6y8.js → cors-73mn2n3x.js} +4 -4
  19. package/dist/chunks/{service-status-q4y3mw2d.js → cors-8cnxq26y.js} +3 -3
  20. package/dist/chunks/{service-status-j8182e46.js → cors-8d0mn004.js} +3 -3
  21. package/dist/chunks/{service-status-bptmkrac.js → cors-9e4rhycp.js} +3 -3
  22. package/dist/chunks/{service-status-anm12x33.js → cors-anm12x33.js} +1 -1
  23. package/dist/chunks/{service-status-bkk2wfbz.js → cors-bkk2wfbz.js} +1 -1
  24. package/dist/chunks/{service-status-fsrvj92d.js → cors-bwz286mg.js} +3 -3
  25. package/dist/chunks/{service-status-sstsrjtg.js → cors-byt4hbw9.js} +7 -7
  26. package/dist/chunks/{service-status-jy5syrnz.js → cors-drahxf95.js} +30 -34
  27. package/dist/chunks/{service-status-t8yzmczr.js → cors-erzfdgke.js} +1 -1
  28. package/dist/chunks/{service-status-w8db1rkr.js → cors-f3xezvck.js} +3 -3
  29. package/dist/chunks/{service-status-s07e4y6n.js → cors-g0rzwe5g.js} +7 -7
  30. package/dist/chunks/{service-status-ep84ha6r.js → cors-h2a6nn7k.js} +3 -3
  31. package/dist/chunks/cors-h6rt5k9s.js +24 -0
  32. package/dist/chunks/{service-status-m9wzfeff.js → cors-j03v2rh9.js} +3 -3
  33. package/dist/chunks/{service-status-qcy0p5fz.js → cors-jphw74cq.js} +3 -3
  34. package/dist/chunks/{service-status-nvmdgpqv.js → cors-nqswsw3h.js} +3 -3
  35. package/dist/chunks/{service-status-swb5yrqf.js → cors-p177e0cw.js} +3 -3
  36. package/dist/chunks/{service-status-srcrrwjk.js → cors-qggsn6y0.js} +3 -3
  37. package/dist/chunks/{service-status-zytx35xb.js → cors-r5pmcrqb.js} +10 -10
  38. package/dist/chunks/{service-status-99sfd1j8.js → cors-rjpqaa8h.js} +7 -7
  39. package/dist/chunks/{service-status-mpbfcr4e.js → cors-s1824482.js} +3 -3
  40. package/dist/chunks/{service-status-ccfecbt4.js → cors-tr76qvg4.js} +2 -2
  41. package/dist/chunks/{service-status-d00srfh1.js → cors-ty73jqxf.js} +3 -3
  42. package/dist/chunks/{service-status-nxdx74sv.js → cors-vw0q3knq.js} +3 -3
  43. package/dist/chunks/{service-status-3c937re8.js → cors-x5jn5rep.js} +3 -3
  44. package/dist/chunks/{service-status-xsrtpxyd.js → cors-xsrtpxyd.js} +1 -1
  45. package/dist/chunks/{service-status-k27f8enw.js → cors-y1vwtgfh.js} +4 -4
  46. package/dist/chunks/{service-status-387sf4vs.js → cors-ybxyv6z5.js} +2 -2
  47. package/dist/chunks/{service-status-ym5ktahd.js → cors-yk6p4dkd.js} +33 -33
  48. package/dist/chunks/{service-status-n7kafg5g.js → cors-ysb51p4r.js} +3 -3
  49. package/dist/chunks/{service-status-acgs9zzk.js → cors-ywn523ee.js} +5 -5
  50. package/dist/cors.js +1 -1
  51. package/dist/event-feed.js +5 -5
  52. package/dist/fetch.js +47 -47
  53. package/dist/handlers/agent.d.ts +1 -1
  54. package/dist/handlers/agent.js +6 -6
  55. package/dist/handlers/command.d.ts +1 -1
  56. package/dist/handlers/command.js +6 -6
  57. package/dist/handlers/config.d.ts +1 -1
  58. package/dist/handlers/config.js +6 -6
  59. package/dist/handlers/credential.d.ts +1 -1
  60. package/dist/handlers/credential.js +6 -6
  61. package/dist/handlers/debug.d.ts +1 -1
  62. package/dist/handlers/debug.js +6 -6
  63. package/dist/handlers/event.d.ts +1 -1
  64. package/dist/handlers/event.js +7 -7
  65. package/dist/handlers/form.d.ts +1 -1
  66. package/dist/handlers/form.js +6 -6
  67. package/dist/handlers/fs.d.ts +1 -1
  68. package/dist/handlers/fs.js +6 -6
  69. package/dist/handlers/generate.d.ts +1 -1
  70. package/dist/handlers/generate.js +6 -6
  71. package/dist/handlers/integration.d.ts +1 -1
  72. package/dist/handlers/integration.js +6 -6
  73. package/dist/handlers/location.d.ts +1 -1
  74. package/dist/handlers/location.js +6 -6
  75. package/dist/handlers/mcp.d.ts +1 -1
  76. package/dist/handlers/mcp.js +6 -6
  77. package/dist/handlers/message.d.ts +1 -1
  78. package/dist/handlers/message.js +6 -6
  79. package/dist/handlers/migration.d.ts +1 -1
  80. package/dist/handlers/migration.js +6 -6
  81. package/dist/handlers/model.d.ts +1 -1
  82. package/dist/handlers/model.js +6 -6
  83. package/dist/handlers/permission.d.ts +1 -1
  84. package/dist/handlers/permission.js +6 -6
  85. package/dist/handlers/persistent-pty.d.ts +1 -1
  86. package/dist/handlers/persistent-pty.js +8 -8
  87. package/dist/handlers/plugin.d.ts +1 -1
  88. package/dist/handlers/plugin.js +6 -6
  89. package/dist/handlers/project.d.ts +1 -1
  90. package/dist/handlers/project.js +6 -6
  91. package/dist/handlers/provider.d.ts +1 -1
  92. package/dist/handlers/provider.js +6 -6
  93. package/dist/handlers/pty-socket.d.ts +10 -2
  94. package/dist/handlers/pty-socket.js +1 -1
  95. package/dist/handlers/pty.d.ts +1 -1
  96. package/dist/handlers/pty.js +9 -9
  97. package/dist/handlers/reference.d.ts +1 -1
  98. package/dist/handlers/reference.js +6 -6
  99. package/dist/handlers/rpc.d.ts +1 -1
  100. package/dist/handlers/rpc.js +6 -6
  101. package/dist/handlers/server.d.ts +1 -1
  102. package/dist/handlers/server.js +9 -9
  103. package/dist/handlers/session-error.js +1 -1
  104. package/dist/handlers/session.d.ts +1 -1
  105. package/dist/handlers/session.js +6 -6
  106. package/dist/handlers/shell.d.ts +1 -1
  107. package/dist/handlers/shell.js +6 -6
  108. package/dist/handlers/skill.d.ts +1 -1
  109. package/dist/handlers/skill.js +6 -6
  110. package/dist/handlers/vcs.d.ts +1 -1
  111. package/dist/handlers/vcs.js +6 -6
  112. package/dist/handlers/websearch.d.ts +1 -1
  113. package/dist/handlers/websearch.js +6 -6
  114. package/dist/handlers/worktree.d.ts +1 -1
  115. package/dist/handlers/worktree.js +6 -6
  116. package/dist/handlers.d.ts +1 -1
  117. package/dist/handlers.js +43 -43
  118. package/dist/location.d.ts +2 -2
  119. package/dist/location.js +4 -4
  120. package/dist/middleware/authorization.d.ts +1 -1
  121. package/dist/middleware/authorization.js +2 -2
  122. package/dist/middleware/form-location.d.ts +1 -1
  123. package/dist/middleware/form-location.js +3 -3
  124. package/dist/middleware/schema-error.js +1 -1
  125. package/dist/middleware/session-location.d.ts +1 -1
  126. package/dist/middleware/session-location.js +3 -3
  127. package/dist/pairing.js +3 -3
  128. package/dist/process.d.ts +4 -3
  129. package/dist/process.js +50 -50
  130. package/dist/pty-environment.js +1 -1
  131. package/dist/request-tracing.js +1 -1
  132. package/dist/routes.d.ts +3 -3
  133. package/dist/routes.js +46 -46
  134. package/dist/server-info.js +5 -5
  135. package/dist/service-status.js +1 -1
  136. package/dist/workerd.js +48 -48
  137. package/package.json +14 -12
  138. package/dist/chunks/service-status-hezj1jdf.js +0 -7
  139. /package/dist/chunks/{service-status-9rqn6x4v.js → cors-9rqn6x4v.js} +0 -0
  140. /package/dist/chunks/{service-status-q4bn6dy8.js → cors-q4bn6dy8.js} +0 -0
  141. /package/dist/chunks/{service-status-smaf4a18.js → cors-smaf4a18.js} +0 -0
  142. /package/dist/chunks/{service-status-yc7nft6q.js → cors-yc7nft6q.js} +0 -0
package/dist/api.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { LocationMiddleware } from "./location";
2
2
  import { FormLocationMiddleware } from "./middleware/form-location";
3
3
  import { SessionLocationMiddleware } from "./middleware/session-location";
4
- export declare const Api: import("@opencode/protocol/api").Api<LocationMiddleware, import("effect/unstable/httpapi/HttpApiMiddleware").HttpApiMiddleware<import("@opencode/core/instance").Services, readonly [typeof import("@opencode/protocol/errors").LocationNotFoundError], never>, FormLocationMiddleware, import("effect/unstable/httpapi/HttpApiMiddleware").HttpApiMiddleware<import("@opencode/core/instance").Services, readonly [typeof import("@opencode/protocol/errors").InvalidRequestError, typeof import("@opencode/protocol/errors").SessionNotFoundError, typeof import("@opencode/protocol/errors").LocationNotFoundError], never>, SessionLocationMiddleware, import("effect/unstable/httpapi/HttpApiMiddleware").HttpApiMiddleware<import("@opencode/core/instance").Services, readonly [typeof import("@opencode/protocol/errors").InvalidRequestError, typeof import("@opencode/protocol/errors").SessionNotFoundError, typeof import("@opencode/protocol/errors").LocationNotFoundError], never>, import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"server.event", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"event.subscribe", "GET", "/api/event", never, never, never, never, import("effect/unstable/httpapi/HttpApiSchema").StreamSse<import("effect/unstable/httpapi/HttpApiSchema").SseEventFromData<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
4
+ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddleware, import("effect/http-api/HttpApiMiddleware").HttpApiMiddleware<import("@opencode/core/instance").Services, readonly [typeof import("@opencode/protocol/errors").LocationNotFoundError], never>, FormLocationMiddleware, import("effect/http-api/HttpApiMiddleware").HttpApiMiddleware<import("@opencode/core/instance").Services, readonly [typeof import("@opencode/protocol/errors").InvalidRequestError, typeof import("@opencode/protocol/errors").SessionNotFoundError, typeof import("@opencode/protocol/errors").LocationNotFoundError], never>, SessionLocationMiddleware, import("effect/http-api/HttpApiMiddleware").HttpApiMiddleware<import("@opencode/core/instance").Services, readonly [typeof import("@opencode/protocol/errors").InvalidRequestError, typeof import("@opencode/protocol/errors").SessionNotFoundError, typeof import("@opencode/protocol/errors").LocationNotFoundError], never>, import("effect/http-api/HttpApiGroup").HttpApiGroup<"server.event", import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"event.subscribe", "GET", "/api/event", never, never, never, never, import("effect/http-api/HttpApiSchema").StreamSse<import("effect/http-api/HttpApiSchema").SseEventFromData<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
5
5
  readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
6
6
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
7
7
  };
@@ -6373,6 +6373,11 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
6373
6373
  readonly type: "string";
6374
6374
  readonly key: string;
6375
6375
  readonly required?: boolean | undefined;
6376
+ readonly options?: readonly {
6377
+ readonly value: string;
6378
+ readonly label: string;
6379
+ readonly description?: string | undefined;
6380
+ }[] | undefined;
6376
6381
  readonly description?: string | undefined;
6377
6382
  readonly format?: "email" | "uri" | "date" | "date-time" | undefined;
6378
6383
  readonly minLength?: number | undefined;
@@ -6380,11 +6385,6 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
6380
6385
  readonly pattern?: string | undefined;
6381
6386
  readonly placeholder?: string | undefined;
6382
6387
  readonly default?: string | undefined;
6383
- readonly options?: readonly {
6384
- readonly value: string;
6385
- readonly label: string;
6386
- readonly description?: string | undefined;
6387
- }[] | undefined;
6388
6388
  readonly custom?: boolean | undefined;
6389
6389
  readonly title?: string | undefined;
6390
6390
  readonly hidden?: boolean | undefined;
@@ -6438,12 +6438,12 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
6438
6438
  }[] | undefined;
6439
6439
  } | {
6440
6440
  readonly type: "multiselect";
6441
- readonly key: string;
6442
6441
  readonly options: readonly {
6443
6442
  readonly value: string;
6444
6443
  readonly label: string;
6445
6444
  readonly description?: string | undefined;
6446
6445
  }[];
6446
+ readonly key: string;
6447
6447
  readonly required?: boolean | undefined;
6448
6448
  readonly description?: string | undefined;
6449
6449
  readonly default?: readonly string[] | undefined;
@@ -6467,6 +6467,11 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
6467
6467
  readonly type: "string";
6468
6468
  readonly key: string;
6469
6469
  readonly required?: boolean | undefined;
6470
+ readonly options?: readonly {
6471
+ readonly value: string;
6472
+ readonly label: string;
6473
+ readonly description?: string | undefined;
6474
+ }[] | undefined;
6470
6475
  readonly description?: string | undefined;
6471
6476
  readonly format?: "email" | "uri" | "date" | "date-time" | undefined;
6472
6477
  readonly minLength?: number | undefined;
@@ -6474,11 +6479,6 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
6474
6479
  readonly pattern?: string | undefined;
6475
6480
  readonly placeholder?: string | undefined;
6476
6481
  readonly default?: string | undefined;
6477
- readonly options?: readonly {
6478
- readonly value: string;
6479
- readonly label: string;
6480
- readonly description?: string | undefined;
6481
- }[] | undefined;
6482
6482
  readonly custom?: boolean | undefined;
6483
6483
  readonly title?: string | undefined;
6484
6484
  readonly hidden?: boolean | undefined;
@@ -6532,12 +6532,12 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
6532
6532
  }[] | undefined;
6533
6533
  } | {
6534
6534
  readonly type: "multiselect";
6535
- readonly key: string;
6536
6535
  readonly options: readonly {
6537
6536
  readonly value: string;
6538
6537
  readonly label: string;
6539
6538
  readonly description?: string | undefined;
6540
6539
  }[];
6540
+ readonly key: string;
6541
6541
  readonly required?: boolean | undefined;
6542
6542
  readonly description?: string | undefined;
6543
6543
  readonly default?: readonly string[] | undefined;
package/dist/api.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  Api2
3
- } from "./chunks/service-status-ep84ha6r.js";
4
- import"./chunks/service-status-d00srfh1.js";
5
- import"./chunks/service-status-nxdx74sv.js";
6
- import"./chunks/service-status-acgs9zzk.js";
7
- import"./chunks/service-status-smaf4a18.js";
3
+ } from "./chunks/cors-h2a6nn7k.js";
4
+ import"./chunks/cors-ty73jqxf.js";
5
+ import"./chunks/cors-vw0q3knq.js";
6
+ import"./chunks/cors-ywn523ee.js";
7
+ import"./chunks/cors-smaf4a18.js";
8
8
  export {
9
9
  Api2 as Api
10
10
  };
package/dist/auth.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  verifySession2,
8
8
  sessionCookieName2,
9
9
  exports_auth
10
- } from "./chunks/service-status-anm12x33.js";
10
+ } from "./chunks/cors-anm12x33.js";
11
11
  export {
12
12
  Config2 as Config,
13
13
  SESSION_TTL_SECONDS2 as SESSION_TTL_SECONDS,
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  response2
3
- } from "./service-status-acgs9zzk.js";
3
+ } from "./cors-ywn523ee.js";
4
4
  import {
5
5
  Api2
6
- } from "./service-status-ep84ha6r.js";
6
+ } from "./cors-h2a6nn7k.js";
7
7
 
8
8
  // src/handlers/fs.ts
9
9
  import { FileSystem } from "@opencode/core/filesystem";
10
10
  import { RelativePath } from "@opencode/core/schema";
11
11
  import { FileNotFoundError } from "@opencode/protocol/errors";
12
12
  import { Effect, Option, Stream } from "effect";
13
- import { HttpServerResponse } from "effect/unstable/http";
14
- import { HttpApiBuilder } from "effect/unstable/httpapi";
13
+ import { HttpServerResponse } from "effect/http";
14
+ import { HttpApiBuilder } from "effect/http-api";
15
15
  var FileSystemHandler2 = HttpApiBuilder.group(Api2, "server.fs", (handlers) => Effect.gen(function* () {
16
16
  return handlers.handleRaw("fs.read", (ctx) => Effect.gen(function* () {
17
17
  const path = yield* decodeRequestPath(ctx.request.url);
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Api2
3
- } from "./service-status-ep84ha6r.js";
3
+ } from "./cors-h2a6nn7k.js";
4
4
 
5
5
  // src/handlers/config.ts
6
6
  import { Config } from "@opencode/core/config";
7
7
  import { ShellSelect } from "@opencode/core/shell/select";
8
8
  import { Effect } from "effect";
9
- import { HttpApiBuilder } from "effect/unstable/httpapi";
9
+ import { HttpApiBuilder } from "effect/http-api";
10
10
  var ConfigHandler2 = HttpApiBuilder.group(Api2, "server.config", (handlers) => handlers.handle("config.get", () => Config.Service.use((config) => config.entries())).handle("config.update", Effect.fn(function* (ctx) {
11
11
  const config = yield* Config.Service;
12
12
  if (!config.update)
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  Api2
3
- } from "./service-status-ep84ha6r.js";
3
+ } from "./cors-h2a6nn7k.js";
4
4
 
5
5
  // src/handlers/location.ts
6
6
  import { Location } from "@opencode/core/location";
7
7
  import { LocationServiceMap } from "@opencode/core/location-service-map";
8
8
  import { ServiceUnavailableError } from "@opencode/protocol/errors";
9
9
  import { Cause, Effect } from "effect";
10
- import { HttpApiBuilder } from "effect/unstable/httpapi";
10
+ import { HttpApiBuilder } from "effect/http-api";
11
11
  var LocationHandler2 = HttpApiBuilder.group(Api2, "server.location", (handlers) => Effect.gen(function* () {
12
12
  const locations = yield* LocationServiceMap.Service;
13
13
  return handlers.handle("location.get", Effect.fn(function* () {
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  Api2
3
- } from "./service-status-ep84ha6r.js";
3
+ } from "./cors-h2a6nn7k.js";
4
4
 
5
5
  // src/handlers/rpc.ts
6
6
  import { Rpc } from "@opencode/core/rpc";
7
7
  import { Plugin } from "@opencode/core/plugin";
8
8
  import { RpcError, RpcInternalError } from "@opencode/protocol/errors";
9
9
  import { Effect } from "effect";
10
- import { HttpApiBuilder } from "effect/unstable/httpapi";
10
+ import { HttpApiBuilder } from "effect/http-api";
11
11
  var RpcHandler2 = HttpApiBuilder.group(Api2, "server.rpc", (handlers) => handlers.handle("rpc.call", ({ params, payload }) => Effect.gen(function* () {
12
12
  yield* Plugin.awaitActivation;
13
13
  const rpc = yield* Rpc.Service;
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  missingSession2,
3
3
  failedMessageDecode2
4
- } from "./service-status-smaf4a18.js";
4
+ } from "./cors-smaf4a18.js";
5
5
  import {
6
6
  Api2
7
- } from "./service-status-ep84ha6r.js";
7
+ } from "./cors-h2a6nn7k.js";
8
8
 
9
9
  // src/handlers/message.ts
10
10
  import { SessionMessage } from "@opencode/core/session/message";
11
11
  import { Session } from "@opencode/core/session";
12
12
  import { Effect, Schema } from "effect";
13
- import { HttpApiBuilder } from "effect/unstable/httpapi";
13
+ import { HttpApiBuilder } from "effect/http-api";
14
14
  import { InvalidCursorError } from "@opencode/protocol/errors";
15
15
  var DefaultMessagesLimit = 50;
16
16
  var Cursor = Schema.Struct({
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Api2
3
- } from "./service-status-ep84ha6r.js";
3
+ } from "./cors-h2a6nn7k.js";
4
4
 
5
5
  // src/handlers/credential.ts
6
6
  import { Credential } from "@opencode/core/credential";
7
7
  import { ConflictError } from "@opencode/protocol/errors";
8
8
  import { Effect } from "effect";
9
- import { HttpApiBuilder, HttpApiSchema } from "effect/unstable/httpapi";
9
+ import { HttpApiBuilder, HttpApiSchema } from "effect/http-api";
10
10
  var CredentialHandler2 = HttpApiBuilder.group(Api2, "server.credential", (handlers) => handlers.handle("credential.list", Effect.fn(function* () {
11
11
  const credential = yield* Credential.Service;
12
12
  return { data: entries(yield* credential.all()) };
@@ -2,20 +2,20 @@ import {
2
2
  locationErrors2,
3
3
  response2,
4
4
  requestRef2
5
- } from "./service-status-acgs9zzk.js";
5
+ } from "./cors-ywn523ee.js";
6
6
  import {
7
7
  Api2
8
- } from "./service-status-ep84ha6r.js";
8
+ } from "./cors-h2a6nn7k.js";
9
9
  import {
10
10
  CorsConfig2,
11
11
  isAllowedRequestOrigin2
12
- } from "./service-status-q4bn6dy8.js";
12
+ } from "./cors-q4bn6dy8.js";
13
13
  import {
14
14
  Service2
15
- } from "./service-status-bkk2wfbz.js";
15
+ } from "./cors-bkk2wfbz.js";
16
16
  import {
17
17
  runPtySocket2
18
- } from "./service-status-hezj1jdf.js";
18
+ } from "./cors-h6rt5k9s.js";
19
19
 
20
20
  // src/handlers/pty.ts
21
21
  import { Pty } from "@opencode/core/pty";
@@ -24,9 +24,9 @@ import { PtyTicket } from "@opencode/core/pty/ticket";
24
24
  import { Location } from "@opencode/core/location";
25
25
  import { LocationServiceMap } from "@opencode/core/location-service-map";
26
26
  import { Effect, Queue } from "effect";
27
- import { HttpServerRequest, HttpServerResponse } from "effect/unstable/http";
28
- import { HttpApiBuilder, HttpApiSchema } from "effect/unstable/httpapi";
29
- import { Socket } from "effect/unstable/socket";
27
+ import { HttpServerRequest, HttpServerResponse } from "effect/http";
28
+ import { HttpApiBuilder, HttpApiSchema } from "effect/http-api";
29
+ import { Socket } from "effect/socket";
30
30
  import { ForbiddenError, PtyNotFoundError } from "@opencode/protocol/errors";
31
31
  import {
32
32
  PTY_CONNECT_TICKET_QUERY,
@@ -112,36 +112,37 @@ var PtyHandler2 = HttpApiBuilder.group(Api2, "server.pty", (handlers) => Effect.
112
112
  const cursorNumber = parsedCursor === null ? undefined : Number(parsedCursor);
113
113
  const cursor = cursorNumber !== undefined && Number.isSafeInteger(cursorNumber) && cursorNumber >= -1 ? cursorNumber : undefined;
114
114
  const socket = yield* Effect.orDie(ctx.request.upgrade);
115
- const write = yield* socket.writer;
116
- const closeAccepted = (event) => socket.runRaw(() => Effect.void, { onOpen: write(event).pipe(Effect.catch(() => Effect.void)) }).pipe(Effect.timeout("1 second"), Effect.catchReason("SocketError", "SocketCloseError", () => Effect.void), Effect.catch(() => Effect.void));
117
115
  const outbox = yield* Queue.unbounded();
118
116
  const attachment = yield* pty.attach(ctx.params.ptyID, {
119
117
  cursor,
120
118
  onData: (chunk) => Queue.offerUnsafe(outbox, chunk),
121
119
  onEnd: () => Queue.offerUnsafe(outbox, new Socket.CloseEvent(1000))
122
120
  }).pipe(Effect.catchTags({
123
- "Pty.NotFoundError": () => closeAccepted(new Socket.CloseEvent(4404, "session not found")).pipe(Effect.as(undefined)),
124
- "Pty.ExitedError": () => closeAccepted(new Socket.CloseEvent(4404, "session exited")).pipe(Effect.as(undefined))
121
+ "Pty.NotFoundError": () => Effect.sync(() => {
122
+ Queue.offerUnsafe(outbox, new Socket.CloseEvent(4404, "session not found"));
123
+ }),
124
+ "Pty.ExitedError": () => Effect.sync(() => {
125
+ Queue.offerUnsafe(outbox, new Socket.CloseEvent(4404, "session exited"));
126
+ })
125
127
  }));
126
- if (!attachment)
127
- return HttpServerResponse.empty();
128
- for (const chunk of PtyProtocol.chunks(attachment.replay))
129
- Queue.offerUnsafe(outbox, chunk);
130
- Queue.offerUnsafe(outbox, PtyProtocol.metaFrame(attachment.cursor));
131
- attachment.activate();
132
- const drain = Effect.gen(function* () {
133
- while (true) {
134
- const item = yield* Queue.take(outbox);
135
- yield* write(item);
136
- if (item instanceof Socket.CloseEvent)
128
+ if (attachment) {
129
+ for (const chunk of PtyProtocol.chunks(attachment.replay))
130
+ Queue.offerUnsafe(outbox, chunk);
131
+ Queue.offerUnsafe(outbox, PtyProtocol.metaFrame(attachment.cursor));
132
+ attachment.activate();
133
+ }
134
+ yield* runPtySocket2({
135
+ socket,
136
+ outbox,
137
+ onMessage: (message) => Effect.sync(() => {
138
+ if (!attachment)
137
139
  return;
138
- }
140
+ const decoded = PtyProtocol.decodeInput(message);
141
+ if (decoded !== undefined)
142
+ attachment.write(decoded);
143
+ }),
144
+ detach: () => attachment?.detach()
139
145
  });
140
- yield* runPtySocket2(drain, socket.runRaw((message) => {
141
- const decoded = PtyProtocol.decodeInput(message);
142
- if (decoded !== undefined)
143
- attachment.write(decoded);
144
- }), attachment.detach).pipe(Effect.catchReason("SocketError", "SocketCloseError", () => Effect.void), Effect.orDie);
145
146
  return HttpServerResponse.empty();
146
147
  }).pipe(Effect.provide(locations.get(ref)), locationErrors2);
147
148
  }));
@@ -1,39 +1,39 @@
1
1
  import {
2
- layer3
3
- } from "./service-status-acgs9zzk.js";
2
+ layer4
3
+ } from "./cors-ywn523ee.js";
4
4
  import {
5
5
  formLocationLayer2
6
- } from "./service-status-d00srfh1.js";
6
+ } from "./cors-ty73jqxf.js";
7
7
  import {
8
8
  sessionLocationLayer2
9
- } from "./service-status-nxdx74sv.js";
9
+ } from "./cors-vw0q3knq.js";
10
10
  import {
11
11
  Api2
12
- } from "./service-status-ep84ha6r.js";
12
+ } from "./cors-h2a6nn7k.js";
13
13
  import {
14
14
  Config2
15
- } from "./service-status-anm12x33.js";
15
+ } from "./cors-anm12x33.js";
16
16
  import {
17
17
  CorsConfig2
18
- } from "./service-status-q4bn6dy8.js";
18
+ } from "./cors-q4bn6dy8.js";
19
19
  import {
20
- layer4
21
- } from "./service-status-s07e4y6n.js";
20
+ layer5
21
+ } from "./cors-g0rzwe5g.js";
22
22
  import {
23
23
  node3
24
- } from "./service-status-sstsrjtg.js";
24
+ } from "./cors-byt4hbw9.js";
25
25
  import {
26
26
  node2
27
- } from "./service-status-bkk2wfbz.js";
27
+ } from "./cors-bkk2wfbz.js";
28
28
  import {
29
29
  handlers2
30
- } from "./service-status-ym5ktahd.js";
30
+ } from "./cors-yk6p4dkd.js";
31
31
  import {
32
32
  authorizationLayer2
33
- } from "./service-status-gtkdacvk.js";
33
+ } from "./cors-5ytyqf1q.js";
34
34
  import {
35
35
  schemaErrorLayer2
36
- } from "./service-status-t8yzmczr.js";
36
+ } from "./cors-erzfdgke.js";
37
37
 
38
38
  // src/routes.ts
39
39
  import { Database } from "@opencode/core/database/database";
@@ -69,8 +69,8 @@ import { SdkPlugins } from "@opencode/core/plugin/sdk";
69
69
  import { WellKnown } from "@opencode/core/wellknown";
70
70
  import { Workspace } from "@opencode/core/workspace";
71
71
  import { Watcher } from "@opencode/core/filesystem/watcher";
72
- import { HttpRouter } from "effect/unstable/http";
73
- import { HttpApiBuilder } from "effect/unstable/httpapi";
72
+ import { HttpRouter } from "effect/http";
73
+ import { HttpApiBuilder } from "effect/http-api";
74
74
  import { Context, Effect, Layer, Option } from "effect";
75
75
  var applicationServiceNodes = [
76
76
  Global.node,
@@ -144,8 +144,8 @@ function makeRoutes(auth, options, serviceURLs, overrides, instances) {
144
144
  })) : build(overrides);
145
145
  return serviceLayer.pipe(Layer.flatMap((context) => {
146
146
  const services = Layer.succeedContext(context);
147
- const requestServices = Layer.merge(Layer.succeedContext(Context.pick(Database.Service, Credential.Service, PermissionSaved.Service, PluginUpdate.Service, Project.Service, WellKnown.Service)(context)), layer4(serviceURLs, Context.get(context, Global.Service).tmp, options.app));
148
- const api = HttpApiBuilder.layer(Api2, { openapiPath: "/openapi.json" }).pipe(Layer.provide(handlers2.pipe(Layer.provide(services), Layer.provide(Layer.succeed(CorsConfig2, options)))), Layer.provide(formLocationLayer2), Layer.provide(sessionLocationLayer2), Layer.provide(layer3), Layer.provide(authorizationLayer2), Layer.provide(schemaErrorLayer2), Layer.provide(auth), HttpRouter.provideRequest(requestServices), Layer.provideMerge(services), Layer.provideMerge(HttpRouter.layer));
147
+ const requestServices = Layer.merge(Layer.succeedContext(Context.pick(Database.Service, Credential.Service, PermissionSaved.Service, PluginUpdate.Service, Project.Service, WellKnown.Service)(context)), layer5(serviceURLs, Context.get(context, Global.Service).tmp, options.app));
148
+ const api = HttpApiBuilder.layer(Api2, { openapiPath: "/openapi.json" }).pipe(Layer.provide(handlers2.pipe(Layer.provide(services), Layer.provide(Layer.succeed(CorsConfig2, options)))), Layer.provide(formLocationLayer2), Layer.provide(sessionLocationLayer2), Layer.provide(layer4), Layer.provide(authorizationLayer2), Layer.provide(schemaErrorLayer2), Layer.provide(auth), HttpRouter.provideRequest(requestServices), Layer.provideMerge(services), Layer.provideMerge(HttpRouter.layer));
149
149
  return Layer.merge(api, V1Migration.layer.pipe(Layer.provide(services)));
150
150
  }));
151
151
  }
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  Api2
3
- } from "./service-status-ep84ha6r.js";
3
+ } from "./cors-h2a6nn7k.js";
4
4
 
5
5
  // src/handlers/project.ts
6
6
  import { Project } from "@opencode/core/project";
7
7
  import { Effect } from "effect";
8
- import { HttpApiBuilder } from "effect/unstable/httpapi";
8
+ import { HttpApiBuilder } from "effect/http-api";
9
9
  import { ProjectNotFoundError } from "@opencode/protocol/errors";
10
10
  var ProjectHandler2 = HttpApiBuilder.group(Api2, "server.project", (handlers) => handlers.handle("project.list", () => Project.Service.use((project) => project.list())).handle("project.update", (ctx) => Project.Service.use((project) => project.update({ ...ctx.payload, projectID: ctx.params.projectID }).pipe(Effect.mapError(() => new ProjectNotFoundError({
11
11
  projectID: ctx.params.projectID,
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./service-status-smaf4a18.js";
3
+ } from "./cors-smaf4a18.js";
4
4
  import {
5
5
  locationErrors2,
6
6
  response2,
7
7
  sessionInfo2
8
- } from "./service-status-acgs9zzk.js";
8
+ } from "./cors-ywn523ee.js";
9
9
  import {
10
10
  Api2
11
- } from "./service-status-ep84ha6r.js";
11
+ } from "./cors-h2a6nn7k.js";
12
12
 
13
13
  // src/handlers/permission.ts
14
14
  import { Instance } from "@opencode/core/instance/service";
@@ -17,7 +17,7 @@ import { Permission } from "@opencode/core/permission";
17
17
  import { PermissionSaved } from "@opencode/core/permission/saved";
18
18
  import { Session } from "@opencode/core/session";
19
19
  import { Effect } from "effect";
20
- import { HttpApiBuilder, HttpApiSchema } from "effect/unstable/httpapi";
20
+ import { HttpApiBuilder, HttpApiSchema } from "effect/http-api";
21
21
  import { PermissionNotFoundError } from "@opencode/protocol/errors";
22
22
  function missingRequest(id) {
23
23
  return new PermissionNotFoundError({ requestID: id, message: `Permission request not found: ${id}` });
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  response2
3
- } from "./service-status-acgs9zzk.js";
3
+ } from "./cors-ywn523ee.js";
4
4
  import {
5
5
  Api2
6
- } from "./service-status-ep84ha6r.js";
6
+ } from "./cors-h2a6nn7k.js";
7
7
 
8
8
  // src/handlers/form.ts
9
9
  import { Form } from "@opencode/core/form";
10
10
  import { Effect } from "effect";
11
- import { HttpApiBuilder } from "effect/unstable/httpapi";
11
+ import { HttpApiBuilder } from "effect/http-api";
12
12
  var FormHandler2 = HttpApiBuilder.group(Api2, "server.form", (handlers) => handlers.handle("form.list", Effect.fn(function* () {
13
13
  const form = yield* Form.Service;
14
14
  return yield* response2(form.list());
@@ -4,7 +4,7 @@ import {
4
4
  authorized2,
5
5
  verifySession2,
6
6
  sessionCookieName2
7
- } from "./service-status-anm12x33.js";
7
+ } from "./cors-anm12x33.js";
8
8
 
9
9
  // src/middleware/authorization.ts
10
10
  import { UnauthorizedError } from "@opencode/protocol/errors";
@@ -13,15 +13,16 @@ import { Authorization as Authorization2 } from "@opencode/protocol/middleware/a
13
13
  import { hasPtyConnectTicketURL } from "@opencode/protocol/groups/pty";
14
14
  import { hasPersistentPtyConnectTicketURL } from "@opencode/protocol/groups/persistent-pty";
15
15
  import { isPairingConnectURL } from "@opencode/protocol/groups/server";
16
- import { Effect, Encoding, Layer, Redacted } from "effect";
17
- import { HttpEffect, HttpServerRequest, HttpServerResponse } from "effect/unstable/http";
16
+ import { Effect, Layer, Redacted } from "effect";
17
+ import { Base64 } from "effect/encoding";
18
+ import { HttpEffect, HttpServerRequest, HttpServerResponse } from "effect/http";
18
19
  var AUTH_TOKEN_QUERY = "auth_token";
19
20
  var WWW_AUTHENTICATE = 'Basic realm="Secure Area"';
20
21
  function emptyCredential() {
21
22
  return { username: "", password: Redacted.make("") };
22
23
  }
23
24
  function decodeCredential(input) {
24
- return Effect.fromResult(Encoding.decodeBase64String(input)).pipe(Effect.match({
25
+ return Effect.fromResult(Base64.decodeString(input)).pipe(Effect.match({
25
26
  onFailure: emptyCredential,
26
27
  onSuccess: (header) => {
27
28
  const separator = header.indexOf(":");
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  Api2
3
- } from "./service-status-ep84ha6r.js";
3
+ } from "./cors-h2a6nn7k.js";
4
4
  import {
5
- Service4,
5
+ Service3,
6
6
  frame2
7
- } from "./service-status-99sfd1j8.js";
7
+ } from "./cors-rjpqaa8h.js";
8
8
 
9
9
  // src/handlers/event.ts
10
10
  import { Event } from "@opencode/schema/event";
11
11
  import { Effect, Stream } from "effect";
12
- import { HttpServerResponse } from "effect/unstable/http";
13
- import { HttpApiBuilder } from "effect/unstable/httpapi";
12
+ import { HttpServerResponse } from "effect/http";
13
+ import { HttpApiBuilder } from "effect/http-api";
14
14
  var EventHandler2 = HttpApiBuilder.group(Api2, "server.event", (handlers) => Effect.gen(function* () {
15
- const feed = yield* Service4;
15
+ const feed = yield* Service3;
16
16
  return handlers.handleRaw("event.subscribe", () => Effect.gen(function* () {
17
17
  const connected = {
18
18
  id: Event.ID.create(),
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  response2
3
- } from "./service-status-acgs9zzk.js";
3
+ } from "./cors-ywn523ee.js";
4
4
  import {
5
5
  Api2
6
- } from "./service-status-ep84ha6r.js";
6
+ } from "./cors-h2a6nn7k.js";
7
7
 
8
8
  // src/handlers/plugin.ts
9
9
  import { Plugin } from "@opencode/core/plugin";
10
10
  import { PluginUpdate } from "@opencode/core/plugin/update";
11
11
  import { InvalidRequestError, ServiceUnavailableError } from "@opencode/protocol/errors";
12
12
  import { Cause, Effect, Exit } from "effect";
13
- import { HttpApiBuilder } from "effect/unstable/httpapi";
13
+ import { HttpApiBuilder } from "effect/http-api";
14
14
  var PluginHandler2 = HttpApiBuilder.group(Api2, "server.plugin", (handlers) => handlers.handle("plugin.list", () => Effect.gen(function* () {
15
15
  return yield* response2(Plugin.Service.use((plugin) => plugin.list()));
16
16
  })).handle("plugin.check", (ctx) => Effect.gen(function* () {
@@ -3,13 +3,13 @@ import {
3
3
  missingMessage2,
4
4
  failedMessageDecode2,
5
5
  failedSnapshot2
6
- } from "./service-status-smaf4a18.js";
6
+ } from "./cors-smaf4a18.js";
7
7
  import {
8
8
  locationErrors2
9
- } from "./service-status-acgs9zzk.js";
9
+ } from "./cors-ywn523ee.js";
10
10
  import {
11
11
  Api2
12
- } from "./service-status-ep84ha6r.js";
12
+ } from "./cors-h2a6nn7k.js";
13
13
 
14
14
  // src/handlers/session.ts
15
15
  import { Session } from "@opencode/core/session";
@@ -19,7 +19,7 @@ import { SessionTransfer } from "@opencode/core/session/transfer";
19
19
  import { InstructionEntry } from "@opencode/core/session/instruction-entry";
20
20
  import { Form } from "@opencode/core/form";
21
21
  import { DateTime, Effect, Stream } from "effect";
22
- import { HttpApiBuilder, HttpApiSchema } from "effect/unstable/httpapi";
22
+ import { HttpApiBuilder, HttpApiSchema } from "effect/http-api";
23
23
  import { SessionsCursor } from "@opencode/protocol/groups/session";
24
24
  import {
25
25
  ConflictError,
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  response2
3
- } from "./service-status-acgs9zzk.js";
3
+ } from "./cors-ywn523ee.js";
4
4
  import {
5
5
  Api2
6
- } from "./service-status-ep84ha6r.js";
6
+ } from "./cors-h2a6nn7k.js";
7
7
 
8
8
  // src/handlers/command.ts
9
9
  import { Command } from "@opencode/core/command";
10
- import { HttpApiBuilder } from "effect/unstable/httpapi";
10
+ import { HttpApiBuilder } from "effect/http-api";
11
11
  var CommandHandler2 = HttpApiBuilder.group(Api2, "server.command", (handlers) => handlers.handle("command.list", () => response2(Command.Service.use((command) => command.list()))));
12
12
 
13
13
  export { CommandHandler2 };
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  response2
3
- } from "./service-status-acgs9zzk.js";
3
+ } from "./cors-ywn523ee.js";
4
4
  import {
5
5
  Api2
6
- } from "./service-status-ep84ha6r.js";
6
+ } from "./cors-h2a6nn7k.js";
7
7
 
8
8
  // src/handlers/integration.ts
9
9
  import { Integration } from "@opencode/core/integration";
10
10
  import { Plugin } from "@opencode/core/plugin";
11
11
  import { Effect } from "effect";
12
- import { HttpApiBuilder, HttpApiSchema } from "effect/unstable/httpapi";
12
+ import { HttpApiBuilder, HttpApiSchema } from "effect/http-api";
13
13
  import {
14
14
  IntegrationAttemptNotFoundError,
15
15
  IntegrationMethodNotFoundError,
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  response2
3
- } from "./service-status-acgs9zzk.js";
3
+ } from "./cors-ywn523ee.js";
4
4
  import {
5
5
  Api2
6
- } from "./service-status-ep84ha6r.js";
6
+ } from "./cors-h2a6nn7k.js";
7
7
 
8
8
  // src/handlers/websearch.ts
9
9
  import { WebSearch } from "@opencode/core/websearch";
10
10
  import { InvalidRequestError, ServiceUnavailableError } from "@opencode/protocol/errors";
11
11
  import { Effect } from "effect";
12
- import { HttpApiBuilder } from "effect/unstable/httpapi";
12
+ import { HttpApiBuilder } from "effect/http-api";
13
13
  var WebSearchHandler2 = HttpApiBuilder.group(Api2, "server.websearch", (handlers) => Effect.gen(function* () {
14
14
  return handlers.handle("websearch.providers", Effect.fn("server.websearch.providers")(function* () {
15
15
  const websearch = yield* WebSearch.Service;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./service-status-9rqn6x4v.js";
3
+ } from "./cors-9rqn6x4v.js";
4
4
 
5
5
  // src/auth.ts
6
6
  var exports_auth = {};