@opencode/server 0.0.0-dev-44 → 0.0.0-dev-55

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 (113) hide show
  1. package/dist/api.js +5 -5
  2. package/dist/auth.d.ts +1 -5
  3. package/dist/auth.js +1 -3
  4. package/dist/chunks/{options-dk68ymtv.js → event-feed-05c5061t.js} +1 -1
  5. package/dist/chunks/{options-9c4eyh8m.js → event-feed-0e81et3m.js} +3 -3
  6. package/dist/chunks/{options-r6vmgwff.js → event-feed-0ey2b45p.js} +2 -2
  7. package/dist/chunks/{options-2xcc0x05.js → event-feed-0n4tjm17.js} +1 -1
  8. package/dist/chunks/{options-zjy4sw3d.js → event-feed-28ztppy1.js} +2 -2
  9. package/dist/chunks/{options-e6e4kz0w.js → event-feed-39nnfjx1.js} +4 -4
  10. package/dist/chunks/{options-xga54a1t.js → event-feed-4953j2kd.js} +4 -4
  11. package/dist/chunks/{options-0a5jm2na.js → event-feed-4p2y0qs3.js} +2 -2
  12. package/dist/chunks/{options-gqq6kfhc.js → event-feed-50bbk3b2.js} +3 -3
  13. package/dist/chunks/{options-5pdfedjd.js → event-feed-5pdfedjd.js} +1 -1
  14. package/dist/chunks/{options-9tsb9bht.js → event-feed-7b9xm1qg.js} +1 -1
  15. package/dist/chunks/{options-j9gxd9me.js → event-feed-89egwzf3.js} +2 -2
  16. package/dist/chunks/{options-vj2c9626.js → event-feed-8wqj6mpn.js} +4 -4
  17. package/dist/chunks/{options-wcfd0w14.js → event-feed-9e5240rj.js} +4 -4
  18. package/dist/chunks/{options-hax1v4bv.js → event-feed-9grnt8dc.js} +2 -2
  19. package/dist/chunks/{options-yet0vexm.js → event-feed-b3bmdkga.js} +1 -1
  20. package/dist/chunks/{options-z59gyc0x.js → event-feed-b4mqtccx.js} +2 -2
  21. package/dist/chunks/{options-be53s2qz.js → event-feed-djj5asqw.js} +1 -1
  22. package/dist/chunks/{options-e46y0tfd.js → event-feed-dx89xydc.js} +2 -2
  23. package/dist/chunks/{options-wxj3d9av.js → event-feed-et00mhwf.js} +2 -2
  24. package/dist/chunks/{options-22wspztn.js → event-feed-f8r9p2vr.js} +2 -2
  25. package/dist/chunks/{options-e9906t2e.js → event-feed-fehxjhae.js} +2 -2
  26. package/dist/chunks/{options-khcas2q2.js → event-feed-gkb2rnpp.js} +6 -6
  27. package/dist/chunks/{options-x8dgc261.js → event-feed-h1thjy6x.js} +2 -2
  28. package/dist/chunks/{options-gk0yxcp6.js → event-feed-htyf2qs7.js} +1 -1
  29. package/dist/chunks/{options-b2k9041j.js → event-feed-hx8bsq9d.js} +1 -1
  30. package/dist/chunks/{options-peg0afvz.js → event-feed-j4at0y5c.js} +5 -9
  31. package/dist/chunks/{options-awjv4jq4.js → event-feed-kafd488q.js} +2 -2
  32. package/dist/chunks/{options-ppma8fcc.js → event-feed-kg0ybx4v.js} +3 -3
  33. package/dist/chunks/{options-kqr36gas.js → event-feed-kqr36gas.js} +1 -1
  34. package/dist/chunks/{options-zgt2tacv.js → event-feed-m119esdv.js} +3 -3
  35. package/dist/chunks/{options-nha9c8fp.js → event-feed-mzqcpmk1.js} +4 -4
  36. package/dist/chunks/{options-xe9t9xr4.js → event-feed-nz17qv97.js} +2 -2
  37. package/dist/chunks/{options-6vs5sqy6.js → event-feed-q44yktpv.js} +2 -2
  38. package/dist/chunks/{options-s9k7mqbm.js → event-feed-qa4stgpe.js} +14 -14
  39. package/dist/chunks/{options-h9rcwvg0.js → event-feed-r6xkfcdx.js} +1 -1
  40. package/dist/chunks/{options-17ecnfcg.js → event-feed-rfdwk27n.js} +2 -2
  41. package/dist/chunks/{options-hnheq3hv.js → event-feed-s62wjkvx.js} +2 -2
  42. package/dist/chunks/{options-wecgp61r.js → event-feed-s802fzg1.js} +4 -4
  43. package/dist/chunks/{options-yr4wsvrw.js → event-feed-s9tkswmw.js} +2 -2
  44. package/dist/chunks/{options-fqnn17ss.js → event-feed-te9nzjz5.js} +35 -35
  45. package/dist/chunks/{options-m5rae7m4.js → event-feed-v8aqacn3.js} +2 -2
  46. package/dist/chunks/{options-1je14sn4.js → event-feed-x4b2rtcb.js} +1 -1
  47. package/dist/chunks/{options-h072q2hm.js → event-feed-zbe9jfhy.js} +1 -1
  48. package/dist/chunks/{options-kffvskmv.js → event-feed-zvbhqxt5.js} +4 -4
  49. package/dist/cors.js +1 -1
  50. package/dist/event-feed.js +3 -3
  51. package/dist/fetch.d.ts +0 -1
  52. package/dist/fetch.js +52 -52
  53. package/dist/handlers/agent.js +6 -6
  54. package/dist/handlers/command.js +6 -6
  55. package/dist/handlers/config.js +6 -6
  56. package/dist/handlers/credential.js +6 -6
  57. package/dist/handlers/debug.js +6 -6
  58. package/dist/handlers/event.js +7 -7
  59. package/dist/handlers/form.js +6 -6
  60. package/dist/handlers/fs.js +6 -6
  61. package/dist/handlers/generate.js +6 -6
  62. package/dist/handlers/integration.js +6 -6
  63. package/dist/handlers/location.js +6 -6
  64. package/dist/handlers/mcp.js +8 -8
  65. package/dist/handlers/media.js +1 -1
  66. package/dist/handlers/message.js +7 -7
  67. package/dist/handlers/migration.js +6 -6
  68. package/dist/handlers/model.js +6 -6
  69. package/dist/handlers/permission.js +6 -6
  70. package/dist/handlers/persistent-pty.js +9 -9
  71. package/dist/handlers/plugin.js +6 -6
  72. package/dist/handlers/project.js +6 -6
  73. package/dist/handlers/provider.js +6 -6
  74. package/dist/handlers/pty-socket.js +1 -1
  75. package/dist/handlers/pty.js +8 -8
  76. package/dist/handlers/reference.js +6 -6
  77. package/dist/handlers/rpc.js +6 -6
  78. package/dist/handlers/server.js +9 -9
  79. package/dist/handlers/session-error.js +1 -1
  80. package/dist/handlers/session.js +7 -7
  81. package/dist/handlers/shell.js +6 -6
  82. package/dist/handlers/skill.js +6 -6
  83. package/dist/handlers/usage.js +6 -6
  84. package/dist/handlers/vcs.js +6 -6
  85. package/dist/handlers/voice.js +6 -6
  86. package/dist/handlers/websearch.js +6 -6
  87. package/dist/handlers/worktree.js +6 -6
  88. package/dist/handlers.js +46 -46
  89. package/dist/location.js +4 -4
  90. package/dist/media-uri.js +1 -1
  91. package/dist/middleware/authorization.js +2 -2
  92. package/dist/middleware/form-location.js +3 -3
  93. package/dist/middleware/schema-error.js +1 -1
  94. package/dist/middleware/session-location.js +3 -3
  95. package/dist/options.d.ts +0 -1
  96. package/dist/options.js +0 -1
  97. package/dist/pairing.js +1 -1
  98. package/dist/process.d.ts +0 -1
  99. package/dist/process.js +57 -61
  100. package/dist/request-tracing.js +1 -1
  101. package/dist/routes.js +49 -49
  102. package/dist/server-info.js +1 -1
  103. package/dist/service-status.js +3 -3
  104. package/dist/workerd.js +53 -53
  105. package/package.json +8 -8
  106. /package/dist/chunks/{options-9rqn6x4v.js → event-feed-9rqn6x4v.js} +0 -0
  107. /package/dist/chunks/{options-erzfdgke.js → event-feed-erzfdgke.js} +0 -0
  108. /package/dist/chunks/{options-h6rt5k9s.js → event-feed-h6rt5k9s.js} +0 -0
  109. /package/dist/chunks/{options-n321d8vm.js → event-feed-n321d8vm.js} +0 -0
  110. /package/dist/chunks/{options-q4bn6dy8.js → event-feed-q4bn6dy8.js} +0 -0
  111. /package/dist/chunks/{options-smaf4a18.js → event-feed-smaf4a18.js} +0 -0
  112. /package/dist/chunks/{options-xthc02cw.js → event-feed-xthc02cw.js} +0 -0
  113. /package/dist/chunks/{options-yc7nft6q.js → event-feed-yc7nft6q.js} +0 -0
