@opencode/server 0.0.0-dev-1348 → 0.0.0-dev-1350

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 (135) hide show
  1. package/dist/api.d.ts +45 -1
  2. package/dist/api.js +5 -5
  3. package/dist/auth.js +1 -1
  4. package/dist/chunks/{request-site-ca564221.js → request-tracing-0dfmev2z.js} +1 -1
  5. package/dist/chunks/{request-site-rm5kndzh.js → request-tracing-0g9mdpgv.js} +4 -4
  6. package/dist/chunks/{request-site-prwd5gwt.js → request-tracing-1cv9x2r2.js} +2 -2
  7. package/dist/chunks/{request-site-g4964mny.js → request-tracing-1x93nrj9.js} +3 -3
  8. package/dist/chunks/{request-site-s0zgx365.js → request-tracing-304n6v78.js} +2 -2
  9. package/dist/chunks/{request-site-39nnfjx1.js → request-tracing-39nnfjx1.js} +1 -1
  10. package/dist/chunks/{request-site-8nezxn08.js → request-tracing-4ndpf0hp.js} +1 -1
  11. package/dist/chunks/{request-site-yc92za0p.js → request-tracing-5q8dz5z1.js} +2 -2
  12. package/dist/chunks/{request-site-kshqfq8s.js → request-tracing-5zfzwsmf.js} +4 -4
  13. package/dist/chunks/{request-site-qq3f8fnn.js → request-tracing-65cb9hat.js} +2 -2
  14. package/dist/chunks/{request-site-cwx7pqk1.js → request-tracing-6jf8ezha.js} +2 -2
  15. package/dist/chunks/{request-site-6pm6ek88.js → request-tracing-6pm6ek88.js} +1 -1
  16. package/dist/chunks/{request-site-br4x4prt.js → request-tracing-72bf7qt9.js} +3 -3
  17. package/dist/chunks/{request-site-8qsq6tbs.js → request-tracing-8rexn64v.js} +2 -2
  18. package/dist/chunks/{request-site-8sb6qqpn.js → request-tracing-8sb6qqpn.js} +1 -1
  19. package/dist/chunks/{request-site-f3gr6hfv.js → request-tracing-9azap84r.js} +2 -2
  20. package/dist/chunks/{request-site-rjhxbsc4.js → request-tracing-ase6j722.js} +2 -2
  21. package/dist/chunks/{request-site-7dkb5ks8.js → request-tracing-b0crtbhe.js} +2 -2
  22. package/dist/chunks/{request-site-nswmrzft.js → request-tracing-b4k0vyky.js} +5 -5
  23. package/dist/chunks/{request-site-am27j67f.js → request-tracing-bae6b5xr.js} +1 -1
  24. package/dist/chunks/{request-site-10sj2tcf.js → request-tracing-bqg3w4bn.js} +1 -1
  25. package/dist/chunks/{request-site-djr0jy89.js → request-tracing-djr0jy89.js} +1 -1
  26. package/dist/chunks/{request-site-rgbnpstw.js → request-tracing-e3htq44t.js} +2 -2
  27. package/dist/chunks/{request-site-exwy1kbj.js → request-tracing-ex3bavcc.js} +2 -2
  28. package/dist/chunks/{request-site-0vqsbvsa.js → request-tracing-fmgwey40.js} +4 -4
  29. package/dist/chunks/{request-site-ehyp3zqd.js → request-tracing-fsvp99pe.js} +1 -1
  30. package/dist/chunks/{request-site-p3bbq7g3.js → request-tracing-fynca550.js} +1 -1
  31. package/dist/chunks/{request-site-8xdajgpr.js → request-tracing-g003exja.js} +2 -2
  32. package/dist/chunks/{request-site-g23ffrnz.js → request-tracing-g23ffrnz.js} +2 -2
  33. package/dist/chunks/{request-site-pmv5pv9v.js → request-tracing-h2fpekzg.js} +14 -4
  34. package/dist/chunks/{request-site-mnjcp51m.js → request-tracing-h4tjxgze.js} +35 -35
  35. package/dist/chunks/{request-site-dc91e8gy.js → request-tracing-h9ta72b2.js} +23 -17
  36. package/dist/chunks/{request-site-j4at0y5c.js → request-tracing-j4at0y5c.js} +1 -1
  37. package/dist/chunks/{request-site-javgytnb.js → request-tracing-j6y32kmq.js} +2 -2
  38. package/dist/chunks/{request-site-rs6c9pjq.js → request-tracing-jwfjvgfr.js} +14 -10
  39. package/dist/chunks/{request-site-em7ed65n.js → request-tracing-k788ajcj.js} +2 -2
  40. package/dist/chunks/{request-site-74nxvsrn.js → request-tracing-mn3zdbxb.js} +2 -2
  41. package/dist/chunks/{request-site-myqk22k5.js → request-tracing-myqk22k5.js} +2 -2
  42. package/dist/chunks/{request-site-mzs0n5xz.js → request-tracing-mzs0n5xz.js} +1 -1
  43. package/dist/chunks/{request-site-csetzeb0.js → request-tracing-n9kqh2yj.js} +6 -6
  44. package/dist/chunks/{request-site-2tmcamrc.js → request-tracing-q5rgkj8j.js} +2 -2
  45. package/dist/chunks/{request-site-fvpjvjpp.js → request-tracing-qd05162x.js} +7 -7
  46. package/dist/chunks/request-tracing-qpnw2qd1.js +58 -0
  47. package/dist/chunks/{request-site-rktygpea.js → request-tracing-rktygpea.js} +1 -1
  48. package/dist/chunks/{request-site-kmwr1xw9.js → request-tracing-szv33b9b.js} +3 -3
  49. package/dist/chunks/{request-site-t32e1bbt.js → request-tracing-t32e1bbt.js} +1 -1
  50. package/dist/chunks/{request-site-n2zyxnzr.js → request-tracing-ttrap0vm.js} +1 -1
  51. package/dist/chunks/{request-site-1dbhk1te.js → request-tracing-v7rcpbey.js} +4 -4
  52. package/dist/chunks/{request-site-whvq72as.js → request-tracing-wpn4n92f.js} +3 -3
  53. package/dist/chunks/{request-site-x2qy7jg1.js → request-tracing-x2qy7jg1.js} +1 -1
  54. package/dist/chunks/{request-site-k74zefsg.js → request-tracing-xckv21dk.js} +1 -1
  55. package/dist/chunks/{request-site-csnx1nj3.js → request-tracing-xhw3kfnn.js} +2 -2
  56. package/dist/chunks/{request-site-3te71694.js → request-tracing-z3e7v67k.js} +7 -7
  57. package/dist/chunks/{request-site-wsvmph03.js → request-tracing-zpdw139q.js} +2 -2
  58. package/dist/content-headers.js +1 -1
  59. package/dist/cors.js +1 -1
  60. package/dist/event-feed.js +5 -5
  61. package/dist/fetch.d.ts +1 -1
  62. package/dist/fetch.js +61 -60
  63. package/dist/handlers/agent.js +6 -6
  64. package/dist/handlers/artifact.js +3 -3
  65. package/dist/handlers/automation.js +2 -2
  66. package/dist/handlers/blob.js +3 -3
  67. package/dist/handlers/command.js +6 -6
  68. package/dist/handlers/config.js +6 -6
  69. package/dist/handlers/credential.js +7 -7
  70. package/dist/handlers/debug.js +6 -6
  71. package/dist/handlers/event.js +7 -7
  72. package/dist/handlers/form.js +6 -6
  73. package/dist/handlers/fs.js +8 -8
  74. package/dist/handlers/generate.js +6 -6
  75. package/dist/handlers/integration.js +6 -6
  76. package/dist/handlers/job.js +2 -2
  77. package/dist/handlers/location.js +6 -6
  78. package/dist/handlers/machine.js +1 -1
  79. package/dist/handlers/mcp.js +8 -8
  80. package/dist/handlers/media.js +2 -2
  81. package/dist/handlers/message.js +7 -7
  82. package/dist/handlers/migration.js +6 -6
  83. package/dist/handlers/model.js +6 -6
  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 +17 -16
  87. package/dist/handlers/plugin.js +6 -6
  88. package/dist/handlers/project.js +6 -6
  89. package/dist/handlers/provider.js +6 -6
  90. package/dist/handlers/pty-socket.js +1 -1
  91. package/dist/handlers/pty.js +8 -8
  92. package/dist/handlers/push.d.ts +28 -0
  93. package/dist/handlers/push.js +6 -0
  94. package/dist/handlers/reference.js +6 -6
  95. package/dist/handlers/rpc.js +6 -6
  96. package/dist/handlers/server.js +9 -9
  97. package/dist/handlers/session-error.js +1 -1
  98. package/dist/handlers/session.js +7 -7
  99. package/dist/handlers/shell.js +6 -6
  100. package/dist/handlers/skill.js +6 -6
  101. package/dist/handlers/usage.js +6 -6
  102. package/dist/handlers/vcs.js +6 -6
  103. package/dist/handlers/voice.js +6 -6
  104. package/dist/handlers/websearch.js +6 -6
  105. package/dist/handlers/worktree.js +6 -6
  106. package/dist/handlers.d.ts +1 -1
  107. package/dist/handlers.js +54 -53
  108. package/dist/location.js +4 -4
  109. package/dist/media-uri.js +1 -1
  110. package/dist/middleware/authorization.js +2 -2
  111. package/dist/middleware/defect-response.js +1 -1
  112. package/dist/middleware/form-location.js +3 -3
  113. package/dist/middleware/schema-error.js +1 -1
  114. package/dist/middleware/session-location.js +3 -3
  115. package/dist/pairing.js +1 -1
  116. package/dist/process.js +62 -61
  117. package/dist/range.js +1 -1
  118. package/dist/request-site.js +2 -2
  119. package/dist/request-tracing.js +1 -1
  120. package/dist/routes.d.ts +4 -2
  121. package/dist/routes.js +58 -57
  122. package/dist/server-info.js +5 -5
  123. package/dist/service-status.js +1 -1
  124. package/dist/workerd.d.ts +9 -13
  125. package/dist/workerd.js +68 -82
  126. package/package.json +8 -8
  127. /package/dist/chunks/{request-site-017ycvbx.js → request-tracing-017ycvbx.js} +0 -0
  128. /package/dist/chunks/{request-site-9rqn6x4v.js → request-tracing-9rqn6x4v.js} +0 -0
  129. /package/dist/chunks/{request-site-bd8755ek.js → request-tracing-bd8755ek.js} +0 -0
  130. /package/dist/chunks/{request-site-n26yr6pw.js → request-tracing-n26yr6pw.js} +0 -0
  131. /package/dist/chunks/{request-site-q187pxxd.js → request-tracing-q187pxxd.js} +0 -0
  132. /package/dist/chunks/{request-site-q4bn6dy8.js → request-tracing-q4bn6dy8.js} +0 -0
  133. /package/dist/chunks/{request-site-rqgv9x42.js → request-tracing-rqgv9x42.js} +0 -0
  134. /package/dist/chunks/{request-site-xthc02cw.js → request-tracing-xthc02cw.js} +0 -0
  135. /package/dist/chunks/{request-site-yc7nft6q.js → request-tracing-yc7nft6q.js} +0 -0
