@dxos/protocols 0.8.4-main.406dc2a → 0.8.4-main.422d1c7879

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 (294) hide show
  1. package/README.md +1 -1
  2. package/dist/src/FeedProtocol.d.ts +528 -0
  3. package/dist/src/FeedProtocol.d.ts.map +1 -0
  4. package/dist/src/FeedProtocol.js +237 -0
  5. package/dist/src/FeedProtocol.js.map +1 -0
  6. package/dist/src/FunctionProtocol.d.ts +82 -0
  7. package/dist/src/FunctionProtocol.d.ts.map +1 -0
  8. package/dist/src/FunctionProtocol.js +4 -0
  9. package/dist/src/FunctionProtocol.js.map +1 -0
  10. package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts +237 -0
  11. package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts.map +1 -0
  12. package/dist/src/buf/proto/gen/dxos/client/queue_pb.js +44 -0
  13. package/dist/src/buf/proto/gen/dxos/client/queue_pb.js.map +1 -0
  14. package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts +64 -3
  15. package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts.map +1 -1
  16. package/dist/src/buf/proto/gen/dxos/client/services_pb.js +68 -37
  17. package/dist/src/buf/proto/gen/dxos/client/services_pb.js.map +1 -1
  18. package/dist/src/buf/proto/gen/dxos/config_pb.d.ts +106 -0
  19. package/dist/src/buf/proto/gen/dxos/config_pb.d.ts.map +1 -1
  20. package/dist/src/buf/proto/gen/dxos/config_pb.js +72 -1
  21. package/dist/src/buf/proto/gen/dxos/config_pb.js.map +1 -1
  22. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.d.ts +6 -0
  23. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.d.ts.map +1 -1
  24. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.js +1 -1
  25. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.js.map +1 -1
  26. package/dist/src/buf/proto/gen/dxos/echo/query_pb.d.ts +12 -2
  27. package/dist/src/buf/proto/gen/dxos/echo/query_pb.d.ts.map +1 -1
  28. package/dist/src/buf/proto/gen/dxos/echo/query_pb.js +1 -1
  29. package/dist/src/buf/proto/gen/dxos/echo/query_pb.js.map +1 -1
  30. package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts +55 -9
  31. package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts.map +1 -1
  32. package/dist/src/buf/proto/gen/dxos/echo/service_pb.js +15 -5
  33. package/dist/src/buf/proto/gen/dxos/echo/service_pb.js.map +1 -1
  34. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.d.ts +28 -0
  35. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.d.ts.map +1 -1
  36. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.js +10 -5
  37. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.js.map +1 -1
  38. package/dist/src/buf/proto/gen/dxos/google_pb.js +1 -1
  39. package/dist/src/buf/proto/gen/dxos/google_pb.js.map +1 -1
  40. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.d.ts +39 -0
  41. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.d.ts.map +1 -1
  42. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.js +27 -2
  43. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.js.map +1 -1
  44. package/dist/src/buf/proto/gen/dxos/iframe_pb.d.ts +1 -10
  45. package/dist/src/buf/proto/gen/dxos/iframe_pb.d.ts.map +1 -1
  46. package/dist/src/buf/proto/gen/dxos/iframe_pb.js +1 -1
  47. package/dist/src/buf/proto/gen/dxos/iframe_pb.js.map +1 -1
  48. package/dist/src/buf/proto/gen/dxos/rpc_pb.d.ts +24 -0
  49. package/dist/src/buf/proto/gen/dxos/rpc_pb.d.ts.map +1 -1
  50. package/dist/src/buf/proto/gen/dxos/rpc_pb.js +12 -7
  51. package/dist/src/buf/proto/gen/dxos/rpc_pb.js.map +1 -1
  52. package/dist/src/buf/proto/gen/dxos/tracing_pb.d.ts +1 -139
  53. package/dist/src/buf/proto/gen/dxos/tracing_pb.d.ts.map +1 -1
  54. package/dist/src/buf/proto/gen/dxos/tracing_pb.js +11 -45
  55. package/dist/src/buf/proto/gen/dxos/tracing_pb.js.map +1 -1
  56. package/dist/src/codec.test.js +1 -1
  57. package/dist/src/edge/EdgeFunctionEnv.d.ts +108 -0
  58. package/dist/src/edge/EdgeFunctionEnv.d.ts.map +1 -0
  59. package/dist/src/edge/EdgeFunctionEnv.js +4 -0
  60. package/dist/src/edge/EdgeFunctionEnv.js.map +1 -0
  61. package/dist/src/edge/edge.d.ts +517 -0
  62. package/dist/src/edge/edge.d.ts.map +1 -0
  63. package/dist/src/edge/edge.js +179 -0
  64. package/dist/src/edge/edge.js.map +1 -0
  65. package/dist/src/edge/errors.d.ts +29 -0
  66. package/dist/src/edge/errors.d.ts.map +1 -0
  67. package/dist/src/edge/errors.js +69 -0
  68. package/dist/src/edge/errors.js.map +1 -0
  69. package/dist/src/edge/index.d.ts +5 -0
  70. package/dist/src/edge/index.d.ts.map +1 -0
  71. package/dist/src/edge/index.js +8 -0
  72. package/dist/src/edge/index.js.map +1 -0
  73. package/dist/src/edge/registry.d.ts +131 -0
  74. package/dist/src/edge/registry.d.ts.map +1 -0
  75. package/dist/src/edge/registry.js +80 -0
  76. package/dist/src/edge/registry.js.map +1 -0
  77. package/dist/src/errors/base-errors.d.ts +86 -8
  78. package/dist/src/errors/base-errors.d.ts.map +1 -1
  79. package/dist/src/errors/base-errors.js +4 -20
  80. package/dist/src/errors/base-errors.js.map +1 -1
  81. package/dist/src/errors/encoding.d.ts +2 -2
  82. package/dist/src/errors/encoding.d.ts.map +1 -1
  83. package/dist/src/errors/encoding.js +1 -1
  84. package/dist/src/errors/encoding.js.map +1 -1
  85. package/dist/src/errors/errors.d.ts +619 -42
  86. package/dist/src/errors/errors.d.ts.map +1 -1
  87. package/dist/src/errors/errors.js +50 -104
  88. package/dist/src/errors/errors.js.map +1 -1
  89. package/dist/src/errors/errors.test.js +2 -2
  90. package/dist/src/errors/errors.test.js.map +1 -1
  91. package/dist/src/errors/helpers.d.ts +9 -5
  92. package/dist/src/errors/helpers.d.ts.map +1 -1
  93. package/dist/src/errors/helpers.js +3 -3
  94. package/dist/src/errors/helpers.js.map +1 -1
  95. package/dist/src/errors/index.d.ts +5 -5
  96. package/dist/src/errors/index.js +5 -5
  97. package/dist/src/feed-replication.d.ts.map +1 -1
  98. package/dist/src/index.d.ts +12 -12
  99. package/dist/src/index.d.ts.map +1 -1
  100. package/dist/src/index.js +11 -11
  101. package/dist/src/index.js.map +1 -1
  102. package/dist/src/indexing.test.js +1 -1
  103. package/dist/src/messenger.d.ts +16 -0
  104. package/dist/src/messenger.d.ts.map +1 -0
  105. package/dist/src/messenger.js +4 -0
  106. package/dist/src/messenger.js.map +1 -0
  107. package/dist/src/proto/gen/dxos/client/services.d.ts +1009 -845
  108. package/dist/src/proto/gen/dxos/client/services.d.ts.map +1 -1
  109. package/dist/src/proto/gen/dxos/client/services.js +107 -94
  110. package/dist/src/proto/gen/dxos/client/services.js.map +1 -1
  111. package/dist/src/proto/gen/dxos/config.d.ts +59 -0
  112. package/dist/src/proto/gen/dxos/config.d.ts.map +1 -1
  113. package/dist/src/proto/gen/dxos/config.js +26 -0
  114. package/dist/src/proto/gen/dxos/config.js.map +1 -1
  115. package/dist/src/proto/gen/dxos/devtools/host.d.ts +31 -31
  116. package/dist/src/proto/gen/dxos/devtools/host.d.ts.map +1 -1
  117. package/dist/src/proto/gen/dxos/echo/metadata.d.ts +4 -0
  118. package/dist/src/proto/gen/dxos/echo/metadata.d.ts.map +1 -1
  119. package/dist/src/proto/gen/dxos/echo/metadata.js.map +1 -1
  120. package/dist/src/proto/gen/dxos/echo/query.d.ts +17 -1
  121. package/dist/src/proto/gen/dxos/echo/query.d.ts.map +1 -1
  122. package/dist/src/proto/gen/dxos/echo/query.js.map +1 -1
  123. package/dist/src/proto/gen/dxos/echo/service.d.ts +34 -8
  124. package/dist/src/proto/gen/dxos/echo/service.d.ts.map +1 -1
  125. package/dist/src/proto/gen/dxos/edge/messenger.d.ts +24 -0
  126. package/dist/src/proto/gen/dxos/edge/messenger.d.ts.map +1 -1
  127. package/dist/src/proto/gen/dxos/edge/messenger.js.map +1 -1
  128. package/dist/src/proto/gen/dxos/halo/credentials.d.ts +15 -1
  129. package/dist/src/proto/gen/dxos/halo/credentials.d.ts.map +1 -1
  130. package/dist/src/proto/gen/dxos/halo/credentials.js +9 -0
  131. package/dist/src/proto/gen/dxos/halo/credentials.js.map +1 -1
  132. package/dist/src/proto/gen/dxos/iframe.d.ts +0 -10
  133. package/dist/src/proto/gen/dxos/iframe.d.ts.map +1 -1
  134. package/dist/src/proto/gen/dxos/iframe.js.map +1 -1
  135. package/dist/src/proto/gen/dxos/rpc.d.ts +19 -0
  136. package/dist/src/proto/gen/dxos/rpc.d.ts.map +1 -1
  137. package/dist/src/proto/gen/dxos/rpc.js.map +1 -1
  138. package/dist/src/proto/gen/dxos/tracing.d.ts +0 -79
  139. package/dist/src/proto/gen/dxos/tracing.d.ts.map +1 -1
  140. package/dist/src/proto/gen/google/protobuf.d.ts +326 -40
  141. package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -1
  142. package/dist/src/proto/gen/google/protobuf.js +127 -1
  143. package/dist/src/proto/gen/google/protobuf.js.map +1 -1
  144. package/dist/src/proto/gen/index.d.ts +40 -7
  145. package/dist/src/proto/gen/index.d.ts.map +1 -1
  146. package/dist/src/proto/gen/index.js +1 -1
  147. package/dist/src/proto/gen/index.js.map +1 -1
  148. package/dist/src/proto/index.d.ts +2 -2
  149. package/dist/src/proto/index.js +1 -1
  150. package/dist/src/proto/types.d.ts +1 -1
  151. package/dist/src/space-archive.d.ts +60 -1
  152. package/dist/src/space-archive.d.ts.map +1 -1
  153. package/dist/src/space-archive.js +13 -1
  154. package/dist/src/space-archive.js.map +1 -1
  155. package/dist/src/types.d.ts +2 -2
  156. package/dist/tsconfig.tsbuildinfo +1 -1
  157. package/package.json +19 -34
  158. package/src/FeedProtocol.ts +320 -0
  159. package/src/FunctionProtocol.ts +102 -0
  160. package/src/buf/proto/gen/dxos/agent/dashboard_pb.ts +1 -1
  161. package/src/buf/proto/gen/dxos/agent/echo-proxy_pb.ts +1 -1
  162. package/src/buf/proto/gen/dxos/agent/epoch_pb.ts +1 -1
  163. package/src/buf/proto/gen/dxos/agent/functions_pb.ts +1 -1
  164. package/src/buf/proto/gen/dxos/bot_pb.ts +1 -1
  165. package/src/buf/proto/gen/dxos/client/invitation_pb.ts +1 -1
  166. package/src/buf/proto/gen/dxos/client/logging_pb.ts +1 -1
  167. package/src/buf/proto/gen/dxos/client/queue_pb.ts +286 -0
  168. package/src/buf/proto/gen/dxos/client/services_pb.ts +114 -40
  169. package/src/buf/proto/gen/dxos/config_pb.ts +125 -2
  170. package/src/buf/proto/gen/dxos/devtools/diagnostics_pb.ts +1 -1
  171. package/src/buf/proto/gen/dxos/devtools/host_pb.ts +1 -1
  172. package/src/buf/proto/gen/dxos/devtools/swarm_pb.ts +1 -1
  173. package/src/buf/proto/gen/dxos/echo/blob_pb.ts +1 -1
  174. package/src/buf/proto/gen/dxos/echo/feed_pb.ts +1 -1
  175. package/src/buf/proto/gen/dxos/echo/filter_pb.ts +1 -1
  176. package/src/buf/proto/gen/dxos/echo/indexing_pb.ts +1 -1
  177. package/src/buf/proto/gen/dxos/echo/metadata_pb.ts +9 -2
  178. package/src/buf/proto/gen/dxos/echo/model/document_pb.ts +1 -1
  179. package/src/buf/proto/gen/dxos/echo/model/messenger_pb.ts +1 -1
  180. package/src/buf/proto/gen/dxos/echo/model/text_pb.ts +1 -1
  181. package/src/buf/proto/gen/dxos/echo/object_pb.ts +1 -1
  182. package/src/buf/proto/gen/dxos/echo/query_pb.ts +16 -4
  183. package/src/buf/proto/gen/dxos/echo/service_pb.ts +68 -16
  184. package/src/buf/proto/gen/dxos/echo/snapshot_pb.ts +1 -1
  185. package/src/buf/proto/gen/dxos/echo/timeframe_pb.ts +1 -1
  186. package/src/buf/proto/gen/dxos/edge/calls_pb.ts +1 -1
  187. package/src/buf/proto/gen/dxos/edge/messenger_pb.ts +39 -6
  188. package/src/buf/proto/gen/dxos/edge/signal_pb.ts +1 -1
  189. package/src/buf/proto/gen/dxos/error_pb.ts +1 -1
  190. package/src/buf/proto/gen/dxos/field_options_pb.ts +1 -1
  191. package/src/buf/proto/gen/dxos/google_pb.ts +1 -1
  192. package/src/buf/proto/gen/dxos/gravity_pb.ts +1 -1
  193. package/src/buf/proto/gen/dxos/halo/credentials/auth_pb.ts +1 -1
  194. package/src/buf/proto/gen/dxos/halo/credentials/greet_pb.ts +1 -1
  195. package/src/buf/proto/gen/dxos/halo/credentials/identity_pb.ts +1 -1
  196. package/src/buf/proto/gen/dxos/halo/credentials_pb.ts +49 -3
  197. package/src/buf/proto/gen/dxos/halo/invitations_pb.ts +1 -1
  198. package/src/buf/proto/gen/dxos/halo/keyring_pb.ts +1 -1
  199. package/src/buf/proto/gen/dxos/halo/keys_pb.ts +1 -1
  200. package/src/buf/proto/gen/dxos/halo/signed_pb.ts +1 -1
  201. package/src/buf/proto/gen/dxos/iframe_pb.ts +3 -14
  202. package/src/buf/proto/gen/dxos/keys_pb.ts +1 -1
  203. package/src/buf/proto/gen/dxos/mesh/bridge_pb.ts +1 -1
  204. package/src/buf/proto/gen/dxos/mesh/broadcast_pb.ts +1 -1
  205. package/src/buf/proto/gen/dxos/mesh/messaging_pb.ts +1 -1
  206. package/src/buf/proto/gen/dxos/mesh/muxer_pb.ts +1 -1
  207. package/src/buf/proto/gen/dxos/mesh/presence_pb.ts +1 -1
  208. package/src/buf/proto/gen/dxos/mesh/protocol_pb.ts +1 -1
  209. package/src/buf/proto/gen/dxos/mesh/replicator_pb.ts +1 -1
  210. package/src/buf/proto/gen/dxos/mesh/signal_pb.ts +1 -1
  211. package/src/buf/proto/gen/dxos/mesh/swarm_pb.ts +1 -1
  212. package/src/buf/proto/gen/dxos/mesh/teleport/admission-discovery_pb.ts +1 -1
  213. package/src/buf/proto/gen/dxos/mesh/teleport/auth_pb.ts +1 -1
  214. package/src/buf/proto/gen/dxos/mesh/teleport/automerge_pb.ts +1 -1
  215. package/src/buf/proto/gen/dxos/mesh/teleport/blobsync_pb.ts +1 -1
  216. package/src/buf/proto/gen/dxos/mesh/teleport/control_pb.ts +1 -1
  217. package/src/buf/proto/gen/dxos/mesh/teleport/gossip_pb.ts +1 -1
  218. package/src/buf/proto/gen/dxos/mesh/teleport/notarization_pb.ts +1 -1
  219. package/src/buf/proto/gen/dxos/mesh/teleport/replicator_pb.ts +1 -1
  220. package/src/buf/proto/gen/dxos/registry_pb.ts +1 -1
  221. package/src/buf/proto/gen/dxos/rpc_pb.ts +37 -8
  222. package/src/buf/proto/gen/dxos/service/agentmanager_pb.ts +1 -1
  223. package/src/buf/proto/gen/dxos/service/publisher_pb.ts +1 -1
  224. package/src/buf/proto/gen/dxos/service/supervisor_pb.ts +1 -1
  225. package/src/buf/proto/gen/dxos/service/tunnel_pb.ts +1 -1
  226. package/src/buf/proto/gen/dxos/tracing_pb.ts +12 -179
  227. package/src/buf/proto/gen/dxos/type_pb.ts +1 -1
  228. package/src/buf/proto/gen/dxos/value_pb.ts +1 -1
  229. package/src/buf/proto/gen/example/testing/data_pb.ts +1 -1
  230. package/src/buf/proto/gen/example/testing/rpc_pb.ts +1 -1
  231. package/src/codec.test.ts +1 -1
  232. package/src/edge/EdgeFunctionEnv.ts +191 -0
  233. package/src/edge/edge.ts +610 -0
  234. package/src/edge/errors.ts +85 -0
  235. package/src/edge/index.ts +8 -0
  236. package/src/edge/registry.ts +97 -0
  237. package/src/errors/base-errors.ts +4 -22
  238. package/src/errors/encoding.ts +2 -3
  239. package/src/errors/errors.test.ts +2 -2
  240. package/src/errors/errors.ts +57 -124
  241. package/src/errors/helpers.ts +6 -7
  242. package/src/errors/index.ts +5 -5
  243. package/src/feed-replication.ts +1 -0
  244. package/src/index.ts +12 -12
  245. package/src/indexing.test.ts +1 -1
  246. package/src/messenger.ts +22 -0
  247. package/src/proto/dxos/client/queue.proto +81 -0
  248. package/src/proto/dxos/client/services.proto +19 -1
  249. package/src/proto/dxos/config.proto +48 -1
  250. package/src/proto/dxos/echo/metadata.proto +3 -0
  251. package/src/proto/dxos/echo/query.proto +4 -1
  252. package/src/proto/dxos/echo/service.proto +27 -6
  253. package/src/proto/dxos/edge/messenger.proto +10 -0
  254. package/src/proto/dxos/halo/credentials.proto +15 -0
  255. package/src/proto/dxos/iframe.proto +1 -3
  256. package/src/proto/dxos/rpc.proto +7 -0
  257. package/src/proto/dxos/tracing.proto +0 -40
  258. package/src/proto/gen/dxos/client/services.ts +1009 -845
  259. package/src/proto/gen/dxos/config.ts +59 -0
  260. package/src/proto/gen/dxos/devtools/host.ts +31 -31
  261. package/src/proto/gen/dxos/echo/metadata.ts +4 -0
  262. package/src/proto/gen/dxos/echo/query.ts +17 -1
  263. package/src/proto/gen/dxos/echo/service.ts +33 -8
  264. package/src/proto/gen/dxos/edge/messenger.ts +24 -0
  265. package/src/proto/gen/dxos/halo/credentials.ts +15 -1
  266. package/src/proto/gen/dxos/iframe.ts +0 -10
  267. package/src/proto/gen/dxos/rpc.ts +19 -0
  268. package/src/proto/gen/dxos/tracing.ts +0 -76
  269. package/src/proto/gen/google/protobuf.ts +326 -40
  270. package/src/proto/gen/index.ts +41 -8
  271. package/src/proto/index.ts +2 -2
  272. package/src/proto/types.ts +1 -1
  273. package/src/space-archive.ts +70 -1
  274. package/src/types.ts +2 -2
  275. package/dist/src/edge-error.d.ts +0 -26
  276. package/dist/src/edge-error.d.ts.map +0 -1
  277. package/dist/src/edge-error.js +0 -102
  278. package/dist/src/edge-error.js.map +0 -1
  279. package/dist/src/edge.d.ts +0 -246
  280. package/dist/src/edge.d.ts.map +0 -1
  281. package/dist/src/edge.js +0 -49
  282. package/dist/src/edge.js.map +0 -1
  283. package/dist/src/query.d.ts +0 -5
  284. package/dist/src/query.d.ts.map +0 -1
  285. package/dist/src/query.js +0 -8
  286. package/dist/src/query.js.map +0 -1
  287. package/dist/src/queue.d.ts +0 -28
  288. package/dist/src/queue.d.ts.map +0 -1
  289. package/dist/src/queue.js +0 -8
  290. package/dist/src/queue.js.map +0 -1
  291. package/src/edge-error.ts +0 -134
  292. package/src/edge.ts +0 -279
  293. package/src/query.ts +0 -8
  294. package/src/queue.ts +0 -38