package/dist/api.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  Api2
3
- } from "./chunks/options-9c4eyh8m.js";
4
- import"./chunks/options-yet0vexm.js";
5
- import"./chunks/options-gk0yxcp6.js";
6
- import"./chunks/options-gqq6kfhc.js";
7
- import"./chunks/options-smaf4a18.js";
3
+ } from "./chunks/event-feed-0e81et3m.js";
4
+ import"./chunks/event-feed-b3bmdkga.js";
5
+ import"./chunks/event-feed-htyf2qs7.js";
6
+ import"./chunks/event-feed-50bbk3b2.js";
7
+ import"./chunks/event-feed-smaf4a18.js";
8
8
  export {
9
9
  Api2 as Api
10
10
  };
package/dist/auth.d.ts CHANGED
@@ -8,14 +8,10 @@ export type Info = {
8
8
  readonly password: Option.Option<string>;
9
9
  readonly username: string;
10
10
  };
11
- export declare const DEFAULT_USERNAME = "opencode";
12
11
  export declare const SESSION_TTL_SECONDS: number;
13
12
  declare const Config_base: Context.ServiceClass<Config, "@opencode/ServerAuthConfig", Info>;
14
13
  export declare class Config extends Config_base {
15
- static configLayer(input: {
16
- readonly password: Option.Option<string>;
17
- readonly username?: string;
18
- }): Layer.Layer<Config, never, never>;
14
+ static configLayer(input: Pick<Info, "password">): Layer.Layer<Config, never, never>;
19
15
  static get layer(): Layer.Layer<Config, never, never>;
20
16
  }
