@opencode/server 2.2.3 → 2.2.5

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 (117) hide show
  1. package/dist/api.d.ts +175 -1
  2. package/dist/api.js +5 -5
  3. package/dist/auth.js +1 -1
  4. package/dist/chunks/location-02a60aws.js +144 -0
  5. package/dist/chunks/{service-status-059rbh9c.js → location-059rbh9c.js} +1 -1
  6. package/dist/chunks/{service-status-sqxx1p54.js → location-0r9ve3h3.js} +2 -2
  7. package/dist/chunks/{service-status-1t8ee1b5.js → location-1jtv083t.js} +2 -2
  8. package/dist/chunks/{service-status-0mnp9wde.js → location-1kj4am0h.js} +6 -6
  9. package/dist/chunks/{service-status-rxyx8sa0.js → location-4xzps9pr.js} +2 -2
  10. package/dist/chunks/{service-status-dm74gm07.js → location-5n22zpzy.js} +6 -6
  11. package/dist/chunks/{service-status-vtfzy3at.js → location-62bfwtjc.js} +2 -2
  12. package/dist/chunks/{service-status-7b9xm1qg.js → location-7b9xm1qg.js} +1 -1
  13. package/dist/chunks/{service-status-7dtbad8d.js → location-7dtbad8d.js} +1 -1
  14. package/dist/chunks/{service-status-7tewdwsb.js → location-85kbrn7y.js} +2 -2
  15. package/dist/chunks/{service-status-xbqm7mpj.js → location-9q55v56g.js} +2 -2
  16. package/dist/chunks/{service-status-7cd61xtm.js → location-axx4wwen.js} +2 -2
  17. package/dist/chunks/{service-status-1s3664te.js → location-bknbvq67.js} +4 -4
  18. package/dist/chunks/{service-status-39fj7rnq.js → location-c48av16v.js} +15 -13
  19. package/dist/chunks/{service-status-wqv43pj9.js → location-dczgzh3x.js} +2 -2
  20. package/dist/chunks/{service-status-gk0yxcp6.js → location-ddnay6e1.js} +1 -1
  21. package/dist/chunks/{service-status-0e4fm4yw.js → location-e0z6mnzj.js} +1 -1
  22. package/dist/chunks/{service-status-39nnfjx1.js → location-e6e4kz0w.js} +4 -4
  23. package/dist/chunks/{service-status-ac10qb5k.js → location-ey9m07rx.js} +3 -3
  24. package/dist/chunks/{service-status-74kxthdf.js → location-f0kpaq89.js} +1 -1
  25. package/dist/chunks/{service-status-bv5jg9y6.js → location-f1ds1268.js} +2 -2
  26. package/dist/chunks/{service-status-skcryrty.js → location-f96zeczf.js} +2 -2
  27. package/dist/chunks/{service-status-fvqb5t8b.js → location-g6bmzkma.js} +27 -9
  28. package/dist/chunks/{service-status-gqq6kfhc.js → location-gymtz25n.js} +3 -3
  29. package/dist/chunks/{service-status-zyntahe8.js → location-hr24310e.js} +1 -1
  30. package/dist/chunks/{service-status-j4at0y5c.js → location-j4at0y5c.js} +1 -1
  31. package/dist/chunks/{service-status-jc2vwkyw.js → location-j6d0mxrp.js} +2 -2
  32. package/dist/chunks/{service-status-9jpfpdce.js → location-ja97ph8b.js} +4 -4
  33. package/dist/chunks/{service-status-w9jcwh65.js → location-kqr36gas.js} +7 -7
  34. package/dist/chunks/{service-status-zmgfywqd.js → location-mam5ppd3.js} +1 -1
  35. package/dist/chunks/{service-status-zkg10e14.js → location-nzrkt0f5.js} +4 -4
  36. package/dist/chunks/{service-status-2qjvs0kv.js → location-pbxe02h0.js} +4 -4
  37. package/dist/chunks/{service-status-50xc6x42.js → location-q7gnt7ra.js} +3 -3
  38. package/dist/chunks/{service-status-fvpjvjpp.js → location-qfyg9gb7.js} +7 -7
  39. package/dist/chunks/{service-status-0pbbhyf6.js → location-tgb4pddq.js} +2 -2
  40. package/dist/chunks/{service-status-r5696se6.js → location-v7p1kzzd.js} +3 -3
  41. package/dist/chunks/{service-status-5z5anmwp.js → location-va7wgp70.js} +2 -2
  42. package/dist/chunks/{service-status-7x1re4zg.js → location-vyzvby0b.js} +2 -2
  43. package/dist/chunks/{service-status-6211mtn3.js → location-wy3c18g3.js} +35 -35
  44. package/dist/chunks/{service-status-yet0vexm.js → location-x74w7e1f.js} +1 -1
  45. package/dist/chunks/{service-status-f4exzdsf.js → location-xad49dn3.js} +2 -2
  46. package/dist/chunks/{service-status-2835150m.js → location-xfynz25m.js} +2 -2
  47. package/dist/chunks/{service-status-vvp99hc9.js → location-xwy6frfd.js} +1 -1
  48. package/dist/chunks/{service-status-370cpmna.js → location-y56ann6c.js} +2 -2
  49. package/dist/chunks/{service-status-vfkjeyp3.js → location-z48nkxh0.js} +1 -1
  50. package/dist/chunks/{service-status-xpg37vzc.js → location-zzxz7279.js} +2 -2
  51. package/dist/cors.js +1 -1
  52. package/dist/event-feed.js +5 -5
  53. package/dist/fetch.js +54 -53
  54. package/dist/handlers/agent.js +6 -6
  55. package/dist/handlers/artifact.d.ts +62 -0
  56. package/dist/handlers/artifact.js +8 -0
  57. package/dist/handlers/command.js +6 -6
  58. package/dist/handlers/config.js +6 -6
  59. package/dist/handlers/credential.js +7 -7
  60. package/dist/handlers/debug.js +6 -6
  61. package/dist/handlers/event.js +7 -7
  62. package/dist/handlers/form.js +6 -6
  63. package/dist/handlers/fs.js +6 -6
  64. package/dist/handlers/generate.js +6 -6
  65. package/dist/handlers/integration.js +6 -6
  66. package/dist/handlers/location.js +6 -6
  67. package/dist/handlers/mcp.js +8 -8
  68. package/dist/handlers/media.js +1 -1
  69. package/dist/handlers/message.js +7 -7
  70. package/dist/handlers/migration.js +6 -6
  71. package/dist/handlers/model.js +6 -6
  72. package/dist/handlers/permission.js +6 -6
  73. package/dist/handlers/persistent-pty.d.ts +1 -1
  74. package/dist/handlers/persistent-pty.js +11 -10
  75. package/dist/handlers/plugin.js +6 -6
  76. package/dist/handlers/project.js +6 -6
  77. package/dist/handlers/provider.js +6 -6
  78. package/dist/handlers/pty-socket.js +1 -1
  79. package/dist/handlers/pty.js +8 -8
  80. package/dist/handlers/reference.js +6 -6
  81. package/dist/handlers/rpc.js +6 -6
  82. package/dist/handlers/schedule.js +2 -2
  83. package/dist/handlers/server.js +9 -9
  84. package/dist/handlers/session-error.js +1 -1
  85. package/dist/handlers/session.js +7 -7
  86. package/dist/handlers/shell.js +6 -6
  87. package/dist/handlers/skill.js +6 -6
  88. package/dist/handlers/usage.js +6 -6
  89. package/dist/handlers/vcs.js +6 -6
  90. package/dist/handlers/voice.js +6 -6
  91. package/dist/handlers/websearch.js +6 -6
  92. package/dist/handlers/worktree.js +6 -6
  93. package/dist/handlers.d.ts +1 -1
  94. package/dist/handlers.js +48 -47
  95. package/dist/location.js +4 -4
  96. package/dist/media-uri.js +1 -1
  97. package/dist/middleware/authorization.js +2 -2
  98. package/dist/middleware/form-location.js +3 -3
  99. package/dist/middleware/schema-error.js +1 -1
  100. package/dist/middleware/session-location.js +3 -3
  101. package/dist/pairing.js +3 -3
  102. package/dist/process.js +57 -56
  103. package/dist/request-tracing.js +1 -1
  104. package/dist/routes.d.ts +3 -2
  105. package/dist/routes.js +51 -50
  106. package/dist/server-info.js +1 -1
  107. package/dist/service-status.js +3 -3
  108. package/dist/workerd.js +55 -54
  109. package/package.json +9 -9
  110. /package/dist/chunks/{service-status-9rqn6x4v.js → location-9rqn6x4v.js} +0 -0
  111. /package/dist/chunks/{service-status-bd8755ek.js → location-bd8755ek.js} +0 -0
  112. /package/dist/chunks/{service-status-h6rt5k9s.js → location-h6rt5k9s.js} +0 -0
  113. /package/dist/chunks/{service-status-n321d8vm.js → location-n321d8vm.js} +0 -0
  114. /package/dist/chunks/{service-status-q4bn6dy8.js → location-q4bn6dy8.js} +0 -0
  115. /package/dist/chunks/{service-status-smaf4a18.js → location-smaf4a18.js} +0 -0
  116. /package/dist/chunks/{service-status-xthc02cw.js → location-xthc02cw.js} +0 -0
  117. /package/dist/chunks/{service-status-yc7nft6q.js → location-yc7nft6q.js} +0 -0
