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

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 (115) hide show
  1. package/dist/api.d.ts +3 -1
  2. package/dist/api.js +5 -5
  3. package/dist/auth.d.ts +5 -1
  4. package/dist/auth.js +3 -1
  5. package/dist/chunks/{cors-3mffapg0.js → options-0a5jm2na.js} +4 -4
  6. package/dist/chunks/{cors-3yw6ah7d.js → options-17ecnfcg.js} +2 -2
  7. package/dist/chunks/{cors-vvp99hc9.js → options-1je14sn4.js} +1 -1
  8. package/dist/chunks/{cors-rxyx8sa0.js → options-22wspztn.js} +2 -2
  9. package/dist/chunks/{cors-zyntahe8.js → options-2xcc0x05.js} +1 -1
  10. package/dist/chunks/{cors-z3e7v67k.js → options-5pdfedjd.js} +5 -5
  11. package/dist/chunks/{cors-xbqm7mpj.js → options-6vs5sqy6.js} +2 -2
  12. package/dist/chunks/{cors-r5696se6.js → options-9c4eyh8m.js} +3 -3
  13. package/dist/chunks/{cors-7b9xm1qg.js → options-9tsb9bht.js} +1 -1
  14. package/dist/chunks/{cors-xckd9f88.js → options-awjv4jq4.js} +2 -2
  15. package/dist/chunks/{cors-0e4fm4yw.js → options-b2k9041j.js} +1 -1
  16. package/dist/chunks/{cors-hdwd22w5.js → options-be53s2qz.js} +1 -1
  17. package/dist/chunks/{cors-zmgfywqd.js → options-dk68ymtv.js} +1 -1
  18. package/dist/chunks/{cors-7cd61xtm.js → options-e46y0tfd.js} +2 -2
  19. package/dist/chunks/{cors-e6e4kz0w.js → options-e6e4kz0w.js} +1 -1
  20. package/dist/chunks/{cors-qkqa867r.js → options-e9906t2e.js} +6 -6
  21. package/dist/chunks/{cors-pw72p9a3.js → options-fqnn17ss.js} +33 -33
  22. package/dist/chunks/{cors-gk0yxcp6.js → options-gk0yxcp6.js} +1 -1
  23. package/dist/chunks/{cors-gqq6kfhc.js → options-gqq6kfhc.js} +1 -1
  24. package/dist/chunks/{cors-74kxthdf.js → options-h072q2hm.js} +1 -1
  25. package/dist/chunks/{cors-vfkjeyp3.js → options-h9rcwvg0.js} +1 -1
  26. package/dist/chunks/{cors-vtfzy3at.js → options-hax1v4bv.js} +2 -2
  27. package/dist/chunks/{cors-f4exzdsf.js → options-hnheq3hv.js} +2 -2
  28. package/dist/chunks/{cors-5z5anmwp.js → options-j9gxd9me.js} +2 -2
  29. package/dist/chunks/{cors-z9kgby92.js → options-kffvskmv.js} +4 -4
  30. package/dist/chunks/{cors-9jtrwq3h.js → options-khcas2q2.js} +3 -3
  31. package/dist/chunks/{cors-mzs0n5xz.js → options-kqr36gas.js} +7 -7
  32. package/dist/chunks/{cors-7x1re4zg.js → options-m5rae7m4.js} +2 -2
  33. package/dist/chunks/{cors-3whnvwbg.js → options-nha9c8fp.js} +4 -4
  34. package/dist/chunks/{cors-j4at0y5c.js → options-peg0afvz.js} +9 -5
  35. package/dist/chunks/{cors-50xc6x42.js → options-ppma8fcc.js} +3 -3
  36. package/dist/chunks/{cors-0pbbhyf6.js → options-r6vmgwff.js} +2 -2
  37. package/dist/chunks/{cors-x4gped6c.js → options-s9k7mqbm.js} +12 -12
  38. package/dist/chunks/{cors-m3t57gm1.js → options-vj2c9626.js} +4 -4
  39. package/dist/chunks/{cors-3a2y3rg9.js → options-wcfd0w14.js} +8 -8
  40. package/dist/chunks/{cors-08zhnp7p.js → options-wecgp61r.js} +23 -22
  41. package/dist/chunks/{cors-2835150m.js → options-wxj3d9av.js} +2 -2
  42. package/dist/chunks/{cors-jc2vwkyw.js → options-x8dgc261.js} +2 -2
  43. package/dist/chunks/{cors-7tewdwsb.js → options-xe9t9xr4.js} +2 -2
  44. package/dist/chunks/{cors-631x5hrn.js → options-xga54a1t.js} +4 -4
  45. package/dist/chunks/{cors-yet0vexm.js → options-yet0vexm.js} +1 -1
  46. package/dist/chunks/{cors-skcryrty.js → options-yr4wsvrw.js} +2 -2
  47. package/dist/chunks/{cors-xpg37vzc.js → options-z59gyc0x.js} +2 -2
  48. package/dist/chunks/{cors-5553qfcy.js → options-zgt2tacv.js} +3 -3
  49. package/dist/chunks/{cors-4gk9fc6f.js → options-zjy4sw3d.js} +2 -2
  50. package/dist/cors.js +1 -1
  51. package/dist/event-feed.d.ts +1 -1
  52. package/dist/event-feed.js +3 -3
  53. package/dist/fetch.d.ts +1 -0
  54. package/dist/fetch.js +50 -50
  55. package/dist/handlers/agent.js +6 -6
  56. package/dist/handlers/command.js +6 -6
  57. package/dist/handlers/config.js +6 -6
  58. package/dist/handlers/credential.js +6 -6
  59. package/dist/handlers/debug.js +6 -6
  60. package/dist/handlers/event.js +7 -7
  61. package/dist/handlers/form.js +6 -6
  62. package/dist/handlers/fs.js +6 -6
  63. package/dist/handlers/generate.js +6 -6
  64. package/dist/handlers/integration.js +6 -6
  65. package/dist/handlers/location.js +6 -6
  66. package/dist/handlers/mcp.js +8 -8
  67. package/dist/handlers/media.js +1 -1
  68. package/dist/handlers/message.js +7 -7
  69. package/dist/handlers/migration.js +6 -6
  70. package/dist/handlers/model.js +6 -6
  71. package/dist/handlers/permission.js +6 -6
  72. package/dist/handlers/persistent-pty.js +9 -9
  73. package/dist/handlers/plugin.js +6 -6
  74. package/dist/handlers/project.js +6 -6
  75. package/dist/handlers/provider.js +6 -6
  76. package/dist/handlers/pty-socket.js +1 -1
  77. package/dist/handlers/pty.js +8 -8
  78. package/dist/handlers/reference.js +6 -6
  79. package/dist/handlers/rpc.js +6 -6
  80. package/dist/handlers/server.js +9 -9
  81. package/dist/handlers/session-error.js +1 -1
  82. package/dist/handlers/session.js +7 -7
  83. package/dist/handlers/shell.js +6 -6
  84. package/dist/handlers/skill.js +6 -6
  85. package/dist/handlers/usage.js +6 -6
  86. package/dist/handlers/vcs.js +6 -6
  87. package/dist/handlers/voice.js +6 -6
  88. package/dist/handlers/websearch.js +6 -6
  89. package/dist/handlers/worktree.js +6 -6
  90. package/dist/handlers.js +46 -46
  91. package/dist/location.js +2 -2
  92. package/dist/media-uri.js +1 -1
  93. package/dist/middleware/authorization.js +2 -2
  94. package/dist/middleware/form-location.js +3 -3
  95. package/dist/middleware/schema-error.js +1 -1
  96. package/dist/middleware/session-location.js +3 -3
  97. package/dist/options.d.ts +1 -0
  98. package/dist/options.js +1 -0
  99. package/dist/pairing.js +3 -3
  100. package/dist/process.d.ts +1 -0
  101. package/dist/process.js +59 -55
  102. package/dist/request-tracing.js +1 -1
  103. package/dist/routes.js +49 -49
  104. package/dist/server-info.js +3 -3
  105. package/dist/service-status.js +1 -1
  106. package/dist/workerd.js +51 -51
  107. package/package.json +9 -8
  108. /package/dist/chunks/{cors-9rqn6x4v.js → options-9rqn6x4v.js} +0 -0
  109. /package/dist/chunks/{cors-erzfdgke.js → options-erzfdgke.js} +0 -0
  110. /package/dist/chunks/{cors-h6rt5k9s.js → options-h6rt5k9s.js} +0 -0
  111. /package/dist/chunks/{cors-n321d8vm.js → options-n321d8vm.js} +0 -0
  112. /package/dist/chunks/{cors-q4bn6dy8.js → options-q4bn6dy8.js} +0 -0
  113. /package/dist/chunks/{cors-smaf4a18.js → options-smaf4a18.js} +0 -0
  114. /package/dist/chunks/{cors-xthc02cw.js → options-xthc02cw.js} +0 -0
  115. /package/dist/chunks/{cors-yc7nft6q.js → options-yc7nft6q.js} +0 -0