21
17
  export declare function required(config: Info): boolean;
package/dist/auth.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import {
2
- DEFAULT_USERNAME2,
3
2
  SESSION_TTL_SECONDS2,
4
3
  Config2,
5
4
  required2,
@@ -8,10 +7,9 @@ import {
8
7
  verifySession2,
9
8
  sessionCookieName2,
10
9
  exports_auth
11
- } from "./chunks/options-peg0afvz.js";
10
+ } from "./chunks/event-feed-j4at0y5c.js";
12
11
  export {
13
12
  Config2 as Config,
14
- DEFAULT_USERNAME2 as DEFAULT_USERNAME,
15
13
  SESSION_TTL_SECONDS2 as SESSION_TTL_SECONDS,
16
14
  exports_auth as ServerAuth,
17
15
  authorized2 as authorized,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./options-9c4eyh8m.js";
3
+ } from "./event-feed-0e81et3m.js";
4
4
 
5
5
  // src/handlers/project.ts
6
6
  import { Project } from "@opencode/core/project";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  LocationMiddleware2
3
- } from "./options-gqq6kfhc.js";
3
+ } from "./event-feed-50bbk3b2.js";
4
4
  import {
5
5
  FormLocationMiddleware2
6
- } from "./options-gk0yxcp6.js";
6
+ } from "./event-feed-htyf2qs7.js";
7
7
  import {
8
8
  SessionLocationMiddleware2
9
- } from "./options-yet0vexm.js";
9
+ } from "./event-feed-b3bmdkga.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 "./options-gqq6kfhc.js";
3
+ } from "./event-feed-50bbk3b2.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-9c4eyh8m.js";
6
+ } from "./event-feed-0e81et3m.js";
7
7
 
