@dxos/protocols 0.8.4-main.72ec0f3 → 0.8.4-main.765dc60934

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 (470) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +1 -1
  3. package/dist/src/FeedProtocol.d.ts +528 -0
  4. package/dist/src/FeedProtocol.d.ts.map +1 -0
  5. package/dist/src/FeedProtocol.js +237 -0
  6. package/dist/src/FeedProtocol.js.map +1 -0
  7. package/dist/src/FunctionProtocol.d.ts +15 -2
  8. package/dist/src/FunctionProtocol.d.ts.map +1 -1
  9. package/dist/src/TraceProtocol.d.ts +15 -0
  10. package/dist/src/TraceProtocol.d.ts.map +1 -0
  11. package/dist/src/TraceProtocol.js +4 -0
  12. package/dist/src/TraceProtocol.js.map +1 -0
  13. package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts +237 -0
  14. package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts.map +1 -0
  15. package/dist/src/buf/proto/gen/dxos/client/queue_pb.js +44 -0
  16. package/dist/src/buf/proto/gen/dxos/client/queue_pb.js.map +1 -0
  17. package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts +64 -3
  18. package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts.map +1 -1
  19. package/dist/src/buf/proto/gen/dxos/client/services_pb.js +68 -37
  20. package/dist/src/buf/proto/gen/dxos/client/services_pb.js.map +1 -1
  21. package/dist/src/buf/proto/gen/dxos/config_pb.d.ts +112 -0
  22. package/dist/src/buf/proto/gen/dxos/config_pb.d.ts.map +1 -1
  23. package/dist/src/buf/proto/gen/dxos/config_pb.js +72 -1
  24. package/dist/src/buf/proto/gen/dxos/config_pb.js.map +1 -1
  25. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.d.ts +6 -0
  26. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.d.ts.map +1 -1
  27. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.js +1 -1
  28. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.js.map +1 -1
  29. package/dist/src/buf/proto/gen/dxos/echo/query_pb.d.ts +12 -2
  30. package/dist/src/buf/proto/gen/dxos/echo/query_pb.d.ts.map +1 -1
  31. package/dist/src/buf/proto/gen/dxos/echo/query_pb.js +1 -1
  32. package/dist/src/buf/proto/gen/dxos/echo/query_pb.js.map +1 -1
  33. package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts +68 -7
  34. package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts.map +1 -1
  35. package/dist/src/buf/proto/gen/dxos/echo/service_pb.js +15 -5
  36. package/dist/src/buf/proto/gen/dxos/echo/service_pb.js.map +1 -1
  37. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.d.ts +28 -0
  38. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.d.ts.map +1 -1
  39. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.js +10 -5
  40. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.js.map +1 -1
  41. package/dist/src/buf/proto/gen/dxos/google_pb.js +1 -1
  42. package/dist/src/buf/proto/gen/dxos/google_pb.js.map +1 -1
  43. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.d.ts +39 -0
  44. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.d.ts.map +1 -1
  45. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.js +27 -2
  46. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.js.map +1 -1
  47. package/dist/src/buf/proto/gen/dxos/iframe_pb.d.ts +1 -10
  48. package/dist/src/buf/proto/gen/dxos/iframe_pb.d.ts.map +1 -1
  49. package/dist/src/buf/proto/gen/dxos/iframe_pb.js +1 -1
  50. package/dist/src/buf/proto/gen/dxos/iframe_pb.js.map +1 -1
  51. package/dist/src/buf/proto/gen/dxos/rpc_pb.d.ts +24 -0
  52. package/dist/src/buf/proto/gen/dxos/rpc_pb.d.ts.map +1 -1
  53. package/dist/src/buf/proto/gen/dxos/rpc_pb.js +12 -7
  54. package/dist/src/buf/proto/gen/dxos/rpc_pb.js.map +1 -1
  55. package/dist/src/buf/proto/gen/dxos/tracing_pb.d.ts +1 -139
  56. package/dist/src/buf/proto/gen/dxos/tracing_pb.d.ts.map +1 -1
  57. package/dist/src/buf/proto/gen/dxos/tracing_pb.js +11 -45
  58. package/dist/src/buf/proto/gen/dxos/tracing_pb.js.map +1 -1
  59. package/dist/src/edge/EdgeFunctionEnv.d.ts +128 -0
  60. package/dist/src/edge/EdgeFunctionEnv.d.ts.map +1 -0
  61. package/dist/src/edge/EdgeFunctionEnv.js +4 -0
  62. package/dist/src/edge/EdgeFunctionEnv.js.map +1 -0
  63. package/dist/src/{edge.d.ts → edge/edge.d.ts} +212 -27
  64. package/dist/src/edge/edge.d.ts.map +1 -0
  65. package/dist/src/{edge.js → edge/edge.js} +40 -15
  66. package/dist/src/edge/edge.js.map +1 -0
  67. package/dist/src/{edge-error.d.ts → edge/errors.d.ts} +6 -7
  68. package/dist/src/edge/errors.d.ts.map +1 -0
  69. package/dist/src/{edge-error.js → edge/errors.js} +13 -14
  70. package/dist/src/edge/errors.js.map +1 -0
  71. package/dist/src/edge/index.d.ts +5 -0
  72. package/dist/src/edge/index.d.ts.map +1 -0
  73. package/dist/src/edge/index.js +8 -0
  74. package/dist/src/edge/index.js.map +1 -0
  75. package/dist/src/edge/registry.d.ts +212 -0
  76. package/dist/src/edge/registry.d.ts.map +1 -0
  77. package/dist/src/edge/registry.js +139 -0
  78. package/dist/src/edge/registry.js.map +1 -0
  79. package/dist/src/errors/base-errors.d.ts +86 -8
  80. package/dist/src/errors/base-errors.d.ts.map +1 -1
  81. package/dist/src/errors/base-errors.js +4 -20
  82. package/dist/src/errors/base-errors.js.map +1 -1
  83. package/dist/src/errors/encoding.d.ts +2 -2
  84. package/dist/src/errors/encoding.d.ts.map +1 -1
  85. package/dist/src/errors/encoding.js.map +1 -1
  86. package/dist/src/errors/errors.d.ts +619 -42
  87. package/dist/src/errors/errors.d.ts.map +1 -1
  88. package/dist/src/errors/errors.js +49 -103
  89. package/dist/src/errors/errors.js.map +1 -1
  90. package/dist/src/errors/errors.test.js +1 -1
  91. package/dist/src/errors/errors.test.js.map +1 -1
  92. package/dist/src/errors/helpers.d.ts +9 -5
  93. package/dist/src/errors/helpers.d.ts.map +1 -1
  94. package/dist/src/errors/helpers.js +3 -3
  95. package/dist/src/errors/helpers.js.map +1 -1
  96. package/dist/src/errors/index.d.ts +5 -5
  97. package/dist/src/errors/parameter.d.ts.map +1 -1
  98. package/dist/src/feed-replication.d.ts.map +1 -1
  99. package/dist/src/index.d.ts +12 -13
  100. package/dist/src/index.d.ts.map +1 -1
  101. package/dist/src/index.js +4 -5
  102. package/dist/src/index.js.map +1 -1
  103. package/dist/src/indexing.d.ts.map +1 -1
  104. package/dist/src/messenger.d.ts +16 -0
  105. package/dist/src/messenger.d.ts.map +1 -0
  106. package/dist/src/messenger.js +4 -0
  107. package/dist/src/messenger.js.map +1 -0
  108. package/dist/src/proto/gen/dxos/agent/dashboard.d.ts +3 -6
  109. package/dist/src/proto/gen/dxos/agent/dashboard.d.ts.map +1 -1
  110. package/dist/src/proto/gen/dxos/agent/dashboard.js.map +1 -1
  111. package/dist/src/proto/gen/dxos/agent/echoproxy.d.ts +1 -2
  112. package/dist/src/proto/gen/dxos/agent/echoproxy.d.ts.map +1 -1
  113. package/dist/src/proto/gen/dxos/agent/epoch.d.ts +1 -2
  114. package/dist/src/proto/gen/dxos/agent/epoch.d.ts.map +1 -1
  115. package/dist/src/proto/gen/dxos/agent/functions.d.ts +6 -12
  116. package/dist/src/proto/gen/dxos/agent/functions.d.ts.map +1 -1
  117. package/dist/src/proto/gen/dxos/bot.d.ts +12 -24
  118. package/dist/src/proto/gen/dxos/bot.d.ts.map +1 -1
  119. package/dist/src/proto/gen/dxos/bot.js.map +1 -1
  120. package/dist/src/proto/gen/dxos/client/services.d.ts +384 -294
  121. package/dist/src/proto/gen/dxos/client/services.d.ts.map +1 -1
  122. package/dist/src/proto/gen/dxos/client/services.js +40 -27
  123. package/dist/src/proto/gen/dxos/client/services.js.map +1 -1
  124. package/dist/src/proto/gen/dxos/config.d.ts +115 -100
  125. package/dist/src/proto/gen/dxos/config.d.ts.map +1 -1
  126. package/dist/src/proto/gen/dxos/config.js +26 -0
  127. package/dist/src/proto/gen/dxos/config.js.map +1 -1
  128. package/dist/src/proto/gen/dxos/devtools/host.d.ts +71 -119
  129. package/dist/src/proto/gen/dxos/devtools/host.d.ts.map +1 -1
  130. package/dist/src/proto/gen/dxos/devtools/swarm.d.ts +4 -8
  131. package/dist/src/proto/gen/dxos/devtools/swarm.d.ts.map +1 -1
  132. package/dist/src/proto/gen/dxos/echo/blob.d.ts +1 -2
  133. package/dist/src/proto/gen/dxos/echo/blob.d.ts.map +1 -1
  134. package/dist/src/proto/gen/dxos/echo/blob.js.map +1 -1
  135. package/dist/src/proto/gen/dxos/echo/feed.d.ts +4 -8
  136. package/dist/src/proto/gen/dxos/echo/feed.d.ts.map +1 -1
  137. package/dist/src/proto/gen/dxos/echo/filter.d.ts +2 -4
  138. package/dist/src/proto/gen/dxos/echo/filter.d.ts.map +1 -1
  139. package/dist/src/proto/gen/dxos/echo/filter.js.map +1 -1
  140. package/dist/src/proto/gen/dxos/echo/indexing.d.ts +2 -4
  141. package/dist/src/proto/gen/dxos/echo/indexing.d.ts.map +1 -1
  142. package/dist/src/proto/gen/dxos/echo/indexing.js.map +1 -1
  143. package/dist/src/proto/gen/dxos/echo/metadata.d.ts +12 -16
  144. package/dist/src/proto/gen/dxos/echo/metadata.d.ts.map +1 -1
  145. package/dist/src/proto/gen/dxos/echo/metadata.js.map +1 -1
  146. package/dist/src/proto/gen/dxos/echo/model/document.d.ts +11 -22
  147. package/dist/src/proto/gen/dxos/echo/model/document.d.ts.map +1 -1
  148. package/dist/src/proto/gen/dxos/echo/model/document.js.map +1 -1
  149. package/dist/src/proto/gen/dxos/echo/model/messenger.d.ts +1 -2
  150. package/dist/src/proto/gen/dxos/echo/model/messenger.d.ts.map +1 -1
  151. package/dist/src/proto/gen/dxos/echo/model/text.d.ts +2 -4
  152. package/dist/src/proto/gen/dxos/echo/model/text.d.ts.map +1 -1
  153. package/dist/src/proto/gen/dxos/echo/object.d.ts +6 -12
  154. package/dist/src/proto/gen/dxos/echo/object.d.ts.map +1 -1
  155. package/dist/src/proto/gen/dxos/echo/object.js.map +1 -1
  156. package/dist/src/proto/gen/dxos/echo/query.d.ts +21 -9
  157. package/dist/src/proto/gen/dxos/echo/query.d.ts.map +1 -1
  158. package/dist/src/proto/gen/dxos/echo/query.js.map +1 -1
  159. package/dist/src/proto/gen/dxos/echo/service.d.ts +61 -34
  160. package/dist/src/proto/gen/dxos/echo/service.d.ts.map +1 -1
  161. package/dist/src/proto/gen/dxos/echo/snapshot.d.ts +2 -4
  162. package/dist/src/proto/gen/dxos/echo/snapshot.d.ts.map +1 -1
  163. package/dist/src/proto/gen/dxos/echo/timeframe.d.ts +2 -4
  164. package/dist/src/proto/gen/dxos/echo/timeframe.d.ts.map +1 -1
  165. package/dist/src/proto/gen/dxos/edge/calls.d.ts +5 -10
  166. package/dist/src/proto/gen/dxos/edge/calls.d.ts.map +1 -1
  167. package/dist/src/proto/gen/dxos/edge/messenger.d.ts +28 -10
  168. package/dist/src/proto/gen/dxos/edge/messenger.d.ts.map +1 -1
  169. package/dist/src/proto/gen/dxos/edge/messenger.js.map +1 -1
  170. package/dist/src/proto/gen/dxos/edge/signal.d.ts +7 -14
  171. package/dist/src/proto/gen/dxos/edge/signal.d.ts.map +1 -1
  172. package/dist/src/proto/gen/dxos/error.d.ts +1 -2
  173. package/dist/src/proto/gen/dxos/error.d.ts.map +1 -1
  174. package/dist/src/proto/gen/dxos/gravity.d.ts +10 -20
  175. package/dist/src/proto/gen/dxos/gravity.d.ts.map +1 -1
  176. package/dist/src/proto/gen/dxos/halo/credentials/auth.d.ts +1 -2
  177. package/dist/src/proto/gen/dxos/halo/credentials/auth.d.ts.map +1 -1
  178. package/dist/src/proto/gen/dxos/halo/credentials/greet.d.ts +6 -12
  179. package/dist/src/proto/gen/dxos/halo/credentials/greet.d.ts.map +1 -1
  180. package/dist/src/proto/gen/dxos/halo/credentials/greet.js.map +1 -1
  181. package/dist/src/proto/gen/dxos/halo/credentials/identity.d.ts +2 -4
  182. package/dist/src/proto/gen/dxos/halo/credentials/identity.d.ts.map +1 -1
  183. package/dist/src/proto/gen/dxos/halo/credentials.d.ts +35 -43
  184. package/dist/src/proto/gen/dxos/halo/credentials.d.ts.map +1 -1
  185. package/dist/src/proto/gen/dxos/halo/credentials.js +9 -0
  186. package/dist/src/proto/gen/dxos/halo/credentials.js.map +1 -1
  187. package/dist/src/proto/gen/dxos/halo/invitations.d.ts +13 -26
  188. package/dist/src/proto/gen/dxos/halo/invitations.d.ts.map +1 -1
  189. package/dist/src/proto/gen/dxos/halo/invitations.js.map +1 -1
  190. package/dist/src/proto/gen/dxos/halo/keyring.d.ts +1 -2
  191. package/dist/src/proto/gen/dxos/halo/keyring.d.ts.map +1 -1
  192. package/dist/src/proto/gen/dxos/halo/keys.d.ts +2 -4
  193. package/dist/src/proto/gen/dxos/halo/keys.d.ts.map +1 -1
  194. package/dist/src/proto/gen/dxos/halo/signed.d.ts +4 -8
  195. package/dist/src/proto/gen/dxos/halo/signed.d.ts.map +1 -1
  196. package/dist/src/proto/gen/dxos/iframe.d.ts +4 -18
  197. package/dist/src/proto/gen/dxos/iframe.d.ts.map +1 -1
  198. package/dist/src/proto/gen/dxos/iframe.js.map +1 -1
  199. package/dist/src/proto/gen/dxos/keys.d.ts +2 -4
  200. package/dist/src/proto/gen/dxos/keys.d.ts.map +1 -1
  201. package/dist/src/proto/gen/dxos/mesh/bridge.d.ts +12 -24
  202. package/dist/src/proto/gen/dxos/mesh/bridge.d.ts.map +1 -1
  203. package/dist/src/proto/gen/dxos/mesh/broadcast.d.ts +1 -2
  204. package/dist/src/proto/gen/dxos/mesh/broadcast.d.ts.map +1 -1
  205. package/dist/src/proto/gen/dxos/mesh/messaging.d.ts +2 -4
  206. package/dist/src/proto/gen/dxos/mesh/messaging.d.ts.map +1 -1
  207. package/dist/src/proto/gen/dxos/mesh/muxer.d.ts +5 -10
  208. package/dist/src/proto/gen/dxos/mesh/muxer.d.ts.map +1 -1
  209. package/dist/src/proto/gen/dxos/mesh/presence.d.ts +1 -2
  210. package/dist/src/proto/gen/dxos/mesh/presence.d.ts.map +1 -1
  211. package/dist/src/proto/gen/dxos/mesh/protocol.d.ts +3 -6
  212. package/dist/src/proto/gen/dxos/mesh/protocol.d.ts.map +1 -1
  213. package/dist/src/proto/gen/dxos/mesh/replicator.d.ts +2 -4
  214. package/dist/src/proto/gen/dxos/mesh/replicator.d.ts.map +1 -1
  215. package/dist/src/proto/gen/dxos/mesh/signal.d.ts +9 -18
  216. package/dist/src/proto/gen/dxos/mesh/signal.d.ts.map +1 -1
  217. package/dist/src/proto/gen/dxos/mesh/signal.js.map +1 -1
  218. package/dist/src/proto/gen/dxos/mesh/swarm.d.ts +6 -12
  219. package/dist/src/proto/gen/dxos/mesh/swarm.d.ts.map +1 -1
  220. package/dist/src/proto/gen/dxos/mesh/teleport/auth.d.ts +2 -4
  221. package/dist/src/proto/gen/dxos/mesh/teleport/auth.d.ts.map +1 -1
  222. package/dist/src/proto/gen/dxos/mesh/teleport/automerge.d.ts +2 -4
  223. package/dist/src/proto/gen/dxos/mesh/teleport/automerge.d.ts.map +1 -1
  224. package/dist/src/proto/gen/dxos/mesh/teleport/blobsync.d.ts +3 -6
  225. package/dist/src/proto/gen/dxos/mesh/teleport/blobsync.d.ts.map +1 -1
  226. package/dist/src/proto/gen/dxos/mesh/teleport/control.d.ts +3 -6
  227. package/dist/src/proto/gen/dxos/mesh/teleport/control.d.ts.map +1 -1
  228. package/dist/src/proto/gen/dxos/mesh/teleport/gossip.d.ts +1 -2
  229. package/dist/src/proto/gen/dxos/mesh/teleport/gossip.d.ts.map +1 -1
  230. package/dist/src/proto/gen/dxos/mesh/teleport/notarization.d.ts +1 -2
  231. package/dist/src/proto/gen/dxos/mesh/teleport/notarization.d.ts.map +1 -1
  232. package/dist/src/proto/gen/dxos/mesh/teleport/replicator.d.ts +5 -10
  233. package/dist/src/proto/gen/dxos/mesh/teleport/replicator.d.ts.map +1 -1
  234. package/dist/src/proto/gen/dxos/mesh/teleport.d.ts +2 -4
  235. package/dist/src/proto/gen/dxos/mesh/teleport.d.ts.map +1 -1
  236. package/dist/src/proto/gen/dxos/registry.d.ts +3 -6
  237. package/dist/src/proto/gen/dxos/registry.d.ts.map +1 -1
  238. package/dist/src/proto/gen/dxos/rpc.d.ts +24 -12
  239. package/dist/src/proto/gen/dxos/rpc.d.ts.map +1 -1
  240. package/dist/src/proto/gen/dxos/rpc.js.map +1 -1
  241. package/dist/src/proto/gen/dxos/service/agentmanager.d.ts +4 -8
  242. package/dist/src/proto/gen/dxos/service/agentmanager.d.ts.map +1 -1
  243. package/dist/src/proto/gen/dxos/service/agentmanager.js.map +1 -1
  244. package/dist/src/proto/gen/dxos/service/publisher.d.ts +5 -10
  245. package/dist/src/proto/gen/dxos/service/publisher.d.ts.map +1 -1
  246. package/dist/src/proto/gen/dxos/service/supervisor.d.ts +12 -24
  247. package/dist/src/proto/gen/dxos/service/supervisor.d.ts.map +1 -1
  248. package/dist/src/proto/gen/dxos/service/supervisor.js.map +1 -1
  249. package/dist/src/proto/gen/dxos/service/tunnel.d.ts +3 -6
  250. package/dist/src/proto/gen/dxos/service/tunnel.d.ts.map +1 -1
  251. package/dist/src/proto/gen/dxos/tracing.d.ts +10 -99
  252. package/dist/src/proto/gen/dxos/tracing.d.ts.map +1 -1
  253. package/dist/src/proto/gen/dxos/type.d.ts +12 -24
  254. package/dist/src/proto/gen/dxos/type.d.ts.map +1 -1
  255. package/dist/src/proto/gen/dxos/value.d.ts +2 -4
  256. package/dist/src/proto/gen/dxos/value.d.ts.map +1 -1
  257. package/dist/src/proto/gen/example/testing/data.d.ts +4 -8
  258. package/dist/src/proto/gen/example/testing/data.d.ts.map +1 -1
  259. package/dist/src/proto/gen/example/testing/rpc.d.ts +7 -14
  260. package/dist/src/proto/gen/example/testing/rpc.d.ts.map +1 -1
  261. package/dist/src/proto/gen/google/protobuf.d.ts +326 -40
  262. package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -1
  263. package/dist/src/proto/gen/google/protobuf.js +127 -1
  264. package/dist/src/proto/gen/google/protobuf.js.map +1 -1
  265. package/dist/src/proto/gen/index.d.ts +40 -7
  266. package/dist/src/proto/gen/index.d.ts.map +1 -1
  267. package/dist/src/proto/gen/index.js +1 -1
  268. package/dist/src/proto/gen/index.js.map +1 -1
  269. package/dist/src/proto/index.d.ts +2 -2
  270. package/dist/src/proto/substitutions.d.ts +8 -8
  271. package/dist/src/proto/substitutions.d.ts.map +1 -1
  272. package/dist/src/proto/types.d.ts +1 -1
  273. package/dist/src/space-archive.d.ts +62 -3
  274. package/dist/src/space-archive.d.ts.map +1 -1
  275. package/dist/src/space-archive.js +13 -1
  276. package/dist/src/space-archive.js.map +1 -1
  277. package/dist/src/types.d.ts +2 -2
  278. package/dist/tsconfig.tsbuildinfo +1 -1
  279. package/package.json +20 -35
  280. package/src/FeedProtocol.ts +320 -0
  281. package/src/FunctionProtocol.ts +17 -6
  282. package/src/TraceProtocol.ts +21 -0
  283. package/src/buf/proto/gen/dxos/agent/dashboard_pb.ts +1 -1
  284. package/src/buf/proto/gen/dxos/agent/echo-proxy_pb.ts +1 -1
  285. package/src/buf/proto/gen/dxos/agent/epoch_pb.ts +1 -1
  286. package/src/buf/proto/gen/dxos/agent/functions_pb.ts +1 -1
  287. package/src/buf/proto/gen/dxos/bot_pb.ts +1 -1
  288. package/src/buf/proto/gen/dxos/client/invitation_pb.ts +1 -1
  289. package/src/buf/proto/gen/dxos/client/logging_pb.ts +1 -1
  290. package/src/buf/proto/gen/dxos/client/queue_pb.ts +286 -0
  291. package/src/buf/proto/gen/dxos/client/services_pb.ts +114 -40
  292. package/src/buf/proto/gen/dxos/config_pb.ts +132 -2
  293. package/src/buf/proto/gen/dxos/devtools/diagnostics_pb.ts +1 -1
  294. package/src/buf/proto/gen/dxos/devtools/host_pb.ts +1 -1
  295. package/src/buf/proto/gen/dxos/devtools/swarm_pb.ts +1 -1
  296. package/src/buf/proto/gen/dxos/echo/blob_pb.ts +1 -1
  297. package/src/buf/proto/gen/dxos/echo/feed_pb.ts +1 -1
  298. package/src/buf/proto/gen/dxos/echo/filter_pb.ts +1 -1
  299. package/src/buf/proto/gen/dxos/echo/indexing_pb.ts +1 -1
  300. package/src/buf/proto/gen/dxos/echo/metadata_pb.ts +9 -2
  301. package/src/buf/proto/gen/dxos/echo/model/document_pb.ts +1 -1
  302. package/src/buf/proto/gen/dxos/echo/model/messenger_pb.ts +1 -1
  303. package/src/buf/proto/gen/dxos/echo/model/text_pb.ts +1 -1
  304. package/src/buf/proto/gen/dxos/echo/object_pb.ts +1 -1
  305. package/src/buf/proto/gen/dxos/echo/query_pb.ts +16 -4
  306. package/src/buf/proto/gen/dxos/echo/service_pb.ts +81 -13
  307. package/src/buf/proto/gen/dxos/echo/snapshot_pb.ts +1 -1
  308. package/src/buf/proto/gen/dxos/echo/timeframe_pb.ts +1 -1
  309. package/src/buf/proto/gen/dxos/edge/calls_pb.ts +1 -1
  310. package/src/buf/proto/gen/dxos/edge/messenger_pb.ts +39 -6
  311. package/src/buf/proto/gen/dxos/edge/signal_pb.ts +1 -1
  312. package/src/buf/proto/gen/dxos/error_pb.ts +1 -1
  313. package/src/buf/proto/gen/dxos/field_options_pb.ts +1 -1
  314. package/src/buf/proto/gen/dxos/google_pb.ts +1 -1
  315. package/src/buf/proto/gen/dxos/gravity_pb.ts +1 -1
  316. package/src/buf/proto/gen/dxos/halo/credentials/auth_pb.ts +1 -1
  317. package/src/buf/proto/gen/dxos/halo/credentials/greet_pb.ts +1 -1
  318. package/src/buf/proto/gen/dxos/halo/credentials/identity_pb.ts +1 -1
  319. package/src/buf/proto/gen/dxos/halo/credentials_pb.ts +49 -3
  320. package/src/buf/proto/gen/dxos/halo/invitations_pb.ts +1 -1
  321. package/src/buf/proto/gen/dxos/halo/keyring_pb.ts +1 -1
  322. package/src/buf/proto/gen/dxos/halo/keys_pb.ts +1 -1
  323. package/src/buf/proto/gen/dxos/halo/signed_pb.ts +1 -1
  324. package/src/buf/proto/gen/dxos/iframe_pb.ts +3 -14
  325. package/src/buf/proto/gen/dxos/keys_pb.ts +1 -1
  326. package/src/buf/proto/gen/dxos/mesh/bridge_pb.ts +1 -1
  327. package/src/buf/proto/gen/dxos/mesh/broadcast_pb.ts +1 -1
  328. package/src/buf/proto/gen/dxos/mesh/messaging_pb.ts +1 -1
  329. package/src/buf/proto/gen/dxos/mesh/muxer_pb.ts +1 -1
  330. package/src/buf/proto/gen/dxos/mesh/presence_pb.ts +1 -1
  331. package/src/buf/proto/gen/dxos/mesh/protocol_pb.ts +1 -1
  332. package/src/buf/proto/gen/dxos/mesh/replicator_pb.ts +1 -1
  333. package/src/buf/proto/gen/dxos/mesh/signal_pb.ts +1 -1
  334. package/src/buf/proto/gen/dxos/mesh/swarm_pb.ts +1 -1
  335. package/src/buf/proto/gen/dxos/mesh/teleport/admission-discovery_pb.ts +1 -1
  336. package/src/buf/proto/gen/dxos/mesh/teleport/auth_pb.ts +1 -1
  337. package/src/buf/proto/gen/dxos/mesh/teleport/automerge_pb.ts +1 -1
  338. package/src/buf/proto/gen/dxos/mesh/teleport/blobsync_pb.ts +1 -1
  339. package/src/buf/proto/gen/dxos/mesh/teleport/control_pb.ts +1 -1
  340. package/src/buf/proto/gen/dxos/mesh/teleport/gossip_pb.ts +1 -1
  341. package/src/buf/proto/gen/dxos/mesh/teleport/notarization_pb.ts +1 -1
  342. package/src/buf/proto/gen/dxos/mesh/teleport/replicator_pb.ts +1 -1
  343. package/src/buf/proto/gen/dxos/registry_pb.ts +1 -1
  344. package/src/buf/proto/gen/dxos/rpc_pb.ts +37 -8
  345. package/src/buf/proto/gen/dxos/service/agentmanager_pb.ts +1 -1
  346. package/src/buf/proto/gen/dxos/service/publisher_pb.ts +1 -1
  347. package/src/buf/proto/gen/dxos/service/supervisor_pb.ts +1 -1
  348. package/src/buf/proto/gen/dxos/service/tunnel_pb.ts +1 -1
  349. package/src/buf/proto/gen/dxos/tracing_pb.ts +12 -179
  350. package/src/buf/proto/gen/dxos/type_pb.ts +1 -1
  351. package/src/buf/proto/gen/dxos/value_pb.ts +1 -1
  352. package/src/buf/proto/gen/example/testing/data_pb.ts +1 -1
  353. package/src/buf/proto/gen/example/testing/rpc_pb.ts +1 -1
  354. package/src/codec.test.ts +1 -1
  355. package/src/edge/EdgeFunctionEnv.ts +222 -0
  356. package/src/{edge.ts → edge/edge.ts} +174 -40
  357. package/src/{edge-error.ts → edge/errors.ts} +15 -16
  358. package/src/edge/index.ts +8 -0
  359. package/src/edge/registry.ts +164 -0
  360. package/src/errors/base-errors.ts +4 -22
  361. package/src/errors/encoding.ts +2 -3
  362. package/src/errors/errors.test.ts +2 -2
  363. package/src/errors/errors.ts +57 -124
  364. package/src/errors/helpers.ts +6 -7
  365. package/src/errors/index.ts +5 -5
  366. package/src/feed-replication.ts +1 -0
  367. package/src/index.ts +12 -13
  368. package/src/indexing.test.ts +1 -1
  369. package/src/messenger.ts +22 -0
  370. package/src/proto/dxos/client/queue.proto +81 -0
  371. package/src/proto/dxos/client/services.proto +19 -1
  372. package/src/proto/dxos/config.proto +50 -1
  373. package/src/proto/dxos/echo/metadata.proto +3 -0
  374. package/src/proto/dxos/echo/query.proto +4 -1
  375. package/src/proto/dxos/echo/service.proto +38 -4
  376. package/src/proto/dxos/edge/messenger.proto +10 -0
  377. package/src/proto/dxos/halo/credentials.proto +15 -0
  378. package/src/proto/dxos/iframe.proto +1 -3
  379. package/src/proto/dxos/rpc.proto +7 -0
  380. package/src/proto/dxos/tracing.proto +0 -40
  381. package/src/proto/gen/dxos/agent/dashboard.ts +3 -6
  382. package/src/proto/gen/dxos/agent/echoproxy.ts +1 -2
  383. package/src/proto/gen/dxos/agent/epoch.ts +1 -2
  384. package/src/proto/gen/dxos/agent/functions.ts +6 -12
  385. package/src/proto/gen/dxos/bot.ts +12 -24
  386. package/src/proto/gen/dxos/client/services.ts +384 -294
  387. package/src/proto/gen/dxos/config.ts +115 -100
  388. package/src/proto/gen/dxos/devtools/host.ts +71 -119
  389. package/src/proto/gen/dxos/devtools/swarm.ts +4 -8
  390. package/src/proto/gen/dxos/echo/blob.ts +1 -2
  391. package/src/proto/gen/dxos/echo/feed.ts +4 -8
  392. package/src/proto/gen/dxos/echo/filter.ts +2 -4
  393. package/src/proto/gen/dxos/echo/indexing.ts +2 -4
  394. package/src/proto/gen/dxos/echo/metadata.ts +12 -16
  395. package/src/proto/gen/dxos/echo/model/document.ts +11 -22
  396. package/src/proto/gen/dxos/echo/model/messenger.ts +1 -2
  397. package/src/proto/gen/dxos/echo/model/text.ts +2 -4
  398. package/src/proto/gen/dxos/echo/object.ts +6 -12
  399. package/src/proto/gen/dxos/echo/query.ts +21 -9
  400. package/src/proto/gen/dxos/echo/service.ts +60 -34
  401. package/src/proto/gen/dxos/echo/snapshot.ts +2 -4
  402. package/src/proto/gen/dxos/echo/timeframe.ts +2 -4
  403. package/src/proto/gen/dxos/edge/calls.ts +5 -10
  404. package/src/proto/gen/dxos/edge/messenger.ts +28 -10
  405. package/src/proto/gen/dxos/edge/signal.ts +7 -14
  406. package/src/proto/gen/dxos/error.ts +1 -2
  407. package/src/proto/gen/dxos/gravity.ts +10 -20
  408. package/src/proto/gen/dxos/halo/credentials/auth.ts +1 -2
  409. package/src/proto/gen/dxos/halo/credentials/greet.ts +6 -12
  410. package/src/proto/gen/dxos/halo/credentials/identity.ts +2 -4
  411. package/src/proto/gen/dxos/halo/credentials.ts +35 -43
  412. package/src/proto/gen/dxos/halo/invitations.ts +13 -26
  413. package/src/proto/gen/dxos/halo/keyring.ts +1 -2
  414. package/src/proto/gen/dxos/halo/keys.ts +2 -4
  415. package/src/proto/gen/dxos/halo/signed.ts +4 -8
  416. package/src/proto/gen/dxos/iframe.ts +4 -18
  417. package/src/proto/gen/dxos/keys.ts +2 -4
  418. package/src/proto/gen/dxos/mesh/bridge.ts +12 -24
  419. package/src/proto/gen/dxos/mesh/broadcast.ts +1 -2
  420. package/src/proto/gen/dxos/mesh/messaging.ts +2 -4
  421. package/src/proto/gen/dxos/mesh/muxer.ts +5 -10
  422. package/src/proto/gen/dxos/mesh/presence.ts +1 -2
  423. package/src/proto/gen/dxos/mesh/protocol.ts +3 -6
  424. package/src/proto/gen/dxos/mesh/replicator.ts +2 -4
  425. package/src/proto/gen/dxos/mesh/signal.ts +9 -18
  426. package/src/proto/gen/dxos/mesh/swarm.ts +6 -12
  427. package/src/proto/gen/dxos/mesh/teleport/auth.ts +2 -4
  428. package/src/proto/gen/dxos/mesh/teleport/automerge.ts +2 -4
  429. package/src/proto/gen/dxos/mesh/teleport/blobsync.ts +3 -6
  430. package/src/proto/gen/dxos/mesh/teleport/control.ts +3 -6
  431. package/src/proto/gen/dxos/mesh/teleport/gossip.ts +1 -2
  432. package/src/proto/gen/dxos/mesh/teleport/notarization.ts +1 -2
  433. package/src/proto/gen/dxos/mesh/teleport/replicator.ts +5 -10
  434. package/src/proto/gen/dxos/mesh/teleport.ts +2 -4
  435. package/src/proto/gen/dxos/registry.ts +3 -6
  436. package/src/proto/gen/dxos/rpc.ts +24 -12
  437. package/src/proto/gen/dxos/service/agentmanager.ts +4 -8
  438. package/src/proto/gen/dxos/service/publisher.ts +5 -10
  439. package/src/proto/gen/dxos/service/supervisor.ts +12 -24
  440. package/src/proto/gen/dxos/service/tunnel.ts +3 -6
  441. package/src/proto/gen/dxos/tracing.ts +10 -96
  442. package/src/proto/gen/dxos/type.ts +12 -24
  443. package/src/proto/gen/dxos/value.ts +2 -4
  444. package/src/proto/gen/example/testing/data.ts +4 -8
  445. package/src/proto/gen/example/testing/rpc.ts +7 -14
  446. package/src/proto/gen/google/protobuf.ts +326 -40
  447. package/src/proto/gen/index.ts +41 -8
  448. package/src/proto/index.ts +2 -2
  449. package/src/proto/types.ts +1 -1
  450. package/src/space-archive.ts +70 -1
  451. package/src/types.ts +2 -2
  452. package/dist/src/edge-error.d.ts.map +0 -1
  453. package/dist/src/edge-error.js.map +0 -1
  454. package/dist/src/edge.d.ts.map +0 -1
  455. package/dist/src/edge.js.map +0 -1
  456. package/dist/src/query.d.ts +0 -5
  457. package/dist/src/query.d.ts.map +0 -1
  458. package/dist/src/query.js +0 -8
  459. package/dist/src/query.js.map +0 -1
  460. package/dist/src/queue.d.ts +0 -37
  461. package/dist/src/queue.d.ts.map +0 -1
  462. package/dist/src/queue.js +0 -8
  463. package/dist/src/queue.js.map +0 -1
  464. package/dist/src/tracing.d.ts +0 -40
  465. package/dist/src/tracing.d.ts.map +0 -1
  466. package/dist/src/tracing.js +0 -50
  467. package/dist/src/tracing.js.map +0 -1
  468. package/src/query.ts +0 -8
  469. package/src/queue.ts +0 -51
  470. package/src/tracing.ts +0 -86