@@ -1,36 +1,36 @@
1
1
  import {
2
- layer3
3
- } from "./service-status-gqq6kfhc.js";
2
+ layer2
3
+ } from "./location-gymtz25n.js";
4
4
  import {
5
5
  formLocationLayer2
6
- } from "./service-status-gk0yxcp6.js";
6
+ } from "./location-ddnay6e1.js";
7
7
  import {
8
8
  sessionLocationLayer2
9
- } from "./service-status-yet0vexm.js";
9
+ } from "./location-x74w7e1f.js";
10
10
  import {
11
11
  Api2
12
- } from "./service-status-r5696se6.js";
12
+ } from "./location-v7p1kzzd.js";
13
13
  import {
14
14
  Config2
15
- } from "./service-status-j4at0y5c.js";
15
+ } from "./location-j4at0y5c.js";
16
16
  import {
17
17
  CorsConfig2
18
- } from "./service-status-q4bn6dy8.js";
18
+ } from "./location-q4bn6dy8.js";
19
19
  import {
20
20
  layer4
21
- } from "./service-status-7dtbad8d.js";
21
+ } from "./location-7dtbad8d.js";
22
22
  import {
23
23
  node2
24
- } from "./service-status-w9jcwh65.js";
24
+ } from "./location-kqr36gas.js";
25
25
  import {
26
26
  handlers2
27
- } from "./service-status-6211mtn3.js";
27
+ } from "./location-wy3c18g3.js";
28
28
  import {
29
29
  authorizationLayer2
30
- } from "./service-status-7b9xm1qg.js";
30
+ } from "./location-7b9xm1qg.js";
31
31
  import {
32
32
  schemaErrorLayer2
33
- } from "./service-status-bd8755ek.js";
33
+ } from "./location-bd8755ek.js";
34
34
 