8
8
  // src/handlers/fs.ts
9
9
  import { FileSystem } from "@opencode/core/filesystem";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./options-9c4eyh8m.js";
3
+ } from "./event-feed-0e81et3m.js";
4
4
 
5
5
  // src/handlers/rpc.ts
6
6
  import { Rpc } from "@opencode/core/rpc";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./options-gqq6kfhc.js";
3
+ } from "./event-feed-50bbk3b2.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-9c4eyh8m.js";
6
+ } from "./event-feed-0e81et3m.js";
7
7
 
8
8
  // src/handlers/integration.ts
9
9
  import { Integration } from "@opencode/core/integration";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  __export
3
- } from "./options-9rqn6x4v.js";
3
+ } from "./event-feed-9rqn6x4v.js";
4
4
 
5
5
  // src/service-status.ts
6
6
  var exports_service_status = {};
7
7
  __export(exports_service_status, {
8
8
  Status: () => exports_service_status,
9
- make: () => make3
9
+ make: () => make2
10
10
  });
11
11
  import { Effect, Ref } from "effect";
12
- var make3 = Effect.fnUntraced(function* (options = {}) {
12
+ var make2 = Effect.fnUntraced(function* (options = {}) {
13
13
  const current = yield* Ref.make(options.initial ?? { type: "starting" });
14
14
  const beginStopping = Ref.update(current, (status) => status.type === "stopping" ? status : { type: "stopping" });
15
15
  return {
@@ -20,4 +20,4 @@ var make3 = Effect.fnUntraced(function* (options = {}) {
20
20
  };
21
21
  });
22
22
 
23
- export { make3, exports_service_status };
23
+ export { make2, exports_service_status };
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  Api2
3
- } from "./options-9c4eyh8m.js";
3
+ } from "./event-feed-0e81et3m.js";
4
4
  import {
5
5
  CorsConfig2,
6
6
  isAllowedRequestOrigin2
7
- } from "./options-q4bn6dy8.js";
7
+ } from "./event-feed-q4bn6dy8.js";
8
8
  import {
9
9
  makeMediaGet2
10
- } from "./options-n321d8vm.js";
10
+ } from "./event-feed-n321d8vm.js";
11
11
  import {
12
12
  runPtySocket2
13
- } from "./options-h6rt5k9s.js";
13
+ } from "./event-feed-h6rt5k9s.js";
14
14
 
15
15
  // src/handlers/persistent-pty.ts
16
16
  import { PersistentPty } from "@opencode/core/persistent-pty";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  awaitPlugins2,
3
3
  response2
4
- } from "./options-gqq6kfhc.js";
4
+ } from "./event-feed-50bbk3b2.js";
5
5
  import {
6
6
  Api2
7
- } from "./options-9c4eyh8m.js";
7
+ } from "./event-feed-0e81et3m.js";
8
8
 
9
9
  // src/handlers/model.ts