@@ -0,0 +1,212 @@
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
+ * Filename of the entry module every plugin must publish at the root of its bundle.
30
+ * The host dynamic-imports `<manifest URL base>/index.mjs` directly — no per-plugin
31
+ * configuration. `composerPlugin` outputs the bundle under this name so plugin authors
32
+ * never have to think about it.
33
+ */
34
+ export declare const PLUGIN_ENTRY_FILENAME = "index.mjs";
35
+ /**
36
+ * Shape of the manifest-asset JSON the registry service fetches from each plugin's latest release.
37
+ *
38
+ * Emitted by `@dxos/app-framework/vite-plugin`'s `composerPlugin` (see
39
+ * `MANIFEST_ASSET_NAME`). Lists every file the plugin needs at runtime — the entry
40
+ * module ({@link PLUGIN_ENTRY_FILENAME}) plus any sibling CSS, code-split chunks,
41
+ * fonts, etc. — so the host can eagerly precache the whole bundle for offline use.
42
+ * Paths in `assets` are relative to the manifest's URL.
43
+ */
44
+ export declare const PluginManifestSchema: Schema.Struct<{
45
+ id: Schema.filter<typeof Schema.String>;
46
+ name: Schema.filter<typeof Schema.String>;
47
+ description: Schema.optional<typeof Schema.String>;
48
+ author: Schema.optional<typeof Schema.String>;
49
+ homePage: Schema.optional<typeof Schema.String>;
50
+ source: Schema.optional<typeof Schema.String>;
51
+ screenshots: Schema.optional<Schema.Array$<typeof Schema.String>>;
52
+ tags: Schema.optional<Schema.Array$<typeof Schema.String>>;
53
+ icon: Schema.optional<typeof Schema.String>;
54
+ iconHue: Schema.optional<typeof Schema.String>;
55
+ /** Plugin version (semver). Sourced from the publishing project's `package.json`. */
56
+ version: Schema.filter<typeof Schema.String>;
57
+ /**
58
+ * Relative paths of every file the plugin needs at runtime, including the entry.
59
+ * Must include {@link PLUGIN_ENTRY_FILENAME}; consumers verify on parse.
60
+ */
61
+ assets: Schema.filter<Schema.Array$<typeof Schema.String>>;
62
+ }>;
63
+ export type PluginManifest = Schema.Schema.Type<typeof PluginManifestSchema>;
64
+ /**
65
+ * Single hydrated plugin entry returned by the registry service.
66
+ */
67
+ export declare const PluginEntrySchema: Schema.Struct<{
68
+ /** GitHub repository in `owner/name` form. Empty string for entries sourced from a `manifestUrl`. */
69
+ repo: typeof Schema.String;
70
+ /** Plugin metadata from the repo's latest-release `manifest.json`. */
71
+ meta: Schema.Struct<{
72
+ id: Schema.filter<typeof Schema.String>;
73
+ name: Schema.filter<typeof Schema.String>;
74
+ description: Schema.optional<typeof Schema.String>;
75
+ author: Schema.optional<typeof Schema.String>;
76
+ homePage: Schema.optional<typeof Schema.String>;
77
+ source: Schema.optional<typeof Schema.String>;
78
+ screenshots: Schema.optional<Schema.Array$<typeof Schema.String>>;
79
+ tags: Schema.optional<Schema.Array$<typeof Schema.String>>;
80
+ icon: Schema.optional<typeof Schema.String>;
81
+ iconHue: Schema.optional<typeof Schema.String>;
82
+ }>;
83
+ /**
84
+ * URL of the plugin's `manifest.json`. Composer's URL loader fetches this, eagerly caches
85
+ * every declared asset via the platform `PluginAssetCache`, then dynamic-imports the entry.
86
+ * The URL must be CORS-safe and have its declared assets reachable as siblings.
87
+ */
88
+ moduleUrl: typeof Schema.String;
89
+ /** Release tag the entry was resolved from (e.g. `v0.1.0`). Empty string for `manifestUrl` entries. */
90
+ releaseTag: typeof Schema.String;
91
+ /** Health signal set by the service when an entry fails to refresh. */
92
+ health: Schema.Literal<["ok", "release-missing", "manifest-invalid", "repo-unavailable"]>;
93
+ /** Unix ms when this entry was last successfully hydrated. */
94
+ hydratedAt: typeof Schema.Number;
95
+ }>;
96
+ export type PluginEntry = Schema.Schema.Type<typeof PluginEntrySchema>;
97
+ /**
98
+ * Response body of `GET /registry/plugins`.
99
+ */
100
+ export declare const GetPluginsResponseBodySchema: Schema.Struct<{
101
+ /** Wire-format schema version, pinned to 1. */
102
+ version: Schema.Literal<[1]>;
103
+ /** Hydrated entries. Order matches the order in the upstream catalog manifest. */
104
+ plugins: Schema.Array$<Schema.Struct<{
105
+ /** GitHub repository in `owner/name` form. Empty string for entries sourced from a `manifestUrl`. */
106
+ repo: typeof Schema.String;
107
+ /** Plugin metadata from the repo's latest-release `manifest.json`. */
108
+ meta: Schema.Struct<{
109
+ id: Schema.filter<typeof Schema.String>;
110
+ name: Schema.filter<typeof Schema.String>;
111
+ description: Schema.optional<typeof Schema.String>;
112
+ author: Schema.optional<typeof Schema.String>;
113
+ homePage: Schema.optional<typeof Schema.String>;
114
+ source: Schema.optional<typeof Schema.String>;
115
+ screenshots: Schema.optional<Schema.Array$<typeof Schema.String>>;
116
+ tags: Schema.optional<Schema.Array$<typeof Schema.String>>;
117
+ icon: Schema.optional<typeof Schema.String>;
118
+ iconHue: Schema.optional<typeof Schema.String>;
119
+ }>;
120
+ /**
121
+ * URL of the plugin's `manifest.json`. Composer's URL loader fetches this, eagerly caches
122
+ * every declared asset via the platform `PluginAssetCache`, then dynamic-imports the entry.
123
+ * The URL must be CORS-safe and have its declared assets reachable as siblings.
124
+ */
125
+ moduleUrl: typeof Schema.String;
126
+ /** Release tag the entry was resolved from (e.g. `v0.1.0`). Empty string for `manifestUrl` entries. */
127
+ releaseTag: typeof Schema.String;
128
+ /** Health signal set by the service when an entry fails to refresh. */
129
+ health: Schema.Literal<["ok", "release-missing", "manifest-invalid", "repo-unavailable"]>;
130
+ /** Unix ms when this entry was last successfully hydrated. */
131
+ hydratedAt: typeof Schema.Number;
132
+ }>>;
133
+ /** Unix ms timestamp of the most recent successful refresh cycle. */
134
+ refreshedAt: typeof Schema.Number;
135
+ }>;
136
+ export type GetPluginsResponseBody = Schema.Schema.Type<typeof GetPluginsResponseBodySchema>;
137
+ /**
138
+ * A single published version of a plugin, as returned by the registry service's
139
+ * versions endpoint. Sourced from the publishing project's GitHub releases.
140
+ *
141
+ * The host treats `tag` opaquely; ordering — newest first — is the service's
142
+ * responsibility (typically reverse-chronological by release date).
143
+ */
144
+ export declare const PluginVersionSchema: Schema.Struct<{
145
+ /** Release tag (e.g. `v0.1.21`). Stable identifier for this version. */
146
+ tag: Schema.filter<typeof Schema.String>;
147
+ /**
148
+ * URL of this version's `manifest.json`. Matches the shape of {@link PluginEntrySchema.fields.moduleUrl}
149
+ * but pinned to a specific release rather than the latest. Composer's URL loader fetches
150
+ * this when the user installs / rolls back to this version.
151
+ */
152
+ moduleUrl: Schema.filter<typeof Schema.String>;
153
+ /** Unix ms when the version was released. Optional — services that lack this signal can omit. */
154
+ releasedAt: Schema.optional<typeof Schema.Number>;
155
+ }>;
156
+ export type PluginVersion = Schema.Schema.Type<typeof PluginVersionSchema>;
157
+ /**
158
+ * Response body of `GET /registry/plugins/:repo/versions`.
159
+ *
160
+ * `:repo` is the GitHub `owner/name` form, URL-encoded (so `/` is escaped).
161
+ * Returns all hydratable releases for the repo, newest first; clients display them
162
+ * in the version picker for install / roll-back. Unauthenticated; same surface area
163
+ * as `GET /registry/plugins`.
164
+ */
165
+ export declare const GetPluginVersionsResponseBodySchema: Schema.Struct<{
166
+ /** Wire-format schema version, pinned to 1. */
167
+ version: Schema.Literal<[1]>;
168
+ /** Available versions for the requested repo, newest first. */
169
+ versions: Schema.Array$<Schema.Struct<{
170
+ /** Release tag (e.g. `v0.1.21`). Stable identifier for this version. */
171
+ tag: Schema.filter<typeof Schema.String>;
172
+ /**
173
+ * URL of this version's `manifest.json`. Matches the shape of {@link PluginEntrySchema.fields.moduleUrl}
174
+ * but pinned to a specific release rather than the latest. Composer's URL loader fetches
175
+ * this when the user installs / rolls back to this version.
176
+ */
177
+ moduleUrl: Schema.filter<typeof Schema.String>;
178
+ /** Unix ms when the version was released. Optional — services that lack this signal can omit. */
179
+ releasedAt: Schema.optional<typeof Schema.Number>;
180
+ }>>;
181
+ /** Unix ms timestamp of the most recent successful refresh cycle for this repo. */
182
+ refreshedAt: typeof Schema.Number;
183
+ }>;
184
+ export type GetPluginVersionsResponseBody = Schema.Schema.Type<typeof GetPluginVersionsResponseBodySchema>;
185
+ /**
186
+ * A catalog entry. Two flavours:
187
+ * - `{ repo }`: the registry service hydrates from the GitHub repo's latest release.
188
+ * Used by the production catalog.
189
+ * - `{ manifestUrl }`: the registry service skips GitHub and fetches the manifest directly.
190
+ * Used for local development against an in-progress plugin (e.g. served by `vite preview`)
191
+ * so authors can iterate without publishing a release.
192
+ */
193
+ export declare const RegistryEntrySchema: Schema.Union<[Schema.Struct<{
194
+ repo: Schema.filter<typeof Schema.String>;
195
+ }>, Schema.Struct<{
196
+ manifestUrl: Schema.filter<typeof Schema.String>;
197
+ }>]>;
198
+ export type RegistryEntry = Schema.Schema.Type<typeof RegistryEntrySchema>;
199
+ /**
200
+ * Shape of the catalog manifest published in the upstream community-plugins repo.
201
+ * Extra keys (e.g. `$schema`) are permitted.
202
+ */
203
+ export declare const RegistryManifestSchema: Schema.TypeLiteral<{
204
+ version: Schema.Literal<[1]>;
205
+ plugins: Schema.Array$<Schema.Union<[Schema.Struct<{
206
+ repo: Schema.filter<typeof Schema.String>;
207
+ }>, Schema.Struct<{
208
+ manifestUrl: Schema.filter<typeof Schema.String>;
209
+ }>]>>;
210
+ }, readonly [Schema.Record$<typeof Schema.String, typeof Schema.Unknown>]>;
211
+ export type RegistryManifest = Schema.Schema.Type<typeof RegistryManifestSchema>;
212
+ //# 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,YAA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mF;;EAEnF,CAAC;AACH,MAAM,MAAM,6BAA6B,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAE3G;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB;;;;IAG/B,CAAC;AACF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE3E;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;0EAMlC,CAAC;AACF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -0,0 +1,139 @@
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
+ * Filename of the entry module every plugin must publish at the root of its bundle.
31
+ * The host dynamic-imports `<manifest URL base>/index.mjs` directly — no per-plugin
32
+ * configuration. `composerPlugin` outputs the bundle under this name so plugin authors
33
+ * never have to think about it.
34
+ */
35
+ export const PLUGIN_ENTRY_FILENAME = 'index.mjs';
36
+ /**
37
+ * Shape of the manifest-asset JSON the registry service fetches from each plugin's latest release.
38
+ *
39
+ * Emitted by `@dxos/app-framework/vite-plugin`'s `composerPlugin` (see
40
+ * `MANIFEST_ASSET_NAME`). Lists every file the plugin needs at runtime — the entry
41
+ * module ({@link PLUGIN_ENTRY_FILENAME}) plus any sibling CSS, code-split chunks,
42
+ * fonts, etc. — so the host can eagerly precache the whole bundle for offline use.
43
+ * Paths in `assets` are relative to the manifest's URL.
44
+ */
45
+ export const PluginManifestSchema = Schema.Struct({
46
+ ...PluginMetaSchema.fields,
47
+ /** Plugin version (semver). Sourced from the publishing project's `package.json`. */
48
+ version: Schema.String.pipe(Schema.nonEmptyString()),
49
+ /**
50
+ * Relative paths of every file the plugin needs at runtime, including the entry.
51
+ * Must include {@link PLUGIN_ENTRY_FILENAME}; consumers verify on parse.
52
+ */
53
+ assets: Schema.Array(Schema.String).pipe(Schema.minItems(1)),
54
+ });
55
+ /**
56
+ * Single hydrated plugin entry returned by the registry service.
57
+ */
58
+ export const PluginEntrySchema = Schema.Struct({
59
+ /** GitHub repository in `owner/name` form. Empty string for entries sourced from a `manifestUrl`. */
60
+ repo: Schema.String,
61
+ /** Plugin metadata from the repo's latest-release `manifest.json`. */
62
+ meta: PluginMetaSchema,
63
+ /**
64
+ * URL of the plugin's `manifest.json`. Composer's URL loader fetches this, eagerly caches
65
+ * every declared asset via the platform `PluginAssetCache`, then dynamic-imports the entry.
66
+ * The URL must be CORS-safe and have its declared assets reachable as siblings.
67
+ */
68
+ moduleUrl: Schema.String,
69
+ /** Release tag the entry was resolved from (e.g. `v0.1.0`). Empty string for `manifestUrl` entries. */
70
+ releaseTag: Schema.String,
71
+ /** Health signal set by the service when an entry fails to refresh. */
72
+ health: PluginHealthSchema,
73
+ /** Unix ms when this entry was last successfully hydrated. */
74
+ hydratedAt: Schema.Number,
75
+ });
76
+ /**
77
+ * Response body of `GET /registry/plugins`.
78
+ */
79
+ export const GetPluginsResponseBodySchema = Schema.Struct({
80
+ /** Wire-format schema version, pinned to 1. */
81
+ version: Schema.Literal(1),
82
+ /** Hydrated entries. Order matches the order in the upstream catalog manifest. */
83
+ plugins: Schema.Array(PluginEntrySchema),
84
+ /** Unix ms timestamp of the most recent successful refresh cycle. */
85
+ refreshedAt: Schema.Number,
86
+ });
87
+ /**
88
+ * A single published version of a plugin, as returned by the registry service's
89
+ * versions endpoint. Sourced from the publishing project's GitHub releases.
90
+ *
91
+ * The host treats `tag` opaquely; ordering — newest first — is the service's
92
+ * responsibility (typically reverse-chronological by release date).
93
+ */
94
+ export const PluginVersionSchema = Schema.Struct({
95
+ /** Release tag (e.g. `v0.1.21`). Stable identifier for this version. */
96
+ tag: Schema.String.pipe(Schema.nonEmptyString()),
97
+ /**
98
+ * URL of this version's `manifest.json`. Matches the shape of {@link PluginEntrySchema.fields.moduleUrl}
99
+ * but pinned to a specific release rather than the latest. Composer's URL loader fetches
100
+ * this when the user installs / rolls back to this version.
101
+ */
102
+ moduleUrl: Schema.String.pipe(Schema.nonEmptyString()),
103
+ /** Unix ms when the version was released. Optional — services that lack this signal can omit. */
104
+ releasedAt: Schema.optional(Schema.Number),
105
+ });
106
+ /**
107
+ * Response body of `GET /registry/plugins/:repo/versions`.
108
+ *
109
+ * `:repo` is the GitHub `owner/name` form, URL-encoded (so `/` is escaped).
110
+ * Returns all hydratable releases for the repo, newest first; clients display them
111
+ * in the version picker for install / roll-back. Unauthenticated; same surface area
112
+ * as `GET /registry/plugins`.
113
+ */
114
+ export const GetPluginVersionsResponseBodySchema = Schema.Struct({
115
+ /** Wire-format schema version, pinned to 1. */
116
+ version: Schema.Literal(1),
117
+ /** Available versions for the requested repo, newest first. */
118
+ versions: Schema.Array(PluginVersionSchema),
119
+ /** Unix ms timestamp of the most recent successful refresh cycle for this repo. */
120
+ refreshedAt: Schema.Number,
121
+ });
122
+ /**
123
+ * A catalog entry. Two flavours:
124
+ * - `{ repo }`: the registry service hydrates from the GitHub repo's latest release.
125
+ * Used by the production catalog.
126
+ * - `{ manifestUrl }`: the registry service skips GitHub and fetches the manifest directly.
127
+ * Used for local development against an in-progress plugin (e.g. served by `vite preview`)
128
+ * so authors can iterate without publishing a release.
129
+ */
130
+ export const RegistryEntrySchema = Schema.Union(Schema.Struct({ repo: Schema.String.pipe(Schema.nonEmptyString()) }), Schema.Struct({ manifestUrl: Schema.String.pipe(Schema.nonEmptyString()) }));
131
+ /**
132
+ * Shape of the catalog manifest published in the upstream community-plugins repo.
133
+ * Extra keys (e.g. `$schema`) are permitted.
134
+ */
135
+ export const RegistryManifestSchema = Schema.Struct({
136
+ version: Schema.Literal(1),
137
+ plugins: Schema.Array(RegistryEntrySchema),
138
+ }, Schema.Record({ key: Schema.String, value: Schema.Unknown }));
139
+ //# 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,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AAI,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,EAAE,CAAC,EACpE,MAAM,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,EAAE,CAAC,CAC5E,CAAC;AAGF;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,CACjD;IACE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC;CAC3C,EACD,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAC7D,CAAC"}
@@ -2,26 +2,104 @@
2
2
  * NOTE: Messages should be sentences (Start with a capital letter and end with a period).