@@ -2,17 +2,17 @@ import {
2
2
  locationErrors2,
3
3
  response2,
4
4
  requestRef2
5
- } from "./cors-gqq6kfhc.js";
5
+ } from "./options-gqq6kfhc.js";
6
6
  import {
7
7
  Api2
8
- } from "./cors-r5696se6.js";
8
+ } from "./options-9c4eyh8m.js";
9
9
  import {
10
10
  CorsConfig2,
11
11
  isAllowedRequestOrigin2
12
- } from "./cors-q4bn6dy8.js";
12
+ } from "./options-q4bn6dy8.js";
13
13
  import {
14
14
  runPtySocket2
15
- } from "./cors-h6rt5k9s.js";
15
+ } from "./options-h6rt5k9s.js";
16
16
 
17
17
  // src/handlers/mcp.ts
18
18
  import { Location } from "@opencode/core/location";
@@ -1,11 +1,12 @@
1
1
  import {
2
2
  __export
3
- } from "./cors-9rqn6x4v.js";
3
+ } from "./options-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,
9
10
  SESSION_TTL_SECONDS: () => SESSION_TTL_SECONDS2,
10
11
  ServerAuth: () => exports_auth,
11
12
  authorized: () => authorized2,
@@ -16,11 +17,12 @@ __export(exports_auth, {
16
17
  });