@@ -0,0 +1,179 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+ import * as Schema from 'effect/Schema';
5
+ import { BaseError } from '@dxos/errors';
6
+ import { invariant } from '@dxos/invariant';
7
+ import { SpaceId } from '@dxos/keys';
8
+ /**
9
+ * HTTP header sent on every Edge request to classify traffic for metering.
10
+ */
11
+ export const EDGE_CLIENT_TAG_HEADER = 'X-DXOS-Client-Tag';
12
+ // TODO(burdon): Rename EdgerRouterEndpoint.
13
+ // If we would rename it, we need to be careful to not break composer production.
14
+ export var EdgeService;
15
+ (function (EdgeService) {
16
+ EdgeService["AUTOMERGE_REPLICATOR"] = "automerge-replicator";
17
+ /**
18
+ * Control feed replicator (hypercore append only logs) for the space.
19
+ */
20
+ // TODO(mykola): Remove once we migrate to keyhive for access control.
21
+ EdgeService["FEED_REPLICATOR"] = "feed-replicator";
22
+ /**
23
+ * Feed replicator (ordered data list) for the space.
24
+ */
25
+ // TODO(mykola): Rename to FEED_REPLICATOR when we migrate to keyhive for access control.
26
+ EdgeService["QUEUE_REPLICATOR"] = "queue-replicator";
27
+ EdgeService["SWARM"] = "swarm";
28
+ EdgeService["SIGNAL"] = "signal";
29
+ EdgeService["STATUS"] = "status";
30
+ })(EdgeService || (EdgeService = {}));
31
+ const _SerializedError = Schema.Struct({
32
+ name: Schema.optional(Schema.String),
33
+ message: Schema.optional(Schema.String),
34
+ context: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),
35
+ stack: Schema.optional(Schema.String),
36
+ cause: Schema.optional(Schema.suspend(() => SerializedError)),
37
+ });
38
+ export const SerializedError = _SerializedError;
39
+ /**
40
+ * Use this to create a response from the Edge service.
41
+ */
42
+ export const EdgeResponse = Object.freeze({
43
+ success: (data, status = 200) => {
44
+ invariant(status >= 200 && status < 300, 'Status code must be in the 2xx range');
45
+ const headers = new Headers({ 'Content-Type': 'application/json' });
46
+ return new Response(JSON.stringify({
47
+ success: true,
48
+ data,
49
+ }), {
50
+ status,
51
+ headers,
52
+ });
53
+ },
54
+ failure: ({ message, error, errorEncoded, data, shouldRetryAfter, status = 500, }) => {
55
+ const headers = new Headers({ 'Content-Type': 'application/json' });
56
+ if (shouldRetryAfter) {
57
+ headers.set('Retry-After', String(shouldRetryAfter));
58
+ }
59
+ return new Response(JSON.stringify({
60
+ success: false,
61
+ message,
62
+ data,
63
+ error: error ? ErrorCodec.encode(error) : errorEncoded,
64
+ }), {
65
+ status,
66
+ headers,
67
+ });
68
+ },
69
+ });
70
+ /**
71
+ * Note: Do not change the values of these enums, this values are stored in the FunctionVersions database.
72
+ */
73
+ export const FunctionRuntimeKind = Schema.Enums({
74
+ // https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/
75
+ WORKERS_FOR_PLATFORMS: 'WORKERS_FOR_PLATFORMS',
76
+ // https://developers.cloudflare.com/workers/runtime-apis/bindings/worker-loader/
77
+ WORKER_LOADER: 'WORKER_LOADER',
78
+ });
79
+ export var EdgeAgentStatus;
80
+ (function (EdgeAgentStatus) {
81
+ EdgeAgentStatus["ACTIVE"] = "active";
82
+ EdgeAgentStatus["INACTIVE"] = "inactive";
83
+ EdgeAgentStatus["NOT_FOUND"] = "not_found";
84
+ })(EdgeAgentStatus || (EdgeAgentStatus = {}));
85
+ export var OAuthProvider;
86
+ (function (OAuthProvider) {
87
+ OAuthProvider["ATPROTO"] = "atproto";
88
+ /** @deprecated Use ATPROTO instead. */
89
+ OAuthProvider["BLUESKY"] = "bluesky";
90
+ OAuthProvider["GITHUB"] = "github";
91
+ OAuthProvider["GOOGLE"] = "google";
92
+ OAuthProvider["LINEAR"] = "linear";
93
+ OAuthProvider["SLACK"] = "slack";
94
+ OAuthProvider["TRELLO"] = "trello";
95
+ })(OAuthProvider || (OAuthProvider = {}));
96
+ export const InitiateOAuthFlowRequestSchema = Schema.Struct({
97
+ provider: Schema.Enums(OAuthProvider),
98
+ spaceId: Schema.String.pipe(Schema.filter(SpaceId.isValid)), // TODO(burdon): Use SpaceId.
99
+ accessTokenId: Schema.String,
100
+ scopes: Schema.mutable(Schema.Array(Schema.String)),
101
+ // Set to true if we don't want periodic token refreshes in background, for cases like account connect
102
+ noRefresh: Schema.optional(Schema.Boolean),
103
+ // Provider-specific (user handle or did for bluesky) hint for auth server resolution
104
+ loginHint: Schema.optional(Schema.String),
105
+ });
106
+ export var EdgeWebsocketProtocol;
107
+ (function (EdgeWebsocketProtocol) {
108
+ EdgeWebsocketProtocol["V0"] = "edge-ws-v0";
109
+ /**
110
+ * Enables message framing and muxing by service-id.
111
+ */
112
+ EdgeWebsocketProtocol["V1"] = "edge-ws-v1";
113
+ })(EdgeWebsocketProtocol || (EdgeWebsocketProtocol = {}));
114
+ export const DocumentCodec = Object.freeze({
115
+ encode: (doc) => Buffer.from(doc).toString('base64'),
116
+ decode: (doc) => new Uint8Array(Buffer.from(doc, 'base64')),
117
+ });
118
+ const MAX_ERROR_DEPTH = 3;
119
+ /**
120
+ * Codec for serializing and deserializing Edge Errors.
121
+ */
122
+ export const ErrorCodec = Object.freeze({
123
+ encode: (err, depth = 0) => ({
124
+ name: 'name' in err ? err.name : err.code || 'Error',
125
+ message: err.message,
126
+ stack: err.stack,
127
+ cause: err.cause instanceof Error && depth < MAX_ERROR_DEPTH ? ErrorCodec.encode(err.cause, depth + 1) : undefined,
128
+ }),
129
+ decode: (serializedError, depth = 0) => {
130
+ let err;
131
+ if (typeof serializedError.name === 'string') {
132
+ err = new BaseError(serializedError.name, {
133
+ message: serializedError.message ?? 'Unknown error',
134
+ cause: serializedError.cause && depth < MAX_ERROR_DEPTH
135
+ ? ErrorCodec.decode(serializedError.cause, depth + 1)
136
+ : undefined,
137
+ context: serializedError.context,
138
+ });
139
+ if (serializedError.stack) {
140
+ Object.defineProperty(err, 'stack', {
141
+ value: serializedError.stack,
142
+ });
143
+ }
144
+ }
145
+ else {
146
+ err = new Error(serializedError.message ?? 'Unknown error', {
147
+ cause: serializedError.cause && depth < MAX_ERROR_DEPTH
148
+ ? ErrorCodec.decode(serializedError.cause, depth + 1)
149
+ : undefined,
150
+ });
151
+ if (serializedError.stack) {
152
+ Object.defineProperty(err, 'stack', {
153
+ value: serializedError.stack,
154
+ });
155
+ }
156
+ }
157
+ return err;
158
+ },
159
+ });
160
+ /**
161
+ * Codec for serializing and deserializing Edge unhandled HTTP errors.
162
+ */
163
+ export const EdgeHttpErrorCodec = Object.freeze({
164
+ encode: (err) => new Response(JSON.stringify({
165
+ error: ErrorCodec.encode(err),
166
+ }), { status: 500 }),
167
+ decode: async (response) => {
168
+ if (response.headers.get('Content-Type') !== 'application/json') {
169
+ const body = await response.clone().text();
170
+ return new Error(body.slice(0, 256));
171
+ }
172
+ const body = await response.clone().json();
173
+ if (!('error' in body)) {
174
+ return undefined;
175
+ }
176
+ return ErrorCodec.decode(body.error);
177
+ },
178
+ });
179
+ //# sourceMappingURL=edge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edge.js","sourceRoot":"","sources":["../../../src/edge/edge.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,mBAAmB,CAAC;AAE1D,4CAA4C;AAC5C,iFAAiF;AACjF,MAAM,CAAN,IAAY,WAeX;AAfD,W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orData, type EdgeFailure } from './edge.ts';
2
+ /**
3
+ * Error thrown when a call to the Edge service fails.
4
+ * There 3 possible sources of failure:
5
+ * 1. EdgeFailure (JSON body with { success: false }) -> Processing the request failed and was gracefully handled by EDGE service.
6
+ * 2. Http failure (non-ok code) -> The HTTP request failed (e.g. timeout, network error).
7
+ * -> Unhandled exception on EDGE side, EDGE would provide serialized error in the response body.
8
+ * 3. Processing failure -> Unhandled exception on client side while processing the response.
9
+ */
10
+ export declare class EdgeCallFailedError extends Error {
11
+ static fromUnsuccessfulResponse(response: Response, body: EdgeFailure): EdgeCallFailedError;
12
+ static fromHttpFailure(response: Response): Promise<EdgeCallFailedError>;
13
+ static fromProcessingFailureCause(cause: Error): EdgeCallFailedError;
14
+ readonly data?: EdgeErrorData;
15
+ readonly isRetryable?: boolean;
16
+ readonly retryAfterMs?: number;
17
+ constructor(args: {
18
+ message: string;
19
+ isRetryable?: boolean;
20
+ data?: EdgeErrorData;
21
+ retryAfterMs?: number;
22
+ cause?: Error;
23
+ });
24
+ }
25
+ export declare class EdgeAuthChallengeError extends EdgeCallFailedError {
26
+ readonly challenge: string;
27
+ constructor(challenge: string, data: EdgeErrorData);
28
+ }
29
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/edge/errors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,WAAW,EAAkC,MAAM,WAAW,CAAC;AAGjG;;;;;;;GAOG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;WAC9B,wBAAwB,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,GAAG,mBAAmB;WAY9E,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,mBAAmB,CAAC;WASvE,0BAA0B,CAAC,KAAK,EAAE,KAAK,GAAG,mBAAmB;IAQ3E,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;gBAEnB,IAAI,EAAE;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,IAAI,CAAC,EAAE,aAAa,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,KAAK,CAAC,EAAE,KAAK,CAAC;KACf;CAOF;AAED,qBAAa,sBAAuB,SAAQ,mBAAmB;aAE3C,SAAS,EAAE,MAAM;gBAAjB,SAAS,EAAE,MAAM,EACjC,IAAI,EAAE,aAAa;CAItB"}
@@ -0,0 +1,69 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+ import { EdgeHttpErrorCodec, ErrorCodec } from "./edge.js";
5
+ // TODO(burdon): Reconcile with @dxos/errors.
6
+ /**
7
+ * Error thrown when a call to the Edge service fails.
8
+ * There 3 possible sources of failure:
9
+ * 1. EdgeFailure (JSON body with { success: false }) -> Processing the request failed and was gracefully handled by EDGE service.
10
+ * 2. Http failure (non-ok code) -> The HTTP request failed (e.g. timeout, network error).
11
+ * -> Unhandled exception on EDGE side, EDGE would provide serialized error in the response body.
12
+ * 3. Processing failure -> Unhandled exception on client side while processing the response.
13
+ */
14
+ export class EdgeCallFailedError extends Error {
15
+ static fromUnsuccessfulResponse(response, body) {
16
+ const error = new EdgeCallFailedError({
17
+ message: body.message,
18
+ data: body.data,
19
+ isRetryable: body.data == null && response.headers.has('Retry-After'),
20
+ retryAfterMs: getRetryAfterMillis(response),
21
+ cause: body.error ? ErrorCodec.decode(body.error) : undefined,
22
+ });
23
+ return error;
24
+ }
25
+ static async fromHttpFailure(response) {
26
+ return new EdgeCallFailedError({
27
+ message: `HTTP code ${response.status}: ${response.statusText}.`,
28
+ isRetryable: isRetryableCode(response.status),
29
+ retryAfterMs: getRetryAfterMillis(response),
30
+ cause: await EdgeHttpErrorCodec.decode(response),
31
+ });
32
+ }
33
+ static fromProcessingFailureCause(cause) {
34
+ return new EdgeCallFailedError({
35
+ message: 'Error processing request.',
36
+ isRetryable: true,
37
+ cause,
38
+ });
39
+ }
40
+ data;
41
+ isRetryable;
42
+ retryAfterMs;
43
+ constructor(args) {
44
+ super(args.message, { cause: args.cause });
45
+ this.message = args.message;
46
+ this.data = args.data;
47
+ this.retryAfterMs = args.retryAfterMs;
48
+ this.isRetryable = Boolean(args.isRetryable);
49
+ }
50
+ }
51
+ export class EdgeAuthChallengeError extends EdgeCallFailedError {
52
+ challenge;
53
+ constructor(challenge, data) {
54
+ super({ message: 'Auth challenge.', data, isRetryable: false });
55
+ this.challenge = challenge;
56
+ }
57
+ }
58
+ const getRetryAfterMillis = (response) => {
59
+ const retryAfter = Number(response.headers.get('Retry-After'));
60
+ return Number.isNaN(retryAfter) || retryAfter === 0 ? undefined : retryAfter * 1000;
61
+ };
62
+ const isRetryableCode = (status) => {
63
+ if (status === 501) {
64
+ // Not Implemented
65
+ return false;
66
+ }
67
+ return !(status >= 400 && status < 500);
68
+ };
69
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/edge/errors.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,EAAwC,kBAAkB,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEjG,6CAA6C;AAC7C;;;;;;;GAOG;AACH,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IACrC,MAAM,CAAC,wBAAwB,CAAC,QAAkB,EAAE,IAAiB;QAC1E,MAAM,KAAK,GAAG,IAAI,mBAAmB,CAAC;YACpC,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAA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IADlB,YACkB,SAAiB,EACjC,IAAmB;QAEnB,KAAK,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC;QAHhD,cAAS,GAAT,SAAS,CAAQ;IAInC,CAAC;CACF;AAED,MAAM,mBAAmB,GAAG,CAAC,QAAkB,EAAE,EAAE;IACjD,MAAM,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC;IAC/D,OAAO,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,GAAG,IAAI,CAAC;AACtF,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,MAAc,EAAE,EAAE;IACzC,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;QACnB,kBAAkB;QAClB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,CAAC,CAAC,MAAM,IAAI,GAAG,IAAI,MAAM,GAAG,GAAG,CAAC,CAAC;AAC1C,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './edge.ts';
2
+ export * as EdgeFunctionEnv from './EdgeFunctionEnv.ts';
3
+ export * from './errors.ts';
4
+ export * from './registry.ts';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/edge/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC;AAC1B,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAC;AACxD,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,8 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+ export * from "./edge.js";
5
+ export * as EdgeFunctionEnv from "./EdgeFunctionEnv.js";
6
+ export * from "./errors.js";
7
+ export * from "./registry.js";
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/edge/index.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,cAAc,WAAW,CAAC;AAC1B,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAC;AACxD,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,131 @@
1
+ import * as Schema from 'effect/Schema';
2
+ /**
3
+ * Hydrated plugin metadata, mirroring the @dxos/app-framework `Plugin.Meta` shape.
4
+ *
5
+ * Defined locally rather than imported from @dxos/app-framework to keep the protocols
6
+ * package free of UI/runtime dependencies. Consumers can treat decoded values as
7
+ * `Plugin.Meta` directly.
8
+ */
9
+ export declare const PluginMetaSchema: Schema.Struct<{
10
+ id: Schema.filter<typeof Schema.String>;
11
+ name: Schema.filter<typeof Schema.String>;
12
+ description: Schema.optional<typeof Schema.String>;
13
+ author: Schema.optional<typeof Schema.String>;
14
+ homePage: Schema.optional<typeof Schema.String>;
15
+ source: Schema.optional<typeof Schema.String>;
16
+ screenshots: Schema.optional<Schema.Array$<typeof Schema.String>>;
17
+ tags: Schema.optional<Schema.Array$<typeof Schema.String>>;
18
+ icon: Schema.optional<typeof Schema.String>;
19
+ iconHue: Schema.optional<typeof Schema.String>;
20
+ }>;
21
+ export type PluginMeta = Schema.Schema.Type<typeof PluginMetaSchema>;
22
+ /**
23
+ * Health signal the registry service attaches to a hydrated entry when a refresh fails.
24
+ * Clients surface the appropriate badge or filter entries based on this field.
25
+ */
26
+ export declare const PluginHealthSchema: Schema.Literal<["ok", "release-missing", "manifest-invalid", "repo-unavailable"]>;
27
+ export type PluginHealth = Schema.Schema.Type<typeof PluginHealthSchema>;
28
+ /**
29
+ * Shape of the manifest-asset JSON the registry service fetches from each plugin's latest release.
30
+ * Extends {@link PluginMetaSchema} with an optional override for the module bundle filename
31
+ * (defaults to `plugin.mjs`).
32
+ */
33
+ export declare const PluginManifestSchema: Schema.Struct<{
34
+ moduleFile: Schema.optional<typeof Schema.String>;
35
+ id: Schema.filter<typeof Schema.String>;
36
+ name: Schema.filter<typeof Schema.String>;
37
+ description: Schema.optional<typeof Schema.String>;
38
+ author: Schema.optional<typeof Schema.String>;
39
+ homePage: Schema.optional<typeof Schema.String>;
40
+ source: Schema.optional<typeof Schema.String>;
41
+ screenshots: Schema.optional<Schema.Array$<typeof Schema.String>>;
42
+ tags: Schema.optional<Schema.Array$<typeof Schema.String>>;
43
+ icon: Schema.optional<typeof Schema.String>;
44
+ iconHue: Schema.optional<typeof Schema.String>;
45
+ }>;
46
+ export type PluginManifest = Schema.Schema.Type<typeof PluginManifestSchema>;
47
+ /**
48
+ * Single hydrated plugin entry returned by the registry service.
49
+ */
50
+ export declare const PluginEntrySchema: Schema.Struct<{
51
+ /** GitHub repository in `owner/name` form. */
52
+ repo: Schema.filter<typeof Schema.String>;
53
+ /** Plugin metadata from the repo's latest-release `manifest.json`. */
54
+ meta: Schema.Struct<{
55
+ id: Schema.filter<typeof Schema.String>;
56
+ name: Schema.filter<typeof Schema.String>;
57
+ description: Schema.optional<typeof Schema.String>;
58
+ author: Schema.optional<typeof Schema.String>;
59
+ homePage: Schema.optional<typeof Schema.String>;
60
+ source: Schema.optional<typeof Schema.String>;
61
+ screenshots: Schema.optional<Schema.Array$<typeof Schema.String>>;
62
+ tags: Schema.optional<Schema.Array$<typeof Schema.String>>;
63
+ icon: Schema.optional<typeof Schema.String>;
64
+ iconHue: Schema.optional<typeof Schema.String>;
65
+ }>;
66
+ /**
67
+ * URL from which Composer can dynamic-import the plugin module. The registry service is
68
+ * responsible for returning a URL that is CORS-safe for browser `import()` (e.g. served or
69
+ * proxied by the service itself); clients pass this value directly to the URL loader.
70
+ */
71
+ moduleUrl: typeof Schema.String;
72
+ /** Release tag the entry was resolved from (e.g. `v0.1.0`). */
73
+ releaseTag: typeof Schema.String;
74
+ /** Health signal set by the service when an entry fails to refresh. */
75
+ health: Schema.Literal<["ok", "release-missing", "manifest-invalid", "repo-unavailable"]>;
76
+ /** Unix ms when this entry was last successfully hydrated. */
77
+ hydratedAt: typeof Schema.Number;
78
+ }>;
79
+ export type PluginEntry = Schema.Schema.Type<typeof PluginEntrySchema>;
80
+ /**
81
+ * Response body of `GET /registry/plugins`.
82
+ */
83
+ export declare const GetPluginsResponseBodySchema: Schema.Struct<{
84
+ /** Wire-format schema version, pinned to 1. */
85
+ version: Schema.Literal<[1]>;
86
+ /** Hydrated entries. Order matches the order in the upstream catalog manifest. */
87
+ plugins: Schema.Array$<Schema.Struct<{
88
+ /** GitHub repository in `owner/name` form. */
89
+ repo: Schema.filter<typeof Schema.String>;
90
+ /** Plugin metadata from the repo's latest-release `manifest.json`. */
91
+ meta: Schema.Struct<{
92
+ id: Schema.filter<typeof Schema.String>;
93
+ name: Schema.filter<typeof Schema.String>;
94
+ description: Schema.optional<typeof Schema.String>;
95
+ author: Schema.optional<typeof Schema.String>;
96
+ homePage: Schema.optional<typeof Schema.String>;
97
+ source: Schema.optional<typeof Schema.String>;
98
+ screenshots: Schema.optional<Schema.Array$<typeof Schema.String>>;
99
+ tags: Schema.optional<Schema.Array$<typeof Schema.String>>;
100
+ icon: Schema.optional<typeof Schema.String>;
101
+ iconHue: Schema.optional<typeof Schema.String>;
102
+ }>;
103
+ /**
104
+ * URL from which Composer can dynamic-import the plugin module. The registry service is
105
+ * responsible for returning a URL that is CORS-safe for browser `import()` (e.g. served or
106
+ * proxied by the service itself); clients pass this value directly to the URL loader.
107
+ */
108
+ moduleUrl: typeof Schema.String;
109
+ /** Release tag the entry was resolved from (e.g. `v0.1.0`). */
110
+ releaseTag: typeof Schema.String;
111
+ /** Health signal set by the service when an entry fails to refresh. */
112
+ health: Schema.Literal<["ok", "release-missing", "manifest-invalid", "repo-unavailable"]>;
113
+ /** Unix ms when this entry was last successfully hydrated. */
114
+ hydratedAt: typeof Schema.Number;
115
+ }>>;
116
+ /** Unix ms timestamp of the most recent successful refresh cycle. */
117
+ refreshedAt: typeof Schema.Number;
118
+ }>;
119
+ export type GetPluginsResponseBody = Schema.Schema.Type<typeof GetPluginsResponseBodySchema>;
120
+ /**
121
+ * Shape of the catalog manifest published in the upstream community-plugins repo.
122
+ * Extra keys (e.g. `$schema`) are permitted.
123
+ */
124
+ export declare const RegistryManifestSchema: Schema.TypeLiteral<{
125
+ version: Schema.Literal<[1]>;
126
+ plugins: Schema.Array$<Schema.Struct<{
127
+ repo: typeof Schema.String;
128
+ }>>;
129
+ }, readonly [Schema.Record$<typeof Schema.String, typeof Schema.Unknown>]>;
130
+ export type RegistryManifest = Schema.Schema.Type<typeof RegistryManifestSchema>;
131
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/edge/registry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;EAW3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAErE;;;GAGG;AACH,eAAO,MAAM,kBAAkB,mFAAkF,CAAC;AAClH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAG/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,iBAAiB;IAC5B,8CAA8C;;IAE9C,sEAAsE;;;;;;;;;;;;;IAEtE;;;;OAIG;;IAEH,+DAA+D;;IAE/D,uEAAuE;;IAEvE,8DAA8D;;EAE9D,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEvE;;GAEG;AACH,eAAO,MAAM,4BAA4B;IACvC,+CAA+C;;IAE/C,kFAAkF;;QAzBlF,8CAA8C;;QAE9C,sEAAsE;;;;;;;;;;;;;QAEtE;;;;WAIG;;QAEH,+DAA+D;;QAE/D,uEAAuE;;QAEvE,8DAA8D;;;IAa9D,qEAAqE;;EAErE,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAE7F;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;0EAUlC,CAAC;AACF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -0,0 +1,80 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+ import * as Schema from 'effect/Schema';
5
+ /**
6
+ * Hydrated plugin metadata, mirroring the @dxos/app-framework `Plugin.Meta` shape.
7
+ *
8
+ * Defined locally rather than imported from @dxos/app-framework to keep the protocols
9
+ * package free of UI/runtime dependencies. Consumers can treat decoded values as
10
+ * `Plugin.Meta` directly.
11
+ */
12
+ export const PluginMetaSchema = Schema.Struct({
13
+ id: Schema.String.pipe(Schema.nonEmptyString()),
14
+ name: Schema.String.pipe(Schema.nonEmptyString()),
15
+ description: Schema.optional(Schema.String),
16
+ author: Schema.optional(Schema.String),
17
+ homePage: Schema.optional(Schema.String),
18
+ source: Schema.optional(Schema.String),
19
+ screenshots: Schema.optional(Schema.Array(Schema.String)),
20
+ tags: Schema.optional(Schema.Array(Schema.String)),
21
+ icon: Schema.optional(Schema.String),
22
+ iconHue: Schema.optional(Schema.String),
23
+ });
24
+ /**
25
+ * Health signal the registry service attaches to a hydrated entry when a refresh fails.
26
+ * Clients surface the appropriate badge or filter entries based on this field.
27
+ */
28
+ export const PluginHealthSchema = Schema.Literal('ok', 'release-missing', 'manifest-invalid', 'repo-unavailable');
29
+ /**
30
+ * Shape of the manifest-asset JSON the registry service fetches from each plugin's latest release.
31
+ * Extends {@link PluginMetaSchema} with an optional override for the module bundle filename
32
+ * (defaults to `plugin.mjs`).
33
+ */
34
+ export const PluginManifestSchema = Schema.Struct({
35
+ ...PluginMetaSchema.fields,
36
+ moduleFile: Schema.optional(Schema.String),
37
+ });
38
+ /**
39
+ * Single hydrated plugin entry returned by the registry service.
40
+ */
41
+ export const PluginEntrySchema = Schema.Struct({
42
+ /** GitHub repository in `owner/name` form. */
43
+ repo: Schema.String.pipe(Schema.nonEmptyString()),
44
+ /** Plugin metadata from the repo's latest-release `manifest.json`. */
45
+ meta: PluginMetaSchema,
46
+ /**
47
+ * URL from which Composer can dynamic-import the plugin module. The registry service is
48
+ * responsible for returning a URL that is CORS-safe for browser `import()` (e.g. served or
49
+ * proxied by the service itself); clients pass this value directly to the URL loader.
50
+ */
51
+ moduleUrl: Schema.String,
52
+ /** Release tag the entry was resolved from (e.g. `v0.1.0`). */
53
+ releaseTag: Schema.String,
54
+ /** Health signal set by the service when an entry fails to refresh. */
55
+ health: PluginHealthSchema,
56
+ /** Unix ms when this entry was last successfully hydrated. */
57
+ hydratedAt: Schema.Number,
58
+ });
59
+ /**
60
+ * Response body of `GET /registry/plugins`.
61
+ */
62
+ export const GetPluginsResponseBodySchema = Schema.Struct({
63
+ /** Wire-format schema version, pinned to 1. */
64
+ version: Schema.Literal(1),
65
+ /** Hydrated entries. Order matches the order in the upstream catalog manifest. */
66
+ plugins: Schema.Array(PluginEntrySchema),
67
+ /** Unix ms timestamp of the most recent successful refresh cycle. */
68
+ refreshedAt: Schema.Number,
69
+ });
70
+ /**
71
+ * Shape of the catalog manifest published in the upstream community-plugins repo.
72
+ * Extra keys (e.g. `$schema`) are permitted.
73
+ */
74
+ export const RegistryManifestSchema = Schema.Struct({
75
+ version: Schema.Literal(1),
76
+ plugins: Schema.Array(Schema.Struct({
77
+ repo: Schema.String,
78
+ })),
79
+ }, Schema.Record({ key: Schema.String, value: Schema.Unknown }));
80
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/edge/registry.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5C,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IAC/C,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACjD,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IAC3C,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACtC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACxC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACzD,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAClD,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;CACxC,CAAC,CAAC;AAGH;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,CAAC,IA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