3
3
  * Errors can optionally include a JSON context object.
4
4
  */
5
- export declare class BaseError extends Error {
6
- readonly code: string;
7
- readonly context?: Record<string, any> | undefined;
8
- constructor(code: string, message?: string, context?: Record<string, any> | undefined);
9
- }
5
+ import { BaseError } from '@dxos/errors';
6
+ declare const ApiError_base: {
7
+ new (options?: import("@dxos/errors").BaseErrorOptions): {
8
+ cause?: unknown;
9
+ stack?: string;
10
+ name: "ApiError";
11
+ context: Record<string, unknown>;
12
+ readonly message: string;
13
+ readonly _tag: "ApiError";
14
+ };
15
+ isError(error: unknown): error is Error;
16
+ name: "ApiError";
17
+ is(error: unknown): error is BaseError;
18
+ wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, 'cause'> & {
19
+ ifTypeDiffers?: boolean;
20
+ }): (error: unknown) => {
21
+ cause?: unknown;
22
+ stack?: string;
23
+ name: "ApiError";
24
+ context: Record<string, unknown>;
25
+ readonly message: string;
26
+ readonly _tag: "ApiError";
27
+ };
28
+ extend<Name extends string = string>(name: Name, message?: string): any;
29
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
30
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
31
+ stackTraceLimit: number;
32
+ };
10
33
  /**
11
34
  * User facing API Errors.
12
35
  * E.g., something was misconfigured.
13
36
  */