@@ -1,105 +1,105 @@
1
1
  import {
2
2
  GenerateHandler2
3
- } from "./request-site-prwd5gwt.js";
3
+ } from "./request-tracing-1cv9x2r2.js";
4
4
  import {
5
5
  VoiceHandler2
6
- } from "./request-site-rjhxbsc4.js";
6
+ } from "./request-tracing-ase6j722.js";
7
7
  import {
8
8
  MessageHandler2
9
- } from "./request-site-g4964mny.js";
9
+ } from "./request-tracing-1x93nrj9.js";
10
10
  import {
11
11
  ModelHandler2
12
- } from "./request-site-s0zgx365.js";
12
+ } from "./request-tracing-304n6v78.js";
13
13
  import {
14
14
  ProviderHandler2
15
- } from "./request-site-yc92za0p.js";
15
+ } from "./request-tracing-5q8dz5z1.js";
16
16
  import {
17
17
  SessionHandler2
18
- } from "./request-site-1dbhk1te.js";
18
+ } from "./request-tracing-v7rcpbey.js";
19
19
  import {
20
20
  PermissionHandler2
21
- } from "./request-site-kmwr1xw9.js";
21
+ } from "./request-tracing-szv33b9b.js";
22
22
  import {
23
23
  FileSystemHandler2
24
- } from "./request-site-pmv5pv9v.js";
24
+ } from "./request-tracing-h2fpekzg.js";
25
25
  import {
26
26
  FormHandler2
27
- } from "./request-site-8qsq6tbs.js";
27
+ } from "./request-tracing-8rexn64v.js";
28
28
  import {
29
29
  CommandHandler2
30
- } from "./request-site-rgbnpstw.js";
30
+ } from "./request-tracing-e3htq44t.js";
31
31
  import {
32
32
  SkillHandler2
33
- } from "./request-site-74nxvsrn.js";
33
+ } from "./request-tracing-mn3zdbxb.js";
34
34
  import {
35
35
  RpcHandler2
36
- } from "./request-site-k74zefsg.js";
36
+ } from "./request-tracing-xckv21dk.js";
37
37
  import {
38
- layer2
39
- } from "./request-site-fvpjvjpp.js";
38
+ layer4
39
+ } from "./request-tracing-qd05162x.js";
40
40
  import {
41
41
  EventHandler2
42
- } from "./request-site-kshqfq8s.js";
42
+ } from "./request-tracing-5zfzwsmf.js";
43
43
  import {
44
44
  AgentHandler2
45
- } from "./request-site-exwy1kbj.js";
45
+ } from "./request-tracing-ex3bavcc.js";
46
46
  import {
47
47
  PluginHandler2
48
- } from "./request-site-em7ed65n.js";
48
+ } from "./request-tracing-k788ajcj.js";
49
49
  import {
50
50
  ServerHandler2
51
- } from "./request-site-csetzeb0.js";
51
+ } from "./request-tracing-n9kqh2yj.js";
52
52
  import {
53
53
  DebugHandler2
54
- } from "./request-site-csnx1nj3.js";
54
+ } from "./request-tracing-xhw3kfnn.js";
55
55
  import {
56
56
  PtyHandler2
57
- } from "./request-site-0vqsbvsa.js";
57
+ } from "./request-tracing-fmgwey40.js";
58
58
  import {
59
59
  PersistentPtyHandler2
60
- } from "./request-site-rs6c9pjq.js";
60
+ } from "./request-tracing-jwfjvgfr.js";
61
61
  import {
62
62
  ShellHandler2
63
- } from "./request-site-f3gr6hfv.js";
63
+ } from "./request-tracing-9azap84r.js";
64
64
  import {
65
65
  ReferenceHandler2
66
- } from "./request-site-7dkb5ks8.js";
66
+ } from "./request-tracing-b0crtbhe.js";
67
67
  import {
68
68
  LocationHandler2
69
- } from "./request-site-p3bbq7g3.js";
69
+ } from "./request-tracing-fynca550.js";
70
70
  import {
71
71
  IntegrationHandler2
72
- } from "./request-site-2tmcamrc.js";
72
+ } from "./request-tracing-q5rgkj8j.js";
73
73
  import {
74
74
  WebSearchHandler2
75
- } from "./request-site-qq3f8fnn.js";
75
+ } from "./request-tracing-65cb9hat.js";
76
76
  import {
77
77
  UsageHandler2
78
- } from "./request-site-wsvmph03.js";
78
+ } from "./request-tracing-zpdw139q.js";
79
79
  import {
80
80
  McpHandler2
81
- } from "./request-site-rm5kndzh.js";
81
+ } from "./request-tracing-0g9mdpgv.js";
82
82
  import {
83
83
  CredentialHandler2
84
- } from "./request-site-8xdajgpr.js";
84
+ } from "./request-tracing-g003exja.js";
85
85
  import {
86
86
  ProjectHandler2
87
- } from "./request-site-8nezxn08.js";
87
+ } from "./request-tracing-4ndpf0hp.js";
88
88
  import {
89
89
  WorktreeHandler2
90
- } from "./request-site-n2zyxnzr.js";
90
+ } from "./request-tracing-ttrap0vm.js";
91
91
  import {
92
92
  VcsHandler2
93
- } from "./request-site-cwx7pqk1.js";
93
+ } from "./request-tracing-6jf8ezha.js";
94
94
  import {
95
95
  MigrationHandler2
96
- } from "./request-site-10sj2tcf.js";
96
+ } from "./request-tracing-bqg3w4bn.js";
97
97
  import {
98
98
  ConfigHandler2
99
- } from "./request-site-am27j67f.js";
99
+ } from "./request-tracing-bae6b5xr.js";
100
100
 