35
35
  // src/routes.ts
36
36
  import { Database } from "@opencode/core/database/database";
@@ -55,6 +55,7 @@ import { SessionTransfer } from "@opencode/core/session/transfer";
55
55
  import { InstructionEntry } from "@opencode/core/session/instruction-entry";
56
56
  import { ShellSelect } from "@opencode/core/shell/select";
57
57
  import { Job } from "@opencode/core/job";
58
+ import { KV } from "@opencode/core/kv";
58
59
  import { Mcp } from "@opencode/core/mcp/index";
59
60
  import { Global } from "@opencode/util/global";
60
61
  import { FSUtil } from "@opencode/util/fs-util";
@@ -77,6 +78,7 @@ var applicationServiceNodes = [
77
78
  Global.node,
78
79
  FSUtil.node,
79
80
  Database.node,
81
+ KV.node,
80
82
  Bus.node,
81
83
  EventLogger.node,
82
84
  httpClient,
@@ -152,7 +154,7 @@ function makeRoutes(auth, options, serviceURLs, overrides, instances) {
152
154
  return serviceLayer.pipe(Layer.flatMap((context) => {
153
155
  const services = Layer.succeedContext(context);
154
156
  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));
155
- 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));
157
+ 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(layer2), Layer.provide(authorizationLayer2), Layer.provide(schemaErrorLayer2), Layer.provide(auth), HttpRouter.provideRequest(requestServices), Layer.provideMerge(services), Layer.provideMerge(HttpRouter.layer));
156
158
  return Layer.merge(api, V1Migration.layer.pipe(Layer.provide(services)));