10
10
  import { Model } from "@opencode/core/model";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./options-smaf4a18.js";
3
+ } from "./event-feed-smaf4a18.js";
4
4
 
5
5
  // src/location.ts
6
6
  import { FileSystem } from "@opencode/core/filesystem";
@@ -59,7 +59,7 @@ function decode(input) {
59
59
  return input;
60
60
  }
61
61
  }
62
- var layer3 = Layer.effect(LocationMiddleware2, Effect.gen(function* () {
62
+ var layer4 = Layer.effect(LocationMiddleware2, Effect.gen(function* () {
63
63
  const locations = yield* LocationServiceMap.Service;
64
64
  return LocationMiddleware2.of((effect) => Effect.gen(function* () {
65
65
  const request = yield* HttpServerRequest.HttpServerRequest;
@@ -67,4 +67,4 @@ var layer3 = Layer.effect(LocationMiddleware2, Effect.gen(function* () {
67
67
  }));
68
68
  }));
69
69
 
70
- export { LocationMiddleware2, locationErrors2, awaitPlugins2, response2, sessionInfo2, requestRef2, layer3 };
70
+ export { LocationMiddleware2, locationErrors2, awaitPlugins2, response2, sessionInfo2, requestRef2, layer4 };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./options-9rqn6x4v.js";
3
+ } from "./event-feed-9rqn6x4v.js";
4
4
 
5
5
  // src/server-info.ts
6
6
  var exports_server_info = {};
@@ -4,7 +4,7 @@ import {
4
4
  authorized2,
5
5
  verifySession2,
6
6
  sessionCookieName2
7
- } from "./options-peg0afvz.js";
7
+ } from "./event-feed-j4at0y5c.js";
8
8
 
9
9
  // src/middleware/authorization.ts
10
10
  import { UnauthorizedError } from "@opencode/protocol/errors";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  awaitPlugins2,
3
3
  response2
4
- } from "./options-gqq6kfhc.js";
4
+ } from "./event-feed-50bbk3b2.js";
5
5
  import {
6
6
  Api2
7
- } from "./options-9c4eyh8m.js";
7
+ } from "./event-feed-0e81et3m.js";
8
8
 
9
9
  // src/handlers/usage.ts
10
10
  import { UsageLimits } from "@opencode/core/usage-limits";
@@ -2,17 +2,17 @@ import {
2
2
  locationErrors2,
3
3
  response2,
4
4
  requestRef2
5
- } from "./options-gqq6kfhc.js";
5
+ } from "./event-feed-50bbk3b2.js";
6
6
  import {
7
7
  Api2
8
- } from "./options-9c4eyh8m.js";
8
+ } from "./event-feed-0e81et3m.js";
9
9
  import {
10
10
  CorsConfig2,
11
11
  isAllowedRequestOrigin2
12
- } from "./options-q4bn6dy8.js";
12
+ } from "./event-feed-q4bn6dy8.js";
13
13
  import {
14
14
  runPtySocket2
15
- } from "./options-h6rt5k9s.js";
15
+ } from "./event-feed-h6rt5k9s.js";
16
16
 
17
17
  // src/handlers/pty.ts
18
18
  import { Pty } from "@opencode/core/pty";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  Api2
3
- } from "./options-9c4eyh8m.js";
3
+ } from "./event-feed-0e81et3m.js";
4
4
  import {
5
5
  SESSION_TTL_SECONDS2,
6
6
  Config2,
7
7
  issueSession2,
8
8
  sessionCookieName2
9
- } from "./options-peg0afvz.js";
9
+ } from "./event-feed-j4at0y5c.js";
10
10
  import {
11
11
  Service3
12
- } from "./options-5pdfedjd.js";
12
+ } from "./event-feed-5pdfedjd.js";
13
13
  import {
14
14
  Service2
15
- } from "./options-kqr36gas.js";
15
+ } from "./event-feed-kqr36gas.js";
16
16
 