101
101
  // src/handlers.ts
102
102
  import { Layer } from "effect";
103
- var handlers2 = Layer.mergeAll(ServerHandler2, DebugHandler2, MigrationHandler2, LocationHandler2, AgentHandler2, PluginHandler2, SessionHandler2, MessageHandler2, ModelHandler2, GenerateHandler2, VoiceHandler2, ProviderHandler2, IntegrationHandler2, WebSearchHandler2, UsageHandler2, McpHandler2, CredentialHandler2, ProjectHandler2, FormHandler2, PermissionHandler2, FileSystemHandler2, CommandHandler2, SkillHandler2, RpcHandler2, EventHandler2.pipe(Layer.provide(layer2)), PtyHandler2, PersistentPtyHandler2, ShellHandler2, ReferenceHandler2, WorktreeHandler2, VcsHandler2, ConfigHandler2);
103
+ var handlers2 = Layer.mergeAll(ServerHandler2, DebugHandler2, MigrationHandler2, LocationHandler2, AgentHandler2, PluginHandler2, SessionHandler2, MessageHandler2, ModelHandler2, GenerateHandler2, VoiceHandler2, ProviderHandler2, IntegrationHandler2, WebSearchHandler2, UsageHandler2, McpHandler2, CredentialHandler2, ProjectHandler2, FormHandler2, PermissionHandler2, FileSystemHandler2, CommandHandler2, SkillHandler2, RpcHandler2, EventHandler2.pipe(Layer.provide(layer4)), PtyHandler2, PersistentPtyHandler2, ShellHandler2, ReferenceHandler2, WorktreeHandler2, VcsHandler2, ConfigHandler2);
104
104
 