17
18
  import { Context, Layer, Option, Redacted } from "effect";
18
19
  import { createHmac, timingSafeEqual } from "node:crypto";
20
+ var DEFAULT_USERNAME2 = "opencode";
19
21
  var SESSION_TTL_SECONDS2 = 30 * 24 * 60 * 60;
20
22
 
21
23
  class Config2 extends Context.Service()("@opencode/ServerAuthConfig") {
22
24
  static configLayer(input) {
23
- return Layer.succeed(this, this.of({ ...input, username: "opencode" }));
25
+ return Layer.succeed(this, this.of({ password: input.password, username: input.username ?? DEFAULT_USERNAME2 }));
24
26
  }
25
27
  static get layer() {
26
28
  return this.configLayer({ password: Option.none() });
@@ -30,10 +32,12 @@ function required2(config) {
30
32
  return Option.isSome(config.password) && config.password.value !== "";
31
33
  }
32
34
  function authorized2(credentials, config) {
33
- if (Option.isNone(config.password) || credentials.username !== config.username)
35
+ if (Option.isNone(config.password))
34
36
  return false;
35
37
  const password = Redacted.value(credentials.password);
36
- return password === config.password.value || verifySession2(password, config);
38
+ if (verifySession2(password, config))
39
+ return true;
40
+ return credentials.username === config.username && password === config.password.value;
37
41
  }
38
42
  function issueSession2(config, now = Date.now()) {
39
43
  if (Option.isNone(config.password))
@@ -63,4 +67,4 @@ function sign(password, payload) {
63
67
  return createHmac("sha256", key).update(payload).digest("base64url");
64
68
  }
65
69
 
66
- export { SESSION_TTL_SECONDS2, Config2, required2, authorized2, issueSession2, verifySession2, sessionCookieName2, exports_auth };
70
+ export { DEFAULT_USERNAME2, SESSION_TTL_SECONDS2, Config2, required2, authorized2, issueSession2, verifySession2, sessionCookieName2, exports_auth };
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./cors-smaf4a18.js";
3
+ } from "./options-smaf4a18.js";
4
4
  import {
5
5
  locationErrors2,
6
6
  response2,
7
7
  sessionInfo2
8
- } from "./cors-gqq6kfhc.js";
8
+ } from "./options-gqq6kfhc.js";
9
9
  import {
10
10
  Api2
11
- } from "./cors-r5696se6.js";
11
+ } from "./options-9c4eyh8m.js";
12
12
 
13
13
  // src/handlers/permission.ts
14
14
  import { Instance } from "@opencode/core/instance/service";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./cors-gqq6kfhc.js";
3
+ } from "./options-gqq6kfhc.js";
4
4
  import {
5
5
  Api2
6
- } from "./cors-r5696se6.js";
6
+ } from "./options-9c4eyh8m.js";
7
7
 
8
8
  // src/handlers/fs.ts
9
9
  import { FileSystem } from "@opencode/core/filesystem";