14
- export declare class ApiError extends BaseError {
37
+ export declare class ApiError extends ApiError_base {
15
38
  }
39
+ declare const SystemError_base: {
40
+ new (options?: import("@dxos/errors").BaseErrorOptions): {
41
+ cause?: unknown;
42
+ stack?: string;
43
+ name: "SystemError";
44
+ context: Record<string, unknown>;
45
+ readonly message: string;
46
+ readonly _tag: "SystemError";
47
+ };
48
+ isError(error: unknown): error is Error;
49
+ name: "SystemError";
50
+ is(error: unknown): error is BaseError;
51
+ wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, 'cause'> & {
52
+ ifTypeDiffers?: boolean;
53
+ }): (error: unknown) => {
54
+ cause?: unknown;
55
+ stack?: string;
56
+ name: "SystemError";
57
+ context: Record<string, unknown>;
58
+ readonly message: string;
59
+ readonly _tag: "SystemError";
60
+ };
61
+ extend<Name extends string = string>(name: Name, message?: string): any;
62
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
63
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
64
+ stackTraceLimit: number;
65
+ };
16
66
  /**
17
67
  * Internal system errors.
18
68
  * E.g., unexpected/unrecoverable runtime error.
19
69
  */
20
- export declare class SystemError extends BaseError {
70
+ export declare class SystemError extends SystemError_base {
21
71
  }
72
+ declare const DatabaseError_base: {
73
+ new (options?: import("@dxos/errors").BaseErrorOptions): {
74
+ cause?: unknown;
75
+ stack?: string;
76
+ name: "DatabaseError";
77
+ context: Record<string, unknown>;
78
+ readonly message: string;
79
+ readonly _tag: "DatabaseError";
80
+ };
81
+ isError(error: unknown): error is Error;
82
+ name: "DatabaseError";
83
+ is(error: unknown): error is BaseError;
84
+ wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, 'cause'> & {
85
+ ifTypeDiffers?: boolean;
86
+ }): (error: unknown) => {
87
+ cause?: unknown;
88
+ stack?: string;
89
+ name: "DatabaseError";
90
+ context: Record<string, unknown>;
91
+ readonly message: string;
92
+ readonly _tag: "DatabaseError";
93
+ };
94
+ extend<Name extends string = string>(name: Name, message?: string): any;
95
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
96
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
97
+ stackTraceLimit: number;
98
+ };
22
99
  /**
23
100
  * Database errors.
24
101
  */