105
105
  export { handlers2 };
@@ -1,39 +1,39 @@
1
1
  import {
2
- layer4
3
- } from "./request-site-br4x4prt.js";
2
+ layer3
3
+ } from "./request-tracing-72bf7qt9.js";
4
4
  import {
5
5
  formLocationLayer2
6
- } from "./request-site-ca564221.js";
6
+ } from "./request-tracing-0dfmev2z.js";
7
7
  import {
8
8
  sessionLocationLayer2
9
- } from "./request-site-ehyp3zqd.js";
9
+ } from "./request-tracing-fsvp99pe.js";
10
10
  import {
11
11
  Api2
12
- } from "./request-site-whvq72as.js";
12
+ } from "./request-tracing-wpn4n92f.js";
13
13
  import {
14
14
  Config2
15
- } from "./request-site-j4at0y5c.js";
15
+ } from "./request-tracing-j4at0y5c.js";
16
16
  import {
17
17
  CorsConfig2
18
- } from "./request-site-q4bn6dy8.js";
18
+ } from "./request-tracing-q4bn6dy8.js";
19
19
  import {
20
- layer3
21
- } from "./request-site-3te71694.js";
20
+ layer2
21
+ } from "./request-tracing-z3e7v67k.js";
22
22
  import {
23
23
  node2
24
- } from "./request-site-mzs0n5xz.js";
24
+ } from "./request-tracing-mzs0n5xz.js";
25
25
  import {
26
26
  handlers2
27
- } from "./request-site-mnjcp51m.js";
27
+ } from "./request-tracing-h4tjxgze.js";
28
28
  import {
29
29
  authorizationLayer2
30
- } from "./request-site-rktygpea.js";
30
+ } from "./request-tracing-rktygpea.js";
31
31
  import {
32
32
  schemaErrorLayer2
33
- } from "./request-site-bd8755ek.js";
33
+ } from "./request-tracing-bd8755ek.js";
34
34
  import {
35
35
  defectResponseLayer2
36
- } from "./request-site-n26yr6pw.js";
36
+ } from "./request-tracing-n26yr6pw.js";
37
37
 