157
159
  }));
158
160
  }
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  locationErrors2,
3
3
  awaitPlugins2
4
- } from "./service-status-gqq6kfhc.js";
4
+ } from "./location-gymtz25n.js";
5
5
  import {
6
6
  Api2
7
- } from "./service-status-r5696se6.js";
7
+ } from "./location-v7p1kzzd.js";
8
8
 
9
9
  // src/handlers/generate.ts
10
10
  import { Generate } from "@opencode/core/generate";
@@ -2,7 +2,7 @@ import {
2
2
  locationErrors2,
3
3
  sessionInfo2,
4
4
  requestRef2
5
- } from "./service-status-gqq6kfhc.js";
5
+ } from "./location-gymtz25n.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 "./service-status-r5696se6.js";
3
+ } from "./location-v7p1kzzd.js";
4
4
 
5
5
  // src/handlers/config.ts
6
6
  import { Config } from "@opencode/core/config";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  __export
3
- } from "./service-status-9rqn6x4v.js";
3
+ } from "./location-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: () => make2
9
+ make: () => make3
10
10
  });
11
11
  import { Effect, Ref } from "effect";
12
- var make2 = Effect.fnUntraced(function* (options = {}) {
12
+ var make3 = 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 make2 = Effect.fnUntraced(function* (options = {}) {
20
20
  };
21
21
  });
22
22
 
23
- export { make2, exports_service_status };
23
+ export { make3, exports_service_status };
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  missingSession2,
3
3
  failedMessageDecode2
4
- } from "./service-status-smaf4a18.js";
4
+ } from "./location-smaf4a18.js";
5
5
  import {
6
6
  Api2
7
- } from "./service-status-r5696se6.js";
7
+ } from "./location-v7p1kzzd.js";
8
8
  import {
9
9
  wantsMediaRefs2
10
- } from "./service-status-xthc02cw.js";
10
+ } from "./location-xthc02cw.js";
11
11
 
12
12
  // src/handlers/message.ts
13
13
  import { SessionMessage } from "@opencode/core/session/message";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./service-status-r5696se6.js";
3
+ } from "./location-v7p1kzzd.js";
4
4
 
5
5
  // src/handlers/location.ts
6
6
  import { Location } from "@opencode/core/location";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./service-status-gqq6kfhc.js";
3
+ } from "./location-gymtz25n.js";
4
4
  import {
5
5
  Api2
6
- } from "./service-status-r5696se6.js";
6
+ } from "./location-v7p1kzzd.js";
7
7
 
8
8
  // src/handlers/integration.ts
9
9
  import { Integration } from "@opencode/core/integration";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./service-status-gqq6kfhc.js";
3
+ } from "./location-gymtz25n.js";
4
4
  import {
5
5
  Api2
6
- } from "./service-status-r5696se6.js";
6
+ } from "./location-v7p1kzzd.js";
7
7
 
8
8
  // src/handlers/reference.ts
9
9
  import { Reference } from "@opencode/core/reference";
@@ -1,19 +1,22 @@
1
1
  import {
2
2
  Api2
3
- } from "./service-status-r5696se6.js";
3
+ } from "./location-v7p1kzzd.js";
4
4
  import {
5
5
  CorsConfig2,
6
6
  isAllowedRequestOrigin2
7
- } from "./service-status-q4bn6dy8.js";
7
+ } from "./location-q4bn6dy8.js";
8
+ import {
9
+ makeArtifact2
10
+ } from "./location-02a60aws.js";
8
11
  import {
9
12
  makeMediaGet2
10
- } from "./service-status-n321d8vm.js";
13
+ } from "./location-n321d8vm.js";
11
14
  import {
12
15
  runPtySocket2
13
- } from "./service-status-h6rt5k9s.js";
16
+ } from "./location-h6rt5k9s.js";
14
17
  import {
15
18
  makeSchedule2
16
- } from "./service-status-059rbh9c.js";
19
+ } from "./location-059rbh9c.js";
17
20
 