@@ -1,36 +1,36 @@
1
1
  import {
2
2
  layer3
3
- } from "./cors-gqq6kfhc.js";
3
+ } from "./options-gqq6kfhc.js";
4
4
  import {
5
5
  formLocationLayer2
6
- } from "./cors-gk0yxcp6.js";
6
+ } from "./options-gk0yxcp6.js";
7
7
  import {
8
8
  sessionLocationLayer2
9
- } from "./cors-yet0vexm.js";
9
+ } from "./options-yet0vexm.js";
10
10
  import {
11
11
  Api2
12
- } from "./cors-r5696se6.js";
12
+ } from "./options-9c4eyh8m.js";
13
13
  import {
14
14
  Config2
15
- } from "./cors-j4at0y5c.js";
15
+ } from "./options-peg0afvz.js";
16
16
  import {
17
17
  CorsConfig2
18
- } from "./cors-q4bn6dy8.js";
18
+ } from "./options-q4bn6dy8.js";
19
19
  import {
20
20
  layer2
21
- } from "./cors-z3e7v67k.js";
21
+ } from "./options-5pdfedjd.js";
22
22
  import {
23
23
  node2
24
- } from "./cors-mzs0n5xz.js";
24
+ } from "./options-kqr36gas.js";
25
25
  import {
26
26
  handlers2
27
- } from "./cors-pw72p9a3.js";
27
+ } from "./options-fqnn17ss.js";
28
28
  import {
29
29
  authorizationLayer2
30
- } from "./cors-7b9xm1qg.js";
30
+ } from "./options-9tsb9bht.js";
31
31
  import {
32
32
  schemaErrorLayer2
33
- } from "./cors-erzfdgke.js";
33
+ } from "./options-erzfdgke.js";
34
34
 
35
35
  // src/routes.ts
36
36
  import { Database } from "@opencode/core/database/database";
@@ -103,7 +103,7 @@ var applicationServiceNodes = [
103
103
  ];
104
104
  var applicationServices = LayerNode.group(applicationServiceNodes);
105
105
  function createRoutes2(options = {}, serviceURLs = () => [], overrides = []) {
106
- return makeRoutes(options.password ? Config2.configLayer({ password: Option.some(options.password) }) : Config2.layer, options, serviceURLs, overrides);
106
+ return makeRoutes(options.password ? Config2.configLayer({ password: Option.some(options.password), username: options.username }) : Config2.layer, options, serviceURLs, overrides);
107
107
  }
108
108
  function createEmbeddedRoutes2(options = {}, overrides = [], instances) {
109
109
  return makeRoutes(Config2.configLayer({ password: Option.none() }), options, () => [], overrides, instances);
@@ -2,17 +2,17 @@ import {
2
2
  locationErrors2,
3
3
  response2,
4
4
  requestRef2
5
- } from "./cors-gqq6kfhc.js";
5
+ } from "./options-gqq6kfhc.js";
6
6
  import {
7
7
  Api2
8
- } from "./cors-r5696se6.js";
8
+ } from "./options-9c4eyh8m.js";
9
9
  import {
10
10
  CorsConfig2,
11
11
  isAllowedRequestOrigin2
12
- } from "./cors-q4bn6dy8.js";
12
+ } from "./options-q4bn6dy8.js";
13
13
  import {
14
14
  runPtySocket2
15
- } from "./cors-h6rt5k9s.js";
15
+ } from "./options-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 "./cors-r5696se6.js";
3
+ } from "./options-9c4eyh8m.js";
4
4
  import {
5
5
  SESSION_TTL_SECONDS2,
6
6
  Config2,
7
7
  issueSession2,
8
8
  sessionCookieName2
9
- } from "./cors-j4at0y5c.js";
9
+ } from "./options-peg0afvz.js";
10
10
  import {
11
- Service2
12
- } from "./cors-z3e7v67k.js";
11
+ Service3
12
+ } from "./options-5pdfedjd.js";
13
13
  import {
14
- Service4
15
- } from "./cors-mzs0n5xz.js";
14
+ Service2
15
+ } from "./options-kqr36gas.js";
16
16
 
17
17
  // src/handlers/server.ts
18
18
  import { hostname } from "node:os";
@@ -22,10 +22,10 @@ import { HttpApiBuilder } from "effect/http-api";
22
22
  import { PersistentPty } from "@opencode/core/persistent-pty";
23
23
  import { UnauthorizedError } from "@opencode/protocol/errors";