17
17
  // src/handlers/server.ts
18
18
  import { hostname } from "node:os";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  awaitPlugins2,
3
3
  response2
4
- } from "./options-gqq6kfhc.js";
4
+ } from "./event-feed-50bbk3b2.js";
5
5
  import {
6
6
  Api2
7
- } from "./options-9c4eyh8m.js";
7
+ } from "./event-feed-0e81et3m.js";
8
8
 
9
9
  // src/handlers/provider.ts
10
10
  import { Provider } from "@opencode/core/provider";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  locationErrors2,
3
3
  sessionInfo2
4
- } from "./options-gqq6kfhc.js";
4
+ } from "./event-feed-50bbk3b2.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 "./options-gqq6kfhc.js";
3
+ } from "./event-feed-50bbk3b2.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-9c4eyh8m.js";
6
+ } from "./event-feed-0e81et3m.js";
7
7
 
8
8
  // src/handlers/command.ts
9
9
  import { Command } from "@opencode/core/command";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./options-9c4eyh8m.js";
3
+ } from "./event-feed-0e81et3m.js";
4
4
 
5
5
  // src/handlers/credential.ts
6
6
  import { Credential } from "@opencode/core/credential";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  awaitPlugins2,
3
3
  response2
4
- } from "./options-gqq6kfhc.js";
4
+ } from "./event-feed-50bbk3b2.js";
5
5
  import {
6
6
  Api2
7
- } from "./options-9c4eyh8m.js";
7
+ } from "./event-feed-0e81et3m.js";
8
8
 
9
9
  // src/handlers/websearch.ts
10
10
  import { WebSearch } from "@opencode/core/websearch";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  locationErrors2,
3
3
  awaitPlugins2
4
- } from "./options-gqq6kfhc.js";
4
+ } from "./event-feed-50bbk3b2.js";
5
5
  import {
6
6
  Api2
7
- } from "./options-9c4eyh8m.js";
7
+ } from "./event-feed-0e81et3m.js";
8
8
 
9
9
  // src/handlers/voice.ts
10
10
  import { Location } from "@opencode/core/location";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./options-gqq6kfhc.js";
3
+ } from "./event-feed-50bbk3b2.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-9c4eyh8m.js";
6
+ } from "./event-feed-0e81et3m.js";
7
7
 
8
8
  // src/handlers/shell.ts
9
9
  import { Shell } from "@opencode/core/shell";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  Api2
3
- } from "./options-9c4eyh8m.js";
3
+ } from "./event-feed-0e81et3m.js";
4
4
  import {
5
5
  Service4,
6
6
  frame2
7
- } from "./options-wecgp61r.js";
7
+ } from "./event-feed-s802fzg1.js";
8
8
 
9
9
  // src/handlers/event.ts
10
10
  import { Event } from "@opencode/schema/event";
@@ -1,26 +1,26 @@
1
1
  import {
2
2
  isAllowedCorsOrigin2
3
- } from "./options-q4bn6dy8.js";
3
+ } from "./event-feed-q4bn6dy8.js";
4
4
  import {
5
5
  createRoutes2
6
- } from "./options-s9k7mqbm.js";
6
+ } from "./event-feed-qa4stgpe.js";
7
7
  import {
8
8
  __export
9
- } from "./options-9rqn6x4v.js";
9
+ } from "./event-feed-9rqn6x4v.js";
10
10
 
11
11
  // src/fetch.ts
12
12
  var exports_fetch = {};
13
13
  __export(exports_fetch, {
14
14
  ServerFetch: () => exports_fetch,
15
- make: () => make2
15
+ make: () => make3
16
16
  });
17
17
  import { Context, Effect, Layer } from "effect";
18
18
  import { HttpEffect, HttpMiddleware, HttpRouter, HttpServer } from "effect/http";
19
19
  import { SessionRestart } from "@opencode/core/session/execution/restart";