18
21
  // src/handlers/persistent-pty.ts
19
22
  import { PersistentPty } from "@opencode/core/persistent-pty";
@@ -21,6 +24,7 @@ import { PtyTicket } from "@opencode/core/pty/ticket";
21
24
  import {
22
25
  ForbiddenError,
23
26
  InvalidRequestError,
27
+ PtyFeatureUnsupportedError,
24
28
  PtyNotFoundError,
25
29
  ServiceUnavailableError
26
30
  } from "@opencode/protocol/errors";
@@ -37,9 +41,10 @@ var PersistentPtyHandler2 = HttpApiBuilder.group(Api2, "server.experimental", (h
37
41
  const tickets = yield* PtyTicket.Service;
38
42
  const cors = yield* CorsConfig2;
39
43
  const pty = yield* PersistentPty.Service;
44
+ const artifact = yield* makeArtifact2;
40
45
  const mediaGet = yield* makeMediaGet2;
41
46
  const schedule = yield* makeSchedule2;
42
- return handlers.handleRaw("media.get", (ctx) => mediaGet(ctx.params.hash, ctx.request)).handle("schedule.create", (ctx) => schedule.create(ctx.payload)).handle("schedule.list", (ctx) => schedule.list(ctx.query.sessionID)).handle("schedule.get", (ctx) => schedule.get(ctx.params.scheduleID)).handle("schedule.pause", (ctx) => schedule.pause(ctx.params.scheduleID)).handle("schedule.resume", (ctx) => schedule.resume(ctx.params.scheduleID)).handle("schedule.delete", (ctx) => schedule.remove(ctx.params.scheduleID)).handle("persistentPty.read", Effect.fn(function* (ctx) {
47
+ return handlers.handleRaw("media.get", (ctx) => mediaGet(ctx.params.hash, ctx.request)).handle("artifacts.providers", (ctx) => artifact.providers(ctx.query, ctx.request)).handle("artifacts.list", (ctx) => artifact.list(ctx.query, ctx.request)).handle("artifacts.create", (ctx) => artifact.create(ctx.query, ctx.payload, ctx.request)).handle("artifacts.get", (ctx) => artifact.get(ctx.params.artifactID, ctx.query, ctx.request)).handle("artifacts.update", (ctx) => artifact.update(ctx.params.artifactID, ctx.query, ctx.payload, ctx.request)).handle("artifacts.delete", (ctx) => artifact.remove(ctx.params.artifactID, ctx.query, ctx.request)).handleRaw("artifacts.view", (ctx) => artifact.view(ctx.params.artifactID, ctx.query, ctx.request)).handle("schedule.create", (ctx) => schedule.create(ctx.payload)).handle("schedule.list", (ctx) => schedule.list(ctx.query.sessionID)).handle("schedule.get", (ctx) => schedule.get(ctx.params.scheduleID)).handle("schedule.pause", (ctx) => schedule.pause(ctx.params.scheduleID)).handle("schedule.resume", (ctx) => schedule.resume(ctx.params.scheduleID)).handle("schedule.delete", (ctx) => schedule.remove(ctx.params.scheduleID)).handle("persistentPty.read", Effect.fn(function* (ctx) {
43
48
  return { data: yield* pty.read(ctx.params.sessionID, ctx.query.lines).pipe(mapUnavailable) };
44
49
  })).handle("persistentPty.list", Effect.fn(function* (ctx) {
45
50
  return { data: yield* pty.list(ctx.params.sessionID).pipe(mapUnavailable) };
@@ -66,8 +71,20 @@ var PersistentPtyHandler2 = HttpApiBuilder.group(Api2, "server.experimental", (h
66
71
  })).handle("persistentPty.get", Effect.fn(function* (ctx) {
67
72
  return { data: yield* pty.get(ctx.params.ptyID).pipe(mapTerminalError) };
68
73
  })).handle("persistentPty.update", Effect.fn(function* (ctx) {
69
- yield* pty.resize(ctx.params.ptyID, ctx.payload.size.cols, ctx.payload.size.rows, ctx.payload.attachmentID).pipe(mapTerminalError);
70
- return { data: yield* pty.get(ctx.params.ptyID).pipe(mapTerminalError) };
74
+ if (ctx.payload.size)
75
+ yield* pty.resize(ctx.params.ptyID, ctx.payload.size.cols, ctx.payload.size.rows, ctx.payload.attachmentID).pipe(mapTerminalError);
76
+ if (ctx.payload.title === undefined)
77
+ return { data: yield* pty.get(ctx.params.ptyID).pipe(mapTerminalError) };
78
+ return {
79
+ data: yield* pty.rename(ctx.params.ptyID, ctx.payload.title).pipe(Effect.catchTags({
80
+ "PersistentPty.NotFoundError": notFound,
81
+ "PersistentPty.UnsupportedError": (error) => new PtyFeatureUnsupportedError({
82
+ feature: error.feature,
83
+ message: "Terminal renaming will be available after OpenCode's terminal service restarts"
84
+ }),
85
+ "PersistentPty.UnavailableError": unavailable
86
+ }))
87
+ };
71
88
  })).handle("persistentPty.snapshot", Effect.fn(function* (ctx) {
72
89
  return { data: yield* pty.snapshot(ctx.params.ptyID).pipe(mapTerminalError) };
73
90
  })).handle("persistentPty.remove", Effect.fn(function* (ctx) {
@@ -166,9 +183,10 @@ var PersistentPtyHandler2 = HttpApiBuilder.group(Api2, "server.experimental", (h
166
183
  }));
167
184
  var mapUnavailable = (effect) => effect.pipe(Effect.catchTag("PersistentPty.UnavailableError", unavailable));
168
185
  var mapTerminalError = (effect) => effect.pipe(Effect.catchTags({
169
- "PersistentPty.NotFoundError": (error) => new PtyNotFoundError({ ptyID: error.ptyID, message: `PTY session not found: ${error.ptyID}` }),
186
+ "PersistentPty.NotFoundError": notFound,
170
187
  "PersistentPty.UnavailableError": unavailable
171
188
  }));
189
+ var notFound = (error) => new PtyNotFoundError({ ptyID: error.ptyID, message: `PTY session not found: ${error.ptyID}` });
172
190
  var unavailable = (error) => new ServiceUnavailableError({ message: error.message, service: "opencode-pty" });
173
191
 
174
192
  export { PersistentPtyHandler2 };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./service-status-smaf4a18.js";
3
+ } from "./location-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 layer2 = 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, layer2 };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./service-status-r5696se6.js";
3
+ } from "./location-v7p1kzzd.js";
4
4
 
5
5
  // src/handlers/rpc.ts
6
6
  import { Rpc } from "@opencode/core/rpc";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./service-status-9rqn6x4v.js";
3
+ } from "./location-9rqn6x4v.js";
4
4
 
5
5
  // src/auth.ts
6
6
  var exports_auth = {};
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  requestRef2
3
- } from "./service-status-gqq6kfhc.js";
3
+ } from "./location-gymtz25n.js";
4
4
  import {
5
5
  Api2
6
- } from "./service-status-r5696se6.js";
6
+ } from "./location-v7p1kzzd.js";
7
7
 
8
8
  // src/handlers/debug.ts
9
9
  import { LocationServiceMap } from "@opencode/core/location-service-map";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  Api2
3
- } from "./service-status-r5696se6.js";
3
+ } from "./location-v7p1kzzd.js";
4
4
  import {
5
- Service2,
5
+ Service3,
6
6
  frame2
7
- } from "./service-status-fvpjvjpp.js";
7
+ } from "./location-qfyg9gb7.js";
8
8
 