38
38
  // src/routes.ts
39
39
  import { Database } from "@opencode/core/database/database";
@@ -78,6 +78,9 @@ import { Automation } from "@opencode/core/automation";
78
78
  import { PluginUpdate } from "@opencode/core/plugin/update";
79
79
  import { SdkPlugins } from "@opencode/core/plugin/sdk";
80
80
  import { WellKnown } from "@opencode/core/wellknown";
81
+ import { PushList } from "@opencode/core/push/list";
82
+ import { PushSender } from "@opencode/core/push/sender";
83
+ import { PushWatcher } from "@opencode/core/push/watcher";
81
84
  import { Workspace } from "@opencode/core/workspace";
82
85
  import { Watcher } from "@opencode/core/filesystem/watcher";
83
86
  import { FileWatch } from "@opencode/core/filesystem/file-watch";
@@ -122,7 +125,10 @@ var applicationServiceNodes = [
122
125
  Workspace.node,
123
126
  Machines.node,
124
127
  Identity.node,
125
- FileWatch.node
128
+ FileWatch.node,
129
+ PushList.node,
130
+ PushSender.node,
131
+ PushWatcher.node
126
132
  ];
127
133
  var applicationServices = LayerNode.group(applicationServiceNodes);
128
134
  function createRoutes2(options = {}, serviceURLs = () => [], overrides = []) {
@@ -192,8 +198,8 @@ function makeRoutes(password, options, serviceURLs, overrides, instances) {
192
198
  })) : build(overrides);
193
199
  return serviceLayer.pipe(Layer.flatMap((context) => {
194
200
  const services = Layer.succeedContext(context);
195
- const requestServices = Layer.merge(Layer.succeedContext(Context.pick(Database.Service, Credential.Service, PermissionSaved.Service, PluginUpdate.Service, Project.Service, WellKnown.Service)(context)), layer3(serviceURLs, Context.get(context, Global.Service).tmp, options.app));
196
- 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.merge(defectResponseLayer2), Layer.provideMerge(services), Layer.provideMerge(HttpRouter.layer), Layer.tap((context) => Effect.sync(() => {
201
+ const requestServices = Layer.merge(Layer.succeedContext(Context.pick(Database.Service, Credential.Service, PermissionSaved.Service, PluginUpdate.Service, Project.Service, WellKnown.Service)(context)), layer2(serviceURLs, Context.get(context, Global.Service).tmp, options.app));
202
+ 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.merge(defectResponseLayer2), Layer.provideMerge(services), Layer.provideMerge(HttpRouter.layer), Layer.tap((context) => Effect.sync(() => {
197
203
  internal = Context.get(context, HttpRouter.HttpRouter).asHttpEffect().pipe(HttpEffect.toWebHandlerWith(context));
198
204
  })));
199
205
  return Layer.merge(api, V1Migration.layer.pipe(Layer.provide(services)));
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./request-site-9rqn6x4v.js";
3
+ } from "./request-tracing-9rqn6x4v.js";
4
4
 
5
5
  // src/auth.ts
6
6
  var exports_auth = {};
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./request-site-rqgv9x42.js";
3
+ } from "./request-tracing-rqgv9x42.js";
4
4
  import {
5
5
  locationErrors2,
6
6
  response2,
7
7
  requestRef2
8
- } from "./request-site-br4x4prt.js";
8
+ } from "./request-tracing-72bf7qt9.js";
9
9
 
10
10
  // src/handlers/artifact.ts
11
11
  import { Artifact } from "@opencode/core/artifact";
@@ -1,32 +1,35 @@
1
1
  import {
2
2
  Api2
3
- } from "./request-site-whvq72as.js";
3
+ } from "./request-tracing-wpn4n92f.js";
4
4
  import {
5
5
  CorsConfig2,
6
6
  isAllowedRequestOrigin2
7
- } from "./request-site-q4bn6dy8.js";
7
+ } from "./request-tracing-q4bn6dy8.js";
8
8
  import {
9
9
  makeArtifact2
10
- } from "./request-site-javgytnb.js";
10
+ } from "./request-tracing-j6y32kmq.js";
11
11
  import {
12
12
  makeBlobGet2
13
- } from "./request-site-g23ffrnz.js";
13
+ } from "./request-tracing-g23ffrnz.js";
14
14
  import {
15
15
  makeAutomation2
16
- } from "./request-site-6pm6ek88.js";
16
+ } from "./request-tracing-6pm6ek88.js";
17
17
  import {
18
18
  makeJob2
19
- } from "./request-site-x2qy7jg1.js";
19
+ } from "./request-tracing-x2qy7jg1.js";
20
20
  import {
21
21
  makeMachineLink2,
22
22
  makeMachine2
23
- } from "./request-site-017ycvbx.js";
23
+ } from "./request-tracing-017ycvbx.js";
24
24
  import {
25
25
  makeMediaGet2
26
- } from "./request-site-djr0jy89.js";
26
+ } from "./request-tracing-djr0jy89.js";
27
+ import {
28
+ makePush2
29
+ } from "./request-tracing-qpnw2qd1.js";
27
30
  import {
28
31
  runPtySocket2
29
- } from "./request-site-q187pxxd.js";
32
+ } from "./request-tracing-q187pxxd.js";
30
33
 