20
- var make2 = Effect.fn("ServerFetch.make")(function* (options = {}, boot = {}) {
20
+ var make3 = Effect.fn("ServerFetch.make")(function* (options = {}, boot = {}) {
21
21
  const context = yield* Layer.build(createRoutes2(options, () => [], boot.overrides ?? []).pipe(Layer.provide(HttpServer.layerServices)));
22
22
  yield* Effect.forkDetach(Context.get(context, SessionRestart.Service).resumeSuspendedSessions);
23
23
  return Context.get(context, HttpRouter.HttpRouter).asHttpEffect().pipe(HttpMiddleware.cors({ allowedOrigins: (origin) => isAllowedCorsOrigin2(origin, options), maxAge: 86400 }), HttpEffect.toWebHandlerWith(context));
24
24
  });
25
25
 
26
- export { make2, exports_fetch };
26
+ export { make3, exports_fetch };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  requestRef2
3
- } from "./options-gqq6kfhc.js";
3
+ } from "./event-feed-50bbk3b2.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-9c4eyh8m.js";
6
+ } from "./event-feed-0e81et3m.js";
7
7
 
8
8
  // src/handlers/debug.ts
9
9
  import { LocationServiceMap } from "@opencode/core/location-service-map";
@@ -2,7 +2,7 @@ import {
2
2
  locationErrors2,
3
3
  sessionInfo2,
4
4
  requestRef2
5
- } from "./options-gqq6kfhc.js";
5
+ } from "./event-feed-50bbk3b2.js";
6
6
 
7
7
  // src/middleware/form-location.ts
8
8
  import { Instance } from "@opencode/core/instance/service";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./options-9c4eyh8m.js";
3
+ } from "./event-feed-0e81et3m.js";
4
4
 
5
5
  // src/handlers/config.ts
6
6
  import { Config } from "@opencode/core/config";
@@ -1,12 +1,11 @@
1
1
  import {
2
2
  __export
3
- } from "./options-9rqn6x4v.js";
3
+ } from "./event-feed-9rqn6x4v.js";
4
4
 
5
5
  // src/auth.ts
6
6
  var exports_auth = {};
7
7
  __export(exports_auth, {
8
8
  Config: () => Config2,
9
- DEFAULT_USERNAME: () => DEFAULT_USERNAME2,
10
9
  SESSION_TTL_SECONDS: () => SESSION_TTL_SECONDS2,
11
10
  ServerAuth: () => exports_auth,
12
11
  authorized: () => authorized2,
@@ -17,12 +16,11 @@ __export(exports_auth, {
17
16
  });
18
17
  import { Context, Layer, Option, Redacted } from "effect";
19
18
  import { createHmac, timingSafeEqual } from "node:crypto";
20
- var DEFAULT_USERNAME2 = "opencode";
21
19
  var SESSION_TTL_SECONDS2 = 30 * 24 * 60 * 60;
22
20
 
23
21
  class Config2 extends Context.Service()("@opencode/ServerAuthConfig") {
24
22
  static configLayer(input) {
25
- return Layer.succeed(this, this.of({ password: input.password, username: input.username ?? DEFAULT_USERNAME2 }));
23
+ return Layer.succeed(this, this.of({ ...input, username: "opencode" }));
26
24
  }
27
25
  static get layer() {
28
26
  return this.configLayer({ password: Option.none() });
@@ -32,12 +30,10 @@ function required2(config) {
32
30
  return Option.isSome(config.password) && config.password.value !== "";
33
31
  }
34
32
  function authorized2(credentials, config) {
35
- if (Option.isNone(config.password))
33
+ if (Option.isNone(config.password) || credentials.username !== config.username)
36
34
  return false;
37
35
  const password = Redacted.value(credentials.password);
38
- if (verifySession2(password, config))
39
- return true;
40
- return credentials.username === config.username && password === config.password.value;
36
+ return password === config.password.value || verifySession2(password, config);
41
37
  }
42
38
  function issueSession2(config, now = Date.now()) {
43
39
  if (Option.isNone(config.password))
@@ -67,4 +63,4 @@ function sign(password, payload) {
67
63
  return createHmac("sha256", key).update(payload).digest("base64url");
68
64
  }
69
65
 
70
- export { DEFAULT_USERNAME2, SESSION_TTL_SECONDS2, Config2, required2, authorized2, issueSession2, verifySession2, sessionCookieName2, exports_auth };
66
+ export { SESSION_TTL_SECONDS2, Config2, required2, authorized2, issueSession2, verifySession2, sessionCookieName2, exports_auth };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./options-gqq6kfhc.js";
3
+ } from "./event-feed-50bbk3b2.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-9c4eyh8m.js";
6
+ } from "./event-feed-0e81et3m.js";
7
7
 
8
8
  // src/handlers/plugin.ts
9
9
  import { Plugin } from "@opencode/core/plugin";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./options-smaf4a18.js";
3
+ } from "./event-feed-smaf4a18.js";
4
4
  import {
5
5
  locationErrors2,
6
6
  response2,
7
7
  sessionInfo2
8
- } from "./options-gqq6kfhc.js";
8
+ } from "./event-feed-50bbk3b2.js";
9
9
  import {
10
10
  Api2
11
- } from "./options-9c4eyh8m.js";
11
+ } from "./event-feed-0e81et3m.js";
12
12
 