9
9
  // src/handlers/event.ts
10
10
  import { Event } from "@opencode/schema/event";
@@ -12,7 +12,7 @@ import { Effect, Stream } from "effect";
12
12
  import { HttpServerResponse } from "effect/http";
13
13
  import { HttpApiBuilder } from "effect/http-api";
14
14
  var EventHandler2 = HttpApiBuilder.group(Api2, "server.event", (handlers) => Effect.gen(function* () {
15
- const feed = yield* Service2;
15
+ const feed = yield* Service3;
16
16
  return handlers.handleRaw("event.subscribe", (ctx) => Effect.gen(function* () {
17
17
  const connected = {
18
18
  id: Event.ID.create(),
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  __export
3
- } from "./service-status-9rqn6x4v.js";
3
+ } from "./location-9rqn6x4v.js";
4
4
 
5
5
  // src/pairing.ts
6
6
  var exports_pairing = {};
7
7
  __export(exports_pairing, {
8
8
  ServerPairing: () => exports_pairing,
9
- Service: () => Service3,
9
+ Service: () => Service2,
10
10
  node: () => node2
11
11
  });
12
12
  import { Cache, Context, Duration, Effect, Layer } from "effect";
@@ -14,12 +14,12 @@ import { makeGlobalNode } from "@opencode/util/effect/app-node";
14
14
  import { randomBytes } from "node:crypto";
15
15
  var TTL = Duration.minutes(5);
16
16
 
17
- class Service3 extends Context.Service()("@opencode/ServerPairing") {
17
+ class Service2 extends Context.Service()("@opencode/ServerPairing") {
18
18
  }
19
19
  var noLookup = () => Effect.die(new Error("ServerPairing cache must be used via set/invalidateWhen, never get"));
20
- var layer = Layer.effect(Service3, Effect.gen(function* () {
20
+ var layer = Layer.effect(Service2, Effect.gen(function* () {
21
21
  const cache = yield* Cache.make({ capacity: 1000, lookup: noLookup, timeToLive: TTL });
22
- return Service3.of({
22
+ return Service2.of({
23
23
  issue: Effect.fn("ServerPairing.issue")(function* () {
24
24
  const code = randomBytes(16).toString("base64url");
25
25
  yield* Cache.set(cache, code, true);
@@ -30,6 +30,6 @@ var layer = Layer.effect(Service3, Effect.gen(function* () {
30
30
  })
31
31
  });
32
32
  }));
33
- var node2 = makeGlobalNode({ service: Service3, layer, deps: [] });
33
+ var node2 = makeGlobalNode({ service: Service2, layer, deps: [] });
34
34
 
35
- export { Service3, node2, exports_pairing };
35
+ export { Service2, node2, exports_pairing };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./service-status-r5696se6.js";
3
+ } from "./location-v7p1kzzd.js";
4
4
 
5
5
  // src/handlers/project.ts
6
6
  import { Project } from "@opencode/core/project";
@@ -3,16 +3,16 @@ import {
3
3
  missingMessage2,
4
4
  failedMessageDecode2,
5
5
  failedSnapshot2
6
- } from "./service-status-smaf4a18.js";
6
+ } from "./location-smaf4a18.js";
7
7
  import {
8
8
  locationErrors2
9
- } from "./service-status-gqq6kfhc.js";
9
+ } from "./location-gymtz25n.js";
10
10
  import {
11
11
  Api2
12
- } from "./service-status-r5696se6.js";
12
+ } from "./location-v7p1kzzd.js";
13
13
  import {
14
14
  wantsMediaRefs2
15
- } from "./service-status-xthc02cw.js";
15
+ } from "./location-xthc02cw.js";
16
16
 
17
17
  // src/handlers/session.ts
18
18
  import { Instance } from "@opencode/core/instance/service";
@@ -2,17 +2,17 @@ import {
2
2
  locationErrors2,
3
3
  response2,
4
4
  requestRef2
5
- } from "./service-status-gqq6kfhc.js";
5
+ } from "./location-gymtz25n.js";
6
6
  import {
7
7
  Api2
8
- } from "./service-status-r5696se6.js";
8
+ } from "./location-v7p1kzzd.js";
9
9
  import {
10
10
  CorsConfig2,
11
11
  isAllowedRequestOrigin2
12
- } from "./service-status-q4bn6dy8.js";
12
+ } from "./location-q4bn6dy8.js";
13
13
  import {
14
14
  runPtySocket2
15
- } from "./service-status-h6rt5k9s.js";
15
+ } from "./location-h6rt5k9s.js";
16
16
 
17
17
  // src/handlers/pty.ts
18
18
  import { Pty } from "@opencode/core/pty";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./service-status-smaf4a18.js";
3
+ } from "./location-smaf4a18.js";
4
4
  import {
5
5
  locationErrors2,
6
6
  response2,
7
7
  sessionInfo2
8
- } from "./service-status-gqq6kfhc.js";
8
+ } from "./location-gymtz25n.js";
9
9
  import {
10
10
  Api2
11
- } from "./service-status-r5696se6.js";
11
+ } from "./location-v7p1kzzd.js";
12
12
 
13
13
  // src/handlers/permission.ts
14
14
  import { Instance } from "@opencode/core/instance/service";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  __export
3
- } from "./service-status-9rqn6x4v.js";
3
+ } from "./location-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: () => Service2,
10
+ Service: () => Service3,
11
11
  SubscriberCapacity: () => SubscriberCapacity2,