31
34
  // src/handlers/persistent-pty.ts
32
35
  import { PersistentPty } from "@opencode/core/persistent-pty";
@@ -57,7 +60,8 @@ var PersistentPtyHandler2 = HttpApiBuilder.group(Api2, "server.experimental", (h
57
60
  const automation = yield* makeAutomation2;
58
61
  const machine = yield* makeMachine2;
59
62
  const machineLink = yield* makeMachineLink2;
60
- return handlers.handleRaw("media.get", (ctx) => mediaGet(ctx.params.hash, ctx.request)).handleRaw("blob.get", (ctx) => blobGet(ctx.params.id, ctx.request)).handle("job.list", (ctx) => job.list(ctx.query)).handle("job.cancel", (ctx) => job.cancel(ctx.params.id)).handleRaw("machine.link", (ctx) => machineLink(ctx.request)).handle("machine.list", () => machine.list()).handle("machine.add", (ctx) => machine.add(ctx.payload)).handle("machine.remove", (ctx) => machine.remove(ctx.params.name)).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("automation.create", (ctx) => automation.create(ctx.payload)).handle("automation.list", (ctx) => automation.list(ctx.query)).handle("automation.get", (ctx) => automation.get(ctx.params.automationID)).handle("automation.pause", (ctx) => automation.pause(ctx.params.automationID)).handle("automation.resume", (ctx) => automation.resume(ctx.params.automationID)).handle("automation.delete", (ctx) => automation.remove(ctx.params.automationID)).handle("persistentPty.read", Effect.fn(function* (ctx) {
63
+ const push = yield* makePush2;
64
+ return handlers.handleRaw("media.get", (ctx) => mediaGet(ctx.params.hash, ctx.request)).handleRaw("blob.get", (ctx) => blobGet(ctx.params.id, ctx.request)).handle("job.list", (ctx) => job.list(ctx.query)).handle("job.cancel", (ctx) => job.cancel(ctx.params.id)).handleRaw("machine.link", (ctx) => machineLink(ctx.request)).handle("machine.list", () => machine.list()).handle("machine.add", (ctx) => machine.add(ctx.payload)).handle("machine.remove", (ctx) => machine.remove(ctx.params.name)).handle("push.get", () => push.get()).handle("push.device.register", (ctx) => push.register(ctx.params.deviceID, ctx.payload)).handle("push.device.remove", (ctx) => push.remove(ctx.params.deviceID)).handle("push.device.update", (ctx) => push.update(ctx.params.deviceID, ctx.payload)).handle("push.device.session.set", (ctx) => push.setDeviceBell(ctx.params.deviceID, ctx.params.sessionID, ctx.payload)).handle("push.device.session.remove", (ctx) => push.removeDeviceBell(ctx.params.deviceID, ctx.params.sessionID)).handle("push.session.set", (ctx) => push.setSessionBell(ctx.params.sessionID, ctx.payload)).handle("push.session.remove", (ctx) => push.removeSessionBell(ctx.params.sessionID)).handle("push.settings.set", (ctx) => push.setSettings(ctx.payload)).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("automation.create", (ctx) => automation.create(ctx.payload)).handle("automation.list", (ctx) => automation.list(ctx.query)).handle("automation.get", (ctx) => automation.get(ctx.params.automationID)).handle("automation.pause", (ctx) => automation.pause(ctx.params.automationID)).handle("automation.resume", (ctx) => automation.resume(ctx.params.automationID)).handle("automation.delete", (ctx) => automation.remove(ctx.params.automationID)).handle("persistentPty.read", Effect.fn(function* (ctx) {
61
65
  return { data: yield* pty.read(ctx.params.sessionID, ctx.query.lines).pipe(mapUnavailable) };
62
66
  })).handle("persistentPty.list", Effect.fn(function* (ctx) {
63
67
  return { data: yield* pty.list(ctx.params.sessionID).pipe(mapUnavailable) };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./request-site-br4x4prt.js";
3
+ } from "./request-tracing-72bf7qt9.js";
4
4
  import {
5
5
  Api2
6
- } from "./request-site-whvq72as.js";
6
+ } from "./request-tracing-wpn4n92f.js";
7
7
 
8
8
  // src/handlers/plugin.ts
9
9
  import { Plugin } from "@opencode/core/plugin";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./request-site-br4x4prt.js";
3
+ } from "./request-tracing-72bf7qt9.js";
4
4
  import {
5
5
  Api2
6
- } from "./request-site-whvq72as.js";
6
+ } from "./request-tracing-wpn4n92f.js";
7
7
 
8
8
  // src/handlers/skill.ts
9
9
  import { Skill } from "@opencode/core/skill";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  isAllowedRequestOrigin2
3
- } from "./request-site-q4bn6dy8.js";
3
+ } from "./request-tracing-q4bn6dy8.js";
4
4
  import {
5
5
  __export
6
- } from "./request-site-9rqn6x4v.js";
6
+ } from "./request-tracing-9rqn6x4v.js";
7
7
 
8
8
  // src/request-site.ts
9
9
  var exports_request_site = {};
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./request-site-9rqn6x4v.js";
3
+ } from "./request-tracing-9rqn6x4v.js";
4
4
 