24
24
  var ServerHandler2 = HttpApiBuilder.group(Api2, "server.server", (handlers) => Effect.gen(function* () {
25
- const pairing = yield* Service4;
25
+ const pairing = yield* Service2;
26
26
  const auth = yield* Config2;
27
27
  return handlers.handle("server.info", () => Effect.gen(function* () {
28
- const info = yield* Service2;
28
+ const info = yield* Service3;
29
29
  return {
30
30
  version: info.app.version ?? "unknown",
31
31
  pid: process.pid ?? 0,
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  __export
3
- } from "./cors-9rqn6x4v.js";
3
+ } from "./options-9rqn6x4v.js";
4
4
 
5
5
  // src/event-feed.ts
6
6
  var exports_event_feed = {};
7
7
  __export(exports_event_feed, {
8
8
  EncodingError: () => EncodingError2,
9
9
  EventFeed: () => exports_event_feed,
10
- Service: () => Service3,
10
+ Service: () => Service4,
11
11
  SubscriberCapacity: () => SubscriberCapacity2,
12
12
  SubscriberOverflowError: () => SubscriberOverflowError2,
13
13
  frame: () => frame2,
@@ -30,7 +30,7 @@ class EncodingError2 extends Schema.TaggedError()("EventFeed.EncodingError", {
30
30
  }) {
31
31
  }
32
32
 
33
- class Service3 extends Context.Service()("@opencode/server/EventFeed") {
33
+ class Service4 extends Context.Service()("@opencode/server/EventFeed") {
34
34
  }
35
35
  function frame2(event) {
36
36
  return `data: ${JSON.stringify(event)}
@@ -40,9 +40,9 @@ function frame2(event) {
40
40
  var make4 = Effect.fn("EventFeed.make")(function* (observe, options) {
41
41
  const capacity = options?.capacity ?? SubscriberCapacity2;
42
42
  const render = options?.encode ?? frame2;
43
- const subscribers = new Set;
43
+ const subscribers = new Map;
44
44
  const fail = (error) => Effect.sync(() => {
45
- const current = Array.from(subscribers);
45
+ const current = Array.from(subscribers.keys());
46
46
  subscribers.clear();
47
47
  for (const subscriber of current)
48
48
  Queue.failCauseUnsafe(subscriber, Cause.fail(error));
@@ -50,19 +50,20 @@ var make4 = Effect.fn("EventFeed.make")(function* (observe, options) {
50
50
  const publish = Effect.fnUntraced(function* (event) {
51
51
  if (!isOpenCodeEvent(event))
52
52
  return;
53
- if (subscribers.size === 0)
54
- return;
55
- const encoded = yield* Effect.try({
56
- try: () => render(event),
57
- catch: (cause) => new EncodingError2({ eventID: event.id, eventType: event.type, cause })
58
- }).pipe(Effect.catch((error) => Effect.logError("Failed to encode public event", {
59
- eventID: error.eventID,
60
- eventType: error.eventType,
61
- cause: error.cause
62
- }).pipe(Effect.andThen(fail(error)), Effect.as(undefined))));
63
- if (encoded === undefined)
64
- return;
65
- for (const subscriber of subscribers) {
53
+ let encoded;
54
+ for (const [subscriber, types] of subscribers) {
55
+ if (types && !types.has(event.type))
56
+ continue;
57
+ encoded ??= yield* Effect.try({
58
+ try: () => render(event),
59
+ catch: (cause) => new EncodingError2({ eventID: event.id, eventType: event.type, cause })
60
+ }).pipe(Effect.catch((error) => Effect.logError("Failed to encode public event", {
61
+ eventID: error.eventID,
62
+ eventType: error.eventType,
63
+ cause: error.cause
64
+ }).pipe(Effect.andThen(fail(error)), Effect.as(undefined))));
65
+ if (encoded === undefined)
66
+ return;
66
67
  if (Queue.offerUnsafe(subscriber, encoded))
67
68
  continue;
68
69
  subscribers.delete(subscriber);
@@ -71,13 +72,13 @@ var make4 = Effect.fn("EventFeed.make")(function* (observe, options) {
71
72
  });
72
73
  const unsubscribe = yield* observe(publish);
73
74
  yield* Effect.addFinalizer(() => unsubscribe);
74
- return Service3.of({
75
- subscribe: Effect.acquireRelease(Queue.dropping(capacity).pipe(Effect.tap((queue) => Effect.sync(() => subscribers.add(queue)))), (queue) => Effect.sync(() => subscribers.delete(queue)).pipe(Effect.andThen(Queue.shutdown(queue)), Effect.asVoid)).pipe(Effect.map(Stream.fromQueue))
75
+ return Service4.of({
76
+ subscribe: (types) => Effect.acquireRelease(Queue.dropping(capacity).pipe(Effect.tap((queue) => Effect.sync(() => subscribers.set(queue, types?.length ? new Set(types) : undefined)))), (queue) => Effect.sync(() => subscribers.delete(queue)).pipe(Effect.andThen(Queue.shutdown(queue)), Effect.asVoid)).pipe(Effect.map(Stream.fromQueue))
76
77
  });
77
78
  });
78
- var layer4 = Layer.effect(Service3, Effect.gen(function* () {
79
+ var layer4 = Layer.effect(Service4, Effect.gen(function* () {
79
80
  const bus = yield* Bus.Service;
80
81
  return yield* make4(bus.listen);
81
82
  }));
82
83
 
83
- export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2, Service3, frame2, make4, layer4, exports_event_feed };
84
+ export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2, Service4, frame2, make4, layer4, exports_event_feed };
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  locationErrors2,
3
3
  awaitPlugins2
4
- } from "./cors-gqq6kfhc.js";
4
+ } from "./options-gqq6kfhc.js";
5
5
  import {
6
6
  Api2
7
- } from "./cors-r5696se6.js";
7
+ } from "./options-9c4eyh8m.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
  requestRef2
3
- } from "./cors-gqq6kfhc.js";
3
+ } from "./options-gqq6kfhc.js";
4
4
  import {
5
5
  Api2
6
- } from "./cors-r5696se6.js";
6
+ } from "./options-9c4eyh8m.js";
7
7
 
8
8
  // src/handlers/debug.ts
9
9
  import { LocationServiceMap } from "@opencode/core/location-service-map";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./cors-gqq6kfhc.js";
3
+ } from "./options-gqq6kfhc.js";
4
4
  import {
5
5
  Api2
6
- } from "./cors-r5696se6.js";
6
+ } from "./options-9c4eyh8m.js";
7
7
 
8
8
  // src/handlers/vcs.ts
9
9
  import { Vcs } from "@opencode/core/vcs";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  Api2
3
- } from "./cors-r5696se6.js";
3
+ } from "./options-9c4eyh8m.js";
4
4
  import {
5
5
  CorsConfig2,
6
6
  isAllowedRequestOrigin2
7
- } from "./cors-q4bn6dy8.js";
7
+ } from "./options-q4bn6dy8.js";
8
8
  import {
9
9
  makeMediaGet2
10
- } from "./cors-n321d8vm.js";
10
+ } from "./options-n321d8vm.js";
11
11
  import {
12
12
  runPtySocket2
13
- } from "./cors-h6rt5k9s.js";
13
+ } from "./options-h6rt5k9s.js";
14
14
 
15
15
  // src/handlers/persistent-pty.ts
16
16
  import { PersistentPty } from "@opencode/core/persistent-pty";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  locationErrors2,
3
3
  sessionInfo2
4
- } from "./cors-gqq6kfhc.js";
4
+ } from "./options-gqq6kfhc.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 "./cors-gqq6kfhc.js";
3
+ } from "./options-gqq6kfhc.js";
4
4
  import {
5
5
  Api2
6
- } from "./cors-r5696se6.js";
6
+ } from "./options-9c4eyh8m.js";
7
7
 
8
8
  // src/handlers/reference.ts
9
9
  import { Reference } from "@opencode/core/reference";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./cors-gqq6kfhc.js";
3
+ } from "./options-gqq6kfhc.js";
4
4
  import {
5
5
  Api2
6
- } from "./cors-r5696se6.js";
6
+ } from "./options-9c4eyh8m.js";
7
7
 
8
8
  // src/handlers/command.ts
9
9
  import { Command } from "@opencode/core/command";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  missingSession2,
3
3
  failedMessageDecode2
4
- } from "./cors-smaf4a18.js";
4
+ } from "./options-smaf4a18.js";
5
5
  import {
6
6
  Api2
7
- } from "./cors-r5696se6.js";
7
+ } from "./options-9c4eyh8m.js";
8
8
  import {
9
9
  wantsMediaRefs2
10
- } from "./cors-xthc02cw.js";
10
+ } from "./options-xthc02cw.js";
11
11
 
12
12
  // src/handlers/message.ts
13
13
  import { SessionMessage } from "@opencode/core/session/message";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./cors-gqq6kfhc.js";
3
+ } from "./options-gqq6kfhc.js";
4
4
  import {
5
5
  Api2
6
- } from "./cors-r5696se6.js";
6
+ } from "./options-9c4eyh8m.js";
7
7
 
8
8
  // src/handlers/integration.ts
9
9
  import { Integration } from "@opencode/core/integration";
package/dist/cors.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  CorsConfig2,
3
3
  isAllowedCorsOrigin2,
4
4
  isAllowedRequestOrigin2
5
- } from "./chunks/cors-q4bn6dy8.js";
5
+ } from "./chunks/options-q4bn6dy8.js";
6
6
  export {
7
7
  CorsConfig2 as CorsConfig,
8
8
  isAllowedCorsOrigin2 as isAllowedCorsOrigin,
@@ -19,7 +19,7 @@ export declare class EncodingError extends EncodingError_base {
19
19
  }
20
20
  export type Error = SubscriberOverflowError | EncodingError;
21
21
  export interface Interface {
22
- readonly subscribe: Effect.Effect<Stream.Stream<string, Error>, never, Scope.Scope>;
22
+ readonly subscribe: (types?: ReadonlyArray<string>) => Effect.Effect<Stream.Stream<string, Error>, never, Scope.Scope>;
23
23
  }
24
24
  declare const Service_base: Context.ServiceClass<Service, "@opencode/server/EventFeed", Interface>;
25
25
  export declare class Service extends Service_base {
@@ -2,16 +2,16 @@ import {
2
2
  SubscriberCapacity2,
3
3
  SubscriberOverflowError2,
4
4
  EncodingError2,
5
- Service3,
5
+ Service4,
6
6
  frame2,
7
7
  make4,
8
8
  layer4,
9
9
  exports_event_feed
10
- } from "./chunks/cors-08zhnp7p.js";
10
+ } from "./chunks/options-wecgp61r.js";
11
11
  export {
12
12
  EncodingError2 as EncodingError,
13
13
  exports_event_feed as EventFeed,
14
- Service3 as Service,
14
+ Service4 as Service,
15
15
  SubscriberCapacity2 as SubscriberCapacity,
16
16
  SubscriberOverflowError2 as SubscriberOverflowError,
17
17
  frame2 as frame,
package/dist/fetch.d.ts CHANGED
@@ -39,6 +39,7 @@ export declare const make: (options?: {
39
39
  readonly hostname?: string | undefined;
40
40
  readonly port?: number | undefined;
41
41
  readonly password?: string | undefined;
42
+ readonly username?: string | undefined;
42
43
  readonly cors?: readonly string[] | undefined;
43
44
  readonly simulation?: boolean | undefined;
44
45
  readonly database?: {
package/dist/fetch.js CHANGED
@@ -1,56 +1,56 @@
1
1
  import {
2
2
  make2,
3
3
  exports_fetch
4
- } from "./chunks/cors-9jtrwq3h.js";
5
- import"./chunks/cors-x4gped6c.js";
6
- import"./chunks/cors-erzfdgke.js";
7
- import"./chunks/cors-7b9xm1qg.js";
8
- import"./chunks/cors-pw72p9a3.js";
9
- import"./chunks/cors-z9kgby92.js";
10
- import"./chunks/cors-3mffapg0.js";
11
- import"./chunks/cors-5z5anmwp.js";
12
- import"./chunks/cors-zyntahe8.js";
13
- import"./chunks/cors-74kxthdf.js";
14
- import"./chunks/cors-hdwd22w5.js";
15
- import"./chunks/cors-7cd61xtm.js";
16
- import"./chunks/cors-3a2y3rg9.js";
17
- import"./chunks/cors-5553qfcy.js";
18
- import"./chunks/cors-7x1re4zg.js";
19
- import"./chunks/cors-m3t57gm1.js";
20
- import"./chunks/cors-f4exzdsf.js";
21
- import"./chunks/cors-xckd9f88.js";
22
- import"./chunks/cors-3yw6ah7d.js";
23
- import"./chunks/cors-xbqm7mpj.js";
24
- import"./chunks/cors-2835150m.js";
25
- import"./chunks/cors-3whnvwbg.js";
26
- import"./chunks/cors-7tewdwsb.js";
27
- import"./chunks/cors-xpg37vzc.js";
28
- import"./chunks/cors-jc2vwkyw.js";
29
- import"./chunks/cors-4gk9fc6f.js";
30
- import"./chunks/cors-50xc6x42.js";
31
- import"./chunks/cors-vvp99hc9.js";
32
- import"./chunks/cors-vtfzy3at.js";
33
- import"./chunks/cors-qkqa867r.js";
34
- import"./chunks/cors-rxyx8sa0.js";
35
- import"./chunks/cors-0e4fm4yw.js";
36
- import"./chunks/cors-631x5hrn.js";
37
- import"./chunks/cors-h6rt5k9s.js";
38
- import"./chunks/cors-n321d8vm.js";
39
- import"./chunks/cors-skcryrty.js";
40
- import"./chunks/cors-zmgfywqd.js";
41
- import"./chunks/cors-0pbbhyf6.js";
42
- import"./chunks/cors-vfkjeyp3.js";
43
- import"./chunks/cors-xthc02cw.js";
44
- import"./chunks/cors-z3e7v67k.js";
45
- import"./chunks/cors-q4bn6dy8.js";
46
- import"./chunks/cors-r5696se6.js";
47
- import"./chunks/cors-gk0yxcp6.js";
48
- import"./chunks/cors-yet0vexm.js";
49
- import"./chunks/cors-gqq6kfhc.js";
50
- import"./chunks/cors-smaf4a18.js";
51
- import"./chunks/cors-08zhnp7p.js";
52
- import"./chunks/cors-j4at0y5c.js";
53
- import"./chunks/cors-mzs0n5xz.js";
4
+ } from "./chunks/options-khcas2q2.js";
5
+ import"./chunks/options-s9k7mqbm.js";
6
+ import"./chunks/options-erzfdgke.js";
7
+ import"./chunks/options-9tsb9bht.js";
8
+ import"./chunks/options-fqnn17ss.js";
9
+ import"./chunks/options-e9906t2e.js";
10
+ import"./chunks/options-xe9t9xr4.js";
11
+ import"./chunks/options-zjy4sw3d.js";
12
+ import"./chunks/options-z59gyc0x.js";
13
+ import"./chunks/options-awjv4jq4.js";
14
+ import"./chunks/options-dk68ymtv.js";
15
+ import"./chunks/options-ppma8fcc.js";
16
+ import"./chunks/options-6vs5sqy6.js";
17
+ import"./chunks/options-0a5jm2na.js";
18
+ import"./chunks/options-17ecnfcg.js";
19
+ import"./chunks/options-2xcc0x05.js";
20
+ import"./chunks/options-nha9c8fp.js";
21
+ import"./chunks/options-zgt2tacv.js";
22
+ import"./chunks/options-m5rae7m4.js";
23
+ import"./chunks/options-xga54a1t.js";
24
+ import"./chunks/options-n321d8vm.js";
25
+ import"./chunks/options-kffvskmv.js";
26
+ import"./chunks/options-hax1v4bv.js";
27
+ import"./chunks/options-be53s2qz.js";
28
+ import"./chunks/options-x8dgc261.js";
29
+ import"./chunks/options-b2k9041j.js";
30
+ import"./chunks/options-1je14sn4.js";
31
+ import"./chunks/options-wxj3d9av.js";
32
+ import"./chunks/options-h072q2hm.js";
33
+ import"./chunks/options-yr4wsvrw.js";
34
+ import"./chunks/options-22wspztn.js";
35
+ import"./chunks/options-vj2c9626.js";
36
+ import"./chunks/options-h6rt5k9s.js";
37
+ import"./chunks/options-e46y0tfd.js";
38
+ import"./chunks/options-r6vmgwff.js";
39
+ import"./chunks/options-wcfd0w14.js";
40
+ import"./chunks/options-hnheq3hv.js";
41
+ import"./chunks/options-h9rcwvg0.js";
42
+ import"./chunks/options-j9gxd9me.js";
43
+ import"./chunks/options-xthc02cw.js";
44
+ import"./chunks/options-kqr36gas.js";
45
+ import"./chunks/options-q4bn6dy8.js";
46
+ import"./chunks/options-9c4eyh8m.js";
47
+ import"./chunks/options-yet0vexm.js";
48
+ import"./chunks/options-gk0yxcp6.js";
49
+ import"./chunks/options-5pdfedjd.js";
50
+ import"./chunks/options-peg0afvz.js";
51
+ import"./chunks/options-gqq6kfhc.js";
52
+ import"./chunks/options-smaf4a18.js";
53
+ import"./chunks/options-wecgp61r.js";
54
54
  export {
55
55
  exports_fetch as ServerFetch,
56
56
  make2 as make
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  AgentHandler2
3
- } from "../chunks/cors-f4exzdsf.js";
4
- import"../chunks/cors-r5696se6.js";
5
- import"../chunks/cors-gk0yxcp6.js";
6
- import"../chunks/cors-yet0vexm.js";
7
- import"../chunks/cors-gqq6kfhc.js";
8
- import"../chunks/cors-smaf4a18.js";
3
+ } from "../chunks/options-hnheq3hv.js";
4
+ import"../chunks/options-9c4eyh8m.js";
5
+ import"../chunks/options-yet0vexm.js";
6
+ import"../chunks/options-gk0yxcp6.js";
7
+ import"../chunks/options-gqq6kfhc.js";
8
+ import"../chunks/options-smaf4a18.js";
9
9
  export {
10
10
  AgentHandler2 as AgentHandler
11
11
  };
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  CommandHandler2
3
- } from "../chunks/cors-xpg37vzc.js";
4
- import"../chunks/cors-r5696se6.js";
5
- import"../chunks/cors-gk0yxcp6.js";
6
- import"../chunks/cors-yet0vexm.js";
7
- import"../chunks/cors-gqq6kfhc.js";
8
- import"../chunks/cors-smaf4a18.js";
3
+ } from "../chunks/options-z59gyc0x.js";
4
+ import"../chunks/options-9c4eyh8m.js";
5
+ import"../chunks/options-yet0vexm.js";
6
+ import"../chunks/options-gk0yxcp6.js";
7
+ import"../chunks/options-gqq6kfhc.js";
8
+ import"../chunks/options-smaf4a18.js";
9
9
  export {
10
10
  CommandHandler2 as CommandHandler
11
11
  };