25
- export declare class DatabaseError extends BaseError {
102
+ export declare class DatabaseError extends DatabaseError_base {
26
103
  }
104
+ export {};
27
105
  //# sourceMappingURL=base-errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-errors.d.ts","sourceRoot":"","sources":["../../../src/errors/base-errors.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,qBAAa,SAAU,SAAQ,KAAK;IAEhC,QAAQ,CAAC,IAAI,EAAE,MAAM;IAErB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;gBAF7B,IAAI,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE,MAAM,EACP,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,YAAA;CAQzC;AAKD;;;GAGG;AACH,qBAAa,QAAS,SAAQ,SAAS;CAAG;AAE1C;;;GAGG;AACH,qBAAa,WAAY,SAAQ,SAAS;CAAG;AAE7C;;GAEG;AAEH,qBAAa,aAAc,SAAQ,SAAS;CAAG"}
1
+ {"version":3,"file":"base-errors.d.ts","sourceRoot":"","sources":["../../../src/errors/base-errors.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzC;;;GAGG;AACH,qBAAa,QAAS,SAAQ,aAA4B;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE7D;;;GAGG;AACH,qBAAa,WAAY,SAAQ,gBAA+B;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEnE;;GAEG;AACH,qBAAa,aAAc,SAAQ,kBAAiC;CAAG"}
@@ -1,42 +1,26 @@
1
1
  //
2
2
  // Copyright 2021 DXOS.org
3
3
  //
4
- // TODO(dmaretskyi): Reconcile with @dxos/errors
5
4
  /**
6
5
  * NOTE: Messages should be sentences (Start with a capital letter and end with a period).
7
6
  * Errors can optionally include a JSON context object.
8
7
  */
9
- export class BaseError extends Error {
10
- code;
11
- context;
12
- constructor(code, message, context) {
13
- // TODO(dmaretskyi): Error.cause.
14
- super(message ?? code);
15
- this.code = code;
16
- this.context = context;
17
- this.name = code;
18
- // NOTE: Restores prototype chain (https://stackoverflow.com/a/48342359).
19
- Object.setPrototypeOf(this, new.target.prototype);
20
- }
21
- }
22
- // TODO(dmaretskyi): Consider common error classes with error codes:
23
- // throw new SystemError(ERROR_CODE_OUT_OF_MEMORY, 'Out of memory', { a: 1, b: 2 });
8
+ import { BaseError } from '@dxos/errors';
24
9
  /**
25
10
  * User facing API Errors.
26
11
  * E.g., something was misconfigured.
27
12
  */
28
- export class ApiError extends BaseError {
13
+ export class ApiError extends BaseError.extend('ApiError') {
29
14
  }
30
15
  /**
31
16
  * Internal system errors.
32
17
  * E.g., unexpected/unrecoverable runtime error.
33
18
  */
34
- export class SystemError extends BaseError {
19
+ export class SystemError extends BaseError.extend('SystemError') {
35
20
  }
36
21
  /**
37
22
  * Database errors.
38
23
  */
39
- // TODO(wittjosiah): Same as ApiError?
40
- export class DatabaseError extends BaseError {
24
+ export class DatabaseError extends BaseError.extend('DatabaseError') {
41
25
  }
42
26
  //# sourceMappingURL=base-errors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-errors.js","sourceRoot":"","sources":["../../../src/errors/base-errors.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,gDAAgD;AAEhD;;;GAGG;AACH,MAAM,OAAO,SAAU,SAAQ,KAAK;IAEvB;IAEA;IAHX,YACW,IAAY,EACrB,OAAgB,EACP,OAA6B;QAEtC,iCAAiC;QACjC,KAAK,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC;QALd,SAAI,GAAJ,IAAI,CAAQ;QAEZ,YAAO,GAAP,OAAO,CAAsB;QAItC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,yEAAyE;QACzE,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACpD,CAAC;CACF;AAED,oEAAoE;AACpE,oFAAoF;AAEpF;;;GAGG;AACH,MAAM,OAAO,QAAS,SAAQ,SAAS;CAAG;AAE1C;;;GAGG;AACH,MAAM,OAAO,WAAY,SAAQ,SAAS;CAAG;AAE7C;;GAEG;AACH,sCAAsC;AACtC,MAAM,OAAO,aAAc,SAAQ,SAAS;CAAG"}
1
+ {"version":3,"file":"base-errors.js","sourceRoot":"","sources":["../../../src/errors/base-errors.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC;;;GAGG;AACH,MAAM,OAAO,QAAS,SAAQ,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC;CAAG;AAE7D;;;GAGG;AACH,MAAM,OAAO,WAAY,SAAQ,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC;CAAG;AAEnE;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,SAAS,CAAC,MAAM,CAAC,eAAe,CAAC;CAAG"}
@@ -1,7 +1,7 @@
1
- import { type Error as SerializedErrorProto } from '../proto/gen/dxos/error.js';
1
+ import { type Error as SerializedErrorProto } from '../proto/gen/dxos/error.ts';
2
2
  export declare const encodeError: (err: any) => SerializedErrorProto;
3
3
  export type DecodeOptions = {
4
4
  appendStack?: string;
5
5
  };
6
- export declare const decodeError: (err: SerializedErrorProto, { appendStack }?: DecodeOptions) => Error;
6
+ export declare const decodeError: (err: SerializedErrorProto, { appendStack }?: DecodeOptions) => import("@dxos/errors").BaseError<string> | Error;
7
7
  //# sourceMappingURL=encoding.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../../../src/errors/encoding.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,KAAK,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAIhF,eAAO,MAAM,WAAW,GAAI,KAAK,GAAG,KAAG,oBAiBtC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,KAAK,oBAAoB,EAAE,kBAAiB,aAAkB,UASzF,CAAC"}
1
+ {"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../../../src/errors/encoding.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,KAAK,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAGhF,eAAO,MAAM,WAAW,QAAS,GAAG,KAAG,oBAiBtC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,WAAW,QAAS,oBAAoB,oBAAmB,aAAa,qDASpF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"encoding.js","sourceRoot":"","sources":["../../../src/errors/encoding.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAIF,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAQ,EAAwB,EAAE;IAC5D,IAAI,OAAO,GAAG,KAAK,QAAQ,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