5
5
  // src/pairing.ts
6
6
  var exports_pairing = {};
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  Api2
3
- } from "./request-site-whvq72as.js";
3
+ } from "./request-tracing-wpn4n92f.js";
4
4
  import {
5
5
  SESSION_TTL_SECONDS2,
6
6
  Config2,
7
7
  issueSession2,
8
8
  sessionCookieName2
9
- } from "./request-site-j4at0y5c.js";
9
+ } from "./request-tracing-j4at0y5c.js";
10
10
  import {
11
- Service3
12
- } from "./request-site-3te71694.js";
11
+ Service2
12
+ } from "./request-tracing-z3e7v67k.js";
13
13
  import {
14
14
  Service4
15
- } from "./request-site-mzs0n5xz.js";
15
+ } from "./request-tracing-mzs0n5xz.js";
16
16
 
17
17
  // src/handlers/server.ts
18
18
  import { hostname } from "node:os";
@@ -25,7 +25,7 @@ var ServerHandler2 = HttpApiBuilder.group(Api2, "server.server", (handlers) => E
25
25
  const pairing = yield* Service4;
26
26
  const auth = yield* Config2;
27
27
  return handlers.handle("server.info", () => Effect.gen(function* () {
28
- const info = yield* Service3;
28
+ const info = yield* Service2;
29
29
  return {
30
30
  version: info.app.version ?? "unknown",
31
31
  pid: process.pid ?? 0,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./request-site-br4x4prt.js";
3
+ } from "./request-tracing-72bf7qt9.js";
4
4
  import {
5
5
  Api2
6
- } from "./request-site-whvq72as.js";
6
+ } from "./request-tracing-wpn4n92f.js";
7
7
 
8
8
  // src/handlers/integration.ts
9
9
  import { Integration } from "@opencode/core/integration";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  __export
3
- } from "./request-site-9rqn6x4v.js";
3
+ } from "./request-tracing-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: () => layer4,
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 layer4 = 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, layer4, exports_event_feed };
@@ -0,0 +1,58 @@
1
+ // src/handlers/push.ts
2
+ import { Effect, Option } from "effect";
3
+ import { HttpApiSchema } from "effect/http-api";
4
+ import { PushList } from "@opencode/core/push/list";
5
+ import { InvalidRequestError, PushDeviceNotFoundError } from "@opencode/protocol/errors";
6
+ import { Session } from "@opencode/core/session";
7
+ var makePush2 = Effect.gen(function* () {
8
+ const list = yield* PushList.Service;
9
+ const sessions = yield* Session.Service;
10
+ const invalid = (error) => new InvalidRequestError({ message: error.reason });
11
+ const notFound = (error) => new PushDeviceNotFoundError({ deviceID: error.id, message: error.message });
12
+ const rejectSubagent = Effect.fnUntraced(function* (sessionID) {
13
+ const session = Option.getOrUndefined(yield* sessions.get(sessionID).pipe(Effect.option));
14
+ if (session?.parentID)
15
+ return yield* new InvalidRequestError({ message: "Set the bell on the top-level session, not on a subagent" });
16
+ });
17
+ return {
18
+ get: Effect.fn("PushHandler.get")(function* () {
19
+ return { data: yield* list.info() };
20
+ }),
21
+ register: Effect.fn("PushHandler.register")(function* (id, payload) {
22
+ return { data: yield* list.register(id, payload).pipe(Effect.mapError(invalid)) };
23
+ }),
24
+ remove: Effect.fn("PushHandler.remove")(function* (id) {
25
+ yield* list.remove(id);
26
+ return HttpApiSchema.NoContent.make();
27
+ }),
28
+ update: Effect.fn("PushHandler.update")(function* (id, payload) {
29
+ return { data: yield* list.update(id, payload).pipe(Effect.mapError(notFound)) };
30
+ }),
31
+ setDeviceBell: Effect.fn("PushHandler.setDeviceBell")(function* (id, sessionID, bell) {
32
+ yield* rejectSubagent(sessionID);
33
+ return {
34
+ data: yield* list.setDeviceBell(id, sessionID, bell).pipe(Effect.catchTags({
35
+ "PushList.InvalidError": (error) => Effect.fail(invalid(error)),
36
+ "PushList.NotFoundError": (error) => Effect.fail(notFound(error))
37
+ }))
38
+ };
39
+ }),
40
+ removeDeviceBell: Effect.fn("PushHandler.removeDeviceBell")(function* (id, sessionID) {
41
+ yield* list.removeDeviceBell(id, sessionID).pipe(Effect.mapError(notFound));
42
+ return HttpApiSchema.NoContent.make();
43
+ }),
44
+ setSessionBell: Effect.fn("PushHandler.setSessionBell")(function* (sessionID, bell) {
45
+ yield* rejectSubagent(sessionID);
46
+ return { data: yield* list.setSessionBell(sessionID, bell).pipe(Effect.mapError(invalid)) };
47
+ }),
48
+ removeSessionBell: Effect.fn("PushHandler.removeSessionBell")(function* (sessionID) {
49
+ yield* list.removeSessionBell(sessionID);
50
+ return HttpApiSchema.NoContent.make();
51
+ }),
52
+ setSettings: Effect.fn("PushHandler.setSettings")(function* (settings) {
53
+ return { data: yield* list.setSettings(settings).pipe(Effect.mapError(invalid)) };
54
+ })
55
+ };
56
+ });
57
+
58
+ export { makePush2 };
@@ -4,7 +4,7 @@ import {
4
4
  authorized2,
5
5
  verifySession2,
6
6
  sessionCookieName2
7
- } from "./request-site-j4at0y5c.js";
7
+ } from "./request-tracing-j4at0y5c.js";
8
8
 