12
12
  SubscriberOverflowError: () => SubscriberOverflowError2,
13
13
  frame: () => frame2,
14
- layer: () => layer2,
14
+ layer: () => layer3,
15
15
  make: () => make4
16
16
  });
17
17
  import { Bus } from "@opencode/core/bus";
@@ -30,7 +30,7 @@ class EncodingError2 extends Schema.TaggedError()("EventFeed.EncodingError", {
30
30
  }) {
31
31
  }
32
32
 
33
- class Service2 extends Context.Service()("@opencode/server/EventFeed") {
33
+ class Service3 extends Context.Service()("@opencode/server/EventFeed") {
34
34
  }
35
35
  function frame2(event) {
36
36
  return `data: ${JSON.stringify(event)}
@@ -72,13 +72,13 @@ var make4 = Effect.fn("EventFeed.make")(function* (observe, options) {
72
72
  });
73
73
  const unsubscribe = yield* observe(publish);
74
74
  yield* Effect.addFinalizer(() => unsubscribe);
75
- return Service2.of({
75
+ return Service3.of({
76
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))
77
77
  });
78
78
  });
79
- var layer2 = Layer.effect(Service2, Effect.gen(function* () {
79
+ var layer3 = Layer.effect(Service3, Effect.gen(function* () {
80
80
  const bus = yield* Bus.Service;
81
81
  return yield* make4(bus.listen);
82
82
  }));
83
83
 
84
- export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2, Service2, frame2, make4, layer2, exports_event_feed };
84
+ export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2, Service3, frame2, make4, layer3, exports_event_feed };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./service-status-gqq6kfhc.js";
3
+ } from "./location-gymtz25n.js";
4
4
  import {
5
5
  Api2
6
- } from "./service-status-r5696se6.js";
6
+ } from "./location-v7p1kzzd.js";
7
7
 
8
8
  // src/handlers/fs.ts
9
9
  import { FileSystem } from "@opencode/core/filesystem";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  LocationMiddleware2
3
- } from "./service-status-gqq6kfhc.js";
3
+ } from "./location-gymtz25n.js";
4
4
  import {
5
5
  FormLocationMiddleware2
6
- } from "./service-status-gk0yxcp6.js";
6
+ } from "./location-ddnay6e1.js";
7
7
  import {
8
8
  SessionLocationMiddleware2
9
- } from "./service-status-yet0vexm.js";
9
+ } from "./location-x74w7e1f.js";
10
10
 
11
11
  // src/api.ts
12
12
  import { makeDefaultApi } from "@opencode/protocol/api";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  awaitPlugins2,
3
3
  response2
4
- } from "./service-status-gqq6kfhc.js";
4
+ } from "./location-gymtz25n.js";
5
5
  import {
6
6
  Api2
7
- } from "./service-status-r5696se6.js";
7
+ } from "./location-v7p1kzzd.js";
8
8
 
9
9
  // src/handlers/usage.ts
10
10
  import { UsageLimits } from "@opencode/core/usage-limits";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./service-status-gqq6kfhc.js";
3
+ } from "./location-gymtz25n.js";
4
4
  import {
5
5
  Api2
6
- } from "./service-status-r5696se6.js";
6
+ } from "./location-v7p1kzzd.js";
7
7
 
8
8
  // src/handlers/form.ts
9
9
  import { Form } from "@opencode/core/form";