13
13
  // src/handlers/permission.ts
14
14
  import { Instance } from "@opencode/core/instance/service";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./options-9rqn6x4v.js";
3
+ } from "./event-feed-9rqn6x4v.js";
4
4
 
5
5
  // src/pairing.ts
6
6
  var exports_pairing = {};
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  missingSession2,
3
3
  failedMessageDecode2
4
- } from "./options-smaf4a18.js";
4
+ } from "./event-feed-smaf4a18.js";
5
5
  import {
6
6
  Api2
7
- } from "./options-9c4eyh8m.js";
7
+ } from "./event-feed-0e81et3m.js";
8
8
  import {
9
9
  wantsMediaRefs2
10
- } from "./options-xthc02cw.js";
10
+ } from "./event-feed-xthc02cw.js";
11
11
 
12
12
  // src/handlers/message.ts
13
13
  import { SessionMessage } from "@opencode/core/session/message";
@@ -2,17 +2,17 @@ import {
2
2
  locationErrors2,
3
3
  response2,
4
4
  requestRef2
5
- } from "./options-gqq6kfhc.js";
5
+ } from "./event-feed-50bbk3b2.js";
6
6
  import {
7
7
  Api2
8
- } from "./options-9c4eyh8m.js";
8
+ } from "./event-feed-0e81et3m.js";
9
9
  import {
10
10
  CorsConfig2,
11
11
  isAllowedRequestOrigin2
12
- } from "./options-q4bn6dy8.js";
12
+ } from "./event-feed-q4bn6dy8.js";
13
13
  import {
14
14
  runPtySocket2
15
- } from "./options-h6rt5k9s.js";
15
+ } from "./event-feed-h6rt5k9s.js";
16
16
 
17
17
  // src/handlers/mcp.ts
18
18
  import { Location } from "@opencode/core/location";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./options-gqq6kfhc.js";
3
+ } from "./event-feed-50bbk3b2.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-9c4eyh8m.js";
6
+ } from "./event-feed-0e81et3m.js";
7
7
 
8
8
  // src/handlers/vcs.ts
9
9
  import { Vcs } from "@opencode/core/vcs";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./options-gqq6kfhc.js";
3
+ } from "./event-feed-50bbk3b2.js";
4
4
  import {
5
5
  Api2
6
- } from "./options-9c4eyh8m.js";
6
+ } from "./event-feed-0e81et3m.js";
7
7
 
8
8
  // src/handlers/skill.ts
9
9
  import { Skill } from "@opencode/core/skill";