9
9
  // src/middleware/authorization.ts
10
10
  import { UnauthorizedError } from "@opencode/protocol/errors";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./request-site-rqgv9x42.js";
3
+ } from "./request-tracing-rqgv9x42.js";
4
4
  import {
5
5
  locationErrors2,
6
6
  response2,
7
7
  sessionInfo2
8
- } from "./request-site-br4x4prt.js";
8
+ } from "./request-tracing-72bf7qt9.js";
9
9
  import {
10
10
  Api2
11
- } from "./request-site-whvq72as.js";
11
+ } from "./request-tracing-wpn4n92f.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 "./request-site-9rqn6x4v.js";
3
+ } from "./request-tracing-9rqn6x4v.js";
4
4
 
5
5
  // src/content-headers.ts
6
6
  var exports_content_headers = {};
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./request-site-whvq72as.js";
3
+ } from "./request-tracing-wpn4n92f.js";
4
4
 
5
5
  // src/handlers/worktree.ts
6
6
  import { Git } from "@opencode/core/git";
@@ -4,16 +4,16 @@ import {
4
4
  missingMessage2,
5
5
  failedMessageDecode2,
6
6
  failedSnapshot2
7
- } from "./request-site-rqgv9x42.js";
7
+ } from "./request-tracing-rqgv9x42.js";
8
8
  import {
9
9
  locationErrors2
10
- } from "./request-site-br4x4prt.js";
10
+ } from "./request-tracing-72bf7qt9.js";
11
11
  import {
12
12
  Api2
13
- } from "./request-site-whvq72as.js";
13
+ } from "./request-tracing-wpn4n92f.js";
14
14
  import {
15
15
  wantsMediaRefs2
16
- } from "./request-site-xthc02cw.js";
16
+ } from "./request-tracing-xthc02cw.js";
17
17
 
18
18
  // src/handlers/session.ts
19
19
  import { Instance } from "@opencode/core/instance/service";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  LocationMiddleware2
3
- } from "./request-site-br4x4prt.js";
3
+ } from "./request-tracing-72bf7qt9.js";
4
4
  import {
5
5
  FormLocationMiddleware2
6
- } from "./request-site-ca564221.js";
6
+ } from "./request-tracing-0dfmev2z.js";
7
7
  import {
8
8
  SessionLocationMiddleware2
9
- } from "./request-site-ehyp3zqd.js";
9
+ } from "./request-tracing-fsvp99pe.js";
10
10
 
11
11
  // src/api.ts
12
12
  import { makeDefaultApi } from "@opencode/protocol/api";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./request-site-rqgv9x42.js";
3
+ } from "./request-tracing-rqgv9x42.js";
4
4
 
5
5
  // src/handlers/job.ts
6
6
  import { Job } from "@opencode/core/job";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./request-site-whvq72as.js";
3
+ } from "./request-tracing-wpn4n92f.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
  requestRef2
3
- } from "./request-site-br4x4prt.js";
3
+ } from "./request-tracing-72bf7qt9.js";
4
4
  import {
5
5
  Api2
6
- } from "./request-site-whvq72as.js";
6
+ } from "./request-tracing-wpn4n92f.js";
7
7
 
8
8
  // src/handlers/debug.ts
9
9
  import { LocationServiceMap } from "@opencode/core/location-service-map";